proper section names and bank constants

This commit is contained in:
yenatch 2013-11-25 23:33:54 -05:00
parent 3eb9851b84
commit 04eb541f83
8 changed files with 192 additions and 188 deletions

45
contents.asm Normal file
View File

@ -0,0 +1,45 @@
; Doubles as bank constants.
; stats/egg_moves.o
EGG_MOVES EQU $8
; engine/events.o
; engine/scripting.o
; engine/events_2.o
EVENTS EQU $25
; maps.o
MAP_HEADERS EQU $25
MAP_SCRIPTS_1 EQU $15
MAP_SCRIPTS_2 EQU $16
MAP_SCRIPTS_3 EQU $17
MAP_SCRIPTS_4 EQU $18
MAP_SCRIPTS_5 EQU $1A
MAP_SCRIPTS_6 EQU $1B
MAP_SCRIPTS_7 EQU $1C
MAP_SCRIPTS_8 EQU $1D
MAP_SCRIPTS_9 EQU $1E
MAP_SCRIPTS_10 EQU $1F
MAP_SCRIPTS_11 EQU $26
MAP_SCRIPTS_12 EQU $27
MAP_SCRIPTS_13 EQU $60
MAP_SCRIPTS_14 EQU $61
MAP_SCRIPTS_15 EQU $62
MAP_SCRIPTS_16 EQU $63
MAP_SCRIPTS_17 EQU $64
MAP_SCRIPTS_18 EQU $65
MAP_SCRIPTS_19 EQU $66
MAP_SCRIPTS_20 EQU $67
MAP_SCRIPTS_21 EQU $68
MAP_SCRIPTS_22 EQU $69
MAP_SCRIPTS_23 EQU $6A
MAP_SCRIPTS_24 EQU $6B
MAP_SCRIPTS_25 EQU $6C

View File

@ -1,6 +1,7 @@
INCLUDE "includes.asm"
SECTION "events", ROMX, BANK[$25]
SECTION "Events", ROMX, BANK[EVENTS]
Function966b0: ; 966b0
xor a

View File

@ -1,8 +1,9 @@
INCLUDE "includes.asm"
; More overworld event handling.
SECTION "events2", ROMX, BANK[$25]
SECTION "Events 2", ROMX, BANK[EVENTS]
Function97c28: ; 97c28
ld hl, StatusFlags2

View File

@ -1,5 +1,7 @@
INCLUDE "pokecrystal.asm"
INCLUDE "includes.asm"
SECTION "scripting", ROMX, BANK[$25]
SECTION "Event Scripting", ROMX, BANK[EVENTS]
INCLUDE "engine/scripting.asm"

View File

@ -1,2 +1,3 @@
INCLUDE "globals.asm"
INCLUDE "contents.asm"
INCLUDE "constants.asm"

112
main.asm
View File

@ -1,21 +1,20 @@
INCLUDE "includes.asm"
SECTION "bank0",ROM0
SECTION "Hardware", ROM0
INCLUDE "rst.asm"
INCLUDE "interrupts.asm"
SECTION "header",ROM0[$100]
SECTION "Header", ROM0[$100]
Start:
nop
jp _Start
SECTION "start",ROM0[$150]
SECTION "Home", ROM0[$150]
INCLUDE "home/init.asm"
INCLUDE "home/vblank.asm"
@ -67262,9 +67261,7 @@ INCLUDE "stats/pokemon_names.asm"
INCBIN "baserom.gbc",$53d84,$53e2e - $53d84
SECTION "bank15",ROMX,BANK[$15]
; Map Scripts I
SECTION "Map Scripts 1", ROMX, BANK[MAP_SCRIPTS_1]
INCLUDE "maps/GoldenrodGym.asm"
INCLUDE "maps/GoldenrodBikeShop.asm"
@ -67285,9 +67282,7 @@ INCLUDE "maps/GoldenrodDeptStoreRoof.asm"
INCLUDE "maps/GoldenrodGameCorner.asm"
SECTION "bank16",ROMX,BANK[$16]
; Map Scripts II
SECTION "Map Scripts 2", ROMX, BANK[MAP_SCRIPTS_2]
INCLUDE "maps/RuinsofAlphOutside.asm"
INCLUDE "maps/RuinsofAlphHoOhChamber.asm"
@ -67315,9 +67310,7 @@ INCLUDE "maps/OlivineLighthouse3F.asm"
INCLUDE "maps/OlivineLighthouse4F.asm"
SECTION "bank17",ROMX,BANK[$17]
; Map Scripts III
SECTION "Map Scripts 3", ROMX, BANK[MAP_SCRIPTS_3]
INCLUDE "maps/NationalPark.asm"
INCLUDE "maps/NationalParkBugContest.asm"
@ -67327,9 +67320,7 @@ INCLUDE "maps/RadioTower3F.asm"
INCLUDE "maps/RadioTower4F.asm"
SECTION "bank18",ROMX,BANK[$18]
; Map Scripts IV
SECTION "Map Scripts 4", ROMX, BANK[MAP_SCRIPTS_4]
INCLUDE "maps/RadioTower5F.asm"
INCLUDE "maps/OlivineLighthouse5F.asm"
@ -67346,9 +67337,7 @@ SECTION "bank19",ROMX,BANK[$19]
INCLUDE "text/phone/extra.asm"
SECTION "bank1A",ROMX,BANK[$1A]
; Map Scripts V
SECTION "Map Scripts 5", ROMX, BANK[MAP_SCRIPTS_5]
INCLUDE "maps/Route11.asm"
INCLUDE "maps/VioletMart.asm"
@ -67365,9 +67354,7 @@ INCLUDE "maps/Route36RuinsofAlphgate.asm"
INCLUDE "maps/Route36NationalParkgate.asm"
SECTION "bank1B",ROMX,BANK[$1B]
; Map Scripts VI
SECTION "Map Scripts 6", ROMX, BANK[MAP_SCRIPTS_6]
INCLUDE "maps/Route8.asm"
INCLUDE "maps/MahoganyMart1F.asm"
@ -67377,9 +67364,7 @@ INCLUDE "maps/TeamRocketBaseB3F.asm"
INCLUDE "maps/IlexForest.asm"
SECTION "bank1C",ROMX,BANK[$1C]
; Map Scripts VII
SECTION "Map Scripts 7", ROMX, BANK[MAP_SCRIPTS_7]
INCLUDE "maps/LakeofRage.asm"
INCLUDE "maps/CeladonDeptStore1F.asm"
@ -67406,9 +67391,7 @@ INCLUDE "maps/Route7SaffronGate.asm"
INCLUDE "maps/Route1718Gate.asm"
SECTION "bank1D",ROMX,BANK[$1D]
; Map Scripts VIII
SECTION "Map Scripts 8", ROMX, BANK[MAP_SCRIPTS_8]
INCLUDE "maps/DiglettsCave.asm"
INCLUDE "maps/MountMoon.asm"
@ -67432,9 +67415,7 @@ INCLUDE "maps/MountMoonGiftShop.asm"
INCLUDE "maps/TinTowerRoof.asm"
SECTION "bank1E",ROMX,BANK[$1E]
; Map Scripts IX
SECTION "Map Scripts 9", ROMX, BANK[MAP_SCRIPTS_9]
INCLUDE "maps/Route34.asm"
INCLUDE "maps/ElmsLab.asm"
@ -67448,9 +67429,7 @@ INCLUDE "maps/Route27SandstormHouse.asm"
INCLUDE "maps/Route2946Gate.asm"
SECTION "bank1F",ROMX,BANK[$1F]
; Map Scripts X
SECTION "Map Scripts 10", ROMX, BANK[MAP_SCRIPTS_10]
INCLUDE "maps/Route22.asm"
INCLUDE "maps/WarehouseEntrance.asm"
@ -85540,16 +85519,13 @@ Function9331e: ; 9331e (24:731e)
INCBIN "baserom.gbc",$93327,$93a31 - $93327
SECTION "bank25",ROMX,BANK[$25]
SECTION "Map Headers", ROMX, BANK[MAP_HEADERS]
INCLUDE "maps/map_headers.asm"
INCLUDE "maps/second_map_headers.asm"
SECTION "bank26",ROMX,BANK[$26]
; Map Scripts XI
SECTION "Map Scripts 11", ROMX, BANK[MAP_SCRIPTS_11]
INCLUDE "maps/EcruteakHouse.asm"
INCLUDE "maps/WiseTriosRoom.asm"
@ -85571,9 +85547,7 @@ INCLUDE "maps/Route2Gate.asm"
INCLUDE "maps/VictoryRoadGate.asm"
SECTION "bank27",ROMX,BANK[$27]
; Map Scripts XII
SECTION "Map Scripts 12", ROMX, BANK[MAP_SCRIPTS_12]
INCLUDE "maps/OlivinePokeCenter1F.asm"
INCLUDE "maps/OlivineGym.asm"
@ -125066,9 +125040,7 @@ Function17ff3c: ; 17ff3c
INCBIN "baserom.gbc",$17ff68,$17ff6c - $17ff68
SECTION "bank60",ROMX,BANK[$60]
; Map Scripts XIII
SECTION "Map Scripts 13", ROMX, BANK[MAP_SCRIPTS_13]
INCLUDE "maps/IndigoPlateauPokeCenter1F.asm"
INCLUDE "maps/WillsRoom.asm"
@ -125079,15 +125051,12 @@ INCLUDE "maps/LancesRoom.asm"
INCLUDE "maps/HallOfFame.asm"
; Pokedex entries I
; 001-064
; Pokedex entries 001-064
PokedexEntries1:
INCLUDE "stats/pokedex/entries_1.asm"
SECTION "bank61",ROMX,BANK[$61]
; Map Scripts XIV
SECTION "Map Scripts 14", ROMX, BANK[MAP_SCRIPTS_14]
INCLUDE "maps/CeruleanCity.asm"
INCLUDE "maps/SproutTower1F.asm"
@ -125106,9 +125075,7 @@ INCLUDE "maps/BurnedTower1F.asm"
INCLUDE "maps/BurnedTowerB1F.asm"
SECTION "bank62",ROMX,BANK[$62]
; Map Scripts XV
SECTION "Map Scripts 15", ROMX, BANK[MAP_SCRIPTS_15]
INCLUDE "maps/CeruleanGymBadgeSpeechHouse.asm"
INCLUDE "maps/CeruleanPoliceStation.asm"
@ -125136,9 +125103,7 @@ INCLUDE "maps/Route5SaffronCityGate.asm"
INCLUDE "maps/Route5CleanseTagSpeechHouse.asm"
SECTION "bank63",ROMX,BANK[$63]
; Map Scripts XVI
SECTION "Map Scripts 16", ROMX, BANK[MAP_SCRIPTS_16]
INCLUDE "maps/PewterCity.asm"
INCLUDE "maps/WhirlIslandNW.asm"
@ -125166,9 +125131,7 @@ INCLUDE "maps/KurtsHouse.asm"
INCLUDE "maps/AzaleaGym.asm"
SECTION "bank64",ROMX,BANK[$64]
; Map Scripts XVII
SECTION "Map Scripts 17", ROMX, BANK[MAP_SCRIPTS_17]
INCLUDE "maps/MahoganyTown.asm"
INCLUDE "maps/Route32.asm"
@ -125190,9 +125153,7 @@ INCLUDE "maps/MobileTradeRoomMobile.asm"
INCLUDE "maps/MobileBattleRoom.asm"
SECTION "bank65",ROMX,BANK[$65]
; Map Scripts XVIII
SECTION "Map Scripts 18", ROMX, BANK[MAP_SCRIPTS_18]
INCLUDE "maps/Route36.asm"
INCLUDE "maps/FuchsiaCity.asm"
@ -125221,9 +125182,7 @@ INCLUDE "maps/MrPokemonsHouse.asm"
INCLUDE "maps/Route31VioletGate.asm"
SECTION "bank66",ROMX,BANK[$66]
; Map Scripts XIX
SECTION "Map Scripts 19", ROMX, BANK[MAP_SCRIPTS_19]
INCLUDE "maps/AzaleaTown.asm"
INCLUDE "maps/GoldenrodCity.asm"
@ -125242,9 +125201,7 @@ INCLUDE "maps/BluesHouse.asm"
INCLUDE "maps/OaksLab.asm"
SECTION "bank67",ROMX,BANK[$67]
; Map Scripts XX
SECTION "Map Scripts 20", ROMX, BANK[MAP_SCRIPTS_20]
INCLUDE "maps/CherrygroveCity.asm"
INCLUDE "maps/Route35.asm"
@ -125255,9 +125212,7 @@ INCLUDE "maps/Route19.asm"
INCLUDE "maps/Route25.asm"
SECTION "bank68",ROMX,BANK[$68]
; Map Scripts XXI
SECTION "Map Scripts 21", ROMX, BANK[MAP_SCRIPTS_21]
INCLUDE "maps/CianwoodCity.asm"
INCLUDE "maps/Route27.asm"
@ -125273,9 +125228,7 @@ INCLUDE "maps/PewterPokeCEnter2FBeta.asm"
INCLUDE "maps/PewterSnoozeSpeechHouse.asm"
SECTION "bank69",ROMX,BANK[$69]
; Map Scripts XXII
SECTION "Map Scripts 22", ROMX, BANK[MAP_SCRIPTS_22]
INCLUDE "maps/EcruteakCity.asm"
INCLUDE "maps/BlackthornCity.asm"
@ -125288,9 +125241,7 @@ INCLUDE "maps/Route41.asm"
INCLUDE "maps/Route12.asm"
SECTION "bank6A",ROMX,BANK[$6A]
; Map Scripts XXIII
SECTION "Map Scripts 23", ROMX, BANK[MAP_SCRIPTS_23]
INCLUDE "maps/NewBarkTown.asm"
INCLUDE "maps/VioletCity.asm"
@ -125309,9 +125260,7 @@ INCLUDE "maps/Route19FuchsiaGate.asm"
INCLUDE "maps/SeafoamGym.asm"
SECTION "bank6B",ROMX,BANK[$6B]
; Map Scripts XXIV
SECTION "Map Scripts 24", ROMX, BANK[MAP_SCRIPTS_24]
INCLUDE "maps/Route33.asm"
INCLUDE "maps/Route2.asm"
@ -125343,7 +125292,8 @@ SECTION "bank6C",ROMX,BANK[$6C]
INCLUDE "text/common.asm"
; Map Scripts XXV
SECTION "Map Scripts 25", ROMX, BANK[MAP_SCRIPTS_25]
INCLUDE "maps/SilverCaveOutside.asm"
INCLUDE "maps/Route10North.asm"

View File

@ -1,6 +1,8 @@
INCLUDE "pokecrystal.asm"
INCLUDE "includes.asm"
SECTION "eggmoves", ROMX, BANK[$8]
SECTION "Egg Moves", ROMX, BANK[EGG_MOVES]
INCLUDE "stats/egg_move_pointers.asm"
INCLUDE "stats/egg_moves.asm"

View File

@ -1,6 +1,8 @@
INCLUDE "pokecrystal.asm"
INCLUDE "includes.asm"
SECTION "evosattacks", ROMx, BANK[$10]
SECTION "Evolutions and Attacks", ROMX, BANK[EVOS_ATTACKS]
INCLUDE "stats/evos_attacks_pointers.asm"
INCLUDE "stats/evos_attacks.asm"