You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-09-08 08:13:02 -07:00
4
.gitignore
vendored
4
.gitignore
vendored
@@ -18,6 +18,8 @@
|
|||||||
*.sav
|
*.sav
|
||||||
*.rtc
|
*.rtc
|
||||||
*.sn*
|
*.sn*
|
||||||
|
*.sa*
|
||||||
|
*.sg1
|
||||||
|
|
||||||
# rgbds extras
|
# rgbds extras
|
||||||
*.map
|
*.map
|
||||||
@@ -44,4 +46,4 @@ pokecrystal.txt
|
|||||||
gfx/pokemon/*/bitmask.asm
|
gfx/pokemon/*/bitmask.asm
|
||||||
gfx/pokemon/*/frames.asm
|
gfx/pokemon/*/frames.asm
|
||||||
!gfx/pokemon/unown/bitmask.asm
|
!gfx/pokemon/unown/bitmask.asm
|
||||||
!gfx/pokemon/unown/frames.asm
|
!gfx/pokemon/unown/frames.asm
|
||||||
|
@@ -248,7 +248,7 @@ PlayerEvents:
|
|||||||
|
|
||||||
call Dummy_CheckScriptFlags3Bit5 ; This is a waste of time
|
call Dummy_CheckScriptFlags3Bit5 ; This is a waste of time
|
||||||
|
|
||||||
call CheckTrainerBattle3
|
call CheckTrainerBattle_GetPlayerEvent
|
||||||
jr c, .ok
|
jr c, .ok
|
||||||
|
|
||||||
call CheckTileEvent
|
call CheckTileEvent
|
||||||
@@ -289,10 +289,10 @@ PlayerEvents:
|
|||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
|
|
||||||
CheckTrainerBattle3:
|
CheckTrainerBattle_GetPlayerEvent:
|
||||||
nop
|
nop
|
||||||
nop
|
nop
|
||||||
call CheckTrainerBattle2
|
call CheckTrainerBattle
|
||||||
jr nc, .nope
|
jr nc, .nope
|
||||||
|
|
||||||
ld a, PLAYEREVENT_SEENBYTRAINER
|
ld a, PLAYEREVENT_SEENBYTRAINER
|
||||||
|
@@ -38,7 +38,7 @@ FlagAction::
|
|||||||
; 1 SET_FLAG set bit
|
; 1 SET_FLAG set bit
|
||||||
; 2 CHECK_FLAG check bit
|
; 2 CHECK_FLAG check bit
|
||||||
; de: bit number
|
; de: bit number
|
||||||
; hl: index within bit table
|
; hl: pointer to the flag array
|
||||||
|
|
||||||
; get index within the byte
|
; get index within the byte
|
||||||
ld a, e
|
ld a, e
|
||||||
|
@@ -1,16 +1,16 @@
|
|||||||
CheckTrainerBattle2::
|
CheckTrainerBattle::
|
||||||
ldh a, [hROMBank]
|
ldh a, [hROMBank]
|
||||||
push af
|
push af
|
||||||
|
|
||||||
call SwitchToMapScriptsBank
|
call SwitchToMapScriptsBank
|
||||||
call CheckTrainerBattle
|
call _CheckTrainerBattle
|
||||||
|
|
||||||
pop bc
|
pop bc
|
||||||
ld a, b
|
ld a, b
|
||||||
rst Bankswitch
|
rst Bankswitch
|
||||||
ret
|
ret
|
||||||
|
|
||||||
CheckTrainerBattle::
|
_CheckTrainerBattle::
|
||||||
; Check if any trainer on the map sees the player and wants to battle.
|
; Check if any trainer on the map sees the player and wants to battle.
|
||||||
|
|
||||||
; Skip the player object.
|
; Skip the player object.
|
||||||
@@ -35,7 +35,7 @@ CheckTrainerBattle::
|
|||||||
add hl, de
|
add hl, de
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
and $f
|
and $f
|
||||||
cp $2
|
cp OBJECTTYPE_TRAINER
|
||||||
jr nz, .next
|
jr nz, .next
|
||||||
|
|
||||||
; Is visible on the map
|
; Is visible on the map
|
||||||
|
4
hram.asm
4
hram.asm
@@ -126,9 +126,7 @@ hWY:: db ; ffd2
|
|||||||
hTilesPerCycle:: db ; ffd3
|
hTilesPerCycle:: db ; ffd3
|
||||||
hBGMapMode:: db ; ffd4
|
hBGMapMode:: db ; ffd4
|
||||||
hBGMapThird:: db ; ffd5
|
hBGMapThird:: db ; ffd5
|
||||||
hBGMapAddress:: db ; ffd6
|
hBGMapAddress:: dw ; ffd6
|
||||||
|
|
||||||
ds 1
|
|
||||||
|
|
||||||
hOAMUpdate:: db ; ffd8
|
hOAMUpdate:: db ; ffd8
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
; MovementPointers indexes (see engine/overworld/movement.asm)
|
; MovementPointers indexes (see engine/overworld/movement.asm)
|
||||||
enum_start
|
enum_start 0, +4
|
||||||
|
|
||||||
; Directional movements
|
; Directional movements
|
||||||
|
|
||||||
@@ -8,98 +8,72 @@ turn_head: MACRO
|
|||||||
db movement_turn_head | \1
|
db movement_turn_head | \1
|
||||||
ENDM
|
ENDM
|
||||||
|
|
||||||
__enum__ = __enum__ + 3
|
|
||||||
|
|
||||||
enum movement_turn_step ; $04
|
enum movement_turn_step ; $04
|
||||||
turn_step: MACRO
|
turn_step: MACRO
|
||||||
db movement_turn_step | \1
|
db movement_turn_step | \1
|
||||||
ENDM
|
ENDM
|
||||||
|
|
||||||
__enum__ = __enum__ + 3
|
|
||||||
|
|
||||||
enum movement_slow_step ; $08
|
enum movement_slow_step ; $08
|
||||||
slow_step: MACRO
|
slow_step: MACRO
|
||||||
db movement_slow_step | \1
|
db movement_slow_step | \1
|
||||||
ENDM
|
ENDM
|
||||||
|
|
||||||
__enum__ = __enum__ + 3
|
|
||||||
|
|
||||||
enum movement_step ; $0c
|
enum movement_step ; $0c
|
||||||
step: MACRO
|
step: MACRO
|
||||||
db movement_step | \1
|
db movement_step | \1
|
||||||
ENDM
|
ENDM
|
||||||
|
|
||||||
__enum__ = __enum__ + 3
|
|
||||||
|
|
||||||
enum movement_big_step ; $10
|
enum movement_big_step ; $10
|
||||||
big_step: MACRO
|
big_step: MACRO
|
||||||
db movement_big_step | \1
|
db movement_big_step | \1
|
||||||
ENDM
|
ENDM
|
||||||
|
|
||||||
__enum__ = __enum__ + 3
|
|
||||||
|
|
||||||
enum movement_slow_slide_step ; $14
|
enum movement_slow_slide_step ; $14
|
||||||
slow_slide_step: MACRO
|
slow_slide_step: MACRO
|
||||||
db movement_slow_slide_step | \1
|
db movement_slow_slide_step | \1
|
||||||
ENDM
|
ENDM
|
||||||
|
|
||||||
__enum__ = __enum__ + 3
|
|
||||||
|
|
||||||
enum movement_slide_step ; $18
|
enum movement_slide_step ; $18
|
||||||
slide_step: MACRO
|
slide_step: MACRO
|
||||||
db movement_slide_step | \1
|
db movement_slide_step | \1
|
||||||
ENDM
|
ENDM
|
||||||
|
|
||||||
__enum__ = __enum__ + 3
|
|
||||||
|
|
||||||
enum movement_fast_slide_step ; $1c
|
enum movement_fast_slide_step ; $1c
|
||||||
fast_slide_step: MACRO
|
fast_slide_step: MACRO
|
||||||
db movement_fast_slide_step | \1
|
db movement_fast_slide_step | \1
|
||||||
ENDM
|
ENDM
|
||||||
|
|
||||||
__enum__ = __enum__ + 3
|
|
||||||
|
|
||||||
enum movement_turn_away ; $20
|
enum movement_turn_away ; $20
|
||||||
turn_away: MACRO
|
turn_away: MACRO
|
||||||
db movement_turn_away | \1
|
db movement_turn_away | \1
|
||||||
ENDM
|
ENDM
|
||||||
|
|
||||||
__enum__ = __enum__ + 3
|
|
||||||
|
|
||||||
enum movement_turn_in ; $24
|
enum movement_turn_in ; $24
|
||||||
turn_in: MACRO
|
turn_in: MACRO
|
||||||
db movement_turn_in | \1
|
db movement_turn_in | \1
|
||||||
ENDM
|
ENDM
|
||||||
|
|
||||||
__enum__ = __enum__ + 3
|
|
||||||
|
|
||||||
enum movement_turn_waterfall ; $28
|
enum movement_turn_waterfall ; $28
|
||||||
turn_waterfall: MACRO
|
turn_waterfall: MACRO
|
||||||
db movement_turn_waterfall | \1
|
db movement_turn_waterfall | \1
|
||||||
ENDM
|
ENDM
|
||||||
|
|
||||||
__enum__ = __enum__ + 3
|
|
||||||
|
|
||||||
enum movement_slow_jump_step ; $2c
|
enum movement_slow_jump_step ; $2c
|
||||||
slow_jump_step: MACRO
|
slow_jump_step: MACRO
|
||||||
db movement_slow_jump_step | \1
|
db movement_slow_jump_step | \1
|
||||||
ENDM
|
ENDM
|
||||||
|
|
||||||
__enum__ = __enum__ + 3
|
|
||||||
|
|
||||||
enum movement_jump_step ; $30
|
enum movement_jump_step ; $30
|
||||||
jump_step: MACRO
|
jump_step: MACRO
|
||||||
db movement_jump_step | \1
|
db movement_jump_step | \1
|
||||||
ENDM
|
ENDM
|
||||||
|
|
||||||
__enum__ = __enum__ + 3
|
|
||||||
|
|
||||||
enum movement_fast_jump_step ; $34
|
enum movement_fast_jump_step ; $34
|
||||||
fast_jump_step: MACRO
|
fast_jump_step: MACRO
|
||||||
db movement_fast_jump_step | \1
|
db movement_fast_jump_step | \1
|
||||||
ENDM
|
ENDM
|
||||||
|
|
||||||
__enum__ = __enum__ + 3
|
__enumdir__ = +1
|
||||||
|
|
||||||
; Control
|
; Control
|
||||||
enum movement_remove_sliding ; $38
|
enum movement_remove_sliding ; $38
|
||||||
|
Reference in New Issue
Block a user