mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-14 02:27:21 -07:00
Remove EnFr_RandomizerCheckFromSongIndex (#5169)
* Remove EnFr_RandomizerCheckFromSongIndex Also handle missing return in RawAction::CheckFlag Also adjust jabu jabu shabom timer override to be non-overflowing constant (but same constant) * Update soh/soh/Enhancements/enemyrandomizer.cpp Co-authored-by: Archez <Archez@users.noreply.github.com> * remove shabom room hack from z_obj_roomtimer.c --------- Co-authored-by: Archez <Archez@users.noreply.github.com>
This commit is contained in:
parent
04458f2274
commit
1e294134af
4 changed files with 5 additions and 29 deletions
|
@ -186,7 +186,7 @@ extern "C" uint8_t GetRandomizedEnemy(PlayState* play, int16_t *actorId, f32 *po
|
|||
// Lengthen timer in non-MQ Jabu Jabu bubble room.
|
||||
if (!isMQ && *actorId == ACTOR_OBJ_ROOMTIMER && *params == 30760 && play->sceneNum == SCENE_JABU_JABU &&
|
||||
play->roomCtx.curRoom.num == 12) {
|
||||
*params = 92280;
|
||||
*params = (*params & ~0x3FF) | 120;
|
||||
}
|
||||
|
||||
if (IsEnemyFoundToRandomize(play->sceneNum, play->roomCtx.curRoom.num, *actorId, *params, *posX)) {
|
||||
|
|
|
@ -220,6 +220,9 @@ bool GameInteractor::RawAction::CheckFlag(int16_t flagType, int16_t flag) {
|
|||
return Flags_GetRandomizerInf(static_cast<RandomizerInf>(flag));
|
||||
case FlagType::FLAG_GS_TOKEN:
|
||||
return GET_GS_FLAGS((flag & 0x1F00) >> 8);
|
||||
default:
|
||||
assert(false);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -547,27 +547,6 @@ u8 EnGm_RandoCanGetMedigoronItem() {
|
|||
!Flags_GetRandomizerInf(RAND_INF_MERCHANTS_MEDIGORON);
|
||||
}
|
||||
|
||||
RandomizerCheck EnFr_RandomizerCheckFromSongIndex(u16 songIndex) {
|
||||
switch (songIndex) {
|
||||
case FROG_ZL:
|
||||
return RC_ZR_FROGS_ZELDAS_LULLABY;
|
||||
case FROG_EPONA:
|
||||
return RC_ZR_FROGS_EPONAS_SONG;
|
||||
case FROG_SARIA:
|
||||
return RC_ZR_FROGS_SARIAS_SONG;
|
||||
case FROG_SUNS:
|
||||
return RC_ZR_FROGS_SUNS_SONG;
|
||||
case FROG_SOT:
|
||||
return RC_ZR_FROGS_SONG_OF_TIME;
|
||||
case FROG_STORMS:
|
||||
return RC_ZR_FROGS_IN_THE_RAIN;
|
||||
case FROG_CHOIR_SONG:
|
||||
return RC_ZR_FROGS_OCARINA_GAME;
|
||||
default:
|
||||
return RC_UNKNOWN_CHECK;
|
||||
}
|
||||
}
|
||||
|
||||
void RandomizerSetChestGameRandomizerInf(RandomizerCheck rc) {
|
||||
switch (rc) {
|
||||
case RC_MARKET_TREASURE_CHEST_GAME_ITEM_1:
|
||||
|
|
|
@ -32,13 +32,7 @@ void ObjRoomtimer_Init(Actor* thisx, PlayState* play) {
|
|||
ObjRoomtimer* this = (ObjRoomtimer*)thisx;
|
||||
s16 params = this->actor.params;
|
||||
|
||||
// Shabom room in Jabu Jabu has a lengthened timer in Enemy Randomizer. Flag doesn't match what the game
|
||||
// expects. Instead set it back to the same flag as what it would be in vanilla.
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("RandomizedEnemies"), 0) && play->sceneNum == SCENE_JABU_JABU && play->roomCtx.curRoom.num == 12) {
|
||||
this->switchFlag = 30;
|
||||
} else {
|
||||
this->switchFlag = (params >> 10) & 0x3F;
|
||||
}
|
||||
this->switchFlag = (params >> 10) & 0x3F;
|
||||
this->actor.params = params & 0x3FF;
|
||||
params = this->actor.params;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue