From 4b2567d6d0fda84ac4eccd739ac47a03bdc13109 Mon Sep 17 00:00:00 2001 From: Jeod <47716344+JeodC@users.noreply.github.com> Date: Mon, 16 Nov 2026 08:56:02 -0500 Subject: [PATCH 1/2] Rename seven VB_OVERRIDE_* VBs and default them to true --- include/core1/sns.h | 2 +- src/SM/ch/smbottles.c | 4 +- src/core2/actor_cubepropsystem.c | 2 +- src/core2/ba/marker.c | 2 +- src/core2/bundle.c | 2 +- src/core2/ch/mole.c | 2 +- src/core2/fx/effect_jiggy_list.c | 2 +- src/core2/quiz/game.c | 2 +- src/core2/timedfuncqueue.c | 2 +- src/port/Enhancements/Events/Hooks/Events.h | 44 +++++++++---------- src/port/Enhancements/Fixes/GameFixes.cpp | 4 +- .../Retention/ConsumableRetention.cpp | 8 ++-- .../Enhancements/Retention/JinjoRetention.cpp | 4 +- .../Enhancements/Retention/NoteRetention.cpp | 8 ++-- src/port/Rando/ObjectBehavior/Bundle.cpp | 8 ++-- src/port/Rando/ObjectBehavior/Jiggy.cpp | 4 +- src/port/Rando/ObjectBehavior/Molehill.cpp | 8 ++-- src/port/Rando/ObjectBehavior/Prop.cpp | 8 ++-- src/port/Rando/ObjectBehavior/StopNSwop.cpp | 6 +-- src/port/Romhack/Specific/SnowGlowVillage.cpp | 10 ++--- 20 files changed, 66 insertions(+), 66 deletions(-) diff --git a/include/core1/sns.h b/include/core1/sns.h index 61ce9240b..1170fd55b 100644 --- a/include/core1/sns.h +++ b/include/core1/sns.h @@ -13,7 +13,7 @@ extern "C" { // Flag set used when making a Stop 'n' Swop item visible and collectible in-game #define SNS_UNLOCKED (1) -/* Which call site raised VB_OVERRIDE_SNS_MAP_CHECK. The pickup site awards the +/* Which call site raised VB_RUN_SNS_MAP_CHECK. The pickup site awards the item; the spawn site only decides whether the egg actor is drawn. */ #define SNS_MAP_CHECK_PICKUP (0) #define SNS_MAP_CHECK_SPAWN (1) diff --git a/src/SM/ch/smbottles.c b/src/SM/ch/smbottles.c index 585832252..b505e0039 100644 --- a/src/SM/ch/smbottles.c +++ b/src/SM/ch/smbottles.c @@ -254,7 +254,7 @@ static void __chSmBottles_textActions(ActorMarker *marker, enum asset_e text_id, void __chSmBottles_textCallback(ActorMarker *marker, enum asset_e text_id, s32 arg2) { Actor *actor = marker_getActor(marker); - if (!EventSystem_Should(VB_OVERRIDE_BOTTLES_TEXT_CALLBACK, false, actor)) { + if (EventSystem_Should(VB_RUN_BOTTLES_TEXT_CALLBACK, true, actor)) { if (!mapSpecificFlags_get(SM_SPECIFIC_FLAG_3_ALL_SM_ABILITIES_LEARNED) && chmole_learnedAllSpiralMountainAbilities()) { mapSpecificFlags_set(SM_SPECIFIC_FLAG_3_ALL_SM_ABILITIES_LEARNED, true); gcdialog_showDialog(ASSET_E12_DIALOG_BOTTLES_LEARNED_TUTORIAL_MOVES, 0xe, actor->position, actor->marker, __chSmBottles_textCallback, NULL); @@ -338,7 +338,7 @@ void __chSmBottles_talk(Actor *this) { text_flags = 0xe; text_id = 0; - if (!EventSystem_Should(VB_OVERRIDE_MOLEHILL_ABILITY, false, this, &text_id, &text_flags)) { + if (EventSystem_Should(VB_TEACH_MOLEHILL_ABILITY, true, this, &text_id, &text_flags)) { switch (this->actorTypeSpecificField) { case CH_SM_MOLE_ID_1_INTRO://L8038965C if (mapSpecificFlags_get(SM_SPECIFIC_FLAG_1_TALKED_TO_BOTTLES)) { diff --git a/src/core2/actor_cubepropsystem.c b/src/core2/actor_cubepropsystem.c index 6523b3bd6..1d5b5ecc1 100644 --- a/src/core2/actor_cubepropsystem.c +++ b/src/core2/actor_cubepropsystem.c @@ -1038,7 +1038,7 @@ void code7AF80_initCubeFromFile(File *file_ptr, Cube *cube) { if (!(flags & 1) && !((flags >> 1) & 1)) { propSpriteAsset = ((s32)((word0 >> 20) & 0xFFF)) + 0x572; } - if (!EventSystem_Should(VB_OVERRIDE_PROP_SPAWN, false, pos, propSpriteAsset)) { + if (EventSystem_Should(VB_SPAWN_PROP, true, pos, propSpriteAsset)) { // Extract flag bits using N64 BE bit positions within the u16 { bool mf = flags & 1; // markerFlag (BE bit 0) diff --git a/src/core2/ba/marker.c b/src/core2/ba/marker.c index 7e2bc121a..b32b38a5f 100644 --- a/src/core2/ba/marker.c +++ b/src/core2/ba/marker.c @@ -631,7 +631,7 @@ void __baMarker_resolveCollision(Prop *other_prop){ case MARKER_169_SNS_EGG: //L8028C908 { //ONLY THIS CASE DOESN'T MATCH - if (!EventSystem_Should(VB_OVERRIDE_SNS_MAP_CHECK, false, SNS_MAP_CHECK_PICKUP, actor)) { + if (EventSystem_Should(VB_RUN_SNS_MAP_CHECK, true, SNS_MAP_CHECK_PICKUP, actor)) { switch (gsworld_getMap()) { case MAP_1D_MMM_CELLAR: //L8028C95C diff --git a/src/core2/bundle.c b/src/core2/bundle.c index a8d7b166b..8fab71dbf 100644 --- a/src/core2/bundle.c +++ b/src/core2/bundle.c @@ -146,7 +146,7 @@ Actor *__bundle_spawnWithFirstActor(enum bundle_e bundle_id, f32 position[3], Ac } //L802C9114 - if (!EventSystem_Should(VB_OVERRIDE_BUNDLE_SPAWN, false, bundle_id, bundle_info, i, position, &actor)) { + if (EventSystem_Should(VB_SPAWN_BUNDLE_ACTOR, true, bundle_id, bundle_info, i, position, &actor)) { actor = (i == 0 && firstActor) ? firstActor : actor_spawnWithYaw_f32(bundle_info->actor_id, position, 0); //} // [port] Suppressed spawn: a cancelled OnActorSpawn returns the listener's actor, diff --git a/src/core2/ch/mole.c b/src/core2/ch/mole.c index 49fc1e711..7891f7dbc 100644 --- a/src/core2/ch/mole.c +++ b/src/core2/ch/mole.c @@ -240,7 +240,7 @@ int chmole_learnAbility(Actor *this){ s32 teach_text_id; s32 sp28 = 0xe; // [port] Rando hands out its own item here, whether or not the vanilla move is known. - if (!EventSystem_Should(VB_OVERRIDE_MOLEHILL_ABILITY, false, this, &teach_text_id, &sp28)) { + if (EventSystem_Should(VB_TEACH_MOLEHILL_ABILITY, true, this, &teach_text_id, &sp28)) { // Known Ability: Refresher Dialog if(player_isAbilityUnlocked(moleTable[this->actorTypeSpecificField - MOLE_ID_TO_TABLE_SHIFT].ability)){ sp28 = 0xf; diff --git a/src/core2/fx/effect_jiggy_list.c b/src/core2/fx/effect_jiggy_list.c index 232dc09ad..055044031 100644 --- a/src/core2/fx/effect_jiggy_list.c +++ b/src/core2/fx/effect_jiggy_list.c @@ -240,7 +240,7 @@ void jiggy_spawn(enum jiggy_e jiggy_id, f32 pos[3]) { Struct_core2_ABC00_0 *temp_v0; jiggy_id = ((jiggy_id <= 0) || (jiggy_id >= (s_jiggyList_level_jiggy_count * 10))) ? JIGGY_A_MM_CONGA : jiggy_id; - if (!EventSystem_Should(VB_OVERRIDE_JIGGY_SPAWN, false, jiggy_id, pos)) { + if (EventSystem_Should(VB_SPAWN_JIGGY, true, jiggy_id, pos)) { temp_v0 = &jiggylist_list[jiggy_id - 1]; if (jiggylist_list[jiggy_id - 1].unk10.marker == NULL) { temp_v0->unk10.position[0] = pos[0]; diff --git a/src/core2/quiz/game.c b/src/core2/quiz/game.c index 359a509bc..f79a3c000 100644 --- a/src/core2/quiz/game.c +++ b/src/core2/quiz/game.c @@ -531,7 +531,7 @@ void chSnsEgg_update(Actor *this){ if(!this->initialized){ this->initialized = true; func_802D3CE8(this); - if (!EventSystem_Should(VB_OVERRIDE_SNS_MAP_CHECK, false, SNS_MAP_CHECK_SPAWN, this)) { + if (EventSystem_Should(VB_RUN_SNS_MAP_CHECK, true, SNS_MAP_CHECK_SPAWN, this)) { switch (gsworld_getMap()) { case MAP_1D_MMM_CELLAR: //L802D4058 if (sns_get_item_state(SNS_ITEM_EGG_CYAN, 1) && !sns_get_item_state(SNS_ITEM_EGG_CYAN, 0)) { diff --git a/src/core2/timedfuncqueue.c b/src/core2/timedfuncqueue.c index 4320b2f9a..ea2ab5bb0 100644 --- a/src/core2/timedfuncqueue.c +++ b/src/core2/timedfuncqueue.c @@ -196,7 +196,7 @@ void func_80324D54(f32 time, enum sfx_e sfx_id, f32 arg2, s32 arg3, f32 position } void func_80324DBC(f32 time, enum asset_e text_id, s32 arg2, f32 position[3], ActorMarker *caller, void (*callback_method_1)(ActorMarker *, enum asset_e, s32), void (*callback_method_2)(ActorMarker *, enum asset_e, s32)) { - if (!EventSystem_Should(VB_OVERRIDE_TIMED_DIALOGUE, false, text_id)) { + if (EventSystem_Should(VB_QUEUE_TIMED_DIALOG, true, text_id)) { DelayedTextCallback sp20; s32 pad; diff --git a/src/port/Enhancements/Events/Hooks/Events.h b/src/port/Enhancements/Events/Hooks/Events.h index d75030b7e..17ab96230 100644 --- a/src/port/Enhancements/Events/Hooks/Events.h +++ b/src/port/Enhancements/Events/Hooks/Events.h @@ -418,35 +418,35 @@ typedef enum VBehaviorID { // Rando object behavior - // A listener that returns true skips Bottles' text callback in Spiral Mountain. + // A listener that returns false skips Bottles' text callback in Spiral Mountain. // #### `result` // ```c - // false + // true // ``` // #### `args` // - `*Actor` (Bottles) - VB_OVERRIDE_BOTTLES_TEXT_CALLBACK, + VB_RUN_BOTTLES_TEXT_CALLBACK, - // A listener that returns true skips Bottles' lesson and has to set the text id and flags he shows. + // A listener that returns false skips Bottles' lesson and has to set the text id and flags he shows. // #### `result` // ```c - // false + // true // ``` // #### `args` // - `*Actor` (Bottles) // - `*s32` (the text id) // - `*s32` (the text flags) - VB_OVERRIDE_MOLEHILL_ABILITY, + VB_TEACH_MOLEHILL_ABILITY, - // A listener that returns true skips the jiggy's spawn. + // A listener that returns false skips the jiggy's spawn. // #### `result` // ```c - // false + // true // ``` // #### `args` // - `s32` (jiggy_e) // - `*f32` (the position) - VB_OVERRIDE_JIGGY_SPAWN, + VB_SPAWN_JIGGY, // A witch switch jiggy's jingle in the lair, whose track a listener may change. The result is unused. // #### `result` @@ -469,15 +469,15 @@ typedef enum VBehaviorID { // - `*f32` (the position) VB_CC_TOOTH_PLACE_JIGGY, - // A listener that returns true leaves the prop out as its cube loads. + // A listener that returns false leaves the prop out as its cube loads. // #### `result` // ```c - // false + // true // ``` // #### `args` // - `*s16` (the position) // - `s32` (enum asset_e, the sprite; -1 for a marker or model prop) - VB_OVERRIDE_PROP_SPAWN, + VB_SPAWN_PROP, // A spawned actor taking its prop's secondary id, selector and scale. // #### `result` @@ -488,10 +488,10 @@ typedef enum VBehaviorID { // - `*Actor` (the actor) VB_APPLY_CUBE_PROP_DATA, - // A listener that returns true skips spawning one of a bundle's actors, and can hand back one it spawned instead. + // A listener that returns false skips spawning one of a bundle's actors, and can hand back one it spawned instead. // #### `result` // ```c - // false + // true // ``` // #### `args` // - `s32` (bundle_e) @@ -499,7 +499,7 @@ typedef enum VBehaviorID { // - `s32` (the actor's index in the bundle) // - `*f32` (the position) // - `**Actor` (the actor) - VB_OVERRIDE_BUNDLE_SPAWN, + VB_SPAWN_BUNDLE_ACTOR, // A listener that returns true skips giving a jiggy list spawn its slot and jiggy id. // #### `result` @@ -518,25 +518,25 @@ typedef enum VBehaviorID { // - None VB_NAPPER_SET_JIGGY_POSITION, - // A listener that returns true skips a Stop 'N' Swop egg's map check, which marks the map's egg collected at pickup - // and can despawn the egg at spawn. + // A listener that returns false skips a Stop 'N' Swop egg's map check, which marks the map's egg collected at + // pickup and can despawn the egg at spawn. // #### `result` // ```c - // false + // true // ``` // #### `args` // - `s32` (SNS_MAP_CHECK_PICKUP or SNS_MAP_CHECK_SPAWN) // - `*Actor` (the egg) - VB_OVERRIDE_SNS_MAP_CHECK, + VB_RUN_SNS_MAP_CHECK, - // A listener that returns true keeps a delayed dialog from showing. + // A listener that returns false keeps a delayed dialog from showing. // #### `result` // ```c - // false + // true // ``` // #### `args` // - `s32` (the text id) - VB_OVERRIDE_TIMED_DIALOGUE, + VB_QUEUE_TIMED_DIALOG, // A listener that returns true skips counting a collected jinjo and OnJinjoCollected. // #### `result` diff --git a/src/port/Enhancements/Fixes/GameFixes.cpp b/src/port/Enhancements/Fixes/GameFixes.cpp index 308aa4897..7b439796a 100644 --- a/src/port/Enhancements/Fixes/GameFixes.cpp +++ b/src/port/Enhancements/Fixes/GameFixes.cpp @@ -250,9 +250,9 @@ void RegisterChimpySoftlock_Init() { } }); - REGISTER_VB_SHOULD(VB_OVERRIDE_JIGGY_SPAWN, EVENT_PRIORITY_LOW, { + REGISTER_VB_SHOULD(VB_SPAWN_JIGGY, EVENT_PRIORITY_LOW, { if (va_arg(args, int) == JIGGY_9_MM_CHIMPY && jiggyscore_isCollected(JIGGY_9_MM_CHIMPY)) { - *should = true; + *should = false; } }); } diff --git a/src/port/Enhancements/Retention/ConsumableRetention.cpp b/src/port/Enhancements/Retention/ConsumableRetention.cpp index bf167a118..29e969924 100644 --- a/src/port/Enhancements/Retention/ConsumableRetention.cpp +++ b/src/port/Enhancements/Retention/ConsumableRetention.cpp @@ -82,12 +82,12 @@ static bool isConsumableActor(s32 actorId) { static bool sSpawningDrop = false; static void RegisterConsumableRetention_Init() { - COND_VB_SHOULD(VB_OVERRIDE_PROP_SPAWN, EVENT_PRIORITY_NORMAL, CVAR_VALUE, { + COND_VB_SHOULD(VB_SPAWN_PROP, EVENT_PRIORITY_NORMAL, CVAR_VALUE, { s16* position = va_arg(args, s16*); s32 spriteAsset = va_arg(args, s32); if (systemActive() && isConsumableSprite(spriteAsset) && isCollected(pickupAt(position[0], position[1], position[2]))) { - *should = true; + *should = false; } }); @@ -102,7 +102,7 @@ static void RegisterConsumableRetention_Init() { }); // Always on: every consumable bundle drop spawns here (see DropLocal). - COND_VB_SHOULD(VB_OVERRIDE_BUNDLE_SPAWN, EVENT_PRIORITY_NORMAL, true, { + COND_VB_SHOULD(VB_SPAWN_BUNDLE_ACTOR, EVENT_PRIORITY_NORMAL, true, { bundle_e bundleId = (bundle_e)va_arg(args, int); BundleInfo* bundleInfo = va_arg(args, BundleInfo*); s32 index = va_arg(args, s32); @@ -112,7 +112,7 @@ static void RegisterConsumableRetention_Init() { if (!systemActive() || !isConsumableActor(bundleInfo->actor_id)) { return; } - *should = true; + *should = false; const bool hutDrop = bundleId == BUNDLE_1_MM_HUT_BLUE_EGG || bundleId == BUNDLE_6_MM_HUT_EXTRA_LIFE; const ConsumablePickup pickup = pickupAt(position[0], position[1], position[2], index + 1); diff --git a/src/port/Enhancements/Retention/JinjoRetention.cpp b/src/port/Enhancements/Retention/JinjoRetention.cpp index 84e4e1b1d..b523d1595 100644 --- a/src/port/Enhancements/Retention/JinjoRetention.cpp +++ b/src/port/Enhancements/Retention/JinjoRetention.cpp @@ -235,7 +235,7 @@ void RegisterJinjoRetention_Init() { event->Cancelled = true; }); - COND_VB_SHOULD(VB_OVERRIDE_BUNDLE_SPAWN, EVENT_PRIORITY_NORMAL, CVAR_VALUE, { + COND_VB_SHOULD(VB_SPAWN_BUNDLE_ACTOR, EVENT_PRIORITY_NORMAL, CVAR_VALUE, { (void)va_arg(args, int); BundleInfo* bundleInfo = va_arg(args, BundleInfo*); (void)va_arg(args, s32); @@ -253,7 +253,7 @@ void RegisterJinjoRetention_Init() { if (!retentionActiveForLevel(level) || !(collectedBits(level) & bit)) { return; } - *should = true; + *should = false; }); } diff --git a/src/port/Enhancements/Retention/NoteRetention.cpp b/src/port/Enhancements/Retention/NoteRetention.cpp index 47ff42f5f..87f026d87 100644 --- a/src/port/Enhancements/Retention/NoteRetention.cpp +++ b/src/port/Enhancements/Retention/NoteRetention.cpp @@ -285,7 +285,7 @@ extern "C" void NoteRetention_SetForced(int32_t forced) { void RegisterNoteRetention_Init() { // Bundle notes continue the map's index counter; identity stored in actor->local. - COND_VB_SHOULD(VB_OVERRIDE_BUNDLE_SPAWN, EVENT_PRIORITY_NORMAL, true, { + COND_VB_SHOULD(VB_SPAWN_BUNDLE_ACTOR, EVENT_PRIORITY_NORMAL, true, { bundle_e bundleId = (bundle_e)va_arg(args, int); BundleInfo* bundleInfo = va_arg(args, BundleInfo*); va_arg(args, s32); // index within the bundle (unused) @@ -303,7 +303,7 @@ void RegisterNoteRetention_Init() { } // We own this note: suppress the vanilla bundle spawn. - *should = true; + *should = false; int64_t key = noteKey(mapId, noteIndex); if (activeNoteSet.count(key)) { @@ -408,7 +408,7 @@ static void RegisterRetentionSaving_Init() { event->Cancelled = true; }); - COND_VB_SHOULD(VB_OVERRIDE_PROP_SPAWN, EVENT_PRIORITY_NORMAL, true, { + COND_VB_SHOULD(VB_SPAWN_PROP, EVENT_PRIORITY_NORMAL, true, { s16* spawnPosition = va_arg(args, s16*); s32 spriteAsset = va_arg(args, s32); @@ -428,7 +428,7 @@ static void RegisterRetentionSaving_Init() { } // We own this note: suppress the static sprite prop. - *should = true; + *should = false; if (activeNoteSet.count(noteKey(mapId, noteIndex))) { return; // a live actor already exists (re-parse) diff --git a/src/port/Rando/ObjectBehavior/Bundle.cpp b/src/port/Rando/ObjectBehavior/Bundle.cpp index ba605d73a..2648c2e72 100644 --- a/src/port/Rando/ObjectBehavior/Bundle.cpp +++ b/src/port/Rando/ObjectBehavior/Bundle.cpp @@ -43,7 +43,7 @@ void Rando::ObjectBehavior::InitBundleBehavior() { } }) - COND_VB_SHOULD(VB_OVERRIDE_BUNDLE_SPAWN, EVENT_PRIORITY_NORMAL, IS_RANDO, { + COND_VB_SHOULD(VB_SPAWN_BUNDLE_ACTOR, EVENT_PRIORITY_NORMAL, IS_RANDO, { bundle_e bundleId = (bundle_e)va_arg(args, int); BundleInfo* bundleInfo = va_arg(args, BundleInfo*); s32 bundleCount = va_arg(args, s32); @@ -61,7 +61,7 @@ void Rando::ObjectBehavior::InitBundleBehavior() { if (bundleId == BUNDLE_16__HONEYCOMB && (currentMap == MAP_43_CCW_SPRING || currentMap == MAP_B_CC_CLANKERS_CAVERN)) { if (CheckEnemyOverlapPosition(spawnPosition)) { - *should = false; + *should = true; return; } } @@ -282,7 +282,7 @@ void Rando::ObjectBehavior::InitBundleBehavior() { *actor = CustomObject::ShouldCreateCustomActorEX(randoCheckId, spawnPosition, false); if (*actor == NULL) { - *should = true; + *should = false; return; } @@ -293,6 +293,6 @@ void Rando::ObjectBehavior::InitBundleBehavior() { } } - *should = true; + *should = false; }) } diff --git a/src/port/Rando/ObjectBehavior/Jiggy.cpp b/src/port/Rando/ObjectBehavior/Jiggy.cpp index 285717349..88b89385e 100644 --- a/src/port/Rando/ObjectBehavior/Jiggy.cpp +++ b/src/port/Rando/ObjectBehavior/Jiggy.cpp @@ -60,7 +60,7 @@ void Rando::ObjectBehavior::InitJiggyBehavior() { } }) - COND_VB_SHOULD(VB_OVERRIDE_JIGGY_SPAWN, EVENT_PRIORITY_NORMAL, true, { + COND_VB_SHOULD(VB_SPAWN_JIGGY, EVENT_PRIORITY_NORMAL, true, { jiggy_e jiggyId = (jiggy_e)va_arg(args, int); f32* position = va_arg(args, f32*); @@ -99,7 +99,7 @@ void Rando::ObjectBehavior::InitJiggyBehavior() { // Stand in for the jiggyscore_setSpawned this override skips, for the // jiggies the world reads back as state rather than as a collectable. MarkWorldStateFromJiggySpawn(randoCheckId); - *should = true; + *should = false; }) // If Banjo isn't near the jiggy when it's first rewarded, the tooth asks for it every frame. diff --git a/src/port/Rando/ObjectBehavior/Molehill.cpp b/src/port/Rando/ObjectBehavior/Molehill.cpp index 8a2e06921..4427b8d15 100644 --- a/src/port/Rando/ObjectBehavior/Molehill.cpp +++ b/src/port/Rando/ObjectBehavior/Molehill.cpp @@ -92,7 +92,7 @@ static void MarkBridgeRepairedDialogComplete() { } void Rando::ObjectBehavior::InitMolehillBehavior() { - COND_VB_SHOULD(VB_OVERRIDE_MOLEHILL_ABILITY, EVENT_PRIORITY_NORMAL, true, { + COND_VB_SHOULD(VB_TEACH_MOLEHILL_ABILITY, EVENT_PRIORITY_NORMAL, true, { Actor* molehillActor = va_arg(args, Actor*); s32* textId = va_arg(args, s32*); s32* isLearned = va_arg(args, s32*); @@ -114,7 +114,7 @@ void Rando::ObjectBehavior::InitMolehillBehavior() { RandoSaveCheck shuffledMolehill = Rando::Logic::GetShuffledObject(randoCheckId); ChMoleDescription moleInfo = GetMoleDescriptionByAbility(shuffledMolehill.randoCollectionId); - *should = true; + *should = false; func_80347A14(0); molehillActor->has_met_before = true; @@ -169,7 +169,7 @@ void Rando::ObjectBehavior::InitMolehillBehavior() { } }) - COND_VB_SHOULD(VB_OVERRIDE_BOTTLES_TEXT_CALLBACK, EVENT_PRIORITY_NORMAL, true, { + COND_VB_SHOULD(VB_RUN_BOTTLES_TEXT_CALLBACK, EVENT_PRIORITY_NORMAL, true, { Actor* molehillActor = va_arg(args, Actor*); if (!IS_RANDO && !OPTION_ENABLED) { @@ -177,7 +177,7 @@ void Rando::ObjectBehavior::InitMolehillBehavior() { } if (CheckBridgeState() && !RANDO_SAVE_FLAGS[RANDO_INF_BRIDGE_REPAIRED_DIALOG_COMPLETE].flagState) { - *should = true; + *should = false; } }) diff --git a/src/port/Rando/ObjectBehavior/Prop.cpp b/src/port/Rando/ObjectBehavior/Prop.cpp index 12f9bb02d..a8a1220c0 100644 --- a/src/port/Rando/ObjectBehavior/Prop.cpp +++ b/src/port/Rando/ObjectBehavior/Prop.cpp @@ -13,7 +13,7 @@ #define OPTION_ENABLED RANDO_SAVE_OPTIONS[RO_SHUFFLE_MUSIC_NOTES].optionValue void Rando::ObjectBehavior::InitPropBehavior() { - COND_VB_SHOULD(VB_OVERRIDE_PROP_SPAWN, EVENT_PRIORITY_NORMAL, true, { + COND_VB_SHOULD(VB_SPAWN_PROP, EVENT_PRIORITY_NORMAL, true, { s16* spawnPosition = va_arg(args, s16*); if (!IS_RANDO) { @@ -31,16 +31,16 @@ void Rando::ObjectBehavior::InitPropBehavior() { RandoCheckId randoCheckId = Rando::StaticData::GetCheckByPosition(position[0], position[1], position[2]); if (randoCheckId == RC_UNKNOWN) { - *should = false; + *should = true; return; } if (!Rando::Logic::IsCheckShuffled(randoCheckId)) { - *should = false; + *should = true; return; } Actor* randoCustomActor = CustomObject::ShouldCreateCustomActorEX(randoCheckId, position, true); - *should = true; + *should = false; }) } diff --git a/src/port/Rando/ObjectBehavior/StopNSwop.cpp b/src/port/Rando/ObjectBehavior/StopNSwop.cpp index 5951ded60..315379cd2 100644 --- a/src/port/Rando/ObjectBehavior/StopNSwop.cpp +++ b/src/port/Rando/ObjectBehavior/StopNSwop.cpp @@ -38,13 +38,13 @@ void Rando::ObjectBehavior::ModifyStopNSwopWorldBehavior(void* snsActor) { } void Rando::ObjectBehavior::InitStopNSwopBehavior() { - COND_VB_SHOULD(VB_OVERRIDE_SNS_MAP_CHECK, EVENT_PRIORITY_NORMAL, IS_RANDO && OPTION_ENABLED, { *should = true; }) - COND_VB_SHOULD(VB_OVERRIDE_TIMED_DIALOGUE, EVENT_PRIORITY_NORMAL, IS_RANDO && OPTION_ENABLED, { + COND_VB_SHOULD(VB_RUN_SNS_MAP_CHECK, EVENT_PRIORITY_NORMAL, IS_RANDO && OPTION_ENABLED, { *should = false; }) + COND_VB_SHOULD(VB_QUEUE_TIMED_DIALOG, EVENT_PRIORITY_NORMAL, IS_RANDO && OPTION_ENABLED, { asset_e textId = (asset_e)va_arg(args, int); if (textId == ASSET_DB3_DIALOG_SNS_EGG_1_TEXT || textId == ASSET_DB5_DIALOG_ICE_KEY_TEXT || textId == ASSET_DB2_DIALOG_MUMBO_MISTAKE_2) { - *should = true; + *should = false; } }) diff --git a/src/port/Romhack/Specific/SnowGlowVillage.cpp b/src/port/Romhack/Specific/SnowGlowVillage.cpp index 28b041b3e..be31dd7e3 100644 --- a/src/port/Romhack/Specific/SnowGlowVillage.cpp +++ b/src/port/Romhack/Specific/SnowGlowVillage.cpp @@ -483,7 +483,7 @@ void SnowGlow_EnableStopNSwop() { } }); - REGISTER_VB_SHOULD(VB_OVERRIDE_SNS_MAP_CHECK, EVENT_PRIORITY_NORMAL, { + REGISTER_VB_SHOULD(VB_RUN_SNS_MAP_CHECK, EVENT_PRIORITY_NORMAL, { const s32 site = va_arg(args, s32); const s32 map = gsworld_getMap(); @@ -494,7 +494,7 @@ void SnowGlow_EnableStopNSwop() { break; } } - *should = true; + *should = false; return; } @@ -511,10 +511,10 @@ void SnowGlow_EnableStopNSwop() { if (!keep && self != NULL && self->marker != NULL) { marker_despawn(self->marker); } - *should = true; + *should = false; }); - REGISTER_VB_SHOULD(VB_OVERRIDE_TIMED_DIALOGUE, EVENT_PRIORITY_NORMAL, { + REGISTER_VB_SHOULD(VB_QUEUE_TIMED_DIALOG, EVENT_PRIORITY_NORMAL, { const s32 textId = va_arg(args, s32); if (sEmittingSnsDialog || textId < kSnsEggTextLo || textId > kSnsEggTextHi) { return; @@ -524,7 +524,7 @@ void SnowGlow_EnableStopNSwop() { if (entry.map != map) { continue; } - *should = true; + *should = false; sEmittingSnsDialog = true; func_80324DBC(kSnsEggDialogDelay, (enum asset_e)entry.textId, 0x20, NULL, NULL, NULL, NULL); sEmittingSnsDialog = false; From 5c6fbce0d86472f31cd0c5516f1983a101ef03d3 Mon Sep 17 00:00:00 2001 From: Jeod <47716344+JeodC@users.noreply.github.com> Date: Mon, 16 Nov 2026 08:56:16 -0500 Subject: [PATCH 2/2] Replace VB_OVERRIDE_DIALOG_SHOW with VB_REFUSE_DIALOG --- src/core2/gc/dialog.c | 6 ++---- src/port/Enhancements/Events/Hooks/Events.h | 4 ++-- src/port/Enhancements/Retention/NoteRetention.cpp | 2 +- src/port/Romhack/Shared/HackShared.cpp | 2 +- src/port/Romhack/Specific/SnowGlowVillage.cpp | 5 +++-- src/port/Romhack/Specific/TheGruntch.cpp | 5 +++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/core2/gc/dialog.c b/src/core2/gc/dialog.c index 557165bc7..7783c71a8 100644 --- a/src/core2/gc/dialog.c +++ b/src/core2/gc/dialog.c @@ -949,13 +949,11 @@ int gcdialog_showDialogConditional(s32 text_id, s32 arg1, f32 *pos, ActorMarker f32 pad; s32 temp_v1; - if (volatileFlag_get(VOLATILE_FLAG_1) || func_802D686C()) { +// if (volatileFlag_get(VOLATILE_FLAG_1) || func_802D686C()) { + if (EventSystem_Should(VB_REFUSE_DIALOG, volatileFlag_get(VOLATILE_FLAG_1) || func_802D686C(), text_id)) { return 0; } - if(EventSystem_Should(VB_OVERRIDE_DIALOG_SHOW, false, text_id)) - return 0; - if (!gcdialog_hasCurrentTextId()) { func_80310B1C(text_id, arg1, marker, (void *)callback, (void *)arg5, arg6); if (arg1 & 8) { diff --git a/src/port/Enhancements/Events/Hooks/Events.h b/src/port/Enhancements/Events/Hooks/Events.h index 17ab96230..b2a80bd75 100644 --- a/src/port/Enhancements/Events/Hooks/Events.h +++ b/src/port/Enhancements/Events/Hooks/Events.h @@ -590,11 +590,11 @@ typedef enum VBehaviorID { // A listener that returns true keeps a dialog from showing. // #### `result` // ```c - // false + // volatileFlag_get(VOLATILE_FLAG_1) || func_802D686C() // ``` // #### `args` // - `s32` (the text id) - VB_OVERRIDE_DIALOG_SHOW, + VB_REFUSE_DIALOG, // Rendering and performance diff --git a/src/port/Enhancements/Retention/NoteRetention.cpp b/src/port/Enhancements/Retention/NoteRetention.cpp index 87f026d87..ba91937c9 100644 --- a/src/port/Enhancements/Retention/NoteRetention.cpp +++ b/src/port/Enhancements/Retention/NoteRetention.cpp @@ -360,7 +360,7 @@ void RegisterNoteRetention_Init() { }); // Seeding ITEM_C_NOTE re-triggers vanilla high-score dialogs; suppress them. - COND_VB_SHOULD(VB_OVERRIDE_DIALOG_SHOW, EVENT_PRIORITY_NORMAL, true, { + COND_VB_SHOULD(VB_REFUSE_DIALOG, EVENT_PRIORITY_NORMAL, true, { s32 textId = va_arg(args, s32); // Bottles' 50-note-door line assumes vanilla note-door costs, which // romhacks retune, so it is wrong for them whether or not retention is diff --git a/src/port/Romhack/Shared/HackShared.cpp b/src/port/Romhack/Shared/HackShared.cpp index b557a1188..061cd82d0 100644 --- a/src/port/Romhack/Shared/HackShared.cpp +++ b/src/port/Romhack/Shared/HackShared.cpp @@ -152,7 +152,7 @@ void ApplyPauseRowVisibility() { // Suppress a caller-supplied set of dialogs void ApplyDialogSuppression() { - COND_VB_SHOULD(VB_OVERRIDE_DIALOG_SHOW, EVENT_PRIORITY_NORMAL, sSuppressedDialogCount > 0, { + COND_VB_SHOULD(VB_REFUSE_DIALOG, EVENT_PRIORITY_NORMAL, sSuppressedDialogCount > 0, { const s32 textId = va_arg(args, s32); for (int i = 0; i < sSuppressedDialogCount; i++) { if (sSuppressedDialogs[i] == textId) { diff --git a/src/port/Romhack/Specific/SnowGlowVillage.cpp b/src/port/Romhack/Specific/SnowGlowVillage.cpp index be31dd7e3..541d6349f 100644 --- a/src/port/Romhack/Specific/SnowGlowVillage.cpp +++ b/src/port/Romhack/Specific/SnowGlowVillage.cpp @@ -169,9 +169,10 @@ constexpr int kSnowGlowSuppressedDialogs[] = { void SnowGlow_EnableDialogGates() { REGISTER_VB_SHOULD(VB_PROGRESS_FLAG_DIALOG, EVENT_PRIORITY_NORMAL, { *should = false; }); REGISTER_VB_SHOULD(VB_LAIR_GRUNTY_TAUNTS, EVENT_PRIORITY_NORMAL, { *should = false; }); - REGISTER_VB_SHOULD(VB_OVERRIDE_DIALOG_SHOW, EVENT_PRIORITY_LOW, { + REGISTER_VB_SHOULD(VB_REFUSE_DIALOG, EVENT_PRIORITY_LOW, { const s32 textId = va_arg(args, s32); - if ((textId != ASSET_DAA_DIALOG_MUMBO_HAS_ENOUGH_TOKENS && + if (*should || + (textId != ASSET_DAA_DIALOG_MUMBO_HAS_ENOUGH_TOKENS && textId != ASSET_DAB_DIALOG_MUMBO_NOT_ENOUGH_TOKENS) || gsworld_getMap() != MAP_48_FP_MUMBOS_SKULL || !jiggyscore_isCollected((enum jiggy_e)3)) { return; diff --git a/src/port/Romhack/Specific/TheGruntch.cpp b/src/port/Romhack/Specific/TheGruntch.cpp index 8264734c4..97b155af6 100644 --- a/src/port/Romhack/Specific/TheGruntch.cpp +++ b/src/port/Romhack/Specific/TheGruntch.cpp @@ -438,9 +438,10 @@ static void Gruntch_EnableActGate() { // Mumbo's token dialogs are rendered by the hack once his jiggy is collected static void Gruntch_EnableMumboTokenDialogs() { - REGISTER_VB_SHOULD(VB_OVERRIDE_DIALOG_SHOW, EVENT_PRIORITY_LOW, { + REGISTER_VB_SHOULD(VB_REFUSE_DIALOG, EVENT_PRIORITY_LOW, { const s32 textId = va_arg(args, s32); - if ((textId != ASSET_DAA_DIALOG_MUMBO_HAS_ENOUGH_TOKENS && + if (*should || + (textId != ASSET_DAA_DIALOG_MUMBO_HAS_ENOUGH_TOKENS && textId != ASSET_DAB_DIALOG_MUMBO_NOT_ENOUGH_TOKENS) || gsworld_getMap() != MAP_48_FP_MUMBOS_SKULL || !jiggyscore_isCollected((enum jiggy_e)3)) { return;