Readd void parameters

This commit is contained in:
octorock 2021-03-08 19:48:38 +01:00
parent 5e2af32bb1
commit a352ff9722
39 changed files with 35 additions and 60 deletions

View File

@ -1,5 +1,4 @@
SCRIPT_START script_0800939A
script_0800939A:
CheckLocalFlag 0x00ae
JumpIf script_0800943E
CheckInventory1 0x000d

View File

@ -1,5 +1,4 @@
SCRIPT_START script_080095F2
script_080095F2:
CheckEntityInteractType
JumpIfNot script_080095DE
_0807E864

View File

@ -1,5 +1,4 @@
SCRIPT_START script_08009E4E
script_08009E4E:
_0807E878
DoPostScriptAction 0x0006
SCRIPT_END

View File

@ -1,5 +1,4 @@
SCRIPT_START script_0800B7FC
script_0800B7FC:
CallWithArg sub_0807F4F8, 0x00000090
CallWithArg sub_0807F464, 0x00000078
Jump script_0800B7EE

View File

@ -1,5 +1,4 @@
SCRIPT_START script_0800D242
script_0800D242:
DoPostScriptAction 0x0007
_0807E930 0x0003
SCRIPT_END

View File

@ -1,5 +1,4 @@
SCRIPT_START script_0800D24C
script_0800D24C:
DoPostScriptAction 0x0006
SCRIPT_END
.short 0x0000

View File

@ -1,5 +1,4 @@
SCRIPT_START script_0800D698
script_0800D698:
_0807EEB4
_0807F0B4 0x0004
CameraTargetPlayer

View File

@ -1,5 +1,4 @@
SCRIPT_START script_0800E5D6
script_0800E5D6:
EndBlock
script_0800E5D8:
CheckLocalFlag 0x0086

View File

@ -1,5 +1,4 @@
SCRIPT_START script_0800E8A4
script_0800E8A4:
BeginBlock
TextboxNoOverlapFollow 0x4504
CallWithArg sub_0807F854, 0x000100c8

View File

@ -1,5 +1,4 @@
SCRIPT_START script_0800E8D6
script_0800E8D6:
BeginBlock
TextboxNoOverlapFollow 0x4503
CallWithArg sub_0807F854, 0x00010032

View File

@ -1,5 +1,4 @@
SCRIPT_START script_0800E908
script_0800E908:
TextboxNoOverlapFollow 0x4507
Jump script_0800E914
script_0800E910:

View File

@ -1,5 +1,4 @@
SCRIPT_START script_08010964
script_08010964:
CheckPlayerInRegion2 0x0808
JumpIfNot script_08010964
_0807E864

View File

@ -1,5 +1,4 @@
SCRIPT_START script_080113AA
script_080113AA:
_0807E610 0x00002000
_0807E5F8 0x00004000
WaitForSomething2 0x00002000

View File

@ -1,5 +1,4 @@
SCRIPT_START script_08011442
script_08011442:
_0807E610 0x00008000
_0807E5F8 0x00010000
WaitForSomething2 0x00008000

View File

@ -1,5 +1,4 @@
SCRIPT_START script_08011508
script_08011508:
_0807E610 0x00020000
_0807E5F8 0x00040000
WaitForSomething2 0x00020000

View File

@ -1,5 +1,4 @@
SCRIPT_START script_08012CD8
script_08012CD8:
EndBlock
BeginBlock
_0807E564

View File

@ -1,5 +1,4 @@
SCRIPT_START script_08012D18
script_08012D18:
EndBlock
BeginBlock
CheckGlobalFlag 0x0014

View File

@ -1,5 +1,4 @@
SCRIPT_START script_08012D70
script_08012D70:
CheckPlayerInRegion 0x0088, 0x0048, 0x3030
JumpIfNot script_08012D70
_0807E864

View File

@ -1,5 +1,4 @@
SCRIPT_START script_08012F86
script_08012F86:
BeginBlock
CheckLocalFlag 0x0060
JumpIf script_08012FD2

View File

@ -1,5 +1,4 @@
SCRIPT_START script_0801319A
script_0801319A:
EndBlock
BeginBlock
CameraTargetEntity

View File

@ -1,5 +1,4 @@
SCRIPT_START script_08014248
script_08014248:
TestBit 0x00020000
JumpIf script_08014264
Wait 0x0008

View File

@ -1,5 +1,4 @@
SCRIPT_START script_080157AC
script_080157AC:
CheckPlayerInRegion 0x01f8, 0x0310, 0x2020
JumpIfNot script_080157AC
_0807E864

View File

@ -1,5 +1,4 @@
SCRIPT_START script_08015B34
script_08015B34:
EndBlock
BeginBlock
CheckLocalFlag 0x008b

View File

@ -1,5 +1,4 @@
SCRIPT_START script_08016062
script_08016062:
SetEntityPosition 0xfff0, 0x0000
SCRIPT_END
.short 0x0000

View File

@ -1,5 +1,4 @@
SCRIPT_START script_0801609E
script_0801609E:
SetEntityPosition 0x0010, 0x0000
SCRIPT_END
.short 0x0000

View File

@ -1,5 +1,4 @@
SCRIPT_START script_08016384
script_08016384:
BeginBlock
EndBlock
Jump script_08016384

View File

@ -168,11 +168,11 @@ void sub_08054524(void) {
}
#endif
void sub_08054564() {
void sub_08054564(void) {
gRoomVars.filler[2] = 1;
}
void sub_08054570() {
void sub_08054570(void) {
gRoomVars.filler[2] = 0;
}

View File

@ -347,7 +347,7 @@ void sub_08068E90(Entity* this) {
*(u16*)&s->field_0xac = (1 << (gUnk_08111740[this->actionDelay] - 1)) | *(u16*)&s->field_0xac;
}
void sub_08068EB4() {
void sub_08068EB4(void) {
gPlayerState.field_0xab = 0;
}

View File

@ -19,14 +19,14 @@ void Emma(Entity* this) {
}
}
void sub_0806C578() {
void sub_0806C578(void) {
DoExitTransition(&gUnk_0813AD10);
}
void sub_0806C588() {
void sub_0806C588(void) {
DoExitTransition(&gUnk_0813AD24);
}
void sub_0806C598() {
void sub_0806C598(void) {
DoExitTransition(&gUnk_0813AD38);
}

View File

@ -226,7 +226,7 @@ void sub_0806030C(Entity* this, ScriptExecutionContext* context) {
ModBombs(context->intVariable);
}
void sub_08060318() {
void sub_08060318(void) {
Entity* ent;
int i;
@ -239,11 +239,11 @@ void sub_08060318() {
}
}
void sub_08060340() {
void sub_08060340(void) {
gSave.unk490 = gSave.unk50;
}
u32 sub_08060354() {
u32 sub_08060354(void) {
u32 iVar1;
s32 iVar2;

View File

@ -212,7 +212,7 @@ void sub_08064030(Entity* arg0, Entity* arg1) {
*(u32*)&arg1->animationState = (-gRoomVars.greatFairyState | gRoomVars.greatFairyState) >> 0x1f;
}
void sub_08064044() {
void sub_08064044(void) {
gScreenTransition.unk = 1;
}

View File

@ -27,7 +27,7 @@ void Simon(Entity* this) {
}
}
void sub_0806C224() {
void sub_0806C224(void) {
DoExitTransition(&gUnk_0813AD60);
gScreenTransition.transitionType = 6;
}
@ -38,7 +38,7 @@ void Simon_CreateChest(Entity* this) {
SoundReq(0x73);
}
void sub_0806C280() {
void sub_0806C280(void) {
SetGlobalFlag(MAROYA_WAKEUP);
DoExitTransition(&gUnk_0813AD74);
gScreenTransition.transitionType = 6;

View File

@ -158,7 +158,7 @@ void sub_0806622C(Entity* this) {
void nullsub_501(Entity* this) {
}
void sub_08066258() {
void sub_08066258(void) {
SoundReq(gUnk_081103D0[Random() & 7]);
}

View File

@ -171,7 +171,7 @@ void sub_08066E80(Entity* this, ScriptExecutionContext* context) {
gActiveScriptInfo.commandSize = 0;
}
void sub_08066F94() {
void sub_08066F94(void) {
u16 uVar1;
u16* puVar2;
@ -183,7 +183,7 @@ void sub_08066F94() {
}
}
void sub_08066FB8() {
void sub_08066FB8(void) {
u16 uVar1;
u16* puVar2;

View File

@ -518,7 +518,7 @@ void sub_080873D0(Entity* this) {
}
}
void sub_080873FC() {
void sub_080873FC(void) {
Entity* ent;
SoundReq(0xf7);

View File

@ -3569,7 +3569,7 @@ void sub_0804D780(void) {
extern u16 gUnk_080EAE00;
void sub_0804D7EC() {
void sub_0804D7EC(void) {
u16 temp;
u16* tilePos;
@ -3581,7 +3581,7 @@ void sub_0804D7EC() {
}
}
void sub_0804D810() {
void sub_0804D810(void) {
u16 uVar1;
u16* puVar2;
@ -4796,7 +4796,7 @@ void sub_0804E7DC(void) {
extern u32 script_08009E58;
void sub_0804E864() {
void sub_0804E864(void) {
gPlayerEntity.x.HALF.HI = gRoomControls.roomOriginX + 0x90;
gPlayerEntity.y.HALF.HI = gRoomControls.roomOriginY + 0x38;
sub_080751E8(1, 6, &script_08009E58);
@ -5729,62 +5729,62 @@ void sub_0804F79C(Entity* parent) {
}
}
void sub_0804F808() {
void sub_0804F808(void) {
SetTileType(0x1d3, 0x41d, 1);
SetTileType(0x1d3, 0x621, 1);
}
void sub_0804F830() {
void sub_0804F830(void) {
SetTileType(0x1d4, 0x41e, 1);
SetTileType(0x1d4, 0x620, 1);
}
void sub_0804F854() {
void sub_0804F854(void) {
SetTileType(0x1d5, 0x41f, 1);
SetTileType(0x1d4, 0x4e5, 1);
SetTileType(0x1d5, 0x61f, 1);
SetTileType(0x1d4, 0x559, 1);
}
void sub_0804F89C() {
void sub_0804F89C(void) {
SetTileType(0x1d6, 0x420, 1);
SetTileType(0x1d5, 0x525, 1);
SetTileType(0x1d6, 0x61e, 1);
SetTileType(0x1d5, 0x519, 1);
}
void sub_0804F8E0() {
void sub_0804F8E0(void) {
SetTileType(0x1d3, 0x421, 1);
SetTileType(0x1d6, 0x565, 1);
SetTileType(0x1d3, 0x61d, 1);
SetTileType(0x1d6, 0x4d9, 1);
}
void sub_0804F928() {
void sub_0804F928(void) {
sub_0807BA8C(0x41d, 1);
sub_0807BA8C(0x621, 1);
}
void sub_0804F944() {
void sub_0804F944(void) {
sub_0807BA8C(0x41e, 1);
sub_0807BA8C(0x620, 1);
}
void sub_0804F960() {
void sub_0804F960(void) {
sub_0807BA8C(0x41f, 1);
sub_0807BA8C(0x4e5, 1);
sub_0807BA8C(0x61f, 1);
sub_0807BA8C(0x559, 1);
}
void sub_0804F994() {
void sub_0804F994(void) {
sub_0807BA8C(0x420, 1);
sub_0807BA8C(0x525, 1);
sub_0807BA8C(0x61e, 1);
sub_0807BA8C(0x519, 1);
}
void sub_0804F9C8() {
void sub_0804F9C8(void) {
sub_0807BA8C(0x421, 1);
sub_0807BA8C(0x565, 1);
sub_0807BA8C(0x61d, 1);

View File

@ -579,18 +579,18 @@ void sub_0807DEDC(Entity* entity, ScriptExecutionContext* context, u32 x, u32 y)
entity->animationState = (entity->animationState & 0x80) | gUnk_0811E514[(u32)(direction << 0x18) >> 0x1c];
}
void sub_0807DF28() {
void sub_0807DF28(void) {
sub_0807DF38();
sub_08079184();
sub_08077B20();
}
void sub_0807DF38() {
void sub_0807DF38(void) {
gUnk_0200AF00.filler0[1] = 0xff;
gUnk_02034490[0] = 0xff;
}
void sub_0807DF50() {
void sub_0807DF50(void) {
gUnk_02034490[0] = 0;
gUnk_0200AF00.filler0[1] = 0;
sub_0801C4A0(0);

View File

@ -187,7 +187,8 @@ def get_script_pointer(barray):
integers = struct.unpack('I', barray)
val = integers[0]
if val >= SCRIPTS_START and val <= SCRIPTS_END:
return 'script_' + (struct.pack('>I', val).hex()).upper()
return use_script_label(val)
# return 'script_' + (struct.pack('>I', val).hex()).upper()
else:
return '0x'+struct.pack('>I', val).hex()

View File

@ -31,7 +31,7 @@ def print_rest_bytes(ctx):
def disassemble_command(ctx: Context, add_all_annotations=False):
global used_labels
if add_all_annotations or ctx.script_addr + ctx.ptr in used_labels:
if (add_all_annotations or ctx.script_addr + ctx.ptr in used_labels) and ctx.ptr != 0:
# print offsets to debug when manually inserting labels
print(f'{get_script_label(ctx.script_addr + ctx.ptr)}:')
cmd = struct.unpack('H', ctx.data[ctx.ptr:ctx.ptr + 2])[0]