1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-06 06:10:21 +00:00

Three new matching functions (#492)

* Darkmeiro decompilation

Bg_Gnd_Darkmeiro decompiled, matched, and documented.

* give this a shot

* fix conflict

* one more try

* could be useful

* whoops

* ZAP2 stuff

* ZAP why

* ZAP again

* match

* new matches

* format

* need to kill the asm, too

* whoops dlists

* one more match

* no more temp

* let's fix Gameplay_ChangeCameraStatus while we're at it

* formatted
This commit is contained in:
petrie911 2020-11-19 15:49:08 -06:00 committed by GitHub
parent 930cee3061
commit cf24a76fe4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
56 changed files with 333 additions and 1218 deletions

View file

@ -536,8 +536,8 @@ void func_80985CE8(DemoIm* this, GlobalContext* globalCtx) {
gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 0, this->unk_26C);
gSPSegment(POLY_XLU_DISP++, 0x0C, &D_80116280[0]);
POLY_XLU_DISP = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl,
skelAnime->dListCount, NULL, NULL, NULL, POLY_XLU_DISP);
POLY_XLU_DISP = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount,
NULL, NULL, NULL, POLY_XLU_DISP);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_demo_im_inKenjyanomaDemo02.c", 308);
}

View file

@ -469,8 +469,8 @@ void func_8098F1C0(DemoSa* this, GlobalContext* globalCtx) {
gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 0, this->alpha);
gSPSegment(POLY_XLU_DISP++, 0x0C, D_80116280);
POLY_XLU_DISP = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl,
skelAnime->dListCount, NULL, NULL, NULL, POLY_XLU_DISP);
POLY_XLU_DISP = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount,
NULL, NULL, NULL, POLY_XLU_DISP);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_demo_sa_inKenjyanomaDemo02.c", 325);
}

View file

@ -114,14 +114,12 @@ void DemoShd_Draw(Actor* thisx, GlobalContext* globalCtx) {
gSPDisplayList(POLY_XLU_DISP++, D_809932D0);
if (this->unk_14C & 1) {
gSPDisplayList(POLY_XLU_DISP++,
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 0x3FF - ((unk_14E * 5) & 0x3FF), 16, 256, 1, 0,
255 - ((unk_14E * 5) & 255), 32, 32));
gSPDisplayList(POLY_XLU_DISP++, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 0x3FF - ((unk_14E * 5) & 0x3FF),
16, 256, 1, 0, 255 - ((unk_14E * 5) & 255), 32, 32));
gSPDisplayList(POLY_XLU_DISP++, D_80993390);
} else if (this->unk_14C & 2) {
gSPDisplayList(POLY_XLU_DISP++,
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 0x3FF - ((unk_14E * 5) & 0x3FF), 16, 256, 1, 0,
255 - ((unk_14E * 5) & 255), 32, 32));
gSPDisplayList(POLY_XLU_DISP++, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 0x3FF - ((unk_14E * 5) & 0x3FF),
16, 256, 1, 0, 255 - ((unk_14E * 5) & 255), 32, 32));
gSPDisplayList(POLY_XLU_DISP++, D_809934B8);
}

View file

@ -183,12 +183,11 @@ s32 func_809B55EC(EnAttackNiw* this, GlobalContext* globalCtx) {
}
#ifdef NON_MATCHING
// Stack, every variable off by 4 bytes
// &this->actor.posRot.pos stored at wrong place
void func_809B5670(EnAttackNiw* this, GlobalContext* globalCtx) {
Vec3f* pos = &this->actor.posRot.pos;
f32 tmpf1;
s16 sp4E;
s16 sp4C;
f32 tmpf1;
f32 tmpf2;
f32 tmpf3;
Vec3f sp34;
@ -203,13 +202,17 @@ void func_809B5670(EnAttackNiw* this, GlobalContext* globalCtx) {
sp34.y = globalCtx->view.lookAt.y + tmpf2;
sp34.z = globalCtx->view.lookAt.z + tmpf3;
this->unk_2D4 = Math_Vec3f_Yaw(pos, &sp34);
this->unk_2D0 = (Math_Vec3f_Pitch(pos, &sp34) * -1.0f);
if (1) {}
this->unk_2D4 = Math_Vec3f_Yaw(&this->actor.posRot.pos, &sp34);
this->unk_2D0 = Math_Vec3f_Pitch(&this->actor.posRot.pos, &sp34) * -1.0f;
Math_SmoothScaleMaxMinS(&this->actor.posRot.rot.y, this->unk_2D4, 5, this->unk_2DC, 0);
Math_SmoothScaleMaxMinS(&this->actor.posRot.rot.x, this->unk_2D0, 5, this->unk_2DC, 0);
Math_SmoothScaleMaxF(&this->unk_2DC, 5000.0f, 1.0f, 100.0f);
Actor_SetHeight(&this->actor, this->unk_2E4);
func_8002F374(globalCtx, &this->actor, &sp4E, &sp4C);
if (this->actor.bgCheckFlags & 8) {
this->unk_2D4 = this->actor.yawTowardsLink;
this->unk_2D0 = this->actor.posRot.rot.x - 3000.0f;
@ -224,10 +227,11 @@ void func_809B5670(EnAttackNiw* this, GlobalContext* globalCtx) {
(fabsf(sp34.y - this->actor.posRot.pos.y) < 50.0f) &&
(fabsf(sp34.z - this->actor.posRot.pos.z) < 50.0f)) ||
(this->actor.bgCheckFlags & 1)) {
this->unk_254 = this->unk_256 = this->unk_258 = this->unk_25A = 0;
this->unk_284 = this->unk_27C = this->unk_2DC = 0.0f;
this->unk_2D4 = this->actor.yawTowardsLink;
this->unk_2D0 = this->actor.posRot.rot.x - 2000.0f;
this->unk_284 = this->unk_27C = this->unk_2DC = 0.0f;
this->unk_254 = this->unk_256 = this->unk_258 = this->unk_25A = 0;
this->actor.gravity = -0.2f;
this->unk_2E0 = 5.0f;
this->unk_288 = 0.0f;

View file

@ -646,7 +646,7 @@ void EnBox_Draw(Actor* thisx, GlobalContext* globalCtx) {
gSPSegment(POLY_OPA_DISP++, 0x08, EnBox_EmptyDList(globalCtx->state.gfxCtx));
func_80093D18(globalCtx->state.gfxCtx);
POLY_OPA_DISP = SkelAnime_Draw2(globalCtx, this->skelanime.skeleton, this->skelanime.limbDrawTbl, NULL,
EnBox_PostLimbDraw, &this->dyna.actor, POLY_OPA_DISP);
EnBox_PostLimbDraw, &this->dyna.actor, POLY_OPA_DISP);
} else if (this->alpha != 0) {
gDPPipeSync(POLY_XLU_DISP++);
func_80093D84(globalCtx->state.gfxCtx);
@ -657,7 +657,7 @@ void EnBox_Draw(Actor* thisx, GlobalContext* globalCtx) {
gSPSegment(POLY_XLU_DISP++, 0x08, func_809CA4A0(globalCtx->state.gfxCtx));
}
POLY_XLU_DISP = SkelAnime_Draw2(globalCtx, this->skelanime.skeleton, this->skelanime.limbDrawTbl, NULL,
EnBox_PostLimbDraw, &this->dyna.actor, POLY_XLU_DISP);
EnBox_PostLimbDraw, &this->dyna.actor, POLY_XLU_DISP);
}
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_box.c", 1639);

View file

@ -122,8 +122,7 @@ void EnDyExtra_Draw(Actor* thisx, GlobalContext* globalCtx) {
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, primColors[this->type].r, primColors[this->type].g,
primColors[this->type].b, 255);
gDPSetEnvColor(POLY_XLU_DISP++, envColors[this->type].r, envColors[this->type].g, envColors[this->type].b,
128);
gDPSetEnvColor(POLY_XLU_DISP++, envColors[this->type].r, envColors[this->type].g, envColors[this->type].b, 128);
gSPDisplayList(POLY_XLU_DISP++, D_0601C160);
CLOSE_DISPS(gfxCtx, "../z_en_dy_extra.c", 325);

View file

@ -572,8 +572,6 @@ void func_80A03018(EnElf* this, GlobalContext* globalCtx) {
Actor_MoveForward(&this->actor);
}
#ifdef NON_MATCHING
// slight ordering and regalloc
void func_80A03148(EnElf* this, Vec3f* arg1, f32 arg2, f32 arg3, f32 arg4) {
f32 xVelTarget;
f32 zVelTarget;
@ -582,27 +580,25 @@ void func_80A03148(EnElf* this, Vec3f* arg1, f32 arg2, f32 arg3, f32 arg4) {
xVelTarget = ((arg1->x + this->unk_28C.x) - this->actor.posRot.pos.x) * arg4;
zVelTarget = ((arg1->z + this->unk_28C.z) - this->actor.posRot.pos.z) * arg4;
arg4 += 0.3f;
arg3 += 30.0f;
func_80A02BD8(this, arg1, arg4 + 0.3f);
func_80A02BD8(this, arg1, arg4);
xzVelocity = sqrtf(SQ(xVelTarget) + SQ(zVelTarget));
clampedXZ = CLAMP(xzVelocity, arg2, arg3);
this->actor.speedXZ = clampedXZ;
this->actor.speedXZ = clampedXZ = CLAMP(xzVelocity, arg2, arg3);
if ((xzVelocity != clampedXZ) && (xzVelocity != 0.0f)) {
zVelTarget *= (clampedXZ / xzVelocity);
xVelTarget *= (clampedXZ / xzVelocity);
xzVelocity = clampedXZ / xzVelocity;
xVelTarget *= xzVelocity;
zVelTarget *= xzVelocity;
}
Math_ApproxF(&this->actor.velocity.x, xVelTarget, 5.0f);
Math_ApproxF(&this->actor.velocity.z, zVelTarget, 5.0f);
func_8002D7EC(this);
func_8002D7EC(&this->actor);
}
#else
void func_80A03148(EnElf* this, Vec3f* arg1, f32 arg2, f32 arg3, f32 arg4);
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Elf/func_80A03148.s")
#endif
void func_80A0329C(EnElf* this, GlobalContext* globalCtx) {
Player* refActor = PLAYER;
@ -839,8 +835,6 @@ void EnElf_UpdateLights(EnElf* this, GlobalContext* globalCtx) {
Actor_SetScale(&this->actor, this->actor.scale.x);
}
#ifdef NON_MATCHING
// float regalloc
void func_80A03CF8(EnElf* this, GlobalContext* globalCtx) {
Vec3f nextPos;
Vec3f prevPos;
@ -897,13 +891,14 @@ void func_80A03CF8(EnElf* this, GlobalContext* globalCtx) {
switch (this->unk_2A8) {
case 7:
func_80A02C98(this, &player->bodyPartsPos[8], 1.0f - this->unk_2AE * 0.033333335f);
xScale =
1.0f - ((Math_Vec3f_DistXYZ(&player->bodyPartsPos[8], &this->actor.posRot.pos) - 5.0f) * 0.05f);
xScale = Math_Vec3f_DistXYZ(&player->bodyPartsPos[8], &this->actor.posRot.pos);
if (distFromLinksHead < 7.0f) {
this->unk_2C0 = 0;
xScale = 0.0f;
} else if (distFromLinksHead < 25.0f) {
xScale = (xScale - 5.0f) * 0.05f;
xScale = 1.0f - xScale;
xScale = (1.0f - SQ(xScale)) * 0.008f;
} else {
xScale = 0.008f;
@ -917,7 +912,7 @@ void func_80A03CF8(EnElf* this, GlobalContext* globalCtx) {
break;
case 11:
nextPos = player->bodyPartsPos[8];
nextPos.y += this->actor.scale.y * 1500.0f;
nextPos.y += 1500.0f * this->actor.scale.y;
func_80A02E30(this, &nextPos);
EnElf_SpawnSparkles(this, globalCtx, 16);
@ -990,9 +985,6 @@ void func_80A03CF8(EnElf* this, GlobalContext* globalCtx) {
EnElf_UpdateLights(this, globalCtx);
}
#else
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Elf/func_80A03CF8.s")
#endif
void EnElf_ChangeColor(Color_RGBAf* dest, Color_RGBAf* newColor, Color_RGBAf* curColor, f32 rate) {
Color_RGBAf rgbaDiff;
@ -1097,54 +1089,52 @@ void func_80A0461C(EnElf* this, GlobalContext* globalCtx) {
if ((player->stateFlags1 & 0x400) || ((YREG(15) & 0x10) && func_800BC56C(globalCtx, 2))) {
temp = 12;
this->unk_2C0 = 100;
} else {
if ((arrowPointedActor == NULL) || (temp = 1, (arrowPointedActor->type == ACTORTYPE_NPC))) {
if (arrowPointedActor != NULL) {
this->unk_2C0 = 100;
player->stateFlags2 |= 0x100000;
temp = 0;
} else {
switch (this->unk_2A8) {
case 0:
if (this->unk_2C0 != 0) {
this->unk_2C0--;
temp = 0;
} else {
if (this->unk_2C7 == 0) {
Audio_PlayActorSound2(&this->actor, NA_SE_EV_NAVY_VANISH);
}
temp = 7;
}
break;
case 7:
if (this->unk_2C0 != 0) {
if (this->unk_2AE > 0) {
this->unk_2AE--;
temp = 7;
} else {
player->stateFlags2 |= 0x100000;
temp = 0;
}
} else {
temp = 8;
func_80A029A8(this, 10);
}
break;
case 8:
temp = 8;
break;
case 11:
temp = this->unk_2A8;
if (this->unk_2C0 > 0) {
this->unk_2C0--;
} else {
temp = 0;
}
break;
default:
} else if ((arrowPointedActor == NULL) || (temp = 1, (arrowPointedActor->type == ACTORTYPE_NPC))) {
if (arrowPointedActor != NULL) {
this->unk_2C0 = 100;
player->stateFlags2 |= 0x100000;
temp = 0;
} else {
switch (this->unk_2A8) {
case 0:
if (this->unk_2C0 != 0) {
this->unk_2C0--;
temp = 0;
break;
}
} else {
if (this->unk_2C7 == 0) {
Audio_PlayActorSound2(&this->actor, NA_SE_EV_NAVY_VANISH);
}
temp = 7;
}
break;
case 7:
if (this->unk_2C0 != 0) {
if (this->unk_2AE > 0) {
this->unk_2AE--;
temp = 7;
} else {
player->stateFlags2 |= 0x100000;
temp = 0;
}
} else {
temp = 8;
func_80A029A8(this, 10);
}
break;
case 8:
temp = 8;
break;
case 11:
temp = this->unk_2A8;
if (this->unk_2C0 > 0) {
this->unk_2C0--;
} else {
temp = 0;
}
break;
default:
temp = 0;
break;
}
}
}
@ -1540,7 +1530,7 @@ void EnElf_Draw(Actor* thisx, GlobalContext* globalCtx) {
gDPSetEnvColor(POLY_XLU_DISP++, (u8)this->outerColor.r, (u8)this->outerColor.g, (u8)this->outerColor.b,
(u8)(envAlpha * alphaScale));
POLY_XLU_DISP = SkelAnime_Draw2(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl,
EnElf_OverrideLimbDraw, NULL, &this->actor, POLY_XLU_DISP);
EnElf_OverrideLimbDraw, NULL, &this->actor, POLY_XLU_DISP);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_elf.c", 2793);
}

View file

@ -179,22 +179,22 @@ void func_80A59014(EnHoll* this, GlobalContext* globalCtx) {
TransitionActorEntry* transitionEntry;
f32 planeHalfWidth;
s32 pad2;
Player* player = PLAYER;
s32 useViewEye = D_8011D394 != 0 || globalCtx->csCtx.state != 0;
s32 transitionActorIdx;
f32 absZ;
s32 side;
Player* player = PLAYER;
func_8002DBD0(&this->actor, &vec, (useViewEye) ? &globalCtx->view.eye : &player->actor.posRot.pos);
planeHalfWidth = (((this->actor.params >> 6) & 7) == 6) ? PLANE_HALFWIDTH : PLANE_HALFWIDTH_2;
if (EnHoll_IsKokiriSetup8() || (vec.y > PLANE_Y_MIN && vec.y < PLANE_Y_MAX && fabsf(vec.x) < planeHalfWidth &&
(absZ = fabsf(vec.z), (absZ < 100.0f && absZ > 50.0f)))) {
fabsf(vec.z) < 100.0f && fabsf(vec.z) > 50.0f)) {
transitionActorIdx = (u16)this->actor.params >> 0xA;
side = (vec.z < 0.0f) ? 0 : 1;
transitionEntry = &globalCtx->transitionActorList[transitionActorIdx];
this->actor.room = transitionEntry->sides[side].room;
if (this->actor.room != globalCtx->roomCtx.curRoom.num &&
func_8009728C(globalCtx, &globalCtx->roomCtx, (u32)this->actor.room) != 0) {
func_8009728C(globalCtx, &globalCtx->roomCtx, (u32)this->actor.room)) {
EnHoll_SetupAction(this, EnHoll_NextAction);
}
}

View file

@ -261,25 +261,26 @@ void func_80A7C598(EnInsect* this) {
this->unk_314 |= 0x100;
}
#ifdef NON_MATCHING
// a stack offset is wrong
void func_80A7C5EC(EnInsect* this, GlobalContext* globalCtx) {
s32 pad[2];
s32 pad1;
s32 pad2;
s16 yaw;
s16 sp34 = this->actor.params & 3;
Math_SmoothScaleMaxMinF(&this->actor.speedXZ, 1.5f, 0.1f, 0.5f, 0.0f);
if (EnInsect_XZDistanceSquared(&this->actor.posRot.pos, &this->actor.initPosRot.pos) > 1600.0f ||
(this->unk_31A < 4)) {
Math_ApproxUpdateScaledS(&this->actor.posRot.rot.y,
Math_Vec3f_Yaw(&this->actor.posRot.pos, &this->actor.initPosRot.pos), 2000);
yaw = Math_Vec3f_Yaw(&this->actor.posRot.pos, &this->actor.initPosRot.pos);
Math_ApproxUpdateScaledS(&this->actor.posRot.rot.y, yaw, 2000);
} else if (this->actor.child != NULL && &this->actor != this->actor.child) {
Math_ApproxUpdateScaledS(&this->actor.posRot.rot.y,
Math_Vec3f_Yaw(&this->actor.posRot.pos, &this->actor.child->posRot.pos), 2000);
yaw = Math_Vec3f_Yaw(&this->actor.posRot.pos, &this->actor.child->posRot.pos);
Math_ApproxUpdateScaledS(&this->actor.posRot.rot.y, yaw, 2000);
}
this->actor.shape.rot.y = this->actor.posRot.rot.y;
this->skelAnime.animPlaybackSpeed = CLAMP(this->actor.speedXZ * 1.4f, 0.7f, 1.9f);
SkelAnime_FrameUpdateMatrix(&this->skelAnime);
if (this->unk_31A <= 0) {
@ -295,9 +296,6 @@ void func_80A7C5EC(EnInsect* this, GlobalContext* globalCtx) {
func_80A7C818(this);
}
}
#else
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Insect/func_80A7C5EC.s")
#endif
void func_80A7C818(EnInsect* this) {
this->unk_31A = Math_Rand_S16Offset(10, 40);
@ -309,40 +307,40 @@ void func_80A7C818(EnInsect* this) {
#ifdef NON_MATCHING
// regalloc, minor reordering
void func_80A7C86C(EnInsect* this, GlobalContext* globalCtx) {
s32 pad[3];
s16 phi_a1;
s16 sp38;
sp38 = 0;
if (this->actor.xzDistFromLink < 40.0f) {
sp38 = 1;
}
s32 pad[2];
s16 pad2;
s16 frames;
s16 yaw;
s16 sp38 = this->actor.xzDistFromLink < 40.0f;
Math_SmoothScaleMaxMinF(&this->actor.speedXZ, 1.8f, 0.1f, 0.5f, 0.0f);
if (EnInsect_XZDistanceSquared(&this->actor.posRot.pos, &this->actor.initPosRot.pos) > 25600.0f ||
this->unk_31A < 4) {
Math_ApproxUpdateScaledS(&this->actor.posRot.rot.y,
Math_Vec3f_Yaw(&this->actor.posRot.pos, &this->actor.initPosRot.pos), 2000);
yaw = Math_Vec3f_Yaw(&this->actor.posRot.pos, &this->actor.initPosRot.pos);
Math_ApproxUpdateScaledS(&this->actor.posRot.rot.y, yaw, 2000);
} else if (sp38 != 0) {
phi_a1 = this->actor.yawTowardsLink + 0x8000;
frames = globalCtx->state.frames;
yaw = this->actor.yawTowardsLink + 0x8000;
if ((s16)globalCtx->state.frames & 0x10) {
if ((s16)globalCtx->state.frames & 0x20) {
phi_a1 += 0x2000;
if (frames & 0x10) {
if (frames & 0x20) {
yaw += 0x2000;
}
} else {
if (frames & 0x20) {
yaw -= 0x2000;
}
} else if ((s16)globalCtx->state.frames & 0x20) {
phi_a1 -= 0x2000;
}
Math_ApproxUpdateScaledS(&this->actor.posRot.rot.y, phi_a1, 2000);
Math_ApproxUpdateScaledS(&this->actor.posRot.rot.y, yaw, 2000);
}
this->actor.shape.rot.y = this->actor.posRot.rot.y;
this->skelAnime.animPlaybackSpeed = CLAMP(this->actor.speedXZ * 1.6f, 0.8f, 1.9f);
SkelAnime_FrameUpdateMatrix(&this->skelAnime);
if (this->unk_31A <= 0 || sp38 == 0) {
if (this->unk_31A <= 0 || !sp38) {
func_80A7C3A0(this);
} else if ((this->unk_314 & 1) && (this->actor.bgCheckFlags & 0x40)) {
func_80A7CE60(this);

View file

@ -174,8 +174,7 @@ void EnLight_Draw(Actor* thisx, GlobalContext* globalCtx) {
dList = D_0404D4E0;
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, flameParams->primColor.r, flameParams->primColor.g,
flameParams->primColor.b, flameParams->primColor.a);
gDPSetEnvColor(POLY_XLU_DISP++, flameParams->envColor.r, flameParams->envColor.g, flameParams->envColor.b,
0);
gDPSetEnvColor(POLY_XLU_DISP++, flameParams->envColor.r, flameParams->envColor.g, flameParams->envColor.b, 0);
} else {
gSPSegment(POLY_XLU_DISP++, 0x08,
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 0, 16, 32, 1, ((this->timer * 2) & 63),

View file

@ -871,8 +871,8 @@ void EnRd_Draw(Actor* thisx, GlobalContext* globalCtx) {
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, this->unk_314);
gSPSegment(POLY_OPA_DISP++, 8, &D_80116280[2]);
POLY_OPA_DISP = SkelAnime_DrawSV2(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl,
this->skelAnime.dListCount, EnRd_OverrideLimbDraw, EnRd_PostLimbDraw,
&this->actor, POLY_OPA_DISP);
this->skelAnime.dListCount, EnRd_OverrideLimbDraw, EnRd_PostLimbDraw,
&this->actor, POLY_OPA_DISP);
func_80033C30(&thisPos, &D_80AE4958, 255, globalCtx);
if (this->unk_31A != 0) {
this->actor.dmgEffectTimer++;
@ -886,9 +886,9 @@ void EnRd_Draw(Actor* thisx, GlobalContext* globalCtx) {
func_80093D84(globalCtx->state.gfxCtx);
gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 0, this->unk_314);
gSPSegment(POLY_XLU_DISP++, 8, &D_80116280[0]);
POLY_XLU_DISP = SkelAnime_DrawSV2(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl,
this->skelAnime.dListCount, EnRd_OverrideLimbDraw, NULL, &this->actor,
POLY_XLU_DISP);
POLY_XLU_DISP =
SkelAnime_DrawSV2(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl,
this->skelAnime.dListCount, EnRd_OverrideLimbDraw, NULL, &this->actor, POLY_XLU_DISP);
func_80033C30(&thisPos, &D_80AE4958, this->unk_314, globalCtx);
}

View file

@ -316,8 +316,8 @@ void func_80AE7D94(EnRl* this, GlobalContext* globalCtx) {
gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 0, this->alpha);
gSPSegment(POLY_XLU_DISP++, 0x0C, D_80116280);
POLY_XLU_DISP = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl,
skelAnime->dListCount, NULL, NULL, NULL, POLY_XLU_DISP);
POLY_XLU_DISP = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount,
NULL, NULL, NULL, POLY_XLU_DISP);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_rl_inKenjyanomaDemo02.c", 331);
}

View file

@ -2366,9 +2366,8 @@ void func_80AF0400(EnRu1* this, GlobalContext* globalCtx) {
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255);
gSPSegment(POLY_OPA_DISP++, 0x0C, &D_80116280[2]);
POLY_OPA_DISP =
SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount,
EnRu1_OverrideLimbDraw, EnRu1_PostLimbDraw, &this->actor, POLY_OPA_DISP);
POLY_OPA_DISP = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount,
EnRu1_OverrideLimbDraw, EnRu1_PostLimbDraw, &this->actor, POLY_OPA_DISP);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_ru1.c", 1309);
}
@ -2392,9 +2391,8 @@ void func_80AF05D4(EnRu1* this, GlobalContext* globalCtx) {
gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 0, this->unk_2A8);
gSPSegment(POLY_XLU_DISP++, 0x0C, &D_80116280[0]);
POLY_XLU_DISP =
SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount,
EnRu1_OverrideLimbDraw, NULL, &this->actor, POLY_XLU_DISP);
POLY_XLU_DISP = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount,
EnRu1_OverrideLimbDraw, NULL, &this->actor, POLY_XLU_DISP);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_ru1.c", 1353);
}

View file

@ -485,8 +485,8 @@ void func_80AF321C(EnRu2* this, GlobalContext* globalCtx) {
gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 0, this->alpha);
gSPSegment(POLY_XLU_DISP++, 0x0C, &D_80116280[0]);
POLY_XLU_DISP = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl,
skelAnime->dListCount, NULL, NULL, NULL, POLY_XLU_DISP);
POLY_XLU_DISP = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount,
NULL, NULL, NULL, POLY_XLU_DISP);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_ru2_inKenjyanomaDemo02.c", 291);
}

View file

@ -39,7 +39,7 @@ const ActorInit En_Tubo_Trap_InitVars = {
(ActorFunc)EnTuboTrap_Draw,
};
extern UNK_TYPE D_05017A60;
extern Gfx D_05017A60[];
extern Gfx D_05017870[];
void EnTuboTrap_Init(Actor* thisx, GlobalContext* globalCtx) {
@ -65,7 +65,7 @@ void EnTuboTrap_DropCollectible(EnTuboTrap* this, GlobalContext* globalCtx) {
s16 param3FF = (params >> 6) & 0x3FF;
if (param3FF >= 0 && param3FF < 0x1A) {
Item_DropCollectible(globalCtx, &this->actor.posRot, param3FF | ((params & 0x3F) << 8));
Item_DropCollectible(globalCtx, &this->actor.posRot.pos, param3FF | ((params & 0x3F) << 8));
}
}
@ -106,7 +106,7 @@ void EnTuboTrap_SpawnEffectsOnLand(EnTuboTrap* this, GlobalContext* globalCtx) {
EffectSsKakera_Spawn(globalCtx, &pos, &velocity, actorPos, -240, arg5, 10, 10, 0,
(Math_Rand_ZeroOne() * 65.0f) + 15.0f, 0, 32, 60, KAKERA_COLOR_NONE,
OBJECT_GAMEPLAY_DANGEON_KEEP, &D_05017A60);
OBJECT_GAMEPLAY_DANGEON_KEEP, D_05017A60);
}
func_80033480(globalCtx, actorPos, 30.0f, 4, 20, 50, 0);
@ -152,7 +152,7 @@ void EnTuboTrap_SpawnEffectsInWater(EnTuboTrap* this, GlobalContext* globalCtx)
EffectSsKakera_Spawn(globalCtx, &pos, &velocity, actorPos, -180, arg5, 30, 30, 0,
(Math_Rand_ZeroOne() * 65.0f) + 15.0f, 0, 32, 70, KAKERA_COLOR_NONE,
OBJECT_GAMEPLAY_DANGEON_KEEP, &D_05017A60);
OBJECT_GAMEPLAY_DANGEON_KEEP, D_05017A60);
}
}
@ -224,7 +224,7 @@ void EnTuboTrap_WaitForProximity(EnTuboTrap* this, GlobalContext* globalCtx) {
}
if (this->actor.xzDistFromLink < 200.0f && this->actor.posRot.pos.y <= player->actor.posRot.pos.y) {
Actor_ChangeType(globalCtx, &globalCtx->actorCtx, this, ACTORTYPE_ENEMY);
Actor_ChangeType(globalCtx, &globalCtx->actorCtx, &this->actor, ACTORTYPE_ENEMY);
this->actor.flags |= 1;
targetHeight = 40.0f + -10.0f * gSaveContext.linkAge;
@ -234,7 +234,7 @@ void EnTuboTrap_WaitForProximity(EnTuboTrap* this, GlobalContext* globalCtx) {
}
this->originPos = this->actor.posRot.pos;
Audio_PlayActorSound2(this, NA_SE_EV_POT_MOVE_START);
Audio_PlayActorSound2(&this->actor, NA_SE_EV_POT_MOVE_START);
this->actionFunc = EnTuboTrap_Levitate;
}
}
@ -274,8 +274,8 @@ void EnTuboTrap_Update(Actor* thisx, GlobalContext* globalCtx) {
func_8002E4B4(globalCtx, &this->actor, 10.0f, 10.0f, 20.0f, 0x1D);
Actor_SetHeight(&this->actor, 0.0f);
Collider_CylinderUpdate(&this->actor, &this->collider);
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider);
CollisionCheck_SetAT(globalCtx, &globalCtx->colChkCtx, &this->collider);
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
CollisionCheck_SetAT(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
}
void EnTuboTrap_Draw(Actor* thisx, GlobalContext* globalCtx) {

View file

@ -1694,9 +1694,8 @@ void func_80B523C8(EnZl2* this, GlobalContext* globalCtx) {
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255);
gSPSegment(POLY_OPA_DISP++, 0x0B, &D_80116280[2]);
POLY_OPA_DISP =
SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount,
EnZl2_OverrideLimbDraw, EnZl2_PostLimbDraw, &this->actor, POLY_OPA_DISP);
POLY_OPA_DISP = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount,
EnZl2_OverrideLimbDraw, EnZl2_PostLimbDraw, &this->actor, POLY_OPA_DISP);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_zl2.c", 1648);
}
@ -1720,9 +1719,8 @@ void func_80B525D4(EnZl2* this, GlobalContext* globalCtx) {
gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 0, this->alpha);
gSPSegment(POLY_XLU_DISP++, 0x0B, &D_80116280[0]);
POLY_XLU_DISP =
SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount,
EnZl2_OverrideLimbDraw, NULL, &this->actor, POLY_XLU_DISP);
POLY_XLU_DISP = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount,
EnZl2_OverrideLimbDraw, NULL, &this->actor, POLY_XLU_DISP);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_zl2.c", 1692);
}

View file

@ -89,43 +89,43 @@ void EndTitle_Draw(Actor* thisx, GlobalContext* globalCtx) {
gDPSetRenderMode(OVERLAY_DISP++, G_RM_PASS, G_RM_XLU_SURF2);
gSPClearGeometryMode(OVERLAY_DISP++,
G_TEXTURE_ENABLE | G_CULL_BACK | G_FOG | G_LIGHTING | G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR);
gDPSetCombineLERP(OVERLAY_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, 0, 0,
0, COMBINED, 0, 0, 0, COMBINED);
gDPSetCombineLERP(OVERLAY_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0,
COMBINED, 0, 0, 0, COMBINED);
gDPSetPrimColor(OVERLAY_DISP++, 0x00, 0x80, 0, 0, 0, this->endAlpha);
gDPSetTextureImage(OVERLAY_DISP++, G_IM_FMT_IA, G_IM_SIZ_8b, 80, D_80B670E0);
gDPSetTile(OVERLAY_DISP++, G_IM_FMT_IA, G_IM_SIZ_8b, 11, 0x0, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_NOMIRROR,
0, 0, G_TX_NOMIRROR | G_TX_NOMIRROR, 0, 0);
gDPSetTile(OVERLAY_DISP++, G_IM_FMT_IA, G_IM_SIZ_8b, 11, 0x0, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_NOMIRROR, 0, 0,
G_TX_NOMIRROR | G_TX_NOMIRROR, 0, 0);
gDPLoadSync(OVERLAY_DISP++);
gDPLoadTile(OVERLAY_DISP++, G_TX_LOADTILE, 0, 0, (80 << 2), (24 << 2));
gDPPipeSync(OVERLAY_DISP++);
gDPSetTile(OVERLAY_DISP++, G_IM_FMT_IA, G_IM_SIZ_8b, 11, 0x0, G_TX_RENDERTILE, 0,
G_TX_NOMIRROR | G_TX_NOMIRROR, 0, 0, G_TX_NOMIRROR | G_TX_NOMIRROR, 0, 0);
gDPSetTile(OVERLAY_DISP++, G_IM_FMT_IA, G_IM_SIZ_8b, 11, 0x0, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_NOMIRROR, 0,
0, G_TX_NOMIRROR | G_TX_NOMIRROR, 0, 0);
gDPSetTileSize(OVERLAY_DISP++, G_TX_RENDERTILE, 0, 0, (80 << 2), (24 << 2));
gSPTextureRectangle(OVERLAY_DISP++, (120 << 2), (90 << 2), (200 << 2), (113 << 2), G_TX_RENDERTILE, 0, 0,
(32 << 5), (32 << 5));
gSPTextureRectangle(OVERLAY_DISP++, (120 << 2), (90 << 2), (200 << 2), (113 << 2), G_TX_RENDERTILE, 0, 0, (32 << 5),
(32 << 5));
gDPPipeSync(OVERLAY_DISP++);
gDPSetPrimColor(OVERLAY_DISP++, 0x00, 0x80, 0, 0, 0, this->tlozAlpha);
gDPSetTextureImage(OVERLAY_DISP++, G_IM_FMT_IA, G_IM_SIZ_8b, 120, D_80B65EA0);
gDPSetTile(OVERLAY_DISP++, G_IM_FMT_IA, G_IM_SIZ_8b, 16, 0x0, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_NOMIRROR,
0, 0, G_TX_NOMIRROR | G_TX_NOMIRROR, 0, 0);
gDPSetTile(OVERLAY_DISP++, G_IM_FMT_IA, G_IM_SIZ_8b, 16, 0x0, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_NOMIRROR, 0, 0,
G_TX_NOMIRROR | G_TX_NOMIRROR, 0, 0);
gDPLoadSync(OVERLAY_DISP++);
gDPLoadTile(OVERLAY_DISP++, G_TX_LOADTILE, 0, 0, (120 << 2), (24 << 2));
gDPPipeSync(OVERLAY_DISP++);
gDPSetTile(OVERLAY_DISP++, G_IM_FMT_IA, G_IM_SIZ_8b, 16, 0x0, G_TX_RENDERTILE, 0,
G_TX_NOMIRROR | G_TX_NOMIRROR, 0, 0, G_TX_NOMIRROR | G_TX_NOMIRROR, 0, 0);
gDPSetTile(OVERLAY_DISP++, G_IM_FMT_IA, G_IM_SIZ_8b, 16, 0x0, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_NOMIRROR, 0,
0, G_TX_NOMIRROR | G_TX_NOMIRROR, 0, 0);
gDPSetTileSize(OVERLAY_DISP++, G_TX_RENDERTILE, 0, 0, (120 << 2), (24 << 2));
gSPTextureRectangle(OVERLAY_DISP++, (100 << 2), (160 << 2), (220 << 2), (183 << 2), G_TX_RENDERTILE, 0, 0,
(32 << 5), (32 << 5));
gDPPipeSync(OVERLAY_DISP++);
gDPSetPrimColor(OVERLAY_DISP++, 0x00, 0x80, 0, 0, 0, this->ootAlpha);
gDPSetTextureImage(OVERLAY_DISP++, G_IM_FMT_IA, G_IM_SIZ_8b, 112, D_80B669E0);
gDPSetTile(OVERLAY_DISP++, G_IM_FMT_IA, G_IM_SIZ_8b, 15, 0x0, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_NOMIRROR,
0, 0, G_TX_NOMIRROR | G_TX_NOMIRROR, 0, 0);
gDPSetTile(OVERLAY_DISP++, G_IM_FMT_IA, G_IM_SIZ_8b, 15, 0x0, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_NOMIRROR, 0, 0,
G_TX_NOMIRROR | G_TX_NOMIRROR, 0, 0);
gDPLoadSync(OVERLAY_DISP++);
gDPLoadTile(OVERLAY_DISP++, G_TX_LOADTILE, 0, 0, (112 << 2), (16 << 2));
gDPPipeSync(OVERLAY_DISP++);
gDPSetTile(OVERLAY_DISP++, G_IM_FMT_IA, G_IM_SIZ_8b, 15, 0x0, G_TX_RENDERTILE, 0,
G_TX_NOMIRROR | G_TX_NOMIRROR, 0, 0, G_TX_NOMIRROR | G_TX_NOMIRROR, 0, 0);
gDPSetTile(OVERLAY_DISP++, G_IM_FMT_IA, G_IM_SIZ_8b, 15, 0x0, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_NOMIRROR, 0,
0, G_TX_NOMIRROR | G_TX_NOMIRROR, 0, 0);
gDPSetTileSize(OVERLAY_DISP++, G_TX_RENDERTILE, 0, 0, (112 << 2), (16 << 2));
gSPTextureRectangle(OVERLAY_DISP++, (104 << 2), (177 << 2), (216 << 2), (192 << 2), G_TX_RENDERTILE, 0, 0,
(32 << 5), (32 << 5));

View file

@ -393,8 +393,8 @@ void ObjLightswitch_DrawOpa(ObjLightswitch* this, GlobalContext* globalCtx) {
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_obj_lightswitch.c", 809);
func_80093D18(globalCtx->state.gfxCtx);
gDPSetEnvColor(POLY_OPA_DISP++, (u8)(this->color[0] >> 6), (u8)(this->color[1] >> 6),
(u8)(this->color[2] >> 6), (u8)(this->alpha >> 6));
gDPSetEnvColor(POLY_OPA_DISP++, (u8)(this->color[0] >> 6), (u8)(this->color[1] >> 6), (u8)(this->color[2] >> 6),
(u8)(this->alpha >> 6));
gSPSegment(POLY_OPA_DISP++, 0x09, &D_80116280[2]);
if ((this->actor.params & 1) == 1) {
@ -443,8 +443,8 @@ void ObjLightswitch_DrawXlu(ObjLightswitch* this, GlobalContext* globalCtx) {
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_obj_lightswitch.c", 890);
func_80093D84(globalCtx->state.gfxCtx);
gDPSetEnvColor(POLY_XLU_DISP++, (u8)(this->color[0] >> 6), (u8)(this->color[1] >> 6),
(u8)(this->color[2] >> 6), (u8)(this->alpha >> 6));
gDPSetEnvColor(POLY_XLU_DISP++, (u8)(this->color[0] >> 6), (u8)(this->color[1] >> 6), (u8)(this->color[2] >> 6),
(u8)(this->alpha >> 6));
gSPSegment(POLY_XLU_DISP++, 0x09, D_80116280);
sp68.x = this->actor.posRot.pos.x;

View file

@ -157,8 +157,8 @@ void OceffSpot_Draw(Actor* thisx, GlobalContext* globalCtx) {
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_oceff_spot.c", 469),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, sTextureDL);
gSPDisplayList(POLY_XLU_DISP++, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, scroll * 2, scroll * (-2), 32, 32,
1, 0, scroll * (-8), 32, 32));
gSPDisplayList(POLY_XLU_DISP++, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, scroll * 2, scroll * (-2), 32, 32, 1,
0, scroll * (-8), 32, 32));
gSPDisplayList(POLY_XLU_DISP++, sCylinderDl);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_oceff_spot.c", 485);

View file

@ -140,9 +140,9 @@ void OceffStorm_Draw2(Actor* thisx, GlobalContext* globalCtx) {
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 200, 200, 150, this->primColorAlpha);
gSPDisplayList(POLY_XLU_DISP++, sTextureDL);
gSPDisplayList(POLY_XLU_DISP++, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, scroll * 8, scroll * 4, 64, 64, 1,
scroll * 4, scroll * 4, 64, 64));
gSPTextureRectangle(POLY_XLU_DISP++, 0, 0, (SCREEN_WIDTH << 2), (SCREEN_HEIGHT << 2), G_TX_RENDERTILE, 0, 0,
140, (1 << 15) | (31 << 10) | 884);
scroll * 4, scroll * 4, 64, 64));
gSPTextureRectangle(POLY_XLU_DISP++, 0, 0, (SCREEN_WIDTH << 2), (SCREEN_HEIGHT << 2), G_TX_RENDERTILE, 0, 0, 140,
(1 << 15) | (31 << 10) | 884);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_oceff_storm.c", 477);
}
@ -168,8 +168,8 @@ void OceffStorm_Draw(Actor* thisx, GlobalContext* globalCtx) {
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, sCylinderTexDl);
gSPDisplayList(POLY_XLU_DISP++, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, scroll * 4, (0 - scroll) * 8, 32,
32, 1, scroll * 8, (0 - scroll) * 12, 32, 32));
gSPDisplayList(POLY_XLU_DISP++, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, scroll * 4, (0 - scroll) * 8, 32, 32,
1, scroll * 8, (0 - scroll) * 12, 32, 32));
gSPDisplayList(POLY_XLU_DISP++, sCylinderDl);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_oceff_storm.c", 512);

View file

@ -120,8 +120,8 @@ void OceffWipe_Draw(Actor* thisx, GlobalContext* globalCtx) {
}
gSPDisplayList(POLY_XLU_DISP++, sTextureDL);
gSPDisplayList(POLY_XLU_DISP++, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0 - scroll, scroll * (-2), 32, 32,
1, 0 - scroll, scroll * (-2), 32, 32));
gSPDisplayList(POLY_XLU_DISP++, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0 - scroll, scroll * (-2), 32, 32, 1,
0 - scroll, scroll * (-2), 32, 32));
gSPDisplayList(POLY_XLU_DISP++, sFrustrumDl);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_oceff_wipe.c", 398);

View file

@ -102,8 +102,8 @@ void OceffWipe2_Draw(Actor* thisx, GlobalContext* globalCtx) {
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 170, 255);
gDPSetEnvColor(POLY_XLU_DISP++, 255, 100, 0, 128);
gSPDisplayList(POLY_XLU_DISP++, sTextureDL);
gSPDisplayList(POLY_XLU_DISP++, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, scroll * 6, scroll * (-6), 64, 64,
1, scroll * (-6), 0, 64, 64));
gSPDisplayList(POLY_XLU_DISP++, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, scroll * 6, scroll * (-6), 64, 64, 1,
scroll * (-6), 0, 64, 64));
gSPDisplayList(POLY_XLU_DISP++, sFrustrumDl);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_oceff_wipe2.c", 417);

View file

@ -103,8 +103,8 @@ void OceffWipe3_Draw(Actor* thisx, GlobalContext* globalCtx) {
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 170, 255);
gDPSetEnvColor(POLY_XLU_DISP++, 100, 200, 0, 128);
gSPDisplayList(POLY_XLU_DISP++, sTextureDL);
gSPDisplayList(POLY_XLU_DISP++, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, scroll * 12, scroll * (-12), 64,
64, 1, scroll * 8, scroll * (-8), 64, 64));
gSPDisplayList(POLY_XLU_DISP++, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, scroll * 12, scroll * (-12), 64, 64, 1,
scroll * 8, scroll * (-8), 64, 64));
gSPDisplayList(POLY_XLU_DISP++, sFrustrumDl);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_oceff_wipe3.c", 370);

View file

@ -101,8 +101,8 @@ void OceffWipe4_Draw(Actor* thisx, GlobalContext* globalCtx) {
}
gSPDisplayList(POLY_XLU_DISP++, sTextureDL2);
gSPDisplayList(POLY_XLU_DISP++, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, scroll * 2, scroll * (-2), 32, 64,
1, scroll * (-1), scroll, 32, 32));
gSPDisplayList(POLY_XLU_DISP++, Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, scroll * 2, scroll * (-2), 32, 64, 1,
scroll * (-1), scroll, 32, 32));
gSPDisplayList(POLY_XLU_DISP++, sFrustrumDl);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_oceff_wipe4.c", 344);

View file

@ -10444,8 +10444,8 @@ void Player_Draw(Actor* thisx, GlobalContext* globalCtx) {
if (this->invincibilityTimer > 0) {
this->unk_88F += CLAMP(50 - this->invincibilityTimer, 8, 40);
POLY_OPA_DISP = Gfx_SetFog2(POLY_OPA_DISP, 255, 0, 0, 0, 0,
4000 - (s32)(Math_Coss(this->unk_88F * 256) * 2000.0f));
POLY_OPA_DISP =
Gfx_SetFog2(POLY_OPA_DISP, 255, 0, 0, 0, 0, 4000 - (s32)(Math_Coss(this->unk_88F * 256) * 2000.0f));
}
func_8002EBCC(&this->actor, globalCtx, 0);

View file

@ -69,8 +69,7 @@ void EffectSsBlast_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
func_80093D84(globalCtx->state.gfxCtx);
gDPSetEnvColor(POLY_XLU_DISP++, this->rEnvColorR, this->rEnvColorG, this->rEnvColorB, this->rEnvColorA);
func_800BFCB8(globalCtx, &mf, &this->pos);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB,
this->rPrimColorA);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB, this->rPrimColorA);
Matrix_Put(&mf);
Matrix_Scale(radius, radius, radius, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_eff_ss_blast.c", 199),

View file

@ -109,13 +109,12 @@ void EffectSsDeadDd_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
if (mtx != NULL) {
func_80094BC4(gfxCtx);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB,
this->rAlpha);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB, this->rAlpha);
gDPSetEnvColor(POLY_XLU_DISP++, this->rEnvColorR, this->rEnvColorG, this->rEnvColorB, this->rAlpha);
gSPMatrix(POLY_XLU_DISP++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPMatrix(POLY_XLU_DISP++, &D_01000000, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
gDPSetCombineLERP(POLY_XLU_DISP++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0,
0, PRIMITIVE, 0);
gDPSetCombineLERP(POLY_XLU_DISP++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, 0,
PRIMITIVE, 0);
gSPDisplayList(POLY_XLU_DISP++, D_04037730);
}

View file

@ -110,8 +110,8 @@ void EffectSsDust_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
gDPPipeSync(POLY_XLU_DISP++);
if (this->rDrawFlags & 1) {
gDPSetCombineLERP(POLY_XLU_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, PRIMITIVE, 0, TEXEL0,
0, COMBINED, 0, SHADE, 0, 0, 0, 0, COMBINED);
gDPSetCombineLERP(POLY_XLU_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, PRIMITIVE, 0, TEXEL0, 0,
COMBINED, 0, SHADE, 0, 0, 0, 0, COMBINED);
gDPSetRenderMode(POLY_XLU_DISP++, G_RM_FOG_SHADE_A, G_RM_ZB_CLD_SURF2);
gSPSetGeometryMode(POLY_XLU_DISP++, G_FOG | G_LIGHTING);
} else if (this->rDrawFlags & 2) {

View file

@ -110,8 +110,8 @@ void EffectSsHahen_DrawGray(GlobalContext* globalCtx, u32 index, EffectSs* this)
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(gfxCtx, "../z_eff_hahen.c", 271),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
func_80093D18(globalCtx->state.gfxCtx);
gDPSetCombineLERP(POLY_OPA_DISP++, SHADE, 0, PRIMITIVE, 0, SHADE, 0, PRIMITIVE, 0, SHADE, 0, PRIMITIVE, 0,
SHADE, 0, PRIMITIVE, 0);
gDPSetCombineLERP(POLY_OPA_DISP++, SHADE, 0, PRIMITIVE, 0, SHADE, 0, PRIMITIVE, 0, SHADE, 0, PRIMITIVE, 0, SHADE, 0,
PRIMITIVE, 0);
gDPSetPrimColor(POLY_OPA_DISP++, 0x0, 0x01, 100, 100, 120, 255);
gSPDisplayList(POLY_OPA_DISP++, this->gfx);

View file

@ -117,8 +117,7 @@ void EffectSsKakera_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
func_80093D84(globalCtx->state.gfxCtx);
if (colorIdx >= 0) {
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, colors[colorIdx].r, colors[colorIdx].g, colors[colorIdx].b,
255);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, colors[colorIdx].r, colors[colorIdx].g, colors[colorIdx].b, 255);
}
gSPDisplayList(POLY_XLU_DISP++, this->gfx);
@ -128,8 +127,7 @@ void EffectSsKakera_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
func_80093D18(globalCtx->state.gfxCtx);
if (colorIdx >= 0) {
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, colors[colorIdx].r, colors[colorIdx].g, colors[colorIdx].b,
255);
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, colors[colorIdx].r, colors[colorIdx].g, colors[colorIdx].b, 255);
}
gSPDisplayList(POLY_OPA_DISP++, this->gfx);

View file

@ -73,8 +73,7 @@ void EffectSsSibuki_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(gfxCtx, "../z_eff_ss_sibuki.c", 176),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
func_80093D18(gfxCtx);
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB,
this->rPrimColorA);
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB, this->rPrimColorA);
gDPSetEnvColor(POLY_OPA_DISP++, this->rEnvColorR, this->rEnvColorG, this->rEnvColorB, this->rEnvColorA);
gSPSegment(POLY_OPA_DISP++, 0x08, this->gfx);
gSPDisplayList(POLY_OPA_DISP++, SEGMENTED_TO_VIRTUAL(D_0401A160));

View file

@ -66,8 +66,7 @@ void EffectSsSibuki2_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_eff_ss_sibuki2.c", 171),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
func_80093D18(gfxCtx);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB,
this->rPrimColorA);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB, this->rPrimColorA);
gDPSetEnvColor(POLY_XLU_DISP++, this->rEnvColorR, this->rEnvColorG, this->rEnvColorB, this->rEnvColorA);
gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sTextures[this->rTexIdx]));
gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(D_0401E2C0));

View file

@ -67,8 +67,8 @@ void EffectSsStone1_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
func_80094C50(gfxCtx);
gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(drawParams->texture));
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, drawParams->primColor.r, drawParams->primColor.g,
drawParams->primColor.b, 255);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, drawParams->primColor.r, drawParams->primColor.g, drawParams->primColor.b,
255);
gDPSetEnvColor(POLY_XLU_DISP++, drawParams->envColor.r, drawParams->envColor.g, drawParams->envColor.b, 255);
gSPDisplayList(POLY_XLU_DISP++, D_04029E90);

View file

@ -99,8 +99,8 @@ void Title_Draw(TitleContext* this) {
gDPPipeSync(POLY_OPA_DISP++);
gDPSetCycleType(POLY_OPA_DISP++, G_CYC_2CYCLE);
gDPSetRenderMode(POLY_OPA_DISP++, G_RM_XLU_SURF2, G_RM_OPA_CI | CVG_DST_WRAP);
gDPSetCombineLERP(POLY_OPA_DISP++, TEXEL1, PRIMITIVE, ENV_ALPHA, TEXEL0, 0, 0, 0, TEXEL0, PRIMITIVE,
ENVIRONMENT, COMBINED, ENVIRONMENT, COMBINED, 0, PRIMITIVE, 0);
gDPSetCombineLERP(POLY_OPA_DISP++, TEXEL1, PRIMITIVE, ENV_ALPHA, TEXEL0, 0, 0, 0, TEXEL0, PRIMITIVE, ENVIRONMENT,
COMBINED, ENVIRONMENT, COMBINED, 0, PRIMITIVE, 0);
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 170, 255, 255, 255);
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 255, 128);