pokecrystal-board/engine/types.asm
Remy Oukaour 5c28d05bb4 Merge branch 'master' of https://github.com/xCrystal/pokecrystal (resolve PR #459)
# Conflicts:
#	data/items/descriptions.asm
#	data/sprite_anims/framesets.asm
#	engine/crystal_colors.asm
#	engine/events/kurt.asm
#	engine/events/special.asm
#	engine/events/std_scripts.asm
#	engine/events_3.asm
#	engine/item_effects.asm
#	engine/namingscreen.asm
#	engine/scripting.asm
#	engine/stats_screen.asm
#	engine/trade_animation.asm
#	home/audio.asm
#	main.asm
#	maps/BattleTower1F.asm
#	maps/BattleTowerBattleRoom.asm
#	maps/BurnedTowerB1F.asm
#	maps/ElmsLab.asm
#	maps/GoldenrodDeptStore5F.asm
#	maps/GoldenrodUnderground.asm
#	maps/HallOfFame.asm
#	maps/MahoganyTown.asm
#	maps/ManiasHouse.asm
#	maps/MobileBattleRoom.asm
#	maps/MobileTradeRoomMobile.asm
#	maps/RadioTower2F.asm
#	maps/Route35NationalParkGate.asm
#	maps/Route36NationalParkGate.asm
#	maps/Route39Farmhouse.asm
#	tilesets/palette_maps.asm
2018-01-14 22:56:36 -05:00

100 lines
1.3 KiB
NASM

Predef_PrintMonTypes: ; 5090d
; Print one or both types of [CurSpecies]
; on the stats screen at hl.
push hl
call GetBaseData
pop hl
push hl
ld a, [BaseType1]
call .Print
; Single-typed monsters really
; have two of the same type.
ld a, [BaseType1]
ld b, a
ld a, [BaseType2]
cp b
pop hl
jr z, .hide_type_2
ld bc, SCREEN_WIDTH
add hl, bc
.Print:
ld b, a
jr Predef_PrintType
.hide_type_2
; Erase any type name that was here before.
; Seems to be pointless in localized versions.
ld a, " "
ld bc, SCREEN_WIDTH - 3
add hl, bc
ld [hl], a
inc bc
add hl, bc
ld bc, 5
jp ByteFill
; 5093a
Predef_PrintMoveType: ; 5093a
; Print the type of move b at hl.
push hl
ld a, b
dec a
ld bc, MOVE_LENGTH
ld hl, Moves
call AddNTimes
ld de, StringBuffer1
ld a, BANK(Moves)
call FarCopyBytes
ld a, [StringBuffer1 + MOVE_TYPE]
pop hl
ld b, a
Predef_PrintType: ; 50953
; Print type b at hl.
ld a, b
push hl
add a
ld hl, TypeNames
ld e, a
ld d, 0
add hl, de
ld a, [hli]
ld e, a
ld d, [hl]
pop hl
jp PlaceString
; 50964
Predef_GetTypeName: ; 50964
; Copy the name of type [wd265] to StringBuffer1.
ld a, [wd265]
ld hl, TypeNames
ld e, a
ld d, 0
add hl, de
add hl, de
ld a, [hli]
ld h, [hl]
ld l, a
ld de, StringBuffer1
ld bc, 13
jp CopyBytes
; 5097b
INCLUDE "data/types/names.asm"