Skip to content

Commit

Permalink
Merge some modifications from TempGBA and fixing an oversight
Browse files Browse the repository at this point in the history
with obj_mode.
  • Loading branch information
gameblabla committed Jun 28, 2019
1 parent dccd8e8 commit a6ea1ab
Showing 1 changed file with 8 additions and 18 deletions.
26 changes: 8 additions & 18 deletions video.c
Original file line number Diff line number Diff line change
Expand Up @@ -2135,18 +2135,8 @@ static void order_obj(u32 video_mode)
u32 current_count;
u16 *oam_ptr = oam_ram + 508;

for(priority = 0; priority < 5; priority++)
{
for(row = 0; row < 160; row++)
{
obj_priority_count[priority][row] = 0;
}
}

for(row = 0; row < 160; row++)
{
obj_alpha_count[row] = 0;
}
memset(obj_priority_count, 0, 5 * 160);
memset(obj_alpha_count, 0, 160);

for(obj_num = 127; obj_num >= 0; obj_num--, oam_ptr -= 4)
{
Expand Down Expand Up @@ -2201,8 +2191,8 @@ static void order_obj(u32 video_mode)
obj_alpha_count[row]++;
}
break;
default:
if(obj_mode == 2) obj_priority = 4;
case 2:
obj_priority = 4;
break;
}

Expand Down Expand Up @@ -2295,15 +2285,15 @@ fill_line_builder(color32);
pixel_bottom = palette_ram_converted[(pixel_pair >> 16) & 0x1FF]; \
pixel_bottom = (pixel_bottom | (pixel_bottom << 16)) & 0x07E0F81F; \
pixel_top = ((pixel_top * blend_a) + (pixel_bottom * blend_b)) >> 4; \
if(pixel_top & 0x08010020) \
if(pixel_top & 0x08010020 != 0) \
{ \
if(pixel_top & 0x08000000) \
if(pixel_top & 0x08000000 != 0) \
pixel_top |= 0x07E00000; \
\
if(pixel_top & 0x00010000) \
if(pixel_top & 0x00010000 != 0) \
pixel_top |= 0x0000F800; \
\
if(pixel_top & 0x00000020) \
if(pixel_top & 0x00000020 != 0) \
pixel_top |= 0x0000001F; \
} \

Expand Down

0 comments on commit a6ea1ab

Please sign in to comment.