1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-15 04:14:34 +00:00

Decompile z_sram.c (#431)

* Decompile z_sram.c

* rename Sram_CalcChecksum to Sram_WriteSaveSlot

* progress

* done i think

* add original name comments

* temp substructs

* minor fixes

* review

* review 2

* fix

Co-authored-by: fig <fig02srl@gmail.com>
This commit is contained in:
Random 2020-10-11 19:45:08 +02:00 committed by GitHub
parent 9d35542207
commit b010db7c19
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
74 changed files with 1514 additions and 1672 deletions

View file

@ -46,7 +46,7 @@ void Map_SetFloorPalettesData(GlobalContext* globalCtx, s16 floor) {
interfaceCtx->unk_140[i + 16] = 0;
}
if (gSaveContext.dungeonItems[mapIndex] & gBitFlags[DUNGEON_MAP]) {
if (gSaveContext.inventory.dungeonItems[mapIndex] & gBitFlags[DUNGEON_MAP]) {
interfaceCtx->unk_140[30] = 0;
interfaceCtx->unk_140[31] = 1;
}
@ -383,7 +383,7 @@ void Minimap_Draw(GlobalContext* globalCtx) {
gDPSetCombineLERP(oGfxCtx->overlay.p++, 1, 0, PRIMITIVE, 0, TEXEL0, 0, PRIMITIVE, 0, 1, 0,
PRIMITIVE, 0, TEXEL0, 0, PRIMITIVE, 0);
if (gSaveContext.dungeonItems[mapIndex] & gBitFlags[DUNGEON_MAP]) {
if (gSaveContext.inventory.dungeonItems[mapIndex] & gBitFlags[DUNGEON_MAP]) {
gDPSetPrimColor(oGfxCtx->overlay.p++, 0, 0, 100, 255, 255, interfaceCtx->minimapAlpha);
gDPLoadTextureBlock_4b(oGfxCtx->overlay.p++, interfaceCtx->mapSegment, G_IM_FMT_I, 96, 85, 0,
@ -395,7 +395,7 @@ void Minimap_Draw(GlobalContext* globalCtx) {
0, 0, 1024, 1024);
}
if (gSaveContext.dungeonItems[mapIndex] & gBitFlags[DUNGEON_COMPASS]) {
if (gSaveContext.inventory.dungeonItems[mapIndex] & gBitFlags[DUNGEON_COMPASS]) {
Minimap_DrawCompassIcons(globalCtx); // Draw icons for the player spawn and current position
func_80094520(globalCtx->state.gfxCtx);
MapMark_DrawConditionally(globalCtx);
@ -525,7 +525,7 @@ void Map_Update(GlobalContext* globalCtx) {
case SCENE_HAKADANCH:
case SCENE_ICE_DOUKUTO:
interfaceCtx->unk_140[30] = 0;
if (gSaveContext.dungeonItems[mapIndex] & gBitFlags[DUNGEON_MAP]) {
if (gSaveContext.inventory.dungeonItems[mapIndex] & gBitFlags[DUNGEON_MAP]) {
interfaceCtx->unk_140[31] = 1;
} else {
interfaceCtx->unk_140[31] = 0;