1
0
mirror of https://github.com/HarbourMasters/Shipwright.git synced 2024-12-20 23:28:51 -05:00
Shipwright/soh/include/z64item.h

632 lines
19 KiB
C
Raw Normal View History

#ifndef Z64ITEM_H
#define Z64ITEM_H
typedef enum {
/* 0 */ EQUIP_TYPE_SWORD,
/* 1 */ EQUIP_TYPE_SHIELD,
/* 2 */ EQUIP_TYPE_TUNIC,
/* 3 */ EQUIP_TYPE_BOOTS,
/* 4 */ EQUIP_TYPE_MAX
} EquipmentType;
// `EquipInv*` enums are for Inventory.equipment (for example used in the `CHECK_OWNED_EQUIP` macro)
typedef enum {
/* 0 */ EQUIP_INV_SWORD_KOKIRI,
/* 1 */ EQUIP_INV_SWORD_MASTER,
/* 2 */ EQUIP_INV_SWORD_BIGGORON,
/* 3 */ EQUIP_INV_SWORD_BROKENGIANTKNIFE
} EquipInvSword;
typedef enum {
/* 0 */ EQUIP_INV_SHIELD_DEKU,
/* 1 */ EQUIP_INV_SHIELD_HYLIAN,
/* 2 */ EQUIP_INV_SHIELD_MIRROR
} EquipInvShield;
typedef enum {
/* 0 */ EQUIP_INV_TUNIC_KOKIRI,
/* 1 */ EQUIP_INV_TUNIC_GORON,
/* 2 */ EQUIP_INV_TUNIC_ZORA
} EquipInvTunic;
typedef enum {
/* 0 */ EQUIP_INV_BOOTS_KOKIRI,
/* 1 */ EQUIP_INV_BOOTS_IRON,
/* 2 */ EQUIP_INV_BOOTS_HOVER
} EquipInvBoots;
// `EquipValue*` enums are for ItemEquips.equipment (for example used in the `CUR_EQUIP_VALUE` macro)
typedef enum {
/* 0 */ EQUIP_VALUE_SWORD_NONE,
/* 1 */ EQUIP_VALUE_SWORD_KOKIRI,
/* 2 */ EQUIP_VALUE_SWORD_MASTER,
/* 3 */ EQUIP_VALUE_SWORD_BIGGORON,
/* 4 */ EQUIP_VALUE_SWORD_MAX
} EquipValueSword;
typedef enum {
/* 0 */ EQUIP_VALUE_SHIELD_NONE,
/* 1 */ EQUIP_VALUE_SHIELD_DEKU,
/* 2 */ EQUIP_VALUE_SHIELD_HYLIAN,
/* 3 */ EQUIP_VALUE_SHIELD_MIRROR,
/* 4 */ EQUIP_VALUE_SHIELD_MAX
} EquipValueShield;
typedef enum {
/* 0 */ EQUIP_VALUE_TUNIC_NONE,
/* 1 */ EQUIP_VALUE_TUNIC_KOKIRI,
/* 2 */ EQUIP_VALUE_TUNIC_GORON,
/* 3 */ EQUIP_VALUE_TUNIC_ZORA,
/* 4 */ EQUIP_VALUE_TUNIC_MAX
} EquipValueTunic;
typedef enum {
/* 0 */ EQUIP_VALUE_BOOTS_NONE,
/* 1 */ EQUIP_VALUE_BOOTS_KOKIRI,
/* 2 */ EQUIP_VALUE_BOOTS_IRON,
/* 3 */ EQUIP_VALUE_BOOTS_HOVER,
/* 4 */ EQUIP_VALUE_BOOTS_MAX
} EquipValueBoots;
typedef enum {
/* 0x00 */ UPG_QUIVER,
/* 0x01 */ UPG_BOMB_BAG,
/* 0x02 */ UPG_STRENGTH,
/* 0x03 */ UPG_SCALE,
/* 0x04 */ UPG_WALLET,
/* 0x05 */ UPG_BULLET_BAG,
/* 0x06 */ UPG_STICKS,
/* 0x07 */ UPG_NUTS
} UpgradeType;
typedef enum {
/* 0x00 */ QUEST_MEDALLION_FOREST,
/* 0x01 */ QUEST_MEDALLION_FIRE,
/* 0x02 */ QUEST_MEDALLION_WATER,
/* 0x03 */ QUEST_MEDALLION_SPIRIT,
/* 0x04 */ QUEST_MEDALLION_SHADOW,
/* 0x05 */ QUEST_MEDALLION_LIGHT,
/* 0x06 */ QUEST_SONG_MINUET,
/* 0x07 */ QUEST_SONG_BOLERO,
/* 0x08 */ QUEST_SONG_SERENADE,
/* 0x09 */ QUEST_SONG_REQUIEM,
/* 0x0A */ QUEST_SONG_NOCTURNE,
/* 0x0B */ QUEST_SONG_PRELUDE,
/* 0x0C */ QUEST_SONG_LULLABY,
/* 0x0D */ QUEST_SONG_EPONA,
/* 0x0E */ QUEST_SONG_SARIA,
/* 0x0F */ QUEST_SONG_SUN,
/* 0x10 */ QUEST_SONG_TIME,
/* 0x11 */ QUEST_SONG_STORMS,
/* 0x12 */ QUEST_KOKIRI_EMERALD,
/* 0x13 */ QUEST_GORON_RUBY,
/* 0x14 */ QUEST_ZORA_SAPPHIRE,
/* 0x15 */ QUEST_STONE_OF_AGONY,
/* 0x16 */ QUEST_GERUDO_CARD,
/* 0x17 */ QUEST_SKULL_TOKEN,
/* 0x18 */ QUEST_HEART_PIECE
} QuestItem;
typedef enum {
/* 0x00 */ DUNGEON_KEY_BOSS,
/* 0x01 */ DUNGEON_COMPASS,
/* 0x02 */ DUNGEON_MAP
} DungeonItem;
typedef enum {
/* 0x00 */ SLOT_STICK,
/* 0x01 */ SLOT_NUT,
/* 0x02 */ SLOT_BOMB,
/* 0x03 */ SLOT_BOW,
/* 0x04 */ SLOT_ARROW_FIRE,
/* 0x05 */ SLOT_DINS_FIRE,
/* 0x06 */ SLOT_SLINGSHOT,
/* 0x07 */ SLOT_OCARINA,
/* 0x08 */ SLOT_BOMBCHU,
/* 0x09 */ SLOT_HOOKSHOT,
/* 0x0A */ SLOT_ARROW_ICE,
/* 0x0B */ SLOT_FARORES_WIND,
/* 0x0C */ SLOT_BOOMERANG,
/* 0x0D */ SLOT_LENS,
/* 0x0E */ SLOT_BEAN,
/* 0x0F */ SLOT_HAMMER,
/* 0x10 */ SLOT_ARROW_LIGHT,
/* 0x11 */ SLOT_NAYRUS_LOVE,
/* 0x12 */ SLOT_BOTTLE_1,
/* 0x13 */ SLOT_BOTTLE_2,
/* 0x14 */ SLOT_BOTTLE_3,
/* 0x15 */ SLOT_BOTTLE_4,
/* 0x16 */ SLOT_TRADE_ADULT,
/* 0x17 */ SLOT_TRADE_CHILD,
2022-05-15 15:26:54 -04:00
/* 0x18 */ SLOT_TUNIC_KOKIRI,
/* 0x19 */ SLOT_TUNIC_GORON,
/* 0x1A */ SLOT_TUNIC_ZORA,
/* 0x1B */ SLOT_BOOTS_KOKIRI,
/* 0x1C */ SLOT_BOOTS_IRON,
/* 0x1D */ SLOT_BOOTS_HOVER,
/* 0xFF */ SLOT_NONE = 0xFF
} InventorySlot;
typedef enum {
/* 0x00 */ ITEM_STICK,
/* 0x01 */ ITEM_NUT,
/* 0x02 */ ITEM_BOMB,
/* 0x03 */ ITEM_BOW,
/* 0x04 */ ITEM_ARROW_FIRE,
/* 0x05 */ ITEM_DINS_FIRE,
/* 0x06 */ ITEM_SLINGSHOT,
/* 0x07 */ ITEM_OCARINA_FAIRY,
/* 0x08 */ ITEM_OCARINA_TIME,
/* 0x09 */ ITEM_BOMBCHU,
/* 0x0A */ ITEM_HOOKSHOT,
/* 0x0B */ ITEM_LONGSHOT,
/* 0x0C */ ITEM_ARROW_ICE,
/* 0x0D */ ITEM_FARORES_WIND,
/* 0x0E */ ITEM_BOOMERANG,
/* 0x0F */ ITEM_LENS,
/* 0x10 */ ITEM_BEAN,
/* 0x11 */ ITEM_HAMMER,
/* 0x12 */ ITEM_ARROW_LIGHT,
/* 0x13 */ ITEM_NAYRUS_LOVE,
/* 0x14 */ ITEM_BOTTLE,
/* 0x15 */ ITEM_POTION_RED,
/* 0x16 */ ITEM_POTION_GREEN,
/* 0x17 */ ITEM_POTION_BLUE,
/* 0x18 */ ITEM_FAIRY,
/* 0x19 */ ITEM_FISH,
/* 0x1A */ ITEM_MILK_BOTTLE,
/* 0x1B */ ITEM_LETTER_RUTO,
/* 0x1C */ ITEM_BLUE_FIRE,
/* 0x1D */ ITEM_BUG,
/* 0x1E */ ITEM_BIG_POE,
/* 0x1F */ ITEM_MILK_HALF,
/* 0x20 */ ITEM_POE,
/* 0x21 */ ITEM_WEIRD_EGG,
/* 0x22 */ ITEM_CHICKEN,
/* 0x23 */ ITEM_LETTER_ZELDA,
/* 0x24 */ ITEM_MASK_KEATON,
/* 0x25 */ ITEM_MASK_SKULL,
/* 0x26 */ ITEM_MASK_SPOOKY,
/* 0x27 */ ITEM_MASK_BUNNY,
/* 0x28 */ ITEM_MASK_GORON,
/* 0x29 */ ITEM_MASK_ZORA,
/* 0x2A */ ITEM_MASK_GERUDO,
/* 0x2B */ ITEM_MASK_TRUTH,
/* 0x2C */ ITEM_SOLD_OUT,
/* 0x2D */ ITEM_POCKET_EGG,
/* 0x2E */ ITEM_POCKET_CUCCO,
/* 0x2F */ ITEM_COJIRO,
/* 0x30 */ ITEM_ODD_MUSHROOM,
/* 0x31 */ ITEM_ODD_POTION,
/* 0x32 */ ITEM_SAW,
/* 0x33 */ ITEM_SWORD_BROKEN,
/* 0x34 */ ITEM_PRESCRIPTION,
/* 0x35 */ ITEM_FROG,
/* 0x36 */ ITEM_EYEDROPS,
/* 0x37 */ ITEM_CLAIM_CHECK,
/* 0x38 */ ITEM_BOW_ARROW_FIRE,
/* 0x39 */ ITEM_BOW_ARROW_ICE,
/* 0x3A */ ITEM_BOW_ARROW_LIGHT,
/* 0x3B */ ITEM_SWORD_KOKIRI,
/* 0x3C */ ITEM_SWORD_MASTER,
/* 0x3D */ ITEM_SWORD_BGS,
/* 0x3E */ ITEM_SHIELD_DEKU,
/* 0x3F */ ITEM_SHIELD_HYLIAN,
/* 0x40 */ ITEM_SHIELD_MIRROR,
/* 0x41 */ ITEM_TUNIC_KOKIRI,
/* 0x42 */ ITEM_TUNIC_GORON,
/* 0x43 */ ITEM_TUNIC_ZORA,
/* 0x44 */ ITEM_BOOTS_KOKIRI,
/* 0x45 */ ITEM_BOOTS_IRON,
/* 0x46 */ ITEM_BOOTS_HOVER,
/* 0x47 */ ITEM_BULLET_BAG_30,
/* 0x48 */ ITEM_BULLET_BAG_40,
/* 0x49 */ ITEM_BULLET_BAG_50,
/* 0x4A */ ITEM_QUIVER_30,
/* 0x4B */ ITEM_QUIVER_40,
/* 0x4C */ ITEM_QUIVER_50,
/* 0x4D */ ITEM_BOMB_BAG_20,
/* 0x4E */ ITEM_BOMB_BAG_30,
/* 0x4F */ ITEM_BOMB_BAG_40,
/* 0x50 */ ITEM_BRACELET,
/* 0x51 */ ITEM_GAUNTLETS_SILVER,
/* 0x52 */ ITEM_GAUNTLETS_GOLD,
/* 0x53 */ ITEM_SCALE_SILVER,
/* 0x54 */ ITEM_SCALE_GOLDEN,
/* 0x55 */ ITEM_SWORD_KNIFE,
/* 0x56 */ ITEM_WALLET_ADULT,
/* 0x57 */ ITEM_WALLET_GIANT,
/* 0x58 */ ITEM_SEEDS,
/* 0x59 */ ITEM_FISHING_POLE,
/* 0x5A */ ITEM_SONG_MINUET,
/* 0x5B */ ITEM_SONG_BOLERO,
/* 0x5C */ ITEM_SONG_SERENADE,
/* 0x5D */ ITEM_SONG_REQUIEM,
/* 0x5E */ ITEM_SONG_NOCTURNE,
/* 0x5F */ ITEM_SONG_PRELUDE,
/* 0x60 */ ITEM_SONG_LULLABY,
/* 0x61 */ ITEM_SONG_EPONA,
/* 0x62 */ ITEM_SONG_SARIA,
/* 0x63 */ ITEM_SONG_SUN,
/* 0x64 */ ITEM_SONG_TIME,
/* 0x65 */ ITEM_SONG_STORMS,
/* 0x66 */ ITEM_MEDALLION_FOREST,
/* 0x67 */ ITEM_MEDALLION_FIRE,
/* 0x68 */ ITEM_MEDALLION_WATER,
/* 0x69 */ ITEM_MEDALLION_SPIRIT,
/* 0x6A */ ITEM_MEDALLION_SHADOW,
/* 0x6B */ ITEM_MEDALLION_LIGHT,
/* 0x6C */ ITEM_KOKIRI_EMERALD,
/* 0x6D */ ITEM_GORON_RUBY,
/* 0x6E */ ITEM_ZORA_SAPPHIRE,
/* 0x6F */ ITEM_STONE_OF_AGONY,
/* 0x70 */ ITEM_GERUDO_CARD,
/* 0x71 */ ITEM_SKULL_TOKEN,
/* 0x72 */ ITEM_HEART_CONTAINER,
/* 0x73 */ ITEM_HEART_PIECE,
/* 0x74 */ ITEM_KEY_BOSS,
/* 0x75 */ ITEM_COMPASS,
/* 0x76 */ ITEM_DUNGEON_MAP,
/* 0x77 */ ITEM_KEY_SMALL,
/* 0x78 */ ITEM_MAGIC_SMALL,
/* 0x79 */ ITEM_MAGIC_LARGE,
/* 0x7A */ ITEM_HEART_PIECE_2,
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
/* 0x7B */ ITEM_SINGLE_MAGIC,
/* 0x7C */ ITEM_DOUBLE_MAGIC,
/* 0x7D */ ITEM_DOUBLE_DEFENSE,
/* 0x7E */ ITEM_INVALID_4,
/* 0x7F */ ITEM_INVALID_5,
/* 0x80 */ ITEM_INVALID_6,
/* 0x81 */ ITEM_INVALID_7,
/* 0x82 */ ITEM_MILK,
/* 0x83 */ ITEM_HEART,
/* 0x84 */ ITEM_RUPEE_GREEN,
/* 0x85 */ ITEM_RUPEE_BLUE,
/* 0x86 */ ITEM_RUPEE_RED,
/* 0x87 */ ITEM_RUPEE_PURPLE,
/* 0x88 */ ITEM_RUPEE_GOLD,
/* 0x89 */ ITEM_INVALID_8,
/* 0x8A */ ITEM_STICKS_5,
/* 0x8B */ ITEM_STICKS_10,
/* 0x8C */ ITEM_NUTS_5,
/* 0x8D */ ITEM_NUTS_10,
/* 0x8E */ ITEM_BOMBS_5,
/* 0x8F */ ITEM_BOMBS_10,
/* 0x90 */ ITEM_BOMBS_20,
/* 0x91 */ ITEM_BOMBS_30,
/* 0x92 */ ITEM_ARROWS_SMALL,
/* 0x93 */ ITEM_ARROWS_MEDIUM,
/* 0x94 */ ITEM_ARROWS_LARGE,
/* 0x95 */ ITEM_SEEDS_30,
/* 0x96 */ ITEM_BOMBCHUS_5,
/* 0x97 */ ITEM_BOMBCHUS_20,
/* 0x98 */ ITEM_STICK_UPGRADE_20,
/* 0x99 */ ITEM_STICK_UPGRADE_30,
/* 0x9A */ ITEM_NUT_UPGRADE_30,
/* 0x9B */ ITEM_NUT_UPGRADE_40,
/* 0xFC */ ITEM_LAST_USED = 0xFC,
/* 0xFE */ ITEM_NONE_FE = 0xFE,
/* 0xFF */ ITEM_NONE = 0xFF
} ItemID;
Item SaveContext Logic (#4237) * Port initial framework up to latest dev-rando. Includes about 15 items using the SCL structure for tracking. * Most other item variables ported to SaveContext in UpdateHelpers. * Removed individual Context retrievals in favor of single local variable in Logic to reference. * start of some diagnostics. caught some reverse logic with ApplyItemEffect. * more diagnostics * Resolve major logic issue with SetInventory flow in ApplyItemEffect. Other small logic issues in ApplyItemEffect. * Added a bit of logging. Add Double Defense to item effects. * revert hint gen bypass * item_list *actually* divorced from logicVar pointers. Several missed options for ApplyItemEffect, HasItem, and UpdateHelpers added in. Changed HasItem to a switch block for more performance. Seeds generate within 10-20 seconds in release mode. Further optimization is assumed possible. * Some formatting * Bit more formatting. * Couple review changes. * Incorporate progressive upgrades and skeleton key into SCL. Bit of cleanup. * Change `inLogic` to static array. * Fix bug in `BottleCount()` preventing Jabu Jabu from ever being in logic. * Fix bomb bag HasItem check. * Fix Gerudo Fortress and Ganon's Castle SmallKeys checks. * Change all logic use of `bool remove` to be `bool state` and work on the affirmative assumption. * Forgot the `Set(x)` uses in `Logic::Reset()`. * Fix fishing pole effect application. * fishing pole tweak * Add `RG_BOMB_BAG`, `RG_NUTS` and `RG_STICKS` to `HasItem()`. Fix silver and gold gauntlet checks in `HasItem()`. Change Nuts and Sticks helpers to use non-progressive RGs in `UpdateHelpers()`. * Change mSaveContext to simple pointer. Set `mSaveContext` to `&gSaveContext` when loading a save file. Modify `Item::GetGIEntry()` to use rando context's SaveContext pointer instead of the gSaveContext macros. Utilize `Item::GetGIEntry()` to get real RG of infinite upgrades and set rando infs accordingly, skipping upgrade level incrementing (which was causing overflow of wallets for some reason). * Rename all remaining references of LogicVar to variants of LogicVal. * Change final references to song LogicVars to CanUse calls, and remove them. * Separate equip and rand inf flag maps. Add Zelda's Letter and Weird Egg rand infs to map. Consolidate `HasItem` rand inf lookups using rand inf map and equips using equip flag map. Maps are static, so can be referenced with `Context::` instead of ctx pointer.
2024-08-02 00:24:24 -04:00
typedef enum {
EQUIP_FLAG_SWORD_KOKIRI = 1 << 0,
EQUIP_FLAG_SWORD_MASTER = 1 << 1,
EQUIP_FLAG_SWORD_BGS = 1 << 2,
EQUIP_FLAG_SHIELD_DEKU = 1 << 4,
EQUIP_FLAG_SHIELD_HYLIAN = 1 << 5,
EQUIP_FLAG_SHIELD_MIRROR = 1 << 6,
EQUIP_FLAG_TUNIC_KOKIRI = 1 << 8,
EQUIP_FLAG_TUNIC_GORON = 1 << 9,
EQUIP_FLAG_TUNIC_ZORA = 1 << 10,
EQUIP_FLAG_BOOTS_KOKIRI = 1 << 12,
EQUIP_FLAG_BOOTS_IRON = 1 << 13,
EQUIP_FLAG_BOOTS_HOVER = 1 << 14,
} EquipmentFlag;
#define ITEM_TRADE_CHILD ITEM_WEIRD_EGG
#define ITEM_TRADE_ADULT ITEM_POCKET_EGG
// Get Item result may vary depending on context (chest/shop/scrub/drop)
typedef enum {
/* 0x00 */ GI_NONE,
/* 0x01 */ GI_BOMBS_5,
/* 0x02 */ GI_NUTS_5,
/* 0x03 */ GI_BOMBCHUS_10,
/* 0x04 */ GI_BOW,
/* 0x05 */ GI_SLINGSHOT,
/* 0x06 */ GI_BOOMERANG,
/* 0x07 */ GI_STICKS_1,
/* 0x08 */ GI_HOOKSHOT,
/* 0x09 */ GI_LONGSHOT,
/* 0x0A */ GI_LENS,
/* 0x0B */ GI_LETTER_ZELDA,
/* 0x0C */ GI_OCARINA_OOT,
/* 0x0D */ GI_HAMMER,
/* 0x0E */ GI_COJIRO,
/* 0x0F */ GI_BOTTLE,
/* 0x10 */ GI_POTION_RED,
/* 0x11 */ GI_POTION_GREEN,
/* 0x12 */ GI_POTION_BLUE,
/* 0x13 */ GI_FAIRY,
/* 0x14 */ GI_MILK_BOTTLE,
/* 0x15 */ GI_LETTER_RUTO,
/* 0x16 */ GI_BEAN,
/* 0x17 */ GI_MASK_SKULL,
/* 0x18 */ GI_MASK_SPOOKY,
/* 0x19 */ GI_CHICKEN, // uses bean message ID
/* 0x1A */ GI_MASK_KEATON,
/* 0x1B */ GI_MASK_BUNNY,
/* 0x1C */ GI_MASK_TRUTH,
/* 0x1D */ GI_POCKET_EGG,
/* 0x1E */ GI_POCKET_CUCCO, // uses bean message ID
/* 0x1F */ GI_ODD_MUSHROOM,
/* 0x20 */ GI_ODD_POTION,
/* 0x21 */ GI_SAW,
/* 0x22 */ GI_SWORD_BROKEN,
/* 0x23 */ GI_PRESCRIPTION,
/* 0x24 */ GI_FROG,
/* 0x25 */ GI_EYEDROPS,
/* 0x26 */ GI_CLAIM_CHECK,
/* 0x27 */ GI_SWORD_KOKIRI,
/* 0x28 */ GI_SWORD_KNIFE,
/* 0x29 */ GI_SHIELD_DEKU, // or blue rupee if you have the shield
/* 0x2A */ GI_SHIELD_HYLIAN, // or blue rupee if you have the shield
/* 0x2B */ GI_SHIELD_MIRROR,
/* 0x2C */ GI_TUNIC_GORON, // or blue rupee if you have the tunic
/* 0x2D */ GI_TUNIC_ZORA, // or blue rupee if you have the tunic
/* 0x2E */ GI_BOOTS_IRON,
/* 0x2F */ GI_BOOTS_HOVER,
/* 0x30 */ GI_QUIVER_40,
/* 0x31 */ GI_QUIVER_50,
/* 0x32 */ GI_BOMB_BAG_20,
/* 0x33 */ GI_BOMB_BAG_30,
/* 0x34 */ GI_BOMB_BAG_40,
/* 0x35 */ GI_GAUNTLETS_SILVER,
/* 0x36 */ GI_GAUNTLETS_GOLD,
/* 0x37 */ GI_SCALE_SILVER,
/* 0x38 */ GI_SCALE_GOLDEN,
/* 0x39 */ GI_STONE_OF_AGONY,
/* 0x3A */ GI_GERUDO_CARD,
/* 0x3B */ GI_OCARINA_FAIRY, // uses Ocarina of Time message ID
/* 0x3C */ GI_SEEDS_5,
/* 0x3D */ GI_HEART_CONTAINER,
/* 0x3E */ GI_HEART_PIECE,
/* 0x3F */ GI_KEY_BOSS,
/* 0x40 */ GI_COMPASS,
/* 0x41 */ GI_MAP,
/* 0x42 */ GI_KEY_SMALL,
/* 0x43 */ GI_MAGIC_SMALL, // or blue rupee if not from a drop
/* 0x44 */ GI_MAGIC_LARGE, // or blue rupee if not from a drop
/* 0x45 */ GI_WALLET_ADULT,
/* 0x46 */ GI_WALLET_GIANT,
/* 0x47 */ GI_WEIRD_EGG,
/* 0x48 */ GI_HEART,
/* 0x49 */ GI_ARROWS_SMALL, // amount changes depending on context
/* 0x4A */ GI_ARROWS_MEDIUM, // amount changes depending on context
/* 0x4B */ GI_ARROWS_LARGE, // amount changes depending on context
/* 0x4C */ GI_RUPEE_GREEN,
/* 0x4D */ GI_RUPEE_BLUE,
/* 0x4E */ GI_RUPEE_RED,
/* 0x4F */ GI_HEART_CONTAINER_2,
/* 0x50 */ GI_MILK,
/* 0x51 */ GI_MASK_GORON,
/* 0x52 */ GI_MASK_ZORA,
/* 0x53 */ GI_MASK_GERUDO,
/* 0x54 */ GI_BRACELET,
/* 0x55 */ GI_RUPEE_PURPLE,
/* 0x56 */ GI_RUPEE_GOLD,
/* 0x57 */ GI_SWORD_BGS,
/* 0x58 */ GI_ARROW_FIRE,
/* 0x59 */ GI_ARROW_ICE,
/* 0x5A */ GI_ARROW_LIGHT,
/* 0x5B */ GI_SKULL_TOKEN,
/* 0x5C */ GI_DINS_FIRE,
/* 0x5D */ GI_FARORES_WIND,
/* 0x5E */ GI_NAYRUS_LOVE,
/* 0x5F */ GI_BULLET_BAG_30,
/* 0x60 */ GI_BULLET_BAG_40,
/* 0x61 */ GI_STICKS_5,
/* 0x62 */ GI_STICKS_10,
/* 0x63 */ GI_NUTS_5_2,
/* 0x64 */ GI_NUTS_10,
/* 0x65 */ GI_BOMBS_1,
/* 0x66 */ GI_BOMBS_10,
/* 0x67 */ GI_BOMBS_20,
/* 0x68 */ GI_BOMBS_30,
/* 0x69 */ GI_SEEDS_30,
/* 0x6A */ GI_BOMBCHUS_5,
/* 0x6B */ GI_BOMBCHUS_20,
/* 0x6C */ GI_FISH,
/* 0x6D */ GI_BUGS,
/* 0x6E */ GI_BLUE_FIRE,
/* 0x6F */ GI_POE,
/* 0x70 */ GI_BIG_POE,
/* 0x71 */ GI_DOOR_KEY, // specific to chest minigame
/* 0x72 */ GI_RUPEE_GREEN_LOSE, // specific to chest minigame
/* 0x73 */ GI_RUPEE_BLUE_LOSE, // specific to chest minigame
/* 0x74 */ GI_RUPEE_RED_LOSE, // specific to chest minigame
/* 0x75 */ GI_RUPEE_PURPLE_LOSE, // specific to chest minigame
/* 0x76 */ GI_HEART_PIECE_WIN, // specific to chest minigame
/* 0x77 */ GI_STICK_UPGRADE_20,
/* 0x78 */ GI_STICK_UPGRADE_30,
/* 0x79 */ GI_NUT_UPGRADE_30,
/* 0x7A */ GI_NUT_UPGRADE_40,
/* 0x7B */ GI_BULLET_BAG_50,
/* 0x7C */ GI_ICE_TRAP, // freezes link when opened from a chest
Rework Get Item Table to be more flexible for adding custom items (#1050) * Adds ItemTableManager class. * Implements new getItem table in game. * Adds rando item table and way to differentiate tables in GetItemEntry. * Adds rough ability to differentiate between rando and vanilla items.merge stashed changes from before develop-zhora merge * Change ItemTableID to be uint16_t so we can use ModIndex for it. * Should fix switch build * Should fix switch build pt 2 * Adds new files to CMakeLists. * Implements fixes for competing getItem calls. * Correctly renders freestanding items Particle effects are probably broken, need to fix them still, I pretty much know how I would do that. * Fixed Particle effects in the new getItem system. * Fixes item fanfares * Partially fixes Ice Traps Obtaining a freestanding Ice Trap causes link to slide forward and receiving one from an NPC plays the sound effect and damage animation but doesn't freeze link. * Some more partial ice trap fixing that wasn't pushed earlier * Removes unused function override * Replaces ::find with ::at and adds exception handling * Removes some commented out code. * Refactors rando's GetItemEntry array into two arrays. One array is for the vanilla items that don't have GetItemEntries in vanilla, the other is for rando exclusive items. They are stored in separate arrays before getting added to the table so that we can apply different modIndexes. The items in the first table have are handled by the vanilla Item_Give, and the second table needed a custom `Randomizer_Item_Give` function. * Renames, relocates, and implements ModIndex enum. * Removes now unused ItemIDs and GetItemIDs Also makes all the necessary changes to other code that was still using them indirectly through the GI to GID map that was removed. There's quite a lot of changes here and I haven't had time to test them yet. * Re-implements GIMESSAGE_UNTRANSLATED as macro * Removes commented out function. * Throws exception if an invalid itemID is used Addresses https://github.com/HarbourMasters/Shipwright/pull/1050#discussion_r943694857 * Removes ARRAY_SIZE in favor of ARRAY_COUNT ARRAY_COUNT already exists in `macros.h`, I just didn't find it before. Addresses https://github.com/HarbourMasters/Shipwright/pull/1050#discussion_r943153833 * Inverts CheckContainsRandoItem to CheckContainsVanillaItem. Addresses https://github.com/HarbourMasters/Shipwright/pull/1050#discussion_r940895135 * Cleanup, bugfixes, removing the `- 1`s from `z_player.c` * Fixes some funky formatting that got committed earlier. * Adds else if to added fanfare sound cases. Addresses https://github.com/HarbourMasters/Shipwright/pull/1050#discussion_r940112924 and https://github.com/HarbourMasters/Shipwright/pull/1050#discussion_r940113492 * Extends GetItemEntry to include getItemId Also adapts some existing calls for both the entry and the id to only get the entry. * Extends GetItemEntry to include GID. This allows for using it later when drawing freestanding items. Addresses https://github.com/HarbourMasters/Shipwright/pull/1050#discussion_r943168136 * Rando-specific items use new textId again. This got lost when merging develop-zhora in because I didn't have custom messages merged when I started this. * Sets global modIndex to MOD_NONE on scene load Fixes a crash when buying items in shops due to them not triggering the rando code that normally sets these items. May have also been crashing vanilla playthroughs. * Realized I had the bgm conditions wrong. * Fixes "static drops" (i.e. sticks from withered babas) * Fixes LACS/Prelude situation... again. * Fixes too many arguments error. Not sure why this didn't fail to build on Windows before. * Fixes Link's Pocket items. * Simplifies sram init for rando-specific items * Fixes issues with approaching bottleable items. * Fixes Ruto's Letter. It was accidentally getting classified as a rando item. * Should re-fix freestanding ice traps * Makes freestanding items set player->getItemEntry. This prevents freestanding items from setting the global modIndex. This is part of a larger transition that needs to happen to switch to setting getItemEntries for all of the rando items. This prevents some things that set getItemId of GI_MAX from granting a Fire Medallion when the global modIndex is MOD_RANDOMIZER. * Makes sure we aren't using getItemEntry when not randoed. * Replace Randomizer_GetRandomizedItemId with Randomizer_GetRandomizedItem and Randomizer_GetItemIdFromKnownCheck with Randomizer_GetItemFromKnownCheck * Introduce some new methods and migrate most actors to them * Fixes ocarina game skull kids to set player->getItemEntry * Sets `z_en_box.c` to set `player->getItemEntry` * Fix logical errors and migrate most of the rest of the rando checks to GiveItemEntryFromActor * Use GiveItemEntryFromActorWithFixedRange in item00 * Fixes Anju to set player->getItemEntry. * Add a few missing cases * Additional fix for Skull Kid * Fixes vanilla ice traps and randomized ice smoke * Fixes rendering of treasure chest game items. * Removes unused `Randomizer_GetItemIdFromGetItemId`. * Cleans up an if statement for item00. * Cleans up another if statement in item00 * This should fix a bug with the Gerudo Archery minigame. I wasn't able to get the bug to happen after making this change. * Documents our new GiveItemEntry fuctions. * Uses more descriptive type name for ItemIDs for creating custom messages. * Fixes potential issue with if statement. * Fixes missed type change. Co-authored-by: Garrett Cox <garrettjcox@gmail.com>
2022-08-23 20:11:38 -04:00
/* 0x7D */ GI_TEXT_0, // no model appears over Link, shows text id 0 (pocket egg)
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
/* 0x84 */ GI_MAX
} GetItemID;
typedef enum {
/* 0x00 */ GID_BOTTLE,
/* 0x01 */ GID_KEY_SMALL,
/* 0x02 */ GID_SONG_MINUET,
/* 0x03 */ GID_SONG_BOLERO,
/* 0x04 */ GID_SONG_SERENADE,
/* 0x05 */ GID_SONG_REQUIEM,
/* 0x06 */ GID_SONG_NOCTURNE,
/* 0x07 */ GID_SONG_PRELUDE,
/* 0x08 */ GID_HEART,
/* 0x09 */ GID_KEY_BOSS,
/* 0x0A */ GID_COMPASS,
/* 0x0B */ GID_MEDALLION_FOREST,
/* 0x0C */ GID_MEDALLION_FIRE,
/* 0x0D */ GID_MEDALLION_WATER,
/* 0x0E */ GID_MEDALLION_SPIRIT,
/* 0x0F */ GID_MEDALLION_SHADOW,
/* 0x10 */ GID_MEDALLION_LIGHT,
/* 0x11 */ GID_NUTS,
/* 0x12 */ GID_HEART_CONTAINER,
/* 0x13 */ GID_HEART_PIECE,
/* 0x14 */ GID_QUIVER_30,
/* 0x15 */ GID_QUIVER_40,
/* 0x16 */ GID_QUIVER_50,
/* 0x17 */ GID_BOMB_BAG_20,
/* 0x18 */ GID_BOMB_BAG_30,
/* 0x19 */ GID_BOMB_BAG_40,
/* 0x1A */ GID_STICK,
/* 0x1B */ GID_DUNGEON_MAP,
/* 0x1C */ GID_SHIELD_DEKU,
/* 0x1D */ GID_MAGIC_SMALL,
/* 0x1E */ GID_MAGIC_LARGE,
/* 0x1F */ GID_BOMB,
/* 0x20 */ GID_STONE_OF_AGONY,
/* 0x21 */ GID_WALLET_ADULT,
/* 0x22 */ GID_WALLET_GIANT,
/* 0x23 */ GID_GERUDO_CARD,
/* 0x24 */ GID_ARROWS_SMALL,
/* 0x25 */ GID_ARROWS_MEDIUM,
/* 0x26 */ GID_ARROWS_LARGE,
/* 0x27 */ GID_BOMBCHU,
/* 0x28 */ GID_EGG,
/* 0x29 */ GID_SCALE_SILVER,
/* 0x2A */ GID_SCALE_GOLDEN,
/* 0x2B */ GID_SHIELD_HYLIAN,
/* 0x2C */ GID_HOOKSHOT,
/* 0x2D */ GID_LONGSHOT,
/* 0x2E */ GID_OCARINA_TIME,
/* 0x2F */ GID_MILK,
/* 0x30 */ GID_MASK_KEATON,
/* 0x31 */ GID_MASK_SPOOKY,
/* 0x32 */ GID_SLINGSHOT,
/* 0x33 */ GID_BOOMERANG,
/* 0x34 */ GID_BOW,
/* 0x35 */ GID_LENS,
/* 0x36 */ GID_POTION_GREEN,
/* 0x37 */ GID_POTION_RED,
/* 0x38 */ GID_POTION_BLUE,
/* 0x39 */ GID_SHIELD_MIRROR,
/* 0x3A */ GID_LETTER_ZELDA,
/* 0x3B */ GID_TUNIC_GORON,
/* 0x3C */ GID_TUNIC_ZORA,
/* 0x3D */ GID_BEAN,
/* 0x3E */ GID_FISH,
/* 0x3F */ GID_SAW,
/* 0x40 */ GID_HAMMER,
/* 0x41 */ GID_GRASS,
/* 0x42 */ GID_SWORD_BGS,
/* 0x43 */ GID_CHICKEN,
/* 0x44 */ GID_LETTER_RUTO,
/* 0x45 */ GID_OCARINA_FAIRY,
/* 0x46 */ GID_BOOTS_IRON,
/* 0x47 */ GID_SEEDS,
/* 0x48 */ GID_GAUNTLETS_SILVER,
/* 0x49 */ GID_GAUNTLETS_GOLD,
/* 0x4A */ GID_NCOIN_YELLOW,
/* 0x4B */ GID_NCOIN_RED,
/* 0x4C */ GID_NCOIN_GREEN,
/* 0x4D */ GID_NCOIN_BLUE,
/* 0x4E */ GID_MASK_SKULL,
/* 0x4F */ GID_MASK_BUNNY,
/* 0x50 */ GID_MASK_TRUTH,
/* 0x51 */ GID_EYEDROPS,
/* 0x52 */ GID_ODD_POTION,
/* 0x53 */ GID_ODD_MUSHROOM,
/* 0x54 */ GID_CLAIM_CHECK,
/* 0x55 */ GID_SWORD_BROKEN,
/* 0x56 */ GID_PRESCRIPTION,
/* 0x57 */ GID_BRACELET,
/* 0x58 */ GID_SOLDOUT,
/* 0x59 */ GID_FROG,
/* 0x5A */ GID_MASK_GORON,
/* 0x5B */ GID_MASK_ZORA,
/* 0x5C */ GID_MASK_GERUDO,
/* 0x5D */ GID_COJIRO,
/* 0x5E */ GID_BOOTS_HOVER,
/* 0x5F */ GID_ARROW_FIRE,
/* 0x60 */ GID_ARROW_ICE,
/* 0x61 */ GID_ARROW_LIGHT,
/* 0x62 */ GID_SKULL_TOKEN,
/* 0x63 */ GID_DINS_FIRE,
/* 0x64 */ GID_FARORES_WIND,
/* 0x65 */ GID_NAYRUS_LOVE,
/* 0x66 */ GID_BLUE_FIRE,
/* 0x67 */ GID_BUG,
/* 0x68 */ GID_BUTTERFLY,
/* 0x69 */ GID_POE,
/* 0x6A */ GID_FAIRY,
/* 0x6B */ GID_BULLET_BAG,
/* 0x6C */ GID_RUPEE_GREEN,
/* 0x6D */ GID_RUPEE_BLUE,
/* 0x6E */ GID_RUPEE_RED,
/* 0x6F */ GID_BIG_POE,
/* 0x70 */ GID_RUPEE_PURPLE,
/* 0x71 */ GID_RUPEE_GOLD,
/* 0x72 */ GID_BULLET_BAG_50,
/* 0x73 */ GID_SWORD_KOKIRI,
/* 0x74 */ GID_SKULL_TOKEN_2,
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
/* 0x74 */ GID_KOKIRI_EMERALD,
/* 0x74 */ GID_GORON_RUBY,
/* 0x74 */ GID_ZORA_SAPPHIRE,
/* 0x75 */ GID_SONG_GENERIC,
/* 0x76 */ GID_SONG_ZELDA,
/* 0x77 */ GID_SONG_EPONA,
/* 0x78 */ GID_SONG_SARIA,
/* 0x79 */ GID_SONG_SUN,
/* 0x7A */ GID_SONG_TIME,
/* 0x7B */ GID_SONG_STORM,
/* 0x7C */ GID_TRIFORCE_PIECE,
/* */ GID_FISHING_POLE,
testing out item replacement (#416) * skip learning song of storms * don't set flag when getting goron tunic as child * Initiates prelude check when master sword unloads. Not quite how N64 rando does it but so far it's the only way I've found to make it trigger without also triggering the time travel again. * Stops Shadow Temple lore prompts from appearing in rando. * Skips cutscene of royal tomb explosion in rando. Explosion sound doesn't play correctly and I think the debris appears in the wrong place, but the functionality is here. * Improves visual of exploding gravestone. * Adds some comments explaining the rando differences * Skip ruto text box in jabu blue warp For rando * skip intro cutscene in dodongo's cavern * load spoiler files on boot, fix spoilerfile existing check when making new saves * name entry dropped spoiler logic * make sure to actually init the cvar * no chime on load * uncomment * Skip ganondrof cutscene Skip to scream part of the death animation, skipping the text boxes etc. For rando * Update z_boss_ganondrof.c * skip owl flight cutscenes in rando * Fixes skipped text so it only applies to shadow temple. Earlier fix inadvertently applied to some other text as well, changed logic so that only specified sceneNums and textIds can have this enabled, and text skipped by sceneNum can have the skip overriden by textId if needed. Currently there are no overrides so the textId section of the logic is commented out to avoid compilation errors. * Adds a default to the switch case statements that leaves the randoSkipText variable unchanged, just in case. * TEST: Text for item * Adding ganon flavor text * ADD: AMMO Count * format ganon text/hint text * Autoskip the tower cutscene if settings call for tower collapse. * ganon hint text logic * Improved prelude after time travel fix * swapped the sizes between ganon hint text and ganon text, as they were set to the wrong things. * this is all i did * not the cleanest code ever but it's working * ADD: GS Count * ADD: Wallter (crash for now) * TWEAK: Wallet check * FIX: Use DrawItem instread of DrawUpgrade... b-baka! * Fixes some vanilla bugs introduced by rando code. * Added cutscene skip for zelda escaping Using the debug cutscene skipping function. Also added a conditional so the bridge doesn't spawn closed when cutscene is ready to trigger * ADD: X Spacing + Placeholders for song * ADD: default case for items * TWEAK: Spacing * FIX: Light Arrow * ADD: Ammo Option * use groups instead * ADD: More spacing logic * songs and names * TWEAK: Color on wallet * colors * Added flags cutscene before nabooru fight * ADD: ChromaKey text * First attempt skip cs after nabooru defeat * Better implementation for specific rando cutscene skips * use pulseaudio defaults * spaces/tabs * move color push/pop to stop crash * make the colors work again * the real bottle fix * pulseaudio values tuned for n64 audio at 44.1khz * update tlength * remove one hardcoded samplerate * Cleaned up and fixed zelda escape skip The if statement is a freaking monster, but unless we want to skip more cutscenes in the same way later, this is the most compact way of doing it that I know of. * Revert one line to match original nothing functional * another hint line that breaks autonewline logic * don't autospawn epona if we don't have the song/ocarina * Trying to use iron knuckle death effects not working yet * Streamlined OoT cutscene skip for future additions Also cleaned up if statement in general * Made if statement more readable Also added clarity for what cutscene was skipped * Fixed typo in comment * Janky nabooru defeat cs skip * altar text formatting (gonna need help shortening some of the french ones) * more altar text formatting * english altar text formatting complete * make gtg blocking guard check for card not bridge * FIX: Typo! * FIX: Uppercases * FIX: Typo * TWEAK: Alter + some names * TWEAK: More caps! * ADD: Missing string TWEAK more uppercases and namefixe s * Hide nabooru death by covering her in flames * bandaid fix for death crash issue * Twinrova defeat cs skip Skips the animation and manually calls the function to show the "beam" around the sisters * fix crash * fix caps to match * fix great fairy reward mashing/shielding issue * TWEAK : Typo clé to Clé * TWEAK: Some Altar hints TWEAK: Some capitals * TWEAK: Unmatching text + some cap again * TWEAK: More tweaks * fix build * remove extra json.hpp, add hint * Update randomizer_item_tracker.cpp * TWEAK: Double Defense with RedParticles instead of white * make sure we don't optimize out the check to ensure a spoilerfile exists * vanilla ganon boss key hint formatting * TWEAK: FR- better way of the hero text * fix * and again * Initializes dungeonsDone items in gSaveContext to 0. * Replaces sizeof calculation with a NUM_DUNGEONS constant. * Fixes Saria's Gift on the LW Bridge from getting killed when holding shield. * More airtight fix for Saria's Gift on the Bridge. * Lifts one of the conditions in the if statement a little higher to prevent unnecessary lookups of getItemId. * Invalidate text box icon before drawing * Fixes the case where Saria's gift is an Ice Trap. We still get the Ice Trap once, but never again. This does mean you can now hold R while walking in to avoid the ice trap, but everything else seems to work fine. * Initial commit Might need changing when we change the settings in the future * Fixes Door of Time opening cutscene after warping with prelude. * Initial waterfall skip Very rudimentary way of doing things but it seems to work so :shrug: * inital rework * fixed default rotation for 2D sprites * fix tab/space issues * 3d drops rando merge fix again * Allows Impa to appear in the Lullaby check post drawbridge escape. * Changes Ganon's Trials Count setting to a checkbox The checkbox is whether or not to skip all of them. Leaving the box unchecked will mean doing all of them. Eventually this will be switched back to a slider once we implement the logic for which trials start out completed. * Sets all Ganon's Trials to incomplete in new saves. Fixes https://github.com/briaguya-ai/rando-issue-tracker/issues/131 * fix castle guards when oot throw cutscene has already played in rando * Properly removes the beams when trials are cleared. * Removes Question Mark from Skip Ganon's Trials UI. * Adds a todo comment about when to change back to slider. * make deku seeds check for bullet bag * Various tweaks TWEAK: Altar Text TWEAK: Hint names TWEAK: Replace more problematic œ to oe * upgrade ocarina on both child and adult equips * FIX: Jabu Item * update equipped hookshot/longshot when obtained as other age * add hint * don't give the bgs check without the claim check * Skips Darunia Cutscene in Fire Temple * Added a TODO note about not skipping the cutscene. There is a setting we will want to have eventually that will require this cutscene to not be skipped since it is used during a glitch. * remove todo * restore fast ocarina option in imgui that was lost in merge * Fixes grey screen issue + tooltip for 2 handed shield * update to use dg instead of g for textures in item tracker * TWEAK: Default color for cosmetic RAND button was not the corect one * fix texture crash, remove unused item tracker code * don't open mask shop until we get zelda's letter * Update README.md * Prevents "correct" chime under incorrect conditions. * Fixes typo in conditional and adds "bonk" sound effect. "Bonk" sound is NA_SE_SY_OCARINA_ERROR and it plays when conditions for the Door of Time have not been met after playing Song of Time. This is only possible in rando's "Intended" Door of Time option, in which the Ocarina of Time and all 3 spritual stones are required to open the door, instead of the vanilla requirements of just having the song of time. * remove modify dpad equips toggle, replace with checks for dpad menu * remove extra check * add ability to hold c-up to assign to dpad when dpad menuing is enabled * disable d-pad navigation on item menu when holding c-up to equip * dpad+c-up stuff for equipment menu * ADD: Checbox for songs colors * TWEAK: RandoColors for normal songs * kind of quick and dirty but it works * TWEAK: Clarity of the tooltip Co-authored-by: briaguya <briaguya@alice> Co-authored-by: Christopher Leggett <chris@leggett.dev> Co-authored-by: aMannus <mannusmenting@gmail.com> Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com> Co-authored-by: Dog <5172592+Dog@users.noreply.github.com> Co-authored-by: Vague Rant <vaguerant@users.noreply.github.com> Co-authored-by: Baoulettes <perlouzerie@hotmail.fr> Co-authored-by: Ada <60364512+GreatArgorath@users.noreply.github.com>
2022-07-11 20:11:07 -04:00
/* 0x7C */ GID_MAXIMUM
} GetItemDrawID;
typedef enum {
/* 0x00 */ EXCH_ITEM_NONE,
/* 0x01 */ EXCH_ITEM_LETTER_ZELDA,
/* 0x02 */ EXCH_ITEM_WEIRD_EGG,
/* 0x03 */ EXCH_ITEM_CHICKEN,
/* 0x04 */ EXCH_ITEM_BEAN,
/* 0x05 */ EXCH_ITEM_POCKET_EGG,
/* 0x06 */ EXCH_ITEM_POCKET_CUCCO,
/* 0x07 */ EXCH_ITEM_COJIRO,
/* 0x08 */ EXCH_ITEM_ODD_MUSHROOM,
/* 0x09 */ EXCH_ITEM_ODD_POTION,
/* 0x0A */ EXCH_ITEM_SAW,
/* 0x0B */ EXCH_ITEM_SWORD_BROKEN,
/* 0x0C */ EXCH_ITEM_PRESCRIPTION,
/* 0x0D */ EXCH_ITEM_FROG,
/* 0x0E */ EXCH_ITEM_EYEDROPS,
/* 0x0F */ EXCH_ITEM_CLAIM_CHECK,
/* 0x10 */ EXCH_ITEM_MASK_SKULL,
/* 0x11 */ EXCH_ITEM_MASK_SPOOKY,
/* 0x12 */ EXCH_ITEM_MASK_KEATON,
/* 0x13 */ EXCH_ITEM_MASK_BUNNY,
/* 0x14 */ EXCH_ITEM_MASK_TRUTH,
/* 0x15 */ EXCH_ITEM_MASK_GORON,
/* 0x16 */ EXCH_ITEM_MASK_ZORA,
/* 0x17 */ EXCH_ITEM_MASK_GERUDO,
/* 0x18 */ EXCH_ITEM_FISH,
/* 0x19 */ EXCH_ITEM_BLUE_FIRE,
/* 0x1A */ EXCH_ITEM_BUG,
/* 0x1B */ EXCH_ITEM_POE,
/* 0x1C */ EXCH_ITEM_BIG_POE,
/* 0x1D */ EXCH_ITEM_LETTER_RUTO,
/* 0x1E */ EXCH_ITEM_MAX
} ExchangeItemID;
#endif