libretro / gpsp

gpSP for libretro.
GNU General Public License v2.0
51 stars 51 forks source link

Fix Banjo Kazooie GR intro black screen (Mode 4 Pallette check) #206

Closed andymcca closed 1 year ago

andymcca commented 1 year ago

This is a change from gpsp Kai which when merged fixes the intro to Banjo Kazooie GR (previously a black screen).

I think this could be better implemented - for example if alpha_op is anything other than 'normal' I would expect a crash, but hard coding the macro to point to tile_expand_base_normal_p0 doesn't seem right either.

For review, anyway.

andymcca commented 1 year ago

Actually, bitmap_render_pixel_mode4 can probably just be this instead to save calling another macro - #define bitmap_render_pixel_mode4(alpha_op) \ if (current_pixel != 0)\ { \ tile_lookup_palette(palette, current_pixel);\ dest_ptr[index] = current_pixel; \ } \

davidgfnet commented 1 year ago

The code doesnt build due to missing a closing "##". Anyway I fixed it and pushed it. Fixes a few games that use Mode4 backgrounds (many racing games it seems!) Thanks!