From 2b96f4165f01fb41cb8c302a8da9d9a3131ab92e Mon Sep 17 00:00:00 2001 From: pikalaxalt Date: Fri, 27 May 2016 12:32:34 -0400 Subject: Vermilion City scripts --- scripts/oakslab.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/oakslab.asm') diff --git a/scripts/oakslab.asm b/scripts/oakslab.asm index aff39cbc..2970fa2a 100755 --- a/scripts/oakslab.asm +++ b/scripts/oakslab.asm @@ -7,7 +7,7 @@ OaksLabScript: ; 1cb0e (7:4b0e) ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld hl, OaksLabScriptPointers ld a, [W_OAKSLABCURSCRIPT] - jp CallFunctionInTable + jp JumpTable OaksLabScriptPointers: ; 1cb28 (7:4b28) dw OaksLabScript0 -- cgit v1.3.1-sl0p From dcd1ecc18f40a8bd2c8e8bcc903153070518fd70 Mon Sep 17 00:00:00 2001 From: pikalaxalt Date: Sat, 28 May 2016 09:28:59 -0400 Subject: Oak's Lab Rewrite part 1 --- constants/hide_show_constants.asm | 44 +- data/mapObjects/oakslab.asm | 22 +- main.asm | 13 +- scripts/oakslab.asm | 1116 ++++--------------------------------- 4 files changed, 142 insertions(+), 1053 deletions(-) (limited to 'scripts/oakslab.asm') diff --git a/constants/hide_show_constants.asm b/constants/hide_show_constants.asm index 77820f75..1e7a4347 100755 --- a/constants/hide_show_constants.asm +++ b/constants/hide_show_constants.asm @@ -53,27 +53,29 @@ const_value = 0 const HS_STARTER_BALL_1 ; 2C const HS_STARTER_BALL_2 ; 2D const HS_STARTER_BALL_3 ; 2E - const HS_OAKS_LAB_OAK_1 ; 2F - const HS_POKEDEX_1 ; 30 - const HS_POKEDEX_2 ; 31 - const HS_OAKS_LAB_OAK_2 ; 32 - const HS_VIRIDIAN_GYM_GIOVANNI ; 33 X - const HS_VIRIDIAN_GYM_ITEM ; 34 - const HS_OLD_AMBER ; 35 X - const HS_UNKNOWN_DUNGEON_1_ITEM_1 ; 36 X - const HS_UNKNOWN_DUNGEON_1_ITEM_2 ; 37 X - const HS_UNKNOWN_DUNGEON_1_ITEM_3 ; 38 - const HS_POKEMONTOWER_2_RIVAL ; 39 X - const HS_POKEMONTOWER_3_ITEM ; 3A X - const HS_POKEMONTOWER_4_ITEM_1 ; 3B X - const HS_POKEMONTOWER_4_ITEM_2 ; 3C X - const HS_POKEMONTOWER_4_ITEM_3 ; 3D X - const HS_POKEMONTOWER_5_ITEM ; 3E X - const HS_POKEMONTOWER_6_ITEM_1 ; 3F X - const HS_POKEMONTOWER_6_ITEM_2 ; 40 X - const HS_POKEMONTOWER_7_ROCKET_1 ; 41 X - const HS_POKEMONTOWER_7_ROCKET_2 ; 42 X - const HS_POKEMONTOWER_7_ROCKET_3 ; 43 + +const_value SET $2D + const HS_OAKS_LAB_OAK_1 ; 2D + const HS_POKEDEX_1 ; 2E + const HS_POKEDEX_2 ; 2F + const HS_OAKS_LAB_OAK_2 ; 30 + const HS_VIRIDIAN_GYM_GIOVANNI ; 31 + const HS_VIRIDIAN_GYM_ITEM ; 32 + const HS_OLD_AMBER ; 33 X + const HS_UNKNOWN_DUNGEON_1_ITEM_1 ; 34 + const HS_UNKNOWN_DUNGEON_1_ITEM_2 ; 35 X + const HS_UNKNOWN_DUNGEON_1_ITEM_3 ; 36 X + const HS_POKEMONTOWER_2_RIVAL ; 37 X + const HS_POKEMONTOWER_3_ITEM ; 38 + const HS_POKEMONTOWER_4_ITEM_1 ; 39 X + const HS_POKEMONTOWER_4_ITEM_2 ; 3A X + const HS_POKEMONTOWER_4_ITEM_3 ; 3B X + const HS_POKEMONTOWER_5_ITEM ; 3C X + const HS_POKEMONTOWER_6_ITEM_1 ; 3D X + const HS_POKEMONTOWER_6_ITEM_2 ; 3E X + const HS_POKEMONTOWER_7_ROCKET_1 ; 3F X + const HS_POKEMONTOWER_7_ROCKET_2 ; 40 X + const HS_POKEMONTOWER_7_ROCKET_3 ; 41 X const_value SET $43 ; replace the tower rockets with jessie/james const HS_POKEMONTOWER_7_MR_FUJI ; 43 diff --git a/data/mapObjects/oakslab.asm b/data/mapObjects/oakslab.asm index 53d6b85b..779b458f 100755 --- a/data/mapObjects/oakslab.asm +++ b/data/mapObjects/oakslab.asm @@ -7,18 +7,16 @@ OaksLabObject: ; 0x1d40a (size=88) db $0 ; signs - db $b ; objects - object SPRITE_BLUE, $4, $3, STAY, NONE, $1, OPP_SONY1, $1 - object SPRITE_BALL, $6, $3, STAY, NONE, $2 ; person - object SPRITE_BALL, $7, $3, STAY, NONE, $3 ; person - object SPRITE_BALL, $8, $3, STAY, NONE, $4 ; person - object SPRITE_OAK, $5, $2, STAY, DOWN, $5 ; person - object SPRITE_BOOK_MAP_DEX, $2, $1, STAY, NONE, $6 ; person - object SPRITE_BOOK_MAP_DEX, $3, $1, STAY, NONE, $7 ; person - object SPRITE_OAK, $5, $a, STAY, UP, $8 ; person - object SPRITE_GIRL, $1, $9, WALK, $1, $9 ; person - object SPRITE_OAK_AIDE, $2, $a, STAY, NONE, $a ; person - object SPRITE_OAK_AIDE, $8, $a, STAY, NONE, $b ; person + db $9 ; objects + object SPRITE_BLUE, $4, $3, STAY, NONE, $41, OPP_SONY1, $1 + object SPRITE_BALL, $7, $3, STAY, NONE, $2 ; person + object SPRITE_OAK, $5, $2, STAY, DOWN, $3 ; person + object SPRITE_BOOK_MAP_DEX, $2, $1, STAY, NONE, $4 ; person + object SPRITE_BOOK_MAP_DEX, $3, $1, STAY, NONE, $5 ; person + object SPRITE_OAK, $5, $a, STAY, UP, $6 ; person + object SPRITE_GIRL, $1, $9, WALK, $1, $7 ; person + object SPRITE_OAK_AIDE, $2, $a, STAY, NONE, $8 ; person + object SPRITE_OAK_AIDE, $8, $a, STAY, NONE, $9 ; person ; warp-to EVENT_DISP OAKS_LAB_WIDTH, $b, $4 diff --git a/main.asm b/main.asm index 60a25157..d80a7939 100755 --- a/main.asm +++ b/main.asm @@ -289,15 +289,22 @@ INCLUDE "data/mapHeaders/route1.asm" INCLUDE "data/mapObjects/route1.asm" Route1Blocks: ; 1c0fc INCBIN "maps/route1.blk" - dr $1c1b0,$1c21e ; headers, objects, blocks + dr $1c1b0,$1c1c0 ; headers, objects, blocks +OaksLabBlocks: +INCBIN "maps/oakslab.blk" + dr $1c1de,$1c21e ; headers, objects, blocks INCLUDE "engine/clear_save.asm" INCLUDE "engine/predefs7.asm" INCLUDE "scripts/cinnabarisland.asm" - ; dr $1c2c2,$1c358 ; map scripts INCLUDE "scripts/route1.asm" - dr $1c386,$1e2ae ; map scripts + +INCLUDE "data/mapHeaders/oakslab.asm" +INCLUDE "scripts/oakslab.asm" +INCLUDE "data/mapObjects/oakslab.asm" + + dr $1cc6e,$1e2ae ; map scripts INCLUDE "engine/menu/oaks_pc.asm" diff --git a/scripts/oakslab.asm b/scripts/oakslab.asm index 2970fa2a..81d78359 100755 --- a/scripts/oakslab.asm +++ b/scripts/oakslab.asm @@ -7,7 +7,8 @@ OaksLabScript: ; 1cb0e (7:4b0e) ld [wDoNotWaitForButtonPressAfterDisplayingText], a ld hl, OaksLabScriptPointers ld a, [W_OAKSLABCURSCRIPT] - jp JumpTable + call JumpTable + ret OaksLabScriptPointers: ; 1cb28 (7:4b28) dw OaksLabScript0 @@ -29,6 +30,10 @@ OaksLabScriptPointers: ; 1cb28 (7:4b28) dw OaksLabScript16 dw OaksLabScript17 dw OaksLabScript18 + dw OaksLabScript19 + dw OaksLabScript20 + dw OaksLabScript21 + dw OaksLabScript22 OaksLabScript0: ; 1cb4e (7:4b4e) CheckEvent EVENT_OAK_APPEARED_IN_PALLET @@ -47,7 +52,7 @@ OaksLabScript0: ; 1cb4e (7:4b4e) ret OaksLabScript1: ; 1cb6e (7:4b6e) - ld a, $8 + ld a, $6 ld [H_SPRITEINDEX], a ld de, OakEntryMovement call MoveSprite @@ -90,7 +95,7 @@ OaksLabScript3: ; 1cba2 (7:4ba2) xor a ld [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay - ld a, $5 + ld a, $3 ld [H_SPRITEINDEX], a xor a ld [hSpriteFacingDirection], a @@ -104,7 +109,7 @@ PlayerEntryMovementRLE: ; 1cbcf (7:4bcf) db D_UP,$8 db $ff -OaksLabScript4: ; 1cbd2 (7:4bd2) +OaksLabScript4: ; 1cbd2 (7:445f) ld a, [wSimulatedJoypadStatesIndex] and a ret nz @@ -115,7 +120,6 @@ OaksLabScript4: ; 1cbd2 (7:4bd2) ld a, SPRITE_FACING_UP ld [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay - call UpdateSprites ld hl, wFlags_D733 res 1, [hl] call PlayDefaultMusic @@ -125,24 +129,29 @@ OaksLabScript4: ; 1cbd2 (7:4bd2) ret OaksLabScript5: ; 1cbfd (7:4bfd) + ld hl, wd74b + set 1, [hl] ld a, $fc ld [wJoyIgnore], a - ld a, $11 + ld a, $d ld [hSpriteIndexOrTextID], a call DisplayTextID call Delay3 - ld a, $12 + ld a, $e ld [hSpriteIndexOrTextID], a call DisplayTextID call Delay3 - ld a, $13 + ld a, $2 + ld [wSpriteStateData1 + 1 * $10 + 1], a + ld a, SPRITE_FACING_UP + ld [wSpriteStateData1 + 1 * $10 + 9], a + ld a, $f ld [hSpriteIndexOrTextID], a call DisplayTextID call Delay3 - ld a, $14 + ld a, $10 ld [hSpriteIndexOrTextID], a call DisplayTextID - SetEvent EVENT_OAK_ASKED_TO_CHOOSE_MON xor a ld [wJoyIgnore], a @@ -154,7 +163,7 @@ OaksLabScript6: ; 1cc36 (7:4c36) ld a, [wYCoord] cp $6 ret nz - ld a, $5 + ld a, $3 ld [H_SPRITEINDEX], a xor a ; SPRITE_FACING_DOWN ld [hSpriteFacingDirection], a @@ -165,7 +174,7 @@ OaksLabScript6: ; 1cc36 (7:4c36) ld [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay call UpdateSprites - ld a, $c + ld a, $a ld [hSpriteIndexOrTextID], a call DisplayTextID ld a, $1 @@ -191,1048 +200,121 @@ OaksLabScript7: ; 1cc72 (7:4c72) ret OaksLabScript8: ; 1cc80 (7:4c80) - ld a, [W_PLAYERSTARTER] - cp STARTER1 - jr z, .Charmander - cp STARTER2 - jr z, .Squirtle - jr .Bulbasaur -.Charmander - ld de, .MiddleBallMovement1 - ld a, [wYCoord] - cp $4 ; is the player standing below the table? - jr z, .asm_1ccf3 - ld de, .MiddleBallMovement2 - jr .asm_1ccf3 - -.MiddleBallMovement1 - db NPC_MOVEMENT_DOWN - db NPC_MOVEMENT_DOWN - db NPC_MOVEMENT_RIGHT - db NPC_MOVEMENT_RIGHT - db NPC_MOVEMENT_RIGHT - db NPC_MOVEMENT_UP - db $FF - -.MiddleBallMovement2 - db NPC_MOVEMENT_DOWN - db NPC_MOVEMENT_RIGHT - db NPC_MOVEMENT_RIGHT - db NPC_MOVEMENT_RIGHT - db $FF - -.Squirtle - ld de, .RightBallMovement1 - ld a, [wYCoord] - cp $4 ; is the player standing below the table? - jr z, .asm_1ccf3 - ld de, .RightBallMovement2 - jr .asm_1ccf3 - -.RightBallMovement1 - db NPC_MOVEMENT_DOWN - db NPC_MOVEMENT_DOWN - db NPC_MOVEMENT_RIGHT - db NPC_MOVEMENT_RIGHT - db NPC_MOVEMENT_RIGHT - db NPC_MOVEMENT_RIGHT - db NPC_MOVEMENT_UP - db $FF - -.RightBallMovement2 - db NPC_MOVEMENT_DOWN - db NPC_MOVEMENT_RIGHT - db NPC_MOVEMENT_RIGHT - db NPC_MOVEMENT_RIGHT - db NPC_MOVEMENT_RIGHT - db $FF - -.Bulbasaur - ld de, .LeftBallMovement1 - ld a, [wXCoord] - cp $9 ; is the player standing to the right of the table? - jr nz, .asm_1ccf3 - push hl ld a, $1 - ld [H_SPRITEINDEX], a - ld a, $4 - ld [H_SPRITEDATAOFFSET], a - call GetPointerWithinSpriteStateData1 - push hl - ld [hl], $4c - inc hl - inc hl - ld [hl], $0 - pop hl - inc h - ld [hl], $8 - inc hl - ld [hl], $9 - ld de, .LeftBallMovement2 ; the rival is not currently onscreen, so account for that - pop hl - jr .asm_1ccf3 - -.LeftBallMovement1 - db NPC_MOVEMENT_DOWN - db NPC_MOVEMENT_RIGHT ; not yet terminated! -.LeftBallMovement2 - db NPC_MOVEMENT_RIGHT - db $FF - -.asm_1ccf3 - ld a, $1 - ld [H_SPRITEINDEX], a + ld [hSpriteIndexOrTextID], a + ld de, .SonyPushesPlayerAwayFromEeveeBall call MoveSprite - ld a, $9 ld [W_OAKSLABCURSCRIPT], a ret +.SonyPushesPlayerAwayFromEeveeBall + db $00 + db $07 + db $07 + db $07 + db $FF + OaksLabScript9: ; 1cd00 (7:4d00) ld a, [wd730] bit 0, a - ret nz - ld a, $fc - ld [wJoyIgnore], a - ld a, $1 - ld [H_SPRITEINDEX], a - ld a, SPRITE_FACING_UP - ld [hSpriteFacingDirection], a - call SetSpriteFacingDirectionAndDelay - ld a, $d - ld [hSpriteIndexOrTextID], a - call DisplayTextID - ld a, [wRivalStarterBallSpriteIndex] - cp $2 - jr nz, .asm_1cd28 + jr nz, .asm_1c564 ld a, HS_STARTER_BALL_1 - jr .asm_1cd32 -.asm_1cd28 - cp $3 - jr nz, .asm_1cd30 - ld a, HS_STARTER_BALL_2 - jr .asm_1cd32 -.asm_1cd30 - ld a, HS_STARTER_BALL_3 -.asm_1cd32 ld [wMissableObjectIndex], a predef HideObject - call Delay3 - ld a, [wRivalStarterTemp] - ld [W_RIVALSTARTER], a - ld [wcf91], a - ld [wd11e], a - call GetMonName ld a, $1 ld [H_SPRITEINDEX], a ld a, SPRITE_FACING_UP ld [hSpriteFacingDirection], a call SetSpriteFacingDirectionAndDelay - ld a, $e + ld a, 1 + ld [W_RIVALSTARTER], a + ld a, EEVEE + ld [wd11e], a + call GetMonName + ld a, $FF ^ (A_BUTTON | B_BUTTON) + ld [wJoyIgnore], a + ld a, $11 ld [hSpriteIndexOrTextID], a call DisplayTextID - SetEvent EVENT_GOT_STARTER - xor a - ld [wJoyIgnore], a ld a, $a ld [W_OAKSLABCURSCRIPT], a ret -OaksLabScript10: ; 1cd6d (7:4d6d) +.asm_1c564 ld a, [wYCoord] - cp $6 + cp $4 ret nz - ld a, $1 - ld [H_SPRITEINDEX], a - xor a ; SPRITE_FACING_DOWN - ld [hSpriteFacingDirection], a - call SetSpriteFacingDirectionAndDelay - ld a, PLAYER_DIR_UP - ld [wPlayerMovingDirection], a - ld c, BANK(Music_MeetRival) - ld a, MUSIC_MEET_RIVAL - call PlayMusic - ld a, $f - ld [hSpriteIndexOrTextID], a - call DisplayTextID - ld a, $1 - ld [hNPCPlayerRelativePosPerspective], a - ld a, $1 - swap a - ld [hNPCSpriteOffset], a - predef CalcPositionOfPlayerRelativeToNPC - ld a, [hNPCPlayerYDistance] - dec a - ld [hNPCPlayerYDistance], a - predef FindPathToPlayer - ld de, wNPCMovementDirections2 - ld a, $1 - ld [H_SPRITEINDEX], a - call MoveSprite - - ld a, $b - ld [W_OAKSLABCURSCRIPT], a - ret - -OaksLabScript11: ; 1cdb9 (7:4db9) - ld a, [wd730] - bit 0, a + ld a, [wNPCNumScriptedSteps] + cp 1 ret nz - - ; define which team rival uses, and fight it - ld a, OPP_SONY1 - ld [wCurOpponent], a - ld a, [W_RIVALSTARTER] - cp STARTER2 - jr nz, .NotSquirtle - ld a, $1 - jr .done -.NotSquirtle - cp STARTER3 - jr nz, .Charmander - ld a, $2 - jr .done -.Charmander - ld a, $3 -.done - ld [wTrainerNo], a - ld a, $1 - ld [wSpriteIndex], a - call GetSpritePosition1 - ld hl, OaksLabText_1d3be - ld de, OaksLabText_1d3c3 - call SaveEndBattleTextPointers - ld hl, wd72d - set 6, [hl] - set 7, [hl] - xor a - ld [wJoyIgnore], a - ld a, PLAYER_DIR_UP - ld [wPlayerMovingDirection], a - ld a, $c - ld [W_OAKSLABCURSCRIPT], a - ret - -OaksLabScript12: ; 1ce03 (7:4e03) - ld a, $f0 - ld [wJoyIgnore], a - ld a, PLAYER_DIR_UP + ld a, PLAYER_DIR_LEFT ld [wPlayerMovingDirection], a - call UpdateSprites - ld a, $1 - ld [wSpriteIndex], a - call SetSpritePosition1 - ld a, $1 - ld [H_SPRITEINDEX], a - xor a ; SPRITE_FACING_DOWN - ld [hSpriteFacingDirection], a - call SetSpriteFacingDirectionAndDelay - predef HealParty - SetEvent EVENT_BATTLED_RIVAL_IN_OAKS_LAB - - ld a, $d - ld [W_OAKSLABCURSCRIPT], a - ret - -OaksLabScript13: ; 1ce32 (7:4e32) - ld c, 20 - call DelayFrames - ld a, $10 - ld [hSpriteIndexOrTextID], a - call DisplayTextID - callba Music_RivalAlternateStart - ld a, $1 - ld [H_SPRITEINDEX], a - ld de, .RivalExitMovement - call MoveSprite - ld a, [wXCoord] - cp $4 - ; move left or right depending on where the player is standing - jr nz, .moveLeft - ld a, NPC_MOVEMENT_RIGHT - jr .next -.moveLeft - ld a, NPC_MOVEMENT_LEFT -.next - ld [wNPCMovementDirections], a - - ld a, $e - ld [W_OAKSLABCURSCRIPT], a + ld a, $2 + ld [wSimulatedJoypadStatesIndex], a + ld a, D_RIGHT + ld [wSimulatedJoypadStatesEnd], a + ld [wSimulatedJoypadStatesEnd + 1], a + call StartSimulatingJoypadStates ret -.RivalExitMovement - db $E0 ; change sprite facing direction - db NPC_MOVEMENT_DOWN - db NPC_MOVEMENT_DOWN - db NPC_MOVEMENT_DOWN - db NPC_MOVEMENT_DOWN - db NPC_MOVEMENT_DOWN - db $FF - -OaksLabScript14: ; 1ce6d (7:4e6d) - ld a, [wd730] - bit 0, a - jr nz, .asm_1ce8c - ld a, HS_OAKS_LAB_RIVAL - ld [wMissableObjectIndex], a - predef HideObject - xor a - ld [wJoyIgnore], a - call PlayDefaultMusic ; reset to map music - ld a, $12 - ld [W_OAKSLABCURSCRIPT], a - jr .done -; make the player keep facing the rival as he walks away -.asm_1ce8c - ld a, [wNPCNumScriptedSteps] - cp $5 - jr nz, .asm_1cea8 - ld a, [wXCoord] - cp $4 - jr nz, .asm_1cea1 - ld a, SPRITE_FACING_RIGHT - ld [wSpriteStateData1 + 9], a - jr .done -.asm_1cea1 - ld a, SPRITE_FACING_LEFT - ld [wSpriteStateData1 + 9], a - jr .done -.asm_1cea8 +OaksLabScript10: ; 1cd6d (7:4d6d) + ld a, [wYCoord] cp $4 - ret nz - xor a ; ld a, SPRITE_FACING_DOWN - ld [wSpriteStateData1 + 9], a -.done - ret - -OaksLabScript15: ; 1ceb0 (7:4eb0) - xor a - ld [hJoyHeld], a - call EnableAutoTextBoxDrawing - ld a, $ff - ld [wNewSoundID], a - call PlaySound - callba Music_RivalAlternateStart - ld a, $15 - ld [hSpriteIndexOrTextID], a - call DisplayTextID - call OaksLabScript_1d02b - ld a, HS_OAKS_LAB_RIVAL - ld [wMissableObjectIndex], a - predef ShowObject - ld a, [wNPCMovementDirections2Index] - ld [wSavedNPCMovementDirections2Index], a - ld b, 0 - ld c, a - ld hl, wNPCMovementDirections2 - ld a, NPC_MOVEMENT_UP - call FillMemory - ld [hl], $ff - ld a, $1 - ld [H_SPRITEINDEX], a - ld de, wNPCMovementDirections2 - call MoveSprite - - ld a, $10 - ld [W_OAKSLABCURSCRIPT], a - ret - -OaksLabScript_1cefd: ; 1cefd (7:4efd) - ld a, $1 - ld [H_SPRITEINDEX], a - ld a, SPRITE_FACING_UP - ld [hSpriteFacingDirection], a - call SetSpriteFacingDirectionAndDelay - ld a, $8 - ld [H_SPRITEINDEX], a - xor a ; SPRITE_FACING_DOWN - ld [hSpriteFacingDirection], a - jp SetSpriteFacingDirectionAndDelay - -OaksLabScript16: ; 1cf12 (7:4f12) - ld a, [wd730] - bit 0, a - ret nz - call EnableAutoTextBoxDrawing - call PlayDefaultMusic - ld a, $fc - ld [wJoyIgnore], a - call OaksLabScript_1cefd - ld a, $16 - ld [hSpriteIndexOrTextID], a - call DisplayTextID - call DelayFrame - call OaksLabScript_1cefd - ld a, $17 - ld [hSpriteIndexOrTextID], a - call DisplayTextID - call DelayFrame - call OaksLabScript_1cefd - ld a, $18 - ld [hSpriteIndexOrTextID], a - call DisplayTextID - call DelayFrame - ld a, $19 - ld [hSpriteIndexOrTextID], a - call DisplayTextID - call Delay3 - ld a, HS_POKEDEX_1 - ld [wMissableObjectIndex], a - predef HideObject - ld a, HS_POKEDEX_2 - ld [wMissableObjectIndex], a - predef HideObject - call OaksLabScript_1cefd - ld a, $1a - ld [hSpriteIndexOrTextID], a - call DisplayTextID + jr z, .asm_1c599 ld a, $1 - ld [H_SPRITEINDEX], a - ld a, SPRITE_FACING_RIGHT - ld [hSpriteFacingDirection], a - call SetSpriteFacingDirectionAndDelay - call Delay3 - ld a, $1b - ld [hSpriteIndexOrTextID], a - call DisplayTextID - SetEvent EVENT_GOT_POKEDEX - SetEvent EVENT_OAK_GOT_PARCEL - ld a, HS_LYING_OLD_MAN - ld [wMissableObjectIndex], a - predef HideObject - ld a, HS_OLD_MAN - ld [wMissableObjectIndex], a - predef ShowObject - ld a, [wSavedNPCMovementDirections2Index] - ld b, 0 - ld c, a - ld hl, wNPCMovementDirections2 - xor a ; NPC_MOVEMENT_DOWN - call FillMemory - ld [hl], $ff - ld a, $ff - ld [wNewSoundID], a - call PlaySound - callba Music_RivalAlternateStart - ld a, $1 - ld [H_SPRITEINDEX], a - ld de, wNPCMovementDirections2 - call MoveSprite - - ld a, $11 - ld [W_OAKSLABCURSCRIPT], a - ret - -OaksLabScript17: ; 1cfd4 (7:4fd4) - ld a, [wd730] - bit 0, a - ret nz - call PlayDefaultMusic - ld a, HS_OAKS_LAB_RIVAL - ld [wMissableObjectIndex], a - predef HideObject - SetEvent EVENT_1ST_ROUTE22_RIVAL_BATTLE - ResetEventReuseHL EVENT_2ND_ROUTE22_RIVAL_BATTLE - SetEventReuseHL EVENT_ROUTE22_RIVAL_WANTS_BATTLE - ld a, HS_ROUTE_22_RIVAL_1 - ld [wMissableObjectIndex], a - predef ShowObject - ld a, $5 - ld [W_PALLETTOWNCURSCRIPT], a - xor a - ld [wJoyIgnore], a + ld [wSimulatedJoypadStatesIndex], a + ld a, D_LEFT + ld [wSimulatedJoypadStatesEnd], a + jr .asm_1c5a6 - ld a, $12 +.asm_1c599 + ld hl, wSimulatedJoypadStatesEnd + ld de, OaksLabRLE_PlayerWalksToOak + call DecodeRLEList + dec a + ld [wSimulatedJoypadStatesIndex], a +.asm_1c5a6 + call StartSimulatingJoypadStates + ld a, $b ld [W_OAKSLABCURSCRIPT], a ret -OaksLabScript18: ; 1d009 (7:5009) - ret - -OaksLabScript_RemoveParcel: ; 1d00a (7:500a) - ld hl, wBagItems - ld bc, $0000 -.loop - ld a, [hli] - cp $ff - ret z - cp OAKS_PARCEL - jr z, .foundParcel - inc hl - inc c - jr .loop -.foundParcel - ld hl, wNumBagItems - ld a, c - ld [wWhichPokemon], a - ld a, $1 - ld [wItemQuantity], a - jp RemoveItemFromInventory +OaksLabRLE_PlayerWalksToOak: + db D_UP, 2 + db D_LEFT, 3 + db D_DOWN, 1 + db D_LEFT, 1 + db $FF -OaksLabScript_1d02b: ; 1d02b (7:502b) - ld a, $7c - ld [$ffeb], a - ld a, $8 - ld [$ffee], a - ld a, [wYCoord] - cp $3 - jr nz, .asm_1d045 - ld a, $4 - ld [wNPCMovementDirections2Index], a - ld a, $30 - ld b, $b - jr .asm_1d068 -.asm_1d045 - cp $1 - jr nz, .asm_1d054 - ld a, $2 - ld [wNPCMovementDirections2Index], a - ld a, $30 - ld b, $9 - jr .asm_1d068 -.asm_1d054 - ld a, $3 - ld [wNPCMovementDirections2Index], a - ld b, $a - ld a, [wXCoord] - cp $4 - jr nz, .asm_1d066 - ld a, $40 - jr .asm_1d068 -.asm_1d066 - ld a, $20 -.asm_1d068 - ld [$ffec], a - ld a, b - ld [$ffed], a - ld a, $1 - ld [wSpriteIndex], a - call SetSpritePosition1 - ret -OaksLabScript_1d076: ; 1d076 (7:5076) - ld hl, OaksLabTextPointers + $36 ; starts at OaksLabText28 - ld a, l - ld [wMapTextPtr], a - ld a, h - ld [wMapTextPtr+1], a - ret +OaksLabScript11: + dr $1c5b8,$1c5ce +OaksLabScript12: + dr $1c5ce,$1c61a +OaksLabScript13: + dr $1c61a,$1c651 +OaksLabScript14: + dr $1c651,$1c692 +OaksLabScript15: + dr $1c692,$1c6ce +OaksLabScript16: + dr $1c6ce,$1c70b +OaksLabScript17: + dr $1c70b,$1c72d +OaksLabScript18: + dr $1c72d,$1c73e +OaksLabScript19: + dr $1c73e,$1c7a4 +OaksLabScript20: + dr $1c7a4,$1c866 +OaksLabScript21: + dr $1c866,$1c896 +OaksLabScript22: + dr $1c896,$1c904 +OaksLabScript_1d076: + dr $1c904,$1c910 OaksLabTextPointers: ; 1d082 (7:5082) - dw OaksLabText1 - dw OaksLabText2 - dw OaksLabText3 - dw OaksLabText4 - dw OaksLabText5 - dw OaksLabText6 - dw OaksLabText7 - dw OaksLabText8 - dw OaksLabText9 - dw OaksLabText10 - dw OaksLabText11 - dw OaksLabText12 - dw OaksLabText13 - dw OaksLabText14 - dw OaksLabText15 - dw OaksLabText16 - dw OaksLabText17 - dw OaksLabText18 - dw OaksLabText19 - dw OaksLabText20 - dw OaksLabText21 - dw OaksLabText22 - dw OaksLabText23 - dw OaksLabText24 - dw OaksLabText25 - dw OaksLabText26 - dw OaksLabText27 - dw OaksLabText28 - dw OaksLabText29 - dw OaksLabText30 - dw OaksLabText31 - dw OaksLabText32 - dw OaksLabText33 - dw OaksLabText34 - dw OaksLabText35 - dw OaksLabText36 - dw OaksLabText37 - dw OaksLabText38 - -OaksLabText28: ; 1d0ce (7:50ce) -OaksLabText1: ; 1d0ce (7:50ce) - TX_ASM - CheckEvent EVENT_FOLLOWED_OAK_INTO_LAB_2 - jr nz, .asm_1d0de - ld hl, OaksLabGaryText1 - call PrintText - jr .asm_1d0f0 -.asm_1d0de - bit 2, a - jr nz, .asm_1d0ea - ld hl, OaksLabText40 - call PrintText - jr .asm_1d0f0 -.asm_1d0ea - ld hl, OaksLabText41 - call PrintText -.asm_1d0f0 - jp TextScriptEnd - -OaksLabGaryText1: ; 1d0f3 (7:50f3) - TX_FAR _OaksLabGaryText1 - db "@" - -OaksLabText40: ; 1d0f8 (7:50f8) - TX_FAR _OaksLabText40 - db "@" - -OaksLabText41: ; 1d0fd (7:50fd) - TX_FAR _OaksLabText41 - db "@" - -OaksLabText29: ; 1d102 (7:5102) -OaksLabText2: ; 1d102 (7:5102) - TX_ASM - ld a, STARTER2 - ld [wRivalStarterTemp], a - ld a, $3 - ld [wRivalStarterBallSpriteIndex], a - ld a, STARTER1 - ld b, $2 - jr OaksLabScript_1d133 - -OaksLabText30: ; 1d113 (7:5113) -OaksLabText3: ; 1d113 (7:5113) - TX_ASM - ld a, STARTER3 - ld [wRivalStarterTemp], a - ld a, $4 - ld [wRivalStarterBallSpriteIndex], a - ld a, STARTER2 - ld b, $3 - jr OaksLabScript_1d133 - -OaksLabText31: ; 1d124 (7:5124) -OaksLabText4: ; 1d124 (7:5124) - TX_ASM - ld a, STARTER1 - ld [wRivalStarterTemp], a - ld a, $2 - ld [wRivalStarterBallSpriteIndex], a - ld a, STARTER3 - ld b, $4 - -OaksLabScript_1d133: ; 1d133 (7:5133) - ld [wcf91], a - ld [wd11e], a - ld a, b - ld [wSpriteIndex], a - CheckEvent EVENT_GOT_STARTER - jp nz, OaksLabScript_1d22d - CheckEventReuseA EVENT_OAK_ASKED_TO_CHOOSE_MON - jr nz, OaksLabScript_1d157 - ld hl, OaksLabText39 - call PrintText - jp TextScriptEnd - -OaksLabText39: ; 1d152 (7:5152) - TX_FAR _OaksLabText39 - db "@" - -OaksLabScript_1d157: ; 1d157 (7:5157) - ld a, $5 - ld [H_SPRITEINDEX], a - ld a, $9 - ld [H_SPRITEDATAOFFSET], a - call GetPointerWithinSpriteStateData1 - ld [hl], SPRITE_FACING_DOWN - ld a, $1 - ld [H_SPRITEINDEX], a - ld a, $9 - ld [H_SPRITEDATAOFFSET], a - call GetPointerWithinSpriteStateData1 - ld [hl], SPRITE_FACING_RIGHT - ld hl, wd730 - set 6, [hl] - predef StarterDex - ld hl, wd730 - res 6, [hl] - call ReloadMapData - ld c, 10 - call DelayFrames - ld a, [wSpriteIndex] - cp $2 - jr z, OaksLabLookAtCharmander - cp $3 - jr z, OaksLabLookAtSquirtle - jr OaksLabLookAtBulbasaur - -OaksLabLookAtCharmander: ; 1d195 (7:5195) - ld hl, OaksLabCharmanderText - jr OaksLabMonChoiceMenu -OaksLabCharmanderText: ; 1d19a (7:519a) - TX_FAR _OaksLabCharmanderText - db "@" - -OaksLabLookAtSquirtle: ; 1d19f (7:519f) - ld hl, OaksLabSquirtleText - jr OaksLabMonChoiceMenu -OaksLabSquirtleText: ; 1d1a4 (7:51a4) - TX_FAR _OaksLabSquirtleText - db "@" - -OaksLabLookAtBulbasaur: ; 1d1a9 (7:51a9) - ld hl, OaksLabBulbasaurText - jr OaksLabMonChoiceMenu -OaksLabBulbasaurText: ; 1d1ae (7:51ae) - TX_FAR _OaksLabBulbasaurText - db "@" - -OaksLabMonChoiceMenu: ; 1d1b3 (7:51b3) - call PrintText - ld a, $1 - ld [wDoNotWaitForButtonPressAfterDisplayingText], a - call YesNoChoice ; yes/no menu - ld a, [wCurrentMenuItem] - and a - jr nz, OaksLabMonChoiceEnd - ld a, [wcf91] - ld [W_PLAYERSTARTER], a - ld [wd11e], a - call GetMonName - ld a, [wSpriteIndex] - cp $2 - jr nz, .asm_1d1db - ld a, HS_STARTER_BALL_1 - jr .asm_1d1e5 -.asm_1d1db - cp $3 - jr nz, .asm_1d1e3 - ld a, HS_STARTER_BALL_2 - jr .asm_1d1e5 -.asm_1d1e3 - ld a, HS_STARTER_BALL_3 -.asm_1d1e5 - ld [wMissableObjectIndex], a - predef HideObject - ld a, $1 - ld [wDoNotWaitForButtonPressAfterDisplayingText], a - ld hl, OaksLabMonEnergeticText - call PrintText - ld hl, OaksLabReceivedMonText - call PrintText - xor a ; PLAYER_PARTY_DATA - ld [wMonDataLocation], a - ld a, 5 - ld [wCurEnemyLVL], a - ld a, [wcf91] - ld [wd11e], a - call AddPartyMon - ld hl, wd72e - set 3, [hl] - ld a, $fc - ld [wJoyIgnore], a - ld a, $8 - ld [W_OAKSLABCURSCRIPT], a -OaksLabMonChoiceEnd: ; 1d21f (7:521f) - jp TextScriptEnd - -OaksLabMonEnergeticText: ; 1d222 (7:5222) - TX_FAR _OaksLabMonEnergeticText - db "@" - -OaksLabReceivedMonText: ; 1d227 (7:5227) - TX_FAR _OaksLabReceivedMonText - db $11, "@" - -OaksLabScript_1d22d: ; 1d22d (7:522d) - ld a, $5 - ld [H_SPRITEINDEX], a - ld a, $9 - ld [H_SPRITEDATAOFFSET], a - call GetPointerWithinSpriteStateData1 - ld [hl], $0 - ld hl, OaksLabLastMonText - call PrintText - jp TextScriptEnd - -OaksLabLastMonText: ; 1d243 (7:5243) - TX_FAR _OaksLabLastMonText - db "@" - -OaksLabText32: ; 1d248 (7:5248) -OaksLabText5: ; 1d248 (7:5248) - TX_ASM - CheckEvent EVENT_PALLET_AFTER_GETTING_POKEBALLS - jr nz, .asm_1d266 - ld hl, wPokedexOwned - ld b, wPokedexOwnedEnd - wPokedexOwned - call CountSetBits - ld a, [wNumSetBits] - cp 2 - jr c, .asm_1d279 - CheckEvent EVENT_GOT_POKEDEX - jr z, .asm_1d279 -.asm_1d266 - ld hl, OaksLabText_1d31d - call PrintText - ld a, $1 - ld [wDoNotWaitForButtonPressAfterDisplayingText], a - predef DisplayDexRating - jp .asm_1d2ed -.asm_1d279 - ld b,POKE_BALL - call IsItemInBag - jr nz, .asm_1d2e7 - CheckEvent EVENT_BEAT_ROUTE22_RIVAL_1ST_BATTLE - jr nz, .asm_1d2d0 - CheckEvent EVENT_GOT_POKEDEX - jr nz, .asm_1d2c8 - CheckEventReuseA EVENT_BATTLED_RIVAL_IN_OAKS_LAB - jr nz, .asm_1d2a9 - ld a, [wd72e] - bit 3, a - jr nz, .asm_1d2a1 - ld hl, OaksLabText_1d2f0 - call PrintText - jr .asm_1d2ed -.asm_1d2a1 - ld hl, OaksLabText_1d2f5 - call PrintText - jr .asm_1d2ed -.asm_1d2a9 - ld b, OAKS_PARCEL - call IsItemInBag - jr nz, .asm_1d2b8 - ld hl, OaksLabText_1d2fa - call PrintText - jr .asm_1d2ed -.asm_1d2b8 - ld hl, OaksLabDeliverParcelText - call PrintText - call OaksLabScript_RemoveParcel - ld a, $f - ld [W_OAKSLABCURSCRIPT], a - jr .asm_1d2ed -.asm_1d2c8 - ld hl, OaksLabAroundWorldText - call PrintText - jr .asm_1d2ed -.asm_1d2d0 - CheckAndSetEvent EVENT_GOT_POKEBALLS_FROM_OAK - jr nz, .asm_1d2e7 - lb bc, POKE_BALL, 5 - call GiveItem - ld hl, OaksLabGivePokeballsText - call PrintText - jr .asm_1d2ed -.asm_1d2e7 - ld hl, OaksLabPleaseVisitText - call PrintText -.asm_1d2ed - jp TextScriptEnd - -OaksLabText_1d2f0: ; 1d2f0 (7:52f0) - TX_FAR _OaksLabText_1d2f0 - db "@" - -OaksLabText_1d2f5: ; 1d2f5 (7:52f5) - TX_FAR _OaksLabText_1d2f5 - db "@" - -OaksLabText_1d2fa: ; 1d2fa (7:52fa) - TX_FAR _OaksLabText_1d2fa - db "@" - -OaksLabDeliverParcelText: ; 1d2ff (7:52ff) - TX_FAR _OaksLabDeliverParcelText1 - db $11 - TX_FAR _OaksLabDeliverParcelText2 - db "@" - -OaksLabAroundWorldText: ; 1d309 (7:5309) - TX_FAR _OaksLabAroundWorldText - db "@" - -OaksLabGivePokeballsText: ; 1d30e (7:530e) - TX_FAR _OaksLabGivePokeballsText1 - db $11 - TX_FAR _OaksLabGivePokeballsText2 - db "@" - -OaksLabPleaseVisitText: ; 1d318 (7:5318) - TX_FAR _OaksLabPleaseVisitText - db "@" - -OaksLabText_1d31d: ; 1d31d (7:531d) - TX_FAR _OaksLabText_1d31d - db "@" - -OaksLabText34: ; 1d322 (7:5322) -OaksLabText33: ; 1d322 (7:5322) -OaksLabText7: ; 1d322 (7:5322) -OaksLabText6: ; 1d322 (7:5322) - TX_ASM - ld hl, OaksLabText_1d32c - call PrintText - jp TextScriptEnd - -OaksLabText_1d32c: ; 1d32c (7:532c) - TX_FAR _OaksLabText_1d32c - db "@" - -OaksLabText35: ; 1d331 (7:5331) -OaksLabText8: ; 1d331 (7:5331) - TX_FAR _OaksLabText8 - db "@" - -OaksLabText36: ; 1d336 (7:5336) -OaksLabText9: ; 1d336 (7:5336) - TX_ASM - ld hl, OaksLabText_1d340 - call PrintText - jp TextScriptEnd - -OaksLabText_1d340: ; 1d340 (7:5340) - TX_FAR _OaksLabText_1d340 - db "@" - -OaksLabText17: ; 1d345 (7:5345) - TX_ASM - ld hl, OaksLabRivalWaitingText - call PrintText - jp TextScriptEnd - -OaksLabRivalWaitingText: ; 1d34f (7:534f) - TX_FAR _OaksLabRivalWaitingText - db "@" - -OaksLabText18: ; 1d354 (7:5354) - TX_ASM - ld hl, OaksLabChooseMonText - call PrintText - jp TextScriptEnd - -OaksLabChooseMonText: ; 1d35e (7:535e) - TX_FAR _OaksLabChooseMonText - db "@" - -OaksLabText19: ; 1d363 (7:5363) - TX_ASM - ld hl, OaksLabRivalInterjectionText - call PrintText - jp TextScriptEnd - -OaksLabRivalInterjectionText: ; 1d36d (7:536d) - TX_FAR _OaksLabRivalInterjectionText - db "@" - -OaksLabText20: ; 1d372 (7:5372) - TX_ASM - ld hl, OaksLabBePatientText - call PrintText - jp TextScriptEnd - -OaksLabBePatientText: ; 1d37c (7:537c) - TX_FAR _OaksLabBePatientText - db "@" - -OaksLabText12: ; 1d381 (7:5381) - TX_ASM - ld hl, OaksLabLeavingText - call PrintText - jp TextScriptEnd - -OaksLabLeavingText: ; 1d38b (7:538b) - TX_FAR _OaksLabLeavingText - db "@" - -OaksLabText13: ; 1d390 (7:5390) - TX_ASM - ld hl, OaksLabRivalPickingMonText - call PrintText - jp TextScriptEnd - -OaksLabRivalPickingMonText: ; 1d39a (7:539a) - TX_FAR _OaksLabRivalPickingMonText - db "@" - -OaksLabText14: ; 1d39f (7:539f) - TX_ASM - ld hl, OaksLabRivalReceivedMonText - call PrintText - jp TextScriptEnd - -OaksLabRivalReceivedMonText: ; 1d3a9 (7:53a9) - TX_FAR _OaksLabRivalReceivedMonText - db $11, "@" - -OaksLabText15: ; 1d3af (7:53af) - TX_ASM - ld hl, OaksLabRivalChallengeText - call PrintText - jp TextScriptEnd - -OaksLabRivalChallengeText: ; 1d3b9 (7:53b9) - TX_FAR _OaksLabRivalChallengeText - db "@" - -OaksLabText_1d3be: ; 1d3be (7:53be) - TX_FAR _OaksLabText_1d3be - db "@" - -OaksLabText_1d3c3: ; 1d3c3 (7:53c3) - TX_FAR _OaksLabText_1d3c3 - db "@" - -OaksLabText16: ; 1d3c8 (7:53c8) - TX_ASM - ld hl, OaksLabRivalToughenUpText - call PrintText - jp TextScriptEnd - -OaksLabRivalToughenUpText: ; 1d3d2 (7:53d2) - TX_FAR _OaksLabRivalToughenUpText - db "@" - -OaksLabText21: ; 1d3d7 (7:53d7) - TX_FAR _OaksLabText21 - db "@" - -OaksLabText22: ; 1d3dc (7:53dc) - TX_FAR _OaksLabText22 - db "@" - -OaksLabText23: ; 1d3e1 (7:53e1) - TX_FAR _OaksLabText23 - db "@" - -OaksLabText24: ; 1d3e6 (7:53e6) - TX_FAR _OaksLabText24 - db "@" - -OaksLabText25: ; 1d3eb (7:53eb) - TX_FAR _OaksLabText25 - db $11, "@" - -OaksLabText26: ; 1d3f1 (7:53f1) - TX_FAR _OaksLabText26 - db "@" - -OaksLabText27: ; 1d3f6 (7:53f6) - TX_FAR _OaksLabText27 - db "@" - -OaksLabText38: ; 1d3fb (7:53fb) -OaksLabText37: ; 1d3fb (7:53fb) -OaksLabText11: ; 1d3fb (7:53fb) -OaksLabText10: ; 1d3fb (7:53fb) - TX_ASM - ld hl, OaksLabText_1d405 - call PrintText - jp TextScriptEnd - -OaksLabText_1d405: ; 1d405 (7:5405) - TX_FAR _OaksLabText_1d405 - db "@" + dr $1c910,$1cc22 -- cgit v1.3.1-sl0p From 034b268aad8c52ae29d239c20895289067bdc29b Mon Sep 17 00:00:00 2001 From: pikalaxalt Date: Sat, 28 May 2016 12:07:11 -0400 Subject: Oak's Lab Rewrite part 2 --- scripts/oakslab.asm | 189 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 182 insertions(+), 7 deletions(-) (limited to 'scripts/oakslab.asm') diff --git a/scripts/oakslab.asm b/scripts/oakslab.asm index 81d78359..20b5e3b9 100755 --- a/scripts/oakslab.asm +++ b/scripts/oakslab.asm @@ -290,17 +290,186 @@ OaksLabRLE_PlayerWalksToOak: OaksLabScript11: - dr $1c5b8,$1c5ce + ld a, [wSimulatedJoypadStatesIndex] + and a + ret nz + ld a, $12 + ld [hSpriteIndexOrTextID], a + call DisplayTextID + xor a + ld [wJoyIgnore], a + + ld a, $c + ld [W_OAKSLABCURSCRIPT], a + ret + OaksLabScript12: - dr $1c5ce,$1c61a + ld a, [wYCoord] + cp $6 + ret nz + ld a, PLAYER_DIR_UP + ld [wPlayerMovingDirection], a + ld a, $1 + ld [hSpriteIndexOrTextID], a + xor a + ld [hSpriteFacingDirection], a + call SetSpriteFacingDirectionAndDelay + ld c, BANK(Music_MeetRival) + ld a, MUSIC_MEET_RIVAL + call PlayMusic + ld a, $b + ld [hSpriteIndexOrTextID], a + call DisplayTextID + ld a, $1 + ld [hNPCPlayerRelativePosPerspective], a + ld a, $1 + swap a + ld [hNPCPlayerYDistance], a + predef CalcPositionOfPlayerRelativeToNPC + ld a, [hNPCPlayerYDistance] + dec a + ld [hNPCPlayerYDistance], a + predef FindPathToPlayer + ld de, wNPCMovementDirections2 + ld a, $1 + ld [hSpriteIndexOrTextID], a + call MoveSprite + ld a, $d + ld [W_OAKSLABCURSCRIPT], a + ret + OaksLabScript13: - dr $1c61a,$1c651 + ld a, [wd730] + bit 0, a + ret nz + ld a, $1 + ld [wSpriteIndex], a + call GetSpritePosition1 + ld a, OPP_SONY1 + ld [wCurOpponent], a + ld a, $1 + ld [wTrainerNo], a + ld hl, OaksLabRivalDefeatedText + ld de, OaksLabRivalBeatYouText + call SaveEndBattleTextPointers + ld hl, wd72d + set 6, [hl] + set 7, [hl] + xor a + ld [wJoyIgnore], a + ld a, PLAYER_DIR_UP + ld [wPlayerMovingDirection], a + ld a, $e + ld [W_OAKSLABCURSCRIPT], a + ret + OaksLabScript14: - dr $1c651,$1c692 + ld a, $ff + ld [wJoyIgnore], a + + ; If you beat your rival here, his Eevee will evolve into + ; Jolteon if you beat him on Route 22, or Flareon if you + ; skip or lose that battle. + ; Otherwise, it will evolve into Vaporeon. + ld a, [wBattleResult] + and a + ld b, $3 + jr nz, .asm_1c660 + ld b, $2 +.asm_1c660 + ld a, b + ld [W_RIVALSTARTER], a + + ld a, $ff ^ (A_BUTTON | B_BUTTON) + ld [wJoyIgnore], a + ld a, PLAYER_DIR_UP + ld [wPlayerMovingDirection], a + call UpdateSprites + ld a, $1 + ld [wSpriteIndex], a + call SetSpritePosition1 + ld a, $2 + ld [wSpriteStateData1 + 1 * $10 + 1], a + xor a + ld [wSpriteStateData1 + 1 * $10 + 9], a + predef HealParty + ld hl, wd74b + set 3, [hl] + ld a, $f + ld [W_OAKSLABCURSCRIPT], a + ret + OaksLabScript15: - dr $1c692,$1c6ce + ld c, 20 + call DelayFrames + ld a, $c + ld [hSpriteIndexOrTextID], a + call DisplayTextID + callba Music_RivalAlternateStart + ld a, $1 + ld [hSpriteIndexOrTextID], a + ld de, .OaksLabMovement_RivalWalksOut1 + call MoveSprite + ld a, [wXCoord] + cp $4 + jr nz, .asm_1c6bb + ld a, NPC_MOVEMENT_RIGHT + jr .asm_1c6bd + +.asm_1c6bb + ld a, NPC_MOVEMENT_LEFT +.asm_1c6bd + ld [wNPCMovementDirections], a + ld a, $10 + ld [W_OAKSLABCURSCRIPT], a + ret + +.OaksLabMovement_RivalWalksOut1 + db $e0 + db $00 + db $04 + db $04 + db $04 + db $04 + db $04 + db $ff + OaksLabScript16: - dr $1c6ce,$1c70b + ld a, [wd730] + bit 0, a + jr nz, .asm_1c6ed + ld a, $ff ^ (A_BUTTON | B_BUTTON) + ld [wJoyIgnore], a + ld a, HS_OAKS_LAB_RIVAL + ld [wMissableObjectIndex], a + predef HideObject + call PlayDefaultMusic + ld a, $11 + ld [W_OAKSLABCURSCRIPT], a + ret + +.asm_1c6ed + ld a, [wNPCNumScriptedSteps] + cp 5 + jr nz, .asm_1c703 + ld a, [wXCoord] + cp 4 + jr nz, .asm_1c6ff + ld a, SPRITE_FACING_RIGHT + jr .asm_1c707 + +.asm_1c6ff + ld a, SPRITE_FACING_LEFT + jr .asm_1c707 + +.asm_1c703 + cp 4 + ret nz + xor a +.asm_1c707 + ld [wSpriteStateData1 + 9], a + ret + OaksLabScript17: dr $1c70b,$1c72d OaksLabScript18: @@ -317,4 +486,10 @@ OaksLabScript_1d076: dr $1c904,$1c910 OaksLabTextPointers: ; 1d082 (7:5082) - dr $1c910,$1cc22 + dr $1c910,$1cbae + +OaksLabRivalDefeatedText: + dr $1cbae,$1cbb3 + +OaksLabRivalBeatYouText: + dr $1cbb3,$1cc22 -- cgit v1.3.1-sl0p From 49c31daedc972c2f61fcfb38021c80807ada917f Mon Sep 17 00:00:00 2001 From: pikalaxalt Date: Sat, 28 May 2016 14:00:44 -0400 Subject: Oak's Lab Rewrite part 3 --- constants/hide_show_constants.asm | 4 +- constants/predef_constants.asm | 6 +- engine/bank3c.asm | 1 + scripts/oakslab.asm | 242 ++++++++++++++++++++++++++++++++++++-- 4 files changed, 240 insertions(+), 13 deletions(-) (limited to 'scripts/oakslab.asm') diff --git a/constants/hide_show_constants.asm b/constants/hide_show_constants.asm index 1e7a4347..5a6347d5 100755 --- a/constants/hide_show_constants.asm +++ b/constants/hide_show_constants.asm @@ -7,8 +7,8 @@ const_value = 0 const HS_PALLET_TOWN_OAK ; 00 - const HS_PIKACHU ; 01 - const HS_LYING_OLD_MAN ; 02 + const HS_LYING_OLD_MAN ; 01 + const HS_PERSON_02 ; 02 const HS_OLD_MAN ; 03 const HS_MUSEUM_GUY ; 04 const HS_GYM_GUY ; 05 diff --git a/constants/predef_constants.asm b/constants/predef_constants.asm index d1e81a72..76ff24a9 100644 --- a/constants/predef_constants.asm +++ b/constants/predef_constants.asm @@ -16,15 +16,15 @@ const_value = 0 predef_const DivideBCDPredef3 predef_const DivideBCDPredef4 predef_const InitPlayerData - predef_const FlagActionPredef - predef_const HideObject + predef_const FlagActionPredef ; 10 + predef_const HideObject ; 11 predef_const IsObjectHidden predef_const ApplyOutOfBattlePoisonDamage predef_const AnyPartyAlive predef_const ShowObject predef_const ShowObject2 predef_const ReplaceTileBlock - predef_const InitPlayerData2 + predef_const InitPlayerData2 ; 18 predef_const LoadTilesetHeader predef_const LearnMoveFromLevelUp predef_const LearnMove diff --git a/engine/bank3c.asm b/engine/bank3c.asm index 54649b0b..c3726c5e 100644 --- a/engine/bank3c.asm +++ b/engine/bank3c.asm @@ -349,6 +349,7 @@ INCLUDE "scripts/celadoncity2.asm" INCLUDE "scripts/route1_2.asm" INCLUDE "scripts/route22_2.asm" INCLUDE "scripts/redshouse1f2.asm" +Func_f1be0: dr $f1be0, $f220e INCLUDE "data/mapHeaders/beach_house.asm" diff --git a/scripts/oakslab.asm b/scripts/oakslab.asm index 20b5e3b9..95ee4f25 100755 --- a/scripts/oakslab.asm +++ b/scripts/oakslab.asm @@ -471,22 +471,248 @@ OaksLabScript16: ret OaksLabScript17: - dr $1c70b,$1c72d +; Pikachu comes out + ld a, SPRITE_FACING_UP + ld [wSpriteStateData1 + 9], a + ld a, $2 + ld [wd431], a + callba Func_fc4fa + call Func_1525 + ld a, $1a + ld [hSpriteIndexOrTextID], a + call DisplayTextID + ld a, $12 + ld [W_OAKSLABCURSCRIPT], a + ret + OaksLabScript18: - dr $1c72d,$1c73e + ld a, $1b + ld [hSpriteIndexOrTextID], a + call DisplayTextID + xor a + ld [wJoyIgnore], a + ld a, $16 + ld [W_OAKSLABCURSCRIPT], a + ret + OaksLabScript19: - dr $1c73e,$1c7a4 + xor a + ld [hJoyHeld], a + call EnableAutoTextBoxDrawing + call StopAllMusic + callba Music_RivalAlternateStart + ld a, $13 + ld [hSpriteIndexOrTextID], a + call DisplayTextID + callab Func_f1be0 + call OaksLabScript_1c8b9 + ld a, HS_OAKS_LAB_RIVAL + ld [wMissableObjectIndex], a + predef ShowObject + ld a, [wNPCMovementDirections2Index] + ld [wSavedNPCMovementDirections2Index], a + ld b, 0 + ld c, a + ld hl, wNPCMovementDirections2 + ld a, NPC_MOVEMENT_UP + call FillMemory + ld [hl], $ff + ld a, $1 + ld [hSpriteIndexOrTextID], a + ld de, wNPCMovementDirections2 + call MoveSprite + ld a, $14 + ld [W_OAKSLABCURSCRIPT], a + ret + +OaksLabScript_1c78e: + ld a, $1 + ld [hSpriteIndexOrTextID], a + ld a, SPRITE_FACING_UP + ld [hSpriteFacingDirection], a + call SetSpriteFacingDirectionAndDelay + ld a, $6 + ld [hSpriteIndexOrTextID], a + xor a + ld [hSpriteFacingDirection], a + call SetSpriteFacingDirectionAndDelay + ret + OaksLabScript20: - dr $1c7a4,$1c866 + ld a, [wd730] + bit 0, a + ret nz + call EnableAutoTextBoxDrawing + call PlayDefaultMusic + ld a, $ff ^ (A_BUTTON | B_BUTTON) + ld [wJoyIgnore], a + call OaksLabScript_1c78e + ld a, $14 + ld [hSpriteIndexOrTextID], a + call DisplayTextID + call DelayFrame + call OaksLabScript_1c78e + ld a, $15 + ld [hSpriteIndexOrTextID], a + call DisplayTextID + call DelayFrame + call OaksLabScript_1c78e + ld a, $16 + ld [hSpriteIndexOrTextID], a + call DisplayTextID + call DelayFrame + ld a, $17 + ld [hSpriteIndexOrTextID], a + call DisplayTextID + call Delay3 + ld a, HS_POKEDEX_1 + ld [wMissableObjectIndex], a + predef HideObject + ld a, HS_POKEDEX_2 + ld [wMissableObjectIndex], a + predef HideObject + call OaksLabScript_1c78e + ld a, $18 + ld [hSpriteIndexOrTextID], a + call DisplayTextID + ld a, $1 + ld [hSpriteIndexOrTextID], a + ld a, SPRITE_FACING_RIGHT + ld [hSpriteFacingDirection], a + call SetSpriteFacingDirectionAndDelay + call Delay3 + ld a, $19 + ld [hSpriteIndexOrTextID], a + call DisplayTextID + SetEvent EVENT_GOT_POKEDEX + ld a, $1 + ld [W_VIRIDIANCITYCURSCRIPT], a + SetEvent EVENT_OAK_GOT_PARCEL + ld a, HS_LYING_OLD_MAN + ld [wMissableObjectIndex], a + predef HideObject + ld a, HS_OLD_MAN + ld [wMissableObjectIndex], a + predef ShowObject + ld a, [wSavedNPCMovementDirections2Index] + ld b, 0 + ld c, a + ld hl, wNPCMovementDirections2 + xor a + call FillMemory + ld [hl], $ff + call StopAllMusic + callba Music_RivalAlternateStart + ld a, $1 + ld [hSpriteIndexOrTextID], a + ld de, wNPCMovementDirections2 + call MoveSprite + ld a, $15 + ld [W_OAKSLABCURSCRIPT], a + ret + OaksLabScript21: - dr $1c866,$1c896 + ld a, [wd730] + bit 0, a + ret nz + call PlayDefaultMusic + ld a, HS_OAKS_LAB_RIVAL + ld [wMissableObjectIndex], a + predef HideObject + SetEvent EVENT_1ST_ROUTE22_RIVAL_BATTLE + ResetEventReuseHL EVENT_2ND_ROUTE22_RIVAL_BATTLE + SetEventReuseHL EVENT_ROUTE22_RIVAL_WANTS_BATTLE + ld a, HS_ROUTE_22_RIVAL_1 + ld [wMissableObjectIndex], a + predef ShowObject + xor a + ld [wJoyIgnore], a + ld a, $16 + ld [W_OAKSLABCURSCRIPT], a + ret + OaksLabScript22: - dr $1c896,$1c904 + ret + +OaksLabScript_1c897: + ld hl, wBagItems + ld bc, 0 +.asm_1c89d + ld a, [hli] + cp $ff + ret z + cp OAKS_PARCEL + jr z, .asm_1c8a9 + inc hl + inc c + jr .asm_1c89d + +.asm_1c8a9 + ld hl, wNumBagItems + ld a, c + ld [wWhichPokemon], a + ld a, 1 + ld [wItemQuantity], a + call RemoveItemFromInventory + ret + +OaksLabScript_1c8b9: + ld a, $7c + ld [$ffeb], a + ld a, $8 + ld [$ffee], a + ld a, [wYCoord] + cp 3 + jr nz, .asm_1c8d3 + ld a, $4 + ld [wNPCMovementDirections2Index], a + ld a, $30 + ld b, $b + jr .asm_1c8f6 + +.asm_1c8d3 + cp $1 + jr nz, .asm_1c8e2 + ld a, $2 + ld [wNPCMovementDirections2Index], a + ld a, $30 + ld b, $9 + jr .asm_1c8f6 + +.asm_1c8e2 + ld a, $3 + ld [wNPCMovementDirections2Index], a + ld b, $a + ld a, [wXCoord] + cp $4 + jr nz, .asm_1c8f4 + ld a, $40 + jr .asm_1c8f6 + +.asm_1c8f4 + ld a, $20 +.asm_1c8f6 + ld [$ffec], a + ld a, b + ld [$ffed], a + ld a, $1 + ld [wSpriteIndex], a + call SetSpritePosition1 + ret + OaksLabScript_1d076: - dr $1c904,$1c910 + ld hl, OaksLabText_1c946 + ld a, l + ld [wMapTextPtr], a + ld a, h + ld [wMapTextPtr + 1], a + ret OaksLabTextPointers: ; 1d082 (7:5082) - dr $1c910,$1cbae + dr $1c910,$1c946 + +OaksLabText_1c946: + dr $1c946,$1cbae OaksLabRivalDefeatedText: dr $1cbae,$1cbb3 -- cgit v1.3.1-sl0p From e698f02b768bea5d18a33e4a94330c2dd458e9f1 Mon Sep 17 00:00:00 2001 From: pikalaxalt Date: Sat, 28 May 2016 15:56:04 -0400 Subject: Oaks Lab rewrite part 4 --- charmap.asm | 1 + scripts/oakslab.asm | 387 ++++++++++++++++++++++++++++++++++++++++++++++++- text/maps/oaks_lab.asm | 80 +++++----- 3 files changed, 422 insertions(+), 46 deletions(-) (limited to 'scripts/oakslab.asm') diff --git a/charmap.asm b/charmap.asm index 1932b39e..e4368d40 100644 --- a/charmap.asm +++ b/charmap.asm @@ -150,6 +150,7 @@ charmap "ー", $E3 charmap "", $4a ; PkMn charmap "@", $50 charmap "", $52 +charmap "", $53 charmap "#", $54 ;charmap "POKé", $54 charmap "′", $71 diff --git a/scripts/oakslab.asm b/scripts/oakslab.asm index 95ee4f25..f441605c 100755 --- a/scripts/oakslab.asm +++ b/scripts/oakslab.asm @@ -288,7 +288,6 @@ OaksLabRLE_PlayerWalksToOak: db D_LEFT, 1 db $FF - OaksLabScript11: ld a, [wSimulatedJoypadStatesIndex] and a @@ -701,7 +700,7 @@ OaksLabScript_1c8b9: ret OaksLabScript_1d076: - ld hl, OaksLabText_1c946 + ld hl, OaksLabTextPointers2 ld a, l ld [wMapTextPtr], a ld a, h @@ -709,13 +708,389 @@ OaksLabScript_1d076: ret OaksLabTextPointers: ; 1d082 (7:5082) - dr $1c910,$1c946 + dw OaksLabText1 + dw OaksLabText2 + dw OaksLabText3 + dw OaksLabText4 + dw OaksLabText5 + dw OaksLabText6 + dw OaksLabText7 + dw OaksLabText8 + dw OaksLabText9 + dw OaksLabText10 + dw OaksLabText11 + dw OaksLabText12 + dw OaksLabText13 + dw OaksLabText14 + dw OaksLabText15 + dw OaksLabText16 + dw OaksLabText17 + dw OaksLabText18 + dw OaksLabText19 + dw OaksLabText20 + dw OaksLabText21 + dw OaksLabText22 + dw OaksLabText23 + dw OaksLabText24 + dw OaksLabText25 + dw OaksLabText26 + dw OaksLabText27 + +OaksLabTextPointers2: + dw OaksLabText1 + dw OaksLabText2 + dw OaksLabText3 + dw OaksLabText4 + dw OaksLabText5 + dw OaksLabText6 + dw OaksLabText7 + dw OaksLabText8 + dw OaksLabText9 + +OaksLabText1: + TX_ASM + CheckEvent EVENT_FOLLOWED_OAK_INTO_LAB_2 + jr nz, .asm_1c968 + ld hl, OaksLabText_1c97d + call PrintText + jr .asm_1c97a + +.asm_1c968 + CheckEventReuseA EVENT_GOT_STARTER + jr nz, .asm_1c974 + ld hl, OaksLabText_1c982 + call PrintText + jr .asm_1c97a + +.asm_1c974 + ld hl, OaksLabText_1c987 + call PrintText +.asm_1c97a + jp TextScriptEnd + +OaksLabText_1c97d: + TX_FAR _OaksLabGaryText1 + db "@" + +OaksLabText_1c982: + TX_FAR _OaksLabText40 + db "@" + +OaksLabText_1c987: + TX_FAR _OaksLabText41 + db "@" + +OaksLabText2: + TX_ASM + ld a, $1 + ld [wDoNotWaitForButtonPressAfterDisplayingText], a + CheckEvent EVENT_OAK_ASKED_TO_CHOOSE_MON + jr nz, OaksLabScript_1c9ac + ld a, $0 + ld [wDoNotWaitForButtonPressAfterDisplayingText], a + ld hl, OaksLabText_1c9a7 + call PrintText + jp TextScriptEnd + +OaksLabText_1c9a7: + TX_FAR _OaksLabText39 + db "@" + +OaksLabScript_1c9ac: + ld a, $1 + ld [wSavedPlayerScreenY], a + xor a + ld [wWhichEmotionBubble], a + predef EmotionBubble + ld a, $8 + ld [W_OAKSLABCURSCRIPT], a + jp TextScriptEnd + +OaksLabText3: + TX_ASM + CheckEvent EVENT_PALLET_AFTER_GETTING_POKEBALLS + jr nz, .asm_1c9d9 + ld hl, wPokedexOwned + ld b, wPokedexOwnedEnd - wPokedexOwned + call CountSetBits + ld a, [wNumSetBits] + cp 2 + jr c, .asm_1c9ec +.asm_1c9d9 + ld hl, OaksLabText_1ca9f + call PrintText + ld a, $1 + ld [wDoNotWaitForButtonPressAfterDisplayingText], a + predef DisplayDexRating + jp .asm_1ca6f + +.asm_1c9ec + ld b, POKE_BALL + call IsItemInBag + jr nz, .asm_1ca69 + ld hl, wPokedexOwned + ld b, wPokedexOwnedEnd - wPokedexOwned + call CountSetBits + ld a, [wNumSetBits] + cp 2 + jr nc, .asm_1ca69 + CheckEvent EVENT_BEAT_ROUTE22_RIVAL_1ST_BATTLE + jr nz, .asm_1ca52 + CheckEvent EVENT_GOT_POKEDEX + jr nz, .asm_1ca4a + CheckEventReuseA EVENT_BATTLED_RIVAL_IN_OAKS_LAB + jr nz, .asm_1ca2b + ld a, [wd72e] + bit 3, a + jr nz, .asm_1ca23 + ld hl, OaksLabText_1ca72 + call PrintText + jr .asm_1ca6f + +.asm_1ca23 + ld hl, OaksLabText_1ca77 + call PrintText + jr .asm_1ca6f + +.asm_1ca2b + ld b, OAKS_PARCEL + call IsItemInBag + jr nz, .asm_1ca3a + ld hl, OaksLabText_1ca7c + call PrintText + jr .asm_1ca6f + +.asm_1ca3a + ld hl, OaksLabText_1ca81 + call PrintText + call OaksLabScript_1c897 + ld a, $13 + ld [W_OAKSLABCURSCRIPT], a + jr .asm_1ca6f + +.asm_1ca4a + ld hl, OaksLabText_1ca8b + call PrintText + jr .asm_1ca6f + +.asm_1ca52 + CheckAndSetEvent EVENT_GOT_POKEBALLS_FROM_OAK + jr nz, .asm_1ca69 + lb bc, POKE_BALL, 5 + call GiveItem + ld hl, OaksLabText_1ca90 + call PrintText + jr .asm_1ca6f + +.asm_1ca69 + ld hl, OaksLabText_1ca9a + call PrintText +.asm_1ca6f + jp TextScriptEnd + +OaksLabText_1ca72: + TX_FAR _OaksLabPikachuText + db "@" + +OaksLabText_1ca77: + TX_FAR _OaksLabText_1d2f5 + db "@" + +OaksLabText_1ca7c: + TX_FAR _OaksLabText_1d2fa + db "@" + +OaksLabText_1ca81: + TX_FAR _OaksLabDeliverParcelText1 + TX_SFX_KEY_ITEM + TX_FAR _OaksLabDeliverParcelText2 + db "@" + +OaksLabText_1ca8b: + TX_FAR _OaksLabAroundWorldText + db "@" + +OaksLabText_1ca90: + TX_FAR _OaksLabGivePokeballsText1 + TX_SFX_KEY_ITEM + TX_FAR _OaksLabGivePokeballsText2 + db "@" + +OaksLabText_1ca9a: + TX_FAR _OaksLabPleaseVisitText + db "@" + +OaksLabText_1ca9f: + TX_FAR _OaksLabText_1d31d + db "@" + +OaksLabText4: +OaksLabText5: + TX_ASM + ld hl, OaksLabText_1caae + call PrintText + jp TextScriptEnd + +OaksLabText_1caae: + TX_FAR _OaksLabText_1d32c + db "@" + +OaksLabText6: + TX_FAR _OaksLabText8 + db "@" + +OaksLabText7: + TX_ASM + ld hl, OaksLabText_1cac2 + call PrintText + jp TextScriptEnd + +OaksLabText_1cac2: + TX_FAR _OaksLabText_1d340 + db "@" + +OaksLabText13: + TX_ASM + ld hl, OaksLabText_1cad1 + call PrintText + jp TextScriptEnd + +OaksLabText_1cad1: + TX_FAR _OaksLabRivalWaitingText + db "@" + +OaksLabText14: + TX_ASM + ld hl, OaksLabText_1cae0 + call PrintText + jp TextScriptEnd + +OaksLabText_1cae0: + TX_FAR _OaksLabChooseMonText + db "@" + +OaksLabText15: + TX_ASM + ld hl, OaksLabText_1caef + call PrintText + jp TextScriptEnd + +OaksLabText_1caef: + TX_FAR _OaksLabRivalInterjectionText + db "@" + +OaksLabText16: + TX_ASM + ld hl, OaksLabText_1cafe + call PrintText + jp TextScriptEnd + +OaksLabText_1cafe: + TX_FAR _OaksLabBePatientText + db "@" + +OaksLabText17: + TX_ASM + ld hl, OaksLabText_1cb25 + call PrintText + ld hl, OaksLabText_1cb2a + call PrintText + ld hl, OaksLabText_1cb30 + call PrintText + ld hl, OaksLabText_1cb35 + call PrintText + ld hl, OaksLabText_1cb3a + call PrintText + jp TextScriptEnd + +OaksLabText_1cb25: + TX_FAR _OaksLabRivalTakesText1 + db "@" + +OaksLabText_1cb2a: + TX_FAR _OaksLabRivalTakesText2 + TX_SFX_KEY_ITEM + db "@" + +OaksLabText_1cb30: + TX_FAR _OaksLabRivalTakesText3 + db "@" + +OaksLabText_1cb35: + TX_FAR _OaksLabRivalTakesText4 + db "@" + +OaksLabText_1cb3a: + TX_FAR _OaksLabRivalTakesText5 + db "@" + +OaksLabText18: + TX_ASM + ld a, PIKACHU + ld [W_PLAYERSTARTER], a + ld [wd11e], a + call GetMonName + ld a, $1 + ld [wDoNotWaitForButtonPressAfterDisplayingText], a + ld hl, OaksLabText_1cb85 + call PrintText + ld hl, OaksLabText_1cb8a + call PrintText + xor a + ld [wMonDataLocation], a + ld a, 5 + ld [wCurEnemyLVL], a + ld a, PIKACHU + ld [wd11e], a + ld [wcf91], a + call AddPartyMon + ld a, 163 + ld [wPartyMon1CatchRate], a + call Func_152d + SetEvent EVENT_GOT_STARTER + ld hl, wd72e + set 3, [hl] + jp TextScriptEnd + +OaksLabText_1cb85: + TX_FAR _OaksLabOakGivesText + db "@" + +OaksLabText_1cb8a: + TX_FAR _OaksLabReceivedText + TX_SFX_KEY_ITEM + db "@" -OaksLabText_1c946: - dr $1c946,$1cbae +OaksLabText10: + dr $1cb90,$1cb9f +OaksLabText11: + dr $1cb9f,$1cbae OaksLabRivalDefeatedText: dr $1cbae,$1cbb3 OaksLabRivalBeatYouText: - dr $1cbb3,$1cc22 + dr $1cbb3,$1cbb8 +OaksLabText12: + dr $1cbb8,$1cbc7 +OaksLabText26: + dr $1cbc7,$1cbe0 +OaksLabText27: + dr $1cbe0,$1cbef +OaksLabText19: + dr $1cbef,$1cbf4 +OaksLabText20: + dr $1cbf4,$1cbf9 +OaksLabText21: + dr $1cbf9,$1cbfe +OaksLabText22: + dr $1cbfe,$1cc03 +OaksLabText23: + dr $1cc03,$1cc09 +OaksLabText24: + dr $1cc09,$1cc0e +OaksLabText25: + dr $1cc0e,$1cc13 +OaksLabText8: +OaksLabText9: + dr $1cc13,$1cc22 diff --git a/text/maps/oaks_lab.asm b/text/maps/oaks_lab.asm index 5b12e1b8..097fa931 100644 --- a/text/maps/oaks_lab.asm +++ b/text/maps/oaks_lab.asm @@ -1,6 +1,6 @@ _OaksLabGaryText1:: - text $53,": Yo" - line $52,"! Gramps" + text ": Yo" + line "! Gramps" cont "isn't around!" para "I ran here 'cos" @@ -9,13 +9,13 @@ _OaksLabGaryText1:: done _OaksLabText40:: - text $53,": Humph!" + text ": Humph!" line "I'll get a better" cont "#MON than you!" done _OaksLabText41:: - text $53,": Heh, my" + text ": Heh, my" line "#MON looks a" cont "lot stronger." done @@ -48,7 +48,7 @@ _OaksLabText_1d2fa:: done _OaksLabDeliverParcelText1:: - text "OAK: Oh, ", $52, "!" + text "OAK: Oh, !" para "How is my old" line "#MON?" @@ -63,15 +63,15 @@ _OaksLabDeliverParcelText1:: para "What? You have" line "something for me?" - para $52, " delivered" + para " delivered" line "OAK's PARCEL.@@" _OaksLabDeliverParcelText2:: - db $0 + text "" para "Ah! This is the" line "custom # BALL" cont "I ordered!" - cont "Thanks, ",$52,"!" + cont "Thanks, !" para "By the way, I must" line "ask you to do" @@ -81,7 +81,7 @@ _OaksLabDeliverParcelText2:: _OaksLabAroundWorldText:: text "#MON around the" line "world wait for" - cont "you, ", $52, "!" + cont "you, !" done _OaksLabGivePokeballsText1:: @@ -95,11 +95,11 @@ _OaksLabGivePokeballsText1:: cont "to capture wild" cont "#MON." - para $52, " got 5" + para " got 5" line "# BALLs!@@" _OaksLabGivePokeballsText2:: - db $0 + text "" para "When a wild" line "#MON appears," cont "it's fair game." @@ -155,13 +155,13 @@ _OaksLabText_1d340:: done _OaksLabRivalWaitingText:: - text $53, ": Gramps!" + text ": Gramps!" line "I'm fed up with" cont "waiting!" done _OaksLabChooseMonText:: - text "OAK: Hmm? ",$53,"?" + text "OAK: Hmm? ?" line "Why are you here" cont "already?" @@ -171,7 +171,7 @@ _OaksLabChooseMonText:: para "Ah, whatever!" line "Just wait there." - para "Look, ",$52,"! Do" + para "Look, ! Do" line "you see that ball" cont "on the table?" @@ -184,34 +184,34 @@ _OaksLabChooseMonText:: done _OaksLabRivalInterjectionText:: - text $53, ": Hey!" + text ": Hey!" line "Gramps! What" cont "about me?" done _OaksLabBePatientText:: text "OAK: Be patient," - line $53,", I'll give" + line ", I'll give" cont "you one later." done _OaksLabRivalTakesText1:: - text $53,": No way!" - line $52,", I want" + text ": No way!" + line ", I want" cont "this #MON!" prompt _OaksLabRivalTakesText2:: - text $53," snatched" + text " snatched" line "the #MON!@@" _OaksLabRivalTakesText3:: - text "OAK: ",$53,"! What" + text "OAK: ! What" line "are you doing?" prompt _OaksLabRivalTakesText4:: - text $53,": Gramps, I" + text ": Gramps, I" line "want this one!" prompt @@ -225,12 +225,12 @@ _OaksLabRivalTakesText5:: line "give you one" cont "anyway..." - para $52,", come over" + para ", come over" line "here." done _OaksLabOakGivesText:: - text "OAK: ",$52,", this" + text "OAK: , this" line "is the #MON I" cont "caught earlier." @@ -241,9 +241,9 @@ _OaksLabOakGivesText:: prompt _OaksLabReceivedText:: - text $52," received" + text " received" line "a @" - TX_RAM $CD6D + TX_RAM wcd6d text "!@@" _OaksLabLeavingText:: @@ -252,8 +252,8 @@ _OaksLabLeavingText:: done _OaksLabRivalChallengeText:: - text $53, ": Wait" - line $52, "!" + text ": Wait" + line "!" cont "Let's check out" cont "our #MON!" @@ -269,17 +269,17 @@ _OaksLabText_1d3be:: prompt _OaksLabText_1d3c3:: - text $53, ": Yeah! Am" + text ": Yeah! Am" line "I great or what?" prompt _OaksLabRivalToughenUpText:: - text $53, ": Okay!" + text ": Okay!" line "I'll make my" cont "#MON fight to" cont "toughen it up!" - para $52, "! Gramps!" + para "! Gramps!" line "Smell you later!" done @@ -308,18 +308,18 @@ _OaksLabPikachuDislikesPokeballsText2:: done _OaksLabText21:: - text $53, ": Gramps!" + text ": Gramps!" done _OaksLabText22:: - text $53,": Gramps," + text ": Gramps," line "my #MON has" cont "grown stronger!" cont "Check it out!" done _OaksLabText23:: - text "OAK: Ah, ",$53,"," + text "OAK: Ah, ," line "good timing!" para "I needed to ask" @@ -342,11 +342,11 @@ _OaksLabText24:: done _OaksLabText25:: - text "OAK: ", $52, " and" - line $53, "! Take" + text "OAK: and" + line "! Take" cont "these with you!" - para $52, " got" + para " got" line "#DEX from OAK!@@" _OaksLabText26:: @@ -373,11 +373,11 @@ _OaksLabText26:: done _OaksLabText27:: - text $53, ": Alright" + text ": Alright" line "Gramps! Leave it" cont "all to me!" - para $52, ", I hate to" + para ", I hate to" line "say it, but I" cont "don't need you!" @@ -387,10 +387,10 @@ _OaksLabText27:: para "I'll tell her not" line "to lend you one," - cont $52, "! Hahaha!" + cont "! Hahaha!" done _OaksLabText_1d405:: text "I study #MON as" line "PROF.OAK's AIDE." - done \ No newline at end of file + done -- cgit v1.3.1-sl0p From ff62edda93b25a35dc6c3c795f5d568b382a4b5a Mon Sep 17 00:00:00 2001 From: pikalaxalt Date: Sat, 28 May 2016 16:07:46 -0400 Subject: Oaks Lab rewrite part 5 (finish) --- macros.asm | 6 +++- scripts/oakslab.asm | 96 ++++++++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 86 insertions(+), 16 deletions(-) (limited to 'scripts/oakslab.asm') diff --git a/macros.asm b/macros.asm index 8d7a37c8..829841fa 100644 --- a/macros.asm +++ b/macros.asm @@ -811,8 +811,12 @@ dpikacry: MACRO db (\1_id - PikachuCriesPointerTable) / 3 endm +ldpikacry: MACRO + ld \1, (\2_id - PikachuCriesPointerTable) / 3 + ENDM + pikacry: MACRO - ld a, (\1_id - PikachuCriesPointerTable) / 3 + ldpikacry a, \1 endm diff --git a/scripts/oakslab.asm b/scripts/oakslab.asm index f441605c..63cec822 100755 --- a/scripts/oakslab.asm +++ b/scripts/oakslab.asm @@ -1062,35 +1062,101 @@ OaksLabText_1cb8a: db "@" OaksLabText10: - dr $1cb90,$1cb9f + TX_ASM + ld hl, OaksLabText_1cb9a + call PrintText + jp TextScriptEnd + +OaksLabText_1cb9a: + TX_FAR _OaksLabLeavingText + db "@" + OaksLabText11: - dr $1cb9f,$1cbae + TX_ASM + ld hl, OaksLabText_1cba9 + call PrintText + jp TextScriptEnd + +OaksLabText_1cba9: + TX_FAR _OaksLabRivalChallengeText + db "@" OaksLabRivalDefeatedText: - dr $1cbae,$1cbb3 + TX_FAR _OaksLabText_1d3be + db "@" OaksLabRivalBeatYouText: - dr $1cbb3,$1cbb8 + TX_FAR _OaksLabText_1d3c3 + db "@" + OaksLabText12: - dr $1cbb8,$1cbc7 + TX_ASM + ld hl, OaksLabText_1cbc2 + call PrintText + jp TextScriptEnd + +OaksLabText_1cbc2: + TX_FAR _OaksLabRivalToughenUpText + db "@" + OaksLabText26: - dr $1cbc7,$1cbe0 + TX_ASM + ldpikacry e, PikachuCry2 + callab PlayPikachuSoundClip + ld hl, OaksLabText_1cbdb + call PrintText + jp TextScriptEnd + +OaksLabText_1cbdb: + TX_FAR _OaksLabPikachuDislikesPokeballsText1 + db "@" + OaksLabText27: - dr $1cbe0,$1cbef + TX_ASM + ld hl, OaksLabText_1cbea + call PrintText + jp TextScriptEnd + +OaksLabText_1cbea: + TX_FAR _OaksLabPikachuDislikesPokeballsText2 + db "@" + OaksLabText19: - dr $1cbef,$1cbf4 + TX_FAR _OaksLabText21 + db "@" + OaksLabText20: - dr $1cbf4,$1cbf9 + TX_FAR _OaksLabText22 + db "@" + OaksLabText21: - dr $1cbf9,$1cbfe + TX_FAR _OaksLabText23 + db "@" + OaksLabText22: - dr $1cbfe,$1cc03 + TX_FAR _OaksLabText24 + db "@" + OaksLabText23: - dr $1cc03,$1cc09 + TX_FAR _OaksLabText25 + TX_SFX_KEY_ITEM + db "@" + OaksLabText24: - dr $1cc09,$1cc0e + TX_FAR _OaksLabText26 + db "@" + OaksLabText25: - dr $1cc0e,$1cc13 + TX_FAR _OaksLabText27 + db "@" + OaksLabText8: OaksLabText9: - dr $1cc13,$1cc22 + TX_ASM + ld hl, OaksLabText_1c31d + call PrintText + jp TextScriptEnd + +OaksLabText_1c31d: + TX_FAR _OaksLabText_1d405 + db "@" -- cgit v1.3.1-sl0p From 2792f51d733df0d0b6ee21fec72623c2a4235e5a Mon Sep 17 00:00:00 2001 From: pikalaxalt Date: Sun, 29 May 2016 10:55:45 -0400 Subject: Another chunk of bank 3c --- constants/hide_show_constants.asm | 184 +++++++++++++++-------------- engine/bank3c.asm | 147 +++-------------------- engine/bank3f.asm | 28 ++--- engine/items/items.asm | 2 +- engine/overworld/advance_player_sprite.asm | 2 +- home.asm | 115 +----------------- home/overworld.asm | 4 +- home/pikachu.asm | 113 ++++++++++++++++++ scripts/beach_house2.asm | 33 ++++++ scripts/billshouse2.asm | 158 +++++++++++++++++++++++++ scripts/oakslab.asm | 2 +- scripts/silphco11_2.asm | 76 ++++++++++++ scripts/ssanne9_2.asm | 35 ++++++ scripts/viridianforest2.asm | 8 ++ wram.asm | 2 +- 15 files changed, 551 insertions(+), 358 deletions(-) create mode 100755 home/pikachu.asm create mode 100755 scripts/beach_house2.asm create mode 100755 scripts/billshouse2.asm create mode 100755 scripts/silphco11_2.asm create mode 100755 scripts/ssanne9_2.asm (limited to 'scripts/oakslab.asm') diff --git a/constants/hide_show_constants.asm b/constants/hide_show_constants.asm index 9481466e..ffc4ea08 100755 --- a/constants/hide_show_constants.asm +++ b/constants/hide_show_constants.asm @@ -150,96 +150,98 @@ const_value SET $7c ; idk anymore lol const HS_ROCKET_HIDEOUT_4_ITEM_3 ; 88 const HS_ROCKET_HIDEOUT_4_ITEM_4 ; 89 XXX never (de)activated? const HS_ROCKET_HIDEOUT_4_ITEM_5 ; 8A - const HS_SILPH_CO_2F_1 ; 8B - const HS_SILPH_CO_2F_2 ; 8C - const HS_SILPH_CO_2F_3 ; 8D - const HS_SILPH_CO_2F_4 ; 8E - const HS_SILPH_CO_2F_5 ; 8F - const HS_SILPH_CO_3F_1 ; 90 X - const HS_SILPH_CO_3F_2 ; 91 - const HS_SILPH_CO_3F_ITEM ; 92 - const HS_SILPH_CO_4F_1 ; 93 - const HS_SILPH_CO_4F_2 ; 94 X - const HS_SILPH_CO_4F_3 ; 95 X - const HS_SILPH_CO_4F_ITEM_1 ; 96 X - const HS_SILPH_CO_4F_ITEM_2 ; 97 - const HS_SILPH_CO_4F_ITEM_3 ; 98 - const HS_SILPH_CO_5F_1 ; 99 - const HS_SILPH_CO_5F_2 ; 9A - const HS_SILPH_CO_5F_3 ; 9B X - const HS_SILPH_CO_5F_4 ; 9C X - const HS_SILPH_CO_5F_ITEM_1 ; 9D X - const HS_SILPH_CO_5F_ITEM_2 ; 9E - const HS_SILPH_CO_5F_ITEM_3 ; 9F - const HS_SILPH_CO_6F_1 ; A0 - const HS_SILPH_CO_6F_2 ; A1 X - const HS_SILPH_CO_6F_3 ; A2 X - const HS_SILPH_CO_6F_ITEM_1 ; A3 - const HS_SILPH_CO_6F_ITEM_2 ; A4 - const HS_SILPH_CO_7F_1 ; A5 - const HS_SILPH_CO_7F_2 ; A6 - const HS_SILPH_CO_7F_3 ; A7 - const HS_SILPH_CO_7F_4 ; A8 X - const HS_SILPH_CO_7F_RIVAL ; A9 X - const HS_SILPH_CO_7F_ITEM_1 ; AA XXX sprite doesn't exist - const HS_SILPH_CO_7F_ITEM_2 ; AB - const HS_SILPH_CO_7F_8 ; AC - const HS_SILPH_CO_8F_1 ; AD - const HS_SILPH_CO_8F_2 ; AE - const HS_SILPH_CO_8F_3 ; AF - const HS_SILPH_CO_9F_1 ; B0 - const HS_SILPH_CO_9F_2 ; B1 - const HS_SILPH_CO_9F_3 ; B2 - const HS_SILPH_CO_10F_1 ; B3 XXX never (de)activated? - const HS_SILPH_CO_10F_2 ; B4 X - const HS_SILPH_CO_10F_3 ; B5 X - const HS_SILPH_CO_10F_ITEM_1 ; B6 X - const HS_SILPH_CO_10F_ITEM_2 ; B7 - const HS_SILPH_CO_10F_ITEM_3 ; B8 - const HS_SILPH_CO_11F_1 ; B9 - const HS_SILPH_CO_11F_2 ; BA XXX sprite doesn't exist - const HS_SILPH_CO_11F_3 ; BB X - const HS_MAP_F4_1 ; BC X - const HS_MANSION_2_ITEM ; BD X - const HS_MANSION_3_ITEM_1 ; BE X - const HS_MANSION_3_ITEM_2 ; BF X - const HS_MANSION_4_ITEM_1 ; C0 X - const HS_MANSION_4_ITEM_2 ; C1 X - const HS_MANSION_4_ITEM_3 ; C2 X - const HS_MANSION_4_ITEM_4 ; C3 X - const HS_MANSION_4_ITEM_5 ; C4 X - const HS_SAFARI_ZONE_EAST_ITEM_1 ; C5 X - const HS_SAFARI_ZONE_EAST_ITEM_2 ; C6 X - const HS_SAFARI_ZONE_EAST_ITEM_3 ; C7 X - const HS_SAFARI_ZONE_EAST_ITEM_4 ; C8 X - const HS_SAFARI_ZONE_NORTH_ITEM_1 ; C9 X - const HS_SAFARI_ZONE_NORTH_ITEM_2 ; CA X - const HS_SAFARI_ZONE_WEST_ITEM_1 ; CB X - const HS_SAFARI_ZONE_WEST_ITEM_2 ; CC X - const HS_SAFARI_ZONE_WEST_ITEM_3 ; CD X - const HS_SAFARI_ZONE_WEST_ITEM_4 ; CE X - const HS_SAFARI_ZONE_CENTER_ITEM ; CF X - const HS_UNKNOWN_DUNGEON_2_ITEM_1 ; D0 X - const HS_UNKNOWN_DUNGEON_2_ITEM_2 ; D1 X - const HS_UNKNOWN_DUNGEON_2_ITEM_3 ; D2 X - const HS_MEWTWO ; D3 X - const HS_UNKNOWN_DUNGEON_3_ITEM_1 ; D4 X - const HS_UNKNOWN_DUNGEON_3_ITEM_2 ; D5 X - const HS_VICTORY_ROAD_1_ITEM_1 ; D6 - const HS_VICTORY_ROAD_1_ITEM_2 ; D7 - const HS_CHAMPIONS_ROOM_OAK ; D8 + +const_value SET $8d + const HS_SILPH_CO_2F_1 ; 8D + const HS_SILPH_CO_2F_2 ; 8E + const HS_SILPH_CO_2F_3 ; 8F + const HS_SILPH_CO_2F_4 ; 90 X + const HS_SILPH_CO_2F_5 ; 91 + const HS_SILPH_CO_3F_1 ; 92 + const HS_SILPH_CO_3F_2 ; 93 + const HS_SILPH_CO_3F_ITEM ; 94 X + const HS_SILPH_CO_4F_1 ; 95 X + const HS_SILPH_CO_4F_2 ; 96 X + const HS_SILPH_CO_4F_3 ; 97 + const HS_SILPH_CO_4F_ITEM_1 ; 98 + const HS_SILPH_CO_4F_ITEM_2 ; 99 + const HS_SILPH_CO_4F_ITEM_3 ; 9A + const HS_SILPH_CO_5F_1 ; 9B X + const HS_SILPH_CO_5F_2 ; 9C X + const HS_SILPH_CO_5F_3 ; 9D X + const HS_SILPH_CO_5F_4 ; 9E + const HS_SILPH_CO_5F_ITEM_1 ; 9F + const HS_SILPH_CO_5F_ITEM_2 ; A0 + const HS_SILPH_CO_5F_ITEM_3 ; A1 X + const HS_SILPH_CO_6F_1 ; A2 X + const HS_SILPH_CO_6F_2 ; A3 + const HS_SILPH_CO_6F_3 ; A4 + const HS_SILPH_CO_6F_ITEM_1 ; A5 + const HS_SILPH_CO_6F_ITEM_2 ; A6 + const HS_SILPH_CO_7F_1 ; A7 + const HS_SILPH_CO_7F_2 ; A8 X + const HS_SILPH_CO_7F_3 ; A9 X + const HS_SILPH_CO_7F_4 ; AA XXX sprite doesn't exist + const HS_SILPH_CO_7F_RIVAL ; AB + const HS_SILPH_CO_7F_ITEM_1 ; AC + const HS_SILPH_CO_7F_ITEM_2 ; AD + const HS_SILPH_CO_7F_8 ; AE + const HS_SILPH_CO_8F_1 ; AF + const HS_SILPH_CO_8F_2 ; B0 + const HS_SILPH_CO_8F_3 ; B1 + const HS_SILPH_CO_9F_1 ; B2 + const HS_SILPH_CO_9F_2 ; B3 XXX never (de)activated? + const HS_SILPH_CO_9F_3 ; B4 X + const HS_SILPH_CO_10F_1 ; B5 X + const HS_SILPH_CO_10F_2 ; B6 X + const HS_SILPH_CO_10F_3 ; B7 + const HS_SILPH_CO_10F_ITEM_1 ; B8 + const HS_SILPH_CO_10F_ITEM_2 ; B9 + const HS_SILPH_CO_10F_ITEM_3 ; BA XXX sprite doesn't exist + const HS_SILPH_CO_11F_1 ; BB X + const HS_SILPH_CO_11F_2 ; BC X + const HS_SILPH_CO_11F_3 ; BD X + const HS_MAP_F4_1 ; BE X + const HS_MANSION_2_ITEM ; BF X + const HS_MANSION_3_ITEM_1 ; C0 X + const HS_MANSION_3_ITEM_2 ; C1 X + const HS_MANSION_4_ITEM_1 ; C2 X + const HS_MANSION_4_ITEM_2 ; C3 X + const HS_MANSION_4_ITEM_3 ; C4 X + const HS_MANSION_4_ITEM_4 ; C5 X + const HS_MANSION_4_ITEM_5 ; C6 X + const HS_SAFARI_ZONE_EAST_ITEM_1 ; C7 X + const HS_SAFARI_ZONE_EAST_ITEM_2 ; C8 X + const HS_SAFARI_ZONE_EAST_ITEM_3 ; C9 X + const HS_SAFARI_ZONE_EAST_ITEM_4 ; CA X + const HS_SAFARI_ZONE_NORTH_ITEM_1 ; CB X + const HS_SAFARI_ZONE_NORTH_ITEM_2 ; CC X + const HS_SAFARI_ZONE_WEST_ITEM_1 ; CD X + const HS_SAFARI_ZONE_WEST_ITEM_2 ; CE X + const HS_SAFARI_ZONE_WEST_ITEM_3 ; CF X + const HS_SAFARI_ZONE_WEST_ITEM_4 ; D0 X + const HS_SAFARI_ZONE_CENTER_ITEM ; D1 X + const HS_UNKNOWN_DUNGEON_2_ITEM_1 ; D2 X + const HS_UNKNOWN_DUNGEON_2_ITEM_2 ; D3 X + const HS_UNKNOWN_DUNGEON_2_ITEM_3 ; D4 X + const HS_MEWTWO ; D5 X + const HS_UNKNOWN_DUNGEON_3_ITEM_1 ; D6 + const HS_UNKNOWN_DUNGEON_3_ITEM_2 ; D7 + const HS_VICTORY_ROAD_1_ITEM_1 ; D8 + const HS_VICTORY_ROAD_1_ITEM_2 ; D9 + const HS_CHAMPIONS_ROOM_OAK ; DA const_value SET $df - const HS_SEAFOAM_ISLANDS_1_BOULDER_1 ; D9 - const HS_SEAFOAM_ISLANDS_1_BOULDER_2 ; DA - const HS_SEAFOAM_ISLANDS_2_BOULDER_1 ; DB - const HS_SEAFOAM_ISLANDS_2_BOULDER_2 ; DC - const HS_SEAFOAM_ISLANDS_3_BOULDER_1 ; DD - const HS_SEAFOAM_ISLANDS_3_BOULDER_2 ; DE - const HS_SEAFOAM_ISLANDS_4_BOULDER_1 ; DF - const HS_SEAFOAM_ISLANDS_4_BOULDER_2 ; E0 - const HS_SEAFOAM_ISLANDS_4_BOULDER_3 ; E1 - const HS_SEAFOAM_ISLANDS_4_BOULDER_4 ; E2 - const HS_SEAFOAM_ISLANDS_5_BOULDER_1 ; E3 X - const HS_SEAFOAM_ISLANDS_5_BOULDER_2 ; E4 - const HS_ARTICUNO ; E5 + const HS_SEAFOAM_ISLANDS_1_BOULDER_1 ; DF + const HS_SEAFOAM_ISLANDS_1_BOULDER_2 ; E0 + const HS_SEAFOAM_ISLANDS_2_BOULDER_1 ; E1 + const HS_SEAFOAM_ISLANDS_2_BOULDER_2 ; E2 + const HS_SEAFOAM_ISLANDS_3_BOULDER_1 ; E3 + const HS_SEAFOAM_ISLANDS_3_BOULDER_2 ; E4 + const HS_SEAFOAM_ISLANDS_4_BOULDER_1 ; E5 + const HS_SEAFOAM_ISLANDS_4_BOULDER_2 ; E6 + const HS_SEAFOAM_ISLANDS_4_BOULDER_3 ; E7 + const HS_SEAFOAM_ISLANDS_4_BOULDER_4 ; E8 + const HS_SEAFOAM_ISLANDS_5_BOULDER_1 ; E9 + const HS_SEAFOAM_ISLANDS_5_BOULDER_2 ; EA + const HS_ARTICUNO ; EB diff --git a/engine/bank3c.asm b/engine/bank3c.asm index 8158d56f..01c3486b 100644 --- a/engine/bank3c.asm +++ b/engine/bank3c.asm @@ -95,12 +95,12 @@ PikachuCriesPointerTable: ; f008e (3c:408e) pikacry_def PikachuCry2 ; 21:491a pikacry_def PikachuCry3 ; 21:4fdc pikacry_def PikachuCry4 ; 21:59ee - + ; bank 22 pikacry_def PikachuCry5 ; 22:4000 pikacry_def PikachuCry6 ; 22:5042 pikacry_def PikachuCry7 ; 22:6254 - + ; bank 23 pikacry_def PikachuCry8 ; 23:4000 pikacry_def PikachuCry9 ; 23:50ca @@ -110,11 +110,11 @@ PikachuCriesPointerTable: ; f008e (3c:408e) pikacry_def PikachuCry11 ; 24:4000 pikacry_def PikachuCry12 ; 24:4722 pikacry_def PikachuCry13 ; 24:54a4 - + ; bank 25 pikacry_def PikachuCry14 ; 25:4000 pikacry_def PikachuCry15 ; 25:589a - + ; banks 31-34, in no particular order pikacry_def PikachuCry16 ; 31:4000 @@ -128,19 +128,19 @@ PikachuCriesPointerTable: ; f008e (3c:408e) pikacry_def PikachuCry24 ; 33:5632 pikacry_def PikachuCry25 ; 34:573c pikacry_def PikachuCry26 ; 33:725c - + ; bank 35 pikacry_def PikachuCry27 ; 35:4000 pikacry_def PikachuCry28 ; 35:4b5a pikacry_def PikachuCry29 ; 35:5da4 pikacry_def PikachuCry30 ; 35:69ce pikacry_def PikachuCry31 ; 35:6e80 - + ; bank 36 pikacry_def PikachuCry32 ; 36:4000 pikacry_def PikachuCry33 ; 36:458a pikacry_def PikachuCry34 ; 36:523c - + ; bank 37 pikacry_def PikachuCry35 ; 37:4000 pikacry_def PikachuCry36 ; 37:522a @@ -203,7 +203,7 @@ ResetStatusAndHalveMoneyOnBlackout:: ; f0274 (3c:4274) ld a, %11111111 ld [wJoyIgnore], a predef_jump HealParty - + Func_f02da:: ; f02da (3c:42da) ld a, [wCurMap] cp VERMILION_GYM ; ??? new thing about verm gym? @@ -262,7 +262,7 @@ BeachHouse_Block:: ; f0914 (3c:4914) Func_f0a54:: ; f0a54 (3c:4a54) ret - + Func_f0a55:: ; f0a55 (3c:4a55) ld hl, Pointer_f0a76 ; 3c:4a76 .loop @@ -359,130 +359,11 @@ BeachHouseBlockdata: ; f2388 (3c:6388) INCBIN "maps/beach_house.blk" INCLUDE "data/mapObjects/beach_house.asm" -Func_f23d0: ; f23d0 - call SaveScreenTilesToBuffer2 - xor a - ld [wUpdateSpritesEnabled], a - ld hl, wd730 - set 6, [hl] - callab Func_e8c5c - ld hl, wd730 - res 6, [hl] - call GBPalWhiteOutWithDelay3 - call ReloadTilesetTilePatterns - call RestoreScreenTilesAndReloadTilePatterns - call LoadScreenTilesFromBuffer2 - call Delay3 - call GBPalNormal - ld hl, Text_f2412 - ld a, [hOaksAideResult] - and a - jr nz, .asm_f2406 - ld hl, Text_f240c -.asm_f2406 - call PrintText - jp TextScriptEnd - -Text_f240c: - TX_FAR _BeachHousePrinterText5 - TX_SFX_ITEM2 - db "@" - -Text_f2412: - TX_FAR _BeachHousePrinterText6 - TX_SFX_ITEM2 - db "@" - -Func_f2418: - ld hl, BillsHouseText_f243b - call PrintText - call YesNoChoice - ld a, [wCurrentMenuItem] - and a - jr nz, .asm_f2433 -.asm_f2427 - ld hl, BillsHouseText_f2440 - call PrintText - ld a, $2 - ld [W_BILLSHOUSECURSCRIPT], a - ret - -.asm_f2433 - ld hl, BillsHouseText_f2445 - call PrintText - jr .asm_f2427 - -BillsHouseText_f243b: - TX_FAR _BillsHouseText_1e865 - db "@" - -BillsHouseText_f2440: - TX_FAR _BillsHouseText_1e86a - db "@" - -BillsHouseText_f2445: - TX_FAR _BillsHouseText_1e86f - db "@" - -Func_f244a: - CheckEvent EVENT_GOT_SS_TICKET - jr nz, .asm_f247e - ld hl, BillsHouseText_f248c - call PrintText - lb bc, S_S_TICKET, 1 - call GiveItem - jr nc, .asm_f2485 - ld hl, BillsHouseText_f2491 - call PrintText - SetEvent EVENT_GOT_SS_TICKET - ld a, HS_CERULEAN_GUARD_1 - ld [wMissableObjectIndex], a - predef ShowObject - ld a, HS_CERULEAN_GUARD_2 - ld [wMissableObjectIndex], a - predef HideObject -.asm_f247e - ld hl, BillsHouseText_f249d - call PrintText - ret - -.asm_f2485 - ld hl, BillsHouseText_f2498 - call PrintText - ret - -BillsHouseText_f248c: - TX_FAR _BillThankYouText - db "@" - -BillsHouseText_f2491: - TX_FAR _SSTicketReceivedText - TX_SFX_KEY_ITEM - TX_BUTTON_SOUND - db "@" - -BillsHouseText_f2498: - TX_FAR _SSTicketNoRoomText - db "@" - -BillsHouseText_f249d: - TX_FAR _BillsHouseText_1e8cb - db "@" - -Func_f24a2: - ld hl, BillsHouseText_f24a9 - call PrintText - ret - -BillsHouseText_f24a9: - TX_FAR _BillsHouseText_1e8da - db "@" - -Func_f24ae: ; f24ae - dr $f24ae, $f2528 - +INCLUDE "scripts/beach_house2.asm" +INCLUDE "scripts/billshouse2.asm" INCLUDE "scripts/viridianforest2.asm" - dr $f2564, $f25f8 +INCLUDE "scripts/ssanne9_2.asm" +INCLUDE "scripts/silphco11_2.asm" INCLUDE "engine/overworld/hidden_objects.asm" @@ -553,7 +434,7 @@ Func_f2d0c: ld a, [hl] ld [wSecondLockTrashCanIndex + 1], a ret - + GymTrashCans3a: ; f2d31 (3c:6d31) ; First byte: number of trashcan entries ; Following four byte pairs: indices for the second trash can. diff --git a/engine/bank3f.asm b/engine/bank3f.asm index 5cab9357..c8041a3a 100644 --- a/engine/bank3f.asm +++ b/engine/bank3f.asm @@ -4,26 +4,26 @@ INCLUDE "data/map_header_banks.asm" Func_fc4dd:: ; fc4dd (3f:44dd) ; possibly to test if pika should be out? - ld a, [wd430] + ld a, [wPikachuOverworldStateFlags] bit 5, a - jr nz, .asm_fc4f8 ; 3f:44f8 - ld a, [wd430] + jr nz, .hide ; 3f:44f8 + ld a, [wPikachuOverworldStateFlags] bit 7, a - jr nz, .asm_fc4f8 + jr nz, .hide call IsStarterPikachuInOurParty - jr nc, .asm_fc4f8 + jr nc, .hide ld a, [wWalkBikeSurfState] and a - jr nz, .asm_fc4f8 + jr nz, .hide scf ret -.asm_fc4f8 +.hide and a ret Func_fc4fa:: ; fc4fa (3f:44fa) - ld hl, wd430 + ld hl, wPikachuOverworldStateFlags bit 4, [hl] res 4, [hl] jr nz, .asm_fc515 @@ -316,14 +316,14 @@ Func_fc69a:: ; fc69a (3f:469a) Func_fc6c5:: ; fc6c5 (3f:46c5) push hl - ld hl, wd430 + ld hl, wPikachuOverworldStateFlags set 2, [hl] pop hl ret Func_fc6cd:: ; fc6cd (3f:46cd) push hl - ld hl, wd430 + ld hl, wPikachuOverworldStateFlags res 2, [hl] pop hl ret @@ -944,7 +944,7 @@ Func_fca7e: ; fca7e (3f:4a7e) ret Func_fca99: ; fca99 (3f:4a99) - ld a, [wd430] + ld a, [wPikachuOverworldStateFlags] bit 3, a jr nz, .asm_fcad1 ld hl, $10e @@ -1238,10 +1238,10 @@ Func_fcc08:: ; fcc08 (3f:4c08) ret Func_fcc23: ; fcc23 (3f:4c28) - ld a, [wd430] + ld a, [wPikachuOverworldStateFlags] bit 5, a jr nz, .asm_fcc40 - ld a, [wd430] + ld a, [wPikachuOverworldStateFlags] bit 7, a jr nz, .asm_fcc40 ld a, [wd472] @@ -1288,7 +1288,7 @@ Func_fcc42: ; fcc42 (3f:4c42) ret Func_fcc64: ; fcc64 (3f:4c64) - ld hl, wd430 + ld hl, wPikachuOverworldStateFlags bit 6, [hl] jr z, .asm_fcc6e res 6, [hl] diff --git a/engine/items/items.asm b/engine/items/items.asm index aa607911..5d76c37e 100755 --- a/engine/items/items.asm +++ b/engine/items/items.asm @@ -607,7 +607,7 @@ ItemUseSurfboard: ; d725 (3:5725) call .makePlayerMoveForward ld a,$3 ld [wd431], a - ld hl,wd430 + ld hl,wPikachuOverworldStateFlags set 5,[hl] ld hl,wd730 set 7,[hl] diff --git a/engine/overworld/advance_player_sprite.asm b/engine/overworld/advance_player_sprite.asm index e02fb129..758dd558 100644 --- a/engine/overworld/advance_player_sprite.asm +++ b/engine/overworld/advance_player_sprite.asm @@ -7,7 +7,7 @@ _AdvancePlayerSprite:: ; f010c (3c:410c) dec [hl] jr nz,.afterUpdateMapCoords ; if it's the end of the animation, update the player's map coordinates - ld hl, wd430 + ld hl, wPikachuOverworldStateFlags res 5, [hl] ld a,[wYCoord] add b diff --git a/home.asm b/home.asm index fd2e1b26..5f924a40 100644 --- a/home.asm +++ b/home.asm @@ -970,120 +970,7 @@ InterlaceMergeSpriteBuffers:: ; 14c7 (0:14c7) call CopyVideoData jp PrepareRTCDataAndDisableSRAM -Func_1510:: ; 1510 (0:1510) - push hl - ld hl, wd430 - set 7, [hl] - ld hl, wSpriteStateData1 + $f2 ; pikachu data? - ld [hl], $ff - pop hl - ret - -Func_151d:: ; 151d (0:151d) - push hl - ld hl, wd430 - res 7, [hl] - pop hl - ret - -Func_1525:: ; 1525 (0:1525) - push hl - ld hl, wd430 - res 3, [hl] - pop hl - ret - -Func_152d:: ; 152d (0:152d) - push hl - ld hl, wd430 - set 3, [hl] - ld hl, wSpriteStateData1 + $f2 ; pikachu data? - ld [hl], $ff - pop hl - ret - -Func_153a:: ; 153a (0:153a) - push hl - ld hl, wd430 - set 1, [hl] - pop hl - ret - -Func_1542:: ; 1542 (0:1542) - push hl - ld hl, wd430 - res 1, [hl] - pop hl - ret - -Func_154a:: ; 154a (0:154a) - push hl - ld hl, wd430 - bit 1, [hl] - pop hl - ret - -Func_1552:: ; 1552 (0:1552) - ld a, [hl] - dec a - swap a - ld [$ff93], a - homecall Func_fc6d5 ; 3f:46d5 - ret - -Func_1568:: ; 1568 (0:1568) - ld b, $0 - ld c, a -.asm_156b - inc b - ld a, [hli] - cp $ff - jr z, .asm_1578 - cp c - jr nz, .asm_156b - dec b - dec hl - scf - ret -.asm_1578 - dec b - dec hl - and a - ret - -Func_157c:: ; 157c (0:157c) - push hl - push bc - ld a, [H_LOADEDROMBANK] - push af - ld a, [wd44a] - call BankswitchCommon - ld hl, wd44b - ld c, [hl] - inc hl - ld b, [hl] - ld a, [bc] - inc bc - ld [hl], b - dec hl - ld [hl], c - ld c, a - pop af - call BankswitchCommon - ld a, c - pop bc - pop hl - ret - -Func_159b:: ; 159b (0:159b) - ld a, [H_LOADEDROMBANK] - ld b, a - push af - callbs Func_fd2a1 - pop af - call BankswitchCommon - ret - +INCLUDE "home/pikachu.asm" ;INCLUDE "data/collision.asm" INCLUDE "home/lcdc.asm" diff --git a/home/overworld.asm b/home/overworld.asm index 1f84597d..3a9708d9 100644 --- a/home/overworld.asm +++ b/home/overworld.asm @@ -638,7 +638,7 @@ CheckMapConnections:: ; 05db (0:05db) ld [wCurrentTileBlockMapViewPointer + 1],a .loadNewMap ; 06ce (0:06ce) ; load the connected map that was entered - ld hl,wd430 + ld hl,wPikachuOverworldStateFlags set 4,[hl] ld a,$2 ld [wd431],a @@ -1716,7 +1716,7 @@ CollisionCheckOnWater:: ; 0cca (0:0cca) .stopSurfing ; based game freak ld a,$3 ld [wd431],a - ld hl,wd430 + ld hl,wPikachuOverworldStateFlags set 5,[hl] xor a ld [wWalkBikeSurfState],a diff --git a/home/pikachu.asm b/home/pikachu.asm new file mode 100755 index 00000000..5239873c --- /dev/null +++ b/home/pikachu.asm @@ -0,0 +1,113 @@ +Func_1510:: ; 1510 (0:1510) + push hl + ld hl, wPikachuOverworldStateFlags + set 7, [hl] + ld hl, wSpriteStateData1 + $f2 ; pikachu data? + ld [hl], $ff + pop hl + ret + +Func_151d:: ; 151d (0:151d) + push hl + ld hl, wPikachuOverworldStateFlags + res 7, [hl] + pop hl + ret + +Func_1525:: ; 1525 (0:1525) + push hl + ld hl, wPikachuOverworldStateFlags + res 3, [hl] + pop hl + ret + +Func_152d:: ; 152d (0:152d) + push hl + ld hl, wPikachuOverworldStateFlags + set 3, [hl] + ld hl, wSpriteStateData1 + $f2 ; pikachu data? + ld [hl], $ff + pop hl + ret + +Func_153a:: ; 153a (0:153a) + push hl + ld hl, wPikachuOverworldStateFlags + set 1, [hl] + pop hl + ret + +Func_1542:: ; 1542 (0:1542) + push hl + ld hl, wPikachuOverworldStateFlags + res 1, [hl] + pop hl + ret + +Func_154a:: ; 154a (0:154a) + push hl + ld hl, wPikachuOverworldStateFlags + bit 1, [hl] + pop hl + ret + +Func_1552:: ; 1552 (0:1552) + ld a, [hl] + dec a + swap a + ld [hTilePlayerStandingOn], a + homecall Func_fc6d5 ; 3f:46d5 + ret + +Func_1568:: ; 1568 (0:1568) + ld b, $0 + ld c, a +.asm_156b + inc b + ld a, [hli] + cp $ff + jr z, .asm_1578 + cp c + jr nz, .asm_156b + dec b + dec hl + scf + ret +.asm_1578 + dec b + dec hl + and a + ret + +Func_157c:: ; 157c (0:157c) + push hl + push bc + ld a, [H_LOADEDROMBANK] + push af + ld a, [wd44a] + call BankswitchCommon + ld hl, wd44b + ld c, [hl] + inc hl + ld b, [hl] + ld a, [bc] + inc bc + ld [hl], b + dec hl + ld [hl], c + ld c, a + pop af + call BankswitchCommon + ld a, c + pop bc + pop hl + ret + +Func_159b:: ; 159b (0:159b) + ld a, [H_LOADEDROMBANK] + ld b, a + push af + callbs Func_fd2a1 + pop af + call BankswitchCommon + ret diff --git a/scripts/beach_house2.asm b/scripts/beach_house2.asm new file mode 100755 index 00000000..918334ab --- /dev/null +++ b/scripts/beach_house2.asm @@ -0,0 +1,33 @@ +Func_f23d0: ; f23d0 + call SaveScreenTilesToBuffer2 + xor a + ld [wUpdateSpritesEnabled], a + ld hl, wd730 + set 6, [hl] + callab Func_e8c5c + ld hl, wd730 + res 6, [hl] + call GBPalWhiteOutWithDelay3 + call ReloadTilesetTilePatterns + call RestoreScreenTilesAndReloadTilePatterns + call LoadScreenTilesFromBuffer2 + call Delay3 + call GBPalNormal + ld hl, Text_f2412 + ld a, [hOaksAideResult] + and a + jr nz, .asm_f2406 + ld hl, Text_f240c +.asm_f2406 + call PrintText + jp TextScriptEnd + +Text_f240c: + TX_FAR _BeachHousePrinterText5 + TX_SFX_ITEM2 + db "@" + +Text_f2412: + TX_FAR _BeachHousePrinterText6 + TX_SFX_ITEM2 + db "@" diff --git a/scripts/billshouse2.asm b/scripts/billshouse2.asm new file mode 100755 index 00000000..48205029 --- /dev/null +++ b/scripts/billshouse2.asm @@ -0,0 +1,158 @@ +Func_f2418: + ld hl, BillsHouseText_f243b + call PrintText + call YesNoChoice + ld a, [wCurrentMenuItem] + and a + jr nz, .asm_f2433 +.asm_f2427 + ld hl, BillsHouseText_f2440 + call PrintText + ld a, $2 + ld [W_BILLSHOUSECURSCRIPT], a + ret + +.asm_f2433 + ld hl, BillsHouseText_f2445 + call PrintText + jr .asm_f2427 + +BillsHouseText_f243b: + TX_FAR _BillsHouseText_1e865 + db "@" + +BillsHouseText_f2440: + TX_FAR _BillsHouseText_1e86a + db "@" + +BillsHouseText_f2445: + TX_FAR _BillsHouseText_1e86f + db "@" + +Func_f244a: + CheckEvent EVENT_GOT_SS_TICKET + jr nz, .asm_f247e + ld hl, BillsHouseText_f248c + call PrintText + lb bc, S_S_TICKET, 1 + call GiveItem + jr nc, .asm_f2485 + ld hl, BillsHouseText_f2491 + call PrintText + SetEvent EVENT_GOT_SS_TICKET + ld a, HS_CERULEAN_GUARD_1 + ld [wMissableObjectIndex], a + predef ShowObject + ld a, HS_CERULEAN_GUARD_2 + ld [wMissableObjectIndex], a + predef HideObject +.asm_f247e + ld hl, BillsHouseText_f249d + call PrintText + ret + +.asm_f2485 + ld hl, BillsHouseText_f2498 + call PrintText + ret + +BillsHouseText_f248c: + TX_FAR _BillThankYouText + db "@" + +BillsHouseText_f2491: + TX_FAR _SSTicketReceivedText + TX_SFX_KEY_ITEM + TX_BUTTON_SOUND + db "@" + +BillsHouseText_f2498: + TX_FAR _SSTicketNoRoomText + db "@" + +BillsHouseText_f249d: + TX_FAR _BillsHouseText_1e8cb + db "@" + +Func_f24a2: + ld hl, BillsHouseText_f24a9 + call PrintText + ret + +BillsHouseText_f24a9: + TX_FAR _BillsHouseText_1e8da + db "@" + +Func_f24ae: ; f24ae + ld a, [wCurMap] + cp BILLS_HOUSE + jr nz, .asm_f24d2 + call Func_154a + jr z, .asm_f24d2 + ld a, [W_BILLSHOUSECURSCRIPT] + cp $5 + ld e, $1b + ret z + cp $0 + ld e, $17 + ret z + CheckEventHL EVENT_MET_BILL_2 + ld e, $20 + ret z + ld e, $1f + ret + +.asm_f24d2 + ld e, $ff + ret + +Func_f24d5: + ld a, $ff + ld [wJoyIgnore], a + xor a + ld [wPlayerMovingDirection], a + call UpdateSprites + call UpdateSprites + ld hl, Data_f2505 + call Func_159b + ld a, $f ; pikachu + ld [wEmotionBubbleSpriteIndex], a + ld a, $1 + ld [wWhichEmotionBubble], a + predef EmotionBubble + call Func_153a + callab InitializePikachuTextID + ret + +Data_f2505: + db $00 + db $20 + db $20 + db $20 + db $1e + db $3f + +Func_f250b: + ld hl, Data_f251c + ld b, SPRITE_FACING_UP + call Func_f0a82 + ld hl, Data_f2521 + ld b, SPRITE_FACING_RIGHT + call Func_f0a82 + ret + +Data_f251c: + db $00 + db $1f + db $1d + db $38 + db $3f + +Data_f2521: + db $00 + db $1e + db $1f + db $1f + db $1d + db $38 + db $3f diff --git a/scripts/oakslab.asm b/scripts/oakslab.asm index 63cec822..43464d77 100755 --- a/scripts/oakslab.asm +++ b/scripts/oakslab.asm @@ -798,7 +798,7 @@ OaksLabText_1c9a7: OaksLabScript_1c9ac: ld a, $1 - ld [wSavedPlayerScreenY], a + ld [wEmotionBubbleSpriteIndex], a xor a ld [wWhichEmotionBubble], a predef EmotionBubble diff --git a/scripts/silphco11_2.asm b/scripts/silphco11_2.asm new file mode 100755 index 00000000..e7b59757 --- /dev/null +++ b/scripts/silphco11_2.asm @@ -0,0 +1,76 @@ +Func_f25a0: + ld hl, MissableObjects_f25ce +.asm_f25a3 + ld a, [hli] + cp $ff + jr z, .asm_f25b4 + push hl + ld [wMissableObjectIndex], a + predef HideObject + pop hl + jr .asm_f25a3 + +.asm_f25b4 + ld hl, MissableObjects_f25c7 +.asm_f25b7 + ld a, [hli] + cp $ff + ret z + push hl + ld [wMissableObjectIndex], a + predef ShowObject + pop hl + jr .asm_f25b7 + +MissableObjects_f25c7: + db HS_SAFFRON_CITY_8 + db HS_SAFFRON_CITY_9 + db HS_SAFFRON_CITY_A + db HS_SAFFRON_CITY_B + db HS_SAFFRON_CITY_C + db HS_SAFFRON_CITY_D + db $FF + +MissableObjects_f25ce + db HS_SAFFRON_CITY_1 + db HS_SAFFRON_CITY_2 + db HS_SAFFRON_CITY_3 + db HS_SAFFRON_CITY_4 + db HS_SAFFRON_CITY_5 + db HS_SAFFRON_CITY_6 + db HS_SAFFRON_CITY_7 + db HS_SAFFRON_CITY_E + db HS_SAFFRON_CITY_F + db HS_SILPH_CO_2F_2 + db HS_SILPH_CO_2F_3 + db HS_SILPH_CO_2F_4 + db HS_SILPH_CO_2F_5 + db HS_SILPH_CO_3F_1 + db HS_SILPH_CO_3F_2 + db HS_SILPH_CO_4F_1 + db HS_SILPH_CO_4F_2 + db HS_SILPH_CO_4F_3 + db HS_SILPH_CO_5F_1 + db HS_SILPH_CO_5F_2 + db HS_SILPH_CO_5F_3 + db HS_SILPH_CO_5F_4 + db HS_SILPH_CO_6F_1 + db HS_SILPH_CO_6F_2 + db HS_SILPH_CO_6F_3 + db HS_SILPH_CO_7F_1 + db HS_SILPH_CO_7F_2 + db HS_SILPH_CO_7F_3 + db HS_SILPH_CO_7F_4 + db HS_SILPH_CO_8F_1 + db HS_SILPH_CO_8F_2 + db HS_SILPH_CO_8F_3 + db HS_SILPH_CO_9F_1 + db HS_SILPH_CO_9F_2 + db HS_SILPH_CO_9F_3 + db HS_SILPH_CO_10F_1 + db HS_SILPH_CO_10F_2 + db HS_SILPH_CO_11F_1 + db HS_SILPH_CO_11F_2 + db HS_SILPH_CO_11F_3 + db HS_MAP_F4_1 + db $ff \ No newline at end of file diff --git a/scripts/ssanne9_2.asm b/scripts/ssanne9_2.asm new file mode 100755 index 00000000..f856221c --- /dev/null +++ b/scripts/ssanne9_2.asm @@ -0,0 +1,35 @@ +Func_f2570: + ld hl, SSAnne9Text_f2577 + call PrintText + ret + +SSAnne9Text_f2577: + TX_FAR _SSAnne9Text_61c1f + db "@" + +Func_f257c: + ld hl, SSAnne9Text_f2583 + call PrintText + ret + +SSAnne9Text_f2583: + TX_FAR _SSAnne9Text_61c2e + db "@" + +Func_f2588: + ld hl, SSAnne9Text_f258f + call PrintText + ret + +SSAnne9Text_f258f: + TX_FAR _SSAnne9Text_61c3d + db "@" + +Func_f2594: + ld hl, SSAnne9Text_f259b + call PrintText + ret + +SSAnne9Text_f259b: + TX_FAR _SSAnne9Text_61c4c + db "@" diff --git a/scripts/viridianforest2.asm b/scripts/viridianforest2.asm index 41c81218..489db39c 100755 --- a/scripts/viridianforest2.asm +++ b/scripts/viridianforest2.asm @@ -43,3 +43,11 @@ Text_f255f: TX_FAR _ViridianForestText13 db "@" +Func_f2564: + ld hl, ViridianForestText_f256b + call PrintText + ret + +ViridianForestText_f256b: + TX_FAR _ViridianForestText14 + db "@" diff --git a/wram.asm b/wram.asm index 2c9b3d4e..64a394ed 100755 --- a/wram.asm +++ b/wram.asm @@ -2523,7 +2523,7 @@ wDestinationWarpID:: ; d42f ; if $ff, the player's coordinates are not updated when entering the map ds 1 -wd430:: ds 1 ; d42f +wPikachuOverworldStateFlags:: ds 1 ; d42f wd431:: ds 1 ; d430 wd432:: ds 1 ; d431 wd433:: ds 1 ; d432 -- cgit v1.3.1-sl0p