Jump to content
IGNORED

How do you handle 4 bits Bitmap ?


KanedaFr

Recommended Posts

Hi there,

 

I'd like to use 16 colors bitmap (4bpp) but whatever I tried, it's a fail.

i have no problem with 256 8bpp but I'd like to use pals more efficiency

 

Imagemagick identify ouput:

 

clouds.bmp BMP3 200x128 200x128+0+0 4-bit sRGB 16c 12918B 0.000u 0:00.003

 

 

build.log output:

Processing ASSETS\GFX\clouds.bmp
        Converting BMP internally into gfxdata/clut...
        File is 200 pixels wide, 128 pixels high and is 4 bits/pixel

 

cloud.bmp.clut is ok

cloud.bmp.gfxdata is ok

 

R_sprite_framesz is h*w/2

R_sprite_bytewid is w/2

R_sprite_gwidth is w/2

R_sprite_bdepth is 4

 

 

Did I miss something ?

What could I look for ?

 

(if I remove the /2 , I start to see something with the right colors but not the wanted bitmap)

 

 

 

Capture d’écran 2024-09-27 à 00.11.53.png

Link to comment
Share on other sites

1 hour ago, Sporadic said:

It might be due to your sprite width. 

It needs to be divisible by 8 bytes iirc (I've not validated what yours is, but it's one of the main gotchas)

ho...I didn't know about it...where is it documented so I could learn more and more ?

 

it could explain why it works with 8bpp (200/8 bytes = 25) but not 4bpp (200/2/8 bytes = 12,5) !

I'll try later today! thanks, it seems to be culprit

Link to comment
Share on other sites

20 minutes ago, KanedaFr said:

ho...I didn't know about it...where is it documented so I could learn more and more ?

 

it could explain why it works with 8bpp (200/8 bytes = 25) but not 4bpp (200/2/8 bytes = 12,5) !

I'll try later today! thanks, it seems to be culprit

It is about objects, I'd say. And those must be dividable by 8.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...