mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
Merge pull request #217 from yenatch/more-objects
compile and link multiple objects
This commit is contained in:
commit
0fdbdb43a7
4
.gitignore
vendored
4
.gitignore
vendored
@ -17,6 +17,10 @@ globals.asm
|
||||
*.gbc
|
||||
*.gb
|
||||
|
||||
# rgbds extras
|
||||
*.map
|
||||
*.sym
|
||||
|
||||
# generated
|
||||
*.tx
|
||||
|
||||
|
20
Makefile
20
Makefile
@ -6,7 +6,18 @@ PYTHON := python
|
||||
TEXTFILES := $(shell find ./ -type f -name '*.asm' | grep -v globals.asm)
|
||||
TEXTQUEUE :=
|
||||
|
||||
OBJS := pokecrystal.o
|
||||
CRYSTAL_OBJS := \
|
||||
wram.o \
|
||||
main.o \
|
||||
engine/events.o \
|
||||
engine/scripting_crystal.o \
|
||||
engine/events_2.o \
|
||||
stats/egg_moves_crystal.o \
|
||||
stats/evos_attacks_crystal.o
|
||||
|
||||
OBJS := $(CRYSTAL_OBJS)
|
||||
|
||||
ROMS := pokecrystal.gbc
|
||||
|
||||
PNGS := $(shell find gfx/ -type f -name '*.png')
|
||||
LZS := $(shell find gfx/ -type f -name '*.lz')
|
||||
@ -21,10 +32,11 @@ $(shell \
|
||||
) \
|
||||
)
|
||||
|
||||
all: baserom.gbc globals.asm pokecrystal.gbc
|
||||
all: baserom.gbc globals.asm $(ROMS)
|
||||
cmp baserom.gbc pokecrystal.gbc
|
||||
clean:
|
||||
rm -f pokecrystal.o pokecrystal.gbc
|
||||
rm -f $(ROMS)
|
||||
rm -f $(OBJS)
|
||||
rm -f globals.asm globals.tx
|
||||
@echo 'Removing preprocessed .tx files...'
|
||||
@rm -f $(TEXTFILES:.asm=.tx)
|
||||
@ -45,7 +57,7 @@ globals.asm: $(TEXTFILES:.asm=.tx)
|
||||
$(OBJS): $$(patsubst %.o,%.tx,$$@) $$(patsubst %.asm,%.tx,$$(OBJ_$$(patsubst %.o,%,$$@)))
|
||||
rgbasm -o $@ $(@:.o=.tx)
|
||||
|
||||
pokecrystal.gbc: $(OBJS)
|
||||
pokecrystal.gbc: $(CRYSTAL_OBJS)
|
||||
rgblink -n pokecrystal.sym -m pokecrystal.map -o pokecrystal.gbc $^
|
||||
rgbfix -Cjv -i BYTE -k 01 -l 0x33 -m 0x10 -p 0 -r 3 -t PM_CRYSTAL $@
|
||||
|
||||
|
@ -1,10 +1,3 @@
|
||||
_CRYSTAL EQU 1
|
||||
|
||||
if _CRYSTAL
|
||||
VERSION EQU 0
|
||||
else
|
||||
VERSION EQU 1
|
||||
endc
|
||||
|
||||
; wram constants
|
||||
; MonType: ; cf5f
|
||||
|
1112
engine/events.asm
Normal file
1112
engine/events.asm
Normal file
File diff suppressed because it is too large
Load Diff
647
engine/events_2.asm
Normal file
647
engine/events_2.asm
Normal file
@ -0,0 +1,647 @@
|
||||
INCLUDE "includes.asm"
|
||||
|
||||
; More overworld event handling.
|
||||
|
||||
SECTION "events2", ROMX, BANK[$25]
|
||||
|
||||
Function97c28: ; 97c28
|
||||
ld hl, StatusFlags2
|
||||
res 1, [hl]
|
||||
res 2, [hl]
|
||||
ret
|
||||
; 97c30
|
||||
|
||||
Function97c30: ; 97c30
|
||||
ld a, [$d45c]
|
||||
and a
|
||||
ret z
|
||||
ld hl, $d45e
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
ld a, [$d45d]
|
||||
call CallScript
|
||||
scf
|
||||
push af
|
||||
xor a
|
||||
ld hl, $d45c
|
||||
ld bc, 8
|
||||
call ByteFill
|
||||
pop af
|
||||
ret
|
||||
; 97c4f
|
||||
|
||||
Function97c4f: ; 97c4f
|
||||
ld hl, $d45c
|
||||
ld a, [hl]
|
||||
and a
|
||||
ret nz
|
||||
ld [hl], 1
|
||||
inc hl
|
||||
ld [hl], b
|
||||
inc hl
|
||||
ld [hl], e
|
||||
inc hl
|
||||
ld [hl], d
|
||||
scf
|
||||
ret
|
||||
; 97c5f
|
||||
|
||||
Function97c5f: ; 97c5f
|
||||
call GetFacingTileCoord
|
||||
ld [EngineBuffer1], a
|
||||
ld c, a
|
||||
callba Function1365b
|
||||
jr c, .asm_97cb9
|
||||
|
||||
call CheckCutTreeTile
|
||||
jr nz, .whirlpool
|
||||
callba TryCutOW
|
||||
jr .asm_97cb9
|
||||
|
||||
.whirlpool
|
||||
ld a, [EngineBuffer1]
|
||||
call CheckWhirlpoolTile
|
||||
jr nz, .waterfall
|
||||
callba TryWhirlpoolOW
|
||||
jr .asm_97cb9
|
||||
|
||||
.waterfall
|
||||
ld a, [EngineBuffer1]
|
||||
call CheckWaterfallTile
|
||||
jr nz, .headbutt
|
||||
callba TryWaterfallOW
|
||||
jr .asm_97cb9
|
||||
|
||||
.headbutt
|
||||
ld a, [EngineBuffer1]
|
||||
call CheckHeadbuttTreeTile
|
||||
jr nz, .surf
|
||||
callba TryHeadbuttOW
|
||||
jr c, .asm_97cb9
|
||||
jr .asm_97cb7
|
||||
|
||||
.surf
|
||||
callba TrySurfOW
|
||||
jr nc, .asm_97cb7
|
||||
jr .asm_97cb9
|
||||
|
||||
.asm_97cb7
|
||||
xor a
|
||||
ret
|
||||
|
||||
.asm_97cb9
|
||||
call PlayClickSFX
|
||||
ld a, $ff
|
||||
scf
|
||||
ret
|
||||
; 97cc0
|
||||
|
||||
|
||||
Function97cc0: ; 97cc0
|
||||
; Rock Smash encounter
|
||||
|
||||
call Function968c7
|
||||
jr c, .asm_97ce2
|
||||
call Function97cfd
|
||||
jr nc, .asm_97ce2
|
||||
ld hl, StatusFlags2
|
||||
bit 2, [hl]
|
||||
jr nz, .asm_97cdb
|
||||
callba Function2a0e7
|
||||
jr nz, .asm_97ce2
|
||||
jr .asm_97ce6
|
||||
|
||||
.asm_97cdb
|
||||
call Function97d23
|
||||
jr nc, .asm_97ce2
|
||||
jr .asm_97ced
|
||||
|
||||
.asm_97ce2
|
||||
ld a, 1
|
||||
and a
|
||||
ret
|
||||
|
||||
.asm_97ce6
|
||||
ld a, BANK(RockSmashBattleScript)
|
||||
ld hl, RockSmashBattleScript
|
||||
jr .asm_97cf4
|
||||
|
||||
.asm_97ced
|
||||
ld a, BANK(UnknownScript_0x135eb)
|
||||
ld hl, UnknownScript_0x135eb
|
||||
jr .asm_97cf4
|
||||
|
||||
.asm_97cf4
|
||||
call CallScript
|
||||
scf
|
||||
ret
|
||||
; 97cf9
|
||||
|
||||
RockSmashBattleScript: ; 97cf9
|
||||
battlecheck
|
||||
startbattle
|
||||
returnafterbattle
|
||||
end
|
||||
; 97cfd
|
||||
|
||||
Function97cfd: ; 97cfd
|
||||
ld hl, StatusFlags
|
||||
bit 5, [hl]
|
||||
jr nz, .asm_97d21
|
||||
ld a, [$d19a]
|
||||
cp $4
|
||||
jr z, .asm_97d17
|
||||
cp $7
|
||||
jr z, .asm_97d17
|
||||
callba Function149dd
|
||||
jr nc, .asm_97d21
|
||||
|
||||
.asm_97d17
|
||||
ld a, [StandingTile]
|
||||
call CheckIceTile
|
||||
jr z, .asm_97d21
|
||||
scf
|
||||
ret
|
||||
|
||||
.asm_97d21
|
||||
and a
|
||||
ret
|
||||
; 97d23
|
||||
|
||||
Function97d23: ; 97d23
|
||||
call Function97d64
|
||||
ret nc
|
||||
call Function97d31
|
||||
callba Function2a1df
|
||||
ret
|
||||
; 97d31
|
||||
|
||||
Function97d31: ; 97d31
|
||||
; Pick a random mon out of ContestMons.
|
||||
|
||||
.asm_97d31
|
||||
call Random
|
||||
cp 100 << 1
|
||||
jr nc, .asm_97d31
|
||||
srl a
|
||||
|
||||
ld hl, ContestMons
|
||||
ld de, 4
|
||||
.CheckMon
|
||||
sub [hl]
|
||||
jr c, .GotMon
|
||||
add hl, de
|
||||
jr .CheckMon
|
||||
|
||||
.GotMon
|
||||
inc hl
|
||||
|
||||
; Species
|
||||
ld a, [hli]
|
||||
ld [$d22e], a
|
||||
|
||||
; Min level
|
||||
ld a, [hli]
|
||||
ld d, a
|
||||
|
||||
; Max level
|
||||
ld a, [hl]
|
||||
|
||||
sub d
|
||||
jr nz, .RandomLevel
|
||||
|
||||
; If min and max are the same.
|
||||
ld a, d
|
||||
jr .GotLevel
|
||||
|
||||
.RandomLevel
|
||||
; Get a random level between the min and max.
|
||||
ld c, a
|
||||
inc c
|
||||
call Random
|
||||
ld a, [hRandomAdd]
|
||||
call SimpleDivide
|
||||
add d
|
||||
|
||||
.GotLevel
|
||||
ld [CurPartyLevel], a
|
||||
|
||||
xor a
|
||||
ret
|
||||
; 97d64
|
||||
|
||||
Function97d64: ; 97d64
|
||||
ld a, [StandingTile]
|
||||
call Function188e
|
||||
ld b, $66
|
||||
jr z, .asm_97d70
|
||||
ld b, $33
|
||||
|
||||
.asm_97d70
|
||||
callba Function2a124
|
||||
callba Function2a138
|
||||
call Random
|
||||
ld a, [hRandomAdd]
|
||||
cp b
|
||||
ret c
|
||||
ld a, 1
|
||||
and a
|
||||
ret
|
||||
; 97d87
|
||||
|
||||
ContestMons: ; 97d87
|
||||
; %, species, min, max
|
||||
db 20, CATERPIE, 7, 18
|
||||
db 20, WEEDLE, 7, 18
|
||||
db 10, METAPOD, 9, 18
|
||||
db 10, KAKUNA, 9, 18
|
||||
db 5, BUTTERFREE, 12, 15
|
||||
db 5, BEEDRILL, 12, 15
|
||||
db 10, VENONAT, 10, 16
|
||||
db 10, PARAS, 10, 17
|
||||
db 5, SCYTHER, 13, 14
|
||||
db 5, PINSIR, 13, 14
|
||||
db -1, VENOMOTH, 30, 40
|
||||
; 97db3
|
||||
|
||||
Function97db3: ; 97db3
|
||||
nop
|
||||
nop
|
||||
; fallthrough
|
||||
; 97db5
|
||||
|
||||
Function97db5: ; 97db5
|
||||
ld hl, StatusFlags2
|
||||
bit 4, [hl]
|
||||
jr z, .asm_97df7
|
||||
ld a, [PlayerState]
|
||||
cp $1
|
||||
jr nz, .asm_97df7
|
||||
call Function2d05
|
||||
and a
|
||||
jr nz, .asm_97df7
|
||||
ld hl, $dca2
|
||||
ld a, [hli]
|
||||
ld d, a
|
||||
ld e, [hl]
|
||||
cp $ff
|
||||
jr nz, .asm_97dd8
|
||||
ld a, e
|
||||
cp $ff
|
||||
jr z, .asm_97ddc
|
||||
|
||||
.asm_97dd8
|
||||
inc de
|
||||
ld [hl], e
|
||||
dec hl
|
||||
ld [hl], d
|
||||
|
||||
.asm_97ddc
|
||||
ld a, d
|
||||
cp $4
|
||||
jr c, .asm_97df7
|
||||
ld a, [$dc31]
|
||||
and a
|
||||
jr nz, .asm_97df7
|
||||
ld a, $6
|
||||
ld [$dc31], a
|
||||
xor a
|
||||
ld [$dc32], a
|
||||
ld hl, StatusFlags2
|
||||
res 4, [hl]
|
||||
scf
|
||||
ret
|
||||
|
||||
.asm_97df7
|
||||
xor a
|
||||
ret
|
||||
; 97df9
|
||||
|
||||
Function97df9: ; 97df9
|
||||
ld hl, $d6de
|
||||
ld de, $0006
|
||||
ld c, $4
|
||||
xor a
|
||||
.asm_97e02
|
||||
ld [hl], a
|
||||
add hl, de
|
||||
dec c
|
||||
jr nz, .asm_97e02
|
||||
ret
|
||||
; 97e08
|
||||
|
||||
Function97e08: ; 97e08
|
||||
ld hl, $d6de
|
||||
xor a
|
||||
.asm_97e0c
|
||||
ld [hConnectionStripLength], a
|
||||
ld a, [hl]
|
||||
and a
|
||||
jr z, .asm_97e19
|
||||
push hl
|
||||
ld b, h
|
||||
ld c, l
|
||||
call Function97e79
|
||||
pop hl
|
||||
|
||||
.asm_97e19
|
||||
ld de, $0006
|
||||
add hl, de
|
||||
ld a, [hConnectionStripLength]
|
||||
inc a
|
||||
cp $4
|
||||
jr nz, .asm_97e0c
|
||||
ret
|
||||
; 97e25
|
||||
|
||||
Function97e25: ; 97e25
|
||||
ld hl, $d6de
|
||||
ld bc, 6
|
||||
call AddNTimes
|
||||
ld b, h
|
||||
ld c, l
|
||||
ret
|
||||
; 97e31
|
||||
|
||||
Function97e31: ; 97e31
|
||||
push bc
|
||||
push de
|
||||
call Function97e45
|
||||
ld d, h
|
||||
ld e, l
|
||||
pop hl
|
||||
pop bc
|
||||
ret c
|
||||
ld a, b
|
||||
ld bc, $0005
|
||||
call FarCopyBytes
|
||||
xor a
|
||||
ld [hl], a
|
||||
ret
|
||||
; 97e45
|
||||
|
||||
Function97e45: ; 97e45
|
||||
ld hl, $d6de
|
||||
ld de, $0006
|
||||
ld c, $4
|
||||
.asm_97e4d
|
||||
ld a, [hl]
|
||||
and a
|
||||
jr z, .asm_97e57
|
||||
add hl, de
|
||||
dec c
|
||||
jr nz, .asm_97e4d
|
||||
scf
|
||||
ret
|
||||
|
||||
.asm_97e57
|
||||
ld a, $4
|
||||
sub c
|
||||
and a
|
||||
ret
|
||||
; 97e5c
|
||||
|
||||
Function97e5c: ; 97e5c
|
||||
ld hl, $d6de
|
||||
ld de, $0006
|
||||
ld c, $4
|
||||
.asm_97e64
|
||||
ld a, [hl]
|
||||
cp b
|
||||
jr z, .asm_97e6e
|
||||
add hl, de
|
||||
dec c
|
||||
jr nz, .asm_97e64
|
||||
and a
|
||||
ret
|
||||
|
||||
.asm_97e6e
|
||||
xor a
|
||||
ld [hl], a
|
||||
scf
|
||||
ret
|
||||
; 97e72
|
||||
|
||||
Function97e72: ; 97e72
|
||||
ld hl, $0000
|
||||
add hl, bc
|
||||
ld [hl], 0
|
||||
ret
|
||||
; 97e79
|
||||
|
||||
Function97e79: ; 97e79
|
||||
ld hl, $0000
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
cp 5
|
||||
jr c, .asm_97e83
|
||||
xor a
|
||||
|
||||
.asm_97e83
|
||||
ld e, a
|
||||
ld d, 0
|
||||
ld hl, Table97e94
|
||||
add hl, de
|
||||
add hl, de
|
||||
add hl, de
|
||||
ld a, [hli]
|
||||
push af
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
pop af
|
||||
rst FarCall
|
||||
ret
|
||||
; 97e94
|
||||
|
||||
Table97e94: ; 97e94
|
||||
dbw BANK(Function97eb7), Function97eb7
|
||||
dbw BANK(Function97eb8), Function97eb8
|
||||
dbw BANK(Function97f42), Function97f42
|
||||
dbw BANK(Function97ef9), Function97ef9
|
||||
dbw BANK(Function97ebc), Function97ebc
|
||||
; 97ea3
|
||||
|
||||
Function97ea3: ; 97ea3
|
||||
ld hl, $0005
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
pop hl
|
||||
rst JumpTable
|
||||
ret
|
||||
; 97eab
|
||||
|
||||
Function97eab: ; 97eab
|
||||
ld hl, $0005
|
||||
add hl, bc
|
||||
inc [hl]
|
||||
ret
|
||||
; 97eb1
|
||||
|
||||
Function97eb1: ; 97eb1
|
||||
ld hl, $0005
|
||||
add hl, bc
|
||||
dec [hl]
|
||||
ret
|
||||
; 97eb7
|
||||
|
||||
Function97eb7: ; 97eb7
|
||||
ret
|
||||
; 97eb8
|
||||
|
||||
Function97eb8: ; 97eb8
|
||||
call Function2f3e
|
||||
ret
|
||||
; 97ebc
|
||||
|
||||
Function97ebc: ; 97ebc
|
||||
call Function97ea3
|
||||
dw Function97ec3
|
||||
dw Function97ecd
|
||||
; 97ec3
|
||||
|
||||
Function97ec3: ; 97ec3
|
||||
ld a, [hSCY]
|
||||
ld hl, $0004
|
||||
add hl, bc
|
||||
ld [hl], a
|
||||
call Function97eab
|
||||
; 97ecd
|
||||
|
||||
Function97ecd: ; 97ecd
|
||||
ld hl, $0001
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
dec a
|
||||
ld [hl], a
|
||||
jr z, .asm_97eee
|
||||
and $1
|
||||
jr z, .asm_97ee4
|
||||
ld hl, $0002
|
||||
add hl, bc
|
||||
ld a, [hSCY]
|
||||
sub [hl]
|
||||
ld [hSCY], a
|
||||
ret
|
||||
|
||||
.asm_97ee4
|
||||
ld hl, $0002
|
||||
add hl, bc
|
||||
ld a, [hSCY]
|
||||
add [hl]
|
||||
ld [hSCY], a
|
||||
ret
|
||||
|
||||
.asm_97eee
|
||||
ld hl, $0004
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
ld [hSCY], a
|
||||
call Function97e72
|
||||
ret
|
||||
; 97ef9
|
||||
|
||||
Function97ef9: ; 97ef9
|
||||
call Function97ea3
|
||||
dw Function97f02
|
||||
dw Function97f0a
|
||||
dw Function97f1b
|
||||
; 97f02
|
||||
|
||||
Function97f02: ; 97f02
|
||||
call Function97f38
|
||||
jr z, Function97f2c
|
||||
call Function97eab
|
||||
; 97f0a
|
||||
|
||||
Function97f0a: ; 97f0a
|
||||
call Function97f38
|
||||
jr z, Function97f2c
|
||||
call Function97eab
|
||||
|
||||
ld hl, $0002
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
ld [$d173], a
|
||||
ret
|
||||
; 97f1b
|
||||
|
||||
Function97f1b: ; 97f1b
|
||||
call Function97f38
|
||||
jr z, Function97f2c
|
||||
call Function97eb1
|
||||
|
||||
ld hl, $0003
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
ld [$d173], a
|
||||
ret
|
||||
; 97f2c
|
||||
|
||||
Function97f2c: ; 97f2c
|
||||
ld a, $7f
|
||||
ld [$d173], a
|
||||
ld hl, $0005
|
||||
add hl, bc
|
||||
ld [hl], 0
|
||||
ret
|
||||
; 97f38
|
||||
|
||||
Function97f38: ; 97f38
|
||||
push bc
|
||||
ld bc, $d4d6
|
||||
call GetSpriteDirection
|
||||
and a
|
||||
pop bc
|
||||
ret
|
||||
; 97f42
|
||||
|
||||
Function97f42: ; 97f42
|
||||
ld de, $d4d6
|
||||
ld a, $d
|
||||
.asm_97f47
|
||||
push af
|
||||
|
||||
ld hl, $0000
|
||||
add hl, de
|
||||
ld a, [hl]
|
||||
and a
|
||||
jr z, .asm_97f71
|
||||
|
||||
ld hl, $0003
|
||||
add hl, de
|
||||
ld a, [hl]
|
||||
cp $19
|
||||
jr nz, .asm_97f71
|
||||
|
||||
ld hl, $000e
|
||||
add hl, de
|
||||
ld a, [hl]
|
||||
call CheckPitTile
|
||||
jr nz, .asm_97f71
|
||||
|
||||
ld hl, $0007
|
||||
add hl, de
|
||||
ld a, [hl]
|
||||
cp $ff
|
||||
jr nz, .asm_97f71
|
||||
call Function3567
|
||||
jr c, .asm_97f7c
|
||||
|
||||
.asm_97f71
|
||||
ld hl, $0028
|
||||
add hl, de
|
||||
ld d, h
|
||||
ld e, l
|
||||
|
||||
pop af
|
||||
dec a
|
||||
jr nz, .asm_97f47
|
||||
ret
|
||||
|
||||
.asm_97f7c
|
||||
pop af
|
||||
ret
|
||||
; 97f7e
|
||||
|
@ -1,3 +1,75 @@
|
||||
; Event scripting commands.
|
||||
|
||||
|
||||
Function96c56: ; 96c56
|
||||
push af
|
||||
ld a, 1
|
||||
ld [ScriptMode], a
|
||||
pop af
|
||||
ret
|
||||
; 96c5e
|
||||
|
||||
|
||||
ScriptEvents: ; 96c5e
|
||||
call StartScript
|
||||
.loop
|
||||
ld a, [ScriptMode]
|
||||
ld hl, .modes
|
||||
rst JumpTable
|
||||
call CheckScript
|
||||
jr nz, .loop
|
||||
ret
|
||||
; 96c6e
|
||||
|
||||
.modes ; 96c6e
|
||||
dw EndScript
|
||||
dw RunScriptCommand
|
||||
dw WaitScriptMovement
|
||||
dw WaitScript
|
||||
|
||||
EndScript: ; 96c76
|
||||
call StopScript
|
||||
ret
|
||||
; 96c7a
|
||||
|
||||
WaitScript: ; 96c7a
|
||||
call StopScript
|
||||
|
||||
ld hl, ScriptDelay
|
||||
dec [hl]
|
||||
ret nz
|
||||
|
||||
callba Function58b9
|
||||
|
||||
ld a, SCRIPT_READ
|
||||
ld [ScriptMode], a
|
||||
call StartScript
|
||||
ret
|
||||
; 96c91
|
||||
|
||||
WaitScriptMovement: ; 96c91
|
||||
call StopScript
|
||||
|
||||
ld hl, VramState
|
||||
bit 7, [hl]
|
||||
ret nz
|
||||
|
||||
callba Function58b9
|
||||
|
||||
ld a, SCRIPT_READ
|
||||
ld [ScriptMode], a
|
||||
call StartScript
|
||||
ret
|
||||
; 96ca9
|
||||
|
||||
RunScriptCommand: ; 96ca9
|
||||
call GetScriptByte
|
||||
ld hl, ScriptCommandTable
|
||||
rst JumpTable
|
||||
ret
|
||||
; 96cb1
|
||||
|
||||
|
||||
ScriptCommandTable: ; 0x96cb1
|
||||
dw Script_2call
|
||||
dw Script_3call
|
||||
@ -81,7 +153,9 @@ ScriptCommandTable: ; 0x96cb1
|
||||
dw Script_loadmenudata
|
||||
dw Script_writebackup
|
||||
dw Script_jumptextfaceplayer
|
||||
IF _CRYSTAL
|
||||
dw Script_3jumptext
|
||||
ENDC
|
||||
dw Script_jumptext
|
||||
dw Script_closetext
|
||||
dw Script_keeptextopen
|
||||
@ -279,6 +353,9 @@ JumpTextScript: ; 0x96e7a
|
||||
end
|
||||
; 0x96e81
|
||||
|
||||
|
||||
IF _CRYSTAL
|
||||
|
||||
Script_3jumptext: ; 0x96e81
|
||||
; script command 0x52
|
||||
; parameters:
|
||||
@ -295,6 +372,9 @@ Script_3jumptext: ; 0x96e81
|
||||
jp ScriptJump
|
||||
; 0x96e9b
|
||||
|
||||
ENDC
|
||||
|
||||
|
||||
Script_2writetext: ; 0x96e9b
|
||||
; script command 0x4c
|
||||
; parameters:
|
||||
@ -3117,7 +3197,7 @@ DisplayCredits:
|
||||
call Function261b
|
||||
call StopScript
|
||||
ret
|
||||
; 0x97c05
|
||||
; 0x97c051
|
||||
|
||||
Script_wait: ; 0x97c05
|
||||
; script command 0xa8
|
||||
@ -3146,3 +3226,13 @@ Script_unknown0xa9: ; 0x97c15
|
||||
ret
|
||||
; 0x97c20
|
||||
|
||||
|
||||
Function97c20: ; 97c20
|
||||
ld a, [.byte]
|
||||
ld [ScriptVar], a
|
||||
ret
|
||||
|
||||
.byte
|
||||
db 0
|
||||
; 97c28
|
||||
|
||||
|
5
engine/scripting_crystal.asm
Normal file
5
engine/scripting_crystal.asm
Normal file
@ -0,0 +1,5 @@
|
||||
INCLUDE "pokecrystal.asm"
|
||||
INCLUDE "includes.asm"
|
||||
|
||||
SECTION "scripting", ROMX, BANK[$25]
|
||||
INCLUDE "engine/scripting.asm"
|
2
includes.asm
Normal file
2
includes.asm
Normal file
@ -0,0 +1,2 @@
|
||||
INCLUDE "globals.asm"
|
||||
INCLUDE "constants.asm"
|
@ -1,3 +1,32 @@
|
||||
MapGroupPointers: ; 0x94000
|
||||
; pointers to the first map header of each map group
|
||||
dw MapGroup1
|
||||
dw MapGroup2
|
||||
dw MapGroup3
|
||||
dw MapGroup4
|
||||
dw MapGroup5
|
||||
dw MapGroup6
|
||||
dw MapGroup7
|
||||
dw MapGroup8
|
||||
dw MapGroup9
|
||||
dw MapGroup10
|
||||
dw MapGroup11
|
||||
dw MapGroup12
|
||||
dw MapGroup13
|
||||
dw MapGroup14
|
||||
dw MapGroup15
|
||||
dw MapGroup16
|
||||
dw MapGroup17
|
||||
dw MapGroup18
|
||||
dw MapGroup19
|
||||
dw MapGroup20
|
||||
dw MapGroup21
|
||||
dw MapGroup22
|
||||
dw MapGroup23
|
||||
dw MapGroup24
|
||||
dw MapGroup25
|
||||
dw MapGroup26
|
||||
|
||||
|
||||
MapGroup1:
|
||||
|
||||
|
@ -1,5 +1,2 @@
|
||||
INCLUDE "globals.asm"
|
||||
|
||||
INCLUDE "constants.asm"
|
||||
INCLUDE "wram.asm"
|
||||
INCLUDE "main.asm"
|
||||
_CRYSTAL EQU 1
|
||||
VERSION EQU 0
|
||||
|
@ -1,3 +1,4 @@
|
||||
EggMovePointers: ; 0x23b11
|
||||
dw BulbasaurEggMoves
|
||||
dw NoEggMoves
|
||||
dw NoEggMoves
|
||||
|
6
stats/egg_moves_crystal.asm
Normal file
6
stats/egg_moves_crystal.asm
Normal file
@ -0,0 +1,6 @@
|
||||
INCLUDE "pokecrystal.asm"
|
||||
INCLUDE "includes.asm"
|
||||
|
||||
SECTION "eggmoves", ROMX, BANK[$8]
|
||||
INCLUDE "stats/egg_move_pointers.asm"
|
||||
INCLUDE "stats/egg_moves.asm"
|
6
stats/evos_attacks_crystal.asm
Normal file
6
stats/evos_attacks_crystal.asm
Normal file
@ -0,0 +1,6 @@
|
||||
INCLUDE "pokecrystal.asm"
|
||||
INCLUDE "includes.asm"
|
||||
|
||||
SECTION "evosattacks", ROMx, BANK[$10]
|
||||
INCLUDE "stats/evos_attacks_pointers.asm"
|
||||
INCLUDE "stats/evos_attacks.asm"
|
@ -2,6 +2,7 @@
|
||||
|
||||
; These are grouped together since they're both checked at level-up.
|
||||
|
||||
EvosAttacksPointers: ; 0x425b1
|
||||
dw BulbasaurEvosAttacks
|
||||
dw IvysaurEvosAttacks
|
||||
dw VenusaurEvosAttacks
|
||||
|
389
text/buena.asm
Normal file
389
text/buena.asm
Normal file
@ -0,0 +1,389 @@
|
||||
UnknownText_0xa0c28: ; 0xa0c28
|
||||
db $0, "Hi, this is BUENA…", $51
|
||||
db "Oh! Good morning,", $4f
|
||||
db $14, "!", $51
|
||||
db "I'm kind of foggy", $4f
|
||||
db "in the morning…", $57
|
||||
; 0xa0c72
|
||||
|
||||
UnknownText_0xa0c72: ; 0xa0c72
|
||||
db $0, "Hi, this is BUENA…", $4f
|
||||
db "Oh! Hi, ", $14, "!", $51
|
||||
db "Do you tune into", $4f
|
||||
db "BUENA's show?", $57
|
||||
; 0xa0caf
|
||||
|
||||
UnknownText_0xa0caf: ; 0xa0caf
|
||||
db $0, "This is BUENA.", $4f
|
||||
db "I can't come to", $51
|
||||
db "the phone right", $4f
|
||||
db "now.", $51
|
||||
db "If you want to", $4f
|
||||
db "chat, tune into", $51
|
||||
db "BUENA's PASSWORD", $4f
|
||||
db "on the radio and", $51
|
||||
db "give me a call", $4f
|
||||
db "after midnight!", $57
|
||||
; 0xa0d42
|
||||
|
||||
UnknownText_0xa0d42: ; 0xa0d42
|
||||
db $0, "Hi, this is BUENA…", $4f
|
||||
db "Oh! Hi, ", $14, "!", $51
|
||||
db "I just got off", $4f
|
||||
db "work. ", $51
|
||||
db "Let me tell you,", $4f
|
||||
db "I'm exhausted!", $57
|
||||
; 0xa0d96
|
||||
|
||||
UnknownText_0xa0d96: ; 0xa0d96
|
||||
db $0, $14, "!", $4f
|
||||
db "Hi, it's BUENA!", $51
|
||||
db "I got up early, so", $4f
|
||||
db "I decided to call!", $57
|
||||
; 0xa0dcf
|
||||
|
||||
UnknownText_0xa0dcf: ; 0xa0dcf
|
||||
db $0, $14, "!", $4f
|
||||
db "Hi, it's BUENA!", $51
|
||||
db "I needed someone", $4f
|
||||
db "to chat with!", $57
|
||||
; 0xa0e01
|
||||
|
||||
UnknownText_0xa0e01: ; 0xa0e01
|
||||
db $0, $14, "!", $4f
|
||||
db "Hi, it's BUENA!", $51
|
||||
db "I'm just on my", $4f
|
||||
db "break.", $57
|
||||
; 0xa0e29
|
||||
|
||||
UnknownText_0xa0e29: ; 0xa0e29
|
||||
db $0, $14, "!", $4f
|
||||
db "Hi, it's BUENA!", $51
|
||||
db "I couldn't sleep,", $4f
|
||||
db "so I called you.", $57
|
||||
; 0xa0e5e
|
||||
|
||||
UnknownText_0xa0e5e: ; 0xa0e5e
|
||||
db $0, "Oh. Hi, ", $14, "!", $51
|
||||
db "You are how?", $51
|
||||
db "Aiyee! This isn't", $4f
|
||||
db "the time for me to", $51
|
||||
db "be cracking silly", $4f
|
||||
db "gag greetings!", $51
|
||||
db "The RADIO TOWER is", $4f
|
||||
db "in deep trouble!", $51
|
||||
db $14, ", you'd", $4f
|
||||
db "better be careful!", $57
|
||||
; 0xa0efb
|
||||
|
||||
UnknownText_0xa0efb: ; 0xa0efb
|
||||
db $0, "The other day, I", $4f
|
||||
db "went out to eat", $51
|
||||
db "with DJ BEN!", $4f
|
||||
db "Isn't it great?", $51
|
||||
db "Not only that, he", $4f
|
||||
db "said the music on", $51
|
||||
db "my program is", $4f
|
||||
db "cool!", $51
|
||||
db "Oh, wow! Like,", $4f
|
||||
db "what should I do?", $51
|
||||
db "…Oops, I have to", $4f
|
||||
db "get ready for my", $51
|
||||
db "show! I'll catch", $4f
|
||||
db "you later!", $57
|
||||
; 0xa0fcf
|
||||
|
||||
UnknownText_0xa0fcf: ; 0xa0fcf
|
||||
db $0, "You know the", $4f
|
||||
db "receptionist at", $55
|
||||
db "the RADIO TOWER?", $51
|
||||
db "'Welcome,' is all", $4f
|
||||
db "she ever says.", $51
|
||||
db "But she's really", $4f
|
||||
db "the chattiest", $51
|
||||
db "person at the", $4f
|
||||
db "RADIO TOWER.", $51
|
||||
db "So she must be", $4f
|
||||
db "holding back.", $51
|
||||
db "Isn't that fun to", $4f
|
||||
db "know?", $51
|
||||
db "Catch you later!", $57
|
||||
; 0xa109d
|
||||
|
||||
UnknownText_0xa109d: ; 0xa109d
|
||||
db $0, "Tell me, ", $14, ".", $4f
|
||||
db "Have you ever won", $51
|
||||
db "a prize on the", $4f
|
||||
db "LUCKY NUMBER SHOW?", $51
|
||||
db "REED moans that", $4f
|
||||
db "he's never won, so", $51
|
||||
db "he vows to keep", $4f
|
||||
db "the show on the", $55
|
||||
db "air till he does.", $51
|
||||
db "Let's chat again!", $57
|
||||
; 0xa1143
|
||||
|
||||
UnknownText_0xa1143: ; 0xa1143
|
||||
db $0, "You know, last", $4f
|
||||
db "night…", $51
|
||||
db "I was so stressed", $4f
|
||||
db "out from work, I", $51
|
||||
db "ate a ton of junk", $4f
|
||||
db "food!", $51
|
||||
db "MARY and I have", $4f
|
||||
db "this deal about", $55
|
||||
db "losing weight…", $51
|
||||
db "This won't do…", $51
|
||||
db "Huh? What's the", $4f
|
||||
db "weight?", $51
|
||||
db "This has to be a", $4f
|
||||
db "total secret!", $51
|
||||
db "MARY weighs…", $51
|
||||
db "Aiyee! M-MARY!", $51
|
||||
db "Uh… Um… I… Sorry,", $4f
|
||||
db "wrong number!", $57
|
||||
; 0xa1244
|
||||
|
||||
UnknownText_0xa1244: ; 0xa1244
|
||||
db $0, "Yesterday, PROF.", $4f
|
||||
db "OAK was in the", $51
|
||||
db "studio to tape his", $4f
|
||||
db "show.", $51
|
||||
db "So I went over and", $4f
|
||||
db "introduced myself.", $51
|
||||
db "Get this--he tunes", $4f
|
||||
db "in to my program!", $51
|
||||
db "Oh! Here comes", $4f
|
||||
db "PROF.OAK again!", $51
|
||||
db "I'm going to chat", $4f
|
||||
db "him up again!", $51
|
||||
db "Catch you later!", $57
|
||||
; 0xa1318
|
||||
|
||||
UnknownText_0xa1318: ; 0xa1318
|
||||
db $0, "…Cough, cough!", $51
|
||||
db "Uhm sorry uh got", $4f
|
||||
db "uh code dite now.", $51
|
||||
db "Buh uma pro so uh", $4f
|
||||
db "hav to cover id ub", $51
|
||||
db "so no un notice", $4f
|
||||
db "while uhm on air.", $51
|
||||
db "Uh fidz muh voice", $4f
|
||||
db "now.", $51
|
||||
db "I'll catch you on", $4f
|
||||
db "the fly. This has", $55
|
||||
db "been BUENA!", $57
|
||||
; 0xa13d8
|
||||
|
||||
UnknownText_0xa13d8: ; 0xa13d8
|
||||
db $0, "Hey, ", $14, ".", $4f
|
||||
db "You won that RADIO", $51
|
||||
db "CARD by beating", $4f
|
||||
db "the quiz at the", $51
|
||||
db "reception desk,", $4f
|
||||
db "didn't you?", $51
|
||||
db "Guess what? I made", $4f
|
||||
db "up the questions!", $51
|
||||
db "…Were they too", $4f
|
||||
db "easy for you?", $51
|
||||
db "Well, let's chat", $4f
|
||||
db "again!", $57
|
||||
; 0xa1488
|
||||
|
||||
UnknownText_0xa1488: ; 0xa1488
|
||||
db $0, "I'm elated that", $4f
|
||||
db "more people are", $51
|
||||
db "taking part in my", $4f
|
||||
db "PASSWORD show.", $51
|
||||
db "But when PIKACHU", $4f
|
||||
db "was the password,", $51
|
||||
db "it was uh… whew…", $4f
|
||||
db "overwhelming.", $51
|
||||
db "FAN CLUB people", $4f
|
||||
db "came in out in", $51
|
||||
db "droves, shouting", $4f
|
||||
db "'PIKACHU!' over", $51
|
||||
db "and over. I mean,", $4f
|
||||
db "they were loud.", $51
|
||||
db "Anyone tuning in", $4f
|
||||
db "around then must", $51
|
||||
db "have been shocked", $4f
|
||||
db "by the racket!", $51
|
||||
db "Anyway, back to", $4f
|
||||
db "work for me!", $51
|
||||
db "Let's chat again!", $57
|
||||
; 0xa15de
|
||||
|
||||
UnknownText_0xa15de: ; 0xa15de
|
||||
db $0, "Guess what?", $4f
|
||||
db "The RADIO TOWER's", $51
|
||||
db "DIRECTOR is a big", $4f
|
||||
db "fan of TV!", $51
|
||||
db "A while ago, a", $4f
|
||||
db "fashion show on TV", $51
|
||||
db "said that black", $4f
|
||||
db "suits were in.", $51
|
||||
db "Now all he wears", $4f
|
||||
db "are black suits.", $51
|
||||
db "But it's a secret", $4f
|
||||
db "that our DIRECTOR", $51
|
||||
db "is a TV fan, so if", $4f
|
||||
db "you see him, don't", $51
|
||||
db "you dare mention", $4f
|
||||
db "it!", $51
|
||||
db "Oh! The DIRECTOR", $4f
|
||||
db "will be here soon!", $51
|
||||
db "Later! Tune into", $4f
|
||||
db "my show!", $57
|
||||
; 0xa1717
|
||||
|
||||
UnknownText_0xa1717: ; 0xa1717
|
||||
db $0, $14, ", tell me.", $51
|
||||
db "When do you relax", $4f
|
||||
db "the most?", $51
|
||||
db "For me, it has to", $4f
|
||||
db "be in the studio", $51
|
||||
db "right after my", $4f
|
||||
db "show, enjoying a", $51
|
||||
db "nice cup of tea.", $4f
|
||||
db "It's so pleasant", $51
|
||||
db "that it gradually", $4f
|
||||
db "makes me drowsy…", $51
|
||||
db $56, " ", $56, " ", $56, $51
|
||||
db $56, " ", $56, " ", $56, "Zzz", $51
|
||||
db "Oops, I drifted", $4f
|
||||
db "off just thinking", $51
|
||||
db "about it! How, uh…", $4f
|
||||
db "embarrassing!", $51
|
||||
db "Please forget this", $4f
|
||||
db "happened! Later!", $57
|
||||
; 0xa183d
|
||||
|
||||
UnknownText_0xa183d: ; 0xa183d
|
||||
db $0, $14, ", what was", $4f
|
||||
db "the first #MON", $55
|
||||
db "you ever caught?", $51
|
||||
db "…Oh, really?", $51
|
||||
db "I've seen lots of", $4f
|
||||
db "#MON around,", $51
|
||||
db "but I've never", $4f
|
||||
db "caught one.", $51
|
||||
db "I should give it a", $4f
|
||||
db "try sometime.", $51
|
||||
db "Did you know that", $4f
|
||||
db "the first #MON", $51
|
||||
db "MARY caught was a", $4f
|
||||
db "DROWZEE?", $51
|
||||
db "Isn't that so out", $4f
|
||||
db "of character?", $51
|
||||
db "But MARY's DROWZEE", $4f
|
||||
db "kept making her", $51
|
||||
db "fall asleep on the", $4f
|
||||
db "job, so she traded", $51
|
||||
db "with a fan for a", $4f
|
||||
db "MEOWTH.", $51
|
||||
db "Let's chat about", $4f
|
||||
db "#MON again!", $51
|
||||
db "Bye-bye!", $57
|
||||
; 0xa19b1
|
||||
|
||||
UnknownText_0xa19b1: ; 0xa19b1
|
||||
db $0, "Guess what? All of", $4f
|
||||
db "us from the RADIO", $51
|
||||
db "TOWER are going on", $4f
|
||||
db "a company vacation", $51
|
||||
db "to the RADIO TOWER", $4f
|
||||
db "in LAVENDER.", $51
|
||||
db "We're wasting our", $4f
|
||||
db "vacation on a trip", $51
|
||||
db "to another RADIO", $4f
|
||||
db "TOWER?", $51
|
||||
db "I'd much rather go", $4f
|
||||
db "to the beach!", $51
|
||||
db $14, ", I hope", $4f
|
||||
db "you have enough", $51
|
||||
db "fun for both of us", $4f
|
||||
db "on your journey!", $51
|
||||
db "Bye-bye!", $57
|
||||
; 0xa1ac0
|
||||
|
||||
UnknownText_0xa1ac0: ; 0xa1ac0
|
||||
db $0, "Did you know…?", $51
|
||||
db "BEN and FERN talk", $4f
|
||||
db "on the phone for", $51
|
||||
db "hours about what", $4f
|
||||
db "#MON music they", $51
|
||||
db "should play on", $4f
|
||||
db "different days of", $55
|
||||
db "the week.", $51
|
||||
db "One time, FERN's", $4f
|
||||
db "rapping style kind", $51
|
||||
db "of rubbed off on", $4f
|
||||
db "BEN weirdly.", $51
|
||||
db "So we ended up", $4f
|
||||
db "enduring BEN's", $51
|
||||
db "silly, chilly, a", $4f
|
||||
db "willy-nilly jive-", $55
|
||||
db "talking shtick for", $55
|
||||
db "a while.", $51
|
||||
db "Let's chat again!", $57
|
||||
; 0xa1bed
|
||||
|
||||
UnknownText_0xa1bed: ; 0xa1bed
|
||||
db $0, "I'm going shopping", $4f
|
||||
db "with MARY and LILY", $55
|
||||
db "soon.", $51
|
||||
db "It'll be great if", $4f
|
||||
db "GOLDENROD DEPT.", $51
|
||||
db "STORE has a sale", $4f
|
||||
db "on when we go…", $51
|
||||
db $14, ", maybe we", $4f
|
||||
db "can hook up too!", $51
|
||||
db "Catch you later!", $57
|
||||
; 0xa1c88
|
||||
|
||||
UnknownText_0xa1c88: ; 0xa1c88
|
||||
db $0, "I'm thinking of", $4f
|
||||
db "going to the GAME", $51
|
||||
db "CORNER tomorrow.", $4f
|
||||
db "It's been a while.", $51
|
||||
db "You see, I have my", $4f
|
||||
db "favorite machine…", $51
|
||||
db "It pays out a lot,", $4f
|
||||
db "I kid you not!", $51
|
||||
db "Huh? Nuh-uh, it's", $4f
|
||||
db "my secret!", $51
|
||||
db "You have to find", $4f
|
||||
db "it yourself!", $51
|
||||
db "Catch you later!", $57
|
||||
; 0xa1d5f
|
||||
|
||||
UnknownText_0xa1d5f: ; 0xa1d5f
|
||||
db $0, "Hey, ", $14, ". You", $4f
|
||||
db "use your #GEAR", $51
|
||||
db "to listen to the", $4f
|
||||
db "radio, right?", $51
|
||||
db "I heard that you", $4f
|
||||
db "can even display", $51
|
||||
db "town maps with", $4f
|
||||
db "#GEAR.", $51
|
||||
db "I have a bad sense", $4f
|
||||
db "of direction, so", $51
|
||||
db "#GEAR would be", $4f
|
||||
db "handy…", $51
|
||||
db "Anyway, thanks for", $4f
|
||||
db "calling! Later!", $57
|
||||
; 0xa1e2f
|
||||
|
||||
UnknownText_0xa1e2f: ; 0xa1e2f
|
||||
db $0, "Is it sunny", $4f
|
||||
db "outside today?", $51
|
||||
db "When you're cooped", $4f
|
||||
db "up in the RADIO", $51
|
||||
db "TOWER as much as I", $4f
|
||||
db "am, you lose touch", $51
|
||||
db "with the outside.", $4f
|
||||
db "It can be boring.", $51
|
||||
db "Please call again!", $57
|
||||
; 0xa1eca
|
||||
|
Loading…
Reference in New Issue
Block a user