Text engine

This commit is contained in:
pikalaxalt
2016-06-16 20:24:55 -04:00
parent fd4792ae5b
commit 08fdc6d07c
9 changed files with 435 additions and 1292 deletions
+32 -9
View File
@@ -21,9 +21,8 @@ INCLUDE "home/serial.asm"
INCLUDE "home/joypad.asm"
INCLUDE "home/decompress.asm"
INCLUDE "home/palettes.asm"
Functiond70::
dr $d70, $1458
INCLUDE "home/copy.asm"
INCLUDE "home/text.asm"
UpdateBGMapBuffer::
dr $1458, $14bb
@@ -41,7 +40,10 @@ Function162b::
dr $162b, $1642
Function1642::
dr $1642, $1eb3
dr $1642, $196f
UpdateSprites::
dr $196f, $1eb3
PrinterReceive::
dr $1eb3, $1ebf
@@ -68,7 +70,10 @@ Function30ff::
dr $30ff, $311a
CopyBytes::
dr $311a, $314c
dr $311a, $313c
GetFarHalfword::
dr $313c, $314c
ByteFill::
dr $314c, $3158
@@ -94,12 +99,30 @@ ReloadTilesFromBuffer_::
jp CopyBytes
Function317b::
dr $317b, $344c
dr $317b, $31e2
Function344c::
dr $344c, $3564
Function31e2::
dr $31e2, $323d
PrintNum::
dr $323d, $344c
WaitBGMap::
dr $344c, $3472
ApplyTilemap::
dr $3472, $3564
Function3564::
dr $3564, $3d4f
dr $3564, $35b9
GetWeekday::
dr $35b9, $39f9
PlayCry::
dr $39f9, $3ade
PrintBCDNumber::
dr $3ade, $3d4f
INCLUDE "home/audio.asm"
+5 -2
View File
@@ -1,5 +1,8 @@
DisableAudio::
dr $3d4f, $3e24
PlaySound::
dr $3e24, $3fee
PlaySFX::
dr $3e24, $3e56
WaitSFX::
dr $3e56, $3fee
+93 -289
View File
@@ -1,151 +1,49 @@
; Functions to copy data from ROM.
Get2bpp_2:: ; dc9
ld a, [rLCDC]
bit 7, a
jp z, Copy2bpp
ld a, [hROMBank]
push af
ld a, BANK(_Get2bpp)
rst Bankswitch
call _Get2bpp
pop af
rst Bankswitch
ret
; ddc
Get1bpp_2:: ; ddc
ld a, [rLCDC]
bit 7, a
jp z, Copy1bpp
ld a, [hROMBank]
push af
ld a, BANK(_Get1bpp)
rst Bankswitch
call _Get1bpp
pop af
rst Bankswitch
ret
; def
FarCopyBytesDouble_DoubleBankSwitch:: ; def
ld [hBuffer], a
ld a, [hROMBank]
push af
ld a, [hBuffer]
rst Bankswitch
call FarCopyBytesDouble
pop af
rst Bankswitch
ret
; dfd
OldDMATransfer:: ; dfd
dec c
ld a, [hBGMapMode]
push af
xor a
ld [hBGMapMode], a
Functiond70:: ; d70 (0:0d70)
ld b, a
ld a, [hROMBank]
push af
ld a, b
rst Bankswitch
.loop
; load the source and target MSB and LSB
ld a, d
ld [rHDMA1], a ; source MSB
ld a, e
and $f0
ld [rHDMA2], a ; source LSB
ld a, h
and $1f
ld [rHDMA3], a ; target MSB
ld a, l
and $f0
ld [rHDMA4], a ; target LSB
; stop when c < 8
ld a, c
cp $8
jr c, .done
; decrease c by 8
sub $8
ld c, a
; DMA transfer state
ld a, $f
ld [hDMATransfer], a
call DelayFrame
; add $100 to hl and de
ld a, l
add $100 % $100
ld l, a
ld a, h
adc $100 / $100
ld h, a
ld a, e
add $100 % $100
ld e, a
ld a, d
adc $100 / $100
ld d, a
jr .loop
ld a, BANK(sDecompressBuffer)
call OpenSRAM
ld hl, sDecompressBuffer
ld bc, 7 * 7 * $10
xor a
call ByteFill
.done
ld a, c
and $7f ; pretty silly, considering at most bits 0-2 would be set
ld [hDMATransfer], a
call DelayFrame
ld hl, wcf3c
ld a, [hli]
ld h, [hl]
ld l, a
ld de, sDecompressBuffer
call Decompress
call CloseSRAM
pop af
rst Bankswitch
pop af
ld [hBGMapMode], a
ret
; e4a
ReplaceKrisSprite:: ; e4a
callba _ReplaceKrisSprite
Functiond97::
callba Function1413c
ret
; e51
LoadStandardFont:: ; e51
callba _LoadStandardFont
Functiond9e::
callba Functionf8000
ret
; e58
LoadFontsBattleExtra:: ; e58
callba _LoadFontsBattleExtra
Functionda5::
callba Functionf8032
ret
; e5f
LoadFontsExtra:: ; e5f
callba _LoadFontsExtra1
callba _LoadFontsExtra2
Functiondac::
callba Functionf800c
ret
; e6c
LoadFontsExtra2:: ; e6c
callba _LoadFontsExtra2
ret
; e73
DecompressRequest2bpp:: ; e73
DecompressRequest2bpp::
push de
ld a, BANK(sScratch)
call GetSRAMBank
call OpenSRAM
push bc
ld de, sScratch
@@ -159,236 +57,134 @@ DecompressRequest2bpp:: ; e73
call Request2bpp
call CloseSRAM
ret
; e8d
FarCopyBytes:: ; e8d
; copy bc bytes from a:hl to de
ld [hBuffer], a
FarCopyBytes:: ; dcd (0:0dcd)
ld [wBuffer], a
ld a, [hROMBank]
push af
ld a, [hBuffer]
ld a, [wBuffer]
rst Bankswitch
call CopyBytes
pop af
rst Bankswitch
ret
; 0xe9b
FarCopyBytesDouble:: ; e9b
; Copy bc bytes from a:hl to bc*2 bytes at de,
; doubling each byte in the process.
ld [hBuffer], a
FarCopyBytesDouble:: ; ddd (0:0ddd)
ld [wBuffer], a
ld a, [hROMBank]
push af
ld a, [hBuffer]
ld a, [wBuffer]
rst Bankswitch
; switcheroo, de <> hl
ld a, h
ld h, d
ld d, a
ld a, l
ld l, e
ld e, a
inc b
inc c
jr .dec
jr .enter_loop
.loop
.copy
ld a, [de]
inc de
rept 2
ld [hli], a
endr
.dec
ld [hli], a
.enter_loop
dec c
jr nz, .loop
jr nz, .copy
dec b
jr nz, .loop
jr nz, .copy
pop af
rst Bankswitch
ret
; 0xeba
Request2bpp:: ; eba
; Load 2bpp at b:de to occupy c tiles of hl.
Request2bpp:: ; dfe (0:0dfe)
ld a, [hBGMapMode]
push af
xor a
ld [hBGMapMode], a
ld a, [hROMBank]
push af
ld a, b
rst Bankswitch
ld a, [hTilesPerCycle]
push af
ld a, $8
ld [hTilesPerCycle], a
ld a, [wLinkMode]
cp LINK_MOBILE
jr nz, .NotMobile
ld a, [hMobile]
and a
jr nz, .NotMobile
ld a, $6
ld [hTilesPerCycle], a
.NotMobile
ld a, e
ld [Requested2bppSource], a
ld [wRequested2bppSource], a
ld a, d
ld [Requested2bppSource + 1], a
ld [wRequested2bppSource + 1], a
ld a, l
ld [Requested2bppDest], a
ld [wRequested2bppDest], a
ld a, h
ld [Requested2bppDest + 1], a
.loop
ld [wRequested2bppDest + 1], a
.check
ld a, c
ld hl, hTilesPerCycle
cp [hl]
jr nc, .iterate
ld [Requested2bpp], a
.wait
cp $8 ; TilesPerCycle
jr nc, .cycle
ld [wRequested2bpp], a
call DelayFrame
ld a, [Requested2bpp]
and a
jr nz, .wait
pop af
ld [hTilesPerCycle], a
pop af
rst Bankswitch
pop af
ld [hBGMapMode], a
ret
.iterate
ld a, [hTilesPerCycle]
ld [Requested2bpp], a
.wait2
.cycle
ld a, $8 ; TilesPerCycle
ld [wRequested2bpp], a
call DelayFrame
ld a, [Requested2bpp]
and a
jr nz, .wait2
ld a, c
ld hl, hTilesPerCycle
sub [hl]
sub $8 ; TilesPerCycle
ld c, a
jr .loop
; f1e
jr .check
Request1bpp:: ; f1e
; Load 1bpp at b:de to occupy c tiles of hl.
Request1bpp:: ; e38 (0:0e38)
ld a, [hBGMapMode]
push af
xor a
ld [hBGMapMode], a
ld a, [hROMBank]
push af
ld a, b
rst Bankswitch
ld a, [hTilesPerCycle]
push af
ld a, $8
ld [hTilesPerCycle], a
ld a, [wLinkMode]
cp LINK_MOBILE
jr nz, .NotMobile
ld a, [hMobile]
and a
jr nz, .NotMobile
ld a, $6
ld [hTilesPerCycle], a
.NotMobile
ld a, e
ld [Requested1bppSource], a
ld [wRequested1bppSource], a
ld a, d
ld [Requested1bppSource + 1], a
ld [wRequested1bppSource + 1], a
ld a, l
ld [Requested1bppDest], a
ld [wRequested1bppDest], a
ld a, h
ld [Requested1bppDest + 1], a
.loop
ld [wRequested1bppDest + 1], a
.check
ld a, c
ld hl, hTilesPerCycle
cp [hl]
jr nc, .iterate
ld [Requested1bpp], a
.wait
cp $8 ; TilesPerCycle
jr nc, .cycle
ld [wRequested1bpp], a
call DelayFrame
ld a, [Requested1bpp]
and a
jr nz, .wait
pop af
ld [hTilesPerCycle], a
pop af
rst Bankswitch
pop af
ld [hBGMapMode], a
ret
.iterate
ld a, [hTilesPerCycle]
ld [Requested1bpp], a
.wait2
.cycle
ld a, $8 ; TilesPerCycle
ld [wRequested1bpp], a
call DelayFrame
ld a, [Requested1bpp]
and a
jr nz, .wait2
ld a, c
ld hl, hTilesPerCycle
sub [hl]
sub $8 ; TilesPerCycle
ld c, a
jr .loop
; f82
jr .check
Get2bpp:: ; f82
Get2bpp::
ld a, [rLCDC]
bit 7, a
jp nz, Request2bpp
Copy2bpp:: ; f89
; copy c 2bpp tiles from b:de to hl
Copy2bpp::
push hl
ld h, d
ld l, e
pop de
; bank
ld a, b
; bc = c * $10
push af
swap c
ld a, $f
@@ -398,37 +194,45 @@ Copy2bpp:: ; f89
and c
ld c, a
pop af
jp FarCopyBytes
; f9d
Get1bpp:: ; f9d
Get1bpp::
ld a, [rLCDC]
bit 7, a
jp nz, Request1bpp
Copy1bpp:: ; fa4
; copy c 1bpp tiles from b:de to hl
Copy1bpp::
push de
ld d, h
ld e, l
; bank
ld a, b
; bc = c * $10 / 2
push af
ld h, 0
ld h, $0
ld l, c
rept 3
add hl, hl
endr
add hl, hl
add hl, hl
ld b, h
ld c, l
pop af
pop hl
jp FarCopyBytesDouble
; fb6
Functionea6::
ld a, [rLCDC]
add a
jp c, Request2bpp
Functioneac::
push de
push hl
ld a, b
ld h, $0
ld l, c
add hl, hl
add hl, hl
add hl, hl
add hl, hl
ld b, h
ld c, l
pop de
pop hl
jp FarCopyBytes
+1 -1
View File
@@ -16,7 +16,7 @@ FarDecompress:: ; b40
Decompress:: ; b50
; Pokemon Crystal uses an lz variant for compression.
; Pokemon Gold and Silver use an lz variant for compression.
; This is mainly (but not necessarily) used for graphics.
; This function decompresses lz-compressed data from hl to de.
+2 -2
View File
@@ -197,7 +197,7 @@ WaitButton::
push af
ld a, $1
ld [hOAMUpdate], a
call Function344c
call WaitBGMap
call JoyWaitAorB
pop af
ld [hOAMUpdate], a
@@ -271,7 +271,7 @@ ButtonSound::
call JoyWaitInput
push de
ld de, SFX_READ_TEXT_2
call PlaySound
call PlaySFX
pop de
ret
+1 -1
View File
@@ -181,7 +181,7 @@ ClearVBank1::
Functiond2a::
ld hl, wTileMap
ld de, wccd9
ld de, wAttrMap
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
.asm_d33
ld a, [hli]
+255 -524
View File
File diff suppressed because it is too large Load Diff
+14 -3
View File
@@ -38,7 +38,9 @@ Function14032:: ; 14032
StartClock:: ; 14089
dr $14089, $140ff
Function140ff:: ; 140ff
dr $140ff, $18000
dr $140ff, $1413c
Function1413c:: ; 413c
dr $1413c, $18000
SECTION "bank6", DATA, BANK[$6]
dr $18000, $1c000
@@ -50,6 +52,7 @@ SECTION "bank8", DATA, BANK[$8]
dr $20000, $24000
SECTION "bank9", DATA, BANK[$9]
StringBufferPointers::
dr $24000, $28000
SECTION "banka", DATA, BANK[$a]
@@ -65,7 +68,10 @@ SECTION "bankd", DATA, BANK[$d]
dr $34000, $38000
SECTION "banke", DATA, BANK[$e]
dr $38000, $3c000
dr $38000, $398f2
Battle_GetTrainerName:: ; 398f2
dr $398f2, $3c000
SECTION "bankf", DATA, BANK[$f]
dr $3c000, $40000
@@ -218,7 +224,12 @@ SECTION "bank3d", DATA, BANK[$3d]
dr $f4000, $f8000
SECTION "bank3e", DATA, BANK[$3e]
dr $f8000, $fc000
Functionf8000::
dr $f8000, $f800c
Functionf800c::
dr $f800c, $f8032
Functionf8032::
dr $f8032, $fc000
SECTION "bank3f", DATA, BANK[$3f]
dr $fc000, $100000
+32 -461
View File
@@ -199,6 +199,7 @@ wOAMBuffer:: ; c300
SECTION "TileMap", WRAM0
wTileMap:: ; c3a0
ds SCREEN_HEIGHT * SCREEN_WIDTH
wTileMapEnd:: ; c508
SECTION "Animated Objects", WRAM0
wTileMapBackup:: ; c508
@@ -1566,28 +1567,10 @@ wcaf2:: ds 1 ; caf2
wcaf3:: ds 1 ; caf3
wcaf4:: ds 1 ; caf4
wcaf5:: ds 1 ; caf5
wcaf6:: ds 1 ; caf6
wcaf7:: ds 1 ; caf7
wcaf8:: ds 1 ; caf8
wcaf9:: ds 1 ; caf9
wcafa:: ds 1 ; cafa
wcafb:: ds 1 ; cafb
wcafc:: ds 1 ; cafc
wcafd:: ds 1 ; cafd
wcafe:: ds 1 ; cafe
wcaff:: ds 1 ; caff
wcb00:: ds 1 ; cb00
wcb01:: ds 1 ; cb01
wcb02:: ds 1 ; cb02
wcb03:: ds 1 ; cb03
wcb04:: ds 1 ; cb04
wcb05:: ds 1 ; cb05
wcb06:: ds 1 ; cb06
wcb07:: ds 1 ; cb07
wcb08:: ds 1 ; cb08
wcb09:: ds 1 ; cb09
wcb0a:: ds 1 ; cb0a
wcb0b:: ds 1 ; cb0b
wEnemyMonNick:: ds PKMN_NAME_LENGTH ; caf6
wBattleMonNick:: ds PKMN_NAME_LENGTH ; cb01
wcb0c:: ds 1 ; cb0c
wcb0d:: ds 1 ; cb0d
wcb0e:: ds 1 ; cb0e
@@ -1628,17 +1611,9 @@ wcb30:: ds 1 ; cb30
wcb31:: ds 1 ; cb31
wcb32:: ds 1 ; cb32
wcb33:: ds 1 ; cb33
wcb34:: ds 1 ; cb34
wcb35:: ds 1 ; cb35
wcb36:: ds 1 ; cb36
wcb37:: ds 1 ; cb37
wcb38:: ds 1 ; cb38
wcb39:: ds 1 ; cb39
wcb3a:: ds 1 ; cb3a
wcb3b:: ds 1 ; cb3b
wcb3c:: ds 1 ; cb3c
wcb3d:: ds 1 ; cb3d
wcb3e:: ds 1 ; cb3e
wOTClassName:: ds NAME_LENGTH ; cb34
wcb3f:: ds 1 ; cb3f
wcb40:: ds 1 ; cb40
wcb41:: ds 1 ; cb41
@@ -2049,366 +2024,11 @@ wccd5:: ds 1 ; ccd5
wccd6:: ds 1 ; ccd6
wccd7:: ds 1 ; ccd7
wccd8:: ds 1 ; ccd8
wccd9:: ds 1 ; ccd9
wccda:: ds 1 ; ccda
wccdb:: ds 1 ; ccdb
wccdc:: ds 1 ; ccdc
wccdd:: ds 1 ; ccdd
wccde:: ds 1 ; ccde
wccdf:: ds 1 ; ccdf
wcce0:: ds 1 ; cce0
wcce1:: ds 1 ; cce1
wcce2:: ds 1 ; cce2
wcce3:: ds 1 ; cce3
wcce4:: ds 1 ; cce4
wcce5:: ds 1 ; cce5
wcce6:: ds 1 ; cce6
wcce7:: ds 1 ; cce7
wcce8:: ds 1 ; cce8
wcce9:: ds 1 ; cce9
wccea:: ds 1 ; ccea
wcceb:: ds 1 ; cceb
wccec:: ds 1 ; ccec
wcced:: ds 1 ; cced
wccee:: ds 1 ; ccee
wccef:: ds 1 ; ccef
wccf0:: ds 1 ; ccf0
wccf1:: ds 1 ; ccf1
wccf2:: ds 1 ; ccf2
wccf3:: ds 1 ; ccf3
wccf4:: ds 1 ; ccf4
wccf5:: ds 1 ; ccf5
wccf6:: ds 1 ; ccf6
wccf7:: ds 1 ; ccf7
wccf8:: ds 1 ; ccf8
wccf9:: ds 1 ; ccf9
wccfa:: ds 1 ; ccfa
wccfb:: ds 1 ; ccfb
wccfc:: ds 1 ; ccfc
wccfd:: ds 1 ; ccfd
wccfe:: ds 1 ; ccfe
wccff:: ds 1 ; ccff
wcd00:: ds 1 ; cd00
wcd01:: ds 1 ; cd01
wcd02:: ds 1 ; cd02
wcd03:: ds 1 ; cd03
wcd04:: ds 1 ; cd04
wcd05:: ds 1 ; cd05
wcd06:: ds 1 ; cd06
wcd07:: ds 1 ; cd07
wcd08:: ds 1 ; cd08
wcd09:: ds 1 ; cd09
wcd0a:: ds 1 ; cd0a
wcd0b:: ds 1 ; cd0b
wcd0c:: ds 1 ; cd0c
wcd0d:: ds 1 ; cd0d
wcd0e:: ds 1 ; cd0e
wcd0f:: ds 1 ; cd0f
wcd10:: ds 1 ; cd10
wcd11:: ds 1 ; cd11
wcd12:: ds 1 ; cd12
wcd13:: ds 1 ; cd13
wcd14:: ds 1 ; cd14
wcd15:: ds 1 ; cd15
wcd16:: ds 1 ; cd16
wcd17:: ds 1 ; cd17
wcd18:: ds 1 ; cd18
wcd19:: ds 1 ; cd19
wcd1a:: ds 1 ; cd1a
wcd1b:: ds 1 ; cd1b
wcd1c:: ds 1 ; cd1c
wcd1d:: ds 1 ; cd1d
wcd1e:: ds 1 ; cd1e
wcd1f:: ds 1 ; cd1f
wcd20:: ds 1 ; cd20
wcd21:: ds 1 ; cd21
wcd22:: ds 1 ; cd22
wcd23:: ds 1 ; cd23
wcd24:: ds 1 ; cd24
wcd25:: ds 1 ; cd25
wcd26:: ds 1 ; cd26
wcd27:: ds 1 ; cd27
wcd28:: ds 1 ; cd28
wcd29:: ds 1 ; cd29
wcd2a:: ds 1 ; cd2a
wcd2b:: ds 1 ; cd2b
wcd2c:: ds 1 ; cd2c
wcd2d:: ds 1 ; cd2d
wcd2e:: ds 1 ; cd2e
wcd2f:: ds 1 ; cd2f
wcd30:: ds 1 ; cd30
wcd31:: ds 1 ; cd31
wcd32:: ds 1 ; cd32
wcd33:: ds 1 ; cd33
wcd34:: ds 1 ; cd34
wcd35:: ds 1 ; cd35
wcd36:: ds 1 ; cd36
wcd37:: ds 1 ; cd37
wcd38:: ds 1 ; cd38
wcd39:: ds 1 ; cd39
wcd3a:: ds 1 ; cd3a
wcd3b:: ds 1 ; cd3b
wcd3c:: ds 1 ; cd3c
wcd3d:: ds 1 ; cd3d
wcd3e:: ds 1 ; cd3e
wcd3f:: ds 1 ; cd3f
wcd40:: ds 1 ; cd40
wcd41:: ds 1 ; cd41
wcd42:: ds 1 ; cd42
wcd43:: ds 1 ; cd43
wcd44:: ds 1 ; cd44
wcd45:: ds 1 ; cd45
wcd46:: ds 1 ; cd46
wcd47:: ds 1 ; cd47
wcd48:: ds 1 ; cd48
wcd49:: ds 1 ; cd49
wcd4a:: ds 1 ; cd4a
wcd4b:: ds 1 ; cd4b
wcd4c:: ds 1 ; cd4c
wcd4d:: ds 1 ; cd4d
wcd4e:: ds 1 ; cd4e
wcd4f:: ds 1 ; cd4f
wcd50:: ds 1 ; cd50
wcd51:: ds 1 ; cd51
wcd52:: ds 1 ; cd52
wcd53:: ds 1 ; cd53
wcd54:: ds 1 ; cd54
wcd55:: ds 1 ; cd55
wcd56:: ds 1 ; cd56
wcd57:: ds 1 ; cd57
wcd58:: ds 1 ; cd58
wcd59:: ds 1 ; cd59
wcd5a:: ds 1 ; cd5a
wcd5b:: ds 1 ; cd5b
wcd5c:: ds 1 ; cd5c
wcd5d:: ds 1 ; cd5d
wcd5e:: ds 1 ; cd5e
wcd5f:: ds 1 ; cd5f
wcd60:: ds 1 ; cd60
wcd61:: ds 1 ; cd61
wcd62:: ds 1 ; cd62
wcd63:: ds 1 ; cd63
wcd64:: ds 1 ; cd64
wcd65:: ds 1 ; cd65
wcd66:: ds 1 ; cd66
wcd67:: ds 1 ; cd67
wcd68:: ds 1 ; cd68
wcd69:: ds 1 ; cd69
wcd6a:: ds 1 ; cd6a
wcd6b:: ds 1 ; cd6b
wcd6c:: ds 1 ; cd6c
wcd6d:: ds 1 ; cd6d
wcd6e:: ds 1 ; cd6e
wcd6f:: ds 1 ; cd6f
wcd70:: ds 1 ; cd70
wcd71:: ds 1 ; cd71
wcd72:: ds 1 ; cd72
wcd73:: ds 1 ; cd73
wcd74:: ds 1 ; cd74
wcd75:: ds 1 ; cd75
wcd76:: ds 1 ; cd76
wcd77:: ds 1 ; cd77
wcd78:: ds 1 ; cd78
wcd79:: ds 1 ; cd79
wcd7a:: ds 1 ; cd7a
wcd7b:: ds 1 ; cd7b
wcd7c:: ds 1 ; cd7c
wcd7d:: ds 1 ; cd7d
wcd7e:: ds 1 ; cd7e
wcd7f:: ds 1 ; cd7f
wcd80:: ds 1 ; cd80
wcd81:: ds 1 ; cd81
wcd82:: ds 1 ; cd82
wcd83:: ds 1 ; cd83
wcd84:: ds 1 ; cd84
wcd85:: ds 1 ; cd85
wcd86:: ds 1 ; cd86
wcd87:: ds 1 ; cd87
wcd88:: ds 1 ; cd88
wcd89:: ds 1 ; cd89
wcd8a:: ds 1 ; cd8a
wcd8b:: ds 1 ; cd8b
wcd8c:: ds 1 ; cd8c
wcd8d:: ds 1 ; cd8d
wcd8e:: ds 1 ; cd8e
wcd8f:: ds 1 ; cd8f
wcd90:: ds 1 ; cd90
wcd91:: ds 1 ; cd91
wcd92:: ds 1 ; cd92
wcd93:: ds 1 ; cd93
wcd94:: ds 1 ; cd94
wcd95:: ds 1 ; cd95
wcd96:: ds 1 ; cd96
wcd97:: ds 1 ; cd97
wcd98:: ds 1 ; cd98
wcd99:: ds 1 ; cd99
wcd9a:: ds 1 ; cd9a
wcd9b:: ds 1 ; cd9b
wcd9c:: ds 1 ; cd9c
wcd9d:: ds 1 ; cd9d
wcd9e:: ds 1 ; cd9e
wcd9f:: ds 1 ; cd9f
wcda0:: ds 1 ; cda0
wcda1:: ds 1 ; cda1
wcda2:: ds 1 ; cda2
wcda3:: ds 1 ; cda3
wcda4:: ds 1 ; cda4
wcda5:: ds 1 ; cda5
wcda6:: ds 1 ; cda6
wcda7:: ds 1 ; cda7
wcda8:: ds 1 ; cda8
wcda9:: ds 1 ; cda9
wcdaa:: ds 1 ; cdaa
wcdab:: ds 1 ; cdab
wcdac:: ds 1 ; cdac
wcdad:: ds 1 ; cdad
wcdae:: ds 1 ; cdae
wcdaf:: ds 1 ; cdaf
wcdb0:: ds 1 ; cdb0
wcdb1:: ds 1 ; cdb1
wcdb2:: ds 1 ; cdb2
wcdb3:: ds 1 ; cdb3
wcdb4:: ds 1 ; cdb4
wcdb5:: ds 1 ; cdb5
wcdb6:: ds 1 ; cdb6
wcdb7:: ds 1 ; cdb7
wcdb8:: ds 1 ; cdb8
wcdb9:: ds 1 ; cdb9
wcdba:: ds 1 ; cdba
wcdbb:: ds 1 ; cdbb
wcdbc:: ds 1 ; cdbc
wcdbd:: ds 1 ; cdbd
wcdbe:: ds 1 ; cdbe
wcdbf:: ds 1 ; cdbf
wcdc0:: ds 1 ; cdc0
wcdc1:: ds 1 ; cdc1
wcdc2:: ds 1 ; cdc2
wcdc3:: ds 1 ; cdc3
wcdc4:: ds 1 ; cdc4
wcdc5:: ds 1 ; cdc5
wcdc6:: ds 1 ; cdc6
wcdc7:: ds 1 ; cdc7
wcdc8:: ds 1 ; cdc8
wcdc9:: ds 1 ; cdc9
wcdca:: ds 1 ; cdca
wcdcb:: ds 1 ; cdcb
wcdcc:: ds 1 ; cdcc
wcdcd:: ds 1 ; cdcd
wcdce:: ds 1 ; cdce
wcdcf:: ds 1 ; cdcf
wcdd0:: ds 1 ; cdd0
wcdd1:: ds 1 ; cdd1
wcdd2:: ds 1 ; cdd2
wcdd3:: ds 1 ; cdd3
wcdd4:: ds 1 ; cdd4
wcdd5:: ds 1 ; cdd5
wcdd6:: ds 1 ; cdd6
wcdd7:: ds 1 ; cdd7
wcdd8:: ds 1 ; cdd8
wcdd9:: ds 1 ; cdd9
wcdda:: ds 1 ; cdda
wcddb:: ds 1 ; cddb
wcddc:: ds 1 ; cddc
wcddd:: ds 1 ; cddd
wcdde:: ds 1 ; cdde
wcddf:: ds 1 ; cddf
wcde0:: ds 1 ; cde0
wcde1:: ds 1 ; cde1
wcde2:: ds 1 ; cde2
wcde3:: ds 1 ; cde3
wcde4:: ds 1 ; cde4
wcde5:: ds 1 ; cde5
wcde6:: ds 1 ; cde6
wcde7:: ds 1 ; cde7
wcde8:: ds 1 ; cde8
wcde9:: ds 1 ; cde9
wcdea:: ds 1 ; cdea
wcdeb:: ds 1 ; cdeb
wcdec:: ds 1 ; cdec
wcded:: ds 1 ; cded
wcdee:: ds 1 ; cdee
wcdef:: ds 1 ; cdef
wcdf0:: ds 1 ; cdf0
wcdf1:: ds 1 ; cdf1
wcdf2:: ds 1 ; cdf2
wcdf3:: ds 1 ; cdf3
wcdf4:: ds 1 ; cdf4
wcdf5:: ds 1 ; cdf5
wcdf6:: ds 1 ; cdf6
wcdf7:: ds 1 ; cdf7
wcdf8:: ds 1 ; cdf8
wcdf9:: ds 1 ; cdf9
wcdfa:: ds 1 ; cdfa
wcdfb:: ds 1 ; cdfb
wcdfc:: ds 1 ; cdfc
wcdfd:: ds 1 ; cdfd
wcdfe:: ds 1 ; cdfe
wcdff:: ds 1 ; cdff
wce00:: ds 1 ; ce00
wce01:: ds 1 ; ce01
wce02:: ds 1 ; ce02
wce03:: ds 1 ; ce03
wce04:: ds 1 ; ce04
wce05:: ds 1 ; ce05
wce06:: ds 1 ; ce06
wce07:: ds 1 ; ce07
wce08:: ds 1 ; ce08
wce09:: ds 1 ; ce09
wce0a:: ds 1 ; ce0a
wce0b:: ds 1 ; ce0b
wce0c:: ds 1 ; ce0c
wce0d:: ds 1 ; ce0d
wce0e:: ds 1 ; ce0e
wce0f:: ds 1 ; ce0f
wce10:: ds 1 ; ce10
wce11:: ds 1 ; ce11
wce12:: ds 1 ; ce12
wce13:: ds 1 ; ce13
wce14:: ds 1 ; ce14
wce15:: ds 1 ; ce15
wce16:: ds 1 ; ce16
wce17:: ds 1 ; ce17
wce18:: ds 1 ; ce18
wce19:: ds 1 ; ce19
wce1a:: ds 1 ; ce1a
wce1b:: ds 1 ; ce1b
wce1c:: ds 1 ; ce1c
wce1d:: ds 1 ; ce1d
wce1e:: ds 1 ; ce1e
wce1f:: ds 1 ; ce1f
wce20:: ds 1 ; ce20
wce21:: ds 1 ; ce21
wce22:: ds 1 ; ce22
wce23:: ds 1 ; ce23
wce24:: ds 1 ; ce24
wce25:: ds 1 ; ce25
wce26:: ds 1 ; ce26
wce27:: ds 1 ; ce27
wce28:: ds 1 ; ce28
wce29:: ds 1 ; ce29
wce2a:: ds 1 ; ce2a
wce2b:: ds 1 ; ce2b
wce2c:: ds 1 ; ce2c
wce2d:: ds 1 ; ce2d
wce2e:: ds 1 ; ce2e
wce2f:: ds 1 ; ce2f
wce30:: ds 1 ; ce30
wce31:: ds 1 ; ce31
wce32:: ds 1 ; ce32
wce33:: ds 1 ; ce33
wce34:: ds 1 ; ce34
wce35:: ds 1 ; ce35
wce36:: ds 1 ; ce36
wce37:: ds 1 ; ce37
wce38:: ds 1 ; ce38
wce39:: ds 1 ; ce39
wce3a:: ds 1 ; ce3a
wce3b:: ds 1 ; ce3b
wce3c:: ds 1 ; ce3c
wce3d:: ds 1 ; ce3d
wce3e:: ds 1 ; ce3e
wce3f:: ds 1 ; ce3f
wce40:: ds 1 ; ce40
wAttrMap:: ; ccd9
ds SCREEN_HEIGHT * SCREEN_WIDTH
wAttrMapEnd:: ; ce41
wce41:: ds 1 ; ce41
wce42:: ds 1 ; ce42
wce43:: ds 1 ; ce43
@@ -2445,16 +2065,15 @@ wce63:: ds 1 ; ce63
wce64:: ds 1 ; ce64
wce65:: ds 1 ; ce65
wce66:: ds 1 ; ce66
wce67:: ds 1 ; ce67
wce68:: ds 1 ; ce68
wce69:: ds 1 ; ce69
wce6a:: ds 1 ; ce6a
wce6b:: ds 1 ; ce6b
wce6c:: ds 1 ; ce6c
wce6d:: ds 1 ; ce6d
wce6e:: ds 1 ; ce6e
wce6f:: ds 1 ; ce6f
wce70:: ds 1 ; ce70
wRequested2bpp:: ds 1 ; ce67
wRequested2bppSource:: dw ; ce68
wRequested2bppDest:: dw ; ce6a
wRequested1bpp:: ds 1 ; ce6c
wRequested1bppSource:: dw ; ce6d
wRequested1bppDest:: dw ; ce6f
wce71:: ds 1 ; ce71
wce72:: ds 1 ; ce72
wce73:: ds 1 ; ce73
@@ -3059,7 +2678,7 @@ wd119:: ds 1 ; d119
wd11a:: ds 1 ; d11a
wd11b:: ds 1 ; d11b
wd11c:: ds 1 ; d11c
wd11d:: ds 1 ; d11d
wTrainerClass:: ds 1 ; d11d
wd11e:: ds 1 ; d11e
wd11f:: ds 1 ; d11f
wd120:: ds 1 ; d120
@@ -3116,7 +2735,7 @@ wd152:: ds 1 ; d152
wd153:: ds 1 ; d153
wd154:: ds 1 ; d154
wROMBankBackup:: ds 1
wd156:: ds 1 ; d156
wBuffer:: ds 1 ; d156
wd157:: ds 1 ; d157
wd158:: ds 1 ; d158
wd159:: ds 1 ; d159
@@ -3186,68 +2805,20 @@ wd198:: ds 1 ; d198
wd199:: ds 1 ; d199
wd19a:: ds 1 ; d19a
wd19b:: ds 1 ; d19b
wd19c:: ds 1 ; d19c
wTextBoxFlags:: ds 1 ; d19c
wd19d:: ds 1 ; d19d
wd19e:: ds 1 ; d19e
wd19f:: ds 1 ; d19f
wd1a0:: ds 1 ; d1a0
wd1a1:: ds 1 ; d1a1
wd1a2:: ds 1 ; d1a2
wd1a3:: ds 1 ; d1a3
wd1a4:: ds 1 ; d1a4
wd1a5:: ds 1 ; d1a5
wd1a6:: ds 1 ; d1a6
wd1a7:: ds 1 ; d1a7
wd1a8:: ds 1 ; d1a8
wd1a9:: ds 1 ; d1a9
wd1aa:: ds 1 ; d1aa
wd1ab:: ds 1 ; d1ab
wd1ac:: ds 1 ; d1ac
wd1ad:: ds 1 ; d1ad
wd1ae:: ds 1 ; d1ae
wd1af:: ds 1 ; d1af
wd1b0:: ds 1 ; d1b0
wd1b1:: ds 1 ; d1b1
wd1b2:: ds 1 ; d1b2
wd1b3:: ds 1 ; d1b3
wd1b4:: ds 1 ; d1b4
wd1b5:: ds 1 ; d1b5
wd1b6:: ds 1 ; d1b6
wd1b7:: ds 1 ; d1b7
wd1b8:: ds 1 ; d1b8
wd1b9:: ds 1 ; d1b9
wd1ba:: ds 1 ; d1ba
wd1bb:: ds 1 ; d1bb
wd1bc:: ds 1 ; d1bc
wd1bd:: ds 1 ; d1bd
wd1be:: ds 1 ; d1be
wd1bf:: ds 1 ; d1bf
wd1c0:: ds 1 ; d1c0
wd1c1:: ds 1 ; d1c1
wd1c2:: ds 1 ; d1c2
wd1c3:: ds 1 ; d1c3
wd1c4:: ds 1 ; d1c4
wd1c5:: ds 1 ; d1c5
wd1c6:: ds 1 ; d1c6
wd1c7:: ds 1 ; d1c7
wd1c8:: ds 1 ; d1c8
wd1c9:: ds 1 ; d1c9
wd1ca:: ds 1 ; d1ca
wd1cb:: ds 1 ; d1cb
wd1cc:: ds 1 ; d1cc
wd1cd:: ds 1 ; d1cd
wd1ce:: ds 1 ; d1ce
wd1cf:: ds 1 ; d1cf
wd1d0:: ds 1 ; d1d0
wd1d1:: ds 1 ; d1d1
wd1d2:: ds 1 ; d1d2
wd1d3:: ds 1 ; d1d3
wd1d4:: ds 1 ; d1d4
wd1d5:: ds 1 ; d1d5
wd1d6:: ds 1 ; d1d6
wd1d7:: ds 1 ; d1d7
wd1d8:: ds 1 ; d1d8
wd1d9:: ds 1 ; d1d9
wPlayersName:: ds NAME_LENGTH ; d1a3
wMomsName:: ds NAME_LENGTH ; d1ae
wRivalsName:: ds NAME_LENGTH ; d1b9
wRedsName:: ds NAME_LENGTH ; d1c4
wGreensName:: ds NAME_LENGTH ; d1cf
wd1da:: ds 1 ; d1da
wd1db:: ds 1 ; d1db
wd1dc:: ds 1 ; d1dc