1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-05-09 18:43:45 +00:00

triElemInit -> triElementInit

This commit is contained in:
Dragorn421 2025-02-15 23:18:46 +01:00
parent 7316e25d45
commit 00389b9231
No known key found for this signature in database
GPG key ID: 381AEBAF3D429335
2 changed files with 24 additions and 24 deletions

View file

@ -89,7 +89,7 @@ void BgYdanMaruta_Init(Actor* thisx, PlayState* play) {
f32 sinRotY;
f32 cosRotY;
CollisionHeader* colHeader = NULL;
ColliderTrisElementInit* triElemInit;
ColliderTrisElementInit* triElementInit;
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
Collider_InitTris(play, &this->collider);
@ -99,10 +99,10 @@ void BgYdanMaruta_Init(Actor* thisx, PlayState* play) {
thisx->params = PARAMS_GET_U(thisx->params, 8, 8); // thisx is required to match here
if (this->dyna.actor.params == 0) {
triElemInit = &sTrisElementsInit[0];
triElementInit = &sTrisElementsInit[0];
this->actionFunc = func_808BEFF4;
} else {
triElemInit = &sTrisElementsInit[1];
triElementInit = &sTrisElementsInit[1];
DynaPolyActor_Init(&this->dyna, 0);
CollisionHeader_GetVirtual(&gDTFallingLadderCol, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, thisx, colHeader);
@ -119,16 +119,16 @@ void BgYdanMaruta_Init(Actor* thisx, PlayState* play) {
cosRotY = Math_CosS(this->dyna.actor.shape.rot.y);
for (i = 0; i < 3; i++) {
sp4C[i].x = (triElemInit->dim.vtx[i].x * cosRotY) + this->dyna.actor.world.pos.x;
sp4C[i].y = triElemInit->dim.vtx[i].y + this->dyna.actor.world.pos.y;
sp4C[i].z = this->dyna.actor.world.pos.z - (triElemInit->dim.vtx[i].x * sinRotY);
sp4C[i].x = (triElementInit->dim.vtx[i].x * cosRotY) + this->dyna.actor.world.pos.x;
sp4C[i].y = triElementInit->dim.vtx[i].y + this->dyna.actor.world.pos.y;
sp4C[i].z = this->dyna.actor.world.pos.z - (triElementInit->dim.vtx[i].x * sinRotY);
}
Collider_SetTrisVertices(&this->collider, 0, &sp4C[0], &sp4C[1], &sp4C[2]);
sp4C[1].x = (triElemInit->dim.vtx[2].x * cosRotY) + this->dyna.actor.world.pos.x;
sp4C[1].y = triElemInit->dim.vtx[0].y + this->dyna.actor.world.pos.y;
sp4C[1].z = this->dyna.actor.world.pos.z - (triElemInit->dim.vtx[2].x * sinRotY);
sp4C[1].x = (triElementInit->dim.vtx[2].x * cosRotY) + this->dyna.actor.world.pos.x;
sp4C[1].y = triElementInit->dim.vtx[0].y + this->dyna.actor.world.pos.y;
sp4C[1].z = this->dyna.actor.world.pos.z - (triElementInit->dim.vtx[2].x * sinRotY);
Collider_SetTrisVertices(&this->collider, 1, &sp4C[0], &sp4C[2], &sp4C[1]);
}

View file

@ -95,11 +95,11 @@ static InitChainEntry sInitChain[] = {
void BgYdanSp_Init(Actor* thisx, PlayState* play) {
BgYdanSp* this = (BgYdanSp*)thisx;
ColliderTrisElementInit* triElemInit0 = &sTrisElementsInit[0];
ColliderTrisElementInit* triElementInit0 = &sTrisElementsInit[0];
Vec3f tri[3];
s32 i;
CollisionHeader* colHeader = NULL;
ColliderTrisElementInit* triElemInit1 = &sTrisElementsInit[1];
ColliderTrisElementInit* triElementInit1 = &sTrisElementsInit[1];
f32 cossY;
f32 sinsY;
f32 cossX;
@ -117,9 +117,9 @@ void BgYdanSp_Init(Actor* thisx, PlayState* play) {
this->actionFunc = BgYdanSp_FloorWebIdle;
for (i = 0; i < 3; i++) {
tri[i].x = triElemInit0->dim.vtx[i].x + this->dyna.actor.world.pos.x;
tri[i].y = triElemInit0->dim.vtx[i].y + this->dyna.actor.world.pos.y;
tri[i].z = triElemInit0->dim.vtx[i].z + this->dyna.actor.world.pos.z;
tri[i].x = triElementInit0->dim.vtx[i].x + this->dyna.actor.world.pos.x;
tri[i].y = triElementInit0->dim.vtx[i].y + this->dyna.actor.world.pos.y;
tri[i].z = triElementInit0->dim.vtx[i].z + this->dyna.actor.world.pos.z;
}
Collider_SetTrisVertices(&this->colliderTris, 0, &tri[0], &tri[1], &tri[2]);
@ -137,20 +137,20 @@ void BgYdanSp_Init(Actor* thisx, PlayState* play) {
cossX = Math_CosS(this->dyna.actor.shape.rot.x);
for (i = 0; i < 3; i++) {
tri[i].x = this->dyna.actor.world.pos.x + (cossY * triElemInit1->dim.vtx[i].x) -
(sinsY * triElemInit1->dim.vtx[i].y * nSinsX);
tri[i].y = this->dyna.actor.world.pos.y + (triElemInit1->dim.vtx[i].y * cossX);
tri[i].z = this->dyna.actor.world.pos.z - (sinsY * triElemInit1->dim.vtx[i].x) +
(triElemInit1->dim.vtx[i].y * cossY * nSinsX);
tri[i].x = this->dyna.actor.world.pos.x + (cossY * triElementInit1->dim.vtx[i].x) -
(sinsY * triElementInit1->dim.vtx[i].y * nSinsX);
tri[i].y = this->dyna.actor.world.pos.y + (triElementInit1->dim.vtx[i].y * cossX);
tri[i].z = this->dyna.actor.world.pos.z - (sinsY * triElementInit1->dim.vtx[i].x) +
(triElementInit1->dim.vtx[i].y * cossY * nSinsX);
}
Collider_SetTrisVertices(&this->colliderTris, 0, &tri[0], &tri[1], &tri[2]);
tri[1].x = this->dyna.actor.world.pos.x + (cossY * triElemInit1->dim.vtx[0].x) -
(triElemInit1->dim.vtx[2].y * sinsY * nSinsX);
tri[1].y = this->dyna.actor.world.pos.y + (triElemInit1->dim.vtx[2].y * cossX);
tri[1].z = this->dyna.actor.world.pos.z - (sinsY * triElemInit1->dim.vtx[0].x) +
(triElemInit1->dim.vtx[2].y * cossY * nSinsX);
tri[1].x = this->dyna.actor.world.pos.x + (cossY * triElementInit1->dim.vtx[0].x) -
(triElementInit1->dim.vtx[2].y * sinsY * nSinsX);
tri[1].y = this->dyna.actor.world.pos.y + (triElementInit1->dim.vtx[2].y * cossX);
tri[1].z = this->dyna.actor.world.pos.z - (sinsY * triElementInit1->dim.vtx[0].x) +
(triElementInit1->dim.vtx[2].y * cossY * nSinsX);
Collider_SetTrisVertices(&this->colliderTris, 1, &tri[0], &tri[2], &tri[1]);
}
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);