mirror of
https://github.com/zeldaret/tmc
synced 2026-08-31 01:30:40 -04:00
Use enums across more scripts and files
This commit is contained in:
@@ -76,11 +76,7 @@ void sub_08067418(Entity* this) {
|
||||
this->spriteOrientation.flipY = 1;
|
||||
this->spriteRendering.b3 = 1;
|
||||
this->spritePriority.b0 = 2;
|
||||
#if defined(JP) || defined(EU) || defined(DEMO_JP)
|
||||
if (CheckLocalFlag(0x1e) == 0) {
|
||||
#else
|
||||
if (CheckLocalFlag(0x1d) == 0) {
|
||||
#endif
|
||||
if (CheckLocalFlag(HIKYOU_00_SEKIZOU) == 0) {
|
||||
SetTile(0x4022, 0xe81, 1);
|
||||
SetTile(0x4022, 0xe82, 1);
|
||||
SetTile(0x4022, 0xe83, 1);
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "functions.h"
|
||||
#include "playeritem.h"
|
||||
#include "item.h"
|
||||
#include "kinstone.h"
|
||||
|
||||
extern SpriteLoadData gUnk_0810A348;
|
||||
extern u8* gUnk_08109D18[];
|
||||
@@ -134,7 +135,7 @@ void sub_080601D4(Entity* this) {
|
||||
|
||||
if (CheckGlobalFlag(LV3_CLEAR) == 0) {
|
||||
uVar2 = 2;
|
||||
} else if (CheckKinstoneFused(0x17)) {
|
||||
} else if (CheckKinstoneFused(KINSTONE_17)) {
|
||||
uVar2 = 1;
|
||||
} else {
|
||||
uVar2 = 0;
|
||||
|
||||
@@ -219,7 +219,7 @@ void sub_080643D8(GuardWithSpearEntity* this) {
|
||||
u32 iVar1;
|
||||
int iVar2;
|
||||
|
||||
if (CheckGlobalFlag(2) == 0) {
|
||||
if (CheckGlobalFlag(LV1_CLEAR) == 0) {
|
||||
iVar2 = 0;
|
||||
} else {
|
||||
if (GetInventoryValue(ITEM_GREEN_SWORD) == 0) {
|
||||
|
||||
@@ -98,7 +98,7 @@ void sub_0806673C(Entity* this) {
|
||||
TEXT_INDEX(TEXT_VAATI, 0x2e),
|
||||
};
|
||||
u32 index;
|
||||
if (CheckGlobalFlag(2) == 0) {
|
||||
if (CheckGlobalFlag(LV1_CLEAR) == 0) {
|
||||
index = 0;
|
||||
} else if (GetInventoryValue(ITEM_GREEN_SWORD) == 0) {
|
||||
index = 1;
|
||||
|
||||
@@ -112,7 +112,7 @@ void sub_0806BBB0(Entity* this) {
|
||||
u32 tmp;
|
||||
|
||||
if (GetInventoryValue(ITEM_FLIPPERS) == 0) {
|
||||
if (CheckGlobalFlag(0x29)) {
|
||||
if (CheckGlobalFlag(MIZUKAKI_START)) {
|
||||
tmp = 1;
|
||||
} else {
|
||||
tmp = 0;
|
||||
|
||||
@@ -93,7 +93,7 @@ void sub_08066904(Entity* this) {
|
||||
TEXT_INDEX(TEXT_VAATI, 0x2f),
|
||||
};
|
||||
u32 index;
|
||||
if (CheckGlobalFlag(2) == 0) {
|
||||
if (CheckGlobalFlag(LV1_CLEAR) == 0) {
|
||||
index = 0;
|
||||
} else if (GetInventoryValue(ITEM_GREEN_SWORD) == 0) {
|
||||
index = 1;
|
||||
|
||||
+1
-1
@@ -78,7 +78,7 @@ extern u16* gUnk_0810B660[8];
|
||||
|
||||
void CreateZeldaFollower(void) {
|
||||
Entity* npc;
|
||||
if (CheckGlobalFlag(0x1c) != 0) {
|
||||
if (CheckGlobalFlag(ZELDA_CHASE) != 0) {
|
||||
npc = CreateNPC(ZELDA_FOLLOWER, 0, 0);
|
||||
if (npc != NULL) {
|
||||
CopyPosition(&gPlayerEntity, npc);
|
||||
|
||||
+2
-1
@@ -2,6 +2,7 @@
|
||||
#include "entity.h"
|
||||
#include "npc.h"
|
||||
#include "functions.h"
|
||||
#include "kinstone.h"
|
||||
|
||||
static const SpriteLoadData gUnk_08112E1C[] = {
|
||||
{ 0x30f6, 0x47, 0x4 },
|
||||
@@ -109,7 +110,7 @@ void sub_0806B504(Entity* this) {
|
||||
int idx;
|
||||
|
||||
idx = 1;
|
||||
if (CheckKinstoneFused(0x21)) {
|
||||
if (CheckKinstoneFused(KINSTONE_21)) {
|
||||
idx = 3;
|
||||
} else if (!CheckLocalFlag(URO_POEMN_TALK)) {
|
||||
idx = 0;
|
||||
|
||||
@@ -62,7 +62,7 @@ void sub_0806E964(Entity* this, ScriptExecutionContext* context) {
|
||||
}
|
||||
|
||||
val2 = 0x1c;
|
||||
if (CheckGlobalFlag(0x55)) {
|
||||
if (CheckGlobalFlag(GAMECLEAR)) {
|
||||
val2 = 0x34;
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ void sub_0806E964(Entity* this, ScriptExecutionContext* context) {
|
||||
}
|
||||
|
||||
val2 = 0x1c;
|
||||
if (CheckGlobalFlag(0x55)) {
|
||||
if (CheckGlobalFlag(GAMECLEAR)) {
|
||||
val2 = 0x34;
|
||||
}
|
||||
val = (s16)this->field_0x68.HWORD;
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "object.h"
|
||||
#include "npc.h"
|
||||
#include "hitbox.h"
|
||||
#include "kinstone.h"
|
||||
|
||||
typedef struct {
|
||||
Entity base;
|
||||
@@ -215,7 +216,7 @@ void sub_0806E23C(void) {
|
||||
|
||||
void sub_0806E250(PicolyteBottleEntity* this, ScriptExecutionContext* context) {
|
||||
context->condition = 0;
|
||||
if (CheckKinstoneFused(0x31) != 0) {
|
||||
if (CheckKinstoneFused(KINSTONE_31) != 0) {
|
||||
context->condition = 1;
|
||||
}
|
||||
gActiveScriptInfo.flags |= 1;
|
||||
|
||||
+2
-1
@@ -4,6 +4,7 @@
|
||||
#include "functions.h"
|
||||
#include "effects.h"
|
||||
#include "npc.h"
|
||||
#include "kinstone.h"
|
||||
|
||||
void sub_08062CA4(Entity*);
|
||||
void sub_08062BD4(Entity*);
|
||||
@@ -84,7 +85,7 @@ void sub_08062CBC(Entity* ent) {
|
||||
{ 0, DIALOG_ROOM_FLAG, DIALOG_TOGGLE_FLAG, 1, { TEXT_INDEX(TEXT_POST, 0x3), TEXT_INDEX(TEXT_POST, 0x2) } },
|
||||
};
|
||||
u32 uVar1;
|
||||
if (CheckKinstoneFused(44)) {
|
||||
if (CheckKinstoneFused(KINSTONE_2C)) {
|
||||
uVar1 = 1;
|
||||
} else {
|
||||
uVar1 = 0;
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "npc.h"
|
||||
#include "functions.h"
|
||||
#include "item.h"
|
||||
#include "kinstone.h"
|
||||
|
||||
extern void sub_08064DE4(Entity*);
|
||||
extern void sub_08064D78(Entity*);
|
||||
@@ -86,12 +87,12 @@ void sub_08064EA4(Entity* this) {
|
||||
this->field_0x68.HALF.LO = sub_0801E99C(this);
|
||||
switch (this->type) {
|
||||
case 0:
|
||||
if ((CheckKinstoneFused(0x59) != 0) && (GetInventoryValue(ITEM_MAGIC_BOOMERANG) == 0)) {
|
||||
if ((CheckKinstoneFused(KINSTONE_59) != 0) && (GetInventoryValue(ITEM_MAGIC_BOOMERANG) == 0)) {
|
||||
this->field_0x68.HALF.LO = 0;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if ((CheckKinstoneFused(0x5a) != 0) && (GetInventoryValue(ITEM_MAGIC_BOOMERANG) == 0)) {
|
||||
if ((CheckKinstoneFused(KINSTONE_5A) != 0) && (GetInventoryValue(ITEM_MAGIC_BOOMERANG) == 0)) {
|
||||
this->field_0x68.HALF.LO = 0;
|
||||
}
|
||||
break;
|
||||
@@ -145,12 +146,12 @@ void sub_08064F28(Entity* this, ScriptExecutionContext* context) {
|
||||
}
|
||||
iVar4 = 0xffffffff;
|
||||
} else {
|
||||
if (CheckGlobalFlag(0x3a) == 0) {
|
||||
if (CheckGlobalFlag(KAKERA_COMPLETE) == 0) {
|
||||
iVar4 = 100 - gSave.unk117;
|
||||
if (iVar4 < 1) {
|
||||
uVar5 = 8;
|
||||
iVar4 = 0;
|
||||
SetGlobalFlag(0x3a);
|
||||
SetGlobalFlag(KAKERA_COMPLETE);
|
||||
context->condition = 1;
|
||||
} else {
|
||||
uVar5 = 7;
|
||||
|
||||
Reference in New Issue
Block a user