mirror of https://github.com/zeldaret/tmc.git
Use flag bank enum where possible
This commit is contained in:
parent
4141d3e573
commit
6654cc3ffc
|
@ -2105,10 +2105,10 @@ void sub_08053CC8(void) {
|
||||||
void sub_08053D34(void) {
|
void sub_08053D34(void) {
|
||||||
if (gMenu.field_0xa != 0) {
|
if (gMenu.field_0xa != 0) {
|
||||||
gMenu.field_0xa = 0;
|
gMenu.field_0xa = 0;
|
||||||
if (CheckLocalFlagByBank(0x680, 0x3d)) {
|
if (CheckLocalFlagByBank(FLAG_BANK_7, 0x3d)) {
|
||||||
SetTileType(0x74, 0xc4, 1);
|
SetTileType(0x74, 0xc4, 1);
|
||||||
}
|
}
|
||||||
if (CheckLocalFlagByBank(0x680, 0x3e)) {
|
if (CheckLocalFlagByBank(FLAG_BANK_7, 0x3e)) {
|
||||||
SetTileType(0x74, 0xcc, 1);
|
SetTileType(0x74, 0xcc, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@ const u8 gUnk_08108D20[] = { 0x6F, 0x70, 0x71, 0x72, 0x71, 0x70 };
|
||||||
void Manager27_Main(Entity* this) {
|
void Manager27_Main(Entity* this) {
|
||||||
|
|
||||||
gUnk_08108D10[this->action](this);
|
gUnk_08108D10[this->action](this);
|
||||||
if (CheckLocalFlagByBank(0x300, this->type + 0x67)) {
|
if (CheckLocalFlagByBank(FLAG_BANK_3, this->type + 0x67)) {
|
||||||
gRoomTransition.armos_data.field_0xac |= (1 << this->type);
|
gRoomTransition.armos_data.field_0xac |= (1 << this->type);
|
||||||
} else {
|
} else {
|
||||||
gRoomTransition.armos_data.field_0xac &= ~(1 << this->type);
|
gRoomTransition.armos_data.field_0xac &= ~(1 << this->type);
|
||||||
|
@ -76,5 +76,5 @@ void sub_0805C908(Entity* this) {
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 sub_0805C920(Entity* this) {
|
u32 sub_0805C920(Entity* this) {
|
||||||
return CheckLocalFlagByBank(0x300, this->type + 0x67);
|
return CheckLocalFlagByBank(FLAG_BANK_3, this->type + 0x67);
|
||||||
}
|
}
|
||||||
|
|
|
@ -407,7 +407,7 @@ void sub_080594DC(ManagerF* this) {
|
||||||
case 1:
|
case 1:
|
||||||
if (!GetInventoryValue(ITEM_FOURSWORD))
|
if (!GetInventoryValue(ITEM_FOURSWORD))
|
||||||
return;
|
return;
|
||||||
if (CheckLocalFlagByBank(0x8c0, 0x85))
|
if (CheckLocalFlagByBank(FLAG_BANK_10, 0x85))
|
||||||
return;
|
return;
|
||||||
this->manager.action = 2;
|
this->manager.action = 2;
|
||||||
sub_080186C0(0xB0F);
|
sub_080186C0(0xB0F);
|
||||||
|
|
|
@ -1178,9 +1178,9 @@ void sub_08095F38(Object6AEntity* this) {
|
||||||
|
|
||||||
void sub_08096028(Object6AEntity* this) {
|
void sub_08096028(Object6AEntity* this) {
|
||||||
u32 type2 = 6;
|
u32 type2 = 6;
|
||||||
if (!CheckLocalFlagByBank(768, 123))
|
if (!CheckLocalFlagByBank(FLAG_BANK_3, 123))
|
||||||
type2 = 4;
|
type2 = 4;
|
||||||
if (!CheckLocalFlagByBank(768, 122))
|
if (!CheckLocalFlagByBank(FLAG_BANK_3, 122))
|
||||||
type2 = 3;
|
type2 = 3;
|
||||||
CreateObject(OBJECT_6A, 0x1F, type2);
|
CreateObject(OBJECT_6A, 0x1F, type2);
|
||||||
}
|
}
|
||||||
|
|
|
@ -283,8 +283,8 @@ typedef struct {
|
||||||
} struct_gUnk_08122898;
|
} struct_gUnk_08122898;
|
||||||
|
|
||||||
const struct_gUnk_08122898 gUnk_08122898[] = {
|
const struct_gUnk_08122898 gUnk_08122898[] = {
|
||||||
{ 0x200, 0xa1, 0xa2 },
|
{ FLAG_BANK_2, 0xa1, 0xa2 },
|
||||||
{ 0x8c0, 0x6f, 0x70 },
|
{ FLAG_BANK_10, 0x6f, 0x70 },
|
||||||
};
|
};
|
||||||
|
|
||||||
u32 sub_080932D8(u32 param_1) {
|
u32 sub_080932D8(u32 param_1) {
|
||||||
|
|
|
@ -1785,7 +1785,7 @@ extern EntityData gUnk_080DC4C0;
|
||||||
void sub_StateChange_MinishVillage_Main(void) {
|
void sub_StateChange_MinishVillage_Main(void) {
|
||||||
if (!GetInventoryValue(ITEM_JABBERNUT)) {
|
if (!GetInventoryValue(ITEM_JABBERNUT)) {
|
||||||
LoadRoomEntityList(&gUnk_080DC390);
|
LoadRoomEntityList(&gUnk_080DC390);
|
||||||
if (!CheckLocalFlagByBank(0x200, 0x80)) {
|
if (!CheckLocalFlagByBank(FLAG_BANK_2, 0x80)) {
|
||||||
LoadRoomEntityList(&gUnk_080DC3F0);
|
LoadRoomEntityList(&gUnk_080DC3F0);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -5410,7 +5410,7 @@ extern EntityData gUnk_080F5788;
|
||||||
|
|
||||||
void sub_StateChange_HouseInteriors3_StockwellShop(void) {
|
void sub_StateChange_HouseInteriors3_StockwellShop(void) {
|
||||||
LoadRoomEntityList(&gUnk_080F5758);
|
LoadRoomEntityList(&gUnk_080F5758);
|
||||||
if (!GetInventoryValue(ITEM_QST_DOGFOOD) && CheckLocalFlagByBank(0x200, 0x8f)) {
|
if (!GetInventoryValue(ITEM_QST_DOGFOOD) && CheckLocalFlagByBank(FLAG_BANK_2, 0x8f)) {
|
||||||
LoadRoomEntityList(&gUnk_080F57E8);
|
LoadRoomEntityList(&gUnk_080F57E8);
|
||||||
}
|
}
|
||||||
if (!CheckLocalFlag(0x55)) {
|
if (!CheckLocalFlag(0x55)) {
|
||||||
|
@ -5495,11 +5495,7 @@ u32 sub_unk3_HouseInteriors3_FigurineHouse(void) {
|
||||||
extern EntityData gUnk_080F5E68;
|
extern EntityData gUnk_080F5E68;
|
||||||
|
|
||||||
void sub_StateChange_HouseInteriors3_FigurineHouse(void) {
|
void sub_StateChange_HouseInteriors3_FigurineHouse(void) {
|
||||||
#if defined(JP) || defined(EU) || defined(DEMO_JP)
|
if (!CheckLocalFlagByBank(FLAG_BANK_1, SHOP05_OPEN)) {
|
||||||
if (!CheckLocalFlagByBank(0x100, 0xce)) {
|
|
||||||
#else
|
|
||||||
if (!CheckLocalFlagByBank(0x100, 0xd1)) {
|
|
||||||
#endif
|
|
||||||
LoadRoomEntityList(&gUnk_080F5E68);
|
LoadRoomEntityList(&gUnk_080F5E68);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5538,11 +5534,7 @@ void sub_StateChange_HouseInteriors3_Borlov(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 sub_unk3_WindTribeTower_Entrance(void) {
|
u32 sub_unk3_WindTribeTower_Entrance(void) {
|
||||||
#if defined(JP) || defined(EU) || defined(DEMO_JP)
|
if (CheckGlobalFlag(KUMOTATSUMAKI) && CheckLocalFlagByBank(FLAG_BANK_1, KUMOUE_00_CAP_0)) {
|
||||||
if (CheckGlobalFlag(KUMOTATSUMAKI) && CheckLocalFlagByBank(0x100, 0xd9)) {
|
|
||||||
#else
|
|
||||||
if (CheckGlobalFlag(KUMOTATSUMAKI) && CheckLocalFlagByBank(0x100, 0xdc)) {
|
|
||||||
#endif
|
|
||||||
SetGlobalFlag(WARP_EVENT_END);
|
SetGlobalFlag(WARP_EVENT_END);
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -5551,11 +5543,7 @@ u32 sub_unk3_WindTribeTower_Entrance(void) {
|
||||||
extern EntityData gUnk_080F61BC;
|
extern EntityData gUnk_080F61BC;
|
||||||
|
|
||||||
void sub_StateChange_WindTribeTower_Entrance(void) {
|
void sub_StateChange_WindTribeTower_Entrance(void) {
|
||||||
#if defined(JP) || defined(EU) || defined(DEMO_JP)
|
if (CheckLocalFlagByBank(FLAG_BANK_1, KUMOUE_00_CAP_0)) {
|
||||||
if (CheckLocalFlagByBank(0x100, 0xd9)) {
|
|
||||||
#else
|
|
||||||
if (CheckLocalFlagByBank(0x100, 0xdc)) {
|
|
||||||
#endif
|
|
||||||
SetLocalFlag(0x90);
|
SetLocalFlag(0x90);
|
||||||
}
|
}
|
||||||
if (CheckKinstoneFused(0xf)) {
|
if (CheckKinstoneFused(0xf)) {
|
||||||
|
@ -5615,7 +5603,7 @@ extern EntityData gUnk_080F66AC;
|
||||||
|
|
||||||
void sub_StateChange_WindTribeTowerRoof_Main(void) {
|
void sub_StateChange_WindTribeTowerRoof_Main(void) {
|
||||||
sub_0805B4D0(5);
|
sub_0805B4D0(5);
|
||||||
if (CheckGlobalFlag(LV5_CLEAR) && !CheckLocalFlagByBank(0x100, 5)) {
|
if (CheckGlobalFlag(LV5_CLEAR) && !CheckLocalFlagByBank(FLAG_BANK_1, 5)) {
|
||||||
LoadRoomEntityList(&gUnk_080F66AC);
|
LoadRoomEntityList(&gUnk_080F66AC);
|
||||||
}
|
}
|
||||||
SetWorldMapPos(8, 0, 0x1e8, 0x158);
|
SetWorldMapPos(8, 0, 0x1e8, 0x158);
|
||||||
|
@ -5800,7 +5788,7 @@ extern EntityData gUnk_080F78A0;
|
||||||
void sub_StateChange_HyruleField_LonLonRanch(void) {
|
void sub_StateChange_HyruleField_LonLonRanch(void) {
|
||||||
|
|
||||||
Manager18_Main(0);
|
Manager18_Main(0);
|
||||||
if (CheckLocalFlagByBank(0x200, 0x8f)) {
|
if (CheckLocalFlagByBank(FLAG_BANK_2, 0x8f)) {
|
||||||
if (!CheckGlobalFlag(INLOCK)) {
|
if (!CheckGlobalFlag(INLOCK)) {
|
||||||
LoadRoomEntityList(&gUnk_080F77C0);
|
LoadRoomEntityList(&gUnk_080F77C0);
|
||||||
}
|
}
|
||||||
|
@ -6067,7 +6055,7 @@ extern EntityData gUnk_080F8430;
|
||||||
|
|
||||||
void sub_StateChange_HyruleField_WesternWoodsCenter(void) {
|
void sub_StateChange_HyruleField_WesternWoodsCenter(void) {
|
||||||
Manager18_Main(NULL);
|
Manager18_Main(NULL);
|
||||||
if (CheckKinstoneFused(0x21) && !CheckLocalFlagByBank(0x200, 0x42)) {
|
if (CheckKinstoneFused(0x21) && !CheckLocalFlagByBank(FLAG_BANK_2, 0x42)) {
|
||||||
LoadRoomEntityList(&gUnk_080F8430);
|
LoadRoomEntityList(&gUnk_080F8430);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -272,7 +272,7 @@ void sub_08054FAC(void) {
|
||||||
gUpdateVisibleTiles = 1;
|
gUpdateVisibleTiles = 1;
|
||||||
SetFade(FADE_INSTANT, 0x10);
|
SetFade(FADE_INSTANT, 0x10);
|
||||||
gMenu.field_0xa = 0;
|
gMenu.field_0xa = 0;
|
||||||
if (CheckLocalFlagByBank(0x400, 0x77) && (ptr[2] == 0x2f)) {
|
if (CheckLocalFlagByBank(FLAG_BANK_4, 0x77) && (ptr[2] == 0x2f)) {
|
||||||
gMenu.field_0xa = 1;
|
gMenu.field_0xa = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -765,7 +765,7 @@ void sub_080A5D1C(void) {
|
||||||
|
|
||||||
bool32 sub_080A5F24(void) {
|
bool32 sub_080A5F24(void) {
|
||||||
bool32 result = TRUE;
|
bool32 result = TRUE;
|
||||||
if ((gArea.dungeon_idx == 6) && CheckLocalFlagByBank(0x8c0, 0x7b)) {
|
if ((gArea.dungeon_idx == 6) && CheckLocalFlagByBank(FLAG_BANK_10, 0x7b)) {
|
||||||
result = 0;
|
result = 0;
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
|
Loading…
Reference in New Issue