mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-06 15:45:24 +13:00
Sync coordinate macros with pokecrystal
This commit is contained in:
parent
45ed05decf
commit
13129459f1
75 changed files with 675 additions and 661 deletions
|
|
@ -14,9 +14,9 @@ HallOfFamePC:
|
|||
ld bc, $10
|
||||
ld a, $ff
|
||||
call FillMemory
|
||||
coord hl, 0, 0
|
||||
hlcoord 0, 0
|
||||
call FillFourRowsWithBlack
|
||||
coord hl, 0, 14
|
||||
hlcoord 0, 14
|
||||
call FillFourRowsWithBlack
|
||||
ld a, %11000000
|
||||
ldh [rBGP], a
|
||||
|
|
@ -61,7 +61,7 @@ DisplayCreditsMon:
|
|||
ld a, [hl]
|
||||
ld [wcf91], a
|
||||
ld [wd0b5], a
|
||||
coord hl, 8, 6
|
||||
hlcoord 8, 6
|
||||
call GetMonHeader
|
||||
call LoadFrontSpriteByMonIndex
|
||||
ld hl, vBGMap0 + $c
|
||||
|
|
@ -162,7 +162,7 @@ FillFourRowsWithBlack:
|
|||
jp FillMemory
|
||||
|
||||
FillMiddleOfScreenWithWhite:
|
||||
coord hl, 0, 4
|
||||
hlcoord 0, 4
|
||||
ld bc, SCREEN_WIDTH * 10
|
||||
ld a, " "
|
||||
jp FillMemory
|
||||
|
|
@ -172,7 +172,7 @@ Credits:
|
|||
push de
|
||||
.nextCreditsScreen
|
||||
pop de
|
||||
coord hl, 9, 6
|
||||
hlcoord 9, 6
|
||||
push hl
|
||||
call FillMiddleOfScreenWithWhite
|
||||
pop hl
|
||||
|
|
@ -248,10 +248,10 @@ Credits:
|
|||
ld hl, vChars2 + $600
|
||||
lb bc, BANK(TheEndGfx), (TheEndGfxEnd - TheEndGfx) / $10
|
||||
call CopyVideoData
|
||||
coord hl, 4, 8
|
||||
hlcoord 4, 8
|
||||
ld de, TheEndTextString
|
||||
call PlaceString
|
||||
coord hl, 4, 9
|
||||
hlcoord 4, 9
|
||||
inc de
|
||||
call PlaceString
|
||||
jp FadeInCreditsText
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ EvolutionSetWholeScreenPalette:
|
|||
|
||||
Evolution_LoadPic:
|
||||
call GetMonHeader
|
||||
coord hl, 7, 2
|
||||
hlcoord 7, 2
|
||||
jp LoadFlippedFrontSpriteByMonIndex
|
||||
|
||||
Evolution_BackAndForthAnim:
|
||||
|
|
@ -118,7 +118,7 @@ Evolution_ChangeMonPic:
|
|||
push bc
|
||||
xor a
|
||||
ldh [hAutoBGTransferEnabled], a
|
||||
coord hl, 7, 2
|
||||
hlcoord 7, 2
|
||||
lb bc, 7, 7
|
||||
ld de, SCREEN_WIDTH - 7
|
||||
.loop
|
||||
|
|
|
|||
|
|
@ -57,11 +57,11 @@ AnimateHallOfFame:
|
|||
call HoFDisplayAndRecordMonInfo
|
||||
ld c, 80
|
||||
call DelayFrames
|
||||
coord hl, 2, 13
|
||||
hlcoord 2, 13
|
||||
ld b, 3
|
||||
ld c, 14
|
||||
call TextBoxBorder
|
||||
coord hl, 4, 15
|
||||
hlcoord 4, 15
|
||||
ld de, HallOfFameText
|
||||
call PlaceString
|
||||
ld c, 180
|
||||
|
|
@ -112,7 +112,7 @@ HoFShowMonOrPlayer:
|
|||
call HoFLoadPlayerPics
|
||||
jr .next1
|
||||
.showMon
|
||||
coord hl, 12, 5
|
||||
hlcoord 12, 5
|
||||
call GetMonHeader
|
||||
call LoadFrontSpriteByMonIndex
|
||||
predef LoadMonBackPic
|
||||
|
|
@ -157,22 +157,22 @@ HoFDisplayAndRecordMonInfo:
|
|||
jp HoFRecordMonInfo
|
||||
|
||||
HoFDisplayMonInfo:
|
||||
coord hl, 0, 2
|
||||
hlcoord 0, 2
|
||||
ld b, 9
|
||||
ld c, 10
|
||||
call TextBoxBorder
|
||||
coord hl, 2, 6
|
||||
hlcoord 2, 6
|
||||
ld de, HoFMonInfoText
|
||||
call PlaceString
|
||||
coord hl, 1, 4
|
||||
hlcoord 1, 4
|
||||
ld de, wcd6d
|
||||
call PlaceString
|
||||
ld a, [wHoFMonLevel]
|
||||
coord hl, 8, 7
|
||||
hlcoord 8, 7
|
||||
call PrintLevelCommon
|
||||
ld a, [wHoFMonSpecies]
|
||||
ld [wd0b5], a
|
||||
coord hl, 3, 9
|
||||
hlcoord 3, 9
|
||||
predef PrintMonType
|
||||
ld a, [wHoFMonSpecies]
|
||||
jp PlayCry
|
||||
|
|
@ -203,27 +203,27 @@ HoFLoadPlayerPics:
|
|||
HoFLoadMonPlayerPicTileIDs:
|
||||
; c = base tile ID
|
||||
ld b, 0
|
||||
coord hl, 12, 5
|
||||
hlcoord 12, 5
|
||||
predef_jump CopyTileIDsFromList
|
||||
|
||||
HoFDisplayPlayerStats:
|
||||
SetEvent EVENT_HALL_OF_FAME_DEX_RATING
|
||||
predef DisplayDexRating
|
||||
coord hl, 0, 4
|
||||
hlcoord 0, 4
|
||||
ld b, 6
|
||||
ld c, 10
|
||||
call TextBoxBorder
|
||||
coord hl, 5, 0
|
||||
hlcoord 5, 0
|
||||
ld b, 2
|
||||
ld c, 9
|
||||
call TextBoxBorder
|
||||
coord hl, 7, 2
|
||||
hlcoord 7, 2
|
||||
ld de, wPlayerName
|
||||
call PlaceString
|
||||
coord hl, 1, 6
|
||||
hlcoord 1, 6
|
||||
ld de, HoFPlayTimeText
|
||||
call PlaceString
|
||||
coord hl, 5, 7
|
||||
hlcoord 5, 7
|
||||
ld de, wPlayTimeHours
|
||||
lb bc, 1, 3
|
||||
call PrintNumber
|
||||
|
|
@ -232,10 +232,10 @@ HoFDisplayPlayerStats:
|
|||
ld de, wPlayTimeMinutes
|
||||
lb bc, LEADING_ZEROES | 1, 2
|
||||
call PrintNumber
|
||||
coord hl, 1, 9
|
||||
hlcoord 1, 9
|
||||
ld de, HoFMoneyText
|
||||
call PlaceString
|
||||
coord hl, 4, 10
|
||||
hlcoord 4, 10
|
||||
ld de, wPlayerMoney
|
||||
ld c, $a3
|
||||
call PrintBCDNumber
|
||||
|
|
|
|||
|
|
@ -217,7 +217,7 @@ IntroClearScreen:
|
|||
|
||||
IntroClearMiddleOfScreen:
|
||||
; clear the area of the tile map between the black bars on the top and bottom
|
||||
coord hl, 0, 4
|
||||
hlcoord 0, 4
|
||||
ld bc, SCREEN_WIDTH * 10
|
||||
|
||||
IntroClearCommon:
|
||||
|
|
@ -274,7 +274,7 @@ IntroMoveMon:
|
|||
ret
|
||||
|
||||
IntroCopyTiles:
|
||||
coord hl, 13, 7
|
||||
hlcoord 13, 7
|
||||
|
||||
CopyTileIDsFromList_ZeroBaseTileID:
|
||||
ld c, 0
|
||||
|
|
@ -348,16 +348,16 @@ PlayShootingStar:
|
|||
IntroDrawBlackBars:
|
||||
; clear the screen and draw black bars on the top and bottom
|
||||
call IntroClearScreen
|
||||
coord hl, 0, 0
|
||||
hlcoord 0, 0
|
||||
ld c, SCREEN_WIDTH * 4
|
||||
call IntroPlaceBlackTiles
|
||||
coord hl, 0, 14
|
||||
hlcoord 0, 14
|
||||
ld c, SCREEN_WIDTH * 4
|
||||
call IntroPlaceBlackTiles
|
||||
ld hl, vBGMap1
|
||||
ld c, BG_MAP_WIDTH * 4
|
||||
call IntroPlaceBlackTiles
|
||||
ld hl, vBGMap1 + BG_MAP_WIDTH * 14
|
||||
hlbgcoord 0, 14, vBGMap1
|
||||
ld c, BG_MAP_WIDTH * 4
|
||||
jp IntroPlaceBlackTiles
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ DoClearSaveDialogue:
|
|||
call LoadTextBoxTilePatterns
|
||||
ld hl, ClearSaveDataText
|
||||
call PrintText
|
||||
coord hl, 14, 7
|
||||
hlcoord 14, 7
|
||||
lb bc, 8, 15
|
||||
ld a, NO_YES_MENU
|
||||
ld [wTwoOptionMenuID], a
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ OakSpeech:
|
|||
ld [wd0b5], a
|
||||
ld [wcf91], a
|
||||
call GetMonHeader
|
||||
coord hl, 6, 4
|
||||
hlcoord 6, 4
|
||||
call LoadFlippedFrontSpriteByMonIndex
|
||||
call MovePicLeft
|
||||
ld hl, OakSpeechText2
|
||||
|
|
@ -141,7 +141,7 @@ OakSpeech:
|
|||
ld [MBC1RomBank], a
|
||||
ld c, 20
|
||||
call DelayFrames
|
||||
coord hl, 6, 5
|
||||
hlcoord 6, 5
|
||||
ld b, 7
|
||||
ld c, 7
|
||||
call ClearScreenArea
|
||||
|
|
@ -224,9 +224,9 @@ IntroDisplayPicCenteredOrUpperRight:
|
|||
pop bc
|
||||
ld a, c
|
||||
and a
|
||||
coord hl, 15, 1
|
||||
hlcoord 15, 1
|
||||
jr nz, .next
|
||||
coord hl, 6, 4
|
||||
hlcoord 6, 4
|
||||
.next
|
||||
xor a
|
||||
ldh [hStartTileID], a
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ HisNameIsText:
|
|||
|
||||
OakSpeechSlidePicLeft:
|
||||
push de
|
||||
coord hl, 0, 0
|
||||
hlcoord 0, 0
|
||||
lb bc, 12, 11
|
||||
call ClearScreenArea ; clear the name list text box
|
||||
ld c, 10
|
||||
|
|
@ -76,13 +76,13 @@ OakSpeechSlidePicLeft:
|
|||
ld bc, NAME_LENGTH
|
||||
call CopyData
|
||||
call Delay3
|
||||
coord hl, 12, 4
|
||||
hlcoord 12, 4
|
||||
lb de, 6, 6 * SCREEN_WIDTH + 5
|
||||
ld a, $ff
|
||||
jr OakSpeechSlidePicCommon
|
||||
|
||||
OakSpeechSlidePicRight:
|
||||
coord hl, 5, 4
|
||||
hlcoord 5, 4
|
||||
lb de, 6, 6 * SCREEN_WIDTH + 5
|
||||
xor a
|
||||
|
||||
|
|
@ -161,15 +161,15 @@ OakSpeechSlidePicCommon:
|
|||
|
||||
DisplayIntroNameTextBox:
|
||||
push de
|
||||
coord hl, 0, 0
|
||||
hlcoord 0, 0
|
||||
ld b, $a
|
||||
ld c, $9
|
||||
call TextBoxBorder
|
||||
coord hl, 3, 0
|
||||
hlcoord 3, 0
|
||||
ld de, .namestring
|
||||
call PlaceString
|
||||
pop de
|
||||
coord hl, 2, 2
|
||||
hlcoord 2, 2
|
||||
call PlaceString
|
||||
call UpdateSprites
|
||||
xor a
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ DisplayTitleScreen:
|
|||
call ClearBothBGMaps
|
||||
|
||||
; place tiles for pokemon logo (except for the last row)
|
||||
coord hl, 2, 1
|
||||
hlcoord 2, 1
|
||||
ld a, $80
|
||||
ld de, SCREEN_WIDTH
|
||||
ld c, 6
|
||||
|
|
@ -81,7 +81,7 @@ DisplayTitleScreen:
|
|||
jr nz, .pokemonLogoTileLoop
|
||||
|
||||
; place tiles for the last row of the pokemon logo
|
||||
coord hl, 2, 7
|
||||
hlcoord 2, 7
|
||||
ld a, $31
|
||||
ld b, $10
|
||||
.pokemonLogoLastTileRowLoop
|
||||
|
|
@ -98,7 +98,7 @@ DisplayTitleScreen:
|
|||
ld [hl], a
|
||||
|
||||
; place tiles for title screen copyright
|
||||
coord hl, 2, 17
|
||||
hlcoord 2, 17
|
||||
ld de, .tileScreenCopyrightTiles
|
||||
ld b, $10
|
||||
.tileScreenCopyrightTilesLoop
|
||||
|
|
@ -353,7 +353,7 @@ ClearBothBGMaps:
|
|||
LoadTitleMonSprite:
|
||||
ld [wcf91], a
|
||||
ld [wd0b5], a
|
||||
coord hl, 5, 10
|
||||
hlcoord 5, 10
|
||||
call GetMonHeader
|
||||
jp LoadFrontSpriteByMonIndex
|
||||
|
||||
|
|
@ -372,7 +372,7 @@ LoadCopyrightTiles:
|
|||
ld hl, vChars2 + $600
|
||||
lb bc, BANK(NintendoCopyrightLogoGraphics), (GamefreakLogoGraphicsEnd - NintendoCopyrightLogoGraphics) / $10
|
||||
call CopyVideoData
|
||||
coord hl, 2, 7
|
||||
hlcoord 2, 7
|
||||
ld de, CopyrightTextString
|
||||
jp PlaceString
|
||||
|
||||
|
|
@ -386,7 +386,7 @@ INCLUDE "data/pokemon/title_mons.asm"
|
|||
|
||||
; prints version text (red, blue)
|
||||
PrintGameVersionOnTitleScreen:
|
||||
coord hl, 7, 8
|
||||
hlcoord 7, 8
|
||||
ld de, VersionOnTitleScreenText
|
||||
jp PlaceString
|
||||
|
||||
|
|
|
|||
|
|
@ -148,7 +148,7 @@ Trade_Delay80:
|
|||
jp DelayFrames
|
||||
|
||||
Trade_ClearTileMap:
|
||||
coord hl, 0, 0
|
||||
hlcoord 0, 0
|
||||
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
|
||||
ld a, " "
|
||||
jp FillMemory
|
||||
|
|
@ -232,7 +232,7 @@ Trade_ShowPlayerMon:
|
|||
ldh [hSCX], a
|
||||
xor a
|
||||
ldh [hAutoBGTransferEnabled], a
|
||||
coord hl, 4, 0
|
||||
hlcoord 4, 0
|
||||
ld b, 6
|
||||
ld c, 10
|
||||
call TextBoxBorder
|
||||
|
|
@ -281,7 +281,7 @@ Trade_DrawOpenEndOfLinkCable:
|
|||
call DelayFrame
|
||||
ld a, %10001011
|
||||
ldh [rLCDC], a
|
||||
coord hl, 6, 2
|
||||
hlcoord 6, 2
|
||||
ld b, $7 ; open end of link cable tile ID list index
|
||||
call CopyTileIDsFromList_ZeroBaseTileID
|
||||
call Trade_CopyTileMapToVRAM
|
||||
|
|
@ -353,7 +353,7 @@ Trade_ShowEnemyMon:
|
|||
ld a, TRADE_BALL_TILT_ANIM
|
||||
call Trade_ShowAnimation
|
||||
call Trade_ShowClearedWindow
|
||||
coord hl, 4, 10
|
||||
hlcoord 4, 10
|
||||
ld b, 6
|
||||
ld c, 10
|
||||
call TextBoxBorder
|
||||
|
|
@ -370,7 +370,7 @@ Trade_ShowEnemyMon:
|
|||
ld a, [wTradedEnemyMonSpecies]
|
||||
call PlayCry
|
||||
call Trade_Delay100
|
||||
coord hl, 4, 10
|
||||
hlcoord 4, 10
|
||||
lb bc, 8, 12
|
||||
call ClearScreenArea
|
||||
jp PrintTradeTakeCareText
|
||||
|
|
@ -462,7 +462,7 @@ Trade_DrawLeftGameboy:
|
|||
call Trade_ClearTileMap
|
||||
|
||||
; draw link cable
|
||||
coord hl, 11, 4
|
||||
hlcoord 11, 4
|
||||
ld a, $5d
|
||||
ld [hli], a
|
||||
ld a, $5e
|
||||
|
|
@ -473,16 +473,16 @@ Trade_DrawLeftGameboy:
|
|||
jr nz, .loop
|
||||
|
||||
; draw gameboy pic
|
||||
coord hl, 5, 3
|
||||
hlcoord 5, 3
|
||||
ld b, $6
|
||||
call CopyTileIDsFromList_ZeroBaseTileID
|
||||
|
||||
; draw text box with player name below gameboy pic
|
||||
coord hl, 4, 12
|
||||
hlcoord 4, 12
|
||||
ld b, 2
|
||||
ld c, 7
|
||||
call TextBoxBorder
|
||||
coord hl, 5, 14
|
||||
hlcoord 5, 14
|
||||
ld de, wPlayerName
|
||||
call PlaceString
|
||||
|
||||
|
|
@ -492,7 +492,7 @@ Trade_DrawRightGameboy:
|
|||
call Trade_ClearTileMap
|
||||
|
||||
; draw horizontal segment of link cable
|
||||
coord hl, 0, 4
|
||||
hlcoord 0, 4
|
||||
ld a, $5e
|
||||
ld c, $e
|
||||
.loop
|
||||
|
|
@ -520,16 +520,16 @@ Trade_DrawRightGameboy:
|
|||
ld [hl], a
|
||||
|
||||
; draw gameboy pic
|
||||
coord hl, 7, 8
|
||||
hlcoord 7, 8
|
||||
ld b, $6
|
||||
call CopyTileIDsFromList_ZeroBaseTileID
|
||||
|
||||
; draw text box with enemy name above link cable
|
||||
coord hl, 6, 0
|
||||
hlcoord 6, 0
|
||||
ld b, 2
|
||||
ld c, 7
|
||||
call TextBoxBorder
|
||||
coord hl, 7, 2
|
||||
hlcoord 7, 2
|
||||
ld de, wLinkEnemyTrainerName
|
||||
call PlaceString
|
||||
|
||||
|
|
@ -538,7 +538,7 @@ Trade_DrawRightGameboy:
|
|||
Trade_DrawCableAcrossScreen:
|
||||
; Draws the link cable across the screen.
|
||||
call Trade_ClearTileMap
|
||||
coord hl, 0, 4
|
||||
hlcoord 0, 4
|
||||
ld a, $5e
|
||||
ld c, SCREEN_WIDTH
|
||||
.loop
|
||||
|
|
@ -551,7 +551,7 @@ Trade_CopyCableTilesOffScreen:
|
|||
; This is used to copy the link cable tiles off screen so that the cable
|
||||
; continues when the screen is scrolled.
|
||||
push hl
|
||||
coord hl, 0, 4
|
||||
hlcoord 0, 4
|
||||
call CopyToRedrawRowOrColumnSrcTiles
|
||||
pop hl
|
||||
ld a, h
|
||||
|
|
@ -735,7 +735,7 @@ Trade_LoadMonSprite:
|
|||
xor $1
|
||||
ldh [hAutoBGTransferEnabled], a
|
||||
call GetMonHeader
|
||||
coord hl, 7, 2
|
||||
hlcoord 7, 2
|
||||
call LoadFlippedFrontSpriteByMonIndex
|
||||
ld c, 10
|
||||
jp DelayFrames
|
||||
|
|
|
|||
|
|
@ -1,43 +1,43 @@
|
|||
Trade_PrintPlayerMonInfoText:
|
||||
coord hl, 5, 0
|
||||
hlcoord 5, 0
|
||||
ld de, Trade_MonInfoText
|
||||
call PlaceString
|
||||
ld a, [wTradedPlayerMonSpecies]
|
||||
ld [wd11e], a
|
||||
predef IndexToPokedex
|
||||
coord hl, 9, 0
|
||||
hlcoord 9, 0
|
||||
ld de, wd11e
|
||||
lb bc, LEADING_ZEROES | 1, 3
|
||||
call PrintNumber
|
||||
coord hl, 5, 2
|
||||
hlcoord 5, 2
|
||||
ld de, wcf4b
|
||||
call PlaceString
|
||||
coord hl, 8, 4
|
||||
hlcoord 8, 4
|
||||
ld de, wTradedPlayerMonOT
|
||||
call PlaceString
|
||||
coord hl, 8, 6
|
||||
hlcoord 8, 6
|
||||
ld de, wTradedPlayerMonOTID
|
||||
lb bc, LEADING_ZEROES | 2, 5
|
||||
jp PrintNumber
|
||||
|
||||
Trade_PrintEnemyMonInfoText:
|
||||
coord hl, 5, 10
|
||||
hlcoord 5, 10
|
||||
ld de, Trade_MonInfoText
|
||||
call PlaceString
|
||||
ld a, [wTradedEnemyMonSpecies]
|
||||
ld [wd11e], a
|
||||
predef IndexToPokedex
|
||||
coord hl, 9, 10
|
||||
hlcoord 9, 10
|
||||
ld de, wd11e
|
||||
lb bc, LEADING_ZEROES | 1, 3
|
||||
call PrintNumber
|
||||
coord hl, 5, 12
|
||||
hlcoord 5, 12
|
||||
ld de, wcd6d
|
||||
call PlaceString
|
||||
coord hl, 8, 14
|
||||
hlcoord 8, 14
|
||||
ld de, wTradedEnemyMonOT
|
||||
call PlaceString
|
||||
coord hl, 8, 16
|
||||
hlcoord 8, 16
|
||||
ld de, wTradedEnemyMonOTID
|
||||
lb bc, LEADING_ZEROES | 2, 5
|
||||
jp PrintNumber
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue