mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-06 15:45:24 +13:00
Start using text predef macros
also sprite direction constants
This commit is contained in:
parent
bc6f0bc08a
commit
f702fc7840
36 changed files with 225 additions and 219 deletions
|
|
@ -19,14 +19,14 @@ BattleCenterMScript: ; 4fd10 (13:7d10)
|
|||
ld [hli], a
|
||||
ld a, $a
|
||||
ld [hl], a
|
||||
ld a, $8
|
||||
ld a, SPRITE_FACING_LEFT
|
||||
ld [wSpriteStateData1 + $19], a
|
||||
ld a, [$ffaa]
|
||||
cp $2
|
||||
ret z
|
||||
ld a, $7
|
||||
ld [wSpriteStateData2 + $15], a
|
||||
ld a, $c
|
||||
ld a, SPRITE_FACING_RIGHT
|
||||
ld [wSpriteStateData1 + $19], a
|
||||
ret
|
||||
|
||||
|
|
|
|||
|
|
@ -17,11 +17,11 @@ BillsHouseScript0: ; 1e782 (7:6782)
|
|||
|
||||
BillsHouseScript1: ; 1e783 (7:6783)
|
||||
ld a, [wSpriteStateData1 + 9]
|
||||
and a
|
||||
and a ; cp SPRITE_FACING_DOWN
|
||||
ld de, MovementData_1e79c
|
||||
jr nz, .asm_1e78f
|
||||
jr nz, .notDown
|
||||
ld de, MovementData_1e7a0
|
||||
.asm_1e78f
|
||||
.notDown
|
||||
ld a, $1
|
||||
ld [$ff8c], a
|
||||
call MoveSprite
|
||||
|
|
@ -32,6 +32,7 @@ BillsHouseScript1: ; 1e783 (7:6783)
|
|||
MovementData_1e79c: ; 1e79c (7:679c)
|
||||
db $40,$40,$40,$FF
|
||||
|
||||
; make Bill walk around the player
|
||||
MovementData_1e7a0: ; 1e7a0 (7:67a0)
|
||||
db $C0,$40,$40,$80,$40,$FF
|
||||
|
||||
|
|
|
|||
|
|
@ -85,11 +85,11 @@ CopycatsHouse2FText6: ; 5ccfe (17:4cfe)
|
|||
CopycatsHouse2FText7: ; 5cd03 (17:4d03)
|
||||
TX_ASM
|
||||
ld a, [wSpriteStateData1 + 9]
|
||||
cp $4
|
||||
cp SPRITE_FACING_UP
|
||||
ld hl, CopycatsHouse2FText_5cd1c
|
||||
jr nz, .asm_399a4
|
||||
jr nz, .notUp
|
||||
ld hl, CopycatsHouse2FText_5cd17
|
||||
.asm_399a4
|
||||
.notUp
|
||||
call PrintText
|
||||
jp TextScriptEnd
|
||||
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ Mansion1ReplaceBlock: ; 44310 (11:4310)
|
|||
|
||||
Mansion1Script_Switches: ; 44316 (11:4316)
|
||||
ld a, [wSpriteStateData1 + 9]
|
||||
cp $4
|
||||
cp SPRITE_FACING_UP
|
||||
ret nz
|
||||
xor a
|
||||
ld [hJoyHeld], a
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ Mansion2Script_5202f: ; 5202f (14:602f)
|
|||
|
||||
Mansion2Script_Switches: ; 52037 (14:6037)
|
||||
ld a, [wSpriteStateData1 + 9]
|
||||
cp $4
|
||||
cp SPRITE_FACING_UP
|
||||
ret nz
|
||||
xor a
|
||||
ld [hJoyHeld], a
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ Mansion3Script_5225b: ; 5225b (14:625b)
|
|||
|
||||
Mansion3Script_Switches: ; 5227a (14:627a)
|
||||
ld a, [wSpriteStateData1 + 9]
|
||||
cp $4
|
||||
cp SPRITE_FACING_UP
|
||||
ret nz
|
||||
xor a
|
||||
ld [hJoyHeld], a
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ Mansion4Script_523cf: ; 523cf (14:63cf)
|
|||
|
||||
Mansion4Script_Switches: ; 52420 (14:6420)
|
||||
ld a, [wSpriteStateData1 + 9]
|
||||
cp $4
|
||||
cp SPRITE_FACING_UP
|
||||
ret nz
|
||||
xor a
|
||||
ld [hJoyHeld], a
|
||||
|
|
|
|||
|
|
@ -454,6 +454,7 @@ OaksLabScript14: ; 1ce6d (7:4e6d)
|
|||
ld a, $12
|
||||
ld [W_OAKSLABCURSCRIPT], a
|
||||
jr .done
|
||||
; make the player keep facing the rival as he walks away
|
||||
.asm_1ce8c
|
||||
ld a, [wcf0f]
|
||||
cp $5
|
||||
|
|
@ -461,17 +462,17 @@ OaksLabScript14: ; 1ce6d (7:4e6d)
|
|||
ld a, [W_XCOORD]
|
||||
cp $4
|
||||
jr nz, .asm_1cea1
|
||||
ld a, $c
|
||||
ld a, SPRITE_FACING_RIGHT
|
||||
ld [wSpriteStateData1 + 9], a
|
||||
jr .done
|
||||
.asm_1cea1
|
||||
ld a, $8
|
||||
ld a, SPRITE_FACING_LEFT
|
||||
ld [wSpriteStateData1 + 9], a
|
||||
jr .done
|
||||
.asm_1cea8
|
||||
cp $4
|
||||
ret nz
|
||||
xor a
|
||||
xor a ; ld a, SPRITE_FACING_DOWN
|
||||
ld [wSpriteStateData1 + 9], a
|
||||
.done
|
||||
ret
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ PalletTownScript3: ; 18f12 (6:4f12)
|
|||
ld a,[wd730]
|
||||
bit 0,a
|
||||
ret nz
|
||||
xor a
|
||||
xor a ; ld a, SPRITE_FACING_DOWN
|
||||
ld [wSpriteStateData1 + 9],a
|
||||
ld a,1
|
||||
ld [wcf0d],a
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ PokemonTower7Script4: ; 60d86 (18:4d86)
|
|||
ld a, HS_POKEMONTOWER_7_MR_FUJI
|
||||
ld [wcc4d], a
|
||||
predef HideObject
|
||||
ld a, $4
|
||||
ld a, SPRITE_FACING_UP
|
||||
ld [wSpriteStateData1 + 9], a
|
||||
ld a, LAVENDER_HOUSE_1
|
||||
ld [H_DOWNARROWBLINKCNT1], a
|
||||
|
|
|
|||
|
|
@ -52,11 +52,11 @@ MomHealText2: ; 481c1 (12:41c1)
|
|||
RedsHouse1FText2: ; 0x481c6 TV
|
||||
TX_ASM
|
||||
ld a,[wSpriteStateData1 + 9]
|
||||
cp 4
|
||||
cp SPRITE_FACING_UP
|
||||
ld hl,TVWrongSideText
|
||||
jr nz,.done ; if player is not facing up
|
||||
jr nz,.notUp
|
||||
ld hl,StandByMeText
|
||||
.done
|
||||
.notUp
|
||||
call PrintText
|
||||
jp TextScriptEnd
|
||||
|
||||
|
|
|
|||
|
|
@ -50,8 +50,8 @@ Route11GateUpstairsText_494a3: ; 494a3 (12:54a3)
|
|||
Route11GateUpstairsText3: ; 494a8 (12:54a8)
|
||||
TX_ASM
|
||||
ld a, [wSpriteStateData1 + 9]
|
||||
cp $4
|
||||
jp nz, Route12GateUpstairsScript_495c9
|
||||
cp SPRITE_FACING_UP
|
||||
jp nz, GateUpstairsScript_PrintIfFacingUp
|
||||
ld a, [wd7d8]
|
||||
bit 7, a ; fought snorlax?
|
||||
ld hl, BinocularsSnorlaxText
|
||||
|
|
@ -72,7 +72,7 @@ BinocularsNoSnorlaxText:
|
|||
Route11GateUpstairsText4: ; 494ce (12:54ce)
|
||||
TX_ASM
|
||||
ld hl, Route11GateUpstairsText_494d5
|
||||
jp Route12GateUpstairsScript_495c9
|
||||
jp GateUpstairsScript_PrintIfFacingUp
|
||||
|
||||
Route11GateUpstairsText_494d5: ; 494d5 (12:54d5)
|
||||
TX_FAR _Route11GateUpstairsText_494d5
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ TM39NoRoomText: ; 495ac (12:55ac)
|
|||
Route12GateUpstairsText2: ; 495b1 (12:55b1)
|
||||
TX_ASM
|
||||
ld hl, Route12GateUpstairsText_495b8
|
||||
jp Route12GateUpstairsScript_495c9
|
||||
jp GateUpstairsScript_PrintIfFacingUp
|
||||
|
||||
Route12GateUpstairsText_495b8: ; 495b8 (12:55b8)
|
||||
TX_FAR _Route12GateUpstairsText_495b8
|
||||
|
|
@ -59,21 +59,21 @@ Route12GateUpstairsText_495b8: ; 495b8 (12:55b8)
|
|||
Route12GateUpstairsText3: ; 495bd (12:55bd)
|
||||
TX_ASM
|
||||
ld hl, Route12GateUpstairsText_495c4
|
||||
jp Route12GateUpstairsScript_495c9
|
||||
jp GateUpstairsScript_PrintIfFacingUp
|
||||
|
||||
Route12GateUpstairsText_495c4: ; 495c4 (12:55c4)
|
||||
TX_FAR _Route12GateUpstairsText_495c4
|
||||
db "@"
|
||||
|
||||
Route12GateUpstairsScript_495c9: ; 495c9 (12:55c9)
|
||||
GateUpstairsScript_PrintIfFacingUp: ; 495c9 (12:55c9)
|
||||
ld a, [wSpriteStateData1 + 9]
|
||||
cp $4
|
||||
jr z, .asm_495d4
|
||||
cp SPRITE_FACING_UP
|
||||
jr z, .up
|
||||
ld a, $1
|
||||
jr .asm_495d8
|
||||
.asm_495d4
|
||||
jr .done
|
||||
.up
|
||||
call PrintText
|
||||
xor a
|
||||
.asm_495d8
|
||||
.done
|
||||
ld [wDoNotWaitForButtonPressAfterDisplayingText], a
|
||||
jp TextScriptEnd
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ Route15GateUpstairsText_4968c: ; 4968c (12:568c)
|
|||
Route15GateUpstairsText2: ; 49691 (12:5691)
|
||||
TX_ASM
|
||||
ld hl, Route15GateUpstairsText_49698
|
||||
jp Route12GateUpstairsScript_495c9
|
||||
jp GateUpstairsScript_PrintIfFacingUp
|
||||
|
||||
Route15GateUpstairsText_49698: ; 49698 (12:5698)
|
||||
TX_FAR _Route15GateUpstairsText_49698
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ Route16GateUpstairsText_4982f: ; 4982f (12:582f)
|
|||
Route16GateUpstairsText3: ; 49834 (12:5834)
|
||||
TX_ASM
|
||||
ld hl, Route16GateUpstairsText_4983b
|
||||
jp Route12GateUpstairsScript_495c9
|
||||
jp GateUpstairsScript_PrintIfFacingUp
|
||||
|
||||
Route16GateUpstairsText_4983b: ; 4983b (12:583b)
|
||||
TX_FAR _Route16GateUpstairsText_4983b
|
||||
|
|
@ -39,7 +39,7 @@ Route16GateUpstairsText_4983b: ; 4983b (12:583b)
|
|||
Route16GateUpstairsText4: ; 49840 (12:5840)
|
||||
TX_ASM
|
||||
ld hl, Route16GateUpstairsText_49847
|
||||
jp Route12GateUpstairsScript_495c9
|
||||
jp GateUpstairsScript_PrintIfFacingUp
|
||||
|
||||
Route16GateUpstairsText_49847: ; 49847 (12:5847)
|
||||
TX_FAR _Route16GateUpstairsText_49847
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ Route18GateUpstairsText1: ; 4997e (12:597e)
|
|||
Route18GateUpstairsText2: ; 4998c (12:598c)
|
||||
TX_ASM
|
||||
ld hl, Route18GateUpstairsText_49993
|
||||
jp Route12GateUpstairsScript_495c9
|
||||
jp GateUpstairsScript_PrintIfFacingUp
|
||||
|
||||
Route18GateUpstairsText_49993: ; 49993 (12:5993)
|
||||
TX_FAR _Route18GateUpstairsText_49993
|
||||
|
|
@ -25,7 +25,7 @@ Route18GateUpstairsText_49993: ; 49993 (12:5993)
|
|||
Route18GateUpstairsText3: ; 49998 (12:5998)
|
||||
TX_ASM
|
||||
ld hl, Route18GateUpstairsText_4999f
|
||||
jp Route12GateUpstairsScript_495c9
|
||||
jp GateUpstairsScript_PrintIfFacingUp
|
||||
|
||||
Route18GateUpstairsText_4999f: ; 4999f (12:599f)
|
||||
TX_FAR _Route18GateUpstairsText_4999f
|
||||
|
|
|
|||
|
|
@ -148,13 +148,13 @@ Route22Script2: ; 50fb5 (14:4fb5)
|
|||
cp $ff
|
||||
jp z, Route22Script_50ece
|
||||
ld a, [wSpriteStateData1 + 9]
|
||||
and a
|
||||
jr nz, .asm_50fc7
|
||||
ld a, $4
|
||||
jr .asm_50fc9
|
||||
.asm_50fc7
|
||||
ld a, $c
|
||||
.asm_50fc9
|
||||
and a ; cp SPRITE_FACING_DOWN
|
||||
jr nz, .notDown
|
||||
ld a, SPRITE_FACING_UP
|
||||
jr .done
|
||||
.notDown
|
||||
ld a, SPRITE_FACING_RIGHT
|
||||
.done
|
||||
ld [$ff8d], a
|
||||
ld a, $1
|
||||
ld [$ff8c], a
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ SafariZoneEntranceScriptPointers: ; 751d9 (1d:51d9)
|
|||
ld [wJoyIgnore], a
|
||||
xor a
|
||||
ld [hJoyHeld], a
|
||||
ld a, $c
|
||||
ld a, SPRITE_FACING_RIGHT
|
||||
ld [wSpriteStateData1 + 9], a
|
||||
ld a, [wWhichTrade]
|
||||
cp $1
|
||||
|
|
@ -247,7 +247,7 @@ SafariZoneEntranceTextPointers: ; 752b9 (1d:52b9)
|
|||
.asm_7539c
|
||||
ld hl, .SafariZoneEntranceText_753c0
|
||||
call PrintText
|
||||
ld a, $4
|
||||
ld a, SPRITE_FACING_UP
|
||||
ld [wSpriteStateData1 + 9], a
|
||||
ld a, $40
|
||||
ld c, $1
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ VermilionCityScriptPointers: ; 197dc (6:57dc)
|
|||
|
||||
VermilionCityScript0: ; 197e6 (6:57e6)
|
||||
ld a, [wSpriteStateData1 + 9]
|
||||
and a
|
||||
and a ; cp SPRITE_FACING_DOWN
|
||||
ret nz
|
||||
ld hl, CoordsData_19823
|
||||
call ArePlayerCoordsInArray
|
||||
|
|
@ -54,7 +54,7 @@ VermilionCityScript0: ; 197e6 (6:57e6)
|
|||
ld a, [wd803]
|
||||
bit 2, a
|
||||
jr nz, .asm_19810
|
||||
ld b, $3f
|
||||
ld b, S_S__TICKET
|
||||
predef IsItemInBag_
|
||||
ld a, b
|
||||
and a
|
||||
|
|
@ -162,7 +162,7 @@ VermilionCityText3: ; 198b1 (6:58b1)
|
|||
bit 2, a
|
||||
jr nz, .asm_198f6
|
||||
ld a, [wSpriteStateData1 + 9]
|
||||
cp $c
|
||||
cp SPRITE_FACING_RIGHT
|
||||
jr z, .asm_198c8
|
||||
ld hl, VermilionCityCoords1
|
||||
call ArePlayerCoordsInArray
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue