Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: colored torch flames #189

Closed
EndeavourAccuracy opened this issue Feb 20, 2019 · 6 comments
Closed

Feature request: colored torch flames #189

EndeavourAccuracy opened this issue Feb 20, 2019 · 6 comments

Comments

@EndeavourAccuracy
Copy link
Contributor

This is a feature request.
It would be nice if SDLPoP, similar to its unique fake tiles, introduced colored torch flames.
Their legacy combos could be variants 0x00 (0x01, really) through 0x40 in groups 0x13 and 0x1E.
This would allow for 64 colors (6-bit RGB) to be used by modders.
There is a related post on the Princed forum that, among other things, suggests simply keeping the cores of custom flames white.
Developers could add/test the flames via apoplexy's custom tiles screen.
If an implementation would ship, I could add them on apoplexy's native tiles screen.
Thoughts?

@EndeavourAccuracy
Copy link
Contributor Author

To maybe get this rolling...

Here's code that figures out what should happen (iVariant is the modifier):

if ((iVariant & 0x3F) != 0)
{
	iRed = ((iVariant >> 4) & ((1 << 2) - 1)) * 85;
	iGreen = ((iVariant >> 2) & ((1 << 2) - 1)) * 85;
	iBlue = ((iVariant >> 0) & ((1 << 2) - 1)) * 85;

	printf ("TODO: Change all #fc8400 to R:%i G:%i B:%i.\n", iRed, iGreen, iBlue);
}

Based on this overview:

0x00 = 00 = 00000000 = r00 g00 b00 = #000000 -> but using #fc8400 (orange default)
0x01 = 01 = 00000001 = r00 g00 b01 = #000055
0x02 = 02 = 00000010 = r00 g00 b10 = #0000aa
0x03 = 03 = 00000011 = r00 g00 b11 = #0000ff
0x04 = 04 = 00000100 = r00 g01 b00 = #005500
0x05 = 05 = 00000101 = r00 g01 b01 = #005555
0x06 = 06 = 00000110 = r00 g01 b10 = #0055aa
0x07 = 07 = 00000111 = r00 g01 b11 = #0055ff
0x08 = 08 = 00001000 = r00 g10 b00 = #00aa00
0x09 = 09 = 00001001 = r00 g10 b01 = #00aa55
0x0A = 10 = 00001010 = r00 g10 b10 = #00aaaa
0x0B = 11 = 00001011 = r00 g10 b11 = #00aaff
0x0C = 12 = 00001100 = r00 g11 b00 = #00ff00
0x0D = 13 = 00001101 = r00 g11 b01 = #00ff55
0x0E = 14 = 00001110 = r00 g11 b10 = #00ffaa
0x0F = 15 = 00001111 = r00 g11 b11 = #00ffff
0x10 = 16 = 00010000 = r01 g00 b00 = #550000
0x11 = 17 = 00010001 = r01 g00 b01 = #550055
0x12 = 18 = 00010010 = r01 g00 b10 = #5500aa
0x13 = 19 = 00010011 = r01 g00 b11 = #5500ff
0x14 = 20 = 00010100 = r01 g01 b00 = #555500
0x15 = 21 = 00010101 = r01 g01 b01 = #555555
0x16 = 22 = 00010110 = r01 g01 b10 = #5555aa
0x17 = 23 = 00010111 = r01 g01 b11 = #5555ff
0x18 = 24 = 00011000 = r01 g10 b00 = #55aa00
0x19 = 25 = 00011001 = r01 g10 b01 = #55aa55
0x1A = 26 = 00011010 = r01 g10 b10 = #55aaaa
0x1B = 27 = 00011011 = r01 g10 b11 = #55aaff
0x1C = 28 = 00011100 = r01 g11 b00 = #55ff00
0x1D = 29 = 00011101 = r01 g11 b01 = #55ff55
0x1E = 30 = 00011110 = r01 g11 b10 = #55ffaa
0x1F = 31 = 00011111 = r01 g11 b11 = #55ffff
0x20 = 32 = 00100000 = r10 g00 b00 = #aa0000
0x21 = 33 = 00100001 = r10 g00 b01 = #aa0055
0x22 = 34 = 00100010 = r10 g00 b10 = #aa00aa
0x23 = 35 = 00100011 = r10 g00 b11 = #aa00ff
0x24 = 36 = 00100100 = r10 g01 b00 = #aa5500
0x25 = 37 = 00100101 = r10 g01 b01 = #aa5555
0x26 = 38 = 00100110 = r10 g01 b10 = #aa55aa
0x27 = 39 = 00100111 = r10 g01 b11 = #aa55ff
0x28 = 40 = 00101000 = r10 g10 b00 = #aaaa00
0x29 = 41 = 00101001 = r10 g10 b01 = #aaaa55
0x2A = 42 = 00101010 = r10 g10 b10 = #aaaaaa
0x2B = 43 = 00101011 = r10 g10 b11 = #aaaaff
0x2C = 44 = 00101100 = r10 g11 b00 = #aaff00
0x2D = 45 = 00101101 = r10 g11 b01 = #aaff55
0x2E = 46 = 00101110 = r10 g11 b10 = #aaffaa
0x2F = 47 = 00101111 = r10 g11 b11 = #aaffff
0x30 = 48 = 00110000 = r11 g00 b00 = #ff0000
0x31 = 49 = 00110001 = r11 g00 b01 = #ff0055
0x32 = 50 = 00110010 = r11 g00 b10 = #ff00aa
0x33 = 51 = 00110011 = r11 g00 b11 = #ff00ff
0x34 = 52 = 00110100 = r11 g01 b00 = #ff5500
0x35 = 53 = 00110101 = r11 g01 b01 = #ff5555
0x36 = 54 = 00110110 = r11 g01 b10 = #ff55aa
0x37 = 55 = 00110111 = r11 g01 b11 = #ff55ff
0x38 = 56 = 00111000 = r11 g10 b00 = #ffaa00
0x39 = 57 = 00111001 = r11 g10 b01 = #ffaa55
0x3A = 58 = 00111010 = r11 g10 b10 = #ffaaaa
0x3B = 59 = 00111011 = r11 g10 b11 = #ffaaff
0x3C = 60 = 00111100 = r11 g11 b00 = #ffff00
0x3D = 61 = 00111101 = r11 g11 b01 = #ffff55
0x3E = 62 = 00111110 = r11 g11 b10 = #ffffaa
0x3F = 63 = 00111111 = r11 g11 b11 = #ffffff

@EndeavourAccuracy
Copy link
Contributor Author

If an implementation would ship, I could add them on apoplexy's native tiles screen.

I've already added this.
Download available at apoplexy.org.

apoplexy v3.5, native flames

NagyD added a commit that referenced this issue Mar 24, 2019
They don't yet appear correctly if the prince is in front of them.
NagyD added a commit that referenced this issue Mar 24, 2019
Moved them into blitter system so they are drawn when the other flames are.
@EndeavourAccuracy
Copy link
Contributor Author

Thanks NagyD, it works great! 👍

@EndeavourAccuracy
Copy link
Contributor Author

Small room 24 issue.
https://forum.princed.org/viewtopic.php?p=25410#p25410

@EndeavourAccuracy
Copy link
Contributor Author

The solution is to increase the number in torch_colors[24][30].

However, there's another issue.
In all rows, torches at the very right do not animate in the room to the right.

@EndeavourAccuracy
Copy link
Contributor Author

NagyD recently fixed both (with 0ebc150 and 3c22ceb)!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant