ref: fb559f1f4e0104bfc59350359a2fb82fbe88ebba
parent: 77ba61cb17665779673dcd536122271c66614252
author: dannye <corrnondacqb@yahoo.com>
date: Thu Jul 16 22:52:25 EDT 2015
More direction constants facing directions, npc movement, joypad
--- a/engine/overworld/movement.asm
+++ b/engine/overworld/movement.asm
@@ -162,8 +162,8 @@
ld [hl], a ; increment movement byte 1 (movement data index)
dec a
push hl
- ld hl, wcf0f
- dec [hl] ; decrement wcf0f
+ ld hl, wNPCNumScriptedSteps
+ dec [hl] ; decrement wNPCNumScriptedSteps
pop hl
ld de, wNPCMovementDirections
call LoadDEPlusA ; a = [wNPCMovementDirections + movement byte 1]
--- a/engine/overworld/pewter_guys.asm
+++ b/engine/overworld/pewter_guys.asm
@@ -66,17 +66,18 @@
dw .right
.down
- db $40, $40, $ff
+ db D_UP, D_UP, $ff
.up
- db $10, $20, $ff
+ db D_RIGHT, D_LEFT, $ff
.left
- db $40, $10, $ff
+ db D_UP, D_RIGHT, $ff
.right
- db $40, $20, $ff
+ db D_UP, D_LEFT, $ff
; these are the five coordinates which trigger the gym guy and pointers to
; different movements for the player to make to get positioned before the
; main movement
+; $00 is a pause
PewterGymGuyCoords: ; 37d06 (d:7d06)
db 16, 34
dw .one
@@ -90,12 +91,12 @@
dw .five
.one
- db $20, $80, $80, $10, $ff
+ db D_LEFT, D_DOWN, D_DOWN, D_RIGHT, $ff
.two
- db $20, $80, $10, $20, $ff
+ db D_LEFT, D_DOWN, D_RIGHT, D_LEFT, $ff
.three
- db $20, $20, $20, $00, $00, $00, $00, $00, $00, $00, $00, $ff
+ db D_LEFT, D_LEFT, D_LEFT, $00, $00, $00, $00, $00, $00, $00, $00, $ff
.four
- db $20, $20, $40, $20, $ff
+ db D_LEFT, D_LEFT, D_UP, D_LEFT, $ff
.five
- db $20, $80, $20, $00, $00, $00, $00, $00, $00, $00, $00, $ff
+ db D_LEFT, D_DOWN, D_LEFT, $00, $00, $00, $00, $00, $00, $00, $00, $ff
--- a/home.asm
+++ b/home.asm
@@ -3064,7 +3064,7 @@
jr nz,.loop
ld a,c
- ld [wcf0f],a ; number of steps taken
+ ld [wNPCNumScriptedSteps],a ; number of steps taken
pop bc
ld hl,wd730
--- a/scripts/billshouse.asm
+++ b/scripts/billshouse.asm
@@ -30,11 +30,19 @@
ret
MovementData_1e79c: ; 1e79c (7:679c)
- db $40,$40,$40,$FF
+ db NPC_MOVEMENT_UP
+ db NPC_MOVEMENT_UP
+ db NPC_MOVEMENT_UP
+ db $FF
; make Bill walk around the player
MovementData_1e7a0: ; 1e7a0 (7:67a0)
- db $C0,$40,$40,$80,$40,$FF
+ db NPC_MOVEMENT_RIGHT
+ db NPC_MOVEMENT_UP
+ db NPC_MOVEMENT_UP
+ db NPC_MOVEMENT_LEFT
+ db NPC_MOVEMENT_UP
+ db $FF
BillsHouseScript2: ; 1e7a6 (7:67a6)
ld a, [wd730]
@@ -82,7 +90,12 @@
ret
MovementData_1e807: ; 1e807 (7:6807)
- db $00,$C0,$C0,$C0,$00,$FF
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_RIGHT
+ db NPC_MOVEMENT_RIGHT
+ db NPC_MOVEMENT_RIGHT
+ db NPC_MOVEMENT_DOWN
+ db $FF
BillsHouseScript4: ; 1e80d (7:680d)
ld a, [wd730]
--- a/scripts/celadongamecorner.asm
+++ b/scripts/celadongamecorner.asm
@@ -83,10 +83,23 @@
ret
MovementData_48c5a: ; 48c5a (12:4c5a)
- db $00,$C0,$C0,$40,$C0,$C0,$C0,$C0,$FF
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_RIGHT
+ db NPC_MOVEMENT_RIGHT
+ db NPC_MOVEMENT_UP
+ db NPC_MOVEMENT_RIGHT
+ db NPC_MOVEMENT_RIGHT
+ db NPC_MOVEMENT_RIGHT
+ db NPC_MOVEMENT_RIGHT
+ db $FF
MovementData_48c63: ; 48c63 (12:4c63)
- db $C0,$C0,$C0,$C0,$C0,$FF
+ db NPC_MOVEMENT_RIGHT
+ db NPC_MOVEMENT_RIGHT
+ db NPC_MOVEMENT_RIGHT
+ db NPC_MOVEMENT_RIGHT
+ db NPC_MOVEMENT_RIGHT
+ db $FF
CeladonGameCornerScript2: ; 48c69 (12:4c69)
ld a, [wd730]
--- a/scripts/ceruleancity.asm
+++ b/scripts/ceruleancity.asm
@@ -45,10 +45,10 @@
ld a, [wWhichTrade]
cp $1
ld a, $8
- ld b, $0
+ ld b, SPRITE_FACING_DOWN
jr nz, .asm_194e6
ld a, $4
- ld b, $4
+ ld b, SPRITE_FACING_UP
.asm_194e6
ld [wd528], a
ld a, b
@@ -110,12 +110,15 @@
db $ff
CeruleanCityMovement1: ; 19559 (6:5559)
- db $00,$00,$00,$FF
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_DOWN
+ db $FF
CeruleanCityScript_1955d: ; 1955d (6:555d)
ld a,1
ld [$ff8c],a
- xor a
+ xor a ; SPRITE_FACING_DOWN
ld [$ff8d],a
jp SetSpriteFacingDirectionAndDelay ; face object
@@ -195,10 +198,24 @@
ret
CeruleanCityMovement3: ; 19600 (6:5600)
- db $80,$00,$00,$00,$00,$00,$00,$FF
+ db NPC_MOVEMENT_LEFT
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_DOWN
+ db $FF
CeruleanCityMovement4: ; 19608 (6:5608)
- db $c0,$00,$00,$00,$00,$00,$00,$FF
+ db NPC_MOVEMENT_RIGHT
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_DOWN
+ db $FF
CeruleanCityScript3: ; 19610 (6:5610)
ld a, [wd730]
--- a/scripts/cinnabargym.asm
+++ b/scripts/cinnabargym.asm
@@ -70,10 +70,13 @@
ret
MovementData_757d7: ; 757d7 (1d:57d7)
- db $80,$40,$FF
+ db NPC_MOVEMENT_LEFT
+ db NPC_MOVEMENT_UP
+ db $FF
MovementData_757da: ; 757da (1d:57da)
- db $80,$FF
+ db NPC_MOVEMENT_LEFT
+ db $FF
CinnabarGymScript1: ; 757dc (1d:57dc)
ld a, [wd730]
--- a/scripts/fightingdojo.asm
+++ b/scripts/fightingdojo.asm
@@ -46,7 +46,7 @@
ld [wd528], a
ld a, $1
ld [$ff8c], a
- ld a, $8
+ ld a, SPRITE_FACING_LEFT
ld [$ff8d], a
call SetSpriteFacingDirectionAndDelay
ld a, $1
@@ -65,7 +65,7 @@
ld [wd528], a
ld a, $1
ld [$ff8c], a
- ld a, $8
+ ld a, SPRITE_FACING_LEFT
ld [$ff8d], a
call SetSpriteFacingDirectionAndDelay
--- a/scripts/gary.asm
+++ b/scripts/gary.asm
@@ -40,9 +40,9 @@
ret
RLEMovement75f63: ; 75f63 (1d:5f63)
- db $40,1
- db $10,1
- db $40,3
+ db D_UP,1
+ db D_RIGHT,1
+ db D_UP,3
db $ff
GaryScript2: ; 75f6a (1d:5f6a)
@@ -128,7 +128,12 @@
ret
MovementData_76014: ; 76014 (1d:6014)
- db $40,$40,$40,$40,$40,$FF
+ db NPC_MOVEMENT_UP
+ db NPC_MOVEMENT_UP
+ db NPC_MOVEMENT_UP
+ db NPC_MOVEMENT_UP
+ db NPC_MOVEMENT_UP
+ db $FF
GaryScript5: ; 7601a (1d:601a)
ld a, [wd730]
@@ -138,12 +143,12 @@
ld [wd528], a
ld a, $1
ld [$ff8c], a
- ld a, $8
+ ld a, SPRITE_FACING_LEFT
ld [$ff8d], a
call SetSpriteFacingDirectionAndDelay
ld a, $2
ld [$ff8c], a
- xor a
+ xor a ; SPRITE_FACING_DOWN
ld [$ff8d], a
call SetSpriteFacingDirectionAndDelay ; face object
ld a, $3
@@ -156,7 +161,7 @@
GaryScript6: ; 76047 (1d:6047)
ld a, $2
ld [$ff8c], a
- ld a, $c
+ ld a, SPRITE_FACING_RIGHT
ld [$ff8d], a
call SetSpriteFacingDirectionAndDelay ; face object
ld a, $4
@@ -169,7 +174,7 @@
GaryScript7: ; 7605f (1d:605f)
ld a, $2
ld [$ff8c], a
- xor a
+ xor a ; SPRITE_FACING_DOWN
ld [$ff8d], a
call SetSpriteFacingDirectionAndDelay ; face object
ld a, $5
@@ -184,7 +189,9 @@
ret
MovementData_76080: ; 76080 (1d:6080)
- db $40,$40,$FF
+ db NPC_MOVEMENT_UP
+ db NPC_MOVEMENT_UP
+ db $FF
GaryScript8: ; 76083 (1d:6083)
ld a, [wd730]
@@ -211,8 +218,8 @@
ret
RLEMovement760b4: ; 760b4 (1d:60b4)
- db $40,4
- db $20,1
+ db D_UP,4
+ db D_LEFT,1
db $ff
GaryScript10: ; 760b9 (1d:60b9)
--- a/scripts/halloffameroom.asm
+++ b/scripts/halloffameroom.asm
@@ -73,7 +73,7 @@
ret
RLEMovement5a528: ; 5a528 (16:6528)
- db $40,$5
+ db D_UP,$5
db $ff
HallofFameRoomScript1: ; 5a52b (16:652b)
@@ -85,7 +85,7 @@
ld a, $1
ld [$ff8c], a
call SetSpriteMovementBytesToFF
- ld a, $8
+ ld a, SPRITE_FACING_LEFT
ld [$ff8d], a
call SetSpriteFacingDirectionAndDelay
call Delay3
--- a/scripts/lance.asm
+++ b/scripts/lance.asm
@@ -111,10 +111,10 @@
ret
RLEList_5a379: ; 5a379 (16:6379)
- db $40, $0C
- db $20, $0C
- db $80, $07
- db $20, $06
+ db D_UP, $0C
+ db D_LEFT, $0C
+ db D_DOWN, $07
+ db D_LEFT, $06
db $FF
LanceScript3: ; 5a382 (16:6382)
--- a/scripts/mtmoon3.asm
+++ b/scripts/mtmoon3.asm
@@ -126,10 +126,10 @@
db $FF
MovementData_49df8: ; 49df8 (12:5df8)
- db $C0
+ db NPC_MOVEMENT_RIGHT
MovementData_49df9: ; 49df9 (12:5df9)
- db $40,$FF
+ db NPC_MOVEMENT_UP,$FF
MtMoon3Script5: ; 49dfb (12:5dfb)
ld a, [wd730]
--- a/scripts/museum1f.asm
+++ b/scripts/museum1f.asm
@@ -116,7 +116,7 @@
call PrintText
ld a, $1
ld [wSimulatedJoypadStatesIndex], a
- ld a, $80
+ ld a, D_DOWN
ld [wSimulatedJoypadStatesEnd], a
call StartSimulatingJoypadStates
call UpdateSprites
--- a/scripts/oakslab.asm
+++ b/scripts/oakslab.asm
@@ -59,7 +59,10 @@
ret
OakEntryMovement: ; 1cb7e (7:4b7e)
- db $40,$40,$40,$FF
+ db NPC_MOVEMENT_UP
+ db NPC_MOVEMENT_UP
+ db NPC_MOVEMENT_UP
+ db $FF
OaksLabScript2: ; 1cb82 (7:4b82)
ld a, [wd730]
@@ -86,12 +89,12 @@
call StartSimulatingJoypadStates
ld a, $1
ld [H_SPRITEINDEX], a
- xor a
+ xor a ; SPRITE_FACING_DOWN
ld [$ff8d], a
call SetSpriteFacingDirectionAndDelay
ld a, $5
ld [H_SPRITEINDEX], a
- xor a
+ xor a ; SPRITE_FACING_DOWN
ld [$ff8d], a
call SetSpriteFacingDirectionAndDelay
@@ -100,7 +103,8 @@
ret
PlayerEntryMovementRLE: ; 1cbcf (7:4bcf)
- db $40, $8, $ff
+ db D_UP,$8
+ db $ff
OaksLabScript4: ; 1cbd2 (7:4bd2)
ld a, [wSimulatedJoypadStatesIndex]
@@ -112,7 +116,7 @@
set 0, [hl]
ld a, $1
ld [H_SPRITEINDEX], a
- ld a, $4
+ ld a, SPRITE_FACING_UP
ld [$ff8d], a
call SetSpriteFacingDirectionAndDelay
call UpdateSprites
@@ -157,7 +161,7 @@
ret nz
ld a, $5
ld [H_SPRITEINDEX], a
- xor a
+ xor a ; SPRITE_FACING_DOWN
ld [$ff8d], a
call SetSpriteFacingDirectionAndDelay
ld a, $1
@@ -171,7 +175,7 @@
call DisplayTextID
ld a, $1
ld [wSimulatedJoypadStatesIndex], a
- ld a, $40
+ ld a, D_UP
ld [wSimulatedJoypadStatesEnd], a
call StartSimulatingJoypadStates
ld a, $8
@@ -207,9 +211,20 @@
jr .asm_1ccf3
.MiddleBallMovement1
- db 0,0,$C0,$C0,$C0,$40,$FF
+ 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 0,$C0,$C0,$C0,$FF
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_RIGHT
+ db NPC_MOVEMENT_RIGHT
+ db NPC_MOVEMENT_RIGHT
+ db $FF
.Squirtle
ld de, .RightBallMovement1
@@ -220,9 +235,22 @@
jr .asm_1ccf3
.RightBallMovement1
- db 0,0,$C0,$C0,$C0,$C0,$40,$FF
+ 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 0,$C0,$C0,$C0,$C0,$FF
+ 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
@@ -250,9 +278,11 @@
jr .asm_1ccf3
.LeftBallMovement1
- db $00,$C0 ; not yet terminated!
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_RIGHT ; not yet terminated!
.LeftBallMovement2
- db $C0,$FF
+ db NPC_MOVEMENT_RIGHT
+ db $FF
.asm_1ccf3
ld a, $1
@@ -271,7 +301,7 @@
ld [wJoyIgnore], a
ld a, $1
ld [H_SPRITEINDEX], a
- ld a, $4
+ ld a, SPRITE_FACING_UP
ld [$ff8d], a
call SetSpriteFacingDirectionAndDelay
ld a, $d
@@ -300,7 +330,7 @@
call GetMonName
ld a, $1
ld [H_SPRITEINDEX], a
- ld a, $4
+ ld a, SPRITE_FACING_UP
ld [$ff8d], a
call SetSpriteFacingDirectionAndDelay
ld a, $e
@@ -321,7 +351,7 @@
ret nz
ld a, $1
ld [H_SPRITEINDEX], a
- xor a
+ xor a ; SPRITE_FACING_DOWN
ld [$ff8d], a
call SetSpriteFacingDirectionAndDelay
ld a, $8
@@ -401,7 +431,7 @@
call SetSpritePosition1
ld a, $1
ld [H_SPRITEINDEX], a
- xor a
+ xor a ; SPRITE_FACING_DOWN
ld [$ff8d], a
call SetSpriteFacingDirectionAndDelay
predef HealParty
@@ -439,7 +469,13 @@
ret
.RivalExitMovement
- db $E0,$00,$00,$00,$00,$00,$FF
+ 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]
@@ -456,7 +492,7 @@
jr .done
; make the player keep facing the rival as he walks away
.asm_1ce8c
- ld a, [wcf0f]
+ ld a, [wNPCNumScriptedSteps]
cp $5
jr nz, .asm_1cea8
ld a, [W_XCOORD]
@@ -512,12 +548,12 @@
OaksLabScript_1cefd: ; 1cefd (7:4efd)
ld a, $1
ld [H_SPRITEINDEX], a
- ld a, $4
+ ld a, SPRITE_FACING_UP
ld [$ff8d], a
call SetSpriteFacingDirectionAndDelay
ld a, $8
ld [H_SPRITEINDEX], a
- xor a
+ xor a ; SPRITE_FACING_DOWN
ld [$ff8d], a
jp SetSpriteFacingDirectionAndDelay
@@ -560,7 +596,7 @@
call DisplayTextID
ld a, $1
ld [H_SPRITEINDEX], a
- ld a, $c
+ ld a, SPRITE_FACING_RIGHT
ld [$ff8d], a
call SetSpriteFacingDirectionAndDelay
call Delay3
--- a/scripts/pewtercity.asm
+++ b/scripts/pewtercity.asm
@@ -79,7 +79,11 @@
ret
MovementData_PewterMuseumGuyExit: ; 192ce (6:52ce)
- db $00,$00,$00,$00,$FF
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_DOWN
+ db $FF
PewterCityScript2: ; 192d3 (6:52d3)
ld a, [wd730]
@@ -143,7 +147,12 @@
ret
MovementData_PewterGymGuyExit: ; 19353 (6:5353)
- db $C0,$C0,$C0,$C0,$C0,$FF
+ db NPC_MOVEMENT_RIGHT
+ db NPC_MOVEMENT_RIGHT
+ db NPC_MOVEMENT_RIGHT
+ db NPC_MOVEMENT_RIGHT
+ db NPC_MOVEMENT_RIGHT
+ db $FF
PewterCityScript5: ; 19359 (6:5359)
ld a, [wd730]
--- a/scripts/pokemontower2.asm
+++ b/scripts/pokemontower2.asm
@@ -34,12 +34,12 @@
ld a, [wWhichTrade]
cp $1
ld a, $8
- ld b, $0
+ ld b, SPRITE_FACING_DOWN
jr nz, .asm_60544
ld hl, wd764
set 6, [hl]
ld a, $2
- ld b, $c
+ ld b, SPRITE_FACING_RIGHT
.asm_60544
ld [wd528], a
ld a, $1
@@ -90,10 +90,26 @@
ret
MovementData_605a9: ; 605a9 (18:45a9)
- db $C0,$00,$00,$C0,$00,$00,$C0,$C0,$FF
+ db NPC_MOVEMENT_RIGHT
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_RIGHT
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_RIGHT
+ db NPC_MOVEMENT_RIGHT
+ db $FF
MovementData_605b2: ; 605b2 (18:45b2)
- db $00,$00,$C0,$C0,$C0,$C0,$00,$00,$FF
+ 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_DOWN
+ db NPC_MOVEMENT_DOWN
+ db $FF
PokemonTower2Script2: ; 605bb (18:45bb)
ld a, [wd730]
--- a/scripts/pokemontower7.asm
+++ b/scripts/pokemontower7.asm
@@ -143,22 +143,60 @@
dw MovementData_60e22
MovementData_60e13: ; 60e13
- db $C0,$00,$00,$00,$00,$00,$80,$FF
+ db NPC_MOVEMENT_RIGHT
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_LEFT
+ db $FF
MovementData_60e1b: ; 60e1b
- db $00,$C0,$00,$00,$00,$00,$FF
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_RIGHT
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_DOWN
+ db $FF
MovementData_60e22: ; 60e22
- db $00,$00,$00,$00,$00,$FF
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_DOWN
+ db $FF
MovementData_60e28: ; 60e28
- db $80,$00,$00,$00,$00,$00,$00,$FF
+ db NPC_MOVEMENT_LEFT
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_DOWN
+ db $FF
MovementData_60e30: ; 60e30
- db $00,$00,$00,$80,$00,$00,$FF
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_LEFT
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_DOWN
+ db $FF
MovementData_60e37: ; 60e37
- db $C0,$00,$00,$00,$00,$00,$00,$FF
+ db NPC_MOVEMENT_RIGHT
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_DOWN
+ db $FF
PokemonTower7TextPointers: ; 60e3f (18:4e3f)
dw PokemonTower7Text1
--- a/scripts/rockethideout2.asm
+++ b/scripts/rockethideout2.asm
@@ -126,183 +126,179 @@
db $FF
;format: direction, count
-;right: $10
-;left: $20
-;up: $40
-;down: $80
;each list is read starting from the $FF and working backwards
RocketHideout2ArrowMovement1: ; 44f1a (11:4f1a)
- db $20,$02
+ db D_LEFT,$02
db $FF
RocketHideout2ArrowMovement2: ; 44f1d (11:4f1d)
- db $10,$04
+ db D_RIGHT,$04
db $FF
RocketHideout2ArrowMovement3: ; 44f20 (11:4f20)
- db $40,$04
- db $10,$04
+ db D_UP,$04
+ db D_RIGHT,$04
db $FF
RocketHideout2ArrowMovement4: ; 44f25 (11:4f25)
- db $40,$04
- db $10,$04
- db $40,$01
+ db D_UP,$04
+ db D_RIGHT,$04
+ db D_UP,$01
db $FF
RocketHideout2ArrowMovement5: ; 44f2c (11:4f2c)
- db $20,$02
- db $40,$03
+ db D_LEFT,$02
+ db D_UP,$03
db $FF
RocketHideout2ArrowMovement6: ; 44f31 (11:4f31)
- db $80,$02
- db $10,$04
+ db D_DOWN,$02
+ db D_RIGHT,$04
db $FF
RocketHideout2ArrowMovement7: ; 44f36 (11:4f36)
- db $40,$02
+ db D_UP,$02
db $FF
RocketHideout2ArrowMovement8: ; 44f39 (11:4f39)
- db $40,$04
+ db D_UP,$04
db $FF
RocketHideout2ArrowMovement9: ; 44f3c (11:4f3c)
- db $20,$06
+ db D_LEFT,$06
db $FF
RocketHideout2ArrowMovement10: ; 44f3f (11:4f3f)
- db $40,$01
+ db D_UP,$01
db $FF
RocketHideout2ArrowMovement11: ; 44f42 (11:4f42)
- db $20,$06
- db $40,$04
+ db D_LEFT,$06
+ db D_UP,$04
db $FF
RocketHideout2ArrowMovement12: ; 44f47 (11:4f47)
- db $80,$02
+ db D_DOWN,$02
db $FF
RocketHideout2ArrowMovement13: ; 44f4a (11:4f4a)
- db $20,$08
+ db D_LEFT,$08
db $FF
RocketHideout2ArrowMovement14: ; 44f4d (11:4f4d)
- db $20,$08
- db $40,$01
+ db D_LEFT,$08
+ db D_UP,$01
db $FF
RocketHideout2ArrowMovement15: ; 44f52 (11:4f52)
- db $20,$08
- db $40,$06
+ db D_LEFT,$08
+ db D_UP,$06
db $FF
RocketHideout2ArrowMovement16: ; 44f57 (11:4f57)
- db $40,$02
- db $10,$04
+ db D_UP,$02
+ db D_RIGHT,$04
db $FF
RocketHideout2ArrowMovement17: ; 44f5c (11:4f5c)
- db $40,$02
- db $10,$04
- db $40,$02
+ db D_UP,$02
+ db D_RIGHT,$04
+ db D_UP,$02
db $FF
RocketHideout2ArrowMovement18: ; 44f63 (11:4f63)
- db $80,$02
- db $10,$04
- db $80,$02
+ db D_DOWN,$02
+ db D_RIGHT,$04
+ db D_DOWN,$02
db $FF
RocketHideout2ArrowMovement19: ; 44f6a (11:4f6a)
- db $80,$02
- db $10,$04
+ db D_DOWN,$02
+ db D_RIGHT,$04
db $FF
RocketHideout2ArrowMovement20: ; 44f6f (11:4f6f)
- db $20,$0A
+ db D_LEFT,$0A
db $FF
RocketHideout2ArrowMovement21: ; 44f72 (11:4f72)
- db $20,$0A
- db $40,$02
+ db D_LEFT,$0A
+ db D_UP,$02
db $FF
RocketHideout2ArrowMovement22: ; 44f77 (11:4f77)
- db $20,$0A
- db $40,$04
+ db D_LEFT,$0A
+ db D_UP,$04
db $FF
RocketHideout2ArrowMovement23: ; 44f7c (11:4f7c)
- db $40,$02
- db $10,$02
+ db D_UP,$02
+ db D_RIGHT,$02
db $FF
RocketHideout2ArrowMovement24: ; 44f81 (11:4f81)
- db $10,$01
- db $80,$02
+ db D_RIGHT,$01
+ db D_DOWN,$02
db $FF
RocketHideout2ArrowMovement25: ; 44f86 (11:4f86)
- db $10,$01
+ db D_RIGHT,$01
db $FF
RocketHideout2ArrowMovement26: ; 44f89 (11:4f89)
- db $80,$02
- db $10,$02
+ db D_DOWN,$02
+ db D_RIGHT,$02
db $FF
RocketHideout2ArrowMovement27: ; 44f8e (11:4f8e)
- db $80,$02
- db $20,$02
+ db D_DOWN,$02
+ db D_LEFT,$02
db $FF
RocketHideout2ArrowMovement28: ; 44f93 (11:4f93)
- db $40,$02
- db $10,$04
- db $40,$02
- db $20,$03
+ db D_UP,$02
+ db D_RIGHT,$04
+ db D_UP,$02
+ db D_LEFT,$03
db $FF
RocketHideout2ArrowMovement29: ; 44f9c (11:4f9c)
- db $80,$02
- db $20,$04
+ db D_DOWN,$02
+ db D_LEFT,$04
db $FF
RocketHideout2ArrowMovement30: ; 44fa1 (11:4fa1)
- db $20,$06
- db $40,$04
- db $20,$05
+ db D_LEFT,$06
+ db D_UP,$04
+ db D_LEFT,$05
db $FF
RocketHideout2ArrowMovement31: ; 44fa8 (11:4fa8)
- db $40,$02
+ db D_UP,$02
db $FF
RocketHideout2ArrowMovement32: ; 44fab (11:4fab)
- db $40,$01
+ db D_UP,$01
db $FF
RocketHideout2ArrowMovement33: ; 44fae (11:4fae)
- db $40,$03
+ db D_UP,$03
db $FF
RocketHideout2ArrowMovement34: ; 44fb1 (11:4fb1)
- db $40,$05
+ db D_UP,$05
db $FF
RocketHideout2ArrowMovement35: ; 44fb4 (11:4fb4)
- db $10,$01
- db $80,$02
- db $20,$04
+ db D_RIGHT,$01
+ db D_DOWN,$02
+ db D_LEFT,$04
db $FF
RocketHideout2ArrowMovement36: ; 44fbb (11:4fbb)
- db $20,$0A
- db $40,$02
- db $20,$05
+ db D_LEFT,$0A
+ db D_UP,$02
+ db D_LEFT,$05
db $FF
RocketHideout2Script3: ; 44fc2 (11:4fc2)
--- a/scripts/rockethideout3.asm
+++ b/scripts/rockethideout3.asm
@@ -72,67 +72,63 @@
db $FF
;format: direction, count
-;right: $10
-;left: $20
-;up: $40
-;down: $80
;each list is read starting from the $FF and working backwards
RocketHideout3ArrowMovement1: ; 452ac (11:52ac)
- db $10,$04
- db $40,$04
- db $10,$04
+ db D_RIGHT,$04
+ db D_UP,$04
+ db D_RIGHT,$04
db $FF
RocketHideout3ArrowMovement2: ; 452b3 (11:52b3)
- db $80,$04
- db $10,$04
+ db D_DOWN,$04
+ db D_RIGHT,$04
db $FF
RocketHideout3ArrowMovement3: ; 452b8 (11:52b8)
- db $20,$02
+ db D_LEFT,$02
db $FF
RocketHideout3ArrowMovement4: ; 452bb (11:52bb)
- db $10,$04
- db $40,$02
- db $10,$02
+ db D_RIGHT,$04
+ db D_UP,$02
+ db D_RIGHT,$02
db $FF
RocketHideout3ArrowMovement5: ; 452c2 (11:52c2)
- db $10,$04
- db $40,$02
- db $10,$02
- db $40,$03
+ db D_RIGHT,$04
+ db D_UP,$02
+ db D_RIGHT,$02
+ db D_UP,$03
db $FF
RocketHideout3ArrowMovement6: ; 452cb (11:52cb)
- db $10,$04
+ db D_RIGHT,$04
db $FF
RocketHideout3ArrowMovement7: ; 452ce (11:52ce)
- db $10,$02
+ db D_RIGHT,$02
db $FF
RocketHideout3ArrowMovement8: ; 452d1 (11:52d1)
- db $10,$04
- db $40,$02
+ db D_RIGHT,$04
+ db D_UP,$02
db $FF
RocketHideout3ArrowMovement9: ; 452d6 (11:52d6)
- db $10,$04
- db $40,$04
+ db D_RIGHT,$04
+ db D_UP,$04
db $FF
RocketHideout3ArrowMovement10: ; 452db (11:52db)
- db $80,$04
+ db D_DOWN,$04
db $FF
RocketHideout3ArrowMovement11: ; 452de (11:52de)
- db $40,$02
+ db D_UP,$02
db $FF
RocketHideout3ArrowMovement12: ; 452e1 (11:52e1)
- db $40,$01
+ db D_UP,$01
db $FF
RocketHideout3Script3: ; 452e4 (11:452e4)
--- a/scripts/route16gate.asm
+++ b/scripts/route16gate.asm
@@ -31,7 +31,7 @@
ld [wSimulatedJoypadStatesIndex], a
ld b, $0
ld c, a
- ld a, $40
+ ld a, D_UP
ld hl, wSimulatedJoypadStatesEnd
call FillMemory
call StartSimulatingJoypadStates
@@ -63,7 +63,7 @@
call DisplayTextID
ld a, $1
ld [wSimulatedJoypadStatesIndex], a
- ld a, $10
+ ld a, D_RIGHT
ld [wSimulatedJoypadStatesEnd], a
call StartSimulatingJoypadStates
ld a, $3
--- a/scripts/route18gate.asm
+++ b/scripts/route18gate.asm
@@ -31,7 +31,7 @@
ld [wSimulatedJoypadStatesIndex], a
ld b, $0
ld c, a
- ld a, $40
+ ld a, D_UP
ld hl, wSimulatedJoypadStatesEnd
call FillMemory
call StartSimulatingJoypadStates
@@ -63,7 +63,7 @@
call DisplayTextID
ld a, $1
ld [wSimulatedJoypadStatesIndex], a
- ld a, $10
+ ld a, D_RIGHT
ld [wSimulatedJoypadStatesEnd], a
call StartSimulatingJoypadStates
ld a, $3
--- a/scripts/route22.asm
+++ b/scripts/route22.asm
@@ -48,7 +48,11 @@
jp SetSpriteFacingDirectionAndDelay
Route22RivalMovementData: ; 50efb (14:4efb)
- db $C0,$C0,$C0,$C0,$FF ; move right 4 times
+ db NPC_MOVEMENT_RIGHT
+ db NPC_MOVEMENT_RIGHT
+ db NPC_MOVEMENT_RIGHT
+ db NPC_MOVEMENT_RIGHT
+ db $FF
Route22Script0: ; 50f00 (14:4f00)
ld a, [wd7eb]
@@ -194,10 +198,27 @@
jp MoveSprite
Route22RivalExitMovementData1: ; 51017 (14:5017)
- db $C0,$C0,$00,$00,$00,$00,$00,$FF
+ db NPC_MOVEMENT_RIGHT
+ db NPC_MOVEMENT_RIGHT
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_DOWN
+ db $FF
Route22RivalExitMovementData2: ; 5101f (14:501f)
- db $40,$C0,$C0,$C0,$00,$00,$00,$00,$00,$00,$FF
+ db NPC_MOVEMENT_UP
+ db NPC_MOVEMENT_RIGHT
+ db NPC_MOVEMENT_RIGHT
+ db NPC_MOVEMENT_RIGHT
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_DOWN
+ db $FF
Route22Script3: ; 5102a (14:502a)
ld a, [wd730]
@@ -339,10 +360,13 @@
jp MoveSprite
MovementData_5114c: ; 5114c (14:514c)
- db $80 ; left
+ db NPC_MOVEMENT_LEFT
MovementData_5114d: ; 5114d (14:514d)
- db $80,$80,$80,$FF ; left x3
+ db NPC_MOVEMENT_LEFT
+ db NPC_MOVEMENT_LEFT
+ db NPC_MOVEMENT_LEFT
+ db $FF
Route22Script6: ; 51151 (14:5151)
ld a, [wd730]
--- a/scripts/route22gate.asm
+++ b/scripts/route22gate.asm
@@ -35,7 +35,7 @@
Route22GateScript_1e6ba: ; 1e6ba (7:66ba)
ld a, $1
ld [wSimulatedJoypadStatesIndex], a
- ld a, $80
+ ld a, D_DOWN
ld [wSimulatedJoypadStatesEnd], a
ld [wSpriteStateData1 + 9], a
ld [wJoyIgnore], a
--- a/scripts/route23.asm
+++ b/scripts/route23.asm
@@ -119,7 +119,7 @@
Route23Script_512d8: ; 512d8 (14:52d8)
ld a, $1
ld [wSimulatedJoypadStatesIndex], a
- ld a, $80
+ ld a, D_DOWN
ld [wSimulatedJoypadStatesEnd], a
xor a
ld [wSpriteStateData1 + 9], a
--- a/scripts/route24.asm
+++ b/scripts/route24.asm
@@ -37,7 +37,7 @@
bit 1, [hl]
res 1, [hl]
ret z
- ld a, $80
+ ld a, D_DOWN
ld [wSimulatedJoypadStatesEnd], a
ld a, $1
ld [wSimulatedJoypadStatesIndex], a
--- a/scripts/route5gate.asm
+++ b/scripts/route5gate.asm
@@ -9,7 +9,7 @@
dw Route5GateScript1
Route5GateScript_1df43: ; 1df43 (7:5f43)
- ld a, $40
+ ld a, D_UP
ld [wSimulatedJoypadStatesEnd], a
ld a, $1
ld [wSimulatedJoypadStatesIndex], a
--- a/scripts/safarizoneentrance-yellow.asm
+++ b/scripts/safarizoneentrance-yellow.asm
@@ -61,7 +61,7 @@
ld [wSafariSteps],a
ld a,l
ld [wSafariSteps + 1],a
- ld a,$40
+ ld a,D_UP
ld c,3
call SafariZoneEntranceAutoWalk
ld hl,wd790
@@ -75,7 +75,7 @@
ld hl,.PleaseComeAgainText
call PrintText
.CantPayWalkDown
- ld a,$80
+ ld a,D_DOWN
ld c,1
call SafariZoneEntranceAutoWalk
ld a,4
--- a/scripts/safarizoneentrance.asm
+++ b/scripts/safarizoneentrance.asm
@@ -33,7 +33,7 @@
ld [W_SAFARIZONEENTRANCECURSCRIPT], a
ret
.asm_7520f
- ld a, $10
+ ld a, D_RIGHT
ld c, $1
call SafariZoneEntranceAutoWalk
ld a, $f0
@@ -87,7 +87,7 @@
call DisplayTextID
xor a
ld [W_NUMSAFARIBALLS], a
- ld a, $80
+ ld a, D_DOWN
ld c, $3
call SafariZoneEntranceAutoWalk
ld a, $4
@@ -188,7 +188,7 @@
ld [wSafariSteps],a
ld a, 502 % $100
ld [wSafariSteps + 1],a
- ld a,$40
+ ld a,D_UP
ld c,3
call SafariZoneEntranceAutoWalk
ld hl,wd790
@@ -202,7 +202,7 @@
ld hl,.PleaseComeAgainText
call PrintText
.CantPayWalkDown
- ld a,$80
+ ld a,D_DOWN
ld c,1
call SafariZoneEntranceAutoWalk
ld a,4
@@ -235,7 +235,7 @@
call PrintText
xor a
ld [wSpriteStateData1 + 9], a
- ld a, $80
+ ld a, D_DOWN
ld c, $3
call SafariZoneEntranceAutoWalk
ld hl, wd790
@@ -249,7 +249,7 @@
call PrintText
ld a, SPRITE_FACING_UP
ld [wSpriteStateData1 + 9], a
- ld a, $40
+ ld a, D_UP
ld c, $1
call SafariZoneEntranceAutoWalk
ld a, $5
--- a/scripts/seafoamislands4.asm
+++ b/scripts/seafoamislands4.asm
@@ -79,9 +79,9 @@
ret
RLEMovement46632: ; 46632 (11:6632)
- db $80,6
- db $10,5
- db $80,3
+ db D_DOWN,6
+ db D_RIGHT,5
+ db D_DOWN,3
db $ff
SeafoamIslands4Script1: ; 46639 (11:6639)
@@ -124,10 +124,17 @@
ret
RLEData_4667f: ; 4667f (11:667f)
- db $80,$06,$10,$02,$80,$04,$20,$01,$FF
+ db D_DOWN,$06
+ db D_RIGHT,$02
+ db D_DOWN,$04
+ db D_LEFT,$01
+ db $FF
RLEData_46688: ; 46688 (11:6688)
- db $80,$06,$10,$02,$80,$04,$FF
+ db D_DOWN,$06
+ db D_RIGHT,$02
+ db D_DOWN,$04
+ db $FF
SeafoamIslands4Script3: ; 4668f (11:668f)
ld a, [wSimulatedJoypadStatesIndex]
--- a/scripts/seafoamislands5.asm
+++ b/scripts/seafoamislands5.asm
@@ -45,7 +45,7 @@
ld a, $1
.asm_467e8
ld [wSimulatedJoypadStatesIndex], a
- ld a, $40
+ ld a, D_UP
ld [wSimulatedJoypadStatesEnd], a
call StartSimulatingJoypadStates
ld hl, W_FLAGS_D733
@@ -105,15 +105,15 @@
db $FF
RLEMovementData_46852: ; 46852 (11:6852)
- db $40,$03
- db $10,$02
- db $40,$01
+ db D_UP,$03
+ db D_RIGHT,$02
+ db D_UP,$01
db $FF
RLEMovementData_46859: ; 46859 (11:6859)
- db $40,$03
- db $10,$03
- db $40,$01
+ db D_UP,$03
+ db D_RIGHT,$03
+ db D_UP,$01
db $FF
SeafoamIslands5Script3: ; 46860 (11:6860)
--- a/scripts/silphco11.asm
+++ b/scripts/silphco11.asm
@@ -193,7 +193,10 @@
db $FF
MovementData_62216: ; 62216 (18:6216)
- db $00,$00,$00,$FF
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_DOWN
+ db $FF
SilphCo11Script_6221a: ; 6221a (18:621a)
ld [wd528], a
--- a/scripts/silphco7.asm
+++ b/scripts/silphco7.asm
@@ -160,7 +160,11 @@
db $FF
MovementData_51c7d: ; 51c7d (14:5c7d)
- db $40,$40,$40,$40,$FF
+ db NPC_MOVEMENT_UP
+ db NPC_MOVEMENT_UP
+ db NPC_MOVEMENT_UP
+ db NPC_MOVEMENT_UP
+ db $FF
SilphCo7Script3: ; 51c82 (14:5c82)
ld a, [wd730]
@@ -232,10 +236,19 @@
jp SilphCo7Text_51c10
MovementData_51d1a: ; 51d1a (14:5d1a)
- db $C0,$C0,$FF
+ db NPC_MOVEMENT_RIGHT
+ db NPC_MOVEMENT_RIGHT
+ db $FF
MovementData_51d1d: ; 51d1d (14:5d1d)
- db $80,$40,$40,$C0,$C0,$C0,$00,$FF
+ db NPC_MOVEMENT_LEFT
+ db NPC_MOVEMENT_UP
+ db NPC_MOVEMENT_UP
+ db NPC_MOVEMENT_RIGHT
+ db NPC_MOVEMENT_RIGHT
+ db NPC_MOVEMENT_RIGHT
+ db NPC_MOVEMENT_DOWN
+ db $FF
SilphCo7Script5: ; 51d25 (14:5d25)
ld a, [wd730]
--- a/scripts/ssanne2.asm
+++ b/scripts/ssanne2.asm
@@ -57,13 +57,18 @@
ret
MovementData_6140c: ; 6140c (18:540c)
- db $00
+ db NPC_MOVEMENT_DOWN
MovementData_6140d: ; 6140d (18:540d)
- db $00,$00,$00,$FF
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_DOWN
+ db $FF
CoordsData_61411: ; 61411 (18:5411)
- db $08,$24,$08,$25,$FF
+ db $08,$24
+ db $08,$25
+ db $FF
SSAnne2Script_61416: ; 61416 (18:5416)
ld a, [W_XCOORD]
@@ -71,7 +76,7 @@
jr nz, .asm_61426
ld a, $2
ld [wd528], a
- ld a, $c
+ ld a, SPRITE_FACING_RIGHT
jr .asm_61427
.asm_61426
xor a
@@ -149,10 +154,15 @@
ret
MovementData_614b7: ; 614b7 (18:54b7)
- db $C0,$00
+ db NPC_MOVEMENT_RIGHT
+ db NPC_MOVEMENT_DOWN
MovementData_614b9: ; 614b9 (18:54b9)
- db $00,$00,$00,$00,$FF
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_DOWN
+ db NPC_MOVEMENT_DOWN
+ db $FF
SSAnne2Script3: ; 614be (18:54be)
ld a, [wd730]
--- a/scripts/vermilioncity.asm
+++ b/scripts/vermilioncity.asm
@@ -60,7 +60,7 @@
and a
ret nz
.asm_19810
- ld a, $40
+ ld a, D_UP
ld [wSimulatedJoypadStatesEnd], a
ld a, $1
ld [wSimulatedJoypadStatesIndex], a
@@ -84,7 +84,7 @@
VermilionCityScript2: ; 19833 (6:5833)
ld a, $ff
ld [wJoyIgnore], a
- ld a, $40
+ ld a, D_UP
ld [wSimulatedJoypadStatesEnd], a
ld [wccd4], a
ld a, $2
--- a/scripts/viridiancity.asm
+++ b/scripts/viridiancity.asm
@@ -120,7 +120,7 @@
call StartSimulatingJoypadStates
ld a, $1
ld [wSimulatedJoypadStatesIndex], a
- ld a, $80
+ ld a, D_DOWN
ld [wSimulatedJoypadStatesEnd], a
xor a
ld [wSpriteStateData1 + 9], a
--- a/scripts/viridiangym.asm
+++ b/scripts/viridiangym.asm
@@ -80,45 +80,41 @@
db $FF
;format: direction, count
-;right: $10
-;left: $20
-;up: $40
-;down: $80
ViridianGymArrowMovement1: ; 74947 (1d:4947)
- db $40,$09,$FF
+ db D_UP,$09,$FF
ViridianGymArrowMovement2: ; 7494a (1d:494a)
- db $20,$08,$FF
+ db D_LEFT,$08,$FF
ViridianGymArrowMovement3: ; 7494d (1d:494d)
- db $80,$09,$FF
+ db D_DOWN,$09,$FF
ViridianGymArrowMovement4: ; 74950 (1d:4950)
- db $10,$06,$FF
+ db D_RIGHT,$06,$FF
ViridianGymArrowMovement5: ; 74953 (1d:4953)
- db $80,$02,$FF
+ db D_DOWN,$02,$FF
ViridianGymArrowMovement6: ; 74956 (1d:4956)
- db $80,$07,$FF
+ db D_DOWN,$07,$FF
ViridianGymArrowMovement7: ; 74959 (1d:4959)
- db $10,$08,$FF
+ db D_RIGHT,$08,$FF
ViridianGymArrowMovement8: ; 7495c (1d:495c)
- db $10,$09,$FF
+ db D_RIGHT,$09,$FF
ViridianGymArrowMovement9: ; 7495f (1d:495f)
- db $40,$08,$FF
+ db D_UP,$08,$FF
ViridianGymArrowMovement10: ; 74962 (1d:4962)
- db $40,$06,$FF
+ db D_UP,$06,$FF
ViridianGymArrowMovement11: ; 74965 (1d:4965)
- db $20,$06,$FF
+ db D_LEFT,$06,$FF
ViridianGymArrowMovement12: ; 74968 (1d:4968)
- db $20,$0C,$FF
+ db D_LEFT,$0C,$FF
ViridianGymScript4: ; 7496b (1d:496b)
ld a, [wSimulatedJoypadStatesIndex]
--- a/scripts/viridianmart.asm
+++ b/scripts/viridianmart.asm
@@ -41,8 +41,8 @@
ret
RLEMovement1d4bb: ; 1d4bb (7:54bb)
- db $20, $01
- db $40, $02
+ db D_LEFT, $01
+ db D_UP, $02
db $ff
ViridianMartScript1: ; 1d4c0 (7:54c0)
--- a/wram.asm
+++ b/wram.asm
@@ -507,7 +507,7 @@
wccf6:: ds 1 ; used in some hp bar thing
wPlayerMonMinimized:: ds 1 ; ccf7
-ds 13
+ ds 13
wLuckySlotHiddenObjectIndex:: ; cd05
@@ -517,7 +517,7 @@
wEnemyBideAccumulatedDamage:: ; cd05
; the amount of damage accumulated by the enemy while biding (2 bytes)
-ds 10
+ ds 10
wInGameTradeGiveMonSpecies:: ; cd0f
@@ -1013,7 +1013,7 @@
; used in CheckForTilePairCollisions2 to store the tile the player is on
ds 1
-wcf0f:: ds 1 ; used with moving overworld sprites
+wNPCNumScriptedSteps:: ds 1 ; cf0f
wNPCMovementScriptFunctionNum:: ; cf10
; which script function within the pointer table indicated by
@@ -1064,7 +1064,7 @@
wcf4b:: ds 1 ; storage buffer for various strings
wcf4c:: ds 1 ; used with displaying EXP value, probably also overflowed with wcf4b
wGainBoostedExp:: ; cf4d
- ds 1
+ ds 1
ds 17
wGymCityName:: ; cf5f
@@ -1628,10 +1628,10 @@
W_DAMAGE:: ; d0d7
ds 2
-ds 2
+ ds 2
wRepelRemainingSteps:: ; d0db
- ds 1
+ ds 1
wMoves:: ; d0dc
; list of moves for FormatMovesString