diff options
author | xCrystal <rgr.crystal@gmail.com> | 2016-03-06 19:07:12 +0100 |
---|---|---|
committer | xCrystal <rgr.crystal@gmail.com> | 2016-03-06 19:07:12 +0100 |
commit | c586a533e696cb6c9493d8077c9d6a52c043a844 (patch) | |
tree | 59cb495d77a6c768465bc9055ad665c0a760536e /src | |
parent | 102fa38ab095c26b49a23a1e75e3b2087d131541 (diff) |
allocate text engine ram addresses
Diffstat (limited to 'src')
-rwxr-xr-x | src/engine/bank1.asm | 6 | ||||
-rwxr-xr-x | src/engine/bank2.asm | 16 | ||||
-rwxr-xr-x | src/engine/bank6.asm | 4 | ||||
-rwxr-xr-x | src/engine/home.asm | 8 | ||||
-rwxr-xr-x | src/wram.asm | 31 |
5 files changed, 40 insertions, 25 deletions
diff --git a/src/engine/bank1.asm b/src/engine/bank1.asm index 1ddf2dd..65e06f8 100755 --- a/src/engine/bank1.asm +++ b/src/engine/bank1.asm @@ -532,7 +532,7 @@ OpenBattleAttackMenu: ; 46fc (1:46fc) add a ld e, a ld d, $00 - ld hl, DuelAttackPointerTable + ld hl, wDuelCardOrAttackList add hl, de ld d, [hl] inc hl @@ -664,7 +664,7 @@ LoadPokemonAttacksToDuelPointerTable: ; 4823 (1:4823) call LoadDeckCardToBuffer1 ld c, $00 ld b, $0d - ld hl, DuelAttackPointerTable + ld hl, wDuelCardOrAttackList xor a ld [$cbc7], a ld de, wCardBuffer1Move1Name @@ -697,7 +697,7 @@ LoadPokemonAttacksToDuelPointerTable: ; 4823 (1:4823) push hl push bc ld e, b - ld hl, $cc47 + ld hl, wCardBuffer1Move2Name call $5c33 pop bc pop hl diff --git a/src/engine/bank2.asm b/src/engine/bank2.asm index 4c9900b..5c36476 100755 --- a/src/engine/bank2.asm +++ b/src/engine/bank2.asm @@ -267,7 +267,7 @@ Func_8f38: ; 8f38 (2:4f38) ld h, [hl] call DisableExtRAM ld l, a - ld de, $c590 + ld de, wc590 call Func_0663 ld hl, $cfb9 ld [hl], $6 @@ -665,12 +665,12 @@ Unknown_9242: ; 9242 (2:5242) INCBIN "baserom.gbc",$9242,$9253 - $9242 Func_9253: ; 9253 (2:5253) - ld de, $c590 + ld de, wc590 call Func_92ad - ld hl, $c590 + ld hl, wc590 call Func_23c1 ld b, $0 - ld hl, $c590 + ld hl, wc590 add hl, bc ld d, h ld e, l @@ -684,19 +684,19 @@ Func_926e: ; 926e (2:526e) pop hl jr c, .asm_929c push de - ld de, $c590 + ld de, wc590 call Func_92b4 - ld hl, $c590 + ld hl, wc590 call Func_23c1 ld b, $0 - ld hl, $c590 + ld hl, wc590 add hl, bc ld d, h ld e, l ld hl, Unknown_92a7 call Func_92ad pop de - ld hl, $c590 + ld hl, wc590 call Func_22ae call Func_21c5 or a diff --git a/src/engine/bank6.asm b/src/engine/bank6.asm index 54dea48..63497e7 100755 --- a/src/engine/bank6.asm +++ b/src/engine/bank6.asm @@ -71,7 +71,7 @@ Func_199e0: ; 199e0 (6:59e0) pop hl call EnableExtRAM push hl - ld de, $c590 + ld de, wc590 .asm_199f3 ld a, [de] inc de @@ -103,7 +103,7 @@ Func_19a12: ; 19a12 (6:5a12) ld a, [hli] ld h, [hl] ld l, a - ld de, $c590 + ld de, wc590 call PrintTextBoxBorderLabel ret ; 0x19a1f diff --git a/src/engine/home.asm b/src/engine/home.asm index 48a2fb2..4c64ed1 100755 --- a/src/engine/home.asm +++ b/src/engine/home.asm @@ -3729,7 +3729,7 @@ Func_2275: ; 2275 (0:2275) ld [wcd06], a ld a, $80 ld [wcd07], a - ld hl, $c600 + ld hl, wc600 .asm_2292 xor a ld [hl], a @@ -4517,7 +4517,7 @@ Func_2a44: ; 2a44 (0:2a44) ld a, l or h jp nz, PrintTextNoDelay - ld hl, $c590 + ld hl, wc590 jp Func_21c5 DrawWideTextBox_PrintText: ; 2a59 (0:2a59) @@ -4987,7 +4987,7 @@ Func_2d43: ; 2d43 (0:2d43) call Func_2cd7 jr Func_2d43 .asm_2dab - ld hl, $c590 + ld hl, wc590 call Func_2cd7 jr Func_2d43 .asm_2db3 @@ -5099,7 +5099,7 @@ PrintText: ; 2e41 (0:2e41) call BankswitchHome ret .fromRAM - ld hl, $c590 + ld hl, wc590 .printText call Func_2cc8 .nextTileLoop diff --git a/src/wram.asm b/src/wram.asm index 54c62eb..bdfe262 100755 --- a/src/wram.asm +++ b/src/wram.asm @@ -191,11 +191,28 @@ wOpponentDeck:: ; c480 ds $80 ds $10 -; when the attack menu opens, it stores -; each move in the order of -; cardNumber, moveNumber, ... -DuelAttackPointerTable:: ; c510 - ds $4f0 +; this holds a list of cards (e.g. in hand or in bench) or the attack list of a pokemon card +wDuelCardOrAttackList:: ; c510 + ds $80 + +; this appears to be kept updated with some default text that is used +; when the text printing functions are called with text id $0000 +wc590:: ; c590 + ds $70 + +;--- Text engine ------------------------------------------ + +wc600:: ; c600 + ds $100 + +wc700:: ; c700 + ds $100 + +wc800:: ; c800 + ds $100 + +wc900:: ; c900 + ds $100 ;--- Engine ----------------------------------------------- @@ -431,9 +448,7 @@ wDuelTheme:: ; cc1a ds $1 ds $9 -; wCardBuffer1 and wCardBuffer2 hold the data of a player's or opponent's card. -; Can be data from a card on either side of the field or hand, or from a card in the bench, depending on the duel state. -; Sometimes the two buffers even hold the same card's data. +; Used as temporary storage for a loaded card's data wCardBuffer1:: ; cc24 card_data_struct wCardBuffer1 |