Compare commits

..

12 Commits

Author SHA1 Message Date
TakaRikka 84c5729c4e Merge pull request #2175 from TwilitRealm/mirror-mode-fixes
Mirror Mode Map Fixes
2026-07-07 04:00:07 -07:00
Luke Street e0ab36b7d9 Stable game ABI: Use PARTIAL_DEBUG
To make sure that mods can work across debug and release build, we can utilize PARTIAL_DEBUG to enable only DEBUG changes that affect struct and vtable layout
2026-07-07 01:14:29 -06:00
Luke Street d40a30ee13 Config: renaming & add change subscriptions 2026-07-07 00:50:11 -06:00
SuperDude88 074b43a089 Merge pull request #2173 from Lypopp/Invincible-enemies-activated-with-speedrun-mode-activated
Fixed invincible enemies cheat not deactivating on game startup when speedrun mode is activated
2026-07-06 19:48:53 -04:00
SuperDude88 8e8dc305e6 Update Pane Mirroring
- Update mirroring of Link + the dungeon map icon properly when the setting changes
2026-07-05 23:33:15 -04:00
SuperDude88 41389f4a8e Remove Extra Mirror
Accidentally left this in from testing
2026-07-05 22:58:45 -04:00
SuperDude88 8145dec2a1 Remove Outdated MIrror Mode TODO
This was done!
2026-07-05 20:19:42 -04:00
SuperDude88 4089a80a17 Mirror Mode Map Fixes
Will probably need to resolve conflicts with Wii code once decomp has related PR merged + we sync things

Change to setPlusZoomCenterX is not present on Wii (but fixes controls), probably from its lack of CStick
2026-07-05 20:19:33 -04:00
hector.bonhoure@gmail.com b772b6d952 Fixed invincible enemies cheat not deactivating on game startup when speedrun mode is activated 2026-07-05 16:05:55 +02:00
Irastris 42910ab2fd Restore simultaneous gyro and joystick input for first person aiming (#2164) 2026-07-02 00:13:22 -06:00
Olivia!! f54892b2c2 do not disable regular touch input if menu touch is disabled (#2152) 2026-07-02 00:03:53 -06:00
Luke Street f32e069c4b Improve mouse hiding logic (#2163)
* Improve mouse hiding logic

* Restore ImGui logic
2026-07-02 02:03:18 -04:00
363 changed files with 1192 additions and 64934 deletions
+5 -24
View File
@@ -363,7 +363,8 @@ set(DUSK_COPYRIGHT "Copyright (C) Twilit Realm contributors")
source_group("dolzel" FILES ${DOLZEL_FILES} ${Z2AUDIOLIB_FILES} ${REL_FILES}) source_group("dolzel" FILES ${DOLZEL_FILES} ${Z2AUDIOLIB_FILES} ${REL_FILES})
source_group("dusklight" FILES ${DUSK_FILES} ${DUSK_HTTP_BACKEND_FILES}) source_group("dusklight" FILES ${DUSK_FILES} ${DUSK_HTTP_BACKEND_FILES})
set(GAME_COMPILE_DEFS TARGET_PC WIDESCREEN_SUPPORT=1 AVOID_UB=1 VERSION=0 MTX_USE_PS=1) # PARTIAL_DEBUG makes debug and release share one struct/vtable ABI so a mod binary loads into either
set(GAME_COMPILE_DEFS TARGET_PC WIDESCREEN_SUPPORT=1 AVOID_UB=1 VERSION=0 MTX_USE_PS=1 PARTIAL_DEBUG=1)
set(GAME_INCLUDE_DIRS set(GAME_INCLUDE_DIRS
include include
@@ -437,8 +438,6 @@ if (DUSK_MOVIE_SUPPORT)
list(APPEND GAME_COMPILE_DEFS MOVIE_SUPPORT=1) list(APPEND GAME_COMPILE_DEFS MOVIE_SUPPORT=1)
endif () endif ()
include(src/dusk/randomizer/randomizer.cmake)
set(DUSK_ENABLE_DISCORD_DEFAULT ON) set(DUSK_ENABLE_DISCORD_DEFAULT ON)
if (DEFINED DUSK_ENABLE_DISCORD_RPC AND NOT DEFINED DUSK_ENABLE_DISCORD) if (DEFINED DUSK_ENABLE_DISCORD_RPC AND NOT DEFINED DUSK_ENABLE_DISCORD)
set(DUSK_ENABLE_DISCORD_DEFAULT ${DUSK_ENABLE_DISCORD_RPC}) set(DUSK_ENABLE_DISCORD_DEFAULT ${DUSK_ENABLE_DISCORD_RPC})
@@ -476,7 +475,7 @@ set(GAME_DEBUG_FILES
set_source_files_properties( set_source_files_properties(
${GAME_DEBUG_FILES} ${GAME_DEBUG_FILES}
PROPERTIES PROPERTIES
COMPILE_DEFINITIONS "$<$<CONFIG:Debug>:DEBUG=1>;$<$<CONFIG:Debug>:PARTIAL_DEBUG=1>" COMPILE_DEFINITIONS "$<$<CONFIG:Debug>:DEBUG=1>;PARTIAL_DEBUG=1"
) )
# game_base is for all other game code files # game_base is for all other game code files
@@ -490,14 +489,14 @@ set(GAME_BASE_FILES
set_source_files_properties( set_source_files_properties(
${GAME_BASE_FILES} ${GAME_BASE_FILES}
PROPERTIES PROPERTIES
COMPILE_DEFINITIONS "NDEBUG=1;NDEBUG_DEFINED=1;DEBUG_DEFINED=0;$<$<CONFIG:Debug>:PARTIAL_DEBUG=1>" COMPILE_DEFINITIONS "NDEBUG=1;NDEBUG_DEFINED=1;DEBUG_DEFINED=0;PARTIAL_DEBUG=1"
) )
foreach(jsystem_lib IN LISTS JSYSTEM_LIBRARIES) foreach(jsystem_lib IN LISTS JSYSTEM_LIBRARIES)
target_compile_definitions(${jsystem_lib} PRIVATE target_compile_definitions(${jsystem_lib} PRIVATE
${GAME_COMPILE_DEFS} ${GAME_COMPILE_DEFS}
$<$<CONFIG:Debug>:DEBUG=1> $<$<CONFIG:Debug>:DEBUG=1>
$<$<CONFIG:Debug>:PARTIAL_DEBUG=1> PARTIAL_DEBUG=1
) )
target_include_directories(${jsystem_lib} PRIVATE ${GAME_INCLUDE_DIRS}) target_include_directories(${jsystem_lib} PRIVATE ${GAME_INCLUDE_DIRS})
target_link_libraries(${jsystem_lib} PRIVATE ${GAME_LIBS}) target_link_libraries(${jsystem_lib} PRIVATE ${GAME_LIBS})
@@ -522,24 +521,6 @@ if (ENABLE_ASAN)
target_sources(dusklight PRIVATE src/dusk/asan_options.c) target_sources(dusklight PRIVATE src/dusk/asan_options.c)
endif () endif ()
# Add embedded data to target
file(GLOB_RECURSE RANDOMIZER_DATA "src/dusk/randomizer/generator/data/*")
file(GLOB_RECURSE RANDOMIZER_ASSETS "src/dusk/randomizer/assets/*")
list(APPEND RANDOMIZER_DATA ${RANDOMIZER_ASSETS})
set(RANDO_ROOT_DATA_DIR ${CMAKE_CURRENT_SOURCE_DIR})
foreach (RANDOMIZER_FILE IN LISTS RANDOMIZER_DATA)
file(RELATIVE_PATH REL_PATH ${RANDO_ROOT_DATA_DIR} ${RANDOMIZER_FILE})
if(REL_PATH MATCHES "^src/dusk/randomizer/generator/data/tests")
message(STATUS "Skipping Embed: ${REL_PATH}")
continue()
endif ()
message(STATUS "Embedding File: ${REL_PATH}")
b_embed(dusklight ${REL_PATH})
endforeach ()
target_compile_definitions(dusklight PRIVATE ${GAME_COMPILE_DEFS}) target_compile_definitions(dusklight PRIVATE ${GAME_COMPILE_DEFS})
target_include_directories(dusklight PRIVATE ${GAME_INCLUDE_DIRS}) target_include_directories(dusklight PRIVATE ${GAME_INCLUDE_DIRS})
target_link_libraries(dusklight PRIVATE aurora::main ${GAME_LIBS} ${JSYSTEM_LINK_LIBRARIES}) target_link_libraries(dusklight PRIVATE aurora::main ${GAME_LIBS} ${JSYSTEM_LINK_LIBRARIES})
-105
View File
@@ -1464,9 +1464,6 @@ set(DUSK_FILES
src/dusk/imgui/ImGuiBloomWindow.hpp src/dusk/imgui/ImGuiBloomWindow.hpp
src/dusk/imgui/ImGuiMenuTools.cpp src/dusk/imgui/ImGuiMenuTools.cpp
src/dusk/imgui/ImGuiMenuTools.hpp src/dusk/imgui/ImGuiMenuTools.hpp
src/dusk/imgui/ImGuiMenuRandomizer.cpp
src/dusk/imgui/ImGuiMenuRandomizer.hpp
src/dusk/imgui/ImGuiArchipelagoDebug.cpp
src/dusk/imgui/ImGuiActorSpawner.cpp src/dusk/imgui/ImGuiActorSpawner.cpp
src/dusk/imgui/ImGuiProcessOverlay.cpp src/dusk/imgui/ImGuiProcessOverlay.cpp
src/dusk/imgui/ImGuiCameraOverlay.cpp src/dusk/imgui/ImGuiCameraOverlay.cpp
@@ -1487,8 +1484,6 @@ set(DUSK_FILES
src/dusk/ui/controls.hpp src/dusk/ui/controls.hpp
src/dusk/ui/controller_config.cpp src/dusk/ui/controller_config.cpp
src/dusk/ui/controller_config.hpp src/dusk/ui/controller_config.hpp
src/dusk/ui/cosmetics.hpp
src/dusk/ui/cosmetics.cpp
src/dusk/ui/document.cpp src/dusk/ui/document.cpp
src/dusk/ui/document.hpp src/dusk/ui/document.hpp
src/dusk/ui/editor.cpp src/dusk/ui/editor.cpp
@@ -1538,12 +1533,6 @@ set(DUSK_FILES
src/dusk/ui/warp.hpp src/dusk/ui/warp.hpp
src/dusk/ui/window.cpp src/dusk/ui/window.cpp
src/dusk/ui/window.hpp src/dusk/ui/window.hpp
src/dusk/ui/rando_config.cpp
src/dusk/ui/rando_config.hpp
src/dusk/ui/rando_seed_generation.cpp
src/dusk/ui/rando_seed_generation.hpp
src/dusk/ui/archi_connect_modal.cpp
src/dusk/ui/archi_connect_modal.hpp
src/dusk/achievements.cpp src/dusk/achievements.cpp
src/dusk/iso_validate.cpp src/dusk/iso_validate.cpp
src/dusk/livesplit.cpp src/dusk/livesplit.cpp
@@ -1557,100 +1546,6 @@ set(DUSK_FILES
src/dusk/discord_presence.cpp src/dusk/discord_presence.cpp
src/dusk/version.cpp src/dusk/version.cpp
src/dusk/action_bindings.cpp src/dusk/action_bindings.cpp
src/dusk/cosmetics/color_utils.hpp
src/dusk/cosmetics/color_utils.cpp
src/dusk/cosmetics/texture_utils.hpp
src/dusk/cosmetics/texture_utils.cpp
# Randomizer files
src/dusk/randomizer/game/flags.cpp
src/dusk/randomizer/game/flags.h
src/dusk/randomizer/game/messages.cpp
src/dusk/randomizer/game/messages.hpp
src/dusk/randomizer/game/stages.cpp
src/dusk/randomizer/game/stages.h
src/dusk/randomizer/game/tools.cpp
src/dusk/randomizer/game/tools.h
src/dusk/randomizer/game/verify_item_functions.cpp
src/dusk/randomizer/game/verify_item_functions.h
src/dusk/randomizer/game/randomizer_context.cpp
src/dusk/randomizer/game/randomizer_context.hpp
src/dusk/randomizer/generator/logic/area.cpp
src/dusk/randomizer/generator/logic/area.hpp
src/dusk/randomizer/generator/logic/dungeon.cpp
src/dusk/randomizer/generator/logic/dungeon.hpp
src/dusk/randomizer/generator/logic/entrance.cpp
src/dusk/randomizer/generator/logic/entrance.hpp
src/dusk/randomizer/generator/logic/entrance_shuffle.cpp
src/dusk/randomizer/generator/logic/entrance_shuffle.hpp
src/dusk/randomizer/generator/logic/fill.cpp
src/dusk/randomizer/generator/logic/fill.hpp
src/dusk/randomizer/generator/logic/flatten/bits.cpp
src/dusk/randomizer/generator/logic/flatten/bits.hpp
src/dusk/randomizer/generator/logic/flatten/flatten.cpp
src/dusk/randomizer/generator/logic/flatten/flatten.hpp
src/dusk/randomizer/generator/logic/flatten/simplify_algebraic.cpp
src/dusk/randomizer/generator/logic/flatten/simplify_algebraic.hpp
src/dusk/randomizer/generator/logic/hints.cpp
src/dusk/randomizer/generator/logic/hints.hpp
src/dusk/randomizer/generator/logic/item.cpp
src/dusk/randomizer/generator/logic/item.hpp
src/dusk/randomizer/generator/logic/item_pool.cpp
src/dusk/randomizer/generator/logic/item_pool.hpp
src/dusk/randomizer/generator/logic/location.cpp
src/dusk/randomizer/generator/logic/location.hpp
src/dusk/randomizer/generator/logic/plandomizer.cpp
src/dusk/randomizer/generator/logic/plandomizer.hpp
src/dusk/randomizer/generator/logic/requirement.cpp
src/dusk/randomizer/generator/logic/requirement.hpp
src/dusk/randomizer/generator/logic/search.cpp
src/dusk/randomizer/generator/logic/search.hpp
src/dusk/randomizer/generator/logic/spoiler_log.cpp
src/dusk/randomizer/generator/logic/spoiler_log.hpp
src/dusk/randomizer/generator/logic/world.cpp
src/dusk/randomizer/generator/logic/world.hpp
src/dusk/randomizer/generator/randomizer.cpp
src/dusk/randomizer/generator/randomizer.hpp
src/dusk/randomizer/generator/seedgen/config.cpp
src/dusk/randomizer/generator/seedgen/config.hpp
src/dusk/randomizer/generator/seedgen/packed_bits.hpp
src/dusk/randomizer/generator/seedgen/seed.cpp
src/dusk/randomizer/generator/seedgen/seed.hpp
src/dusk/randomizer/generator/seedgen/settings.cpp
src/dusk/randomizer/generator/seedgen/settings.hpp
src/dusk/randomizer/generator/test/test.cpp
src/dusk/randomizer/generator/test/test.hpp
src/dusk/randomizer/generator/utility/base64pp.hpp
src/dusk/randomizer/generator/utility/color.cpp
src/dusk/randomizer/generator/utility/color.hpp
src/dusk/randomizer/generator/utility/crc32.hpp
src/dusk/randomizer/generator/utility/common.cpp
src/dusk/randomizer/generator/utility/common.hpp
src/dusk/randomizer/generator/utility/container.hpp
src/dusk/randomizer/generator/utility/endian.cpp
src/dusk/randomizer/generator/utility/endian.hpp
src/dusk/randomizer/generator/utility/exception.hpp
src/dusk/randomizer/generator/utility/file.cpp
src/dusk/randomizer/generator/utility/file.hpp
src/dusk/randomizer/generator/utility/general.hpp
src/dusk/randomizer/generator/utility/log.cpp
src/dusk/randomizer/generator/utility/log.hpp
src/dusk/randomizer/generator/utility/math.hpp
src/dusk/randomizer/generator/utility/path.cpp
src/dusk/randomizer/generator/utility/path.hpp
src/dusk/randomizer/generator/utility/platform.cpp
src/dusk/randomizer/generator/utility/platform.hpp
src/dusk/randomizer/generator/utility/random.cpp
src/dusk/randomizer/generator/utility/random.hpp
src/dusk/randomizer/generator/utility/string.cpp
src/dusk/randomizer/generator/utility/string.hpp
src/dusk/randomizer/generator/utility/text.cpp
src/dusk/randomizer/generator/utility/text.hpp
src/dusk/randomizer/generator/utility/thread_local.hpp
src/dusk/randomizer/generator/utility/time.cpp
src/dusk/randomizer/generator/utility/time.hpp
src/dusk/randomizer/generator/utility/yaml.hpp
# Archipelago Files
src/dusk/archipelago/archipelago_context.cpp
) )
set(DUSK_HTTP_BACKEND_FILES set(DUSK_HTTP_BACKEND_FILES
@@ -20,7 +20,7 @@ public:
/* 0x14 */ cM3dGAab mM3dGAab; /* 0x14 */ cM3dGAab mM3dGAab;
/* 0x30 */ cBgS_ShdwDraw_Callback mCallbackFun; /* 0x30 */ cBgS_ShdwDraw_Callback mCallbackFun;
#if DEBUG #if PARTIAL_DEBUG || DEBUG
/* 0x34 */ int field_0x34; /* 0x34 */ int field_0x34;
#endif #endif
}; };
+2
View File
@@ -48,6 +48,8 @@ public:
/* 0x1370 */ Z2FxLineMgr mFxLineMgr; /* 0x1370 */ Z2FxLineMgr mFxLineMgr;
#if DEBUG #if DEBUG
/* 0x13BC */ Z2DebugSys mDebugSys; /* 0x13BC */ Z2DebugSys mDebugSys;
#elif PARTIAL_DEBUG
alignas(Z2DebugSys) u8 mDebugSys[sizeof(Z2DebugSys)];
#endif #endif
}; // Size: 0x138C }; // Size: 0x138C
-5
View File
@@ -46,11 +46,6 @@ public:
s32 getSeLoadStatus(u32 wave) { return getWaveLoadStatus(wave, 0); } s32 getSeLoadStatus(u32 wave) { return getWaveLoadStatus(wave, 0); }
s32 getBgmLoadStatus(u32 wave) { return getWaveLoadStatus(wave, 1); } s32 getBgmLoadStatus(u32 wave) { return getWaveLoadStatus(wave, 1); }
u8 getDemoSeWaveNum() { return loadedDemoWave; } u8 getDemoSeWaveNum() { return loadedDemoWave; }
#if TARGET_PC
u8 getLoadedSeWave_1() { return loadedSeWave_1;}
u8 getLoadedSeWave_2() { return loadedSeWave_2;}
#endif
private: private:
/* 0x00 */ JAISoundID BGM_ID; /* 0x00 */ JAISoundID BGM_ID;
+1 -1
View File
@@ -194,7 +194,7 @@ public:
JAISoundHandle* getMainBgmHandle() { return &mMainBgmHandle; } JAISoundHandle* getMainBgmHandle() { return &mMainBgmHandle; }
JAISoundHandle* getSubBgmHandle() { return &mSubBgmHandle; } JAISoundHandle* getSubBgmHandle() { return &mSubBgmHandle; }
#if DEBUG #if PARTIAL_DEBUG || DEBUG
f32 field_0x00_debug; f32 field_0x00_debug;
u8 field_0x04_debug; u8 field_0x04_debug;
#endif #endif
+2 -2
View File
@@ -100,13 +100,13 @@ public:
bool isForceBattle() { return forceBattle_; } bool isForceBattle() { return forceBattle_; }
JSUList<Z2CreatureEnemy>* getEnemyList() { return &field_0x0; } JSUList<Z2CreatureEnemy>* getEnemyList() { return &field_0x0; }
#if DEBUG #if PARTIAL_DEBUG || DEBUG
JSUList<Z2SoundObjBase>* getAllList() { return &allList_; } JSUList<Z2SoundObjBase>* getAllList() { return &allList_; }
#endif #endif
private: private:
/* 0x00 */ JSUList<Z2CreatureEnemy> field_0x0; /* 0x00 */ JSUList<Z2CreatureEnemy> field_0x0;
#if DEBUG #if PARTIAL_DEBUG || DEBUG
/* 0x0C */ JSUList<Z2SoundObjBase> allList_; /* 0x0C */ JSUList<Z2SoundObjBase> allList_;
#endif #endif
/* 0x0C */ Z2EnemyArea enemyArea_; /* 0x0C */ Z2EnemyArea enemyArea_;
+1 -1
View File
@@ -7,7 +7,7 @@
struct Z2SoundStarter; struct Z2SoundStarter;
class Z2SoundObjBase : public Z2SoundHandles class Z2SoundObjBase : public Z2SoundHandles
#if DEBUG #if PARTIAL_DEBUG || DEBUG
, public JSULink<Z2SoundObjBase> , public JSULink<Z2SoundObjBase>
#endif #endif
{ {
+2 -10
View File
@@ -3912,12 +3912,6 @@ public:
u16 getReadyItem() { return dComIfGp_getSelectItem(mSelectItemId); } u16 getReadyItem() { return dComIfGp_getSelectItem(mSelectItemId); }
static u32 getOtherHeapSize() { return 0xF0A60; } static u32 getOtherHeapSize() { return 0xF0A60; }
#if TARGET_PC
u16 getEventId() { return mMsgFlow.getEventId(); }
bool checkSwimming() {return checkModeFlg(MODE_SWIMMING);}
#endif
static daAlink_BckData const m_mainBckShield[20]; static daAlink_BckData const m_mainBckShield[20];
static daAlink_BckData const m_mainBckSword[5]; static daAlink_BckData const m_mainBckSword[5];
@@ -6397,8 +6391,7 @@ public:
class daAlinkHIO_huLight_c0 { class daAlinkHIO_huLight_c0 {
public: public:
static daAlinkHIO_huLight_c1 IF_NOT_DUSK(const) m; static daAlinkHIO_huLight_c1 const m;
IF_DUSK(static daAlinkHIO_huLight_c1 const original;)
}; };
class daAlinkHIO_wlLight_c1 { class daAlinkHIO_wlLight_c1 {
@@ -6472,8 +6465,7 @@ public:
class daAlinkHIO_kandelaar_c0 { class daAlinkHIO_kandelaar_c0 {
public: public:
static daAlinkHIO_kandelaar_c1 IF_NOT_DUSK(const) m; static daAlinkHIO_kandelaar_c1 const m;
IF_DUSK(static daAlinkHIO_kandelaar_c1 const original;)
}; };
class daAlinkHIO_kandelaar_c : public daAlinkHIO_data_c { class daAlinkHIO_kandelaar_c : public daAlinkHIO_data_c {
+1 -4
View File
@@ -120,10 +120,7 @@ public:
BOOL chkAction(actionFunc action) { return action == mAction; } BOOL chkAction(actionFunc action) { return action == mAction; }
static eventFunc mEvtSeqList[1]; static eventFunc mEvtSeqList[1];
#if TARGET_PC
// Keep track of last given bug for rando
static u8 mGivenInsectId;
#endif
private: private:
/* 0xB48 */ Z2Creature mSound; /* 0xB48 */ Z2Creature mSound;
/* 0xBD8 */ J3DModel* mpUmbrellaModel; /* 0xBD8 */ J3DModel* mpUmbrellaModel;
-3
View File
@@ -64,9 +64,6 @@ public:
virtual int Delete(); virtual int Delete();
virtual BOOL checkSmallTbox() { return true; } virtual BOOL checkSmallTbox() { return true; }
#if TARGET_PC
u8 getTboxNo() { return fopAcM_GetParamBit(this, 16, 8);}
#endif
u8 getModelType() { return fopAcM_GetParamBit(this, 8, 4); } u8 getModelType() { return fopAcM_GetParamBit(this, 8, 4); }
u8 getItemNo() { return fopAcM_GetParamBit(this, 0, 8); } u8 getItemNo() { return fopAcM_GetParamBit(this, 0, 8); }
-4
View File
@@ -114,10 +114,6 @@ public:
bool checkBoomWindTgTimer() { return mBoomWindTgTimer == 0; } bool checkBoomWindTgTimer() { return mBoomWindTgTimer == 0; }
#if TARGET_PC
void setRandomizerItem(bool setFoolishItemModel = false);
#endif
static procFunc mFuncPtr[]; static procFunc mFuncPtr[];
static const dCcD_SrcCyl m_cyl_src; static const dCcD_SrcCyl m_cyl_src;
static s32 m_timer_max; static s32 m_timer_max;
-5
View File
@@ -7,9 +7,4 @@ class fopAc_ac_c;
int CheckFieldItemCreateHeap(fopAc_ac_c* actor); int CheckFieldItemCreateHeap(fopAc_ac_c* actor);
int CheckItemCreateHeap(fopAc_ac_c* i_this); int CheckItemCreateHeap(fopAc_ac_c* i_this);
#if TARGET_PC
// Used for foolish items in rando. Foolish item model id is saved to home.angle.z
#define M_ITEMNO_MODEL_ITEM_ID (IF_DUSK(randomizer_IsActive() && m_itemNo == dItemNo_Randomizer_FOOLISH_ITEM_e && home.angle.z != 0 ? home.angle.z :) m_itemNo)
#endif
#endif /* D_A_D_A_ITEMBASE_STATIC_H */ #endif /* D_A_D_A_ITEMBASE_STATIC_H */
-10
View File
@@ -74,17 +74,7 @@ public:
s16 getAngleY() const { return mAngleY; } s16 getAngleY() const { return mAngleY; }
void setAngleY(s16 angle) { mAngleY = angle;} void setAngleY(s16 angle) { mAngleY = angle;}
#if TARGET_PC
BOOL isRandomized() const;
#endif
static ResourceData const mData[23]; static ResourceData const mData[23];
#if TARGET_PC
static ResourceData mRandoData[23];
#define M_SHOP_DATA (isRandomized() ? mRandoData : mData)
#else
#define M_SHOP_DATA mData
#endif
static f32 const m_cullfar_max; static f32 const m_cullfar_max;
enum { enum {
+2 -2
View File
@@ -45,7 +45,7 @@ private:
class dAttParam_c : public JORReflexible { class dAttParam_c : public JORReflexible {
public: public:
#if DEBUG #if PARTIAL_DEBUG || DEBUG
/* 0x04 */ s8 mHIOChildNo; /* 0x04 */ s8 mHIOChildNo;
#endif #endif
@@ -66,7 +66,7 @@ public:
/* 0x35 */ u8 mAttnCursorDisappearFrames; /* 0x35 */ u8 mAttnCursorDisappearFrames;
/* 0x38 */ f32 field_0x38; /* 0x38 */ f32 field_0x38;
/* 0x3C */ f32 field_0x3c; /* 0x3C */ f32 field_0x3c;
#if DEBUG #if PARTIAL_DEBUG || DEBUG
/* 0x44 */ s32 mDebugDispPosX; /* 0x44 */ s32 mDebugDispPosX;
/* 0x48 */ s32 mDebugDispPosY; /* 0x48 */ s32 mDebugDispPosY;
#endif #endif
+2 -2
View File
@@ -201,7 +201,7 @@ private:
/* 0x02C */ u32 m_flags; /* 0x02C */ u32 m_flags;
/* 0x030 */ cXyz* pm_pos; /* 0x030 */ cXyz* pm_pos;
/* 0x034 */ cXyz* pm_old_pos; /* 0x034 */ cXyz* pm_old_pos;
#if DEBUG #if PARTIAL_DEBUG || DEBUG
/* 0x038 */ cXyz unk_0x38; /* 0x038 */ cXyz unk_0x38;
#endif #endif
/* 0x038 */ cXyz* pm_speed; /* 0x038 */ cXyz* pm_speed;
@@ -229,7 +229,7 @@ private:
/* 0x0CC */ f32 field_0xcc; /* 0x0CC */ f32 field_0xcc;
/* 0x0D0 */ f32 m_wtr_chk_offset; /* 0x0D0 */ f32 m_wtr_chk_offset;
/* 0x0D4 */ cBgS_PolyInfo* pm_out_poly_info; /* 0x0D4 */ cBgS_PolyInfo* pm_out_poly_info;
#if DEBUG #if PARTIAL_DEBUG || DEBUG
/* 0x0E4 */ cXyz unk_0xe4; /* 0x0E4 */ cXyz unk_0xe4;
#endif #endif
/* 0x0D8 */ f32 field_0xd8; /* 0x0D8 */ f32 field_0xd8;
+1 -1
View File
@@ -79,7 +79,7 @@ public:
// /* 0x0000 */ cCcS mCCcS; // /* 0x0000 */ cCcS mCCcS;
/* 0x284C */ dCcMassS_Mng mMass_Mng; /* 0x284C */ dCcMassS_Mng mMass_Mng;
#if DEBUG #if PARTIAL_DEBUG || DEBUG
/* 0x2AD0 */ u8 m_is_mass_all_timer; /* 0x2AD0 */ u8 m_is_mass_all_timer;
#endif #endif
}; // Size = 0x2AC4 }; // Size = 0x2AC4
+1 -105
View File
@@ -1,10 +1,6 @@
#ifndef D_COM_D_COM_INF_GAME_H #ifndef D_COM_D_COM_INF_GAME_H
#define D_COM_D_COM_INF_GAME_H #define D_COM_D_COM_INF_GAME_H
#if TARGET_PC
#include "dusk/randomizer/game/randomizer_context.hpp"
#endif
#include "d/d_attention.h" #include "d/d_attention.h"
#include "d/d_cc_s.h" #include "d/d_cc_s.h"
#include "d/d_event.h" #include "d/d_event.h"
@@ -470,9 +466,6 @@ public:
s8 getNextStageRoomNo() { return mNextStage.getRoomNo(); } s8 getNextStageRoomNo() { return mNextStage.getRoomNo(); }
s8 getNextStageLayer() { return mNextStage.getLayer(); } s8 getNextStageLayer() { return mNextStage.getLayer(); }
BOOL isEnableNextStage() { return mNextStage.isEnable(); } BOOL isEnableNextStage() { return mNextStage.isEnable(); }
#if TARGET_PC
void setEnableNextStage() { return mNextStage.setEnable(); }
#endif
void offEnableNextStage() { mNextStage.offEnable(); } void offEnableNextStage() { mNextStage.offEnable(); }
s8 getNextStageWipe() { return mNextStage.getWipe(); } s8 getNextStageWipe() { return mNextStage.getWipe(); }
u8 getNextStageWipeSpeed() { return mNextStage.getWipeSpeed(); } u8 getNextStageWipeSpeed() { return mNextStage.getWipeSpeed(); }
@@ -1044,7 +1037,7 @@ public:
/* 0x1DE09 */ u8 field_0x1de09; /* 0x1DE09 */ u8 field_0x1de09;
/* 0x1DE0A */ u8 field_0x1de0a; /* 0x1DE0A */ u8 field_0x1de0a;
/* 0x1DE0B */ u8 mIsDebugMode; /* 0x1DE0B */ u8 mIsDebugMode;
#if DEBUG #if PARTIAL_DEBUG || DEBUG
/* 0x1DE0C */ OSStopwatch mStopwatch; /* 0x1DE0C */ OSStopwatch mStopwatch;
#endif #endif
@@ -1128,15 +1121,6 @@ void dComIfGs_setWarpItemData(char const* stage, cXyz pos, s16 angle, s8 roomNo,
u8 param_5); u8 param_5);
BOOL dComIfGs_isStageSwitch(int i_stageNo, int i_no); BOOL dComIfGs_isStageSwitch(int i_stageNo, int i_no);
BOOL dComIfGs_isStageTbox(int i_stageNo, int i_no); BOOL dComIfGs_isStageTbox(int i_stageNo, int i_no);
#if TARGET_PC
void dComIfGs_onStageTbox(int i_stageNo, int i_no);
void dComIfGs_offStageTbox(int i_stageNo, int i_no);
void dComIfGs_onStageItem(int i_stageNo, int i_no);
void dComIfGs_offStageItem(int i_stageNo, int i_no);
#endif
void dComIfGs_onStageSwitch(int i_stageNo, int i_no); void dComIfGs_onStageSwitch(int i_stageNo, int i_no);
void dComIfGs_offStageSwitch(int i_stageNo, int i_no); void dComIfGs_offStageSwitch(int i_stageNo, int i_no);
BOOL dComIfGs_isStageSwitch(int i_stageNo, int i_no); BOOL dComIfGs_isStageSwitch(int i_stageNo, int i_no);
@@ -1284,10 +1268,6 @@ int dComIfGd_setShadow(u32 param_0, s8 param_1, J3DModel* param_2, cXyz* param_3
f32 param_5, f32 param_6, f32 param_7, cBgS_PolyInfo& param_8, f32 param_5, f32 param_6, f32 param_7, cBgS_PolyInfo& param_8,
dKy_tevstr_c* param_9, s16 param_10, f32 param_11, TGXTexObj* param_12); dKy_tevstr_c* param_9, s16 param_10, f32 param_11, TGXTexObj* param_12);
#if TARGET_PC
void dComIfGs_setupRandomizerSave();
#endif
inline dSv_info_c* dComIfGs_getSaveInfo() { inline dSv_info_c* dComIfGs_getSaveInfo() {
return &g_dComIfG_gameInfo.info; return &g_dComIfG_gameInfo.info;
} }
@@ -1348,13 +1328,9 @@ inline u8 dComIfGs_getSelectEquipShield() {
return g_dComIfG_gameInfo.info.getPlayer().getPlayerStatusA().getSelectEquip(COLLECT_SHIELD); return g_dComIfG_gameInfo.info.getPlayer().getPlayerStatusA().getSelectEquip(COLLECT_SHIELD);
} }
#if TARGET_PC
u8 dComIfGs_getCollectSmell();
#else
inline u8 dComIfGs_getCollectSmell() { inline u8 dComIfGs_getCollectSmell() {
return g_dComIfG_gameInfo.info.getPlayer().getPlayerStatusA().getSelectEquip(COLLECT_SMELL); return g_dComIfG_gameInfo.info.getPlayer().getPlayerStatusA().getSelectEquip(COLLECT_SMELL);
} }
#endif
inline void dComIfGs_setCollectSmell(u8 smell) { inline void dComIfGs_setCollectSmell(u8 smell) {
g_dComIfG_gameInfo.info.getPlayer().getPlayerStatusA().setSelectEquip(COLLECT_SMELL, smell); g_dComIfG_gameInfo.info.getPlayer().getPlayerStatusA().setSelectEquip(COLLECT_SMELL, smell);
@@ -1444,12 +1420,6 @@ inline BOOL dComIfGs_isDarkClearLV(int i_no) {
return g_dComIfG_gameInfo.info.getPlayer().getPlayerStatusB().isDarkClearLV(i_no); return g_dComIfG_gameInfo.info.getPlayer().getPlayerStatusB().isDarkClearLV(i_no);
} }
#if TARGET_PC
inline u8 dComIfGs_getDarkClearLV() {
return g_dComIfG_gameInfo.info.getPlayer().getPlayerStatusB().getDarkClearLV();
}
#endif
inline void dComIfGs_onTransformLV(int i_no) { inline void dComIfGs_onTransformLV(int i_no) {
g_dComIfG_gameInfo.info.getPlayer().getPlayerStatusB().onTransformLV(i_no); g_dComIfG_gameInfo.info.getPlayer().getPlayerStatusB().onTransformLV(i_no);
} }
@@ -1527,12 +1497,6 @@ inline void dComIfGs_onRegionBit(int i_region) {
g_dComIfG_gameInfo.info.getPlayer().getPlayerFieldLastStayInfo().onRegionBit(i_region); g_dComIfG_gameInfo.info.getPlayer().getPlayerFieldLastStayInfo().onRegionBit(i_region);
} }
#if TARGET_PC
inline void dComIfGs_setRegionBit(u8 i_region) {
g_dComIfG_gameInfo.info.getPlayer().getPlayerFieldLastStayInfo().setRegionBit(i_region);
}
#endif
inline void dComIfGs_setPlayerFieldLastStayInfo(const char* i_stage, cXyz& i_pos, s16 i_angle, inline void dComIfGs_setPlayerFieldLastStayInfo(const char* i_stage, cXyz& i_pos, s16 i_angle,
s8 i_point, u8 i_region) { s8 i_point, u8 i_region) {
g_dComIfG_gameInfo.info.getPlayer().getPlayerFieldLastStayInfo().set(i_stage, i_pos, i_angle, g_dComIfG_gameInfo.info.getPlayer().getPlayerFieldLastStayInfo().set(i_stage, i_pos, i_angle,
@@ -1684,16 +1648,6 @@ inline void dComIfGs_setPachinkoNum(u8 i_num) {
g_dComIfG_gameInfo.info.getPlayer().getItemRecord().setPachinkoNum(i_num); g_dComIfG_gameInfo.info.getPlayer().getItemRecord().setPachinkoNum(i_num);
} }
#if TARGET_PC
inline u8 dComIfGs_getAncientDocumentNum() {
return g_dComIfG_gameInfo.info.getPlayer().getItemRecord().getAncientDocumentNum();
}
inline void dComIfGs_setAncientDocumentNum(u8 i_num) {
g_dComIfG_gameInfo.info.getPlayer().getItemRecord().setAncientDocumentNum(i_num);
}
#endif
inline u8 dComIfGs_getPachinkoMax() { inline u8 dComIfGs_getPachinkoMax() {
return 50; return 50;
} }
@@ -1866,16 +1820,7 @@ inline u8 dComIfGs_getGetNumber(int i_no) {
inline void dComIfGs_setGetNumber(int i_no, u8 i_value) { inline void dComIfGs_setGetNumber(int i_no, u8 i_value) {
g_dComIfG_gameInfo.info.getPlayer().getLetterInfo().setGetNumber(i_no, i_value); g_dComIfG_gameInfo.info.getPlayer().getLetterInfo().setGetNumber(i_no, i_value);
} }
#if TARGET_PC
// For rando
inline void dComIfGs_setAllLetterGet() {
g_dComIfG_gameInfo.info.getPlayer().getLetterInfo().setAllLetterGet();
}
inline void dComIfGs_setAllLetterRead() {
g_dComIfG_gameInfo.info.getPlayer().getLetterInfo().setAllLetterRead();
}
#endif
inline void dComIfGs_addFishNum(u8 param_0) { inline void dComIfGs_addFishNum(u8 param_0) {
g_dComIfG_gameInfo.info.getPlayer().getFishingInfo().addFishCount(param_0); g_dComIfG_gameInfo.info.getPlayer().getFishingInfo().addFishCount(param_0);
} }
@@ -1991,33 +1936,6 @@ inline u8 dComIfGs_getPalLanguage() {
return g_dComIfG_gameInfo.info.getPlayer().getConfig().getPalLanguage(); return g_dComIfG_gameInfo.info.getPlayer().getConfig().getPalLanguage();
} }
#if TARGET_PC
// Kinda hacky, but will do for now
inline void dComIfGs_onRegionFlag(int i_stageNo, int i_no) {
auto regionFlags = reinterpret_cast<u8*>(&g_dComIfG_gameInfo.info.getSavedata().getSave(i_stageNo).getBit());
const int offset = i_no / 8;
const int shift = i_no % 8;
regionFlags[offset] |= (0x80 >> shift);
}
inline void dComIfGs_onSaveTbox(int i_stageNo, int i_no) {
g_dComIfG_gameInfo.info.getSavedata().getSave(i_stageNo).getBit().onTbox(i_no);
}
inline void dComIfGs_offSaveTbox(int i_stageNo, int i_no) {
g_dComIfG_gameInfo.info.getSavedata().getSave(i_stageNo).getBit().offTbox(i_no);
}
inline void dComIfGs_onSaveItem(int i_no) {
g_dComIfG_gameInfo.info.getMemory().getBit().onItem(i_no);
}
inline void dComIfGs_offSaveItem(int i_no) {
g_dComIfG_gameInfo.info.getMemory().getBit().offItem(i_no);
}
#endif
inline BOOL dComIfGs_isSaveTbox(int i_stageNo, int i_no) { inline BOOL dComIfGs_isSaveTbox(int i_stageNo, int i_no) {
return g_dComIfG_gameInfo.info.getSavedata().getSave(i_stageNo).getBit().isTbox(i_no); return g_dComIfG_gameInfo.info.getSavedata().getSave(i_stageNo).getBit().isTbox(i_no);
} }
@@ -2102,10 +2020,6 @@ inline void dComIfGs_setKeyNum(u8 i_keyNum) {
g_dComIfG_gameInfo.info.getMemory().getBit().setKeyNum(i_keyNum); g_dComIfG_gameInfo.info.getMemory().getBit().setKeyNum(i_keyNum);
} }
#if TARGET_PC
u8 dComIfGs_getKeyNum(int i_stageNo);
#endif
inline void dComIfGs_onDungeonItemMap() { inline void dComIfGs_onDungeonItemMap() {
g_dComIfG_gameInfo.info.getMemory().getBit().onDungeonItemMap(); g_dComIfG_gameInfo.info.getMemory().getBit().onDungeonItemMap();
} }
@@ -2482,12 +2396,6 @@ inline void dComIfGs_onItem(int i_bitNo, int i_roomNo) {
g_dComIfG_gameInfo.info.onItem(i_bitNo, i_roomNo); g_dComIfG_gameInfo.info.onItem(i_bitNo, i_roomNo);
} }
#if TARGET_PC
inline void dComIfGs_offItem(int i_bitNo, int i_roomNo) {
g_dComIfG_gameInfo.info.offItem(i_bitNo, i_roomNo);
}
#endif
inline bool dComIfGs_isItem(int i_bitNo, int i_roomNo) { inline bool dComIfGs_isItem(int i_bitNo, int i_roomNo) {
return g_dComIfG_gameInfo.info.isItem(i_bitNo, i_roomNo); return g_dComIfG_gameInfo.info.isItem(i_bitNo, i_roomNo);
} }
@@ -2544,12 +2452,6 @@ inline s8 dComIfGp_getStartStageRoomNo() {
return g_dComIfG_gameInfo.play.getStartStageRoomNo(); return g_dComIfG_gameInfo.play.getStartStageRoomNo();
} }
#if TARGET_PC
inline s8 dComIfGp_getLayerNo() {
return g_dComIfG_gameInfo.play.getLayerNo(0);
}
#endif
inline s8 dComIfGp_getStartStageLayer() { inline s8 dComIfGp_getStartStageLayer() {
return g_dComIfG_gameInfo.play.getStartStageLayer(); return g_dComIfG_gameInfo.play.getStartStageLayer();
} }
@@ -2594,12 +2496,6 @@ inline void dComIfGp_offEnableNextStage() {
g_dComIfG_gameInfo.play.offEnableNextStage(); g_dComIfG_gameInfo.play.offEnableNextStage();
} }
#if TARGET_PC
inline void dComIfGp_setEnableNextStage() {
g_dComIfG_gameInfo.play.setEnableNextStage();
}
#endif
inline s8 dComIfGp_getNextStageWipe() { inline s8 dComIfGp_getNextStageWipe() {
return g_dComIfG_gameInfo.play.getNextStageWipe(); return g_dComIfG_gameInfo.play.getNextStageWipe();
} }
+1 -1
View File
@@ -41,7 +41,7 @@ public:
BASE_ROOM5, BASE_ROOM5,
BASE_DEMO, BASE_DEMO,
#if DEBUG #if PARTIAL_DEBUG || DEBUG
BASE_DEBUG, BASE_DEBUG,
#endif #endif
+2 -17
View File
@@ -203,10 +203,6 @@ public:
DATASELPROC_DATA_SELECT_MOVE_ANIME, DATASELPROC_DATA_SELECT_MOVE_ANIME,
DATASELPROC_SELECT_DATA_OPEN_MOVE, DATASELPROC_SELECT_DATA_OPEN_MOVE,
DATASELPROC_SELECT_DATA_NAME_MOVE, DATASELPROC_SELECT_DATA_NAME_MOVE,
#if TARGET_PC
DATASELPROC_SELECT_DATA_PLAY_MOVE, // Select between vanilla or randomizer play
DATASELPROC_MENU_ARCHIPELAGO_CONNECT, // Wait for archipelago to connect
#endif
DATASELPROC_SELECT_DATA_OPENERASE_MOVE, DATASELPROC_SELECT_DATA_OPENERASE_MOVE,
DATASELPROC_MENU_SELECT, DATASELPROC_MENU_SELECT,
DATASELPROC_MENU_SELECT_MOVE_ANM, DATASELPROC_MENU_SELECT_MOVE_ANM,
@@ -335,10 +331,6 @@ public:
void makeRecInfo(u8); void makeRecInfo(u8);
void selectDataOpenMove(); void selectDataOpenMove();
void selectDataNameMove(); void selectDataNameMove();
#if TARGET_PC
void selectDataPlayTypeMove();
void menuArchipelagoConnect();
#endif
void selectDataOpenEraseMove(); void selectDataOpenEraseMove();
void menuSelect(); void menuSelect();
void menuSelectStart(); void menuSelectStart();
@@ -740,14 +732,7 @@ public:
/* 0x2378 */ J2DPicture* mpFadePict; /* 0x2378 */ J2DPicture* mpFadePict;
#endif #endif
#ifdef TARGET_PC #ifdef TARGET_PC
struct mDusk { dDlst_FileSelFade_c mFadeDlst;
dDlst_FileSelFade_c mFadeDlst;
bool mStartNameAnm;
bool mBackToFileSelect;
bool mArchipelagoBeginConnect;
bool mArchiStartCloseFile;
int mPendingRmlCloseFrames{0};
} mDusk;
#endif #endif
#if PLATFORM_WII || PLATFORM_SHIELD #if PLATFORM_WII || PLATFORM_SHIELD
@@ -758,7 +743,7 @@ public:
}; };
#ifdef TARGET_PC #ifdef TARGET_PC
STATIC_ASSERT(sizeof(dFile_select_c) == 0x237C + sizeof(dFile_select_c::mDusk)); STATIC_ASSERT(sizeof(dFile_select_c) == 0x237C + sizeof(dDlst_FileSelFade_c));
#else #else
STATIC_ASSERT(sizeof(dFile_select_c) == 0x237C); STATIC_ASSERT(sizeof(dFile_select_c) == 0x237C);
#endif #endif
-135
View File
@@ -32,11 +32,6 @@ void item_func_ARROW_20();
void item_func_ARROW_30(); void item_func_ARROW_30();
void item_func_ARROW_1(); void item_func_ARROW_1();
void item_func_PACHINKO_SHOT(); void item_func_PACHINKO_SHOT();
#if TARGET_PC
void item_func_FOOLISH_ITEM();
void item_func_ORDON_PORTAL();
void item_func_SOUTH_FARON_PORTAL();
#endif
void item_func_WATER_BOMB_5(); void item_func_WATER_BOMB_5();
void item_func_WATER_BOMB_10(); void item_func_WATER_BOMB_10();
void item_func_WATER_BOMB_20(); void item_func_WATER_BOMB_20();
@@ -70,12 +65,6 @@ void item_func_DUNGEON_EXIT_2();
void item_func_WALLET_LV1(); void item_func_WALLET_LV1();
void item_func_WALLET_LV2(); void item_func_WALLET_LV2();
void item_func_WALLET_LV3(); void item_func_WALLET_LV3();
#if TARGET_PC
void item_func_UPPER_ZORAS_RIVER_PORTAL();
void item_func_CASTLE_TOWN_PORTAL();
void item_func_GERUDO_DESERT_PORTAL();
void item_func_NORTH_FARON_PORTAL();
#endif
void item_func_ZORAS_JEWEL(); void item_func_ZORAS_JEWEL();
void item_func_HAWK_EYE(); void item_func_HAWK_EYE();
void item_func_WOOD_STICK(); void item_func_WOOD_STICK();
@@ -92,23 +81,13 @@ void item_func_LIGHT_SWORD();
void item_func_FISHING_ROD_1(); void item_func_FISHING_ROD_1();
void item_func_PACHINKO(); void item_func_PACHINKO();
void item_func_COPY_ROD_2(); void item_func_COPY_ROD_2();
#if TARGET_PC
void item_func_KAKARIKO_GORGE_PORTAL();
void item_func_KAKARIKO_VILLAGE_PORTAL();
#endif
void item_func_BOMB_BAG_LV2(); void item_func_BOMB_BAG_LV2();
void item_func_BOMB_BAG_LV1(); void item_func_BOMB_BAG_LV1();
void item_func_BOMB_IN_BAG(); void item_func_BOMB_IN_BAG();
#if TARGET_PC
void item_func_DEATH_MOUNTAIN_PORTAL();
#endif
void item_func_LIGHT_ARROW(); void item_func_LIGHT_ARROW();
void item_func_ARROW_LV1(); void item_func_ARROW_LV1();
void item_func_ARROW_LV2(); void item_func_ARROW_LV2();
void item_func_ARROW_LV3(); void item_func_ARROW_LV3();
#if TARGET_PC
void item_func_ZORAS_DOMAIN_PORTAL();
#endif
void item_func_LURE_ROD(); void item_func_LURE_ROD();
void item_func_BOMB_ARROW(); void item_func_BOMB_ARROW();
void item_func_HAWK_ARROW(); void item_func_HAWK_ARROW();
@@ -154,33 +133,8 @@ void item_func_BILL();
void item_func_WOOD_STATUE(); void item_func_WOOD_STATUE();
void item_func_IRIAS_PENDANT(); void item_func_IRIAS_PENDANT();
void item_func_HORSE_FLUTE(); void item_func_HORSE_FLUTE();
#if TARGET_PC
void item_func_FOREST_SMALL_KEY();
void item_func_MINES_SMALL_KEY();
void item_func_LAKEBED_SMALL_KEY();
void item_func_ARBITERS_SMALL_KEY();
void item_func_SNOWPEAK_SMALL_KEY();
void item_func_TEMPLE_OF_TIME_SMALL_KEY();
void item_func_CITY_SMALL_KEY();
void item_func_PALACE_SMALL_KEY();
void item_func_HYRULE_SMALL_KEY();
void item_func_CAMP_SMALL_KEY();
void item_func_LAKE_HYLIA_PORTAL();
#endif
void item_func_RAFRELS_MEMO(); void item_func_RAFRELS_MEMO();
void item_func_ASHS_SCRIBBLING(); void item_func_ASHS_SCRIBBLING();
#if TARGET_PC
void item_func_FOREST_BOSS_KEY();
void item_func_LAKEBED_BOSS_KEY();
void item_func_ARBITERS_BOSS_KEY();
void item_func_TEMPLE_OF_TIME_BOSS_KEY();
void item_func_CITY_BOSS_KEY();
void item_func_PALACE_BOSS_KEY();
void item_func_HYRULE_BOSS_KEY();
void item_func_FOREST_COMPASS();
void item_func_MINES_COMPASS();
void item_func_LAKEBED_COMPASS();
#endif
void item_func_CHUCHU_YELLOW2(); void item_func_CHUCHU_YELLOW2();
void item_func_OIL_BOTTLE3(); void item_func_OIL_BOTTLE3();
void item_func_SHOP_BEE_CHILD(); void item_func_SHOP_BEE_CHILD();
@@ -193,34 +147,12 @@ void item_func_FILLED_CONTAINER();
void item_func_MIRROR_PIECE_2(); void item_func_MIRROR_PIECE_2();
void item_func_MIRROR_PIECE_3(); void item_func_MIRROR_PIECE_3();
void item_func_MIRROR_PIECE_4(); void item_func_MIRROR_PIECE_4();
#if TARGET_PC
void item_func_ARBITERS_COMPASS();
void item_func_SNOWPEAK_COMPASS();
void item_func_TEMPLE_OF_TIME_COMPASS();
void item_func_CITY_COMPASS();
void item_func_PALACE_COMPASS();
void item_func_HYRULE_COMPASS();
void item_func_MIRROR_CHAMBER_PORTAL();
void item_func_SNOWPEAK_PORTAL();
#endif
void item_func_SMELL_YELIA_POUCH(); void item_func_SMELL_YELIA_POUCH();
void item_func_SMELL_PUMPKIN(); void item_func_SMELL_PUMPKIN();
void item_func_SMELL_POH(); void item_func_SMELL_POH();
void item_func_SMELL_FISH(); void item_func_SMELL_FISH();
void item_func_SMELL_CHILDREN(); void item_func_SMELL_CHILDREN();
void item_func_SMELL_MEDICINE(); void item_func_SMELL_MEDICINE();
#if TARGET_PC
void item_func_FOREST_MAP();
void item_func_MINES_MAP();
void item_func_LAKEBED_MAP();
void item_func_ARBITERS_MAP();
void item_func_SNOWPEAK_MAP();
void item_func_TEMPLE_OF_TIME_MAP();
void item_func_CITY_MAP();
void item_func_PALACE_MAP();
void item_func_HYRULE_MAP();
void item_func_SACRED_GROVE_PORTAL();
#endif
void item_func_M_BEETLE(); void item_func_M_BEETLE();
void item_func_F_BEETLE(); void item_func_F_BEETLE();
void item_func_M_BUTTERFLY(); void item_func_M_BUTTERFLY();
@@ -245,24 +177,7 @@ void item_func_M_ANT();
void item_func_F_ANT(); void item_func_F_ANT();
void item_func_M_MAYFLY(); void item_func_M_MAYFLY();
void item_func_F_MAYFLY(); void item_func_F_MAYFLY();
#if TARGET_PC
void item_func_FUSED_SHADOW_1();
void item_func_FUSED_SHADOW_2();
void item_func_FUSED_SHADOW_3();
void item_func_MIRROR_PIECE_1();
void item_func_ARCHIPELAGO_ITEM();
#endif
void item_func_POU_SPIRIT(); void item_func_POU_SPIRIT();
#if TARGET_PC
void item_func_ENDING_BLOW();
void item_func_SHIELD_ATTACK();
void item_func_BACK_SLICE();
void item_func_HELM_SPLITTER();
void item_func_MORTAL_DRAW();
void item_func_JUMP_STRIKE();
void item_func_GREAT_SPIN();
void item_func_ELDIN_BRIDGE_PORTAL();
#endif
void item_func_ANCIENT_DOCUMENT(); void item_func_ANCIENT_DOCUMENT();
void item_func_AIR_LETTER(); void item_func_AIR_LETTER();
void item_func_ANCIENT_DOCUMENT2(); void item_func_ANCIENT_DOCUMENT2();
@@ -306,10 +221,6 @@ int item_getcheck_func_ARROW_20();
int item_getcheck_func_ARROW_30(); int item_getcheck_func_ARROW_30();
int item_getcheck_func_ARROW_1(); int item_getcheck_func_ARROW_1();
int item_getcheck_func_PACHINKO_SHOT(); int item_getcheck_func_PACHINKO_SHOT();
#if TARGET_PC
int item_getcheck_func_ORDON_PORTAL();
int item_getcheck_func_SOUTH_FARON_PORTAL();
#endif
int item_getcheck_func_WATER_BOMB_5(); int item_getcheck_func_WATER_BOMB_5();
int item_getcheck_func_WATER_BOMB_10(); int item_getcheck_func_WATER_BOMB_10();
int item_getcheck_func_WATER_BOMB_20(); int item_getcheck_func_WATER_BOMB_20();
@@ -343,12 +254,6 @@ int item_getcheck_func_DUNGEON_EXIT_2();
int item_getcheck_func_WALLET_LV1(); int item_getcheck_func_WALLET_LV1();
int item_getcheck_func_WALLET_LV2(); int item_getcheck_func_WALLET_LV2();
int item_getcheck_func_WALLET_LV3(); int item_getcheck_func_WALLET_LV3();
#if TARGET_PC
int item_getcheck_func_UPPER_ZORAS_RIVER_PORTAL();
int item_getcheck_func_CASTLE_TOWN_PORTAL();
int item_getcheck_func_GERUDO_DESERT_PORTAL();
int item_getcheck_func_NORTH_FARON_PORTAL();
#endif
int item_getcheck_func_ZORAS_JEWEL(); int item_getcheck_func_ZORAS_JEWEL();
int item_getcheck_func_HAWK_EYE(); int item_getcheck_func_HAWK_EYE();
int item_getcheck_func_WOOD_STICK(); int item_getcheck_func_WOOD_STICK();
@@ -365,23 +270,13 @@ int item_getcheck_func_LIGHT_SWORD();
int item_getcheck_func_FISHING_ROD_1(); int item_getcheck_func_FISHING_ROD_1();
int item_getcheck_func_PACHINKO(); int item_getcheck_func_PACHINKO();
int item_getcheck_func_COPY_ROD_2(); int item_getcheck_func_COPY_ROD_2();
#if TARGET_PC
int item_getcheck_func_KAKARIKO_GORGE_PORTAL();
int item_getcheck_func_KAKARIKO_VILLAGE_PORTAL();
#endif
int item_getcheck_func_BOMB_BAG_LV2(); int item_getcheck_func_BOMB_BAG_LV2();
int item_getcheck_func_BOMB_BAG_LV1(); int item_getcheck_func_BOMB_BAG_LV1();
int item_getcheck_func_BOMB_IN_BAG(); int item_getcheck_func_BOMB_IN_BAG();
#if TARGET_PC
int item_getcheck_func_DEATH_MOUNTAIN_PORTAL();
#endif
int item_getcheck_func_LIGHT_ARROW(); int item_getcheck_func_LIGHT_ARROW();
int item_getcheck_func_ARROW_LV1(); int item_getcheck_func_ARROW_LV1();
int item_getcheck_func_ARROW_LV2(); int item_getcheck_func_ARROW_LV2();
int item_getcheck_func_ARROW_LV3(); int item_getcheck_func_ARROW_LV3();
#if TARGET_PC
int item_getcheck_func_ZORAS_DOMAIN_PORTAL();
#endif
int item_getcheck_func_LURE_ROD(); int item_getcheck_func_LURE_ROD();
int item_getcheck_func_BOMB_ARROW(); int item_getcheck_func_BOMB_ARROW();
int item_getcheck_func_HAWK_ARROW(); int item_getcheck_func_HAWK_ARROW();
@@ -427,10 +322,6 @@ int item_getcheck_func_BILL();
int item_getcheck_func_WOOD_STATUE(); int item_getcheck_func_WOOD_STATUE();
int item_getcheck_func_IRIAS_PENDANT(); int item_getcheck_func_IRIAS_PENDANT();
int item_getcheck_func_HORSE_FLUTE(); int item_getcheck_func_HORSE_FLUTE();
#if TARGET_PC
int item_getcheck_func_CAMP_SMALL_KEY();
int item_getcheck_func_LAKE_HYLIA_PORTAL();
#endif
int item_getcheck_func_RAFRELS_MEMO(); int item_getcheck_func_RAFRELS_MEMO();
int item_getcheck_func_ASHS_SCRIBBLING(); int item_getcheck_func_ASHS_SCRIBBLING();
int item_getcheck_func_CHUCHU_YELLOW2(); int item_getcheck_func_CHUCHU_YELLOW2();
@@ -445,19 +336,12 @@ int item_getcheck_func_FILLED_CONTAINER();
int item_getcheck_func_MIRROR_PIECE_2(); int item_getcheck_func_MIRROR_PIECE_2();
int item_getcheck_func_MIRROR_PIECE_3(); int item_getcheck_func_MIRROR_PIECE_3();
int item_getcheck_func_MIRROR_PIECE_4(); int item_getcheck_func_MIRROR_PIECE_4();
#if TARGET_PC
int item_getcheck_func_MIRROR_CHAMBER_PORTAL();
int item_getcheck_func_SNOWPEAK_PORTAL();
#endif
int item_getcheck_func_SMELL_YELIA_POUCH(); int item_getcheck_func_SMELL_YELIA_POUCH();
int item_getcheck_func_SMELL_PUMPKIN(); int item_getcheck_func_SMELL_PUMPKIN();
int item_getcheck_func_SMELL_POH(); int item_getcheck_func_SMELL_POH();
int item_getcheck_func_SMELL_FISH(); int item_getcheck_func_SMELL_FISH();
int item_getcheck_func_SMELL_CHILDREN(); int item_getcheck_func_SMELL_CHILDREN();
int item_getcheck_func_SMELL_MEDICINE(); int item_getcheck_func_SMELL_MEDICINE();
#if TARGET_PC
int item_getcheck_func_SACRED_GROVE_PORTAL();
#endif
int item_getcheck_func_M_BEETLE(); int item_getcheck_func_M_BEETLE();
int item_getcheck_func_F_BEETLE(); int item_getcheck_func_F_BEETLE();
int item_getcheck_func_M_BUTTERFLY(); int item_getcheck_func_M_BUTTERFLY();
@@ -482,23 +366,7 @@ int item_getcheck_func_M_ANT();
int item_getcheck_func_F_ANT(); int item_getcheck_func_F_ANT();
int item_getcheck_func_M_MAYFLY(); int item_getcheck_func_M_MAYFLY();
int item_getcheck_func_F_MAYFLY(); int item_getcheck_func_F_MAYFLY();
#if TARGET_PC
int item_getcheck_func_FUSED_SHADOW_1();
int item_getcheck_func_FUSED_SHADOW_2();
int item_getcheck_func_FUSED_SHADOW_3();
int item_getcheck_func_MIRROR_PIECE_1();
#endif
int item_getcheck_func_POU_SPIRIT(); int item_getcheck_func_POU_SPIRIT();
#if TARGET_PC
int item_getcheck_func_ENDING_BLOW();
int item_getcheck_func_SHIELD_ATTACK();
int item_getcheck_func_BACK_SLICE();
int item_getcheck_func_HELM_SPLITTER();
int item_getcheck_func_MORTAL_DRAW();
int item_getcheck_func_JUMP_STRIKE();
int item_getcheck_func_GREAT_SPIN();
int item_getcheck_func_ELDIN_BRIDGE_PORTAL();
#endif
int item_getcheck_func_ANCIENT_DOCUMENT(); int item_getcheck_func_ANCIENT_DOCUMENT();
int item_getcheck_func_AIR_LETTER(); int item_getcheck_func_AIR_LETTER();
int item_getcheck_func_ANCIENT_DOCUMENT2(); int item_getcheck_func_ANCIENT_DOCUMENT2();
@@ -527,9 +395,6 @@ int checkItemGet(u8, int);
BOOL isHeart(u8 item_no); BOOL isHeart(u8 item_no);
int isBomb(u8); int isBomb(u8);
int isArrow(u8); int isArrow(u8);
#if TARGET_PC
int isRupee(u8);
#endif
int addBombCount(u8, u8); int addBombCount(u8, u8);
BOOL isBottleItem(u8 item_no); BOOL isBottleItem(u8 item_no);
u8 check_itemno(int i_itemNo); u8 check_itemno(int i_itemNo);
-327
View File
@@ -35,65 +35,7 @@ struct dItem_fieldItemResource {
/* 0xC */ u16 mHeapSize; /* 0xC */ u16 mHeapSize;
}; // Size: 0x10 }; // Size: 0x10
#if TARGET_PC
// Delcared helper functions since we can't include dComIfg_isRandomizer here
dItem_itemResource* dItem_data_getItemResource();
dItem_fieldItemResource* dItem_data_getFieldItemResource();
dItem_itemInfo* dItem_data_getItemInfo();
#endif
struct dItem_data { struct dItem_data {
#if TARGET_PC
static const char* getArcName(u8 index) { return dItem_data_getItemResource()[index].mArcName; }
static s16 getBtpName(u8 index) { return dItem_data_getItemResource()[index].mBtpName; }
static s16 getBrkName(u8 index) { return dItem_data_getItemResource()[index].mBrkName; }
static s16 getBxaName(u8 index) { return -1; }
static s16 getBckName(u8 index) { return dItem_data_getItemResource()[index].mBckName; }
static s16 getBpkName(u8 index) { return -1; }
static s16 getBtkName(u8 index) { return dItem_data_getItemResource()[index].mBtkName; }
static s16 getBmdName(u8 index) { return dItem_data_getItemResource()[index].mBmdName; }
static s8 getTevFrm(u8 index) { return dItem_data_getItemResource()[index].mTevFrm; }
static s8 getBtpFrm(u8 index) { return dItem_data_getItemResource()[index].mBtpFrm; }
static s16 getTexture(u8 index) { return dItem_data_getItemResource()[index].mTexture; }
static u8 getTexScale (u8 index) { return dItem_data_getItemResource()[index].mTexScale; }
static const char* getFieldArc(u8 index) { return dItem_data_getFieldItemResource()[index].mFieldArc; }
static s16 getItemBmdName(u8 index) { return dItem_data_getFieldItemResource()[index].mItemBmdName; }
static s16 getItemBtkName(u8 index) { return -1; }
static s16 getItemBpkName(u8 index) { return -1; }
static s16 getItemBckName(u8 index) { return dItem_data_getFieldItemResource()[index].mItemBckName; }
static s16 getItemBxaName(u8 index) { return -1; }
static s16 getItemBrkName(u8 index) { return dItem_data_getFieldItemResource()[index].mItemBrkName; }
static s16 getItemBtpName(u8 index) { return -1; }
static BOOL chkFlag(u8 index, int flag) { return dItem_data_getItemInfo()[index].mFlag & flag; }
static u8 getShadowSize(u8 index) { return dItem_data_getItemInfo()[index].mShadowSize; }
static const u8 getH(u8 index) { return dItem_data_getItemInfo()[index].mH; }
static const u8 getR(u8 index) { return dItem_data_getItemInfo()[index].mR; }
static u16 getFieldHeapSize(u8 index) { return dItem_data_getFieldItemResource()[index].mHeapSize; }
#else
static const char* getArcName(u8 index) { return item_resource[index].mArcName; } static const char* getArcName(u8 index) { return item_resource[index].mArcName; }
static s16 getBtpName(u8 index) { return item_resource[index].mBtpName; } static s16 getBtpName(u8 index) { return item_resource[index].mBtpName; }
@@ -143,16 +85,10 @@ struct dItem_data {
static const u8 getR(u8 index) { return item_info[index].mR; } static const u8 getR(u8 index) { return item_info[index].mR; }
static u16 getFieldHeapSize(u8 index) { return field_item_res[index].mHeapSize; } static u16 getFieldHeapSize(u8 index) { return field_item_res[index].mHeapSize; }
#endif
static dItem_itemResource item_resource[255]; static dItem_itemResource item_resource[255];
static dItem_fieldItemResource field_item_res[255]; static dItem_fieldItemResource field_item_res[255];
static dItem_itemInfo item_info[255]; static dItem_itemInfo item_info[255];
#if TARGET_PC
static dItem_itemResource item_resource_randomizer[255];
static dItem_fieldItemResource field_item_res_randomizer[255];
static dItem_itemInfo item_info_randomizer[255];
#endif
}; };
enum { enum {
@@ -414,267 +350,4 @@ enum {
/* 0xFF */ dItemNo_NONE_e, /* 0xFF */ dItemNo_NONE_e,
}; };
#if TARGET_PC
// Randomizer item ids. Mostly the same, but we use most unused
// entries for custom portals and keys
enum {
/* 0x00 */ dItemNo_Randomizer_HEART_e,
/* 0x01 */ dItemNo_Randomizer_GREEN_RUPEE_e,
/* 0x02 */ dItemNo_Randomizer_BLUE_RUPEE_e,
/* 0x03 */ dItemNo_Randomizer_YELLOW_RUPEE_e,
/* 0x04 */ dItemNo_Randomizer_RED_RUPEE_e,
/* 0x05 */ dItemNo_Randomizer_PURPLE_RUPEE_e,
/* 0x06 */ dItemNo_Randomizer_ORANGE_RUPEE_e,
/* 0x07 */ dItemNo_Randomizer_SILVER_RUPEE_e,
/* 0x08 */ dItemNo_Randomizer_S_MAGIC_e,
/* 0x09 */ dItemNo_Randomizer_L_MAGIC_e,
/* 0x0A */ dItemNo_Randomizer_BOMB_5_e,
/* 0x0B */ dItemNo_Randomizer_BOMB_10_e,
/* 0x0C */ dItemNo_Randomizer_BOMB_20_e,
/* 0x0D */ dItemNo_Randomizer_BOMB_30_e,
/* 0x0E */ dItemNo_Randomizer_ARROW_10_e,
/* 0x0F */ dItemNo_Randomizer_ARROW_20_e,
/* 0x10 */ dItemNo_Randomizer_ARROW_30_e,
/* 0x11 */ dItemNo_Randomizer_ARROW_1_e,
/* 0x12 */ dItemNo_Randomizer_PACHINKO_SHOT_e,
/* 0x13 */ dItemNo_Randomizer_FOOLISH_ITEM_e,
/* 0x14 */ dItemNo_Randomizer_ORDON_PORTAL_e,
/* 0x15 */ dItemNo_Randomizer_SOUTH_FARON_PORTAL_e,
/* 0x16 */ dItemNo_Randomizer_WATER_BOMB_5_e,
/* 0x17 */ dItemNo_Randomizer_WATER_BOMB_10_e,
/* 0x18 */ dItemNo_Randomizer_WATER_BOMB_20_e,
/* 0x19 */ dItemNo_Randomizer_WATER_BOMB_30_e,
/* 0x1A */ dItemNo_Randomizer_BOMB_INSECT_5_e,
/* 0x1B */ dItemNo_Randomizer_BOMB_INSECT_10_e,
/* 0x1C */ dItemNo_Randomizer_BOMB_INSECT_20_e,
/* 0x1D */ dItemNo_Randomizer_BOMB_INSECT_30_e,
/* 0x1E */ dItemNo_Randomizer_RECOVERY_FAILY_e,
/* 0x1F */ dItemNo_Randomizer_TRIPLE_HEART_e,
/* 0x20 */ dItemNo_Randomizer_SMALL_KEY_e,
/* 0x21 */ dItemNo_Randomizer_KAKERA_HEART_e,
/* 0x22 */ dItemNo_Randomizer_UTAWA_HEART_e,
/* 0x23 */ dItemNo_Randomizer_MAP_e,
/* 0x24 */ dItemNo_Randomizer_COMPUS_e,
/* 0x25 */ dItemNo_Randomizer_DUNGEON_EXIT_e,
/* 0x26 */ dItemNo_Randomizer_BOSS_KEY_e,
/* 0x27 */ dItemNo_Randomizer_DUNGEON_BACK_e,
/* 0x28 */ dItemNo_Randomizer_SWORD_e,
/* 0x29 */ dItemNo_Randomizer_MASTER_SWORD_e,
/* 0x2A */ dItemNo_Randomizer_WOOD_SHIELD_e,
/* 0x2B */ dItemNo_Randomizer_SHIELD_e,
/* 0x2C */ dItemNo_Randomizer_HYLIA_SHIELD_e,
/* 0x2D */ dItemNo_Randomizer_TKS_LETTER_e,
/* 0x2E */ dItemNo_Randomizer_WEAR_CASUAL_e,
/* 0x2F */ dItemNo_Randomizer_WEAR_KOKIRI_e,
/* 0x30 */ dItemNo_Randomizer_ARMOR_e,
/* 0x31 */ dItemNo_Randomizer_WEAR_ZORA_e,
/* 0x32 */ dItemNo_Randomizer_MAGIC_LV1_e,
/* 0x33 */ dItemNo_Randomizer_DUNGEON_EXIT_2_e,
/* 0x34 */ dItemNo_Randomizer_WALLET_LV1_e,
/* 0x35 */ dItemNo_Randomizer_WALLET_LV2_e,
/* 0x36 */ dItemNo_Randomizer_WALLET_LV3_e,
/* 0x37 */ dItemNo_Randomizer_NOENTRY_55_e,
/* 0x38 */ dItemNo_Randomizer_NOENTRY_56_e,
/* 0x39 */ dItemNo_Randomizer_UPPER_ZORAS_RIVER_PORTAL_e,
/* 0x3A */ dItemNo_Randomizer_CASTLE_TOWN_PORTAL_e,
/* 0x3B */ dItemNo_Randomizer_GERUDO_DESERT_PORTAL_e,
/* 0x3C */ dItemNo_Randomizer_NORTH_FARON_PORTAL_e,
/* 0x3D */ dItemNo_Randomizer_ZORAS_JEWEL_e,
/* 0x3E */ dItemNo_Randomizer_HAWK_EYE_e,
/* 0x3F */ dItemNo_Randomizer_WOOD_STICK_e,
/* 0x40 */ dItemNo_Randomizer_BOOMERANG_e,
/* 0x41 */ dItemNo_Randomizer_SPINNER_e,
/* 0x42 */ dItemNo_Randomizer_IRONBALL_e,
/* 0x43 */ dItemNo_Randomizer_BOW_e,
/* 0x44 */ dItemNo_Randomizer_HOOKSHOT_e,
/* 0x45 */ dItemNo_Randomizer_HVY_BOOTS_e,
/* 0x46 */ dItemNo_Randomizer_COPY_ROD_e,
/* 0x47 */ dItemNo_Randomizer_W_HOOKSHOT_e,
/* 0x48 */ dItemNo_Randomizer_KANTERA_e,
/* 0x49 */ dItemNo_Randomizer_LIGHT_SWORD_e,
/* 0x4A */ dItemNo_Randomizer_FISHING_ROD_1_e,
/* 0x4B */ dItemNo_Randomizer_PACHINKO_e,
/* 0x4C */ dItemNo_Randomizer_COPY_ROD_2_e,
/* 0x4D */ dItemNo_Randomizer_KAKARIKO_GORGE_PORTAL_e,
/* 0x4E */ dItemNo_Randomizer_KAKARIKO_VILLAGE_PORTAL_e,
/* 0x4F */ dItemNo_Randomizer_BOMB_BAG_LV2_e,
/* 0x50 */ dItemNo_Randomizer_BOMB_BAG_LV1_e,
/* 0x51 */ dItemNo_Randomizer_BOMB_IN_BAG_e,
/* 0x52 */ dItemNo_Randomizer_DEATH_MOUNTAIN_PORTAL_e,
/* 0x53 */ dItemNo_Randomizer_LIGHT_ARROW_e,
/* 0x54 */ dItemNo_Randomizer_ARROW_LV1_e,
/* 0x55 */ dItemNo_Randomizer_ARROW_LV2_e,
/* 0x56 */ dItemNo_Randomizer_ARROW_LV3_e,
/* 0x57 */ dItemNo_Randomizer_ZORAS_DOMAIN_PORTAL_e,
/* 0x58 */ dItemNo_Randomizer_LURE_ROD_e,
/* 0x59 */ dItemNo_Randomizer_BOMB_ARROW_e,
/* 0x5A */ dItemNo_Randomizer_HAWK_ARROW_e,
/* 0x5B */ dItemNo_Randomizer_BEE_ROD_e,
/* 0x5C */ dItemNo_Randomizer_JEWEL_ROD_e,
/* 0x5D */ dItemNo_Randomizer_WORM_ROD_e,
/* 0x5E */ dItemNo_Randomizer_JEWEL_BEE_ROD_e,
/* 0x5F */ dItemNo_Randomizer_JEWEL_WORM_ROD_e,
/* 0x60 */ dItemNo_Randomizer_EMPTY_BOTTLE_e,
/* 0x61 */ dItemNo_Randomizer_RED_BOTTLE_e,
/* 0x62 */ dItemNo_Randomizer_GREEN_BOTTLE_e,
/* 0x63 */ dItemNo_Randomizer_BLUE_BOTTLE_e,
/* 0x64 */ dItemNo_Randomizer_MILK_BOTTLE_e,
/* 0x65 */ dItemNo_Randomizer_HALF_MILK_BOTTLE_e,
/* 0x66 */ dItemNo_Randomizer_OIL_BOTTLE_e,
/* 0x67 */ dItemNo_Randomizer_WATER_BOTTLE_e,
/* 0x68 */ dItemNo_Randomizer_OIL_BOTTLE_2_e,
/* 0x69 */ dItemNo_Randomizer_RED_BOTTLE_2_e,
/* 0x6A */ dItemNo_Randomizer_UGLY_SOUP_e,
/* 0x6B */ dItemNo_Randomizer_HOT_SPRING_e,
/* 0x6C */ dItemNo_Randomizer_FAIRY_e,
/* 0x6D */ dItemNo_Randomizer_HOT_SPRING_2_e,
/* 0x6E */ dItemNo_Randomizer_OIL2_e,
/* 0x6F */ dItemNo_Randomizer_OIL_e,
/* 0x70 */ dItemNo_Randomizer_NORMAL_BOMB_e,
/* 0x71 */ dItemNo_Randomizer_WATER_BOMB_e,
/* 0x72 */ dItemNo_Randomizer_POKE_BOMB_e,
/* 0x73 */ dItemNo_Randomizer_FAIRY_DROP_e,
/* 0x74 */ dItemNo_Randomizer_WORM_e,
/* 0x75 */ dItemNo_Randomizer_DROP_BOTTLE_e,
/* 0x76 */ dItemNo_Randomizer_BEE_CHILD_e,
/* 0x77 */ dItemNo_Randomizer_CHUCHU_RARE_e,
/* 0x78 */ dItemNo_Randomizer_CHUCHU_RED_e,
/* 0x79 */ dItemNo_Randomizer_CHUCHU_BLUE_e,
/* 0x7A */ dItemNo_Randomizer_CHUCHU_GREEN_e,
/* 0x7B */ dItemNo_Randomizer_CHUCHU_YELLOW_e,
/* 0x7C */ dItemNo_Randomizer_CHUCHU_PURPLE_e,
/* 0x7D */ dItemNo_Randomizer_LV1_SOUP_e,
/* 0x7E */ dItemNo_Randomizer_LV2_SOUP_e,
/* 0x7F */ dItemNo_Randomizer_LV3_SOUP_e,
/* 0x80 */ dItemNo_Randomizer_LETTER_e,
/* 0x81 */ dItemNo_Randomizer_BILL_e,
/* 0x82 */ dItemNo_Randomizer_WOOD_STATUE_e,
/* 0x83 */ dItemNo_Randomizer_IRIAS_PENDANT_e,
/* 0x84 */ dItemNo_Randomizer_HORSE_FLUTE_e,
/* 0x85 */ dItemNo_Randomizer_FOREST_SMALL_KEY_e,
/* 0x86 */ dItemNo_Randomizer_MINES_SMALL_KEY_e,
/* 0x87 */ dItemNo_Randomizer_LAKEBED_SMALL_KEY_e,
/* 0x88 */ dItemNo_Randomizer_ARBITERS_SMALL_KEY_e,
/* 0x89 */ dItemNo_Randomizer_SNOWPEAK_SMALL_KEY_e,
/* 0x8A */ dItemNo_Randomizer_TEMPLE_OF_TIME_SMALL_KEY_e,
/* 0x8B */ dItemNo_Randomizer_CITY_SMALL_KEY_e,
/* 0x8C */ dItemNo_Randomizer_PALACE_SMALL_KEY_e,
/* 0x8D */ dItemNo_Randomizer_HYRULE_SMALL_KEY_e,
/* 0x8E */ dItemNo_Randomizer_CAMP_SMALL_KEY_e,
/* 0x8F */ dItemNo_Randomizer_LAKE_HYLIA_PORTAL_e,
/* 0x90 */ dItemNo_Randomizer_RAFRELS_MEMO_e,
/* 0x91 */ dItemNo_Randomizer_ASHS_SCRIBBLING_e,
/* 0x92 */ dItemNo_Randomizer_FOREST_BOSS_KEY_e,
/* 0x93 */ dItemNo_Randomizer_LAKEBED_BOSS_KEY_e,
/* 0x94 */ dItemNo_Randomizer_ARBITERS_BOSS_KEY_e,
/* 0x95 */ dItemNo_Randomizer_TEMPLE_OF_TIME_BOSS_KEY_e,
/* 0x96 */ dItemNo_Randomizer_CITY_BOSS_KEY_e,
/* 0x97 */ dItemNo_Randomizer_PALACE_BOSS_KEY_e,
/* 0x98 */ dItemNo_Randomizer_HYRULE_BOSS_KEY_e,
/* 0x99 */ dItemNo_Randomizer_FOREST_COMPASS_e,
/* 0x9A */ dItemNo_Randomizer_MINES_COMPASS_e,
/* 0x9B */ dItemNo_Randomizer_LAKEBED_COMPASS_e,
/* 0x9C */ dItemNo_Randomizer_CHUCHU_YELLOW2_e,
/* 0x9D */ dItemNo_Randomizer_OIL_BOTTLE3_e,
/* 0x9E */ dItemNo_Randomizer_SHOP_BEE_CHILD_e,
/* 0x9F */ dItemNo_Randomizer_CHUCHU_BLACK_e,
/* 0xA0 */ dItemNo_Randomizer_LIGHT_DROP_e,
/* 0xA1 */ dItemNo_Randomizer_DROP_CONTAINER_e,
/* 0xA2 */ dItemNo_Randomizer_DROP_CONTAINER02_e,
/* 0xA3 */ dItemNo_Randomizer_DROP_CONTAINER03_e,
/* 0xA4 */ dItemNo_Randomizer_FILLED_CONTAINER_e,
/* 0xA5 */ dItemNo_Randomizer_MIRROR_PIECE_2_e,
/* 0xA6 */ dItemNo_Randomizer_MIRROR_PIECE_3_e,
/* 0xA7 */ dItemNo_Randomizer_MIRROR_PIECE_4_e,
/* 0xA8 */ dItemNo_Randomizer_ARBITERS_COMPASS_e,
/* 0xA9 */ dItemNo_Randomizer_SNOWPEAK_COMPASS_e,
/* 0xAA */ dItemNo_Randomizer_TEMPLE_OF_TIME_COMPASS_e,
/* 0xAB */ dItemNo_Randomizer_CITY_COMPASS_e,
/* 0xAC */ dItemNo_Randomizer_PALACE_COMPASS_e,
/* 0xAD */ dItemNo_Randomizer_HYRULE_COMPASS_e,
/* 0xAE */ dItemNo_Randomizer_MIRROR_CHAMBER_PORTAL_e,
/* 0xAF */ dItemNo_Randomizer_SNOWPEAK_PORTAL_e,
/* 0xB0 */ dItemNo_Randomizer_SMELL_YELIA_POUCH_e,
/* 0xB1 */ dItemNo_Randomizer_SMELL_PUMPKIN_e,
/* 0xB2 */ dItemNo_Randomizer_SMELL_POH_e,
/* 0xB3 */ dItemNo_Randomizer_SMELL_FISH_e,
/* 0xB4 */ dItemNo_Randomizer_SMELL_CHILDREN_e,
/* 0xB5 */ dItemNo_Randomizer_SMELL_MEDICINE_e,
/* 0xB6 */ dItemNo_Randomizer_FOREST_MAP_e,
/* 0xB7 */ dItemNo_Randomizer_MINES_MAP_e,
/* 0xB8 */ dItemNo_Randomizer_LAKEBED_MAP_e,
/* 0xB9 */ dItemNo_Randomizer_ARBITERS_MAP_e,
/* 0xBA */ dItemNo_Randomizer_SNOWPEAK_MAP_e,
/* 0xBB */ dItemNo_Randomizer_TEMPLE_OF_TIME_MAP_e,
/* 0xBC */ dItemNo_Randomizer_CITY_MAP_e,
/* 0xBD */ dItemNo_Randomizer_PALACE_MAP_e,
/* 0xBE */ dItemNo_Randomizer_HYRULE_MAP_e,
/* 0xBF */ dItemNo_Randomizer_SACRED_GROVE_PORTAL_e,
/* 0xC0 */ dItemNo_Randomizer_M_BEETLE_e,
/* 0xC1 */ dItemNo_Randomizer_F_BEETLE_e,
/* 0xC2 */ dItemNo_Randomizer_M_BUTTERFLY_e,
/* 0xC3 */ dItemNo_Randomizer_F_BUTTERFLY_e,
/* 0xC4 */ dItemNo_Randomizer_M_STAG_BEETLE_e,
/* 0xC5 */ dItemNo_Randomizer_F_STAG_BEETLE_e,
/* 0xC6 */ dItemNo_Randomizer_M_GRASSHOPPER_e,
/* 0xC7 */ dItemNo_Randomizer_F_GRASSHOPPER_e,
/* 0xC8 */ dItemNo_Randomizer_M_NANAFUSHI_e,
/* 0xC9 */ dItemNo_Randomizer_F_NANAFUSHI_e,
/* 0xCA */ dItemNo_Randomizer_M_DANGOMUSHI_e,
/* 0xCB */ dItemNo_Randomizer_F_DANGOMUSHI_e,
/* 0xCC */ dItemNo_Randomizer_M_MANTIS_e,
/* 0xCD */ dItemNo_Randomizer_F_MANTIS_e,
/* 0xCE */ dItemNo_Randomizer_M_LADYBUG_e,
/* 0xCF */ dItemNo_Randomizer_F_LADYBUG_e,
/* 0xD0 */ dItemNo_Randomizer_M_SNAIL_e,
/* 0xD1 */ dItemNo_Randomizer_F_SNAIL_e,
/* 0xD2 */ dItemNo_Randomizer_M_DRAGONFLY_e,
/* 0xD3 */ dItemNo_Randomizer_F_DRAGONFLY_e,
/* 0xD4 */ dItemNo_Randomizer_M_ANT_e,
/* 0xD5 */ dItemNo_Randomizer_F_ANT_e,
/* 0xD6 */ dItemNo_Randomizer_M_MAYFLY_e,
/* 0xD7 */ dItemNo_Randomizer_F_MAYFLY_e,
/* 0xD8 */ dItemNo_Randomizer_FUSED_SHADOW_1_e,
/* 0xD9 */ dItemNo_Randomizer_FUSED_SHADOW_2_e,
/* 0xDA */ dItemNo_Randomizer_FUSED_SHADOW_3_e,
/* 0xDB */ dItemNo_Randomizer_MIRROR_PIECE_1_e,
/* 0xDC */ dItemNo_Randomizer_ARCHIPELAGO_ITEM_e,
/* 0xDD */ dItemNo_Randomizer_NOENTRY_221_e,
/* 0xDE */ dItemNo_Randomizer_NOENTRY_222_e,
/* 0xDF */ dItemNo_Randomizer_NOENTRY_223_e,
/* 0xE0 */ dItemNo_Randomizer_POU_SPIRIT_e,
/* 0xE1 */ dItemNo_Randomizer_ENDING_BLOW_e,
/* 0xE2 */ dItemNo_Randomizer_SHIELD_ATTACK_e,
/* 0xE3 */ dItemNo_Randomizer_BACK_SLICE_e,
/* 0xE4 */ dItemNo_Randomizer_HELM_SPLITTER_e,
/* 0xE5 */ dItemNo_Randomizer_MORTAL_DRAW_e,
/* 0xE6 */ dItemNo_Randomizer_JUMP_STRIKE_e,
/* 0xE7 */ dItemNo_Randomizer_GREAT_SPIN_e,
/* 0xE8 */ dItemNo_Randomizer_ELDIN_BRIDGE_PORTAL_e,
/* 0xE9 */ dItemNo_Randomizer_ANCIENT_DOCUMENT_e,
/* 0xEA */ dItemNo_Randomizer_AIR_LETTER_e,
/* 0xEB */ dItemNo_Randomizer_ANCIENT_DOCUMENT2_e,
/* 0xEC */ dItemNo_Randomizer_LV7_DUNGEON_EXIT_e,
/* 0xED */ dItemNo_Randomizer_LINKS_SAVINGS_e,
/* 0xEE */ dItemNo_Randomizer_SMALL_KEY2_e,
/* 0xEF */ dItemNo_Randomizer_POU_FIRE1_e,
/* 0xF0 */ dItemNo_Randomizer_POU_FIRE2_e,
/* 0xF1 */ dItemNo_Randomizer_POU_FIRE3_e,
/* 0xF2 */ dItemNo_Randomizer_POU_FIRE4_e,
/* 0xF3 */ dItemNo_Randomizer_BOSSRIDER_KEY_e,
/* 0xF4 */ dItemNo_Randomizer_TOMATO_PUREE_e,
/* 0xF5 */ dItemNo_Randomizer_TASTE_e,
/* 0xF6 */ dItemNo_Randomizer_LV5_BOSS_KEY_e,
/* 0xF7 */ dItemNo_Randomizer_SURFBOARD_e,
/* 0xF8 */ dItemNo_Randomizer_KANTERA2_e,
/* 0xF9 */ dItemNo_Randomizer_L2_KEY_PIECES1_e,
/* 0xFA */ dItemNo_Randomizer_L2_KEY_PIECES2_e,
/* 0xFB */ dItemNo_Randomizer_L2_KEY_PIECES3_e,
/* 0xFC */ dItemNo_Randomizer_KEY_OF_CARAVAN_e,
/* 0xFD */ dItemNo_Randomizer_LV2_BOSS_KEY_e,
/* 0xFE */ dItemNo_Randomizer_KEY_OF_FILONE_e,
/* 0xFF */ dItemNo_Randomizer_NONE_e,
};
#endif
#endif /* D_D_ITEM_DATA_H */ #endif /* D_D_ITEM_DATA_H */
+1 -1
View File
@@ -259,7 +259,7 @@ public:
/* 0x09B8 */ DUNGEON_LIGHT dungeonlight[8]; /* 0x09B8 */ DUNGEON_LIGHT dungeonlight[8];
/* 0x0C18 */ BOSS_LIGHT field_0x0c18[8]; /* 0x0C18 */ BOSS_LIGHT field_0x0c18[8];
/* 0x0D58 */ BOSS_LIGHT field_0x0d58[6]; /* 0x0D58 */ BOSS_LIGHT field_0x0d58[6];
#if DEBUG #if PARTIAL_DEBUG || DEBUG
/* 0x0E48 */ NAVYCHAN navy; /* 0x0E48 */ NAVYCHAN navy;
/* 0x0E58 */ u8 field_0xe58[0xE68 - 0xE58]; // part of NAVYCHAN? /* 0x0E58 */ u8 field_0xe58[0xE68 - 0xE58]; // part of NAVYCHAN?
#endif #endif
-2
View File
@@ -75,7 +75,6 @@ public:
bool dpdMove(); bool dpdMove();
u8 openExplain(u8); u8 openExplain(u8);
#if TARGET_PC #if TARGET_PC
void updateSlotImage(u8 slot);
bool pointerMove(); bool pointerMove();
#endif #endif
@@ -220,7 +219,6 @@ private:
bool mCursorInterpCurrAngular; bool mCursorInterpCurrAngular;
bool mCursorInterpInit; bool mCursorInterpInit;
bool mPointerTouchPressHoveredCurrent; bool mPointerTouchPressHoveredCurrent;
J2DPicture* mDpadIcon;
#endif #endif
}; };
+1 -3
View File
@@ -129,9 +129,7 @@ public:
bool getPlayerSubject(); bool getPlayerSubject();
bool isBButtonShow(bool); bool isBButtonShow(bool);
s16 getButtonTimer(); s16 getButtonTimer();
#if TARGET_PC
f32 getZButtonAlpha() { return mButtonZAlpha;}
#endif
virtual ~dMeter2Draw_c(); virtual ~dMeter2Draw_c();
J2DScreen* getMainScreenPtr() { return mpScreen; } J2DScreen* getMainScreenPtr() { return mpScreen; }
+2 -20
View File
@@ -58,9 +58,6 @@ public:
int checkEventRender(int*, int*, int*, int*); int checkEventRender(int*, int*, int*, int*);
void remove(); void remove();
u16 getEventId(int*); u16 getEventId(int*);
#if TARGET_PC
u16 getEventId();
#endif
u32 getMsgNo(); u32 getMsgNo();
u32 getNowMsgNo(); u32 getNowMsgNo();
msg_class* getMsg(); msg_class* getMsg();
@@ -131,9 +128,6 @@ public:
u16 query051(mesg_flow_node_branch*, fopAc_ac_c*, int); u16 query051(mesg_flow_node_branch*, fopAc_ac_c*, int);
u16 query052(mesg_flow_node_branch*, fopAc_ac_c*, int); u16 query052(mesg_flow_node_branch*, fopAc_ac_c*, int);
u16 query053(mesg_flow_node_branch*, fopAc_ac_c*, int); u16 query053(mesg_flow_node_branch*, fopAc_ac_c*, int);
#if TARGET_PC
u16 query054(mesg_flow_node_branch*, fopAc_ac_c*, int);
#endif
int event000(mesg_flow_node_event*, fopAc_ac_c*); int event000(mesg_flow_node_event*, fopAc_ac_c*);
int event001(mesg_flow_node_event*, fopAc_ac_c*); int event001(mesg_flow_node_event*, fopAc_ac_c*);
int event002(mesg_flow_node_event*, fopAc_ac_c*); int event002(mesg_flow_node_event*, fopAc_ac_c*);
@@ -177,11 +171,6 @@ public:
int event040(mesg_flow_node_event*, fopAc_ac_c*); int event040(mesg_flow_node_event*, fopAc_ac_c*);
int event041(mesg_flow_node_event*, fopAc_ac_c*); int event041(mesg_flow_node_event*, fopAc_ac_c*);
int event042(mesg_flow_node_event*, fopAc_ac_c*); int event042(mesg_flow_node_event*, fopAc_ac_c*);
#if TARGET_PC
// events for rando
int event043(mesg_flow_node_event*, fopAc_ac_c*);
int event044(mesg_flow_node_event*, fopAc_ac_c*);
#endif
void initWord(fopAc_ac_c*, const char*, u8, int, fopAc_ac_c**); void initWord(fopAc_ac_c*, const char*, u8, int, fopAc_ac_c**);
@@ -196,15 +185,8 @@ public:
void setMsg(u32 msg) { mMsg = msg; } void setMsg(u32 msg) { mMsg = msg; }
bool checkEndFlow() { return (u32)field_0x26 == 1; } bool checkEndFlow() { return (u32)field_0x26 == 1; }
static queryFunc mQueryList[DUSK_IF_ELSE(54, 53)]; static queryFunc mQueryList[53];
static eventFunc mEventList[DUSK_IF_ELSE(45, 43)]; static eventFunc mEventList[43];
#if TARGET_PC
// patch funcs for rando
void randoPatchNodeType(u8& type, u16 nodeIdx);
void randoPatchBranchNode(mesg_flow_node_branch*& branch_node, u16 nodeIdx);
void randoPatchEventNode(mesg_flow_node_event*& event_node, u16 nodeIdx);
#endif
private: private:
/* 0x04 */ u8* mFlow_p; /* 0x04 */ u8* mFlow_p;
+2 -2
View File
@@ -521,13 +521,13 @@ private:
/* 0x019 */ u8 field_0x19; /* 0x019 */ u8 field_0x19;
/* 0x01A */ u8 field_0x1a; /* 0x01A */ u8 field_0x1a;
/* 0x01B */ u8 field_0x1b; /* 0x01B */ u8 field_0x1b;
#if DEBUG #if PARTIAL_DEBUG || DEBUG
/* 0x01C */ dPa_simpleEcallBack field_0x1c[48]; /* 0x01C */ dPa_simpleEcallBack field_0x1c[48];
#else #else
/* 0x01C */ dPa_simpleEcallBack field_0x1c[25]; /* 0x01C */ dPa_simpleEcallBack field_0x1c[25];
#endif #endif
/* 0x210 */ level_c field_0x210; /* 0x210 */ level_c field_0x210;
#if DEBUG #if PARTIAL_DEBUG || DEBUG
u8 mSceneCount; u8 mSceneCount;
#endif #endif
}; };
+1 -1
View File
@@ -59,7 +59,7 @@ private:
/* 0x18 */ JKRHeap* heap; /* 0x18 */ JKRHeap* heap;
/* 0x1C */ JKRSolidHeap* mDataHeap; /* 0x1C */ JKRSolidHeap* mDataHeap;
/* 0x20 */ void** mRes; /* 0x20 */ void** mRes;
#if DEBUG #if PARTIAL_DEBUG || DEBUG
/* 0x24 */ int mSize; /* 0x24 */ int mSize;
#endif #endif
}; // Size: 0x24 }; // Size: 0x24
+4 -37
View File
@@ -10,10 +10,6 @@
#include "JSystem/JHostIO/JORReflexible.h" #include "JSystem/JHostIO/JORReflexible.h"
#include "dusk/endian.h" #include "dusk/endian.h"
#if TARGET_PC
#include <unordered_map>
#endif
static const int DEFAULT_SELECT_ITEM_INDEX = 0; static const int DEFAULT_SELECT_ITEM_INDEX = 0;
static const int MAX_SELECT_ITEM = 4; static const int MAX_SELECT_ITEM = 4;
static const int SELECT_ITEM_NUM = 2; static const int SELECT_ITEM_NUM = 2;
@@ -203,9 +199,6 @@ public:
void setTime(f32 i_time) { mTime = i_time; } void setTime(f32 i_time) { mTime = i_time; }
u16 getDate() const { return mDate; } u16 getDate() const { return mDate; }
void setDate(u16 i_date) { mDate = i_date; } void setDate(u16 i_date) { mDate = i_date; }
#if TARGET_PC
u8 getDarkClearLV() const { return mDarkClearLevelFlag; }
#endif
/* 0x00 */ BE(OSTime) mDateIpl; /* 0x00 */ BE(OSTime) mDateIpl;
/* 0x08 */ u8 mTransformLevelFlag; /* 0x08 */ u8 mTransformLevelFlag;
@@ -279,9 +272,6 @@ public:
bool isFieldDataExistFlag() const { return mFieldDataExistFlag ? true : false; } bool isFieldDataExistFlag() const { return mFieldDataExistFlag ? true : false; }
void offFieldDataExistFlag() { mFieldDataExistFlag = false; } void offFieldDataExistFlag() { mFieldDataExistFlag = false; }
void onFieldDataExistFlag() { mFieldDataExistFlag = true; } void onFieldDataExistFlag() { mFieldDataExistFlag = true; }
#if TARGET_PC
void setRegionBit(u8 region) { mRegion |= region;}
#endif
#if TARGET_PC #if TARGET_PC
/* 0x00 */ BE(Vec) mPos; /* 0x00 */ BE(Vec) mPos;
@@ -386,21 +376,12 @@ public:
void setArrowNum(u8 i_num) { mArrowNum = i_num; } void setArrowNum(u8 i_num) { mArrowNum = i_num; }
u8 getPachinkoNum() const { return mPachinkoNum; } u8 getPachinkoNum() const { return mPachinkoNum; }
void setPachinkoNum(u8 i_num) { mPachinkoNum = i_num; } void setPachinkoNum(u8 i_num) { mPachinkoNum = i_num; }
#if TARGET_PC
u8 getAncientDocumentNum() const { return mAncientDocumentNum; }
void setAncientDocumentNum(u8 i_num) { mAncientDocumentNum = i_num; }
#endif
/* 0x0 */ u8 mArrowNum; /* 0x0 */ u8 mArrowNum;
/* 0x1 */ u8 mBombNum[3]; /* 0x1 */ u8 mBombNum[3];
/* 0x4 */ u8 mBottleNum[4]; /* 0x4 */ u8 mBottleNum[4];
/* 0x8 */ u8 mPachinkoNum; /* 0x8 */ u8 mPachinkoNum;
#if TARGET_PC
/* 0x9 */ u8 mAncientDocumentNum; // Custom Field for Randomizer
/* 0x9 */ u8 unk5[2];
#else
/* 0x9 */ u8 unk5[3]; /* 0x9 */ u8 unk5[3];
#endif
}; // Size: 0xC }; // Size: 0xC
class dSv_player_item_max_c { class dSv_player_item_max_c {
@@ -432,11 +413,7 @@ public:
u8 getPohNum() const { return mPohNum; } u8 getPohNum() const { return mPohNum; }
void addPohNum() { void addPohNum() {
#if TARGET_PC
if (mPohNum < 0x3D) {
#else
if (mPohNum < 0xFF) { if (mPohNum < 0xFF) {
#endif
mPohNum++; mPohNum++;
} }
} }
@@ -481,11 +458,6 @@ public:
int isLetterReadFlag(int i_no) const; int isLetterReadFlag(int i_no) const;
u8 getGetNumber(int i_no) { return mGetNumber[i_no]; } u8 getGetNumber(int i_no) { return mGetNumber[i_no]; }
void setGetNumber(int i_no, u8 i_value) { mGetNumber[i_no] = i_value; } void setGetNumber(int i_no, u8 i_value) { mGetNumber[i_no] = i_value; }
#if TARGET_PC
// For rando
void setAllLetterGet() { mLetterGetFlags[0] |= 0xFFFF;}
void setAllLetterRead() { mLetterReadFlags[0] |= 0xFFFF;}
#endif
/* 0x00 */ BE(u32) mLetterGetFlags[2]; /* 0x00 */ BE(u32) mLetterGetFlags[2];
/* 0x08 */ BE(u32) mLetterReadFlags[2]; /* 0x08 */ BE(u32) mLetterReadFlags[2];
@@ -692,14 +664,10 @@ public:
void onDungeonItemBossKey() { onDungeonItem(BOSS_KEY); } void onDungeonItemBossKey() { onDungeonItem(BOSS_KEY); }
void offDungeonItemBossKey() { offDungeonItem(BOSS_KEY); } void offDungeonItemBossKey() { offDungeonItem(BOSS_KEY); }
s32 isDungeonItemBossKey() const { return isDungeonItem(BOSS_KEY); } s32 isDungeonItemBossKey() const { return isDungeonItem(BOSS_KEY); }
#if TARGET_PC
void onStageBossEnemy();
#else
void onStageBossEnemy() { void onStageBossEnemy() {
onDungeonItem(STAGE_BOSS_ENEMY); onDungeonItem(STAGE_BOSS_ENEMY);
onDungeonItem(OOCCOO_NOTE); onDungeonItem(OOCCOO_NOTE);
} }
#endif
void offStageBossEnemy() { offDungeonItem(STAGE_BOSS_ENEMY); } void offStageBossEnemy() { offDungeonItem(STAGE_BOSS_ENEMY); }
s32 isStageBossEnemy() const { return isDungeonItem(STAGE_BOSS_ENEMY); } s32 isStageBossEnemy() const { return isDungeonItem(STAGE_BOSS_ENEMY); }
void onStageLife() { onDungeonItem(STAGE_LIFE); } void onStageLife() { onDungeonItem(STAGE_LIFE); }
@@ -980,7 +948,6 @@ public:
/* 0x8 */ s8 m_no; /* 0x8 */ s8 m_no;
}; };
class dSv_info_c { class dSv_info_c {
public: public:
void init(); void init();
@@ -993,9 +960,6 @@ public:
BOOL isSwitch(int i_no, int i_roomNo) const; BOOL isSwitch(int i_no, int i_roomNo) const;
BOOL revSwitch(int i_no, int i_roomNo); BOOL revSwitch(int i_no, int i_roomNo);
void onItem(int i_no, int i_roomNo); void onItem(int i_no, int i_roomNo);
#if TARGET_PC
void offItem(int i_no, int i_roomNo);
#endif
BOOL isItem(int i_no, int i_roomNo) const; BOOL isItem(int i_no, int i_roomNo) const;
void onActor(int i_no, int i_roomNo); void onActor(int i_no, int i_roomNo);
void offActor(int i_no, int i_roomNo); void offActor(int i_no, int i_roomNo);
@@ -1044,7 +1008,7 @@ public:
static const int ZONE_MAX = 0x20; static const int ZONE_MAX = 0x20;
#if DEBUG #if PARTIAL_DEBUG || DEBUG
/* 0x000 */ u8 unk_0x0; /* 0x000 */ u8 unk_0x0;
/* 0x001 */ char unk_0x1; /* 0x001 */ char unk_0x1;
/* 0x000 */ u8 unk_0x2[0x48 - 0x2]; /* 0x000 */ u8 unk_0x2[0x48 - 0x2];
@@ -1065,6 +1029,9 @@ public:
/* 0xF30 */ s64 mSaveTotalTime; /* 0xF30 */ s64 mSaveTotalTime;
#if DEBUG #if DEBUG
/* 0xF80 */ flagFile_c mFlagFile; /* 0xF80 */ flagFile_c mFlagFile;
#elif PARTIAL_DEBUG
// flagFile_c's ctor/virtuals are only defined under #if DEBUG (d_save.cpp)
alignas(flagFile_c) u8 mFlagFile[sizeof(flagFile_c)];
#endif #endif
}; // Size: 0xF38 }; // Size: 0xF38
+4 -7
View File
@@ -538,7 +538,7 @@ public:
/* vt[86] */ virtual stage_tgsc_class* getDrTg(void) const = 0; /* vt[86] */ virtual stage_tgsc_class* getDrTg(void) const = 0;
/* vt[87] */ virtual void setDoor(stage_tgsc_class*) = 0; /* vt[87] */ virtual void setDoor(stage_tgsc_class*) = 0;
/* vt[88] */ virtual stage_tgsc_class* getDoor(void) const = 0; /* vt[88] */ virtual stage_tgsc_class* getDoor(void) const = 0;
#if DEBUG #if PARTIAL_DEBUG || DEBUG
virtual void setUnit(void*) = 0; virtual void setUnit(void*) = 0;
virtual void* getUnit() = 0; virtual void* getUnit() = 0;
#endif #endif
@@ -796,7 +796,7 @@ public:
virtual stage_tgsc_class* getDrTg(void) const { return mDrTg; } virtual stage_tgsc_class* getDrTg(void) const { return mDrTg; }
virtual void setDoor(stage_tgsc_class* i_Door) { mDoor = i_Door; } virtual void setDoor(stage_tgsc_class* i_Door) { mDoor = i_Door; }
virtual stage_tgsc_class* getDoor(void) const { return mDoor; } virtual stage_tgsc_class* getDoor(void) const { return mDoor; }
#if DEBUG #if PARTIAL_DEBUG || DEBUG
virtual void setUnit(void* i_Unit) { mUnit = i_Unit; } virtual void setUnit(void* i_Unit) { mUnit = i_Unit; }
virtual void* getUnit() { return mUnit; } virtual void* getUnit() { return mUnit; }
#endif #endif
@@ -845,7 +845,7 @@ public:
/* 0x54 */ stage_tgsc_class* mDrTg; /* 0x54 */ stage_tgsc_class* mDrTg;
/* 0x58 */ stage_tgsc_class* mDoor; /* 0x58 */ stage_tgsc_class* mDoor;
/* 0x5C */ dStage_FloorInfo_c* mFloorInfo; /* 0x5C */ dStage_FloorInfo_c* mFloorInfo;
#if DEBUG #if PARTIAL_DEBUG || DEBUG
/* 0x60 */ void* mUnit; /* 0x60 */ void* mUnit;
#endif #endif
/* 0x60 */ u16 mPlayerNum; /* 0x60 */ u16 mPlayerNum;
@@ -990,7 +990,7 @@ public:
/* vt[86] */ virtual stage_tgsc_class* getDrTg(void) const { return mDrTg; } /* vt[86] */ virtual stage_tgsc_class* getDrTg(void) const { return mDrTg; }
/* vt[87] */ virtual void setDoor(stage_tgsc_class* i_Door) { mDoor = i_Door; } /* vt[87] */ virtual void setDoor(stage_tgsc_class* i_Door) { mDoor = i_Door; }
/* vt[88] */ virtual stage_tgsc_class* getDoor(void) const { return mDoor; } /* vt[88] */ virtual stage_tgsc_class* getDoor(void) const { return mDoor; }
#if DEBUG #if PARTIAL_DEBUG || DEBUG
virtual void setUnit(void* i_Unit) { virtual void setUnit(void* i_Unit) {
UNUSED(i_Unit); UNUSED(i_Unit);
OSReport("stage non unit list data !!\n"); OSReport("stage non unit list data !!\n");
@@ -1292,9 +1292,6 @@ public:
void set(const char*, s8, s16, s8, s8, u8); void set(const char*, s8, s16, s8, s8, u8);
void offEnable() { enabled = 0; } void offEnable() { enabled = 0; }
BOOL isEnable() const { return enabled; } BOOL isEnable() const { return enabled; }
#if TARGET_PC
void setEnable() { enabled |= 0x1; }
#endif
s8 getWipe() const { return wipe; } s8 getWipe() const { return wipe; }
u8 getWipeSpeed() const { return wipe_speed; } u8 getWipeSpeed() const { return wipe_speed; }
dStage_startStage_c* getStartStage() { return this; } dStage_startStage_c* getStartStage() { return this; }
+3
View File
@@ -97,6 +97,9 @@ public:
private: private:
#if DEBUG #if DEBUG
/* 0x00 */ dVibTest_c mVibTest; /* 0x00 */ dVibTest_c mVibTest;
#elif PARTIAL_DEBUG
// dVibTest_c's ctor/virtuals are only defined under #if DEBUG (d_vibration.cpp)
alignas(dVibTest_c) u8 mVibTest[sizeof(dVibTest_c)];
#endif #endif
class { class {
+70 -7
View File
@@ -1,9 +1,11 @@
#ifndef DUSK_CONFIG_HPP #ifndef DUSK_CONFIG_HPP
#define DUSK_CONFIG_HPP #define DUSK_CONFIG_HPP
#include <concepts>
#include <functional> #include <functional>
#include <nlohmann/json.hpp>
#include <stdexcept> #include <stdexcept>
#include "nlohmann/json.hpp"
#include "config_var.hpp" #include "config_var.hpp"
namespace dusk::config { namespace dusk::config {
@@ -40,7 +42,7 @@ public:
[[nodiscard]] virtual nlohmann::json dumpToJson(const ConfigVarBase& cVar) const = 0; [[nodiscard]] virtual nlohmann::json dumpToJson(const ConfigVarBase& cVar) const = 0;
}; };
template<ConfigValue T> template <ConfigValue T>
class ConfigImpl : public ConfigImplBase { class ConfigImpl : public ConfigImplBase {
// Just downcasting the references... // Just downcasting the references...
void loadFromJson(ConfigVarBase& cVar, const nlohmann::json& jsonValue) const final { void loadFromJson(ConfigVarBase& cVar, const nlohmann::json& jsonValue) const final {
@@ -90,20 +92,28 @@ public:
void Register(ConfigVarBase& configVar); void Register(ConfigVarBase& configVar);
/** /**
* \brief Indicate that all registrations have happened and everything should lock in. * \brief Unregister a CVar, detaching it from the config system.
*
* If the CVar carries a user-set value (Value or Speedrun layer), it is stashed as an
* unregistered key: Save() keeps writing it, and a later Register() of the same name restores
* it through the normal back-fill path. The CVar may be destroyed after this returns.
*/ */
void FinishRegistration(); void unregister(ConfigVarBase& configVar);
/** /**
* \brief Load config from the standard user preferences location. * \brief Load config from the standard user preferences location.
*/ */
void LoadFromUserPreferences(); void load_from_user_preferences();
void LoadFromFileName(const char* path); void load_from_file_name(const char* path);
void load_arg_override(std::string_view name, std::string_view value);
void shutdown();
/** /**
* \brief Save the config to file. * \brief Save the config to file.
*/ */
void Save(); void save();
/** /**
* \brief Get a registered CVar by name. * \brief Get a registered CVar by name.
@@ -124,6 +134,59 @@ void ClearAllActionBindings(int port);
*/ */
void EnumerateRegistered(std::function<void(ConfigVarBase&)> callback); void EnumerateRegistered(std::function<void(ConfigVarBase&)> callback);
/**
* \brief Type-erased change callback. previousValue points at the value before the mutation
* (a `const T*` for a `ConfigVar<T>`) and is valid only for the duration of the call.
*/
using ChangeCallback = std::function<void(ConfigVarBase& cVar, const void* previousValue)>;
/**
* \brief Token identifying a change subscription. 0 is never a valid token.
*/
using Subscription = u64;
/**
* \brief Subscribe to changes of the named CVar (registered or not yet registered).
*
* Fired synchronously on the mutating thread (in practice the game thread) whenever the CVar's
* effective value changes at runtime: setValue, override/speedrun setters and clears. Values
* applied by config load or launch arguments do *not* notify: loads happen during startup
* before the subsystems callbacks push values into are initialized, and each subsystem reads
* its initial value itself at its own init. Callbacks may mutate other CVars; a nested
* mutation of the same CVar applies but does not re-notify.
*/
Subscription subscribe(std::string_view name, ChangeCallback callback);
/**
* \brief Typed convenience overload: the callback receives the current and previous values.
*/
template <ConfigValue T, typename Callback>
requires std::invocable<Callback, const T&, const T&> Subscription subscribe(
ConfigVar<T>& cVar, Callback&& callback) {
return subscribe(cVar.getName(),
[&cVar, cb = std::forward<Callback>(callback)](ConfigVarBase&, const void* previousValue) {
cb(cVar.getValue(), *static_cast<const T*>(previousValue));
});
}
void unsubscribe(Subscription token);
/**
* \brief Register a CVar and attach a change callback in one step.
*
* Useful for pushing settings into external systems (e.g. aurora) from one place instead of
* every UI setter. The callback fires only for runtime changes (see subscribe); the value
* loaded from config or launch arguments does not fire it the external system reads its
* initial value itself at its own initialization.
*/
template <ConfigValue T, typename Callback>
requires std::invocable<Callback, const T&, const T&> Subscription Register(
ConfigVar<T>& cVar, Callback&& onChange) {
auto subscription = subscribe(cVar, std::forward<Callback>(onChange));
Register(static_cast<ConfigVarBase&>(cVar));
return subscription;
}
template <ConfigValue T> template <ConfigValue T>
const ConfigImplBase* GetConfigImpl() { const ConfigImplBase* GetConfigImpl() {
static ConfigImpl<T> config; static ConfigImpl<T> config;
+82 -6
View File
@@ -2,10 +2,12 @@
#define DUSK_CONFIG_VAR_HPP #define DUSK_CONFIG_VAR_HPP
#include "dolphin/types.h" #include "dolphin/types.h"
#include <type_traits> #include <concepts>
#include <cstdlib> #include <cstdlib>
#include <limits> #include <limits>
#include <optional>
#include <string> #include <string>
#include <type_traits>
/** /**
* The configuration system. * The configuration system.
@@ -69,7 +71,7 @@ protected:
/** /**
* The name of this CVar, used in the configuration file. * The name of this CVar, used in the configuration file.
*/ */
const char* name; std::string name;
/** /**
* Whether this CVar has been registered with the global managing logic. * Whether this CVar has been registered with the global managing logic.
@@ -87,8 +89,8 @@ protected:
*/ */
const ConfigImplBase* impl; const ConfigImplBase* impl;
ConfigVarBase(const char* name, const ConfigImplBase* impl); ConfigVarBase(const ConfigVarBase&) = delete;
virtual ~ConfigVarBase() = default; ConfigVarBase(std::string name, const ConfigImplBase* impl);
/** /**
* Check that the CVar is registered, aborting if this is not the case. * Check that the CVar is registered, aborting if this is not the case.
@@ -98,7 +100,22 @@ protected:
abort(); abort();
} }
/**
* Whether any change subscriber (see config::subscribe) is attached to this CVar's name.
*/
[[nodiscard]] bool has_subscribers() const;
/**
* Notify change subscribers (see config::subscribe) that the effective value of this CVar
* changed. Called by mutators after the change has been applied; previousValue points at
* the old value (a `const T*` for a `ConfigVar<T>`), valid only for the duration of the
* call.
*/
void notify_changed(const void* previousValue);
public: public:
virtual ~ConfigVarBase();
/** /**
* Get the name of this CVar, used in the configuration file. * Get the name of this CVar, used in the configuration file.
*/ */
@@ -121,6 +138,7 @@ public:
* This is necessary to make it legal to access. * This is necessary to make it legal to access.
*/ */
void markRegistered(); void markRegistered();
void unmarkRegistered();
/** /**
* Clear a speedrun-mode override if one is active on this CVar. * Clear a speedrun-mode override if one is active on this CVar.
@@ -155,6 +173,7 @@ template <typename T>
concept ConfigValue = concept ConfigValue =
!std::is_const_v<T> !std::is_const_v<T>
&& !std::is_volatile_v<T> && !std::is_volatile_v<T>
&& std::equality_comparable<T>
&& (std::is_same_v<T, bool> && (std::is_same_v<T, bool>
|| ConfigValueInteger<T> || ConfigValueInteger<T>
|| std::is_same_v<T, f32> || std::is_same_v<T, f32>
@@ -166,6 +185,9 @@ concept ConfigValue =
template <ConfigValue T> template <ConfigValue T>
const ConfigImplBase* GetConfigImpl(); const ConfigImplBase* GetConfigImpl();
template <ConfigValue T>
class ConfigImpl;
template <typename T> template <typename T>
struct ConfigEnumRange { struct ConfigEnumRange {
static constexpr auto min = std::numeric_limits<std::underlying_type_t<T>>::min(); static constexpr auto min = std::numeric_limits<std::underlying_type_t<T>>::min();
@@ -192,10 +214,12 @@ public:
* @param arg Arguments to forward to construct the default value. * @param arg Arguments to forward to construct the default value.
*/ */
template <typename... Args> template <typename... Args>
ConfigVar(const char* name, Args&&... arg) ConfigVar(std::string name, Args&&... arg)
: ConfigVarBase(name, GetConfigImpl<T>()), defaultValue(std::forward<Args>(arg)...), : ConfigVarBase(std::move(name), GetConfigImpl<T>()), defaultValue(std::forward<Args>(arg)...),
value(), overrideValue() {} value(), overrideValue() {}
ConfigVar(ConfigVar const&) = delete;
/** /**
* \brief Get the current value of the CVar. * \brief Get the current value of the CVar.
* *
@@ -234,6 +258,7 @@ public:
*/ */
void setValue(T newValue, bool replaceOverride = true) { void setValue(T newValue, bool replaceOverride = true) {
checkRegistered(); checkRegistered();
const auto previous = previous_for_notify();
value = std::move(newValue); value = std::move(newValue);
if (replaceOverride) { if (replaceOverride) {
@@ -242,6 +267,7 @@ public:
} else if (layer != ConfigVarLayer::Override) { } else if (layer != ConfigVarLayer::Override) {
layer = ConfigVarLayer::Value; layer = ConfigVarLayer::Value;
} }
notify_if_changed(previous);
} }
operator const T&() { operator const T&() {
@@ -258,8 +284,10 @@ public:
*/ */
void setOverrideValue(T newValue) { void setOverrideValue(T newValue) {
checkRegistered(); checkRegistered();
const auto previous = previous_for_notify();
overrideValue = std::move(newValue); overrideValue = std::move(newValue);
layer = ConfigVarLayer::Override; layer = ConfigVarLayer::Override;
notify_if_changed(previous);
} }
/** /**
@@ -273,25 +301,31 @@ public:
void setSpeedrunValue(T newValue) { void setSpeedrunValue(T newValue) {
checkRegistered(); checkRegistered();
if (layer != ConfigVarLayer::Override) { if (layer != ConfigVarLayer::Override) {
const auto previous = previous_for_notify();
priorLayer = layer; priorLayer = layer;
overrideValue = std::move(newValue); overrideValue = std::move(newValue);
layer = ConfigVarLayer::Speedrun; layer = ConfigVarLayer::Speedrun;
notify_if_changed(previous);
} }
} }
void clearOverride() { void clearOverride() {
checkRegistered(); checkRegistered();
if (layer == ConfigVarLayer::Override) { if (layer == ConfigVarLayer::Override) {
const auto previous = previous_for_notify();
overrideValue = {}; overrideValue = {};
layer = ConfigVarLayer::Value; layer = ConfigVarLayer::Value;
notify_if_changed(previous);
} }
} }
void clearSpeedrunOverride() override { void clearSpeedrunOverride() override {
checkRegistered(); checkRegistered();
if (layer == ConfigVarLayer::Speedrun) { if (layer == ConfigVarLayer::Speedrun) {
const auto previous = previous_for_notify();
overrideValue = {}; overrideValue = {};
layer = priorLayer; layer = priorLayer;
notify_if_changed(previous);
} }
} }
@@ -305,6 +339,48 @@ public:
const ConfigVarLayer effectiveLayer = (layer == ConfigVarLayer::Speedrun) ? priorLayer : layer; const ConfigVarLayer effectiveLayer = (layer == ConfigVarLayer::Speedrun) ? priorLayer : layer;
return effectiveLayer == ConfigVarLayer::Default ? defaultValue : value; return effectiveLayer == ConfigVarLayer::Default ? defaultValue : value;
} }
private:
// The config loader applies values through the silent load_* methods below.
friend class ConfigImpl<T>;
/**
* Copy of the effective value before a mutation, taken only when someone is subscribed.
*/
[[nodiscard]] std::optional<T> previous_for_notify() const {
return has_subscribers() ? std::optional<T>{getValue()} : std::nullopt;
}
/**
* Notify subscribers if the effective value actually changed across a mutation.
*/
void notify_if_changed(const std::optional<T>& previous) {
if (previous.has_value() && !(getValue() == *previous)) {
notify_changed(&*previous);
}
}
/**
* setValue(newValue, false) without notifying change subscribers. Used when loading config:
* loads happen during startup before the subsystems change callbacks push values into are
* initialized, and each subsystem applies the loaded value itself at its own init.
*/
void load_value(T newValue) {
checkRegistered();
value = std::move(newValue);
if (layer != ConfigVarLayer::Override) {
layer = ConfigVarLayer::Value;
}
}
/**
* setOverrideValue without notifying change subscribers (see load_value).
*/
void load_override_value(T newValue) {
checkRegistered();
overrideValue = std::move(newValue);
layer = ConfigVarLayer::Override;
}
}; };
using ActionBindConfigVar = ConfigVar<int>; using ActionBindConfigVar = ConfigVar<int>;
+4 -4
View File
@@ -4,9 +4,9 @@
namespace dusk::mouse { namespace dusk::mouse {
void read(); void read();
void getAimDeltas(float& out_yaw, float& out_pitch); void get_aim_deltas(float& out_yaw, float& out_pitch);
void getCameraDeltas(float& out_yaw, float& out_pitch); void get_camera_deltas(float& out_yaw, float& out_pitch);
void handle_event(const SDL_Event& event) noexcept; void handle_event(const SDL_Event& event) noexcept;
void onFocusLost(); void on_focus_lost();
void onFocusGained(); void on_focus_gained();
} // namespace dusk::mouse } // namespace dusk::mouse
+2 -38
View File
@@ -7,7 +7,8 @@
namespace dusk { namespace dusk {
using namespace config; using config::ConfigVar;
using config::ActionBindConfigVar;
enum class BloomMode : int { enum class BloomMode : int {
Off = 0, Off = 0,
@@ -278,8 +279,6 @@ struct UserSettings {
ConfigVar<bool> liveSplitEnabled; ConfigVar<bool> liveSplitEnabled;
ConfigVar<bool> showSpeedrunRTATimer; ConfigVar<bool> showSpeedrunRTATimer;
ConfigVar<bool> recordingMode; ConfigVar<bool> recordingMode;
// Misc
ConfigVar<bool> removeQuestMapMarkers; ConfigVar<bool> removeQuestMapMarkers;
ConfigVar<bool> showInputViewer; ConfigVar<bool> showInputViewer;
ConfigVar<bool> showInputViewerGyro; ConfigVar<bool> showInputViewerGyro;
@@ -305,41 +304,6 @@ struct UserSettings {
std::array<ActionBindConfigVar, 4> openDusklightMenu; std::array<ActionBindConfigVar, 4> openDusklightMenu;
std::array<ActionBindConfigVar, 4> turboSpeedButton; std::array<ActionBindConfigVar, 4> turboSpeedButton;
} actionBindings; } actionBindings;
// Randomizer seed hashes, 1 per file
struct {
std::array<ConfigVar<std::string>, 3> seedHashes;
} randomizer;
// Archipelago Settings
struct {
std::array<ConfigVar<std::string>, 3> savesServerIP;
std::array<ConfigVar<std::string>, 3> savesServerPass;
std::array<ConfigVar<std::string>, 3> savesSlotName;
} archipelago;
// Cosmetics
struct {
ConfigVar<std::string> herosTunicCapColor;
ConfigVar<std::string> herosTunicTorsoColor;
ConfigVar<std::string> herosTunicSkirtColor;
ConfigVar<std::string> zoraArmorCapColor;
ConfigVar<std::string> zoraArmorHelmetColor;
ConfigVar<std::string> zoraArmorTorsoColor;
ConfigVar<std::string> zoraArmorScalesColor;
ConfigVar<std::string> zoraArmorFlippersColor;
ConfigVar<std::string> lanternGlowColor;
ConfigVar<std::string> woodenSwordColor;
ConfigVar<std::string> msBladeColor;
ConfigVar<std::string> msHandleColor;
ConfigVar<std::string> lightSwordGlowColor;
ConfigVar<std::string> boomerangColor;
ConfigVar<std::string> ironBootsColor;
ConfigVar<std::string> spinnerColor;
ConfigVar<std::string> linkHairColor;
ConfigVar<std::string> wolfLinkColor;
ConfigVar<std::string> eponaColor;
} cosmetics;
}; };
UserSettings& getSettings(); UserSettings& getSettings();
+1 -1
View File
@@ -36,7 +36,7 @@ typedef struct node_create_request {
/* 0x58 */ s16 name; /* 0x58 */ s16 name;
/* 0x5C */ void* data; /* 0x5C */ void* data;
/* 0x60 */ s16 unk_0x60; /* 0x60 */ s16 unk_0x60;
#if DEBUG #if PARTIAL_DEBUG || DEBUG
/* 0x64 */ int unk_0x64; /* 0x64 */ int unk_0x64;
/* 0x68 */ int unk_0x68; /* 0x68 */ int unk_0x68;
#endif #endif
+2 -5
View File
@@ -11,13 +11,13 @@ class mDoAud_zelAudio_c : public Z2AudioMgr {
public: public:
void reset(); void reset();
mDoAud_zelAudio_c() { mDoAud_zelAudio_c() {
#if DEBUG #if PARTIAL_DEBUG || DEBUG
setMode(2); setMode(2);
#endif #endif
} }
~mDoAud_zelAudio_c() {} ~mDoAud_zelAudio_c() {}
#if DEBUG #if PARTIAL_DEBUG || DEBUG
u8 getMode() { return field_0x13bd; } u8 getMode() { return field_0x13bd; }
void setMode(u8 mode) { field_0x13bd = mode; } void setMode(u8 mode) { field_0x13bd = mode; }
@@ -398,7 +398,4 @@ inline int mDoAud_monsSeStart(u32 i_soundId, const Vec* i_pos, u32 i_actorId, u3
0); 0);
} }
#if TARGET_PC
mDoAud_zelAudio_c& mDoAud_getZelAudio();
#endif
#endif /* M_DO_M_DO_AUDIO_H */ #endif /* M_DO_M_DO_AUDIO_H */
-4
View File
@@ -67,10 +67,6 @@ public:
JKRMemArchive* getArchive() const { return mArchive; } JKRMemArchive* getArchive() const { return mArchive; }
JKRHeap* getHeap() const { return mHeap; } JKRHeap* getHeap() const { return mHeap; }
#if TARGET_PC
s32 getEntryNumber() const { return mEntryNumber; }
#endif
private: private:
/* 0x14 */ u8 mMountDirection; /* 0x14 */ u8 mMountDirection;
+5
View File
@@ -35,6 +35,11 @@ public:
/* 0x4 */ s8 mNo; /* 0x4 */ s8 mNo;
/* 0x5 */ u8 mCount; /* 0x5 */ u8 mCount;
#else #else
#if PARTIAL_DEBUG
// Initialized here since the DEBUG ctor doesn't run.
/* 0x4 */ s8 mNo = -1;
/* 0x5 */ u8 mCount = 0;
#endif
virtual ~mDoHIO_entry_c() {} virtual ~mDoHIO_entry_c() {}
#endif #endif
}; };
@@ -154,18 +154,6 @@ public:
return (J2DTextBoxHBinding)((mFlags >> 2) & 3); return (J2DTextBoxHBinding)((mFlags >> 2) & 3);
} }
#if TARGET_PC
void setVBinding(J2DTextBoxVBinding vBinding) {
mFlags &= 0b1100;
mFlags |= (vBinding & 3);
}
void setHBinding(J2DTextBoxHBinding hBinding) {
mFlags &= 0b0011;
mFlags |= ((hBinding & 3) << 2);
}
#endif
JUtility::TColor getCharColor() { return mCharColor; } JUtility::TColor getCharColor() { return mCharColor; }
JUtility::TColor getGradColor() { return mGradientColor; } JUtility::TColor getGradColor() { return mGradientColor; }
u16 getStringAllocByte() const { return mStringLength; } u16 getStringAllocByte() const { return mStringLength; }
@@ -12,12 +12,23 @@ struct JORNodeEvent;
class JORMContext; class JORMContext;
class JORServer; class JORServer;
// NOTE (stable game ABI): these classes stay non-polymorphic outside DEBUG
// on purpose. Making them polymorphic under PARTIAL_DEBUG would give every one of the ~250
// derived HIO classes a vptr and turn their plain `void genMessage(JORMContext*);`
// declarations into implicit virtual overrides whose definitions are #if DEBUG-gated; every
// instantiated one then fails to link (missing vtable). Closure types shared with DEBUG TUs
// either declare their own unconditional virtuals (vptr in all TUs anyway) or add a
// PARTIAL_DEBUG-only virtual dtor for vptr parity (see dAttParam_c).
class JOREventListener { class JOREventListener {
public: public:
#if DEBUG #if DEBUG
JOREventListener() {} JOREventListener() {}
#if TARGET_PC
virtual void listenPropertyEvent(const JORPropertyEvent*) {}
#else
virtual void listenPropertyEvent(const JORPropertyEvent*) = 0; virtual void listenPropertyEvent(const JORPropertyEvent*) = 0;
#endif #endif
#endif
}; };
class JORReflexible : public JOREventListener { class JORReflexible : public JOREventListener {
@@ -30,7 +41,11 @@ public:
virtual void listenPropertyEvent(const JORPropertyEvent*); virtual void listenPropertyEvent(const JORPropertyEvent*);
virtual void listen(u32, const JOREvent*); virtual void listen(u32, const JOREvent*);
virtual void genObjectInfo(const JORGenEvent*); virtual void genObjectInfo(const JORGenEvent*);
#if TARGET_PC
virtual void genMessage(JORMContext*) {}
#else
virtual void genMessage(JORMContext*) = 0; virtual void genMessage(JORMContext*) = 0;
#endif
virtual void listenNodeEvent(const JORNodeEvent*); virtual void listenNodeEvent(const JORNodeEvent*);
#endif #endif
}; };
@@ -314,7 +314,7 @@ public:
> >
{ {
TIterator_data_(const TFunctionValue_list_parameter& rParent, const f32* value) { TIterator_data_(const TFunctionValue_list_parameter& rParent, const f32* value) {
#if DEBUG #if PARTIAL_DEBUG || DEBUG
pOwn_ = &rParent; pOwn_ = &rParent;
#endif #endif
pf_ = value; pf_ = value;
@@ -372,7 +372,7 @@ public:
return (r1.pf_ - r2.pf_) / suData_size; return (r1.pf_ - r2.pf_) / suData_size;
} }
#if DEBUG #if PARTIAL_DEBUG || DEBUG
/* 0x00 */ const TFunctionValue_list_parameter* pOwn_; /* 0x00 */ const TFunctionValue_list_parameter* pOwn_;
#endif #endif
/* 0x00 */ const f32* pf_; /* 0x00 */ const f32* pf_;
@@ -425,7 +425,7 @@ public:
> >
{ {
TIterator_data_(const TFunctionValue_hermite& rParent, const f32* value) { TIterator_data_(const TFunctionValue_hermite& rParent, const f32* value) {
#if DEBUG #if PARTIAL_DEBUG || DEBUG
pOwn_ = &rParent; pOwn_ = &rParent;
#endif #endif
pf_ = value; pf_ = value;
@@ -491,7 +491,7 @@ public:
return (r1.pf_ - r2.pf_) / r1.uSize_; return (r1.pf_ - r2.pf_) / r1.uSize_;
} }
#if DEBUG #if PARTIAL_DEBUG || DEBUG
/* 0x00 */ const TFunctionValue_hermite* pOwn_; /* 0x00 */ const TFunctionValue_hermite* pOwn_;
/* 0x04 */ const f32* pf_; /* 0x04 */ const f32* pf_;
/* 0x08 */ u32 uSize_; /* 0x08 */ u32 uSize_;
-8
View File
@@ -7,10 +7,6 @@
#include "JSystem/JMessage/control.h" #include "JSystem/JMessage/control.h"
#if TARGET_PC
#include "dusk/randomizer/game/messages.hpp"
#endif
JMessage::TControl::TControl() JMessage::TControl::TControl()
: pSequenceProcessor_(NULL), : pSequenceProcessor_(NULL),
pRenderingProcessor_(NULL), pRenderingProcessor_(NULL),
@@ -94,10 +90,6 @@ bool JMessage::TControl::setMessageCode_inSequence_(JMessage::TProcessor const*
JUT_ASSERT(155, pResourceCache_!=NULL); JUT_ASSERT(155, pResourceCache_!=NULL);
pMessageText_begin_ = pResourceCache_->getMessageText_messageEntry(pEntry_); pMessageText_begin_ = pResourceCache_->getMessageText_messageEntry(pEntry_);
#if TARGET_PC
// Feels kinda hacky to have to hijack this deep into JSystem, but works for now
HandleTextOverrides(this, pProcessor, uMessageGroupID_, uMessageID_);
#endif
pMessageText_current_ = pMessageText_begin_; pMessageText_current_ = pMessageText_begin_;
oStack_renderingProcessor_.clear(); oStack_renderingProcessor_.clear();
return true; return true;
-25
View File
@@ -105,18 +105,6 @@ window content pane > * {
flex: 0 0 auto; flex: 0 0 auto;
} }
pane.excluded-locations-pane {
display: flex;
flex-flow: column;
flex: 1 1 0;
min-width: 0;
min-height: 0;
gap: 8dp;
overflow-y: scroll;
font-size: 20dp;
border-top: 1dp #92875B;
}
window content pane:last-of-type > div { window content pane:last-of-type > div {
line-height: 1.625; line-height: 1.625;
} }
@@ -490,7 +478,6 @@ window.modal.danger .modal-header icon {
font-size: 20dp; font-size: 20dp;
color: #FFFFFF; color: #FFFFFF;
font-weight: normal; font-weight: normal;
word-break: break-word;
} }
.modal-body span.tip { .modal-body span.tip {
@@ -532,15 +519,3 @@ progress.verification-progress-bar {
flex: 0 0 auto; flex: 0 0 auto;
padding-top: 4dp; padding-top: 4dp;
} }
.current-option-text {
padding-left: 5dp;
border: 2dp #C2A42D;
border-radius: 14dp;
}
.not-current-option-text {
padding-left: 5dp;
margin: 2dp; /*Used to mimic border*/
opacity: 0.5;
}
+7 -10
View File
@@ -1230,8 +1230,7 @@ void Z2SceneMgr::setSceneName(char* spot, s32 room, s32 layer) {
bgm_id = Z2BGM_DUNGEON_FOREST; bgm_id = Z2BGM_DUNGEON_FOREST;
bgm_wave1 = 0xa; bgm_wave1 = 0xa;
/* dSv_event_flag_c::M_022 - Forest Temple - Forest Temple clear (Midna creates warp hole) */ /* dSv_event_flag_c::M_022 - Forest Temple - Forest Temple clear (Midna creates warp hole) */
// In rando, check for boss defeated instead } else if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[55])) {
} else if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[55]) IF_DUSK(&& (!randomizer_IsActive() || dComIfGs_isStageBossEnemy()))) {
bgm_id = 0x200005b; bgm_id = 0x200005b;
} else { } else {
bgm_wave1 = 0xc; bgm_wave1 = 0xc;
@@ -1291,13 +1290,11 @@ void Z2SceneMgr::setSceneName(char* spot, s32 room, s32 layer) {
break; break;
case Z2SCENE_LAKEBED_TEMPLE_BOSS: case Z2SCENE_LAKEBED_TEMPLE_BOSS:
se_wave1 = 9; se_wave1 = 9;
// In rando, check for boss defeated instead if (dComIfGs_isStageSwitch(4, 0xe)) {
if (dComIfGs_isStageSwitch(4, 0xe) IF_DUSK(&& (!randomizer_IsActive() || dComIfGs_isStageBossEnemy()))) {
bgm_id = Z2BGM_DUNGEON_LV3; bgm_id = Z2BGM_DUNGEON_LV3;
bgm_wave1 = 0x15; bgm_wave1 = 0x15;
/* dSv_event_flag_c::M_045 - Lakebed Temple - Lakebed Temple clear */ /* dSv_event_flag_c::M_045 - Lakebed Temple - Lakebed Temple clear */
// In rando, check for boss defeated instead } else if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[78])) {
} else if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[78]) IF_DUSK(&& (!randomizer_IsActive() || dComIfGs_isStageBossEnemy()))) {
bgm_id = 0x200005b; bgm_id = 0x200005b;
} else { } else {
bgm_wave1 = 0x1e; bgm_wave1 = 0x1e;
@@ -1327,11 +1324,11 @@ void Z2SceneMgr::setSceneName(char* spot, s32 room, s32 layer) {
break; break;
case Z2SCENE_ARBITERS_GROUNDS_BOSS: case Z2SCENE_ARBITERS_GROUNDS_BOSS:
se_wave1 = 0xd; se_wave1 = 0xd;
if (dComIfGs_isStageSwitch(0xa, 0xa) IF_DUSK(&& (!randomizer_IsActive() || dComIfGs_isStageBossEnemy()))) { if (dComIfGs_isStageSwitch(0xa, 0xa)) {
bgm_id = Z2BGM_DUNGEON_LV4; bgm_id = Z2BGM_DUNGEON_LV4;
bgm_wave1 = 0x1a; bgm_wave1 = 0x1a;
/* dSv_event_flag_c::F_0265 - Arbiter's Grounds - Arbiter's Grounds clear */ /* dSv_event_flag_c::F_0265 - Arbiter's Grounds - Arbiter's Grounds clear */
} else if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[265]) IF_DUSK(&& (!randomizer_IsActive() || dComIfGs_isStageBossEnemy()))) { } else if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[265])) {
bgm_id = 0x200005b; bgm_id = 0x200005b;
} else { } else {
bgm_wave1 = 0x4c; bgm_wave1 = 0x4c;
@@ -1392,11 +1389,11 @@ void Z2SceneMgr::setSceneName(char* spot, s32 room, s32 layer) {
break; break;
case Z2SCENE_TEMPLE_OF_TIME_BOSS: case Z2SCENE_TEMPLE_OF_TIME_BOSS:
se_wave1 = 0x15; se_wave1 = 0x15;
if (dComIfGs_isStageSwitch(7, 0x18) IF_DUSK(&& (!randomizer_IsActive() || dComIfGs_isStageBossEnemy()))) { if (dComIfGs_isStageSwitch(7, 0x18)) {
bgm_id = Z2BGM_DUNGEON_LV6; bgm_id = Z2BGM_DUNGEON_LV6;
bgm_wave1 = 0x26; bgm_wave1 = 0x26;
/* dSv_event_flag_c::F_0267 - Temple of Time - Temple of Time clear */ /* dSv_event_flag_c::F_0267 - Temple of Time - Temple of Time clear */
} else if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[267]) IF_DUSK(&& (!randomizer_IsActive() || dComIfGs_isStageBossEnemy()))) { } else if (dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[267])) {
bgm_id = 0x200005b; bgm_id = 0x200005b;
} else { } else {
bgm_wave1 = 0x4e; bgm_wave1 = 0x4e;
+1 -1
View File
@@ -22,7 +22,7 @@
#include "os_report.h" #include "os_report.h"
Z2SoundObjBase::Z2SoundObjBase() Z2SoundObjBase::Z2SoundObjBase()
#if DEBUG #if PARTIAL_DEBUG || DEBUG
: JSULink<Z2SoundObjBase>(this) : JSULink<Z2SoundObjBase>(this)
#endif #endif
{ {
+1 -47
View File
@@ -58,10 +58,6 @@
#include "res/Object/Alink.h" #include "res/Object/Alink.h"
#include <cstring> #include <cstring>
#include <dusk/string.hpp> #include <dusk/string.hpp>
#include "dusk/cosmetics/color_utils.hpp"
#include "dusk/randomizer/game/flags.h"
#include "dusk/randomizer/game/stages.h"
#include "dusk/randomizer/game/tools.h"
#endif #endif
static int daAlink_Create(fopAc_ac_c* i_this); static int daAlink_Create(fopAc_ac_c* i_this);
@@ -4235,25 +4231,6 @@ int daAlink_c::createHeap() {
if (mpHIO == NULL) { if (mpHIO == NULL) {
return 0; return 0;
} }
#if TARGET_PC
const auto& lanternColor = dusk::getSettings().cosmetics.lanternGlowColor.getValue();
if (dusk::cosmetics::is_valid_hex_color_str(lanternColor)) {
u8 r = std::stoi(lanternColor.substr(0, 2), nullptr, 16);
u8 g = std::stoi(lanternColor.substr(2, 2), nullptr, 16);
u8 b = std::stoi(lanternColor.substr(4, 2), nullptr, 16);
auto& lanternAmbience = mpHIO->mItem.mLanternPL.m;
auto& lanternSphere = mpHIO->mItem.mLantern.m;
lanternAmbience.mColorR = r;
lanternAmbience.mColorG = g;
lanternAmbience.mColorB = b;
lanternSphere.mColorReg1R = r;
lanternSphere.mColorReg1G = g;
lanternSphere.mColorReg1B = b;
lanternSphere.mColorReg2R = r;
lanternSphere.mColorReg2G = g;
lanternSphere.mColorReg2B = b;
}
#endif
if (!(mpWlChangeModel = initModel(dRes_ID_ALINK_BMD_WL_CHANGE_e, 0))) { if (!(mpWlChangeModel = initModel(dRes_ID_ALINK_BMD_WL_CHANGE_e, 0))) {
return 0; return 0;
@@ -10596,16 +10573,9 @@ void daAlink_c::decideDoStatus() {
(actor_name == fpcNm_TAG_KMSG_e && (actor_name == fpcNm_TAG_KMSG_e &&
static_cast<daTag_KMsg_c*>(field_0x27f4)->getType() == 3)) static_cast<daTag_KMsg_c*>(field_0x27f4)->getType() == 3))
{ {
// Don't check vanilla condition in randomizer if (!checkEquipAnime() && checkMasterSwordEquip()) {
if (!checkEquipAnime() && checkMasterSwordEquip() IF_DUSK(&& !randomizer_IsActive())) {
setDoStatus(BUTTON_STATUS_STRIKE); setDoStatus(BUTTON_STATUS_STRIKE);
} }
#if TARGET_PC
// Separate check for striking sword into the pedestal for randomizer
if (!checkEquipAnime() && randomizer_IsActive() && randomizer_checkTempleOfTimeRequirement()) {
setDoStatus(BUTTON_STATUS_STRIKE);
}
#endif
} }
} else if (mTargetedActor != NULL && checkGoatCatchActor(mTargetedActor) && } else if (mTargetedActor != NULL && checkGoatCatchActor(mTargetedActor) &&
mAttention->getActionBtnB() != NULL && mAttention->getActionBtnB() != NULL &&
@@ -11513,14 +11483,6 @@ int daAlink_c::orderTalk(int i_checkZTalk) {
static void* daAlink_searchBouDoor(fopAc_ac_c* i_actor, void* i_data) { static void* daAlink_searchBouDoor(fopAc_ac_c* i_actor, void* i_data) {
UNUSED(i_data); UNUSED(i_data);
#if TARGET_PC
// In randomizer, we don't want Bo preventing us from entering his house on Day 2
if (randomizer_IsActive() && daAlink_c::checkStageName("F_SP103"))
{
return NULL;
}
#endif
if (fopAcM_GetName(i_actor) == fpcNm_NPC_BOU_e && ((daNpc_Bou_c*)i_actor)->speakTo()) { if (fopAcM_GetName(i_actor) == fpcNm_NPC_BOU_e && ((daNpc_Bou_c*)i_actor)->speakTo()) {
return i_actor; return i_actor;
} }
@@ -12301,14 +12263,6 @@ BOOL daAlink_c::checkGroundSpecialMode() {
if (mLinkAcch.ChkGroundHit() && !checkModeFlg(MODE_PLAYER_FLY) && !checkMagneBootsOn() && if (mLinkAcch.ChkGroundHit() && !checkModeFlg(MODE_PLAYER_FLY) && !checkMagneBootsOn() &&
checkEndResetFlg0(ERFLG0_FORCE_WOLF_CHANGE)) checkEndResetFlg0(ERFLG0_FORCE_WOLF_CHANGE))
{ {
#if TARGET_PC
u8 stage = getStageID();
// In rando, don't transform in twilight fog unless we have shadow crystal
if (randomizer_IsActive() && !dComIfGs_isEventBit(TRANSFORMING_UNLOCKED) &&
(stage == Palace_of_Twilight || stage == Phantom_Zant_1 || stage == Phantom_Zant_2)) {
return 0;
}
#endif
return procCoMetamorphoseInit(); return procCoMetamorphoseInit();
} }
+2 -55
View File
@@ -1624,7 +1624,7 @@ const daAlinkHIO_bomb_c1 daAlinkHIO_bomb_c0::m = {
#pragma push #pragma push
#pragma force_active on #pragma force_active on
IF_NOT_DUSK(const) daAlinkHIO_huLight_c1 daAlinkHIO_huLight_c0::m = { const daAlinkHIO_huLight_c1 daAlinkHIO_huLight_c0::m = {
0, 0,
3, 3,
0, 0,
@@ -1638,25 +1638,8 @@ IF_NOT_DUSK(const) daAlinkHIO_huLight_c1 daAlinkHIO_huLight_c0::m = {
0.0f, 0.0f,
}; };
#pragma pop #pragma pop
#if TARGET_PC
// Save original lantern colors incase player reverts to default
const daAlinkHIO_huLight_c1 daAlinkHIO_huLight_c0::original = {
0,
3,
0,
181,
112,
40,
-70,
1.0f,
50.0f,
350.0f,
0.0f,
};
#endif
const daAlinkHIO_kandelaar_c1 daAlinkHIO_kandelaar_c0::m = {
IF_NOT_DUSK(const) daAlinkHIO_kandelaar_c1 daAlinkHIO_kandelaar_c0::m = {
{ {
30, 30,
1.1f, 1.1f,
@@ -1689,42 +1672,6 @@ IF_NOT_DUSK(const) daAlinkHIO_kandelaar_c1 daAlinkHIO_kandelaar_c0::m = {
0.5f, 0.5f,
}; };
#if TARGET_PC
// Save original lantern colors incase player reverts to default
const daAlinkHIO_kandelaar_c1 daAlinkHIO_kandelaar_c0::original = {
{
30,
1.1f,
2.0f,
3.0f,
17.0f,
},
{
11,
1.0f,
0.0f,
3.0f,
12.0f,
},
{
17,
1.0f,
0.0f,
3.0f,
18.0f,
},
80,
40,
20,
40,
30,
10,
3,
200,
0.5f,
};
#endif
const daAlinkHIO_fmChain_c1 daAlinkHIO_fmChain_c0::m = { const daAlinkHIO_fmChain_c1 daAlinkHIO_fmChain_c0::m = {
{ {
20, 20,
+2 -321
View File
@@ -23,14 +23,9 @@
#include "d/actor/d_a_npc_tkc.h" #include "d/actor/d_a_npc_tkc.h"
#include <cstring> #include <cstring>
#include "dusk/archipelago/archipelago_context.hpp"
#if TARGET_PC
#include "dusk/imgui/ImGuiConsole.hpp" #include "dusk/imgui/ImGuiConsole.hpp"
#include "dusk/settings.h" #include "dusk/settings.h"
#include "dusk/speedrun.h" #include "dusk/speedrun.h"
#include "dusk/randomizer/game/randomizer_context.hpp"
#endif
BOOL daAlink_c::checkEventRun() const { BOOL daAlink_c::checkEventRun() const {
return dComIfGp_event_runCheck() || checkPlayerDemoMode(); return dComIfGp_event_runCheck() || checkPlayerDemoMode();
@@ -1028,26 +1023,13 @@ void daAlink_c::setGetItemFace(u16 i_itemNo) {
|| i_itemNo == dItemNo_ANCIENT_DOCUMENT2_e || i_itemNo == dItemNo_ANCIENT_DOCUMENT2_e
|| i_itemNo == dItemNo_DROP_CONTAINER_e || i_itemNo == dItemNo_DROP_CONTAINER_e
|| i_itemNo == dItemNo_DROP_CONTAINER02_e || i_itemNo == dItemNo_DROP_CONTAINER02_e
#if TARGET_PC
// Rando items for facial expressions
|| (randomizer_IsActive() && i_itemNo == dItemNo_Randomizer_WOOD_STICK_e)
|| (randomizer_IsActive() && i_itemNo == dItemNo_Randomizer_SWORD_e)
|| (randomizer_IsActive() && i_itemNo == dItemNo_Randomizer_SHIELD_e)
|| (randomizer_IsActive() && i_itemNo == dItemNo_Randomizer_MASTER_SWORD_e)
|| (randomizer_IsActive() && i_itemNo == dItemNo_Randomizer_LIGHT_SWORD_e)
|| (randomizer_IsActive() && i_itemNo == dItemNo_Randomizer_MAGIC_LV1_e)
#endif
|| i_itemNo == dItemNo_DROP_CONTAINER03_e) || i_itemNo == dItemNo_DROP_CONTAINER03_e)
{ {
setFaceBasicBck(dRes_ID_ALANM_BCK_FI_e); setFaceBasicBck(dRes_ID_ALANM_BCK_FI_e);
} else if (i_itemNo == dItemNo_DUNGEON_EXIT_e || i_itemNo == dItemNo_LV7_DUNGEON_EXIT_e) { } else if (i_itemNo == dItemNo_DUNGEON_EXIT_e || i_itemNo == dItemNo_LV7_DUNGEON_EXIT_e) {
setFaceBasicTexture(FTANM_K_A); setFaceBasicTexture(FTANM_K_A);
setFaceBasicBck(dRes_ID_ALANM_BCK_FK_e); setFaceBasicBck(dRes_ID_ALANM_BCK_FK_e);
#if TARGET_PC
} else if (i_itemNo == dItemNo_TOMATO_PUREE_e || i_itemNo == dItemNo_TASTE_e || (randomizer_IsActive() && i_itemNo == dItemNo_Randomizer_FOOLISH_ITEM_e)) {
#else
} else if (i_itemNo == dItemNo_TOMATO_PUREE_e || i_itemNo == dItemNo_TASTE_e) { } else if (i_itemNo == dItemNo_TOMATO_PUREE_e || i_itemNo == dItemNo_TASTE_e) {
#endif
setFaceBasicBck(dRes_ID_ALANM_BCK_FJ_e); setFaceBasicBck(dRes_ID_ALANM_BCK_FJ_e);
} }
} }
@@ -2234,283 +2216,18 @@ void daAlink_c::setGetSubBgm(int i_itemNo) {
/* dItemNo_KEY_OF_FILONE_e */ SETYPE_ITEM_GET_MINI, /* dItemNo_KEY_OF_FILONE_e */ SETYPE_ITEM_GET_MINI,
}; };
#if TARGET_PC
// Randomizer SeType changes
static const u8 getSeTypeRandomizer[255] = {
/* dItemNo_Randomizer_HEART_e */ SETYPE_NONE,
/* dItemNo_Randomizer_GREEN_RUPEE_e */ SETYPE_ITEM_GET_ME,
/* dItemNo_Randomizer_BLUE_RUPEE_e */ SETYPE_ITEM_GET_ME,
/* dItemNo_Randomizer_YELLOW_RUPEE_e */ SETYPE_ITEM_GET_ME,
/* dItemNo_Randomizer_RED_RUPEE_e */ SETYPE_ITEM_GET_ME,
/* dItemNo_Randomizer_PURPLE_RUPEE_e */ SETYPE_ITEM_GET_ME,
/* dItemNo_Randomizer_ORANGE_RUPEE_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_SILVER_RUPEE_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_S_MAGIC_e */ SETYPE_NONE,
/* dItemNo_Randomizer_L_MAGIC_e */ SETYPE_NONE,
/* dItemNo_Randomizer_BOMB_5_e */ SETYPE_ITEM_GET_ME,
/* dItemNo_Randomizer_BOMB_10_e */ SETYPE_ITEM_GET_ME,
/* dItemNo_Randomizer_BOMB_20_e */ SETYPE_ITEM_GET_ME,
/* dItemNo_Randomizer_BOMB_30_e */ SETYPE_ITEM_GET_ME,
/* dItemNo_Randomizer_ARROW_10_e */ SETYPE_ITEM_GET_ME,
/* dItemNo_Randomizer_ARROW_20_e */ SETYPE_ITEM_GET_ME,
/* dItemNo_Randomizer_ARROW_30_e */ SETYPE_ITEM_GET_ME,
/* dItemNo_Randomizer_ARROW_1_e */ SETYPE_ITEM_GET_ME,
/* dItemNo_Randomizer_PACHINKO_SHOT_e */ SETYPE_ITEM_GET_ME,
/* dItemNo_Randomizer_FOOLISH_ITEM_e_e */ SETYPE_NONE,
/* dItemNo_Randomizer_NOENTRY_20_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_NOENTRY_21_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_WATER_BOMB_5_e */ SETYPE_ITEM_GET_ME,
/* dItemNo_Randomizer_WATER_BOMB_10_e */ SETYPE_ITEM_GET_ME,
/* dItemNo_Randomizer_WATER_BOMB_20_e */ SETYPE_ITEM_GET_ME,
/* dItemNo_Randomizer_WATER_BOMB_30_e */ SETYPE_ITEM_GET_ME,
/* dItemNo_Randomizer_BOMB_INSECT_5_e */ SETYPE_ITEM_GET_ME,
/* dItemNo_Randomizer_BOMB_INSECT_10_e */ SETYPE_ITEM_GET_ME,
/* dItemNo_Randomizer_BOMB_INSECT_20_e */ SETYPE_ITEM_GET_ME,
/* dItemNo_Randomizer_BOMB_INSECT_30_e */ SETYPE_ITEM_GET_ME,
/* dItemNo_Randomizer_RECOVERY_FAILY_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_TRIPLE_HEART_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_SMALL_KEY_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_KAKERA_HEART_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_UTAWA_HEART_e */ SETYPE_HEART,
/* dItemNo_Randomizer_MAP_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_COMPUS_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_DUNGEON_EXIT_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_BOSS_KEY_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_DUNGEON_BACK_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_SWORD_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_MASTER_SWORD_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_WOOD_SHIELD_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_SHIELD_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_HYLIA_SHIELD_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_TKS_LETTER_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_WEAR_CASUAL_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_WEAR_KOKIRI_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_ARMOR_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_WEAR_ZORA_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_MAGIC_LV1_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_DUNGEON_EXIT_2_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_WALLET_LV1_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_WALLET_LV2_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_WALLET_LV3_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_NOENTRY_55_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_NOENTRY_56_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_NOENTRY_57_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_NOENTRY_58_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_NOENTRY_59_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_NOENTRY_60_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_ZORAS_JEWEL_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_HAWK_EYE_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_WOOD_STICK_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_BOOMERANG_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_SPINNER_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_IRONBALL_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_BOW_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_HOOKSHOT_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_HVY_BOOTS_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_COPY_ROD_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_W_HOOKSHOT_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_KANTERA_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_LIGHT_SWORD_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_FISHING_ROD_1_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_PACHINKO_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_COPY_ROD_2_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_NOENTRY_77_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_NOENTRY_78_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_BOMB_BAG_LV2_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_BOMB_BAG_LV1_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_BOMB_IN_BAG_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_NOENTRY_82_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_LIGHT_ARROW_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_ARROW_LV1_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_ARROW_LV2_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_ARROW_LV3_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_NOENTRY_87_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_LURE_ROD_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_BOMB_ARROW_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_HAWK_ARROW_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_BEE_ROD_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_JEWEL_ROD_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_WORM_ROD_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_JEWEL_BEE_ROD_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_JEWEL_WORM_ROD_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_EMPTY_BOTTLE_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_RED_BOTTLE_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_GREEN_BOTTLE_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_BLUE_BOTTLE_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_MILK_BOTTLE_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_HALF_MILK_BOTTLE_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_OIL_BOTTLE_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_WATER_BOTTLE_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_OIL_BOTTLE_2_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_RED_BOTTLE_2_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_UGLY_SOUP_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_HOT_SPRING_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_FAIRY_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_HOT_SPRING_2_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_OIL2_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_OIL_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_NORMAL_BOMB_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_WATER_BOMB_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_POKE_BOMB_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_FAIRY_DROP_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_WORM_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_DROP_BOTTLE_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_BEE_CHILD_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_CHUCHU_RARE_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_CHUCHU_RED_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_CHUCHU_BLUE_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_CHUCHU_GREEN_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_CHUCHU_YELLOW_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_CHUCHU_PURPLE_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_LV1_SOUP_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_LV2_SOUP_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_LV3_SOUP_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_LETTER_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_BILL_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_WOOD_STATUE_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_IRIAS_PENDANT_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_HORSE_FLUTE_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_NOENTRY_133_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_NOENTRY_134_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_NOENTRY_135_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_NOENTRY_136_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_NOENTRY_137_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_NOENTRY_138_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_NOENTRY_139_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_NOENTRY_140_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_NOENTRY_141_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_NOENTRY_142_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_NOENTRY_143_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_RAFRELS_MEMO_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_ASHS_SCRIBBLING_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_NOENTRY_146_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_NOENTRY_147_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_NOENTRY_148_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_NOENTRY_149_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_NOENTRY_150_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_NOENTRY_151_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_NOENTRY_152_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_NOENTRY_153_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_NOENTRY_154_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_NOENTRY_155_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_CHUCHU_YELLOW2_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_OIL_BOTTLE3_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_SHOP_BEE_CHILD_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_CHUCHU_BLACK_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_LIGHT_DROP_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_DROP_CONTAINER_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_DROP_CONTAINER02_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_DROP_CONTAINER03_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_FILLED_CONTAINER_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_MIRROR_PIECE_2_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_MIRROR_PIECE_3_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_MIRROR_PIECE_4_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_NOENTRY_168_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_NOENTRY_169_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_NOENTRY_170_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_NOENTRY_171_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_NOENTRY_172_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_NOENTRY_173_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_NOENTRY_174_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_NOENTRY_175_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_SMELL_YELIA_POUCH_e */ SETYPE_ITEM_GET_SMELL,
/* dItemNo_Randomizer_SMELL_PUMPKIN_e */ SETYPE_ITEM_GET_SMELL,
/* dItemNo_Randomizer_SMELL_POH_e */ SETYPE_ITEM_GET_SMELL,
/* dItemNo_Randomizer_SMELL_FISH_e */ SETYPE_ITEM_GET_SMELL,
/* dItemNo_Randomizer_SMELL_CHILDREN_e */ SETYPE_ITEM_GET_SMELL,
/* dItemNo_Randomizer_SMELL_MEDICINE_e */ SETYPE_ITEM_GET_SMELL,
/* dItemNo_Randomizer_NOENTRY_182_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_NOENTRY_183_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_NOENTRY_184_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_NOENTRY_185_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_NOENTRY_186_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_NOENTRY_187_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_NOENTRY_188_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_NOENTRY_189_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_NOENTRY_190_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_NOENTRY_191_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_M_BEETLE_e */ SETYPE_ITEM_GET_INSECT,
/* dItemNo_Randomizer_F_BEETLE_e */ SETYPE_ITEM_GET_INSECT,
/* dItemNo_Randomizer_M_BUTTERFLY_e */ SETYPE_ITEM_GET_INSECT,
/* dItemNo_Randomizer_F_BUTTERFLY_e */ SETYPE_ITEM_GET_INSECT,
/* dItemNo_Randomizer_M_STAG_BEETLE_e */ SETYPE_ITEM_GET_INSECT,
/* dItemNo_Randomizer_F_STAG_BEETLE_e */ SETYPE_ITEM_GET_INSECT,
/* dItemNo_Randomizer_M_GRASSHOPPER_e */ SETYPE_ITEM_GET_INSECT,
/* dItemNo_Randomizer_F_GRASSHOPPER_e */ SETYPE_ITEM_GET_INSECT,
/* dItemNo_Randomizer_M_NANAFUSHI_e */ SETYPE_ITEM_GET_INSECT,
/* dItemNo_Randomizer_F_NANAFUSHI_e */ SETYPE_ITEM_GET_INSECT,
/* dItemNo_Randomizer_M_DANGOMUSHI_e */ SETYPE_ITEM_GET_INSECT,
/* dItemNo_Randomizer_F_DANGOMUSHI_e */ SETYPE_ITEM_GET_INSECT,
/* dItemNo_Randomizer_M_MANTIS_e */ SETYPE_ITEM_GET_INSECT,
/* dItemNo_Randomizer_F_MANTIS_e */ SETYPE_ITEM_GET_INSECT,
/* dItemNo_Randomizer_M_LADYBUG_e */ SETYPE_ITEM_GET_INSECT,
/* dItemNo_Randomizer_F_LADYBUG_e */ SETYPE_ITEM_GET_INSECT,
/* dItemNo_Randomizer_M_SNAIL_e */ SETYPE_ITEM_GET_INSECT,
/* dItemNo_Randomizer_F_SNAIL_e */ SETYPE_ITEM_GET_INSECT,
/* dItemNo_Randomizer_M_DRAGONFLY_e */ SETYPE_ITEM_GET_INSECT,
/* dItemNo_Randomizer_F_DRAGONFLY_e */ SETYPE_ITEM_GET_INSECT,
/* dItemNo_Randomizer_M_ANT_e */ SETYPE_ITEM_GET_INSECT,
/* dItemNo_Randomizer_F_ANT_e */ SETYPE_ITEM_GET_INSECT,
/* dItemNo_Randomizer_M_MAYFLY_e */ SETYPE_ITEM_GET_INSECT,
/* dItemNo_Randomizer_F_MAYFLY_e */ SETYPE_ITEM_GET_INSECT,
/* dItemNo_Randomizer_NOENTRY_216_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_NOENTRY_217_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_NOENTRY_218_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_NOENTRY_219_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_NOENTRY_220_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_NOENTRY_221_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_NOENTRY_222_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_NOENTRY_223_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_POU_SPIRIT_e */ SETYPE_ITEM_GET_POU,
/* dItemNo_Randomizer_NOENTRY_225_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_NOENTRY_226_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_NOENTRY_227_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_NOENTRY_228_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_NOENTRY_229_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_NOENTRY_230_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_NOENTRY_231_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_NOENTRY_232_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_ANCIENT_DOCUMENT_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_AIR_LETTER_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_ANCIENT_DOCUMENT2_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_LV7_DUNGEON_EXIT_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_LINKS_SAVINGS_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_SMALL_KEY2_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_POU_FIRE1_e */ SETYPE_NONE,
/* dItemNo_Randomizer_POU_FIRE2_e */ SETYPE_NONE,
/* dItemNo_Randomizer_POU_FIRE3_e */ SETYPE_NONE,
/* dItemNo_Randomizer_POU_FIRE4_e */ SETYPE_NONE,
/* dItemNo_Randomizer_BOSSRIDER_KEY_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_TOMATO_PUREE_e */ SETYPE_ITEM_GET_ME,
/* dItemNo_Randomizer_TASTE_e */ SETYPE_ITEM_GET_ME,
/* dItemNo_Randomizer_LV5_BOSS_KEY_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_SURFBOARD_e */ SETYPE_NONE,
/* dItemNo_Randomizer_KANTERA2_e */ SETYPE_ITEM_GET_ME,
/* dItemNo_Randomizer_L2_KEY_PIECES1_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_L2_KEY_PIECES2_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_L2_KEY_PIECES3_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_KEY_OF_CARAVAN_e */ SETYPE_ITEM_GET_MINI,
/* dItemNo_Randomizer_LV2_BOSS_KEY_e */ SETYPE_ITEM_GET,
/* dItemNo_Randomizer_KEY_OF_FILONE_e */ SETYPE_ITEM_GET_MINI,
};
#endif
static u32 const bgmLabel[8] = { static u32 const bgmLabel[8] = {
Z2BGM_HEART_GET, Z2BGM_ITEM_GET, Z2BGM_ITEM_GET_MINI, Z2BGM_ITEM_GET_ME, Z2BGM_HEART_GET, Z2BGM_ITEM_GET, Z2BGM_ITEM_GET_MINI, Z2BGM_ITEM_GET_ME,
Z2BGM_ITEM_GET_INSECT, Z2BGM_ITEM_GET_SMELL, Z2BGM_ITEM_GET_POU, Z2BGM_ITEM_GET_ME_S, Z2BGM_ITEM_GET_INSECT, Z2BGM_ITEM_GET_SMELL, Z2BGM_ITEM_GET_POU, Z2BGM_ITEM_GET_ME_S,
}; };
#if TARGET_PC
u32 se_type = randomizer_IsActive() ? getSeTypeRandomizer[i_itemNo] : getSeType[i_itemNo];
#else
u32 se_type = getSeType[i_itemNo]; u32 se_type = getSeType[i_itemNo];
#endif
if (se_type == SETYPE_ITEM_GET_ME && mProcVar4.field_0x3010 == 0) { if (se_type == SETYPE_ITEM_GET_ME && mProcVar4.field_0x3010 == 0) {
se_type = SETYPE_ITEM_GET_ME_S; se_type = SETYPE_ITEM_GET_ME_S;
} }
if (se_type != SETYPE_NONE IF_DUSK(|| i_itemNo == dItemNo_Randomizer_FOOLISH_ITEM_e)) { if (se_type != SETYPE_NONE) {
mDoAud_subBgmStart(bgmLabel[se_type]); mDoAud_subBgmStart(bgmLabel[se_type]);
dComIfGp_setMesgBgmOn(); dComIfGp_setMesgBgmOn();
} }
@@ -2542,15 +2259,6 @@ int daAlink_c::procCoGetItemInit() {
s16 var_r22 = 0; s16 var_r22 = 0;
BOOL var_r31 = FALSE; BOOL var_r31 = FALSE;
BOOL var_r30 = FALSE; BOOL var_r30 = FALSE;
#if TARGET_PC
if (randomizer_IsActive()) {
// If we are giving a custom item, we want to set mParam0 to 0x100 so that instead of trying to search for an item
// actor that doesnt exist we want the game to create one using the item id in mGtItm.
if (g_randomizerState.getGiveItemToPlayerStatus() == RandomizerState::ITEM_IN_QUEUE) {
mDemo.setParam0(0x100);
}
}
#endif
if (mProcID == PROC_GET_ITEM || mProcID == PROC_INSECT_CATCH || if (mProcID == PROC_GET_ITEM || mProcID == PROC_INSECT_CATCH ||
(mProcID == PROC_PREACTION_UNEQUIP && !checkNoUpperAnime())) (mProcID == PROC_PREACTION_UNEQUIP && !checkNoUpperAnime()))
{ {
@@ -2588,11 +2296,6 @@ int daAlink_c::procCoGetItemInit() {
} else { } else {
item_no = dComIfGp_event_getGtItm(); item_no = dComIfGp_event_getGtItm();
} }
#if TARGET_PC
if (randomizer_IsActive() && g_randomizerState.getGiveItemToPlayerStatus() == RandomizerState::ITEM_IN_QUEUE) {
g_randomizerState.setGiveItemToPlayerStatus(RandomizerState::CLEAR_QUEUE);
}
#endif
fpc_ProcID item_partner_id = fopAcM_createItemForPresentDemo(&current.pos, item_no, 0, -1, fpc_ProcID item_partner_id = fopAcM_createItemForPresentDemo(&current.pos, item_no, 0, -1,
fopAcM_GetRoomNo(this), NULL, NULL); fopAcM_GetRoomNo(this), NULL, NULL);
@@ -2820,10 +2523,8 @@ int daAlink_c::procCoGetItem() {
} else if (mProcVar2.field_0x300c == 0x23 && checkStageName("D_MN11")) { } else if (mProcVar2.field_0x300c == 0x23 && checkStageName("D_MN11")) {
field_0x32cc = 0x5C0; field_0x32cc = 0x5C0;
} else if (mProcVar2.field_0x300c == 0xE0) { } else if (mProcVar2.field_0x300c == 0xE0) {
// Don't show special text in rando if (dComIfGs_getPohSpiritNum() == 20) {
if (dComIfGs_getPohSpiritNum() == 20 IF_DUSK(&& !randomizer_IsActive())) {
field_0x32cc = 0x4CF; field_0x32cc = 0x4CF;
// Rando gives poe soul after the text, so it'll never hit this
} else if (dComIfGs_getPohSpiritNum() == 60) { } else if (dComIfGs_getPohSpiritNum() == 60) {
field_0x32cc = 0x4D0; field_0x32cc = 0x4D0;
} else { } else {
@@ -3304,15 +3005,6 @@ int daAlink_c::procCoDeadInit(int param_0) {
field_0x3080 = 0; field_0x3080 = 0;
mProcVar5.field_0x3012 = 0x3F; mProcVar5.field_0x3012 = 0x3F;
field_0x3198 = -1; field_0x3198 = -1;
#if TARGET_PC
// trigger archipelago death link if applicable
if (dusk::archi::ArchipelagoContext::IsConnected()) {
dusk::archi::ArchipelagoContext::TryHandleDeathLink();
}
#endif
return 1; return 1;
} }
@@ -4322,10 +4014,6 @@ int daAlink_c::procGanonFinishInit() {
dusk::m_speedrunInfo.stopRun(); dusk::m_speedrunInfo.stopRun();
} }
} }
if (dusk::archi::ArchipelagoContext::IsConnected()) {
dusk::archi::ArchipelagoContext::TryHandleGameComplete();
}
#endif #endif
return 1; return 1;
@@ -4860,13 +4548,6 @@ int daAlink_c::procCoWarpInit(int param_0, int param_1) {
(checkItemGet(dItemNo_DUNGEON_BACK_e, 1) && (checkItemGet(dItemNo_DUNGEON_BACK_e, 1) &&
strcmp(stageName, dComIfGs_getWarpStageName()) == 0)) strcmp(stageName, dComIfGs_getWarpStageName()) == 0))
{ {
#if TARGET_PC
// In rando, only clear the Ooccoo slot if Ooccoo is in it
u8 ooccooSlot = dComIfGs_getItem(SLOT_18, false);
if (!randomizer_IsActive() || ooccooSlot == dItemNo_Randomizer_DUNGEON_EXIT_e ||
ooccooSlot == dItemNo_Randomizer_DUNGEON_EXIT_2_e ||
ooccooSlot == dItemNo_Randomizer_LV7_DUNGEON_EXIT_e)
#endif
dComIfGs_setItem(SLOT_18, dItemNo_NONE_e); dComIfGs_setItem(SLOT_18, dItemNo_NONE_e);
dComIfGs_resetLastWarpAcceptStage(); dComIfGs_resetLastWarpAcceptStage();
} }
-13
View File
@@ -1191,19 +1191,6 @@ void daAlink_c::setLightningSwordEffect() {
emitter = setEmitter(&field_0x327c[i], effName[i], &current.pos, &shape_angle); emitter = setEmitter(&field_0x327c[i], effName[i], &current.pos, &shape_angle);
if (emitter != NULL) { if (emitter != NULL) {
emitter->setGlobalRTMatrix(mSwordModel->getBaseTRMtx()); emitter->setGlobalRTMatrix(mSwordModel->getBaseTRMtx());
#if TARGET_PC
// Apply custom light sword glow if applicable
const auto& lightSwordGlowColor = dusk::getSettings().cosmetics.lightSwordGlowColor.getValue();
if (dusk::cosmetics::is_valid_hex_color_str(lightSwordGlowColor)) {
GXColor color = dusk::cosmetics::hex_color_str_to_gx_color(lightSwordGlowColor);
emitter->setGlobalEnvColor(color.r, color.g, color.b);
emitter->setGlobalPrmColor(color.r, color.g, color.b);
} else if (lightSwordGlowColor == "Rainbow") {
GXColor color = dusk::cosmetics::get_rainbow_rgb(127.5f);
emitter->setGlobalEnvColor(color.r, color.g, color.b);
emitter->setGlobalPrmColor(color.r, color.g, color.b);
}
#endif
} }
} }
} else { } else {
+5 -12
View File
@@ -122,18 +122,11 @@ BOOL daAlink_c::setBodyAngleToCamera() {
var_f31 /= dComIfGp_getCameraZoomScale(field_0x317c); var_f31 /= dComIfGp_getCameraZoomScale(field_0x317c);
} }
#if TARGET_PC shape_angle.y = shape_angle.y + (var_f31 * cM_ssin(mStickAngle) IF_DUSK(* (dusk::getSettings().game.invertFirstPersonXAxis ? -1.0f : 1.0f)));
if (dusk::getSettings().game.enableMouseAim && checkAimInputContext()) { sp8 = mBodyAngle.x + (var_f31 * cM_scos(mStickAngle) IF_DUSK(* (dusk::getSettings().game.invertFirstPersonYAxis ? -1.0f : 1.0f)));
sp8 = mBodyAngle.x;
} else
#endif
{
shape_angle.y = shape_angle.y + (var_f31 * cM_ssin(mStickAngle) IF_DUSK(* (dusk::getSettings().game.invertFirstPersonXAxis ? -1.0f : 1.0f)));
sp8 = mBodyAngle.x + (var_f31 * cM_scos(mStickAngle) IF_DUSK(* (dusk::getSettings().game.invertFirstPersonYAxis ? -1.0f : 1.0f)));
if (checkNotItemSinkLimit() && sp8 > 0 && sp8 > mBodyAngle.x) { if (checkNotItemSinkLimit() && sp8 > 0 && sp8 > mBodyAngle.x) {
sp8 = mBodyAngle.x; sp8 = mBodyAngle.x;
}
} }
} else { } else {
sp8 = mBodyAngle.x; sp8 = mBodyAngle.x;
@@ -156,7 +149,7 @@ BOOL daAlink_c::setBodyAngleToCamera() {
f32 final_yaw = 0.f; f32 final_yaw = 0.f;
f32 final_pitch = 0.f; f32 final_pitch = 0.f;
if (dusk::getSettings().game.enableMouseAim) { if (dusk::getSettings().game.enableMouseAim) {
dusk::mouse::getAimDeltas(final_yaw, final_pitch); dusk::mouse::get_aim_deltas(final_yaw, final_pitch);
} }
if (dusk::getSettings().game.enableGyroAim) { if (dusk::getSettings().game.enableGyroAim) {
f32 gyro_yaw = 0.f; f32 gyro_yaw = 0.f;
-9
View File
@@ -18,10 +18,6 @@
#include "c/c_damagereaction.h" #include "c/c_damagereaction.h"
#include <cmath> #include <cmath>
#if TARGET_PC
#include "dusk/randomizer/game/tools.h"
#endif
enum B_bq_RES_File_ID { enum B_bq_RES_File_ID {
/* BCK */ /* BCK */
/* 0x07 */ BCK_BQ_APPEAR = 0x7, /* 0x07 */ BCK_BQ_APPEAR = 0x7,
@@ -900,11 +896,6 @@ static void b_bq_end(b_bq_class* i_this) {
i_this->mMode = 1; i_this->mMode = 1;
int sw = fopAcM_GetParam(a_this) >> 0x18; int sw = fopAcM_GetParam(a_this) >> 0x18;
#if TARGET_PC
if (randomizer_IsActive()) {
checkTransformFromWolf(); // If the player is wolf, they will softlock after the defeat cutscene is completed.
}
#endif
dComIfGs_onSwitch(sw, fopAcM_GetRoomNo(a_this)); dComIfGs_onSwitch(sw, fopAcM_GetRoomNo(a_this));
// fallthrough // fallthrough
} }
-9
View File
@@ -4084,15 +4084,6 @@ void daB_DS_c::executeBattle2Dead() {
camera->mCamera.SetTrimSize(0); camera->mCamera.SetTrimSize(0);
dComIfGp_event_reset(); dComIfGp_event_reset();
dComIfGs_onStageBossEnemy(0x13); dComIfGs_onStageBossEnemy(0x13);
#if TARGET_PC
if (randomizer_IsActive()) {
// Give the boss item
u8 agDungeonReward = randomizer_getItemAtLocation("Arbiters Grounds Dungeon Reward");
g_randomizerState.addItemToEventQueue(agDungeonReward);
// Set custom item flag
dComIfGs_onItem(0x9E, -1);
}
#endif
/* dSv_event_flag_c::F_0265 - Arbiter's Grounds - Arbiter's Grounds clear */ /* dSv_event_flag_c::F_0265 - Arbiter's Grounds - Arbiter's Grounds clear */
dComIfGs_onEventBit(0x2010); dComIfGs_onEventBit(0x2010);
fopAcM_delete(this); fopAcM_delete(this);
-27
View File
@@ -530,33 +530,6 @@ int daDitem_c::execute() {
} }
mSound.framework(0, dComIfGp_getReverb(fopAcM_GetRoomNo(this))); mSound.framework(0, dComIfGp_getReverb(fopAcM_GetRoomNo(this)));
#if TARGET_PC
// Certain items use field models that are too big to fit in link's hands so we want to scale them down to fit.
if (randomizer_IsActive()) {
switch (m_itemNo)
{
case dItemNo_Randomizer_MIRROR_PIECE_1_e:
case dItemNo_Randomizer_MIRROR_PIECE_2_e:
case dItemNo_Randomizer_MIRROR_PIECE_3_e:
case dItemNo_Randomizer_MIRROR_PIECE_4_e:
{
scale.x = 0.05f;
break;
}
case dItemNo_Randomizer_MASTER_SWORD_e:
case dItemNo_Randomizer_LIGHT_SWORD_e:
{
scale.x = 0.001f;
break;
}
default:
{
break;
}
}
}
#endif
return 1; return 1;
} }
-13
View File
@@ -10,9 +10,6 @@
#include "d/actor/d_a_midna.h" #include "d/actor/d_a_midna.h"
#include "d/d_door_param2.h" #include "d/d_door_param2.h"
#include "d/actor/d_a_player.h" #include "d/actor/d_a_player.h"
#if TARGET_PC
#include "d/actor/d_a_alink.h"
#endif
#include "d/d_com_inf_game.h" #include "d/d_com_inf_game.h"
#include "d/d_msg_object.h" #include "d/d_msg_object.h"
#include "d/d_map_path_dmap.h" #include "d/d_map_path_dmap.h"
@@ -316,17 +313,7 @@ int daDoor20_c::checkOpenMsgDoor(int* param_1) {
return 1; return 1;
} }
field_0x624.init(NULL, msgNo, 0, NULL); field_0x624.init(NULL, msgNo, 0, NULL);
#if TARGET_PC
int rv = 1;
// If we are in SPR, we don't want Yeta's msg flow to prevent us from opening the door if we haven't talked to her.
if (randomizer_IsActive() && !daAlink_c::checkStageName("D_MN11"))
{
rv = field_0x624.checkOpenDoor(this, param_1);
}
#else
int rv = field_0x624.checkOpenDoor(this, param_1); int rv = field_0x624.checkOpenDoor(this, param_1);
#endif
dMsgObject_endFlowGroup(); dMsgObject_endFlowGroup();
return rv; return rv;
} }
+3 -13
View File
@@ -11,11 +11,6 @@
#include "f_op/f_op_actor_enemy.h" #include "f_op/f_op_actor_enemy.h"
#include <cstring> #include <cstring>
#if TARGET_PC
#include "dusk/randomizer/game/randomizer_context.hpp"
#endif
class daE_HP_HIO_c : public JORReflexible { class daE_HP_HIO_c : public JORReflexible {
public: public:
daE_HP_HIO_c(); daE_HP_HIO_c();
@@ -731,16 +726,11 @@ void daE_HP_c::executeDead() {
fopAcM_onSwitch(this, bitSw); fopAcM_onSwitch(this, bitSw);
} }
#if TARGET_PC dComIfGs_addPohSpiritNum();
if (randomizer_IsActive()) {
g_randomizerState.handlePoeItem(bitSw);
} else
#endif
dComIfGs_addPohSpiritNum();
field_0x784 = -1; field_0x784 = -1;
if (dComIfGs_getPohSpiritNum() == 20 IF_DUSK(&& !randomizer_IsActive())) { if (dComIfGs_getPohSpiritNum() == 20) {
dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[0x1c9]); dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[0x1c9]);
} }
@@ -762,7 +752,7 @@ void daE_HP_c::executeDead() {
field_0x788 = 1; field_0x788 = 1;
} }
} }
} else if (field_0x788 != 0 IF_DUSK(|| randomizer_IsActive())) { } else if (field_0x788 != 0) {
fopAcM_createDisappear(this, &current.pos, 8, 3, 0xff); fopAcM_createDisappear(this, &current.pos, 8, 3, 0xff);
fopAcM_delete(this); fopAcM_delete(this);
} else { } else {
+1 -4
View File
@@ -396,10 +396,7 @@ inline int daE_MD_c::create() {
int phase_state = dComIfG_resLoad(&mPhase, "E_MD"); int phase_state = dComIfG_resLoad(&mPhase, "E_MD");
if (phase_state == cPhs_COMPLEATE_e) { if (phase_state == cPhs_COMPLEATE_e) {
OS_REPORT("E_MD PARAM %x\n", fopAcM_GetParam(this)); OS_REPORT("E_MD PARAM %x\n", fopAcM_GetParam(this));
if (cDmr_SkipInfo != 0 && current.pos.z > -1500.0f) {
// Always create the armor in rando (otherwise ball and chain won't spawn
// if the player leaves and re-enters without getting it)
if (cDmr_SkipInfo != 0 && current.pos.z > -1500.0f IF_DUSK(&& !randomizer_IsActive())) {
return cPhs_ERROR_e; return cPhs_ERROR_e;
} }
-9
View File
@@ -21,10 +21,6 @@
#include "Z2AudioLib/Z2Instances.h" #include "Z2AudioLib/Z2Instances.h"
#include <cstring> #include <cstring>
#if TARGET_PC
#include "dusk/randomizer/game/tools.h"
#endif
class daE_MK_HIO_c : public JORReflexible { class daE_MK_HIO_c : public JORReflexible {
public: public:
virtual ~daE_MK_HIO_c() {} virtual ~daE_MK_HIO_c() {}
@@ -1730,11 +1726,6 @@ static void demo_camera_end(e_mk_class* i_this) {
work.z = AREG_F(2) + -20.0f; work.z = AREG_F(2) + -20.0f;
MtxPosition(&work, &pos); MtxPosition(&work, &pos);
pos += i_this->crownPos; pos += i_this->crownPos;
#if TARGET_PC
if (randomizer_IsActive()) {
checkTransformFromWolf(); // If the player is wolf, they will void and lose the boomerang check.
}
#endif
fopAcM_createDisappear(actor, &pos, 5, 0, 0xff); fopAcM_createDisappear(actor, &pos, 5, 0, 0xff);
} }
+4 -22
View File
@@ -14,10 +14,6 @@
#include "Z2AudioLib/Z2Instances.h" #include "Z2AudioLib/Z2Instances.h"
#include <cstring> #include <cstring>
#if TARGET_PC
#include "dusk/randomizer/game/randomizer_context.hpp"
#include "dusk/randomizer/game/tools.h"
#endif
static s16 mAttackNo = 3; static s16 mAttackNo = 3;
@@ -1136,17 +1132,11 @@ static void e_po_dead(e_po_class* i_this) {
camera_player->mCamera.Start(); camera_player->mCamera.Start();
camera_player->mCamera.SetTrimSize(0); camera_player->mCamera.SetTrimSize(0);
dComIfGp_event_reset(); dComIfGp_event_reset();
#if TARGET_PC dComIfGs_addPohSpiritNum();
if (!randomizer_IsActive()) {
#endif
dComIfGs_addPohSpiritNum();
#if !PLATFORM_SHIELD #if !PLATFORM_SHIELD
if (dComIfGs_getPohSpiritNum() == 0x14) { if (dComIfGs_getPohSpiritNum() == 0x14) {
/* dSv_event_flag_c::F_0457 - Castle Town - Revived cat */ /* dSv_event_flag_c::F_0457 - Castle Town - Revived cat */
dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[457]); dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[457]);
}
#endif
#if TARGET_PC
} }
#endif #endif
daPy_getPlayerActorClass()->cancelOriginalDemo(); daPy_getPlayerActorClass()->cancelOriginalDemo();
@@ -1275,14 +1265,6 @@ static void e_po_dead(e_po_class* i_this) {
} }
} else { } else {
if (i_this->field_0x75C == -1) { if (i_this->field_0x75C == -1) {
#if TARGET_PC
if (randomizer_IsActive()) {
u16 key = getStageID() << 8 | i_this->BitSW;
u8 itemId = randomizer_GetContext().mPoeOverrides[key];
i_this->field_0x75C = fopAcM_createItemForPresentDemo(&a_this->current.pos, itemId, 0,
-1, -1, NULL, NULL);
} else
#endif
i_this->field_0x75C = fopAcM_createItemForPresentDemo(&a_this->current.pos, 0xE0, 0, i_this->field_0x75C = fopAcM_createItemForPresentDemo(&a_this->current.pos, 0xE0, 0,
-1, -1, NULL, NULL); -1, -1, NULL, NULL);
} }
-4
View File
@@ -204,11 +204,7 @@ static void e_rb_move(e_rb_class* i_this) {
spC.x = i_this->field_0xa10.x - enemy->current.pos.x; spC.x = i_this->field_0xa10.x - enemy->current.pos.x;
spC.z = i_this->field_0xa10.z - enemy->current.pos.z; spC.z = i_this->field_0xa10.z - enemy->current.pos.z;
#if AVOID_UB
f32 speed_target{};
#else
f32 speed_target; f32 speed_target;
#endif
switch (i_this->mode) { switch (i_this->mode) {
case 0: case 0:
i_this->mode = 1; i_this->mode = 1;
-10
View File
@@ -16,10 +16,6 @@
#include "f_op/f_op_camera_mng.h" #include "f_op/f_op_camera_mng.h"
#include <cstring> #include <cstring>
#if TARGET_PC
#include "dusk/randomizer/game/verify_item_functions.h"
#endif
class daE_RDB_HIO_c : public JORReflexible { class daE_RDB_HIO_c : public JORReflexible {
public: public:
daE_RDB_HIO_c(); daE_RDB_HIO_c();
@@ -1254,12 +1250,6 @@ static void demo_camera(e_rdb_class* i_this) {
} }
if (iVar1 != 0) { if (iVar1 != 0) {
#if TARGET_PC
if (randomizer_IsActive()) {
u8 itemId = verifyProgressiveItem(randomizer_getItemAtLocation("Hyrule Castle King Bulblin Key"));
daPy_getPlayerActorClass()->changeDemoMode(11, itemId, 0, 0);
} else // do the next line
#endif
daPy_getPlayerActorClass()->changeDemoMode(11, 32, 0, 0); daPy_getPlayerActorClass()->changeDemoMode(11, 32, 0, 0);
i_this->mDemoMode = 12; i_this->mDemoMode = 12;
i_this->field_0x10aa = 0; i_this->field_0x10aa = 0;
-15
View File
@@ -9,9 +9,6 @@
#include "SSystem/SComponent/c_math.h" #include "SSystem/SComponent/c_math.h"
#include "Z2AudioLib/Z2Instances.h" #include "Z2AudioLib/Z2Instances.h"
#include "d/actor/d_a_player.h" #include "d/actor/d_a_player.h"
#if TARGET_PC
#include "d/actor/d_a_alink.h"
#endif
#include "d/d_com_inf_game.h" #include "d/d_com_inf_game.h"
#include "d/d_path.h" #include "d/d_path.h"
#include "d/d_s_play.h" #include "d/d_s_play.h"
@@ -1690,18 +1687,6 @@ static void demo_camera(e_s1_class* i_this) {
if (i_this->mDemoTimer == 137) { if (i_this->mDemoTimer == 137) {
if (!dComIfGs_isSwitch(i_this->mSwBit, fopAcM_GetRoomNo(a_this))) { if (!dComIfGs_isSwitch(i_this->mSwBit, fopAcM_GetRoomNo(a_this))) {
dComIfGs_onSwitch(i_this->mSwBit, fopAcM_GetRoomNo(a_this)); dComIfGs_onSwitch(i_this->mSwBit, fopAcM_GetRoomNo(a_this));
#if TARGET_PC
if (randomizer_IsActive() && daAlink_c::checkStageName("F_SP126")) {
// We check to see if the flag being set is for the UZR portal as a safety precaution.
if (i_this->mSwBit == 0x15 && g_dComIfG_gameInfo.info.getSavedata().getPlayer().getPlayerStatusA().getTransformStatus())
{
// Set the flag to make Iza 1 available and set the memory bit for having talked to her after opening the portal as human.
dComIfGs_onEventBit(0xB02);
dComIfGs_onSwitch(0x37, fopAcM_GetRoomNo(a_this));
}
// Note for the above stuff. This works for now. Eventually would like to adjust this to a FLW patch since I think we could accomplish similar results by having the conversation continue as normal regardless of form, but I haven't looked into it that much.
}
#endif
OS_REPORT("S! BITSW %d\n", i_this->mSwBit); OS_REPORT("S! BITSW %d\n", i_this->mSwBit);
OS_REPORT("S! BITSW %d\n", dComIfGs_isSwitch(i_this->mSwBit, fopAcM_GetRoomNo(a_this))); OS_REPORT("S! BITSW %d\n", dComIfGs_isSwitch(i_this->mSwBit, fopAcM_GetRoomNo(a_this)));
} }
+1 -9
View File
@@ -10,9 +10,7 @@
#include "d/d_com_inf_game.h" #include "d/d_com_inf_game.h"
#include "d/actor/d_a_player.h" #include "d/actor/d_a_player.h"
#include "d/d_s_play.h" #include "d/d_s_play.h"
#if TARGET_PC
#include "dusk/randomizer/game/verify_item_functions.h"
#endif
enum daE_TH_ACTION { enum daE_TH_ACTION {
ACTION_STOP, ACTION_STOP,
ACTION_SPIN, ACTION_SPIN,
@@ -933,12 +931,6 @@ static void get_demo(e_th_ball_class* i_this) {
case 0: case 0:
break; break;
case 1: case 1:
#if TARGET_PC
if (randomizer_IsActive()) {
u8 itemId = verifyProgressiveItem(randomizer_getItemAtLocation("Snowpeak Ruins Ball and Chain"));
demo_id = fopAcM_createItemForTrBoxDemo(&i_this->current.pos, itemId, -1, fopAcM_GetRoomNo(i_this), NULL, NULL);
} else
#endif
demo_id = fopAcM_createItemForTrBoxDemo(&i_this->current.pos, dItemNo_IRONBALL_e, -1, fopAcM_GetRoomNo(i_this), NULL, NULL); demo_id = fopAcM_createItemForTrBoxDemo(&i_this->current.pos, dItemNo_IRONBALL_e, -1, fopAcM_GetRoomNo(i_this), NULL, NULL);
JUT_ASSERT(1670, demo_id != fpcM_ERROR_PROCESS_ID_e); JUT_ASSERT(1670, demo_id != fpcM_ERROR_PROCESS_ID_e);
i_this->mDemoMode = 2; i_this->mDemoMode = 2;
+2 -11
View File
@@ -88,17 +88,8 @@ static int daKytag08_Execute(kytag08_class* i_this) {
} }
} }
#if TARGET_PC if ((daPy_getPlayerActorClass()->checkKandelaarSwing(TRUE) && i_this->mSizeTimer < 100) ||
bool doFogWipe = false; dComIfGs_BossLife_public_Get() == 1)
if (randomizer_IsActive()) {
doFogWipe = ((i_this->mSizeTimer < 100) || dComIfGs_BossLife_public_Get() == 1);
}else {
doFogWipe = (daPy_getPlayerActorClass()->checkKandelaarSwing(TRUE) && i_this->mSizeTimer < 100) || dComIfGs_BossLife_public_Get() == 1;
}
if (doFogWipe)
#else
if ((daPy_getPlayerActorClass()->checkKandelaarSwing(TRUE) && i_this->mSizeTimer < 100) || dComIfGs_BossLife_public_Get() == 1)
#endif
{ {
dComIfGs_BossLife_public_Set(0); dComIfGs_BossLife_public_Set(0);
i_this->mTargetAvoidPos = i_this->current.pos; i_this->mTargetAvoidPos = i_this->current.pos;
+1 -11
View File
@@ -29,7 +29,6 @@
#include "dusk/frame_interpolation.h" #include "dusk/frame_interpolation.h"
#include "dusk/settings.h" #include "dusk/settings.h"
#include "dusk/version.hpp" #include "dusk/version.hpp"
#include "dusk/randomizer/game/randomizer_context.hpp"
#endif #endif
class dmg_rod_HIO_c : public JORReflexible { class dmg_rod_HIO_c : public JORReflexible {
@@ -2956,10 +2955,6 @@ static void lure_heart(dmg_rod_class* i_this) {
if (obj_life != NULL) { if (obj_life != NULL) {
fopAcM_delete(obj_life); fopAcM_delete(obj_life);
fopAcM_onItem(obj_life, 0x80); fopAcM_onItem(obj_life, 0x80);
#if TARGET_PC
// Don't give the item here in rando. We give it later when the FLW message happens
if (!randomizer_IsActive())
#endif
execItemGet(dItemNo_KAKERA_HEART_e); execItemGet(dItemNo_KAKERA_HEART_e);
u8 eventReg = dComIfGs_getEventReg(0xECFF); u8 eventReg = dComIfGs_getEventReg(0xECFF);
eventReg |= (u8)0x40; eventReg |= (u8)0x40;
@@ -4095,10 +4090,6 @@ static void uki_catch(dmg_rod_class* i_this) {
} else if (mgfish->mCaughtType == MG_CATCH_BIN) { } else if (mgfish->mCaughtType == MG_CATCH_BIN) {
i_this->msgflow.init(actor, 0x139A, 0, NULL); i_this->msgflow.init(actor, 0x139A, 0, NULL);
dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[468]); dComIfGs_onEventBit(dSv_event_flag_c::saveBitLabels[468]);
#if TARGET_PC
// Don't give the item here in rando. We give it later in the FLW Message
if (!randomizer_IsActive())
#endif
dComIfGs_setEmptyBottle(); dComIfGs_setEmptyBottle();
} else if (mgfish->mCaughtType == MG_CATCH_KN) { } else if (mgfish->mCaughtType == MG_CATCH_KN) {
i_this->msgflow.init(actor, 0x139C, 0, NULL); i_this->msgflow.init(actor, 0x139C, 0, NULL);
@@ -4365,8 +4356,7 @@ static void uki_main(dmg_rod_class* i_this) {
} }
if (!dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[468])) { if (!dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[468])) {
// Always succeed the rng check in rando for fishing bottle if (cM_rndF(1.0f) <= 0.5f) {
if (cM_rndF(1.0f) <= 0.5f IF_DUSK(|| randomizer_IsActive())) {
cXyz bin_pos(6800.0f, 30.0f, -270.0f); cXyz bin_pos(6800.0f, 30.0f, -270.0f);
bin_pos -= player->current.pos; bin_pos -= player->current.pos;
-28
View File
@@ -14,11 +14,6 @@
#include "m_Do/m_Do_lib.h" #include "m_Do/m_Do_lib.h"
#include <cstring> #include <cstring>
#if TARGET_PC
#include "dusk/randomizer/game/stages.h"
#include "dusk/randomizer/game/tools.h"
#endif
#if DEBUG #if DEBUG
void daNpcT_cmnListenPropertyEvent(char* param_0, int* param_1, daNpcT_HIOParam* param_2) { void daNpcT_cmnListenPropertyEvent(char* param_0, int* param_1, daNpcT_HIOParam* param_2) {
sprintf(&param_0[*param_1], "%.3ff,\t// 注目オフセット\n", param_2->attention_offset); sprintf(&param_0[*param_1], "%.3ff,\t// 注目オフセット\n", param_2->attention_offset);
@@ -2891,29 +2886,6 @@ void daNpcT_offEvtBit(u32 i_no) {
} }
BOOL daNpcT_chkEvtBit(u32 i_no) { BOOL daNpcT_chkEvtBit(u32 i_no) {
#if TARGET_PC
if (randomizer_IsActive()) {
switch (i_no) {
case 0x153: // Checking if the player has Ending Blow
{
if (getStageID() == Hidden_Skill) {
return true;
}
break;
}
case 0x40: // Checking if the player has completed Goron Mines
{
if (getStageID() == Kakariko_Village_Interiors) {
return true; // Return true so Barnes will sell bombs no matter what
}
break;
}
default:
break;
}
}
#endif
return dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[i_no]); return dComIfGs_isEventBit(dSv_event_flag_c::saveBitLabels[i_no]);
} }
-6
View File
@@ -1744,12 +1744,6 @@ int daNpc_Aru_c::cutSpeakTo(int i_staffID) {
switch (eventId) { switch (eventId) {
case 1: case 1:
if (mItemPartnerId == fpcM_ERROR_PROCESS_ID_e) { if (mItemPartnerId == fpcM_ERROR_PROCESS_ID_e) {
#if TARGET_PC
if (randomizer_IsActive()) {
itemNo = randomizer_getItemAtLocation("Herding Goats Reward");
randomizer_setTempFlagForLocation("Herding Goats Reward");
}
#endif
mItemPartnerId = fopAcM_createItemForPresentDemo(&current.pos, itemNo, 0, -1, -1, NULL, NULL); mItemPartnerId = fopAcM_createItemForPresentDemo(&current.pos, itemNo, 0, -1, -1, NULL, NULL);
} }
-10
View File
@@ -10,10 +10,6 @@
#include "JSystem/J3DGraphBase/J3DMaterial.h" #include "JSystem/J3DGraphBase/J3DMaterial.h"
#include <cstring> #include <cstring>
#if TARGET_PC
#include "dusk/randomizer/game/verify_item_functions.h"
#endif
const daNpcAshB_HIOParam daNpcAshB_Param_c::m = { const daNpcAshB_HIOParam daNpcAshB_Param_c::m = {
205.0f, // attention_offset 205.0f, // attention_offset
-3.0f, // gravity -3.0f, // gravity
@@ -1005,12 +1001,6 @@ BOOL daNpcAshB_c::EvCut_Appear(int i_staffID) {
case '0008': case '0008':
local_30[0] = 0; local_30[0] = 0;
if (mFlow.getEventId(local_30) == 1) { if (mFlow.getEventId(local_30) == 1) {
#if TARGET_PC
if (randomizer_IsActive()) {
local_30[0] = verifyProgressiveItem(randomizer_getItemAtLocation("Ashei Sketch"));
randomizer_setTempFlagForLocation("Ashei Sketch");
}
#endif
mItemPartnerId = mItemPartnerId =
fopAcM_createItemForPresentDemo(&current.pos, local_30[0], 0, -1, -1, 0, 0); fopAcM_createItemForPresentDemo(&current.pos, local_30[0], 0, -1, -1, 0, 0);
dComIfGp_event_setItemPartnerId(mItemPartnerId); dComIfGp_event_setItemPartnerId(mItemPartnerId);
-2
View File
@@ -618,7 +618,6 @@ BOOL daNpc_Bans_c::isDelete() {
Delete if TYPE_MAKING_BOMBS and: Delete if TYPE_MAKING_BOMBS and:
Horseback Battle Not Cleared or Goron Mines Cleared Horseback Battle Not Cleared or Goron Mines Cleared
*/ */
IF_DUSK(if (randomizer_IsActive()) { return TRUE;}) // Always delete this type in randomizer
return !daNpcT_chkEvtBit(85) || // dSv_event_flag_c::M_052 - Main Event - Horseback battle clear return !daNpcT_chkEvtBit(85) || // dSv_event_flag_c::M_052 - Main Event - Horseback battle clear
daNpcT_chkEvtBit(64); // dSv_event_flag_c::M_031 - Goron Mines - Goron Mines clear daNpcT_chkEvtBit(64); // dSv_event_flag_c::M_031 - Goron Mines - Goron Mines clear
@@ -627,7 +626,6 @@ BOOL daNpc_Bans_c::isDelete() {
Delete if TYPE_SHOP and: Delete if TYPE_SHOP and:
Goron Mines Cleared Goron Mines Cleared
*/ */
IF_DUSK(if (randomizer_IsActive()) { return FALSE;}) // Never delete this type in randomizer
return !daNpcT_chkEvtBit(64); // dSv_event_flag_c::M_031 - Goron Mines - Goron Mines clear return !daNpcT_chkEvtBit(64); // dSv_event_flag_c::M_031 - Goron Mines - Goron Mines clear
default: default:
+2 -3
View File
@@ -1034,9 +1034,8 @@ bool daNpcBouS_c::wait(void* param_1) {
mTurnMode = 0; mTurnMode = 0;
} }
} }
// In randomizer, we don't want bo to try and talk to us once the chest has been opened. if (!checkItemGet(dItemNo_HVY_BOOTS_e, 1) && dComIfGs_isTbox(2)) {
if (IF_DUSK(!randomizer_IsActive() &&) !checkItemGet(dItemNo_HVY_BOOTS_e, 1) && dComIfGs_isTbox(2)) {
mForcibleTalk = 1; mForcibleTalk = 1;
} }
-11
View File
@@ -1804,17 +1804,6 @@ int daNpcChin_c::_Evt_GameSucceed_CutMain(const int& param_0) {
itemId1 = 0; itemId1 = 0;
} }
#if TARGET_PC
if (randomizer_IsActive()) {
if (itemId1 == dItemNo_ARROW_LV2_e) {
itemId1 = randomizer_getItemAtLocation("STAR Prize 1");
randomizer_setTempFlagForLocation("STAR Prize 1");
} else if (itemId1 == dItemNo_ARROW_LV3_e) {
itemId1 = randomizer_getItemAtLocation("STAR Prize 2");
randomizer_setTempFlagForLocation("STAR Prize 2");
}
}
#endif
fpc_ProcID itemId2 = fopAcM_createItemForPresentDemo(&current.pos, itemId1, 0, -1, -1, fpc_ProcID itemId2 = fopAcM_createItemForPresentDemo(&current.pos, itemId1, 0, -1, -1,
0, 0); 0, 0);
if (itemId2 != -1) { if (itemId2 != -1) {
+1 -13
View File
@@ -11,10 +11,6 @@
#include "JSystem/JHostIO/JORFile.h" #include "JSystem/JHostIO/JORFile.h"
#include <cstring> #include <cstring>
#if TARGET_PC
#include "dusk/randomizer/game/verify_item_functions.h"
#endif
enum fairy_RES_File_ID { enum fairy_RES_File_ID {
/* BCK */ /* BCK */
/* 0x09 */ BCK_FAIRY_F_SAD = 0x9, /* 0x09 */ BCK_FAIRY_F_SAD = 0x9,
@@ -1273,7 +1269,7 @@ void daNpc_Fairy_c::AppearDemoCall() {
} else { } else {
mEvtNo = EVT_APPEAR_50F_02; mEvtNo = EVT_APPEAR_50F_02;
} }
} else if (dComIfGs_checkEmptyBottle() IF_DUSK(|| randomizer_IsActive())) { } else if (dComIfGs_checkEmptyBottle()) {
mEvtNo = EVT_APPEAR_50F_01; mEvtNo = EVT_APPEAR_50F_01;
} else { } else {
mEvtNo = EVT_APPEAR_50F_04; mEvtNo = EVT_APPEAR_50F_04;
@@ -1337,14 +1333,6 @@ void daNpc_Fairy_c::PresentDemoCall() {
item_no = 0; item_no = 0;
} }
#if TARGET_PC
// If we haven't visted this great fairy before, give the random item
if (randomizer_IsActive() && !daNpcT_chkEvtBit(505)) {
item_no = verifyProgressiveItem(randomizer_getItemAtLocation("Cave of Ordeals Great Fairy Reward"));
randomizer_setTempFlagForLocation("Cave of Ordeals Great Fairy Reward");
}
#endif
fpc_ProcID id = fopAcM_createItemForPresentDemo(&current.pos, item_no, 0, -1, -1, NULL, NULL); fpc_ProcID id = fopAcM_createItemForPresentDemo(&current.pos, item_no, 0, -1, -1, NULL, NULL);
if (id != fpcM_ERROR_PROCESS_ID_e) { if (id != fpcM_ERROR_PROCESS_ID_e) {
dComIfGp_event_setItemPartnerId(id); dComIfGp_event_setItemPartnerId(id);
-12
View File
@@ -14,10 +14,6 @@
#include "Z2AudioLib/Z2Instances.h" #include "Z2AudioLib/Z2Instances.h"
#include <cstring> #include <cstring>
#if TARGET_PC
#include "dusk/randomizer/game/verify_item_functions.h"
#endif
const daNpc_grA_HIOParam daNpc_grA_Param_c::m = { const daNpc_grA_HIOParam daNpc_grA_Param_c::m = {
{90.0f, -4.0f, 1.0f, 850.0f, 255.0f, 280.0f, 40.0f, 100.0f, 0.0f, 0.0f, 20.0f, {90.0f, -4.0f, 1.0f, 850.0f, 255.0f, 280.0f, 40.0f, 100.0f, 0.0f, 0.0f, 20.0f,
-20.0f, 40.0f, -30.0f, 40.0f, -40.0f, 0.4f, 12.0f, 4, 6, 6, 6, -20.0f, 40.0f, -30.0f, 40.0f, -40.0f, 0.4f, 12.0f, 4, 6, 6, 6,
@@ -4022,14 +4018,6 @@ BOOL daNpc_grA_c::talk(void*) {
} }
if (r26 && talkProc(NULL, TRUE, NULL)) { if (r26 && talkProc(NULL, TRUE, NULL)) {
if (mFlow.getEventId(&sp8) == 1) { if (mFlow.getEventId(&sp8) == 1) {
#if TARGET_PC
if (randomizer_IsActive()) {
// Give the randomized underwater goron item
if (sp8 == dItemNo_Randomizer_BOMB_IN_BAG_e) {
sp8 = verifyProgressiveItem(randomizer_getItemAtLocation("Zoras Domain Underwater Goron"));
}
}
#endif
field_0x1480 = field_0x1480 =
fopAcM_createItemForPresentDemo(&current.pos, sp8, 0, -1, -1, NULL, NULL); fopAcM_createItemForPresentDemo(&current.pos, sp8, 0, -1, -1, NULL, NULL);
if (field_0x1480 != fpcM_ERROR_PROCESS_ID_e) { if (field_0x1480 != fpcM_ERROR_PROCESS_ID_e) {
-10
View File
@@ -13,10 +13,6 @@
#include "Z2AudioLib/Z2Instances.h" #include "Z2AudioLib/Z2Instances.h"
#include <cstring> #include <cstring>
#if TARGET_PC
#include "dusk/randomizer/game/verify_item_functions.h"
#endif
enum grO_RES_File_ID { enum grO_RES_File_ID {
/* BCK */ /* BCK */
/* 0x07 */ BCK_GRO_F_TALK_A = 0x7, /* 0x07 */ BCK_GRO_F_TALK_A = 0x7,
@@ -1685,12 +1681,6 @@ int daNpc_grO_c::talk(void* param_1) {
if (facePlayerFlag && talkProc(NULL, TRUE, NULL)) { if (facePlayerFlag && talkProc(NULL, TRUE, NULL)) {
if (mType == TYPE_MINES) { if (mType == TYPE_MINES) {
if (mFlow.getEventId(&itemId) == 1) { if (mFlow.getEventId(&itemId) == 1) {
#if TARGET_PC
if (randomizer_IsActive()) {
itemId = verifyProgressiveItem(randomizer_getItemAtLocation("Goron Mines Gor Ebizo Key Shard"));
randomizer_setTempFlagForLocation("Goron Mines Gor Ebizo Key Shard");
}
#endif
mItemID = fopAcM_createItemForPresentDemo(&current.pos, itemId, 0, -1, -1, NULL, NULL); mItemID = fopAcM_createItemForPresentDemo(&current.pos, itemId, 0, -1, -1, NULL, NULL);
if (mItemID != fpcM_ERROR_PROCESS_ID_e) { if (mItemID != fpcM_ERROR_PROCESS_ID_e) {
s16 eventIdx = dComIfGp_getEventManager().getEventIdx(this, "DEFAULT_GETITEM", 0xFF); s16 eventIdx = dComIfGp_getEventManager().getEventIdx(this, "DEFAULT_GETITEM", 0xFF);
-10
View File
@@ -10,10 +10,6 @@
#include "Z2AudioLib/Z2Instances.h" #include "Z2AudioLib/Z2Instances.h"
#include <cstring> #include <cstring>
#if TARGET_PC
#include "dusk/randomizer/game/verify_item_functions.h"
#endif
enum grR_RES_File_ID { enum grR_RES_File_ID {
/* BCK */ /* BCK */
/* 0x06 */ BCK_GRR_AGURA_GETUP = 0x6, /* 0x06 */ BCK_GRR_AGURA_GETUP = 0x6,
@@ -1342,12 +1338,6 @@ int daNpc_grR_c::talk(void* param_1) {
if (bVar1 && talkProc(NULL, TRUE, NULL)) { if (bVar1 && talkProc(NULL, TRUE, NULL)) {
if (mType == TYPE_0) { if (mType == TYPE_0) {
if (mFlow.getEventId(&i_itemNo) == 1) { if (mFlow.getEventId(&i_itemNo) == 1) {
#if TARGET_PC
if (randomizer_IsActive()) {
i_itemNo = verifyProgressiveItem(randomizer_getItemAtLocation("Goron Mines Gor Liggs Key Shard"));
randomizer_setTempFlagForLocation("Goron Mines Gor Liggs Key Shard");
}
#endif
mItemID = fopAcM_createItemForPresentDemo(&current.pos, i_itemNo, 0, -1, -1, NULL, NULL); mItemID = fopAcM_createItemForPresentDemo(&current.pos, i_itemNo, 0, -1, -1, NULL, NULL);
if (mItemID != fpcM_ERROR_PROCESS_ID_e) { if (mItemID != fpcM_ERROR_PROCESS_ID_e) {
-9
View File
@@ -11,9 +11,6 @@
#include "Z2AudioLib/Z2Instances.h" #include "Z2AudioLib/Z2Instances.h"
#include <cstring> #include <cstring>
#if TARGET_PC
#include "dusk/randomizer/game/verify_item_functions.h"
#endif
enum Event_Cut_Nums { enum Event_Cut_Nums {
NUM_EVT_CUTS_e = 2, NUM_EVT_CUTS_e = 2,
}; };
@@ -1193,12 +1190,6 @@ int daNpc_grS_c::talk(void* param_0) {
if (unkFlag1 && talkProc(NULL, 1, NULL)) { if (unkFlag1 && talkProc(NULL, 1, NULL)) {
if (mType == 0) { if (mType == 0) {
if (mFlow.getEventId(&unkInt2) == 1) { if (mFlow.getEventId(&unkInt2) == 1) {
#if TARGET_PC
if (randomizer_IsActive()) {
unkInt2 = verifyProgressiveItem(randomizer_getItemAtLocation("Goron Mines Gor Amato Key Shard"));
randomizer_setTempFlagForLocation("Goron Mines Gor Amato Key Shard");
}
#endif
mPresentItemId = mPresentItemId =
fopAcM_createItemForPresentDemo(&current.pos, unkInt2, 0, -1, -1, 0, 0); fopAcM_createItemForPresentDemo(&current.pos, unkInt2, 0, -1, -1, 0, 0);
-16
View File
@@ -9,10 +9,6 @@
#include "d/actor/d_a_npc.h" #include "d/actor/d_a_npc.h"
#include <cstring> #include <cstring>
#if TARGET_PC
#include "dusk/randomizer/game/verify_item_functions.h"
#endif
daNpcImpal_HIOParam const daNpcImpal_Param_c::m = { daNpcImpal_HIOParam const daNpcImpal_Param_c::m = {
135.0f, // attention_offset 135.0f, // attention_offset
-3.0f, // gravity -3.0f, // gravity
@@ -975,12 +971,6 @@ BOOL daNpcImpal_c::EvCut_ImpalAppear1(int i_cut_index) {
if (talkProc(NULL, 1, NULL)) { if (talkProc(NULL, 1, NULL)) {
int evt_id = 0; int evt_id = 0;
if (mFlow.getEventId(&evt_id) == 1) { if (mFlow.getEventId(&evt_id) == 1) {
#if TARGET_PC
if (randomizer_IsActive()) {
evt_id = verifyProgressiveItem(randomizer_getItemAtLocation("Ilia Charm"));
randomizer_setTempFlagForLocation("Ilia Charm");
}
#endif
mItemPartnerId = mItemPartnerId =
fopAcM_createItemForPresentDemo(&current.pos, evt_id, 0, -1, -1, 0, 0); fopAcM_createItemForPresentDemo(&current.pos, evt_id, 0, -1, -1, 0, 0);
if (mItemPartnerId != 0xffffffff) { if (mItemPartnerId != 0xffffffff) {
@@ -1070,12 +1060,6 @@ BOOL daNpcImpal_c::EvCut_CopyRod(int i_cut_index) {
case '0003': case '0003':
int evt_id = 0; int evt_id = 0;
if (mFlow.getEventId(&evt_id) == 1) { if (mFlow.getEventId(&evt_id) == 1) {
#if TARGET_PC
if (randomizer_IsActive()) {
evt_id = verifyProgressiveItem(randomizer_getItemAtLocation("Skybook From Impaz"));
randomizer_setTempFlagForLocation("Skybook From Impaz");
}
#endif
mItemPartnerId = mItemPartnerId =
fopAcM_createItemForPresentDemo(&current.pos, evt_id, 0, -1, -1, 0, 0); fopAcM_createItemForPresentDemo(&current.pos, evt_id, 0, -1, -1, 0, 0);
dComIfGp_event_setItemPartnerId(mItemPartnerId); dComIfGp_event_setItemPartnerId(mItemPartnerId);
-22
View File
@@ -11,13 +11,6 @@
#include "d/d_msg_object.h" #include "d/d_msg_object.h"
#include <cstring> #include <cstring>
#if TARGET_PC
#include "dusk/randomizer/game/randomizer_context.hpp"
#include "dusk/randomizer/game/verify_item_functions.h"
#endif
enum Ins_RES_File_ID { enum Ins_RES_File_ID {
/* BCK */ /* BCK */
/* 0x06 */ BCK_INS_F_HAPPY = 0x6, /* 0x06 */ BCK_INS_F_HAPPY = 0x6,
@@ -299,10 +292,6 @@ daNpcIns_c::eventFunc daNpcIns_c::mEvtSeqList[1] = {
NULL, NULL,
}; };
#if TARGET_PC
u8 daNpcIns_c::mGivenInsectId = 0xFF;
#endif
static insect_param_data const l_insectParams[24] = { static insect_param_data const l_insectParams[24] = {
{0x0191, 0x709, 0, 0}, {0x0191, 0x709, 0, 0},
{0x0192, 0x709, 0, 0}, {0x0192, 0x709, 0, 0},
@@ -1270,9 +1259,6 @@ int daNpcIns_c::waitPresent(void* param_1) {
daPy_py_c* player = daPy_getPlayerActorClass(); daPy_py_c* player = daPy_getPlayerActorClass();
player->changeOriginalDemo(); player->changeOriginalDemo();
player->changeDemoMode(0x25, 2, type, 0); player->changeDemoMode(0x25, 2, type, 0);
#if TARGET_PC
mGivenInsectId = type;
#endif
} else { } else {
mInsectMsgNo = 0x719; mInsectMsgNo = 0x719;
} }
@@ -1501,14 +1487,6 @@ int daNpcIns_c::talk(void* param_1) {
OS_REPORT("会話終了時 イベントID=%d アイテムNo=%d\n", eventID, itemNo); OS_REPORT("会話終了時 イベントID=%d アイテムNo=%d\n", eventID, itemNo);
if (eventID == 1) { if (eventID == 1) {
#if TARGET_PC
// In rando, get the randomzied bug reward
if (randomizer_IsActive()) {
itemNo = randomizer_GetContext().mBugRewardOverrides[mGivenInsectId];
itemNo = static_cast<int>(verifyProgressiveItem(itemNo));
mGivenInsectId = 0xFF;
}
#endif
mItemID = fopAcM_createItemForPresentDemo(&current.pos, itemNo, 0, -1, -1, NULL, NULL); mItemID = fopAcM_createItemForPresentDemo(&current.pos, itemNo, 0, -1, -1, NULL, NULL);
if (mItemID != fpcM_ERROR_PROCESS_ID_e) { if (mItemID != fpcM_ERROR_PROCESS_ID_e) {
-14
View File
@@ -9,10 +9,6 @@
#include "d/actor/d_a_e_ym.h" #include "d/actor/d_a_e_ym.h"
#include <cstring> #include <cstring>
#if TARGET_PC
#include "dusk/randomizer/game/verify_item_functions.h"
#endif
static DUSK_CONSTEXPR int l_bmdData[2][2] = { static DUSK_CONSTEXPR int l_bmdData[2][2] = {
{35, 1}, {35, 1},
{18, 2}, {18, 2},
@@ -1185,16 +1181,6 @@ int daNpc_Kkri_c::talk(void*) {
switch (eventId) { switch (eventId) {
case 1: case 1:
if (mItemPartnerId == fpcM_ERROR_PROCESS_ID_e) { if (mItemPartnerId == fpcM_ERROR_PROCESS_ID_e) {
#if TARGET_PC
if (randomizer_IsActive()) {
if (item_no == dItemNo_OIL_BOTTLE3_e) {
item_no = verifyProgressiveItem(randomizer_getItemAtLocation("Coro Bottle"));
randomizer_setTempFlagForLocation("Coro Bottle");
} /*else if (item_no == dItemNo_SMALL_KEY_e) { // Might be Small Key 2
item_no = verifyProgressiveItem(randomizer_getItemAtLocation("Coro Gate Key"));
}*/
}
#endif
mItemPartnerId = fopAcM_createItemForPresentDemo(&current.pos, item_no, 0, -1, -1, NULL, NULL); mItemPartnerId = fopAcM_createItemForPresentDemo(&current.pos, item_no, 0, -1, -1, NULL, NULL);
} }
-10
View File
@@ -9,10 +9,6 @@
#include "d/actor/d_a_tag_push.h" #include "d/actor/d_a_tag_push.h"
#include <cstring> #include <cstring>
#if TARGET_PC
#include "dusk/randomizer/game/verify_item_functions.h"
#endif
enum Type { enum Type {
/* 0x0 */ TYPE_0, /* 0x0 */ TYPE_0,
/* 0x1 */ TYPE_1, /* 0x1 */ TYPE_1,
@@ -1240,12 +1236,6 @@ int daNpc_Len_c::talk(void* param_0) {
switch (evt_id) { switch (evt_id) {
case 1: case 1:
if (mItemPartnerId == -1) { if (mItemPartnerId == -1) {
#if TARGET_PC
if (randomizer_IsActive()) {
local_18 = verifyProgressiveItem(randomizer_getItemAtLocation("Renados Letter"));
randomizer_setTempFlagForLocation("Renados Letter");
}
#endif
mItemPartnerId = fopAcM_createItemForPresentDemo(&current.pos, local_18, mItemPartnerId = fopAcM_createItemForPresentDemo(&current.pos, local_18,
0, -1, -1, 0, 0); 0, -1, -1, 0, 0);
} }
-8
View File
@@ -17,9 +17,6 @@
#include "d/d_com_static.h" #include "d/d_com_static.h"
#include "d/d_item.h" #include "d/d_item.h"
#include "d/d_timer.h" #include "d/d_timer.h"
#if TARGET_PC
#include "dusk/randomizer/game/verify_item_functions.h"
#endif
#if DEBUG #if DEBUG
#include "d/d_debug_viewer.h" #include "d/d_debug_viewer.h"
#include <cstring> #include <cstring>
@@ -2396,11 +2393,6 @@ int daNpc_Maro_c::cutArrowTutorial(int arg0) {
switch (evt_ret) { switch (evt_ret) {
case 1: { case 1: {
if (mItemPartnerId == -1) { if (mItemPartnerId == -1) {
#if TARGET_PC
if (randomizer_IsActive()) {
evt_id = verifyProgressiveItem(randomizer_getItemAtLocation("Talo Sharpshooting"));
}
#endif
mItemPartnerId = fopAcM_createItemForPresentDemo(&current.pos, evt_id, 0, -1, -1, NULL, NULL); mItemPartnerId = fopAcM_createItemForPresentDemo(&current.pos, evt_id, 0, -1, -1, NULL, NULL);
} }
-10
View File
@@ -11,10 +11,6 @@
#include "Z2AudioLib/Z2Instances.h" #include "Z2AudioLib/Z2Instances.h"
#include <cstring> #include <cstring>
#if TARGET_PC
#include "dusk/randomizer/game/verify_item_functions.h"
#endif
enum { enum {
NUM_EVT_CUTS_e = 5, NUM_EVT_CUTS_e = 5,
}; };
@@ -1195,12 +1191,6 @@ int daNpc_myna2_c::ECut_gameGoalSuccess(int i_staffId) {
case 20: { case 20: {
int itemNo = 0; int itemNo = 0;
if (mFlow.getEventId(&itemNo) == 1) { if (mFlow.getEventId(&itemNo) == 1) {
#if TARGET_PC
// If plumm tries giving us the heart piece, give the randomized item instead
if (randomizer_IsActive() && itemNo == dItemNo_KAKERA_HEART_e) {
itemNo = verifyProgressiveItem(randomizer_getItemAtLocation("Plumm Fruit Balloon Minigame"));
}
#endif
mItemPid = fopAcM_createItemForPresentDemo(&current.pos, itemNo, 0, -1, -1, NULL, NULL); mItemPid = fopAcM_createItemForPresentDemo(&current.pos, itemNo, 0, -1, -1, NULL, NULL);
} }
break; break;
+1 -19
View File
@@ -8,12 +8,6 @@
#include "d/actor/d_a_npc_pouya.h" #include "d/actor/d_a_npc_pouya.h"
#include <cstring> #include <cstring>
#if TARGET_PC
#include "dusk/randomizer/game/flags.h"
#include "dusk/randomizer/game/randomizer_context.hpp"
#include "dusk/randomizer/game/verify_item_functions.h"
#endif
const daNpc_Pouya_HIOParam daNpc_Pouya_Param_c::m = { const daNpc_Pouya_HIOParam daNpc_Pouya_Param_c::m = {
120.0f, // attention_offset 120.0f, // attention_offset
-3.0f, // gravity -3.0f, // gravity
@@ -560,8 +554,7 @@ BOOL daNpc_Pouya_c::checkChangeEvt() {
evtChange(); evtChange();
return TRUE; return TRUE;
} }
// In randomizer, only get the 60 reward if we've already gotten the 20 reward if (dComIfGs_getPohSpiritNum() >= 60) {
if (dComIfGs_getPohSpiritNum() >= 60 IF_DUSK(&& randomizer_IsActive() && dComIfGs_isEventBit(GOT_BOTTLE_FROM_JOVANI))) {
/* dSv_event_flag_c::F_0458 - Coversation with Jovani after collecting 60 ghosts /* dSv_event_flag_c::F_0458 - Coversation with Jovani after collecting 60 ghosts
*/ */
if (!daNpcT_chkEvtBit(0x1CA)) { if (!daNpcT_chkEvtBit(0x1CA)) {
@@ -965,17 +958,6 @@ int daNpc_Pouya_c::cutHaveFavorToAsk(int param_0) {
switch (evt_id) { switch (evt_id) {
case 1: case 1:
if (mItemPartnerId == fpcM_ERROR_PROCESS_ID_e) { if (mItemPartnerId == fpcM_ERROR_PROCESS_ID_e) {
#if TARGET_PC
if (randomizer_IsActive()) {
if (local_64 == dItemNo_Randomizer_DROP_BOTTLE_e) {
local_64 = verifyProgressiveItem(randomizer_getItemAtLocation("Jovani 20 Poe Soul Reward"));
randomizer_setTempFlagForLocation("Jovani 20 Poe Soul Reward");
} else if (local_64 == dItemNo_Randomizer_SILVER_RUPEE_e) {
local_64 = verifyProgressiveItem(randomizer_getItemAtLocation("Jovani 60 Poe Soul Reward"));
randomizer_setTempFlagForLocation("Jovani 60 Poe Soul Reward");
}
}
#endif
mItemPartnerId = fopAcM_createItemForPresentDemo(&current.pos, local_64, 0, mItemPartnerId = fopAcM_createItemForPresentDemo(&current.pos, local_64, 0,
-1, -1, 0, 0); -1, -1, 0, 0);
} }
-9
View File
@@ -7,9 +7,6 @@
#include "d/actor/d_a_npc_prayer.h" #include "d/actor/d_a_npc_prayer.h"
#include "d/d_com_inf_game.h" #include "d/d_com_inf_game.h"
#if TARGET_PC
#include "dusk/randomizer/game/verify_item_functions.h"
#endif
static NPC_PRAY_HIO_CLASS l_HIO; static NPC_PRAY_HIO_CLASS l_HIO;
@@ -723,12 +720,6 @@ fpc_ProcID daNpcPray_c::createHeart() {
mDoMtx_stack_c::ZXYrotS(rot); mDoMtx_stack_c::ZXYrotS(rot);
mDoMtx_stack_c::multVec(&offset, &offset); mDoMtx_stack_c::multVec(&offset, &offset);
pos += offset; pos += offset;
#if TARGET_PC
if (randomizer_IsActive()) {
u8 itemId = verifyProgressiveItem(randomizer_getItemAtLocation("Charlo Donation Blessing"));
return fopAcM_createItemForBoss(&pos, itemId, fopAcM_GetRoomNo(this), &rot, &size, 0.0f, 0.0f, 0);
}
#endif
return fopAcM_createItemForBoss(&pos, dItemNo_KAKERA_HEART_e, fopAcM_GetRoomNo(this), &rot, &size, 0.0f, 0.0f, 0); return fopAcM_createItemForBoss(&pos, dItemNo_KAKERA_HEART_e, fopAcM_GetRoomNo(this), &rot, &size, 0.0f, 0.0f, 0);
} }
+1 -23
View File
@@ -10,11 +10,6 @@
#include "d/d_debug_viewer.h" #include "d/d_debug_viewer.h"
#include <cstring> #include <cstring>
#if TARGET_PC
#include "dusk/randomizer/game/verify_item_functions.h"
#include "dusk/randomizer/game/flags.h"
#endif
static DUSK_CONSTEXPR daNpc_GetParam2 l_bckGetParamList[29] = { static DUSK_CONSTEXPR daNpc_GetParam2 l_bckGetParamList[29] = {
{-1, 2, 0}, {-1, 2, 0},
{9, 0, 0}, {9, 0, 0},
@@ -199,12 +194,7 @@ int daNpcRafrel_c::Create() {
mType = 0; mType = 0;
} else if (strcmp(dComIfGp_getStartStageName(), "F_SP115") == 0 && dComIfGp_getStartStageRoomNo() == 0) { } else if (strcmp(dComIfGp_getStartStageName(), "F_SP115") == 0 && dComIfGp_getStartStageRoomNo() == 0) {
#if TARGET_PC if (daNpcF_chkEvtBit(0x169) || !daNpcF_chkEvtBit(0x108)) {
// Only despawn Auru in randomizer if we already collected his item
if ((randomizer_IsActive() ? dComIfGs_isEventBit(GOT_AURUS_MEMO) : daNpcF_chkEvtBit(0x169)) || !daNpcF_chkEvtBit(0x108)) {
#else
if ( daNpcF_chkEvtBit(0x169) || !daNpcF_chkEvtBit(0x108)) {
#endif
return cPhs_ERROR_e; return cPhs_ERROR_e;
} }
@@ -1320,12 +1310,6 @@ bool daNpcRafrel_c::talk(void* param_0) {
OS_REPORT("会話終了時 イベントID=%d アイテムNo=%d\n", eventId, itemNo); OS_REPORT("会話終了時 イベントID=%d アイテムNo=%d\n", eventId, itemNo);
if (eventId == 1) { if (eventId == 1) {
#if TARGET_PC
if (randomizer_IsActive()) {
itemNo = verifyProgressiveItem(randomizer_getItemAtLocation("Auru Gift To Fyer"));
randomizer_setTempFlagForLocation("Auru Gift To Fyer");
}
#endif
field_0xe00 = fopAcM_createItemForPresentDemo(&current.pos, itemNo, 0, -1, -1, NULL, NULL); field_0xe00 = fopAcM_createItemForPresentDemo(&current.pos, itemNo, 0, -1, -1, NULL, NULL);
if (field_0xe00 != fpcM_ERROR_PROCESS_ID_e) { if (field_0xe00 != fpcM_ERROR_PROCESS_ID_e) {
s16 eventIdx = dComIfGp_getEventManager().getEventIdx(this, "DEFAULT_GETITEM", 0xFF); s16 eventIdx = dComIfGp_getEventManager().getEventIdx(this, "DEFAULT_GETITEM", 0xFF);
@@ -1578,12 +1562,6 @@ int daNpcRafrel_c::EvCut_Appear(int i_staffId) {
int itemNo = 0; int itemNo = 0;
u16 eventId = mFlow.getEventId(&itemNo); u16 eventId = mFlow.getEventId(&itemNo);
if (eventId == 1) { if (eventId == 1) {
#if TARGET_PC
if (randomizer_IsActive()) {
itemNo = verifyProgressiveItem(randomizer_getItemAtLocation("Auru Gift To Fyer"));
randomizer_setTempFlagForLocation("Auru Gift To Fyer");
}
#endif
field_0xe00 = fopAcM_createItemForPresentDemo(&current.pos, itemNo, 0, -1, -1, NULL, NULL); field_0xe00 = fopAcM_createItemForPresentDemo(&current.pos, itemNo, 0, -1, -1, NULL, NULL);
dComIfGp_event_setItemPartnerId(field_0xe00); dComIfGp_event_setItemPartnerId(field_0xe00);
field_0xe00 = fpcM_ERROR_PROCESS_ID_e; field_0xe00 = fpcM_ERROR_PROCESS_ID_e;
+3 -14
View File
@@ -356,25 +356,15 @@ cPhs_Step daNpcShad_c::Create() {
mMode = 0; mMode = 0;
} else { } else {
if (strcmp(dComIfGp_getStartStageName(), "R_SP209") == 0) { if (strcmp(dComIfGp_getStartStageName(), "R_SP209") == 0) {
#if TARGET_PC
if ((daNpcF_chkEvtBit(0x311) && !randomizer_IsActive()) ||
(daNpcF_chkEvtBit(0x333) && randomizer_IsActive())) { // Check custom flag before spawning
#else
if (daNpcF_chkEvtBit(0x311)) { if (daNpcF_chkEvtBit(0x311)) {
#endif
return cPhs_ERROR_e; return cPhs_ERROR_e;
} }
#if TARGET_PC
if (!randomizer_IsActive() &&
(!daNpcF_chkEvtBit(0x10B) || (daNpcF_chkEvtBit(0x12E) && !daNpcF_chkEvtBit(0x31C)))) {
#else
if (!daNpcF_chkEvtBit(0x10B) || (daNpcF_chkEvtBit(0x12E) && !daNpcF_chkEvtBit(0x31C))) { if (!daNpcF_chkEvtBit(0x10B) || (daNpcF_chkEvtBit(0x12E) && !daNpcF_chkEvtBit(0x31C))) {
#endif
return cPhs_ERROR_e; return cPhs_ERROR_e;
} }
if (daNpcF_chkEvtBit(0x12F) IF_DUSK(&& !randomizer_IsActive())) { if (daNpcF_chkEvtBit(0x12F)) {
if (!daNpcF_chkEvtBit(0x312)) { if (!daNpcF_chkEvtBit(0x312)) {
if (getPathPoint(getPathID(), 1, &home.pos)) { if (getPathPoint(getPathID(), 1, &home.pos)) {
current.pos = home.pos; current.pos = home.pos;
@@ -1346,8 +1336,7 @@ bool daNpcShad_c::wait_type1(void* param_1) {
} }
u8 sVar1 = dComIfGp_event_getPreItemNo(); u8 sVar1 = dComIfGp_event_getPreItemNo();
// In randomizer we want Shad to give us the dominion rod check no matter which skybook we have. if (sVar1 == 0xE9) {
if (sVar1 == 0xE9 IF_DUSK(|| (randomizer_IsActive() && sVar1 >= 0xE9))) {
field_0xe14 = 64; field_0xe14 = 64;
daNpcF_offTmpBit(0xB); daNpcF_offTmpBit(0xB);
daNpcF_offTmpBit(0xC); daNpcF_offTmpBit(0xC);
@@ -1355,7 +1344,7 @@ bool daNpcShad_c::wait_type1(void* param_1) {
daNpcF_offTmpBit(0xE); daNpcF_offTmpBit(0xE);
mOrderEvtNo = 3; mOrderEvtNo = 3;
changeEvent(l_evtArcs[mOrderEvtNo], l_evtNames[mOrderEvtNo], 1, 0xFFFF); changeEvent(l_evtArcs[mOrderEvtNo], l_evtNames[mOrderEvtNo], 1, 0xFFFF);
} else if (sVar1 == 0xEB IF_DUSK(&& !randomizer_IsActive())) { } else if (sVar1 == 0xEB) {
field_0xe14 = 65; field_0xe14 = 65;
daNpcF_offTmpBit(0xB); daNpcF_offTmpBit(0xB);
daNpcF_offTmpBit(0xC); daNpcF_offTmpBit(0xC);
-9
View File
@@ -12,10 +12,6 @@
#include "SSystem/SComponent/c_math.h" #include "SSystem/SComponent/c_math.h"
#include <cstring> #include <cstring>
#if TARGET_PC
#include "dusk/randomizer/game/verify_item_functions.h"
#endif
const daNpcThe_HIOParam daNpcThe_Param_c::m = { const daNpcThe_HIOParam daNpcThe_Param_c::m = {
220.0f, // attention_offset 220.0f, // attention_offset
-3.0f, // gravity -3.0f, // gravity
@@ -827,11 +823,6 @@ BOOL daNpcThe_c::talk(void* param_0) {
} }
int item_no = 0; int item_no = 0;
if (mFlow.getEventId(&item_no) == 1) { if (mFlow.getEventId(&item_no) == 1) {
#if TARGET_PC
if (randomizer_IsActive()) {
item_no = verifyProgressiveItem(randomizer_getItemAtLocation("Telma Invoice"));
}
#endif
mItemID = fopAcM_createItemForPresentDemo(&current.pos, item_no, 0, -1, -1, mItemID = fopAcM_createItemForPresentDemo(&current.pos, item_no, 0, -1, -1,
NULL, NULL); NULL, NULL);
if (mItemID != -1) { if (mItemID != -1) {
-6
View File
@@ -1165,12 +1165,6 @@ int daNpc_Uri_c::cutEndCarryTutorial(int param_1) {
(s32)mFlow.getEventId(&local_48) == 1) (s32)mFlow.getEventId(&local_48) == 1)
{ {
if (mItemPartnerId == fpcM_ERROR_PROCESS_ID_e) { if (mItemPartnerId == fpcM_ERROR_PROCESS_ID_e) {
#if TARGET_PC
if (randomizer_IsActive()) {
local_48 = randomizer_getItemAtLocation("Uli Cradle Delivery");
randomizer_setTempFlagForLocation("Uli Cradle Delivery");
}
#endif
mItemPartnerId = mItemPartnerId =
fopAcM_createItemForPresentDemo(&current.pos, local_48, 0, -1, -1, NULL, NULL); fopAcM_createItemForPresentDemo(&current.pos, local_48, 0, -1, -1, NULL, NULL);
} }
-8
View File
@@ -9,10 +9,7 @@
#include "d/actor/d_a_demo_item.h" #include "d/actor/d_a_demo_item.h"
#include <cstring> #include <cstring>
#if TARGET_PC
#include "dusk/string.hpp" #include "dusk/string.hpp"
#include "dusk/randomizer/game/tools.h"
#endif
static DUSK_CONSTEXPR daNpc_GetParam1 l_bmdData[3] = { static DUSK_CONSTEXPR daNpc_GetParam1 l_bmdData[3] = {
{3, 1}, {3, 1},
@@ -1129,11 +1126,6 @@ BOOL daNpc_Yelia_c::cutTakeWoodStatue(int i_staffId) {
if (prm == 99) { if (prm == 99) {
daNpcT_onEvtBit(0x11f); daNpcT_onEvtBit(0x11f);
daNpcT_onEvtBit(0x17a); daNpcT_onEvtBit(0x17a);
#if TARGET_PC
if (randomizer_IsActive()) {
offWarashibeItem(dItemNo_Randomizer_WOOD_STATUE_e); // Unset the statue item so it doesn't appear in the item wheel.
} else
#endif
dComIfGs_setWarashibeItem(0xff); dComIfGs_setWarashibeItem(0xff);
daNpcT_offTmpBit(0xb); daNpcT_offTmpBit(0xb);
daNpcT_offTmpBit(0xc); daNpcT_offTmpBit(0xc);
-3
View File
@@ -947,9 +947,6 @@ BOOL daNpc_ykM_c::isDelete() {
return FALSE; return FALSE;
case TYPE_COOK: case TYPE_COOK:
#if TARGET_PC
if (randomizer_IsActive()) return false; // We don't want cooking Yeto to leave the dungeon, even if the BK is obtained.
#endif
return dComIfGs_isDungeonItemBossKey(); return dComIfGs_isDungeonItemBossKey();
case TYPE_2: case TYPE_2:
-17
View File
@@ -20,10 +20,7 @@
#include "m_Do/m_Do_ext.h" #include "m_Do/m_Do_ext.h"
#include <cstring> #include <cstring>
#if TARGET_PC
#include "dusk/string.hpp" #include "dusk/string.hpp"
#include "dusk/randomizer/game/verify_item_functions.h"
#endif
#if DEBUG #if DEBUG
class daNpc_ykW_HIO_c : public mDoHIO_entry_c { class daNpc_ykW_HIO_c : public mDoHIO_entry_c {
@@ -578,9 +575,6 @@ int daNpc_ykW_c::isDelete() {
case 0: case 0:
return 0; return 0;
case 1: case 1:
#if TARGET_PC
if (randomizer_IsActive()) return false;// We don't want Yeta to leave the dungeon, even if the BK is obtained.
#endif
return dComIfGs_isDungeonItemBossKey(); return dComIfGs_isDungeonItemBossKey();
case 2: case 2:
return !dComIfGs_isDungeonItemBossKey() || return !dComIfGs_isDungeonItemBossKey() ||
@@ -2219,11 +2213,6 @@ int daNpc_ykW_c::cutEndSnowboardRace(int param_0) {
switch (eventId) { switch (eventId) {
case 1: case 1:
if (mItemPartnerId == fpcM_ERROR_PROCESS_ID_e) { if (mItemPartnerId == fpcM_ERROR_PROCESS_ID_e) {
#if TARGET_PC
if (randomizer_IsActive()) {
itemId = verifyProgressiveItem(randomizer_getItemAtLocation("Snowboard Racing Prize"));
}
#endif
mItemPartnerId = fopAcM_createItemForPresentDemo(&current.pos, itemId, 0, mItemPartnerId = fopAcM_createItemForPresentDemo(&current.pos, itemId, 0,
-1, -1, 0, 0); -1, -1, 0, 0);
} }
@@ -2922,12 +2911,6 @@ int daNpc_ykW_c::talk(void* param_0) {
switch (eventId) { switch (eventId) {
case 1: case 1:
if (mItemPartnerId == fpcM_ERROR_PROCESS_ID_e) { if (mItemPartnerId == fpcM_ERROR_PROCESS_ID_e) {
#if TARGET_PC
if (randomizer_IsActive()) {
itemNo = verifyProgressiveItem(randomizer_getItemAtLocation("Snowpeak Ruins Mansion Map"));
randomizer_setTempFlagForLocation("Snowpeak Ruins Mansion Map");
}
#endif
mItemPartnerId = mItemPartnerId =
fopAcM_createItemForPresentDemo(&current.pos, itemNo, 0, -1, -1, 0, 0); fopAcM_createItemForPresentDemo(&current.pos, itemNo, 0, -1, -1, 0, 0);
} }
-4
View File
@@ -20,10 +20,6 @@
#include "d/actor/d_a_obj_zraMark.h" #include "d/actor/d_a_obj_zraMark.h"
#include <cstring> #include <cstring>
#if TARGET_PC
#include "dusk/randomizer/game/verify_item_functions.h"
#endif
static NPC_ZRA_HIO_CLASS l_HIO; static NPC_ZRA_HIO_CLASS l_HIO;
daNpc_zrA_HIOParam const daNpc_zrA_Param_c::m = { daNpc_zrA_HIOParam const daNpc_zrA_Param_c::m = {
-12
View File
@@ -2609,18 +2609,6 @@ BOOL daNpc_zrA_c::ECut_thanksBlast(int i_staffID) {
case 31: { case 31: {
int item_id = 0; int item_id = 0;
if (mFlow.getEventId(&item_id) == 1) { if (mFlow.getEventId(&item_id) == 1) {
#if TARGET_PC
if (randomizer_IsActive()) {
if (item_id == dItemNo_Randomizer_BOMB_IN_BAG_e) {
item_id = verifyProgressiveItem(randomizer_getItemAtLocation("Iza Helping Hand"));
randomizer_setTempFlagForLocation("Iza Helping Hand");
} else if (item_id == dItemNo_Randomizer_BOMB_BAG_LV2_e) {
item_id = verifyProgressiveItem(randomizer_getItemAtLocation("Iza Raging Rapids Minigame"));
randomizer_setTempFlagForLocation("Iza Raging Rapids Minigame");
}
}
#endif
mItemID = fopAcM_createItemForPresentDemo(&current.pos, item_id, mItemID = fopAcM_createItemForPresentDemo(&current.pos, item_id,
0, -1, -1, NULL, NULL); 0, -1, -1, NULL, NULL);
} }
-13
View File
@@ -10,9 +10,6 @@
#include "SSystem/SComponent/c_math.h" #include "SSystem/SComponent/c_math.h"
#include "JSystem/J3DGraphBase/J3DMaterial.h" #include "JSystem/J3DGraphBase/J3DMaterial.h"
#include "Z2AudioLib/Z2Instances.h" #include "Z2AudioLib/Z2Instances.h"
#if TARGET_PC
#include "dusk/randomizer/game/verify_item_functions.h"
#endif
enum Event_Cut_Nums { enum Event_Cut_Nums {
/* 0x2 */ NUM_EVT_CUTS_e = 0x2, /* 0x2 */ NUM_EVT_CUTS_e = 0x2,
@@ -885,11 +882,7 @@ u8 daNpc_zrC_c::getTypeFromParam() {
int daNpc_zrC_c::isDelete() { int daNpc_zrC_c::isDelete() {
if (mType == 4 || mType == 0 || mType == 1 || (mType == 2 && daNpcF_chkEvtBit(0x108) if (mType == 4 || mType == 0 || mType == 1 || (mType == 2 && daNpcF_chkEvtBit(0x108)
#if TARGET_PC
&& (!daNpcF_chkEvtBit(0x10A) || randomizer_IsActive())) || mType == 3)
#else
&& !daNpcF_chkEvtBit(0x10A)) || mType == 3) && !daNpcF_chkEvtBit(0x10A)) || mType == 3)
#endif
{ {
return false; return false;
} }
@@ -1688,12 +1681,6 @@ BOOL daNpc_zrC_c::ECut_earringGet(int i_staffID) {
case 40: { case 40: {
int item_no = 0; int item_no = 0;
if (mFlow.getEventId(&item_no) == 1) { if (mFlow.getEventId(&item_no) == 1) {
#if TARGET_PC
if (randomizer_IsActive()) {
item_no = verifyProgressiveItem(randomizer_getItemAtLocation("Gift From Ralis"));
randomizer_setTempFlagForLocation("Gift From Ralis");
}
#endif
mItemID = fopAcM_createItemForPresentDemo(&current.pos, item_no, mItemID = fopAcM_createItemForPresentDemo(&current.pos, item_no,
0, -1, -1, NULL, NULL); 0, -1, -1, NULL, NULL);
} }
+1 -17
View File
@@ -14,11 +14,6 @@
#include "Z2AudioLib/Z2Instances.h" #include "Z2AudioLib/Z2Instances.h"
#include <cstring> #include <cstring>
#if TARGET_PC
#include "dusk/randomizer/game/flags.h"
#include "dusk/randomizer/game/verify_item_functions.h"
#endif
static NPC_ZRZ_HIO_CLASS l_HIO; static NPC_ZRZ_HIO_CLASS l_HIO;
daNpc_zrZ_HIOParam const daNpc_zrZ_Param_c::m = { daNpc_zrZ_HIOParam const daNpc_zrZ_Param_c::m = {
@@ -897,12 +892,7 @@ BOOL daNpc_zrZ_c::isDelete() {
if (((mDemoMode == DEMO_COME_HERE || mDemoMode == DEMO_WAIT) if (((mDemoMode == DEMO_COME_HERE || mDemoMode == DEMO_WAIT)
&& dComIfGs_isSwitch(mSwitch1, fopAcM_GetRoomNo(this))) && dComIfGs_isSwitch(mSwitch1, fopAcM_GetRoomNo(this)))
|| (mDemoMode == DEMO_COME_HERE_2 && (!dComIfGs_isSwitch(mSwitch1, fopAcM_GetRoomNo(this)) || (mDemoMode == DEMO_COME_HERE_2 && (!dComIfGs_isSwitch(mSwitch1, fopAcM_GetRoomNo(this))
#if TARGET_PC || dComIfGs_isSwitch(mSwitch2, fopAcM_GetRoomNo(this)))))
// Don't delete Rutela in the graveyard until we've picked up Rutelas Blessing in rando
|| (dComIfGs_isSwitch(mSwitch2, fopAcM_GetRoomNo(this)) && (!randomizer_IsActive() || dComIfGs_isEventBit(GOT_ZORA_ARMOR_FROM_RUTELA))))))
#else
|| dComIfGs_isSwitch(mSwitch2, fopAcM_GetRoomNo(this)))))
#endif
{ {
return true; return true;
} else { } else {
@@ -1739,12 +1729,6 @@ BOOL daNpc_zrZ_c::ECut_clothesGet(int i_staffID) {
} }
item_no = 0; item_no = 0;
if (mFlow.getEventId(&item_no) == 1) { if (mFlow.getEventId(&item_no) == 1) {
#if TARGET_PC
if (randomizer_IsActive()) {
item_no = verifyProgressiveItem(randomizer_getItemAtLocation("Rutelas Blessing"));
randomizer_setTempFlagForLocation("Rutelas Blessing");
}
#endif
mItemID = fopAcM_createItemForPresentDemo(&current.pos, item_no, mItemID = fopAcM_createItemForPresentDemo(&current.pos, item_no,
0, -1, -1, NULL, NULL); 0, -1, -1, NULL, NULL);
} }
-37
View File
@@ -7,9 +7,6 @@
#include "d/actor/d_a_obj_Lv5Key.h" #include "d/actor/d_a_obj_Lv5Key.h"
#include "d/d_com_inf_game.h" #include "d/d_com_inf_game.h"
#if TARGET_PC
#include "d/d_map.h"
#endif
static int useHeapInit(fopAc_ac_c*); static int useHeapInit(fopAc_ac_c*);
@@ -116,40 +113,6 @@ void daObjLv5Key_c::Action() {
} }
void daObjLv5Key_c::Wait(int param_0) { void daObjLv5Key_c::Wait(int param_0) {
#if TARGET_PC
if (randomizer_IsActive()) {
// Prevent softlock that occurs when opening a locked door from behind.
// This patch compares z and x pos depending on yRot and turns the lock to face the player.
Vec player_pos = dMapInfo_n::getMapPlayerPos();
const s32 collisionRotY = shape_angle.y;
float* playerAxisPos = NULL;
float* lockPos = NULL;
if (collisionRotY & 0x4000) {
playerAxisPos = &player_pos.x;
lockPos = &current.pos.x;
} else {
playerAxisPos = &player_pos.z;
lockPos = &current.pos.z;
}
bool swapSides = false;
if (collisionRotY & 0x8000 && *playerAxisPos > *lockPos + 17.f) {
*lockPos += 34.f;
swapSides = true;
} else if (!(collisionRotY & 0x8000) && *playerAxisPos < *lockPos - 17.f) {
*lockPos -= 34.f;
swapSides = true;
}
if (swapSides) {
shape_angle.y ^= 0x8000;
current.angle.y ^= 0x8000;
}
}
#endif
switch (mMode) { switch (mMode) {
case -1: case -1:
break; break;
-7
View File
@@ -506,13 +506,6 @@ int daObjBossWarp_c::demoProc() {
mDoMtx_stack_c::multVec(&mYstoneTargetPos, &mYstoneTargetPos); mDoMtx_stack_c::multVec(&mYstoneTargetPos, &mYstoneTargetPos);
mYstonePos.x = mYstoneTargetPos.x; mYstonePos.x = mYstoneTargetPos.x;
mYstonePos.z = mYstoneTargetPos.z; mYstonePos.z = mYstoneTargetPos.z;
#if TARGET_PC
// Skip giving the vanilla dungeon reward in rando
if (randomizer_IsActive()) {
mCounter = 0;
break;
}
#endif
switch (getNowLevel()) { switch (getNowLevel()) {
case 0: case 0:
dComIfGs_onCollectCrystal(0); dComIfGs_onCollectCrystal(0);
+4 -27
View File
@@ -155,12 +155,6 @@ void daObjCRVGATE_c::Demo_Set() {
} }
void daObjCRVGATE_c::SetOpen() { void daObjCRVGATE_c::SetOpen() {
#if TARGET_PC
u8 doorUnlockedFlag = (fopAcM_GetParam(this) & 0xFFFF) >> 8;
if (doorUnlockedFlag != 0xFF) {
fopAcM_onSwitch(this, doorUnlockedFlag);
}
#endif
mStatus = 0x0; mStatus = 0x0;
} }
@@ -652,8 +646,6 @@ void daObjCRVGATE_c::setBaseMtx() {
mDoMtx_stack_c::transM(0.0f, nREG_F(5) + 55.0f, 0.0f); mDoMtx_stack_c::transM(0.0f, nREG_F(5) + 55.0f, 0.0f);
} }
// Don't update the key model if it's not there
IF_DUSK(if (mpModelKey != NULL))
mpModelKey->setBaseTRMtx(mDoMtx_stack_c::get()); mpModelKey->setBaseTRMtx(mDoMtx_stack_c::get());
mDoMtx_stack_c::transS(current.pos); mDoMtx_stack_c::transS(current.pos);
mDoMtx_stack_c::ZXYrotM(shape_angle); mDoMtx_stack_c::ZXYrotM(shape_angle);
@@ -683,13 +675,7 @@ int daObjCRVGATE_c::CreateHeap() {
} }
J3DModelData* model_data_key; J3DModelData* model_data_key;
if (mKeyParam == 0x00) {
// Don't draw the key model if the flag for the door being unlocked
// was set. This is currently only used in rando
#if TARGET_PC
u8 doorUnlockedFlag = (fopAcM_GetParam(this) & 0xFFFF) >> 8;
#endif
if (mKeyParam == 0x00 IF_DUSK(&& doorUnlockedFlag != 0xFF && fopAcM_isSwitch(this, doorUnlockedFlag) == 0)) {
model_data_key = (J3DModelData*)dComIfG_getObjectRes(l_arcName, "CaravanKey.bmd"); model_data_key = (J3DModelData*)dComIfG_getObjectRes(l_arcName, "CaravanKey.bmd");
mpModelKey = mDoExt_J3DModel__create(model_data_key, 0x80000, 0x11000084); mpModelKey = mDoExt_J3DModel__create(model_data_key, 0x80000, 0x11000084);
} }
@@ -718,8 +704,7 @@ void daObjCRVGATE_c::SetDoor() {
mKeyParam = 0x01; mKeyParam = 0x01;
// Create the second (identical) part of the door (swinging gate). // Create the second (identical) part of the door (swinging gate).
// Pass along the flag for having unlocked the door mDoorPairProcID = fopAcM_createChild(fpcNm_Obj_CRVGATE_e, fopAcM_GetID(this), 1, &child_pos,
mDoorPairProcID = fopAcM_createChild(fpcNm_Obj_CRVGATE_e, fopAcM_GetID(this), IF_DUSK(fopAcM_GetParam(this) && 0xFFFFFF00 |) 1, &child_pos,
fopAcM_GetRoomNo(this), &child_angle, NULL, -1, 0); fopAcM_GetRoomNo(this), &child_angle, NULL, -1, 0);
mDoorY = shape_angle.y; mDoorY = shape_angle.y;
} else { } else {
@@ -777,14 +762,6 @@ int daObjCRVGATE_c::create() {
mFlagGateClosed = false; mFlagGateClosed = false;
field_0x5a5 = false; field_0x5a5 = false;
#if TARGET_PC
// Immediately set the door to open if the flag for it open is set
u8 doorUnlockedFlag = (fopAcM_GetParam(this) & 0xFFFF) >> 8;
if (mKeyParam == 0 && doorUnlockedFlag != 0xFF && fopAcM_isSwitch(this, doorUnlockedFlag)) {
SetOpen();
mpDoorPair->SetOpen();
}
#endif
daObjCRVGATE_Execute(this); daObjCRVGATE_Execute(this);
} }
@@ -831,14 +808,14 @@ int daObjCRVGATE_c::Execute(Mtx** param_0) {
int daObjCRVGATE_c::Draw() { int daObjCRVGATE_c::Draw() {
g_env_light.settingTevStruct(8, &current.pos, &tevStr); g_env_light.settingTevStruct(8, &current.pos, &tevStr);
g_env_light.setLightTevColorType_MAJI(mpModelGate, &tevStr); g_env_light.setLightTevColorType_MAJI(mpModelGate, &tevStr);
if (mKeyParam == 0x01 IF_DUSK(&& mpModelKey != NULL)) { if (mKeyParam == 0x01) {
g_env_light.setLightTevColorType_MAJI(mpModelKey, &tevStr); g_env_light.setLightTevColorType_MAJI(mpModelKey, &tevStr);
} }
dComIfGd_setListBG(); dComIfGd_setListBG();
mDoExt_modelUpdateDL(mpModelGate); mDoExt_modelUpdateDL(mpModelGate);
if (mKeyParam == 0x01 IF_DUSK(&& mpModelKey != NULL)) { if (mKeyParam == 0x01) {
mDoExt_modelUpdateDL(mpModelKey); mDoExt_modelUpdateDL(mpModelKey);
} }
-12
View File
@@ -12,11 +12,6 @@
#include "d/d_com_inf_game.h" #include "d/d_com_inf_game.h"
#include <cstring> #include <cstring>
#if TARGET_PC
#include "dusk/randomizer/game/stages.h"
#include "dusk/randomizer/game/tools.h"
#endif
static int daObj_Gb_Draw(obj_gb_class* i_this) { static int daObj_Gb_Draw(obj_gb_class* i_this) {
g_env_light.settingTevStruct(0x10, &i_this->current.pos, &i_this->tevStr); g_env_light.settingTevStruct(0x10, &i_this->current.pos, &i_this->tevStr);
g_env_light.setLightTevColorType_MAJI(i_this->mModel, &i_this->tevStr); g_env_light.setLightTevColorType_MAJI(i_this->mModel, &i_this->tevStr);
@@ -174,13 +169,6 @@ static int useHeapInit(fopAc_ac_c* actor) {
static int daObj_Gb_Create(fopAc_ac_c* actor) { static int daObj_Gb_Create(fopAc_ac_c* actor) {
fopAcM_ct(actor, obj_gb_class); fopAcM_ct(actor, obj_gb_class);
obj_gb_class* i_this = (obj_gb_class*)actor; obj_gb_class* i_this = (obj_gb_class*)actor;
#if TARGET_PC
// Only spawn the added wall in randomizer if it should exist
if (randomizer_IsActive() && getStageID() == StageIDs::Mirror_Chamber &&
!randomizer_mirrorChamberWallShouldExist()) {
return cPhs_ERROR_e;
}
#endif
int rv = dComIfG_resLoad(&i_this->mPhase, "Obj_gb"); int rv = dComIfG_resLoad(&i_this->mPhase, "Obj_gb");
if (rv == cPhs_COMPLEATE_e) { if (rv == cPhs_COMPLEATE_e) {
+55 -243
View File
@@ -5,10 +5,10 @@
#include "d/dolzel.h" // IWYU pragma: keep #include "d/dolzel.h" // IWYU pragma: keep
#include "SSystem/SComponent/c_math.h"
#include "d/actor/d_a_obj_item.h" #include "d/actor/d_a_obj_item.h"
#include "d/actor/d_a_player.h" #include "SSystem/SComponent/c_math.h"
#include "d/d_a_itembase_static.h" #include "d/d_a_itembase_static.h"
#include "d/actor/d_a_player.h"
#include "d/d_com_inf_game.h" #include "d/d_com_inf_game.h"
#include "d/d_item.h" #include "d/d_item.h"
#include "d/d_item_data.h" #include "d/d_item_data.h"
@@ -17,10 +17,6 @@
#include "m_Do/m_Do_mtx.h" #include "m_Do/m_Do_mtx.h"
#if TARGET_PC #if TARGET_PC
#include "d/actor/d_a_alink.h"
#include "dusk/randomizer/game/tools.h"
#include "dusk/randomizer/game/verify_item_functions.h"
#include "dusk/frame_interpolation.h" #include "dusk/frame_interpolation.h"
#endif #endif
@@ -75,7 +71,7 @@ void daItem_c::setBaseMtx() {
if (mpModel != NULL) { if (mpModel != NULL) {
mpModel->setBaseScale(scale); mpModel->setBaseScale(scale);
switch (M_ITEMNO_MODEL_ITEM_ID) { switch (m_itemNo) {
case dItemNo_GREEN_RUPEE_e: case dItemNo_GREEN_RUPEE_e:
case dItemNo_BLUE_RUPEE_e: case dItemNo_BLUE_RUPEE_e:
case dItemNo_YELLOW_RUPEE_e: case dItemNo_YELLOW_RUPEE_e:
@@ -162,8 +158,8 @@ void daItem_c::CreateInit() {
mCcCyl.SetCoHitCallback(itemGetCoCallBack); mCcCyl.SetCoHitCallback(itemGetCoCallBack);
mCcCyl.SetTgHitCallback(itemGetTgCallBack); mCcCyl.SetTgHitCallback(itemGetTgCallBack);
f32 cylHeight = dItem_data::getH(M_ITEMNO_MODEL_ITEM_ID); f32 cylHeight = dItem_data::getH(m_itemNo);
f32 cylRadius = dItem_data::getR(M_ITEMNO_MODEL_ITEM_ID); f32 cylRadius = dItem_data::getR(m_itemNo);
if (scale.x > 1.0f) { if (scale.x > 1.0f) {
cylHeight *= scale.x; cylHeight *= scale.x;
@@ -181,54 +177,6 @@ void daItem_c::CreateInit() {
procInitNormal(); procInitNormal();
show(); show();
#if TARGET_PC
if (randomizer_IsActive()) {
// Adjust item scale based on item ID
switch(M_ITEMNO_MODEL_ITEM_ID)
{
case dItemNo_Randomizer_KAKERA_HEART_e:
case dItemNo_Randomizer_UTAWA_HEART_e:
case dItemNo_Randomizer_ARROW_1_e:
case dItemNo_Randomizer_ARROW_10_e:
case dItemNo_Randomizer_ARROW_20_e:
case dItemNo_Randomizer_ARROW_30_e:
case dItemNo_Randomizer_GREEN_RUPEE_e:
case dItemNo_Randomizer_BLUE_RUPEE_e:
case dItemNo_Randomizer_YELLOW_RUPEE_e:
case dItemNo_Randomizer_RED_RUPEE_e:
case dItemNo_Randomizer_PURPLE_RUPEE_e:
case dItemNo_Randomizer_ORANGE_RUPEE_e:
case dItemNo_Randomizer_SILVER_RUPEE_e:
case dItemNo_Randomizer_HEART_e:
{
mItemScale.setall(1.0f);
break;
}
case dItemNo_Randomizer_BOW_e:
{
mItemScale.setall(1.5f);
break;
}
case dItemNo_Randomizer_MASTER_SWORD_e:
case dItemNo_Randomizer_LIGHT_SWORD_e:
case dItemNo_Randomizer_MIRROR_PIECE_1_e:
case dItemNo_Randomizer_MIRROR_PIECE_2_e:
case dItemNo_Randomizer_MIRROR_PIECE_3_e:
case dItemNo_Randomizer_MIRROR_PIECE_4_e:
{
mItemScale.setall(0.7f);
break;
}
default:
{
mItemScale.setall(2.0f);
break;
}
}
} else
#endif
mItemScale.setall(1.0f); mItemScale.setall(1.0f);
switch (daItem_prm::getType(this)) { switch (daItem_prm::getType(this)) {
@@ -258,9 +206,9 @@ void daItem_c::CreateInit() {
initBaseMtx(); initBaseMtx();
animPlay(1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f); animPlay(1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f);
if (m_itemNo == dItemNo_BOOMERANG_e IF_DUSK(&& !randomizer_IsActive())) { if (m_itemNo == dItemNo_BOOMERANG_e) {
itemGetNextExecute(); itemGetNextExecute();
} else if ((M_ITEMNO_MODEL_ITEM_ID == dItemNo_ORANGE_RUPEE_e || M_ITEMNO_MODEL_ITEM_ID == dItemNo_SILVER_RUPEE_e) && } else if ((m_itemNo == dItemNo_ORANGE_RUPEE_e || m_itemNo == dItemNo_SILVER_RUPEE_e) &&
mSparkleEmtr.getEmitter() == NULL) mSparkleEmtr.getEmitter() == NULL)
{ {
dComIfGp_particle_set(0x0C14, &mSparklePos, NULL, NULL, -1, &mSparkleEmtr, -1, NULL, NULL, dComIfGp_particle_set(0x0C14, &mSparklePos, NULL, NULL, -1, &mSparkleEmtr, -1, NULL, NULL,
@@ -315,14 +263,10 @@ int daItem_c::_daItem_create() {
current.angle.x = 0; current.angle.x = 0;
shape_angle.z = 0; shape_angle.z = 0;
shape_angle.x = 0; shape_angle.x = 0;
#if TARGET_PC
setRandomizerItem(/*setFoolishItemModel = */true);
#endif
field_0x95d = true; field_0x95d = true;
} }
m_itemNo = daItem_prm::getItemNo(this); m_itemNo = daItem_prm::getItemNo(this);
#if TARGET_PC #if TARGET_PC
if (dusk::getSettings().game.noHeartDrops && isHeart(m_itemNo)) { if (dusk::getSettings().game.noHeartDrops && isHeart(m_itemNo)) {
@@ -364,10 +308,10 @@ int daItem_c::_daItem_create() {
if (flag) { if (flag) {
CreateInit(); CreateInit();
} else { } else {
phase_state = dComIfG_resLoad(&mPhase, dItem_data::getFieldArc(M_ITEMNO_MODEL_ITEM_ID)); phase_state = dComIfG_resLoad(&mPhase, dItem_data::getFieldArc(m_itemNo));
if (phase_state == cPhs_COMPLEATE_e) { if (phase_state == cPhs_COMPLEATE_e) {
if (!fopAcM_entrySolidHeap(this, CheckFieldItemCreateHeap, if (!fopAcM_entrySolidHeap(this, CheckFieldItemCreateHeap,
dItem_data::getFieldHeapSize(M_ITEMNO_MODEL_ITEM_ID))) dItem_data::getFieldHeapSize(m_itemNo)))
{ {
return cPhs_ERROR_e; return cPhs_ERROR_e;
} }
@@ -384,7 +328,7 @@ int daItem_c::_daItem_execute() {
CountTimer(); CountTimer();
eyePos = current.pos; eyePos = current.pos;
eyePos.y += (f32)dItem_data::getH(M_ITEMNO_MODEL_ITEM_ID) / 2; eyePos.y += (f32)dItem_data::getH(m_itemNo) / 2;
attention_info.position = current.pos; attention_info.position = current.pos;
@@ -426,7 +370,7 @@ int daItem_c::_daItem_execute() {
mLastPos = current.pos; mLastPos = current.pos;
field_0x95f = (fopAcM_checkHookCarryNow(this) >> 0x14) & 1; field_0x95f = (fopAcM_checkHookCarryNow(this) >> 0x14) & 1;
if (M_ITEMNO_MODEL_ITEM_ID == dItemNo_ORANGE_RUPEE_e || M_ITEMNO_MODEL_ITEM_ID == dItemNo_SILVER_RUPEE_e) { if (m_itemNo == dItemNo_ORANGE_RUPEE_e || m_itemNo == dItemNo_SILVER_RUPEE_e) {
mSparklePos = current.pos; mSparklePos = current.pos;
mSparklePos.y += 18.0f; mSparklePos.y += 18.0f;
} }
@@ -453,11 +397,11 @@ int daItem_c::_daItem_draw() {
int daItem_c::_daItem_delete() { int daItem_c::_daItem_delete() {
mSound.deleteObject(); mSound.deleteObject();
if (M_ITEMNO_MODEL_ITEM_ID == dItemNo_ORANGE_RUPEE_e || M_ITEMNO_MODEL_ITEM_ID == dItemNo_SILVER_RUPEE_e) { if (m_itemNo == dItemNo_ORANGE_RUPEE_e || m_itemNo == dItemNo_SILVER_RUPEE_e) {
mSparkleEmtr.remove(); mSparkleEmtr.remove();
} }
DeleteBase(dItem_data::getFieldArc(M_ITEMNO_MODEL_ITEM_ID)); DeleteBase(dItem_data::getFieldArc(m_itemNo));
return 1; return 1;
} }
@@ -555,7 +499,7 @@ void daItem_c::procMainSimpleGetDemo() {
void daItem_c::procInitGetDemoEvent() { void daItem_c::procInitGetDemoEvent() {
hide(); hide();
if (M_ITEMNO_MODEL_ITEM_ID == dItemNo_ORANGE_RUPEE_e || M_ITEMNO_MODEL_ITEM_ID == dItemNo_SILVER_RUPEE_e) { if (m_itemNo == dItemNo_ORANGE_RUPEE_e || m_itemNo == dItemNo_SILVER_RUPEE_e) {
mSparkleEmtr.remove(); mSparkleEmtr.remove();
} }
@@ -563,22 +507,10 @@ void daItem_c::procInitGetDemoEvent() {
fopAcM_orderItemEvent(this, 0, 0); fopAcM_orderItemEvent(this, 0, 0);
eventInfo.onCondition(dEvtCnd_CANGETITEM_e); eventInfo.onCondition(dEvtCnd_CANGETITEM_e);
#if TARGET_PC
// Set rando item again incase this item is progressive and
// player picked up another one before this one on the same stage
u8 oldItemNo = m_itemNo;
setRandomizerItem();
#endif
m_item_id = fopAcM_createItemForTrBoxDemo(&current.pos, m_itemNo, -1, fopAcM_GetRoomNo(this), m_item_id = fopAcM_createItemForTrBoxDemo(&current.pos, m_itemNo, -1, fopAcM_GetRoomNo(this),
NULL, NULL); NULL, NULL);
JUT_ASSERT(0, m_item_id != fpcM_ERROR_PROCESS_ID_e); JUT_ASSERT(0, m_item_id != fpcM_ERROR_PROCESS_ID_e);
#if TARGET_PC
// Set the itemNo back to the old one since the game relies on this
// to properly delete the arc it loaded
m_itemNo = oldItemNo;
#endif
setStatus(STATUS_WAIT_GET_DEMO_EVENT_e); setStatus(STATUS_WAIT_GET_DEMO_EVENT_e);
} }
@@ -589,21 +521,13 @@ void daItem_c::procWaitGetDemoEvent() {
dComIfGp_event_setItemPartnerId(m_item_id); dComIfGp_event_setItemPartnerId(m_item_id);
} }
} else { } else {
if (m_itemNo == dItemNo_BOOMERANG_e IF_DUSK(&& !randomizer_IsActive())) { if (m_itemNo == dItemNo_BOOMERANG_e) {
fopAcM_orderItemEvent(this, 0, 0); fopAcM_orderItemEvent(this, 0, 0);
eventInfo.onCondition(dEvtCnd_CANGETITEM_e); eventInfo.onCondition(dEvtCnd_CANGETITEM_e);
return; return;
} }
#if TARGET_PC
// Probably a better way to handle this, but will do for now
// Try to play the textbox in rando if possible (except for rupees/ammo
// and when snowboarding or swimming)
if ((cLib_calcTimer<u8>(&field_0x9c1) == 0 && !randomizer_IsActive()) || checkItemGet(m_itemNo, 1)
|| daPy_getPlayerActorClass()->checkBoardRide() || daAlink_getAlinkActorClass()->checkSwimming()) {
#else
if (cLib_calcTimer<u8>(&field_0x9c1) == 0 || checkItemGet(m_itemNo, 1)) { if (cLib_calcTimer<u8>(&field_0x9c1) == 0 || checkItemGet(m_itemNo, 1)) {
#endif
if (fopAcM_delete(m_item_id)) { if (fopAcM_delete(m_item_id)) {
// "Item: Get Item deleted because Get Demo was canceled\n" // "Item: Get Item deleted because Get Demo was canceled\n"
OS_REPORT("アイテム:ゲットデモ中止されたので、ゲットアイテム削除しました\n"); OS_REPORT("アイテム:ゲットデモ中止されたので、ゲットアイテム削除しました\n");
@@ -613,8 +537,7 @@ void daItem_c::procWaitGetDemoEvent() {
procInitSimpleGetDemo(); procInitSimpleGetDemo();
itemGet(); itemGet();
// Don't potentially unset item bits in rando unless they're rupees if (!haveItem) {
if (!haveItem IF_DUSK(&& (!randomizer_IsActive() || isRupee(m_itemNo)))) {
dComIfGs_offItemFirstBit(m_itemNo); dComIfGs_offItemFirstBit(m_itemNo);
} }
} else { } else {
@@ -636,8 +559,8 @@ void daItem_c::procInitBoomerangCarry() {
scale = mItemScale; scale = mItemScale;
mBoomerangMove.initOffset(&current.pos); mBoomerangMove.initOffset(&current.pos);
u8 height = dItem_data::getH(M_ITEMNO_MODEL_ITEM_ID); u8 height = dItem_data::getH(m_itemNo);
u8 radius = dItem_data::getR(M_ITEMNO_MODEL_ITEM_ID); u8 radius = dItem_data::getR(m_itemNo);
mCcCyl.SetR((f32)radius * 2.0f); mCcCyl.SetR((f32)radius * 2.0f);
mCcCyl.SetH((f32)height * 2.0f); mCcCyl.SetH((f32)height * 2.0f);
mCcCyl.OnCoSPrmBit(1); mCcCyl.OnCoSPrmBit(1);
@@ -820,7 +743,7 @@ void daItem_c::mode_wait() {
mAcch.SetGrndNone(); mAcch.SetGrndNone();
} }
switch (M_ITEMNO_MODEL_ITEM_ID) { switch (m_itemNo) {
case dItemNo_HEART_e: case dItemNo_HEART_e:
itemActionForHeart(); itemActionForHeart();
break; break;
@@ -833,15 +756,8 @@ void daItem_c::mode_wait() {
itemActionForArrow(); itemActionForArrow();
break; break;
case dItemNo_BOOMERANG_e: case dItemNo_BOOMERANG_e:
#if TARGET_PC
if (!randomizer_IsActive()) {
itemActionForBoomerang();
break;
}
#else
itemActionForBoomerang(); itemActionForBoomerang();
break; break;
#endif
case dItemNo_GREEN_RUPEE_e: case dItemNo_GREEN_RUPEE_e:
case dItemNo_BLUE_RUPEE_e: case dItemNo_BLUE_RUPEE_e:
case dItemNo_YELLOW_RUPEE_e: case dItemNo_YELLOW_RUPEE_e:
@@ -871,7 +787,7 @@ void daItem_c::mode_water() {
} }
f32 scale = 1.0f; f32 scale = 1.0f;
switch (M_ITEMNO_MODEL_ITEM_ID) { switch (m_itemNo) {
case dItemNo_HEART_e: case dItemNo_HEART_e:
scale = 0.5f; scale = 0.5f;
break; break;
@@ -908,100 +824,49 @@ void daItem_c::itemGetNextExecute() {
setFlag(FLAG_INIT_GET_ITEM_e); setFlag(FLAG_INIT_GET_ITEM_e);
BOOL haveItem = false; BOOL haveItem = false;
#if TARGET_PC switch (m_itemNo) {
// Randomizer specific stuff for choosing if to play a demo or not. case dItemNo_HEART_e:
// Just copying the whole switch statement here and modifying it case dItemNo_GREEN_RUPEE_e:
// is better than littering the original switch statement with #if TARGET_PC case dItemNo_ARROW_10_e:
if (randomizer_IsActive()) { case dItemNo_ARROW_20_e:
switch (m_itemNo) { case dItemNo_ARROW_30_e:
case dItemNo_HEART_e: case dItemNo_ARROW_1_e:
case dItemNo_GREEN_RUPEE_e: procInitSimpleGetDemo();
case dItemNo_ARROW_10_e: itemGet();
case dItemNo_ARROW_20_e: break;
case dItemNo_ARROW_30_e: case dItemNo_BLUE_RUPEE_e:
case dItemNo_ARROW_1_e: case dItemNo_YELLOW_RUPEE_e:
case dItemNo_RED_RUPEE_e:
case dItemNo_PURPLE_RUPEE_e:
case dItemNo_ORANGE_RUPEE_e:
case dItemNo_SILVER_RUPEE_e:
case dItemNo_PACHINKO_SHOT_e:
if (daPy_getPlayerActorClass()->checkCanoeRide() ||
daPy_getPlayerActorClass()->checkHorseRide())
{
if (checkItemGet(m_itemNo, 1)) {
haveItem = true;
}
procInitSimpleGetDemo(); procInitSimpleGetDemo();
itemGet(); itemGet();
break;
case dItemNo_BLUE_RUPEE_e:
case dItemNo_YELLOW_RUPEE_e:
case dItemNo_RED_RUPEE_e:
case dItemNo_PURPLE_RUPEE_e:
case dItemNo_ORANGE_RUPEE_e:
case dItemNo_SILVER_RUPEE_e:
case dItemNo_PACHINKO_SHOT_e:
if (daPy_getPlayerActorClass()->checkCanoeRide() ||
daPy_getPlayerActorClass()->checkHorseRide() IF_DUSK(||
daPy_getPlayerActorClass()->checkBoardRide())) // Check snowboarding for rando
{
if (checkItemGet(m_itemNo, 1)) {
haveItem = true;
}
procInitSimpleGetDemo();
itemGet();
if (!haveItem) { if (!haveItem) {
dComIfGs_offItemFirstBit(m_itemNo); dComIfGs_offItemFirstBit(m_itemNo);
}
} else if (!checkItemGet(m_itemNo, 1)) {
procInitGetDemoEvent();
} else {
procInitSimpleGetDemo();
itemGet();
} }
break; } else if (!checkItemGet(m_itemNo, 1)) {
default:
procInitGetDemoEvent(); procInitGetDemoEvent();
break; } else {
}
} else {
#endif
switch (m_itemNo) {
case dItemNo_HEART_e:
case dItemNo_GREEN_RUPEE_e:
case dItemNo_ARROW_10_e:
case dItemNo_ARROW_20_e:
case dItemNo_ARROW_30_e:
case dItemNo_ARROW_1_e:
procInitSimpleGetDemo(); procInitSimpleGetDemo();
itemGet(); itemGet();
break;
case dItemNo_BLUE_RUPEE_e:
case dItemNo_YELLOW_RUPEE_e:
case dItemNo_RED_RUPEE_e:
case dItemNo_PURPLE_RUPEE_e:
case dItemNo_ORANGE_RUPEE_e:
case dItemNo_SILVER_RUPEE_e:
case dItemNo_PACHINKO_SHOT_e:
if (daPy_getPlayerActorClass()->checkCanoeRide() ||
daPy_getPlayerActorClass()->checkHorseRide())
{
if (checkItemGet(m_itemNo, 1)) {
haveItem = true;
}
procInitSimpleGetDemo();
itemGet();
if (!haveItem) {
dComIfGs_offItemFirstBit(m_itemNo);
}
} else if (!checkItemGet(m_itemNo, 1)) {
procInitGetDemoEvent();
} else {
procInitSimpleGetDemo();
itemGet();
}
break;
case dItemNo_BOOMERANG_e:
procInitGetDemoEvent();
break;
default:
// "[daItem_c] Get process not defined[%d]\n"
OS_REPORT_ERROR("[daItem_c]ゲット処理が定義されていません[%d]\n", m_itemNo);
} }
#if TARGET_PC break;
case dItemNo_BOOMERANG_e:
procInitGetDemoEvent();
break;
default:
// "[daItem_c] Get process not defined[%d]\n"
OS_REPORT_ERROR("[daItem_c]ゲット処理が定義されていません[%d]\n", m_itemNo);
} }
#endif
fopAcM_onItem(this, mItemBitNo); fopAcM_onItem(this, mItemBitNo);
mCcCyl.SetTgType(0); mCcCyl.SetTgType(0);
@@ -1012,18 +877,7 @@ void daItem_c::itemGetNextExecute() {
} }
void daItem_c::itemGet() { void daItem_c::itemGet() {
#if TARGET_PC
// Set rando item again incase this item is progressive and
// player picked up another one before this one on the same stage
u8 oldItemNo = m_itemNo;
setRandomizerItem();
#endif
switch (m_itemNo) { switch (m_itemNo) {
#if TARGET_PC
// Play sound for heart pieces and containers as well (should only happen in rando)
case dItemNo_UTAWA_HEART_e:
case dItemNo_KAKERA_HEART_e:
#endif
case dItemNo_HEART_e: case dItemNo_HEART_e:
mDoAud_seStart(Z2SE_HEART_PIECE_GET, NULL, 0, 0); mDoAud_seStart(Z2SE_HEART_PIECE_GET, NULL, 0, 0);
execItemGet(m_itemNo); execItemGet(m_itemNo);
@@ -1057,10 +911,6 @@ void daItem_c::itemGet() {
execItemGet(m_itemNo); execItemGet(m_itemNo);
break; break;
case dItemNo_BOOMERANG_e: case dItemNo_BOOMERANG_e:
#if TARGET_PC
// Let boomerang fall through in rando
if (!randomizer_IsActive())
#endif
break; break;
case dItemNo_ARROW_10_e: case dItemNo_ARROW_10_e:
case dItemNo_ARROW_20_e: case dItemNo_ARROW_20_e:
@@ -1069,24 +919,11 @@ void daItem_c::itemGet() {
case dItemNo_PACHINKO_SHOT_e: case dItemNo_PACHINKO_SHOT_e:
mDoAud_seStart(Z2SE_CONSUMP_ITEM_GET, NULL, 0, 0); mDoAud_seStart(Z2SE_CONSUMP_ITEM_GET, NULL, 0, 0);
execItemGet(m_itemNo); execItemGet(m_itemNo);
#if TARGET_PC
break;
#endif
default: default:
#if TARGET_PC
if (randomizer_IsActive()) {
// Some kind of sound should play, otherwise it feels weird
mDoAud_seStart(Z2SE_CONSUMP_ITEM_GET, NULL, 0, 0);
execItemGet(m_itemNo);
}
#endif
// "[daItem_c] Get process not defined[%d]\n" // "[daItem_c] Get process not defined[%d]\n"
OS_REPORT_ERROR("[daItem_c]ゲット処理が定義されていません[%d]\n", m_itemNo); OS_REPORT_ERROR("[daItem_c]ゲット処理が定義されていません[%d]\n", m_itemNo);
break; break;
} }
#if TARGET_PC
m_itemNo = oldItemNo;
#endif
} }
BOOL daItem_c::checkCountTimer() { BOOL daItem_c::checkCountTimer() {
@@ -1249,31 +1086,6 @@ void daItem_c::set_bound_se() {
} }
} }
#if TARGET_PC
void daItem_c::setRandomizerItem(bool setFoolishItemModel) {
if (randomizer_IsActive()) {
u32 params = fopAcM_GetParam(this);
u8 flag = daItem_prm::getItemBitNo(this);
u8 stageIdx = getStageID();
u16 key = (stageIdx << 8) | flag;
auto& freestandingOverrides = randomizer_GetContext().mFreestandingItemOverrides;
// If we found an override for this freestanding item
if (freestandingOverrides.contains(key)) {
// Clear the itemId and set it to out new itemId
params &= 0xFFFFFF00;
u8 newItemId = freestandingOverrides[key];
params |= verifyProgressiveItem(newItemId);
fopAcM_SetParam(this, params);
m_itemNo = daItem_prm::getItemNo(this);
// Set the ice trap model if this is an ice trap, and it isn't set
if (setFoolishItemModel && m_itemNo == dItemNo_Randomizer_FOOLISH_ITEM_e && home.angle.z == 0) {
home.angle.z = randomizer_getRandomFoolishItemModelID();
}
}
}
}
#endif
s32 daItem_c::m_timer_max = 10000; s32 daItem_c::m_timer_max = 10000;
int daItem_c::CountTimer() { int daItem_c::CountTimer() {

Some files were not shown because too many files have changed in this diff Show More