From 2afb247caa266c27ffb0160da41ec84e77a46138 Mon Sep 17 00:00:00 2001 From: yenatch Date: Tue, 24 Sep 2013 03:29:37 -0400 Subject: script commands wildon and wildoff got mixed up this was a mistake in the original pksv spec and tauwasser's notes --- engine/scripting.asm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'engine/scripting.asm') diff --git a/engine/scripting.asm b/engine/scripting.asm index 597f25693..481a8c7e4 100644 --- a/engine/scripting.asm +++ b/engine/scripting.asm @@ -54,8 +54,8 @@ ScriptCommandTable: ; 0x96cb1 dw Script_checkbit2 dw Script_clearbit2 dw Script_setbit2 - dw Script_wildoff dw Script_wildon + dw Script_wildoff dw Script_xycompare dw Script_warpmod dw Script_blackoutmod @@ -2770,7 +2770,7 @@ Unknown_0x979ee: ; 0x979ee ret ; 0x979f5 -Script_wildon: ; 0x979f5 +Script_wildoff: ; 0x979f5 ; script command 0x38 ld hl, $d84c @@ -2778,7 +2778,7 @@ Script_wildon: ; 0x979f5 ret ; 0x979fb -Script_wildoff: ; 0x979fb +Script_wildon: ; 0x979fb ; script command 0x37 ld hl, $d84c -- cgit v1.2.3 From 8da8dff7cf00647e9c33e10ceb10908a5411ef2a Mon Sep 17 00:00:00 2001 From: yenatch Date: Tue, 24 Sep 2013 03:31:00 -0400 Subject: use a label in wildon/wildoff script command asm --- engine/scripting.asm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engine/scripting.asm') diff --git a/engine/scripting.asm b/engine/scripting.asm index 481a8c7e4..0555aba58 100644 --- a/engine/scripting.asm +++ b/engine/scripting.asm @@ -2773,7 +2773,7 @@ Unknown_0x979ee: ; 0x979ee Script_wildoff: ; 0x979f5 ; script command 0x38 - ld hl, $d84c + ld hl, StatusFlags set 5, [hl] ret ; 0x979fb @@ -2781,7 +2781,7 @@ Script_wildoff: ; 0x979f5 Script_wildon: ; 0x979fb ; script command 0x37 - ld hl, $d84c + ld hl, StatusFlags res 5, [hl] ret ; 0x97a01 -- cgit v1.2.3 From 3134b26f7b5e27242eb9f2a4cdc976a250cf0813 Mon Sep 17 00:00:00 2001 From: yenatch Date: Tue, 24 Sep 2013 03:48:58 -0400 Subject: rename bit1 script commands to event --- engine/scripting.asm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'engine/scripting.asm') diff --git a/engine/scripting.asm b/engine/scripting.asm index 0555aba58..ef451f51e 100644 --- a/engine/scripting.asm +++ b/engine/scripting.asm @@ -48,9 +48,9 @@ ScriptCommandTable: ; 0x96cb1 dw Script_giveegg dw Script_givepokeitem dw Script_checkpokeitem - dw Script_checkbit1 - dw Script_clearbit1 - dw Script_setbit1 + dw Script_checkevent + dw Script_clearevent + dw Script_setevent dw Script_checkbit2 dw Script_clearbit2 dw Script_setbit2 @@ -2667,7 +2667,7 @@ Script_giveegg: ; 0x97968 ret ; 0x97988 -Script_setbit1: ; 0x97988 +Script_setevent: ; 0x97988 ; script command 0x33 ; parameters: ; bit_number (MultiByteParam) @@ -2681,7 +2681,7 @@ Script_setbit1: ; 0x97988 ret ; 0x97996 -Script_clearbit1: ; 0x97996 +Script_clearevent: ; 0x97996 ; script command 0x32 ; parameters: ; bit_number (MultiByteParam) @@ -2695,7 +2695,7 @@ Script_clearbit1: ; 0x97996 ret ; 0x979a4 -Script_checkbit1: ; 0x979a4 +Script_checkevent: ; 0x979a4 ; script command 0x31 ; parameters: ; bit_number (MultiByteParam) -- cgit v1.2.3 From 73bd376cfd3fc39e30d0c06178e8f34f36604f84 Mon Sep 17 00:00:00 2001 From: yenatch Date: Tue, 24 Sep 2013 03:51:42 -0400 Subject: rename bit2 script commands to flag --- engine/scripting.asm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'engine/scripting.asm') diff --git a/engine/scripting.asm b/engine/scripting.asm index ef451f51e..c2eeb30f4 100644 --- a/engine/scripting.asm +++ b/engine/scripting.asm @@ -51,9 +51,9 @@ ScriptCommandTable: ; 0x96cb1 dw Script_checkevent dw Script_clearevent dw Script_setevent - dw Script_checkbit2 - dw Script_clearbit2 - dw Script_setbit2 + dw Script_checkflag + dw Script_clearflag + dw Script_setflag dw Script_wildon dw Script_wildoff dw Script_xycompare @@ -2715,7 +2715,7 @@ Script_checkevent: ; 0x979a4 ret ; 0x979bb -Script_setbit2: ; 0x979bb +Script_setflag: ; 0x979bb ; script command 0x36 ; parameters: ; bit_number (MultiByteParam) @@ -2729,7 +2729,7 @@ Script_setbit2: ; 0x979bb ret ; 0x979c9 -Script_clearbit2: ; 0x979c9 +Script_clearflag: ; 0x979c9 ; script command 0x35 ; parameters: ; bit_number (MultiByteParam) @@ -2743,7 +2743,7 @@ Script_clearbit2: ; 0x979c9 ret ; 0x979d7 -Script_checkbit2: ; 0x979d7 +Script_checkflag: ; 0x979d7 ; script command 0x34 ; parameters: ; bit_number (MultiByteParam) -- cgit v1.2.3 From ad3293595d239ddfc22784d937de7f025999f859 Mon Sep 17 00:00:00 2001 From: yenatch Date: Thu, 26 Sep 2013 18:40:20 -0400 Subject: script commands if_greater_than and if_less_than were swapped --- engine/scripting.asm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'engine/scripting.asm') diff --git a/engine/scripting.asm b/engine/scripting.asm index c2eeb30f4..b5b2ca707 100644 --- a/engine/scripting.asm +++ b/engine/scripting.asm @@ -9,8 +9,8 @@ ScriptCommandTable: ; 0x96cb1 dw Script_if_not_equal dw Script_iffalse dw Script_iftrue - dw Script_if_less_than dw Script_if_greater_than + dw Script_if_less_than dw Script_jumpstd dw Script_callstd dw Script_3callasm @@ -1734,7 +1734,7 @@ Script_if_not_equal: ; 0x9754b jr SkipTwoScriptBytes ; 0x97554 $40 ; 0x97556 -Script_if_less_than: ; 0x97556 +Script_if_greater_than: ; 0x97556 ; script command 0xa ; parameters: ; byte (SingleByteParam) @@ -1748,7 +1748,7 @@ Script_if_less_than: ; 0x97556 jr SkipTwoScriptBytes ; 0x97560 $34 ; 0x97562 -Script_if_greater_than: ; 0x97562 +Script_if_less_than: ; 0x97562 ; script command 0xb ; parameters: ; byte (SingleByteParam) -- cgit v1.2.3 From e5b5e1238d9d976f617eab3a4ca2d1d659bbabf7 Mon Sep 17 00:00:00 2001 From: yenatch Date: Tue, 1 Oct 2013 01:03:08 -0400 Subject: script command unknown0xa8 is wait --- engine/scripting.asm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engine/scripting.asm') diff --git a/engine/scripting.asm b/engine/scripting.asm index b5b2ca707..515fb975b 100644 --- a/engine/scripting.asm +++ b/engine/scripting.asm @@ -167,7 +167,7 @@ ScriptCommandTable: ; 0x96cb1 dw Script_displaylocation dw Script_unknown0xa6 dw Script_unknown0xa7 - dw Script_unknown0xa8 + dw Script_wait dw Script_unknown0xa9 ; 0x96e05 @@ -3211,7 +3211,7 @@ DisplayCredits: ret ; 0x97c05 -Script_unknown0xa8: ; 0x97c05 +Script_wait: ; 0x97c05 ; script command 0xa8 ; parameters: ; unknown (SingleByteParam) -- cgit v1.2.3 From 4cdc51d159e588426952bdf7dffea9087df2c6d8 Mon Sep 17 00:00:00 2001 From: yenatch Date: Tue, 1 Oct 2013 01:13:04 -0400 Subject: fix parameter comments for updated script commands --- engine/scripting.asm | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'engine/scripting.asm') diff --git a/engine/scripting.asm b/engine/scripting.asm index 515fb975b..39a56950e 100644 --- a/engine/scripting.asm +++ b/engine/scripting.asm @@ -165,8 +165,8 @@ ScriptCommandTable: ; 0x96cb1 dw Script_warpfacing dw Script_storetext dw Script_displaylocation - dw Script_unknown0xa6 - dw Script_unknown0xa7 + dw Script_trainerclassname + dw Script_name dw Script_wait dw Script_unknown0xa9 ; 0x96e05 @@ -2151,6 +2151,7 @@ Script_displaylocation: ; 0x97701 ; script command 0xa5 ; parameters: ; id (SingleByteParam) +; memory (SingleByteParam) call GetScriptByte jr Unknown_976f4 ; 0x97704 $ee @@ -2173,8 +2174,11 @@ Script_trainertotext: ; 0x97706 jr Unknown_976c0 ; 0x97714 $aa ; 0x97716 -Script_unknown0xa7: ; 0x97716 +Script_name: ; 0x97716 ; script command 0xa7 +; parameters: +; type (SingleByteParam) +; id (SingleByteParam) call GetScriptByte ld [$cf61], a @@ -2187,7 +2191,7 @@ Unknown_9771c: ; 0x9771c jp Unknown_976c0 ; 0x9772b -Script_unknown0xa6: ; 0x9772b +Script_trainerclassname: ; 0x9772b ; script command 0xa6 ld a, $7 -- cgit v1.2.3