mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-12-23 16:48:52 -05:00
2b78bea475
* Revert changes to GetItemFromGet
* Fixes Ganon's Boss Key shuffled while regular boss Keys aren't.
* Enum + combo box
* Add obtainability checks correctly
* combobox title rename + no number tracking
* Fix repeatable purchases and bottles rendering incorrectly
* Move shopsanity option in GUI
* Struct instead of ImVec + basic comportment for all case
* Attempt to fix odd build issue
* Cast randoGet for ganons boss key
* Remove redundancy in KD room
* Update logic Cvar names
* Fix Ganons Trials coming from old save files. Fixes #1365
* Fixes crash when entering Ganon's Castle lobby on linux.
* Makes `Item_Give` safe to use with a NULL globalCtx.
This should allow it's use for giving items to Link's Pocket
during rando save initialization.
* Converts Song from Impa to use `Item_Give`
* Adds more options for Link's starting item.
* Removes unneeded `GiveLinkItem` functions.
* and make it build
* bring back new rando dropdown
* gSaveContext access in GameMenuBar.cpp
* Implement Skip Scarecrow's Song
* Reimplement progressive Bombchus
* Rando-next: Deku Nut and Seed ammo gives a blue rupee
Fixes #1390
* Fixes Link starting with BGS
* Persist item tracker notes
* Adjust Hooks include
* Use SohImGui::RequestCvarSaveOnNextTick
* Fix issues from LUS refactor
* Fix for overriding deku scrub messages
* Fix mistake from merge
oops
* Restore checkboxes to enhancements menu
These got lost in the merge
* Update location access logic
Including MQ locations in Spirit and GC now
* Implement rando bombchu drops
* Missing break
* Simplify mudwall collision check
There was no need to have a second collider specifically for Ice Arrow hits
* Update settings.cpp
* Simplify mudwall collision check
* Restore checkboxes in menu
Accidentally lost these during merge
* Clean up bool
* Update logic Cvar name
* Fixed capacity on ammmo tracking
* Fix for beans obtainability
* Hook into file delete and clear notes
* Incorporate magic arrows in rando settings
* Update tooltip
To inform the player that they might have to reload the room if they're enabling this for the first time.
* Update tooltip
* Add line break in tooltip
* Tooltip wording + line break
* tweak on main logic
* All color logic for all types
* Fix: changes to please new LUS
* Ensure itemTrackerNotes vector is not fully empty
* Implement's Tycoon Wallet.
* Refactor DrawItemCount and Use EnhancementCombobox for tracker capacity options
* small tweaks and rename
* always display XX/YY when in ammo/capacity mode
* Move all merchant messages to be generated on file load
* added hovertext for the number display
* Swap german and french translations for shop messages
* Set key colors to be on by default
* Add another flag to skip mask shop
* Fix Sold Out bug
* Fix gerudo keys, add disabled checkbox
* tooltip line break
* Add trials required and merchant prices to save file instead of loading from active spoiler log
* Remove trialsRequired persisting in save manager
* Adds slotIndex to girla (shop item actor) and uses that for IdentifyShopItem.
* Fix issue when merchantPrices is empty
* Fix for a single zeroed merchantPrice entry
* Fix #1417
* Implements items selling out and fixes issues with purchasing some items.
* Fixes order of operations so Rupees will be spent.
* Fixes sold out items not getting overwritten by the randomized info.
* Clarify var names and comments
Also preserve chain platform cutscene in spirit based on Link's position
* Remove !=0 from cvar check
* Clarify var names and comments
* Rename randomizerMerchantPrices to merchantPrices
* Handle shop items in SaveManager
* Fix merge mistake
* Base whats in the bazaar shop on entranceIndex instead of age
* Tidy up chain platform cutscene check
* Fix merge error
Didn't mean to have Zhora changes in here yet
* Use 3drando item table for parsing spoiler names
* Use another nested method instead of one at the top level to fetch the table
* Add missing newline
* Remove log
* Respect custom draw functions
* Fix issues with rendering songs
* Fix localized item names for shopsanity
* Implements a larger array of Sprites for the Icon Hash.
* Uses the hash instead of seed for spoilerfile name and icons.
* Removes some unused functions and variables in `spoiler_log.cpp`
* Prevents leading 0s added to hash from being in file name
* Changes filename format to icon indexes separated by dashes
* Hopefully makes Jenkins happy
* Hopefully makes Jenkins happy
* [Rando] Child Gerudo Fortress 37th Heartpiece randomized
Fixes #1071
* Add descriptions to save editor flags editor, and added randomizer flags (#1386)
* Add descriptions to save editor flags editor, and added randomizer flags
* Hide randomizer flags when not on a randomizer save
* Move flag descriptions to header file
* Update soh/soh/Enhancements/debugger/debugSaveEditor.h
* Update soh/soh/Enhancements/debugger/debugSaveEditor.h
* Fix merge error
* crash on pause menu on linux (only in appimage)
Fixes #1437
* Applies fix to Song from Impa as well.
* Allow buying tunics as child when shopsanity is on
* Fix for custom draw methods overriding sold out sign
* Simplify logic around shopsanity and fix some issues
* Fix dungeon reward stone rotation and add particles
* Fix some issues with ice traps
* Fix adult wallet having its own max capacity
* Fix amount of keys given for BotW
* format
* Use EnGirlAShopItem enum instead of raw hex values
* [#1434] Renders non-warp songs more consistently with warp songs
* A few changes around merchant messages
* Various changes from PR feedback
* Rando: Junk Hint missing french translation
* Typo
* Fix free scrub being at 0 instead of TEXT_SCRUB_RANDOM
* Replace magic numbers in message handler
* Update soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c
Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
* Update soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c
Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
* Fix BGS softlock for shopsanity
* Support tycoon wallet on tracker
* Revert "Fix BGS softlock for shopsanity"
This reverts commit 5fdb961ea4
.
* [#1053] Resolves an issue with shop items and bombchu bowling where BGS would display two message boxes
* Implements some necessary plumbing and resolves several Ice Trap Softlocks.
Adds a way for an item entry to tell what type of check it came from (NPC vs Chest vs Freestanding, etc.)
Sets this value from chests and item00 actors.
Relocates pendingIceTraps to save context so it can persist through cutscenes and get stored on save init for Link's Pocket and Song from Impa.
Restructures pendingIceTraps into a counter rather than a true or false, so that we can be frozen multiple times in a row if applicable (atm that should only be at the start of a run if Link's Pocket and Song from Impa were both Ice Traps).
Adds a textbox for Ice Traps and a special case of holding up nothing in the get item process. This fixes all the cases where Ice Traps would softlock due to the actor giving the item expecting a closing textbox. After holding the item above his head Link increments the pendingIceTraps counter by one and sets whatever flag he has pending.
None of the above plumbing applies to Ice Traps from chests, those work exactly the same as before, as do freestanding item00 ice traps (thanks to the additional check for ITEM_FROM_FREESTANDING.
OoT and Ruto's Letter count as NPC's, so they get the FOWL text box and set a pending ice trap rather than immediately freezing, since Link weill be in the water. Link will get frozen the next time he touches land, which in the case of OoT is after the fade to white and right before the Song of Time check.
Fixes all the other softlocks I'm aware of, including Fishing, Bombchu Bowling, Skull Kid, and losing the second Gerudo Archery check.
* fix bgs check in player
* move bgs logic for tokensanity into MOD_NONE check
* set bgs flag before `Item_Give`ing
* move bgs flag into `MOD_NONE` check in girla
* use existing check in `z_player`
* Adds comment explaining the decision to default ITEM_FROM_NPC.
* Rename pendingIceTraps to pendingIceTrapCount
* Adds some RANDOTODO comments about cleaning up a couple things.
* Merge branch 'develop-zhora' into ztornn
* manually restore changes to `z_player.c`
* Fix after some ice trap prepwork from earlier
* Actual fix
* Woops
* More rupee names
* Actually fix it
* Add back comment
* Fix Skip Scarecrow Song
* Fix ruto's letter and LH sun stick rendering
* Also fixes it for treasure chest game
* Tweak: Rando French Wallet
* ADD: French Tycoon
* Hide dungeon items/notes by default
* [#1301] Fix issue with UI not restoring after getting an item from biggoron
* Update soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c
* Update soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c
* Fix random crash that only affected one person for some reason
Co-authored-by: Garrett Cox <garrettjcox@gmail.com>
Co-authored-by: Christopher Leggett <chris@leggett.dev>
Co-authored-by: PurpleHato <linkvssangoku.jr@gmail.com>
Co-authored-by: Sarge-117 <adam_branston@outlook.com>
Co-authored-by: briaguya <briaguya@alice>
Co-authored-by: aMannus <mannusmenting@gmail.com>
Co-authored-by: lil David <1337lilDavid@gmail.com>
Co-authored-by: Sarge-117 <108380086+Sarge-117@users.noreply.github.com>
Co-authored-by: louist103 <35883445+louist103@users.noreply.github.com>
230 lines
7.6 KiB
C
230 lines
7.6 KiB
C
#ifndef Z64SAVE_H
|
|
#define Z64SAVE_H
|
|
|
|
#include "ultra64.h"
|
|
#include "z64math.h"
|
|
#include "z64audio.h"
|
|
#include "soh/Enhancements/randomizer/randomizerTypes.h"
|
|
#include "soh/Enhancements/randomizer/randomizer_inf.h"
|
|
|
|
typedef struct {
|
|
/* 0x00 */ u8 buttonItems[8];
|
|
/* 0x04 */ u8 cButtonSlots[7];
|
|
/* 0x08 */ u16 equipment;
|
|
} ItemEquips; // size = 0x0A
|
|
|
|
typedef struct {
|
|
/* 0x00 */ u8 items[24];
|
|
/* 0x18 */ s8 ammo[16];
|
|
/* 0x28 */ u16 equipment;
|
|
/* 0x2C */ u32 upgrades;
|
|
/* 0x30 */ u32 questItems;
|
|
/* 0x34 */ u8 dungeonItems[20];
|
|
/* 0x48 */ s8 dungeonKeys[19];
|
|
/* 0x5B */ s8 defenseHearts;
|
|
/* 0x5C */ s16 gsTokens;
|
|
} Inventory; // size = 0x5E
|
|
|
|
typedef struct {
|
|
/* 0x00 */ u32 chest;
|
|
/* 0x04 */ u32 swch;
|
|
/* 0x08 */ u32 clear;
|
|
/* 0x0C */ u32 collect;
|
|
/* 0x10 */ u32 unk;
|
|
/* 0x14 */ u32 rooms;
|
|
/* 0x18 */ u32 floors;
|
|
} SavedSceneFlags; // size = 0x1C
|
|
|
|
typedef struct {
|
|
/* 0x00 */ s16 scene;
|
|
/* 0x02 */ Vec3s pos;
|
|
/* 0x08 */ s16 angle;
|
|
} HorseData; // size = 0x0A
|
|
|
|
typedef struct {
|
|
/* 0x00 */ Vec3f pos;
|
|
/* 0x0C */ s16 yaw;
|
|
/* 0x0E */ s16 playerParams;
|
|
/* 0x10 */ s16 entranceIndex;
|
|
/* 0x12 */ u8 roomIndex;
|
|
/* 0x13 */ s8 data;
|
|
/* 0x14 */ u32 tempSwchFlags;
|
|
/* 0x18 */ u32 tempCollectFlags;
|
|
} RespawnData; // size = 0x1C
|
|
|
|
typedef struct {
|
|
/* 0x00 */ Vec3i pos;
|
|
/* 0x0C */ s32 yaw;
|
|
/* 0x10 */ s32 playerParams;
|
|
/* 0x14 */ s32 entranceIndex;
|
|
/* 0x18 */ s32 roomIndex;
|
|
/* 0x1C */ s32 set;
|
|
/* 0x20 */ s32 tempSwchFlags;
|
|
/* 0x24 */ s32 tempCollectFlags;
|
|
} FaroresWindData; // size = 0x28
|
|
|
|
typedef struct {
|
|
RandomizerCheck check;
|
|
RandomizerGet get;
|
|
} ItemLocationRando;
|
|
|
|
typedef struct {
|
|
RandomizerCheck check;
|
|
char hintText[200];
|
|
} HintLocationRando;
|
|
|
|
typedef struct {
|
|
RandomizerSettingKey key;
|
|
u8 value;
|
|
} RandoSetting;
|
|
|
|
typedef struct {
|
|
/* 0x0000 */ s32 entranceIndex; // start of `save` substruct, originally called "memory"
|
|
/* 0x0004 */ s32 linkAge; // 0: Adult; 1: Child
|
|
/* 0x0008 */ s32 cutsceneIndex;
|
|
/* 0x000C */ u16 dayTime; // "zelda_time"
|
|
/* 0x0010 */ s32 nightFlag;
|
|
/* 0x0014 */ s32 totalDays;
|
|
/* 0x0018 */ s32 bgsDayCount; // increments with totalDays, can be cleared with `Environment_ClearBgsDayCount`
|
|
/* 0x0022 */ u16 deaths;
|
|
/* 0x0024 */ char playerName[8];
|
|
/* 0x002C */ s16 n64ddFlag;
|
|
/* 0x002E */ s16 healthCapacity; // "max_life"
|
|
/* 0x0030 */ s16 health; // "now_life"
|
|
/* 0x0032 */ s8 magicLevel;
|
|
/* 0x0033 */ s8 magic;
|
|
/* 0x0034 */ s16 rupees;
|
|
/* 0x0036 */ u16 swordHealth;
|
|
/* 0x0038 */ u16 naviTimer;
|
|
/* 0x003A */ u8 magicAcquired;
|
|
/* 0x003C */ u8 doubleMagic;
|
|
/* 0x003D */ u8 doubleDefense;
|
|
/* 0x003E */ u8 bgsFlag;
|
|
/* 0x003F */ u8 ocarinaGameRoundNum;
|
|
/* 0x0040 */ ItemEquips childEquips;
|
|
/* 0x004A */ ItemEquips adultEquips;
|
|
/* 0x0054 */ u32 unk_54; // this may be incorrect, currently used for alignement
|
|
/* 0x0066 */ s16 savedSceneNum;
|
|
/* 0x0068 */ ItemEquips equips;
|
|
/* 0x0074 */ Inventory inventory;
|
|
/* 0x00D4 */ SavedSceneFlags sceneFlags[124];
|
|
/* 0x0E64 */ FaroresWindData fw;
|
|
/* 0x0E9C */ s32 gsFlags[6];
|
|
/* 0x0EB8 */ s32 highScores[7];
|
|
/* 0x0ED4 */ u16 eventChkInf[14]; // "event_chk_inf"
|
|
/* 0x0EF0 */ u16 itemGetInf[4]; // "item_get_inf"
|
|
/* 0x0EF8 */ u16 infTable[30]; // "inf_table"
|
|
/* 0x0F38 */ u32 worldMapAreaData; // "area_arrival"
|
|
/* 0x0F40 */ u8 scarecrowCustomSongSet;
|
|
/* 0x0F41 */ OcarinaNote scarecrowCustomSong[108];
|
|
/* 0x12C5 */ u8 scarecrowSpawnSongSet;
|
|
/* 0x12C6 */ OcarinaNote scarecrowSpawnSong[16];
|
|
/* 0x1346 */ char unk_1346[0x02];
|
|
/* 0x1348 */ HorseData horseData;
|
|
/* 0x1354 */ s32 fileNum; // "file_no"
|
|
/* 0x1358 */ char unk_1358[0x0004];
|
|
/* 0x135C */ s32 gameMode;
|
|
/* 0x1360 */ s32 sceneSetupIndex;
|
|
/* 0x1364 */ s32 respawnFlag; // "restart_flag"
|
|
/* 0x1368 */ RespawnData respawn[3]; // "restart_data"
|
|
/* 0x13BC */ f32 entranceSpeed;
|
|
/* 0x13C0 */ u16 entranceSound;
|
|
/* 0x13C3 */ u8 unk_13C3;
|
|
/* 0x13C4 */ s16 dogParams;
|
|
/* 0x13C6 */ u8 textTriggerFlags;
|
|
/* 0x13C7 */ u8 showTitleCard;
|
|
/* 0x13C8 */ s16 nayrusLoveTimer;
|
|
/* 0x13CC */ s16 rupeeAccumulator;
|
|
/* 0x13CE */ s16 timer1State;
|
|
/* 0x13D0 */ s16 timer1Value;
|
|
/* 0x13D2 */ s16 timer2State;
|
|
/* 0x13D4 */ s16 timer2Value;
|
|
/* 0x13D6 */ s16 timerX[2];
|
|
/* 0x13DA */ s16 timerY[2];
|
|
/* 0x13E0 */ u8 seqId;
|
|
/* 0x13E1 */ u8 natureAmbienceId;
|
|
/* 0x13E2 */ u8 buttonStatus[9];
|
|
/* 0x13E7 */ u8 unk_13E7; // alpha related
|
|
/* 0x13E8 */ u16 unk_13E8; // alpha type?
|
|
/* 0x13EA */ u16 unk_13EA; // also alpha type?
|
|
/* 0x13EC */ u16 unk_13EC; // alpha type counter?
|
|
/* 0x13EE */ u16 unk_13EE; // previous alpha type?
|
|
/* 0x13F0 */ s16 unk_13F0; // magic related
|
|
/* 0x13F2 */ s16 unk_13F2; // magic related
|
|
/* 0x13F4 */ s16 unk_13F4; // magic related
|
|
/* 0x13F6 */ s16 unk_13F6; // magic related
|
|
/* 0x13F8 */ s16 unk_13F8; // magic related
|
|
/* 0x13FA */ u16 eventInf[4]; // "event_inf"
|
|
/* 0x1402 */ u16 mapIndex; // intended for maps/minimaps but commonly used as the dungeon index
|
|
/* 0x1404 */ u16 minigameState;
|
|
/* 0x1406 */ u16 minigameScore; // "yabusame_total"
|
|
/* 0x1409 */ u8 language; // NTSC 0: Japanese; 1: English | PAL 0: English; 1: German; 2: French
|
|
/* 0x140A */ u8 audioSetting;
|
|
/* 0x140C */ u8 zTargetSetting; // 0: Switch; 1: Hold
|
|
/* 0x140E */ u16 forcedSeqId; // immediately start playing the sequence if set
|
|
/* 0x1410 */ u8 unk_1410; // transition related
|
|
/* 0x1412 */ u16 nextCutsceneIndex;
|
|
/* 0x1414 */ u8 cutsceneTrigger;
|
|
/* 0x1415 */ u8 chamberCutsceneNum;
|
|
/* 0x1416 */ u16 nextDayTime; // "next_zelda_time"
|
|
/* 0x1418 */ u8 fadeDuration;
|
|
/* 0x1419 */ u8 unk_1419; // transition related
|
|
/* 0x141A */ u16 skyboxTime;
|
|
/* 0x141C */ u8 dogIsLost;
|
|
/* 0x141D */ u8 nextTransition;
|
|
/* 0x1420 */ s16 worldMapArea;
|
|
/* 0x1422 */ s16 sunsSongState; // controls the effects of suns song
|
|
/* 0x1424 */ s16 healthAccumulator;
|
|
RandoSetting randoSettings[300];
|
|
ItemLocationRando itemLocations[RC_MAX];
|
|
HintLocationRando hintLocations[50];
|
|
char childAltarText[250];
|
|
char adultAltarText[750];
|
|
char ganonHintText[150];
|
|
char ganonText[250];
|
|
u8 seedIcons[5];
|
|
u16 randomizerInf[8];
|
|
u8 temporaryWeapon;
|
|
u16 adultTradeItems;
|
|
u8 pendingIceTrapCount;
|
|
} SaveContext; // size = 0x1428
|
|
|
|
typedef enum {
|
|
/* 0x00 */ RESPAWN_MODE_DOWN, /* Normal Void Outs */
|
|
/* 0x01 */ RESPAWN_MODE_RETURN, /* Grotto Returnpoints */
|
|
/* 0x02 */ RESPAWN_MODE_TOP /* Farore's Wind */
|
|
} RespawnMode;
|
|
|
|
typedef enum {
|
|
/* 0x00 */ BTN_ENABLED,
|
|
/* 0xFF */ BTN_DISABLED = 0xFF
|
|
} ButtonStatus;
|
|
|
|
typedef enum {
|
|
/* 0x00 */ CHAMBER_CS_FOREST,
|
|
/* 0x01 */ CHAMBER_CS_FIRE,
|
|
/* 0x02 */ CHAMBER_CS_WATER,
|
|
/* 0x03 */ CHAMBER_CS_SPIRIT,
|
|
/* 0x04 */ CHAMBER_CS_SHADOW,
|
|
/* 0x05 */ CHAMBER_CS_LIGHT
|
|
} ChamberCutsceneNum;
|
|
|
|
typedef enum {
|
|
/* 0x00 */ HS_HBA, // horseback archery
|
|
/* 0x01 */ HS_POE_POINTS,
|
|
/* 0x02 */ HS_FISHING,
|
|
/* 0x03 */ HS_HORSE_RACE,
|
|
/* 0x04 */ HS_MARATHON,
|
|
/* 0x05 */ HS_UNK_05,
|
|
/* 0x06 */ HS_DAMPE_RACE
|
|
} HighScores;
|
|
|
|
typedef enum {
|
|
/* 0 */ SUNSSONG_INACTIVE,
|
|
/* 1 */ SUNSSONG_START, // the suns ocarina effect signals that the song has finished playing
|
|
/* 2 */ SUNSSONG_SPEED_TIME, // suns was played where time passes, speed up the advancement of time
|
|
/* 3 */ SUNSSONG_SPECIAL // time does not advance, but signals the song was played. used for freezing redeads
|
|
} SunsSongState;
|
|
|
|
#endif
|