mirror of
https://github.com/zeldaret/tmc
synced 2026-08-04 01:03:49 -04:00
Split off second script
This commit is contained in:
+1
-1
@@ -52,7 +52,7 @@ typedef struct {
|
||||
u8 unk_20[2];
|
||||
u16 field_22;
|
||||
} paramStruct;
|
||||
|
||||
// This is a ScriptExecutionContext TODO
|
||||
void sub_0806D8A0(Entity* this, paramStruct* param_2) {
|
||||
s32 xOffset;
|
||||
s32 yOffset;
|
||||
|
||||
@@ -647,6 +647,7 @@ void sub_0807E014(Entity* unk1, ScriptExecutionContext* unk2) {
|
||||
gUnk_02033280.continueScriptExecutionFlags &= ~2;
|
||||
}
|
||||
|
||||
// Jump by offset
|
||||
void sub_0807E024(Entity* unk1, ScriptExecutionContext* unk2) {
|
||||
s16 tmp;
|
||||
// get metadata -> tmp
|
||||
@@ -677,6 +678,7 @@ void sub_0807E078(Entity* unk1, ScriptExecutionContext* unk2) {
|
||||
}
|
||||
}
|
||||
|
||||
// repoint the execution somewhere else
|
||||
void sub_0807E0A0(Entity* unk1, ScriptExecutionContext* unk2) {
|
||||
unk2->unk_00.raw = (u16*)GetNextScriptCommandWordAfterCommandMetadata(unk2->unk_00.raw);
|
||||
gUnk_02033280.unk_06 = 0;
|
||||
@@ -1483,10 +1485,12 @@ void sub_0807EF3C(Entity* unk1, ScriptExecutionContext* unk2) {
|
||||
gUnk_02033280.unk_06 = 0;
|
||||
}
|
||||
|
||||
// set one bit in unk_08
|
||||
void sub_0807EF80(Entity* unk1, ScriptExecutionContext* unk2) {
|
||||
unk2->unk_08 |= 1 << unk2->unk_00.raw[1];
|
||||
}
|
||||
|
||||
// set one bit in unk_08
|
||||
void sub_0807EF90(Entity* unk1, ScriptExecutionContext* unk2) {
|
||||
unk2->unk_08 |= 1 << unk2->unk_00.raw[1];
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,33 +1,35 @@
|
||||
// macro helpers
|
||||
#define WORD_TO_SHORTS(word, b) word, b
|
||||
#define WORD_TO_SHORTS(word) (unsigned short)word & 0x00ff,(unsigned short)word >> 16,
|
||||
|
||||
// script commands
|
||||
#define START_EXECUTING_SCRIPTS() 0x0401,
|
||||
#define STOP_EXECUTING_SCRIPTS() 0x0402,
|
||||
#define CHECK_KINSTONE_FUSED(id) 0x081d, id,
|
||||
#define JUMP_IF_TRUE(offset) 0x0804, offset,
|
||||
#define sub_0807E6AC(word, b) 0x0c33, WORD_TO_SHORTS(word, b),
|
||||
#define sub_0807E6AC(word) 0x0c33, WORD_TO_SHORTS(word)
|
||||
#define sub_0807EF80(param) 0x0879, param,
|
||||
#define sub_0807E680(param) 0x0831, param,
|
||||
#define sub_0807EBC0(param) 0x0867, param,
|
||||
#define sub_0807ECF4(param) 0x0871, param,
|
||||
#define sub_0807E680(param) 0x0831, param,
|
||||
#define sub_0807EF80(param) 0x0879, param,
|
||||
#define sub_0807E5F8(a, b) 0x0c28, a, b,
|
||||
#define sub_0807E5F8(word) 0x0c28, WORD_TO_SHORTS(word)
|
||||
|
||||
|
||||
const unsigned short gUnk_08016030[] = {
|
||||
// clang-format off
|
||||
START_EXECUTING_SCRIPTS()
|
||||
CHECK_KINSTONE_FUSED(9)
|
||||
JUMP_IF_TRUE(0x2a)
|
||||
STOP_EXECUTING_SCRIPTS()
|
||||
sub_0807E6AC(0x0001,0x0000)
|
||||
sub_0807E6AC(0x00000001)
|
||||
sub_0807EF80(0x0010)
|
||||
sub_0807E680(0x003c)
|
||||
sub_0807EBC0(0x0020)
|
||||
sub_0807ECF4(0x0080)
|
||||
sub_0807E680(0x001e)
|
||||
sub_0807EF80(0x0010)
|
||||
sub_0807E5F8(0x0008, 0x0000)
|
||||
sub_0807E5F8(0x0000008)
|
||||
// clang-format on
|
||||
0xffff,
|
||||
0x0c6a,
|
||||
|
||||
Reference in New Issue
Block a user