mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-07-31 03:50:37 -07:00
Merge branch 'develop-rachael' into develop-zhora
This commit is contained in:
commit
b3d3148383
13 changed files with 157 additions and 115 deletions
|
@ -1676,13 +1676,15 @@ u8 Item_Give(GlobalContext* globalCtx, u8 item) {
|
|||
if (item == ITEM_SWORD_BGS) {
|
||||
gSaveContext.swordHealth = 8;
|
||||
|
||||
if (ALL_EQUIP_VALUE(EQUIP_SWORD) == 0xF) {
|
||||
gSaveContext.inventory.equipment ^= 8 << gEquipShifts[EQUIP_SWORD];
|
||||
if (ALL_EQUIP_VALUE(EQUIP_SWORD) == 0xF
|
||||
||(gSaveContext.n64ddFlag && ALL_EQUIP_VALUE(EQUIP_SWORD) == 0xE)) { // In rando, when buying Giant's Knife, also check
|
||||
gSaveContext.inventory.equipment ^= 8 << gEquipShifts[EQUIP_SWORD]; // for 0xE in case we don't have Kokiri Sword
|
||||
if (gSaveContext.equips.buttonItems[0] == ITEM_SWORD_KNIFE) {
|
||||
gSaveContext.equips.buttonItems[0] = ITEM_SWORD_BGS;
|
||||
Interface_LoadItemIcon1(globalCtx, 0);
|
||||
}
|
||||
}
|
||||
|
||||
} else if (item == ITEM_SWORD_MASTER) {
|
||||
gSaveContext.equips.buttonItems[0] = ITEM_SWORD_MASTER;
|
||||
gSaveContext.equips.equipment &= 0xFFF0;
|
||||
|
|
|
@ -402,6 +402,12 @@ BgImage* func_80096A74(PolygonType1* polygon1, GlobalContext* globalCtx) {
|
|||
|
||||
camera = GET_ACTIVE_CAM(globalCtx);
|
||||
camId = camera->camDataIdx;
|
||||
if (camId == -1 && CVar_GetS32("gNoRestrictItems", 0)) {
|
||||
// This prevents a crash when using items that change the
|
||||
// camera (such as din's fire) on scenes with prerendered backgrounds
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// jfifid
|
||||
camId2 = func_80041C10(&globalCtx->colCtx, camId, BGCHECK_SCENE)[2].y;
|
||||
if (camId2 >= 0) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue