mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-01-31 07:20:14 -05:00
Seperated the 2 KF bushes into 4 checks
This commit is contained in:
parent
6e699e3e67
commit
6576bd49df
@ -70,7 +70,7 @@ void EnKusa_RandomizerInit(void* actorRef) {
|
||||
EnKusa* grassActor = static_cast<EnKusa*>(actorRef);
|
||||
s16 respawnData = gSaveContext.respawn[RESPAWN_MODE_RETURN].data & ((1 << 8) - 1);
|
||||
|
||||
grassActor->grassIdentity = OTRGlobals::Instance->gRandomizer->IdentifyGrass(gPlayState->sceneNum, (s16)actor->world.pos.x, (s16)actor->world.pos.z, respawnData);
|
||||
grassActor->grassIdentity = OTRGlobals::Instance->gRandomizer->IdentifyGrass(gPlayState->sceneNum, (s16)actor->world.pos.x, (s16)actor->world.pos.z, respawnData, gPlayState->linkAgeOnLoad);
|
||||
}
|
||||
|
||||
void ShuffleGrass_OnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_list originalArgs) {
|
||||
|
@ -72,6 +72,8 @@ void RegionTable_Init_KokiriForest() {
|
||||
LOCATION(RC_KF_ADULT_GRASS_16, logic->IsAdult && logic->CanCutShrubs()),
|
||||
LOCATION(RC_KF_ADULT_GRASS_17, logic->IsAdult && logic->CanCutShrubs()),
|
||||
LOCATION(RC_KF_ADULT_GRASS_18, logic->IsAdult && logic->CanCutShrubs()),
|
||||
LOCATION(RC_KF_ADULT_GRASS_19, logic->IsAdult && logic->CanCutShrubs()),
|
||||
LOCATION(RC_KF_ADULT_GRASS_20, logic->IsAdult && logic->CanCutShrubs()),
|
||||
}, {
|
||||
//Exits
|
||||
Entrance(RR_KF_LINKS_HOUSE, []{return true;}),
|
||||
|
@ -1074,8 +1074,8 @@ void Rando::StaticData::InitLocationTable() { //
|
||||
locationTable[RC_KF_CHILD_GRASS_2] = Location::Grass(RC_KF_CHILD_GRASS_2, RCQUEST_BOTH, RCAREA_KOKIRI_FOREST, SCENE_KOKIRI_FOREST, TWO_ACTOR_PARAMS(594, 542), "KF Child Grass 2", "KF Child Grass 2", RHT_KF_GRASS, RG_GREEN_RUPEE, SpoilerCollectionCheck::RandomizerInf(RAND_INF_KF_CHILD_GRASS_2));
|
||||
locationTable[RC_KF_CHILD_GRASS_3] = Location::Grass(RC_KF_CHILD_GRASS_3, RCQUEST_BOTH, RCAREA_KOKIRI_FOREST, SCENE_KOKIRI_FOREST, TWO_ACTOR_PARAMS(572, 603), "KF Child Grass 3", "KF Child Grass 3", RHT_KF_GRASS, RG_GREEN_RUPEE, SpoilerCollectionCheck::RandomizerInf(RAND_INF_KF_CHILD_GRASS_3));
|
||||
locationTable[RC_KF_CHILD_GRASS_4] = Location::Grass(RC_KF_CHILD_GRASS_4, RCQUEST_BOTH, RCAREA_KOKIRI_FOREST, SCENE_KOKIRI_FOREST, TWO_ACTOR_PARAMS(385, 643), "KF Child Grass 4", "KF Child Grass 4", RHT_KF_GRASS, RG_GREEN_RUPEE, SpoilerCollectionCheck::RandomizerInf(RAND_INF_KF_CHILD_GRASS_4));
|
||||
locationTable[RC_KF_CHILD_GRASS_5] = Location::Grass(RC_KF_CHILD_GRASS_5, RCQUEST_BOTH, RCAREA_KOKIRI_FOREST, SCENE_KOKIRI_FOREST, TWO_ACTOR_PARAMS(-498, 696), "KF Child/Adult Grass 5", "KF Child/Adult Grass 5", RHT_KF_GRASS, RG_GREEN_RUPEE, SpoilerCollectionCheck::RandomizerInf(RAND_INF_KF_CHILD_GRASS_5));
|
||||
locationTable[RC_KF_CHILD_GRASS_6] = Location::Grass(RC_KF_CHILD_GRASS_6, RCQUEST_BOTH, RCAREA_KOKIRI_FOREST, SCENE_KOKIRI_FOREST, TWO_ACTOR_PARAMS(-523, 771), "KF Child/Adult Grass 6", "KF Child/Adult Grass 6", RHT_KF_GRASS, RG_GREEN_RUPEE, SpoilerCollectionCheck::RandomizerInf(RAND_INF_KF_CHILD_GRASS_6));
|
||||
locationTable[RC_KF_CHILD_GRASS_5] = Location::Grass(RC_KF_CHILD_GRASS_5, RCQUEST_BOTH, RCAREA_KOKIRI_FOREST, SCENE_KOKIRI_FOREST, TWO_ACTOR_PARAMS(-498, 696), "KF Child Grass 5", "KF Child Grass 5", RHT_KF_GRASS, RG_GREEN_RUPEE, SpoilerCollectionCheck::RandomizerInf(RAND_INF_KF_CHILD_GRASS_5));
|
||||
locationTable[RC_KF_CHILD_GRASS_6] = Location::Grass(RC_KF_CHILD_GRASS_6, RCQUEST_BOTH, RCAREA_KOKIRI_FOREST, SCENE_KOKIRI_FOREST, TWO_ACTOR_PARAMS(-523, 771), "KF Child Grass 6", "KF Child Grass 6", RHT_KF_GRASS, RG_GREEN_RUPEE, SpoilerCollectionCheck::RandomizerInf(RAND_INF_KF_CHILD_GRASS_6));
|
||||
locationTable[RC_KF_CHILD_GRASS_7] = Location::Grass(RC_KF_CHILD_GRASS_7, RCQUEST_BOTH, RCAREA_KOKIRI_FOREST, SCENE_KOKIRI_FOREST, TWO_ACTOR_PARAMS(-612, 737), "KF Child Grass 7", "KF Child Grass 7", RHT_KF_GRASS, RG_GREEN_RUPEE, SpoilerCollectionCheck::RandomizerInf(RAND_INF_KF_CHILD_GRASS_7));
|
||||
locationTable[RC_KF_CHILD_GRASS_8] = Location::Grass(RC_KF_CHILD_GRASS_8, RCQUEST_BOTH, RCAREA_KOKIRI_FOREST, SCENE_KOKIRI_FOREST, TWO_ACTOR_PARAMS(-671, 671), "KF Child Grass 8", "KF Child Grass 8", RHT_KF_GRASS, RG_GREEN_RUPEE, SpoilerCollectionCheck::RandomizerInf(RAND_INF_KF_CHILD_GRASS_8));
|
||||
locationTable[RC_KF_CHILD_GRASS_9] = Location::Grass(RC_KF_CHILD_GRASS_9, RCQUEST_BOTH, RCAREA_KOKIRI_FOREST, SCENE_KOKIRI_FOREST, TWO_ACTOR_PARAMS(-748, 632), "KF Child Grass 9", "KF Child Grass 9", RHT_KF_GRASS, RG_GREEN_RUPEE, SpoilerCollectionCheck::RandomizerInf(RAND_INF_KF_CHILD_GRASS_9));
|
||||
@ -1103,8 +1103,8 @@ void Rando::StaticData::InitLocationTable() { //
|
||||
locationTable[RC_KF_ADULT_GRASS_16] = Location::Grass(RC_KF_ADULT_GRASS_16, RCQUEST_BOTH, RCAREA_KOKIRI_FOREST, SCENE_KOKIRI_FOREST, TWO_ACTOR_PARAMS(-822, 644), "KF Adult Grass 16", "KF Adult Grass 16", RHT_KF_GRASS, RG_GREEN_RUPEE, SpoilerCollectionCheck::RandomizerInf(RAND_INF_KF_ADULT_GRASS_16));
|
||||
locationTable[RC_KF_ADULT_GRASS_17] = Location::Grass(RC_KF_ADULT_GRASS_17, RCQUEST_BOTH, RCAREA_KOKIRI_FOREST, SCENE_KOKIRI_FOREST, TWO_ACTOR_PARAMS(-842, 601), "KF Adult Grass 17", "KF Adult Grass 17", RHT_KF_GRASS, RG_GREEN_RUPEE, SpoilerCollectionCheck::RandomizerInf(RAND_INF_KF_ADULT_GRASS_17));
|
||||
locationTable[RC_KF_ADULT_GRASS_18] = Location::Grass(RC_KF_ADULT_GRASS_18, RCQUEST_BOTH, RCAREA_KOKIRI_FOREST, SCENE_KOKIRI_FOREST, TWO_ACTOR_PARAMS(-867, 674), "KF Adult Grass 18", "KF Adult Grass 18", RHT_KF_GRASS, RG_GREEN_RUPEE, SpoilerCollectionCheck::RandomizerInf(RAND_INF_KF_ADULT_GRASS_18));
|
||||
//locationTable[RC_KF_ADULT_GRASS_19] = Location::Grass(RC_KF_ADULT_GRASS_19, RCQUEST_BOTH, RCAREA_KOKIRI_FOREST, SCENE_KOKIRI_FOREST, TWO_ACTOR_PARAMS(-498, 696), "KF Adult Grass 19", "KF Adult Grass 19", RHT_KF_GRASS, RG_GREEN_RUPEE, SpoilerCollectionCheck::RandomizerInf(RAND_INF_KF_ADULT_GRASS_19));
|
||||
//locationTable[RC_KF_ADULT_GRASS_20] = Location::Grass(RC_KF_ADULT_GRASS_20, RCQUEST_BOTH, RCAREA_KOKIRI_FOREST, SCENE_KOKIRI_FOREST, TWO_ACTOR_PARAMS(-523, 771), "KF Adult Grass 20", "KF Adult Grass 29", RHT_KF_GRASS, RG_GREEN_RUPEE, SpoilerCollectionCheck::RandomizerInf(RAND_INF_KF_ADULT_GRASS_20));
|
||||
locationTable[RC_KF_ADULT_GRASS_19] = Location::Grass(RC_KF_ADULT_GRASS_19, RCQUEST_BOTH, RCAREA_KOKIRI_FOREST, SCENE_KOKIRI_FOREST, TWO_ACTOR_PARAMS(-498, 0xFF), "KF Adult Grass 19", "KF Adult Grass 19", RHT_KF_GRASS, RG_GREEN_RUPEE, SpoilerCollectionCheck::RandomizerInf(RAND_INF_KF_ADULT_GRASS_19));
|
||||
locationTable[RC_KF_ADULT_GRASS_20] = Location::Grass(RC_KF_ADULT_GRASS_20, RCQUEST_BOTH, RCAREA_KOKIRI_FOREST, SCENE_KOKIRI_FOREST, TWO_ACTOR_PARAMS(-523, 0xFF), "KF Adult Grass 20", "KF Adult Grass 29", RHT_KF_GRASS, RG_GREEN_RUPEE, SpoilerCollectionCheck::RandomizerInf(RAND_INF_KF_ADULT_GRASS_20));
|
||||
locationTable[RC_LW_GRASS_1] = Location::Grass(RC_LW_GRASS_1, RCQUEST_BOTH, RCAREA_LOST_WOODS, SCENE_LOST_WOODS, TWO_ACTOR_PARAMS(676, -651), "LW Grass 1", "LW Grass 1", RHT_LW_GRASS, RG_GREEN_RUPEE, SpoilerCollectionCheck::RandomizerInf(RAND_INF_LW_GRASS_1));
|
||||
locationTable[RC_LW_GRASS_2] = Location::Grass(RC_LW_GRASS_2, RCQUEST_BOTH, RCAREA_LOST_WOODS, SCENE_LOST_WOODS, TWO_ACTOR_PARAMS(633, -676), "LW Grass 2", "LW Grass 2", RHT_LW_GRASS, RG_GREEN_RUPEE, SpoilerCollectionCheck::RandomizerInf(RAND_INF_LW_GRASS_2));
|
||||
locationTable[RC_LW_GRASS_3] = Location::Grass(RC_LW_GRASS_3, RCQUEST_BOTH, RCAREA_LOST_WOODS, SCENE_LOST_WOODS, TWO_ACTOR_PARAMS(645, -638), "LW Grass 3", "LW Grass 3", RHT_LW_GRASS, RG_GREEN_RUPEE, SpoilerCollectionCheck::RandomizerInf(RAND_INF_LW_GRASS_3));
|
||||
|
@ -1040,8 +1040,8 @@ std::map<RandomizerCheck, RandomizerInf> rcToRandomizerInf = {
|
||||
{ RC_KF_ADULT_GRASS_16, RAND_INF_KF_ADULT_GRASS_16 },
|
||||
{ RC_KF_ADULT_GRASS_17, RAND_INF_KF_ADULT_GRASS_17 },
|
||||
{ RC_KF_ADULT_GRASS_18, RAND_INF_KF_ADULT_GRASS_18 },
|
||||
//{ RC_KF_ADULT_GRASS_19, RAND_INF_KF_ADULT_GRASS_19 },
|
||||
//{ RC_KF_ADULT_GRASS_20, RAND_INF_KF_ADULT_GRASS_20 },
|
||||
{ RC_KF_ADULT_GRASS_19, RAND_INF_KF_ADULT_GRASS_19 },
|
||||
{ RC_KF_ADULT_GRASS_20, RAND_INF_KF_ADULT_GRASS_20 },
|
||||
{ RC_LW_GRASS_1, RAND_INF_LW_GRASS_1 },
|
||||
{ RC_LW_GRASS_2, RAND_INF_LW_GRASS_2 },
|
||||
{ RC_LW_GRASS_3, RAND_INF_LW_GRASS_3 },
|
||||
@ -2190,21 +2190,26 @@ FishIdentity Randomizer::IdentifyFish(s32 sceneNum, s32 actorParams) {
|
||||
return fishIdentity;
|
||||
}
|
||||
|
||||
GrassIdentity Randomizer::IdentifyGrass(s32 sceneNum, s32 posX, s32 posZ, s32 respawnData) {
|
||||
GrassIdentity Randomizer::IdentifyGrass(s32 sceneNum, s32 posX, s32 posZ, s32 respawnData, s32 linkAge) {
|
||||
struct GrassIdentity grassIdentity;
|
||||
|
||||
grassIdentity.randomizerInf = RAND_INF_MAX;
|
||||
grassIdentity.randomizerCheck = RC_UNKNOWN_CHECK;
|
||||
|
||||
//s32 actorParams = TWO_ACTOR_PARAMS(posX, posZ);
|
||||
|
||||
if (sceneNum == SCENE_GROTTOS) {
|
||||
respawnData = TWO_ACTOR_PARAMS(posX, respawnData);
|
||||
} else {
|
||||
// We'll just pretend it's always daytime for our market bushes.
|
||||
if (sceneNum == SCENE_MARKET_NIGHT) {
|
||||
sceneNum = SCENE_MARKET_DAY;
|
||||
}
|
||||
|
||||
if (sceneNum == SCENE_KOKIRI_FOREST && linkAge == 0) {
|
||||
if (posX == -498 || posX == -523) {
|
||||
posZ = 0xFF;
|
||||
}
|
||||
}
|
||||
|
||||
respawnData = TWO_ACTOR_PARAMS(posX, posZ);
|
||||
}
|
||||
|
||||
|
@ -54,7 +54,7 @@ class Randomizer {
|
||||
CowIdentity IdentifyCow(s32 sceneNum, s32 posX, s32 posZ);
|
||||
PotIdentity IdentifyPot(s32 sceneNum, s32 posX, s32 posZ);
|
||||
FishIdentity IdentifyFish(s32 sceneNum, s32 actorParams);
|
||||
GrassIdentity IdentifyGrass(s32 sceneNum, s32 posX, s32 posZ, s32 respawnData);
|
||||
GrassIdentity IdentifyGrass(s32 sceneNum, s32 posX, s32 posZ, s32 respawnData, s32 linkAge);
|
||||
GetItemEntry GetItemFromKnownCheck(RandomizerCheck randomizerCheck, GetItemID ogItemId, bool checkObtainability = true);
|
||||
GetItemEntry GetItemFromActor(s16 actorId, s16 sceneNum, s16 actorParams, GetItemID ogItemId, bool checkObtainability = true);
|
||||
ItemObtainability GetItemObtainabilityFromRandomizerCheck(RandomizerCheck randomizerCheck);
|
||||
|
@ -2857,8 +2857,8 @@ typedef enum {
|
||||
RC_KF_ADULT_GRASS_16,
|
||||
RC_KF_ADULT_GRASS_17,
|
||||
RC_KF_ADULT_GRASS_18,
|
||||
//RC_KF_ADULT_GRASS_19,
|
||||
//RC_KF_ADULT_GRASS_20,
|
||||
RC_KF_ADULT_GRASS_19,
|
||||
RC_KF_ADULT_GRASS_20,
|
||||
RC_LW_GRASS_1,
|
||||
RC_LW_GRASS_2,
|
||||
RC_LW_GRASS_3,
|
||||
|
@ -1307,8 +1307,8 @@ typedef enum {
|
||||
RAND_INF_KF_ADULT_GRASS_16,
|
||||
RAND_INF_KF_ADULT_GRASS_17,
|
||||
RAND_INF_KF_ADULT_GRASS_18,
|
||||
//RAND_INF_KF_ADULT_GRASS_19,
|
||||
//RAND_INF_KF_ADULT_GRASS_20,
|
||||
RAND_INF_KF_ADULT_GRASS_19,
|
||||
RAND_INF_KF_ADULT_GRASS_20,
|
||||
RAND_INF_LW_GRASS_1,
|
||||
RAND_INF_LW_GRASS_2,
|
||||
RAND_INF_LW_GRASS_3,
|
||||
|
Loading…
Reference in New Issue
Block a user