diff --git a/src/game/modeldef.c b/src/game/modeldef.c index 2fe6b4c7d..b454696c7 100644 --- a/src/game/modeldef.c +++ b/src/game/modeldef.c @@ -130,7 +130,7 @@ void modeldef0f1a7560(struct modelfiledata *modeldef, u16 filenum, u32 arg2, u32 s32 v1 = allocsize - (loadedsize - (s32)(((u32)modeldef + (gdl & 0xffffff)) - (u32)modeldef)); sp84 = (s32)v1 + (s32)((s32)modeldef - ((u32)modeldef + (gdl & 0xffffff))); - tex0f175ef4((u32)modeldef + (gdl & 0xffffff), v1 + (u32)modeldef, loadedsize - (s32)(((u32)modeldef + (gdl & 0xffffff)) - (u32)modeldef)); + tex0f175ef4((Gfx *)((u32)modeldef + (gdl & 0xffffff)), (Gfx *)(v1 + (u32)modeldef), loadedsize - (s32)(((u32)modeldef + (gdl & 0xffffff)) - (u32)modeldef)); texLoadFromConfigs(modeldef->texconfigs, modeldef->numtexconfigs, arg4, arg3 - arg2); while (node) { diff --git a/src/game/tex.c b/src/game/tex.c index 69c51b29f..312c3e5af 100644 --- a/src/game/tex.c +++ b/src/game/tex.c @@ -2147,28 +2147,15 @@ glabel var7f1b7c80 /* f175ef0: 27bd0138 */ addiu $sp,$sp,0x138 ); -GLOBAL_ASM( -glabel tex0f175ef4 -/* f175ef4: 000670c3 */ sra $t6,$a2,0x3 -/* f175ef8: 25c2ffff */ addiu $v0,$t6,-1 -/* f175efc: 01c03025 */ or $a2,$t6,$zero -/* f175f00: 000218c0 */ sll $v1,$v0,0x3 -/* f175f04: 00642021 */ addu $a0,$v1,$a0 -/* f175f08: 00652821 */ addu $a1,$v1,$a1 -/* f175f0c: 01c03825 */ or $a3,$t6,$zero -/* f175f10: 10c0000a */ beqz $a2,.L0f175f3c -/* f175f14: 00403025 */ or $a2,$v0,$zero -.L0f175f18: -/* f175f18: 8c980000 */ lw $t8,0x0($a0) -/* f175f1c: 8c990004 */ lw $t9,0x4($a0) -/* f175f20: 00c03825 */ or $a3,$a2,$zero -/* f175f24: 24a5fff8 */ addiu $a1,$a1,-8 -/* f175f28: 2484fff8 */ addiu $a0,$a0,-8 -/* f175f2c: acb80008 */ sw $t8,0x8($a1) -/* f175f30: acb9000c */ sw $t9,0xc($a1) -/* f175f34: 14c0fff8 */ bnez $a2,.L0f175f18 -/* f175f38: 24c6ffff */ addiu $a2,$a2,-1 -.L0f175f3c: -/* f175f3c: 03e00008 */ jr $ra -/* f175f40: 00000000 */ nop -); +void tex0f175ef4(Gfx *arg0, Gfx *arg1, s32 arg2) +{ + arg2 = (arg2 >> 3); + arg0 = arg0 + (arg2 - 1); + arg1 = arg1 + (arg2 - 1); + + while (arg2--) { + arg1->force_structure_alignment = arg0->force_structure_alignment; + arg1--; + arg0--; + } +} diff --git a/src/include/game/tex.h b/src/include/game/tex.h index b9800f234..25deecf2c 100644 --- a/src/include/game/tex.h +++ b/src/include/game/tex.h @@ -44,6 +44,6 @@ u32 tex0f175490(void); u32 tex0f1755dc(void); u32 tex0f17563c(void); s32 tex0f1756c0(s32 arg0, s32 arg1, s32 arg2, struct texturething *arg3, struct gfxvtx *arg4); -void tex0f175ef4(s32 arg0, s32 arg1, s32 arg2); +void tex0f175ef4(Gfx *arg0, Gfx *arg1, s32 arg2); #endif