mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-13 04:39:36 +00:00
improve matches (#1413)
This commit is contained in:
parent
26d6028ff1
commit
a715bf63d0
21 changed files with 45 additions and 104 deletions
|
@ -5478,8 +5478,6 @@ s32 func_80037D98(PlayState* play, Actor* actor, s16 arg2, s32* arg3) {
|
|||
|
||||
Actor_GetScreenPos(play, actor, &sp2C, &sp2A);
|
||||
|
||||
if (0) {} // Necessary to match
|
||||
|
||||
if ((sp2C < 0) || (sp2C > SCREEN_WIDTH) || (sp2A < 0) || (sp2A > SCREEN_HEIGHT)) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -104,8 +104,6 @@ void func_80026860(PlayState* play, Color_RGBA8* color, s16 arg2, s16 arg3) {
|
|||
|
||||
POLY_XLU_DISP = displayListHead;
|
||||
|
||||
if (1) {} // Necessary to match
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx, "../z_eff_ss_dead.c", 212);
|
||||
}
|
||||
|
||||
|
|
|
@ -68,16 +68,13 @@ void Lights_Draw(Lights* lights, GraphicsContext* gfxCtx) {
|
|||
light = &lights->l.l[0];
|
||||
|
||||
while (i < lights->numLights) {
|
||||
i++;
|
||||
gSPLight(POLY_OPA_DISP++, light, i);
|
||||
gSPLight(POLY_OPA_DISP++, light, ++i);
|
||||
gSPLight(POLY_XLU_DISP++, light, i);
|
||||
light++;
|
||||
}
|
||||
|
||||
if (0) {}
|
||||
|
||||
i++; // ambient light is total number of lights + 1
|
||||
gSPLight(POLY_OPA_DISP++, &lights->l.a, i);
|
||||
// ambient light is total number of lights + 1
|
||||
gSPLight(POLY_OPA_DISP++, &lights->l.a, ++i);
|
||||
gSPLight(POLY_XLU_DISP++, &lights->l.a, i);
|
||||
|
||||
CLOSE_DISPS(gfxCtx, "../z_lights.c", 352);
|
||||
|
|
|
@ -551,7 +551,6 @@ void Map_Update(PlayState* play) {
|
|||
if (R_MAP_TEX_INDEX != (R_MAP_TEX_INDEX_BASE + Map_GetFloorTextIndexOffset(mapIndex, floor))) {
|
||||
R_MAP_TEX_INDEX = R_MAP_TEX_INDEX_BASE + Map_GetFloorTextIndexOffset(mapIndex, floor);
|
||||
}
|
||||
if (1) {} // Appears to be necessary to match
|
||||
|
||||
if (interfaceCtx->mapRoomNum != sLastRoomNum) {
|
||||
// "Current floor = %d Current room = %x Number of rooms = %d"
|
||||
|
|
|
@ -795,11 +795,8 @@ s32 func_8008F2F8(PlayState* play) {
|
|||
}
|
||||
|
||||
// Trigger general textboxes under certain conditions, like "It's so hot in here!"
|
||||
triggerEntry = &sTextTriggers[var];
|
||||
if (!Player_InCsMode(play)) {
|
||||
triggerEntry = &sTextTriggers[var];
|
||||
|
||||
if (0) {}
|
||||
|
||||
if ((triggerEntry->flag != 0) && !(gSaveContext.textTriggerFlags & triggerEntry->flag) &&
|
||||
(((var == 0) && (this->currentTunic != PLAYER_TUNIC_GORON)) ||
|
||||
(((var == 1) || (var == 3)) && (this->currentBoots == PLAYER_BOOTS_IRON) &&
|
||||
|
|
|
@ -148,7 +148,6 @@ void* func_800982FC(ObjectContext* objectCtx, s32 bankIndex, s16 objectId) {
|
|||
osSyncPrintf("OBJECT EXCHANGE NO=%2d BANK=%3d SIZE=%8.3fK\n", bankIndex, objectId, size / 1024.0f);
|
||||
|
||||
nextPtr = (void*)ALIGN16((s32)status->segment + size);
|
||||
if (1) {} // Necessary to match
|
||||
|
||||
ASSERT(nextPtr < objectCtx->spaceEnd, "nextptr < this->endSegment", "../z_scene.c", 381);
|
||||
|
||||
|
|
|
@ -179,8 +179,6 @@ void EnAnubiceFire_Update(Actor* thisx, PlayState* play) {
|
|||
func_8002D7EC(&this->actor);
|
||||
this->unk_160[0] = this->actor.world.pos;
|
||||
|
||||
if (1) {}
|
||||
|
||||
for (i = 4; i >= 0; i--) {
|
||||
this->unk_160[i + 1] = this->unk_160[i];
|
||||
}
|
||||
|
|
|
@ -73,12 +73,8 @@ void EnChanger_Init(Actor* thisx, PlayState* play2) {
|
|||
s16 minigameRoomNum;
|
||||
s16 rightChestItem;
|
||||
s16 leftChestItem;
|
||||
s16 temp_v1_3;
|
||||
s16 new_var;
|
||||
s32 rewardParams;
|
||||
|
||||
if (1) {}
|
||||
|
||||
minigameRoomNum = play->roomCtx.curRoom.num - 1;
|
||||
if (minigameRoomNum < 0) {
|
||||
minigameRoomNum = 0;
|
||||
|
@ -124,27 +120,25 @@ void EnChanger_Init(Actor* thisx, PlayState* play2) {
|
|||
}
|
||||
}
|
||||
|
||||
temp_v1_3 = minigameRoomNum;
|
||||
// Set up items in chests, swap them round with probability 1/2
|
||||
leftChestParams = (sLoserGetItemIds[play->roomCtx.curRoom.num] << 5) | 0x4000;
|
||||
new_var = temp_v1_3;
|
||||
this->leftChestNum = new_var;
|
||||
this->leftChestNum = minigameRoomNum;
|
||||
this->leftChestGetItemId = sLoserGetItemIds[play->roomCtx.curRoom.num];
|
||||
leftChestItem = sItemEtcTypes[play->roomCtx.curRoom.num];
|
||||
leftChestParams |= new_var;
|
||||
rightChestParams = new_var | 0x4E21;
|
||||
this->rightChestNum = new_var | 1;
|
||||
leftChestParams |= minigameRoomNum;
|
||||
rightChestParams = minigameRoomNum | 0x4E21;
|
||||
this->rightChestNum = minigameRoomNum | 1;
|
||||
this->rightChestGetItemId = GI_DOOR_KEY;
|
||||
rightChestItem = ITEM_ETC_KEY_SMALL_CHEST_GAME;
|
||||
|
||||
if (Rand_ZeroFloat(1.99f) < 1.0f) {
|
||||
rightChestParams = (sLoserGetItemIds[play->roomCtx.curRoom.num] << 5) | 0x4000;
|
||||
this->rightChestNum = new_var;
|
||||
this->rightChestNum = minigameRoomNum;
|
||||
this->rightChestGetItemId = sLoserGetItemIds[play->roomCtx.curRoom.num];
|
||||
rightChestItem = sItemEtcTypes[play->roomCtx.curRoom.num];
|
||||
leftChestParams = new_var | 0x4E21;
|
||||
rightChestParams |= new_var;
|
||||
this->leftChestNum = temp_v1_3 | 1;
|
||||
leftChestParams = minigameRoomNum | 0x4E21;
|
||||
rightChestParams |= minigameRoomNum;
|
||||
this->leftChestNum = minigameRoomNum | 1;
|
||||
this->leftChestGetItemId = GI_DOOR_KEY;
|
||||
leftChestItem = ITEM_ETC_KEY_SMALL_CHEST_GAME;
|
||||
}
|
||||
|
|
|
@ -838,7 +838,6 @@ s32 EnFr_IsFrogSongComplete(EnFr* this, PlayState* play) {
|
|||
if (this->ocarinaNote == (*msgCtx).lastOcarinaButtonIndex) { // required to match, possibly an array?
|
||||
this->ocarinaNoteIndex++;
|
||||
ocarinaNoteIndex = this->ocarinaNoteIndex;
|
||||
if (1) {}
|
||||
if (ocarinaNoteIndex >= 14) { // Frog Song is completed
|
||||
this->ocarinaNoteIndex = 13;
|
||||
return true;
|
||||
|
|
|
@ -129,7 +129,6 @@ void EnGanonMant_Tear(EnGanonMant* this) {
|
|||
for (i = 0; i < count; i++) {
|
||||
if ((0 <= tx && tx < MANT_TEX_WIDTH) && (0 <= ty && ty < MANT_TEX_HEIGHT)) {
|
||||
for (areaX = 0; areaX <= tearAreaSizes[i]; areaX++) {
|
||||
texIdx = 0;
|
||||
if (1) {}
|
||||
for (areaY = 0; areaY <= tearAreaSizes[i]; areaY++) {
|
||||
texIdx = (s16)((s16)tx + ((s16)ty * MANT_TEX_WIDTH)) + ((s16)areaX + ((s16)areaY * MANT_TEX_WIDTH));
|
||||
|
|
|
@ -1154,21 +1154,17 @@ void EnGo_SpawnEffectDust(EnGo* this, Vec3f* pos, Vec3f* velocity, Vec3f* accel,
|
|||
f32 scaleStep) {
|
||||
EnGoEffect* dustEffect = this->effects;
|
||||
s16 i;
|
||||
s16 timer;
|
||||
|
||||
for (i = 0; i < EN_GO_EFFECT_COUNT; i++, dustEffect++) {
|
||||
if (dustEffect->type != 1) {
|
||||
dustEffect->scale = scale;
|
||||
dustEffect->scaleStep = scaleStep;
|
||||
if (1) {}
|
||||
timer = initialTimer;
|
||||
dustEffect->timer = timer;
|
||||
dustEffect->initialTimer = dustEffect->timer = initialTimer;
|
||||
dustEffect->type = 1;
|
||||
dustEffect->initialTimer = initialTimer;
|
||||
dustEffect->pos = *pos;
|
||||
dustEffect->accel = *accel;
|
||||
dustEffect->velocity = *velocity;
|
||||
return;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -174,21 +174,17 @@ void EnGo2_SpawnEffectDust(EnGo2* this, Vec3f* pos, Vec3f* velocity, Vec3f* acce
|
|||
f32 scaleStep) {
|
||||
EnGoEffect* dustEffect = this->effects;
|
||||
s16 i;
|
||||
s16 timer;
|
||||
|
||||
for (i = 0; i < EN_GO2_EFFECT_COUNT; i++, dustEffect++) {
|
||||
if (dustEffect->type != 1) {
|
||||
dustEffect->scale = scale;
|
||||
dustEffect->scaleStep = scaleStep;
|
||||
if (1) {}
|
||||
timer = initialTimer;
|
||||
dustEffect->timer = timer;
|
||||
dustEffect->initialTimer = dustEffect->timer = initialTimer;
|
||||
dustEffect->type = 1;
|
||||
dustEffect->initialTimer = initialTimer;
|
||||
dustEffect->pos = *pos;
|
||||
dustEffect->accel = *accel;
|
||||
dustEffect->velocity = *velocity;
|
||||
return;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -663,7 +663,7 @@ void func_80A75C38(EnIk* this, PlayState* play) {
|
|||
u8 pad;
|
||||
u8 pad2;
|
||||
u8 prevHealth;
|
||||
s32 temp_v0_3;
|
||||
s32 pad3;
|
||||
Vec3f sp38;
|
||||
|
||||
if ((this->unk_2F8 == 3) || (this->unk_2F8 == 2)) {
|
||||
|
@ -684,12 +684,9 @@ void func_80A75C38(EnIk* this, PlayState* play) {
|
|||
sp38 = this->actor.world.pos;
|
||||
sp38.y += 50.0f;
|
||||
Actor_SetDropFlag(&this->actor, &this->bodyCollider.info, true);
|
||||
temp_v0_3 = this->actor.colChkInfo.damageEffect;
|
||||
this->unk_2FD = temp_v0_3 & 0xFF;
|
||||
this->unk_2FD = this->actor.colChkInfo.damageEffect;
|
||||
this->bodyCollider.base.acFlags &= ~AC_HIT;
|
||||
|
||||
if (1) {}
|
||||
|
||||
if ((this->unk_2FD == 0) || (this->unk_2FD == 0xD) || ((this->unk_2FB == 0) && (this->unk_2FD == 0xE))) {
|
||||
if (this->unk_2FD != 0) {
|
||||
CollisionCheck_SpawnShieldParticlesMetal(play, &sp38);
|
||||
|
|
|
@ -284,8 +284,6 @@ void EnKarebaba_Spin(EnKarebaba* this, PlayState* play) {
|
|||
SkelAnime_Update(&this->skelAnime);
|
||||
|
||||
if (Animation_OnFrame(&this->skelAnime, 0.0f) || Animation_OnFrame(&this->skelAnime, 12.0f)) {
|
||||
if (1) {} // Here for matching purposes only.
|
||||
|
||||
Audio_PlayActorSfx2(&this->actor, NA_SE_EN_DEKU_JR_MOUTH);
|
||||
}
|
||||
|
||||
|
|
|
@ -155,8 +155,6 @@ static InitChainEntry sInitChain[] = {
|
|||
|
||||
void EnSkb_Init(Actor* thisx, PlayState* play) {
|
||||
EnSkb* this = (EnSkb*)thisx;
|
||||
s16 armOffset;
|
||||
s16 bodyOffset;
|
||||
|
||||
Actor_ProcessInitChain(&this->actor, sInitChain);
|
||||
this->actor.colChkInfo.damageTable = &sDamageTable;
|
||||
|
@ -173,13 +171,11 @@ void EnSkb_Init(Actor* thisx, PlayState* play) {
|
|||
Collider_SetJntSph(play, &this->collider, &this->actor, &sJntSphInit, this->colliderItem);
|
||||
Actor_SetScale(&this->actor, ((this->actor.params * 0.1f) + 1.0f) * 0.01f);
|
||||
|
||||
armOffset = this->actor.params + 0xA;
|
||||
this->collider.elements[0].dim.worldSphere.radius = armOffset;
|
||||
this->collider.elements[0].dim.modelSphere.radius = armOffset;
|
||||
if (1) {};
|
||||
bodyOffset = (this->actor.params * 2) + 0x14;
|
||||
this->collider.elements[1].dim.worldSphere.radius = bodyOffset;
|
||||
this->collider.elements[1].dim.modelSphere.radius = bodyOffset;
|
||||
this->collider.elements[0].dim.modelSphere.radius = this->collider.elements[0].dim.worldSphere.radius =
|
||||
10 + this->actor.params;
|
||||
this->collider.elements[1].dim.modelSphere.radius = this->collider.elements[1].dim.worldSphere.radius =
|
||||
20 + (this->actor.params * 2);
|
||||
|
||||
this->actor.home.pos = this->actor.world.pos;
|
||||
this->actor.floorHeight = this->actor.world.pos.y;
|
||||
EnSkb_SetupRiseFromGround(this);
|
||||
|
|
|
@ -2249,7 +2249,6 @@ static Gfx D_80B4A2F8[] = {
|
|||
void EnZf_Draw(Actor* thisx, PlayState* play) {
|
||||
s32 pad;
|
||||
EnZf* this = (EnZf*)thisx;
|
||||
; // Extra ";" required for matching. Cannot be if (1) {} or the like. Typo?
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx, "../z_en_zf.c", 3533);
|
||||
|
||||
|
|
|
@ -50,20 +50,6 @@ static Vec3f D_80B5A46C = { 0.0f, 0.0f, 0.0f };
|
|||
|
||||
static Vec3f D_80B5A478 = { 0.0f, 10.0f, 0.0f };
|
||||
|
||||
static f32 D_80B5A484 = 0.0f;
|
||||
|
||||
static Vec3f D_80B5A488 = { 0.0f, 0.0f, 0.0f };
|
||||
|
||||
static s32 D_80B5A494 = -1;
|
||||
|
||||
static Vec3f D_80B5A498 = { 148.0f, 260.0f, -87.0f };
|
||||
|
||||
static Vec3f D_80B5A4A4 = { -12.0f, 260.0f, -147.0f };
|
||||
|
||||
static Vec3f D_80B5A4B0 = { 42.0f, 260.0f, 13.0f };
|
||||
|
||||
static u32 D_80B5A4BC = 0;
|
||||
|
||||
void func_80B533B0(Actor* thisx, PlayState* play) {
|
||||
EnZl3* this = (EnZl3*)thisx;
|
||||
|
||||
|
@ -254,7 +240,7 @@ void func_80B53980(EnZl3* thisx, s16 y, s32 idx) {
|
|||
curFrame = skelAnime->curFrame;
|
||||
unk_3DC = this->unk_3DC;
|
||||
yTemp = (s32)((curFrame / unk_3DC) * -11000) + y;
|
||||
if (0) {};
|
||||
|
||||
if (temp28C >= yTemp) {
|
||||
temp28C = yTemp;
|
||||
if (temp25C > 0) {
|
||||
|
@ -831,15 +817,13 @@ void func_80B550F0(EnZl3* this) {
|
|||
}
|
||||
|
||||
void func_80B55144(EnZl3* this) {
|
||||
f32* fl = &D_80B5A484;
|
||||
static f32 D_80B5A484 = 0.0f;
|
||||
|
||||
if (1) {} // necessary to match
|
||||
|
||||
if (*fl < 2.0f) {
|
||||
*fl += 1.0f;
|
||||
if (D_80B5A484 < 2.0f) {
|
||||
D_80B5A484 += 1.0f;
|
||||
EnZl3_setEyeIndex(this, 2);
|
||||
} else if (*fl < 4.0f) {
|
||||
*fl += 1.0f;
|
||||
} else if (D_80B5A484 < 4.0f) {
|
||||
D_80B5A484 += 1.0f;
|
||||
EnZl3_setEyeIndex(this, 1);
|
||||
} else {
|
||||
EnZl3_UpdateEyes(this);
|
||||
|
@ -1016,6 +1000,8 @@ void func_80B55808(EnZl3* this) {
|
|||
func_80078914(&this->actor.projectedPos, NA_SE_VO_Z1_PAIN);
|
||||
}
|
||||
|
||||
static Vec3f D_80B5A488 = { 0.0f, 0.0f, 0.0f };
|
||||
|
||||
void func_80B5582C(EnZl3* this) {
|
||||
Audio_PlaySfxRandom(&D_80B5A488, NA_SE_VO_Z1_CRY_0, NA_SE_VO_Z1_CRY_1 - NA_SE_VO_Z1_CRY_0 + 1);
|
||||
}
|
||||
|
@ -1295,15 +1281,13 @@ void func_80B56474(EnZl3* this, s32 arg1) {
|
|||
}
|
||||
|
||||
void func_80B564A8(EnZl3* this, PlayState* play) {
|
||||
s32 temp_v0;
|
||||
s32* val = &D_80B5A494;
|
||||
static s32 D_80B5A494 = -1;
|
||||
s32 temp_v0 = func_80B5396C(this);
|
||||
|
||||
temp_v0 = func_80B5396C(this);
|
||||
|
||||
if (*val > 0) {
|
||||
*val -= 1;
|
||||
} else if (*val == 0) {
|
||||
*val -= 1;
|
||||
if (D_80B5A494 > 0) {
|
||||
D_80B5A494--;
|
||||
} else if (D_80B5A494 == 0) {
|
||||
D_80B5A494--;
|
||||
if (temp_v0 == 8) {
|
||||
func_80B5604C(this);
|
||||
}
|
||||
|
@ -1339,7 +1323,7 @@ void func_80B564A8(EnZl3* this, PlayState* play) {
|
|||
func_80B55EF0(this);
|
||||
break;
|
||||
case 8:
|
||||
*val = 10;
|
||||
D_80B5A494 = 10;
|
||||
break;
|
||||
case 9:
|
||||
func_80B56160(this);
|
||||
|
@ -1831,6 +1815,10 @@ void func_80B577BC(PlayState* play, Vec3f* vec) {
|
|||
RAD_TO_BINANG(Math_FAtan2F(playerPos->x - posX, playerPos->z - posZ)), 0, 5);
|
||||
}
|
||||
|
||||
static Vec3f D_80B5A498 = { 148.0f, 260.0f, -87.0f };
|
||||
static Vec3f D_80B5A4A4 = { -12.0f, 260.0f, -147.0f };
|
||||
static Vec3f D_80B5A4B0 = { 42.0f, 260.0f, 13.0f };
|
||||
|
||||
void func_80B57858(PlayState* play) {
|
||||
func_80B577BC(play, &D_80B5A498);
|
||||
func_80B577BC(play, &D_80B5A4A4);
|
||||
|
@ -2109,6 +2097,8 @@ void func_80B582C8(EnZl3* this, PlayState* play) {
|
|||
}
|
||||
}
|
||||
|
||||
static u32 D_80B5A4BC = 0;
|
||||
|
||||
void func_80B584B4(EnZl3* this, PlayState* play) {
|
||||
s32 pad;
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
|
|
@ -3568,7 +3568,6 @@ void Fishing_UpdateFish(Actor* thisx, PlayState* play2) {
|
|||
if (D_80B7E124 == 0) {
|
||||
if ((D_80B7FEA0 < 20) && ((D_80B7E0AE & 3) == 0)) {
|
||||
D_80B7FEA0++;
|
||||
if (1) {}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4068,8 +4067,6 @@ void Fishing_UpdateFish(Actor* thisx, PlayState* play2) {
|
|||
|
||||
this->actor.world.pos.y += (this->unk_184 * 1.5f);
|
||||
|
||||
if (1) {}
|
||||
|
||||
if (this->unk_152 != 0) {
|
||||
this->unk_168 = this->unk_154;
|
||||
this->unk_152--;
|
||||
|
|
|
@ -534,7 +534,7 @@ s32 MirRay_CheckInFrustum(Vec3f* vecA, Vec3f* vecB, f32 pointx, f32 pointy, f32
|
|||
vecdiff.x = vecB->x - vecA->x;
|
||||
vecdiff.y = vecB->y - vecA->y;
|
||||
vecdiff.z = vecB->z - vecA->z;
|
||||
if (1) {}
|
||||
|
||||
dist = SQ(vecdiff.x) + SQ(vecdiff.y) + SQ(vecdiff.z);
|
||||
|
||||
if (dist == 0.0f) {
|
||||
|
@ -555,7 +555,6 @@ s32 MirRay_CheckInFrustum(Vec3f* vecA, Vec3f* vecB, f32 pointx, f32 pointy, f32
|
|||
// If the Point is within the bounding double cone, check if it is in the frustum by checking whether it is between
|
||||
// the bounding planes
|
||||
if ((SQ(closestPtx - pointx) + SQ(closestPty - pointy) + SQ(closestPtz - pointz)) <= SQ(coneRadius)) {
|
||||
if (1) {}
|
||||
|
||||
// Stores the vector difference again
|
||||
Math_Vec3f_Diff(vecB, vecA, &sp5C);
|
||||
|
|
|
@ -806,8 +806,6 @@ void FileSelect_DrawFileInfo(GameState* thisx, s16 fileIndex, s16 isActive) {
|
|||
s16 j;
|
||||
s16 deathCountSplit[3];
|
||||
|
||||
if (1) {}
|
||||
|
||||
OPEN_DISPS(this->state.gfxCtx, "../z_file_choose.c", 1709);
|
||||
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
|
|
|
@ -116,9 +116,6 @@ void FileSelect_SetNameEntryVtx(GameState* thisx) {
|
|||
u8 temp;
|
||||
s16 phi_v0;
|
||||
|
||||
if (1) {}
|
||||
if (1) {}
|
||||
|
||||
OPEN_DISPS(this->state.gfxCtx, "../z_file_nameset_PAL.c", 205);
|
||||
|
||||
gDPPipeSync(POLY_OPA_DISP++);
|
||||
|
|
Loading…
Reference in a new issue