mirror of
https://github.com/HarbourMasters/Shipwright
synced 2026-05-25 07:32:48 -04:00
Compare commits
28 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7768869251 | |||
| 013244560e | |||
| 9529cc1217 | |||
| 0017bf1fcc | |||
| f6a7f3d13c | |||
| 99367ebb53 | |||
| d215c76eba | |||
| 07bae6b84c | |||
| 6eaf51c2bd | |||
| 565775a3dc | |||
| 9eb190e734 | |||
| 0e7a89d117 | |||
| 73873a6dbc | |||
| e03ef85f3b | |||
| 8c8111c7b8 | |||
| 1a10d8f627 | |||
| a1a6c07549 | |||
| 6f7361e1a4 | |||
| 95f1ba7202 | |||
| 4eee417520 | |||
| 0f3c2d7c78 | |||
| 56ac27b8f4 | |||
| 4999df5395 | |||
| 51f3e37010 | |||
| c4b077d83b | |||
| be38b41644 | |||
| d3f2da2a8f | |||
| 166a6691fc |
+4
-4
@@ -7,8 +7,8 @@ set(CMAKE_CXX_STANDARD 20 CACHE STRING "The C++ standard to use")
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "Minimum OS X deployment version" FORCE)
|
||||
|
||||
project(Ship LANGUAGES C CXX
|
||||
VERSION 5.1.1)
|
||||
set(PROJECT_BUILD_NAME "BRADLEY BRAVO" CACHE STRING "")
|
||||
VERSION 5.1.3)
|
||||
set(PROJECT_BUILD_NAME "BRADLEY DELTA" CACHE STRING "")
|
||||
set(PROJECT_TEAM "github.com/harbourmasters" CACHE STRING "")
|
||||
|
||||
set_property(DIRECTORY ${CMAKE_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT soh)
|
||||
@@ -49,8 +49,8 @@ endif()
|
||||
# Global configuration types
|
||||
################################################################################
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "NintendoSwitch")
|
||||
set(CMAKE_C_FLAGS_DEBUG "-O3 -ffast-math")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-O3 -ffast-math")
|
||||
set(CMAKE_C_FLAGS_DEBUG "-g -ffast-math -DDEBUG")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-g -ffast-math -DDEBUG")
|
||||
set(CMAKE_C_FLAGS_RELEASE "-O3 -ffast-math -DNDEBUG")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -ffast-math -DNDEBUG")
|
||||
else()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<Root>
|
||||
<File Name="object_d_hsblock" Segment="6">
|
||||
<Collision Name="gHookshotPostCol" Offset="0x578"/>
|
||||
<Collision Name="gHookshotTargetCol" Offset="0x730"/>
|
||||
<Collision Name="gHookshotTargetCol" Offset="0x578"/>
|
||||
<Collision Name="gHookshotPostCol" Offset="0x730"/>
|
||||
<DList Name="gHookshotPostDL" Offset="0x210"/>
|
||||
<DList Name="gHookshotTargetDL" Offset="0x470"/>
|
||||
<Texture Name="gHookshotTargetTex" OutName="hookshot_target" Format="i4" Width="64" Height="64" Offset="0x760"/>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<Array Name="ovl_Boss_Ganon2_Vtx_00CC98" Count="4" Offset="0x00C958">
|
||||
<Vtx/>
|
||||
</Array>
|
||||
<DList Name="ovl_Boss_Ganon2_DL_00CCD8" Offset="0x00CA98"/>
|
||||
<DList Name="ovl_Boss_Ganon2_DL_00CCD8" Offset="0x00C998"/>
|
||||
<Texture Name="ovl_Boss_Ganon2_Tex_00CD58" OutName="tex_0000CD58" Format="i4" Width="32" Height="160" Offset="0x00CA18"/>
|
||||
<Array Name="ovl_Boss_Ganon2_Vtx_00D758" Count="4" Offset="0x00D418">
|
||||
<Vtx/>
|
||||
|
||||
@@ -168,6 +168,7 @@ extern "C"
|
||||
extern s32 __osPfsLastChannel;
|
||||
extern u8 gWalkSpeedToggle1;
|
||||
extern u8 gWalkSpeedToggle2;
|
||||
extern f32 iceTrapScale;
|
||||
|
||||
extern const s16 D_8014A6C0[];
|
||||
#define gTatumsPerBeat (D_8014A6C0[1])
|
||||
|
||||
@@ -127,7 +127,7 @@ typedef struct {
|
||||
typedef struct {
|
||||
/* 0x00 */ s32 order;
|
||||
/* 0x04 */ s32 npredictors;
|
||||
/* 0x08 */ s16 book[1]; // size 8 * order * npredictors. 8-byte aligned
|
||||
/* 0x08 */ s16 book[]; // size 8 * order * npredictors. 8-byte aligned
|
||||
} AdpcmBook; // size >= 0x8
|
||||
|
||||
typedef struct
|
||||
|
||||
@@ -193,11 +193,11 @@ static std::map<std::string, CosmeticOption> cosmeticOptions = {
|
||||
COSMETIC_OPTION("MirrorShield_Emblem", "Emblem", GROUP_MIRRORSHIELD, ImVec4(205, 225, 255, 255), false, true, true),
|
||||
|
||||
COSMETIC_OPTION("Swords_KokiriBlade", "Kokiri Sword Blade", GROUP_SWORDS, ImVec4(255, 255, 255, 255), false, true, false),
|
||||
COSMETIC_OPTION("Swords_KokiriHilt", "Kokiri Sword Hilt", GROUP_SWORDS, ImVec4(160, 100, 15, 255), false, true, true),
|
||||
// COSMETIC_OPTION("Swords_KokiriHilt", "Kokiri Sword Hilt", GROUP_SWORDS, ImVec4(160, 100, 15, 255), false, true, true), // Todo (Cosmetics): Broken, need a better way to grayscale
|
||||
COSMETIC_OPTION("Swords_MasterBlade", "Master Sword Blade", GROUP_SWORDS, ImVec4(255, 255, 255, 255), false, true, false),
|
||||
COSMETIC_OPTION("Swords_MasterHilt", "Master Sword Hilt", GROUP_SWORDS, ImVec4( 80, 80, 168, 255), false, true, true),
|
||||
// COSMETIC_OPTION("Swords_MasterHilt", "Master Sword Hilt", GROUP_SWORDS, ImVec4( 80, 80, 168, 255), false, true, true), // Todo (Cosmetics): Broken, need a better way to grayscale
|
||||
COSMETIC_OPTION("Swords_BiggoronBlade", "Biggoron Sword Blade", GROUP_SWORDS, ImVec4(255, 255, 255, 255), false, true, false),
|
||||
COSMETIC_OPTION("Swords_BiggoronHilt", "Biggoron Sword Hilt", GROUP_SWORDS, ImVec4( 80, 80, 168, 255), false, true, true),
|
||||
// COSMETIC_OPTION("Swords_BiggoronHilt", "Biggoron Sword Hilt", GROUP_SWORDS, ImVec4( 80, 80, 168, 255), false, true, true), // Todo (Cosmetics): Broken, need a better way to grayscale
|
||||
|
||||
COSMETIC_OPTION("Gloves_GoronBracelet", "Goron Bracelet", GROUP_GLOVES, ImVec4(255, 255, 170, 255), false, true, false),
|
||||
COSMETIC_OPTION("Gloves_SilverGauntlets", "Silver Gauntlets", GROUP_GLOVES, ImVec4(255, 255, 255, 255), false, true, false),
|
||||
@@ -206,7 +206,7 @@ static std::map<std::string, CosmeticOption> cosmeticOptions = {
|
||||
|
||||
COSMETIC_OPTION("Equipment_BoomerangBody", "Boomerang Body", GROUP_EQUIPMENT, ImVec4(160, 100, 0, 255), false, true, false),
|
||||
COSMETIC_OPTION("Equipment_BoomerangGem", "Boomerang Gem", GROUP_EQUIPMENT, ImVec4(255, 50, 150, 255), false, true, true),
|
||||
COSMETIC_OPTION("Equipment_SlingshotBody", "Slingshot Body", GROUP_EQUIPMENT, ImVec4(160, 100, 0, 255), false, true, true),
|
||||
// COSMETIC_OPTION("Equipment_SlingshotBody", "Slingshot Body", GROUP_EQUIPMENT, ImVec4(160, 100, 0, 255), false, true, true), // Todo (Cosmetics): Broken, need a better way to grayscale
|
||||
COSMETIC_OPTION("Equipment_SlingshotString", "Slingshot String", GROUP_EQUIPMENT, ImVec4(255, 255, 255, 255), false, true, true),
|
||||
COSMETIC_OPTION("Equipment_HammerHead", "Hammer Head", GROUP_EQUIPMENT, ImVec4(155, 192, 201, 255), false, true, false),
|
||||
COSMETIC_OPTION("Equipment_HammerHandle", "Hammer Handle", GROUP_EQUIPMENT, ImVec4(110, 60, 0, 255), false, true, true),
|
||||
@@ -593,47 +593,47 @@ void ApplyOrResetCustomGfxPatches(bool manualChange = true) {
|
||||
PATCH_GFX(gGiKokiriSwordDL, "Swords_KokiriBlade3", swordsKokiriBlade.changedCvar, 10, gsDPSetPrimColor(0, 0, color.r, color.g, color.b, 255));
|
||||
PATCH_GFX(gGiKokiriSwordDL, "Swords_KokiriBlade4", swordsKokiriBlade.changedCvar, 12, gsDPSetEnvColor(color.r / 4, color.g / 4, color.b / 4, 255));
|
||||
}
|
||||
static CosmeticOption& swordsKokiriHilt = cosmeticOptions.at("Swords_KokiriHilt");
|
||||
if (manualChange || CVar_GetS32(swordsKokiriHilt.rainbowCvar, 0)) {
|
||||
static Color_RGBA8 defaultColor = {swordsKokiriHilt.defaultColor.x, swordsKokiriHilt.defaultColor.y, swordsKokiriHilt.defaultColor.z, swordsKokiriHilt.defaultColor.w};
|
||||
Color_RGBA8 color = CVar_GetRGBA(swordsKokiriHilt.cvar, defaultColor);
|
||||
PATCH_GFX(gLinkChildLeftFistAndKokiriSwordNearDL, "Swords_KokiriHilt1", swordsKokiriHilt.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
||||
PATCH_GFX(gLinkChildLeftFistAndKokiriSwordFarDL, "Swords_KokiriHilt2", swordsKokiriHilt.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
||||
PATCH_GFX(gLinkChildSwordAndSheathNearDL, "Swords_KokiriHilt3", swordsKokiriHilt.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
||||
PATCH_GFX(gLinkChildSwordAndSheathFarDL, "Swords_KokiriHilt4", swordsKokiriHilt.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
||||
PATCH_GFX(gLinkChildDekuShieldSwordAndSheathNearDL, "Swords_KokiriHilt5", swordsKokiriHilt.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
||||
PATCH_GFX(gLinkChildDekuShieldSwordAndSheathFarDL, "Swords_KokiriHilt6", swordsKokiriHilt.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
||||
PATCH_GFX(gLinkChildHylianShieldSwordAndSheathNearDL, "Swords_KokiriHilt7", swordsKokiriHilt.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
||||
PATCH_GFX(gLinkChildHylianShieldSwordAndSheathFarDL, "Swords_KokiriHilt8", swordsKokiriHilt.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
||||
PATCH_GFX(gGiKokiriSwordDL, "Swords_KokiriHilt9", swordsKokiriHilt.changedCvar, 64, gsDPSetPrimColor(0, 0, MAX(color.r - 50, 0), MAX(color.g - 50, 0), MAX(color.b - 50, 0), 255));
|
||||
PATCH_GFX(gGiKokiriSwordDL, "Swords_KokiriHilt10", swordsKokiriHilt.changedCvar, 66, gsDPSetEnvColor(MAX(color.r - 50, 0) / 3, MAX(color.g - 50, 0) / 3, MAX(color.b - 50, 0) / 3, 255));
|
||||
PATCH_GFX(gGiKokiriSwordDL, "Swords_KokiriHilt11", swordsKokiriHilt.changedCvar, 162, gsDPSetPrimColor(0, 0, color.r, color.g, color.b, 255));
|
||||
PATCH_GFX(gGiKokiriSwordDL, "Swords_KokiriHilt12", swordsKokiriHilt.changedCvar, 164, gsDPSetEnvColor(color.r / 3, color.g / 3, color.b / 3, 255));
|
||||
// static CosmeticOption& swordsKokiriHilt = cosmeticOptions.at("Swords_KokiriHilt");
|
||||
// if (manualChange || CVar_GetS32(swordsKokiriHilt.rainbowCvar, 0)) {
|
||||
// static Color_RGBA8 defaultColor = {swordsKokiriHilt.defaultColor.x, swordsKokiriHilt.defaultColor.y, swordsKokiriHilt.defaultColor.z, swordsKokiriHilt.defaultColor.w};
|
||||
// Color_RGBA8 color = CVar_GetRGBA(swordsKokiriHilt.cvar, defaultColor);
|
||||
// PATCH_GFX(gLinkChildLeftFistAndKokiriSwordNearDL, "Swords_KokiriHilt1", swordsKokiriHilt.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
||||
// PATCH_GFX(gLinkChildLeftFistAndKokiriSwordFarDL, "Swords_KokiriHilt2", swordsKokiriHilt.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
||||
// PATCH_GFX(gLinkChildSwordAndSheathNearDL, "Swords_KokiriHilt3", swordsKokiriHilt.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
||||
// PATCH_GFX(gLinkChildSwordAndSheathFarDL, "Swords_KokiriHilt4", swordsKokiriHilt.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
||||
// PATCH_GFX(gLinkChildDekuShieldSwordAndSheathNearDL, "Swords_KokiriHilt5", swordsKokiriHilt.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
||||
// PATCH_GFX(gLinkChildDekuShieldSwordAndSheathFarDL, "Swords_KokiriHilt6", swordsKokiriHilt.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
||||
// PATCH_GFX(gLinkChildHylianShieldSwordAndSheathNearDL, "Swords_KokiriHilt7", swordsKokiriHilt.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
||||
// PATCH_GFX(gLinkChildHylianShieldSwordAndSheathFarDL, "Swords_KokiriHilt8", swordsKokiriHilt.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
||||
// PATCH_GFX(gGiKokiriSwordDL, "Swords_KokiriHilt9", swordsKokiriHilt.changedCvar, 64, gsDPSetPrimColor(0, 0, MAX(color.r - 50, 0), MAX(color.g - 50, 0), MAX(color.b - 50, 0), 255));
|
||||
// PATCH_GFX(gGiKokiriSwordDL, "Swords_KokiriHilt10", swordsKokiriHilt.changedCvar, 66, gsDPSetEnvColor(MAX(color.r - 50, 0) / 3, MAX(color.g - 50, 0) / 3, MAX(color.b - 50, 0) / 3, 255));
|
||||
// PATCH_GFX(gGiKokiriSwordDL, "Swords_KokiriHilt11", swordsKokiriHilt.changedCvar, 162, gsDPSetPrimColor(0, 0, color.r, color.g, color.b, 255));
|
||||
// PATCH_GFX(gGiKokiriSwordDL, "Swords_KokiriHilt12", swordsKokiriHilt.changedCvar, 164, gsDPSetEnvColor(color.r / 3, color.g / 3, color.b / 3, 255));
|
||||
|
||||
if (manualChange) {
|
||||
PATCH_GFX(gLinkChildLeftFistAndKokiriSwordNearDL, "Swords_KokiriHilt13", swordsKokiriHilt.changedCvar, 108, gsSPGrayscale(true));
|
||||
PATCH_GFX(gLinkChildLeftFistAndKokiriSwordNearDL, "Swords_KokiriHilt14", swordsKokiriHilt.changedCvar, 134, gsSPGrayscale(false));
|
||||
PATCH_GFX(gLinkChildLeftFistAndKokiriSwordFarDL, "Swords_KokiriHilt15", swordsKokiriHilt.changedCvar, 106, gsSPGrayscale(true));
|
||||
PATCH_GFX(gLinkChildLeftFistAndKokiriSwordFarDL, "Swords_KokiriHilt16", swordsKokiriHilt.changedCvar, 126, gsSPGrayscale(false));
|
||||
PATCH_GFX(gLinkChildSwordAndSheathNearDL, "Swords_KokiriHilt17", swordsKokiriHilt.changedCvar, 100, gsSPGrayscale(true));
|
||||
PATCH_GFX(gLinkChildSwordAndSheathNearDL, "Swords_KokiriHilt18", swordsKokiriHilt.changedCvar, 126, gsSPGrayscale(false));
|
||||
PATCH_GFX(gLinkChildSwordAndSheathNearDL, "Swords_KokiriHilt19", swordsKokiriHilt.changedCvar, 128, gsSPEndDisplayList());
|
||||
PATCH_GFX(gLinkChildSwordAndSheathFarDL, "Swords_KokiriHilt20", swordsKokiriHilt.changedCvar, 98, gsSPGrayscale(true));
|
||||
PATCH_GFX(gLinkChildSwordAndSheathFarDL, "Swords_KokiriHilt21", swordsKokiriHilt.changedCvar, 118, gsSPGrayscale(false));
|
||||
PATCH_GFX(gLinkChildSwordAndSheathFarDL, "Swords_KokiriHilt22", swordsKokiriHilt.changedCvar, 120, gsSPEndDisplayList());
|
||||
PATCH_GFX(gLinkChildDekuShieldSwordAndSheathNearDL, "Swords_KokiriHilt23", swordsKokiriHilt.changedCvar, 166, gsSPGrayscale(true));
|
||||
PATCH_GFX(gLinkChildDekuShieldSwordAndSheathNearDL, "Swords_KokiriHilt24", swordsKokiriHilt.changedCvar, 192, gsSPGrayscale(false));
|
||||
PATCH_GFX(gLinkChildDekuShieldSwordAndSheathNearDL, "Swords_KokiriHilt25", swordsKokiriHilt.changedCvar, 194, gsSPEndDisplayList());
|
||||
PATCH_GFX(gLinkChildDekuShieldSwordAndSheathFarDL, "Swords_KokiriHilt26", swordsKokiriHilt.changedCvar, 156, gsSPGrayscale(true));
|
||||
PATCH_GFX(gLinkChildDekuShieldSwordAndSheathFarDL, "Swords_KokiriHilt27", swordsKokiriHilt.changedCvar, 176, gsSPGrayscale(false));
|
||||
PATCH_GFX(gLinkChildDekuShieldSwordAndSheathFarDL, "Swords_KokiriHilt28", swordsKokiriHilt.changedCvar, 178, gsSPEndDisplayList());
|
||||
PATCH_GFX(gLinkChildHylianShieldSwordAndSheathNearDL, "Swords_KokiriHilt29", swordsKokiriHilt.changedCvar, 162, gsSPGrayscale(true));
|
||||
PATCH_GFX(gLinkChildHylianShieldSwordAndSheathNearDL, "Swords_KokiriHilt30", swordsKokiriHilt.changedCvar, 188, gsSPGrayscale(false));
|
||||
PATCH_GFX(gLinkChildHylianShieldSwordAndSheathNearDL, "Swords_KokiriHilt31", swordsKokiriHilt.changedCvar, 190, gsSPEndDisplayList());
|
||||
PATCH_GFX(gLinkChildHylianShieldSwordAndSheathFarDL, "Swords_KokiriHilt32", swordsKokiriHilt.changedCvar, 98, gsSPGrayscale(true));
|
||||
PATCH_GFX(gLinkChildHylianShieldSwordAndSheathFarDL, "Swords_KokiriHilt33", swordsKokiriHilt.changedCvar, 118, gsSPGrayscale(false));
|
||||
}
|
||||
}
|
||||
// if (manualChange) {
|
||||
// PATCH_GFX(gLinkChildLeftFistAndKokiriSwordNearDL, "Swords_KokiriHilt13", swordsKokiriHilt.changedCvar, 108, gsSPGrayscale(true));
|
||||
// PATCH_GFX(gLinkChildLeftFistAndKokiriSwordNearDL, "Swords_KokiriHilt14", swordsKokiriHilt.changedCvar, 134, gsSPGrayscale(false));
|
||||
// PATCH_GFX(gLinkChildLeftFistAndKokiriSwordFarDL, "Swords_KokiriHilt15", swordsKokiriHilt.changedCvar, 106, gsSPGrayscale(true));
|
||||
// PATCH_GFX(gLinkChildLeftFistAndKokiriSwordFarDL, "Swords_KokiriHilt16", swordsKokiriHilt.changedCvar, 126, gsSPGrayscale(false));
|
||||
// PATCH_GFX(gLinkChildSwordAndSheathNearDL, "Swords_KokiriHilt17", swordsKokiriHilt.changedCvar, 100, gsSPGrayscale(true));
|
||||
// PATCH_GFX(gLinkChildSwordAndSheathNearDL, "Swords_KokiriHilt18", swordsKokiriHilt.changedCvar, 126, gsSPGrayscale(false));
|
||||
// PATCH_GFX(gLinkChildSwordAndSheathNearDL, "Swords_KokiriHilt19", swordsKokiriHilt.changedCvar, 128, gsSPEndDisplayList());
|
||||
// PATCH_GFX(gLinkChildSwordAndSheathFarDL, "Swords_KokiriHilt20", swordsKokiriHilt.changedCvar, 98, gsSPGrayscale(true));
|
||||
// PATCH_GFX(gLinkChildSwordAndSheathFarDL, "Swords_KokiriHilt21", swordsKokiriHilt.changedCvar, 118, gsSPGrayscale(false));
|
||||
// PATCH_GFX(gLinkChildSwordAndSheathFarDL, "Swords_KokiriHilt22", swordsKokiriHilt.changedCvar, 120, gsSPEndDisplayList());
|
||||
// PATCH_GFX(gLinkChildDekuShieldSwordAndSheathNearDL, "Swords_KokiriHilt23", swordsKokiriHilt.changedCvar, 166, gsSPGrayscale(true));
|
||||
// PATCH_GFX(gLinkChildDekuShieldSwordAndSheathNearDL, "Swords_KokiriHilt24", swordsKokiriHilt.changedCvar, 192, gsSPGrayscale(false));
|
||||
// PATCH_GFX(gLinkChildDekuShieldSwordAndSheathNearDL, "Swords_KokiriHilt25", swordsKokiriHilt.changedCvar, 194, gsSPEndDisplayList());
|
||||
// PATCH_GFX(gLinkChildDekuShieldSwordAndSheathFarDL, "Swords_KokiriHilt26", swordsKokiriHilt.changedCvar, 156, gsSPGrayscale(true));
|
||||
// PATCH_GFX(gLinkChildDekuShieldSwordAndSheathFarDL, "Swords_KokiriHilt27", swordsKokiriHilt.changedCvar, 176, gsSPGrayscale(false));
|
||||
// PATCH_GFX(gLinkChildDekuShieldSwordAndSheathFarDL, "Swords_KokiriHilt28", swordsKokiriHilt.changedCvar, 178, gsSPEndDisplayList());
|
||||
// PATCH_GFX(gLinkChildHylianShieldSwordAndSheathNearDL, "Swords_KokiriHilt29", swordsKokiriHilt.changedCvar, 162, gsSPGrayscale(true));
|
||||
// PATCH_GFX(gLinkChildHylianShieldSwordAndSheathNearDL, "Swords_KokiriHilt30", swordsKokiriHilt.changedCvar, 188, gsSPGrayscale(false));
|
||||
// PATCH_GFX(gLinkChildHylianShieldSwordAndSheathNearDL, "Swords_KokiriHilt31", swordsKokiriHilt.changedCvar, 190, gsSPEndDisplayList());
|
||||
// PATCH_GFX(gLinkChildHylianShieldSwordAndSheathFarDL, "Swords_KokiriHilt32", swordsKokiriHilt.changedCvar, 98, gsSPGrayscale(true));
|
||||
// PATCH_GFX(gLinkChildHylianShieldSwordAndSheathFarDL, "Swords_KokiriHilt33", swordsKokiriHilt.changedCvar, 118, gsSPGrayscale(false));
|
||||
// }
|
||||
// }
|
||||
static CosmeticOption& swordsMasterBlade = cosmeticOptions.at("Swords_MasterBlade");
|
||||
if (manualChange || CVar_GetS32(swordsMasterBlade.rainbowCvar, 0)) {
|
||||
static Color_RGBA8 defaultColor = {swordsMasterBlade.defaultColor.x, swordsMasterBlade.defaultColor.y, swordsMasterBlade.defaultColor.z, swordsMasterBlade.defaultColor.w};
|
||||
@@ -645,53 +645,53 @@ void ApplyOrResetCustomGfxPatches(bool manualChange = true) {
|
||||
PATCH_GFX(ovl_Boss_Ganon2_DL_0103A8, "Swords_MasterBlade5", swordsMasterBlade.changedCvar, 26, gsDPSetPrimColor(0, 0, color.r, color.g, color.b, 255));
|
||||
PATCH_GFX(ovl_Boss_Ganon2_DL_0103A8, "Swords_MasterBlade6", swordsMasterBlade.changedCvar, 28, gsDPSetEnvColor(color.r / 2, color.g / 2, color.b / 2, 255));
|
||||
}
|
||||
static CosmeticOption& swordsMasterHilt = cosmeticOptions.at("Swords_MasterHilt");
|
||||
if (manualChange || CVar_GetS32(swordsMasterHilt.rainbowCvar, 0)) {
|
||||
static Color_RGBA8 defaultColor = {swordsMasterHilt.defaultColor.x, swordsMasterHilt.defaultColor.y, swordsMasterHilt.defaultColor.z, swordsMasterHilt.defaultColor.w};
|
||||
Color_RGBA8 color = CVar_GetRGBA(swordsMasterHilt.cvar, defaultColor);
|
||||
PATCH_GFX(gLinkAdultLeftHandHoldingMasterSwordNearDL, "Swords_MasterHilt1", swordsMasterHilt.changedCvar, 20, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
||||
PATCH_GFX(gLinkAdultLeftHandHoldingMasterSwordFarDL, "Swords_MasterHilt2", swordsMasterHilt.changedCvar, 20, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
||||
PATCH_GFX(object_toki_objects_DL_001BD0, "Swords_MasterHilt3", swordsMasterHilt.changedCvar, 16, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
||||
PATCH_GFX(gLinkAdultMasterSwordAndSheathNearDL, "Swords_MasterHilt4", swordsMasterHilt.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
||||
PATCH_GFX(gLinkAdultMasterSwordAndSheathFarDL, "Swords_MasterHilt5", swordsMasterHilt.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
||||
PATCH_GFX(gLinkAdultMirrorShieldSwordAndSheathNearDL, "Swords_MasterHilt6", swordsMasterHilt.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
||||
PATCH_GFX(gLinkAdultMirrorShieldSwordAndSheathFarDL, "Swords_MasterHilt7", swordsMasterHilt.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
||||
PATCH_GFX(gLinkAdultHylianShieldSwordAndSheathNearDL, "Swords_MasterHilt8", swordsMasterHilt.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
||||
PATCH_GFX(gLinkAdultHylianShieldSwordAndSheathFarDL, "Swords_MasterHilt9", swordsMasterHilt.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
||||
PATCH_GFX(ovl_Boss_Ganon2_DL_0103A8, "Swords_MasterHilt10", swordsMasterHilt.changedCvar, 16, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
||||
// static CosmeticOption& swordsMasterHilt = cosmeticOptions.at("Swords_MasterHilt");
|
||||
// if (manualChange || CVar_GetS32(swordsMasterHilt.rainbowCvar, 0)) {
|
||||
// static Color_RGBA8 defaultColor = {swordsMasterHilt.defaultColor.x, swordsMasterHilt.defaultColor.y, swordsMasterHilt.defaultColor.z, swordsMasterHilt.defaultColor.w};
|
||||
// Color_RGBA8 color = CVar_GetRGBA(swordsMasterHilt.cvar, defaultColor);
|
||||
// PATCH_GFX(gLinkAdultLeftHandHoldingMasterSwordNearDL, "Swords_MasterHilt1", swordsMasterHilt.changedCvar, 20, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
||||
// PATCH_GFX(gLinkAdultLeftHandHoldingMasterSwordFarDL, "Swords_MasterHilt2", swordsMasterHilt.changedCvar, 20, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
||||
// PATCH_GFX(object_toki_objects_DL_001BD0, "Swords_MasterHilt3", swordsMasterHilt.changedCvar, 16, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
||||
// PATCH_GFX(gLinkAdultMasterSwordAndSheathNearDL, "Swords_MasterHilt4", swordsMasterHilt.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
||||
// PATCH_GFX(gLinkAdultMasterSwordAndSheathFarDL, "Swords_MasterHilt5", swordsMasterHilt.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
||||
// PATCH_GFX(gLinkAdultMirrorShieldSwordAndSheathNearDL, "Swords_MasterHilt6", swordsMasterHilt.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
||||
// PATCH_GFX(gLinkAdultMirrorShieldSwordAndSheathFarDL, "Swords_MasterHilt7", swordsMasterHilt.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
||||
// PATCH_GFX(gLinkAdultHylianShieldSwordAndSheathNearDL, "Swords_MasterHilt8", swordsMasterHilt.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
||||
// PATCH_GFX(gLinkAdultHylianShieldSwordAndSheathFarDL, "Swords_MasterHilt9", swordsMasterHilt.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
||||
// PATCH_GFX(ovl_Boss_Ganon2_DL_0103A8, "Swords_MasterHilt10", swordsMasterHilt.changedCvar, 16, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
||||
|
||||
if (manualChange) {
|
||||
PATCH_GFX(gLinkAdultMasterSwordAndSheathFarDL, "Swords_MasterHilt11", swordsMasterHilt.changedCvar, 38, gsSPGrayscale(true));
|
||||
PATCH_GFX(gLinkAdultMasterSwordAndSheathFarDL, "Swords_MasterHilt12", swordsMasterHilt.changedCvar, 64, gsSPGrayscale(false));
|
||||
PATCH_GFX(gLinkAdultMasterSwordAndSheathFarDL, "Swords_MasterHilt13", swordsMasterHilt.changedCvar, 106, gsSPGrayscale(true));
|
||||
PATCH_GFX(gLinkAdultMasterSwordAndSheathFarDL, "Swords_MasterHilt14", swordsMasterHilt.changedCvar, 120, gsSPGrayscale(false));
|
||||
PATCH_GFX(gLinkAdultMasterSwordAndSheathNearDL, "Swords_MasterHilt15", swordsMasterHilt.changedCvar, 104, gsSPGrayscale(true));
|
||||
PATCH_GFX(gLinkAdultMasterSwordAndSheathNearDL, "Swords_MasterHilt16", swordsMasterHilt.changedCvar, 182, gsSPGrayscale(false));
|
||||
PATCH_GFX(gLinkAdultMasterSwordAndSheathNearDL, "Swords_MasterHilt17", swordsMasterHilt.changedCvar, 184, gsSPEndDisplayList());
|
||||
PATCH_GFX(gLinkAdultHylianShieldSwordAndSheathFarDL, "Swords_MasterHilt18", swordsMasterHilt.changedCvar, 80, gsSPGrayscale(true));
|
||||
PATCH_GFX(gLinkAdultHylianShieldSwordAndSheathFarDL, "Swords_MasterHilt19", swordsMasterHilt.changedCvar, 94, gsSPGrayscale(false));
|
||||
PATCH_GFX(gLinkAdultHylianShieldSwordAndSheathFarDL, "Swords_MasterHilt20", swordsMasterHilt.changedCvar, 162, gsSPGrayscale(true));
|
||||
PATCH_GFX(gLinkAdultHylianShieldSwordAndSheathFarDL, "Swords_MasterHilt21", swordsMasterHilt.changedCvar, 180, gsSPGrayscale(false));
|
||||
PATCH_GFX(gLinkAdultHylianShieldSwordAndSheathNearDL, "Swords_MasterHilt22", swordsMasterHilt.changedCvar, 154, gsSPGrayscale(true));
|
||||
PATCH_GFX(gLinkAdultHylianShieldSwordAndSheathNearDL, "Swords_MasterHilt23", swordsMasterHilt.changedCvar, 232, gsSPGrayscale(false));
|
||||
PATCH_GFX(gLinkAdultMirrorShieldSwordAndSheathFarDL, "Swords_MasterHilt24", swordsMasterHilt.changedCvar, 112, gsSPGrayscale(true));
|
||||
PATCH_GFX(gLinkAdultMirrorShieldSwordAndSheathFarDL, "Swords_MasterHilt25", swordsMasterHilt.changedCvar, 130, gsSPGrayscale(false));
|
||||
PATCH_GFX(gLinkAdultMirrorShieldSwordAndSheathFarDL, "Swords_MasterHilt26", swordsMasterHilt.changedCvar, 172, gsSPGrayscale(true));
|
||||
PATCH_GFX(gLinkAdultMirrorShieldSwordAndSheathFarDL, "Swords_MasterHilt27", swordsMasterHilt.changedCvar, 186, gsSPGrayscale(false));
|
||||
PATCH_GFX(gLinkAdultMirrorShieldSwordAndSheathNearDL, "Swords_MasterHilt28", swordsMasterHilt.changedCvar, 220, gsSPGrayscale(true));
|
||||
PATCH_GFX(gLinkAdultMirrorShieldSwordAndSheathNearDL, "Swords_MasterHilt29", swordsMasterHilt.changedCvar, 298, gsSPGrayscale(false));
|
||||
PATCH_GFX(gLinkAdultLeftHandHoldingMasterSwordFarDL, "Swords_MasterHilt30", swordsMasterHilt.changedCvar, 38, gsSPGrayscale(true));
|
||||
PATCH_GFX(gLinkAdultLeftHandHoldingMasterSwordFarDL, "Swords_MasterHilt31", swordsMasterHilt.changedCvar, 112, gsSPGrayscale(false));
|
||||
PATCH_GFX(gLinkAdultLeftHandHoldingMasterSwordNearDL, "Swords_MasterHilt32", swordsMasterHilt.changedCvar, 86, gsSPGrayscale(true));
|
||||
PATCH_GFX(gLinkAdultLeftHandHoldingMasterSwordNearDL, "Swords_MasterHilt33", swordsMasterHilt.changedCvar, 208, gsSPGrayscale(false));
|
||||
PATCH_GFX(object_toki_objects_DL_001BD0, "Swords_MasterHilt34", swordsMasterHilt.changedCvar, 112, gsSPGrayscale(true));
|
||||
PATCH_GFX(object_toki_objects_DL_001BD0, "Swords_MasterHilt35", swordsMasterHilt.changedCvar, 278, gsSPGrayscale(false));
|
||||
PATCH_GFX(object_toki_objects_DL_001BD0, "Swords_MasterHilt36", swordsMasterHilt.changedCvar, 280, gsSPEndDisplayList());
|
||||
PATCH_GFX(ovl_Boss_Ganon2_DL_0103A8, "Swords_MasterHilt37", swordsMasterHilt.changedCvar, 112, gsSPGrayscale(true));
|
||||
PATCH_GFX(ovl_Boss_Ganon2_DL_0103A8, "Swords_MasterHilt38", swordsMasterHilt.changedCvar, 278, gsSPGrayscale(false));
|
||||
PATCH_GFX(ovl_Boss_Ganon2_DL_0103A8, "Swords_MasterHilt39", swordsMasterHilt.changedCvar, 280, gsSPEndDisplayList());
|
||||
}
|
||||
}
|
||||
// if (manualChange) {
|
||||
// PATCH_GFX(gLinkAdultMasterSwordAndSheathFarDL, "Swords_MasterHilt11", swordsMasterHilt.changedCvar, 38, gsSPGrayscale(true));
|
||||
// PATCH_GFX(gLinkAdultMasterSwordAndSheathFarDL, "Swords_MasterHilt12", swordsMasterHilt.changedCvar, 64, gsSPGrayscale(false));
|
||||
// PATCH_GFX(gLinkAdultMasterSwordAndSheathFarDL, "Swords_MasterHilt13", swordsMasterHilt.changedCvar, 106, gsSPGrayscale(true));
|
||||
// PATCH_GFX(gLinkAdultMasterSwordAndSheathFarDL, "Swords_MasterHilt14", swordsMasterHilt.changedCvar, 120, gsSPGrayscale(false));
|
||||
// PATCH_GFX(gLinkAdultMasterSwordAndSheathNearDL, "Swords_MasterHilt15", swordsMasterHilt.changedCvar, 104, gsSPGrayscale(true));
|
||||
// PATCH_GFX(gLinkAdultMasterSwordAndSheathNearDL, "Swords_MasterHilt16", swordsMasterHilt.changedCvar, 182, gsSPGrayscale(false));
|
||||
// PATCH_GFX(gLinkAdultMasterSwordAndSheathNearDL, "Swords_MasterHilt17", swordsMasterHilt.changedCvar, 184, gsSPEndDisplayList());
|
||||
// PATCH_GFX(gLinkAdultHylianShieldSwordAndSheathFarDL, "Swords_MasterHilt18", swordsMasterHilt.changedCvar, 80, gsSPGrayscale(true));
|
||||
// PATCH_GFX(gLinkAdultHylianShieldSwordAndSheathFarDL, "Swords_MasterHilt19", swordsMasterHilt.changedCvar, 94, gsSPGrayscale(false));
|
||||
// PATCH_GFX(gLinkAdultHylianShieldSwordAndSheathFarDL, "Swords_MasterHilt20", swordsMasterHilt.changedCvar, 162, gsSPGrayscale(true));
|
||||
// PATCH_GFX(gLinkAdultHylianShieldSwordAndSheathFarDL, "Swords_MasterHilt21", swordsMasterHilt.changedCvar, 180, gsSPGrayscale(false));
|
||||
// PATCH_GFX(gLinkAdultHylianShieldSwordAndSheathNearDL, "Swords_MasterHilt22", swordsMasterHilt.changedCvar, 154, gsSPGrayscale(true));
|
||||
// PATCH_GFX(gLinkAdultHylianShieldSwordAndSheathNearDL, "Swords_MasterHilt23", swordsMasterHilt.changedCvar, 232, gsSPGrayscale(false));
|
||||
// PATCH_GFX(gLinkAdultMirrorShieldSwordAndSheathFarDL, "Swords_MasterHilt24", swordsMasterHilt.changedCvar, 112, gsSPGrayscale(true));
|
||||
// PATCH_GFX(gLinkAdultMirrorShieldSwordAndSheathFarDL, "Swords_MasterHilt25", swordsMasterHilt.changedCvar, 130, gsSPGrayscale(false));
|
||||
// PATCH_GFX(gLinkAdultMirrorShieldSwordAndSheathFarDL, "Swords_MasterHilt26", swordsMasterHilt.changedCvar, 172, gsSPGrayscale(true));
|
||||
// PATCH_GFX(gLinkAdultMirrorShieldSwordAndSheathFarDL, "Swords_MasterHilt27", swordsMasterHilt.changedCvar, 186, gsSPGrayscale(false));
|
||||
// PATCH_GFX(gLinkAdultMirrorShieldSwordAndSheathNearDL, "Swords_MasterHilt28", swordsMasterHilt.changedCvar, 220, gsSPGrayscale(true));
|
||||
// PATCH_GFX(gLinkAdultMirrorShieldSwordAndSheathNearDL, "Swords_MasterHilt29", swordsMasterHilt.changedCvar, 298, gsSPGrayscale(false));
|
||||
// PATCH_GFX(gLinkAdultLeftHandHoldingMasterSwordFarDL, "Swords_MasterHilt30", swordsMasterHilt.changedCvar, 38, gsSPGrayscale(true));
|
||||
// PATCH_GFX(gLinkAdultLeftHandHoldingMasterSwordFarDL, "Swords_MasterHilt31", swordsMasterHilt.changedCvar, 112, gsSPGrayscale(false));
|
||||
// PATCH_GFX(gLinkAdultLeftHandHoldingMasterSwordNearDL, "Swords_MasterHilt32", swordsMasterHilt.changedCvar, 86, gsSPGrayscale(true));
|
||||
// PATCH_GFX(gLinkAdultLeftHandHoldingMasterSwordNearDL, "Swords_MasterHilt33", swordsMasterHilt.changedCvar, 208, gsSPGrayscale(false));
|
||||
// PATCH_GFX(object_toki_objects_DL_001BD0, "Swords_MasterHilt34", swordsMasterHilt.changedCvar, 112, gsSPGrayscale(true));
|
||||
// PATCH_GFX(object_toki_objects_DL_001BD0, "Swords_MasterHilt35", swordsMasterHilt.changedCvar, 278, gsSPGrayscale(false));
|
||||
// PATCH_GFX(object_toki_objects_DL_001BD0, "Swords_MasterHilt36", swordsMasterHilt.changedCvar, 280, gsSPEndDisplayList());
|
||||
// PATCH_GFX(ovl_Boss_Ganon2_DL_0103A8, "Swords_MasterHilt37", swordsMasterHilt.changedCvar, 112, gsSPGrayscale(true));
|
||||
// PATCH_GFX(ovl_Boss_Ganon2_DL_0103A8, "Swords_MasterHilt38", swordsMasterHilt.changedCvar, 278, gsSPGrayscale(false));
|
||||
// PATCH_GFX(ovl_Boss_Ganon2_DL_0103A8, "Swords_MasterHilt39", swordsMasterHilt.changedCvar, 280, gsSPEndDisplayList());
|
||||
// }
|
||||
// }
|
||||
static CosmeticOption& swordsBiggoronBlade = cosmeticOptions.at("Swords_BiggoronBlade");
|
||||
if (manualChange || CVar_GetS32(swordsBiggoronBlade.rainbowCvar, 0)) {
|
||||
static Color_RGBA8 defaultColor = {swordsBiggoronBlade.defaultColor.x, swordsBiggoronBlade.defaultColor.y, swordsBiggoronBlade.defaultColor.z, swordsBiggoronBlade.defaultColor.w};
|
||||
@@ -701,25 +701,25 @@ void ApplyOrResetCustomGfxPatches(bool manualChange = true) {
|
||||
PATCH_GFX(gGiBiggoronSwordDL, "Swords_BiggoronBlade3", swordsBiggoronBlade.changedCvar, 10, gsDPSetPrimColor(0, 0, color.r, color.g, color.b, 255));
|
||||
PATCH_GFX(gGiBiggoronSwordDL, "Swords_BiggoronBlade4", swordsBiggoronBlade.changedCvar, 12, gsDPSetEnvColor(color.r / 3, color.g / 3, color.b / 3, 255));
|
||||
}
|
||||
static CosmeticOption& swordsBiggoronHilt = cosmeticOptions.at("Swords_BiggoronHilt");
|
||||
if (manualChange || CVar_GetS32(swordsBiggoronHilt.rainbowCvar, 0)) {
|
||||
static Color_RGBA8 defaultColor = {swordsBiggoronHilt.defaultColor.x, swordsBiggoronHilt.defaultColor.y, swordsBiggoronHilt.defaultColor.z, swordsBiggoronHilt.defaultColor.w};
|
||||
Color_RGBA8 color = CVar_GetRGBA(swordsBiggoronHilt.cvar, defaultColor);
|
||||
PATCH_GFX(gLinkAdultLeftHandHoldingBgsNearDL, "Swords_BiggoronHilt1", swordsBiggoronHilt.changedCvar, 20, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
||||
PATCH_GFX(gLinkAdultLeftHandHoldingBgsFarDL, "Swords_BiggoronHilt2", swordsBiggoronHilt.changedCvar, 20, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
||||
PATCH_GFX(gGiBiggoronSwordDL, "Swords_BiggoronHilt3", swordsBiggoronHilt.changedCvar, 74, gsDPSetPrimColor(0, 0, color.r, color.g, color.b, 255));
|
||||
PATCH_GFX(gGiBiggoronSwordDL, "Swords_BiggoronHilt4", swordsBiggoronHilt.changedCvar, 76, gsDPSetEnvColor(color.r / 3, color.g / 3, color.b / 3, 255));
|
||||
PATCH_GFX(gGiBiggoronSwordDL, "Swords_BiggoronHilt5", swordsBiggoronHilt.changedCvar, 154, gsDPSetPrimColor(0, 0, color.r, color.g, color.b, 255));
|
||||
PATCH_GFX(gGiBiggoronSwordDL, "Swords_BiggoronHilt6", swordsBiggoronHilt.changedCvar, 156, gsDPSetEnvColor(color.r / 3, color.g / 3, color.b / 3, 255));
|
||||
// static CosmeticOption& swordsBiggoronHilt = cosmeticOptions.at("Swords_BiggoronHilt");
|
||||
// if (manualChange || CVar_GetS32(swordsBiggoronHilt.rainbowCvar, 0)) {
|
||||
// static Color_RGBA8 defaultColor = {swordsBiggoronHilt.defaultColor.x, swordsBiggoronHilt.defaultColor.y, swordsBiggoronHilt.defaultColor.z, swordsBiggoronHilt.defaultColor.w};
|
||||
// Color_RGBA8 color = CVar_GetRGBA(swordsBiggoronHilt.cvar, defaultColor);
|
||||
// PATCH_GFX(gLinkAdultLeftHandHoldingBgsNearDL, "Swords_BiggoronHilt1", swordsBiggoronHilt.changedCvar, 20, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
||||
// PATCH_GFX(gLinkAdultLeftHandHoldingBgsFarDL, "Swords_BiggoronHilt2", swordsBiggoronHilt.changedCvar, 20, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
||||
// PATCH_GFX(gGiBiggoronSwordDL, "Swords_BiggoronHilt3", swordsBiggoronHilt.changedCvar, 74, gsDPSetPrimColor(0, 0, color.r, color.g, color.b, 255));
|
||||
// PATCH_GFX(gGiBiggoronSwordDL, "Swords_BiggoronHilt4", swordsBiggoronHilt.changedCvar, 76, gsDPSetEnvColor(color.r / 3, color.g / 3, color.b / 3, 255));
|
||||
// PATCH_GFX(gGiBiggoronSwordDL, "Swords_BiggoronHilt5", swordsBiggoronHilt.changedCvar, 154, gsDPSetPrimColor(0, 0, color.r, color.g, color.b, 255));
|
||||
// PATCH_GFX(gGiBiggoronSwordDL, "Swords_BiggoronHilt6", swordsBiggoronHilt.changedCvar, 156, gsDPSetEnvColor(color.r / 3, color.g / 3, color.b / 3, 255));
|
||||
|
||||
if (manualChange) {
|
||||
PATCH_GFX(gLinkAdultLeftHandHoldingBgsFarDL, "Swords_BiggoronHilt7", swordsBiggoronHilt.changedCvar, 278, gsSPGrayscale(true));
|
||||
PATCH_GFX(gLinkAdultLeftHandHoldingBgsFarDL, "Swords_BiggoronHilt8", swordsBiggoronHilt.changedCvar, 332, gsSPGrayscale(false));
|
||||
PATCH_GFX(gLinkAdultLeftHandHoldingBgsFarDL, "Swords_BiggoronHilt9", swordsBiggoronHilt.changedCvar, 334, gsSPEndDisplayList());
|
||||
PATCH_GFX(gLinkAdultLeftHandHoldingBgsNearDL, "Swords_BiggoronHilt10", swordsBiggoronHilt.changedCvar, 38, gsSPGrayscale(true));
|
||||
PATCH_GFX(gLinkAdultLeftHandHoldingBgsNearDL, "Swords_BiggoronHilt11", swordsBiggoronHilt.changedCvar, 118, gsSPGrayscale(false));
|
||||
}
|
||||
}
|
||||
// if (manualChange) {
|
||||
// PATCH_GFX(gLinkAdultLeftHandHoldingBgsFarDL, "Swords_BiggoronHilt7", swordsBiggoronHilt.changedCvar, 278, gsSPGrayscale(true));
|
||||
// PATCH_GFX(gLinkAdultLeftHandHoldingBgsFarDL, "Swords_BiggoronHilt8", swordsBiggoronHilt.changedCvar, 332, gsSPGrayscale(false));
|
||||
// PATCH_GFX(gLinkAdultLeftHandHoldingBgsFarDL, "Swords_BiggoronHilt9", swordsBiggoronHilt.changedCvar, 334, gsSPEndDisplayList());
|
||||
// PATCH_GFX(gLinkAdultLeftHandHoldingBgsNearDL, "Swords_BiggoronHilt10", swordsBiggoronHilt.changedCvar, 38, gsSPGrayscale(true));
|
||||
// PATCH_GFX(gLinkAdultLeftHandHoldingBgsNearDL, "Swords_BiggoronHilt11", swordsBiggoronHilt.changedCvar, 118, gsSPGrayscale(false));
|
||||
// }
|
||||
// }
|
||||
|
||||
static CosmeticOption& glovesGoronBracelet = cosmeticOptions.at("Gloves_GoronBracelet");
|
||||
if (manualChange || CVar_GetS32(glovesGoronBracelet.rainbowCvar, 0)) {
|
||||
@@ -782,30 +782,30 @@ void ApplyOrResetCustomGfxPatches(bool manualChange = true) {
|
||||
// PATCH_GFX(gLinkChildLeftFistAndBoomerangFarDL, "Equipment_BoomerangGem5", equipmentBoomerangGem.changedCvar, 32, gsDPSetPrimColor(0, 0, color.r, color.g, color.b, 255));
|
||||
}
|
||||
|
||||
static CosmeticOption& equipmentSlingshotBody = cosmeticOptions.at("Equipment_SlingshotBody");
|
||||
if (manualChange || CVar_GetS32(equipmentSlingshotBody.rainbowCvar, 0)) {
|
||||
static Color_RGBA8 defaultColor = {equipmentSlingshotBody.defaultColor.x, equipmentSlingshotBody.defaultColor.y, equipmentSlingshotBody.defaultColor.z, equipmentSlingshotBody.defaultColor.w};
|
||||
Color_RGBA8 color = CVar_GetRGBA(equipmentSlingshotBody.cvar, defaultColor);
|
||||
PATCH_GFX(gGiSlingshotDL, "Equipment_SlingshotBody1", equipmentSlingshotBody.changedCvar, 10, gsDPSetPrimColor(0, 0, MAX(color.r - 100, 0), MAX(color.g - 100, 0), MAX(color.b - 100, 0), 255));
|
||||
PATCH_GFX(gGiSlingshotDL, "Equipment_SlingshotBody2", equipmentSlingshotBody.changedCvar, 12, gsDPSetEnvColor(MAX(color.r - 100, 0) / 3, MAX(color.g - 100, 0) / 3, MAX(color.b - 100, 0) / 3, 255));
|
||||
PATCH_GFX(gGiSlingshotDL, "Equipment_SlingshotBody3", equipmentSlingshotBody.changedCvar, 74, gsDPSetPrimColor(0, 0, color.r, color.g, color.b, 255));
|
||||
PATCH_GFX(gGiSlingshotDL, "Equipment_SlingshotBody4", equipmentSlingshotBody.changedCvar, 76, gsDPSetEnvColor(color.r / 3, color.g / 3, color.b / 3, 255));
|
||||
PATCH_GFX(gGiSlingshotDL, "Equipment_SlingshotBody5", equipmentSlingshotBody.changedCvar, 128, gsDPSetPrimColor(0, 0, MAX(color.r - 100, 0), MAX(color.g - 100, 0), MAX(color.b - 100, 0), 255));
|
||||
PATCH_GFX(gGiSlingshotDL, "Equipment_SlingshotBody6", equipmentSlingshotBody.changedCvar, 130, gsDPSetEnvColor(MAX(color.r - 100, 0) / 3, MAX(color.g - 100, 0) / 3, MAX(color.b - 100, 0) / 3, 255));
|
||||
PATCH_GFX(gLinkChildRightArmStretchedSlingshotDL, "Equipment_SlingshotBody7", equipmentSlingshotBody.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
||||
PATCH_GFX(gLinkChildRightHandHoldingSlingshotNearDL, "Equipment_SlingshotBody8", equipmentSlingshotBody.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
||||
PATCH_GFX(gLinkChildRightHandHoldingSlingshotFarDL, "Equipment_SlingshotBody9", equipmentSlingshotBody.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
||||
// static CosmeticOption& equipmentSlingshotBody = cosmeticOptions.at("Equipment_SlingshotBody");
|
||||
// if (manualChange || CVar_GetS32(equipmentSlingshotBody.rainbowCvar, 0)) {
|
||||
// static Color_RGBA8 defaultColor = {equipmentSlingshotBody.defaultColor.x, equipmentSlingshotBody.defaultColor.y, equipmentSlingshotBody.defaultColor.z, equipmentSlingshotBody.defaultColor.w};
|
||||
// Color_RGBA8 color = CVar_GetRGBA(equipmentSlingshotBody.cvar, defaultColor);
|
||||
// PATCH_GFX(gGiSlingshotDL, "Equipment_SlingshotBody1", equipmentSlingshotBody.changedCvar, 10, gsDPSetPrimColor(0, 0, MAX(color.r - 100, 0), MAX(color.g - 100, 0), MAX(color.b - 100, 0), 255));
|
||||
// PATCH_GFX(gGiSlingshotDL, "Equipment_SlingshotBody2", equipmentSlingshotBody.changedCvar, 12, gsDPSetEnvColor(MAX(color.r - 100, 0) / 3, MAX(color.g - 100, 0) / 3, MAX(color.b - 100, 0) / 3, 255));
|
||||
// PATCH_GFX(gGiSlingshotDL, "Equipment_SlingshotBody3", equipmentSlingshotBody.changedCvar, 74, gsDPSetPrimColor(0, 0, color.r, color.g, color.b, 255));
|
||||
// PATCH_GFX(gGiSlingshotDL, "Equipment_SlingshotBody4", equipmentSlingshotBody.changedCvar, 76, gsDPSetEnvColor(color.r / 3, color.g / 3, color.b / 3, 255));
|
||||
// PATCH_GFX(gGiSlingshotDL, "Equipment_SlingshotBody5", equipmentSlingshotBody.changedCvar, 128, gsDPSetPrimColor(0, 0, MAX(color.r - 100, 0), MAX(color.g - 100, 0), MAX(color.b - 100, 0), 255));
|
||||
// PATCH_GFX(gGiSlingshotDL, "Equipment_SlingshotBody6", equipmentSlingshotBody.changedCvar, 130, gsDPSetEnvColor(MAX(color.r - 100, 0) / 3, MAX(color.g - 100, 0) / 3, MAX(color.b - 100, 0) / 3, 255));
|
||||
// PATCH_GFX(gLinkChildRightArmStretchedSlingshotDL, "Equipment_SlingshotBody7", equipmentSlingshotBody.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
||||
// PATCH_GFX(gLinkChildRightHandHoldingSlingshotNearDL, "Equipment_SlingshotBody8", equipmentSlingshotBody.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
||||
// PATCH_GFX(gLinkChildRightHandHoldingSlingshotFarDL, "Equipment_SlingshotBody9", equipmentSlingshotBody.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
||||
|
||||
if (manualChange) {
|
||||
PATCH_GFX(gLinkChildRightArmStretchedSlingshotDL, "Equipment_SlingshotBody10",equipmentSlingshotBody.changedCvar, 20, gsSPGrayscale(true));
|
||||
PATCH_GFX(gLinkChildRightArmStretchedSlingshotDL, "Equipment_SlingshotBody11",equipmentSlingshotBody.changedCvar, 74, gsSPGrayscale(false));
|
||||
PATCH_GFX(gLinkChildRightHandHoldingSlingshotFarDL, "Equipment_SlingshotBody12",equipmentSlingshotBody.changedCvar, 20, gsSPGrayscale(true));
|
||||
PATCH_GFX(gLinkChildRightHandHoldingSlingshotFarDL, "Equipment_SlingshotBody13",equipmentSlingshotBody.changedCvar, 66, gsSPGrayscale(false));
|
||||
PATCH_GFX(gLinkChildRightHandHoldingSlingshotNearDL, "Equipment_SlingshotBody14",equipmentSlingshotBody.changedCvar, 96, gsSPGrayscale(true));
|
||||
PATCH_GFX(gLinkChildRightHandHoldingSlingshotNearDL, "Equipment_SlingshotBody15",equipmentSlingshotBody.changedCvar, 136, gsSPGrayscale(false));
|
||||
PATCH_GFX(gLinkChildRightHandHoldingSlingshotNearDL, "Equipment_SlingshotBody16",equipmentSlingshotBody.changedCvar, 138, gsSPEndDisplayList());
|
||||
}
|
||||
}
|
||||
// if (manualChange) {
|
||||
// PATCH_GFX(gLinkChildRightArmStretchedSlingshotDL, "Equipment_SlingshotBody10",equipmentSlingshotBody.changedCvar, 20, gsSPGrayscale(true));
|
||||
// PATCH_GFX(gLinkChildRightArmStretchedSlingshotDL, "Equipment_SlingshotBody11",equipmentSlingshotBody.changedCvar, 74, gsSPGrayscale(false));
|
||||
// PATCH_GFX(gLinkChildRightHandHoldingSlingshotFarDL, "Equipment_SlingshotBody12",equipmentSlingshotBody.changedCvar, 20, gsSPGrayscale(true));
|
||||
// PATCH_GFX(gLinkChildRightHandHoldingSlingshotFarDL, "Equipment_SlingshotBody13",equipmentSlingshotBody.changedCvar, 66, gsSPGrayscale(false));
|
||||
// PATCH_GFX(gLinkChildRightHandHoldingSlingshotNearDL, "Equipment_SlingshotBody14",equipmentSlingshotBody.changedCvar, 96, gsSPGrayscale(true));
|
||||
// PATCH_GFX(gLinkChildRightHandHoldingSlingshotNearDL, "Equipment_SlingshotBody15",equipmentSlingshotBody.changedCvar, 136, gsSPGrayscale(false));
|
||||
// PATCH_GFX(gLinkChildRightHandHoldingSlingshotNearDL, "Equipment_SlingshotBody16",equipmentSlingshotBody.changedCvar, 138, gsSPEndDisplayList());
|
||||
// }
|
||||
// }
|
||||
static CosmeticOption& equipmentSlingshotString = cosmeticOptions.at("Equipment_SlingshotString");
|
||||
if (manualChange || CVar_GetS32(equipmentSlingshotString.rainbowCvar, 0)) {
|
||||
static Color_RGBA8 defaultColor = {equipmentSlingshotString.defaultColor.x, equipmentSlingshotString.defaultColor.y, equipmentSlingshotString.defaultColor.z, equipmentSlingshotString.defaultColor.w};
|
||||
@@ -949,10 +949,10 @@ void ApplyOrResetCustomGfxPatches(bool manualChange = true) {
|
||||
if (manualChange || CVar_GetS32(consumableHearts.rainbowCvar, 0)) {
|
||||
static Color_RGBA8 defaultColor = {consumableHearts.defaultColor.x, consumableHearts.defaultColor.y, consumableHearts.defaultColor.z, consumableHearts.defaultColor.w};
|
||||
Color_RGBA8 color = CVar_GetRGBA(consumableHearts.cvar, defaultColor);
|
||||
PATCH_GFX(gGiRecoveryHeartDL, "Consumable_Hearts1", consumableHearts.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
||||
PATCH_GFX(gGiRecoveryHeartDL, "Consumable_Hearts2", consumableHearts.changedCvar, 26, gsSPGrayscale(true));
|
||||
PATCH_GFX(gGiRecoveryHeartDL, "Consumable_Hearts3", consumableHearts.changedCvar, 72, gsSPGrayscale(false));
|
||||
PATCH_GFX(gGiRecoveryHeartDL, "Consumable_Hearts4", consumableHearts.changedCvar, 74, gsSPEndDisplayList());
|
||||
// PATCH_GFX(gGiRecoveryHeartDL, "Consumable_Hearts1", consumableHearts.changedCvar, 4, gsDPSetGrayscaleColor(color.r, color.g, color.b, 255));
|
||||
// PATCH_GFX(gGiRecoveryHeartDL, "Consumable_Hearts2", consumableHearts.changedCvar, 26, gsSPGrayscale(true));
|
||||
// PATCH_GFX(gGiRecoveryHeartDL, "Consumable_Hearts3", consumableHearts.changedCvar, 72, gsSPGrayscale(false));
|
||||
// PATCH_GFX(gGiRecoveryHeartDL, "Consumable_Hearts4", consumableHearts.changedCvar, 74, gsSPEndDisplayList());
|
||||
PATCH_GFX(gGiHeartPieceDL, "Consumable_Hearts5", consumableHearts.changedCvar, 4, gsDPSetPrimColor(0, 0, color.r, color.g, color.b, 255));
|
||||
PATCH_GFX(gGiHeartPieceDL, "Consumable_Hearts6", consumableHearts.changedCvar, 12, gsDPSetEnvColor(color.r / 2, color.g / 2, color.b / 2, 255));
|
||||
PATCH_GFX(gGiHeartContainerDL, "Consumable_Hearts7", consumableHearts.changedCvar, 4, gsDPSetPrimColor(0, 0, color.r, color.g, color.b, 255));
|
||||
|
||||
@@ -259,6 +259,10 @@ bool IsEnemyFoundToRandomize(int16_t sceneNum, int8_t roomNum, int16_t actorId,
|
||||
// Only randomize the initial deku scrub actor (single and triple attack), not the flower they spawn.
|
||||
case ACTOR_EN_DEKUNUTS:
|
||||
return (params == -256 || params == 768);
|
||||
// Don't randomize the OoB wallmaster in the silver rupee room because it's only there to
|
||||
// not trigger unlocking the door after killing the other wallmaster in authentic gameplay.
|
||||
case ACTOR_EN_WALLMAS:
|
||||
return (!(!isMQ && sceneNum == SCENE_MEN && roomNum == 2 && posX == -2345));
|
||||
// Only randomize initial floormaster actor (it can split and does some spawning on init).
|
||||
case ACTOR_EN_FLOORMAS:
|
||||
return (params == 0 || params == -32768);
|
||||
|
||||
@@ -23,7 +23,10 @@ bool ItemTableManager::AddItemEntry(uint16_t tableID, uint16_t getItemID, GetIte
|
||||
GetItemEntry ItemTableManager::RetrieveItemEntry(uint16_t tableID, uint16_t itemID) {
|
||||
try {
|
||||
ItemTable* itemTable = RetrieveItemTable(tableID);
|
||||
return itemTable->at(itemID);
|
||||
GetItemEntry getItemEntry = itemTable->at(itemID);
|
||||
getItemEntry.drawItemId = getItemEntry.itemId;
|
||||
getItemEntry.drawModIndex = getItemEntry.modIndex;
|
||||
return getItemEntry;
|
||||
} catch (std::out_of_range& oor) { return GET_ITEM_NONE; }
|
||||
}
|
||||
|
||||
|
||||
@@ -52,5 +52,7 @@ typedef struct GetItemEntry {
|
||||
/* 0x0C */ uint16_t collectable; // determines whether the item can be collected on the overworld. Will be true in most cases.
|
||||
/* 0x0E */ GetItemFrom getItemFrom;
|
||||
/* 0x0F */ GetItemCategory getItemCategory; // Primarily made and used for chest size/texture matches contents
|
||||
/* 0x10 */ uint16_t drawItemId; // Will be a copy of itemId unless the item is an ice trap. Needed for particles to function on ice traps.
|
||||
/* 0x11 */ uint16_t drawModIndex; // Will be a copy of modIndex unless the item is an ice trap. Needed for particles to function on ice traps.
|
||||
CustomDrawFunc drawFunc;
|
||||
}; // size = 0x0F
|
||||
}; // size = 0x11
|
||||
|
||||
@@ -909,6 +909,9 @@ void VanillaFill() {
|
||||
CreateItemOverrides();
|
||||
CreateEntranceOverrides();
|
||||
CreateAlwaysIncludedMessages();
|
||||
if (ShuffleWarpSongs) {
|
||||
CreateWarpSongTexts();
|
||||
}
|
||||
}
|
||||
|
||||
void ClearProgress() {
|
||||
@@ -1071,6 +1074,9 @@ int Fill() {
|
||||
if (ShuffleMerchants.Is(SHUFFLEMERCHANTS_HINTS)) {
|
||||
CreateMerchantsHints();
|
||||
}
|
||||
if (ShuffleWarpSongs) {
|
||||
CreateWarpSongTexts();
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
//Unsuccessful placement
|
||||
|
||||
@@ -779,7 +779,6 @@ void CreateAllHints() {
|
||||
|
||||
CreateGanonText();
|
||||
CreateAltarText();
|
||||
CreateWarpSongTexts();
|
||||
|
||||
SPDLOG_DEBUG("\nNOW CREATING HINTS\n");
|
||||
const HintSetting& hintSetting = hintSettingTable[Settings::HintDistribution.Value<uint8_t>()];
|
||||
|
||||
@@ -220,6 +220,7 @@ extern std::array<ConditionalAlwaysHint, 9> conditionalAlwaysHints;
|
||||
extern uint32_t GetHintRegionHintKey(const uint32_t area);
|
||||
extern void CreateAllHints();
|
||||
extern void CreateMerchantsHints();
|
||||
extern void CreateWarpSongTexts();
|
||||
|
||||
Text& GetChildAltarText();
|
||||
Text& GetAdultAltarText();
|
||||
|
||||
@@ -807,14 +807,14 @@ void LocationTable_Init() {
|
||||
locationTable[KF_SHOP_ITEM_7] = ItemLocation::Base(RC_KF_SHOP_ITEM_7, 0x2D, 0x36, "KF Shop Item 7", KF_SHOP_ITEM_7, BUY_ARROWS_30, {Category::cKokiriForest, Category::cForest, Category::cShop}, SpoilerCollectionCheck::ShopItem(0x2D, 6), SpoilerCollectionCheckGroup::GROUP_KOKIRI_FOREST);
|
||||
locationTable[KF_SHOP_ITEM_8] = ItemLocation::Base(RC_KF_SHOP_ITEM_8, 0x2D, 0x37, "KF Shop Item 8", KF_SHOP_ITEM_8, BUY_HEART, {Category::cKokiriForest, Category::cForest, Category::cShop}, SpoilerCollectionCheck::ShopItem(0x2D, 7), SpoilerCollectionCheckGroup::GROUP_KOKIRI_FOREST);
|
||||
|
||||
locationTable[KAK_POTION_SHOP_ITEM_1] = ItemLocation::Base(RC_KAK_POTION_SHOP_ITEM_1, 0x30, 0x30, "Kak Potion Shop Item 1", KAK_POTION_SHOP_ITEM_1, BUY_DEKU_NUT_5, {Category::cKakarikoVillage, Category::cKakariko, Category::cShop}, SpoilerCollectionCheck::ShopItem(0x30, 0), SpoilerCollectionCheckGroup::GROUP_KAKARIKO);
|
||||
locationTable[KAK_POTION_SHOP_ITEM_2] = ItemLocation::Base(RC_KAK_POTION_SHOP_ITEM_2, 0x30, 0x31, "Kak Potion Shop Item 2", KAK_POTION_SHOP_ITEM_2, BUY_FISH, {Category::cKakarikoVillage, Category::cKakariko, Category::cShop}, SpoilerCollectionCheck::ShopItem(0x30, 1), SpoilerCollectionCheckGroup::GROUP_KAKARIKO);
|
||||
locationTable[KAK_POTION_SHOP_ITEM_1] = ItemLocation::Base(RC_KAK_POTION_SHOP_ITEM_1, 0x30, 0x30, "Kak Potion Shop Item 1", KAK_POTION_SHOP_ITEM_1, BUY_GREEN_POTION, {Category::cKakarikoVillage, Category::cKakariko, Category::cShop}, SpoilerCollectionCheck::ShopItem(0x30, 0), SpoilerCollectionCheckGroup::GROUP_KAKARIKO);
|
||||
locationTable[KAK_POTION_SHOP_ITEM_2] = ItemLocation::Base(RC_KAK_POTION_SHOP_ITEM_2, 0x30, 0x31, "Kak Potion Shop Item 2", KAK_POTION_SHOP_ITEM_2, BUY_BLUE_FIRE, {Category::cKakarikoVillage, Category::cKakariko, Category::cShop}, SpoilerCollectionCheck::ShopItem(0x30, 1), SpoilerCollectionCheckGroup::GROUP_KAKARIKO);
|
||||
locationTable[KAK_POTION_SHOP_ITEM_3] = ItemLocation::Base(RC_KAK_POTION_SHOP_ITEM_3, 0x30, 0x32, "Kak Potion Shop Item 3", KAK_POTION_SHOP_ITEM_3, BUY_RED_POTION_30, {Category::cKakarikoVillage, Category::cKakariko, Category::cShop}, SpoilerCollectionCheck::ShopItem(0x30, 2), SpoilerCollectionCheckGroup::GROUP_KAKARIKO);
|
||||
locationTable[KAK_POTION_SHOP_ITEM_4] = ItemLocation::Base(RC_KAK_POTION_SHOP_ITEM_4, 0x30, 0x33, "Kak Potion Shop Item 4", KAK_POTION_SHOP_ITEM_4, BUY_GREEN_POTION, {Category::cKakarikoVillage, Category::cKakariko, Category::cShop}, SpoilerCollectionCheck::ShopItem(0x30, 3), SpoilerCollectionCheckGroup::GROUP_KAKARIKO);
|
||||
locationTable[KAK_POTION_SHOP_ITEM_5] = ItemLocation::Base(RC_KAK_POTION_SHOP_ITEM_5, 0x30, 0x34, "Kak Potion Shop Item 5", KAK_POTION_SHOP_ITEM_5, BUY_BLUE_FIRE, {Category::cKakarikoVillage, Category::cKakariko, Category::cShop}, SpoilerCollectionCheck::ShopItem(0x30, 4), SpoilerCollectionCheckGroup::GROUP_KAKARIKO);
|
||||
locationTable[KAK_POTION_SHOP_ITEM_4] = ItemLocation::Base(RC_KAK_POTION_SHOP_ITEM_4, 0x30, 0x33, "Kak Potion Shop Item 4", KAK_POTION_SHOP_ITEM_4, BUY_FAIRYS_SPIRIT, {Category::cKakarikoVillage, Category::cKakariko, Category::cShop}, SpoilerCollectionCheck::ShopItem(0x30, 3), SpoilerCollectionCheckGroup::GROUP_KAKARIKO);
|
||||
locationTable[KAK_POTION_SHOP_ITEM_5] = ItemLocation::Base(RC_KAK_POTION_SHOP_ITEM_5, 0x30, 0x34, "Kak Potion Shop Item 5", KAK_POTION_SHOP_ITEM_5, BUY_DEKU_NUT_5, {Category::cKakarikoVillage, Category::cKakariko, Category::cShop}, SpoilerCollectionCheck::ShopItem(0x30, 4), SpoilerCollectionCheckGroup::GROUP_KAKARIKO);
|
||||
locationTable[KAK_POTION_SHOP_ITEM_6] = ItemLocation::Base(RC_KAK_POTION_SHOP_ITEM_6, 0x30, 0x35, "Kak Potion Shop Item 6", KAK_POTION_SHOP_ITEM_6, BUY_BOTTLE_BUG, {Category::cKakarikoVillage, Category::cKakariko, Category::cShop}, SpoilerCollectionCheck::ShopItem(0x30, 5), SpoilerCollectionCheckGroup::GROUP_KAKARIKO);
|
||||
locationTable[KAK_POTION_SHOP_ITEM_7] = ItemLocation::Base(RC_KAK_POTION_SHOP_ITEM_7, 0x30, 0x36, "Kak Potion Shop Item 7", KAK_POTION_SHOP_ITEM_7, BUY_POE, {Category::cKakarikoVillage, Category::cKakariko, Category::cShop}, SpoilerCollectionCheck::ShopItem(0x30, 6), SpoilerCollectionCheckGroup::GROUP_KAKARIKO);
|
||||
locationTable[KAK_POTION_SHOP_ITEM_8] = ItemLocation::Base(RC_KAK_POTION_SHOP_ITEM_8, 0x30, 0x37, "Kak Potion Shop Item 8", KAK_POTION_SHOP_ITEM_8, BUY_FAIRYS_SPIRIT, {Category::cKakarikoVillage, Category::cKakariko, Category::cShop}, SpoilerCollectionCheck::ShopItem(0x30, 7), SpoilerCollectionCheckGroup::GROUP_KAKARIKO);
|
||||
locationTable[KAK_POTION_SHOP_ITEM_8] = ItemLocation::Base(RC_KAK_POTION_SHOP_ITEM_8, 0x30, 0x37, "Kak Potion Shop Item 8", KAK_POTION_SHOP_ITEM_8, BUY_FISH, {Category::cKakarikoVillage, Category::cKakariko, Category::cShop}, SpoilerCollectionCheck::ShopItem(0x30, 7), SpoilerCollectionCheckGroup::GROUP_KAKARIKO);
|
||||
|
||||
locationTable[MARKET_BOMBCHU_SHOP_ITEM_1] = ItemLocation::Base(RC_MARKET_BOMBCHU_SHOP_ITEM_1, 0x32, 0x30, "MK Bombchu Shop Item 1", MARKET_BOMBCHU_SHOP_ITEM_1, BUY_BOMBCHU_10, {Category::cInnerMarket, Category::cMarket, Category::cShop}, SpoilerCollectionCheck::ShopItem(0x32, 0), SpoilerCollectionCheckGroup::GROUP_HYRULE_CASTLE);
|
||||
locationTable[MARKET_BOMBCHU_SHOP_ITEM_2] = ItemLocation::Base(RC_MARKET_BOMBCHU_SHOP_ITEM_2, 0x32, 0x31, "MK Bombchu Shop Item 2", MARKET_BOMBCHU_SHOP_ITEM_2, BUY_BOMBCHU_10, {Category::cInnerMarket, Category::cMarket, Category::cShop}, SpoilerCollectionCheck::ShopItem(0x32, 1), SpoilerCollectionCheckGroup::GROUP_HYRULE_CASTLE);
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
extern "C" void Randomizer_DrawSmallKey(PlayState* play, GetItemEntry* getItemEntry) {
|
||||
s32 pad;
|
||||
|
||||
s8 isColoredKeysEnabled = CVar_GetS32("gRandoMatchKeyColors", 0);
|
||||
s16 color_slot = getItemEntry->getItemId - RG_FOREST_TEMPLE_SMALL_KEY;
|
||||
s16 colors[9][3] = {
|
||||
{ 4, 195, 46 }, // Forest Temple
|
||||
@@ -33,18 +33,23 @@ extern "C" void Randomizer_DrawSmallKey(PlayState* play, GetItemEntry* getItemEn
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, (char*)__FILE__, __LINE__),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
|
||||
gDPSetGrayscaleColor(POLY_OPA_DISP++, colors[color_slot][0], colors[color_slot][1], colors[color_slot][2], 255);
|
||||
gSPGrayscale(POLY_OPA_DISP++, true);
|
||||
if (isColoredKeysEnabled) {
|
||||
gDPSetGrayscaleColor(POLY_OPA_DISP++, colors[color_slot][0], colors[color_slot][1], colors[color_slot][2], 255);
|
||||
gSPGrayscale(POLY_OPA_DISP++, true);
|
||||
}
|
||||
|
||||
gSPDisplayList(POLY_OPA_DISP++, (Gfx*)gGiSmallKeyDL);
|
||||
|
||||
gSPGrayscale(POLY_OPA_DISP++, false);
|
||||
if (isColoredKeysEnabled) {
|
||||
gSPGrayscale(POLY_OPA_DISP++, false);
|
||||
}
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
extern "C" void Randomizer_DrawBossKey(PlayState* play, GetItemEntry* getItemEntry) {
|
||||
s32 pad;
|
||||
s8 isColoredKeysEnabled = CVar_GetS32("gRandoMatchKeyColors", 0);
|
||||
s16 color_slot;
|
||||
color_slot = getItemEntry->getItemId - RG_FOREST_TEMPLE_BOSS_KEY;
|
||||
s16 colors[6][3] = {
|
||||
@@ -63,14 +68,14 @@ extern "C" void Randomizer_DrawBossKey(PlayState* play, GetItemEntry* getItemEnt
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, (char*)__FILE__, __LINE__),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
|
||||
if (color_slot == 5) { // Ganon's Boss Key
|
||||
if (color_slot == 5 && isColoredKeysEnabled) { // Ganon's Boss Key
|
||||
gDPSetGrayscaleColor(POLY_OPA_DISP++, 80, 80, 80, 255);
|
||||
gSPGrayscale(POLY_OPA_DISP++, true);
|
||||
}
|
||||
|
||||
gSPDisplayList(POLY_OPA_DISP++, (Gfx*)gGiBossKeyDL);
|
||||
|
||||
if (color_slot == 5) { // Ganon's Boss Key
|
||||
if (color_slot == 5 && isColoredKeysEnabled) { // Ganon's Boss Key
|
||||
gSPGrayscale(POLY_OPA_DISP++, false);
|
||||
}
|
||||
|
||||
@@ -79,13 +84,16 @@ extern "C" void Randomizer_DrawBossKey(PlayState* play, GetItemEntry* getItemEnt
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, (char*)__FILE__, __LINE__),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
|
||||
gDPSetGrayscaleColor(POLY_XLU_DISP++, colors[color_slot][0], colors[color_slot][1], colors[color_slot][2],
|
||||
255);
|
||||
gSPGrayscale(POLY_XLU_DISP++, true);
|
||||
if (isColoredKeysEnabled) {
|
||||
gDPSetGrayscaleColor(POLY_XLU_DISP++, colors[color_slot][0], colors[color_slot][1], colors[color_slot][2], 255);
|
||||
gSPGrayscale(POLY_XLU_DISP++, true);
|
||||
}
|
||||
|
||||
gSPDisplayList(POLY_XLU_DISP++, (Gfx*)gGiBossKeyGemDL);
|
||||
|
||||
gSPGrayscale(POLY_XLU_DISP++, false);
|
||||
if (isColoredKeysEnabled) {
|
||||
gSPGrayscale(POLY_XLU_DISP++, false);
|
||||
}
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
@@ -157,25 +165,3 @@ extern "C" void Randomizer_DrawDoubleDefense(PlayState* play, GetItemEntry getIt
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
|
||||
extern "C" void Randomizer_DrawIceTrap(PlayState* play, GetItemEntry getItemEntry) {
|
||||
s32 pad;
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
if (CVar_GetS32("gLetItSnow", 0)) {
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
|
||||
Matrix_Scale(0.2f, 0.2f, 0.2f, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, (char*)__FILE__, __LINE__), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
|
||||
gDPSetGrayscaleColor(POLY_OPA_DISP++, 100, 100, 100, 255);
|
||||
gSPGrayscale(POLY_OPA_DISP++, true);
|
||||
|
||||
gSPDisplayList(POLY_OPA_DISP++, (Gfx*)gSilverRockDL);
|
||||
|
||||
gSPGrayscale(POLY_OPA_DISP++, false);
|
||||
}
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
@@ -342,20 +342,20 @@ void Randomizer::LoadHintLocations(const char* spoilerFileName) {
|
||||
CustomMessageManager::Instance->CreateMessage(Randomizer::hintMessageTableID, TEXT_WARP_RANDOM_REPLACED_TEXT,
|
||||
{ TEXTBOX_TYPE_BLACK, TEXTBOX_POS_BOTTOM,
|
||||
"Warp to&{{location}}?\x1B&%gOK&No%w\x02",
|
||||
"Warp to&{{location}}?\x1B&%gOK&No%w\x02", // TODO: German translation
|
||||
"Zu {{location}}?\x1B&%gOK&No%w\x02",
|
||||
"Se téléporter vers&{{location}}?\x1B&%gOK!&Non%w\x02" });
|
||||
|
||||
CustomMessageManager::Instance->CreateMessage(Randomizer::hintMessageTableID, TEXT_LAKE_HYLIA_WATER_SWITCH_SIGN,
|
||||
{ TEXTBOX_TYPE_WOODEN, TEXTBOX_POS_BOTTOM,
|
||||
"Water level control system.&Keep away!",
|
||||
"Wasserstand Kontrollsystem&Finger weg!",
|
||||
"Contrôle du niveau de l'eau.&Ne pas toucher!"
|
||||
"Système de contrôle du niveau&d'eau.&Ne pas toucher!"
|
||||
});
|
||||
CustomMessageManager::Instance->CreateMessage(Randomizer::hintMessageTableID, TEXT_LAKE_HYLIA_WATER_SWITCH_NAVI,
|
||||
{ TEXTBOX_TYPE_BLACK, TEXTBOX_POS_BOTTOM,
|
||||
"This switch is rustier than you think.^Something must be wrong with the&pipe system in the Water Temple.",
|
||||
"Dieser Schalter scheint rostiger zu&sein als er aussieht.^Etwas muss mit dem Leitungssystem&im Wassertempel nicht stimmen.",
|
||||
"Cet interrupteur est très rouillé.^Quelque chose ne va pas avec&la tuyauterie du Temple de l'Eau."
|
||||
{ TEXTBOX_TYPE_BLUE, TEXTBOX_POS_BOTTOM,
|
||||
"%cThis switch is rustier than you think.^%cSomething must be wrong with the&pipe system in the %bWater Temple%c.",
|
||||
"%cDieser Schalter scheint rostiger zu&sein als er aussieht.^%cEtwas muss mit dem Leitungssystem&im %bWassertempel%c nicht stimmen.",
|
||||
"%cCet interrupteur est très rouillé.^%cIl doit y avoir un problème avec&la tuyauterie du %bTemple de l'Eau%c."
|
||||
});
|
||||
}
|
||||
|
||||
@@ -471,9 +471,9 @@ void Randomizer::LoadMerchantMessages(const char* spoilerFileName) {
|
||||
{
|
||||
TEXTBOX_TYPE_BLACK,
|
||||
TEXTBOX_POS_TOP,
|
||||
"Finally! Now I can go back to being &an %rarms dealer!%w",
|
||||
"Finally! Now I can go back to being &an %rarms dealer%w!",
|
||||
"Endlich! Schon bald kann ich wieder &%rKrabbelminen-Händler%w sein!",
|
||||
"Squalala! Je vais enfin pouvoir &%rprendre des vacances!%w"
|
||||
"Squalala! Je vais enfin pouvoir &%rprendre des vacances%w!"
|
||||
}
|
||||
);
|
||||
|
||||
@@ -2608,6 +2608,8 @@ GetItemEntry Randomizer::GetItemEntryFromRGData(RandomizerGetData rgData, GetIte
|
||||
GetItemEntry fakeGiEntry = ItemTableManager::Instance->RetrieveItemEntry(modIndex, GetItemIdFromRandomizerGet(rgData.fakeRgID, ogItemId));
|
||||
giEntry.gid = fakeGiEntry.gid;
|
||||
giEntry.gi = fakeGiEntry.gi;
|
||||
giEntry.drawItemId = fakeGiEntry.drawItemId;
|
||||
giEntry.drawModIndex = fakeGiEntry.drawModIndex;
|
||||
giEntry.drawFunc = fakeGiEntry.drawFunc;
|
||||
}
|
||||
return giEntry;
|
||||
@@ -4203,7 +4205,7 @@ CustomMessageEntry Randomizer::GetWarpSongMessage(u16 textId, bool mysterious) {
|
||||
if (mysterious) {
|
||||
std::vector<std::string> locationName ={
|
||||
"a mysterious place",
|
||||
"a mysterious place", // TODO: German translation
|
||||
"ein mysteriöser Ort",
|
||||
"un endroit mystérieux",
|
||||
};
|
||||
|
||||
@@ -4568,8 +4570,8 @@ void CreateIceTrapRandoMessages() {
|
||||
// We only use this ice trap message for christmas, so we don't want it in the normal ice trap messages rotation
|
||||
customMessageManager->CreateMessage(Randomizer::IceTrapRandoMessageTableID, NUM_ICE_TRAP_MESSAGES + 1,
|
||||
{ TEXTBOX_TYPE_BLACK, TEXTBOX_POS_BOTTOM,
|
||||
"This year for Christmas, all&you get is %BCOAL",
|
||||
"This year for Christmas, all&you get is %BCOAL",
|
||||
"This year for Christmas, all&you get is %BCOAL%w!",
|
||||
"This year for Christmas, all&you get is %BCOAL%w!",
|
||||
"Pour Noël, cette année, tu&n'auras que du %BCHARBON!&%rJoyeux Noël%w!" });
|
||||
}
|
||||
|
||||
@@ -4928,8 +4930,6 @@ void InitRandoItemTable() {
|
||||
randoGetItemTable[i].drawFunc = (CustomDrawFunc)Randomizer_DrawBossKey;
|
||||
} else if (randoGetItemTable[i].itemId == RG_DOUBLE_DEFENSE) {
|
||||
randoGetItemTable[i].drawFunc = (CustomDrawFunc)Randomizer_DrawDoubleDefense;
|
||||
} else if (randoGetItemTable[i].itemId == RG_ICE_TRAP) {
|
||||
randoGetItemTable[i].drawFunc = (CustomDrawFunc)Randomizer_DrawIceTrap;
|
||||
}
|
||||
ItemTableManager::Instance->AddItemEntry(MOD_RANDOMIZER, randoGetItemTable[i].itemId, randoGetItemTable[i]);
|
||||
}
|
||||
|
||||
@@ -181,6 +181,28 @@ std::map<u16, std::tuple<std::string, std::string, SeqType>> sfxEditorSequenceMa
|
||||
{NA_SE_EV_CHICKEN_CRY_A, {"Chicken Cry", "NA_SE_EV_CHICKEN_CRY_A", SEQ_SFX}},
|
||||
};
|
||||
|
||||
// Grabs the current BGM sequence ID and replays it
|
||||
// which will lookup the proper override, or reset back to vanilla
|
||||
void ReplayCurrentBGM() {
|
||||
u16 curSeqId = func_800FA0B4(SEQ_PLAYER_BGM_MAIN);
|
||||
// TODO: replace with Audio_StartSeq when the macro is shared
|
||||
// The fade time and audio player flags will always be 0 in the case of replaying the BGM, so they are not set here
|
||||
Audio_QueueSeqCmd(0x00000000 | curSeqId);
|
||||
}
|
||||
|
||||
// Attempt to update the BGM if it matches the current sequence that is being played
|
||||
// The seqKey that is passed in should be the vanilla ID, not the override ID
|
||||
void UpdateCurrentBGM(u16 seqKey, SeqType seqType) {
|
||||
if (seqType != SEQ_BGM_WORLD) {
|
||||
return;
|
||||
}
|
||||
|
||||
u16 curSeqId = func_800FA0B4(SEQ_PLAYER_BGM_MAIN);
|
||||
if (curSeqId == seqKey) {
|
||||
ReplayCurrentBGM();
|
||||
}
|
||||
}
|
||||
|
||||
void Draw_SfxTab(const std::string& tabId, const std::map<u16, std::tuple<std::string, std::string, SeqType>>& map, SeqType type) {
|
||||
const std::string hiddenTabId = "##" + tabId;
|
||||
const std::string resetAllButton = "Reset All" + hiddenTabId;
|
||||
@@ -189,11 +211,18 @@ void Draw_SfxTab(const std::string& tabId, const std::map<u16, std::tuple<std::s
|
||||
for (const auto& [defaultValue, seqData] : map) {
|
||||
const auto& [name, sfxKey, seqType] = seqData;
|
||||
if (seqType == type) {
|
||||
// Only save authentic sequence CVars
|
||||
if (seqType == SEQ_FANFARE && defaultValue >= MAX_AUTHENTIC_SEQID) {
|
||||
continue;
|
||||
}
|
||||
const std::string cvarKey = "gSfxEditor_" + sfxKey;
|
||||
CVar_SetS32(cvarKey.c_str(), defaultValue);
|
||||
}
|
||||
}
|
||||
SohImGui::RequestCvarSaveOnNextTick();
|
||||
if (type == SEQ_BGM_WORLD) {
|
||||
ReplayCurrentBGM();
|
||||
}
|
||||
}
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button(randomizeAllButton.c_str())) {
|
||||
@@ -208,7 +237,8 @@ void Draw_SfxTab(const std::string& tabId, const std::map<u16, std::tuple<std::s
|
||||
const auto& [name, sfxKey, seqType] = seqData;
|
||||
const std::string cvarKey = "gSfxEditor_" + sfxKey;
|
||||
if (seqType & type) {
|
||||
if (((seqType & SEQ_BGM_CUSTOM) || seqType == SEQ_FANFARE) && defaultValue > MAX_AUTHENTIC_SEQID) {
|
||||
// Only save authentic sequence CVars
|
||||
if (((seqType & SEQ_BGM_CUSTOM) || seqType == SEQ_FANFARE) && defaultValue >= MAX_AUTHENTIC_SEQID) {
|
||||
continue;
|
||||
}
|
||||
const int randomValue = values.back();
|
||||
@@ -217,6 +247,9 @@ void Draw_SfxTab(const std::string& tabId, const std::map<u16, std::tuple<std::s
|
||||
}
|
||||
}
|
||||
SohImGui::RequestCvarSaveOnNextTick();
|
||||
if (type == SEQ_BGM_WORLD) {
|
||||
ReplayCurrentBGM();
|
||||
}
|
||||
}
|
||||
|
||||
ImGui::BeginTable(tabId.c_str(), 3, ImGuiTableFlags_SizingFixedFit);
|
||||
@@ -229,6 +262,7 @@ void Draw_SfxTab(const std::string& tabId, const std::map<u16, std::tuple<std::s
|
||||
if (~(seqType) & type) {
|
||||
continue;
|
||||
}
|
||||
// Do not display custom sequences in the list
|
||||
if (((seqType & SEQ_BGM_CUSTOM) || seqType == SEQ_FANFARE) && defaultValue >= MAX_AUTHENTIC_SEQID) {
|
||||
continue;
|
||||
}
|
||||
@@ -257,6 +291,7 @@ void Draw_SfxTab(const std::string& tabId, const std::map<u16, std::tuple<std::s
|
||||
if (ImGui::Selectable(std::get<0>(seqData).c_str())) {
|
||||
CVar_SetS32(cvarKey.c_str(), value);
|
||||
SohImGui::RequestCvarSaveOnNextTick();
|
||||
UpdateCurrentBGM(defaultValue, type);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -293,23 +328,22 @@ void Draw_SfxTab(const std::string& tabId, const std::map<u16, std::tuple<std::s
|
||||
if (ImGui::Button(resetButton.c_str())) {
|
||||
CVar_SetS32(cvarKey.c_str(), defaultValue);
|
||||
SohImGui::RequestCvarSaveOnNextTick();
|
||||
UpdateCurrentBGM(defaultValue, seqType);
|
||||
}
|
||||
ImGui::SameLine();
|
||||
ImGui::PushItemWidth(-FLT_MIN);
|
||||
if (ImGui::Button(randomizeButton.c_str())) {
|
||||
bool valid = false;
|
||||
uint32_t value;
|
||||
while (!valid) {
|
||||
value = Random(2, map.size());
|
||||
if (map.contains(value)) {
|
||||
auto [name, sfxKey, seqType] = map.at(value);
|
||||
if (seqType & type) {
|
||||
valid = true;
|
||||
}
|
||||
auto it = map.begin();
|
||||
while (true) {
|
||||
const auto& [value, seqData] = *std::next(it, rand() % map.size());
|
||||
const auto& [name, sfxKey, seqType] = seqData;
|
||||
if (seqType & type) {
|
||||
CVar_SetS32(cvarKey.c_str(), value);
|
||||
SohImGui::RequestCvarSaveOnNextTick();
|
||||
UpdateCurrentBGM(defaultValue, type);
|
||||
break;
|
||||
}
|
||||
}
|
||||
CVar_SetS32(cvarKey.c_str(), value);
|
||||
SohImGui::RequestCvarSaveOnNextTick();
|
||||
}
|
||||
}
|
||||
ImGui::EndTable();
|
||||
@@ -355,7 +389,7 @@ void DrawSfxEditor(bool& open) {
|
||||
CVar_SetS32("gSfxEditor", 0);
|
||||
return;
|
||||
}
|
||||
ImGui::SetNextWindowSize(ImVec2(465, 630), ImGuiCond_FirstUseEver);
|
||||
ImGui::SetNextWindowSize(ImVec2(900, 630), ImGuiCond_FirstUseEver);
|
||||
if (!ImGui::Begin("SFX Editor", &open)) {
|
||||
ImGui::End();
|
||||
return;
|
||||
|
||||
+6
-3
@@ -83,9 +83,12 @@ extern "C" void gSPVertex(Gfx* pkt, uintptr_t v, int n, int v0) {
|
||||
extern "C" void gSPInvalidateTexCache(Gfx* pkt, uintptr_t texAddr)
|
||||
{
|
||||
char* imgData = (char*)texAddr;
|
||||
|
||||
if (texAddr != 0 && ResourceMgr_OTRSigCheck(imgData))
|
||||
texAddr = (uintptr_t)ResourceMgr_LoadTexByName(imgData);
|
||||
|
||||
if (texAddr != 0 && ResourceMgr_OTRSigCheck(imgData)) {
|
||||
// Temporary solution to the mq/nonmq issue, this will be
|
||||
// handled better with LUS 1.0
|
||||
texAddr = (uintptr_t)ResourceMgr_LoadTexOrDListByName(imgData);
|
||||
}
|
||||
|
||||
__gSPInvalidateTexCache(pkt, texAddr);
|
||||
}
|
||||
+22
-20
@@ -724,29 +724,19 @@ extern "C" char** ResourceMgr_ListFiles(const char* searchMask, int* resultSize)
|
||||
return result;
|
||||
}
|
||||
|
||||
std::string GetName(const char* path) {
|
||||
std::string Path = path;
|
||||
if (IsGameMasterQuest()) {
|
||||
size_t pos = 0;
|
||||
if ((pos = Path.find("/nonmq/", 0)) != std::string::npos) {
|
||||
Path.replace(pos, 7, "/mq/");
|
||||
}
|
||||
}
|
||||
return Path;
|
||||
}
|
||||
|
||||
extern "C" const char* ResourceMgr_GetName(const char* path) {
|
||||
auto s = new std::string(GetName(path));
|
||||
const char* name = s->c_str();
|
||||
return name;
|
||||
}
|
||||
|
||||
extern "C" void ResourceMgr_LoadFile(const char* resName) {
|
||||
OTRGlobals::Instance->context->GetResourceManager()->LoadResource(resName);
|
||||
}
|
||||
|
||||
std::shared_ptr<Ship::Resource> ResourceMgr_LoadResource(const char* path) {
|
||||
return OTRGlobals::Instance->context->GetResourceManager()->LoadResource(ResourceMgr_GetName(path));
|
||||
std::string Path = path;
|
||||
if (ResourceMgr_IsGameMasterQuest()) {
|
||||
size_t pos = 0;
|
||||
if ((pos = Path.find("/nonmq/", 0)) != std::string::npos) {
|
||||
Path.replace(pos, 7, "/mq/");
|
||||
}
|
||||
}
|
||||
return OTRGlobals::Instance->context->GetResourceManager()->LoadResource(Path.c_str());
|
||||
}
|
||||
|
||||
extern "C" char* ResourceMgr_LoadFileRaw(const char* resName) {
|
||||
@@ -821,7 +811,14 @@ extern "C" char* ResourceMgr_LoadTexOrDListByName(const char* filePath) {
|
||||
else if (res->ResType == Ship::ResourceType::Array)
|
||||
return (char*)(std::static_pointer_cast<Ship::Array>(res))->vertices.data();
|
||||
else {
|
||||
return ResourceMgr_LoadTexByName(ResourceMgr_GetName(filePath));
|
||||
std::string Path = filePath;
|
||||
if (ResourceMgr_IsGameMasterQuest()) {
|
||||
size_t pos = 0;
|
||||
if ((pos = Path.find("/nonmq/", 0)) != std::string::npos) {
|
||||
Path.replace(pos, 7, "/mq/");
|
||||
}
|
||||
}
|
||||
return ResourceMgr_LoadTexByName(Path.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -867,6 +864,11 @@ extern "C" void ResourceMgr_PatchGfxByName(const char* path, const char* patchNa
|
||||
}
|
||||
}*/
|
||||
|
||||
// Index refers to individual gfx words, which are half the size on 32-bit
|
||||
if (sizeof(uintptr_t) < 8) {
|
||||
index /= 2;
|
||||
}
|
||||
|
||||
Gfx* gfx = (Gfx*)&res->instructions[index];
|
||||
|
||||
if (!originalGfx.contains(path) || !originalGfx[path].contains(patchName)) {
|
||||
@@ -1132,7 +1134,7 @@ extern "C" SoundFontSample* ResourceMgr_LoadAudioSample(const char* path)
|
||||
sampleC->unk_bit26 = sample->unk_bit26;
|
||||
sampleC->unk_bit25 = sample->unk_bit25;
|
||||
|
||||
sampleC->book = new AdpcmBook[sample->book.books.size() * sizeof(int16_t)];
|
||||
sampleC->book = (AdpcmBook*) malloc(sizeof(AdpcmBook) + sample->book.books.size() * sizeof(int16_t));
|
||||
sampleC->book->npredictors = sample->book.npredictors;
|
||||
sampleC->book->order = sample->book.order;
|
||||
|
||||
|
||||
@@ -37,7 +37,6 @@ private:
|
||||
};
|
||||
|
||||
uint32_t IsGameMasterQuest();
|
||||
std::string GetName(const char* path);
|
||||
#endif
|
||||
|
||||
#ifndef __cplusplus
|
||||
@@ -60,7 +59,6 @@ uint32_t ResourceMgr_GetNumGameVersions();
|
||||
uint32_t ResourceMgr_GetGameVersion(int index);
|
||||
void ResourceMgr_CacheDirectory(const char* resName);
|
||||
char** ResourceMgr_ListFiles(const char* searchMask, int* resultSize);
|
||||
const char* ResourceMgr_GetName(const char* path);
|
||||
void ResourceMgr_LoadFile(const char* resName);
|
||||
char* ResourceMgr_LoadFileFromDisk(const char* filePath);
|
||||
char* ResourceMgr_LoadJPEG(char* data, int dataSize);
|
||||
|
||||
@@ -95,7 +95,7 @@ extern "C" void OTRMessage_Init()
|
||||
{
|
||||
TEXTBOX_TYPE_BLUE, TEXTBOX_POS_BOTTOM,
|
||||
"You got a %rGold Skulltula Token%w!&You've collected %r{{gsCount}}%w tokens&in total!\x0E\x3C",
|
||||
"Du erhälst ein %rGoldene&Skulltula-Symbol%w! Du hast&insgesamt %r{{gsCount}}%w symbol gesammelt!\x0E\x3C",
|
||||
"Ein %rGoldenes Skulltula-Symbol%w!&Du hast nun insgesamt %r{{gsCount}}%w Golende&Skulltula-Symbole gesammelt!\x0E\x3C",
|
||||
"Vous obtenez un %rSymbole de&Skulltula d'or%w! Vous avez&collecté %r{{gsCount}}%w symboles en tout!\x0E\x3C"
|
||||
}
|
||||
);
|
||||
@@ -104,7 +104,7 @@ extern "C" void OTRMessage_Init()
|
||||
{
|
||||
TEXTBOX_TYPE_BLUE, TEXTBOX_POS_BOTTOM,
|
||||
"You got a %rGold Skulltula Token%w!&You've collected %r{{gsCount}}%w tokens&in total!",
|
||||
"Du erhälst ein %rGoldene&Skulltula-Symbol%w! Du hast&insgesamt %r{{gsCount}}%w symbol gesammelt!",
|
||||
"Ein %rGoldenes Skulltula-Symbol%w!&Du hast nun insgesamt %r{{gsCount}}%w Golende&Skulltula-Symbole gesammelt!",
|
||||
"Vous obtenez un %rSymbole de&Skulltula d'or%w! Vous avez&collecté %r{{gsCount}}%w symboles en tout!"
|
||||
}
|
||||
);
|
||||
@@ -131,7 +131,7 @@ extern "C" void OTRMessage_Init()
|
||||
{
|
||||
TEXTBOX_TYPE_BLUE, TEXTBOX_POS_BOTTOM,
|
||||
"You got a %rHeart Container%w!&You've collected %r{{heartContainerCount}}%w containers&in total!",
|
||||
"Du erhältst ein %rHerzgefäß%w! Du&hast insgesamt %r{{heartContainerCount}}%w Gefäße&gesammelt!",
|
||||
"Ein %rHerzcontainer%w!&Du hast nun insgesamt %r{{heartContainerCount}}%w&Herzcontainer gesammelt!",
|
||||
"Vous obtenez un %rCoeur&d'Energie%w! Vous en avez&collecté %r{{heartContainerCount}}%w en tout!"
|
||||
}
|
||||
);
|
||||
@@ -140,7 +140,7 @@ extern "C" void OTRMessage_Init()
|
||||
{
|
||||
TEXTBOX_TYPE_BLUE, TEXTBOX_POS_BOTTOM,
|
||||
"You got a %rHeart Piece%w!&You've collected %r{{heartPieceCount}}%w pieces&in total!",
|
||||
"Du erhältst ein %rHerzteil%w! Du hast&insgesamt %r{{heartPieceCount}}%w Teile&gesammelt!",
|
||||
"Ein %rHerzteil%w!&Du hast nun insgesamt %r{{heartPieceCount}}%w&Herteile gesammelt!",
|
||||
"Vous obtenez un %rQuart de&Coeur%w! Vous en avez collecté&%r{{heartPieceCount}}%w en tout!"
|
||||
}
|
||||
);
|
||||
@@ -149,8 +149,8 @@ extern "C" void OTRMessage_Init()
|
||||
{
|
||||
TEXTBOX_TYPE_BLACK, TEXTBOX_POS_BOTTOM,
|
||||
"You look bored. Wanna go out for a&walk?\x1B&%gYes&No%w",
|
||||
"Du siehst gelangweilt aus.&Willst du einen Spaziergang machen?\x1B&%gJa&Nein%w", //TODO: AI translated, replace with actual translation
|
||||
"Tu as l'air de t'ennuyer. Tu veux&aller faire une promenade?\x1B&%gOui&Non%w", //TODO: AI translated, replace with actual translation
|
||||
"Du siehst gelangweilt aus.&Willst du einen Spaziergang machen?\x1B&%gJa&Nein%w",
|
||||
"Tu as l'air de t'ennuyer. Tu veux&aller faire un tour?\x1B&%gOui&Non%w",
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@@ -8,6 +8,8 @@ typedef struct {
|
||||
u8 unk_1; // importance?
|
||||
} Struct_8016E320;
|
||||
|
||||
#define GET_PLAYER_IDX(cmd) (cmd & 0xF000000) >> 24
|
||||
|
||||
Struct_8016E320 D_8016E320[4][5];
|
||||
u8 D_8016E348[4];
|
||||
u32 sAudioSeqCmds[0x100];
|
||||
@@ -122,7 +124,7 @@ void Audio_ProcessSeqCmd(u32 cmd) {
|
||||
}
|
||||
|
||||
op = cmd >> 28;
|
||||
playerIdx = (cmd & 0xF000000) >> 24;
|
||||
playerIdx = GET_PLAYER_IDX(cmd);
|
||||
|
||||
switch (op) {
|
||||
case 0x0:
|
||||
@@ -371,12 +373,12 @@ void Audio_QueueSeqCmd(u32 cmd)
|
||||
u8 op = cmd >> 28;
|
||||
if (op == 0 || op == 2 || op == 12) {
|
||||
u8 seqId = cmd & 0xFF;
|
||||
u8 playerIdx = (cmd >> 24) & 0xFF;
|
||||
u8 playerIdx = GET_PLAYER_IDX(cmd);
|
||||
u16 newSeqId = SfxEditor_GetReplacementSeq(seqId);
|
||||
gAudioContext.seqReplaced[playerIdx] = (seqId != newSeqId);
|
||||
gAudioContext.seqToPlay[playerIdx] = newSeqId;
|
||||
cmd |= (seqId & 0xFF);
|
||||
}
|
||||
gAudioContext.seqReplaced[playerIdx] = (seqId != newSeqId);
|
||||
gAudioContext.seqToPlay[playerIdx] = newSeqId;
|
||||
cmd |= (seqId & 0xFF);
|
||||
}
|
||||
|
||||
sAudioSeqCmds[sSeqCmdWrPos++] = cmd;
|
||||
}
|
||||
|
||||
@@ -78,6 +78,9 @@
|
||||
static CollisionPoly* sCurCeilingPoly;
|
||||
static s32 sCurCeilingBgId;
|
||||
|
||||
// Used for animating the ice trap on the "Get Item" model.
|
||||
f32 iceTrapScale;
|
||||
|
||||
void ActorShape_Init(ActorShape* shape, f32 yOffset, ActorShadowFunc shadowDraw, f32 shadowScale) {
|
||||
shape->yOffset = yOffset;
|
||||
shape->shadowDraw = shadowDraw;
|
||||
@@ -2030,6 +2033,7 @@ s32 GiveItemEntryFromActor(Actor* actor, PlayState* play, GetItemEntry getItemEn
|
||||
s32 absYawDiff = ABS(yawDiff);
|
||||
|
||||
if ((getItemEntry.getItemId != GI_NONE) || (player->getItemDirection < absYawDiff)) {
|
||||
iceTrapScale = 0.0f;
|
||||
player->getItemEntry = getItemEntry;
|
||||
player->getItemId = getItemEntry.getItemId;
|
||||
player->interactRangeActor = actor;
|
||||
@@ -3322,6 +3326,15 @@ Actor* Actor_SpawnAsChild(ActorContext* actorCtx, Actor* parent, PlayState* play
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// The following enemies break when the parent actor isn't the same as what would happen in authentic gameplay.
|
||||
// As such, don't assign a parent to them at all when spawned with Enemy Randomizer.
|
||||
// Gohma (z_boss_goma.c), the Stalchildren spawner (z_en_encount1.c) and the falling platform spawning Stalfos in
|
||||
// Forest Temple (z_bg_mori_bigst.c) that normally rely on this behaviour are changed when
|
||||
// Enemy Rando is on so they still work properly even without assigning a parent.
|
||||
if (CVar_GetS32("gRandomizedEnemies", 0) && (spawnedActor->id == ACTOR_EN_FLOORMAS || spawnedActor->id == ACTOR_EN_PEEHAT)) {
|
||||
return spawnedActor;
|
||||
}
|
||||
|
||||
parent->child = spawnedActor;
|
||||
spawnedActor->parent = parent;
|
||||
|
||||
|
||||
@@ -400,9 +400,7 @@ void GetItem_Draw(PlayState* play, s16 drawId) {
|
||||
* Uses the Custom Draw Function if it exists, or just calls `GetItem_Draw`
|
||||
*/
|
||||
void GetItemEntry_Draw(PlayState* play, GetItemEntry getItemEntry) {
|
||||
// RANDOTODO: Make this more flexible for easier toggling of individual item recolors in the future.
|
||||
if (getItemEntry.drawFunc != NULL &&
|
||||
(CVar_GetS32("gRandoMatchKeyColors", 0) || getItemEntry.getItemId == RG_DOUBLE_DEFENSE)) {
|
||||
if (getItemEntry.drawFunc != NULL) {
|
||||
getItemEntry.drawFunc(play, &getItemEntry);
|
||||
} else {
|
||||
GetItem_Draw(play, getItemEntry.gid);
|
||||
@@ -759,8 +757,15 @@ void GetItem_DrawRecoveryHeart(PlayState* play, s16 drawId) {
|
||||
1 * -(play->state.frames * 2), 32, 32));
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
|
||||
G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
if (CVar_GetS32("gCosmetics.Consumable_Hearts.Changed", 0)) {
|
||||
Color_RGB8 color = CVar_GetRGB("gCosmetics.Consumable_Hearts.Value", (Color_RGB8) { 255, 70, 50 });
|
||||
gDPSetGrayscaleColor(POLY_XLU_DISP++, color.r, color.g, color.b, 255);
|
||||
gSPGrayscale(POLY_XLU_DISP++, true);
|
||||
}
|
||||
gSPDisplayList(POLY_XLU_DISP++, sDrawItemTable[drawId].dlists[0]);
|
||||
|
||||
if (CVar_GetS32("gCosmetics.Consumable_Hearts.Changed", 0)) {
|
||||
gSPGrayscale(POLY_XLU_DISP++, false);
|
||||
}
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
|
||||
+15
-14
@@ -1264,9 +1264,9 @@ void EnItem00_Draw(Actor* thisx, PlayState* play) {
|
||||
|
||||
void EnItem00_CustomItemsParticles(Actor* Parent, PlayState* play, GetItemEntry giEntry) {
|
||||
s16 color_slot;
|
||||
switch (giEntry.modIndex) {
|
||||
switch (giEntry.drawModIndex) {
|
||||
case MOD_NONE:
|
||||
switch (giEntry.itemId) {
|
||||
switch (giEntry.drawItemId) {
|
||||
case ITEM_SONG_MINUET:
|
||||
color_slot = 0;
|
||||
break;
|
||||
@@ -1298,7 +1298,7 @@ void EnItem00_CustomItemsParticles(Actor* Parent, PlayState* play, GetItemEntry
|
||||
}
|
||||
break;
|
||||
case MOD_RANDOMIZER:
|
||||
switch (giEntry.itemId) {
|
||||
switch (giEntry.drawItemId) {
|
||||
case RG_MAGIC_SINGLE:
|
||||
case RG_MAGIC_DOUBLE:
|
||||
case RG_MAGIC_BEAN_PACK:
|
||||
@@ -1339,25 +1339,26 @@ void EnItem00_CustomItemsParticles(Actor* Parent, PlayState* play, GetItemEntry
|
||||
{ 154, 154, 154 } // White Color placeholder
|
||||
};
|
||||
|
||||
static Vec3f velocity = { 0.0f, 0.2f, 0.0f };
|
||||
static Vec3f accel = { 0.0f, 0.05f, 0.0f };
|
||||
static Vec3f velocity = { 0.0f, 0.0f, 0.0f };
|
||||
static Vec3f accel = { 0.0f, 0.0f, 0.0f };
|
||||
Color_RGBA8 primColor = { colors[color_slot][0], colors[color_slot][1], colors[color_slot][2], 0 };
|
||||
Color_RGBA8 envColor = { colors[color_slot][0], colors[color_slot][1], colors[color_slot][2], 0 };
|
||||
Vec3f pos;
|
||||
|
||||
velocity.y = -0.00f;
|
||||
accel.y = -0.0f;
|
||||
pos.x = Rand_CenteredFloat(15.0f) + Parent->world.pos.x;
|
||||
// Shop items are rendered at a different height than the rest, so a different y offset is required
|
||||
// Make particles more compact for shop items and use a different height offset for them.
|
||||
if (Parent->id == ACTOR_EN_GIRLA) {
|
||||
pos.x = Rand_CenteredFloat(15.0f) + Parent->world.pos.x;
|
||||
pos.y = (Rand_ZeroOne() * 10.0f) + Parent->world.pos.y + 3;
|
||||
pos.z = Rand_CenteredFloat(15.0f) + Parent->world.pos.z;
|
||||
EffectSsKiraKira_SpawnFocused(play, &pos, &velocity, &accel, &primColor, &envColor, 1000, 30);
|
||||
} else {
|
||||
pos.y = (Rand_ZeroOne() * 10.0f) + Parent->world.pos.y + 25;
|
||||
pos.x = Rand_CenteredFloat(32.0f) + Parent->world.pos.x;
|
||||
pos.y = (Rand_ZeroOne() * 6.0f) + Parent->world.pos.y + 25;
|
||||
pos.z = Rand_CenteredFloat(32.0f) + Parent->world.pos.z;
|
||||
velocity.y = -0.05f;
|
||||
accel.y = -0.025f;
|
||||
EffectSsKiraKira_SpawnDispersed(play, &pos, &velocity, &accel, &primColor, &envColor, 1000, 30);
|
||||
}
|
||||
pos.z = Rand_CenteredFloat(15.0f) + Parent->world.pos.z;
|
||||
|
||||
|
||||
EffectSsKiraKira_SpawnFocused(play, &pos, &velocity, &accel, &primColor, &envColor, 1000, 30);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "global.h"
|
||||
#include "objects/gameplay_keep/gameplay_keep.h"
|
||||
#include "objects/gameplay_field_keep/gameplay_field_keep.h"
|
||||
#include "objects/object_link_boy/object_link_boy.h"
|
||||
#include "objects/object_link_child/object_link_child.h"
|
||||
#include "objects/object_triforce_spot/object_triforce_spot.h"
|
||||
@@ -1172,6 +1173,49 @@ void func_800906D4(PlayState* play, Player* this, Vec3f* newTipPos) {
|
||||
}
|
||||
}
|
||||
|
||||
void Player_DrawGetItemIceTrap(PlayState* play, Player* this, Vec3f* refPos, s32 drawIdPlusOne, f32 height) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
if (CVar_GetS32("gLetItSnow", 0)) {
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
|
||||
Matrix_Scale(0.2f, 0.2f, 0.2f, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
|
||||
gDPSetGrayscaleColor(POLY_OPA_DISP++, 75, 75, 75, 255);
|
||||
gSPGrayscale(POLY_OPA_DISP++, true);
|
||||
|
||||
gSPDisplayList(POLY_OPA_DISP++, (Gfx*)gSilverRockDL);
|
||||
|
||||
gSPGrayscale(POLY_OPA_DISP++, false);
|
||||
} else {
|
||||
if (iceTrapScale < 0.01) {
|
||||
iceTrapScale += 0.001f;
|
||||
} else if (iceTrapScale < 0.8f) {
|
||||
iceTrapScale += 0.2f;
|
||||
}
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08,
|
||||
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, (0 - play->gameplayFrames) % 128, 32, 32, 1, 0,
|
||||
(play->gameplayFrames * -2) % 128, 32, 32));
|
||||
|
||||
Matrix_Translate(0.0f, -40.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_Scale(iceTrapScale, iceTrapScale, iceTrapScale, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_XLU_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 0, 50, 100, 255);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gEffIceFragment3DL);
|
||||
|
||||
// Reset matrix for the fake item model because we're animating the size of the ice block around it before this.
|
||||
Matrix_Translate(refPos->x + (3.3f * Math_SinS(this->actor.shape.rot.y)), refPos->y + height,
|
||||
refPos->z + ((3.3f + (IREG(90) / 10.0f)) * Math_CosS(this->actor.shape.rot.y)), MTXMODE_NEW);
|
||||
Matrix_RotateZYX(0, play->gameplayFrames * 1000, 0, MTXMODE_APPLY);
|
||||
Matrix_Scale(0.2f, 0.2f, 0.2f, MTXMODE_APPLY);
|
||||
// Draw fake item model.
|
||||
GetItem_Draw(play, drawIdPlusOne - 1);
|
||||
}
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
void Player_DrawGetItemImpl(PlayState* play, Player* this, Vec3f* refPos, s32 drawIdPlusOne) {
|
||||
f32 height = (this->exchangeItemId != EXCH_ITEM_NONE) ? 6.0f : 14.0f;
|
||||
|
||||
@@ -1187,9 +1231,9 @@ void Player_DrawGetItemImpl(PlayState* play, Player* this, Vec3f* refPos, s32 dr
|
||||
Matrix_RotateZYX(0, play->gameplayFrames * 1000, 0, MTXMODE_APPLY);
|
||||
Matrix_Scale(0.2f, 0.2f, 0.2f, MTXMODE_APPLY);
|
||||
|
||||
// RANDOTODO: Make this more flexible for easier toggling of individual item recolors in the future.
|
||||
if (this->getItemEntry.drawFunc != NULL &&
|
||||
(CVar_GetS32("gRandoMatchKeyColors", 0) || this->getItemEntry.getItemId == RG_DOUBLE_DEFENSE || this->getItemEntry.getItemId == RG_ICE_TRAP)) {
|
||||
if (this->getItemEntry.modIndex == MOD_RANDOMIZER && this->getItemEntry.getItemId == RG_ICE_TRAP) {
|
||||
Player_DrawGetItemIceTrap(play, this, refPos, drawIdPlusOne, height);
|
||||
} else if (this->getItemEntry.drawFunc != NULL) {
|
||||
this->getItemEntry.drawFunc(play, &this->getItemEntry);
|
||||
} else {
|
||||
GetItem_Draw(play, drawIdPlusOne - 1);
|
||||
|
||||
@@ -113,9 +113,17 @@ void func_8087B938(BgHaka* this, PlayState* play) {
|
||||
actor = actor->next;
|
||||
}
|
||||
player->stateFlags2 &= ~0x10;
|
||||
|
||||
if (this->dyna.actor.params == 1) {
|
||||
func_80078884(NA_SE_SY_CORRECT_CHIME);
|
||||
} else if (play->sceneNum == SCENE_SPOT02 && allPulled) {
|
||||
} else if (!IS_DAY && play->sceneNum == SCENE_SPOT02) {
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_POH, this->dyna.actor.home.pos.x,
|
||||
this->dyna.actor.home.pos.y, this->dyna.actor.home.pos.z, 0, this->dyna.actor.shape.rot.y, 0,
|
||||
1, true);
|
||||
}
|
||||
|
||||
// un tss un tss
|
||||
if (play->sceneNum == SCENE_SPOT02 && allPulled) {
|
||||
func_80078884(NA_SE_SY_CORRECT_CHIME);
|
||||
func_800F5ACC(NA_BGM_STAFF_2);
|
||||
Actor* actor2 = play->actorCtx.actorLists[ACTORCAT_BG].head;
|
||||
@@ -126,11 +134,8 @@ void func_8087B938(BgHaka* this, PlayState* play) {
|
||||
}
|
||||
actor2 = actor2->next;
|
||||
}
|
||||
} else if (!IS_DAY && play->sceneNum == SCENE_SPOT02) {
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_POH, this->dyna.actor.home.pos.x,
|
||||
this->dyna.actor.home.pos.y, this->dyna.actor.home.pos.z, 0, this->dyna.actor.shape.rot.y, 0,
|
||||
1, true);
|
||||
}
|
||||
|
||||
this->actionFunc = func_8087BAAC;
|
||||
}
|
||||
func_8002F974(&this->dyna.actor, NA_SE_EV_ROCK_SLIDE - SFX_FLAG);
|
||||
|
||||
@@ -1703,10 +1703,7 @@ void BossDodongo_DrawEffects(PlayState* play) {
|
||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
unkMtx = &play->billboardMtxF;
|
||||
|
||||
// OTRTODO: This call causes the whole texture cache to be cleaned up, which causes an important slowdown on switch so we need to find a way to avoid it.
|
||||
#ifndef __SWITCH__
|
||||
gSPInvalidateTexCache(POLY_XLU_DISP++, 0);
|
||||
#endif
|
||||
gSPInvalidateTexCache(POLY_XLU_DISP++, gDodongosCavernBossLavaFloorTex);
|
||||
|
||||
for (i = 0; i < 80; i++, eff++) {
|
||||
FrameInterpolation_RecordOpenChild(eff, eff->epoch);
|
||||
|
||||
@@ -1197,8 +1197,10 @@ void BossGanon_SetupTowerCutscene(BossGanon* this, PlayState* play) {
|
||||
|
||||
void BossGanon_ShatterWindows(u8 windowShatterState) {
|
||||
s16 i;
|
||||
u8* tex1 = ResourceMgr_LoadTexByName(SEGMENTED_TO_VIRTUAL(ResourceMgr_GetName(ganon_boss_sceneTex_006C18)));
|
||||
u8* tex2 = ResourceMgr_LoadTexByName(SEGMENTED_TO_VIRTUAL(ResourceMgr_GetName(ganon_boss_sceneTex_007418)));
|
||||
// Temporary solution: using LoadTexOrDList to ensure we actually have the texture available
|
||||
// based on mq/nonmq. This will be handled properly with LUS 1.0
|
||||
u8* tex1 = ResourceMgr_LoadTexOrDListByName(SEGMENTED_TO_VIRTUAL(ganon_boss_sceneTex_006C18));
|
||||
u8* tex2 = ResourceMgr_LoadTexOrDListByName(SEGMENTED_TO_VIRTUAL(ganon_boss_sceneTex_007418));
|
||||
u8* templateTex = ResourceMgr_LoadTexByName(SEGMENTED_TO_VIRTUAL(gGanondorfWindowShatterTemplateTex));
|
||||
|
||||
for (i = 0; i < 2048; i++) {
|
||||
@@ -3820,8 +3822,8 @@ void BossGanon_Draw(Actor* thisx, PlayState* play) {
|
||||
|
||||
// Invalidate textures if they have changed
|
||||
if (this->windowShatterState != GDF_WINDOW_SHATTER_OFF) {
|
||||
gSPInvalidateTexCache(POLY_OPA_DISP++, ResourceMgr_GetName(ganon_boss_sceneTex_006C18));
|
||||
gSPInvalidateTexCache(POLY_OPA_DISP++, ResourceMgr_GetName(ganon_boss_sceneTex_007418));
|
||||
gSPInvalidateTexCache(POLY_OPA_DISP++, ganon_boss_sceneTex_006C18);
|
||||
gSPInvalidateTexCache(POLY_OPA_DISP++, ganon_boss_sceneTex_007418);
|
||||
}
|
||||
|
||||
Gfx_SetupDL_25Opa(play->state.gfxCtx);
|
||||
|
||||
@@ -239,10 +239,14 @@ void EnEncount1_SpawnStalchildOrWolfos(EnEncount1* this, PlayState* play) {
|
||||
spawnPos = this->actor.world.pos;
|
||||
// In authentic gameplay, the game checks how many Stalchildren were spawned and only spawns new ones
|
||||
// when the old ones are despawned and a timer is reached.
|
||||
// With Enemy Randomizer on, this will keep spawning enemies solely on the timer because it's much
|
||||
// more difficult tracking how many enemies have been spawned/killed. It's also fun. :)
|
||||
if ((this->curNumSpawn < this->maxCurSpawns && this->totalNumSpawn < this->maxTotalSpawns) || CVar_GetS32("gRandomizedEnemies", 0)) {
|
||||
while ((this->curNumSpawn < this->maxCurSpawns && this->totalNumSpawn < this->maxTotalSpawns) || CVar_GetS32("gRandomizedEnemies", 0)) {
|
||||
// With Enemy Randomizer on, this will keep spawning enemies based on the timer and the total amount of existing
|
||||
// enemies because it's much more difficult tracking how many enemies specifically spawned by this spawner have
|
||||
// been spawned and/or killed.
|
||||
int8_t enemyCount = play->actorCtx.actorLists[ACTORCAT_ENEMY].length;
|
||||
if ((this->curNumSpawn < this->maxCurSpawns && this->totalNumSpawn < this->maxTotalSpawns) ||
|
||||
(CVar_GetS32("gRandomizedEnemies", 0) && enemyCount < 15)) {
|
||||
while ((this->curNumSpawn < this->maxCurSpawns && this->totalNumSpawn < this->maxTotalSpawns) ||
|
||||
(CVar_GetS32("gRandomizedEnemies", 0) && enemyCount < 15)) {
|
||||
if (play->sceneNum == SCENE_SPOT00) {
|
||||
if ((player->unk_89E == 0) || (player->actor.floorBgId != BGCHECK_SCENE) ||
|
||||
!(player->actor.bgCheckFlags & 1) || (player->stateFlags1 & 0x08000000)) {
|
||||
|
||||
@@ -422,10 +422,10 @@ void EnGirlA_InitItem(EnGirlA* this, PlayState* play) {
|
||||
objectId = getItemEntry.objectId;
|
||||
}
|
||||
|
||||
// Weird edge case here, sold out object reports as loaded for Kokiri shop but doesn't render so we force it to load here
|
||||
if (Object_IsLoaded(&play->objectCtx, objectId) && (params != SI_SOLD_OUT && play->sceneNum == SCENE_KOKIRI_SHOP)) {
|
||||
this->objBankIndex = Object_GetIndex(&play->objectCtx, objectId);
|
||||
} else {
|
||||
this->objBankIndex = Object_GetIndex(&play->objectCtx, objectId);
|
||||
|
||||
// If the object isn't normally spawned by the shop scene, then spawn it now
|
||||
if (this->objBankIndex < 0) {
|
||||
this->objBankIndex = Object_Spawn(&play->objectCtx, objectId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,13 +93,13 @@ void EnGm_Destroy(Actor* thisx, PlayState* play) {
|
||||
s32 func_80A3D7C8(void) {
|
||||
if (LINK_AGE_IN_YEARS == YEARS_CHILD) {
|
||||
return 0;
|
||||
} else if (!(gBitFlags[2] & gSaveContext.inventory.equipment)) {
|
||||
return 1;
|
||||
} else if (gBitFlags[3] & gSaveContext.inventory.equipment) {
|
||||
return 2;
|
||||
} else if ((gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF) &&
|
||||
(gBitFlags[2] & gSaveContext.inventory.equipment)) {
|
||||
!Flags_GetRandomizerInf(RAND_INF_MERCHANTS_MEDIGORON)) {
|
||||
return 1;
|
||||
} else if (!(gBitFlags[2] & gSaveContext.inventory.equipment)) { // Don't have giant's knife
|
||||
return 1;
|
||||
} else if (gBitFlags[3] & gSaveContext.inventory.equipment) { // Have broken giant's knife
|
||||
return 2;
|
||||
} else {
|
||||
return 3;
|
||||
}
|
||||
@@ -256,7 +256,6 @@ void EnGm_ProcessChoiceIndex(EnGm* this, PlayState* play) {
|
||||
GetItemEntry itemEntry = Randomizer_GetItemFromKnownCheck(RC_GC_MEDIGORON, GI_SWORD_KNIFE);
|
||||
gSaveContext.pendingSale = itemEntry.itemId;
|
||||
GiveItemEntryFromActor(&this->actor, play, itemEntry, 415.0f, 10.0f);
|
||||
Flags_SetRandomizerInf(RAND_INF_MERCHANTS_MEDIGORON);
|
||||
gSaveContext.infTable[11] |= 2;
|
||||
this->actionFunc = func_80A3DF00;
|
||||
} else {
|
||||
@@ -276,6 +275,11 @@ void EnGm_ProcessChoiceIndex(EnGm* this, PlayState* play) {
|
||||
|
||||
void func_80A3DF00(EnGm* this, PlayState* play) {
|
||||
if (Actor_HasParent(&this->actor, play)) {
|
||||
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF &&
|
||||
!Flags_GetRandomizerInf(RAND_INF_MERCHANTS_MEDIGORON)) {
|
||||
Flags_SetRandomizerInf(RAND_INF_MERCHANTS_MEDIGORON);
|
||||
}
|
||||
|
||||
this->actor.parent = NULL;
|
||||
this->actionFunc = func_80A3DF60;
|
||||
} else {
|
||||
@@ -284,14 +288,12 @@ void func_80A3DF00(EnGm* this, PlayState* play) {
|
||||
GetItemEntry itemEntry = Randomizer_GetItemFromKnownCheck(RC_GC_MEDIGORON, GI_SWORD_KNIFE);
|
||||
gSaveContext.pendingSale = itemEntry.itemId;
|
||||
GiveItemEntryFromActor(&this->actor, play, itemEntry, 415.0f, 10.0f);
|
||||
Flags_SetRandomizerInf(RAND_INF_MERCHANTS_MEDIGORON);
|
||||
gSaveContext.infTable[11] |= 2;
|
||||
}
|
||||
else {
|
||||
gSaveContext.pendingSale = ItemTable_Retrieve(GI_SWORD_KNIFE).itemId;
|
||||
func_8002F434(&this->actor, play, GI_SWORD_KNIFE, 415.0f, 10.0f);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -656,7 +656,9 @@ void func_80A75A38(EnIk* this, PlayState* play) {
|
||||
}
|
||||
if (this->unk_2F9 == 0) {
|
||||
Item_DropCollectibleRandom(play, &this->actor, &this->actor.world.pos, 0xB0);
|
||||
if (this->switchFlags != 0xFF) {
|
||||
// Don't set flag when Iron Knuckle is spawned by Enemy Rando.
|
||||
// Instead Iron Knuckles rely on the "clear room" flag when Enemy Rando is on.
|
||||
if (this->switchFlags != 0xFF && !CVar_GetS32("gRandomizedEnemies",0)) {
|
||||
Flags_SetSwitch(play, this->switchFlags);
|
||||
}
|
||||
Actor_Kill(&this->actor);
|
||||
|
||||
@@ -663,7 +663,8 @@ void func_80AE3C98(EnRd* this, PlayState* play) {
|
||||
|
||||
if (SkelAnime_Update(&this->skelAnime)) {
|
||||
if (this->unk_30C == 0) {
|
||||
if (!Flags_GetSwitch(play, this->unk_312 & 0x7F)) {
|
||||
// Don't set this flag in Enemy Rando as it can overlap with other objects using the same flag.
|
||||
if (!Flags_GetSwitch(play, this->unk_312 & 0x7F) && !CVar_GetS32("gRandomizedEnemies", 0)) {
|
||||
Flags_SetSwitch(play, this->unk_312 & 0x7F);
|
||||
}
|
||||
if (this->unk_314 != 0) {
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "global.h"
|
||||
#include "alloca.h"
|
||||
#include "textures/nintendo_rogo_static/nintendo_rogo_static.h"
|
||||
#include "assets/objects/gameplay_keep/gameplay_keep.h"
|
||||
#include <soh/Enhancements/bootcommands.h>
|
||||
#include <GameVersions.h>
|
||||
#include <soh/SaveManager.h>
|
||||
@@ -234,6 +235,22 @@ void Title_Draw(TitleContext* this) {
|
||||
gSPTextureRectangle(POLY_OPA_DISP++, 388, y << 2, 1156, (y + 2) << 2, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
|
||||
}
|
||||
|
||||
// Draw ice cube around N64 logo.
|
||||
if (CVar_GetS32("gLetItSnow", 0)) {
|
||||
f32 scale = 0.4f;
|
||||
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08,
|
||||
Gfx_TwoTexScroll(this->state.gfxCtx, 0, 0, (0 - 1) % 128, 32, 32, 1,
|
||||
0, (1 * -2) % 128, 32, 32));
|
||||
|
||||
Matrix_Translate(0.0f, -10.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_Scale(scale, scale, scale, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(this->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gDPSetEnvColor(POLY_OPA_DISP++, 0, 50, 100, 255);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gEffIceFragment3DL);
|
||||
}
|
||||
|
||||
Environment_FillScreen(this->state.gfxCtx, 0, 0, 0, (s16)this->coverAlpha, FILL_SCREEN_XLU);
|
||||
|
||||
sTitleRotY += (300 * CVar_GetFloat("gCosmetics.N64Logo_SpinSpeed", 1.0f));
|
||||
|
||||
Reference in New Issue
Block a user