dciabrin / ngdevkit

Open source development for Neo-Geo
GNU Lesser General Public License v3.0
273 stars 26 forks source link

Size image in 02-sprite example #6

Closed totologic closed 5 years ago

totologic commented 5 years ago

Hi.

I am playing with 02-sprite example and I couldn't figure out why your C code assumes logo.png is made of 16x4 tiles for the Neo Geo hardware whereas the size of the image is 240x64px.

Indeed tiles are 16x16px, so 240x64px should rather give 15x4 tiles in hardware. Why not ?

totologic commented 5 years ago

Actually the sprite is really 15x4 so the first loop in the init_sprite function could me modified to:

for (u8 i=0; i<15; i++)

Sorry for opening a ticket for such a small issue, but it was disturbing and obfuscated the understanding of the key concepts.

dciabrin commented 5 years ago

You're absolutely correct, I'm fixing that bug at once, thanks for the report :)