Use enums across more scripts and files

This commit is contained in:
Tal Hayon
2022-05-14 20:51:30 +03:00
parent 422fb8ed14
commit 968e200c78
259 changed files with 876 additions and 1318 deletions
+1 -1
View File
@@ -46,7 +46,7 @@ void sub_08088A68(BigBarrelEntity* this) {
super->action = 1;
super->spriteSettings.draw = 3;
super->updatePriority = 3;
if (CheckGlobalFlag(0x17)) {
if (CheckGlobalFlag(LV1TARU_OPEN)) {
super->frameIndex = gSave.unk7 + 1;
} else {
super->frameIndex = gSave.unk7;
+14 -14
View File
@@ -194,8 +194,8 @@ void sub_080A13E8(ObjectB9Entity* this) {
}
break;
case 0x63:
if (!CheckGlobalFlag(0x4f)) {
SetGlobalFlag(0x4f);
if (!CheckGlobalFlag(ANJU_HEART)) {
SetGlobalFlag(ANJU_HEART);
break;
}
bVar2 = 1;
@@ -243,46 +243,46 @@ void sub_080A14A8(void) {
}
if (iVar1 & 1) {
SetGlobalFlag(0x4b);
SetGlobalFlag(ANJU_LV_BIT0);
} else {
ClearGlobalFlag(0x4b);
ClearGlobalFlag(ANJU_LV_BIT0);
}
if (iVar1 & 2) {
SetGlobalFlag(0x4c);
SetGlobalFlag(ANJU_LV_BIT1);
} else {
ClearGlobalFlag(0x4c);
ClearGlobalFlag(ANJU_LV_BIT1);
}
if (iVar1 & 4) {
SetGlobalFlag(0x4d);
SetGlobalFlag(ANJU_LV_BIT2);
} else {
ClearGlobalFlag(0x4d);
ClearGlobalFlag(ANJU_LV_BIT2);
}
if (iVar1 & 8) {
SetGlobalFlag(0x4e);
SetGlobalFlag(ANJU_LV_BIT3);
} else {
ClearGlobalFlag(0x4e);
ClearGlobalFlag(ANJU_LV_BIT3);
}
}
u32 sub_080A1514(void) {
u32 rv = 0;
if (CheckGlobalFlag(0x4b)) {
if (CheckGlobalFlag(ANJU_LV_BIT0)) {
rv = 1;
}
if (CheckGlobalFlag(0x4c)) {
if (CheckGlobalFlag(ANJU_LV_BIT1)) {
rv |= 2;
}
if (CheckGlobalFlag(0x4d)) {
if (CheckGlobalFlag(ANJU_LV_BIT2)) {
rv |= 4;
}
if (CheckGlobalFlag(0x4e)) {
if (CheckGlobalFlag(ANJU_LV_BIT3)) {
rv |= 8;
}
return rv;
+1 -1
View File
@@ -108,7 +108,7 @@ void MacroBook_Action3(MacroBookEntity* this) {
super->timer++;
super->frame &= 0xdf;
SetPlayerControl(0xff);
SetGlobalFlag(0x2a);
SetGlobalFlag(MIZUKAKI_HARIFALL);
default:
UpdateAnimationSingleFrame(super);
break;
+1 -1
View File
@@ -50,7 +50,7 @@ void Object9(Entity* this) {
if ((gMessage.doTextBox & 0x7f) != 0) {
default:
if (gUnk_03003DF0.unk_4[3] == 50) {
if (CheckKinstoneFused(0x32) == 0) {
if (CheckKinstoneFused(KINSTONE_32) == 0) {
uVar2 = 0;
break;
}