This commit is contained in:
theo3
2021-12-27 18:23:03 -08:00
687 changed files with 10774 additions and 9983 deletions
+2 -2
View File
@@ -5,7 +5,7 @@
extern void sub_0807B600(u32);
extern const u16 script_08012E20[];
extern const u16 script_MazaalMacroDefeated[];
void sub_08034E18(Entity*);
void sub_08034FA0(Entity*);
@@ -139,7 +139,7 @@ void sub_08034E68(Entity* this) {
if (gScreenTransition.field_0x39 == 0) {
if (sub_08079F8C() != 0) {
this->action = 3;
scriptExecutionContext = StartCutscene(this, (u16*)script_08012E20);
scriptExecutionContext = StartCutscene(this, (u16*)script_MazaalMacroDefeated);
*(ScriptExecutionContext**)&this->cutsceneBeh = scriptExecutionContext;
}
} else {
+8 -8
View File
@@ -77,16 +77,16 @@ const ManagerF_HelperStruct gUnk_08108354[] = {
const u32 gUnk_08108354_terminator = 0xFFFF; // terminator for the previous array
extern u16 script_0800E600[];
extern u16 script_0800E62C[];
extern u16 script_0800E658[];
extern u16 script_0800E684[];
extern u16 script_PlayerAtDarkNut1[];
extern u16 script_PlayerAtDarkNut2[];
extern u16 script_PlayerAtDarkNut3[];
extern u16 script_PlayerAtMadderpillar[];
u16* const gUnk_08108380[] = {
script_0800E600,
script_0800E62C,
script_0800E658,
script_0800E684,
script_PlayerAtDarkNut1,
script_PlayerAtDarkNut2,
script_PlayerAtDarkNut3,
script_PlayerAtMadderpillar,
};
void sub_08058F44(u32, u32, u32);
+4 -4
View File
@@ -17,8 +17,8 @@ typedef struct {
extern void sub_08078850(Entity*, u32, u8 /* TODO this is a s8 in beedle.c*/, gUnk_0810C89C_struct*);
extern void script_08016030; // Cutscene data type?
extern void script_0801606C; // Cutscene data type?
extern void script_Object3ELeftStoneOpening; // Cutscene data type?
extern void script_Object3ERightStoneOpening; // Cutscene data type?
const Hitbox gUnk_08114154;
const u8 gUnk_0811415C[];
@@ -142,12 +142,12 @@ void sub_0806DB84(Entity* this, ScriptExecutionContext* context) {
ent = CreateObject(OBJECT_3E, 4, 0);
if (ent != NULL) {
PositionRelative(this, ent, -0x80000, 0);
*(ScriptExecutionContext**)&ent->cutsceneBeh = StartCutscene(ent, &script_08016030);
*(ScriptExecutionContext**)&ent->cutsceneBeh = StartCutscene(ent, &script_Object3ELeftStoneOpening);
}
ent = CreateObject(OBJECT_3E, 5, 0);
if (ent != NULL) {
PositionRelative(this, ent, 0x80000, 0);
*(ScriptExecutionContext**)&ent->cutsceneBeh = StartCutscene(ent, &script_0801606C);
*(ScriptExecutionContext**)&ent->cutsceneBeh = StartCutscene(ent, &script_Object3ERightStoneOpening);
}
}
+5 -5
View File
@@ -6,7 +6,7 @@ extern void sub_0806A8C8(Entity*);
extern void (*gUnk_08112260[])(Entity*);
extern void (*gUnk_08112278[])(Entity*);
extern void script_08012F0C;
extern void script_Rem;
extern void sub_08078850(Entity*, u32, u32, u32*);
extern u32 gUnk_0811229C;
@@ -51,7 +51,7 @@ void sub_0806A3D8(Entity* this) {
this->actionDelay = 0xb4;
SetDefaultPriority(this, PRIO_MESSAGE);
sub_0806A8C8(this);
uVar1 = StartCutscene(this, &script_08012F0C);
uVar1 = StartCutscene(this, &script_Rem);
*(ScriptExecutionContext**)&this->cutsceneBeh = uVar1;
sub_0807DD94(this, NULL);
}
@@ -132,7 +132,7 @@ void sub_0806A550(Entity* this) {
if (this->frame == 1) {
this->frame = 0;
InitScreenShake(8, 2);
gActiveScriptInfo.unk_00 |= 0x100;
gActiveScriptInfo.syncFlags |= 0x100;
SoundReq(SFX_CHEST_OPEN);
}
if ((this->frame & 0x80) != 0) {
@@ -173,7 +173,7 @@ void sub_0806A630(Entity* this) {
this->action = 1;
InitializeAnimation(this, 0x12);
}
if ((gActiveScriptInfo.unk_00 & 0x100) != 0) {
if ((gActiveScriptInfo.syncFlags & 0x100) != 0) {
GetNextFrame(this);
}
if (this->frame == 1) {
@@ -192,7 +192,7 @@ void sub_0806A830(Entity* this) {
InitializeAnimation(this, 0x14);
SetDefaultPriority(this, PRIO_MESSAGE);
}
if ((gActiveScriptInfo.unk_00 & 0x200) != 0) {
if ((gActiveScriptInfo.syncFlags & 0x200) != 0) {
DeleteThisEntity();
}
GetNextFrame(this);
+2 -2
View File
@@ -13,7 +13,7 @@ extern bool32 sub_08056338(void);
extern void sub_08078850(Entity*, u32, u8, u32*);
extern u32 gUnk_0810FDA0;
extern u16 script_080142B0;
extern u16 script_Stockwell;
void Stockwell(Entity* this) {
gUnk_0810FDA4[this->action](this);
@@ -32,7 +32,7 @@ void sub_08065080(Entity* this) {
#ifndef EU
sub_08078850(this, 0, 0, &gUnk_0810FDA0);
#endif
context = StartCutscene(this, &script_080142B0);
context = StartCutscene(this, &script_Stockwell);
*(ScriptExecutionContext**)&this->cutsceneBeh = context;
}
+2 -2
View File
@@ -4,7 +4,7 @@
extern void (*gUnk_0810FEC4[])(Entity* this);
extern void (*gUnk_0810FEBC[])(Entity* this);
extern SpriteLoadData gUnk_0810FEB0;
extern u8 script_0800B41C;
extern u8 script_TalonGotKey;
extern u8 gUnk_0810FED8[];
void sub_0806574C(Entity* this);
@@ -103,7 +103,7 @@ void sub_080656D4(Entity* this) {
} else {
if (this->interactType != 0) {
if (GetInventoryValue(0x37) != 0) { // keyLonLon
StartCutscene(this, (u16*)&script_0800B41C);
StartCutscene(this, (u16*)&script_TalonGotKey);
goto label2;
} else {
this->field_0x68.HALF.HI = this->action;
+2 -2
View File
@@ -15,7 +15,7 @@ extern void (*const gUnk_08113A7C[])(Entity*);
extern void (*const gUnk_08113A8C[])(Entity*, ScriptExecutionContext*);
extern SpriteLoadData gUnk_08113A1C[];
extern u16 script_08014A80;
extern u16 script_WindTribespeople6;
extern Dialog gUnk_08113ABC[];
extern u16 gUnk_08113B0C[];
@@ -64,7 +64,7 @@ void sub_0806C7D4(Entity* this) {
sub_0807DD94(this, NULL);
if ((this->type2 == 3) && (!CheckGlobalFlag(WARP_EVENT_END)) && (CheckLocalFlag(0x63)) && (CheckRoomFlag(0))) {
this->type2 = 7;
sub_0807DD80(this, &script_08014A80);
sub_0807DD80(this, &script_WindTribespeople6);
}
}
}
+1 -1
View File
@@ -183,7 +183,7 @@ void GreatFairy_WingsUpdate(Entity* this) {
this->action = 2;
sub_0805EC60(this);
gRoomVars.animFlags |= 32;
gActiveScriptInfo.unk_00 |= 4;
gActiveScriptInfo.syncFlags |= 4;
} else {
sub_0805EC9C(this, this->speed, 256, 0);
}
+9 -9
View File
@@ -16,10 +16,10 @@ extern s16 gUnk_08122B0E[];
extern u16 gUnk_08122B1E[];
extern s8 gUnk_08122B2E[];
extern u16 script_0800AEDC;
extern u16 script_0801183C;
extern u16 script_Object6ATheLittleHat;
extern u16 script_Object6ASwordInChest;
extern u16 script_08015B14;
extern u16 script_08011940;
extern u16 script_ZeldaMagic;
extern u16 script_08012C48;
typedef struct {
@@ -186,7 +186,7 @@ void sub_08094B94(Object6AEntity* this) {
if (e != NULL) {
CopyPosition(&gPlayerEntity, e);
e->z.HALF.HI = -48;
((Object6AEntity*)e)->ctx = StartCutscene(e, &script_0800AEDC);
((Object6AEntity*)e)->ctx = StartCutscene(e, &script_Object6ATheLittleHat);
CreateDust(e);
e->z.HALF.HI += 16;
e->y.HALF.HI++;
@@ -535,7 +535,7 @@ void sub_08095244(Object6AEntity* this) {
if (e != NULL) {
e->parent = super;
PositionRelative(super, e, 0x100000, -0x100000);
((Object6AEntity*)e)->ctx = StartCutscene(e, &script_0801183C);
((Object6AEntity*)e)->ctx = StartCutscene(e, &script_Object6ASwordInChest);
}
}
}
@@ -804,7 +804,7 @@ void sub_08095810(Object6AEntity* this) {
e->parent = super;
CopyPosition(super, e);
ResolveEntityOnTop(super, e);
((Object6AEntity*)e)->ctx = StartCutscene(e, &script_08011940);
((Object6AEntity*)e)->ctx = StartCutscene(e, &script_ZeldaMagic);
}
}
@@ -873,7 +873,7 @@ void sub_08095954(Object6AEntity* this) {
EnqueueSFX(292);
super->frame &= ~1;
} else {
gActiveScriptInfo.unk_00 |= 0x100;
gActiveScriptInfo.syncFlags |= 0x100;
}
}
@@ -1069,7 +1069,7 @@ void sub_08095D8C(Object6AEntity* this, ScriptExecutionContext* ctx) {
}
void sub_08095DBC(Object6AEntity* this) {
if (gActiveScriptInfo.unk_00 & 0x10)
if (gActiveScriptInfo.syncFlags & 0x10)
DeleteThisEntity();
if (super->type2 == 0) {
if (super->action == 0) {
@@ -1085,7 +1085,7 @@ void sub_08095DBC(Object6AEntity* this) {
super->spriteRendering.b3 = gUnk_08114F30[super->spriteRendering.b3];
ResolveEntityOnTop(super, super);
}
if ((super->type2 & 0x80) == 0 && gActiveScriptInfo.unk_00 & 0x20000) {
if ((super->type2 & 0x80) == 0 && gActiveScriptInfo.syncFlags & 0x20000) {
super->type2 = -1;
super->zVelocity = 0x40000;
super->speed = 0xC000;
+4 -4
View File
@@ -279,8 +279,8 @@ extern ScreenTransitionData gUnk_0813AB58;
extern ScreenTransitionData gUnk_0813AD88[];
extern u8 gUnk_080082DC[];
extern u16 script_08009ECC;
extern u16 script_08009EF0;
extern u16 script_BedInLinksRoom;
extern u16 script_BedAtSimons;
extern Entity* gPlayerClones[];
extern ScriptExecutionContext gPlayerScriptExecutionContext;
@@ -3765,10 +3765,10 @@ NONMATCH("asm/non_matching/player/sub_080751E8.inc", void sub_080751E8(u32 a1, u
gPlayerState.flags |= 8;
if (!a1) {
gPlayerState.field_0x39 = 0;
tmp = &script_08009ECC;
tmp = &script_BedInLinksRoom;
} else {
gPlayerState.field_0x39 = 1;
tmp = &script_08009EF0;
tmp = &script_BedAtSimons;
}
e = CreateObject(OBJECT_5B, !gPlayerState.field_0x39 ? 2 : 0, 0);
if (e != NULL) {
+12 -12
View File
@@ -390,7 +390,7 @@ u32 sub_unk3_HouseInteriors1_InnWestRoom(void) {
return 1;
}
extern void* script_08010A5C[];
extern void* script_PlayerSleepingInn[];
void sub_StateChange_HouseInteriors1_InnWestRoom(void) {
if (CheckLocalFlag(YADO_CHECKIN)) {
@@ -398,7 +398,7 @@ void sub_StateChange_HouseInteriors1_InnWestRoom(void) {
DoFade(5, 256);
gPlayerEntity.x.HALF.HI = gRoomControls.roomOriginX + 0x50;
gPlayerEntity.y.HALF.HI = gRoomControls.roomOriginY + 0x38;
sub_080751E8(1, 2, &script_08010A5C);
sub_080751E8(1, 2, &script_PlayerSleepingInn);
}
}
@@ -424,7 +424,7 @@ void sub_StateChange_HouseInteriors1_InnMiddleRoom(void) {
DoFade(5, 256);
gPlayerEntity.x.HALF.HI = gRoomControls.roomOriginX + 0x50;
gPlayerEntity.y.HALF.HI = gRoomControls.roomOriginY + 0x38;
sub_080751E8(1, 2, &script_08010A5C);
sub_080751E8(1, 2, &script_PlayerSleepingInn);
}
}
@@ -450,7 +450,7 @@ void sub_StateChange_HouseInteriors1_InnEastRoom(void) {
DoFade(5, 256);
gPlayerEntity.x.HALF.HI = gRoomControls.roomOriginX + 0x60;
gPlayerEntity.y.HALF.HI = gRoomControls.roomOriginY + 0x38;
sub_080751E8(1, 2, &script_08010A5C);
sub_080751E8(1, 2, &script_PlayerSleepingInn);
}
}
@@ -665,14 +665,14 @@ u32 sub_unk3_HyruleCastle_4(void) {
return 1;
}
extern u32 script_08009E88;
extern u32 script_PlayerWakingUpInHyruleCastle;
void sub_StateChange_HyruleCastle_4(void) {
if (!CheckLocalFlag(CASTLE_04_MEZAME)) {
DoFade(5, 256);
gPlayerEntity.x.HALF.HI = gRoomControls.roomOriginX + 0xb0;
gPlayerEntity.y.HALF.HI = gRoomControls.roomOriginY + 0x40;
sub_080751E8(0, 6, &script_08009E88);
sub_080751E8(0, 6, &script_PlayerWakingUpInHyruleCastle);
#ifdef EU
SoundReq(0x80010000);
gArea.musicIndex = gArea.pMusicIndex;
@@ -4806,14 +4806,14 @@ u32 sub_unk3_HouseInteriors2_LinksHouseBedroom() {
}
extern EntityData gUnk_080F31D8;
extern u32 script_08009B30;
extern u32 script_PlayerIntro;
void sub_StateChange_HouseInteriors2_LinksHouseBedroom(void) {
if (!CheckGlobalFlag(START) && !CheckLocalFlag(0x46)) {
sub_080A71C4(5, 1, 4, 4);
gUpdateVisibleTiles = 0;
DoFade(5, 256);
sub_080751E8(0, 6, &script_08009B30);
sub_080751E8(0, 6, &script_PlayerIntro);
}
if (!CheckGlobalFlag(OUTDOOR)) {
gArea.musicIndex = gArea.pMusicIndex;
@@ -4824,12 +4824,12 @@ void sub_StateChange_HouseInteriors2_LinksHouseBedroom(void) {
}
}
extern u32 script_08009E58;
extern u32 script_PlayerWakeAfterRest;
void sub_0804E864(void) {
gPlayerEntity.x.HALF.HI = gRoomControls.roomOriginX + 0x90;
gPlayerEntity.y.HALF.HI = gRoomControls.roomOriginY + 0x38;
sub_080751E8(1, 6, &script_08009E58);
sub_080751E8(1, 6, &script_PlayerWakeAfterRest);
ModHealth(0xa0);
}
@@ -5316,14 +5316,14 @@ u32 sub_unk3_HouseInteriors3_Simon(void) {
}
extern EntityData gUnk_080F5DD0;
extern u32 script_08011C50;
extern u32 script_PlayerWakingUpAtSimons;
void sub_StateChange_HouseInteriors3_Simon(void) {
if (gSave.global_progress > 7) {
LoadRoomEntityList(&gUnk_080F5DD0);
}
if (CheckGlobalFlag(MAROYA_WAKEUP)) {
sub_080751E8(1, 2, &script_08011C50);
sub_080751E8(1, 2, &script_PlayerWakingUpAtSimons);
}
}
+39 -39
View File
@@ -28,7 +28,7 @@ void ScriptCommand_JumpAbsoluteTable(Entity* entity, ScriptExecutionContext* con
void ScriptCommand_Call(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_CallWithArg(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_LoadRoomEntityList(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_TestBit(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_CheckSyncFlagAndClear(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_CheckInventory1(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_CheckInventory2(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_CheckLocalFlag(Entity* entity, ScriptExecutionContext* context);
@@ -41,10 +41,10 @@ void ScriptCommand_CheckEntityInteractType(Entity* entity, ScriptExecutionContex
void ScriptCommand_0807E30C(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_HasRupees(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_0807E3BC(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_0807E3E8(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_CheckTextboxResult(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_CheckKinstoneFused(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_BuyItem(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_0807E48C(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_CheckBottleContaining(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_HasRoomItemForSale(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_0807E4CC(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_0807E4EC(Entity* entity, ScriptExecutionContext* context);
@@ -54,8 +54,8 @@ void ScriptCommand_0807E564(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_EntityHasHeight(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_ComparePlayerAction(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_ComparePlayerAnimationState(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_0807E5F8(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_0807E610(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_SetSyncFlag(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_ClearSyncFlag(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_SetLocalFlag(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_SetLocalFlagByBank(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_ClearLocalFlag(Entity* entity, ScriptExecutionContext* context);
@@ -64,12 +64,12 @@ void ScriptCommand_ClearGlobalFlag(Entity* entity, ScriptExecutionContext* conte
void ScriptCommand_SetRoomFlag(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_ClearRoomFlag(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_Wait(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_WaitForSomething(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_WaitForSomething2(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_WaitForSyncFlag(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_WaitForSyncFlagAndClear(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_WaitPlayerGetItem(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_WaitForPlayerAction0x17(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_WaitFor_1(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_WaitFor_2(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_WaitForFadeFinish(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_0807E778(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_SetFadeMask(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_0807E79C(Entity* entity, ScriptExecutionContext* context);
@@ -143,7 +143,7 @@ void ScriptCommand_StopBgm(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_ModRupees(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_ModHealth(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_IncreaseMaxHealth(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_0807F034(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_GivePlayerItem(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_0807F050(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_GetInventoryValue(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_0807F078(Entity* entity, ScriptExecutionContext* context);
@@ -481,7 +481,7 @@ void ExecuteScript(Entity* entity, ScriptExecutionContext* context) {
ScriptCommand_Call,
ScriptCommand_CallWithArg,
ScriptCommand_LoadRoomEntityList,
ScriptCommand_TestBit,
ScriptCommand_CheckSyncFlagAndClear,
ScriptCommand_CheckInventory1,
ScriptCommand_CheckInventory2,
ScriptCommand_HasRoomItemForSale,
@@ -495,10 +495,10 @@ void ExecuteScript(Entity* entity, ScriptExecutionContext* context) {
ScriptCommand_0807E30C,
ScriptCommand_HasRupees,
ScriptCommand_0807E3BC,
ScriptCommand_0807E3E8,
ScriptCommand_CheckTextboxResult,
ScriptCommand_CheckKinstoneFused,
ScriptCommand_BuyItem,
ScriptCommand_0807E48C,
ScriptCommand_CheckBottleContaining,
ScriptCommand_0807E4CC,
ScriptCommand_0807E4EC,
ScriptCommand_0807E514,
@@ -507,8 +507,8 @@ void ExecuteScript(Entity* entity, ScriptExecutionContext* context) {
ScriptCommand_EntityHasHeight,
ScriptCommand_ComparePlayerAction,
ScriptCommand_ComparePlayerAnimationState,
ScriptCommand_0807E5F8,
ScriptCommand_0807E610,
ScriptCommand_SetSyncFlag,
ScriptCommand_ClearSyncFlag,
ScriptCommand_SetLocalFlag,
ScriptCommand_SetLocalFlagByBank,
ScriptCommand_ClearLocalFlag,
@@ -517,12 +517,12 @@ void ExecuteScript(Entity* entity, ScriptExecutionContext* context) {
ScriptCommand_SetRoomFlag,
ScriptCommand_ClearRoomFlag,
ScriptCommand_Wait,
ScriptCommand_WaitForSomething,
ScriptCommand_WaitForSomething2,
ScriptCommand_WaitForSyncFlag,
ScriptCommand_WaitForSyncFlagAndClear,
ScriptCommand_WaitPlayerGetItem,
ScriptCommand_WaitForPlayerAction0x17,
ScriptCommand_WaitFor_1,
ScriptCommand_WaitFor_2,
ScriptCommand_WaitForFadeFinish,
ScriptCommand_0807E778,
ScriptCommand_SetFadeMask,
ScriptCommand_0807E79C,
@@ -597,7 +597,7 @@ void ExecuteScript(Entity* entity, ScriptExecutionContext* context) {
ScriptCommand_ModRupees,
ScriptCommand_ModHealth,
ScriptCommand_IncreaseMaxHealth,
ScriptCommand_0807F034,
ScriptCommand_GivePlayerItem,
ScriptCommand_0807F050,
ScriptCommand_GetInventoryValue,
ScriptCommand_0807F078,
@@ -613,7 +613,7 @@ void ExecuteScript(Entity* entity, ScriptExecutionContext* context) {
if (context->wait) {
context->wait--;
} else {
struct_02033280* activeScriptInfo = &gActiveScriptInfo;
ActiveScriptInfo* activeScriptInfo = &gActiveScriptInfo;
activeScriptInfo->flags = 0;
do {
u32 cmd = GetNextScriptCommandHalfword(context->scriptInstructionPointer);
@@ -713,14 +713,14 @@ void ScriptCommand_LoadRoomEntityList(Entity* entity, ScriptExecutionContext* co
LoadRoomEntityList((EntityData*)GetNextScriptCommandWordAfterCommandMetadata(context->scriptInstructionPointer));
}
void ScriptCommand_TestBit(Entity* entity, ScriptExecutionContext* context) {
void ScriptCommand_CheckSyncFlagAndClear(Entity* entity, ScriptExecutionContext* context) {
u32 flag = GetNextScriptCommandWordAfterCommandMetadata(context->scriptInstructionPointer);
u32 set = 0;
u32 field = gActiveScriptInfo.unk_00;
u32 field = gActiveScriptInfo.syncFlags;
if ((field & flag) == flag)
set = 1;
context->condition = set;
gActiveScriptInfo.unk_00 = field & ~flag;
gActiveScriptInfo.syncFlags = field & ~flag;
gActiveScriptInfo.flags |= 1;
}
@@ -831,7 +831,7 @@ void ScriptCommand_0807E3BC(Entity* entity, ScriptExecutionContext* context) {
gActiveScriptInfo.flags |= 1;
}
void ScriptCommand_0807E3E8(Entity* entity, ScriptExecutionContext* context) {
void ScriptCommand_CheckTextboxResult(Entity* entity, ScriptExecutionContext* context) {
context->condition = !gUnk_02000040.unk_01;
gActiveScriptInfo.flags |= 1;
}
@@ -861,7 +861,7 @@ void ScriptCommand_BuyItem(Entity* entity, ScriptExecutionContext* context) {
gActiveScriptInfo.flags |= 1;
}
void ScriptCommand_0807E48C(Entity* entity, ScriptExecutionContext* context) {
void ScriptCommand_CheckBottleContaining(Entity* entity, ScriptExecutionContext* context) {
context->condition = GetBottleContaining(context->scriptInstructionPointer[1]);
gActiveScriptInfo.flags |= 1;
}
@@ -914,12 +914,12 @@ void ScriptCommand_ComparePlayerAnimationState(Entity* entity, ScriptExecutionCo
gActiveScriptInfo.flags |= 1;
}
void ScriptCommand_0807E5F8(Entity* entity, ScriptExecutionContext* context) {
gActiveScriptInfo.unk_00 |= GetNextScriptCommandWordAfterCommandMetadata(context->scriptInstructionPointer);
void ScriptCommand_SetSyncFlag(Entity* entity, ScriptExecutionContext* context) {
gActiveScriptInfo.syncFlags |= GetNextScriptCommandWordAfterCommandMetadata(context->scriptInstructionPointer);
}
void ScriptCommand_0807E610(Entity* entity, ScriptExecutionContext* context) {
gActiveScriptInfo.unk_00 &= ~GetNextScriptCommandWordAfterCommandMetadata(context->scriptInstructionPointer);
void ScriptCommand_ClearSyncFlag(Entity* entity, ScriptExecutionContext* context) {
gActiveScriptInfo.syncFlags &= ~GetNextScriptCommandWordAfterCommandMetadata(context->scriptInstructionPointer);
}
void ScriptCommand_SetLocalFlag(Entity* entity, ScriptExecutionContext* context) {
@@ -954,19 +954,19 @@ void ScriptCommand_Wait(Entity* entity, ScriptExecutionContext* context) {
context->wait = GetNextScriptCommandHalfwordAfterCommandMetadata(context->scriptInstructionPointer);
}
void ScriptCommand_WaitForSomething(Entity* entity, ScriptExecutionContext* context) {
u32 tmp = GetNextScriptCommandWordAfterCommandMetadata(context->scriptInstructionPointer);
if ((gActiveScriptInfo.unk_00 & tmp) != tmp) {
void ScriptCommand_WaitForSyncFlag(Entity* entity, ScriptExecutionContext* context) {
u32 flag = GetNextScriptCommandWordAfterCommandMetadata(context->scriptInstructionPointer);
if ((gActiveScriptInfo.syncFlags & flag) != flag) {
gActiveScriptInfo.commandSize = 0;
}
}
void ScriptCommand_WaitForSomething2(Entity* entity, ScriptExecutionContext* context) {
u32 tmp = GetNextScriptCommandWordAfterCommandMetadata(context->scriptInstructionPointer);
if ((gActiveScriptInfo.unk_00 & tmp) != tmp) {
void ScriptCommand_WaitForSyncFlagAndClear(Entity* entity, ScriptExecutionContext* context) {
u32 flag = GetNextScriptCommandWordAfterCommandMetadata(context->scriptInstructionPointer);
if ((gActiveScriptInfo.syncFlags & flag) != flag) {
gActiveScriptInfo.commandSize = 0;
} else {
gActiveScriptInfo.unk_00 &= ~tmp;
gActiveScriptInfo.syncFlags &= ~flag;
gActiveScriptInfo.flags |= 1;
}
}
@@ -995,7 +995,7 @@ void ScriptCommand_WaitFor_1(Entity* entity, ScriptExecutionContext* context) {
}
}
void ScriptCommand_WaitFor_2(Entity* entity, ScriptExecutionContext* context) {
void ScriptCommand_WaitForFadeFinish(Entity* entity, ScriptExecutionContext* context) {
if (gFadeControl.active) {
gActiveScriptInfo.commandSize = 0;
}
@@ -1040,7 +1040,7 @@ void ScriptCommand_0807E80C(Entity* entity, ScriptExecutionContext* context) {
sub_0807E818(0x11);
}
void sub_0807E818(u32 unk1) {
void sub_0807E818(u32 fadeType) {
Entity* cameraTarget = gRoomControls.cameraTarget;
u32 x, y;
if (cameraTarget) {
@@ -1050,7 +1050,7 @@ void sub_0807E818(u32 unk1) {
x = 0x78;
y = 0x50;
}
sub_08050110(x, y, unk1, gActiveScriptInfo.unk_08);
sub_08050110(x, y, fadeType, gActiveScriptInfo.unk_08);
}
void ScriptCommand_0807E858(Entity* entity, ScriptExecutionContext* context) {
@@ -1489,7 +1489,7 @@ void ScriptCommand_IncreaseMaxHealth(Entity* entity, ScriptExecutionContext* con
gSave.stats.health = gSave.stats.maxHealth;
}
void ScriptCommand_0807F034(Entity* entity, ScriptExecutionContext* context) {
void ScriptCommand_GivePlayerItem(Entity* entity, ScriptExecutionContext* context) {
u32 tmp = 0;
if (context->scriptInstructionPointer[1] == 0x3F) {
tmp = context->intVariable;