diff --git a/soh/assets/custom/objects/object_box/gHealthTreasureChestFrontTex.rgb5a1.png b/soh/assets/custom/objects/object_box/gHealthTreasureChestFrontTex.rgb5a1.png new file mode 100644 index 000000000..2ecb69a14 Binary files /dev/null and b/soh/assets/custom/objects/object_box/gHealthTreasureChestFrontTex.rgb5a1.png differ diff --git a/soh/assets/custom/objects/object_box/gHealthTreasureChestSideAndTopTex.rgb5a1.png b/soh/assets/custom/objects/object_box/gHealthTreasureChestSideAndTopTex.rgb5a1.png new file mode 100644 index 000000000..76d53be1e Binary files /dev/null and b/soh/assets/custom/objects/object_box/gHealthTreasureChestSideAndTopTex.rgb5a1.png differ diff --git a/soh/assets/soh_assets.h b/soh/assets/soh_assets.h index 3c3ddcf5a..4b028c502 100644 --- a/soh/assets/soh_assets.h +++ b/soh/assets/soh_assets.h @@ -38,6 +38,12 @@ static const ALIGN_ASSET(2) char gSkullTreasureChestFrontTex[] = dgSkullTreasure #define dgSkullTreasureChestSideAndTopTex "__OTR__objects/object_box/gSkullTreasureChestSideAndTopTex" static const ALIGN_ASSET(2) char gSkullTreasureChestSideAndTopTex[] = dgSkullTreasureChestSideAndTopTex; +#define dgHealthTreasureChestFrontTex "__OTR__objects/object_box/gHealthTreasureChestFrontTex" +static const ALIGN_ASSET(2) char gHealthTreasureChestFrontTex[] = dgHealthTreasureChestFrontTex; + +#define dgHealthTreasureChestSideAndTopTex "__OTR__objects/object_box/gHealthTreasureChestSideAndTopTex" +static const ALIGN_ASSET(2) char gHealthTreasureChestSideAndTopTex[] = dgHealthTreasureChestSideAndTopTex; + #define dgTitleRandomizerSubtitleTex "__OTR__objects/object_mag/gTitleRandomizerSubtitleTex" static const ALIGN_ASSET(2) char gTitleRandomizerSubtitleTex[] = dgTitleRandomizerSubtitleTex; diff --git a/soh/soh/Enhancements/item-tables/ItemTableTypes.h b/soh/soh/Enhancements/item-tables/ItemTableTypes.h index df59d6770..b6207f718 100644 --- a/soh/soh/Enhancements/item-tables/ItemTableTypes.h +++ b/soh/soh/Enhancements/item-tables/ItemTableTypes.h @@ -23,10 +23,11 @@ typedef enum GetItemFrom { typedef enum GetItemCategory { /* 0x00 */ ITEM_CATEGORY_JUNK, /* 0x01 */ ITEM_CATEGORY_LESSER, - /* 0x02 */ ITEM_CATEGORY_BOSS_KEY, - /* 0x03 */ ITEM_CATEGORY_SMALL_KEY, - /* 0x04 */ ITEM_CATEGORY_SKULLTULA_TOKEN, - /* 0x05 */ ITEM_CATEGORY_MAJOR, + /* 0x02 */ ITEM_CATEGORY_HEALTH, + /* 0x03 */ ITEM_CATEGORY_BOSS_KEY, + /* 0x04 */ ITEM_CATEGORY_SMALL_KEY, + /* 0x05 */ ITEM_CATEGORY_SKULLTULA_TOKEN, + /* 0x06 */ ITEM_CATEGORY_MAJOR, } GetItemCategory; #define GET_ITEM(itemId, objectId, drawId, textId, field, chestAnim, itemCategory, modIndex, getItemId) \ @@ -63,7 +64,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 + /* 0x0F */ GetItemCategory getItemCategory; // Primarily made and used for CSMC /* 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 diff --git a/soh/soh/Enhancements/randomizer/ShuffleCrates.cpp b/soh/soh/Enhancements/randomizer/ShuffleCrates.cpp index 4c6ab0aa5..0d7c9a528 100644 --- a/soh/soh/Enhancements/randomizer/ShuffleCrates.cpp +++ b/soh/soh/Enhancements/randomizer/ShuffleCrates.cpp @@ -134,17 +134,11 @@ extern "C" void ObjKibako_RandomizerDraw(Actor* thisx, PlayState* play) { case ITEM_CATEGORY_BOSS_KEY: Gfx_DrawDListOpa(play, (Gfx*)gSmallBossKeyCrateDL); break; + case ITEM_CATEGORY_HEALTH: + Gfx_DrawDListOpa(play, (Gfx*)gSmallHeartCrateDL); + break; case ITEM_CATEGORY_LESSER: - switch (smallCrateItem.itemId) { - case ITEM_HEART_PIECE: - case ITEM_HEART_PIECE_2: - case ITEM_HEART_CONTAINER: - Gfx_DrawDListOpa(play, (Gfx*)gSmallHeartCrateDL); - break; - default: - Gfx_DrawDListOpa(play, (Gfx*)gSmallMinorCrateDL); - break; - } + Gfx_DrawDListOpa(play, (Gfx*)gSmallMinorCrateDL); break; case ITEM_CATEGORY_JUNK: default: diff --git a/soh/soh/Enhancements/randomizer/ShuffleGrass.cpp b/soh/soh/Enhancements/randomizer/ShuffleGrass.cpp index 28f06e9d4..5f80575da 100644 --- a/soh/soh/Enhancements/randomizer/ShuffleGrass.cpp +++ b/soh/soh/Enhancements/randomizer/ShuffleGrass.cpp @@ -46,18 +46,10 @@ extern "C" void EnKusa_RandomizerDraw(Actor* thisx, PlayState* play) { DrawTypeOfGrass(grassActor, (Gfx*)gRandoBushJunkDL, (Gfx*)gRandoCuttableGrassJunkDL, play); break; case ITEM_CATEGORY_LESSER: - switch (itemEntry.itemId) { - case ITEM_HEART_PIECE: - case ITEM_HEART_PIECE_2: - case ITEM_HEART_CONTAINER: - DrawTypeOfGrass(grassActor, (Gfx*)gRandoBushHeartDL, (Gfx*)gRandoCuttableGrassHeartDL, - play); - break; - default: - DrawTypeOfGrass(grassActor, (Gfx*)gRandoBushMinorDL, (Gfx*)gRandoCuttableGrassMinorDL, - play); - break; - } + DrawTypeOfGrass(grassActor, (Gfx*)gRandoBushMinorDL, (Gfx*)gRandoCuttableGrassMinorDL, play); + break; + case ITEM_CATEGORY_HEALTH: + DrawTypeOfGrass(grassActor, (Gfx*)gRandoBushHeartDL, (Gfx*)gRandoCuttableGrassHeartDL, play); break; case ITEM_CATEGORY_BOSS_KEY: DrawTypeOfGrass(grassActor, (Gfx*)gRandoBushBossKeyDL, (Gfx*)gRandoCuttableGrassBossKeyDL, play); diff --git a/soh/soh/Enhancements/randomizer/hook_handlers.cpp b/soh/soh/Enhancements/randomizer/hook_handlers.cpp index 7f23f60cc..64c639948 100644 --- a/soh/soh/Enhancements/randomizer/hook_handlers.cpp +++ b/soh/soh/Enhancements/randomizer/hook_handlers.cpp @@ -325,6 +325,7 @@ void RandomizerOnPlayerUpdateForRCQueueHandler() { getItemEntry.modIndex == MOD_RANDOMIZER) && (getItemEntry.getItemCategory == ITEM_CATEGORY_JUNK || getItemEntry.getItemCategory == ITEM_CATEGORY_SKULLTULA_TOKEN || + getItemEntry.getItemCategory == ITEM_CATEGORY_HEALTH || getItemEntry.getItemCategory == ITEM_CATEGORY_LESSER))))) { Item_DropCollectible(gPlayState, &spawnPos, static_cast(ITEM00_SOH_GIVE_ITEM_ENTRY | 0x8000)); } diff --git a/soh/soh/Enhancements/randomizer/item_list.cpp b/soh/soh/Enhancements/randomizer/item_list.cpp index 56001db48..5be32a54e 100644 --- a/soh/soh/Enhancements/randomizer/item_list.cpp +++ b/soh/soh/Enhancements/randomizer/item_list.cpp @@ -41,7 +41,7 @@ void Rando::StaticData::InitItemTable() { itemTable[RG_GERUDO_MEMBERSHIP_CARD] = Item(RG_GERUDO_MEMBERSHIP_CARD, Text{ "Gerudo Membership Card", "Carte Gerudo", "Gerudo-Pass" }, ITEMTYPE_ITEM, GI_GERUDO_CARD, true, LOGIC_GERUDO_CARD, RHT_GERUDO_MEMBERSHIP_CARD, ITEM_GERUDO_CARD, OBJECT_GI_GERUDO, GID_GERUDO_CARD, 0x7B, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_MAJOR, MOD_NONE); itemTable[RG_MAGIC_BEAN] = Item(RG_MAGIC_BEAN, Text{ "Magic Bean", "Haricots Magiques", "Wundererbse" }, ITEMTYPE_ITEM, GI_BEAN, true, LOGIC_MAGIC_BEAN, RHT_MAGIC_BEAN, ITEM_BEAN, OBJECT_GI_BEAN, GID_BEAN, 0x48, 0x80, CHEST_ANIM_SHORT, ITEM_CATEGORY_MAJOR, MOD_NONE); itemTable[RG_MAGIC_BEAN_PACK] = Item(RG_MAGIC_BEAN_PACK, Text{ "Magic Bean Pack", "Paquet de Haricots Magiques", "Wundererbsen-Packung" }, ITEMTYPE_ITEM, RG_MAGIC_BEAN_PACK, true, LOGIC_MAGIC_BEAN, RHT_MAGIC_BEAN_PACK, RG_MAGIC_BEAN_PACK, OBJECT_GI_BEAN, GID_BEAN, TEXT_RANDOMIZER_CUSTOM_ITEM, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_MAJOR, MOD_RANDOMIZER); - itemTable[RG_DOUBLE_DEFENSE] = Item(RG_DOUBLE_DEFENSE, Text{ "Double Defense", "Double Défence", "Doppelte Verteidigung" }, ITEMTYPE_ITEM, RG_DOUBLE_DEFENSE, true, LOGIC_DOUBLE_DEFENSE, RHT_DOUBLE_DEFENSE, RG_DOUBLE_DEFENSE, OBJECT_GI_HEARTS, GID_HEART_CONTAINER, 0xE9, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_LESSER, MOD_RANDOMIZER); + itemTable[RG_DOUBLE_DEFENSE] = Item(RG_DOUBLE_DEFENSE, Text{ "Double Defense", "Double Défence", "Doppelte Verteidigung" }, ITEMTYPE_ITEM, RG_DOUBLE_DEFENSE, true, LOGIC_DOUBLE_DEFENSE, RHT_DOUBLE_DEFENSE, RG_DOUBLE_DEFENSE, OBJECT_GI_HEARTS, GID_HEART_CONTAINER, 0xE9, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_HEALTH, MOD_RANDOMIZER); itemTable[RG_DOUBLE_DEFENSE].SetCustomDrawFunc(Randomizer_DrawDoubleDefense); // Trade Quest Items itemTable[RG_WEIRD_EGG] = Item(RG_WEIRD_EGG, Text{ "Weird Egg", "Oeuf Curieux", "Seltsames Ei" }, ITEMTYPE_ITEM, GI_WEIRD_EGG, true, LOGIC_WEIRD_EGG, RHT_WEIRD_EGG, ITEM_WEIRD_EGG, OBJECT_GI_EGG, GID_EGG, 0x9A, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_MAJOR, MOD_NONE); @@ -259,8 +259,8 @@ void Rando::StaticData::InitItemTable() { itemTable[RG_RED_RUPEE] = Item(RG_RED_RUPEE, Text{ "Red Rupee", "Rubis Rouge", "Roter Rubin" }, ITEMTYPE_ITEM, GI_RUPEE_RED, false, LOGIC_NONE, RHT_RED_RUPEE, ITEM_RUPEE_RED, OBJECT_GI_RUPY, GID_RUPEE_RED, 0xF0, 0x02, CHEST_ANIM_SHORT, ITEM_CATEGORY_JUNK, MOD_NONE); itemTable[RG_PURPLE_RUPEE] = Item(RG_PURPLE_RUPEE, Text{ "Purple Rupee", "Rubis Pourpre", "Violetter Rubin" }, ITEMTYPE_ITEM, GI_RUPEE_PURPLE, false, LOGIC_NONE, RHT_PURPLE_RUPEE, ITEM_RUPEE_PURPLE, OBJECT_GI_RUPY, GID_RUPEE_PURPLE, 0xF1, 0x14, CHEST_ANIM_SHORT, ITEM_CATEGORY_JUNK, MOD_NONE); itemTable[RG_HUGE_RUPEE] = Item(RG_HUGE_RUPEE, Text{ "Huge Rupee", "Énorme Rubis", "Riesiger Rubin" }, ITEMTYPE_ITEM, GI_RUPEE_GOLD, false, LOGIC_NONE, RHT_HUGE_RUPEE, ITEM_RUPEE_GOLD, OBJECT_GI_RUPY, GID_RUPEE_GOLD, 0xF2, 0x13, CHEST_ANIM_SHORT, ITEM_CATEGORY_LESSER, MOD_NONE); - itemTable[RG_PIECE_OF_HEART] = Item(RG_PIECE_OF_HEART, Text{ "Piece of Heart", "Quart de Coeur", "Herzstück" }, ITEMTYPE_ITEM, GI_HEART_PIECE, true, LOGIC_PIECE_OF_HEART, RHT_PIECE_OF_HEART, ITEM_HEART_PIECE_2, OBJECT_GI_HEARTS, GID_HEART_PIECE, 0xC2, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_LESSER, MOD_NONE); - itemTable[RG_HEART_CONTAINER] = Item(RG_HEART_CONTAINER, Text{ "Heart Container", "Réceptacle de Coeur", "Herzcontainer" }, ITEMTYPE_ITEM, GI_HEART_CONTAINER_2, true, LOGIC_HEART_CONTAINER, RHT_HEART_CONTAINER, ITEM_HEART_CONTAINER, OBJECT_GI_HEARTS, GID_HEART_CONTAINER, 0xC6, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_LESSER, MOD_NONE); + itemTable[RG_PIECE_OF_HEART] = Item(RG_PIECE_OF_HEART, Text{ "Piece of Heart", "Quart de Coeur", "Herzstück" }, ITEMTYPE_ITEM, GI_HEART_PIECE, true, LOGIC_PIECE_OF_HEART, RHT_PIECE_OF_HEART, ITEM_HEART_PIECE_2, OBJECT_GI_HEARTS, GID_HEART_PIECE, 0xC2, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_HEALTH, MOD_NONE); + itemTable[RG_HEART_CONTAINER] = Item(RG_HEART_CONTAINER, Text{ "Heart Container", "Réceptacle de Coeur", "Herzcontainer" }, ITEMTYPE_ITEM, GI_HEART_CONTAINER_2, true, LOGIC_HEART_CONTAINER, RHT_HEART_CONTAINER, ITEM_HEART_CONTAINER, OBJECT_GI_HEARTS, GID_HEART_CONTAINER, 0xC6, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_HEALTH, MOD_NONE); itemTable[RG_ICE_TRAP] = Item(RG_ICE_TRAP, Text{ "Ice Trap", "Piège de Glace", "Eisfalle" }, ITEMTYPE_ITEM, RG_ICE_TRAP, false, LOGIC_NONE, RHT_ICE_TRAP, RG_ICE_TRAP, OBJECT_GI_RUPY, GID_RUPEE_GOLD, TEXT_RANDOMIZER_CUSTOM_ITEM, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_MAJOR, MOD_RANDOMIZER); itemTable[RG_MILK] = Item(RG_MILK, Text{ "Milk", "Lait", "Milch" }, ITEMTYPE_ITEM, GI_MILK, false, LOGIC_NONE, RHT_NONE, ITEM_MILK, OBJECT_GI_MILK, GID_MILK, 0x98, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_JUNK, MOD_NONE); itemTable[RG_FISH] = Item(RG_FISH, Text{ "Fish", "Poisson", "Fisch" }, ITEMTYPE_ITEM, GI_FISH, false, LOGIC_NONE, RHT_NONE, ITEM_FISH, OBJECT_GI_FISH, GID_FISH, 0x47, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_JUNK, MOD_NONE); @@ -283,10 +283,10 @@ void Rando::StaticData::InitItemTable() { itemTable[RG_GREEN_POTION_REFILL] = Item(RG_GREEN_POTION_REFILL, Text{ "Green Potion Refill", "Recharge de Potion Verte", "Nachfüllpackung des grünen Elixiers" }, ITEMTYPE_REFILL, GI_POTION_GREEN, false, LOGIC_NONE, RHT_NONE, ITEM_POTION_GREEN, OBJECT_GI_LIQUID, GID_POTION_GREEN, 0x44, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_JUNK, MOD_NONE); itemTable[RG_BLUE_POTION_REFILL] = Item(RG_BLUE_POTION_REFILL, Text{ "Blue Potion Refill", "Recharge de Potion Bleue", "Nachfüllpackung des blauen Elixiers" }, ITEMTYPE_REFILL, GI_POTION_BLUE, false, LOGIC_NONE, RHT_NONE, ITEM_POTION_BLUE, OBJECT_GI_LIQUID, GID_POTION_BLUE, 0x45, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_JUNK, MOD_NONE); // Treasure Game - itemTable[RG_TREASURE_GAME_HEART] = Item(RG_TREASURE_GAME_HEART, Text{ "Piece of Heart (WINNER)", "Quart de Coeur (Chasse-aux-Trésors)", "Herzstück (Schatztruhenminispiel)" }, ITEMTYPE_ITEM, GI_HEART_PIECE_WIN, true, LOGIC_PIECE_OF_HEART, RHT_TREASURE_GAME_HEART, ITEM_HEART_PIECE_2, OBJECT_GI_HEARTS, GID_HEART_PIECE, 0xFA, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_LESSER, MOD_NONE); + itemTable[RG_TREASURE_GAME_HEART] = Item(RG_TREASURE_GAME_HEART, Text{ "Piece of Heart (WINNER)", "Quart de Coeur (Chasse-aux-Trésors)", "Herzstück (Schatztruhenminispiel)" }, ITEMTYPE_ITEM, GI_HEART_PIECE_WIN, true, LOGIC_PIECE_OF_HEART, RHT_TREASURE_GAME_HEART, ITEM_HEART_PIECE_2, OBJECT_GI_HEARTS, GID_HEART_PIECE, 0xFA, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_HEALTH, MOD_NONE); itemTable[RG_TREASURE_GAME_GREEN_RUPEE] = Item(RG_TREASURE_GAME_GREEN_RUPEE, Text{ "Green Rupee (LOSER)", "Rubis Vert (Chasse-aux-Trésors)", "Grüner Rubin (Schatztruhenminispiel)" }, ITEMTYPE_ITEM, GI_RUPEE_GREEN_LOSE, false, LOGIC_NONE, RHT_TREASURE_GAME_GREEN_RUPEE, ITEM_RUPEE_GREEN, OBJECT_GI_RUPY, GID_RUPEE_GREEN, 0xF4, 0x00, CHEST_ANIM_SHORT, ITEM_CATEGORY_MAJOR, MOD_NONE); // Shop - itemTable[RG_BUY_DEKU_NUTS_5] = Item(RG_BUY_DEKU_NUTS_5, Text{ "Buy Deku Nut (5)", "Acheter: Noix Mojo (5)", "Deku-Nuß kaufen (5)" }, ITEMTYPE_SHOP, GI_NUTS_5_2, true, LOGIC_BUY_NUTS, RHT_DEKU_NUTS_5, ITEM_NUTS_5, OBJECT_GI_NUTS, GID_NUTS, 0x34, 0x0C, CHEST_ANIM_SHORT, ITEM_CATEGORY_JUNK, MOD_NONE, false, 15); + itemTable[RG_BUY_DEKU_NUTS_5] = Item(RG_BUY_DEKU_NUTS_5, Text{ "Buy Deku Nut (5)", "Acheter: Noix Mojo (5)", "Deku-Nuß kaufen (5)" }, ITEMTYPE_SHOP, GI_NUTS_5_2, true, LOGIC_BUY_NUTS, RHT_DEKU_NUTS_5, ITEM_NUTS_5, OBJECT_GI_NUTS, GID_NUTS, 0x34, 0x0C, CHEST_ANIM_SHORT, ITEM_CATEGORY_JUNK, MOD_NONE, false, 15); itemTable[RG_BUY_ARROWS_30] = Item(RG_BUY_ARROWS_30, Text{ "Buy Arrows (30)", "Acheter: Flèches (30)", "Pfeile kaufen (30)" }, ITEMTYPE_SHOP, GI_ARROWS_MEDIUM, true, LOGIC_BUY_ARROW, RHT_ARROWS_30, ITEM_ARROWS_MEDIUM, OBJECT_GI_ARROW, GID_ARROWS_MEDIUM, 0xE6, 0x49, CHEST_ANIM_SHORT, ITEM_CATEGORY_JUNK, MOD_NONE, false, 60); itemTable[RG_BUY_ARROWS_50] = Item(RG_BUY_ARROWS_50, Text{ "Buy Arrows (50)", "Acheter: Flèches (50)", "Pfeile kaufen (50)" }, ITEMTYPE_SHOP, GI_ARROWS_LARGE, true, LOGIC_BUY_ARROW, RHT_ARROWS_30, ITEM_ARROWS_LARGE, OBJECT_GI_ARROW, GID_ARROWS_LARGE, 0xE6, 0x4A, CHEST_ANIM_SHORT, ITEM_CATEGORY_JUNK, MOD_NONE, false, 90); itemTable[RG_BUY_BOMBS_525] = Item(RG_BUY_BOMBS_525, Text{ "Buy Bombs (5) [25]", "Acheter: Bombes (5) [25]", "Bomben kaufen (5) [25]" }, ITEMTYPE_SHOP, GI_BOMBS_5, true, LOGIC_BUY_BOMB, RHT_BOMBS_5, ITEM_BOMBS_5, OBJECT_GI_BOMB_1, GID_BOMB, 0x32, 0x59, CHEST_ANIM_SHORT, ITEM_CATEGORY_JUNK, MOD_NONE, false, 25); diff --git a/soh/soh/OTRGlobals.cpp b/soh/soh/OTRGlobals.cpp index 4b3042072..7ebc6b263 100644 --- a/soh/soh/OTRGlobals.cpp +++ b/soh/soh/OTRGlobals.cpp @@ -674,8 +674,8 @@ extern "C" void VanillaItemTable_Init() { GET_ITEM(ITEM_GERUDO_CARD, OBJECT_GI_GERUDO, GID_GERUDO_CARD, 0x7B, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_MAJOR, MOD_NONE, GI_GERUDO_CARD), GET_ITEM(ITEM_OCARINA_FAIRY, OBJECT_GI_OCARINA_0, GID_OCARINA_FAIRY, 0x4A, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_MAJOR, MOD_NONE, GI_OCARINA_FAIRY), GET_ITEM(ITEM_SEEDS, OBJECT_GI_SEED, GID_SEEDS, 0xDC, 0x50, CHEST_ANIM_SHORT, ITEM_CATEGORY_JUNK, MOD_NONE, GI_SEEDS_5), - GET_ITEM(ITEM_HEART_CONTAINER, OBJECT_GI_HEARTS, GID_HEART_CONTAINER, 0xC6, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_LESSER, MOD_NONE, GI_HEART_CONTAINER), - GET_ITEM(ITEM_HEART_PIECE_2, OBJECT_GI_HEARTS, GID_HEART_PIECE, 0xC2, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_LESSER, MOD_NONE, GI_HEART_PIECE), + GET_ITEM(ITEM_HEART_CONTAINER, OBJECT_GI_HEARTS, GID_HEART_CONTAINER, 0xC6, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_HEALTH, MOD_NONE, GI_HEART_CONTAINER), + GET_ITEM(ITEM_HEART_PIECE_2, OBJECT_GI_HEARTS, GID_HEART_PIECE, 0xC2, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_HEALTH, MOD_NONE, GI_HEART_PIECE), GET_ITEM(ITEM_KEY_BOSS, OBJECT_GI_BOSSKEY, GID_KEY_BOSS, 0xC7, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_BOSS_KEY, MOD_NONE, GI_KEY_BOSS), GET_ITEM(ITEM_COMPASS, OBJECT_GI_COMPASS, GID_COMPASS, 0x67, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_LESSER, MOD_NONE, GI_COMPASS), GET_ITEM(ITEM_DUNGEON_MAP, OBJECT_GI_MAP, GID_DUNGEON_MAP, 0x66, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_LESSER, MOD_NONE, GI_MAP), @@ -692,7 +692,7 @@ extern "C" void VanillaItemTable_Init() { GET_ITEM(ITEM_RUPEE_GREEN, OBJECT_GI_RUPY, GID_RUPEE_GREEN, 0x6F, 0x00, CHEST_ANIM_SHORT, ITEM_CATEGORY_JUNK, MOD_NONE, GI_RUPEE_GREEN), GET_ITEM(ITEM_RUPEE_BLUE, OBJECT_GI_RUPY, GID_RUPEE_BLUE, 0xCC, 0x01, CHEST_ANIM_SHORT, ITEM_CATEGORY_JUNK, MOD_NONE, GI_RUPEE_BLUE), GET_ITEM(ITEM_RUPEE_RED, OBJECT_GI_RUPY, GID_RUPEE_RED, 0xF0, 0x02, CHEST_ANIM_SHORT, ITEM_CATEGORY_JUNK, MOD_NONE, GI_RUPEE_RED), - GET_ITEM(ITEM_HEART_CONTAINER, OBJECT_GI_HEARTS, GID_HEART_CONTAINER, 0xC6, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_LESSER, MOD_NONE, GI_HEART_CONTAINER_2), + GET_ITEM(ITEM_HEART_CONTAINER, OBJECT_GI_HEARTS, GID_HEART_CONTAINER, 0xC6, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_HEALTH, MOD_NONE, GI_HEART_CONTAINER_2), GET_ITEM(ITEM_MILK, OBJECT_GI_MILK, GID_MILK, 0x98, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_JUNK, MOD_NONE, GI_MILK), GET_ITEM(ITEM_MASK_GORON, OBJECT_GI_GOLONMASK, GID_MASK_GORON, 0x14, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_MAJOR, MOD_NONE, GI_MASK_GORON), GET_ITEM(ITEM_MASK_ZORA, OBJECT_GI_ZORAMASK, GID_MASK_ZORA, 0x15, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_MAJOR, MOD_NONE, GI_MASK_ZORA), @@ -731,7 +731,7 @@ extern "C" void VanillaItemTable_Init() { GET_ITEM(ITEM_RUPEE_BLUE, OBJECT_GI_RUPY, GID_RUPEE_BLUE, 0xF5, 0x01, CHEST_ANIM_SHORT, ITEM_CATEGORY_JUNK, MOD_NONE, GI_RUPEE_BLUE_LOSE), GET_ITEM(ITEM_RUPEE_RED, OBJECT_GI_RUPY, GID_RUPEE_RED, 0xF6, 0x02, CHEST_ANIM_SHORT, ITEM_CATEGORY_JUNK, MOD_NONE, GI_RUPEE_RED_LOSE), GET_ITEM(ITEM_RUPEE_PURPLE, OBJECT_GI_RUPY, GID_RUPEE_PURPLE, 0xF7, 0x14, CHEST_ANIM_SHORT, ITEM_CATEGORY_JUNK, MOD_NONE, GI_RUPEE_PURPLE_LOSE), - GET_ITEM(ITEM_HEART_PIECE_2, OBJECT_GI_HEARTS, GID_HEART_PIECE, 0xFA, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_LESSER, MOD_NONE, GI_HEART_PIECE_WIN), + GET_ITEM(ITEM_HEART_PIECE_2, OBJECT_GI_HEARTS, GID_HEART_PIECE, 0xFA, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_HEALTH, MOD_NONE, GI_HEART_PIECE_WIN), GET_ITEM(ITEM_STICK_UPGRADE_20, OBJECT_GI_STICK, GID_STICK, 0x90, 0x80, CHEST_ANIM_SHORT, ITEM_CATEGORY_LESSER, MOD_NONE, GI_STICK_UPGRADE_20), GET_ITEM(ITEM_STICK_UPGRADE_30, OBJECT_GI_STICK, GID_STICK, 0x91, 0x80, CHEST_ANIM_SHORT, ITEM_CATEGORY_LESSER, MOD_NONE, GI_STICK_UPGRADE_30), GET_ITEM(ITEM_NUT_UPGRADE_30, OBJECT_GI_NUTS, GID_NUTS, 0xA7, 0x80, CHEST_ANIM_SHORT, ITEM_CATEGORY_LESSER, MOD_NONE, GI_NUT_UPGRADE_30), diff --git a/soh/src/overlays/actors/ovl_En_Box/z_en_box.c b/soh/src/overlays/actors/ovl_En_Box/z_en_box.c index 9a3a8fb77..935149532 100644 --- a/soh/src/overlays/actors/ovl_En_Box/z_en_box.c +++ b/soh/src/overlays/actors/ovl_En_Box/z_en_box.c @@ -84,11 +84,13 @@ Gfx gGoldTreasureChestChestSideAndLidDL[116] = { 0 }; Gfx gKeyTreasureChestChestSideAndLidDL[116] = { 0 }; Gfx gChristmasRedTreasureChestChestSideAndLidDL[116] = { 0 }; Gfx gChristmasGreenTreasureChestChestSideAndLidDL[116] = { 0 }; +Gfx gHealthTreasureChestChestSideAndLidDL[116] = { 0 }; Gfx gSkullTreasureChestChestFrontDL[128] = { 0 }; Gfx gGoldTreasureChestChestFrontDL[128] = { 0 }; Gfx gKeyTreasureChestChestFrontDL[128] = { 0 }; Gfx gChristmasRedTreasureChestChestFrontDL[128] = { 0 }; Gfx gChristmasGreenTreasureChestChestFrontDL[128] = { 0 }; +Gfx gHealthTreasureChestChestFrontDL[128] = { 0 }; u8 hasCreatedRandoChestTextures = 0; u8 hasCustomChestDLs = 0; u8 hasChristmasChestTexturesAvailable = 0; @@ -655,6 +657,10 @@ void EnBox_UpdateSizeAndTexture(EnBox* this, PlayState* play) { this->boxBodyDL = gTreasureChestBossKeyChestFrontDL; this->boxLidDL = gTreasureChestBossKeyChestSideAndTopDL; break; + case ITEM_CATEGORY_HEALTH: + this->boxBodyDL = gHealthTreasureChestChestFrontDL; + this->boxLidDL = gHealthTreasureChestChestSideAndLidDL; + break; case ITEM_CATEGORY_LESSER: case ITEM_CATEGORY_JUNK: default: @@ -740,6 +746,8 @@ void EnBox_CreateExtraChestTextures() { gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, gChristmasRedTreasureChestSideAndTopTex), gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, gChristmasGreenTreasureChestFrontTex), gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, gChristmasGreenTreasureChestSideAndTopTex), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, gHealthTreasureChestFrontTex), + gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b, 1, gHealthTreasureChestSideAndTopTex), }; Gfx gNoOp[] = { gsDPNoOp() }; @@ -752,6 +760,7 @@ void EnBox_CreateExtraChestTextures() { gKeyTreasureChestChestFrontDL[frontIndex] = *frontCmd; gChristmasRedTreasureChestChestFrontDL[frontIndex] = *frontCmd; gChristmasGreenTreasureChestChestFrontDL[frontIndex] = *frontCmd; + gHealthTreasureChestChestFrontDL[frontIndex] = *frontCmd; // Set the second instruction of img OTR hash opcode to noop, since we will replace it with the // OTR filepath opcode below @@ -764,6 +773,7 @@ void EnBox_CreateExtraChestTextures() { gKeyTreasureChestChestFrontDL[frontIndex] = gNoOp[0]; gChristmasRedTreasureChestChestFrontDL[frontIndex] = gNoOp[0]; gChristmasGreenTreasureChestChestFrontDL[frontIndex] = gNoOp[0]; + gHealthTreasureChestChestFrontDL[frontIndex] = gNoOp[0]; } frontIndex++; @@ -774,6 +784,7 @@ void EnBox_CreateExtraChestTextures() { gKeyTreasureChestChestFrontDL[frontIndex] = *frontCmd; gChristmasRedTreasureChestChestFrontDL[frontIndex] = *frontCmd; gChristmasGreenTreasureChestChestFrontDL[frontIndex] = *frontCmd; + gHealthTreasureChestChestFrontDL[frontIndex] = *frontCmd; gSkullTreasureChestChestFrontDL[5] = gTreasureChestChestTextures[0]; gSkullTreasureChestChestFrontDL[23] = gTreasureChestChestTextures[1]; @@ -795,6 +806,10 @@ void EnBox_CreateExtraChestTextures() { gChristmasGreenTreasureChestChestFrontDL[23] = gTreasureChestChestTextures[9]; gChristmasGreenTreasureChestChestFrontDL[37] = gTreasureChestChestTextures[8]; gChristmasGreenTreasureChestChestFrontDL[50] = gTreasureChestChestTextures[9]; + gHealthTreasureChestChestFrontDL[5] = gTreasureChestChestTextures[10]; + gHealthTreasureChestChestFrontDL[23] = gTreasureChestChestTextures[11]; + gHealthTreasureChestChestFrontDL[37] = gTreasureChestChestTextures[10]; + gHealthTreasureChestChestFrontDL[50] = gTreasureChestChestTextures[11]; Gfx* sideCmd = ResourceMgr_LoadGfxByName(gTreasureChestChestSideAndLidDL); int sideIndex = 0; @@ -804,6 +819,7 @@ void EnBox_CreateExtraChestTextures() { gKeyTreasureChestChestSideAndLidDL[sideIndex] = *sideCmd; gChristmasRedTreasureChestChestSideAndLidDL[sideIndex] = *sideCmd; gChristmasGreenTreasureChestChestSideAndLidDL[sideIndex] = *sideCmd; + gHealthTreasureChestChestSideAndLidDL[sideIndex] = *sideCmd; // Set the second instruction of img OTR hash opcode to noop, since we will replace it with the // OTR filepath opcode below @@ -816,6 +832,7 @@ void EnBox_CreateExtraChestTextures() { gKeyTreasureChestChestSideAndLidDL[sideIndex] = gNoOp[0]; gChristmasRedTreasureChestChestSideAndLidDL[sideIndex] = gNoOp[0]; gChristmasGreenTreasureChestChestSideAndLidDL[sideIndex] = gNoOp[0]; + gHealthTreasureChestChestSideAndLidDL[sideIndex] = gNoOp[0]; } sideIndex++; @@ -826,6 +843,7 @@ void EnBox_CreateExtraChestTextures() { gKeyTreasureChestChestSideAndLidDL[sideIndex] = *sideCmd; gChristmasRedTreasureChestChestSideAndLidDL[sideIndex] = *sideCmd; gChristmasGreenTreasureChestChestSideAndLidDL[sideIndex] = *sideCmd; + gHealthTreasureChestChestSideAndLidDL[sideIndex] = *sideCmd; gSkullTreasureChestChestSideAndLidDL[5] = gTreasureChestChestTextures[0]; gSkullTreasureChestChestSideAndLidDL[29] = gTreasureChestChestTextures[1]; @@ -842,6 +860,9 @@ void EnBox_CreateExtraChestTextures() { gChristmasGreenTreasureChestChestSideAndLidDL[5] = gTreasureChestChestTextures[8]; gChristmasGreenTreasureChestChestSideAndLidDL[29] = gTreasureChestChestTextures[9]; gChristmasGreenTreasureChestChestSideAndLidDL[45] = gTreasureChestChestTextures[8]; + gHealthTreasureChestChestSideAndLidDL[5] = gTreasureChestChestTextures[10]; + gHealthTreasureChestChestSideAndLidDL[29] = gTreasureChestChestTextures[11]; + gHealthTreasureChestChestSideAndLidDL[45] = gTreasureChestChestTextures[10]; ResourceMgr_ListFiles("objects/object_box/gChristmas*", &hasChristmasChestTexturesAvailable); hasCreatedRandoChestTextures = 1;