From 10beeb3c0611b9114a8e5ff6ab0b8c5d7716defe Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 3 Nov 2015 15:05:19 -0500 Subject: Battle Tower --- engine/scripting.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engine/scripting.asm') diff --git a/engine/scripting.asm b/engine/scripting.asm index 5a3895038..9458efb3e 100644 --- a/engine/scripting.asm +++ b/engine/scripting.asm @@ -2339,7 +2339,7 @@ Script_giveitem: ; 0x977ca ; quantity (SingleByteParam) call GetScriptByte - cp -1 + cp ITEM_FROM_MEM jr nz, .ok ; 0x977cf $3 ld a, [ScriptVar] .ok -- cgit v1.2.3 From 91ea4a2f9b3d169a8e06aed62f19466c643eff83 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Tue, 3 Nov 2015 22:35:36 -0500 Subject: Battle Tower trainer text --- engine/scripting.asm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'engine/scripting.asm') diff --git a/engine/scripting.asm b/engine/scripting.asm index 9458efb3e..246314f79 100644 --- a/engine/scripting.asm +++ b/engine/scripting.asm @@ -236,7 +236,7 @@ ENDC dw Script_halloffame dw Script_credits dw Script_warpfacing - dw Script_storetext + dw Script_battletowertext dw Script_displaylocation dw Script_trainerclassname dw Script_name @@ -537,7 +537,7 @@ Script_interpretmenu: ; 0x96f41 ret ; 0x96f52 -Script_storetext: ; 0x96f52 +Script_battletowertext: ; 0x96f52 ; script command 0xa4 ; parameters: ; pointer (PointerLabelBeforeBank) @@ -546,7 +546,7 @@ Script_storetext: ; 0x96f52 call SetUpTextBox call GetScriptByte ld c, a - callba StoreText + callba BattleTowerText ret ; 0x96f60 @@ -2370,8 +2370,8 @@ Script_takeitem: ; 0x977f0 ld [CurItem], a call GetScriptByte ld [wItemQuantityChangeBuffer], a - ld a, $ff - ld [wd107], a + ld a, -1 + ld [ItemCountBuffer], a ld hl, NumItems call TossItem ret nc -- cgit v1.2.3 From cf5d726b7f00633acad3cdf0c25178bde5fc14fb Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 4 Nov 2015 14:02:11 -0500 Subject: Mon submenu, engine/menu.asm --- engine/scripting.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engine/scripting.asm') diff --git a/engine/scripting.asm b/engine/scripting.asm index 246314f79..d502a94db 100644 --- a/engine/scripting.asm +++ b/engine/scripting.asm @@ -515,7 +515,7 @@ Script_interpretmenu2: ; 0x96f30 ld a, [ScriptBank] ld hl, InterpretMenu2 rst FarCall - ld a, [wcfa9] + ld a, [MenuSelection2] jr nc, .ok xor a .ok -- cgit v1.2.3 From 3cadc7b012c3d11f227d71814f729952d0f56c21 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 4 Nov 2015 20:20:14 -0500 Subject: give/takeitem *, 1: the 1 is optional --- 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 d502a94db..c37d82594 100644 --- a/engine/scripting.asm +++ b/engine/scripting.asm @@ -1197,9 +1197,9 @@ ApplyPersonFacing: ; 0x9728b add hl, bc ld a, [hl] push bc - call Function1836 + call DoesSpriteHaveFacings pop bc - jr c, .not_visible ; 0x9729c $1b + jr c, .not_visible ; STILL_SPRITE ld hl, OBJECT_FLAGS1 add hl, bc bit 2, [hl] -- cgit v1.2.3 From adf2fe712d372bad8c68590ae77b1dde85290d8f Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 5 Nov 2015 14:06:03 -0500 Subject: Various labels --- engine/scripting.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engine/scripting.asm') diff --git a/engine/scripting.asm b/engine/scripting.asm index c37d82594..115ed77f8 100644 --- a/engine/scripting.asm +++ b/engine/scripting.asm @@ -1222,7 +1222,7 @@ ApplyPersonFacing: ; 0x9728b ; 0x972bc .DisableTextTiles: ; 0x972bc - call Function217a + call LoadMapPart hlcoord 0, 0 ld bc, SCREEN_WIDTH * SCREEN_HEIGHT .loop -- cgit v1.2.3 From 1205fe5100c09624350b5e6822b4c063586afcaf Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 5 Nov 2015 15:08:00 -0500 Subject: PLAYEREVENT_ --- engine/scripting.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engine/scripting.asm') diff --git a/engine/scripting.asm b/engine/scripting.asm index 115ed77f8..360360f79 100644 --- a/engine/scripting.asm +++ b/engine/scripting.asm @@ -1664,7 +1664,7 @@ endr ret ; 0x974f3 -Function974f3:: ; 0x974f3 +CallCallback:: ; 0x974f3 ld a, [ScriptBank] or $80 ld [ScriptBank], a -- cgit v1.2.3 From ac824f62fc6bdbc63f2f9fb7bd17e4827a535f36 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 8 Nov 2015 13:27:26 -0500 Subject: More battle core labels --- 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 360360f79..296f69ecd 100644 --- a/engine/scripting.asm +++ b/engine/scripting.asm @@ -1360,7 +1360,7 @@ Script_writepersonxy: ; 0x9735b ld a, [hLastTalked] .ok ld b, a - callba Function80a1 + callba WritePersonXY ret ; 0x9736f @@ -1376,7 +1376,7 @@ Script_follownotexact: ; 0x9736f call GetScriptByte call GetScriptPerson ld c, a - callba Function839e + callba FollowNotExact ret ; 0x97384 @@ -1546,7 +1546,7 @@ Script_catchtutorial: ; 0x97447 call GetScriptByte ld [BattleType], a call BufferScreen - callba Function4e554 + callba CatchTutorial jp Script_reloadmap ; 0x97459 -- cgit v1.2.3 From 93ab6985d283857c54fe096294ba5296179963bf Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 9 Nov 2015 16:41:09 -0500 Subject: Some work on battle animations --- 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 296f69ecd..703f67e07 100644 --- a/engine/scripting.asm +++ b/engine/scripting.asm @@ -440,14 +440,14 @@ Script_closetext: ; 0x96ed9 Script_keeptextopen: ; 0x96edc ; script command 0x55 - ld a, [$ffd8] + ld a, [hOAMUpdate] push af ld a, $1 - ld [$ffd8], a + ld [hOAMUpdate], a call WaitBGMap call KeepTextOpen pop af - ld [$ffd8], a + ld [hOAMUpdate], a ret ; 0x96eed -- cgit v1.2.3 From b522b0f165b6aae278ca9b4b18bada606d4ae737 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 11 Nov 2015 14:12:46 -0500 Subject: engine/mart.asm --- engine/scripting.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engine/scripting.asm') diff --git a/engine/scripting.asm b/engine/scripting.asm index 703f67e07..57674bd81 100644 --- a/engine/scripting.asm +++ b/engine/scripting.asm @@ -2970,7 +2970,7 @@ Script_reloadmappart:: ; 0x97ae3 xor a ld [hBGMapMode], a - call Function2173 + call OverworldTextModeSwitch call Function2914 callba Function104061 call UpdateSprites -- cgit v1.2.3 From 91068077f05afbbfd6571ceadada2c03ac7c8038 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 11 Nov 2015 16:11:08 -0500 Subject: Further split bank 4 --- engine/scripting.asm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'engine/scripting.asm') diff --git a/engine/scripting.asm b/engine/scripting.asm index 57674bd81..f94436f67 100644 --- a/engine/scripting.asm +++ b/engine/scripting.asm @@ -1560,8 +1560,8 @@ Script_returnafterbattle: ; 0x97459 and $3f cp $1 jr nz, .notblackedout ; 0x97466 $8 - ld b, BANK(UnknownScript_0x124c1) - ld hl, UnknownScript_0x124c1 + ld b, BANK(Script_BattleWhiteout) + ld hl, Script_BattleWhiteout jp ScriptJump .notblackedout @@ -2884,9 +2884,9 @@ Script_blackoutmod: ; 0x97a78 ; map_id (MapIdParam) call GetScriptByte - ld [wdcb2], a + ld [wLastSpawnMapGroup], a call GetScriptByte - ld [wdcb3], a + ld [wLastSpawnMapNumber], a ret ; 0x97a85 -- cgit v1.2.3 From 2ffcb4b49036b8bcd9a37cdc9305f7ee5567fe6c Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 11 Nov 2015 23:38:57 -0500 Subject: More splits; map setup labels --- engine/scripting.asm | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'engine/scripting.asm') diff --git a/engine/scripting.asm b/engine/scripting.asm index f94436f67..cbc8c0028 100644 --- a/engine/scripting.asm +++ b/engine/scripting.asm @@ -1079,9 +1079,11 @@ ApplyMovement: ; 971fa ld a, c callba SetFlagsForMovement_1 pop bc + push bc call SetFlagsForMovement_2 pop bc + call GetScriptByte ld l, a call GetScriptByte @@ -1090,6 +1092,7 @@ ApplyMovement: ; 971fa ld b, a call GetMovementData ret c + ld a, SCRIPT_WAIT_MOVEMENT ld [ScriptMode], a call StopScript @@ -1102,6 +1105,7 @@ SetFlagsForMovement_2: ; 0x97221 ; 0x97228 Script_applymovement2: ; 0x97228 +; apply movement to last talked ; script command 0x6a ; parameters: ; data (MovementPointerLabelParam) @@ -1426,12 +1430,12 @@ ShowEmoteScript: ; 973b6 .Show show_emote - show_person + step_sleep_1 step_end .Hide hide_emote - show_person + step_sleep_1 step_end ; 973c7 @@ -1460,8 +1464,8 @@ Script_earthquake: ; 0x973c7 ; 973eb EarthquakeMovement: ; 973eb - step_shake 16 - step_sleep 16 + step_shake 16 ; the 16 gets overwritten with the script byte + step_sleep 16 ; the 16 gets overwritten with the lower 6 bits of the script byte step_end EarthquakeMovementEnd ; 973f0 @@ -2847,6 +2851,7 @@ Script_warp: ; 0x97a1d call LoadMapStatus call StopScript ret + .not_ok call GetScriptByte call GetScriptByte @@ -3117,6 +3122,7 @@ Script_end: ; 0x97b74 call ExitScriptSubroutine jr c, .resume ret + .resume xor a ld [ScriptRunning], a -- cgit v1.2.3 From 40802da3cf27a453f62c8c4b712e876b06a9d834 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 12 Nov 2015 11:10:19 -0500 Subject: Map header labels, tileset constants --- 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 cbc8c0028..ae5041bc2 100644 --- a/engine/scripting.asm +++ b/engine/scripting.asm @@ -2874,7 +2874,7 @@ Script_warpmod: ; 0x97a65 ; map_id (MapIdParam) call GetScriptByte - ld [wdcac], a + ld [BackupWarpNumber], a call GetScriptByte ld [BackupMapGroup], a call GetScriptByte @@ -2985,7 +2985,7 @@ Script_reloadmappart:: ; 0x97ae3 Script_warpcheck: ; 0x97af6 ; script command 0x8e - call Function224a + call WarpCheck ret nc callba SetAll_ScriptFlags3 ret -- cgit v1.2.3