ref: ef48ae98b5cc7a3e09633b03fa13534f65247ed6
parent: 008f591a3a1a16ea263b5e348d07f2cd29e73cca
author: Rangi <remy.oukaour+rangi42@gmail.com>
date: Sat Nov 23 15:43:02 EST 2019
Separate tilesets.o goes with pics.o and sprites.o
--- a/Makefile
+++ b/Makefile
@@ -14,6 +14,7 @@
engine/overworld/events.o \
gfx/pics.o \
gfx/sprites.o \
+gfx/tilesets.o \
lib/mobile/main.o
crystal11_obj := $(crystal_obj:.o=11.o)
--- a/data/maps/map_data.asm
+++ b/data/maps/map_data.asm
@@ -6,6 +6,8 @@
INCLUDE "data/maps/maps.asm"
INCLUDE "data/maps/attributes.asm"
+
INCLUDE "data/maps/blocks.asm"
+
INCLUDE "data/maps/scripts.asm"
--- a/gfx/tilesets.asm
+++ b/gfx/tilesets.asm
@@ -1,3 +1,5 @@
+INCLUDE "constants.asm"
+
tilecoll: MACRO
; used in data/tilesets/*_collision.asm
db COLL_\1, COLL_\2, COLL_\3, COLL_\4
@@ -6,332 +8,332 @@
SECTION "Tileset Data 1", ROMX
-TilesetKantoGFX:
+TilesetKantoGFX::
INCBIN "gfx/tilesets/kanto.2bpp.lz"
-TilesetKantoMeta:
+TilesetKantoMeta::
INCBIN "data/tilesets/kanto_metatiles.bin"
-TilesetKantoColl:
+TilesetKantoColl::
INCLUDE "data/tilesets/kanto_collision.asm"
-Tileset0GFX:
-TilesetJohtoGFX:
+Tileset0GFX::
+TilesetJohtoGFX::
INCBIN "gfx/tilesets/johto.2bpp.lz"
-Tileset0Meta:
-TilesetJohtoMeta:
+Tileset0Meta::
+TilesetJohtoMeta::
INCBIN "data/tilesets/johto_metatiles.bin"
-Tileset0Coll:
-TilesetJohtoColl:
+Tileset0Coll::
+TilesetJohtoColl::
INCLUDE "data/tilesets/johto_collision.asm"
-TilesetIcePathGFX:
+TilesetIcePathGFX::
INCBIN "gfx/tilesets/ice_path.2bpp.lz"
-TilesetIcePathMeta:
+TilesetIcePathMeta::
INCBIN "data/tilesets/ice_path_metatiles.bin"
-TilesetIcePathColl:
+TilesetIcePathColl::
INCLUDE "data/tilesets/ice_path_collision.asm"
-TilesetPlayersRoomGFX:
+TilesetPlayersRoomGFX::
INCBIN "gfx/tilesets/players_room.2bpp.lz"
-TilesetPlayersRoomMeta:
+TilesetPlayersRoomMeta::
INCBIN "data/tilesets/players_room_metatiles.bin"
-TilesetPlayersRoomColl:
+TilesetPlayersRoomColl::
INCLUDE "data/tilesets/players_room_collision.asm"
SECTION "Tileset Data 2", ROMX
-TilesetPokecenterGFX:
+TilesetPokecenterGFX::
INCBIN "gfx/tilesets/pokecenter.2bpp.lz"
-TilesetPokecenterMeta:
+TilesetPokecenterMeta::
INCBIN "data/tilesets/pokecenter_metatiles.bin"
-TilesetPokecenterColl:
+TilesetPokecenterColl::
INCLUDE "data/tilesets/pokecenter_collision.asm"
-TilesetPortGFX:
+TilesetPortGFX::
INCBIN "gfx/tilesets/port.2bpp.lz"
-TilesetPortMeta:
+TilesetPortMeta::
INCBIN "data/tilesets/port_metatiles.bin"
-TilesetPortColl:
+TilesetPortColl::
INCLUDE "data/tilesets/port_collision.asm"
-TilesetPlayersHouseGFX:
+TilesetPlayersHouseGFX::
INCBIN "gfx/tilesets/players_house.2bpp.lz"
-TilesetPlayersHouseMeta:
+TilesetPlayersHouseMeta::
INCBIN "data/tilesets/players_house_metatiles.bin"
-TilesetPlayersHouseColl:
+TilesetPlayersHouseColl::
INCLUDE "data/tilesets/players_house_collision.asm"
-TilesetMansionGFX:
+TilesetMansionGFX::
INCBIN "gfx/tilesets/mansion.2bpp.lz"
-TilesetMansionMeta:
+TilesetMansionMeta::
INCBIN "data/tilesets/mansion_metatiles.bin"
-TilesetMansionColl:
+TilesetMansionColl::
INCLUDE "data/tilesets/mansion_collision.asm"
-TilesetCaveGFX:
+TilesetCaveGFX::
INCBIN "gfx/tilesets/cave.2bpp.lz"
-TilesetCaveMeta:
-TilesetDarkCaveMeta:
+TilesetCaveMeta::
+TilesetDarkCaveMeta::
INCBIN "data/tilesets/cave_metatiles.bin"
-TilesetCaveColl:
-TilesetDarkCaveColl:
+TilesetCaveColl::
+TilesetDarkCaveColl::
INCLUDE "data/tilesets/cave_collision.asm"
SECTION "Tileset Data 3", ROMX
-TilesetTowerGFX:
+TilesetTowerGFX::
INCBIN "gfx/tilesets/tower.2bpp.lz"
-TilesetTowerMeta:
+TilesetTowerMeta::
INCBIN "data/tilesets/tower_metatiles.bin"
-TilesetTowerColl:
+TilesetTowerColl::
INCLUDE "data/tilesets/tower_collision.asm"
-TilesetLabGFX:
+TilesetLabGFX::
INCBIN "gfx/tilesets/lab.2bpp.lz"
-TilesetLabMeta:
+TilesetLabMeta::
INCBIN "data/tilesets/lab_metatiles.bin"
-TilesetLabColl:
+TilesetLabColl::
INCLUDE "data/tilesets/lab_collision.asm"
-TilesetMartGFX:
+TilesetMartGFX::
INCBIN "gfx/tilesets/mart.2bpp.lz"
-TilesetMartMeta:
+TilesetMartMeta::
INCBIN "data/tilesets/mart_metatiles.bin"
-TilesetMartColl:
+TilesetMartColl::
INCLUDE "data/tilesets/mart_collision.asm"
-TilesetGameCornerGFX:
+TilesetGameCornerGFX::
INCBIN "gfx/tilesets/game_corner.2bpp.lz"
-TilesetGameCornerMeta:
+TilesetGameCornerMeta::
INCBIN "data/tilesets/game_corner_metatiles.bin"
-TilesetGameCornerColl:
+TilesetGameCornerColl::
INCLUDE "data/tilesets/game_corner_collision.asm"
-TilesetTrainStationGFX:
+TilesetTrainStationGFX::
INCBIN "gfx/tilesets/train_station.2bpp.lz"
-TilesetTrainStationMeta:
+TilesetTrainStationMeta::
INCBIN "data/tilesets/train_station_metatiles.bin"
-TilesetTrainStationColl:
+TilesetTrainStationColl::
INCLUDE "data/tilesets/train_station_collision.asm"
-TilesetForestMeta:
+TilesetForestMeta::
INCBIN "data/tilesets/forest_metatiles.bin"
SECTION "Tileset Data 4", ROMX
-TilesetEliteFourRoomGFX:
+TilesetEliteFourRoomGFX::
INCBIN "gfx/tilesets/elite_four_room.2bpp.lz"
-TilesetEliteFourRoomMeta:
+TilesetEliteFourRoomMeta::
INCBIN "data/tilesets/elite_four_room_metatiles.bin"
-TilesetEliteFourRoomColl:
+TilesetEliteFourRoomColl::
INCLUDE "data/tilesets/elite_four_room_collision.asm"
-TilesetParkGFX:
+TilesetParkGFX::
INCBIN "gfx/tilesets/park.2bpp.lz"
-TilesetParkMeta:
+TilesetParkMeta::
INCBIN "data/tilesets/park_metatiles.bin"
-TilesetParkColl:
+TilesetParkColl::
INCLUDE "data/tilesets/park_collision.asm"
-TilesetRadioTowerGFX:
+TilesetRadioTowerGFX::
INCBIN "gfx/tilesets/radio_tower.2bpp.lz"
-TilesetRadioTowerMeta:
+TilesetRadioTowerMeta::
INCBIN "data/tilesets/radio_tower_metatiles.bin"
-TilesetRadioTowerColl:
+TilesetRadioTowerColl::
INCLUDE "data/tilesets/radio_tower_collision.asm"
-TilesetUndergroundGFX:
+TilesetUndergroundGFX::
INCBIN "gfx/tilesets/underground.2bpp.lz"
-TilesetUndergroundMeta:
+TilesetUndergroundMeta::
INCBIN "data/tilesets/underground_metatiles.bin"
-TilesetUndergroundColl:
+TilesetUndergroundColl::
INCLUDE "data/tilesets/underground_collision.asm"
-TilesetDarkCaveGFX:
+TilesetDarkCaveGFX::
INCBIN "gfx/tilesets/dark_cave.2bpp.lz"
-UnusedTilesetDarkCaveMeta:
+UnusedTilesetDarkCaveMeta::
INCBIN "data/tilesets/unused_dark_cave_metatiles.bin"
-UnusedTilesetDarkCaveColl:
+UnusedTilesetDarkCaveColl::
INCLUDE "data/tilesets/unused_dark_cave_collision.asm"
SECTION "Tileset Data 5", ROMX
-TilesetPokeComCenterGFX:
+TilesetPokeComCenterGFX::
INCBIN "gfx/tilesets/pokecom_center.2bpp.lz"
-TilesetPokeComCenterMeta:
+TilesetPokeComCenterMeta::
INCBIN "data/tilesets/pokecom_center_metatiles.bin"
-TilesetPokeComCenterColl:
+TilesetPokeComCenterColl::
INCLUDE "data/tilesets/pokecom_center_collision.asm"
-TilesetBattleTowerInsideGFX:
+TilesetBattleTowerInsideGFX::
INCBIN "gfx/tilesets/battle_tower_inside.2bpp.lz"
-TilesetBattleTowerInsideMeta:
+TilesetBattleTowerInsideMeta::
INCBIN "data/tilesets/battle_tower_inside_metatiles.bin"
-TilesetBattleTowerInsideColl:
+TilesetBattleTowerInsideColl::
INCLUDE "data/tilesets/battle_tower_inside_collision.asm"
-TilesetGateGFX:
+TilesetGateGFX::
INCBIN "gfx/tilesets/gate.2bpp.lz"
-TilesetGateMeta:
+TilesetGateMeta::
INCBIN "data/tilesets/gate_metatiles.bin"
-TilesetGateColl:
+TilesetGateColl::
INCLUDE "data/tilesets/gate_collision.asm"
-TilesetJohtoModernGFX:
-TilesetBattleTowerOutsideGFX:
+TilesetJohtoModernGFX::
+TilesetBattleTowerOutsideGFX::
INCBIN "gfx/tilesets/johto_modern.2bpp.lz"
-TilesetJohtoModernMeta:
+TilesetJohtoModernMeta::
INCBIN "data/tilesets/johto_modern_metatiles.bin"
-TilesetJohtoModernColl:
+TilesetJohtoModernColl::
INCLUDE "data/tilesets/johto_modern_collision.asm"
-TilesetTraditionalHouseGFX:
+TilesetTraditionalHouseGFX::
INCBIN "gfx/tilesets/traditional_house.2bpp.lz"
-TilesetTraditionalHouseMeta:
+TilesetTraditionalHouseMeta::
INCBIN "data/tilesets/traditional_house_metatiles.bin"
-TilesetTraditionalHouseColl:
+TilesetTraditionalHouseColl::
INCLUDE "data/tilesets/traditional_house_collision.asm"
SECTION "Tileset Data 6", ROMX
-TilesetForestGFX:
+TilesetForestGFX::
INCBIN "gfx/tilesets/forest.2bpp.lz"
-TilesetChampionsRoomGFX:
+TilesetChampionsRoomGFX::
INCBIN "gfx/tilesets/champions_room.2bpp.lz"
-TilesetChampionsRoomMeta:
+TilesetChampionsRoomMeta::
INCBIN "data/tilesets/champions_room_metatiles.bin"
-TilesetChampionsRoomColl:
+TilesetChampionsRoomColl::
INCLUDE "data/tilesets/champions_room_collision.asm"
-TilesetHouseGFX:
+TilesetHouseGFX::
INCBIN "gfx/tilesets/house.2bpp.lz"
-TilesetHouseMeta:
+TilesetHouseMeta::
INCBIN "data/tilesets/house_metatiles.bin"
-TilesetHouseColl:
+TilesetHouseColl::
INCLUDE "data/tilesets/house_collision.asm"
-TilesetLighthouseGFX:
+TilesetLighthouseGFX::
INCBIN "gfx/tilesets/lighthouse.2bpp.lz"
-TilesetLighthouseMeta:
+TilesetLighthouseMeta::
INCBIN "data/tilesets/lighthouse_metatiles.bin"
-TilesetLighthouseColl:
+TilesetLighthouseColl::
INCLUDE "data/tilesets/lighthouse_collision.asm"
-TilesetForestColl:
+TilesetForestColl::
INCLUDE "data/tilesets/forest_collision.asm"
-TilesetFacilityGFX:
+TilesetFacilityGFX::
INCBIN "gfx/tilesets/facility.2bpp.lz"
-TilesetFacilityMeta:
+TilesetFacilityMeta::
INCBIN "data/tilesets/facility_metatiles.bin"
-TilesetFacilityColl:
+TilesetFacilityColl::
INCLUDE "data/tilesets/facility_collision.asm"
-TilesetBattleTowerOutsideMeta:
+TilesetBattleTowerOutsideMeta::
INCBIN "data/tilesets/battle_tower_outside_metatiles.bin"
-TilesetBattleTowerOutsideColl:
+TilesetBattleTowerOutsideColl::
INCLUDE "data/tilesets/battle_tower_outside_collision.asm"
-TilesetBetaWordRoomMeta:
+TilesetBetaWordRoomMeta::
INCBIN "data/tilesets/beta_word_room_metatiles.bin"
-TilesetBetaWordRoomColl:
-TilesetHoOhWordRoomColl:
-TilesetKabutoWordRoomColl:
-TilesetOmanyteWordRoomColl:
-TilesetAerodactylWordRoomColl:
+TilesetBetaWordRoomColl::
+TilesetHoOhWordRoomColl::
+TilesetKabutoWordRoomColl::
+TilesetOmanyteWordRoomColl::
+TilesetAerodactylWordRoomColl::
INCLUDE "data/tilesets/beta_word_room_collision.asm"
SECTION "Tileset Data 7", ROMX
-TilesetRuinsOfAlphGFX:
-TilesetBetaWordRoomGFX:
-TilesetHoOhWordRoomGFX:
-TilesetKabutoWordRoomGFX:
-TilesetOmanyteWordRoomGFX:
-TilesetAerodactylWordRoomGFX:
+TilesetRuinsOfAlphGFX::
+TilesetBetaWordRoomGFX::
+TilesetHoOhWordRoomGFX::
+TilesetKabutoWordRoomGFX::
+TilesetOmanyteWordRoomGFX::
+TilesetAerodactylWordRoomGFX::
INCBIN "gfx/tilesets/ruins_of_alph.2bpp.lz"
-TilesetRuinsOfAlphMeta:
+TilesetRuinsOfAlphMeta::
INCBIN "data/tilesets/ruins_of_alph_metatiles.bin"
-TilesetRuinsOfAlphColl:
+TilesetRuinsOfAlphColl::
INCLUDE "data/tilesets/ruins_of_alph_collision.asm"
SECTION "Tileset Data 8", ROMX
-TilesetHoOhWordRoomMeta:
+TilesetHoOhWordRoomMeta::
INCBIN "data/tilesets/ho_oh_word_room_metatiles.bin"
-TilesetKabutoWordRoomMeta:
+TilesetKabutoWordRoomMeta::
INCBIN "data/tilesets/kabuto_word_room_metatiles.bin"
-TilesetOmanyteWordRoomMeta:
+TilesetOmanyteWordRoomMeta::
INCBIN "data/tilesets/omanyte_word_room_metatiles.bin"
-TilesetAerodactylWordRoomMeta:
+TilesetAerodactylWordRoomMeta::
INCBIN "data/tilesets/aerodactyl_word_room_metatiles.bin"
--- a/home.asm
+++ b/home.asm
@@ -5,7 +5,9 @@
NULL::
+
INCLUDE "home/rst.asm"
+
INCLUDE "home/interrupts.asm"
--- a/home/rst.asm
+++ b/home/rst.asm
@@ -26,12 +26,10 @@
add hl, de
ld a, [hli]
ld h, [hl]
+; SECTION "rst30", ROM0
ld l, a
pop de
jp hl
-
-; SECTION "rst30", ROM0
-; rst30 is midst rst28
SECTION "rst38", ROM0
rst $38
--- a/main.asm
+++ b/main.asm
@@ -87,7 +87,6 @@
INCLUDE "engine/events/print_unown.asm"
INCLUDE "engine/events/print_photo.asm"
INCLUDE "engine/pokemon/breeding.asm"
-INCLUDE "gfx/tilesets.asm"
SECTION "Roofs", ROMX