1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-03 06:24:30 +00:00

Rename scene lists (#1344)

* first pass

* revert unwanted zap change

* review

* name Actor_InitContext, change arg name

* change bzero to use type
This commit is contained in:
fig02 2022-10-16 18:00:18 -04:00 committed by GitHub
parent bea53e1cc3
commit 26d6028ff1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
33 changed files with 148 additions and 143 deletions

View file

@ -70,7 +70,7 @@ void BgDyYoseizo_Init(Actor* thisx, PlayState* play2) {
PlayState* play = play2;
BgDyYoseizo* this = (BgDyYoseizo*)thisx;
this->fountainType = play->curSpawn;
this->fountainType = play->spawn;
if (this->fountainType < 0) {
this->fountainType = 0;
@ -82,12 +82,12 @@ void BgDyYoseizo_Init(Actor* thisx, PlayState* play2) {
if (play->sceneId == SCENE_DAIYOUSEI_IZUMI) {
// "Great Fairy Fountain"
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 大妖精の泉 ☆☆☆☆☆ %d\n" VT_RST, play->curSpawn);
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 大妖精の泉 ☆☆☆☆☆ %d\n" VT_RST, play->spawn);
SkelAnime_InitFlex(play, &this->skelAnime, &gGreatFairySkel, &gGreatFairySittingTransitionAnim,
this->jointTable, this->morphTable, 28);
} else {
// "Stone/Jewel Fairy Fountain"
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 石妖精の泉 ☆☆☆☆☆ %d\n" VT_RST, play->curSpawn);
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 石妖精の泉 ☆☆☆☆☆ %d\n" VT_RST, play->spawn);
SkelAnime_InitFlex(play, &this->skelAnime, &gGreatFairySkel, &gGreatFairyLayingDownTransitionAnim,
this->jointTable, this->morphTable, 28);
}

View file

@ -143,7 +143,7 @@ void BgMizuMovebg_Init(Actor* thisx, PlayState* play) {
((BgMizuMovebg*)thisx)->scrollAlpha4 = 160;
waypointId = MOVEBG_POINT_ID(thisx->params);
((BgMizuMovebg*)thisx)->waypointId = waypointId;
func_8089E108(play->setupPathList, &thisx->world.pos, MOVEBG_PATH_ID(thisx->params), waypointId);
func_8089E108(play->pathList, &thisx->world.pos, MOVEBG_PATH_ID(thisx->params), waypointId);
((BgMizuMovebg*)thisx)->actionFunc = func_8089E650;
break;
}
@ -323,7 +323,7 @@ void func_8089E650(BgMizuMovebg* this, PlayState* play) {
f32 dz;
this->dyna.actor.speedXZ = MOVEBG_SPEED(this->dyna.actor.params) * 0.1f;
func_8089E108(play->setupPathList, &waypoint, MOVEBG_PATH_ID(this->dyna.actor.params), this->waypointId);
func_8089E108(play->pathList, &waypoint, MOVEBG_PATH_ID(this->dyna.actor.params), this->waypointId);
dist = Actor_WorldDistXYZToPoint(&this->dyna.actor, &waypoint);
if (dist < this->dyna.actor.speedXZ) {
this->dyna.actor.speedXZ = dist;
@ -335,9 +335,9 @@ void func_8089E650(BgMizuMovebg* this, PlayState* play) {
dz = waypoint.z - this->dyna.actor.world.pos.z;
if (fabsf(dx) < 2.0f && fabsf(dy) < 2.0f && fabsf(dz) < 2.0f) {
this->waypointId++;
if (this->waypointId >= play->setupPathList[MOVEBG_PATH_ID(this->dyna.actor.params)].count) {
if (this->waypointId >= play->pathList[MOVEBG_PATH_ID(this->dyna.actor.params)].count) {
this->waypointId = 0;
func_8089E108(play->setupPathList, &this->dyna.actor.world.pos, MOVEBG_PATH_ID(this->dyna.actor.params), 0);
func_8089E108(play->pathList, &this->dyna.actor.world.pos, MOVEBG_PATH_ID(this->dyna.actor.params), 0);
}
}
if (!(D_8089EE40 & 1) && MOVEBG_SPEED(this->dyna.actor.params) != 0) {

View file

@ -108,7 +108,7 @@ void func_808AC2BC(BgSpot01Objects2* this, PlayState* play) {
CollisionHeader_GetVirtual(&object_spot01_matoyab_col, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, thisx, colHeader);
if (IS_DAY) {
func_808AC22C(play->setupPathList, &position, ((s32)thisx->params >> 8) & 0xFF, 0);
func_808AC22C(play->pathList, &position, ((s32)thisx->params >> 8) & 0xFF, 0);
Actor_SpawnAsChild(&play->actorCtx, thisx, play, ACTOR_EN_DAIKU_KAKARIKO, position.x, position.y,
position.z, thisx->world.rot.x, thisx->world.rot.y, thisx->world.rot.z,
((((s32)thisx->params >> 8) & 0xFF) << 8) + 1);

View file

@ -858,7 +858,7 @@ void EnBb_FaceWaypoint(EnBb* this) {
}
void EnBb_SetWaypoint(EnBb* this, PlayState* play) {
Path* path = &play->setupPathList[this->path];
Path* path = &play->pathList[this->path];
Vec3s* point;
if (this->waypoint == (s16)(path->count - 1)) {

View file

@ -287,7 +287,7 @@ s32 EnCs_HandleWalking(EnCs* this, PlayState* play) {
s16 walkAngle1;
s16 walkAngle2;
EnCs_GetPathPoint(play->setupPathList, &pathPos, this->path, this->waypoint);
EnCs_GetPathPoint(play->pathList, &pathPos, this->path, this->waypoint);
xDiff = pathPos.x - this->actor.world.pos.x;
zDiff = pathPos.z - this->actor.world.pos.z;
walkAngle1 = RAD_TO_BINANG(Math_FAtan2F(xDiff, zDiff));
@ -296,13 +296,13 @@ s32 EnCs_HandleWalking(EnCs* this, PlayState* play) {
while (this->walkDist <= 10.44f) {
this->waypoint++;
waypointCount = EnCs_GetwaypointCount(play->setupPathList, this->path);
waypointCount = EnCs_GetwaypointCount(play->pathList, this->path);
if ((this->waypoint < 0) || (!(this->waypoint < waypointCount))) {
this->waypoint = 0;
}
EnCs_GetPathPoint(play->setupPathList, &pathPos, this->path, this->waypoint);
EnCs_GetPathPoint(play->pathList, &pathPos, this->path, this->waypoint);
xDiff = pathPos.x - this->actor.world.pos.x;
zDiff = pathPos.z - this->actor.world.pos.z;
walkAngle2 = RAD_TO_BINANG(Math_FAtan2F(xDiff, zDiff));

View file

@ -407,7 +407,7 @@ void EnDaiku_InitEscape(EnDaiku* this, PlayState* play) {
EnDaiku_InitSubCamera(this, play);
exitLoop = false;
path = &play->setupPathList[this->actor.params >> 4 & 0xF];
path = &play->pathList[this->actor.params >> 4 & 0xF];
while (!exitLoop) {
pointPos = (Vec3s*)SEGMENTED_TO_VIRTUAL(path->points) + this->waypoint;
dx = pointPos->x - this->actor.world.pos.x;
@ -522,7 +522,7 @@ void EnDaiku_EscapeRun(EnDaiku* this, PlayState* play) {
f32 dxz;
Vec3s* pointPos;
path = &play->setupPathList[this->actor.params >> 4 & 0xF];
path = &play->pathList[this->actor.params >> 4 & 0xF];
pointPos = (Vec3s*)SEGMENTED_TO_VIRTUAL(path->points) + this->waypoint;
dx = pointPos->x - this->actor.world.pos.x;
dz = pointPos->z - this->actor.world.pos.z;

View file

@ -359,7 +359,7 @@ void EnDaikuKakariko_Run(EnDaikuKakariko* this, PlayState* play) {
s32 run;
do {
path = &play->setupPathList[(this->actor.params >> 8) & 0xFF];
path = &play->pathList[(this->actor.params >> 8) & 0xFF];
pathPos = &((Vec3s*)SEGMENTED_TO_VIRTUAL(path->points))[this->waypoint];
xDist = pathPos->x - this->actor.world.pos.x;
zDist = pathPos->z - this->actor.world.pos.z;

View file

@ -473,7 +473,7 @@ s32 EnGo_FollowPath(EnGo* this, PlayState* play) {
return false;
}
path = &play->setupPathList[this->actor.params & 0xF];
path = &play->pathList[this->actor.params & 0xF];
pointPos = SEGMENTED_TO_VIRTUAL(path->points);
pointPos += this->unk_218;
xDist = pointPos->x - this->actor.world.pos.x;
@ -507,7 +507,7 @@ s32 EnGo_SetMovedPos(EnGo* this, PlayState* play) {
if ((this->actor.params & 0xF) == 0xF) {
return false;
} else {
path = &play->setupPathList[this->actor.params & 0xF];
path = &play->pathList[this->actor.params & 0xF];
pointPos = SEGMENTED_TO_VIRTUAL(path->points);
pointPos += (path->count - 1);
this->actor.world.pos.x = pointPos->x;

View file

@ -137,7 +137,7 @@ void EnGoroiwa_SetSpeed(EnGoroiwa* this, PlayState* play) {
}
void EnGoroiwa_FaceNextWaypoint(EnGoroiwa* this, PlayState* play) {
Path* path = &play->setupPathList[this->actor.params & 0xFF];
Path* path = &play->pathList[this->actor.params & 0xFF];
Vec3s* nextPos = (Vec3s*)SEGMENTED_TO_VIRTUAL(path->points) + this->nextWaypoint;
Vec3f nextPosF;
@ -150,7 +150,7 @@ void EnGoroiwa_FaceNextWaypoint(EnGoroiwa* this, PlayState* play) {
void EnGoroiwa_GetPrevWaypointDiff(EnGoroiwa* this, PlayState* play, Vec3f* dest) {
s16 loopMode = (this->actor.params >> 8) & 3;
Path* path = &play->setupPathList[this->actor.params & 0xFF];
Path* path = &play->pathList[this->actor.params & 0xFF];
s16 prevWaypoint = this->currentWaypoint - this->pathDirection;
Vec3s* prevPointPos;
Vec3s* currentPointPos;
@ -215,14 +215,14 @@ void EnGoroiwa_ReverseDirection(EnGoroiwa* this) {
}
void EnGoroiwa_InitPath(EnGoroiwa* this, PlayState* play) {
this->endWaypoint = play->setupPathList[this->actor.params & 0xFF].count - 1;
this->endWaypoint = play->pathList[this->actor.params & 0xFF].count - 1;
this->currentWaypoint = 0;
this->nextWaypoint = 1;
this->pathDirection = 1;
}
void EnGoroiwa_TeleportToWaypoint(EnGoroiwa* this, PlayState* play, s32 waypoint) {
Path* path = &play->setupPathList[this->actor.params & 0xFF];
Path* path = &play->pathList[this->actor.params & 0xFF];
Vec3s* pointPos = (Vec3s*)SEGMENTED_TO_VIRTUAL(path->points) + waypoint;
this->actor.world.pos.x = pointPos->x;
@ -237,7 +237,7 @@ void EnGoroiwa_InitRotation(EnGoroiwa* this) {
s32 EnGoroiwa_GetAscendDirection(EnGoroiwa* this, PlayState* play) {
s32 pad;
Path* path = &play->setupPathList[this->actor.params & 0xFF];
Path* path = &play->pathList[this->actor.params & 0xFF];
Vec3s* nextPointPos = (Vec3s*)SEGMENTED_TO_VIRTUAL(path->points) + this->nextWaypoint;
Vec3s* currentPointPos = (Vec3s*)SEGMENTED_TO_VIRTUAL(path->points) + this->currentWaypoint;
@ -301,7 +301,7 @@ s32 EnGoroiwa_MoveAndFall(EnGoroiwa* this, PlayState* play) {
Math_StepToF(&this->actor.speedXZ, R_EN_GOROIWA_SPEED * 0.01f, 0.3f);
func_8002D868(&this->actor);
path = &play->setupPathList[this->actor.params & 0xFF];
path = &play->pathList[this->actor.params & 0xFF];
nextPointPos = (Vec3s*)SEGMENTED_TO_VIRTUAL(path->points) + this->nextWaypoint;
result = true;
result &= Math_StepToF(&this->actor.world.pos.x, nextPointPos->x, fabsf(this->actor.velocity.x));
@ -311,7 +311,7 @@ s32 EnGoroiwa_MoveAndFall(EnGoroiwa* this, PlayState* play) {
}
s32 EnGoroiwa_Move(EnGoroiwa* this, PlayState* play) {
Path* path = &play->setupPathList[this->actor.params & 0xFF];
Path* path = &play->pathList[this->actor.params & 0xFF];
s32 pad;
Vec3s* nextPointPos = (Vec3s*)SEGMENTED_TO_VIRTUAL(path->points) + this->nextWaypoint;
Vec3s* currentPointPos = (Vec3s*)SEGMENTED_TO_VIRTUAL(path->points) + this->currentWaypoint;
@ -343,7 +343,7 @@ s32 EnGoroiwa_Move(EnGoroiwa* this, PlayState* play) {
s32 EnGoroiwa_MoveUpToNextWaypoint(EnGoroiwa* this, PlayState* play) {
s32 pad;
Path* path = &play->setupPathList[this->actor.params & 0xFF];
Path* path = &play->pathList[this->actor.params & 0xFF];
Vec3s* nextPointPos = (Vec3s*)SEGMENTED_TO_VIRTUAL(path->points) + this->nextWaypoint;
Math_StepToF(&this->actor.velocity.y, (R_EN_GOROIWA_SPEED * 0.01f) * 0.5f, 0.18f);
@ -354,7 +354,7 @@ s32 EnGoroiwa_MoveUpToNextWaypoint(EnGoroiwa* this, PlayState* play) {
s32 EnGoroiwa_MoveDownToNextWaypoint(EnGoroiwa* this, PlayState* play) {
s32 pad;
Path* path = &play->setupPathList[this->actor.params & 0xFF];
Path* path = &play->pathList[this->actor.params & 0xFF];
Vec3s* nextPointPos = (Vec3s*)SEGMENTED_TO_VIRTUAL(path->points) + this->nextWaypoint;
f32 nextPointY;
f32 thisY;
@ -543,7 +543,7 @@ void EnGoroiwa_Init(Actor* thisx, PlayState* play) {
Actor_Kill(&this->actor);
return;
}
if (play->setupPathList[pathIdx].count < 2) {
if (play->pathList[pathIdx].count < 2) {
// "Error: Invalid Path Data"
osSyncPrintf(" : レールデータ が不正(%s %d)\n", "../z_en_gr.c", 1043);
Actor_Kill(&this->actor);

View file

@ -153,7 +153,7 @@ void EnHeishi1_Walk(EnHeishi1* this, PlayState* play) {
}
if (!sPlayerIsCaught) {
path = &play->setupPathList[this->path];
path = &play->pathList[this->path];
pointPos = SEGMENTED_TO_VIRTUAL(path->points);
pointPos += this->waypoint;

View file

@ -286,7 +286,7 @@ void func_80A6B91C(EnHorseNormal* this, PlayState* play) {
}
void EnHorseNormal_FollowPath(EnHorseNormal* this, PlayState* play) {
Path* path = &play->setupPathList[this->actor.params & 0xF];
Path* path = &play->pathList[this->actor.params & 0xF];
Vec3s* pointPos = SEGMENTED_TO_VIRTUAL(path->points);
f32 dx;
f32 dz;

View file

@ -279,7 +279,7 @@ s32 EnKz_FollowPath(EnKz* this, PlayState* play) {
return 0;
}
path = &play->setupPathList[(this->actor.params & 0xFF00) >> 8];
path = &play->pathList[(this->actor.params & 0xFF00) >> 8];
pointPos = SEGMENTED_TO_VIRTUAL(path->points);
pointPos += this->waypoint;
@ -305,7 +305,7 @@ s32 EnKz_SetMovedPos(EnKz* this, PlayState* play) {
return 0;
}
path = &play->setupPathList[(this->actor.params & 0xFF00) >> 8];
path = &play->pathList[(this->actor.params & 0xFF00) >> 8];
lastPointPos = SEGMENTED_TO_VIRTUAL(path->points);
lastPointPos += path->count - 1;

View file

@ -348,7 +348,7 @@ void EnMb_NextWaypoint(EnMb* this, PlayState* play) {
Path* path;
Vec3s* waypointPos;
path = &play->setupPathList[this->path];
path = &play->pathList[this->path];
if (this->waypoint == 0) {
this->direction = 1;
@ -404,7 +404,7 @@ s32 EnMb_IsPlayerInCorridor(EnMb* this, PlayState* play) {
}
void EnMb_FindWaypointTowardsPlayer(EnMb* this, PlayState* play) {
Path* path = &play->setupPathList[this->path];
Path* path = &play->pathList[this->path];
s16 yawToWaypoint;
Vec3f waypointPosF;
Vec3s* waypointPosS;

View file

@ -595,7 +595,7 @@ u8 EnMd_FollowPath(EnMd* this, PlayState* play) {
return 0;
}
path = &play->setupPathList[(this->actor.params & 0xFF00) >> 8];
path = &play->pathList[(this->actor.params & 0xFF00) >> 8];
pointPos = SEGMENTED_TO_VIRTUAL(path->points);
pointPos += this->waypoint;
@ -622,7 +622,7 @@ u8 EnMd_SetMovedPos(EnMd* this, PlayState* play) {
return 0;
}
path = &play->setupPathList[(this->actor.params & 0xFF00) >> 8];
path = &play->pathList[(this->actor.params & 0xFF00) >> 8];
lastPointPos = SEGMENTED_TO_VIRTUAL(path->points);
lastPointPos += path->count - 1;

View file

@ -331,7 +331,7 @@ s32 func_80AADEF0(EnMm* this, PlayState* play) {
s32 phi_a2;
s32 phi_v1;
func_80AADE60(play->setupPathList, &waypointPos, this->path, this->waypoint);
func_80AADE60(play->pathList, &waypointPos, this->path, this->waypoint);
xDiff = waypointPos.x - this->actor.world.pos.x;
zDiff = waypointPos.z - this->actor.world.pos.z;
@ -349,7 +349,7 @@ s32 func_80AADEF0(EnMm* this, PlayState* play) {
phi_a2 = 0;
break;
case 1:
phi_a2 = EnMm_GetPointCount(play->setupPathList, this->path) - 1;
phi_a2 = EnMm_GetPointCount(play->pathList, this->path) - 1;
break;
case 2:
phi_a2 = this->unk_1F0;
@ -363,7 +363,7 @@ s32 func_80AADEF0(EnMm* this, PlayState* play) {
phi_v1 = 0;
break;
case 1:
phi_v1 = EnMm_GetPointCount(play->setupPathList, this->path) - 1;
phi_v1 = EnMm_GetPointCount(play->pathList, this->path) - 1;
break;
case 2:
phi_v1 = this->unk_1F0;
@ -376,7 +376,7 @@ s32 func_80AADEF0(EnMm* this, PlayState* play) {
this->waypoint = sPathInfo[this->unk_1E8].unk_08;
}
func_80AADE60(play->setupPathList, &waypointPos, this->path, this->waypoint);
func_80AADE60(play->pathList, &waypointPos, this->path, this->waypoint);
xDiff = waypointPos.x - this->actor.world.pos.x;
zDiff = waypointPos.z - this->actor.world.pos.z;

View file

@ -106,7 +106,7 @@ void EnNb_UpdatePath(EnNb* this, PlayState* play) {
s32 pad;
s32 path;
pathList = play->setupPathList;
pathList = play->pathList;
if (pathList != NULL) {
path = EnNb_GetPath(this);

View file

@ -603,7 +603,7 @@ void func_80AB6A38(EnNiw* this, PlayState* play) {
this->unk_2FC = this->unk_300 = 0.0f;
this->actionFunc = EnNiw_ResetAction;
} else {
path = &play->setupPathList[pathIndex];
path = &play->pathList[pathIndex];
pointPos = SEGMENTED_TO_VIRTUAL(path->points);
pointPos += this->waypoint;
pathDiffX = pointPos->x - this->actor.world.pos.x;

View file

@ -101,7 +101,7 @@ void EnNiwGirl_Jump(EnNiwGirl* this, PlayState* play) {
}
void func_80AB9210(EnNiwGirl* this, PlayState* play) {
Path* path = &play->setupPathList[this->path];
Path* path = &play->pathList[this->path];
f32 xDistBetween;
f32 zDistBetween;

View file

@ -471,7 +471,7 @@ void EnOssan_TalkDefaultShopkeeper(PlayState* play) {
}
void EnOssan_TalkKakarikoPotionShopkeeper(PlayState* play) {
if (play->curSpawn == 0) {
if (play->spawn == 0) {
Message_ContinueTextbox(play, 0x5046);
} else {
Message_ContinueTextbox(play, 0x504E);
@ -487,7 +487,7 @@ void EnOssan_TalkKokiriShopkeeper(PlayState* play) {
}
void EnOssan_TalkBazaarShopkeeper(PlayState* play) {
if (play->curSpawn == 0) {
if (play->spawn == 0) {
Message_ContinueTextbox(play, 0x9D);
} else {
Message_ContinueTextbox(play, 0x9C);

View file

@ -87,7 +87,7 @@ void EnPoDesert_Destroy(Actor* thisx, PlayState* play) {
}
void EnPoDesert_SetNextPathPoint(EnPoDesert* this, PlayState* play) {
Path* path = &play->setupPathList[this->actor.params];
Path* path = &play->pathList[this->actor.params];
Vec3s* pathPoint;
Animation_MorphToLoop(&this->skelAnime, &gPoeFieldDisappearAnim, -6.0f);

View file

@ -200,7 +200,7 @@ void EnRiverSound_Update(Actor* thisx, PlayState* play) {
if ((thisx->params == RS_RIVER_DEFAULT_LOW_FREQ) || (thisx->params == RS_RIVER_DEFAULT_MEDIUM_FREQ) ||
(thisx->params == RS_RIVER_DEFAULT_HIGH_FREQ)) {
path = &play->setupPathList[this->pathIndex];
path = &play->pathList[this->pathIndex];
pos = &thisx->world.pos;
if (EnRiverSound_GetSfxPos(SEGMENTED_TO_VIRTUAL(path->points), path->count, &player->actor.world.pos, pos)) {

View file

@ -308,7 +308,7 @@ s32 EnTk_Orient(EnTk* this, PlayState* play) {
return 1;
}
path = &play->setupPathList[0];
path = &play->pathList[0];
point = SEGMENTED_TO_VIRTUAL(path->points);
point += this->currentWaypoint;

View file

@ -1573,7 +1573,7 @@ s32 func_80B56EE4(EnZl3* this, PlayState* play) {
void func_80B56F10(EnZl3* this, PlayState* play) {
s32 waypoint;
Path* pathHead = play->setupPathList;
Path* pathHead = play->pathList;
if (pathHead != NULL) {
waypoint = func_80B54DC4(this);
@ -1838,49 +1838,49 @@ void func_80B57858(PlayState* play) {
s32 func_80B57890(EnZl3* this, PlayState* play) {
s8 pad[2];
u8 curSpawn = play->curSpawn;
u8 spawn = play->spawn;
s16 sceneId = play->sceneId;
s32 result = func_80B54DB4(this);
if (play) {} // Needed to match, this if can be almost anywhere and it still matches
if (sceneId == SCENE_GANON_SONOGO) {
if ((result == 0x24) && (curSpawn == 0)) {
if ((result == 0x24) && (spawn == 0)) {
return 1;
}
if ((result == 0x25) && (curSpawn == 2)) {
if ((result == 0x25) && (spawn == 2)) {
return 1;
}
if ((result == 0x26) && (curSpawn == 4)) {
if ((result == 0x26) && (spawn == 4)) {
return 1;
}
if ((result == 0x27) && (curSpawn == 6)) {
if ((result == 0x27) && (spawn == 6)) {
return 1;
}
if ((result == 0x28) && (curSpawn == 6)) {
if ((result == 0x28) && (spawn == 6)) {
return 1;
}
} else if (sceneId == SCENE_GANON_FINAL) {
if ((result == 0x20) && (curSpawn == 0) && Flags_GetSwitch(play, 0x37)) {
if ((result == 0x20) && (spawn == 0) && Flags_GetSwitch(play, 0x37)) {
if ((play->sceneId == SCENE_GANON_DEMO) || (play->sceneId == SCENE_GANON_FINAL) ||
(play->sceneId == SCENE_GANON_SONOGO) || (play->sceneId == SCENE_GANONTIKA_SONOGO)) {
return 1;
}
}
if ((result == 0x21) && (curSpawn == 2)) {
if ((result == 0x21) && (spawn == 2)) {
return 1;
}
if ((result == 0x22) && (curSpawn == 4)) {
if ((result == 0x22) && (spawn == 4)) {
return 1;
}
if ((result == 0x23) && (curSpawn == 6)) {
if ((result == 0x23) && (spawn == 6)) {
return 1;
}
} else if (sceneId == SCENE_GANONTIKA_SONOGO) {
if ((result == 0x29) && (curSpawn == 0)) {
if ((result == 0x29) && (spawn == 0)) {
return 1;
}
if ((result == 0x2A) && (curSpawn == 0)) {
if ((result == 0x2A) && (spawn == 0)) {
return 1;
}
}
@ -2489,9 +2489,9 @@ s32 func_80B59698(EnZl3* this, PlayState* play) {
(play->sceneId == SCENE_GANON_SONOGO) || (play->sceneId == SCENE_GANONTIKA_SONOGO));
if (cond) {
u8 curSpawn = play->curSpawn;
u8 spawn = play->spawn;
if ((func_80B54DB4(this) == 0x20) && (curSpawn == 0) &&
if ((func_80B54DB4(this) == 0x20) && (spawn == 0) &&
((gSaveContext.timer2Value <= 0) || (gSaveContext.timer2State == 0))) {
return 1;
}
@ -2505,9 +2505,9 @@ s32 func_80B59768(EnZl3* this, PlayState* play) {
(play->sceneId == SCENE_GANON_SONOGO) || (play->sceneId == SCENE_GANONTIKA_SONOGO));
if (cond) {
u8 curSpawn = play->curSpawn;
u8 spawn = play->spawn;
if ((func_80B54DB4(this) == 0x20) && (curSpawn == 0) && (gSaveContext.timer2Value <= 0)) {
if ((func_80B54DB4(this) == 0x20) && (spawn == 0) && (gSaveContext.timer2Value <= 0)) {
return 1;
}
}

View file

@ -226,13 +226,13 @@ void ObjBean_SetDrawMode(ObjBean* this, u8 drawFlag) {
}
void ObjBean_SetupPathCount(ObjBean* this, PlayState* play) {
this->pathCount = play->setupPathList[(this->dyna.actor.params >> 8) & 0x1F].count - 1;
this->pathCount = play->pathList[(this->dyna.actor.params >> 8) & 0x1F].count - 1;
this->currentPointIndex = 0;
this->nextPointIndex = 1;
}
void ObjBean_SetupPath(ObjBean* this, PlayState* play) {
Path* path = &play->setupPathList[(this->dyna.actor.params >> 8) & 0x1F];
Path* path = &play->pathList[(this->dyna.actor.params >> 8) & 0x1F];
Math_Vec3s_ToVec3f(&this->pathPoints, SEGMENTED_TO_VIRTUAL(path->points));
}
@ -250,7 +250,7 @@ void ObjBean_FollowPath(ObjBean* this, PlayState* play) {
f32 mag;
Math_StepToF(&this->dyna.actor.speedXZ, sBeanSpeeds[this->unk_1F6].velocity, sBeanSpeeds[this->unk_1F6].accel);
path = &play->setupPathList[(this->dyna.actor.params >> 8) & 0x1F];
path = &play->pathList[(this->dyna.actor.params >> 8) & 0x1F];
nextPathPoint = &((Vec3s*)SEGMENTED_TO_VIRTUAL(path->points))[this->nextPointIndex];
Math_Vec3s_ToVec3f(&pathPointsFloat, nextPathPoint);
@ -480,7 +480,7 @@ void ObjBean_Init(Actor* thisx, PlayState* play) {
Actor_Kill(&this->dyna.actor);
return;
}
if (play->setupPathList[path].count < 3) {
if (play->pathList[path].count < 3) {
osSyncPrintf(VT_COL(RED, WHITE));
// "Incorrect number of path data"
osSyncPrintf("パスデータ数が不正(%s %d)(arg_data %xH)\n", "../z_obj_bean.c", 921,

View file

@ -4357,7 +4357,7 @@ s32 func_80838FB8(PlayState* play, Player* this) {
* The start of each group is indexed by `sReturnEntranceGroupIndices` values.
* The resulting groups are then indexed by the spawn value.
*
* The spawn value (`PlayState.curSpawn`) is set to a different value depending on the entrance used to enter the
* The spawn value (`PlayState.spawn`) is set to a different value depending on the entrance used to enter the
* scene, which allows these dynamic "return entrances" to link back to the previous scene.
*
* Note: grottos and normal fairy fountains use `ENTR_RETURN_GROTTO`
@ -4428,7 +4428,7 @@ s32 func_80839034(PlayState* play, Player* this, CollisionPoly* poly, u32 bgId)
Play_TriggerVoidOut(play);
Scene_SetTransitionForNextEntrance(play);
} else {
play->nextEntranceIndex = play->setupExitList[exitIndex - 1];
play->nextEntranceIndex = play->exitList[exitIndex - 1];
if (play->nextEntranceIndex == ENTR_RETURN_GROTTO) {
gSaveContext.respawnFlag = 2;
@ -4439,7 +4439,7 @@ s32 func_80839034(PlayState* play, Player* this, CollisionPoly* poly, u32 bgId)
play->nextEntranceIndex =
sReturnEntranceGroupData[sReturnEntranceGroupIndices[play->nextEntranceIndex -
ENTR_RETURN_YOUSEI_IZUMI_YOKO] +
play->curSpawn];
play->spawn];
Scene_SetTransitionForNextEntrance(play);
} else {
if (SurfaceType_GetFloorEffect(&play->colCtx, poly, bgId) == FLOOR_EFFECT_2) {