Decompile chrRender

This commit is contained in:
Ryan Dwyer
2021-01-06 12:13:14 +10:00
parent b94443ee27
commit 3e550e4dc3
40 changed files with 603 additions and 1131 deletions
+397 -859
View File
File diff suppressed because it is too large Load Diff
+7 -7
View File
@@ -8204,11 +8204,11 @@ glabel func0f036c08
/* f036c44: 07010018 */ bgez $t8,.L0f036ca8
/* f036c48: 25040008 */ addiu $a0,$t0,0x8
/* f036c4c: 8e630284 */ lw $v1,0x284($s3)
/* f036c50: 3c098007 */ lui $t1,%hi(var80070764)
/* f036c50: 3c098007 */ lui $t1,%hi(g_InCutscene)
/* f036c54: 8c7900d8 */ lw $t9,0xd8($v1)
/* f036c58: 57200049 */ bnezl $t9,.L0f036d80
/* f036c5c: 8fab0060 */ lw $t3,0x60($sp)
/* f036c60: 8d290764 */ lw $t1,%lo(var80070764)($t1)
/* f036c60: 8d290764 */ lw $t1,%lo(g_InCutscene)($t1)
/* f036c64: 55200046 */ bnezl $t1,.L0f036d80
/* f036c68: 8fab0060 */ lw $t3,0x60($sp)
/* f036c6c: 8c620480 */ lw $v0,0x480($v1)
@@ -18356,7 +18356,7 @@ void robotSetMuzzleFlash(struct chrdata *chr, bool right, bool enabled)
partnum = MODELPART_ROBOTMUZZLEFLASHL;
}
node = modelGetPart(chr->model->unk08, partnum);
node = modelGetPart(chr->model->filedata, partnum);
if (node) {
data = modelGetNodeData(chr->model, node);
@@ -26230,10 +26230,10 @@ bool chrMoveToPos(struct chrdata *chr, struct coord *pos, s16 *rooms, f32 angle,
func0f0220ac(chr);
modelSetRootPosition(chr->model, &pos2);
nodetype = chr->model->unk08->rootnode->type;
nodetype = chr->model->filedata->rootnode->type;
if ((nodetype & 0xff) == MODELNODETYPE_ROOT) {
data = modelGetNodeData(chr->model, chr->model->unk08->rootnode);
data = modelGetNodeData(chr->model, chr->model->filedata->rootnode);
data->ground = ground;
}
@@ -27511,8 +27511,8 @@ s32 func0f004cd84(s32 arg0, s32 arg1)
void chrToggleModelPart(struct chrdata *chr, s32 partnum)
{
if (chr && chr->model && chr->model->unk08) {
struct modelnode *node = modelGetPart(chr->model->unk08, partnum);
if (chr && chr->model && chr->model->filedata) {
struct modelnode *node = modelGetPart(chr->model->filedata, partnum);
struct modeldata_partid *data = NULL;
if (node) {
+1 -1
View File
@@ -1616,7 +1616,7 @@ Gfx *coreRender(Gfx *gdl)
if (chr->hidden & CHRHFLAG_CLOAKED) {
if (g_Vars.currentplayer->isdead
|| var80070764
|| g_InCutscene
|| !EYESPYINACTIVE()
|| (g_Vars.currentplayer->devicesactive & ~g_Vars.currentplayer->devicesinhibit & DEVICE_IRSCANNER) == false) {
g_Vars.currentplayer->lookingatprop.prop = NULL;
+1 -1
View File
@@ -58,7 +58,7 @@ u32 var8005efb4 = 0x00000000;
u32 var8005efb8 = 0x3f800000;
u32 var8005efbc = 0x00000000;
u32 var8005efc0 = 0x00000000;
u32 var8005efc4 = 0x00000000;
void *var8005efc4 = NULL; // pointer to a function
void *var8005efc8 = NULL; // pointer to a function
u32 var8005efcc = 0x00000000;
u32 var8005efd0 = 0x00000000;
-89
View File
@@ -9,95 +9,6 @@
#include "stagesetup.h"
#include "types.h"
u8 g_FileState = 0;
u8 var80062944 = 0;
u8 var80062948 = 0;
u8 var8006294c = 0;
u32 var80062950 = 0x00000064;
bool g_WeatherTickEnabled = true;
u32 var80062958 = 0x00000000;
u32 var8006295c = 0x00000000;
void *var80062960 = NULL;
u32 var80062964 = 0x00000000;
f32 var80062968 = 0;
u32 var8006296c = 0x00000000;
u32 var80062970 = 0x00000000;
u32 var80062974 = 0x00000000;
u32 var80062978 = 0x00000000;
u32 var8006297c = 0;
u32 var80062980 = 0;
s32 g_NextChrnum = 5000;
// 80062988
struct chrdata *g_ChrSlots = NULL;
// 8006298c
s32 g_NumChrSlots = 0;
u32 var80062990 = 0x00000000;
u32 var80062994 = 0x00000000;
u32 var80062998 = 0x00000000;
u32 var8006299c = 0x00000001;
u32 var800629a0 = 0x00000003;
u32 var800629a4 = 0x00000000;
u32 var800629a8 = 0x00000000;
u32 var800629ac = 0x00000000;
u32 var800629b0 = 0x00000000;
u32 var800629b4 = 0x00000000;
u32 var800629b8 = 0x00000000;
u32 var800629bc = 0x00000000;
u32 var800629c0 = 0x00000000;
u32 var800629c4 = 0x00000000;
u32 var800629c8 = 0x00000000;
u32 var800629cc = 0x00000000;
u32 var800629d0 = 0x00000000;
u32 var800629d4 = 0x00000000;
u32 var800629d8 = 0x00000000;
u32 var800629dc = 0x00000000;
u32 var800629e0 = 0x00000000;
u32 var800629e4 = 0x1a000003;
u32 var800629e8 = 0x3f800000;
u32 var800629ec = 0x00000000;
u32 var800629f0 = 0x00000000;
u32 var800629f4 = 0x00000000;
u32 var800629f8 = 0x00000000;
u32 var800629fc = 0x00000000;
u32 var80062a00 = 0x00000001;
u32 var80062a04 = 0x00000003;
u32 var80062a08 = 0x00000000;
u32 var80062a0c = 0x00000000;
u32 var80062a10 = 0x00000000;
u32 var80062a14 = 0x00000000;
u32 var80062a18 = 0x00000000;
u32 var80062a1c = 0x00000000;
u32 var80062a20 = 0x00000000;
u32 var80062a24 = 0x00000000;
u32 var80062a28 = 0x00000000;
u32 var80062a2c = 0x00000000;
u32 var80062a30 = 0x00000000;
u32 var80062a34 = 0x00000000;
u32 var80062a38 = 0x00000000;
u32 var80062a3c = 0x00000000;
u32 var80062a40 = 0x00000000;
u32 var80062a44 = 0x00000000;
u8 var80062a48[] = { 64, 10, 10 };
u32 var80062a4c = 0x00000000;
u32 var80062a50 = 0x00000001;
u32 var80062a54 = 0x00000003;
u32 var80062a58 = 0x00000000;
u32 var80062a5c = 0x00000000;
u32 var80062a60 = 0x00000000;
u32 var80062a64 = 0x00000000;
u32 var80062a68 = 0x00000000;
u32 var80062a6c = 0x00000000;
u32 var80062a70 = 0x00000000;
u32 var80062a74 = 0x00000000;
u32 var80062a78 = 0x00000000;
u32 var80062a7c = 0x00000000;
u32 var80062a80 = 0x00000000;
u32 var80062a84 = 0x00000000;
u32 var80062a88 = 0x00000000;
struct var80062a8c *var80062a8c = NULL;
s32 var80062a90 = false;
u32 var80062a94 = 0x00000000;
u32 var80062a98 = 0x00000000;
+1 -1
View File
@@ -126,7 +126,7 @@ bool g_PlayersWithControl[] = {
};
bool g_PlayerInvincible = false;
s32 var80070764 = 0x00000000;
s32 g_InCutscene = 0x00000000;
s16 g_DeathAnimations[] = {
ANIM_DEATH_001A,
+14 -14
View File
@@ -116,15 +116,15 @@ u8 func0f000a10(s32 roomnum)
s32 value = g_Rooms[roomnum].unk52;
if ((g_Vars.currentplayer->isdead == false
&& var80070764 == 0
&& g_InCutscene == 0
&& (!g_Vars.currentplayer->eyespy || (g_Vars.currentplayer->eyespy && !g_Vars.currentplayer->eyespy->active))
&& (g_Vars.currentplayer->devicesactive & ~g_Vars.currentplayer->devicesinhibit & DEVICE_NIGHTVISION))
||
(g_Vars.currentplayer->isdead == false
&& var80070764 == 0
&& g_InCutscene == 0
&& (!g_Vars.currentplayer->eyespy || (g_Vars.currentplayer->eyespy && !g_Vars.currentplayer->eyespy->active))
&& (g_Vars.currentplayer->devicesactive & ~g_Vars.currentplayer->devicesinhibit & DEVICE_IRSCANNER))) {
value += var8009caec;
value += var8009caec[0];
} else {
value += g_Rooms[roomnum].unk4b;
}
@@ -150,15 +150,15 @@ u8 func0f000b24(s32 roomnum)
u32 value;
if ((g_Vars.currentplayer->isdead == false
&& var80070764 == 0
&& g_InCutscene == 0
&& (!g_Vars.currentplayer->eyespy || (g_Vars.currentplayer->eyespy && !g_Vars.currentplayer->eyespy->active))
&& (g_Vars.currentplayer->devicesactive & ~g_Vars.currentplayer->devicesinhibit & DEVICE_NIGHTVISION))
||
(g_Vars.currentplayer->isdead == false
&& var80070764 == 0
&& g_InCutscene == 0
&& (!g_Vars.currentplayer->eyespy || (g_Vars.currentplayer->eyespy && !g_Vars.currentplayer->eyespy->active))
&& (g_Vars.currentplayer->devicesactive & ~g_Vars.currentplayer->devicesinhibit & DEVICE_IRSCANNER))) {
return var8009caec;
return var8009caec[0];
}
if (g_Rooms[roomnum].flags & ROOMFLAG_0040) {
@@ -3282,8 +3282,8 @@ glabel var7f1a7ddc
/* f00471c: 00008825 */ or $s1,$zero,$zero
/* f004720: 19c0014c */ blez $t6,.L0f004c54
/* f004724: 00a05025 */ or $t2,$a1,$zero
/* f004728: 3c1f8007 */ lui $ra,%hi(var80070764)
/* f00472c: 27ff0764 */ addiu $ra,$ra,%lo(var80070764)
/* f004728: 3c1f8007 */ lui $ra,%hi(g_InCutscene)
/* f00472c: 27ff0764 */ addiu $ra,$ra,%lo(g_InCutscene)
/* f004730: 00804825 */ or $t1,$a0,$zero
.L0f004734:
/* f004734: 8cef0000 */ lw $t7,0x0($a3)
@@ -3592,8 +3592,8 @@ glabel var7f1a7ddc
/* f004b84: afaa0040 */ sw $t2,0x40($sp)
/* f004b88: 0fc6192e */ jal scenarioCallback38
/* f004b8c: afac0074 */ sw $t4,0x74($sp)
/* f004b90: 3c1f8007 */ lui $ra,%hi(var80070764)
/* f004b94: 27ff0764 */ addiu $ra,$ra,%lo(var80070764)
/* f004b90: 3c1f8007 */ lui $ra,%hi(g_InCutscene)
/* f004b94: 27ff0764 */ addiu $ra,$ra,%lo(g_InCutscene)
/* f004b98: 8fa9003c */ lw $t1,0x3c($sp)
/* f004b9c: 8faa0040 */ lw $t2,0x40($sp)
/* f004ba0: 8fac0074 */ lw $t4,0x74($sp)
@@ -4746,9 +4746,9 @@ glabel func0f005bb0
/* f005bd0: 24e79fc0 */ addiu $a3,$a3,%lo(g_Vars)
/* f005bd4: 8ce80284 */ lw $t0,0x284($a3)
/* f005bd8: afa2002c */ sw $v0,0x2c($sp)
/* f005bdc: 3c068007 */ lui $a2,%hi(var80070764)
/* f005bdc: 3c068007 */ lui $a2,%hi(g_InCutscene)
/* f005be0: 8d0500d8 */ lw $a1,0xd8($t0)
/* f005be4: 24c60764 */ addiu $a2,$a2,%lo(var80070764)
/* f005be4: 24c60764 */ addiu $a2,$a2,%lo(g_InCutscene)
/* f005be8: 14a00013 */ bnez $a1,.L0f005c38
/* f005bec: 00000000 */ nop
/* f005bf0: 8cd80000 */ lw $t8,0x0($a2)
@@ -4771,9 +4771,9 @@ glabel func0f005bb0
/* f005c30: 55a00017 */ bnezl $t5,.L0f005c90
/* f005c34: 8d0c1c1c */ lw $t4,0x1c1c($t0)
.L0f005c38:
/* f005c38: 3c068007 */ lui $a2,%hi(var80070764)
/* f005c38: 3c068007 */ lui $a2,%hi(g_InCutscene)
/* f005c3c: 14a00016 */ bnez $a1,.L0f005c98
/* f005c40: 24c60764 */ addiu $a2,$a2,%lo(var80070764)
/* f005c40: 24c60764 */ addiu $a2,$a2,%lo(g_InCutscene)
/* f005c44: 8cce0000 */ lw $t6,0x0($a2)
/* f005c48: 15c00013 */ bnez $t6,.L0f005c98
/* f005c4c: 00000000 */ nop
+4 -4
View File
@@ -2931,11 +2931,11 @@ glabel explosionRender
/* f12c7c4: 26739fc0 */ addiu $s3,$s3,%lo(g_Vars)
/* f12c7c8: 8e640284 */ lw $a0,0x284($s3)
/* f12c7cc: 00408825 */ or $s1,$v0,$zero
/* f12c7d0: 3c098007 */ lui $t1,%hi(var80070764)
/* f12c7d0: 3c098007 */ lui $t1,%hi(g_InCutscene)
/* f12c7d4: 8c8500d8 */ lw $a1,0xd8($a0)
/* f12c7d8: 14a00013 */ bnez $a1,.L0f12c828
/* f12c7dc: 00000000 */ nop
/* f12c7e0: 8d290764 */ lw $t1,%lo(var80070764)($t1)
/* f12c7e0: 8d290764 */ lw $t1,%lo(g_InCutscene)($t1)
/* f12c7e4: 15200010 */ bnez $t1,.L0f12c828
/* f12c7e8: 00000000 */ nop
/* f12c7ec: 8c830480 */ lw $v1,0x480($a0)
@@ -2956,8 +2956,8 @@ glabel explosionRender
/* f12c824: 240effff */ addiu $t6,$zero,-1
.L0f12c828:
/* f12c828: 14a00015 */ bnez $a1,.L0f12c880
/* f12c82c: 3c188007 */ lui $t8,%hi(var80070764)
/* f12c830: 8f180764 */ lw $t8,%lo(var80070764)($t8)
/* f12c82c: 3c188007 */ lui $t8,%hi(g_InCutscene)
/* f12c830: 8f180764 */ lw $t8,%lo(g_InCutscene)($t8)
/* f12c834: 57000013 */ bnezl $t8,.L0f12c884
/* f12c838: 948f0010 */ lhu $t7,0x10($a0)
/* f12c83c: 8c830480 */ lw $v1,0x480($a0)
+6 -6
View File
@@ -1582,7 +1582,7 @@ void setupCamera(struct cameraobj *camera, s32 cmdindex)
if (camera->lookatpadnum >= 0) {
struct coord lenspos;
union modelnode_data *lens = modelGetPartNodeData(obj->model->unk08, MODELPART_LENS);
union modelnode_data *lens = modelGetPartNodeData(obj->model->filedata, MODELPART_LENS);
struct pad pad;
f32 xdiff;
f32 ydiff;
@@ -1718,13 +1718,13 @@ void setupSingleMonitor(struct singlemonitorobj *monitor, s32 cmdindex)
monitor->base.model->attachedto = owner->model;
if (monitor->ownerpart == MODELPART_00) {
monitor->base.model->unk1c = modelGetPart(owner->model->unk08, MODELPART_00);
monitor->base.model->unk1c = modelGetPart(owner->model->filedata, MODELPART_00);
} else if (monitor->ownerpart == MODELPART_01) {
monitor->base.model->unk1c = modelGetPart(owner->model->unk08, MODELPART_01);
monitor->base.model->unk1c = modelGetPart(owner->model->filedata, MODELPART_01);
} else if (monitor->ownerpart == MODELPART_02) {
monitor->base.model->unk1c = modelGetPart(owner->model->unk08, MODELPART_02);
monitor->base.model->unk1c = modelGetPart(owner->model->filedata, MODELPART_02);
} else {
monitor->base.model->unk1c = modelGetPart(owner->model->unk08, MODELPART_03);
monitor->base.model->unk1c = modelGetPart(owner->model->filedata, MODELPART_03);
}
propReparent(prop, owner->prop);
@@ -3292,7 +3292,7 @@ void setupParseObjects(s32 stagenum)
setupGenericObject(obj, index);
if (obj->model) {
struct modelnode *node = modelGetPart(obj->model->unk08, 5);
struct modelnode *node = modelGetPart(obj->model->filedata, 5);
if (node) {
struct modeldata_05 *data = modelGetNodeData(obj->model, node);
+3 -3
View File
@@ -522,8 +522,8 @@ glabel var7f1a827c
/* f011940: e7a40088 */ swc1 $f4,0x88($sp)
/* f011944: 0fc63956 */ jal func0f18e558
/* f011948: 00000000 */ nop
/* f01194c: 3c018007 */ lui $at,%hi(var80070764)
/* f011950: ac200764 */ sw $zero,%lo(var80070764)($at)
/* f01194c: 3c018007 */ lui $at,%hi(g_InCutscene)
/* f011950: ac200764 */ sw $zero,%lo(g_InCutscene)($at)
/* f011954: 3c01800a */ lui $at,%hi(var8009de20)
/* f011958: ac20de20 */ sw $zero,%lo(var8009de20)($at)
/* f01195c: 24030001 */ addiu $v1,$zero,0x1
@@ -1307,7 +1307,7 @@ glabel var7f1a827c
// viResetDefaultModeIf4Mb();
// func0f18e558();
//
// var80070764 = 0;
// g_InCutscene = 0;
// var8009de20 = 0;
// var8007072c = 1;
// var80070738 = 0;
+6 -6
View File
@@ -340,7 +340,7 @@ void propDetach(struct prop *prop)
}
}
Gfx *propRender(Gfx *gdl, struct prop *prop, bool arg2)
Gfx *propRender(Gfx *gdl, struct prop *prop, bool withalpha)
{
switch (prop->type) {
case 0:
@@ -348,19 +348,19 @@ Gfx *propRender(Gfx *gdl, struct prop *prop, bool arg2)
case PROPTYPE_OBJ:
case PROPTYPE_DOOR:
case PROPTYPE_WEAPON:
gdl = propobjRender(prop, gdl, arg2);
gdl = propobjRender(prop, gdl, withalpha);
break;
case PROPTYPE_CHR:
gdl = propchrRender(prop, gdl, arg2);
gdl = chrRender(prop, gdl, withalpha);
break;
case PROPTYPE_PLAYER:
gdl = playerRender(prop, gdl, arg2);
gdl = playerRender(prop, gdl, withalpha);
break;
case PROPTYPE_EXPLOSION:
gdl = explosionRender(prop, gdl, arg2);
gdl = explosionRender(prop, gdl, withalpha);
break;
case PROPTYPE_EFFECT:
gdl = smokeRender(prop, gdl, arg2);
gdl = smokeRender(prop, gdl, withalpha);
break;
}
+7 -7
View File
@@ -18703,10 +18703,10 @@ glabel var7f1aca90
/* f0a75bc: afac013c */ sw $t4,0x13c($sp)
/* f0a75c0: afaf0118 */ sw $t7,0x118($sp)
/* f0a75c4: 8ca300d8 */ lw $v1,0xd8($a1)
/* f0a75c8: 3c078007 */ lui $a3,%hi(var80070764)
/* f0a75c8: 3c078007 */ lui $a3,%hi(g_InCutscene)
/* f0a75cc: 14600013 */ bnez $v1,.L0f0a761c
/* f0a75d0: 00000000 */ nop
/* f0a75d4: 8ce70764 */ lw $a3,%lo(var80070764)($a3)
/* f0a75d4: 8ce70764 */ lw $a3,%lo(g_InCutscene)($a3)
/* f0a75d8: 14e00010 */ bnez $a3,.L0f0a761c
/* f0a75dc: 00000000 */ nop
/* f0a75e0: 8ca20480 */ lw $v0,0x480($a1)
@@ -18727,8 +18727,8 @@ glabel var7f1aca90
/* f0a7618: 92681615 */ lbu $t0,0x1615($s3)
.L0f0a761c:
/* f0a761c: 14600078 */ bnez $v1,.L0f0a7800
/* f0a7620: 3c078007 */ lui $a3,%hi(var80070764)
/* f0a7624: 8ce70764 */ lw $a3,%lo(var80070764)($a3)
/* f0a7620: 3c078007 */ lui $a3,%hi(g_InCutscene)
/* f0a7624: 8ce70764 */ lw $a3,%lo(g_InCutscene)($a3)
/* f0a7628: 54e00076 */ bnezl $a3,.L0f0a7804
/* f0a762c: 926d1614 */ lbu $t5,0x1614($s3)
/* f0a7630: 8ca20480 */ lw $v0,0x480($a1)
@@ -18957,7 +18957,7 @@ glabel var7f1aca90
/* f0a7964: 1100000d */ beqz $t0,.L0f0a799c
/* f0a7968: 00c02825 */ or $a1,$a2,$zero
/* f0a796c: afaa0094 */ sw $t2,0x94($sp)
/* f0a7970: 0c0087bd */ jal func00021ef4
/* f0a7970: 0c0087bd */ jal modelRender
/* f0a7974: afa60098 */ sw $a2,0x98($sp)
/* f0a7978: 8fa60098 */ lw $a2,0x98($sp)
/* f0a797c: 8ccb0008 */ lw $t3,0x8($a2)
@@ -19081,7 +19081,7 @@ glabel var7f1aca90
.L0f0a7b28:
/* f0a7b28: 27a4010c */ addiu $a0,$sp,0x10c
.L0f0a7b2c:
/* f0a7b2c: 0c0087bd */ jal func00021ef4
/* f0a7b2c: 0c0087bd */ jal modelRender
/* f0a7b30: 8fa5003c */ lw $a1,0x3c($sp)
/* f0a7b34: 8e791594 */ lw $t9,0x1594($s3)
/* f0a7b38: 3c0f8007 */ lui $t7,%hi(var800702dc)
@@ -19100,7 +19100,7 @@ glabel var7f1aca90
/* f0a7b6c: afa50054 */ sw $a1,0x54($sp)
/* f0a7b70: 8fa50054 */ lw $a1,0x54($sp)
/* f0a7b74: afb50140 */ sw $s5,0x140($sp)
/* f0a7b78: 0c0087bd */ jal func00021ef4
/* f0a7b78: 0c0087bd */ jal modelRender
/* f0a7b7c: 27a4010c */ addiu $a0,$sp,0x10c
/* f0a7b80: 8fa4007c */ lw $a0,0x7c($sp)
/* f0a7b84: afa40140 */ sw $a0,0x140($sp)
+1 -1
View File
@@ -3194,7 +3194,7 @@ glabel var7f1acd6c
/* f0aeb98: 030a4825 */ or $t1,$t8,$t2
/* f0aeb9c: afa900bc */ sw $t1,0xbc($sp)
/* f0aeba0: 27a40088 */ addiu $a0,$sp,0x88
/* f0aeba4: 0c0087bd */ jal func00021ef4
/* f0aeba4: 0c0087bd */ jal modelRender
/* f0aeba8: 27a500c8 */ addiu $a1,$sp,0xc8
/* f0aebac: 8fac0094 */ lw $t4,0x94($sp)
/* f0aebb0: 8fb900fc */ lw $t9,0xfc($sp)
+17 -17
View File
@@ -1957,8 +1957,8 @@ bool currentPlayerAssumeChrForAnti(struct chrdata *hostchr, bool force)
modelCopyAnimData(hostchr->model, playerchr->model);
func0f02e9a0(playerchr, 12);
chrrootnode = modelGetNodeData(hostchr->model, hostchr->model->unk08->rootnode);
playerrootnode = modelGetNodeData(playerchr->model, playerchr->model->unk08->rootnode);
chrrootnode = modelGetNodeData(hostchr->model, hostchr->model->filedata->rootnode);
playerrootnode = modelGetNodeData(playerchr->model, playerchr->model->filedata->rootnode);
*playerrootnode = *chrrootnode;
@@ -3550,7 +3550,7 @@ void func0f0ba010(void)
g_CameraAnimCurFrame = var8009de20 >> 2;
g_CutsceneBlurFrac = 0;
var8009de2c = -1;
var80070764 = 1;
g_InCutscene = 1;
func0f11dcb0(1);
g_Vars.in_cutscene = g_Vars.tickmode == TICKMODE_CUTSCENE && g_CameraAnimCurFrame < animGetNumFrames(g_CameraAnimNum) - 1;
g_Vars.unk0004e2 = 0;
@@ -4965,7 +4965,7 @@ bool func0f0bc4c0(void)
return true;
}
return (var80070764 && !var8005d9d0) || menuGetRoot() == MENUROOT_COOPCONTINUE;
return (g_InCutscene && !var8005d9d0) || menuGetRoot() == MENUROOT_COOPCONTINUE;
}
s16 currentPlayerGetViewportWidth(void)
@@ -5065,7 +5065,7 @@ s16 currentPlayerGetViewportHeight(void)
height = g_ViModes[g_ViMode].wideheight;
} else if (optionsGetEffectiveScreenSize() == SCREENSIZE_CINEMA) {
height = g_ViModes[g_ViMode].cinemaheight;
} else if (var80070764 && !var8009dfc0) {
} else if (g_InCutscene && !var8009dfc0) {
if (var8009de2c >= 1) {
f32 a = g_ViModes[g_ViMode].wideheight;
f32 b = g_ViModes[g_ViMode].fullheight;
@@ -5104,7 +5104,7 @@ s16 currentPlayerGetViewportTop(void)
}
} else {
if (optionsGetEffectiveScreenSize() == SCREENSIZE_WIDE) {
if (var80070764 && optionsGetCutsceneSubtitles() && g_Vars.stagenum != STAGE_CITRAINING) {
if (g_InCutscene && optionsGetCutsceneSubtitles() && g_Vars.stagenum != STAGE_CITRAINING) {
if (var8009de2c >= 1) {
f32 a = g_ViModes[g_ViMode].fulltop;
f32 b = g_ViModes[g_ViMode].widetop;
@@ -5120,7 +5120,7 @@ s16 currentPlayerGetViewportTop(void)
} else if (optionsGetEffectiveScreenSize() == SCREENSIZE_CINEMA) {
top = g_ViModes[g_ViMode].cinematop;
} else {
if (var80070764 && !var8009dfc0
if (g_InCutscene && !var8009dfc0
&& (!optionsGetCutsceneSubtitles() || g_Vars.stagenum == STAGE_CITRAINING)) {
if (var8009de2c >= 1) {
f32 a = g_ViModes[g_ViMode].widetop;
@@ -5563,8 +5563,8 @@ glabel var7f1ad6ac
/* f0bdca0: 24010001 */ addiu $at,$zero,0x1
/* f0bdca4: 1461000d */ bne $v1,$at,.L0f0bdcdc
.L0f0bdca8:
/* f0bdca8: 3c0f8007 */ lui $t7,%hi(var80070764)
/* f0bdcac: 8def0764 */ lw $t7,%lo(var80070764)($t7)
/* f0bdca8: 3c0f8007 */ lui $t7,%hi(g_InCutscene)
/* f0bdcac: 8def0764 */ lw $t7,%lo(g_InCutscene)($t7)
/* f0bdcb0: 3c188006 */ lui $t8,%hi(var8005d9d0)
/* f0bdcb4: 55e0000a */ bnezl $t7,.L0f0bdce0
/* f0bdcb8: 8e6b0284 */ lw $t3,0x284($s3)
@@ -5778,8 +5778,8 @@ glabel var7f1ad6ac
.L0f0bdfb8:
/* f0bdfb8: 24010006 */ addiu $at,$zero,0x6
/* f0bdfbc: 10610002 */ beq $v1,$at,.L0f0bdfc8
/* f0bdfc0: 3c018007 */ lui $at,%hi(var80070764)
/* f0bdfc4: ac200764 */ sw $zero,%lo(var80070764)($at)
/* f0bdfc0: 3c018007 */ lui $at,%hi(g_InCutscene)
/* f0bdfc4: ac200764 */ sw $zero,%lo(g_InCutscene)($at)
.L0f0bdfc8:
/* f0bdfc8: 24010006 */ addiu $at,$zero,0x6
/* f0bdfcc: 54610054 */ bnel $v1,$at,.L0f0be120
@@ -7755,7 +7755,7 @@ glabel var7f1ad6ac
//
// // dc9c
// if ((g_Vars.tickmode == TICKMODE_0 || g_Vars.tickmode == TICKMODE_NORMAL)
// && var80070764 == 0
// && g_InCutscene == 0
// && var8005d9d0 == 0) {
// g_Vars.currentplayer->bondviewlevtime60 += g_Vars.lvupdate240_60;
// }
@@ -7858,7 +7858,7 @@ glabel var7f1ad6ac
//
// // dfb8
// if (g_Vars.tickmode != TICKMODE_CUTSCENE) {
// var80070764 = 0;
// g_InCutscene = 0;
// }
//
// // dfc8
@@ -9828,13 +9828,13 @@ Gfx *func0f0c07c8(Gfx *gdl)
}
if (g_Vars.currentplayer->isdead == false
&& var80070764 == 0
&& g_InCutscene == 0
&& (!g_Vars.currentplayer->eyespy || (g_Vars.currentplayer->eyespy && !g_Vars.currentplayer->eyespy->active))
&& ((g_Vars.currentplayer->devicesactive & ~g_Vars.currentplayer->devicesinhibit) & DEVICE_NIGHTVISION)) {
gdl = bviewRenderNvLens(gdl);
gdl = bviewRenderNvBinoculars(gdl);
} else if (g_Vars.currentplayer->isdead == false
&& var80070764 == 0
&& g_InCutscene == 0
&& (!g_Vars.currentplayer->eyespy || (g_Vars.currentplayer->eyespy && !g_Vars.currentplayer->eyespy->active))
&& ((g_Vars.currentplayer->devicesactive & ~g_Vars.currentplayer->devicesinhibit) & DEVICE_IRSCANNER)) {
gdl = bviewRenderIrLens(gdl);
@@ -11892,10 +11892,10 @@ glabel var7f1ad744
/* f0c329c: 00000000 */ nop
);
Gfx *playerRender(struct prop *prop, Gfx *gdl, bool arg2)
Gfx *playerRender(struct prop *prop, Gfx *gdl, bool withalpha)
{
if (g_Vars.players[propGetPlayerNum(prop)]->haschrbody) {
gdl = propchrRender(prop, gdl, arg2);
gdl = chrRender(prop, gdl, withalpha);
}
return gdl;
+9 -9
View File
@@ -2339,8 +2339,8 @@ glabel var7f1adec0
/* f0dea24: 1000008f */ b .L0f0dec64
/* f0dea28: 8c6901d0 */ lw $t1,0x1d0($v1)
.L0f0dea2c:
/* f0dea2c: 3c198007 */ lui $t9,%hi(var80070764)
/* f0dea30: 8f390764 */ lw $t9,%lo(var80070764)($t9)
/* f0dea2c: 3c198007 */ lui $t9,%hi(g_InCutscene)
/* f0dea30: 8f390764 */ lw $t9,%lo(g_InCutscene)($t9)
/* f0dea34: 3c07800a */ lui $a3,%hi(g_Vars+0x68)
/* f0dea38: 3c0a800a */ lui $t2,%hi(g_Vars+0x64)
/* f0dea3c: 3c0d800a */ lui $t5,%hi(g_Vars+0x70)
@@ -2399,8 +2399,8 @@ glabel var7f1adec0
/* f0deaf4: 90780000 */ lbu $t8,0x0($v1)
/* f0deaf8: 17f8001f */ bne $ra,$t8,.L0f0deb78
.L0f0deafc:
/* f0deafc: 3c198007 */ lui $t9,%hi(var80070764)
/* f0deb00: 8f390764 */ lw $t9,%lo(var80070764)($t9)
/* f0deafc: 3c198007 */ lui $t9,%hi(g_InCutscene)
/* f0deb00: 8f390764 */ lw $t9,%lo(g_InCutscene)($t9)
/* f0deb04: 3c0f8006 */ lui $t7,%hi(var8005d9d0)
/* f0deb08: 53200005 */ beqzl $t9,.L0f0deb20
/* f0deb0c: 906e0000 */ lbu $t6,0x0($v1)
@@ -2564,8 +2564,8 @@ glabel var7f1adec0
/* f0ded30: 0305c821 */ addu $t9,$t8,$a1
/* f0ded34: 03267821 */ addu $t7,$t9,$a2
/* f0ded38: 15e1001b */ bne $t7,$at,.L0f0deda8
/* f0ded3c: 3c0e8007 */ lui $t6,%hi(var80070764)
/* f0ded40: 8dce0764 */ lw $t6,%lo(var80070764)($t6)
/* f0ded3c: 3c0e8007 */ lui $t6,%hi(g_InCutscene)
/* f0ded40: 8dce0764 */ lw $t6,%lo(g_InCutscene)($t6)
/* f0ded44: 3c188006 */ lui $t8,%hi(var8005d9d0)
/* f0ded48: 3c198009 */ lui $t9,%hi(g_Is4Mb)
/* f0ded4c: 11c00004 */ beqz $t6,.L0f0ded60
@@ -3720,8 +3720,8 @@ glabel var7f1adef4
/* f0dfb6c: 0500000e */ bltz $t0,.L0f0dfba8
/* f0dfb70: 00000000 */ nop
.L0f0dfb74:
/* f0dfb74: 3c098007 */ lui $t1,%hi(var80070764)
/* f0dfb78: 8d290764 */ lw $t1,%lo(var80070764)($t1)
/* f0dfb74: 3c098007 */ lui $t1,%hi(g_InCutscene)
/* f0dfb78: 8d290764 */ lw $t1,%lo(g_InCutscene)($t1)
/* f0dfb7c: 1120000a */ beqz $t1,.L0f0dfba8
/* f0dfb80: 00000000 */ nop
/* f0dfb84: 3c0a8006 */ lui $t2,%hi(var8005d9d0)
@@ -4541,7 +4541,7 @@ glabel var7f1adef4
//
// // b4c
// if ((g_Vars.coopplayernum >= 0 || g_Vars.antiplayernum >= 0)
// && var80070764
// && g_InCutscene
// && var8005d9d0 == 0
// && g_Vars.currentplayernum == 0) {
// // ba4
+3 -3
View File
@@ -4577,7 +4577,7 @@ glabel var7f1b2948
/* f0f4e0c: afab03bc */ sw $t3,0x3bc($sp)
/* f0f4e10: 8fa5003c */ lw $a1,0x3c($sp)
/* f0f4e14: 27a403b8 */ addiu $a0,$sp,0x3b8
/* f0f4e18: 0c0087bd */ jal func00021ef4
/* f0f4e18: 0c0087bd */ jal modelRender
/* f0f4e1c: afb903c4 */ sw $t9,0x3c4($sp)
/* f0f4e20: 8fad03c4 */ lw $t5,0x3c4($sp)
/* f0f4e24: 0c0059d8 */ jal func00016760
@@ -11791,8 +11791,8 @@ glabel var7f1b2ac8
/* f0fb3b8: 00000000 */ nop
/* f0fb3bc: 10000027 */ b .L0f0fb45c
/* f0fb3c0: 8fbf003c */ lw $ra,0x3c($sp)
/* f0fb3c4: 3c0f8007 */ lui $t7,%hi(var80070764)
/* f0fb3c8: 8def0764 */ lw $t7,%lo(var80070764)($t7)
/* f0fb3c4: 3c0f8007 */ lui $t7,%hi(g_InCutscene)
/* f0fb3c8: 8def0764 */ lw $t7,%lo(g_InCutscene)($t7)
/* f0fb3cc: 51e00010 */ beqzl $t7,.L0f0fb410
/* f0fb3d0: 240f000a */ addiu $t7,$zero,0xa
/* f0fb3d4: 0fc3e048 */ jal func0f0f8120
+2 -2
View File
@@ -9100,8 +9100,8 @@ glabel var7f1b5140
/* f12752c: 0fc49d24 */ jal func0f127490
/* f127530: 8c651c30 */ lw $a1,0x1c30($v1)
/* f127534: 8e380284 */ lw $t8,0x284($s1)
/* f127538: 3c0c8007 */ lui $t4,%hi(var80070764)
/* f12753c: 258c0764 */ addiu $t4,$t4,%lo(var80070764)
/* f127538: 3c0c8007 */ lui $t4,%hi(g_InCutscene)
/* f12753c: 258c0764 */ addiu $t4,$t4,%lo(g_InCutscene)
/* f127540: af021c30 */ sw $v0,0x1c30($t8)
/* f127544: 8e230284 */ lw $v1,0x284($s1)
/* f127548: 8c6a1c2c */ lw $t2,0x1c2c($v1)
+1 -1
View File
@@ -30,7 +30,7 @@ void func0f129210(void *find, void *replacement)
if (prop->type == PROPTYPE_OBJ) {
struct defaultobj *obj = prop->obj;
struct model *model = obj->model;
struct model08 *filedata = model->unk08;
struct modelfiledata *filedata = model->filedata;
struct modelnode *node = filedata->rootnode;
struct modelnode_displaylist *data;
+6 -6
View File
@@ -1438,7 +1438,7 @@ glabel func0f13d568
/* f13d8e8: 00000000 */ nop
/* f13d8ec: 00000000 */ nop
/* f13d8f0: 01c30019 */ multu $t6,$v1
/* f13d8f4: 3c0e8007 */ lui $t6,%hi(var80070764)
/* f13d8f4: 3c0e8007 */ lui $t6,%hi(g_InCutscene)
/* f13d8f8: 0000a812 */ mflo $s5
/* f13d8fc: 00000000 */ nop
/* f13d900: 00000000 */ nop
@@ -1469,7 +1469,7 @@ glabel func0f13d568
/* f13d950: 8c6d00d8 */ lw $t5,0xd8($v1)
/* f13d954: 55a0001f */ bnezl $t5,.L0f13d9d4
/* f13d958: 926d0002 */ lbu $t5,0x2($s3)
/* f13d95c: 8dce0764 */ lw $t6,%lo(var80070764)($t6)
/* f13d95c: 8dce0764 */ lw $t6,%lo(g_InCutscene)($t6)
/* f13d960: 55c0001c */ bnezl $t6,.L0f13d9d4
/* f13d964: 926d0002 */ lbu $t5,0x2($s3)
/* f13d968: 8c620480 */ lw $v0,0x480($v1)
@@ -1589,7 +1589,7 @@ glabel func0f13d568
/* f13db1c: 46000007 */ neg.s $f0,$f0
/* f13db20: 3c013f80 */ lui $at,0x3f80
/* f13db24: 4610003c */ c.lt.s $f0,$f16
/* f13db28: 3c0e8007 */ lui $t6,%hi(var80070764)
/* f13db28: 3c0e8007 */ lui $t6,%hi(g_InCutscene)
/* f13db2c: 8fa40164 */ lw $a0,0x164($sp)
/* f13db30: 45020005 */ bc1fl .L0f13db48
/* f13db34: 46000506 */ mov.s $f20,$f0
@@ -1640,7 +1640,7 @@ glabel func0f13d568
/* f13dbd8: 4610b582 */ mul.s $f22,$f22,$f16
/* f13dbdc: 15a0001a */ bnez $t5,.L0f13dc48
/* f13dbe0: 00000000 */ nop
/* f13dbe4: 8dce0764 */ lw $t6,%lo(var80070764)($t6)
/* f13dbe4: 8dce0764 */ lw $t6,%lo(g_InCutscene)($t6)
/* f13dbe8: 15c00017 */ bnez $t6,.L0f13dc48
/* f13dbec: 00000000 */ nop
/* f13dbf0: 8c620480 */ lw $v0,0x480($v1)
@@ -1761,7 +1761,7 @@ glabel func0f13d568
/* f13dda4: 461c4403 */ div.s $f16,$f8,$f28
/* f13dda8: 926c0001 */ lbu $t4,0x1($s3)
/* f13ddac: 3c014f80 */ lui $at,0x4f80
/* f13ddb0: 3c0d8007 */ lui $t5,%hi(var80070764)
/* f13ddb0: 3c0d8007 */ lui $t5,%hi(g_InCutscene)
/* f13ddb4: 448c3000 */ mtc1 $t4,$f6
/* f13ddb8: 27a600d4 */ addiu $a2,$sp,0xd4
/* f13ddbc: 24070040 */ addiu $a3,$zero,0x40
@@ -1795,7 +1795,7 @@ glabel func0f13d568
/* f13de24: 460a0002 */ mul.s $f0,$f0,$f10
/* f13de28: 5700001b */ bnezl $t8,.L0f13de98
/* f13de2c: 4600e03c */ c.lt.s $f28,$f0
/* f13de30: 8dad0764 */ lw $t5,%lo(var80070764)($t5)
/* f13de30: 8dad0764 */ lw $t5,%lo(g_InCutscene)($t5)
/* f13de34: 55a00018 */ bnezl $t5,.L0f13de98
/* f13de38: 4600e03c */ c.lt.s $f28,$f0
/* f13de3c: 8c620480 */ lw $v0,0x480($v1)
+4 -4
View File
@@ -2982,8 +2982,8 @@ glabel func0f15a6f4
/* f15a820: 00408825 */ or $s1,$v0,$zero
/* f15a824: 8c6400d8 */ lw $a0,0xd8($v1)
/* f15a828: 14800013 */ bnez $a0,.L0f15a878
/* f15a82c: 3c0e8007 */ lui $t6,%hi(var80070764)
/* f15a830: 8dce0764 */ lw $t6,%lo(var80070764)($t6)
/* f15a82c: 3c0e8007 */ lui $t6,%hi(g_InCutscene)
/* f15a830: 8dce0764 */ lw $t6,%lo(g_InCutscene)($t6)
/* f15a834: 15c00010 */ bnez $t6,.L0f15a878
/* f15a838: 00000000 */ nop
/* f15a83c: 8c620480 */ lw $v0,0x480($v1)
@@ -3004,8 +3004,8 @@ glabel func0f15a6f4
/* f15a874: 02202025 */ or $a0,$s1,$zero
.L0f15a878:
/* f15a878: 14800012 */ bnez $a0,.L0f15a8c4
/* f15a87c: 3c0e8007 */ lui $t6,%hi(var80070764)
/* f15a880: 8dce0764 */ lw $t6,%lo(var80070764)($t6)
/* f15a87c: 3c0e8007 */ lui $t6,%hi(g_InCutscene)
/* f15a880: 8dce0764 */ lw $t6,%lo(g_InCutscene)($t6)
/* f15a884: 15c0000f */ bnez $t6,.L0f15a8c4
/* f15a888: 00000000 */ nop
/* f15a88c: 8c620480 */ lw $v0,0x480($v1)
+4 -4
View File
@@ -2084,10 +2084,10 @@ glabel func0f18973c
/* f18999c: 8fbf0034 */ lw $ra,0x34($sp)
/* f1899a0: 8c4a1c10 */ lw $t2,0x1c10($v0)
.L0f1899a4:
/* f1899a4: 3c098007 */ lui $t1,%hi(var80070764)
/* f1899a4: 3c098007 */ lui $t1,%hi(g_InCutscene)
/* f1899a8: 514000c1 */ beqzl $t2,.L0f189cb0
/* f1899ac: 8fbf0034 */ lw $ra,0x34($sp)
/* f1899b0: 8d290764 */ lw $t1,%lo(var80070764)($t1)
/* f1899b0: 8d290764 */ lw $t1,%lo(g_InCutscene)($t1)
/* f1899b4: 552000be */ bnezl $t1,.L0f189cb0
/* f1899b8: 8fbf0034 */ lw $ra,0x34($sp)
/* f1899bc: 8c6b029c */ lw $t3,0x29c($v1)
@@ -2096,10 +2096,10 @@ glabel func0f18973c
/* f1899c4: 05600008 */ bltz $t3,.L0f1899e8
/* f1899c8: 00000000 */ nop
/* f1899cc: 8c6c02a8 */ lw $t4,0x2a8($v1)
/* f1899d0: 3c0d8007 */ lui $t5,%hi(var80070764)
/* f1899d0: 3c0d8007 */ lui $t5,%hi(g_InCutscene)
/* f1899d4: 558200b6 */ bnel $t4,$v0,.L0f189cb0
/* f1899d8: 8fbf0034 */ lw $ra,0x34($sp)
/* f1899dc: 8dad0764 */ lw $t5,%lo(var80070764)($t5)
/* f1899dc: 8dad0764 */ lw $t5,%lo(g_InCutscene)($t5)
/* f1899e0: 55a000b3 */ bnezl $t5,.L0f189cb0
/* f1899e4: 8fbf0034 */ lw $ra,0x34($sp)
.L0f1899e8:
+21 -21
View File
@@ -5020,7 +5020,7 @@ glabel func0f06a1ec
/* f06a528: 00c01025 */ or $v0,$a2,$zero
);
struct prop *func0f06a52c(struct singlemonitorobj *monitor, struct model08 *filedata)
struct prop *func0f06a52c(struct singlemonitorobj *monitor, struct modelfiledata *filedata)
{
return func0f06a1ec(monitor, filedata, 0, 0);
}
@@ -19513,7 +19513,7 @@ glabel var7f1aa43c
// }
//
// // Consider playing a sound effect
// if (model->unk08->unk04 == &stagethinglist_20ec8) {
// if (model->filedata->unk04 == &stagethinglist_20ec8) {
// f32 soundpoint = door->maxfrac * 0.3f;
//
// if (door->frac > soundpoint) {
@@ -19556,8 +19556,8 @@ void doorUpdatePortalIfWindowed(struct prop *doorprop, s32 playercount)
canhide = false;
}
if (model->unk08->unk04 == &stagethinglist_20ef8) {
node = modelGetPart(model->unk08, MODELPART_01);
if (model->filedata->unk04 == &stagethinglist_20ef8) {
node = modelGetPart(model->filedata, MODELPART_01);
partdata = modelGetNodeData(model, node);
if (partdata->visible.u32 == 0) {
@@ -27702,7 +27702,7 @@ void func0f07e058(struct prop *prop)
struct defaultobj *obj = prop->obj;
struct model *model = obj->model;
struct modelnode *node = modelGetPart(model->unk08, MODELPART_6E);
struct modelnode *node = modelGetPart(model->filedata, MODELPART_6E);
if (node) {
struct modeldata_partid *data = modelGetNodeData(model, node);
@@ -28185,7 +28185,7 @@ s32 objTick(struct prop *prop)
}
sp556 = true;
sp476.unk10 = gfxAllocate(model->unk08->unk0e * sizeof(Mtxf));
sp476.unk10 = gfxAllocate(model->filedata->unk0e * sizeof(Mtxf));
sp476.matrix = currentPlayerGetMatrix1740();
func0001cebc(&sp476, model);
@@ -28268,7 +28268,7 @@ s32 objTick(struct prop *prop)
sp144 = floorf(model->anim->frame);
for (i = sp148; i <= sp144; i++) {
func00024b64(0, 0, model->unk08->unk04, model->anim->animnum, i, &sp128, 0);
func00024b64(0, 0, model->filedata->unk04, model->anim->animnum, i, &sp128, 0);
sp116.x += sp128.x * 0.1f;
sp112 = sp128.y * 0.1f;
@@ -28283,7 +28283,7 @@ s32 objTick(struct prop *prop)
func00015a00(currentPlayerGetMatrix1740(), &sp248, &sp152);
sp556 = true;
sp312.unk10 = gfxAllocate(model->unk08->unk0e * sizeof(Mtxf));
sp312.unk10 = gfxAllocate(model->filedata->unk0e * sizeof(Mtxf));
sp312.matrix = &sp152;
func0001cebc(&sp312, model);
@@ -28431,14 +28431,14 @@ s32 objTick(struct prop *prop)
if (obj->type == OBJTYPE_FAN) {
func0f078be0(prop);
} else if (obj->model->unk08->unk04 == &stagethinglist_20e10) {
} else if (obj->model->filedata->unk04 == &stagethinglist_20e10) {
func0f07e058(prop);
}
if (sp556 == false) {
model->unk0c = gfxAllocate(model->unk08->unk0e * 64);
model->unk0c = gfxAllocate(model->filedata->unk0e * 64);
func0f07e2cc(prop);
func0001cb0c(model, model->unk08->rootnode);
func0001cb0c(model, model->filedata->rootnode);
}
prop->z = -model->unk0c->m[3][2];
@@ -30117,7 +30117,7 @@ glabel func0f0809c4
.L0f080de8:
/* f080de8: ae11000c */ sw $s1,0xc($s0)
/* f080dec: 8fa50070 */ lw $a1,0x70($sp)
/* f080df0: 0c0087bd */ jal func00021ef4
/* f080df0: 0c0087bd */ jal modelRender
/* f080df4: 02002025 */ or $a0,$s0,$zero
/* f080df8: 8fae0074 */ lw $t6,0x74($sp)
/* f080dfc: 8e11000c */ lw $s1,0xc($s0)
@@ -30232,7 +30232,7 @@ glabel func0f0809c4
);
GLOBAL_ASM(
glabel func0f080f8c
glabel gfxRenderRadialShadow
/* f080f8c: 27bdff00 */ addiu $sp,$sp,-256
/* f080f90: afbf002c */ sw $ra,0x2c($sp)
/* f080f94: afa40100 */ sw $a0,0x100($sp)
@@ -30439,7 +30439,7 @@ glabel func0f081220
/* f081298: e7a00010 */ swc1 $f0,0x10($sp)
/* f08129c: 02202025 */ or $a0,$s1,$zero
/* f0812a0: 8fa60038 */ lw $a2,0x38($sp)
/* f0812a4: 0fc203e3 */ jal func0f080f8c
/* f0812a4: 0fc203e3 */ jal gfxRenderRadialShadow
/* f0812a8: e7a40014 */ swc1 $f4,0x14($sp)
/* f0812ac: 10000012 */ b .L0f0812f8
/* f0812b0: 00408825 */ or $s1,$v0,$zero
@@ -30458,7 +30458,7 @@ glabel func0f081220
/* f0812e0: e7a00010 */ swc1 $f0,0x10($sp)
/* f0812e4: 02202025 */ or $a0,$s1,$zero
/* f0812e8: 8fa60038 */ lw $a2,0x38($sp)
/* f0812ec: 0fc203e3 */ jal func0f080f8c
/* f0812ec: 0fc203e3 */ jal gfxRenderRadialShadow
/* f0812f0: e7a60014 */ swc1 $f6,0x14($sp)
/* f0812f4: 00408825 */ or $s1,$v0,$zero
.L0f0812f8:
@@ -30974,8 +30974,8 @@ glabel var7f1aa82c
/* f081a30: 27a500a0 */ addiu $a1,$sp,0xa0
/* f081a34: 8c4400d8 */ lw $a0,0xd8($v0)
/* f081a38: 14800021 */ bnez $a0,.L0f081ac0
/* f081a3c: 3c0b8007 */ lui $t3,%hi(var80070764)
/* f081a40: 8d6b0764 */ lw $t3,%lo(var80070764)($t3)
/* f081a3c: 3c0b8007 */ lui $t3,%hi(g_InCutscene)
/* f081a40: 8d6b0764 */ lw $t3,%lo(g_InCutscene)($t3)
/* f081a44: 1560001e */ bnez $t3,.L0f081ac0
/* f081a48: 00000000 */ nop
/* f081a4c: 8c430480 */ lw $v1,0x480($v0)
@@ -31011,8 +31011,8 @@ glabel var7f1aa82c
/* f081abc: 8faf0088 */ lw $t7,0x88($sp)
.L0f081ac0:
/* f081ac0: 14800021 */ bnez $a0,.L0f081b48
/* f081ac4: 3c0b8007 */ lui $t3,%hi(var80070764)
/* f081ac8: 8d6b0764 */ lw $t3,%lo(var80070764)($t3)
/* f081ac4: 3c0b8007 */ lui $t3,%hi(g_InCutscene)
/* f081ac8: 8d6b0764 */ lw $t3,%lo(g_InCutscene)($t3)
/* f081acc: 5560001f */ bnezl $t3,.L0f081b4c
/* f081ad0: 8faf0088 */ lw $t7,0x88($sp)
/* f081ad4: 8c430480 */ lw $v1,0x480($v0)
@@ -48327,8 +48327,8 @@ glabel var7f1ab214
void objSetModelPartVisible(struct defaultobj *obj, s32 partnum, bool visible)
{
if (obj && obj->model && obj->model->unk08) {
struct modelnode *node = modelGetPart(obj->model->unk08, partnum);
if (obj && obj->model && obj->model->filedata) {
struct modelnode *node = modelGetPart(obj->model->filedata, partnum);
if (node) {
struct modeldata_partid *data = modelGetNodeData(obj->model, node);
+4 -4
View File
@@ -982,10 +982,10 @@ glabel func0f130044
/* f1304c0: c7b00138 */ lwc1 $f16,0x138($sp)
/* f1304c4: 00408825 */ or $s1,$v0,$zero
/* f1304c8: 8e0400d8 */ lw $a0,0xd8($s0)
/* f1304cc: 3c0e8007 */ lui $t6,%hi(var80070764)
/* f1304cc: 3c0e8007 */ lui $t6,%hi(g_InCutscene)
/* f1304d0: 14800013 */ bnez $a0,.L0f130520
/* f1304d4: 00000000 */ nop
/* f1304d8: 8dce0764 */ lw $t6,%lo(var80070764)($t6)
/* f1304d8: 8dce0764 */ lw $t6,%lo(g_InCutscene)($t6)
/* f1304dc: 15c00010 */ bnez $t6,.L0f130520
/* f1304e0: 00000000 */ nop
/* f1304e4: 8e030480 */ lw $v1,0x480($s0)
@@ -1006,8 +1006,8 @@ glabel func0f130044
/* f13051c: 8e48001c */ lw $t0,0x1c($s2)
.L0f130520:
/* f130520: 14800018 */ bnez $a0,.L0f130584
/* f130524: 3c0b8007 */ lui $t3,%hi(var80070764)
/* f130528: 8d6b0764 */ lw $t3,%lo(var80070764)($t3)
/* f130524: 3c0b8007 */ lui $t3,%hi(g_InCutscene)
/* f130528: 8d6b0764 */ lw $t3,%lo(g_InCutscene)($t3)
/* f13052c: 55600016 */ bnezl $t3,.L0f130588
/* f130530: 960a0010 */ lhu $t2,0x10($s0)
/* f130534: 8e030480 */ lw $v1,0x480($s0)
+4 -4
View File
@@ -1870,7 +1870,7 @@ glabel func0f017248
/* f0178d0: afa00114 */ sw $zero,0x114($sp)
/* f0178d4: 27a40110 */ addiu $a0,$sp,0x110
/* f0178d8: 02e02825 */ or $a1,$s7,$zero
/* f0178dc: 0c0087bd */ jal func00021ef4
/* f0178dc: 0c0087bd */ jal modelRender
/* f0178e0: afac011c */ sw $t4,0x11c($sp)
/* f0178e4: 8fb9011c */ lw $t9,0x11c($sp)
/* f0178e8: 00008025 */ or $s0,$zero,$zero
@@ -3846,7 +3846,7 @@ glabel var7f1a84a0
/* f0199d8: afa00154 */ sw $zero,0x154($sp)
/* f0199dc: 02402025 */ or $a0,$s2,$zero
/* f0199e0: 8e650000 */ lw $a1,0x0($s3)
/* f0199e4: 0c0087bd */ jal func00021ef4
/* f0199e4: 0c0087bd */ jal modelRender
/* f0199e8: afa8015c */ sw $t0,0x15c($sp)
/* f0199ec: 8fa9015c */ lw $t1,0x15c($sp)
/* f0199f0: 8e620000 */ lw $v0,0x0($s3)
@@ -4313,7 +4313,7 @@ glabel var7f1a84bc
/* f01a1cc: afa00164 */ sw $zero,0x164($sp)
/* f01a1d0: afb4016c */ sw $s4,0x16c($sp)
/* f01a1d4: 8e650000 */ lw $a1,0x0($s3)
/* f01a1d8: 0c0087bd */ jal func00021ef4
/* f01a1d8: 0c0087bd */ jal modelRender
/* f01a1dc: 27a40160 */ addiu $a0,$sp,0x160
/* f01a1e0: 8e6b0000 */ lw $t3,0x0($s3)
/* f01a1e4: 8fb4016c */ lw $s4,0x16c($sp)
@@ -4370,7 +4370,7 @@ glabel var7f1a84bc
/* f01a2a4: afa00164 */ sw $zero,0x164($sp)
/* f01a2a8: afb4016c */ sw $s4,0x16c($sp)
/* f01a2ac: 8e650000 */ lw $a1,0x0($s3)
/* f01a2b0: 0c0087bd */ jal func00021ef4
/* f01a2b0: 0c0087bd */ jal modelRender
/* f01a2b4: 27a40160 */ addiu $a0,$sp,0x160
/* f01a2b8: 8e620000 */ lw $v0,0x0($s3)
/* f01a2bc: 8fb4016c */ lw $s4,0x16c($sp)
+1 -1
View File
@@ -14507,7 +14507,7 @@ u32 var8009cadc = 0;
u32 var8009cae0 = 0;
u32 var8009cae4 = 0;
u32 var8009cae8 = 0;
u8 var8009caec = 0;
u8 var8009caec[4] = {0};
u8 var8009caf0 = 0;
u32 var8009caf4 = 0;
u32 var8009caf8 = 0;
+3 -1
View File
@@ -464,7 +464,7 @@
#define CHRCFLAG_HIDDEN 0x00000400
#define CHRCFLAG_NOAUTOAIM 0x00000800
#define CHRCFLAG_UNEXPLODABLE 0x00001000
#define CHRCFLAG_00002000 0x00002000 // Not used in scripts
#define CHRCFLAG_NOSHADOW 0x00002000
#define CHRCFLAG_HAS_SPECIAL_DEATH_ANIMATION 0x00004000
#define CHRCFLAG_00008000 0x00008000 // Not used in scripts
#define CHRCFLAG_00010000 0x00010000 // Related to dead people in intro cutscenes
@@ -1694,6 +1694,8 @@
#define MODELPART_03 0x03
#define MODELPART_ROBOTMUZZLEFLASHL 0x03
#define MODELPART_HUDPIECE 0x04
#define MODELPART_04 0x04
#define MODELPART_05 0x05
#define MODELPART_NECKLACE 0x07
#define MODELPART_NEWCLIP 0x28
#define MODELPART_NEWCLIP2 0x29
+7 -7
View File
@@ -21,7 +21,7 @@ void func0f021fa8(struct chrdata *chr, struct coord *pos, s16 *rooms);
void func0f0220ec(struct chrdata *chr, s32 arg1, s32 arg2);
u32 func0f022214(void);
void chrUpdateCloak(struct chrdata *chr);
u32 func0f022be4(void);
s32 func0f022be4(struct chrdata *chr);
void chrSetPoisoned(struct chrdata *chr, void *arg1);
u32 func0f022d60(void);
bool propchrDoFireslotThing(struct prop *prop);
@@ -30,11 +30,11 @@ void chrDropItems(struct chrdata *chr);
void chrSetHudpieceVisible(struct chrdata *chr, bool visible);
void chrDropWeapons(struct chrdata *chr);
void func0f0246e4(u8 *arg0);
u32 func0f024738(void);
bool func0f024738(struct chrdata *chr);
u32 func0f024b18(void);
u32 func0f025074(void);
void func0f025074(struct prop *prop, struct modelrenderdata *renderdata, bool withalpha, struct chrdata *chr);
void bodyGetBloodColour(s16 bodynum, u8 *colour1, u32 *colour2);
Gfx *propchrRender(struct prop *prop, Gfx *gdl, bool arg2);
Gfx *chrRender(struct prop *prop, Gfx *gdl, bool withalpha);
void chrEmitSparks(struct chrdata *chr, struct prop *prop, s32 arg2, struct coord *coord, struct coord *coord2, struct chrdata *chr2);
u32 func0f0260c4(void);
u32 func0f0268bc(void);
@@ -58,10 +58,10 @@ void func0f0295f8(f32 arg0, s32 *arg1, s32 *arg2, s32 *arg3);
f32 propGetShieldThing(struct prop **propptr);
u32 func0f02983c(void);
u32 func0f02b7d4(void);
u32 func0f02bdf8(void);
u32 func0f02c6e0(void);
Gfx *func0f02bdf8(Gfx *gdl, struct prop *chr1, struct prop *chr2);
Gfx *func0f02c6e0(Gfx *gdl, struct chrdata *chr, u32 alpha);
u32 func0f02c9b0(void);
u32 func0f02ccb4(void);
void func0f02ccb4(struct chrdata *drcaroll, s32 imageleft, s32 imageright);
s32 getNumChrSlots(void);
void chrRegister(s32 chrnum, s32 chrindex);
void func0f01e760(s32 arg0);
+1 -1
View File
@@ -66,7 +66,7 @@ extern u32 var80070748;
extern u32 var8007074c;
extern bool g_PlayersWithControl[];
extern bool g_PlayerInvincible;
extern s32 var80070764;
extern s32 g_InCutscene;
extern s16 g_DeathAnimations[];
extern u32 g_NumDeathAnimations;
extern u32 var80070780;
+1 -1
View File
@@ -15,7 +15,7 @@ bool func0f12af5c(struct explosion *exp, struct prop *prop, struct coord *pos1,
u32 func0f12b0e0(void);
u32 func0f12bbdc(struct prop *prop);
u32 explosionUpdateZ(struct prop *prop);
Gfx *explosionRender(struct prop *prop, Gfx *gdl, bool arg2);
Gfx *explosionRender(struct prop *prop, Gfx *gdl, bool withalpha);
u32 func0f12cd64(void);
#endif
+1 -1
View File
@@ -15,7 +15,7 @@ void func0f060538(struct prop *prop);
void func0f0605c4(struct prop *prop);
void propReparent(struct prop *mover, struct prop *adopter);
void propDetach(struct prop *prop);
Gfx *propRender(Gfx *gdl, struct prop *prop, bool arg2);
Gfx *propRender(Gfx *gdl, struct prop *prop, bool withalpha);
Gfx *propsRender(Gfx *gdl, s16 arg1, s32 arg2, s16 *arg3);
u32 func0f060984(void);
u32 func0f060bac(void);
+1 -1
View File
@@ -84,7 +84,7 @@ s32 getMissionTime(void);
s32 func0f0c228c(struct prop *prop);
u32 func0f0c2364(void);
u32 func0f0c2a58(void);
Gfx *playerRender(struct prop *prop, Gfx *gdl, bool arg2);
Gfx *playerRender(struct prop *prop, Gfx *gdl, bool withalpha);
Gfx *currentPlayerLoadMatrix(Gfx *gdl);
u32 func0f0c3320(void);
void setTickMode(s32 tickmode);
+1 -1
View File
@@ -3,6 +3,6 @@
#include <ultra64.h>
#include "types.h"
u32 func0f0c33f0(void);
void func0f0c33f0(Mtxf *matrix, s32 arg1);
#endif
+1 -1
View File
@@ -17,6 +17,6 @@ Gfx *func0f1664a0(Gfx *gdl, u32 arg1);
Gfx *gfxConsiderDisableFog(Gfx *gdl);
u32 func0f1666f8(void);
u32 func0f1667e8(void);
u32 func0f1667f4(void);
s32 func0f1667f4(struct prop *prop, f32 *arg1);
#endif
+1 -1
View File
@@ -106,7 +106,7 @@ s32 menuhandler00185068(u32 operation, struct menuitem *item, union handlerdata
void func0f185568(void);
Gfx *func0f185774(Gfx *gdl);
u32 func0f185c14(void);
u32 func0f185e20(void);
bool func0f185e20(struct prop *prop, s32 *arg1);
void mpPrepareScenario(void);
u32 func0f186508(void);
void func0f1866b8(s32 playernum, char *message);
+10 -10
View File
@@ -84,11 +84,11 @@ u32 func0f068ad4(void);
struct model08thing *func0f068af4(struct defaultobj *obj);
u32 func0f068b14(void);
u32 func0f068c04(void);
u32 func0f068fc8(void);
s32 func0f068fc8(struct prop *prop, bool arg1);
void func0f069144(struct prop *prop, u8 *nextcol, u16 floorcol);
void func0f069630(struct prop *prop, u8 *nextcol, u16 floorcol);
void func0f069710(u8 *shadecol, u8 *nextcol);
u32 func0f069750(void);
void func0f069750(s32 *arg0, s32 arg1, f32 *arg2);
void func0f069850(struct defaultobj *obj, struct coord *pos, f32 *realrot, struct geo *geo);
void func0f069b4c(struct defaultobj *obj);
void func0f069c1c(struct defaultobj *obj);
@@ -96,8 +96,8 @@ void func0f069c70(struct defaultobj *obj, bool arg1, bool arg2);
u32 func0f069cd8(void);
u32 func0f069d38(void);
u32 func0f06a170(void);
struct prop *func0f06a1ec(struct singlemonitorobj *monitor, struct model08 *filedata, u32 arg2, u32 arg3);
struct prop *func0f06a52c(struct singlemonitorobj *monitor, struct model08 *model08);
struct prop *func0f06a1ec(struct singlemonitorobj *monitor, struct modelfiledata *filedata, u32 arg2, u32 arg3);
struct prop *func0f06a52c(struct singlemonitorobj *monitor, struct modelfiledata *modelfiledata);
struct prop *func0f06a550(struct singlemonitorobj *monitor);
u32 func0f06a580(void);
f32 func0f06a620(struct defaultobj *obj);
@@ -208,9 +208,9 @@ void imageSlotSetImage(struct monitorscreen *screen, u32 arg1);
u32 func0f07fbf0(void);
u32 func0f07fbf8(void);
u32 func0f0809c4(void);
u32 func0f080f8c(void);
Gfx *gfxRenderRadialShadow(Gfx *gdl, f32 x, f32 y, f32 z, f32 angle, f32 size, u32 alpha);
u32 func0f081220(void);
Gfx *propobjRender(struct prop *prop, Gfx *gdl, bool arg2);
Gfx *propobjRender(struct prop *prop, Gfx *gdl, bool withalpha);
u32 func0f081c18(void);
u32 func0f081ccc(void);
u32 func0f0826cc(void);
@@ -262,7 +262,7 @@ u32 func0f088840(struct prop *prop, bool showhudmsg);
u32 func0f089014(void);
bool func0f0899dc(struct prop *prop, f32 *arg0, f32 *arg1, f32 *arg2);
void func0f089a94(bool arg0, struct model *model);
void func0f089c70(struct hatobj *hat, struct chrdata *chr, struct model08 *filedata, u32 arg3, u32 arg4);
void func0f089c70(struct hatobj *hat, struct chrdata *chr, struct modelfiledata *filedata, u32 arg3, u32 arg4);
void func0f089d64(struct hatobj *hat, struct chrdata *chr);
void hatAssignToChr(struct hatobj *hat, struct chrdata *chr);
u32 chrTryEquipHat(struct chrdata *chr, u32 model, u32 flags);
@@ -281,7 +281,7 @@ void propweaponSetDual(struct weaponobj *weapon1, struct weaponobj *weapon2);
u32 func0f08adc8(void);
u32 func0f08ae0c(void);
u32 func0f08ae54(struct defaultobj *obj, struct chrdata *chr);
u32 func0f08b108(struct weaponobj *weapon, struct chrdata *chr, struct model08 *model08, u32 arg3, u32 arg4);
u32 func0f08b108(struct weaponobj *weapon, struct chrdata *chr, struct modelfiledata *modelfiledata, u32 arg3, u32 arg4);
void func0f08b208(struct weaponobj *weapon, struct chrdata *chr);
void func0f08b25c(struct weaponobj *weapon, struct chrdata *chr);
u32 func0f08b27c(void);
@@ -322,8 +322,8 @@ void doorSetMode(struct doorobj *door, s32 newmode);
void doorActivate(struct doorobj *door, s32 newmode);
s32 doorIsClosed(struct doorobj *door);
s32 doorIsOpen(struct doorobj *door);
u32 func0f08e5a8(void);
u32 func0f08e6bc(void);
s32 func0f08e5a8(s16 *rooms, struct screenbox *box);
f32 func0f08e6bc(struct prop *prop, f32 arg1);
u32 func0f08e794(void);
bool func0f08e8ac(struct prop *prop, struct coord *coord, f32 arg2, u32 arg3);
bool posIsInDrawDistance(struct coord *arg);
+1 -1
View File
@@ -13,7 +13,7 @@ void smokeClearForProp(struct prop *prop);
struct smoke *smokeCreateSimple(struct coord *pos, s16 *rooms, s16 type);
u32 func0f12e848(struct prop *prop);
u32 smokeUpdateZ(struct prop *prop);
Gfx *smokeRender(struct prop *prop, Gfx *gdl, bool arg2);
Gfx *smokeRender(struct prop *prop, Gfx *gdl, bool withalpha);
u32 func0f12f5f8(void);
#endif
+1 -1
View File
@@ -491,7 +491,7 @@ extern u32 var8009ca84;
extern u32 var8009cad0;
extern u32 var8009cadc;
extern u32 var8009cae0;
extern u8 var8009caec;
extern u8 var8009caec[4];
extern u8 var8009caf0;
extern struct var8009cb08 var8009cb08[6];
extern u32 var8009cbf8;
+3 -3
View File
@@ -14,8 +14,8 @@ u32 func0001a740(void);
u32 func0001a784(void);
u32 func0001a7cc(void);
u32 func0001a85c(void);
struct modelnode *modelGetPart(struct model08 *arg0, s32 partnum);
union modelnode_data *modelGetPartNodeData(struct model08 *model08, s32 partnum);
struct modelnode *modelGetPart(struct modelfiledata *arg0, s32 partnum);
union modelnode_data *modelGetPartNodeData(struct modelfiledata *modelfiledata, s32 partnum);
u32 func0001a9e8(void);
void *modelGetNodeData(struct model *model, struct modelnode *node);
void modelNodeGetPosition(struct model *model, struct modelnode *node, struct coord *pos);
@@ -88,7 +88,7 @@ u32 func00020f30(void);
u32 func0002124c(void);
u32 func000216cc(void);
u32 func0002170c(void);
u32 func00021ef4(void);
void modelRender(struct modelrenderdata *renderdata, struct model *model);
u32 func000220fc(void);
u32 func000225d4(void);
u32 func000227a4(void);
+30 -9
View File
@@ -275,7 +275,7 @@ struct modelnode {
/*0x14*/ struct modelnode *child;
};
struct model08 { // raw model file data
struct modelfiledata {
struct modelnode *rootnode;
struct stagethinglist *unk04;
@@ -292,7 +292,7 @@ struct model {
/*0x00*/ u8 unk00;
/*0x01*/ u8 unk01;
/*0x04*/ struct chrdata *chr;
/*0x08*/ struct model08 *unk08;
/*0x08*/ struct modelfiledata *filedata;
/*0x0c*/ Mtxf *unk0c;
/*0x10*/ void **datas; // array of pointers to modeldata structs
/*0x14*/ f32 unk14;
@@ -331,7 +331,7 @@ struct modeldata_05 {
};
struct modeldata_headspot { // type 0x17
struct model08 *model08;
struct modelfiledata *modelfiledata;
void *datas;
};
@@ -2188,10 +2188,8 @@ struct player {
/*0x0004*/ struct coord memcampos;
/*0x0010*/ u16 visionmode;
/*0x0014*/ s32 memcamroom;
/*0x0018*/ u32 unk0018;
/*0x001c*/ u32 unk001c;
/*0x0020*/ u32 unk0020;
/*0x0024*/ u32 unk0024;
/*0x0018*/ struct coord eraserpos;
/*0x0024*/ f32 eraserpropdist;
/*0x0028*/ u32 unk0028;
/*0x002c*/ u32 unk002c;
/*0x0030*/ bool isfalling;
@@ -2335,7 +2333,10 @@ struct player {
/*0x0264*/ struct weaponobj *slayerrocket;
/*0x0268*/ bool eyesshut;
/*0x026c*/ f32 eyesshutfrac;
/*0x0270*/ u32 unk0270;
/*0x0270*/ u8 epcol_0;
/*0x0270*/ u8 epcol_1;
/*0x0270*/ u8 epcol_2;
/*0x0270*/ u8 flashbang;
/*0x0274*/ bool waitforzrelease;
/*0x0278*/ f32 shieldshowrot;
/*0x027c*/ u32 shieldshowrnd;
@@ -4931,7 +4932,7 @@ struct chrnumaction {
};
struct propdefinition {
struct model08 *filedata;
struct modelfiledata *filedata;
u16 fileid;
u16 scale;
};
@@ -5887,6 +5888,26 @@ struct objticksp476 {
/*0x3c*/ u32 unk3c;
};
// Suspected to be the same as objticksp476
struct modelrenderdata {
/*0x00*/ u32 unk00;
/*0x04*/ s32 unk04;
/*0x08*/ u32 unk08;
/*0x0c*/ Gfx *gdl;
/*0x10*/ u32 unk10;
/*0x14*/ u32 unk14;
/*0x18*/ u32 unk18;
/*0x1c*/ u32 unk1c;
/*0x20*/ u32 unk20;
/*0x24*/ u32 unk24;
/*0x28*/ u32 unk28;
/*0x2c*/ u32 unk2c;
/*0x30*/ u32 unk30;
/*0x34*/ u32 colour34;
/*0x38*/ u32 colour38;
/*0x3c*/ u32 unk3c;
};
struct rend_vidat {
/*0x00*/ void *unk00;
/*0x04*/ u16 x;
+17 -17
View File
@@ -374,26 +374,26 @@ glabel func0001a85c
/* 1a918: 00601025 */ or $v0,$v1,$zero
);
struct modelnode *modelGetPart(struct model08 *model08, s32 partnum)
struct modelnode *modelGetPart(struct modelfiledata *modelfiledata, s32 partnum)
{
s32 upper;
s32 lower;
u32 i;
s16 *partnums;
if (model08->numparts == 0) {
if (modelfiledata->numparts == 0) {
return NULL;
}
partnums = (s16 *)&model08->parts[model08->numparts];
partnums = (s16 *)&modelfiledata->parts[modelfiledata->numparts];
lower = 0;
upper = model08->numparts;
upper = modelfiledata->numparts;
while (upper >= lower) {
i = (lower + upper) / 2;
if (partnum == partnums[i]) {
return model08->parts[i];
return modelfiledata->parts[i];
}
if (partnum < partnums[i]) {
@@ -406,9 +406,9 @@ struct modelnode *modelGetPart(struct model08 *model08, s32 partnum)
return NULL;
}
union modelnode_data *modelGetPartNodeData(struct model08 *model08, s32 partnum)
union modelnode_data *modelGetPartNodeData(struct modelfiledata *modelfiledata, s32 partnum)
{
struct modelnode *node = modelGetPart(model08, partnum);
struct modelnode *node = modelGetPart(modelfiledata, partnum);
if (node) {
return node->data;
@@ -558,12 +558,12 @@ void modelNodeSetPosition(struct model *model, struct modelnode *node, struct co
void modelGetRootPosition(struct model *model, struct coord *pos)
{
modelNodeGetPosition(model, model->unk08->rootnode, pos);
modelNodeGetPosition(model, model->filedata->rootnode, pos);
}
void modelSetRootPosition(struct model *model, struct coord *pos)
{
modelNodeSetPosition(model, model->unk08->rootnode, pos);
modelNodeSetPosition(model, model->filedata->rootnode, pos);
}
GLOBAL_ASM(
@@ -634,8 +634,8 @@ glabel func0001ad5c
f32 func0001ae44(struct model *model)
{
if ((model->unk08->rootnode->type & 0xff) == MODELNODETYPE_ROOT) {
struct modeldata_root *data = modelGetNodeData(model, model->unk08->rootnode);
if ((model->filedata->rootnode->type & 0xff) == MODELNODETYPE_ROOT) {
struct modeldata_root *data = modelGetNodeData(model, model->filedata->rootnode);
return data->unk14;
}
@@ -644,8 +644,8 @@ f32 func0001ae44(struct model *model)
void func0001ae90(struct model *model, f32 angle)
{
if ((model->unk08->rootnode->type & 0xff) == MODELNODETYPE_ROOT) {
struct modeldata_root *data = modelGetNodeData(model, model->unk08->rootnode);
if ((model->filedata->rootnode->type & 0xff) == MODELNODETYPE_ROOT) {
struct modeldata_root *data = modelGetNodeData(model, model->filedata->rootnode);
f32 diff = angle - data->unk14;
if (diff < 0) {
@@ -682,7 +682,7 @@ void modelSetAnimScale(struct model *model, f32 scale)
f32 func0001af80(struct model *model)
{
return model->unk08->unk10 * model->unk14;
return model->filedata->unk10 * model->unk14;
}
GLOBAL_ASM(
@@ -962,7 +962,7 @@ glabel func0001b0e8
void func0001b3bc(struct model *model)
{
struct modelnode *node = model->unk08->rootnode;
struct modelnode *node = model->filedata->rootnode;
if (node && (node->type & 0xff) == MODELNODETYPE_ROOT) {
func0001b0e8(model, node);
@@ -3494,7 +3494,7 @@ void modelCopyAnimForMerge(struct model *model, f32 arg1)
return;
}
node = model->unk08->rootnode;
node = model->filedata->rootnode;
nodetype = node->type & 0xff;
anim->frame2 = anim->frame;
@@ -8352,7 +8352,7 @@ glabel var70054454
);
GLOBAL_ASM(
glabel func00021ef4
glabel modelRender
.late_rodata
glabel var70054458
.word 0x7002209c