mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-04-09 05:44:44 -07:00
Fix some movement macro/function names
This commit is contained in:
parent
434c97a146
commit
aba038a4a4
@ -530,7 +530,7 @@ const_value SET 1
|
||||
const OBJECT_STEP_TYPE
|
||||
const OBJECT_STEP_DURATION
|
||||
const OBJECT_ACTION
|
||||
const OBJECT_12
|
||||
const OBJECT_STEP_FRAME
|
||||
const OBJECT_FACING_STEP
|
||||
const OBJECT_NEXT_TILE
|
||||
const OBJECT_STANDING_TILE
|
||||
@ -652,7 +652,10 @@ NUM_SPAWNS EQU const_value
|
||||
const PALETTE_MORN
|
||||
const PALETTE_DARK
|
||||
|
||||
INVISIBLE EQU 0
|
||||
FIXED_FACING EQU 2
|
||||
SLIDING EQU 3
|
||||
EMOTE_OBJECT EQU 7
|
||||
|
||||
const_def
|
||||
const PERSONTYPE_SCRIPT
|
||||
|
@ -269,20 +269,20 @@ MAX_OUTDOOR_SPRITES EQU 23
|
||||
|
||||
const_def
|
||||
const STEP_TYPE_00
|
||||
const STEP_TYPE_01 ; standing
|
||||
const STEP_TYPE_01
|
||||
const STEP_TYPE_02 ; walking
|
||||
const STEP_TYPE_03 ; bumping
|
||||
const STEP_TYPE_03 ; stationary
|
||||
const STEP_TYPE_04
|
||||
const STEP_TYPE_05
|
||||
const STEP_TYPE_06
|
||||
const STEP_TYPE_07
|
||||
const STEP_TYPE_08
|
||||
const STEP_TYPE_09
|
||||
const STEP_TYPE_0A
|
||||
const STEP_TYPE_0B
|
||||
const STEP_TYPE_0C
|
||||
const STEP_TYPE_0D
|
||||
const STEP_TYPE_0E
|
||||
const STEP_TYPE_0A ; half step
|
||||
const STEP_TYPE_0B ; bump
|
||||
const STEP_TYPE_TELEPORT_FROM
|
||||
const STEP_TYPE_TELEPORT_TO
|
||||
const STEP_TYPE_SKYFALL
|
||||
const STEP_TYPE_0F
|
||||
const STEP_TYPE_10
|
||||
const STEP_TYPE_11
|
||||
@ -313,3 +313,37 @@ MAX_OUTDOOR_SPRITES EQU 23
|
||||
const PERSON_ACTION_0E
|
||||
const PERSON_ACTION_0F
|
||||
const PERSON_ACTION_10
|
||||
|
||||
const_def
|
||||
const FACING_00
|
||||
const FACING_01
|
||||
const FACING_02
|
||||
const FACING_03
|
||||
const FACING_04
|
||||
const FACING_05
|
||||
const FACING_06
|
||||
const FACING_07
|
||||
const FACING_08
|
||||
const FACING_09
|
||||
const FACING_0A
|
||||
const FACING_0B
|
||||
const FACING_0C
|
||||
const FACING_0D
|
||||
const FACING_0E
|
||||
const FACING_0F
|
||||
const FACING_10
|
||||
const FACING_11
|
||||
const FACING_12
|
||||
const FACING_13
|
||||
const FACING_14
|
||||
const FACING_15
|
||||
const FACING_16
|
||||
const FACING_17
|
||||
const FACING_18
|
||||
const FACING_19
|
||||
const FACING_1A
|
||||
const FACING_1B
|
||||
const FACING_1C
|
||||
const FACING_1D
|
||||
const FACING_1E
|
||||
const FACING_1F
|
||||
|
@ -245,7 +245,7 @@ Function967d1: ; 967d1
|
||||
; 967e1
|
||||
|
||||
Function967e1: ; 967e1
|
||||
callba RefreshMapAppearDisappear
|
||||
callba _UpdateSprites
|
||||
callba Functiond4d2
|
||||
callba PlaceMapNameSign
|
||||
ret
|
||||
|
@ -185,7 +185,7 @@ Facing21: ; shadow
|
||||
db 0, 8, 4 | X_FLIP, $fc
|
||||
; 41a3
|
||||
|
||||
Facing23: ; big doll
|
||||
Facing23: ; big snorlax or lapras doll
|
||||
db 16 ; #
|
||||
db 0, 0, 0, $00
|
||||
db 0, 8, 0, $01
|
||||
@ -221,7 +221,7 @@ Facing27: ; 41f5
|
||||
db 8, 0, X_FLIP, $07
|
||||
; 4206
|
||||
|
||||
Facing22: ; 4206
|
||||
Facing22: ; big doll other than snorlax or lapras
|
||||
db 14 ; #
|
||||
db 0, 0, 0, $00
|
||||
db 0, 8, 0, $01
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -59,7 +59,7 @@ MovementPointers: ; 5075
|
||||
dw Movement_39 ; 39
|
||||
dw Movement_remove_fixed_facing ; 3a
|
||||
dw Movement_fix_facing ; 3b
|
||||
dw Movement_3c ; 3c
|
||||
dw Movement_show_person ; 3c
|
||||
dw Movement_hide_person ; 3d
|
||||
dw Movement_step_sleep_1 ; 3e
|
||||
dw Movement_step_sleep_2 ; 3f
|
||||
@ -78,8 +78,8 @@ MovementPointers: ; 5075
|
||||
dw Movement_teleport_from ; 4c
|
||||
dw Movement_teleport_to ; 4d
|
||||
dw Movement_skyfall ; 4e
|
||||
dw Movement_step_wait5 ; 4f
|
||||
dw Movement_step_bump ; 50
|
||||
dw Movement_step_dig ; 4f
|
||||
dw Movement_step_bump ; 50
|
||||
dw Movement_fish_got_bite ; 51
|
||||
dw Movement_fish_cast_rod ; 52
|
||||
dw Movement_hide_emote ; 53
|
||||
@ -87,7 +87,7 @@ MovementPointers: ; 5075
|
||||
dw Movement_step_shake ; 55
|
||||
dw Movement_56 ; 56
|
||||
dw Movement_rock_smash ; 57
|
||||
dw Movement_58 ; 58
|
||||
dw Movement_return_dig ; 58
|
||||
dw Movement_59 ; 59
|
||||
; 5129
|
||||
|
||||
@ -95,21 +95,21 @@ MovementPointers: ; 5075
|
||||
Movement_teleport_from: ; 5129
|
||||
ld hl, OBJECT_STEP_TYPE
|
||||
add hl, bc
|
||||
ld [hl], STEP_TYPE_0C
|
||||
ld [hl], STEP_TYPE_TELEPORT_FROM
|
||||
ret
|
||||
; 5130
|
||||
|
||||
Movement_teleport_to: ; 5130
|
||||
ld hl, OBJECT_STEP_TYPE
|
||||
add hl, bc
|
||||
ld [hl], STEP_TYPE_0D
|
||||
ld [hl], STEP_TYPE_TELEPORT_TO
|
||||
ret
|
||||
; 5137
|
||||
|
||||
Movement_skyfall: ; 5137
|
||||
ld hl, OBJECT_STEP_TYPE
|
||||
add hl, bc
|
||||
ld [hl], STEP_TYPE_0E
|
||||
ld [hl], STEP_TYPE_SKYFALL
|
||||
ret
|
||||
; 513e
|
||||
|
||||
@ -120,11 +120,11 @@ Movement_59: ; 513e
|
||||
ret
|
||||
; 5145
|
||||
|
||||
Movement_step_wait5: ; 5145
|
||||
Movement_step_dig: ; 5145
|
||||
call GetSpriteDirection
|
||||
rlca
|
||||
rlca
|
||||
ld hl, OBJECT_12
|
||||
ld hl, OBJECT_STEP_FRAME
|
||||
add hl, bc
|
||||
ld [hl], a
|
||||
ld hl, OBJECT_ACTION
|
||||
@ -143,11 +143,11 @@ Movement_step_wait5: ; 5145
|
||||
ret
|
||||
; 516a
|
||||
|
||||
Movement_58: ; 516a
|
||||
Movement_return_dig: ; 516a
|
||||
call GetSpriteDirection
|
||||
rlca
|
||||
rlca
|
||||
ld hl, OBJECT_12
|
||||
ld hl, OBJECT_STEP_FRAME
|
||||
add hl, bc
|
||||
ld [hl], a
|
||||
call GetMovementByte
|
||||
@ -334,16 +334,19 @@ Movement_step_sleep_common: ; 5247
|
||||
; 525f
|
||||
|
||||
Movement_step_bump: ; 525f
|
||||
ld a, $1
|
||||
ld a, 1
|
||||
ld hl, OBJECT_STEP_DURATION
|
||||
add hl, bc
|
||||
ld [hl], a
|
||||
|
||||
ld hl, OBJECT_STEP_TYPE
|
||||
add hl, bc
|
||||
ld [hl], STEP_TYPE_0B
|
||||
|
||||
ld hl, OBJECT_ACTION
|
||||
add hl, bc
|
||||
ld [hl], PERSON_ACTION_03
|
||||
|
||||
ld hl, OBJECT_DIRECTION_WALKING
|
||||
add hl, bc
|
||||
ld [hl], STANDING
|
||||
@ -373,14 +376,14 @@ Movement_56: ; 5279
|
||||
Movement_38: ; 5293
|
||||
ld hl, OBJECT_FLAGS1
|
||||
add hl, bc
|
||||
res 3, [hl]
|
||||
res SLIDING, [hl]
|
||||
jp ContinueReadingMovement
|
||||
; 529c
|
||||
|
||||
Movement_39: ; 529c
|
||||
ld hl, OBJECT_FLAGS1
|
||||
add hl, bc
|
||||
set 3, [hl]
|
||||
set SLIDING, [hl]
|
||||
jp ContinueReadingMovement
|
||||
; 52a5
|
||||
|
||||
@ -398,17 +401,17 @@ Movement_fix_facing: ; 52ae
|
||||
jp ContinueReadingMovement
|
||||
; 52b7
|
||||
|
||||
Movement_3c: ; 52b7
|
||||
Movement_show_person: ; 52b7
|
||||
ld hl, OBJECT_FLAGS1
|
||||
add hl, bc
|
||||
res 0, [hl]
|
||||
res INVISIBLE, [hl]
|
||||
jp ContinueReadingMovement
|
||||
; 52c0
|
||||
|
||||
Movement_hide_person: ; 52c0
|
||||
ld hl, OBJECT_FLAGS1
|
||||
add hl, bc
|
||||
set 0, [hl]
|
||||
set INVISIBLE, [hl]
|
||||
jp ContinueReadingMovement
|
||||
; 52c9
|
||||
|
||||
@ -760,14 +763,14 @@ NormalStep: ; 5412
|
||||
ld hl, wd4cf
|
||||
ld a, [hMapObjectIndexBuffer]
|
||||
cp [hl]
|
||||
jr z, .asm_543f
|
||||
jr z, .step_type_06
|
||||
|
||||
ld hl, OBJECT_STEP_TYPE
|
||||
add hl, bc
|
||||
ld [hl], STEP_TYPE_02
|
||||
ret
|
||||
|
||||
.asm_543f
|
||||
.step_type_06
|
||||
ld hl, OBJECT_STEP_TYPE
|
||||
add hl, bc
|
||||
ld [hl], STEP_TYPE_06
|
||||
@ -777,19 +780,22 @@ NormalStep: ; 5412
|
||||
TurningStep: ; 5446
|
||||
call Function4690
|
||||
call Function463f
|
||||
|
||||
ld hl, OBJECT_ACTION
|
||||
add hl, bc
|
||||
ld [hl], PERSON_ACTION_04
|
||||
|
||||
ld hl, wd4cf
|
||||
ld a, [hMapObjectIndexBuffer]
|
||||
cp [hl]
|
||||
jr z, .asm_5461
|
||||
jr z, .step_type_06
|
||||
|
||||
ld hl, OBJECT_STEP_TYPE
|
||||
add hl, bc
|
||||
ld [hl], STEP_TYPE_02
|
||||
ret
|
||||
|
||||
.asm_5461
|
||||
.step_type_06
|
||||
ld hl, OBJECT_STEP_TYPE
|
||||
add hl, bc
|
||||
ld [hl], STEP_TYPE_06
|
||||
@ -800,19 +806,22 @@ TurningStep: ; 5446
|
||||
SlideStep: ; 5468
|
||||
call Function4690
|
||||
call Function463f
|
||||
|
||||
ld hl, OBJECT_ACTION
|
||||
add hl, bc
|
||||
ld [hl], PERSON_ACTION_01
|
||||
|
||||
ld hl, wd4cf
|
||||
ld a, [hMapObjectIndexBuffer]
|
||||
cp [hl]
|
||||
jr z, .asm_5483
|
||||
jr z, .step_type_06
|
||||
|
||||
ld hl, OBJECT_STEP_TYPE
|
||||
add hl, bc
|
||||
ld [hl], STEP_TYPE_02
|
||||
ret
|
||||
|
||||
.asm_5483
|
||||
.step_type_06
|
||||
ld hl, OBJECT_STEP_TYPE
|
||||
add hl, bc
|
||||
ld [hl], STEP_TYPE_06
|
||||
@ -825,23 +834,28 @@ JumpStep: ; 548a
|
||||
ld hl, OBJECT_31
|
||||
add hl, bc
|
||||
ld [hl], $0
|
||||
|
||||
ld hl, OBJECT_FLAGS2
|
||||
add hl, bc
|
||||
res 3, [hl]
|
||||
|
||||
ld hl, OBJECT_ACTION
|
||||
add hl, bc
|
||||
ld [hl], PERSON_ACTION_02
|
||||
|
||||
call SpawnShadow
|
||||
|
||||
ld hl, wd4cf
|
||||
ld a, [hMapObjectIndexBuffer]
|
||||
cp [hl]
|
||||
jr z, .asm_54b1
|
||||
jr z, .step_type_09
|
||||
|
||||
ld hl, OBJECT_STEP_TYPE
|
||||
add hl, bc
|
||||
ld [hl], STEP_TYPE_08
|
||||
ret
|
||||
|
||||
.asm_54b1
|
||||
.step_type_09
|
||||
ld hl, OBJECT_STEP_TYPE
|
||||
add hl, bc
|
||||
ld [hl], STEP_TYPE_09
|
||||
|
@ -1284,7 +1284,7 @@ Script_disappear: ; 0x972ee
|
||||
ld a, [hMapObjectIndexBuffer]
|
||||
ld b, 1 ; set
|
||||
call ApplyEventActionAppearDisappear
|
||||
callba RefreshMapAppearDisappear
|
||||
callba _UpdateSprites
|
||||
ret
|
||||
; 0x9730b
|
||||
|
||||
|
@ -28,41 +28,33 @@ Script_ForcedMovement:: ; 0x1253d
|
||||
; 0x12564
|
||||
|
||||
.MovementData_up: ; 0x12564
|
||||
step_wait5
|
||||
big_step_down
|
||||
step_dig 16
|
||||
turn_in_down
|
||||
step_wait5
|
||||
big_step_down
|
||||
step_dig 16
|
||||
turn_head_down
|
||||
step_end
|
||||
; 0x1256b
|
||||
|
||||
.MovementData_down: ; 0x1256b
|
||||
step_wait5
|
||||
big_step_down
|
||||
step_dig 16
|
||||
turn_in_up
|
||||
step_wait5
|
||||
big_step_down
|
||||
step_dig 16
|
||||
turn_head_up
|
||||
step_end
|
||||
; 0x12572
|
||||
|
||||
.MovementData_right: ; 0x12572
|
||||
step_wait5
|
||||
big_step_down
|
||||
step_dig 16
|
||||
turn_in_left
|
||||
step_wait5
|
||||
big_step_down
|
||||
step_dig 16
|
||||
turn_head_left
|
||||
step_end
|
||||
; 0x12579
|
||||
|
||||
.MovementData_left: ; 0x12579
|
||||
step_wait5
|
||||
big_step_down
|
||||
step_dig 16
|
||||
turn_in_right
|
||||
step_wait5
|
||||
big_step_down
|
||||
step_dig 16
|
||||
turn_head_right
|
||||
step_end
|
||||
; 0x12580
|
||||
|
@ -649,7 +649,7 @@ UpdateSprites:: ; 1ad2
|
||||
bit 0, a
|
||||
ret z
|
||||
callba Function55e0
|
||||
callba RefreshMapAppearDisappear
|
||||
callba _UpdateSprites
|
||||
ret
|
||||
; 1ae5
|
||||
|
||||
|
@ -292,10 +292,9 @@ fix_facing: macro
|
||||
db movement_fix_facing ; $3b
|
||||
endm
|
||||
|
||||
enum movement_return_dig
|
||||
return_dig: macro
|
||||
db movement_return_dig
|
||||
db \1
|
||||
enum movement_show_person
|
||||
show_person: macro
|
||||
db movement_show_person ; $3c
|
||||
endm
|
||||
|
||||
enum movement_hide_person
|
||||
@ -354,6 +353,8 @@ step_end: macro
|
||||
db movement_step_end ; $47
|
||||
endm
|
||||
|
||||
; Whatever Movement_48 is, it takes a one-byte parameter
|
||||
|
||||
__enum__ = $49
|
||||
|
||||
enum movement_remove_person
|
||||
@ -383,9 +384,10 @@ skyfall: macro
|
||||
db movement_skyfall ; $4e
|
||||
endm
|
||||
|
||||
enum movement_step_wait5
|
||||
step_wait5: macro
|
||||
db movement_step_wait5 ; $4f
|
||||
enum movement_step_dig
|
||||
step_dig: macro
|
||||
db movement_step_dig ; $4f
|
||||
db \1
|
||||
endm
|
||||
|
||||
enum movement_step_bump
|
||||
@ -425,3 +427,9 @@ rock_smash: macro
|
||||
db movement_rock_smash ; $57
|
||||
db \1
|
||||
endm
|
||||
|
||||
enum movement_return_dig
|
||||
return_dig: macro
|
||||
db movement_return_dig ; $58
|
||||
db \1
|
||||
endm
|
||||
|
27
main.asm
27
main.asm
@ -1522,7 +1522,7 @@ Function6473: ; 6473
|
||||
xor a
|
||||
ld [hBGMapMode], a
|
||||
ld [hWY], a
|
||||
callba Function64db ; no need to callba
|
||||
callba Function64db ; no need to farcall
|
||||
ld a, VBGMap0 / $100
|
||||
call Function64b9
|
||||
xor a
|
||||
@ -5571,26 +5571,25 @@ UsedDigOrEscapeRopeScript: ; 0xcc3c
|
||||
closetext
|
||||
loadmovesprites
|
||||
playsound SFX_WARP_TO
|
||||
applymovement PLAYER, MovementData_0xcc59
|
||||
applymovement PLAYER, .DigOut
|
||||
farscall Script_AbortBugContest
|
||||
special WarpToSpawnPoint
|
||||
writecode VAR_MOVEMENT, $0
|
||||
newloadmap MAPSETUP_DOOR
|
||||
playsound SFX_WARP_FROM
|
||||
applymovement PLAYER, MovementData_0xcc5d
|
||||
applymovement PLAYER, .DigReturn
|
||||
end
|
||||
; 0xcc59
|
||||
|
||||
MovementData_0xcc59: ; 0xcc59
|
||||
step_wait5
|
||||
turn_away_down
|
||||
.DigOut: ; 0xcc59
|
||||
step_dig 32
|
||||
hide_person
|
||||
step_end
|
||||
; 0xcc5d
|
||||
|
||||
MovementData_0xcc5d: ; 0xcc5d
|
||||
return_dig $58
|
||||
turn_away_down
|
||||
.DigReturn: ; 0xcc5d
|
||||
show_person
|
||||
return_dig 32
|
||||
step_end
|
||||
; 0xcc61
|
||||
|
||||
@ -5669,22 +5668,22 @@ Script_UsedTeleport: ; 0xccbb
|
||||
reloadmappart
|
||||
loadmovesprites
|
||||
playsound SFX_WARP_TO
|
||||
applymovement PLAYER, MovementData_0xcce1
|
||||
applymovement PLAYER, .TeleportFrom
|
||||
farscall Script_AbortBugContest
|
||||
special WarpToSpawnPoint
|
||||
writecode VAR_MOVEMENT, $0
|
||||
newloadmap MAPSETUP_TELEPORT
|
||||
playsound SFX_WARP_FROM
|
||||
applymovement PLAYER, MovementData_0xcce3
|
||||
applymovement PLAYER, .TeleportTo
|
||||
end
|
||||
; 0xcce1
|
||||
|
||||
MovementData_0xcce1: ; cce1
|
||||
.TeleportFrom: ; cce1
|
||||
teleport_from
|
||||
step_end
|
||||
; cce3
|
||||
|
||||
MovementData_0xcce3: ; cce3
|
||||
.TeleportTo: ; cce3
|
||||
teleport_to
|
||||
step_end
|
||||
; cce5
|
||||
@ -50690,7 +50689,7 @@ LoadMapTimeOfDay: ; 104750
|
||||
ret
|
||||
|
||||
Function104770: ; 104770 (41:4770)
|
||||
ld a, $98
|
||||
ld a, VBGMap0 / $100
|
||||
ld [wBGMapAnchor + 1], a
|
||||
xor a
|
||||
ld [wBGMapAnchor], a
|
||||
|
3
wram.asm
3
wram.asm
@ -325,6 +325,7 @@ wMovementPerson:: ds 1
|
||||
wMovementDataPointer:: ds 3 ; dba
|
||||
wc2e6:: ds 4
|
||||
wc2ea:: ds 1
|
||||
wc2eb::
|
||||
wMovementPointer:: ds 2 ; c2eb
|
||||
ds 3
|
||||
|
||||
@ -2219,7 +2220,7 @@ object_struct: MACRO
|
||||
\1StepType:: ds 1
|
||||
\1StepDuration:: ds 1
|
||||
\1Action:: ds 1
|
||||
\1Object12:: ds 1
|
||||
\1ObjectStepFrame:: ds 1
|
||||
\1Facing:: ds 1
|
||||
\1NextTile:: ds 1 ; collision
|
||||
\1StandingTile:: ds 1 ; collision
|
||||
|
Loading…
x
Reference in New Issue
Block a user