Separate maps.asm, pics.asm, sprites.asm, and tilesets.asm from main.asm (#251)

Each new file builds its own .o, along with separate main.o and home.o, which necessitates many more "exported::" labels.
This commit is contained in:
Rangi 2020-06-27 15:32:24 -04:00 committed by GitHub
parent ff927ba730
commit 4b853ad676
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
317 changed files with 2290 additions and 2240 deletions

View file

@ -1,4 +1,4 @@
DisplayDiploma:
DisplayDiploma::
call SaveScreenTilesToBuffer2
call GBPalWhiteOutWithDelay3
call ClearScreen

View file

@ -1,5 +1,5 @@
; function that displays the start menu
DrawStartMenu:
DrawStartMenu::
CheckEvent EVENT_GOT_POKEDEX
; menu with pokedex
coord hl, 10, 0

View file

@ -312,7 +312,7 @@ StartNewGame:
call DelayFrames
; enter map after using a special warp or loading the game from the main menu
SpecialEnterMap:
SpecialEnterMap::
xor a
ld [hJoyPressed], a
ld [hJoyHeld], a

View file

@ -53,7 +53,7 @@ DoYouWantToNicknameText:
TX_FAR _DoYouWantToNicknameText
db "@"
DisplayNameRaterScreen:
DisplayNameRaterScreen::
ld hl, wBuffer
xor a
ld [wUpdateSpritesEnabled], a

View file

@ -17,14 +17,14 @@
; f6: health returned
; f7: revitalized
; f8: leveled up
DrawPartyMenu_:
DrawPartyMenu_::
xor a
ld [H_AUTOBGTRANSFERENABLED], a
call ClearScreen
call UpdateSprites
callba LoadMonPartySpriteGfxWithLCDDisabled ; load pokemon icon graphics
RedrawPartyMenu_:
RedrawPartyMenu_::
ld a, [wPartyMenuTypeOrMessageID]
cp SWAP_MONS_PARTY_MENU
jp z, .printMessage

View file

@ -1,4 +1,4 @@
ActivatePC:
ActivatePC::
call SaveScreenTilesToBuffer2
ld a, SFX_TURN_ON_PC
call PlaySound
@ -115,7 +115,7 @@ AccessedMyPCText:
db "@"
; removes one of the specified item ID [hItemToRemoveID] from bag (if existent)
RemoveItemByID:
RemoveItemByID::
ld hl, wBagItems
ld a, [hItemToRemoveID]
ld b, a

View file

@ -1,4 +1,4 @@
PlayerPC:
PlayerPC::
ld hl, wd730
set 6, [hl]
ld a, ITEM_NAME

View file

@ -1,4 +1,4 @@
CeladonPrizeMenu:
CeladonPrizeMenu::
ld b, COIN_CASE
call IsItemInBag
jr nz, .havingCoinCase

View file

@ -1,4 +1,4 @@
StartMenu_Pokedex:
StartMenu_Pokedex::
predef ShowPokedexMenu
call LoadScreenTilesFromBuffer2 ; restore saved screen
call Delay3
@ -6,7 +6,7 @@ StartMenu_Pokedex:
call UpdateSprites
jp RedisplayStartMenu
StartMenu_Pokemon:
StartMenu_Pokemon::
ld a, [wPartyCount]
and a
jp z, RedisplayStartMenu
@ -284,7 +284,7 @@ StartMenu_Pokemon:
db "@"
; writes a blank tile to all possible menu cursor positions on the party menu
ErasePartyMenuCursors:
ErasePartyMenuCursors::
coord hl, 0, 1
ld bc, 2 * 20 ; menu cursor positions are 2 rows apart
ld a, 6 ; 6 menu cursor positions
@ -299,7 +299,7 @@ ItemMenuLoop:
call LoadScreenTilesFromBuffer2DisableBGTransfer ; restore saved screen
call RunDefaultPaletteCommand
StartMenu_Item:
StartMenu_Item::
ld a, [wLinkState]
dec a ; is the player in the Colosseum or Trade Centre?
jr nz, .notInCableClubRoom
@ -450,7 +450,7 @@ INCLUDE "data/party_items.asm"
INCLUDE "data/overworld_items.asm"
StartMenu_TrainerInfo:
StartMenu_TrainerInfo::
call GBPalWhiteOut
call ClearScreen
call UpdateSprites
@ -638,7 +638,7 @@ TrainerInfo_DrawVerticalLine:
jr nz, .loop
ret
StartMenu_SaveReset:
StartMenu_SaveReset::
ld a, [wd72e]
bit 6, a ; is the player using the link feature?
jp nz, Init
@ -646,7 +646,7 @@ StartMenu_SaveReset:
call LoadScreenTilesFromBuffer2 ; restore saved screen
jp HoldTextDisplayOpen
StartMenu_Option:
StartMenu_Option::
xor a
ld [H_AUTOBGTRANSFERENABLED], a
call ClearScreen
@ -657,7 +657,7 @@ StartMenu_Option:
call UpdateSprites
jp RedisplayStartMenu
SwitchPartyMon:
SwitchPartyMon::
call SwitchPartyMon_InitVarOrSwapData ; swap data
ld a, [wSwappedMenuItem]
call SwitchPartyMon_ClearGfx

View file

@ -1,4 +1,4 @@
HandleItemListSwapping:
HandleItemListSwapping::
ld a, [wListMenuID]
cp ITEMLISTMENU
jp nz, DisplayListMenuIDLoop ; only rearrange item list menus

View file

@ -1,5 +1,5 @@
; function to draw various text boxes
DisplayTextBoxID_:
DisplayTextBoxID_::
ld a, [wTextBoxID]
cp TWO_OPTION_MENU
jp z, DisplayTwoOptionMenu

View file

@ -1,4 +1,4 @@
VendingMachineMenu:
VendingMachineMenu::
ld hl, VendingMachineText1
call PrintText
ld a, MONEY_BOX