Decompile modelNodeGetModelRelativePosition
This commit is contained in:
parent
05c9393aa9
commit
b726aac9fa
|
|
@ -12434,7 +12434,7 @@ glabel func0f0260c4
|
|||
/* f026130: 02602025 */ or $a0,$s3,$zero
|
||||
/* f026134: 8fa40128 */ lw $a0,0x128($sp)
|
||||
/* f026138: 00402825 */ or $a1,$v0,$zero
|
||||
/* f02613c: 0c006b57 */ jal func0001ad5c
|
||||
/* f02613c: 0c006b57 */ jal modelNodeGetModelRelativePosition
|
||||
/* f026140: 27a600f4 */ addiu $a2,$sp,0xf4
|
||||
/* f026144: c6440000 */ lwc1 $f4,0x0($s2)
|
||||
/* f026148: c7a600f4 */ lwc1 $f6,0xf4($sp)
|
||||
|
|
@ -12597,7 +12597,7 @@ glabel func0f0260c4
|
|||
/* f026394: afa20100 */ sw $v0,0x100($sp)
|
||||
/* f026398: 8fa40128 */ lw $a0,0x128($sp)
|
||||
/* f02639c: 00402825 */ or $a1,$v0,$zero
|
||||
/* f0263a0: 0c006b57 */ jal func0001ad5c
|
||||
/* f0263a0: 0c006b57 */ jal modelNodeGetModelRelativePosition
|
||||
/* f0263a4: 27a600e8 */ addiu $a2,$sp,0xe8
|
||||
/* f0263a8: c7aa00e8 */ lwc1 $f10,0xe8($sp)
|
||||
/* f0263ac: c7b000dc */ lwc1 $f16,0xdc($sp)
|
||||
|
|
@ -12891,7 +12891,7 @@ glabel func0f0260c4
|
|||
/* f0267bc: afa20100 */ sw $v0,0x100($sp)
|
||||
/* f0267c0: 8fa40128 */ lw $a0,0x128($sp)
|
||||
/* f0267c4: 00402825 */ or $a1,$v0,$zero
|
||||
/* f0267c8: 0c006b57 */ jal func0001ad5c
|
||||
/* f0267c8: 0c006b57 */ jal modelNodeGetModelRelativePosition
|
||||
/* f0267cc: 27a600e8 */ addiu $a2,$sp,0xe8
|
||||
/* f0267d0: 1000ff65 */ b .L0f026568
|
||||
/* f0267d4: 27de0008 */ addiu $s8,$s8,0x8
|
||||
|
|
@ -13034,7 +13034,7 @@ glabel var7f1a8944
|
|||
/* f026928: 02802025 */ or $a0,$s4,$zero
|
||||
/* f02692c: 8fa40120 */ lw $a0,0x120($sp)
|
||||
/* f026930: 00402825 */ or $a1,$v0,$zero
|
||||
/* f026934: 0c006b57 */ jal func0001ad5c
|
||||
/* f026934: 0c006b57 */ jal modelNodeGetModelRelativePosition
|
||||
/* f026938: 27a600e0 */ addiu $a2,$sp,0xe0
|
||||
/* f02693c: c6440000 */ lwc1 $f4,0x0($s2)
|
||||
/* f026940: c7a600e0 */ lwc1 $f6,0xe0($sp)
|
||||
|
|
@ -13195,7 +13195,7 @@ glabel var7f1a8944
|
|||
/* f026b84: afa200ec */ sw $v0,0xec($sp)
|
||||
/* f026b88: 8fa40120 */ lw $a0,0x120($sp)
|
||||
/* f026b8c: 00402825 */ or $a1,$v0,$zero
|
||||
/* f026b90: 0c006b57 */ jal func0001ad5c
|
||||
/* f026b90: 0c006b57 */ jal modelNodeGetModelRelativePosition
|
||||
/* f026b94: 27a600d4 */ addiu $a2,$sp,0xd4
|
||||
/* f026b98: c7aa00d4 */ lwc1 $f10,0xd4($sp)
|
||||
/* f026b9c: c7b000c8 */ lwc1 $f16,0xc8($sp)
|
||||
|
|
@ -13508,7 +13508,7 @@ glabel var7f1a8944
|
|||
/* f026ff0: afa200ec */ sw $v0,0xec($sp)
|
||||
/* f026ff4: 8fa40120 */ lw $a0,0x120($sp)
|
||||
/* f026ff8: 00402825 */ or $a1,$v0,$zero
|
||||
/* f026ffc: 0c006b57 */ jal func0001ad5c
|
||||
/* f026ffc: 0c006b57 */ jal modelNodeGetModelRelativePosition
|
||||
/* f027000: 27a600d4 */ addiu $a2,$sp,0xd4
|
||||
/* f027004: 3c0600ff */ lui $a2,0xff
|
||||
/* f027008: 34c6ffff */ ori $a2,$a2,0xffff
|
||||
|
|
@ -14031,7 +14031,7 @@ glabel func0f0270f4
|
|||
/* f027758: afa20080 */ sw $v0,0x80($sp)
|
||||
/* f02775c: 8fa40094 */ lw $a0,0x94($sp)
|
||||
/* f027760: 00402825 */ or $a1,$v0,$zero
|
||||
/* f027764: 0c006b57 */ jal func0001ad5c
|
||||
/* f027764: 0c006b57 */ jal modelNodeGetModelRelativePosition
|
||||
/* f027768: 27a60074 */ addiu $a2,$sp,0x74
|
||||
.L0f02776c:
|
||||
/* f02776c: 1000ff0d */ b .L0f0273a4
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ void modelNodeGetPosition(struct model *model, struct modelnode *node, struct co
|
|||
void modelNodeSetPosition(struct model *model, struct modelnode *node, struct coord *pos);
|
||||
void modelGetRootPosition(struct model *model, struct coord *pos);
|
||||
void modelSetRootPosition(struct model *model, struct coord *pos);
|
||||
u32 func0001ad5c(void);
|
||||
void modelNodeGetModelRelativePosition(struct model *model, struct modelnode *node, struct coord *pos);
|
||||
f32 func0001ae44(struct model *model);
|
||||
void func0001ae90(struct model *model, f32 angle);
|
||||
void modelSetScale(struct model *model, f32 scale);
|
||||
|
|
|
|||
|
|
@ -424,71 +424,28 @@ void modelSetRootPosition(struct model *model, struct coord *pos)
|
|||
modelNodeSetPosition(model, model->filedata->rootnode, pos);
|
||||
}
|
||||
|
||||
GLOBAL_ASM(
|
||||
glabel func0001ad5c
|
||||
/* 1ad5c: 27bdffb8 */ addiu $sp,$sp,-72
|
||||
/* 1ad60: 44800000 */ mtc1 $zero,$f0
|
||||
/* 1ad64: afb20020 */ sw $s2,0x20($sp)
|
||||
/* 1ad68: afb1001c */ sw $s1,0x1c($sp)
|
||||
/* 1ad6c: afb00018 */ sw $s0,0x18($sp)
|
||||
/* 1ad70: afbf0034 */ sw $ra,0x34($sp)
|
||||
/* 1ad74: afb60030 */ sw $s6,0x30($sp)
|
||||
/* 1ad78: afb5002c */ sw $s5,0x2c($sp)
|
||||
/* 1ad7c: afb40028 */ sw $s4,0x28($sp)
|
||||
/* 1ad80: afb30024 */ sw $s3,0x24($sp)
|
||||
/* 1ad84: 00c08025 */ or $s0,$a2,$zero
|
||||
/* 1ad88: 00a08825 */ or $s1,$a1,$zero
|
||||
/* 1ad8c: 00809025 */ or $s2,$a0,$zero
|
||||
/* 1ad90: e4c00000 */ swc1 $f0,0x0($a2)
|
||||
/* 1ad94: e4c00004 */ swc1 $f0,0x4($a2)
|
||||
/* 1ad98: 10a00020 */ beqz $a1,.L0001ae1c
|
||||
/* 1ad9c: e4c00008 */ swc1 $f0,0x8($a2)
|
||||
/* 1ada0: 27b6003c */ addiu $s6,$sp,0x3c
|
||||
/* 1ada4: 24150015 */ addiu $s5,$zero,0x15
|
||||
/* 1ada8: 24140002 */ addiu $s4,$zero,0x2
|
||||
/* 1adac: 24130001 */ addiu $s3,$zero,0x1
|
||||
/* 1adb0: 96220000 */ lhu $v0,0x0($s1)
|
||||
.L0001adb4:
|
||||
/* 1adb4: 02402025 */ or $a0,$s2,$zero
|
||||
/* 1adb8: 02202825 */ or $a1,$s1,$zero
|
||||
/* 1adbc: 304e00ff */ andi $t6,$v0,0xff
|
||||
/* 1adc0: 11d30005 */ beq $t6,$s3,.L0001add8
|
||||
/* 1adc4: 00000000 */ nop
|
||||
/* 1adc8: 11d40003 */ beq $t6,$s4,.L0001add8
|
||||
/* 1adcc: 00000000 */ nop
|
||||
/* 1add0: 55d50010 */ bnel $t6,$s5,.L0001ae14
|
||||
/* 1add4: 8e310008 */ lw $s1,0x8($s1)
|
||||
.L0001add8:
|
||||
/* 1add8: 0c006ac3 */ jal modelNodeGetPosition
|
||||
/* 1addc: 02c03025 */ or $a2,$s6,$zero
|
||||
/* 1ade0: c6040000 */ lwc1 $f4,0x0($s0)
|
||||
/* 1ade4: c7a6003c */ lwc1 $f6,0x3c($sp)
|
||||
/* 1ade8: c60a0004 */ lwc1 $f10,0x4($s0)
|
||||
/* 1adec: 46062200 */ add.s $f8,$f4,$f6
|
||||
/* 1adf0: c6040008 */ lwc1 $f4,0x8($s0)
|
||||
/* 1adf4: e6080000 */ swc1 $f8,0x0($s0)
|
||||
/* 1adf8: c7b00040 */ lwc1 $f16,0x40($sp)
|
||||
/* 1adfc: 46105480 */ add.s $f18,$f10,$f16
|
||||
/* 1ae00: e6120004 */ swc1 $f18,0x4($s0)
|
||||
/* 1ae04: c7a60044 */ lwc1 $f6,0x44($sp)
|
||||
/* 1ae08: 46062200 */ add.s $f8,$f4,$f6
|
||||
/* 1ae0c: e6080008 */ swc1 $f8,0x8($s0)
|
||||
/* 1ae10: 8e310008 */ lw $s1,0x8($s1)
|
||||
.L0001ae14:
|
||||
/* 1ae14: 5620ffe7 */ bnezl $s1,.L0001adb4
|
||||
/* 1ae18: 96220000 */ lhu $v0,0x0($s1)
|
||||
.L0001ae1c:
|
||||
/* 1ae1c: 8fbf0034 */ lw $ra,0x34($sp)
|
||||
/* 1ae20: 8fb00018 */ lw $s0,0x18($sp)
|
||||
/* 1ae24: 8fb1001c */ lw $s1,0x1c($sp)
|
||||
/* 1ae28: 8fb20020 */ lw $s2,0x20($sp)
|
||||
/* 1ae2c: 8fb30024 */ lw $s3,0x24($sp)
|
||||
/* 1ae30: 8fb40028 */ lw $s4,0x28($sp)
|
||||
/* 1ae34: 8fb5002c */ lw $s5,0x2c($sp)
|
||||
/* 1ae38: 8fb60030 */ lw $s6,0x30($sp)
|
||||
/* 1ae3c: 03e00008 */ jr $ra
|
||||
/* 1ae40: 27bd0048 */ addiu $sp,$sp,0x48
|
||||
);
|
||||
void modelNodeGetModelRelativePosition(struct model *model, struct modelnode *node, struct coord *pos)
|
||||
{
|
||||
pos->x = 0;
|
||||
pos->y = 0;
|
||||
pos->z = 0;
|
||||
|
||||
while (node) {
|
||||
struct coord nodepos;
|
||||
u32 type = node->type & 0xff;
|
||||
|
||||
if (type == MODELNODETYPE_CHRINFO
|
||||
|| type == MODELNODETYPE_POSITION
|
||||
|| type == MODELNODETYPE_POSITIONHELD) {
|
||||
modelNodeGetPosition(model, node, &nodepos);
|
||||
pos->x += nodepos.x;
|
||||
pos->y += nodepos.y;
|
||||
pos->z += nodepos.z;
|
||||
}
|
||||
|
||||
node = node->parent;
|
||||
}
|
||||
}
|
||||
|
||||
f32 func0001ae44(struct model *model)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue