fix texture

This commit is contained in:
Alejandro Javier Asenjo Nitti 2024-04-12 14:08:38 -03:00
parent c532f31e24
commit 8ad92b4b3b
2 changed files with 6 additions and 4 deletions

View File

@ -368,10 +368,7 @@ D_MAP_6047E70:
{ type: GFX, offset: 0x6047E70, symbol: D_MAP_6047E70 }
D_MAP_6047F80:
{ type: TEXTURE, format: IA8, offset: 0x06047F80, width: 64, height: 32, ctype: u8, symbol: D_MAP_6047F80 }
D_MAP_6048780:
{ type: TEXTURE, format: IA8, offset: 0x06048780, width: 64, height: 32, ctype: u8, symbol: D_MAP_6048780 }
{ type: TEXTURE, format: IA8, offset: 0x06047F80, width: 64, height: 64, ctype: u8, symbol: D_MAP_6047F80 }
D_MAP_6048F80:
{ type: TEXTURE, format: IA8, offset: 0x06048F80, width: 64, height: 64, ctype: u8, symbol: D_MAP_6048F80 }

View File

@ -89,6 +89,7 @@ void Texture_Mottle(u16* dst, u16* src, u8 mode) {
}
}
break;
case 3:
for (v = 0; v < 22 * 64; v += 64) { // should be 32 * 64?
offset = __sinf((s32) (((v / 64) + (gGameFrameCount / 4)) % 32U) * (2 * M_PI / 8));
@ -97,6 +98,7 @@ void Texture_Mottle(u16* dst, u16* src, u8 mode) {
}
}
break;
case 1:
for (v = 0; v < 16 * 16; v += 16) {
offset = 2.0f * __sinf((s32) (((v / 16) + (gGameFrameCount / 2)) % 16U) * (2 * M_PI / 16));
@ -105,6 +107,7 @@ void Texture_Mottle(u16* dst, u16* src, u8 mode) {
}
}
break;
case 0:
for (v = 0; v < 32 * 32; v += 32) {
offset = 2.0f * __sinf((s32) (((v / 32) + (gGameFrameCount / 2)) % 32U) * (2 * M_PI / 32));
@ -113,6 +116,7 @@ void Texture_Mottle(u16* dst, u16* src, u8 mode) {
}
}
break;
case 5:
dst8 = (u8*) dst;
src8 = (u8*) src;
@ -122,6 +126,7 @@ void Texture_Mottle(u16* dst, u16* src, u8 mode) {
dst8[v + (offset + u) % 64U] = src8[v + u];
}
}
break;
}
}