mirror of https://github.com/zeldaret/tmc.git
naming stuff
This commit is contained in:
parent
3e71687184
commit
9bef8b068c
|
|
@ -428,7 +428,7 @@
|
|||
.2byte \s
|
||||
.endm
|
||||
|
||||
.macro _0807E914 w
|
||||
.macro SetIntVariable w
|
||||
.2byte 0x0c4e
|
||||
.4byte \w
|
||||
.endm
|
||||
|
|
@ -502,20 +502,20 @@
|
|||
.2byte \s
|
||||
.endm
|
||||
|
||||
.macro _0807EAF0 a,b
|
||||
.macro TextboxNoOverlapFollowTable a,b
|
||||
.2byte 0x0c5d
|
||||
.2byte \a
|
||||
.2byte \b
|
||||
.endm
|
||||
|
||||
.macro _0807EAF0_3 a,b,c
|
||||
.macro TextboxNoOverlapFollowTable_3 a,b,c
|
||||
.2byte 0x105d
|
||||
.2byte \a
|
||||
.2byte \b
|
||||
.2byte \c
|
||||
.endm
|
||||
|
||||
.macro _0807EAF0_4 a,b,c,d
|
||||
.macro TextboxNoOverlapFollowTable_4 a,b,c,d
|
||||
.2byte 0x145d
|
||||
.2byte \a
|
||||
.2byte \b
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ script_08008E12:
|
|||
WaitForSomething2 0x00000002
|
||||
_0807F034 0x0047
|
||||
WaitPlayerAction8
|
||||
_0807E914 0x00000003
|
||||
SetIntVariable 0x00000003
|
||||
Call sub_0807F420
|
||||
_0807E8E4_0
|
||||
_0807E5F8 0x00000080
|
||||
|
|
|
|||
|
|
@ -18,10 +18,10 @@ script_080093BC:
|
|||
Call sub_0806D70C
|
||||
Jump script_08009376
|
||||
script_080093DA:
|
||||
_0807E914 0x00001d05
|
||||
SetIntVariable 0x00001d05
|
||||
CheckLocalFlag 0x00ad
|
||||
JumpIf script_080093EE
|
||||
_0807E914 0x00001d04
|
||||
SetIntVariable 0x00001d04
|
||||
script_080093EE:
|
||||
TextboxNoOverlapVar
|
||||
_0807EA94
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ script_0800954E:
|
|||
Call sub_08067314
|
||||
_0807EF80 0x000a
|
||||
_0807EB44 0x0004
|
||||
_0807E914 0x00000000
|
||||
SetIntVariable 0x00000000
|
||||
Call sub_080672B0
|
||||
EndBlock
|
||||
script_08009592:
|
||||
|
|
@ -49,14 +49,14 @@ script_08009592:
|
|||
JumpIfNot script_08009592
|
||||
_0807E864
|
||||
_0807EB74
|
||||
_0807E914 0x00000004
|
||||
SetIntVariable 0x00000004
|
||||
Call sub_080672B0
|
||||
Call sub_080672C8
|
||||
_0807EA94
|
||||
Wait 0x000f
|
||||
_0807E878
|
||||
_0807EB44 0x0004
|
||||
_0807E914 0x00000000
|
||||
SetIntVariable 0x00000000
|
||||
Call sub_080672B0
|
||||
Jump script_08009592
|
||||
.short 0x0000
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
SCRIPT_START script_08009ECC
|
||||
BeginBlock
|
||||
_0807E914 0x00000002
|
||||
SetIntVariable 0x00000002
|
||||
_0807EF80 0x0001
|
||||
EndBlock
|
||||
WaitForSomething2 0x00000004
|
||||
BeginBlock
|
||||
_0807E914 0x00000003
|
||||
SetIntVariable 0x00000003
|
||||
_0807EF80 0x0001
|
||||
EndBlock
|
||||
SCRIPT_END
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
SCRIPT_START script_08009EF0
|
||||
BeginBlock
|
||||
_0807E914 0x00000000
|
||||
SetIntVariable 0x00000000
|
||||
_0807EF80 0x0001
|
||||
EndBlock
|
||||
WaitForSomething2 0x00000004
|
||||
BeginBlock
|
||||
_0807E914 0x00000001
|
||||
SetIntVariable 0x00000001
|
||||
_0807EF80 0x0001
|
||||
EndBlock
|
||||
SCRIPT_END
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ SCRIPT_START script_0800B3A4
|
|||
SetEntityNonPlanarMovement 0x0120
|
||||
_0807EB44 0x0004
|
||||
_0807E908 0x0002
|
||||
_0807E914 0x0000200a
|
||||
SetIntVariable 0x0000200a
|
||||
EndBlock
|
||||
script_0800B3C4:
|
||||
_0807EDD4 0x0158, 0x0290
|
||||
|
|
|
|||
|
|
@ -202,7 +202,7 @@ script_0800C7C0:
|
|||
_0807EB8C
|
||||
TextboxNoOverlapFollow 0x1132
|
||||
_0807EA94
|
||||
_0807E914 0x00000103
|
||||
SetIntVariable 0x00000103
|
||||
Call sub_0807F420
|
||||
TextboxNoOverlapFollow 0x1133
|
||||
_0807EA94
|
||||
|
|
@ -250,7 +250,7 @@ script_0800C87C:
|
|||
_0807E864
|
||||
Call sub_0807DF28
|
||||
_0807EB74
|
||||
_0807E914 0x00000008
|
||||
SetIntVariable 0x00000008
|
||||
Call sub_0807F3D8
|
||||
TextboxNoOverlapFollow 0x1136
|
||||
_0807EA94
|
||||
|
|
|
|||
|
|
@ -210,7 +210,7 @@ script_0800CFFA:
|
|||
CheckInventory1 0x0002
|
||||
JumpIfNot script_0800D032
|
||||
_0807EB74
|
||||
_0807E914 0x00000000
|
||||
SetIntVariable 0x00000000
|
||||
Call sub_0806C028
|
||||
TextboxNoOverlap 0x1219
|
||||
Jump script_0800D17C
|
||||
|
|
@ -220,14 +220,14 @@ script_0800D032:
|
|||
StartPlayerScript script_0800D190
|
||||
WaitForSomething2 0x00000008
|
||||
_0807EB74
|
||||
_0807E914 0x00000000
|
||||
SetIntVariable 0x00000000
|
||||
Call sub_0806C028
|
||||
TextboxNoOverlapFollowPos 0x125c, 0x0002
|
||||
_0807EA94
|
||||
StartPlayerScript script_0800D1B4
|
||||
WaitForSomething2 0x00000008
|
||||
_0807EB44 0x0002
|
||||
_0807E914 0x00000000
|
||||
SetIntVariable 0x00000000
|
||||
Call sub_0806C028
|
||||
Wait 0x000f
|
||||
_0807E5F8 0x00000020
|
||||
|
|
@ -248,14 +248,14 @@ script_0800D0A8:
|
|||
_0807E5F8 0x00000001
|
||||
WaitForSomething2 0x00000004
|
||||
_0807EB74
|
||||
_0807E914 0x00000000
|
||||
SetIntVariable 0x00000000
|
||||
Call sub_0806C028
|
||||
TextboxNoOverlapFollowPos 0x123d, 0x0002
|
||||
_0807EA94
|
||||
StartPlayerScript script_0800D1B4
|
||||
WaitForSomething2 0x00000008
|
||||
_0807EB44 0x0002
|
||||
_0807E914 0x00000000
|
||||
SetIntVariable 0x00000000
|
||||
Call sub_0806C028
|
||||
SoundReq 0x00cd
|
||||
Call sub_08068964
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ script_0800D31E:
|
|||
EndBlock
|
||||
_0807E864
|
||||
_0807EB74
|
||||
_0807E914 0x00000000
|
||||
SetIntVariable 0x00000000
|
||||
Call sub_0806C028
|
||||
TextboxNoOverlapFollow 0x1219
|
||||
_0807EA94
|
||||
|
|
@ -99,7 +99,7 @@ script_0800D3B2:
|
|||
_0807EDD4 0x00a0, 0x0130
|
||||
_0807EB44 0x0006
|
||||
_0807E930 0x0003
|
||||
_0807E914 0x00000004
|
||||
SetIntVariable 0x00000004
|
||||
Call sub_080681D8
|
||||
SoundReq 0x00cd
|
||||
Wait 0x001e
|
||||
|
|
|
|||
|
|
@ -6,35 +6,35 @@ SCRIPT_START script_0800D414
|
|||
EndBlock
|
||||
script_0800D426:
|
||||
_0807EB44 0x0002
|
||||
_0807E914 0x00000000
|
||||
SetIntVariable 0x00000000
|
||||
Call sub_0806AF60
|
||||
Wait 0x0014
|
||||
_0807EB44 0x0004
|
||||
_0807E914 0x00000000
|
||||
SetIntVariable 0x00000000
|
||||
Call sub_0806AF60
|
||||
Wait 0x0014
|
||||
_0807EB44 0x0006
|
||||
_0807E914 0x00000000
|
||||
SetIntVariable 0x00000000
|
||||
Call sub_0806AF60
|
||||
Wait 0x0014
|
||||
_0807EB44 0x0006
|
||||
_0807E914 0x00000004
|
||||
SetIntVariable 0x00000004
|
||||
Call sub_0806AF60
|
||||
_0807EDD4 0x00a8, 0x01e8
|
||||
_0807EB44 0x0006
|
||||
_0807E914 0x00000000
|
||||
SetIntVariable 0x00000000
|
||||
Call sub_0806AF60
|
||||
Wait 0x0014
|
||||
_0807EB44 0x0004
|
||||
_0807E914 0x00000000
|
||||
SetIntVariable 0x00000000
|
||||
Call sub_0806AF60
|
||||
Wait 0x0014
|
||||
_0807EB44 0x0002
|
||||
_0807E914 0x00000000
|
||||
SetIntVariable 0x00000000
|
||||
Call sub_0806AF60
|
||||
Wait 0x0014
|
||||
_0807EB44 0x0002
|
||||
_0807E914 0x00000004
|
||||
SetIntVariable 0x00000004
|
||||
Call sub_0806AF60
|
||||
_0807EDD4 0x0228, 0x01e8
|
||||
Jump script_0800D426
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ SCRIPT_START script_0800D874
|
|||
BeginBlock
|
||||
Call sub_0807F934
|
||||
_0807EF80 0x0008
|
||||
_0807E914 0x00000001
|
||||
SetIntVariable 0x00000001
|
||||
Call sub_0806DA04
|
||||
EndBlock
|
||||
script_0800D88E:
|
||||
|
|
@ -45,7 +45,7 @@ script_0800D8F4:
|
|||
_0807EB28 0x1325
|
||||
_0807EA94
|
||||
SoundReq 0x0113
|
||||
_0807E914 0x00000000
|
||||
SetIntVariable 0x00000000
|
||||
Call sub_0806DA1C
|
||||
_0807E878
|
||||
Call sub_0807DF50
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ script_0800D962:
|
|||
Wait 0x003c
|
||||
SetLocalFlag 0x0032
|
||||
SoundReq 0x0113
|
||||
_0807E914 0x00000001
|
||||
SetIntVariable 0x00000001
|
||||
Call sub_0806DA1C
|
||||
Call sub_0807DF50
|
||||
_0807E878
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ script_0800E5D8:
|
|||
JumpIfNot script_0800E5D8
|
||||
_0807E864
|
||||
Wait 0x003c
|
||||
_0807E914 0x00000905
|
||||
SetIntVariable 0x00000905
|
||||
Call sub_0807F420
|
||||
SetRoomFlag 0x0001
|
||||
Wait 0x001e
|
||||
|
|
|
|||
|
|
@ -261,7 +261,7 @@ script_0800EDB6:
|
|||
_0807E5F8 0x00000020
|
||||
TextboxNoOverlapFollow 0x4c09
|
||||
_0807EA94
|
||||
_0807E914 0x00000503
|
||||
SetIntVariable 0x00000503
|
||||
Call sub_0807F420
|
||||
_0807E5F8 0x00000040
|
||||
Call sub_0807DF50
|
||||
|
|
@ -311,7 +311,7 @@ script_0800EE76:
|
|||
_0807E5F8 0x00000004
|
||||
TextboxNoOverlapFollow 0x4c09
|
||||
_0807EA94
|
||||
_0807E914 0x00000503
|
||||
SetIntVariable 0x00000503
|
||||
Call sub_0807F420
|
||||
_0807E5F8 0x00000008
|
||||
Call sub_0807DF50
|
||||
|
|
|
|||
|
|
@ -152,11 +152,11 @@ script_0800F72C:
|
|||
Call sub_0806DC3C
|
||||
Call sub_080791BC
|
||||
CallWithArg sub_0807F244, 0x0000000d
|
||||
_0807E914 0x000000ff
|
||||
SetIntVariable 0x000000ff
|
||||
Call sub_0807F5B0
|
||||
CallWithArg sub_0807F29C, 0x080049d6
|
||||
Wait 0x00b7
|
||||
_0807E914 0x00000000
|
||||
SetIntVariable 0x00000000
|
||||
Call sub_0807F5B0
|
||||
TextboxNoOverlapFollowPos 0x102c, 0x0000
|
||||
_0807EA94
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ script_08010410:
|
|||
_0807EB44 0x0004
|
||||
_0807EF80 0x0000
|
||||
_0807EF80 0x000a
|
||||
_0807E914 0x08064689
|
||||
SetIntVariable 0x08064689
|
||||
Call sub_08064644
|
||||
EndBlock
|
||||
script_08010446:
|
||||
|
|
@ -316,7 +316,7 @@ script_08010686:
|
|||
_0807EB74
|
||||
HasRoomItemForSale
|
||||
Call sub_0807F77C
|
||||
_0807EAF0 0x3c08, 0x3c09
|
||||
TextboxNoOverlapFollowTable 0x3c08, 0x3c09
|
||||
_0807EA94
|
||||
_0807E878
|
||||
_0807EB44 0x0004
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ script_08012368:
|
|||
SoundReq2 0xffff
|
||||
_0807EB28 0x1403
|
||||
_0807EA94
|
||||
_0807E914 0x00000203
|
||||
SetIntVariable 0x00000203
|
||||
Call sub_0807F420
|
||||
Call sub_0807DF50
|
||||
_0807E878
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ SCRIPT_START script_08012C68
|
|||
BeginBlock
|
||||
_0807E9D4
|
||||
_0807EF80 0x0008
|
||||
_0807E914 0x00000000
|
||||
SetIntVariable 0x00000000
|
||||
Call sub_0806DA04
|
||||
EndBlock
|
||||
script_08012C7E:
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ script_0801313C:
|
|||
_0807E878
|
||||
Jump script_08013128
|
||||
script_08013176:
|
||||
_0807E914 0x00000403
|
||||
SetIntVariable 0x00000403
|
||||
Call sub_0807F420
|
||||
_0807E878
|
||||
Jump script_08013128
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ SCRIPT_START script_080143C0
|
|||
_0807EA94
|
||||
_0807E3E8
|
||||
JumpIf script_080143FA
|
||||
_0807E914 0x00000002
|
||||
SetIntVariable 0x00000002
|
||||
Call sub_08065528
|
||||
Jump script_0801443E
|
||||
script_080143FA:
|
||||
|
|
@ -19,13 +19,13 @@ script_080143FA:
|
|||
TextboxNoOverlap 0x2c18
|
||||
_0807EA94
|
||||
Wait 0x000a
|
||||
_0807E914 0x00000000
|
||||
SetIntVariable 0x00000000
|
||||
Call sub_08065528
|
||||
_0807F034 0x0036
|
||||
WaitPlayerAction8
|
||||
TextboxNoOverlap 0x2c19
|
||||
_0807EA94
|
||||
_0807E914 0x00000303
|
||||
SetIntVariable 0x00000303
|
||||
Call sub_0807F420
|
||||
Wait 0x001e
|
||||
_0807EB8C
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ script_08014BF2:
|
|||
SetLocalFlag 0x0065
|
||||
TextboxNoOverlap 0x2f07
|
||||
_0807EA94
|
||||
_0807E914 0x00000064
|
||||
SetIntVariable 0x00000064
|
||||
_0807F034 0x003f
|
||||
WaitPlayerAction8
|
||||
Jump script_08014C22
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ script_08016146:
|
|||
JumpIfNot script_08016146
|
||||
_0807E864
|
||||
GetInventoryValue 0x0025
|
||||
_0807EAF0_4 0x2d03, 0x2d02, 0x2d02, 0x2d02
|
||||
TextboxNoOverlapFollowTable_4 0x2d03, 0x2d02, 0x2d02, 0x2d02
|
||||
_0807E3E8
|
||||
JumpIfNot script_0801618A
|
||||
_0807E48C 0x0020
|
||||
|
|
@ -85,7 +85,7 @@ script_0801619A:
|
|||
JumpIfNot script_0801619A
|
||||
_0807E864
|
||||
GetInventoryValue 0x0024
|
||||
_0807EAF0_4 0x2d05, 0x2d04, 0x2d04, 0x2d04
|
||||
TextboxNoOverlapFollowTable_4 0x2d05, 0x2d04, 0x2d04, 0x2d04
|
||||
_0807E3E8
|
||||
JumpIfNot script_080161E2
|
||||
_0807E48C 0x0020
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ SCRIPT_START script_08016482
|
|||
_0807E8E4_2
|
||||
_0807E8E4_3
|
||||
_0807E908 0x0004
|
||||
_0807E914 0x00000000
|
||||
SetIntVariable 0x00000000
|
||||
_0807E924
|
||||
_0807E930 0x0000
|
||||
_0807E944
|
||||
|
|
@ -32,7 +32,7 @@ SCRIPT_START script_08016482
|
|||
TextboxNoOverlapFollow 0x0601
|
||||
TextboxNoOverlap 0x0601
|
||||
TextboxNoOverlapFollowPos_1 0x0601
|
||||
_0807EAF0_3 0x0601, 0x0602, 0x0603
|
||||
TextboxNoOverlapFollowTable_3 0x0601, 0x0602, 0x0603
|
||||
TextboxNoOverlapVar
|
||||
_0807EB28 0x0602
|
||||
_0807EB38
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
typedef struct ScriptExecutionContext {
|
||||
u16* scriptInstructionPointer;
|
||||
u32 unk_04;
|
||||
u32 intVariable;
|
||||
u32 unk_08;
|
||||
u8 unk_0C[0x4]; // unused
|
||||
u16 wait;
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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?
|
||||
|
|
|
|||
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
48
src/script.c
48
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) {
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ commands = [
|
|||
{'fun': 'ScriptCommand_0807E8E4_2', 'params': ''}, # duplicate
|
||||
{'fun': 'ScriptCommand_0807E8E4_3', 'params': ''}, # duplicate
|
||||
{'fun': 'ScriptCommand_0807E908', 'params': 's'},
|
||||
{'fun': 'ScriptCommand_0807E914', 'params': 'w'},
|
||||
{'fun': 'ScriptCommandSetIntVariable', 'params': 'w'},
|
||||
{'fun': 'ScriptCommand_0807E924', 'params': ''},
|
||||
{'fun': 'ScriptCommand_0807E930', 'params': 's'},
|
||||
{'fun': 'ScriptCommand_0807E944', 'params': ''},
|
||||
|
|
@ -100,7 +100,7 @@ commands = [
|
|||
{'fun': 'ScriptCommand_TextboxNoOverlapFollow', 'params': 's'},
|
||||
{'fun': 'ScriptCommand_TextboxNoOverlap', 'params': 's'},
|
||||
{'fun': 'ScriptCommand_TextboxNoOverlapFollowPos', 'params': ['ss', 's']},
|
||||
{'fun': 'ScriptCommand_0807EAF0', 'params': ['ss', 'sss', 'ssss']},
|
||||
{'fun': 'ScriptCommandTextboxNoOverlapFollowTable', 'params': ['ss', 'sss', 'ssss']},
|
||||
{'fun': 'ScriptCommand_TextboxNoOverlapVar', 'params': ''},
|
||||
{'fun': 'ScriptCommand_0807EB28', 'params': 's'},
|
||||
{'fun': 'ScriptCommand_0807EB38', 'params': ''},
|
||||
|
|
|
|||
Loading…
Reference in New Issue