Skip to content

Commit

Permalink
Modularize the beach house.
Browse files Browse the repository at this point in the history
  • Loading branch information
iimarckus committed Oct 17, 2014
1 parent 16ad163 commit 1d57992
Show file tree
Hide file tree
Showing 12 changed files with 27 additions and 14 deletions.
2 changes: 1 addition & 1 deletion constants/map_constants.asm
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,6 @@ TRADE_CENTER EQU $F0
LORELEIS_ROOM EQU $F5
BRUNOS_ROOM EQU $F6
AGATHAS_ROOM EQU $F7
IF DEF(_YELLOW)
IF DEF(_OPTION_BEACH_HOUSE)
BEACH_HOUSE EQU $F8
ENDC
2 changes: 1 addition & 1 deletion constants/map_dimensions.asm
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,7 @@ BRUNOS_ROOM_WIDTH EQU $05
AGATHAS_ROOM_HEIGHT EQU $06
AGATHAS_ROOM_WIDTH EQU $05

IF DEF(_YELLOW)
IF DEF(_OPTION_BEACH_HOUSE)
BEACH_HOUSE_HEIGHT EQU 4
BEACH_HOUSE_WIDTH EQU 7
ENDC
2 changes: 1 addition & 1 deletion constants/tilesets.asm
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ LAB EQU 20
CLUB EQU 21
FACILITY EQU 22
PLATEAU EQU 23
IF DEF(_YELLOW)
IF DEF(_OPTION_BEACH_HOUSE)
BEACH_HOUSE_TILESET EQU 24
ENDC
2 changes: 1 addition & 1 deletion data/collision.asm
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ Lab_Coll:: INCBIN "gfx/tilesets/lab.tilecoll"
Club_Coll:: INCBIN "gfx/tilesets/club.tilecoll"
Facility_Coll:: INCBIN "gfx/tilesets/facility.tilecoll"
Plateau_Coll:: INCBIN "gfx/tilesets/plateau.tilecoll"
IF DEF(_YELLOW)
IF DEF(_OPTION_BEACH_HOUSE)
BeachHouse_Coll:: INCBIN "gfx/tilesets/beachhouse.tilecoll"
ENDC
8 changes: 4 additions & 4 deletions data/mapObjects/route19.asm
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
Route19Object: ; 0x54e9a (size=87)
db $43 ; border block

IF DEF(_YELLOW)
IF DEF(_OPTION_BEACH_HOUSE)
db $1 ; warps
db $9, $5, $0, BEACH_HOUSE
ELSE
db $0 ; warps
ENDC

db $1 ; signs
IF DEF(_YELLOW)
IF DEF(_OPTION_BEACH_HOUSE)
db $b,$b,$b
ELSE
db $9, $b, $b ; Route19Text11
ENDC

db $a ; people
IF DEF(_YELLOW)
IF DEF(_OPTION_BEACH_HOUSE)
db SPRITE_BLACK_HAIR_BOY_1, $7 + 4, $9 + 4, $ff, $d3, TRAINER | 1, SWIMMER + $C8, 2
db SPRITE_BLACK_HAIR_BOY_1, $9 + 4, $c + 4, $ff, $d2, TRAINER | 2, SWIMMER + $C8, 3
ELSE
Expand All @@ -33,6 +33,6 @@ ENDC
db SPRITE_SWIMMER, $2c + 4, $a + 4, $ff, $d0, TRAINER | $a, BEAUTY + $C8, $e

; warp-to
IF DEF(_YELLOW)
IF DEF(_OPTION_BEACH_HOUSE)
EVENT_DISP ROUTE_19_WIDTH, $9, $5 ; BEACH_HOUSE
ENDC
3 changes: 3 additions & 0 deletions data/map_header_banks.asm
Original file line number Diff line number Diff line change
Expand Up @@ -248,3 +248,6 @@ MapHeaderBanks: ; c23d (3:423d)
db BANK(Lorelei_h)
db BANK(Bruno_h)
db BANK(Agatha_h)
IF DEF(_OPTION_BEACH_HOUSE)
db BANK(BeachHouse_h)
ENDC
3 changes: 3 additions & 0 deletions data/map_header_pointers.asm
Original file line number Diff line number Diff line change
Expand Up @@ -248,3 +248,6 @@ MapHeaderPointers:: ; 01ae (0:01ae)
dw Lorelei_h
dw Bruno_h
dw Agatha_h ;247
IF DEF(_OPTION_BEACH_HOUSE)
dw BeachHouse_h
ENDC
3 changes: 3 additions & 0 deletions data/map_songs.asm
Original file line number Diff line number Diff line change
Expand Up @@ -247,3 +247,6 @@ MapSongBanks: ; c04d (3:404d)
db MUSIC_GYM, BANK(Music_Gym) ; Lorelei
db MUSIC_DUNGEON1, BANK(Music_Dungeon1) ; Bruno
db MUSIC_POKEMON_TOWER, BANK(Music_PokemonTower) ; Agatha
IF DEF(_OPTION_BEACH_HOUSE)
db MUSIC_ROUTES3, BANK(Music_Routes3) ; BeachHouse
ENDC
2 changes: 1 addition & 1 deletion data/tileset_headers.asm
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ Tilesets: ; c7be (3:47be)
tileset Club_Block, Club_GFX, Club_Coll, $07,$17,$FF, $FF, INDOOR
tileset Facility_Block, Facility_GFX, Facility_Coll, $12,$FF,$FF, $FF, CAVE
tileset Plateau_Block, Plateau_GFX, Plateau_Coll, $FF,$FF,$FF, $45, CAVE
IF DEF(_YELLOW)
IF DEF(_OPTION_BEACH_HOUSE)
tileset BeachHouse_Block, BeachHouse_GFX, BeachHouse_Coll, $FF,$FF,$FF, $FF, INDOOR
ENDC
11 changes: 7 additions & 4 deletions main.asm
Original file line number Diff line number Diff line change
Expand Up @@ -5715,8 +5715,11 @@ CeladonHotelBlocks: INCBIN "maps/celadonhotel.blk"

INCLUDE "data/mapHeaders/mtmoonpokecenter.asm"
INCLUDE "scripts/mtmoonpokecenter.asm"
IF DEF(_YELLOW)
IF DEF(_OPTION_BEACH_HOUSE)
INCLUDE "data/mapHeaders/beach_house.asm"
INCLUDE "scripts/beach_house.asm"
BeachHouseBlockdata: INCBIN "maps/beach_house.blk"
INCLUDE "data/mapObjects/beach_house.asm"
ENDC
INCLUDE "data/mapObjects/mtmoonpokecenter.asm"

Expand Down Expand Up @@ -5965,7 +5968,7 @@ Route17Blocks: INCBIN "maps/route17.blk"

INCLUDE "data/mapHeaders/route19.asm"
INCLUDE "data/mapObjects/route19.asm"
IF DEF(_YELLOW)
IF DEF(_OPTION_BEACH_HOUSE)
Route19Blocks: INCBIN "maps/route19-yellow.blk"
ELSE
Route19Blocks: INCBIN "maps/route19.blk"
Expand Down Expand Up @@ -6636,8 +6639,8 @@ INCLUDE "engine/overworld/elevator.asm"

INCLUDE "engine/items/tm_prices.asm"

IF DEF(_YELLOW)
SECTION "bank3C",ROMX[$314],BANK[$3C]
IF DEF(_OPTION_BEACH_HOUSE)
SECTION "bank3C",ROMX[$4314],BANK[$3C]

BeachHouse_GFX:
INCBIN "gfx/tilesets/beachhouse.2bpp"
Expand Down
2 changes: 1 addition & 1 deletion text.asm
Original file line number Diff line number Diff line change
Expand Up @@ -2135,7 +2135,7 @@ INCLUDE "text/maps/route_16_gate_upstairs.asm"
INCLUDE "text/maps/route_16_house.asm"
INCLUDE "text/maps/route_18_gate.asm"
INCLUDE "text/maps/route_18_gate_upstairs.asm"
IF DEF(_YELLOW)
IF DEF(_OPTION_BEACH_HOUSE)
INCLUDE "text/maps/beach_house.asm"
ENDC
INCLUDE "text/maps/pokemon_league_gate.asm"
Expand Down
1 change: 1 addition & 0 deletions yellow.asm
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
_YELLOW EQU 1
_OPTION_BEACH_HOUSE EQU 1

0 comments on commit 1d57992

Please sign in to comment.