Jump to content
IGNORED

16x16 1bit sprite won't show up


flux

Recommended Posts

I got stuck on this issue a while back and decided to get back into it and still wasn't able to come up with a solution so I'm going to try reaching out. I have a 1 bit 16x16 single frame sprite that refuses to show up. I tried making a 64x64 1 bit sprite using the same program and method and it seems to load ok (the palette seems off but it's there at least). But the 16x16 version inexplicably refuses to appear.

 

The changes I make in rapinit.s between the two are on these lines:

dc.l	16	; sprite_width	; width of sprite (in pixels)
dc.l	16	; sprite_height	; height of sprite (in pixels)
dc.l	1	; (BIT DEPTH)	; bitmap depth (1/2/4/8/16/24)
dc.l	16*16/8	; sprite_framesz	; size per frame in bytes of sprite data
dc.l	16/8	; sprite_bytewid	; width in bytes of one line of sprite data
dc.l	16/8	; sprite_gwidth	; GFX width (of data)

dc.l	64	; sprite_width	; width of sprite (in pixels)
dc.l	64	; sprite_height	; height of sprite (in pixels)
dc.l	1	; (BIT DEPTH)	; bitmap depth (1/2/4/8/64/24)
dc.l	64*64/8	; sprite_framesz	; size per frame in bytes of sprite data
dc.l	64/8	; sprite_bytewid	; width in bytes of one line of sprite data
dc.l	64/8	; sprite_gwidth	; GFX width (of data)

Besides specifying a different filename in assets.txt, that's really the only thing that changes and I'm not sure why it would show up in one instance and not the other. I did clear out the build files and everything when switching between the two different files. I'm still not 100% clear on the whole dividing by 8 or 2 thing but I feel like I have it correct there. Once, when playing around with those numbers I did get my sprite to appear when I changed sprite_bytewid to 16/2. It was as tall as it should be but was maybe 4 or 5 times as wide, like a big rectangle instead of a square with the graphic all distorted and messed around (not simply stretched). Both 16/16 and 16/4 left me with my sprite still not appearing, and 16/1 gave me an even wider rectangle, perhaps twice as wide. So it may well be the case that I'm doing something wrong in that rapinit.s file but as I have it there in the code paste, it simply doesn't appear at all.

 

(It might also be worth noting I don't have transparency turned on for that sprite or anything like that.)

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...