summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--asm/macros/event.inc8
-rw-r--r--data/script_cmd_table.inc220
-rw-r--r--src/field/scrcmd.c6
3 files changed, 117 insertions, 117 deletions
diff --git a/asm/macros/event.inc b/asm/macros/event.inc
index 04ab2f001..7c9aec649 100644
--- a/asm/macros/event.inc
+++ b/asm/macros/event.inc
@@ -178,7 +178,7 @@
.endm
@ Compares the least-significant byte of the value of script bank a to a fixed byte value (b).
- .macro compare_local_to_imm a, b
+ .macro compare_local_to_value a, b
.byte 0x1c
.byte \a
.byte \b
@@ -199,7 +199,7 @@
.endm
@ Compares the byte located at offset a to a fixed byte value (b).
- .macro compare_addr_to_imm a, b
+ .macro compare_addr_to_value a, b
.byte 0x1f
.4byte \a
.byte \b
@@ -213,7 +213,7 @@
.endm
@ Compares the value of `var` to a fixed word value (b).
- .macro compare_var_to_imm var, value
+ .macro compare_var_to_value var, value
.byte 0x21
.2byte \var
.2byte \value
@@ -232,7 +232,7 @@
.if ((\arg1 >> 12) == 4 || (\arg1 >> 12) == 8) && ((\arg2 >> 12) == 4 || (\arg2 >> 12) == 8)
compare_var_to_var \arg1, \arg2
.elseif ((\arg1 >> 12) == 4 || (\arg1 >> 12) == 8) && (\arg2 >= 0 && \arg2 <= 0xFFFF)
- compare_var_to_imm \arg1, \arg2
+ compare_var_to_value \arg1, \arg2
.else
.error "Invalid arguments for 'compare'"
.endif
diff --git a/data/script_cmd_table.inc b/data/script_cmd_table.inc
index 3f89949a1..17b872d7c 100644
--- a/data/script_cmd_table.inc
+++ b/data/script_cmd_table.inc
@@ -10,33 +10,33 @@ gScriptCmdTable:: @ 814AE30
.4byte ScrCmd_call_if @ 0x07
.4byte ScrCmd_gotostd @ 0x08
.4byte ScrCmd_callstd @ 0x09
- .4byte ScrCmd_gotostd_if @ 0x0A
- .4byte ScrCmd_callstd_if @ 0x0B
+ .4byte ScrCmd_gotostd_if @ 0x0A
+ .4byte ScrCmd_callstd_if @ 0x0B
.4byte ScrCmd_gotoram @ 0x0C
- .4byte ScrCmd_killscript @ 0x0D
- .4byte ScrCmd_setmysteryeventstatus @ 0x0E
- .4byte ScrCmd_loadword @ 0x0F
- .4byte ScrCmd_loadbyte @ 0x10
- .4byte ScrCmd_writebytetoaddr @ 0x11
- .4byte ScrCmd_loadbytefromaddr @ 0x12
+ .4byte ScrCmd_killscript @ 0x0D
+ .4byte ScrCmd_setmysteryeventstatus @ 0x0E
+ .4byte ScrCmd_loadword @ 0x0F
+ .4byte ScrCmd_loadbyte @ 0x10
+ .4byte ScrCmd_writebytetoaddr @ 0x11
+ .4byte ScrCmd_loadbytefromaddr @ 0x12
.4byte ScrCmd_setptrbyte @ 0x13
- .4byte ScrCmd_copylocal @ 0x14
+ .4byte ScrCmd_copylocal @ 0x14
.4byte ScrCmd_copybyte @ 0x15
.4byte ScrCmd_setvar @ 0x16
.4byte ScrCmd_addvar @ 0x17
.4byte ScrCmd_subvar @ 0x18
.4byte ScrCmd_copyvar @ 0x19
.4byte ScrCmd_setorcopyvar @ 0x1A
- .4byte ScrCmd_compare_local_to_local @ 0x1B
- .4byte ScrCmd_compare_local_to_imm @ 0x1C
- .4byte ScrCmd_compare_local_to_addr @ 0x1D
- .4byte ScrCmd_compare_addr_to_local @ 0x1E
- .4byte ScrCmd_compare_addr_to_imm @ 0x1F
- .4byte ScrCmd_compare_addr_to_addr @ 0x20
- .4byte ScrCmd_compare_var_to_imm @ 0x21
- .4byte ScrCmd_compare_var_to_var @ 0x22
- .4byte ScrCmd_callnative @ 0x23
- .4byte ScrCmd_gotonative @ 0x24
+ .4byte ScrCmd_compare_local_to_local @ 0x1B
+ .4byte ScrCmd_compare_local_to_value @ 0x1C
+ .4byte ScrCmd_compare_local_to_addr @ 0x1D
+ .4byte ScrCmd_compare_addr_to_local @ 0x1E
+ .4byte ScrCmd_compare_addr_to_value @ 0x1F
+ .4byte ScrCmd_compare_addr_to_addr @ 0x20
+ .4byte ScrCmd_compare_var_to_value @ 0x21
+ .4byte ScrCmd_compare_var_to_var @ 0x22
+ .4byte ScrCmd_callnative @ 0x23
+ .4byte ScrCmd_gotonative @ 0x24
.4byte ScrCmd_special @ 0x25
.4byte ScrCmd_specialvar @ 0x26
.4byte ScrCmd_waitstate @ 0x27
@@ -44,28 +44,28 @@ gScriptCmdTable:: @ 814AE30
.4byte ScrCmd_setflag @ 0x29
.4byte ScrCmd_clearflag @ 0x2A
.4byte ScrCmd_checkflag @ 0x2B
- .4byte ScrCmd_initclock @ 0x2C
- .4byte ScrCmd_dodailyevents @ 0x2D
- .4byte ScrCmd_gettime @ 0x2E
- .4byte ScrCmd_playse @ 0x2F
- .4byte ScrCmd_waitse @ 0x30
- .4byte ScrCmd_playfanfare @ 0x31
+ .4byte ScrCmd_initclock @ 0x2C
+ .4byte ScrCmd_dodailyevents @ 0x2D
+ .4byte ScrCmd_gettime @ 0x2E
+ .4byte ScrCmd_playse @ 0x2F
+ .4byte ScrCmd_waitse @ 0x30
+ .4byte ScrCmd_playfanfare @ 0x31
.4byte ScrCmd_waitfanfare @ 0x32
- .4byte ScrCmd_playbgm @ 0x33
- .4byte ScrCmd_savebgm @ 0x34
- .4byte ScrCmd_fadedefaultbgm @ 0x35
- .4byte ScrCmd_fadenewbgm @ 0x36
- .4byte ScrCmd_fadeoutbgm @ 0x37
- .4byte ScrCmd_fadeinbgm @ 0x38
+ .4byte ScrCmd_playbgm @ 0x33
+ .4byte ScrCmd_savebgm @ 0x34
+ .4byte ScrCmd_fadedefaultbgm @ 0x35
+ .4byte ScrCmd_fadenewbgm @ 0x36
+ .4byte ScrCmd_fadeoutbgm @ 0x37
+ .4byte ScrCmd_fadeinbgm @ 0x38
.4byte ScrCmd_warp @ 0x39
- .4byte ScrCmd_warpsilent @ 0x3A
+ .4byte ScrCmd_warpsilent @ 0x3A
.4byte ScrCmd_warpdoor @ 0x3B
.4byte ScrCmd_warphole @ 0x3C
.4byte ScrCmd_warpteleport @ 0x3D
- .4byte ScrCmd_setwarp @ 0x3E
- .4byte ScrCmd_setdynamicwarp @ 0x3F
- .4byte ScrCmd_setdivewarp @ 0x40
- .4byte ScrCmd_setholewarp @ 0x41
+ .4byte ScrCmd_setwarp @ 0x3E
+ .4byte ScrCmd_setdynamicwarp @ 0x3F
+ .4byte ScrCmd_setdivewarp @ 0x40
+ .4byte ScrCmd_setholewarp @ 0x41
.4byte ScrCmd_getplayerxy @ 0x42
.4byte ScrCmd_countpokemon @ 0x43
.4byte ScrCmd_additem @ 0x44
@@ -77,34 +77,34 @@ gScriptCmdTable:: @ 814AE30
.4byte ScrCmd_checkpcitem @ 0x4A
.4byte ScrCmd_adddecor @ 0x4B
.4byte ScrCmd_removedecor @ 0x4C
- .4byte ScrCmd_hasdecor @ 0x4D
+ .4byte ScrCmd_hasdecor @ 0x4D
.4byte ScrCmd_checkdecor @ 0x4E
- .4byte ScrCmd_applymovement @ 0x4F
- .4byte ScrCmd_applymovement_at @ 0x50
- .4byte ScrCmd_waitmovement @ 0x51
- .4byte ScrCmd_waitmovement_at @ 0x52
- .4byte ScrCmd_removeobject @ 0x53
- .4byte ScrCmd_removeobject_at @ 0x54
- .4byte ScrCmd_addobject @ 0x55
- .4byte ScrCmd_addobject_at @ 0x56
- .4byte ScrCmd_setobjectxy @ 0x57
- .4byte ScrCmd_showobject @ 0x58
- .4byte ScrCmd_hideobject @ 0x59
+ .4byte ScrCmd_applymovement @ 0x4F
+ .4byte ScrCmd_applymovement_at @ 0x50
+ .4byte ScrCmd_waitmovement @ 0x51
+ .4byte ScrCmd_waitmovement_at @ 0x52
+ .4byte ScrCmd_removeobject @ 0x53
+ .4byte ScrCmd_removeobject_at @ 0x54
+ .4byte ScrCmd_addobject @ 0x55
+ .4byte ScrCmd_addobject_at @ 0x56
+ .4byte ScrCmd_setobjectxy @ 0x57
+ .4byte ScrCmd_showobject @ 0x58
+ .4byte ScrCmd_hideobject @ 0x59
.4byte ScrCmd_faceplayer @ 0x5A
.4byte ScrCmd_turnobject @ 0x5B
.4byte ScrCmd_trainerbattle @ 0x5C
- .4byte ScrCmd_battlebegin @ 0x5D
- .4byte ScrCmd_ontrainerbattleend @ 0x5E
- .4byte ScrCmd_ontrainerbattleendgoto @ 0x5F
+ .4byte ScrCmd_battlebegin @ 0x5D
+ .4byte ScrCmd_ontrainerbattleend @ 0x5E
+ .4byte ScrCmd_ontrainerbattleendgoto @ 0x5F
.4byte ScrCmd_checktrainerflag @ 0x60
- .4byte ScrCmd_settrainerflag @ 0x61
- .4byte ScrCmd_cleartrainerflag @ 0x62
- .4byte ScrCmd_setobjectxyperm @ 0x63
- .4byte ScrCmd_moveobjectoffscreen @ 0x64
- .4byte ScrCmd_setobjectmovementtype @ 0x65
- .4byte ScrCmd_waitmessage @ 0x66
+ .4byte ScrCmd_settrainerflag @ 0x61
+ .4byte ScrCmd_cleartrainerflag @ 0x62
+ .4byte ScrCmd_setobjectxyperm @ 0x63
+ .4byte ScrCmd_moveobjectoffscreen @ 0x64
+ .4byte ScrCmd_setobjectmovementtype @ 0x65
+ .4byte ScrCmd_waitmessage @ 0x66
.4byte ScrCmd_message @ 0x67
- .4byte ScrCmd_closemessage @ 0x68
+ .4byte ScrCmd_closemessage @ 0x68
.4byte ScrCmd_lockall @ 0x69
.4byte ScrCmd_lock @ 0x6A
.4byte ScrCmd_releaseall @ 0x6B
@@ -112,91 +112,91 @@ gScriptCmdTable:: @ 814AE30
.4byte ScrCmd_waitbutton @ 0x6D
.4byte ScrCmd_yesnobox @ 0x6E
.4byte ScrCmd_multichoice @ 0x6F
- .4byte ScrCmd_multichoicedefault @ 0x70
- .4byte ScrCmd_multichoicegrid @ 0x71
+ .4byte ScrCmd_multichoicedefault @ 0x70
+ .4byte ScrCmd_multichoicegrid @ 0x71
.4byte ScrCmd_drawbox @ 0x72
- .4byte ScrCmd_erasebox @ 0x73
- .4byte ScrCmd_drawboxtext @ 0x74
+ .4byte ScrCmd_erasebox @ 0x73
+ .4byte ScrCmd_drawboxtext @ 0x74
.4byte ScrCmd_drawpokepic @ 0x75
- .4byte ScrCmd_erasepokepic @ 0x76
+ .4byte ScrCmd_erasepokepic @ 0x76
.4byte ScrCmd_drawcontestwinner @ 0x77
- .4byte ScrCmd_braillemessage @ 0x78
- .4byte ScrCmd_givepoke @ 0x79
+ .4byte ScrCmd_braillemessage @ 0x78
+ .4byte ScrCmd_givepoke @ 0x79
.4byte ScrCmd_giveegg @ 0x7A
.4byte ScrCmd_setpokemove @ 0x7B
- .4byte ScrCmd_checkpokemove @ 0x7C
- .4byte ScrCmd_getspeciesname @ 0x7D
- .4byte ScrCmd_getfirstpartypokename @ 0x7E
- .4byte ScrCmd_getpartypokename @ 0x7F
- .4byte ScrCmd_getitemname @ 0x80
- .4byte ScrCmd_getdecorname @ 0x81
- .4byte ScrCmd_getmovename @ 0x82
- .4byte ScrCmd_getnumberstring @ 0x83
- .4byte ScrCmd_getstdstring @ 0x84
- .4byte ScrCmd_getstring @ 0x85
+ .4byte ScrCmd_checkpokemove @ 0x7C
+ .4byte ScrCmd_getspeciesname @ 0x7D
+ .4byte ScrCmd_getfirstpartypokename @ 0x7E
+ .4byte ScrCmd_getpartypokename @ 0x7F
+ .4byte ScrCmd_getitemname @ 0x80
+ .4byte ScrCmd_getdecorname @ 0x81
+ .4byte ScrCmd_getmovename @ 0x82
+ .4byte ScrCmd_getnumberstring @ 0x83
+ .4byte ScrCmd_getstdstring @ 0x84
+ .4byte ScrCmd_getstring @ 0x85
.4byte ScrCmd_pokemart @ 0x86
.4byte ScrCmd_pokemartdecor @ 0x87
.4byte ScrCmd_pokemartbp @ 0x88
- .4byte ScrCmd_playslotmachine @ 0x89
- .4byte ScrCmd_plantberrytree @ 0x8A
+ .4byte ScrCmd_playslotmachine @ 0x89
+ .4byte ScrCmd_plantberrytree @ 0x8A
.4byte ScrCmd_choosecontestpkmn @ 0x8B
.4byte ScrCmd_startcontest @ 0x8C
.4byte ScrCmd_showcontestresults @ 0x8D
.4byte ScrCmd_contestlinktransfer @ 0x8E
.4byte ScrCmd_random @ 0x8F
.4byte ScrCmd_givemoney @ 0x90
- .4byte ScrCmd_takemoney @ 0x91
+ .4byte ScrCmd_takemoney @ 0x91
.4byte ScrCmd_checkmoney @ 0x92
- .4byte ScrCmd_showmoneybox @ 0x93
- .4byte ScrCmd_hidemoneybox @ 0x94
- .4byte ScrCmd_updatemoneybox @ 0x95
- .4byte ScrCmd_getpricereduction @ 0x96
+ .4byte ScrCmd_showmoneybox @ 0x93
+ .4byte ScrCmd_hidemoneybox @ 0x94
+ .4byte ScrCmd_updatemoneybox @ 0x95
+ .4byte ScrCmd_getpricereduction @ 0x96
.4byte ScrCmd_fadescreen @ 0x97
.4byte ScrCmd_fadescreendelay @ 0x98
- .4byte ScrCmd_setdarklevel @ 0x99
- .4byte ScrCmd_animdarklevel @ 0x9A
- .4byte ScrCmd_messageautoscroll @ 0x9B
- .4byte ScrCmd_dofieldeffect @ 0x9C
- .4byte ScrCmd_setfieldeffect @ 0x9D
- .4byte ScrCmd_waitfieldeffect @ 0x9E
+ .4byte ScrCmd_setdarklevel @ 0x99
+ .4byte ScrCmd_animdarklevel @ 0x9A
+ .4byte ScrCmd_messageautoscroll @ 0x9B
+ .4byte ScrCmd_dofieldeffect @ 0x9C
+ .4byte ScrCmd_setfieldeffect @ 0x9D
+ .4byte ScrCmd_waitfieldeffect @ 0x9E
.4byte ScrCmd_sethealplace @ 0x9F
- .4byte ScrCmd_checkplayergender @ 0xA0
- .4byte ScrCmd_playpokecry @ 0xA1
+ .4byte ScrCmd_checkplayergender @ 0xA0
+ .4byte ScrCmd_playpokecry @ 0xA1
.4byte ScrCmd_setmaptile @ 0xA2
.4byte ScrCmd_resetweather @ 0xA3
.4byte ScrCmd_setweather @ 0xA4
.4byte ScrCmd_doweather @ 0xA5
.4byte ScrCmd_tileeffect @ 0xA6
- .4byte ScrCmd_setmaplayoutindex @ 0xA7
- .4byte ScrCmd_setobjectpriority @ 0xA8
- .4byte ScrCmd_resetobjectpriority @ 0xA9
+ .4byte ScrCmd_setmaplayoutindex @ 0xA7
+ .4byte ScrCmd_setobjectpriority @ 0xA8
+ .4byte ScrCmd_resetobjectpriority @ 0xA9
.4byte ScrCmd_createvobject @ 0xAA
.4byte ScrCmd_turnvobject @ 0xAB
- .4byte ScrCmd_opendoor @ 0xAC
- .4byte ScrCmd_closedoor @ 0xAD
- .4byte ScrCmd_waitdooranim @ 0xAE
- .4byte ScrCmd_setdooropen @ 0xAF
- .4byte ScrCmd_setdoorclosed @ 0xB0
- .4byte ScrCmd_addelevmenuitem @ 0xB1
- .4byte ScrCmd_showelevmenu @ 0xB2
+ .4byte ScrCmd_opendoor @ 0xAC
+ .4byte ScrCmd_closedoor @ 0xAD
+ .4byte ScrCmd_waitdooranim @ 0xAE
+ .4byte ScrCmd_setdooropen @ 0xAF
+ .4byte ScrCmd_setdoorclosed @ 0xB0
+ .4byte ScrCmd_addelevmenuitem @ 0xB1
+ .4byte ScrCmd_showelevmenu @ 0xB2
.4byte ScrCmd_checkcoins @ 0xB3
.4byte ScrCmd_givecoins @ 0xB4
- .4byte ScrCmd_takecoins @ 0xB5
+ .4byte ScrCmd_takecoins @ 0xB5
.4byte ScrCmd_setwildbattle @ 0xB6
.4byte ScrCmd_dowildbattle @ 0xB7
.4byte ScrCmd_setvaddress @ 0xB8
.4byte ScrCmd_vgoto @ 0xB9
.4byte ScrCmd_vcall @ 0xBA
- .4byte ScrCmd_vgoto_if @ 0xBB
- .4byte ScrCmd_vcall_if @ 0xBC
- .4byte ScrCmd_vmessage @ 0xBD
+ .4byte ScrCmd_vgoto_if @ 0xBB
+ .4byte ScrCmd_vcall_if @ 0xBC
+ .4byte ScrCmd_vmessage @ 0xBD
.4byte ScrCmd_vloadptr @ 0xBE
- .4byte ScrCmd_vgetstring @ 0xBF
- .4byte ScrCmd_showcoinsbox @ 0xC0
- .4byte ScrCmd_hidecoinsbox @ 0xC1
- .4byte ScrCmd_updatecoinsbox @ 0xC2
- .4byte ScrCmd_incrementgamestat @ 0xC3
- .4byte ScrCmd_setescapewarp @ 0xC4
+ .4byte ScrCmd_vgetstring @ 0xBF
+ .4byte ScrCmd_showcoinsbox @ 0xC0
+ .4byte ScrCmd_hidecoinsbox @ 0xC1
+ .4byte ScrCmd_updatecoinsbox @ 0xC2
+ .4byte ScrCmd_incrementgamestat @ 0xC3
+ .4byte ScrCmd_setescapewarp @ 0xC4
.4byte ScrCmd_waitpokecry @ 0xC5
gScriptCmdTableEnd::
diff --git a/src/field/scrcmd.c b/src/field/scrcmd.c
index 68511ecb7..ec8e17d34 100644
--- a/src/field/scrcmd.c
+++ b/src/field/scrcmd.c
@@ -398,7 +398,7 @@ bool8 ScrCmd_compare_local_to_local(struct ScriptContext *ctx)
}
// comparelocaltoimm
-bool8 ScrCmd_compare_local_to_imm(struct ScriptContext *ctx)
+bool8 ScrCmd_compare_local_to_value(struct ScriptContext *ctx)
{
u8 value1 = ctx->data[ScriptReadByte(ctx)];
u8 value2 = ScriptReadByte(ctx);
@@ -425,7 +425,7 @@ bool8 ScrCmd_compare_addr_to_local(struct ScriptContext *ctx)
return FALSE;
}
-bool8 ScrCmd_compare_addr_to_imm(struct ScriptContext *ctx)
+bool8 ScrCmd_compare_addr_to_value(struct ScriptContext *ctx)
{
u8 value1 = *(u8 *)ScriptReadWord(ctx);
u8 value2 = ScriptReadByte(ctx);
@@ -443,7 +443,7 @@ bool8 ScrCmd_compare_addr_to_addr(struct ScriptContext *ctx)
return FALSE;
}
-bool8 ScrCmd_compare_var_to_imm(struct ScriptContext *ctx)
+bool8 ScrCmd_compare_var_to_value(struct ScriptContext *ctx)
{
u16 value1 = *GetVarPointer(ScriptReadHalfword(ctx));
u16 value2 = ScriptReadHalfword(ctx);