naming stuff

This commit is contained in:
Henny022p
2021-03-08 00:52:06 +01:00
parent 3e71687184
commit 9bef8b068c
36 changed files with 93 additions and 93 deletions
+1 -1
View File
@@ -149,7 +149,7 @@ void sub_0806346C(Entity* this) {
}
void sub_080634E4(Entity* this, ScriptExecutionContext* context) {
context->unk_04 = this->type2;
context->intVariable = this->type2;
}
void sub_080634EC(Entity* this) {
+1 -1
View File
@@ -70,5 +70,5 @@ void Carpenter_Head(Entity* this) {
}
void sub_080672B0(Entity* this, ScriptExecutionContext* context) {
InitializeAnimation(this, context->unk_04 + (this->animationState >> 1) + this->type * 8);
InitializeAnimation(this, context->intVariable + (this->animationState >> 1) + this->type * 8);
}
+2 -2
View File
@@ -108,12 +108,12 @@ void NPC4E(Entity* this) {
void sub_0806DA04(Entity* this, ScriptExecutionContext* context) {
// TODO gUnk_0811415C should be a gUnk_0810C89C_struct[], but then a lot of bytes everywhere are wrong?
gUnk_0810C89C_struct* a = (gUnk_0810C89C_struct*)&(
(gUnk_0810C89C_struct*)gUnk_0811415C)[context->unk_04]; // cast necessary to no longer make it a const* ?
(gUnk_0810C89C_struct*)gUnk_0811415C)[context->intVariable]; // cast necessary to no longer make it a const* ?
sub_08078850(this, 1, a->unk_04, a);
}
void sub_0806DA1C(Entity* this, ScriptExecutionContext* context) {
sub_0808091C((ScreenTransitionData*)(gUnk_081141A4)[context->unk_04], (u32)(gUnk_081141E4[context->unk_04]));
sub_0808091C((ScreenTransitionData*)(gUnk_081141A4)[context->intVariable], (u32)(gUnk_081141E4[context->intVariable]));
}
// Returns the kinstone id?
+1 -1
View File
@@ -225,7 +225,7 @@ void sub_080602BC(Entity* this) {
}
void sub_0806030C(Entity* this, ScriptExecutionContext* context) {
ModBombs(context->unk_04);
ModBombs(context->intVariable);
}
void sub_08060318() {
+4 -4
View File
@@ -219,15 +219,15 @@ void sub_08064044() {
}
void sub_08064050(Entity* this, ScriptExecutionContext* context) {
context->unk_04 = 0;
context->intVariable = 0;
switch (this->type2) {
case 0x11:
context->unk_04 = 1;
context->intVariable = 1;
break;
case 0x12:
context->unk_04 = 2;
context->intVariable = 2;
break;
case 0x13:
context->unk_04 = 3;
context->intVariable = 3;
}
}
+1 -1
View File
@@ -45,7 +45,7 @@ void sub_0806C280() {
}
void sub_0806C2A0(Entity* this, ScriptExecutionContext* context) {
switch (context->unk_04) {
switch (context->intVariable) {
case 0:
DoFade(0xd, 4);
break;
+1 -1
View File
@@ -224,7 +224,7 @@ void sub_0806AEE4(Entity* this) {
}
void sub_0806AF60(Entity* this, ScriptExecutionContext* context) {
InitializeAnimation(this, context->unk_04 + (this->animationState / 2));
InitializeAnimation(this, context->intVariable + (this->animationState / 2));
}
void sub_0806AF70(Entity* this, ScriptExecutionContext* context) {
+1 -1
View File
@@ -257,7 +257,7 @@ void sub_08061FB0(Entity* this) {
void sub_08061FB8(Entity* this, ScriptExecutionContext* context) {
u8* temp = gUnk_0810B748;
sub_08078850(this, 1, temp[context->unk_04], &gUnk_0810B740[context->unk_04]);
sub_08078850(this, 1, temp[context->intVariable], &gUnk_0810B740[context->intVariable]);
}
void sub_08061FD8(Entity* this) {
+1 -1
View File
@@ -540,7 +540,7 @@ void sub_08087424(Entity* this, ScriptExecutionContext* context) {
sub_0805E3A0(ent, 2);
}
switch (context->unk_04) {
switch (context->intVariable) {
case 0:
gSave.stats.arrowCount = 0;
break;
+24 -24
View File
@@ -88,7 +88,7 @@ void ScriptCommand_StartPlayerScript(Entity* entity, ScriptExecutionContext* con
void ScriptCommand_0807E8D4(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_0807E8E4(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_0807E908(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_0807E914(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_SetIntVariable(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_0807E924(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_0807E930(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_0807E944(Entity* entity, ScriptExecutionContext* context);
@@ -103,7 +103,7 @@ void ScriptCommand_0807EA94(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_TextboxNoOverlapFollow(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_TextboxNoOverlap(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_TextboxNoOverlapFollowPos(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_0807EAF0(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_TextboxNoOverlapFollowTable(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_TextboxNoOverlapVar(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_0807EB28(Entity* entity, ScriptExecutionContext* context);
void ScriptCommand_0807EB38(Entity* entity, ScriptExecutionContext* context);
@@ -235,7 +235,7 @@ const ScriptCommand gScriptCommands[] = { ScriptCommandNop,
ScriptCommand_0807E8E4,
ScriptCommand_0807E8E4,
ScriptCommand_0807E908,
ScriptCommand_0807E914,
ScriptCommand_SetIntVariable,
ScriptCommand_0807E924,
ScriptCommand_0807E930,
ScriptCommand_0807E944,
@@ -250,7 +250,7 @@ const ScriptCommand gScriptCommands[] = { ScriptCommandNop,
ScriptCommand_TextboxNoOverlapFollow,
ScriptCommand_TextboxNoOverlap,
ScriptCommand_TextboxNoOverlapFollowPos,
ScriptCommand_0807EAF0,
ScriptCommand_TextboxNoOverlapFollowTable,
ScriptCommand_TextboxNoOverlapVar,
ScriptCommand_0807EB28,
ScriptCommand_0807EB38,
@@ -658,8 +658,8 @@ void ScriptCommand_JumpIfNot(Entity* entity, ScriptExecutionContext* context) {
}
void ScriptCommand_JumpTable(Entity* entity, ScriptExecutionContext* context) {
if (gActiveScriptInfo.commandSize > context->unk_04) {
context->scriptInstructionPointer += context->unk_04;
if (gActiveScriptInfo.commandSize > context->intVariable) {
context->scriptInstructionPointer += context->intVariable;
ScriptCommand_Jump(entity, context);
}
}
@@ -683,8 +683,8 @@ void ScriptCommand_JumpAbsoluteIfNot(Entity* entity, ScriptExecutionContext* con
}
void ScriptCommand_JumpAbsoluteTable(Entity* entity, ScriptExecutionContext* context) {
if (gActiveScriptInfo.commandSize > (context->unk_04 << 1) + 1) {
context->scriptInstructionPointer += context->unk_04 << 1;
if (gActiveScriptInfo.commandSize > (context->intVariable << 1) + 1) {
context->scriptInstructionPointer += context->intVariable << 1;
ScriptCommand_JumpAbsolute(entity, context);
}
}
@@ -693,10 +693,10 @@ void ScriptCommand_Call(Entity* entity, ScriptExecutionContext* context) {
((ScriptCommand)GetNextScriptCommandWordAfterCommandMetadata(context->scriptInstructionPointer))(entity, context);
}
// the called function can read an argument from context->unk_04
// the called function can read an argument from context->intVariable
void ScriptCommand_CallWithArg(Entity* entity, ScriptExecutionContext* context) {
ScriptCommand tmp = (ScriptCommand)GetNextScriptCommandWordAfterCommandMetadata(context->scriptInstructionPointer);
context->unk_04 = GetNextScriptCommandWord(context->scriptInstructionPointer + 3);
context->intVariable = GetNextScriptCommandWord(context->scriptInstructionPointer + 3);
tmp(entity, context);
}
@@ -863,19 +863,19 @@ void ScriptCommand_HasRoomItemForSale(Entity* entity, ScriptExecutionContext* co
}
void ScriptCommand_0807E4CC(Entity* entity, ScriptExecutionContext* context) {
context->condition = !!(context->unk_04 & context->scriptInstructionPointer[1]);
context->condition = !!(context->intVariable & context->scriptInstructionPointer[1]);
gActiveScriptInfo.flags |= 1;
}
void ScriptCommand_0807E4EC(Entity* entity, ScriptExecutionContext* context) {
u32 tmp = context->scriptInstructionPointer[1];
context->condition = tmp == (tmp & context->unk_04);
context->condition = tmp == (tmp & context->intVariable);
gActiveScriptInfo.flags |= 1;
}
void ScriptCommand_0807E514(Entity* entity, ScriptExecutionContext* context) {
u32 tmp = context->scriptInstructionPointer[1];
context->condition = tmp == context->unk_04;
context->condition = tmp == context->intVariable;
gActiveScriptInfo.flags |= 1;
}
@@ -1088,12 +1088,12 @@ void ScriptCommand_0807E908(Entity* entity, ScriptExecutionContext* context) {
entity->previousActionFlag = 0;
}
void ScriptCommand_0807E914(Entity* entity, ScriptExecutionContext* context) {
context->unk_04 = GetNextScriptCommandWordAfterCommandMetadata(context->scriptInstructionPointer);
void ScriptCommand_SetIntVariable(Entity* entity, ScriptExecutionContext* context) {
context->intVariable = GetNextScriptCommandWordAfterCommandMetadata(context->scriptInstructionPointer);
}
void ScriptCommand_0807E924(Entity* entity, ScriptExecutionContext* context) {
context->unk_04 = entity->frames.all;
context->intVariable = entity->frames.all;
entity->frames.all = 0;
}
@@ -1205,9 +1205,9 @@ void ScriptCommand_TextboxNoOverlapFollowPos(Entity* entity, ScriptExecutionCont
gTextBox.textWindowPosY = context->scriptInstructionPointer[2];
}
void ScriptCommand_0807EAF0(Entity* entity, ScriptExecutionContext* context) {
if (gActiveScriptInfo.commandSize > context->unk_04) {
u16* tmp = context->scriptInstructionPointer + context->unk_04;
void ScriptCommand_TextboxNoOverlapFollowTable(Entity* entity, ScriptExecutionContext* context) {
if (gActiveScriptInfo.commandSize > context->intVariable) {
u16* tmp = context->scriptInstructionPointer + context->intVariable;
TextboxNoOverlapFollow(tmp[1]);
} else {
TextboxNoOverlapFollow(0);
@@ -1215,7 +1215,7 @@ void ScriptCommand_0807EAF0(Entity* entity, ScriptExecutionContext* context) {
}
void ScriptCommand_TextboxNoOverlapVar(Entity* entity, ScriptExecutionContext* context) {
TextboxNoOverlap(context->unk_04, entity);
TextboxNoOverlap(context->intVariable, entity);
}
void ScriptCommand_0807EB28(Entity* entity, ScriptExecutionContext* context) {
@@ -1223,7 +1223,7 @@ void ScriptCommand_0807EB28(Entity* entity, ScriptExecutionContext* context) {
}
void ScriptCommand_0807EB38(Entity* entity, ScriptExecutionContext* context) {
context->unk_04 = gUnk_02000040.unk_01;
context->intVariable = gUnk_02000040.unk_01;
}
void ScriptCommand_0807EB44(Entity* entity, ScriptExecutionContext* context) {
@@ -1483,7 +1483,7 @@ void ScriptCommand_IncreaseMaxHealth(Entity* entity, ScriptExecutionContext* con
void ScriptCommand_0807F034(Entity* entity, ScriptExecutionContext* context) {
u32 tmp = 0;
if (context->scriptInstructionPointer[1] == 0x3F) {
tmp = context->unk_04;
tmp = context->intVariable;
}
sub_080A7C18(context->scriptInstructionPointer[1], tmp, 0);
}
@@ -1493,8 +1493,8 @@ void ScriptCommand_0807F050(Entity* entity, ScriptExecutionContext* context) {
}
void ScriptCommand_GetInventoryValue(Entity* entity, ScriptExecutionContext* context) {
context->unk_04 = GetInventoryValue(context->scriptInstructionPointer[1]);
context->condition = context->unk_04 != 0;
context->intVariable = GetInventoryValue(context->scriptInstructionPointer[1]);
context->condition = context->intVariable != 0;
}
void ScriptCommand_0807F078(Entity* entity, ScriptExecutionContext* context) {