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

Split SaveContext into sub-structs (#1393)

* Split SaveContext struct

* run formatter

* Remove temporary-until-split stuff in z_sram

* .

* run formatter
This commit is contained in:
Dragorn421 2023-08-13 21:24:26 +02:00 committed by GitHub
parent e272186b5f
commit 6e7a6d4181
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
107 changed files with 1819 additions and 1751 deletions

View file

@ -80,35 +80,37 @@ void Interface_Init(PlayState* play) {
ASSERT(interfaceCtx->iconItemSegment != NULL, "parameter->icon_itemSegment != NULL", "../z_construct.c", 193);
osSyncPrintf("Register_Item[%x, %x, %x, %x]\n", gSaveContext.equips.buttonItems[0],
gSaveContext.equips.buttonItems[1], gSaveContext.equips.buttonItems[2],
gSaveContext.equips.buttonItems[3]);
osSyncPrintf("Register_Item[%x, %x, %x, %x]\n", gSaveContext.save.info.equips.buttonItems[0],
gSaveContext.save.info.equips.buttonItems[1], gSaveContext.save.info.equips.buttonItems[2],
gSaveContext.save.info.equips.buttonItems[3]);
if (gSaveContext.equips.buttonItems[0] < 0xF0) {
if (gSaveContext.save.info.equips.buttonItems[0] < 0xF0) {
DmaMgr_RequestSyncDebug(interfaceCtx->iconItemSegment + (0 * ITEM_ICON_SIZE),
GET_ITEM_ICON_VROM(gSaveContext.equips.buttonItems[0]), ITEM_ICON_SIZE,
GET_ITEM_ICON_VROM(gSaveContext.save.info.equips.buttonItems[0]), ITEM_ICON_SIZE,
"../z_construct.c", 198);
} else if (gSaveContext.equips.buttonItems[0] != 0xFF) {
} else if (gSaveContext.save.info.equips.buttonItems[0] != 0xFF) {
DmaMgr_RequestSyncDebug(interfaceCtx->iconItemSegment + (0 * ITEM_ICON_SIZE),
GET_ITEM_ICON_VROM(gSaveContext.equips.buttonItems[0]), ITEM_ICON_SIZE,
GET_ITEM_ICON_VROM(gSaveContext.save.info.equips.buttonItems[0]), ITEM_ICON_SIZE,
"../z_construct.c", 203);
}
if (gSaveContext.equips.buttonItems[1] < 0xF0) {
if (gSaveContext.save.info.equips.buttonItems[1] < 0xF0) {
DmaMgr_RequestSyncDebug(interfaceCtx->iconItemSegment + (1 * ITEM_ICON_SIZE),
GET_ITEM_ICON_VROM(gSaveContext.equips.buttonItems[1]), ITEM_ICON_SIZE,
GET_ITEM_ICON_VROM(gSaveContext.save.info.equips.buttonItems[1]), ITEM_ICON_SIZE,
"../z_construct.c", 209);
}
if (gSaveContext.equips.buttonItems[2] < 0xF0) {
if (gSaveContext.save.info.equips.buttonItems[2] < 0xF0) {
DmaMgr_RequestSyncDebug(interfaceCtx->iconItemSegment + (2 * ITEM_ICON_SIZE),
GET_ITEM_ICON_VROM(gSaveContext.equips.buttonItems[2]), ITEM_ICON_SIZE,
GET_ITEM_ICON_VROM(gSaveContext.save.info.equips.buttonItems[2]), ITEM_ICON_SIZE,
"../z_construct.c", 214);
}
if (gSaveContext.equips.buttonItems[3] < 0xF0) {
if (gSaveContext.save.info.equips.buttonItems[3] < 0xF0) {
DmaMgr_RequestSyncDebug(interfaceCtx->iconItemSegment + (3 * ITEM_ICON_SIZE),
GET_ITEM_ICON_VROM(gSaveContext.equips.buttonItems[3]), ITEM_ICON_SIZE,
GET_ITEM_ICON_VROM(gSaveContext.save.info.equips.buttonItems[3]), ITEM_ICON_SIZE,
"../z_construct.c", 219);
}
@ -137,7 +139,7 @@ void Interface_Init(PlayState* play) {
gSaveContext.timerX[timerId] = 26;
if (gSaveContext.healthCapacity > 0xA0) {
if (gSaveContext.save.info.playerData.healthCapacity > 0xA0) {
gSaveContext.timerY[timerId] = 54; // two rows of hearts
} else {
gSaveContext.timerY[timerId] = 46; // one row of hearts