| Author |
Message |
2dragons Novice
Joined: Feb 17 2004 Posts: 95 Offline
|
Posted: Sun Jun 20, 2004 3:43 am Post subject: Subspace Banner Colortable |
 |
|
|
|
Rather than figure it out I thought I'd ask first:
When getting a banner in any part of SS, it is recieves it as 96 bytes, each byte representing a pixel of the bitmap.
How can I determine what color is represented by each byte value? What I know of bitmaps is that if they are <= 8 bits they include a colortable. However obviously that isn't the case here.
So if you know how it works that'd be great. |
|
| Back to top |
|
 |
Bak ?ls -s 0 in

Age:26 Gender: Joined: Jun 11 2004 Posts: 1826 Location: USA Offline
|
Posted: Sun Jun 20, 2004 4:26 am Post subject: |
 |
|
|
|
| isn't that just a 256 color bitmap then? 1 byte each? |
|
| Back to top |
|
 |
wEaViL Don't make me turn this forum around!

Age:46 Gender: Joined: Feb 17 2003 Posts: 829 Location: nc usa Offline
|
Posted: Sun Jun 20, 2004 5:06 am Post subject: |
 |
|
|
|
| ss graphics are 8bit bmp's that includes banners and everything. |
|
| Back to top |
|
 |
SuSE Me measures good

Joined: Dec 02 2002 Posts: 2307 Offline
|
Posted: Sun Jun 20, 2004 7:12 am Post subject: |
 |
|
|
|
| wEaViL wrote: | | ss graphics are 8bit bmp's that includes banners and everything. |
no |
|
| Back to top |
|
 |
Mr Ekted Movie Geek

Gender: Joined: Feb 09 2004 Posts: 1379 Offline
|
Posted: Sun Jun 20, 2004 7:26 am Post subject: |
 |
|
|
|
Banners use the default SS palette, which is implied (not included) in the 96 bytes. If a given pixel has the value 12, then its color is palette entry 12. Open any of the default SS graphics files (or a banner file) in Photoshop and you can see the SS palette. _________________ 4,691 irradiated haggis! |
|
| Back to top |
|
 |
SuSE Me measures good

Joined: Dec 02 2002 Posts: 2307 Offline
|
Posted: Sun Jun 20, 2004 7:58 am Post subject: |
 |
|
|
|
| while the game does seem to convert a banner to ss palette regardless of color depth settings - I can still have a 32-bit bmp banner in my folder and use it |
|
| Back to top |
|
 |
CypherJF I gargle nitroglycerin

Gender: Joined: Aug 14 2003 Posts: 2582 Location: USA Offline
|
Posted: Sun Jun 20, 2004 9:54 pm Post subject: |
 |
|
|
|
Right, the last 96 bytes tell you the 96 pixels, but they are flipped vertically... ... or w/e I had to take 12 bytes, and build it from the bottom up.. to have it display correctly _________________ Performance is often the art of cheating carefully. - James Gosling |
|
| Back to top |
|
 |
2dragons Novice
Joined: Feb 17 2004 Posts: 95 Offline
|
Posted: Tue Jun 22, 2004 12:02 am Post subject: |
 |
|
|
|
| That's true for bitmaps in general, but not in the 96 bytes commonly sent bank and forth between the many clients/servers of SS. |
|
| Back to top |
|
 |
CypherJF I gargle nitroglycerin

Gender: Joined: Aug 14 2003 Posts: 2582 Location: USA Offline
|
Posted: Tue Jun 22, 2004 12:25 am Post subject: |
 |
|
|
|
| I can only tell you how I got the banner to look proper after retreiving it from Merv. |
|
| Back to top |
|
 |
Smong Server Help Squatter

Joined: 1043048991 Posts: 0x91E Offline
|
Posted: Thu Jun 24, 2004 2:41 pm Post subject: |
 |
|
|
|
| Mr Ekted wrote: | | Open any of the default SS graphics files (or a banner file) in Photoshop and you can see the SS palette. | ships.bm2 and tiles.bm2 have different palettes. I am assuming ships.bm2 uses the old palette. |
|
| Back to top |
|
 |
Mr Ekted Movie Geek

Gender: Joined: Feb 09 2004 Posts: 1379 Offline
|
Posted: Thu Jun 24, 2004 3:45 pm Post subject: |
 |
|
|
|
| Bitmaps with a positive height (in BMP header) are stored bottom up, and with negative height are top down. |
|
| Back to top |
|
 |
|