move-related things

This commit is contained in:
YamaArashi 2015-02-08 00:17:03 -08:00
parent 72bbaed99f
commit 1347023128
10 changed files with 58 additions and 50 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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