ITotalJustice / notorious_beeg

gba emulator written in c++23
https://notorious-beeg.netlify.app/
GNU General Public License v3.0
41 stars 4 forks source link

pokemon emerald - broken gfx when using cable cart #110

Open ITotalJustice opened 1 year ago

ITotalJustice commented 1 year ago

image

the cable does not fully extend to the top. looking at this video shows it fully extended.

the cable is an 4bpp affine object.

ITotalJustice commented 1 year ago

i fixed it. so the issue was to do with the wrap around. the formula for calculating the y position is correct, but i was using the wrong height value. i was using the non-scaled height value. as this object is affine2X (double size), the height should have been doubled.

https://github.com/ITotalJustice/notorious_beeg/blob/711951ec3ff8e452022550c5052b803cf714767a/src/core/ppu/render.cpp#L504

image