Set names for all model C functions
This commit is contained in:
parent
3248fa9849
commit
3484a4faed
|
@ -184,7 +184,7 @@ struct model *body0f02ce8c(s32 bodynum, s32 headnum, struct modelfiledata *bodyf
|
|||
bodyfiledata = g_HeadsAndBodies[bodynum].filedata;
|
||||
}
|
||||
|
||||
modelCalculateRwDataLen(bodyfiledata);
|
||||
modelAllocateRwData(bodyfiledata);
|
||||
|
||||
if (!g_HeadsAndBodies[bodynum].unk00_01) {
|
||||
if (bodyfiledata->skel == &g_SkelChr) {
|
||||
|
@ -210,7 +210,7 @@ struct model *body0f02ce8c(s32 bodynum, s32 headnum, struct modelfiledata *bodyf
|
|||
}
|
||||
}
|
||||
|
||||
modelCalculateRwDataLen(headfiledata);
|
||||
modelAllocateRwData(headfiledata);
|
||||
|
||||
bodyfiledata->rwdatalen += headfiledata->rwdatalen;
|
||||
|
||||
|
@ -259,7 +259,7 @@ struct model *body0f02ce8c(s32 bodynum, s32 headnum, struct modelfiledata *bodyf
|
|||
if (headfiledata && !g_HeadsAndBodies[bodynum].unk00_01) {
|
||||
bodyfiledata->rwdatalen -= headfiledata->rwdatalen;
|
||||
|
||||
modelmgr0f0b32a0(model, node, headfiledata);
|
||||
modelmgrAttachHead(model, node, headfiledata);
|
||||
|
||||
if ((s16)*(s32 *)&headfiledata->skel == SKEL_HEAD) {
|
||||
struct modelnode *node2;
|
||||
|
|
|
@ -655,7 +655,7 @@ void bgun0f0981e8(struct hand *hand, struct modelfiledata *modeldef)
|
|||
|
||||
if (hand->unk0ce8 && animspeed < 0.0f) {
|
||||
modelSetAnimation(&hand->gunmodel, hand->animload, false, 0.0f, animspeedmult * animspeed, 0.0f);
|
||||
model0001e018(&hand->gunmodel, modelGetNumAnimFrames(&hand->gunmodel));
|
||||
modelSetAnimFrame(&hand->gunmodel, modelGetNumAnimFrames(&hand->gunmodel));
|
||||
} else {
|
||||
modelSetAnimation(&hand->gunmodel, hand->animload, false, 0.0f, animspeedmult * animspeed, 0.0f);
|
||||
}
|
||||
|
@ -772,7 +772,7 @@ void bgun0f0981e8(struct hand *hand, struct modelfiledata *modeldef)
|
|||
hand->animframeinc = 0;
|
||||
#endif
|
||||
|
||||
model0001e018(&hand->gunmodel, sp78);
|
||||
modelSetAnimFrame(&hand->gunmodel, sp78);
|
||||
hand->animloopcount++;
|
||||
s2 = sp78;
|
||||
}
|
||||
|
@ -795,9 +795,9 @@ void bgun0f0981e8(struct hand *hand, struct modelfiledata *modeldef)
|
|||
|
||||
#if VERSION >= VERSION_PAL_BETA
|
||||
modelSetAnimPlaySpeed(&hand->gunmodel, PALUPF(4.0f), 0);
|
||||
model0001ee18(&hand->gunmodel, hand->animframeinc, true);
|
||||
modelTickAnimQuarterSpeed(&hand->gunmodel, hand->animframeinc, true);
|
||||
#else
|
||||
model0001f314(&hand->gunmodel, hand->animframeinc, true);
|
||||
modelTickAnim(&hand->gunmodel, hand->animframeinc, true);
|
||||
#endif
|
||||
|
||||
s2 = bgun0f09815c(hand);
|
||||
|
@ -2093,7 +2093,7 @@ bool bgun0f09aba4(struct hand *hand, struct handweaponinfo *info, s32 handnum, s
|
|||
if (unk27 > frames - hand->statevar1) {
|
||||
mult1 = cosf((f32)(unk27 - frames + hand->statevar1) * 1.5707963705063f / (f32)unk27) * 0.5f + 0.5f;
|
||||
|
||||
hand->rotxoffset = model0001afe8(hand->rotxstart, hand->rotxend, mult1);
|
||||
hand->rotxoffset = modelTweenRotAxis(hand->rotxstart, hand->rotxend, mult1);
|
||||
hand->useposrot = true;
|
||||
|
||||
hand->posoffset.x = (hand->posend.x - hand->posstart.x) * mult1 + hand->posstart.x;
|
||||
|
@ -2133,7 +2133,7 @@ bool bgun0f09aba4(struct hand *hand, struct handweaponinfo *info, s32 handnum, s
|
|||
mult2 = cosf((f32)(frames - unk24) * M_PI / (f32)unk25) * 0.5f + 0.5f;
|
||||
}
|
||||
|
||||
hand->rotxoffset = model0001afe8(hand->rotxstart, hand->rotxend, mult2);
|
||||
hand->rotxoffset = modelTweenRotAxis(hand->rotxstart, hand->rotxend, mult2);
|
||||
hand->useposrot = true;
|
||||
|
||||
hand->posoffset.x = (hand->posend.x - hand->posstart.x) * mult2 + hand->posstart.x;
|
||||
|
@ -3894,7 +3894,7 @@ void bgunTickGunLoad(void)
|
|||
fileGetLoadedSize(player->gunctrl.loadfilenum);
|
||||
fileGetLoadedSize(player->gunctrl.loadfilenum);
|
||||
|
||||
modelCalculateRwDataLen(modeldef);
|
||||
modelAllocateRwData(modeldef);
|
||||
|
||||
osSyncPrintf("BriGun: propgfx_decompress 0x%08x\n");
|
||||
osSyncPrintf("BriGun: DL waste space %d from %d (Used %d, Ramlen %d, ObSize %d)\n");
|
||||
|
@ -4648,7 +4648,7 @@ void bgunUpdateHeldRocket(s32 handnum)
|
|||
model->matrices = gfxAllocate(model->filedata->nummatrices * sizeof(Mtxf));
|
||||
|
||||
mtx4Copy(&hand->muzzlemat, &model->matrices[0]);
|
||||
model0001cb0c(model, model->filedata->rootnode);
|
||||
modelUpdateRelationsQuick(model, model->filedata->rootnode);
|
||||
|
||||
objprop->flags |= PROPFLAG_ONANYSCREENTHISTICK | PROPFLAG_ONTHISSCREENTHISTICK;
|
||||
objprop->z = -model->matrices[0].m[3][2];
|
||||
|
@ -6376,7 +6376,7 @@ void bgunExecuteModelCmdList(s32 *ptr)
|
|||
break;
|
||||
case 2:
|
||||
rwdata = (union modelrwdata *)ptr[1];
|
||||
rwdata->headspot.modelfiledata = NULL;
|
||||
rwdata->headspot.headmodeldef = NULL;
|
||||
rwdata->headspot.rwdatas = NULL;
|
||||
ptr += 2;
|
||||
break;
|
||||
|
@ -6446,7 +6446,7 @@ s32 bgunCreateModelCmdList(struct model *model, struct modelnode *nodearg, s32 *
|
|||
break;
|
||||
case MODELNODETYPE_HEADSPOT:
|
||||
rwdata = modelGetNodeRwData(model, node);
|
||||
rwdata->headspot.modelfiledata = NULL;
|
||||
rwdata->headspot.headmodeldef = NULL;
|
||||
rwdata->headspot.rwdatas = NULL;
|
||||
ptr[0] = 2;
|
||||
ptr[1] = (s32)rwdata;
|
||||
|
@ -6473,7 +6473,7 @@ s32 bgunCreateModelCmdList(struct model *model, struct modelnode *nodearg, s32 *
|
|||
rodata = node->rodata;
|
||||
rwdata = modelGetNodeRwData(model, node);
|
||||
rwdata->dl.vertices = rodata->dl.vertices;
|
||||
rwdata->dl.gdl = rodata->dl.primary;
|
||||
rwdata->dl.gdl = rodata->dl.opagdl;
|
||||
rwdata->dl.colours = (void *)ALIGN8((u32)&rodata->dl.vertices[rodata->dl.numvertices]);
|
||||
ptr[0] = 5;
|
||||
ptr[1] = (s32)rwdata;
|
||||
|
@ -6782,7 +6782,7 @@ void bgunUpdateLasersight(struct hand *hand, struct modelfiledata *modeldef, s32
|
|||
node = modelGetPart(modeldef, MODELPART_FALCON2_0034);
|
||||
|
||||
if (node) {
|
||||
mtxindex = model0001a524(node, 0);
|
||||
mtxindex = modelFindNodeMtxIndex(node, 0);
|
||||
|
||||
beamnear.x = ((Mtxf *)((u32)allocation + mtxindex * sizeof(Mtxf)))->m[3][0];
|
||||
beamnear.y = ((Mtxf *)((u32)allocation + mtxindex * sizeof(Mtxf)))->m[3][1];
|
||||
|
@ -6830,7 +6830,7 @@ void bgunUpdateLasersight(struct hand *hand, struct modelfiledata *modeldef, s32
|
|||
}
|
||||
|
||||
if (busy) {
|
||||
mtxindex = model0001a524(node, 0);
|
||||
mtxindex = modelFindNodeMtxIndex(node, 0);
|
||||
|
||||
beamfar.x = 0.0f;
|
||||
beamfar.y = 0.0f;
|
||||
|
@ -6935,7 +6935,7 @@ void bgunUpdateReaper(struct hand *hand, struct modelfiledata *modeldef)
|
|||
}
|
||||
|
||||
if (node) {
|
||||
var8009d0dc = model0001a524(node, 0);
|
||||
var8009d0dc = modelFindNodeMtxIndex(node, 0);
|
||||
g_ModelJointPositionedFunc = bgun0f0a256c;
|
||||
var8009d0f0[0] = var8009d0f0[1] = var8009d0f0[2] = -1;
|
||||
}
|
||||
|
@ -6943,19 +6943,19 @@ void bgunUpdateReaper(struct hand *hand, struct modelfiledata *modeldef)
|
|||
node = modelGetPart(modeldef, MODELPART_REAPER_002D);
|
||||
|
||||
if (node) {
|
||||
var8009d0f0[0] = model0001a524(node, 0);
|
||||
var8009d0f0[0] = modelFindNodeMtxIndex(node, 0);
|
||||
}
|
||||
|
||||
node = modelGetPart(modeldef, MODELPART_REAPER_002E);
|
||||
|
||||
if (node) {
|
||||
var8009d0f0[1] = model0001a524(node, 0);
|
||||
var8009d0f0[1] = modelFindNodeMtxIndex(node, 0);
|
||||
}
|
||||
|
||||
node = modelGetPart(modeldef, MODELPART_REAPER_002F);
|
||||
|
||||
if (node) {
|
||||
var8009d0f0[2] = model0001a524(node, 0);
|
||||
var8009d0f0[2] = modelFindNodeMtxIndex(node, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6981,7 +6981,7 @@ void bgunUpdateSniperRifle(struct modelfiledata *modeldef, u8 *allocation)
|
|||
for (i = 0; i < 4; i++) {
|
||||
if (nodes[i]) {
|
||||
f32 f20 = f26 * 4.0f;
|
||||
mtxindex = model0001a524(nodes[i], 0);
|
||||
mtxindex = modelFindNodeMtxIndex(nodes[i], 0);
|
||||
sp88[i] = f20 - i;
|
||||
|
||||
if (f20 < i) {
|
||||
|
@ -7011,7 +7011,7 @@ void bgunUpdateDevastator(struct hand *hand, u8 *allocation, struct modelfiledat
|
|||
struct modelnode *node = modelGetPart(modeldef, MODELPART_DEVASTATOR_0028);
|
||||
|
||||
if (node) {
|
||||
s32 mtxindex = model0001a524(node, 0);
|
||||
s32 mtxindex = modelFindNodeMtxIndex(node, 0);
|
||||
struct coord sp24;
|
||||
|
||||
hand->loadslide += 0.01f * LVUPDATE60FREAL();
|
||||
|
@ -7061,7 +7061,7 @@ void bgunUpdateShotgun(struct hand *hand, u8 *allocation, bool *arg2, struct mod
|
|||
*arg2 = true;
|
||||
|
||||
if (node) {
|
||||
sp34 = model0001a524(node, 0);
|
||||
sp34 = modelFindNodeMtxIndex(node, 0);
|
||||
|
||||
mtx00015ea8((1.0f - hand->matmot1) * 8.0f + 0.5f, (Mtxf *)((u32)allocation + sp34 * sizeof(Mtxf)));
|
||||
mtx00015df0((1.0f - hand->matmot1) * 3.0f + 1.0f, (Mtxf *)((u32)allocation + sp34 * sizeof(Mtxf)));
|
||||
|
@ -7101,7 +7101,7 @@ void bgunUpdateMagnum(struct hand *hand, s32 handnum, struct modelfiledata *mode
|
|||
struct modelnode *node = modelGetPart(modeldef, 0x0a + random() % 6);
|
||||
|
||||
if (node) {
|
||||
s32 index = model0001a524(node, 0);
|
||||
s32 index = modelFindNodeMtxIndex(node, 0);
|
||||
Mtxf *tmp = mtx;
|
||||
Mtxf sp4c;
|
||||
|
||||
|
@ -7152,7 +7152,7 @@ void bgun0f0a45d0(struct hand *hand, struct modelfiledata *filedata, bool isdeto
|
|||
}
|
||||
|
||||
if (node) {
|
||||
var8009d148 = model0001a524(node, 0);
|
||||
var8009d148 = modelFindNodeMtxIndex(node, 0);
|
||||
g_ModelJointPositionedFunc = bgun0f0a256c;
|
||||
} else {
|
||||
var8009d148 = -1;
|
||||
|
@ -7330,7 +7330,7 @@ void bgun0f0a4e44(struct hand *hand, struct weapon *weapondef, struct modelfiled
|
|||
|
||||
if (node && weaponnum != WEAPON_REAPER && weaponnum != WEAPON_SHOTGUN) {
|
||||
struct modelrodata_position *rodata = &node->rodata->position;
|
||||
s32 mtxindex = model0001a524(node, 0);
|
||||
s32 mtxindex = modelFindNodeMtxIndex(node, 0);
|
||||
|
||||
sp60.x = rodata->pos.x * spd8.m[0][0] + rodata->pos.y * spd8.m[1][0] + rodata->pos.z * spd8.m[2][0] + spd8.m[3][0];
|
||||
sp60.y = rodata->pos.x * spd8.m[0][1] + rodata->pos.y * spd8.m[1][1] + rodata->pos.z * spd8.m[2][1] + spd8.m[3][1];
|
||||
|
@ -7384,7 +7384,7 @@ void bgunCreateFx(struct hand *hand, s32 handnum, struct weaponfunc *funcdef, s3
|
|||
Mtxf *mtx = (Mtxf *)allocation;
|
||||
Mtxf sp24;
|
||||
|
||||
mtx += model0001a524(node, 0);
|
||||
mtx += modelFindNodeMtxIndex(node, 0);
|
||||
|
||||
mtx4Copy(mtx, &sp24);
|
||||
mtx00015f04(9.999999f, &sp24);
|
||||
|
@ -7818,7 +7818,7 @@ void bgun0f0a5550(s32 handnum)
|
|||
var8005efb0_2 = true;
|
||||
}
|
||||
|
||||
model0001cebc(&renderdata, &hand->gunmodel);
|
||||
modelSetMatricesWithAnim(&renderdata, &hand->gunmodel);
|
||||
|
||||
var8005efd8_2 = false;
|
||||
|
||||
|
@ -7826,7 +7826,7 @@ void bgun0f0a5550(s32 handnum)
|
|||
var8005efb0_2 = false;
|
||||
}
|
||||
#else
|
||||
model0001cebc(&renderdata, &hand->gunmodel);
|
||||
modelSetMatricesWithAnim(&renderdata, &hand->gunmodel);
|
||||
#endif
|
||||
|
||||
player->hands[HAND_RIGHT].unk0dd4 = 1;
|
||||
|
@ -7850,7 +7850,7 @@ void bgun0f0a5550(s32 handnum)
|
|||
var8005efb0_2 = true;
|
||||
}
|
||||
|
||||
model0001cebc(&renderdata, &hand->gunmodel);
|
||||
modelSetMatricesWithAnim(&renderdata, &hand->gunmodel);
|
||||
|
||||
var8005efd8_2 = false;
|
||||
|
||||
|
@ -7858,7 +7858,7 @@ void bgun0f0a5550(s32 handnum)
|
|||
var8005efb0_2 = false;
|
||||
}
|
||||
#else
|
||||
model0001cebc(&renderdata, &hand->gunmodel);
|
||||
modelSetMatricesWithAnim(&renderdata, &hand->gunmodel);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -7867,7 +7867,7 @@ void bgun0f0a5550(s32 handnum)
|
|||
node = modelGetPart(modeldef, MODELPART_PISTOL_0033);
|
||||
|
||||
if (node) {
|
||||
sp80 = model0001a524(node, 0);
|
||||
sp80 = modelFindNodeMtxIndex(node, 0);
|
||||
|
||||
bgunUpdateSlide(handnum);
|
||||
|
||||
|
@ -7920,7 +7920,7 @@ void bgun0f0a5550(s32 handnum)
|
|||
}
|
||||
|
||||
if (node) {
|
||||
sp6c = model0001a524(node, 0);
|
||||
sp6c = modelFindNodeMtxIndex(node, 0);
|
||||
|
||||
mtx = (Mtxf *)mtxallocation;
|
||||
mtx += sp6c;
|
||||
|
@ -7942,7 +7942,7 @@ void bgun0f0a5550(s32 handnum)
|
|||
|| weaponnum == WEAPON_REMOTEMINE
|
||||
|| weaponnum == WEAPON_PROXIMITYMINE
|
||||
|| weaponnum == WEAPON_NBOMB) {
|
||||
sp6c = model0001a524(modelGetPart(modeldef, 0x37), 0);
|
||||
sp6c = modelFindNodeMtxIndex(modelGetPart(modeldef, 0x37), 0);
|
||||
|
||||
mtx = (Mtxf *)mtxallocation;
|
||||
mtx += sp6c;
|
||||
|
@ -9036,7 +9036,7 @@ glabel var7f1aca90
|
|||
/* f0a7b5c: 26050534 */ addiu $a1,$s0,0x534
|
||||
/* f0a7b60: 00a02025 */ or $a0,$a1,$zero
|
||||
/* f0a7b64: ae0e0540 */ sw $t6,0x540($s0)
|
||||
/* f0a7b68: 0c007308 */ jal model0001cc20
|
||||
/* f0a7b68: 0c007308 */ jal modelUpdateRelations
|
||||
/* f0a7b6c: afa50054 */ sw $a1,0x54($sp)
|
||||
/* f0a7b70: 8fa50054 */ lw $a1,0x54($sp)
|
||||
/* f0a7b74: afb50140 */ sw $s5,0x140($sp)
|
||||
|
@ -9877,7 +9877,7 @@ glabel var7f1aca90
|
|||
/* f0a7b5c: 26050534 */ addiu $a1,$s0,0x534
|
||||
/* f0a7b60: 00a02025 */ or $a0,$a1,$zero
|
||||
/* f0a7b64: ae0e0540 */ sw $t6,0x540($s0)
|
||||
/* f0a7b68: 0c007308 */ jal model0001cc20
|
||||
/* f0a7b68: 0c007308 */ jal modelUpdateRelations
|
||||
/* f0a7b6c: afa50054 */ sw $a1,0x54($sp)
|
||||
/* f0a7b70: 8fa50054 */ lw $a1,0x54($sp)
|
||||
/* f0a7b74: afb50140 */ sw $s5,0x140($sp)
|
||||
|
@ -10709,7 +10709,7 @@ glabel var7f1aca90
|
|||
/* f0a5888: 26050534 */ addiu $a1,$s0,0x534
|
||||
/* f0a588c: 00a02025 */ or $a0,$a1,$zero
|
||||
/* f0a5890: ae0f0540 */ sw $t7,0x540($s0)
|
||||
/* f0a5894: 0c007728 */ jal model0001cc20
|
||||
/* f0a5894: 0c007728 */ jal modelUpdateRelations
|
||||
/* f0a5898: afa50050 */ sw $a1,0x50($sp)
|
||||
/* f0a589c: 8fa50050 */ lw $a1,0x50($sp)
|
||||
/* f0a58a0: afb50138 */ sw $s5,0x138($sp)
|
||||
|
@ -11061,7 +11061,7 @@ void bgunRender(Gfx **gdlptr)
|
|||
|
||||
hand->handmodel.matrices = hand->gunmodel.matrices;
|
||||
|
||||
model0001cc20(&hand->handmodel);
|
||||
modelUpdateRelations(&hand->handmodel);
|
||||
|
||||
renderdata.envcolour = colour;
|
||||
modelRender(&renderdata, &hand->handmodel);
|
||||
|
|
|
@ -144,19 +144,19 @@ void bheadUpdate(f32 arg0, f32 arg1)
|
|||
struct modelrenderdata sp80 = {NULL, 1, 3};
|
||||
Mtxf sp40;
|
||||
struct coord modelpos = {0, 0, 0};
|
||||
bool somebool = model0001e2a8();
|
||||
bool mergeenabled = modelIsAnimMergingEnabled();
|
||||
|
||||
g_Vars.currentplayer->resetheadtick = false;
|
||||
|
||||
model0001e29c(false);
|
||||
model0001ee18(&g_Vars.currentplayer->model, g_Vars.lvupdate240, true);
|
||||
model0001e29c(somebool);
|
||||
model0001b3bc(&g_Vars.currentplayer->model);
|
||||
modelSetAnimMergingEnabled(false);
|
||||
modelTickAnimQuarterSpeed(&g_Vars.currentplayer->model, g_Vars.lvupdate240, true);
|
||||
modelSetAnimMergingEnabled(mergeenabled);
|
||||
modelUpdateInfo(&g_Vars.currentplayer->model);
|
||||
mtx4LoadIdentity(&sp40);
|
||||
|
||||
sp80.unk00 = &sp40;
|
||||
sp80.unk10 = g_Vars.currentplayer->bondheadmatrices;
|
||||
model0001cebc(&sp80, &g_Vars.currentplayer->model);
|
||||
modelSetMatricesWithAnim(&sp80, &g_Vars.currentplayer->model);
|
||||
|
||||
g_Vars.currentplayer->headbodyoffset.x = g_Vars.currentplayer->standbodyoffset.x;
|
||||
g_Vars.currentplayer->headbodyoffset.y = g_Vars.currentplayer->standbodyoffset.y;
|
||||
|
|
|
@ -99,11 +99,11 @@ void bheadReset(void)
|
|||
|
||||
modelSetAnimation(&g_Vars.currentplayer->model, 1, 0, 0, 0.5f, 0);
|
||||
|
||||
model0001b3bc(&g_Vars.currentplayer->model);
|
||||
modelUpdateInfo(&g_Vars.currentplayer->model);
|
||||
mtx4LoadIdentity(&sp48);
|
||||
sp88.unk00 = &sp48;
|
||||
sp88.unk10 = g_Vars.currentplayer->bondheadmatrices;
|
||||
model0001cebc(&sp88, &g_Vars.currentplayer->model);
|
||||
modelSetMatricesWithAnim(&sp88, &g_Vars.currentplayer->model);
|
||||
|
||||
g_Vars.currentplayer->standheight = g_Vars.currentplayer->bondheadmatrices[0].m[3][1];
|
||||
|
||||
|
|
|
@ -245,10 +245,10 @@ void botSpawn(struct chrdata *chr, u8 respawning)
|
|||
thing = scenarioChooseSpawnLocation(chr->radius, &pos, rooms, chr->prop);
|
||||
chr->hidden |= CHRHFLAG_00100000;
|
||||
chrMoveToPos(chr, &pos, rooms, thing, true);
|
||||
chr->aibot->unk0a4 = model0001ae44(chr->model);
|
||||
chr->aibot->unk0a4 = modelGetChrRotY(chr->model);
|
||||
chr->aibot->angleoffset = 0;
|
||||
chr->aibot->speedtheta = 0;
|
||||
chr->aibot->unk0b0 = model0001ae44(chr->model);
|
||||
chr->aibot->unk0b0 = modelGetChrRotY(chr->model);
|
||||
chr->aibot->unk0b4 = 0;
|
||||
chr->aibot->unk0b8 = 0;
|
||||
func0f02e9a0(chr, 0);
|
||||
|
@ -751,7 +751,7 @@ bool botApplyMovement(struct chrdata *chr)
|
|||
angle2 -= M_BADTAU;
|
||||
}
|
||||
|
||||
model0001ae90(chr->model, angle2);
|
||||
modelSetChrRotY(chr->model, angle2);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -201,10 +201,10 @@ void botmgrAllocateBot(s32 chrnum, s32 aibotnum)
|
|||
aibot->reaperspeed[HAND_RIGHT] = 0;
|
||||
aibot->maulercharge[HAND_LEFT] = 0.0f;
|
||||
aibot->maulercharge[HAND_RIGHT] = 0.0f;
|
||||
aibot->unk0a4 = model0001ae44(chr->model);
|
||||
aibot->unk0a4 = modelGetChrRotY(chr->model);
|
||||
aibot->angleoffset = 0.0f;
|
||||
aibot->speedtheta = 0.0f;
|
||||
aibot->unk0b0 = model0001ae44(chr->model);
|
||||
aibot->unk0b0 = modelGetChrRotY(chr->model);
|
||||
|
||||
aibot->unk0b4 = 0.0f;
|
||||
aibot->unk0b8 = 0.0f;
|
||||
|
|
240
src/game/chr.c
240
src/game/chr.c
|
@ -1907,7 +1907,7 @@ void chr0f0220ac(struct chrdata *chr)
|
|||
propRegisterRooms(chr->prop);
|
||||
}
|
||||
|
||||
void chr0f0220ec(struct chrdata *chr, s32 arg1, s32 arg2)
|
||||
void chr0f0220ec(struct chrdata *chr, s32 lvupdate240, bool arg2)
|
||||
{
|
||||
struct model *model = chr->model;
|
||||
|
||||
|
@ -1918,9 +1918,9 @@ void chr0f0220ec(struct chrdata *chr, s32 arg1, s32 arg2)
|
|||
|
||||
if (model->anim
|
||||
&& (g_Anims[model->anim->animnum].flags & ANIMFLAG_02)
|
||||
&& arg1 > 0
|
||||
&& lvupdate240 > 0
|
||||
&& g_Vars.cutsceneskip60ths > 0) {
|
||||
arg1 += g_Vars.cutsceneskip60ths * 4;
|
||||
lvupdate240 += g_Vars.cutsceneskip60ths * 4;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1929,11 +1929,11 @@ void chr0f0220ec(struct chrdata *chr, s32 arg1, s32 arg2)
|
|||
} else if (arg2) {
|
||||
if ((chr->hidden & CHRHFLAG_00000800) == 0) {
|
||||
modelGetRootPosition(model, &chr->prevpos);
|
||||
model0001ee18(model, arg1, 1);
|
||||
model0001b3bc(model);
|
||||
modelTickAnimQuarterSpeed(model, lvupdate240, true);
|
||||
modelUpdateInfo(model);
|
||||
}
|
||||
} else {
|
||||
model0001ee18(model, arg1, 0);
|
||||
modelTickAnimQuarterSpeed(model, lvupdate240, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1952,7 +1952,7 @@ void chr0f022214(struct chrdata *chr, struct prop *prop, bool fulltick)
|
|||
if (model->attachedtomodel && model->attachedtonode
|
||||
&& (obj->hidden & OBJHFLAG_00000800) == 0
|
||||
&& (obj->flags2 & OBJFLAG2_INVISIBLE) == 0) {
|
||||
Mtxf *sp104 = model0001a5cc(model->attachedtomodel, model->attachedtonode, 0);
|
||||
Mtxf *sp104 = modelFindNodeMtx(model->attachedtomodel, model->attachedtonode, 0);
|
||||
struct modelrenderdata thing = {NULL, 1, 3};
|
||||
u32 stack;
|
||||
Mtxf sp80;
|
||||
|
@ -1980,7 +1980,7 @@ void chr0f022214(struct chrdata *chr, struct prop *prop, bool fulltick)
|
|||
}
|
||||
|
||||
thing.unk10 = gfxAllocate(model->filedata->nummatrices * sizeof(Mtxf));
|
||||
model0001ce64(&thing, model);
|
||||
modelSetMatrices(&thing, model);
|
||||
|
||||
func0f07063c(prop, fulltick);
|
||||
|
||||
|
@ -2454,11 +2454,11 @@ s32 chrTick(struct prop *prop)
|
|||
if (eyespy == g_Vars.currentplayer->eyespy && eyespy->active) {
|
||||
onscreen = false;
|
||||
} else {
|
||||
onscreen = func0f08e8ac(prop, &prop->pos, model0001af80(model), true);
|
||||
onscreen = func0f08e8ac(prop, &prop->pos, modelGetEffectiveScale(model), true);
|
||||
}
|
||||
|
||||
if (fulltick) {
|
||||
chr0f0220ec(chr, lvupdate240, 1);
|
||||
chr0f0220ec(chr, lvupdate240, true);
|
||||
}
|
||||
} else {
|
||||
onscreen = false;
|
||||
|
@ -2477,9 +2477,9 @@ s32 chrTick(struct prop *prop)
|
|||
model->anim->average = false;
|
||||
|
||||
if (chr->actiontype == ACT_ANIM && !chr->act_anim.movewheninvis && chr->act_anim.lockpos) {
|
||||
chr0f0220ec(chr, lvupdate240, 0);
|
||||
chr0f0220ec(chr, lvupdate240, false);
|
||||
} else {
|
||||
chr0f0220ec(chr, lvupdate240, 1);
|
||||
chr0f0220ec(chr, lvupdate240, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2499,19 +2499,19 @@ s32 chrTick(struct prop *prop)
|
|||
} else if (chr->actiontype == ACT_PATROL || chr->actiontype == ACT_GOPOS) {
|
||||
if ((chr->actiontype == ACT_PATROL && chr->act_patrol.waydata.mode == WAYMODE_MAGIC)
|
||||
|| (chr->actiontype == ACT_GOPOS && chr->act_gopos.waydata.mode == WAYMODE_MAGIC)) {
|
||||
onscreen = func0f08e8ac(prop, &prop->pos, model0001af80(model), true);
|
||||
onscreen = func0f08e8ac(prop, &prop->pos, modelGetEffectiveScale(model), true);
|
||||
|
||||
if (onscreen) {
|
||||
model->anim->average = false;
|
||||
modelGetRootPosition(model, &chr->prevpos);
|
||||
model0001b3bc(model);
|
||||
modelUpdateInfo(model);
|
||||
}
|
||||
} else {
|
||||
if (fulltick) {
|
||||
chr0f0220ec(chr, lvupdate240, 1);
|
||||
chr0f0220ec(chr, lvupdate240, true);
|
||||
}
|
||||
|
||||
onscreen = func0f08e8ac(prop, &prop->pos, model0001af80(model), true);
|
||||
onscreen = func0f08e8ac(prop, &prop->pos, modelGetEffectiveScale(model), true);
|
||||
|
||||
if (onscreen) {
|
||||
if (chr->actiontype == ACT_PATROL) {
|
||||
|
@ -2525,63 +2525,63 @@ s32 chrTick(struct prop *prop)
|
|||
&& !((prop->flags & (PROPFLAG_ONANYSCREENTHISTICK | PROPFLAG_ONANYSCREENPREVTICK)) != 0);
|
||||
}
|
||||
} else if (chr->actiontype == ACT_ANIM && !chr->act_anim.movewheninvis) {
|
||||
onscreen = func0f08e8ac(prop, &prop->pos, model0001af80(model), true);
|
||||
onscreen = func0f08e8ac(prop, &prop->pos, modelGetEffectiveScale(model), true);
|
||||
|
||||
if (fulltick) {
|
||||
model->anim->average = false;
|
||||
|
||||
if (onscreen && !chr->act_anim.lockpos) {
|
||||
chr0f0220ec(chr, lvupdate240, 1);
|
||||
chr0f0220ec(chr, lvupdate240, true);
|
||||
} else {
|
||||
chr0f0220ec(chr, lvupdate240, 0);
|
||||
chr0f0220ec(chr, lvupdate240, false);
|
||||
}
|
||||
}
|
||||
} else if (chr->actiontype == ACT_STAND) {
|
||||
model->anim->average = false;
|
||||
|
||||
if (chr->chrflags & CHRCFLAG_00000001) {
|
||||
chr0f0220ec(chr, lvupdate240, 1);
|
||||
onscreen = func0f08e8ac(prop, &prop->pos, model0001af80(model), true);
|
||||
chr0f0220ec(chr, lvupdate240, true);
|
||||
onscreen = func0f08e8ac(prop, &prop->pos, modelGetEffectiveScale(model), true);
|
||||
} else {
|
||||
onscreen = func0f08e8ac(prop, &prop->pos, model0001af80(model), true);
|
||||
onscreen = func0f08e8ac(prop, &prop->pos, modelGetEffectiveScale(model), true);
|
||||
|
||||
if (g_Vars.mplayerisrunning) {
|
||||
if (fulltick) {
|
||||
if (g_Vars.coopplayernum >= 0 || g_Vars.antiplayernum >= 0) {
|
||||
if (onscreen) {
|
||||
chr0f0220ec(chr, lvupdate240, 1);
|
||||
chr0f0220ec(chr, lvupdate240, true);
|
||||
} else if (model->anim->animnum2 != 0) {
|
||||
chr0f0220ec(chr, lvupdate240, 0);
|
||||
chr0f0220ec(chr, lvupdate240, false);
|
||||
}
|
||||
} else {
|
||||
chr0f0220ec(chr, lvupdate240, 1);
|
||||
chr0f0220ec(chr, lvupdate240, true);
|
||||
}
|
||||
}
|
||||
} else if (onscreen) {
|
||||
if (chr->act_stand.playwalkanim == true) {
|
||||
chr0f0220ec(chr, lvupdate240, 0);
|
||||
chr0f0220ec(chr, lvupdate240, false);
|
||||
} else {
|
||||
chr0f0220ec(chr, lvupdate240, 1);
|
||||
chr0f0220ec(chr, lvupdate240, true);
|
||||
}
|
||||
} else if (model->anim->animnum2 != 0) {
|
||||
chr0f0220ec(chr, lvupdate240, 0);
|
||||
chr0f0220ec(chr, lvupdate240, false);
|
||||
}
|
||||
}
|
||||
} else if (chr->actiontype == ACT_DEAD) {
|
||||
onscreen = func0f08e8ac(prop, &prop->pos, model0001af80(model), true);
|
||||
onscreen = func0f08e8ac(prop, &prop->pos, modelGetEffectiveScale(model), true);
|
||||
} else if (prop->type == PROPTYPE_PLAYER
|
||||
&& (g_Vars.mplayerisrunning
|
||||
|| (player = g_Vars.players[playermgrGetPlayerNumByProp(prop)], player->cameramode == CAMERAMODE_EYESPY)
|
||||
|| (player->cameramode == CAMERAMODE_THIRDPERSON && player->visionmode == VISIONMODE_SLAYERROCKET))) {
|
||||
model->anim->average = false;
|
||||
chr0f0220ec(chr, lvupdate240, 1);
|
||||
onscreen = func0f08e8ac(prop, &prop->pos, model0001af80(model), true);
|
||||
chr0f0220ec(chr, lvupdate240, true);
|
||||
onscreen = func0f08e8ac(prop, &prop->pos, modelGetEffectiveScale(model), true);
|
||||
} else {
|
||||
offscreen2 = false;
|
||||
|
||||
if (fulltick) {
|
||||
model->anim->average = false;
|
||||
chr0f0220ec(chr, lvupdate240, 1);
|
||||
chr0f0220ec(chr, lvupdate240, true);
|
||||
}
|
||||
|
||||
if (chr->model && chr->model->anim && (g_Anims[chr->model->anim->animnum].flags & ANIMFLAG_04)) {
|
||||
|
@ -2594,7 +2594,7 @@ s32 chrTick(struct prop *prop)
|
|||
if (offscreen2) {
|
||||
onscreen = false;
|
||||
} else {
|
||||
onscreen = func0f08e8ac(prop, &prop->pos, model0001af80(model), true);
|
||||
onscreen = func0f08e8ac(prop, &prop->pos, modelGetEffectiveScale(model), true);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2758,7 +2758,7 @@ s32 chrTick(struct prop *prop)
|
|||
}
|
||||
}
|
||||
|
||||
model0001cebc(&sp210, model);
|
||||
modelSetMatricesWithAnim(&sp210, model);
|
||||
|
||||
if (restore) {
|
||||
anim->frac = prevfrac;
|
||||
|
@ -2774,7 +2774,7 @@ s32 chrTick(struct prop *prop)
|
|||
colourTween(chr->shadecol, chr->nextcol);
|
||||
}
|
||||
|
||||
prop->z = model0001a9e8(model);
|
||||
prop->z = modelGetScreenDistance(model);
|
||||
child = prop->child;
|
||||
|
||||
while (child) {
|
||||
|
@ -2827,8 +2827,8 @@ s32 chrTick(struct prop *prop)
|
|||
if (headspotnode && headspotnode->type == MODELNODETYPE_HEADSPOT) {
|
||||
union modelrwdata *rwdata = modelGetNodeRwData(model, headspotnode);
|
||||
|
||||
if (rwdata->headspot.modelfiledata != NULL) {
|
||||
struct modelnode *hatnode = modelGetPart(rwdata->headspot.modelfiledata, MODELPART_HEAD_HAT);
|
||||
if (rwdata->headspot.headmodeldef != NULL) {
|
||||
struct modelnode *hatnode = modelGetPart(rwdata->headspot.headmodeldef, MODELPART_HEAD_HAT);
|
||||
|
||||
if (hatnode != NULL) {
|
||||
union modelrwdata *hatrwdata = modelGetNodeRwData(model, hatnode);
|
||||
|
@ -2901,8 +2901,8 @@ void chrSetHudpieceVisible(struct chrdata *chr, bool visible)
|
|||
if (headspotnode && headspotnode->type == MODELNODETYPE_HEADSPOT) {
|
||||
union modelrwdata *rwdata = modelGetNodeRwData(chr->model, headspotnode);
|
||||
|
||||
if (rwdata->headspot.modelfiledata) {
|
||||
struct modelnode *hudpiecenode = modelGetPart(rwdata->headspot.modelfiledata, MODELPART_HEAD_HUDPIECE);
|
||||
if (rwdata->headspot.headmodeldef) {
|
||||
struct modelnode *hudpiecenode = modelGetPart(rwdata->headspot.headmodeldef, MODELPART_HEAD_HUDPIECE);
|
||||
|
||||
if (hudpiecenode) {
|
||||
union modelrwdata *rwdata2 = modelGetNodeRwData(chr->model, hudpiecenode);
|
||||
|
@ -3094,7 +3094,7 @@ bool chr0f024b18(struct model *model, struct modelnode *node)
|
|||
|
||||
if (bboxnode) {
|
||||
bbox = &bboxnode->rodata->bbox;
|
||||
mtx = model0001a5cc(model, node, 0);
|
||||
mtx = modelFindNodeMtx(model, node, 0);
|
||||
|
||||
for (i = 0; i < var80062964; i++) {
|
||||
if (var80062960[i].unk004) {
|
||||
|
@ -3365,7 +3365,7 @@ Gfx *chrRender(struct prop *prop, Gfx *gdl, bool xlupass)
|
|||
|
||||
chrGetBloodColour(chr->bodynum, spec, NULL);
|
||||
chr0f0246e4(spec);
|
||||
alpha *= func0f08e6bc(prop, model0001af80(model));
|
||||
alpha *= func0f08e6bc(prop, modelGetEffectiveScale(model));
|
||||
|
||||
if (g_Vars.currentplayer->visionmode == VISIONMODE_XRAY) {
|
||||
f32 fadedist;
|
||||
|
@ -3516,9 +3516,9 @@ Gfx *chrRender(struct prop *prop, Gfx *gdl, bool xlupass)
|
|||
if (headspotnode && headspotnode->type == MODELNODETYPE_HEADSPOT) {
|
||||
union modelrwdata *headrwdata = modelGetNodeRwData(model, headspotnode);
|
||||
|
||||
if (headrwdata->headspot.modelfiledata) {
|
||||
struct modelnode *node1 = modelGetPart(headrwdata->headspot.modelfiledata, MODELPART_HEAD_EYESOPEN);
|
||||
struct modelnode *node2 = modelGetPart(headrwdata->headspot.modelfiledata, MODELPART_HEAD_EYESCLOSED);
|
||||
if (headrwdata->headspot.headmodeldef) {
|
||||
struct modelnode *node1 = modelGetPart(headrwdata->headspot.headmodeldef, MODELPART_HEAD_EYESOPEN);
|
||||
struct modelnode *node2 = modelGetPart(headrwdata->headspot.headmodeldef, MODELPART_HEAD_EYESCLOSED);
|
||||
|
||||
if (node1 && node2) {
|
||||
union modelrwdata *data1 = modelGetNodeRwData(model, node1);
|
||||
|
@ -3703,7 +3703,7 @@ glabel chr0f0260c4
|
|||
/* f026120: 25cf0014 */ addiu $t7,$t6,0x14
|
||||
/* f026124: afaf00cc */ sw $t7,0xcc($sp)
|
||||
/* f026128: afa000c0 */ sw $zero,0xc0($sp)
|
||||
/* f02612c: 0c0069d0 */ jal model0001a740
|
||||
/* f02612c: 0c0069d0 */ jal modelNodeFindMtxNode
|
||||
/* f026130: 02602025 */ or $a0,$s3,$zero
|
||||
/* f026134: 8fa40128 */ lw $a0,0x128($sp)
|
||||
/* f026138: 00402825 */ or $a1,$v0,$zero
|
||||
|
@ -3865,7 +3865,7 @@ glabel chr0f0260c4
|
|||
/* f026380: 3c0100ff */ lui $at,0xff
|
||||
/* f026384: 3421ffff */ ori $at,$at,0xffff
|
||||
/* f026388: 0041c824 */ and $t9,$v0,$at
|
||||
/* f02638c: 0c00698d */ jal model0001a634
|
||||
/* f02638c: 0c00698d */ jal modelFindNodeByMtxIndex
|
||||
/* f026390: 00192982 */ srl $a1,$t9,0x6
|
||||
/* f026394: afa20100 */ sw $v0,0x100($sp)
|
||||
/* f026398: 8fa40128 */ lw $a0,0x128($sp)
|
||||
|
@ -3895,19 +3895,19 @@ glabel chr0f0260c4
|
|||
/* f0263f4: 1000ff91 */ b .L0f02623c
|
||||
/* f0263f8: 27de0008 */ addiu $s8,$s8,0x8
|
||||
.L0f0263fc:
|
||||
/* f0263fc: 0c0071e1 */ jal model0001c784
|
||||
/* f0263fc: 0c0071e1 */ jal modelApplyDistanceRelations
|
||||
/* f026400: afa50110 */ sw $a1,0x110($sp)
|
||||
/* f026404: 8fa50110 */ lw $a1,0x110($sp)
|
||||
/* f026408: 1000000a */ b .L0f026434
|
||||
/* f02640c: 8ca20014 */ lw $v0,0x14($a1)
|
||||
.L0f026410:
|
||||
/* f026410: 0c0071f4 */ jal model0001c7d0
|
||||
/* f026410: 0c0071f4 */ jal modelApplyToggleRelations
|
||||
/* f026414: afa50110 */ sw $a1,0x110($sp)
|
||||
/* f026418: 8fa50110 */ lw $a1,0x110($sp)
|
||||
/* f02641c: 10000005 */ b .L0f026434
|
||||
/* f026420: 8ca20014 */ lw $v0,0x14($a1)
|
||||
.L0f026424:
|
||||
/* f026424: 0c007207 */ jal modelAttachHead
|
||||
/* f026424: 0c007207 */ jal modelApplyHeadRelations
|
||||
/* f026428: afa50110 */ sw $a1,0x110($sp)
|
||||
/* f02642c: 8fa50110 */ lw $a1,0x110($sp)
|
||||
/* f026430: 8ca20014 */ lw $v0,0x14($a1)
|
||||
|
@ -4159,7 +4159,7 @@ glabel chr0f0260c4
|
|||
/* f0267a8: 3c0100ff */ lui $at,0xff
|
||||
/* f0267ac: 3421ffff */ ori $at,$at,0xffff
|
||||
/* f0267b0: 00417024 */ and $t6,$v0,$at
|
||||
/* f0267b4: 0c00698d */ jal model0001a634
|
||||
/* f0267b4: 0c00698d */ jal modelFindNodeByMtxIndex
|
||||
/* f0267b8: 000e2982 */ srl $a1,$t6,0x6
|
||||
/* f0267bc: afa20100 */ sw $v0,0x100($sp)
|
||||
/* f0267c0: 8fa40128 */ lw $a0,0x128($sp)
|
||||
|
@ -4181,21 +4181,21 @@ glabel chr0f0260c4
|
|||
/* f0267f8: 1000ff5b */ b .L0f026568
|
||||
/* f0267fc: 27de0008 */ addiu $s8,$s8,0x8
|
||||
.L0f026800:
|
||||
/* f026800: 0c0071e1 */ jal model0001c784
|
||||
/* f026800: 0c0071e1 */ jal modelApplyDistanceRelations
|
||||
/* f026804: afa50110 */ sw $a1,0x110($sp)
|
||||
/* f026808: 8fa50110 */ lw $a1,0x110($sp)
|
||||
/* f02680c: 8fa40128 */ lw $a0,0x128($sp)
|
||||
/* f026810: 1000000c */ b .L0f026844
|
||||
/* f026814: 8ca20014 */ lw $v0,0x14($a1)
|
||||
.L0f026818:
|
||||
/* f026818: 0c0071f4 */ jal model0001c7d0
|
||||
/* f026818: 0c0071f4 */ jal modelApplyToggleRelations
|
||||
/* f02681c: afa50110 */ sw $a1,0x110($sp)
|
||||
/* f026820: 8fa50110 */ lw $a1,0x110($sp)
|
||||
/* f026824: 8fa40128 */ lw $a0,0x128($sp)
|
||||
/* f026828: 10000006 */ b .L0f026844
|
||||
/* f02682c: 8ca20014 */ lw $v0,0x14($a1)
|
||||
.L0f026830:
|
||||
/* f026830: 0c007207 */ jal modelAttachHead
|
||||
/* f026830: 0c007207 */ jal modelApplyHeadRelations
|
||||
/* f026834: afa50110 */ sw $a1,0x110($sp)
|
||||
/* f026838: 8fa50110 */ lw $a1,0x110($sp)
|
||||
/* f02683c: 8fa40128 */ lw $a0,0x128($sp)
|
||||
|
@ -4263,7 +4263,7 @@ void chr0f0260c4(struct model *model, s32 hitpart, struct modelnode *node, struc
|
|||
s32 op;
|
||||
s32 nodetype;
|
||||
|
||||
modelNodeGetModelRelativePosition(model, model0001a740(node), &relpos);
|
||||
modelNodeGetModelRelativePosition(model, modelNodeFindMtxNode(node), &relpos);
|
||||
|
||||
spc8.f[0] = arg3->x - relpos.x;
|
||||
spc8.f[1] = arg3->y - relpos.y;
|
||||
|
@ -4288,14 +4288,14 @@ void chr0f0260c4(struct model *model, s32 hitpart, struct modelnode *node, struc
|
|||
// one in the model definition. If it hasn't been changed we'll
|
||||
// use the space... after the model definition's colour table?
|
||||
// Let's hope that's not being used by other instances...
|
||||
if (rwdata->gdl == rodata->primary) {
|
||||
gdlptr = (Gfx *)((u32)rodata->colourtable + ((u32)rodata->primary & 0xffffff));
|
||||
if (rwdata->gdl == rodata->opagdl) {
|
||||
gdlptr = (Gfx *)((u32)rodata->colourtable + ((u32)rodata->opagdl & 0xffffff));
|
||||
} else {
|
||||
gdlptr = rwdata->gdl;
|
||||
}
|
||||
|
||||
if (rodata->secondary) {
|
||||
gdlptr2 = (Gfx *)((u32)rodata->colourtable + ((u32)rodata->secondary & 0xffffff));
|
||||
if (rodata->xlugdl) {
|
||||
gdlptr2 = (Gfx *)((u32)rodata->colourtable + ((u32)rodata->xlugdl & 0xffffff));
|
||||
} else {
|
||||
gdlptr2 = NULL;
|
||||
}
|
||||
|
@ -4344,7 +4344,7 @@ void chr0f0260c4(struct model *model, s32 hitpart, struct modelnode *node, struc
|
|||
}
|
||||
} else if (op == G_MTX) {
|
||||
u32 addr = gdlptr->words.w1 & 0xffffff;
|
||||
posnode = model0001a634(model, addr / sizeof(Mtxf));
|
||||
posnode = modelFindNodeByMtxIndex(model, addr / sizeof(Mtxf));
|
||||
modelNodeGetModelRelativePosition(model, posnode, &spd4);
|
||||
|
||||
spbc[0] = spd4.x + spc8.x;
|
||||
|
@ -4357,13 +4357,13 @@ void chr0f0260c4(struct model *model, s32 hitpart, struct modelnode *node, struc
|
|||
}
|
||||
break;
|
||||
case MODELNODETYPE_DISTANCE:
|
||||
model0001c784(model, curnode);
|
||||
modelApplyDistanceRelations(model, curnode);
|
||||
break;
|
||||
case MODELNODETYPE_TOGGLE:
|
||||
model0001c7d0(model, curnode);
|
||||
modelApplyToggleRelations(model, curnode);
|
||||
break;
|
||||
case MODELNODETYPE_HEADSPOT:
|
||||
modelAttachHead(model, curnode);
|
||||
modelApplyHeadRelations(model, curnode);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -4407,14 +4407,14 @@ void chr0f0260c4(struct model *model, s32 hitpart, struct modelnode *node, struc
|
|||
break;
|
||||
}
|
||||
|
||||
if (rwdata->gdl == rodata->primary) {
|
||||
gdlptr = (Gfx *)((u32)rodata->colourtable + ((u32)rodata->primary & 0xffffff));
|
||||
if (rwdata->gdl == rodata->opagdl) {
|
||||
gdlptr = (Gfx *)((u32)rodata->colourtable + ((u32)rodata->opagdl & 0xffffff));
|
||||
} else {
|
||||
gdlptr = rwdata->gdl;
|
||||
}
|
||||
|
||||
if (rodata->secondary) {
|
||||
gdlptr2 = (Gfx *)((u32)rodata->colourtable + ((u32)rodata->secondary & 0xffffff));
|
||||
if (rodata->xlugdl) {
|
||||
gdlptr2 = (Gfx *)((u32)rodata->colourtable + ((u32)rodata->xlugdl & 0xffffff));
|
||||
} else {
|
||||
gdlptr2 = NULL;
|
||||
}
|
||||
|
@ -4478,7 +4478,7 @@ void chr0f0260c4(struct model *model, s32 hitpart, struct modelnode *node, struc
|
|||
}
|
||||
} else if (op == G_MTX) {
|
||||
u32 addr = gdlptr->words.w1 & 0xffffff;
|
||||
posnode = model0001a634(model, addr / sizeof(Mtxf));
|
||||
posnode = modelFindNodeByMtxIndex(model, addr / sizeof(Mtxf));
|
||||
modelNodeGetModelRelativePosition(model, posnode, &spd4);
|
||||
} else if (op == G_SETCOLOR) {
|
||||
spac = gdlptr->words.w1 & 0xffffff;
|
||||
|
@ -4489,13 +4489,13 @@ void chr0f0260c4(struct model *model, s32 hitpart, struct modelnode *node, struc
|
|||
}
|
||||
break;
|
||||
case MODELNODETYPE_DISTANCE:
|
||||
model0001c784(model, curnode);
|
||||
modelApplyDistanceRelations(model, curnode);
|
||||
break;
|
||||
case MODELNODETYPE_TOGGLE:
|
||||
model0001c7d0(model, curnode);
|
||||
modelApplyToggleRelations(model, curnode);
|
||||
break;
|
||||
case MODELNODETYPE_HEADSPOT:
|
||||
modelAttachHead(model, curnode);
|
||||
modelApplyHeadRelations(model, curnode);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -4543,7 +4543,7 @@ void chrBruise(struct model *model, s32 hitpart, struct modelnode *node, struct
|
|||
struct modelrwdata_dl *rwdata;
|
||||
s32 spac = 0;
|
||||
|
||||
modelNodeGetModelRelativePosition(model, model0001a740(node), &relpos);
|
||||
modelNodeGetModelRelativePosition(model, modelNodeFindMtxNode(node), &relpos);
|
||||
|
||||
spc8.f[0] = arg3->f[0] - relpos.f[0];
|
||||
spc8.f[1] = arg3->f[1] - relpos.f[1];
|
||||
|
@ -4568,14 +4568,14 @@ void chrBruise(struct model *model, s32 hitpart, struct modelnode *node, struct
|
|||
// one in the model definition. If it hasn't been changed we'll
|
||||
// use the space... after the model definition's colour table?
|
||||
// Let's hope that's not being used by other instances...
|
||||
if (rwdata->gdl == rodata->primary) {
|
||||
gdlptr = (Gfx *)((u32)rodata->colourtable + ((u32)rodata->primary & 0xffffff));
|
||||
if (rwdata->gdl == rodata->opagdl) {
|
||||
gdlptr = (Gfx *)((u32)rodata->colourtable + ((u32)rodata->opagdl & 0xffffff));
|
||||
} else {
|
||||
gdlptr = rwdata->gdl;
|
||||
}
|
||||
|
||||
if (rodata->secondary) {
|
||||
gdlptr2 = (Gfx *)((u32)rodata->colourtable + ((u32)rodata->secondary & 0xffffff));
|
||||
if (rodata->xlugdl) {
|
||||
gdlptr2 = (Gfx *)((u32)rodata->colourtable + ((u32)rodata->xlugdl & 0xffffff));
|
||||
} else {
|
||||
gdlptr2 = NULL;
|
||||
}
|
||||
|
@ -4624,7 +4624,7 @@ void chrBruise(struct model *model, s32 hitpart, struct modelnode *node, struct
|
|||
}
|
||||
} else if (op == G_MTX) {
|
||||
u32 addr = gdlptr->words.w1 & 0xffffff;
|
||||
posnode = model0001a634(model, addr / sizeof(Mtxf));
|
||||
posnode = modelFindNodeByMtxIndex(model, addr / sizeof(Mtxf));
|
||||
modelNodeGetModelRelativePosition(model, posnode, &spd4);
|
||||
|
||||
spbc[0] = spd4.x + spc8.x;
|
||||
|
@ -4637,13 +4637,13 @@ void chrBruise(struct model *model, s32 hitpart, struct modelnode *node, struct
|
|||
}
|
||||
break;
|
||||
case MODELNODETYPE_DISTANCE:
|
||||
model0001c784(model, curnode);
|
||||
modelApplyDistanceRelations(model, curnode);
|
||||
break;
|
||||
case MODELNODETYPE_TOGGLE:
|
||||
model0001c7d0(model, curnode);
|
||||
modelApplyToggleRelations(model, curnode);
|
||||
break;
|
||||
case MODELNODETYPE_HEADSPOT:
|
||||
modelAttachHead(model, curnode);
|
||||
modelApplyHeadRelations(model, curnode);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -4706,14 +4706,14 @@ void chrBruise(struct model *model, s32 hitpart, struct modelnode *node, struct
|
|||
break;
|
||||
}
|
||||
|
||||
if (rwdata->gdl == rodata->primary) {
|
||||
gdlptr = (Gfx *)((u32)rodata->colourtable + ((u32)rodata->primary & 0xffffff));
|
||||
if (rwdata->gdl == rodata->opagdl) {
|
||||
gdlptr = (Gfx *)((u32)rodata->colourtable + ((u32)rodata->opagdl & 0xffffff));
|
||||
} else {
|
||||
gdlptr = rwdata->gdl;
|
||||
}
|
||||
|
||||
if (rodata->secondary) {
|
||||
gdlptr2 = (Gfx *)((u32)rodata->colourtable + ((u32)rodata->secondary & 0xffffff));
|
||||
if (rodata->xlugdl) {
|
||||
gdlptr2 = (Gfx *)((u32)rodata->colourtable + ((u32)rodata->xlugdl & 0xffffff));
|
||||
} else {
|
||||
gdlptr2 = NULL;
|
||||
}
|
||||
|
@ -4777,7 +4777,7 @@ void chrBruise(struct model *model, s32 hitpart, struct modelnode *node, struct
|
|||
}
|
||||
} else if (op == G_MTX) {
|
||||
u32 addr = gdlptr->words.w1 & 0xffffff;
|
||||
posnode = model0001a634(model, addr / sizeof(Mtxf));
|
||||
posnode = modelFindNodeByMtxIndex(model, addr / sizeof(Mtxf));
|
||||
modelNodeGetModelRelativePosition(model, posnode, &spd4);
|
||||
} else if (op == G_SETCOLOR) {
|
||||
spac = gdlptr->words.w1 & 0xffffff;
|
||||
|
@ -4789,13 +4789,13 @@ void chrBruise(struct model *model, s32 hitpart, struct modelnode *node, struct
|
|||
}
|
||||
break;
|
||||
case MODELNODETYPE_DISTANCE:
|
||||
model0001c784(model, curnode);
|
||||
modelApplyDistanceRelations(model, curnode);
|
||||
break;
|
||||
case MODELNODETYPE_TOGGLE:
|
||||
model0001c7d0(model, curnode);
|
||||
modelApplyToggleRelations(model, curnode);
|
||||
break;
|
||||
case MODELNODETYPE_HEADSPOT:
|
||||
modelAttachHead(model, curnode);
|
||||
modelApplyHeadRelations(model, curnode);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -4897,14 +4897,14 @@ void chrDisfigure(struct chrdata *chr, struct coord *exppos, f32 damageradius)
|
|||
// MTX and VTX pointers
|
||||
if (rwdata->vertices != rodata->vertices
|
||||
&& (u32)rwdata->colours != ALIGN8((u32)&rodata->vertices[rodata->numvertices])) {
|
||||
if (rwdata->gdl == rodata->primary) {
|
||||
gdlptr = (Gfx *)((u32)rodata->colourtable + ((s32)rodata->primary & 0xffffff));
|
||||
if (rwdata->gdl == rodata->opagdl) {
|
||||
gdlptr = (Gfx *)((u32)rodata->colourtable + ((s32)rodata->opagdl & 0xffffff));
|
||||
} else {
|
||||
gdlptr = rwdata->gdl;
|
||||
}
|
||||
|
||||
if (rodata->secondary) {
|
||||
gdlptr2 = (Gfx *)((u32)rodata->colourtable + ((s32)rodata->secondary & 0xffffff));
|
||||
if (rodata->xlugdl) {
|
||||
gdlptr2 = (Gfx *)((u32)rodata->colourtable + ((s32)rodata->xlugdl & 0xffffff));
|
||||
} else {
|
||||
gdlptr2 = NULL;
|
||||
}
|
||||
|
@ -4961,7 +4961,7 @@ void chrDisfigure(struct chrdata *chr, struct coord *exppos, f32 damageradius)
|
|||
} else if (op == G_MTX) {
|
||||
// Get the position of the node relative to the model
|
||||
u32 addr = gdlptr->words.w1 & 0xffffff;
|
||||
posnode = model0001a634(model, addr / sizeof(Mtxf));
|
||||
posnode = modelFindNodeByMtxIndex(model, addr / sizeof(Mtxf));
|
||||
modelNodeGetModelRelativePosition(model, posnode, &pos);
|
||||
}
|
||||
|
||||
|
@ -4986,13 +4986,13 @@ void chrDisfigure(struct chrdata *chr, struct coord *exppos, f32 damageradius)
|
|||
}
|
||||
break;
|
||||
case MODELNODETYPE_DISTANCE:
|
||||
model0001c784(model, node);
|
||||
modelApplyDistanceRelations(model, node);
|
||||
break;
|
||||
case MODELNODETYPE_TOGGLE:
|
||||
model0001c7d0(model, node);
|
||||
modelApplyToggleRelations(model, node);
|
||||
break;
|
||||
case MODELNODETYPE_HEADSPOT:
|
||||
modelAttachHead(model, node);
|
||||
modelApplyHeadRelations(model, node);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -5019,12 +5019,12 @@ f32 chr0f0278a4(struct chrdata *chr)
|
|||
f32 highest = 0;
|
||||
|
||||
if (chr->model) {
|
||||
result = model0001af80(chr->model);
|
||||
result = modelGetEffectiveScale(chr->model);
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
if (chr->weapons_held[i]) {
|
||||
struct defaultobj *obj = chr->weapons_held[i]->obj;
|
||||
f32 value = model0001af80(obj->model) * chr->model->scale;
|
||||
f32 value = modelGetEffectiveScale(obj->model) * chr->model->scale;
|
||||
|
||||
if (value > highest) {
|
||||
highest = value;
|
||||
|
@ -5055,13 +5055,13 @@ void chr0f027994(struct prop *prop, struct shotdata *shotdata, bool arg2, bool a
|
|||
|
||||
if (prop->z - fStack32 < shotdata->unk34) {
|
||||
struct model *model = chr->model;
|
||||
s32 spc0 = 0;
|
||||
s32 hitpart = 0;
|
||||
struct modelnode *node = NULL;
|
||||
s32 spb8 = 0;
|
||||
struct hitthing sp88;
|
||||
s32 sp84 = 0;
|
||||
struct modelnode *sp80 = NULL;
|
||||
Mtxf *iVar5 = model0001a60c(model);
|
||||
Mtxf *iVar5 = modelGetRootMtx(model);
|
||||
struct prop *next;
|
||||
struct prop *child;
|
||||
f32 sp70;
|
||||
|
@ -5070,10 +5070,10 @@ void chr0f027994(struct prop *prop, struct shotdata *shotdata, bool arg2, bool a
|
|||
|
||||
if (func0f06b39c(&shotdata->unk00, &shotdata->unk0c, (struct coord *)iVar5->m[3], fStack32)) {
|
||||
spb8 = 1;
|
||||
spc0 = 1;
|
||||
hitpart = 1;
|
||||
}
|
||||
|
||||
if (spc0) {
|
||||
if (hitpart) {
|
||||
if (chrGetShield(chr) > 0.0f) {
|
||||
var8005efc0 = 10.0f / model->scale;
|
||||
}
|
||||
|
@ -5087,9 +5087,9 @@ void chr0f027994(struct prop *prop, struct shotdata *shotdata, bool arg2, bool a
|
|||
}
|
||||
|
||||
if (arg3 || var8005efc0 > 0.0f) {
|
||||
spc0 = model000225d4(model, &shotdata->unk00, &shotdata->unk0c, &node);
|
||||
hitpart = modelTestForHit(model, &shotdata->unk00, &shotdata->unk0c, &node);
|
||||
|
||||
while (spc0 > 0) {
|
||||
while (hitpart > 0) {
|
||||
if (func0f084594(model, node, &shotdata->unk00, &shotdata->unk0c, &sp88, &sp84, &sp80)) {
|
||||
mtx4TransformVec(&model->matrices[sp84], &sp88.unk00, &spdc);
|
||||
mtx4TransformVecInPlace(camGetProjectionMtxF(), &spdc);
|
||||
|
@ -5098,18 +5098,18 @@ void chr0f027994(struct prop *prop, struct shotdata *shotdata, bool arg2, bool a
|
|||
break;
|
||||
}
|
||||
|
||||
spc0 = model000225d4(model, &shotdata->unk00, &shotdata->unk0c, &node);
|
||||
hitpart = modelTestForHit(model, &shotdata->unk00, &shotdata->unk0c, &node);
|
||||
}
|
||||
} else {
|
||||
spc0 = model000225d4(model, &shotdata->unk00, &shotdata->unk0c, &node);
|
||||
hitpart = modelTestForHit(model, &shotdata->unk00, &shotdata->unk0c, &node);
|
||||
|
||||
if (spc0 > 0) {
|
||||
if (hitpart > 0) {
|
||||
if (func0f06bea0(model, model->filedata->rootnode, model->filedata->rootnode, &shotdata->unk00,
|
||||
&shotdata->unk0c, &sp88.unk00, &sp70, &node, &spc0, &sp84, &sp80)) {
|
||||
&shotdata->unk0c, &sp88.unk00, &sp70, &node, &hitpart, &sp84, &sp80)) {
|
||||
mtx4TransformVec(camGetProjectionMtxF(), &sp88.unk00, &spdc);
|
||||
mtx4RotateVec(camGetProjectionMtxF(), &sp88.unk0c, &spd0);
|
||||
} else {
|
||||
spc0 = 0;
|
||||
hitpart = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5119,17 +5119,17 @@ void chr0f027994(struct prop *prop, struct shotdata *shotdata, bool arg2, bool a
|
|||
}
|
||||
}
|
||||
|
||||
if (spc0 > 0) {
|
||||
if (hitpart > 0) {
|
||||
mtx = camGetWorldToScreenMtxf();
|
||||
sp68 = spdc.x * mtx->m[0][2] + spdc.y * mtx->m[1][2] + spdc.z * mtx->m[2][2] + mtx->m[3][2];
|
||||
sp68 = -sp68;
|
||||
|
||||
if (sp68 < shotdata->unk34) {
|
||||
func0f061fa8(shotdata, prop, sp68, spc0, node, &sp88, sp84, sp80, model, 1, chrGetShield(chr) > 0.0f, &spdc, &spd0);
|
||||
func0f061fa8(shotdata, prop, sp68, hitpart, node, &sp88, sp84, sp80, model, 1, chrGetShield(chr) > 0.0f, &spdc, &spd0);
|
||||
}
|
||||
}
|
||||
|
||||
if (spb8 && spc0 <= 0 && prop->z <= shotdata->unk34 && arg2) {
|
||||
if (spb8 && hitpart <= 0 && prop->z <= shotdata->unk34 && arg2) {
|
||||
if (chrGetTargetProp(chr) == g_Vars.currentplayer->prop) {
|
||||
chr->chrflags |= CHRCFLAG_NEAR_MISS;
|
||||
}
|
||||
|
@ -5294,7 +5294,7 @@ void chrHit(struct shotdata *shotdata, struct hit *hit)
|
|||
// Shot a chr in the flesh
|
||||
s32 race = CHRRACE(chr);
|
||||
struct coord sp5c;
|
||||
Mtxf *sp58 = model0001a5cc(hit->model, hit->node, 0);
|
||||
Mtxf *sp58 = modelFindNodeMtx(hit->model, hit->node, 0);
|
||||
|
||||
// Create blood
|
||||
mtx0001719c(sp58->m, spb0.m);
|
||||
|
@ -5617,7 +5617,7 @@ bool chrCalculateAutoAim(struct prop *prop, struct coord *arg1, f32 *arg2, f32 *
|
|||
bool chr0f028d50(struct prop *arg0, struct prop *arg1, struct modelnode *node, struct model *model, s32 *total)
|
||||
{
|
||||
if (arg1 == arg0) {
|
||||
*total += model0001a524(node, 0);
|
||||
*total += modelFindNodeMtxIndex(node, 0);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -5673,7 +5673,7 @@ bool chr0f028e6c(s32 arg0, struct prop *prop, struct prop **propptr, struct mode
|
|||
}
|
||||
} else {
|
||||
*propptr = prop;
|
||||
*nodeptr = model0001a634(model, arg0);
|
||||
*nodeptr = modelFindNodeByMtxIndex(model, arg0);
|
||||
*modelptr = model;
|
||||
result = true;
|
||||
}
|
||||
|
@ -5830,7 +5830,7 @@ s32 chr0f02932c(struct prop *prop, s32 arg1)
|
|||
struct model *model;
|
||||
|
||||
if (chr0f028e6c(arg1, prop, &prop2, &node, &model) && node) {
|
||||
node2 = model0001a784(node);
|
||||
node2 = modelNodeFindParentMtxNode(node);
|
||||
|
||||
if (node2) {
|
||||
result = chr0f028e18(prop2, node2, model, prop);
|
||||
|
@ -5851,7 +5851,7 @@ s32 chr0f0293ec(struct prop *prop, s32 cmnum)
|
|||
struct model *model;
|
||||
|
||||
if (chr0f028e6c(cmnum, prop, &prop2, &node, &model) && node) {
|
||||
node2 = model0001a7cc(node);
|
||||
node2 = modelNodeFindChildMtxNode(node);
|
||||
|
||||
if (node2) {
|
||||
result = chr0f028e18(prop2, node2, model, prop);
|
||||
|
@ -5885,11 +5885,11 @@ s32 chr0f0294cc(struct prop *prop, s32 arg1)
|
|||
struct model *model2;
|
||||
|
||||
if (chr0f028e6c(arg1, prop, &prop2, &node2, &model2) && node2) {
|
||||
struct modelnode *node3 = model0001a85c(node2);
|
||||
struct modelnode *node3 = modelNodeFindChildOrParentMtxNode(node2);
|
||||
|
||||
if (node3) {
|
||||
result = chr0f028e18(prop2, node3, model2, prop);
|
||||
} else if (model0001a784(node2) == NULL && prop2->parent) {
|
||||
} else if (modelNodeFindParentMtxNode(node2) == NULL && prop2->parent) {
|
||||
child = prop2->parent->child;
|
||||
|
||||
while (child && child != prop2) {
|
||||
|
@ -6041,7 +6041,7 @@ Gfx *chrRenderShieldComponent(Gfx *gdl, struct shieldhit *hit, struct prop *prop
|
|||
shieldamount = (obj->flags3 & OBJFLAG3_SHOWSHIELD) ? 4.0f : 8.0f;
|
||||
}
|
||||
|
||||
mtxindex = model0001a524(node, 0);
|
||||
mtxindex = modelFindNodeMtxIndex(node, 0);
|
||||
modelmtx = &model->matrices[mtxindex];
|
||||
|
||||
xmin = bbox->xmin - gap;
|
||||
|
@ -6887,7 +6887,7 @@ Gfx *chrRenderCloak(Gfx *gdl, struct prop *chrprop, struct prop *thisprop)
|
|||
}
|
||||
|
||||
if (index <= 19) {
|
||||
Mtxf *mtx = model0001a5cc(model, model0001a740(node), 0);
|
||||
Mtxf *mtx = modelFindNodeMtx(model, modelNodeFindMtxNode(node), 0);
|
||||
s32 uls; // upper left s coordinate
|
||||
s32 ult; // upper left t coordinate
|
||||
struct coord coord;
|
||||
|
|
|
@ -8840,7 +8840,7 @@ f32 chrGetInverseTheta(struct chrdata *chr)
|
|||
return angle;
|
||||
}
|
||||
|
||||
return model0001ae44(chr->model);
|
||||
return modelGetChrRotY(chr->model);
|
||||
}
|
||||
|
||||
void chrSetLookAngle(struct chrdata *chr, f32 angle)
|
||||
|
@ -8848,7 +8848,7 @@ void chrSetLookAngle(struct chrdata *chr, f32 angle)
|
|||
if (chr->aibot) {
|
||||
chr->aibot->unk0b0 = angle;
|
||||
} else {
|
||||
model0001ae90(chr->model, angle);
|
||||
modelSetChrRotY(chr->model, angle);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -8858,7 +8858,7 @@ f32 func0f03e578(struct chrdata *chr)
|
|||
return chr->aibot->unk0a4;
|
||||
}
|
||||
|
||||
return model0001ae44(chr->model);
|
||||
return modelGetChrRotY(chr->model);
|
||||
}
|
||||
|
||||
void func0f03e5b0(struct chrdata *chr, f32 arg1)
|
||||
|
@ -8866,7 +8866,7 @@ void func0f03e5b0(struct chrdata *chr, f32 arg1)
|
|||
if (chr->aibot) {
|
||||
chr->aibot->unk0a4 = arg1;
|
||||
} else {
|
||||
model0001ae90(chr->model, arg1);
|
||||
modelSetChrRotY(chr->model, arg1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -9141,7 +9141,7 @@ bool func0f03e9f4(struct chrdata *chr, struct attackanimconfig *animcfg, bool fi
|
|||
burstnode = modelGetPart(gunmodel->filedata, MODELPART_CHRGUN_GUNFIRE);
|
||||
|
||||
if (burstnode) {
|
||||
sp108 = model0001a5cc(gunmodel, burstnode, 0);
|
||||
sp108 = modelFindNodeMtx(gunmodel, burstnode, 0);
|
||||
burstrodata = &burstnode->rodata->chrgunfire;
|
||||
spb4 = cam0f0b53a4((u8 *)sp108);
|
||||
|
||||
|
@ -9164,7 +9164,7 @@ bool func0f03e9f4(struct chrdata *chr, struct attackanimconfig *animcfg, bool fi
|
|||
posnode = modelGetPart(gunmodel->filedata, MODELPART_CHRGUN_0001);
|
||||
|
||||
if (posnode) {
|
||||
spb0 = model0001a5cc(gunmodel, posnode, 0);
|
||||
spb0 = modelFindNodeMtx(gunmodel, posnode, 0);
|
||||
sp6c = cam0f0b53a4((u8 *)spb0);
|
||||
|
||||
if (sp6c) {
|
||||
|
@ -9584,7 +9584,7 @@ bool chrGetGunPos(struct chrdata *chr, s32 handnum, struct coord *gunpos)
|
|||
|
||||
if ((chr->prop->flags & PROPFLAG_ONTHISSCREENTHISTICK) && (weaponprop->flags & PROPFLAG_ONTHISSCREENTHISTICK)) {
|
||||
if ((part0 = modelGetPart(model->filedata, MODELPART_0000))) {
|
||||
spac = model0001a5cc(model, part0, 0);
|
||||
spac = modelFindNodeMtx(model, part0, 0);
|
||||
rodata = &part0->rodata->chrgunfire;
|
||||
|
||||
gunpos->x = rodata->pos.x;
|
||||
|
@ -9595,7 +9595,7 @@ bool chrGetGunPos(struct chrdata *chr, s32 handnum, struct coord *gunpos)
|
|||
mtx4TransformVecInPlace(&sp6c, gunpos);
|
||||
result = true;
|
||||
} else if ((part1 = modelGetPart(model->filedata, MODELPART_0001))) {
|
||||
sp64 = model0001a5cc(model, part1, 0);
|
||||
sp64 = modelFindNodeMtx(model, part1, 0);
|
||||
|
||||
mtx00015be4(camGetProjectionMtxF(), sp64, &sp24);
|
||||
|
||||
|
@ -9664,7 +9664,7 @@ void chrCalculateShieldHit(struct chrdata *chr, struct coord *pos, struct coord
|
|||
|
||||
while (node) {
|
||||
if ((node->type & 0xff) == MODELNODETYPE_BBOX) {
|
||||
mtxptr1 = model0001a5cc(chr->model, node, 0);
|
||||
mtxptr1 = modelFindNodeMtx(chr->model, node, 0);
|
||||
|
||||
if (isdifferentmtx) {
|
||||
mtx00016798(mtxptr1, &spc8);
|
||||
|
@ -9712,7 +9712,7 @@ void chrCalculateShieldHit(struct chrdata *chr, struct coord *pos, struct coord
|
|||
*modelptr = chr->model;
|
||||
*sideptr = 0;
|
||||
|
||||
mtxptr2 = model0001a5cc(chr->model, bestnode, 0);
|
||||
mtxptr2 = modelFindNodeMtx(chr->model, bestnode, 0);
|
||||
|
||||
if (isdifferentmtx) {
|
||||
mtx00016798(mtxptr2, &sp48);
|
||||
|
@ -10862,7 +10862,7 @@ void func0f0429d8(struct chrdata *chr, f32 arg1, f32 arg2)
|
|||
{
|
||||
struct prop *prop = chrGetTargetProp(chr);
|
||||
f32 distance = atan2f(prop->pos.x - chr->prop->pos.x, prop->pos.z - chr->prop->pos.z);
|
||||
f32 value = model0001afe8(arg2, distance, arg1);
|
||||
f32 value = modelTweenRotAxis(arg2, distance, arg1);
|
||||
chrSetLookAngle(chr, value);
|
||||
}
|
||||
|
||||
|
@ -13192,7 +13192,7 @@ void chrTickSkJump(struct chrdata *chr)
|
|||
switch (chr->act_skjump.state) {
|
||||
case SKJUMPSTATE_TAKEOFF:
|
||||
fVar6 = chrGetInverseTheta(chr);
|
||||
fVar5 = model0001afe8(fVar6, chr->act_skjump.roty, 0.35);
|
||||
fVar5 = modelTweenRotAxis(fVar6, chr->act_skjump.roty, 0.35);
|
||||
chrSetLookAngle(chr, fVar5);
|
||||
frame = modelGetCurAnimFrame(chr->model);
|
||||
|
||||
|
@ -14446,7 +14446,7 @@ bool chrCanSeeTargetWithExtraCheck(struct chrdata *chr)
|
|||
struct coord sp68;
|
||||
struct coord sp56;
|
||||
struct coord sp44;
|
||||
f32 somefloat = model0001af80(model) * 0.8f;
|
||||
f32 somefloat = modelGetEffectiveScale(model) * 0.8f;
|
||||
|
||||
bgun0f0a0c08(&sp68, &sp56);
|
||||
modelGetRootPosition(model, &sp44);
|
||||
|
@ -16132,7 +16132,7 @@ void chrAvoid(struct chrdata *chr)
|
|||
f32 xdiff;
|
||||
f32 zdiff;
|
||||
f32 halfchrradius;
|
||||
f32 chrangle = model0001ae44(chr->model);
|
||||
f32 chrangle = modelGetChrRotY(chr->model);
|
||||
s16 dstrooms[8];
|
||||
struct coord dstpos;
|
||||
|
||||
|
|
|
@ -433,7 +433,7 @@ bool aiChrDoAnimation(void)
|
|||
chrTryStartAnim(chr, anim_id, fstartframe, fendframe, cmd[8], cmd[9], speed);
|
||||
|
||||
if (startframe == 0xfffe) {
|
||||
chr0f0220ec(chr, 1, 1);
|
||||
chr0f0220ec(chr, 1, true);
|
||||
|
||||
if (chr->prop->type == PROPTYPE_PLAYER) {
|
||||
u32 playernum = playermgrGetPlayerNumByProp(chr->prop);
|
||||
|
|
|
@ -1968,7 +1968,7 @@ void casingRender(struct casing *casing, Gfx **gdlptr)
|
|||
s32 j;
|
||||
bool render = true;
|
||||
|
||||
modelCalculateRwDataLen(modeldef);
|
||||
modelAllocateRwData(modeldef);
|
||||
modelInit(&model, modeldef, NULL, true);
|
||||
|
||||
model.matrices = matrices;
|
||||
|
|
|
@ -1812,7 +1812,7 @@ Gfx *menuRenderModels(Gfx *gdl, struct menu840 *thing, s32 arg2)
|
|||
thing->bodynum = bodynum;
|
||||
thing->bodymodeldef = modeldefLoad(bodyfilenum, thing->unk004, totalfilelen, &texpool);
|
||||
bodyfilelen2 = ALIGN64(fileGetLoadedSize(bodyfilenum));
|
||||
modelCalculateRwDataLen(thing->bodymodeldef);
|
||||
modelAllocateRwData(thing->bodymodeldef);
|
||||
|
||||
if (headnum < 0) {
|
||||
thing->headmodeldef = NULL;
|
||||
|
@ -1820,7 +1820,7 @@ Gfx *menuRenderModels(Gfx *gdl, struct menu840 *thing, s32 arg2)
|
|||
thing->headmodeldef = modeldefLoad(headfilenum, thing->unk004 + bodyfilelen2, totalfilelen - bodyfilelen2, &texpool);
|
||||
fileGetLoadedSize(headfilenum);
|
||||
bodyCalculateHeadOffset(thing->headmodeldef, headnum, bodynum);
|
||||
modelCalculateRwDataLen(thing->headmodeldef);
|
||||
modelAllocateRwData(thing->headmodeldef);
|
||||
}
|
||||
|
||||
modelInit(&thing->bodymodel, thing->bodymodeldef, &thing->unk110, true);
|
||||
|
@ -1841,7 +1841,7 @@ Gfx *menuRenderModels(Gfx *gdl, struct menu840 *thing, s32 arg2)
|
|||
thing->bodymodeldef = modeldefLoad(thing->unk00c, thing->unk004, totalfilelen, &texpool);
|
||||
|
||||
fileGetLoadedSize(thing->unk00c);
|
||||
modelCalculateRwDataLen(thing->bodymodeldef);
|
||||
modelAllocateRwData(thing->bodymodeldef);
|
||||
modelInit(&thing->bodymodel, thing->bodymodeldef, &thing->unk110, true);
|
||||
animInit(&thing->bodyanim);
|
||||
|
||||
|
@ -2135,7 +2135,7 @@ Gfx *menuRenderModels(Gfx *gdl, struct menu840 *thing, s32 arg2)
|
|||
struct coord newpos = {0, 0, 0};
|
||||
u32 stack[3];
|
||||
|
||||
model0001b3bc(&thing->bodymodel);
|
||||
modelUpdateInfo(&thing->bodymodel);
|
||||
|
||||
modelGetRootPosition(&thing->bodymodel, &oldpos);
|
||||
|
||||
|
@ -2214,7 +2214,7 @@ Gfx *menuRenderModels(Gfx *gdl, struct menu840 *thing, s32 arg2)
|
|||
if (thing->unk05c && thing->unk05e != thing->unk05c) {
|
||||
if (thing->unk5b1_04) {
|
||||
modelSetAnimation(&thing->bodymodel, thing->unk05c, false, 0, PALUPF(-0.5f), 0.0f);
|
||||
model0001e018(&thing->bodymodel, modelGetNumAnimFrames(&thing->bodymodel));
|
||||
modelSetAnimFrame(&thing->bodymodel, modelGetNumAnimFrames(&thing->bodymodel));
|
||||
} else {
|
||||
modelSetAnimation(&thing->bodymodel, thing->unk05c, false, 0, PALUPF(0.5f), 0.0f);
|
||||
}
|
||||
|
@ -2228,7 +2228,7 @@ Gfx *menuRenderModels(Gfx *gdl, struct menu840 *thing, s32 arg2)
|
|||
f32 sp178;
|
||||
u32 stack;
|
||||
|
||||
model0001ee18(&thing->bodymodel, g_Vars.diffframe240, true);
|
||||
modelTickAnimQuarterSpeed(&thing->bodymodel, g_Vars.diffframe240, true);
|
||||
|
||||
if (thing->unk5b1_04) {
|
||||
sp178 = modelGetNumAnimFrames(&thing->bodymodel) - modelGetCurAnimFrame(&thing->bodymodel);
|
||||
|
@ -2246,7 +2246,7 @@ Gfx *menuRenderModels(Gfx *gdl, struct menu840 *thing, s32 arg2)
|
|||
renderdata.unk00 = &thing->unk014;
|
||||
renderdata.unk10 = thing->bodymodel.matrices;
|
||||
|
||||
model0001cebc(&renderdata, &thing->bodymodel);
|
||||
modelSetMatricesWithAnim(&renderdata, &thing->bodymodel);
|
||||
|
||||
if (thing->bodymodeldef->skel == &g_SkelHudPiece) {
|
||||
struct modelnode *node = modelGetPart(thing->bodymodeldef, MODELPART_HUDPIECE_0000);
|
||||
|
@ -2277,7 +2277,7 @@ Gfx *menuRenderModels(Gfx *gdl, struct menu840 *thing, s32 arg2)
|
|||
s32 sp160;
|
||||
Mtxf sp120;
|
||||
Mtxf spe0;
|
||||
sp160 = model0001a524(node, 0);
|
||||
sp160 = modelFindNodeMtxIndex(node, 0);
|
||||
mtx4LoadIdentity(&sp120);
|
||||
mtx4LoadXRotation(menuGetCosOscFrac(4), &sp120);
|
||||
mtx4MultMtx4((Mtxf *)((u32)sp3b4 + sp160 * sizeof(Mtxf)), &sp120, &spe0);
|
||||
|
@ -2291,7 +2291,7 @@ Gfx *menuRenderModels(Gfx *gdl, struct menu840 *thing, s32 arg2)
|
|||
|| g_MenuData.root == MENUROOT_FILEMGR
|
||||
|| g_MenuData.root == MENUROOT_MPSETUP
|
||||
|| g_MenuData.root == MENUROOT_TRAINING) {
|
||||
s32 index = model0001a524(node, 0);
|
||||
s32 index = modelFindNodeMtxIndex(node, 0);
|
||||
struct coord spd0;
|
||||
f32 spc8[2];
|
||||
|
||||
|
|
|
@ -319,9 +319,9 @@ struct model *modelmgrInstantiateModelWithAnim(struct modelfiledata *modelfileda
|
|||
return modelmgrInstantiateModel(modelfiledata, true);
|
||||
}
|
||||
|
||||
void modelmgr0f0b32a0(struct model *model, struct modelnode *node, struct modelfiledata *headmodeldef)
|
||||
void modelmgrAttachHead(struct model *model, struct modelnode *node, struct modelfiledata *headmodeldef)
|
||||
{
|
||||
model00023108(model, model->filedata, node, headmodeldef);
|
||||
modelAttachHead(model, model->filedata, node, headmodeldef);
|
||||
modelInitRwData(model, headmodeldef->rootnode);
|
||||
}
|
||||
|
||||
|
|
|
@ -1007,7 +1007,7 @@ void playerSpawn(void)
|
|||
|
||||
if (g_Vars.lvframenum > 0
|
||||
&& (g_ChrSlots[i].hidden & CHRHFLAG_00800000)
|
||||
&& func0f06b39c(&sp78, &sp90, &g_ChrSlots[i].prop->pos, model0001af80(g_ChrSlots[i].model))
|
||||
&& func0f06b39c(&sp78, &sp90, &g_ChrSlots[i].prop->pos, modelGetEffectiveScale(g_ChrSlots[i].model))
|
||||
&& (random() % 8)) {
|
||||
sqdist += 1000000;
|
||||
}
|
||||
|
@ -1407,10 +1407,10 @@ void playerTickChrBody(void)
|
|||
offset1 = ALIGN64(fileGetLoadedSize(g_HeadsAndBodies[headnum].filenum) + offset1);
|
||||
}
|
||||
|
||||
modelCalculateRwDataLen(bodyfiledata);
|
||||
modelAllocateRwData(bodyfiledata);
|
||||
|
||||
if (headfiledata != NULL) {
|
||||
modelCalculateRwDataLen(headfiledata);
|
||||
modelAllocateRwData(headfiledata);
|
||||
}
|
||||
|
||||
modelInit(model, bodyfiledata, rwdatas, false);
|
||||
|
@ -1503,7 +1503,7 @@ void playerTickChrBody(void)
|
|||
if (g_Vars.mplayerisrunning == false) {
|
||||
weaponfiledata = modeldefLoad(g_ModelStates[weaponmodelnum].fileid, allocation + offset1, offset2 - offset1, &texpool);
|
||||
fileGetLoadedSize(g_ModelStates[weaponmodelnum].fileid);
|
||||
modelCalculateRwDataLen(weaponfiledata);
|
||||
modelAllocateRwData(weaponfiledata);
|
||||
} else {
|
||||
weaponobj = NULL;
|
||||
weaponfiledata = NULL;
|
||||
|
|
|
@ -1206,7 +1206,7 @@ void handInflictCloseRangeDamage(s32 handnum, struct gset *gset, bool arg2)
|
|||
|
||||
bgunCalculatePlayerShotSpread(&spd8, &spcc, handnum, true);
|
||||
|
||||
if (model000225d4(model, &spd8, &spcc, &node) > 0) {
|
||||
if (modelTestForHit(model, &spd8, &spcc, &node) > 0) {
|
||||
f32 damage = gsetGetDamage(gset) * 2.5f;
|
||||
skipthething = true;
|
||||
bgunPlayGlassHitSound(&playerprop->pos, playerprop->rooms, -1);
|
||||
|
@ -2597,7 +2597,7 @@ void autoaimTick(void)
|
|||
|
||||
if (bestprop->flags & PROPFLAG_ONTHISSCREENTHISTICK) {
|
||||
struct defaultobj *obj = bestprop->obj;
|
||||
Mtxf *mtx = model0001a60c(obj->model);
|
||||
Mtxf *mtx = modelGetRootMtx(obj->model);
|
||||
struct coord spac;
|
||||
spac.z = mtx->m[3][2];
|
||||
|
||||
|
|
|
@ -737,7 +737,7 @@ bool func0f0679ac(struct model *model, f32 *max, f32 *min, f32 arg3[2], f32 arg4
|
|||
|
||||
if (type == MODELNODETYPE_BBOX) {
|
||||
struct modelrodata_bbox *bbox = &node->rodata->bbox;
|
||||
Mtxf *mtx = model0001a5cc(model, node, 0);
|
||||
Mtxf *mtx = modelFindNodeMtx(model, node, 0);
|
||||
f32 dist1;
|
||||
f32 dist2;
|
||||
|
||||
|
@ -794,7 +794,7 @@ void func0f067bc4(struct model *model, f32 *max, f32 *min, s32 axis)
|
|||
|
||||
if (type == MODELNODETYPE_BBOX) {
|
||||
struct modelrodata_bbox *bbox = &node->rodata->bbox;
|
||||
Mtxf *mtx = model0001a5cc(model, node, 0);
|
||||
Mtxf *mtx = modelFindNodeMtx(model, node, 0);
|
||||
f32 dist1;
|
||||
f32 dist2;
|
||||
|
||||
|
@ -863,7 +863,7 @@ bool modelGetScreenCoords2(struct model *model, f32 *x2, f32 *x1, f32 *y2, f32 *
|
|||
f32 sp64[2];
|
||||
f32 sp5c[2];
|
||||
struct coord sp50;
|
||||
Mtxf *mtx = model0001a5cc(model, node, 0);
|
||||
Mtxf *mtx = modelFindNodeMtx(model, node, 0);
|
||||
|
||||
if (mtx->m[3][2] < 0.0f) {
|
||||
sp50.x = mtx->m[3][0];
|
||||
|
@ -1230,13 +1230,13 @@ struct modelnode *func0f0687e4(struct model *model)
|
|||
case MODELNODETYPE_DL:
|
||||
return node;
|
||||
case MODELNODETYPE_DISTANCE:
|
||||
model0001c784(model, node);
|
||||
modelApplyDistanceRelations(model, node);
|
||||
break;
|
||||
case MODELNODETYPE_TOGGLE:
|
||||
model0001c7d0(model, node);
|
||||
modelApplyToggleRelations(model, node);
|
||||
break;
|
||||
case MODELNODETYPE_HEADSPOT:
|
||||
modelAttachHead(model, node);
|
||||
modelApplyHeadRelations(model, node);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1305,13 +1305,13 @@ struct modelnode *modelFindBboxNode(struct model *model)
|
|||
case MODELNODETYPE_BBOX:
|
||||
return node;
|
||||
case MODELNODETYPE_DISTANCE:
|
||||
model0001c784(model, node);
|
||||
modelApplyDistanceRelations(model, node);
|
||||
break;
|
||||
case MODELNODETYPE_TOGGLE:
|
||||
model0001c7d0(model, node);
|
||||
modelApplyToggleRelations(model, node);
|
||||
break;
|
||||
case MODELNODETYPE_HEADSPOT:
|
||||
modelAttachHead(model, node);
|
||||
modelApplyHeadRelations(model, node);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -2652,7 +2652,7 @@ bool func0f06b488(struct prop *prop, struct coord *arg1, struct coord *arg2, str
|
|||
bool func0f06b610(struct defaultobj *obj, struct coord *arg1, struct coord *arg2, struct coord *arg3, f32 arg4, struct coord *arg5, struct coord *arg6, struct coord *arg7, struct coord *arg8, f32 *arg9)
|
||||
{
|
||||
struct model *model = obj->model;
|
||||
f32 f0 = model0001af80(model);
|
||||
f32 f0 = modelGetEffectiveScale(model);
|
||||
f32 xdiff;
|
||||
f32 ydiff;
|
||||
f32 zdiff;
|
||||
|
@ -2685,7 +2685,7 @@ bool func0f06b610(struct defaultobj *obj, struct coord *arg1, struct coord *arg2
|
|||
if (sum1 >= -f0 && sum1 <= arg4 + f0) {
|
||||
if (prop->flags & PROPFLAG_ONTHISSCREENTHISTICK) {
|
||||
if (var8005efc0 > 0.0f) {
|
||||
hitpart = model000225d4(model, arg5, arg6, &spe4);
|
||||
hitpart = modelTestForHit(model, arg5, arg6, &spe4);
|
||||
|
||||
while (hitpart > 0) {
|
||||
if (func0f084594(model, spe4, arg5, arg6, &thing1, &mtxindex1, &node1)) {
|
||||
|
@ -2723,11 +2723,11 @@ bool func0f06b610(struct defaultobj *obj, struct coord *arg1, struct coord *arg2
|
|||
}
|
||||
}
|
||||
|
||||
hitpart = model000225d4(model, arg5, arg6, &spe4);
|
||||
hitpart = modelTestForHit(model, arg5, arg6, &spe4);
|
||||
}
|
||||
} else {
|
||||
do {
|
||||
hitpart = model000225d4(model, arg5, arg6, &spe4);
|
||||
hitpart = modelTestForHit(model, arg5, arg6, &spe4);
|
||||
|
||||
if (hitpart > 0) {
|
||||
if (func0f0849dc(model, spe4, arg5, arg6, &thing1, &mtxindex1, &node1)) {
|
||||
|
@ -2806,7 +2806,7 @@ bool func0f06b610(struct defaultobj *obj, struct coord *arg1, struct coord *arg2
|
|||
}
|
||||
}
|
||||
} else {
|
||||
if (func0f06b39c(arg1, arg3, &prop->pos, model0001af80(model))
|
||||
if (func0f06b39c(arg1, arg3, &prop->pos, modelGetEffectiveScale(model))
|
||||
&& func0f06b488(prop, arg1, arg2, arg3, arg7, arg8, arg9)) {
|
||||
g_EmbedModel = model;
|
||||
g_EmbedNode = model->filedata->rootnode;
|
||||
|
@ -2885,7 +2885,7 @@ bool func0f06bea0(struct model *model, struct modelnode *endnode, struct modelno
|
|||
case MODELNODETYPE_BBOX:
|
||||
rodata = node->rodata;
|
||||
|
||||
if (model000220fc(&rodata->bbox, model0001a5cc(model, node, 0), arg3, arg4)) {
|
||||
if (modelTestBboxNodeForHit(&rodata->bbox, modelFindNodeMtx(model, node, 0), arg3, arg4)) {
|
||||
s7 = true;
|
||||
sp84 = node;
|
||||
|
||||
|
@ -2897,7 +2897,7 @@ bool func0f06bea0(struct model *model, struct modelnode *endnode, struct modelno
|
|||
s7 = false;
|
||||
var8005efc0 = 10.0f / model->scale;
|
||||
|
||||
if (model000220fc(&rodata->bbox, model0001a5cc(model, node, 0), arg3, arg4)) {
|
||||
if (modelTestBboxNodeForHit(&rodata->bbox, modelFindNodeMtx(model, node, 0), arg3, arg4)) {
|
||||
if (g_Vars.hitboundscount < ARRAYCOUNT(g_Vars.hitnodes)) {
|
||||
g_Vars.hitnodes[g_Vars.hitboundscount] = node;
|
||||
g_Vars.hitboundscount++;
|
||||
|
@ -2913,14 +2913,14 @@ bool func0f06bea0(struct model *model, struct modelnode *endnode, struct modelno
|
|||
rwdata = modelGetNodeRwData(model, node);
|
||||
|
||||
if (rwdata->gdl != NULL) {
|
||||
if (rwdata->gdl == rodata->dl.primary) {
|
||||
s4 = (Gfx *)((u32)rodata->dl.colourtable + ((u32)rodata->dl.primary & 0xffffff));
|
||||
if (rwdata->gdl == rodata->dl.opagdl) {
|
||||
s4 = (Gfx *)((u32)rodata->dl.colourtable + ((u32)rodata->dl.opagdl & 0xffffff));
|
||||
} else {
|
||||
s4 = rwdata->gdl;
|
||||
}
|
||||
|
||||
if (rodata->dl.secondary != NULL) {
|
||||
s6 = (Gfx *)((u32)rodata->dl.colourtable + ((u32)rodata->dl.secondary & 0xffffff));
|
||||
if (rodata->dl.xlugdl != NULL) {
|
||||
s6 = (Gfx *)((u32)rodata->dl.colourtable + ((u32)rodata->dl.xlugdl & 0xffffff));
|
||||
}
|
||||
|
||||
vertices = rwdata->vertices;
|
||||
|
@ -2929,13 +2929,13 @@ bool func0f06bea0(struct model *model, struct modelnode *endnode, struct modelno
|
|||
break;
|
||||
case MODELNODETYPE_GUNDL:
|
||||
if (s7) {
|
||||
if (node->rodata->gundl.primary != NULL) {
|
||||
if (node->rodata->gundl.opagdl != NULL) {
|
||||
s32 base = (s32)node->rodata->gundl.baseaddr;
|
||||
|
||||
s4 = (Gfx *)(base + ((u32)node->rodata->gundl.primary & 0xffffff));
|
||||
s4 = (Gfx *)(base + ((u32)node->rodata->gundl.opagdl & 0xffffff));
|
||||
|
||||
if (node->rodata->gundl.secondary != NULL) {
|
||||
s6 = (Gfx *)(base + ((u32)node->rodata->gundl.secondary & 0xffffff));
|
||||
if (node->rodata->gundl.xlugdl != NULL) {
|
||||
s6 = (Gfx *)(base + ((u32)node->rodata->gundl.xlugdl & 0xffffff));
|
||||
}
|
||||
|
||||
vertices = (struct gfxvtx *)base;
|
||||
|
@ -2943,13 +2943,13 @@ bool func0f06bea0(struct model *model, struct modelnode *endnode, struct modelno
|
|||
}
|
||||
break;
|
||||
case MODELNODETYPE_DISTANCE:
|
||||
model0001c784(model, node);
|
||||
modelApplyDistanceRelations(model, node);
|
||||
break;
|
||||
case MODELNODETYPE_TOGGLE:
|
||||
model0001c7d0(model, node);
|
||||
modelApplyToggleRelations(model, node);
|
||||
break;
|
||||
case MODELNODETYPE_HEADSPOT:
|
||||
modelAttachHead(model, node);
|
||||
modelApplyHeadRelations(model, node);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -2982,7 +2982,7 @@ bool func0f06bea0(struct model *model, struct modelnode *endnode, struct modelno
|
|||
if (ok) {
|
||||
*arg6 = sqrtf(sp98);
|
||||
*arg10 = sp88;
|
||||
*arg9 = model0001a524(sp88, 0);
|
||||
*arg9 = modelFindNodeMtxIndex(sp88, 0);
|
||||
}
|
||||
|
||||
var8005efc0 = 0.0f;
|
||||
|
@ -3017,7 +3017,7 @@ bool func0f06c28c(struct chrdata *chr, struct coord *arg1, struct coord *arg2, s
|
|||
if (-spe4 <= spd4 && spd4 <= arg4 + spe4 && func0f06b39c(arg1, arg3, &prop->pos, spe4)) {
|
||||
if ((prop->flags & PROPFLAG_ONTHISSCREENTHISTICK)) {
|
||||
if (var8005efc0 > 0.0f) {
|
||||
hitpart = model000225d4(model, arg5, arg6, &spcc);
|
||||
hitpart = modelTestForHit(model, arg5, arg6, &spcc);
|
||||
|
||||
while (hitpart > 0) {
|
||||
if (func0f084594(model, spcc, arg5, arg6, &sp7c, &sp78, &sp74)) {
|
||||
|
@ -3055,10 +3055,10 @@ bool func0f06c28c(struct chrdata *chr, struct coord *arg1, struct coord *arg2, s
|
|||
}
|
||||
}
|
||||
|
||||
hitpart = model000225d4(model, arg5, arg6, &spcc);
|
||||
hitpart = modelTestForHit(model, arg5, arg6, &spcc);
|
||||
}
|
||||
} else {
|
||||
hitpart = model000225d4(model, arg5, arg6, &spcc);
|
||||
hitpart = modelTestForHit(model, arg5, arg6, &spcc);
|
||||
|
||||
if (hitpart > 0
|
||||
&& func0f06bea0(model, model->filedata->rootnode, model->filedata->rootnode, arg5, arg6, &sp7c.unk00, &spec, &spcc, &hitpart, &sp78, &sp74)
|
||||
|
@ -4061,7 +4061,7 @@ bool objEmbed(struct prop *prop, struct prop *parent, struct model *model, struc
|
|||
obj->embedment = embedmentAllocate();
|
||||
|
||||
if (obj->embedment) {
|
||||
sp24 = model0001a5cc(model, node, 0);
|
||||
sp24 = modelFindNodeMtx(model, node, 0);
|
||||
|
||||
obj->hidden |= OBJHFLAG_EMBEDDED;
|
||||
|
||||
|
@ -4181,7 +4181,7 @@ bool propExplode(struct prop *prop, s32 exptype)
|
|||
}
|
||||
|
||||
if (prop->flags & PROPFLAG_ONTHISSCREENTHISTICK) {
|
||||
Mtxf *mtx = model0001a60c(obj->model);
|
||||
Mtxf *mtx = modelGetRootMtx(obj->model);
|
||||
|
||||
pos.x = mtx->m[3][0];
|
||||
pos.y = mtx->m[3][1];
|
||||
|
@ -4757,7 +4757,7 @@ void func0f07079c(struct prop *prop, bool fulltick)
|
|||
}
|
||||
|
||||
if (model->attachedtonode && (obj->hidden & OBJHFLAG_EMBEDDED)) {
|
||||
Mtxf *mtx = model0001a5cc(model->attachedtomodel, model->attachedtonode, 0);
|
||||
Mtxf *mtx = modelFindNodeMtx(model->attachedtomodel, model->attachedtonode, 0);
|
||||
struct modelrenderdata renderdata = {NULL, true, 3};
|
||||
u32 stack;
|
||||
Mtxf sp30;
|
||||
|
@ -4768,7 +4768,7 @@ void func0f07079c(struct prop *prop, bool fulltick)
|
|||
renderdata.unk10 = gfxAllocate(model->filedata->nummatrices * sizeof(Mtxf));
|
||||
renderdata.unk00 = &sp30;
|
||||
|
||||
model0001ce64(&renderdata, model);
|
||||
modelSetMatrices(&renderdata, model);
|
||||
func0f07063c(prop, fulltick);
|
||||
|
||||
child = prop->child;
|
||||
|
@ -6040,8 +6040,8 @@ bool rocketTickFbw(struct weaponobj *rocket)
|
|||
yrot = atan2f(ydist, sqrtf(xdist * xdist + zdist * zdist));
|
||||
|
||||
for (i = 0; i < g_Vars.lvupdate240; i++) {
|
||||
projectile->unk018 = model0001afe8(projectile->unk018, xrot, PAL ? 0.02246f : 0.01875f);
|
||||
projectile->unk014 = model0001afe8(projectile->unk014, yrot, PAL ? 0.02246f : 0.01875f);
|
||||
projectile->unk018 = modelTweenRotAxis(projectile->unk018, xrot, PAL ? 0.02246f : 0.01875f);
|
||||
projectile->unk014 = modelTweenRotAxis(projectile->unk014, yrot, PAL ? 0.02246f : 0.01875f);
|
||||
}
|
||||
|
||||
mtx4LoadXRotation(M_BADTAU - projectile->unk014, &sp118);
|
||||
|
@ -6995,7 +6995,7 @@ s32 projectileTick(struct defaultobj *obj, bool *embedded)
|
|||
Mtxf sp188;
|
||||
Mtxf *sp184;
|
||||
|
||||
sp184 = model0001a5cc(g_EmbedModel, g_EmbedNode, 0);
|
||||
sp184 = modelFindNodeMtx(g_EmbedModel, g_EmbedNode, 0);
|
||||
mtx4TransformVec(camGetWorldToScreenMtxf(), &sp5e8, &sp1c8);
|
||||
mtx0001719c(sp184->m, sp188.m);
|
||||
mtx4TransformVecInPlace(&sp188, &sp1c8);
|
||||
|
@ -8946,7 +8946,7 @@ void autogunInitMatrices(struct prop *prop, Mtxf *mtx)
|
|||
mtx4SetTranslation(&rodata->position.pos, &matrices[2]);
|
||||
mtx00015be0(&matrices[1], &matrices[2]);
|
||||
|
||||
tmp = model0001a5cc(model, node2, 0x100);
|
||||
tmp = modelFindNodeMtx(model, node2, 0x100);
|
||||
|
||||
if (tmp != NULL) {
|
||||
mtx4LoadZRotation(xrot * 0.5f, tmp);
|
||||
|
@ -8957,7 +8957,7 @@ void autogunInitMatrices(struct prop *prop, Mtxf *mtx)
|
|||
node3 = modelGetPart(model->filedata, MODELPART_AUTOGUN_0003);
|
||||
|
||||
if (node3 != NULL) {
|
||||
tmp = model0001a5cc(model, node3, 0);
|
||||
tmp = modelFindNodeMtx(model, node3, 0);
|
||||
rodata = node3->rodata;
|
||||
mtx4LoadXRotation(autogun->barrelrot, tmp);
|
||||
mtx4SetTranslation(&rodata->position.pos, tmp);
|
||||
|
@ -8967,7 +8967,7 @@ void autogunInitMatrices(struct prop *prop, Mtxf *mtx)
|
|||
node4 = modelGetPart(model->filedata, MODELPART_AUTOGUN_0004);
|
||||
|
||||
if (node4 != NULL) {
|
||||
tmp = model0001a5cc(model, node4, 0);
|
||||
tmp = modelFindNodeMtx(model, node4, 0);
|
||||
rodata = node4->rodata;
|
||||
mtx4LoadTranslation(&rodata->position.pos, tmp);
|
||||
mtx00015be0(&matrices[2], tmp);
|
||||
|
@ -8976,7 +8976,7 @@ void autogunInitMatrices(struct prop *prop, Mtxf *mtx)
|
|||
node6 = modelGetPart(model->filedata, MODELPART_AUTOGUN_0006);
|
||||
|
||||
if (node6 != NULL) {
|
||||
tmp = model0001a5cc(model, node6, 0);
|
||||
tmp = modelFindNodeMtx(model, node6, 0);
|
||||
rodata = node6->rodata;
|
||||
mtx4LoadXRotation(autogun->barrelrot, tmp);
|
||||
mtx4SetTranslation(&rodata->position.pos, tmp);
|
||||
|
@ -9048,14 +9048,14 @@ void autogunTickShoot(struct prop *autogunprop)
|
|||
union modelrodata *rodata;
|
||||
|
||||
if (flashnode) {
|
||||
sp108 = model0001a5cc(model, flashnode, 0);
|
||||
sp108 = modelFindNodeMtx(model, flashnode, 0);
|
||||
rodata = flashnode->rodata;
|
||||
|
||||
gunpos.x = rodata->chrgunfire.pos.x;
|
||||
gunpos.y = rodata->chrgunfire.pos.y;
|
||||
gunpos.z = rodata->chrgunfire.pos.z;
|
||||
} else {
|
||||
sp108 = model0001a5cc(model, posnode, 0);
|
||||
sp108 = modelFindNodeMtx(model, posnode, 0);
|
||||
|
||||
gunpos.x = 0.0f;
|
||||
gunpos.y = 0.0f;
|
||||
|
@ -10829,7 +10829,7 @@ void objInitMatrices(struct prop *prop)
|
|||
thing.unk10 = obj->model->matrices;
|
||||
thing.unk00 = &sp28;
|
||||
|
||||
model0001ce64(&thing, obj->model);
|
||||
modelSetMatrices(&thing, obj->model);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -11029,13 +11029,13 @@ s32 objTickPlayer(struct prop *prop)
|
|||
struct hov *hov = NULL;
|
||||
|
||||
if (fulltick) {
|
||||
s32 iVar10 = g_Vars.lvupdate240;
|
||||
s32 lvupdate240 = g_Vars.lvupdate240;
|
||||
|
||||
if (g_Vars.tickmode == TICKMODE_CUTSCENE && iVar10 > 0 && g_Vars.cutsceneskip60ths > 0) {
|
||||
iVar10 += g_Vars.cutsceneskip60ths * 4;
|
||||
if (g_Vars.tickmode == TICKMODE_CUTSCENE && lvupdate240 > 0 && g_Vars.cutsceneskip60ths > 0) {
|
||||
lvupdate240 += g_Vars.cutsceneskip60ths * 4;
|
||||
}
|
||||
|
||||
model0001ee18(model, iVar10, true);
|
||||
modelTickAnimQuarterSpeed(model, lvupdate240, true);
|
||||
}
|
||||
|
||||
anim00023d38(model->anim->animnum);
|
||||
|
@ -11045,13 +11045,13 @@ s32 objTickPlayer(struct prop *prop)
|
|||
sp552 = true;
|
||||
} else {
|
||||
if (fulltick) {
|
||||
model0001b3bc(model);
|
||||
modelUpdateInfo(model);
|
||||
}
|
||||
|
||||
sp556 = true;
|
||||
sp476.unk10 = gfxAllocate(model->filedata->nummatrices * sizeof(Mtxf));
|
||||
sp476.unk00 = camGetWorldToScreenMtxf();
|
||||
model0001cebc(&sp476, model);
|
||||
modelSetMatricesWithAnim(&sp476, model);
|
||||
|
||||
if (fulltick) {
|
||||
mtx00015be4(camGetProjectionMtxF(), model->matrices, &sp412);
|
||||
|
@ -11128,7 +11128,7 @@ s32 objTickPlayer(struct prop *prop)
|
|||
if (fulltick) {
|
||||
sp148 = floorf(model->anim->frame);
|
||||
sp148++;
|
||||
model0001ee18(model, g_Vars.lvupdate240, 1);
|
||||
modelTickAnimQuarterSpeed(model, g_Vars.lvupdate240, true);
|
||||
sp144 = floorf(model->anim->frame);
|
||||
|
||||
for (i = sp148; i <= sp144; i++) {
|
||||
|
@ -11149,7 +11149,7 @@ s32 objTickPlayer(struct prop *prop)
|
|||
sp556 = true;
|
||||
sp312.unk10 = gfxAllocate(model->filedata->nummatrices * sizeof(Mtxf));
|
||||
sp312.unk00 = &sp152;
|
||||
model0001cebc(&sp312, model);
|
||||
modelSetMatricesWithAnim(&sp312, model);
|
||||
|
||||
if (fulltick) {
|
||||
sp236.x = (f32)sp116.x + prop->pos.x;
|
||||
|
@ -11268,7 +11268,7 @@ s32 objTickPlayer(struct prop *prop)
|
|||
} else if (obj->flags2 & OBJFLAG2_04000000) {
|
||||
pass2 = posIsInDrawDistance(&prop->pos);
|
||||
} else if ((obj->hidden & OBJHFLAG_00000800) == 0 && (obj->flags2 & OBJFLAG2_INVISIBLE) == 0) {
|
||||
pass2 = func0f08e8ac(prop, &prop->pos, model0001af80(model), sp564);
|
||||
pass2 = func0f08e8ac(prop, &prop->pos, modelGetEffectiveScale(model), sp564);
|
||||
} else {
|
||||
pass2 = false;
|
||||
}
|
||||
|
@ -11300,7 +11300,7 @@ s32 objTickPlayer(struct prop *prop)
|
|||
if (sp556 == false) {
|
||||
model->matrices = gfxAllocate(model->filedata->nummatrices * sizeof(Mtxf));
|
||||
objInitMatrices(prop);
|
||||
model0001cb0c(model, model->filedata->rootnode);
|
||||
modelUpdateRelationsQuick(model, model->filedata->rootnode);
|
||||
}
|
||||
|
||||
prop->z = -model->matrices[0].m[3][2];
|
||||
|
@ -13582,7 +13582,7 @@ Gfx *objRender(struct prop *prop, Gfx *gdl, bool xlupass)
|
|||
}
|
||||
|
||||
if (obj->type != OBJTYPE_TINTEDGLASS) {
|
||||
frac = func0f08e6bc(prop, model0001af80(obj->model));
|
||||
frac = func0f08e6bc(prop, modelGetEffectiveScale(obj->model));
|
||||
|
||||
if (prop->timetoregen > 0 && prop->timetoregen < TICKS(60)) {
|
||||
frac *= (TICKS(60.0f) - prop->timetoregen) * (PAL ? 0.019999999552965f : 0.016666667535901f);
|
||||
|
@ -14060,13 +14060,13 @@ void objDeform(struct defaultobj *obj, s32 level)
|
|||
}
|
||||
break;
|
||||
case MODELNODETYPE_DISTANCE:
|
||||
model0001c784(obj->model, node);
|
||||
modelApplyDistanceRelations(obj->model, node);
|
||||
break;
|
||||
case MODELNODETYPE_TOGGLE:
|
||||
model0001c7d0(obj->model, node);
|
||||
modelApplyToggleRelations(obj->model, node);
|
||||
break;
|
||||
case MODELNODETYPE_HEADSPOT:
|
||||
modelAttachHead(obj->model, node);
|
||||
modelApplyHeadRelations(obj->model, node);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -14422,10 +14422,10 @@ bool objDrop(struct prop *prop, bool lazy)
|
|||
f32 spa0;
|
||||
|
||||
node1 = objFindBboxNode(obj);
|
||||
modelNodeGetPosition(obj->model, model0001a740(node1), &spb8);
|
||||
modelNodeGetPosition(obj->model, modelNodeFindMtxNode(node1), &spb8);
|
||||
|
||||
node2 = objFindBboxNode(rootobj);
|
||||
modelNodeGetPosition(rootobj->model, model0001a740(node2), &spa8);
|
||||
modelNodeGetPosition(rootobj->model, modelNodeFindMtxNode(node2), &spa8);
|
||||
|
||||
spe4.x = spb8.x - spa8.x;
|
||||
spe4.y = spb8.y - spa8.y;
|
||||
|
@ -14530,7 +14530,7 @@ bool objDrop(struct prop *prop, bool lazy)
|
|||
|
||||
if (!lazy && (prop->flags & PROPFLAG_ONTHISSCREENTHISTICK)) {
|
||||
// Do collision checks
|
||||
Mtxf *sp48 = model0001a60c(model);
|
||||
Mtxf *sp48 = modelGetRootMtx(model);
|
||||
mtx00015be4(camGetProjectionMtxF(), sp48, &spf0);
|
||||
propSetPerimEnabled(root, false);
|
||||
|
||||
|
@ -14828,7 +14828,7 @@ bool func0f084594(struct model *model, struct modelnode *node, struct coord *arg
|
|||
|
||||
rodata = &node->rodata->bbox;
|
||||
|
||||
mtxindex = model0001a524(node, 0);
|
||||
mtxindex = modelFindNodeMtxIndex(node, 0);
|
||||
mtx000172f0(model->matrices[mtxindex].m, mtx.m);
|
||||
|
||||
spb8.x = arg2->x;
|
||||
|
@ -14971,14 +14971,14 @@ bool func0f0849dc(struct model *model, struct modelnode *nodearg, struct coord *
|
|||
struct modelrwdata_dl *rwdata = modelGetNodeRwData(model, node);
|
||||
|
||||
if (rwdata->gdl != NULL) {
|
||||
if (rwdata->gdl == rodata->primary) {
|
||||
s3 = (Gfx *)((u32)rodata->colourtable + ((u32)rodata->primary & 0xffffff));
|
||||
if (rwdata->gdl == rodata->opagdl) {
|
||||
s3 = (Gfx *)((u32)rodata->colourtable + ((u32)rodata->opagdl & 0xffffff));
|
||||
} else {
|
||||
s3 = rwdata->gdl;
|
||||
}
|
||||
|
||||
if (rodata->secondary != NULL) {
|
||||
s5 = (void *)((u32)rodata->colourtable + ((u32)rodata->secondary & 0xffffff));
|
||||
if (rodata->xlugdl != NULL) {
|
||||
s5 = (void *)((u32)rodata->colourtable + ((u32)rodata->xlugdl & 0xffffff));
|
||||
}
|
||||
|
||||
vertices = rwdata->vertices;
|
||||
|
@ -14989,11 +14989,11 @@ bool func0f0849dc(struct model *model, struct modelnode *nodearg, struct coord *
|
|||
{
|
||||
struct modelrodata_gundl *rodata = &node->rodata->gundl;
|
||||
|
||||
if (rodata->primary != NULL) {
|
||||
s3 = (Gfx *)((u32)rodata->baseaddr + ((u32)rodata->primary & 0xffffff));
|
||||
if (rodata->opagdl != NULL) {
|
||||
s3 = (Gfx *)((u32)rodata->baseaddr + ((u32)rodata->opagdl & 0xffffff));
|
||||
|
||||
if (rodata->secondary != NULL) {
|
||||
s5 = (Gfx *)((u32)rodata->baseaddr + ((u32)rodata->secondary & 0xffffff));
|
||||
if (rodata->xlugdl != NULL) {
|
||||
s5 = (Gfx *)((u32)rodata->baseaddr + ((u32)rodata->xlugdl & 0xffffff));
|
||||
}
|
||||
|
||||
vertices = (void *)(u32)rodata->baseaddr;
|
||||
|
@ -15001,18 +15001,18 @@ bool func0f0849dc(struct model *model, struct modelnode *nodearg, struct coord *
|
|||
}
|
||||
break;
|
||||
case MODELNODETYPE_DISTANCE:
|
||||
model0001c784(model, node);
|
||||
modelApplyDistanceRelations(model, node);
|
||||
break;
|
||||
case MODELNODETYPE_TOGGLE:
|
||||
model0001c7d0(model, node);
|
||||
modelApplyToggleRelations(model, node);
|
||||
break;
|
||||
case MODELNODETYPE_HEADSPOT:
|
||||
modelAttachHead(model, node);
|
||||
modelApplyHeadRelations(model, node);
|
||||
break;
|
||||
}
|
||||
|
||||
if (s3 != NULL) {
|
||||
s32 mtxindex = model0001a524(node, 0);
|
||||
s32 mtxindex = modelFindNodeMtxIndex(node, 0);
|
||||
Mtxf *mtx = NULL;
|
||||
Mtxf sp64;
|
||||
|
||||
|
@ -15170,7 +15170,7 @@ void cctvHandleLensShot(struct defaultobj *obj)
|
|||
|
||||
if (prop->flags & PROPFLAG_ONTHISSCREENTHISTICK) {
|
||||
rodata = modelGetPartRodata(model->filedata, MODELPART_CCTV_0002);
|
||||
sp7c = model0001a5cc(model, modelGetPart(model->filedata, MODELPART_CCTV_LENS), 0);
|
||||
sp7c = modelFindNodeMtx(model, modelGetPart(model->filedata, MODELPART_CCTV_LENS), 0);
|
||||
mtx00015be4(camGetProjectionMtxF(), sp7c, &matrix);
|
||||
|
||||
shardsCreate((struct coord *) matrix.m[3], matrix.m[0], matrix.m[1], matrix.m[2],
|
||||
|
@ -15564,18 +15564,18 @@ void func0f0859a0(struct prop *prop, struct shotdata *shotdata)
|
|||
}
|
||||
|
||||
if (var8005efc0 > 0.0f) {
|
||||
lVar3 = model000225d4(model, &shotdata->unk00, &shotdata->unk0c, &node1);
|
||||
lVar3 = modelTestForHit(model, &shotdata->unk00, &shotdata->unk0c, &node1);
|
||||
|
||||
while (lVar3 > 0) {
|
||||
if (func0f084594(model, node1, &shotdata->unk00, &shotdata->unk0c, &hitthing1, &spe4, &node2)) {
|
||||
break;
|
||||
}
|
||||
|
||||
lVar3 = model000225d4(model, &shotdata->unk00, &shotdata->unk0c, &node1);
|
||||
lVar3 = modelTestForHit(model, &shotdata->unk00, &shotdata->unk0c, &node1);
|
||||
}
|
||||
} else {
|
||||
do {
|
||||
lVar3 = model000225d4(model, &shotdata->unk00, &shotdata->unk0c, &node1);
|
||||
lVar3 = modelTestForHit(model, &shotdata->unk00, &shotdata->unk0c, &node1);
|
||||
|
||||
if (lVar3 > 0 && func0f0849dc(model, node1, &shotdata->unk00, &shotdata->unk0c, &hitthing1, &spe4, &node2)) {
|
||||
break;
|
||||
|
@ -16240,7 +16240,7 @@ void objGetBbox(struct prop *prop, f32 *radius, f32 *ymax, f32 *ymin)
|
|||
*ymin = obj->geocyl->ymin;
|
||||
*ymax = obj->geocyl->ymax;
|
||||
} else {
|
||||
*radius = model0001af80(obj->model);
|
||||
*radius = modelGetEffectiveScale(obj->model);
|
||||
*ymin = obj->geoblock->ymin;
|
||||
*ymax = obj->geoblock->ymax;
|
||||
}
|
||||
|
@ -17640,7 +17640,7 @@ bool func0f0899dc(struct prop *prop, struct coord *arg1, f32 *arg2, f32 *arg3)
|
|||
{
|
||||
if (prop->flags & PROPFLAG_ONTHISSCREENTHISTICK) {
|
||||
struct defaultobj *obj = prop->obj;
|
||||
Mtxf *matrix = model0001a60c(obj->model);
|
||||
Mtxf *matrix = modelGetRootMtx(obj->model);
|
||||
|
||||
arg1->z = matrix->m[3][2];
|
||||
|
||||
|
@ -17699,13 +17699,13 @@ void modelFreeVertices(s32 vtxstoretype, struct model *model)
|
|||
}
|
||||
break;
|
||||
case MODELNODETYPE_DISTANCE:
|
||||
model0001c784(model, node);
|
||||
modelApplyDistanceRelations(model, node);
|
||||
break;
|
||||
case MODELNODETYPE_TOGGLE:
|
||||
model0001c7d0(model, node);
|
||||
modelApplyToggleRelations(model, node);
|
||||
break;
|
||||
case MODELNODETYPE_HEADSPOT:
|
||||
modelAttachHead(model, node);
|
||||
modelApplyHeadRelations(model, node);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -155,7 +155,7 @@ bool setupLoadModeldef(s32 modelnum)
|
|||
{
|
||||
if (g_ModelStates[modelnum].filedata == NULL) {
|
||||
g_ModelStates[modelnum].filedata = modeldefLoadToNew(g_ModelStates[modelnum].fileid);
|
||||
modelCalculateRwDataLen(g_ModelStates[modelnum].filedata);
|
||||
modelAllocateRwData(g_ModelStates[modelnum].filedata);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -560,7 +560,7 @@ void titleInitPdLogo(void)
|
|||
size = ALIGN64(fileGetLoadedSize(g_ModelStates[MODEL_NLOGO].fileid));
|
||||
nextaddr += size;
|
||||
remaining = 0x47800 - size;
|
||||
modelCalculateRwDataLen(g_ModelStates[MODEL_NLOGO].filedata);
|
||||
modelAllocateRwData(g_ModelStates[MODEL_NLOGO].filedata);
|
||||
|
||||
g_TitleModel = modelmgrInstantiateModelWithAnim(g_ModelStates[MODEL_NLOGO].filedata);
|
||||
modelSetScale(g_TitleModel, 1);
|
||||
|
@ -573,7 +573,7 @@ void titleInitPdLogo(void)
|
|||
size = ALIGN64(fileGetLoadedSize(g_ModelStates[MODEL_NLOGO2].fileid));
|
||||
nextaddr += size;
|
||||
remaining -= size;
|
||||
modelCalculateRwDataLen(g_ModelStates[MODEL_NLOGO2].filedata);
|
||||
modelAllocateRwData(g_ModelStates[MODEL_NLOGO2].filedata);
|
||||
|
||||
g_TitleModelNLogo2 = modelmgrInstantiateModelWithAnim(g_ModelStates[MODEL_NLOGO2].filedata);
|
||||
modelSetScale(g_TitleModelNLogo2, 1);
|
||||
|
@ -586,7 +586,7 @@ void titleInitPdLogo(void)
|
|||
size = ALIGN64(fileGetLoadedSize(g_ModelStates[MODEL_PDTWO].fileid));
|
||||
nextaddr += size;
|
||||
remaining -= size;
|
||||
modelCalculateRwDataLen(g_ModelStates[MODEL_PDTWO].filedata);
|
||||
modelAllocateRwData(g_ModelStates[MODEL_PDTWO].filedata);
|
||||
|
||||
g_TitleModelPdTwo = modelmgrInstantiateModelWithoutAnim(g_ModelStates[MODEL_PDTWO].filedata);
|
||||
modelSetScale(g_TitleModelPdTwo, 1);
|
||||
|
@ -600,7 +600,7 @@ void titleInitPdLogo(void)
|
|||
size = ALIGN64(fileGetLoadedSize(g_ModelStates[MODEL_JPNLOGO].fileid));
|
||||
nextaddr += size;
|
||||
remaining -= size;
|
||||
modelCalculateRwDataLen(g_ModelStates[MODEL_JPNLOGO].filedata);
|
||||
modelAllocateRwData(g_ModelStates[MODEL_JPNLOGO].filedata);
|
||||
|
||||
g_TitleModelJpnLogo1 = modelmgrInstantiateModelWithoutAnim(g_ModelStates[MODEL_JPNLOGO].filedata);
|
||||
g_TitleModelJpnLogo2 = modelmgrInstantiateModelWithoutAnim(g_ModelStates[MODEL_JPNLOGO].filedata);
|
||||
|
@ -613,7 +613,7 @@ void titleInitPdLogo(void)
|
|||
size = ALIGN64(fileGetLoadedSize(g_ModelStates[MODEL_JPNPD].fileid));
|
||||
nextaddr += size;
|
||||
remaining -= size;
|
||||
modelCalculateRwDataLen(g_ModelStates[MODEL_JPNPD].filedata);
|
||||
modelAllocateRwData(g_ModelStates[MODEL_JPNPD].filedata);
|
||||
|
||||
g_TitleModelJpnPd = modelmgrInstantiateModelWithoutAnim(g_ModelStates[MODEL_JPNPD].filedata);
|
||||
modelSetScale(g_TitleModelJpnPd, 1);
|
||||
|
@ -627,7 +627,7 @@ void titleInitPdLogo(void)
|
|||
size = ALIGN64(fileGetLoadedSize(g_ModelStates[MODEL_PDTHREE].fileid));
|
||||
nextaddr += size;
|
||||
remaining -= size;
|
||||
modelCalculateRwDataLen(g_ModelStates[MODEL_PDTHREE].filedata);
|
||||
modelAllocateRwData(g_ModelStates[MODEL_PDTHREE].filedata);
|
||||
|
||||
g_TitleModelPdThree = modelmgrInstantiateModelWithoutAnim(g_ModelStates[MODEL_PDTHREE].filedata);
|
||||
modelSetScale(g_TitleModelPdThree, 1);
|
||||
|
@ -886,7 +886,7 @@ Gfx *titleRenderPdLogoModel(Gfx *gdl, struct model *model, bool arg2, f32 arg3,
|
|||
|
||||
model->matrices = renderdata.unk10;
|
||||
|
||||
model0001cc20(model);
|
||||
modelUpdateRelations(model);
|
||||
|
||||
renderdata.flags = 3;
|
||||
renderdata.zbufferenabled = false;
|
||||
|
@ -2518,7 +2518,7 @@ glabel var7f1a8ff4jf
|
|||
/* f019488: 8c4f0000 */ lw $t7,0x0($v0)
|
||||
/* f01948c: 8fb804b0 */ lw $t8,0x4b0($sp)
|
||||
/* f019490: adf8000c */ sw $t8,0xc($t7)
|
||||
/* f019494: 0c0072fc */ jal model0001cc20
|
||||
/* f019494: 0c0072fc */ jal modelUpdateRelations
|
||||
/* f019498: 8c440000 */ lw $a0,0x0($v0)
|
||||
/* f01949c: 8fb80198 */ lw $t8,0x198($sp)
|
||||
/* f0194a0: 240e0005 */ li $t6,0x5
|
||||
|
@ -2812,7 +2812,7 @@ glabel var7f1a8ff4jf
|
|||
/* f0198e4: 8c590000 */ lw $t9,0x0($v0)
|
||||
/* f0198e8: 8fae04b0 */ lw $t6,0x4b0($sp)
|
||||
/* f0198ec: af2e000c */ sw $t6,0xc($t9)
|
||||
/* f0198f0: 0c0072fc */ jal model0001cc20
|
||||
/* f0198f0: 0c0072fc */ jal modelUpdateRelations
|
||||
/* f0198f4: 8c440000 */ lw $a0,0x0($v0)
|
||||
/* f0198f8: 8fa80154 */ lw $t0,0x154($sp)
|
||||
/* f0198fc: 24180005 */ li $t8,0x5
|
||||
|
@ -2928,7 +2928,7 @@ glabel var7f1a8ff4jf
|
|||
/* f019aa4: 8c580000 */ lw $t8,0x0($v0)
|
||||
/* f019aa8: 8fb904b0 */ lw $t9,0x4b0($sp)
|
||||
/* f019aac: af19000c */ sw $t9,0xc($t8)
|
||||
/* f019ab0: 0c0072fc */ jal model0001cc20
|
||||
/* f019ab0: 0c0072fc */ jal modelUpdateRelations
|
||||
/* f019ab4: 8c440000 */ lw $a0,0x0($v0)
|
||||
/* f019ab8: 8fb804e0 */ lw $t8,0x4e0($sp)
|
||||
/* f019abc: 240f0005 */ li $t7,0x5
|
||||
|
@ -7572,7 +7572,7 @@ Gfx *titleRenderPdLogo(Gfx *gdl)
|
|||
|
||||
g_TitleModelJpnLogo2->matrices = renderdata.unk10;
|
||||
|
||||
model0001cc20(g_TitleModelJpnLogo2);
|
||||
modelUpdateRelations(g_TitleModelJpnLogo2);
|
||||
|
||||
renderdata.unk30 = 5;
|
||||
renderdata.zbufferenabled = false;
|
||||
|
@ -7630,7 +7630,7 @@ Gfx *titleRenderPdLogo(Gfx *gdl)
|
|||
|
||||
g_TitleModelJpnPd->matrices = renderdata.unk10;
|
||||
|
||||
model0001cc20(g_TitleModelJpnPd);
|
||||
modelUpdateRelations(g_TitleModelJpnPd);
|
||||
|
||||
renderdata.zbufferenabled = false;
|
||||
renderdata.unk30 = 5;
|
||||
|
@ -7667,7 +7667,7 @@ Gfx *titleRenderPdLogo(Gfx *gdl)
|
|||
|
||||
g_TitleModelJpnLogo1->matrices = renderdata.unk10;
|
||||
|
||||
model0001cc20(g_TitleModelJpnLogo1);
|
||||
modelUpdateRelations(g_TitleModelJpnLogo1);
|
||||
|
||||
renderdata.zbufferenabled = false;
|
||||
renderdata.unk30 = 5;
|
||||
|
@ -7869,7 +7869,7 @@ void titleInitNintendoLogo(void)
|
|||
|
||||
g_ModelStates[MODEL_NINTENDOLOGO].filedata = modeldefLoad(g_ModelStates[MODEL_NINTENDOLOGO].fileid, nextaddr, 0x47800, 0);
|
||||
|
||||
modelCalculateRwDataLen(g_ModelStates[MODEL_NINTENDOLOGO].filedata);
|
||||
modelAllocateRwData(g_ModelStates[MODEL_NINTENDOLOGO].filedata);
|
||||
g_TitleModel = modelmgrInstantiateModelWithoutAnim(g_ModelStates[MODEL_NINTENDOLOGO].filedata);
|
||||
modelSetScale(g_TitleModel, 1);
|
||||
modelSetRootPosition(g_TitleModel, &coord);
|
||||
|
@ -7998,7 +7998,7 @@ Gfx *titleRenderNintendoLogo(Gfx *gdl)
|
|||
mtx4Copy(&sp108, renderdata.unk10);
|
||||
g_TitleModel->matrices = renderdata.unk10;
|
||||
|
||||
model0001cc20(g_TitleModel);
|
||||
modelUpdateRelations(g_TitleModel);
|
||||
|
||||
renderdata.flags = 3;
|
||||
renderdata.zbufferenabled = false;
|
||||
|
@ -8028,7 +8028,7 @@ void titleInitRareLogo(void)
|
|||
|
||||
g_ModelStates[MODEL_RARELOGO].filedata = modeldefLoad(g_ModelStates[MODEL_RARELOGO].fileid, nextaddr, 0x47800, 0);
|
||||
|
||||
modelCalculateRwDataLen(g_ModelStates[MODEL_RARELOGO].filedata);
|
||||
modelAllocateRwData(g_ModelStates[MODEL_RARELOGO].filedata);
|
||||
g_TitleModel = modelmgrInstantiateModelWithoutAnim(g_ModelStates[MODEL_RARELOGO].filedata);
|
||||
modelSetScale(g_TitleModel, 1);
|
||||
modelSetRootPosition(g_TitleModel, &coord);
|
||||
|
@ -8196,7 +8196,7 @@ Gfx *titleRenderRareLogo(Gfx *gdl)
|
|||
|
||||
g_TitleModel->matrices = renderdata.unk10;
|
||||
|
||||
model0001cc20(g_TitleModel);
|
||||
modelUpdateRelations(g_TitleModel);
|
||||
|
||||
rwdata = modelGetNodeRwData(g_TitleModel, modelGetPart(g_TitleModel->filedata, MODELPART_RARELOGO_000B));
|
||||
|
||||
|
|
|
@ -69,13 +69,13 @@ void vtxstoreFixRefs(union modelrwdata *find, union modelrwdata *replacement)
|
|||
}
|
||||
break;
|
||||
case MODELNODETYPE_DISTANCE:
|
||||
model0001c784(obj->model, node);
|
||||
modelApplyDistanceRelations(obj->model, node);
|
||||
break;
|
||||
case MODELNODETYPE_TOGGLE:
|
||||
model0001c7d0(obj->model, node);
|
||||
modelApplyToggleRelations(obj->model, node);
|
||||
break;
|
||||
case MODELNODETYPE_HEADSPOT:
|
||||
modelAttachHead(obj->model, node);
|
||||
modelApplyHeadRelations(obj->model, node);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -2581,6 +2581,9 @@
|
|||
#define MODELPART_0066 0x0066
|
||||
#define MODELPART_0067 0x0067
|
||||
|
||||
#define MODELRENDERFLAG_OPA 1
|
||||
#define MODELRENDERFLAG_XLU 2
|
||||
|
||||
#define MODFILE_GAME 1
|
||||
#define MODFILE_MPSETUP 2
|
||||
#define MODFILE_BOSS 4
|
||||
|
|
|
@ -53,7 +53,7 @@ extern f32 var8005efc0;
|
|||
extern u8 var8005efb0_2;
|
||||
extern u32 var8005efd0;
|
||||
extern bool var8005efd8_2;
|
||||
extern bool var8005efdc;
|
||||
extern bool g_ModelAnimMergingEnabled;
|
||||
extern u32 var8005efe0;
|
||||
extern u32 var8005efec;
|
||||
extern u32 var8005eff8;
|
||||
|
|
|
@ -24,7 +24,7 @@ void chrFlinchBody(struct chrdata *chr);
|
|||
void chrFlinchHead(struct chrdata *chr, f32 arg1);
|
||||
f32 chrGetFlinchAmount(struct chrdata *chr);
|
||||
void chr0f021fa8(struct chrdata *chr, struct coord *pos, s16 *rooms);
|
||||
void chr0f0220ec(struct chrdata *chr, s32 lvupdate240, s32 arg2);
|
||||
void chr0f0220ec(struct chrdata *chr, s32 lvupdate240, bool arg2);
|
||||
void chr0f022214(struct chrdata *chr, struct prop *child, bool fulltick);
|
||||
void chrUpdateCloak(struct chrdata *chr);
|
||||
s32 chrGetCloakAlpha(struct chrdata *chr);
|
||||
|
|
|
@ -10,7 +10,7 @@ struct model *modelmgrInstantiateModel(struct modelfiledata *modelfiledata, bool
|
|||
struct model *modelmgrInstantiateModelWithoutAnim(struct modelfiledata *modelfiledata);
|
||||
void modelmgrFreeModel(struct model *model);
|
||||
struct model *modelmgrInstantiateModelWithAnim(struct modelfiledata *modelfiledata);
|
||||
void modelmgr0f0b32a0(struct model *model, struct modelnode *node, struct modelfiledata *headfiledata);
|
||||
void modelmgrAttachHead(struct model *model, struct modelnode *node, struct modelfiledata *headfiledata);
|
||||
struct anim *modelmgrInstantiateAnim(void);
|
||||
void modelmgrFreeAnim(struct anim *anim);
|
||||
|
||||
|
|
|
@ -11,50 +11,50 @@ extern void (*g_ModelJointPositionedFunc)(s32 mtxindex, Mtxf *mtx);
|
|||
bool model00018680(struct modelrenderdata *renderdata, struct model *model);
|
||||
void modelSetDistanceScale(f32 value);
|
||||
void modelSetVtxAllocatorFunc(struct gfxvtx *(*fn)(s32 numvertices));
|
||||
s32 model0001a524(struct modelnode *node, s32 arg1);
|
||||
Mtxf *model0001a5cc(struct model *model, struct modelnode *node, s32 arg2);
|
||||
Mtxf *model0001a60c(struct model *model);
|
||||
struct modelnode *model0001a634(struct model *model, s32 mtxindex);
|
||||
struct modelnode *model0001a740(struct modelnode *node);
|
||||
struct modelnode *model0001a784(struct modelnode *node);
|
||||
struct modelnode *model0001a7cc(struct modelnode *node);
|
||||
struct modelnode *model0001a85c(struct modelnode *node);
|
||||
s32 modelFindNodeMtxIndex(struct modelnode *node, s32 arg1);
|
||||
Mtxf *modelFindNodeMtx(struct model *model, struct modelnode *node, s32 arg2);
|
||||
Mtxf *modelGetRootMtx(struct model *model);
|
||||
struct modelnode *modelFindNodeByMtxIndex(struct model *model, s32 mtxindex);
|
||||
struct modelnode *modelNodeFindMtxNode(struct modelnode *node);
|
||||
struct modelnode *modelNodeFindParentMtxNode(struct modelnode *node);
|
||||
struct modelnode *modelNodeFindChildMtxNode(struct modelnode *node);
|
||||
struct modelnode *modelNodeFindChildOrParentMtxNode(struct modelnode *node);
|
||||
struct modelnode *modelGetPart(struct modelfiledata *arg0, s32 partnum);
|
||||
void *modelGetPartRodata(struct modelfiledata *modelfiledata, s32 partnum);
|
||||
f32 model0001a9e8(struct model *model);
|
||||
f32 modelGetScreenDistance(struct model *model);
|
||||
void *modelGetNodeRwData(struct model *model, struct modelnode *node);
|
||||
void modelNodeGetPosition(struct model *model, struct modelnode *node, struct coord *pos);
|
||||
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);
|
||||
void modelNodeGetModelRelativePosition(struct model *model, struct modelnode *node, struct coord *pos);
|
||||
f32 model0001ae44(struct model *model);
|
||||
void model0001ae90(struct model *model, f32 angle);
|
||||
f32 modelGetChrRotY(struct model *model);
|
||||
void modelSetChrRotY(struct model *model, f32 angle);
|
||||
void modelSetScale(struct model *model, f32 scale);
|
||||
void modelSetAnimScale(struct model *model, f32 scale);
|
||||
f32 model0001af80(struct model *model);
|
||||
void model0001af98(struct coord *arg0, struct coord *arg1, f32 frac);
|
||||
f32 model0001afe8(f32 arg0, f32 angle, f32 frac);
|
||||
void model0001b07c(struct coord *arg0, struct coord *arg1, f32 mult);
|
||||
void model0001b0e8(struct model *model, struct modelnode *node);
|
||||
void model0001b3bc(struct model *model);
|
||||
void model0001b400(struct modelrenderdata *arg0, struct model *model, struct modelnode *node);
|
||||
f32 modelGetEffectiveScale(struct model *model);
|
||||
void modelTweenPos(struct coord *pos, struct coord *to, f32 frac);
|
||||
f32 modelTweenRotAxis(f32 arg0, f32 angle, f32 frac);
|
||||
void modelTweenRot(struct coord *arg0, struct coord *arg1, f32 mult);
|
||||
void modelUpdateChrInfo(struct model *model, struct modelnode *node);
|
||||
void modelUpdateInfo(struct model *model);
|
||||
void modelUpdateChrNodeMtx(struct modelrenderdata *arg0, struct model *model, struct modelnode *node);
|
||||
void modelPositionJointUsingVecRot(struct modelrenderdata *renderdata, struct model *model, struct modelnode *node, struct coord *rot, struct coord *pos, bool allowscale, struct coord *arg6);
|
||||
void modelPositionJointUsingQuatRot(struct modelrenderdata *renderdata, struct model *model, struct modelnode *node, f32 rot[4], struct coord *pos, struct coord *arg5);
|
||||
void model0001bfa8(struct modelrenderdata *arg0, struct model *model, struct modelnode *node);
|
||||
void model0001c5b4(struct modelrenderdata *arg0, struct model *model, struct modelnode *node);
|
||||
void model0001c664(struct model *model, struct modelnode *node);
|
||||
void model0001c784(struct model *model, struct modelnode *node);
|
||||
void model0001c7d0(struct model *model, struct modelnode *node);
|
||||
void modelAttachHead(struct model *model, struct modelnode *node);
|
||||
void model0001c868(struct modelnode *node, bool visible);
|
||||
void modelRenderNodeReorder(struct model *model, struct modelnode *node);
|
||||
void model0001c950(struct model *model, struct modelnode *node);
|
||||
void model0001cb0c(struct model *model, struct modelnode *node);
|
||||
void model0001cc20(struct model *model);
|
||||
void model0001cd18(struct modelrenderdata *arg0, struct model *model);
|
||||
void model0001ce64(struct modelrenderdata *arg0, struct model *model);
|
||||
void model0001cebc(struct modelrenderdata *renderdata, struct model *model);
|
||||
void modelUpdatePositionNodeMtx(struct modelrenderdata *arg0, struct model *model, struct modelnode *node);
|
||||
void modelUpdatePositionHeldNodeMtx(struct modelrenderdata *arg0, struct model *model, struct modelnode *node);
|
||||
void modelUpdateDistanceRelations(struct model *model, struct modelnode *node);
|
||||
void modelApplyDistanceRelations(struct model *model, struct modelnode *node);
|
||||
void modelApplyToggleRelations(struct model *model, struct modelnode *node);
|
||||
void modelApplyHeadRelations(struct model *model, struct modelnode *node);
|
||||
void modelApplyReorderRelationsByArg(struct modelnode *basenode, bool reverse);
|
||||
void modelApplyReorderRelations(struct model *model, struct modelnode *node);
|
||||
void modelUpdateReorderRelations(struct model *model, struct modelnode *node);
|
||||
void modelUpdateRelationsQuick(struct model *model, struct modelnode *node);
|
||||
void modelUpdateRelations(struct model *model);
|
||||
void modelUpdateMatrices(struct modelrenderdata *arg0, struct model *model);
|
||||
void modelSetMatrices(struct modelrenderdata *arg0, struct model *model);
|
||||
void modelSetMatricesWithAnim(struct modelrenderdata *renderdata, struct model *model);
|
||||
s16 modelGetAnimNum(struct model *model);
|
||||
bool modelIsFlipped(struct model *model);
|
||||
f32 modelGetCurAnimFrame(struct model *model);
|
||||
|
@ -64,7 +64,7 @@ f32 modelGetAnimSpeed(struct model *model);
|
|||
f32 modelGetAbsAnimSpeed(struct model *model);
|
||||
s32 modelConstrainOrWrapAnimFrame(s32 frame, s16 animnum, f32 endframe);
|
||||
void modelCopyAnimForMerge(struct model *model, f32 merge);
|
||||
void model0001d62c(struct model *model, s16 animnum, s32 flip, f32 fstartframe, f32 speed, f32 merge);
|
||||
void modelSetAnimation2(struct model *model, s16 animnum, s32 flip, f32 fstartframe, f32 speed, f32 merge);
|
||||
bool modelIsAnimMerging(struct model *model);
|
||||
void modelSetAnimationWithMerge(struct model *model, s16 animnum, u32 flip, f32 startframe, f32 speed, f32 timemerge, bool domerge);
|
||||
void modelSetAnimation(struct model *model, s16 animnum, s32 flip, f32 fstartframe, f32 speed, f32 merge);
|
||||
|
@ -76,34 +76,34 @@ void modelSetAnimSpeed(struct model *model, f32 speed, f32 startframe);
|
|||
void modelSetAnimSpeedAuto(struct model *model, f32 arg1, f32 startframe);
|
||||
void modelSetAnimPlaySpeed(struct model *model, f32 speed, f32 frame);
|
||||
void modelSetAnim70(struct model *model, void *callback);
|
||||
void model0001e018(struct model *model, f32 startframe);
|
||||
void model0001e14c(struct model *model, f32 arg1, f32 arg2);
|
||||
void model0001e29c(bool value);
|
||||
bool model0001e2a8(void);
|
||||
void model0001e2b4(struct model *model, f32 frame, f32 arg2, f32 frame2, f32 arg4);
|
||||
void model0001ee18(struct model *model, s32 lvupdate240, bool arg2);
|
||||
void model0001f314(struct model *model, s32 lvupdate240, bool arg2);
|
||||
void model0001f7e0(struct modelrenderdata *renderdata);
|
||||
void model0001f890(struct modelrenderdata *renderdata, bool arg1);
|
||||
void model00020248(struct modelrenderdata *renderdata, bool arg1);
|
||||
void model00020bdc(struct modelrenderdata *renderdata);
|
||||
void modelSetAnimFrame(struct model *model, f32 startframe);
|
||||
void modelSetAnimFrame2(struct model *model, f32 arg1, f32 arg2);
|
||||
void modelSetAnimMergingEnabled(bool value);
|
||||
bool modelIsAnimMergingEnabled(void);
|
||||
void modelSetAnimFrame2WithChrStuff(struct model *model, f32 frame, f32 arg2, f32 frame2, f32 arg4);
|
||||
void modelTickAnimQuarterSpeed(struct model *model, s32 lvupdate240, bool arg2);
|
||||
void modelTickAnim(struct model *model, s32 lvupdate240, bool arg2);
|
||||
void modelApplyRenderModeType1(struct modelrenderdata *renderdata);
|
||||
void modelApplyRenderModeType3(struct modelrenderdata *renderdata, bool arg1);
|
||||
void modelApplyRenderModeType4(struct modelrenderdata *renderdata, bool arg1);
|
||||
void modelApplyRenderModeType2(struct modelrenderdata *renderdata);
|
||||
void modelApplyCullMode(struct modelrenderdata *renderdata);
|
||||
void modelRenderNodeGundl(struct modelrenderdata *renderdata, struct model *model, struct modelnode *node);
|
||||
void modelRenderNodeDl(struct modelrenderdata *renderdata, struct model *model, struct modelnode *node);
|
||||
void modelRenderNodeStarGunfire(struct modelrenderdata *renderdata, struct modelnode *node);
|
||||
void model000216cc(struct modelrenderdata *renderdata, struct textureconfig *tconfig, s32 arg2);
|
||||
void modelSelectTexture(struct modelrenderdata *renderdata, struct textureconfig *tconfig, s32 arg2);
|
||||
void modelRenderNodeChrGunfire(struct modelrenderdata *renderdata, struct model *model, struct modelnode *node);
|
||||
void modelRender(struct modelrenderdata *renderdata, struct model *model);
|
||||
bool model000220fc(struct modelrodata_bbox *bbox, Mtxf *mtx, struct coord *arg2, struct coord *arg3);
|
||||
s32 model000225d4(struct model *model, struct coord *arg1, struct coord *arg2, struct modelnode **startnode);
|
||||
bool modelTestBboxNodeForHit(struct modelrodata_bbox *bbox, Mtxf *mtx, struct coord *arg2, struct coord *arg3);
|
||||
s32 modelTestForHit(struct model *model, struct coord *arg1, struct coord *arg2, struct modelnode **startnode);
|
||||
void modelPromoteNodeOffsetsToPointers(struct modelnode *node, u32 vma, u32 fileramaddr);
|
||||
void modelPromoteOffsetsToPointers(struct modelfiledata *filedata, u32 arg1, u32 arg2);
|
||||
s32 modelCalculateRwDataIndexes(struct modelnode *node);
|
||||
void modelCalculateRwDataLen(struct modelfiledata *filedata);
|
||||
void modelAllocateRwData(struct modelfiledata *filedata);
|
||||
void modelInitRwData(struct model *model, struct modelnode *node);
|
||||
void modelInit(struct model *model, struct modelfiledata *filedata, union modelrwdata **rwdatas, bool resetanim);
|
||||
void animInit(struct anim *anim);
|
||||
void model00023108(struct model *model, struct modelfiledata *arg1, struct modelnode *node, struct modelfiledata *arg3);
|
||||
void modelAttachHead(struct model *model, struct modelfiledata *arg1, struct modelnode *node, struct modelfiledata *arg3);
|
||||
void modelIterateDisplayLists(struct modelfiledata *filedata, struct modelnode **nodeptr, Gfx **gdlptr);
|
||||
void modelNodeReplaceGdl(struct modelfiledata *modeldef, struct modelnode *node, Gfx *find, Gfx *replacement);
|
||||
|
||||
|
|
|
@ -422,8 +422,8 @@ struct modelrodata_position { // type 0x02
|
|||
};
|
||||
|
||||
struct modelrodata_gundl { // type 0x04
|
||||
Gfx *primary;
|
||||
Gfx *secondary;
|
||||
Gfx *opagdl;
|
||||
Gfx *xlugdl;
|
||||
void *baseaddr;
|
||||
struct gfxvtx *vertices;
|
||||
s16 numvertices;
|
||||
|
@ -444,7 +444,7 @@ struct modelrodata_reorder { // type 0x09
|
|||
f32 unk0c[3];
|
||||
struct modelnode *unk18;
|
||||
struct modelnode *unk1c;
|
||||
s16 unk20;
|
||||
s16 side;
|
||||
u16 rwdataindex;
|
||||
};
|
||||
|
||||
|
@ -531,8 +531,8 @@ struct modelrodata_headspot { // type 0x17
|
|||
};
|
||||
|
||||
struct modelrodata_dl { // type 0x18
|
||||
/*0x00*/ Gfx *primary;
|
||||
/*0x04*/ Gfx *secondary;
|
||||
/*0x00*/ Gfx *opagdl;
|
||||
/*0x04*/ Gfx *xlugdl;
|
||||
/*0x08*/ u32 *colourtable;
|
||||
/*0x0c*/ struct gfxvtx *vertices; // colours follow this array
|
||||
/*0x10*/ s16 numvertices;
|
||||
|
@ -584,7 +584,7 @@ struct modelfiledata {
|
|||
|
||||
s16 numparts;
|
||||
s16 nummatrices;
|
||||
f32 unk10;
|
||||
f32 scale;
|
||||
s16 rwdatalen; // in words
|
||||
s16 numtexconfigs;
|
||||
struct textureconfig *texconfigs;
|
||||
|
@ -614,7 +614,7 @@ struct modelrwdata_chrinfo { // type 0x01
|
|||
s8 unk02;
|
||||
f32 ground;
|
||||
struct coord pos;
|
||||
f32 unk14; // angle
|
||||
f32 yrot; // angle
|
||||
f32 unk18;
|
||||
f32 unk1c;
|
||||
f32 unk20; // angle
|
||||
|
@ -636,7 +636,7 @@ struct modelrwdata_distance { // type 0x08
|
|||
};
|
||||
|
||||
struct modelrwdata_reorder { // type 0x09
|
||||
bool visible;
|
||||
bool reverse;
|
||||
};
|
||||
|
||||
struct modelrwdata_0b { // type 0x0b
|
||||
|
@ -654,7 +654,7 @@ struct modelrwdata_toggle { // type 0x12
|
|||
};
|
||||
|
||||
struct modelrwdata_headspot { // type 0x17
|
||||
struct modelfiledata *modelfiledata;
|
||||
struct modelfiledata *headmodeldef;
|
||||
void *rwdatas;
|
||||
};
|
||||
|
||||
|
|
493
src/lib/model.c
493
src/lib/model.c
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue