Skip to content

Commit

Permalink
Small tweaks and increase save buffer size
Browse files Browse the repository at this point in the history
  • Loading branch information
garrettjoecox committed Oct 9, 2024
1 parent de1cbbb commit 5b03ae0
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 14 deletions.
5 changes: 4 additions & 1 deletion mm/2s2h/Rando/ActorBehavior/EnAkindonuts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,16 @@ void Rando::ActorBehavior::InitEnAkindonutsBehavior() {
static uint32_t onActorUpdateHookId = 0;
static uint32_t shouldHookId1 = 0;
static uint32_t shouldHookId2 = 0;
static uint32_t shouldHookId3 = 0;
GameInteractor::Instance->UnregisterGameHookForID<GameInteractor::OnActorUpdate>(onActorUpdateHookId);
GameInteractor::Instance->UnregisterGameHookForID<GameInteractor::ShouldVanillaBehavior>(shouldHookId1);
GameInteractor::Instance->UnregisterGameHookForID<GameInteractor::ShouldVanillaBehavior>(shouldHookId2);
GameInteractor::Instance->UnregisterGameHookForID<GameInteractor::ShouldVanillaBehavior>(shouldHookId3);

onActorUpdateHookId = 0;
shouldHookId1 = 0;
shouldHookId2 = 0;
shouldHookId3 = 0;

if (!IS_RANDO) {
return;
Expand Down Expand Up @@ -74,5 +77,5 @@ void Rando::ActorBehavior::InitEnAkindonutsBehavior() {
shouldHookId2 = REGISTER_VB_SHOULD(VB_AKINDONUTS_CONSIDER_BOMB_BAG_PURCHASED, {
*should = Flags_GetRandoInf(RANDO_INF_PURCHASED_BOMB_BAG_FROM_GORON_VILLAGE_SCRUB);
});
shouldHookId1 = REGISTER_VB_SHOULD(VB_AKINDONUTS_CONSIDER_ELIGIBLE_FOR_POTION_REFILL, { *should = true; });
shouldHookId3 = REGISTER_VB_SHOULD(VB_AKINDONUTS_CONSIDER_ELIGIBLE_FOR_POTION_REFILL, { *should = true; });
}
2 changes: 1 addition & 1 deletion mm/2s2h/Rando/ActorBehavior/EnElforg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ void Rando::ActorBehavior::InitEnElforgBehavior() {
});

// Stray fairies that are trapped by enemies have their draw func set later on, so we need to override that as well
shouldHook2Id = REGISTER_VB_SHOULD(VB_SET_DRAW_FOR_SAVED_STRAY_FAIRY, {
shouldHook3Id = REGISTER_VB_SHOULD(VB_SET_DRAW_FOR_SAVED_STRAY_FAIRY, {
*should = false;

Actor* actor = va_arg(args, Actor*);
Expand Down
22 changes: 11 additions & 11 deletions mm/2s2h/Rando/Types.h
Original file line number Diff line number Diff line change
Expand Up @@ -708,17 +708,17 @@ typedef enum {
RC_STONE_TOWER_TEMPLE_INVERTED_POT_WIZZROBE_3,
RC_STONE_TOWER_TEMPLE_INVERTED_POT_WIZZROBE_4,
RC_STONE_TOWER_TEMPLE_INVERTED_POT_WIZZROBE_5,
RC_STONE_TOWER_TEMPLE_POT_BEFORE_WATER_BRIDGE_1,
RC_STONE_TOWER_TEMPLE_POT_BEFORE_WATER_BRIDGE_2,
RC_STONE_TOWER_TEMPLE_POT_BEFORE_WATER_BRIDGE_3,
RC_STONE_TOWER_TEMPLE_POT_BEFORE_WATER_BRIDGE_4,
RC_STONE_TOWER_TEMPLE_POT_BEFORE_WATER_BRIDGE_5,
RC_STONE_TOWER_TEMPLE_POT_BEFORE_WATER_BRIDGE_6,
RC_STONE_TOWER_TEMPLE_POT_BEFORE_WATER_BRIDGE_7,
RC_STONE_TOWER_TEMPLE_POT_BEFORE_WATER_BRIDGE_8,
// RC_STONE_TOWER_TEMPLE_POT_BEFORE_WATER_BRIDGE_1,
// RC_STONE_TOWER_TEMPLE_POT_BEFORE_WATER_BRIDGE_2,
// RC_STONE_TOWER_TEMPLE_POT_BEFORE_WATER_BRIDGE_3,
// RC_STONE_TOWER_TEMPLE_POT_BEFORE_WATER_BRIDGE_4,
// RC_STONE_TOWER_TEMPLE_POT_BEFORE_WATER_BRIDGE_5,
// RC_STONE_TOWER_TEMPLE_POT_BEFORE_WATER_BRIDGE_6,
// RC_STONE_TOWER_TEMPLE_POT_BEFORE_WATER_BRIDGE_7,
// RC_STONE_TOWER_TEMPLE_POT_BEFORE_WATER_BRIDGE_8,
RC_STONE_TOWER_TEMPLE_POT_ENTRANCE_1,
RC_STONE_TOWER_TEMPLE_POT_ENTRANCE_2,
RC_STONE_TOWER_TEMPLE_POT_LAVA_ROOM_1,
// RC_STONE_TOWER_TEMPLE_POT_ENTRANCE_2,
// RC_STONE_TOWER_TEMPLE_POT_LAVA_ROOM_1,
RC_STONE_TOWER_TEMPLE_POT_LAVA_ROOM_2,
RC_STONE_TOWER_TEMPLE_POT_LAVA_ROOM_3,
RC_STONE_TOWER_TEMPLE_POT_LAVA_ROOM_4,
Expand All @@ -729,7 +729,7 @@ typedef enum {
RC_STONE_TOWER_TEMPLE_POT_MIRROR_ROOM_1,
RC_STONE_TOWER_TEMPLE_POT_MIRROR_ROOM_2,
RC_STONE_TOWER_TEMPLE_POT_WATER_ROOM_BRIDGE_1,
RC_STONE_TOWER_TEMPLE_POT_WATER_ROOM_BRIDGE_2,
// RC_STONE_TOWER_TEMPLE_POT_WATER_ROOM_BRIDGE_2,
RC_STONE_TOWER_TEMPLE_POT_WATER_ROOM_UNDERWATER_LOWER_1,
RC_STONE_TOWER_TEMPLE_POT_WATER_ROOM_UNDERWATER_LOWER_2,
RC_STONE_TOWER_TEMPLE_POT_WATER_ROOM_UNDERWATER_LOWER_3,
Expand Down
3 changes: 2 additions & 1 deletion mm/include/z64save.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ typedef enum RespawnMode {
/* 8 */ RESPAWN_MODE_MAX
} RespawnMode;

#define SAVE_BUFFER_SIZE 0x4000
// 2S2H [Port] Doubled the size of the Save Buffer to support more data, eg rando
#define SAVE_BUFFER_SIZE 0x8000

typedef enum {
/* 0 */ MAGIC_STATE_IDLE, // Regular gameplay
Expand Down

0 comments on commit 5b03ae0

Please sign in to comment.