Blank backgrounds..

Aug 7, 2008 at 10:25 PM
Senior Member
"This is the greatest handgun ever made! You have to ask yourself, do I feel lucky?"
Join Date: Jun 12, 2007
Location:
Posts: 95
Age: 35
This is bothering me..

The map "Kings" (The intro) has a totally black background. The header says that is bk0, which I for some reason feel the need to presume doesn't actually load the file, but I've never really tested it.

Starting point and First Cave have a blue background, of #000020. The header says that is bkBlack.

Between the two, there is a difference of a single byte, in the bitmap header or something, where in bk0 it is 0 and in bkBlack it is 2.

I can't even tell what that does, because in all my editors they appear exactly the same; The palette contains two entries, the first is pure black (#000000) which is usually used for transparency, the second is #000010, which is neither pure black NOR the background to First Cave.

So what the heck is going on here?! Does anybody know? Or should I just hardcode it so that bk0 translates to black and bkBlack translates to blue without actually loading either?
 
Aug 8, 2008 at 12:27 AM
Administrator
Forum Administrator
"Life begins and ends with Nu."
Join Date: Jul 15, 2007
Location: Australia
Posts: 6212
Age: 38
Echidna-san said:
This is bothering me..

The map "Kings" (The intro) has a totally black background. The header says that is bk0, which I for some reason feel the need to presume doesn't actually load the file, but I've never really tested it.

Starting point and First Cave have a blue background, of #000020. The header says that is bkBlack.

Between the two, there is a difference of a single byte, in the bitmap header or something, where in bk0 it is 0 and in bkBlack it is 2.

I can't even tell what that does, because in all my editors they appear exactly the same; The palette contains two entries, the first is pure black (#000000) which is usually used for transparency, the second is #000010, which is neither pure black NOR the background to First Cave.

So what the heck is going on here?! Does anybody know? Or should I just hardcode it so that bk0 translates to black and bkBlack translates to blue without actually loading either?
Could be bk0.pbm and bkBlack.pbm. *shrugs*

Though you should not hardcode it since some people may want to control the background colour.

I am assuming that bk0.pbm and bkBlack.pbm are solid 1px by 1px variations of that background colour, correct?
 
Aug 10, 2008 at 11:19 PM
Senior Member
"This is the greatest handgun ever made! You have to ask yourself, do I feel lucky?"
Join Date: Jun 12, 2007
Location:
Posts: 95
Age: 35
No, did you read my post? They are the exact same 64x64 image, with only a single byte's difference in the entire file and a two color palette which does not contain the shade of blue that actually gets used. The one byte of difference might theoretically mean that bk0.pbm actually has a no-color palette, if that made any sense, but that only covers half of the issue.

So yes, I will "hardcode" bk0 to black and bkBlack to dark-blue in the parts of my Lua scripts that handle background drawing.
 
Aug 22, 2008 at 11:43 PM
Been here way too long...
"Life begins and ends with Nu."
Join Date: Jan 4, 2008
Location: Lingerie, but also, like, fancy curtains
Posts: 3054
Eh, good a time as any to make a first post. The color of the intro scene is at 0xDE78. This color is also the color that the FAOxxxx fades to.

In case you are wondering, the value is (hex) 00 00 00 20.

This info has already been posted by someone, but just thought I'd share.

Hope that helps,

Lace
 
Aug 23, 2008 at 12:17 AM
Administrator
Forum Administrator
"Life begins and ends with Nu."
Join Date: Jul 15, 2007
Location: Australia
Posts: 6212
Age: 38
Echidna-san said:
No, did you read my post? They are the exact same 64x64 image, with only a single byte's difference in the entire file and a two color palette which does not contain the shade of blue that actually gets used. The one byte of difference might theoretically mean that bk0.pbm actually has a no-color palette, if that made any sense, but that only covers half of the issue.

So yes, I will "hardcode" bk0 to black and bkBlack to dark-blue in the parts of my Lua scripts that handle background drawing.
Better to allow the modder to change the bkBlack background to any colour using hex values. So each time bkBlack is called you would have to set the colour, else it will default to a dark blue.
 
Top