diff options
author | YamaArashi <shadow962@live.com> | 2015-02-08 00:17:03 -0800 |
---|---|---|
committer | YamaArashi <shadow962@live.com> | 2015-02-08 00:17:03 -0800 |
commit | 1347023128e141dc4cfc71ee6bc689f909e96919 (patch) | |
tree | e9b5e0db057f8e912f479f7421144091458b2456 | |
parent | 72bbaed99f725b2b8b0d2653968042ce1625354c (diff) |
move-related things
-rwxr-xr-x | engine/battle/core.asm | 8 | ||||
-rwxr-xr-x | engine/battle/e.asm | 41 | ||||
-rwxr-xr-x | engine/evos_moves.asm | 2 | ||||
-rwxr-xr-x | engine/items/items.asm | 2 | ||||
-rwxr-xr-x | engine/items/tmhm.asm | 8 | ||||
-rwxr-xr-x | engine/items/tms.asm | 4 | ||||
-rwxr-xr-x | engine/learn_move.asm | 12 | ||||
-rwxr-xr-x | engine/menu/status_screen.asm | 10 | ||||
-rw-r--r-- | home.asm | 6 | ||||
-rwxr-xr-x | wram.asm | 15 |
10 files changed, 58 insertions, 50 deletions
diff --git a/engine/battle/core.asm b/engine/battle/core.asm index d51abb43..5c25e5b0 100755 --- a/engine/battle/core.asm +++ b/engine/battle/core.asm @@ -2533,14 +2533,14 @@ MoveSelectionMenu: ; 3d219 (f:5219) jr .regularmenu .loadmoves - ld de, wd0dc - ld bc, $4 + ld de, wMoves + ld bc, NUM_MOVES call CopyData - callab Func_39b87 + callab FormatMovesString ret .writemoves - ld de, wd0e1 + ld de, wMovesString ld a, [hFlags_0xFFF6] set 2, a ld [hFlags_0xFFF6], a diff --git a/engine/battle/e.asm b/engine/battle/e.asm index 5592702a..d60718cc 100755 --- a/engine/battle/e.asm +++ b/engine/battle/e.asm @@ -577,14 +577,15 @@ TrainerPicAndMoneyPointers: ; 39914 (e:5914) INCLUDE "text/trainer_names.asm" -Func_39b87: ; 39b87 (e:5b87) - ld hl, wd0dc - ld de, wd0e1 +; formats a string at wMovesString that lists the moves at wMoves +FormatMovesString: ; 39b87 (e:5b87) + ld hl, wMoves + ld de, wMovesString ld b, $0 -.asm_39b8f +.printMoveNameLoop ld a, [hli] - and a - jr z, .asm_39bc1 + and a ; end of move list? + jr z, .printDashLoop ; print dashes when no moves are left push hl ld [wd0b5], a ld a, BANK(MoveNames) @@ -593,38 +594,38 @@ Func_39b87: ; 39b87 (e:5b87) ld [W_LISTTYPE], a call GetName ld hl, wcd6d -.asm_39ba7 +.copyNameLoop ld a, [hli] cp $50 - jr z, .asm_39bb0 + jr z, .doneCopyingName ld [de], a inc de - jr .asm_39ba7 -.asm_39bb0 + jr .copyNameLoop +.doneCopyingName ld a, b ld [wcd6c], a inc b - ld a, $4e + ld a, $4e ; line break ld [de], a inc de pop hl ld a, b - cp $4 - jr z, .asm_39bd1 - jr .asm_39b8f -.asm_39bc1 + cp NUM_MOVES + jr z, .done + jr .printMoveNameLoop +.printDashLoop ld a, "-" ld [de], a inc de inc b ld a, b - cp $4 - jr z, .asm_39bd1 - ld a, $4e + cp NUM_MOVES + jr z, .done + ld a, $4e ; line break ld [de], a inc de - jr .asm_39bc1 -.asm_39bd1 + jr .printDashLoop +.done ld a, "@" ld [de], a ret diff --git a/engine/evos_moves.asm b/engine/evos_moves.asm index 2eef7ba7..86b49d30 100755 --- a/engine/evos_moves.asm +++ b/engine/evos_moves.asm @@ -364,7 +364,7 @@ LearnMoveFromLevelUp: ; 3af5b (e:6f5b) dec b jr nz, .checkCurrentMovesLoop ld a, d - ld [wd0e0], a + ld [wMoveNum], a ld [wd11e], a call GetMoveName call CopyStringToCF4B diff --git a/engine/items/items.asm b/engine/items/items.asm index aaee9403..c9b1aead 100755 --- a/engine/items/items.asm +++ b/engine/items/items.asm @@ -2084,7 +2084,7 @@ ItemUseTMHM: ; e479 (3:6479) ld [wd11e],a predef TMToMove ; get move ID from TM/HM ID ld a,[wd11e] - ld [wd0e0],a + ld [wMoveNum],a call GetMoveName call CopyStringToCF4B ; copy name to wcf4b pop af diff --git a/engine/items/tmhm.asm b/engine/items/tmhm.asm index 01a48ebb..0fcc5710 100755 --- a/engine/items/tmhm.asm +++ b/engine/items/tmhm.asm @@ -1,12 +1,12 @@ -; checks if the mon in wWhichPokemon already knows the move in wd0e0 +; checks if the mon in [wWhichPokemon] already knows the move in [wMoveNum] CheckIfMoveIsKnown: ; 2fe18 (b:7e18) ld a, [wWhichPokemon] ld hl, wPartyMon1Moves - ld bc, $2c + ld bc, wPartyMon2 - wPartyMon1 call AddNTimes - ld a, [wd0e0] + ld a, [wMoveNum] ld b, a - ld c, $4 ; nubmer of moves + ld c, NUM_MOVES .loop ld a, [hli] cp b diff --git a/engine/items/tms.asm b/engine/items/tms.asm index ef427860..511aab5b 100755 --- a/engine/items/tms.asm +++ b/engine/items/tms.asm @@ -1,11 +1,11 @@ -; tests if mon [wcf91] can learn move [wd0e0] +; tests if mon [wcf91] can learn move [wMoveNum] CanLearnTM: ; 1373e (4:773e) ld a, [wcf91] ld [wd0b5], a call GetMonHeader ld hl, W_MONHLEARNSET push hl - ld a, [wd0e0] + ld a, [wMoveNum] ld b, a ld c, $0 ld hl, TechnicalMachines diff --git a/engine/learn_move.asm b/engine/learn_move.asm index c991058d..75056edb 100755 --- a/engine/learn_move.asm +++ b/engine/learn_move.asm @@ -36,7 +36,7 @@ DontAbandonLearning: ; 6e5b (1:6e5b) pop de pop hl .asm_6e8b - ld a, [wd0e0] + ld a, [wMoveNum] ld [hl], a ld bc, $15 add hl, bc @@ -64,7 +64,7 @@ DontAbandonLearning: ; 6e5b (1:6e5b) ld h, d ld l, e ld de, wBattleMonMoves - ld bc, $4 + ld bc, NUM_MOVES call CopyData ld bc, $11 add hl, bc @@ -111,10 +111,10 @@ TryingToLearn: ; 6f07 (1:6f07) ld bc, $fffc add hl, bc push hl - ld de, wd0dc - ld bc, $4 + ld de, wMoves + ld bc, NUM_MOVES call CopyData - callab Func_39b87 + callab FormatMovesString pop hl .asm_6f39 push hl @@ -125,7 +125,7 @@ TryingToLearn: ; 6f07 (1:6f07) ld c, $e call TextBoxBorder hlCoord 6, 8 - ld de, wd0e1 + ld de, wMovesString ld a, [hFlags_0xFFF6] set 2, a ld [hFlags_0xFFF6], a diff --git a/engine/menu/status_screen.asm b/engine/menu/status_screen.asm index 685839cb..f95a0710 100755 --- a/engine/menu/status_screen.asm +++ b/engine/menu/status_screen.asm @@ -233,13 +233,13 @@ StatusScreen2: ; 12b57 (4:6b57) ld [hTilesetType], a ld [$ffba], a ld bc, $0005 - ld hl, wd0dc + ld hl, wMoves call FillMemory ld hl, wLoadedMonMoves - ld de, wd0dc - ld bc, $0004 + ld de, wMoves + ld bc, NUM_MOVES call CopyData - callab Func_39b87 + callab FormatMovesString hlCoord 9, 2 ld bc, $050a call ClearScreenArea ; Clear under name @@ -250,7 +250,7 @@ StatusScreen2: ; 12b57 (4:6b57) ld c, $12 call TextBoxBorder ; Draw move container hlCoord 2, 9 - ld de, wd0e1 + ld de, wMovesString call PlaceString ; Print moves ld a, [wcd6c] inc a @@ -259,8 +259,8 @@ LoadMonData:: ; 1372 (0:1372) Func_137a:: ; 137a (0:137a) -; Write c to [wd0dc + b]. Unused. - ld hl, wd0dc +; Write c to [wMoves + b]. Unused. + ld hl, wMoves ld e, b ld d, 0 add hl, de @@ -546,7 +546,7 @@ PrintLevelCommon:: ; 1523 (0:1523) Func_152e:: ; 152e (0:152e) ; Unused. - ld hl,wd0dc + ld hl,wMoves ld c,a ld b,0 add hl,bc @@ -1275,10 +1275,17 @@ ds 2 wRepelRemainingSteps:: ; wd0db ds 1 - -wd0dc:: ds 4 -wd0e0:: ds 1 -wd0e1:: ds 56 + +wMoves:: ; wd0dc +; list of moves for FormatMovesString + ds 4 + +wMoveNum:: ; d0e0 + ds 1 + +wMovesString:: ; d0e1 + ds 56 + wd119:: ds 1 wWalkBikeSurfStateCopy:: ; d11a |