Skip to content

Commit

Permalink
proper fix for google code issue #579: Legend of Zelda: OOT crash whe…
Browse files Browse the repository at this point in the history
…n moving towards Malon in Castle Town
  • Loading branch information
richard42 committed May 2, 2015
1 parent 129ab88 commit 15f1f88
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Glide64/TexLoad4b.h
Expand Up @@ -596,7 +596,7 @@ wxUint32 Load4bCI (wxUIntPtr dst, wxUIntPtr src, int wid_64, int height, int lin
{
if (wid_64 < 1) wid_64 = 1;
if (height < 1) height = 1;
int ext = (real_width - (wid_64 << 4)) << 1;
int ext = (real_width - (wid_64 << 4));

if (rdp.tlut_mode == 0)
{
Expand All @@ -609,12 +609,13 @@ wxUint32 Load4bCI (wxUIntPtr dst, wxUIntPtr src, int wid_64, int height, int lin
wxUIntPtr pal = wxPtrToUInt(rdp.pal_8 + (rdp.tiles[tile].palette << 4));
if (rdp.tlut_mode == 2)
{
ext <<= 1;
load4bCI ((uint8_t *)src, (uint8_t *)dst, wid_64, height, line, ext, (uint16_t *)pal);

return (1 << 16) | GR_TEXFMT_ARGB_1555;
}

load4bIAPal ((uint8_t *)src, (uint8_t *)dst, wid_64, height, line, ext, (uint16_t *)pal);
ext <<= 1;
load4bIAPal ((uint8_t *)src, (uint8_t *)dst, wid_64, height, line, ext, (uint16_t *)pal);
return (1 << 16) | GR_TEXFMT_ALPHA_INTENSITY_88;
}

Expand Down

0 comments on commit 15f1f88

Please sign in to comment.