You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-09-08 08:13:02 -07:00
Organize the engine/ directory, take 2
Renamed `game` to `games` and `menu` to `menus`. Moved some functions from `engine/routines/` to their fitting subdirectories. Made two new subdirectories: * engine/rtc: Contains all RTC-related things. Menus, hardware, misc functions. * engine/items: Contains all item-related things. Pack, item effects, other item handlers.
This commit is contained in:
49
engine/items/tmhm.asm
Executable file
49
engine/items/tmhm.asm
Executable file
@@ -0,0 +1,49 @@
|
||||
CanLearnTMHMMove: ; 11639
|
||||
ld a, [wCurPartySpecies]
|
||||
ld [wCurSpecies], a
|
||||
call GetBaseData
|
||||
ld hl, wBaseTMHM
|
||||
push hl
|
||||
|
||||
ld a, [wPutativeTMHMMove]
|
||||
ld b, a
|
||||
ld c, 0
|
||||
ld hl, TMHMMoves
|
||||
.loop
|
||||
ld a, [hli]
|
||||
and a
|
||||
jr z, .end
|
||||
cp b
|
||||
jr z, .asm_11659
|
||||
inc c
|
||||
jr .loop
|
||||
|
||||
.asm_11659
|
||||
pop hl
|
||||
ld b, CHECK_FLAG
|
||||
push de
|
||||
ld d, 0
|
||||
predef SmallFarFlagAction
|
||||
pop de
|
||||
ret
|
||||
|
||||
.end
|
||||
pop hl
|
||||
ld c, 0
|
||||
ret
|
||||
; 1166a
|
||||
|
||||
GetTMHMMove: ; 1166a
|
||||
ld a, [wd265]
|
||||
dec a
|
||||
ld hl, TMHMMoves
|
||||
ld b, 0
|
||||
ld c, a
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
ld [wd265], a
|
||||
ret
|
||||
; 1167a
|
||||
|
||||
|
||||
INCLUDE "data/moves/tmhm_moves.asm"
|
||||
Reference in New Issue
Block a user