summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHenny022p <info@henny022.de>2021-03-08 00:52:06 +0100
committerHenny022p <info@henny022.de>2021-03-08 00:52:06 +0100
commit9bef8b068c7b59c2e1f71f5852bb671e41c48734 (patch)
tree7f0747474c08219b666834f26b369ba7523c1be4 /src
parent3e71687184aa734806197f9363c352feb914ba3a (diff)
naming stuff
Diffstat (limited to 'src')
-rw-r--r--src/npc/beedle.c2
-rw-r--r--src/npc/carpenter.c2
-rw-r--r--src/npc/ezloCap.c4
-rw-r--r--src/npc/forestMinish.c2
-rw-r--r--src/npc/guard.c8
-rw-r--r--src/npc/simon.c2
-rw-r--r--src/npc/townMinish.c2
-rw-r--r--src/npc/townsperson.c2
-rw-r--r--src/object/greatFairy.c2
-rw-r--r--src/script.c48
10 files changed, 37 insertions, 37 deletions
diff --git a/src/npc/beedle.c b/src/npc/beedle.c
index 0e9a95ff..db962461 100644
--- a/src/npc/beedle.c
+++ b/src/npc/beedle.c
@@ -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) {
diff --git a/src/npc/carpenter.c b/src/npc/carpenter.c
index 1c6392e4..b49e67d9 100644
--- a/src/npc/carpenter.c
+++ b/src/npc/carpenter.c
@@ -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);
}
diff --git a/src/npc/ezloCap.c b/src/npc/ezloCap.c
index d4c59e30..ee4ef053 100644
--- a/src/npc/ezloCap.c
+++ b/src/npc/ezloCap.c
@@ -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?
diff --git a/src/npc/forestMinish.c b/src/npc/forestMinish.c
index 5f1686c4..b846d29e 100644
--- a/src/npc/forestMinish.c
+++ b/src/npc/forestMinish.c
@@ -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() {
diff --git a/src/npc/guard.c b/src/npc/guard.c
index 3a43c14c..1b3ba9b3 100644
--- a/src/npc/guard.c
+++ b/src/npc/guard.c
@@ -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;
}
}
diff --git a/src/npc/simon.c b/src/npc/simon.c
index 2741f30a..c94ec167 100644
--- a/src/npc/simon.c
+++ b/src/npc/simon.c
@@ -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;
diff --git a/src/npc/townMinish.c b/src/npc/townMinish.c
index 1aeca5b2..ff96b1fb 100644
--- a/src/npc/townMinish.c
+++ b/src/npc/townMinish.c
@@ -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) {
diff --git a/src/npc/townsperson.c b/src/npc/townsperson.c
index 9b097489..76fea004 100644
--- a/src/npc/townsperson.c
+++ b/src/npc/townsperson.c
@@ -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) {
diff --git a/src/object/greatFairy.c b/src/object/greatFairy.c
index c52456ab..e3005ea2 100644
--- a/src/object/greatFairy.c
+++ b/src/object/greatFairy.c
@@ -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;
diff --git a/src/script.c b/src/script.c
index 7e316da8..1f8e583e 100644
--- a/src/script.c
+++ b/src/script.c
@@ -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) {