shithub: pokered

Download patch

ref: 4670a1ddae02fd73d8c4826f9d9c9948820636a0
parent: b1cb3788938fa981e65619f022a41f1c1d91ae3b
author: dannye <corrnondacqb@yahoo.com>
date: Thu Jul 16 19:21:57 EDT 2015

Swap trade center and battle center
also rename battle center to colosseum
closes https://github.com/iimarckus/pokered/issues/102

--- a/constants/map_constants.asm
+++ b/constants/map_constants.asm
@@ -237,8 +237,8 @@
 SILPH_CO_ELEVATOR EQU $EC
 ;EQU $ED
 ;EQU $EE
-BATTLE_CENTER EQU $EF
-TRADE_CENTER EQU $F0
+TRADE_CENTER EQU $EF
+COLOSSEUM EQU $F0
 ;EQU $F1
 ;EQU $F2
 ;EQU $F3
--- a/constants/map_dimensions.asm
+++ b/constants/map_dimensions.asm
@@ -872,13 +872,13 @@
 SILPH_CO_ELEVATOR_HEIGHT EQU $02
 SILPH_CO_ELEVATOR_WIDTH  EQU $02
 
-; BattleCenterM_h map_id=239
-BATTLE_CENTER_HEIGHT EQU $04
-BATTLE_CENTER_WIDTH  EQU $05
-
-; TradeCenterM_h map_id=240
+; TradeCenter_h map_id=239
 TRADE_CENTER_HEIGHT EQU $04
 TRADE_CENTER_WIDTH  EQU $05
+
+; Colosseum_h map_id=240
+COLOSSEUM_HEIGHT EQU $04
+COLOSSEUM_WIDTH  EQU $05
 
 ; Lorelei_h map_id=245
 LORELEIS_ROOM_HEIGHT EQU $06
--- a/data/hidden_objects.asm
+++ b/data/hidden_objects.asm
@@ -28,8 +28,8 @@
 	db SAFFRON_GYM
 	db MT_MOON_POKECENTER
 	db ROCK_TUNNEL_POKECENTER
-	db BATTLE_CENTER
 	db TRADE_CENTER
+	db COLOSSEUM
 	db VIRIDIAN_FOREST
 	db MT_MOON_3
 	db INDIGO_PLATEAU
@@ -117,8 +117,8 @@
 	dw SaffronGymHiddenObjects
 	dw MtMoonPokecenterHiddenObjects
 	dw RockTunnelPokecenterHiddenObjects
-	dw BattleCenterHiddenObjects
 	dw TradeCenterHiddenObjects
+	dw ColosseumHiddenObjects
 	dw ViridianForestHiddenObjects
 	dw MtMoon3HiddenObjects
 	dw IndigoPlateauHiddenObjects
@@ -175,7 +175,7 @@
 	dw Route4HiddenObjects
 
 ; format: y-coord, x-coord, text id/item id, object routine
-BattleCenterHiddenObjects: ; 46b40 (11:6b40)
+TradeCenterHiddenObjects: ; 46b40 (11:6b40)
 	db $04,$05,$d0
 	db BANK(CableClubRightGameboy)
 	dw CableClubRightGameboy
@@ -183,7 +183,7 @@
 	db BANK(CableClubLeftGameboy)
 	dw CableClubLeftGameboy
 	db $FF
-TradeCenterHiddenObjects: ; 46b4d (11:6b4d)
+ColosseumHiddenObjects: ; 46b4d (11:6b4d)
 	db $04,$05,$d0
 	db BANK(CableClubRightGameboy)
 	dw CableClubRightGameboy
--- a/data/mapHeaders/battlecenterm.asm
+++ /dev/null
@@ -1,6 +1,0 @@
-BattleCenterM_h: ; 0x4fd04 to 0x4fd10 (12 bytes) (id=239)
-	db CLUB ; tileset
-	db BATTLE_CENTER_HEIGHT, BATTLE_CENTER_WIDTH ; dimensions (y, x)
-	dw BattleCenterMBlocks, BattleCenterMTextPointers, BattleCenterMScript ; blocks, texts, scripts
-	db $00 ; connections
-	dw BattleCenterMObject ; objects
--- /dev/null
+++ b/data/mapHeaders/colosseum.asm
@@ -1,0 +1,6 @@
+Colosseum_h: ; 0x4fd71 to 0x4fd7d (12 bytes) (id=240)
+	db CLUB ; tileset
+	db COLOSSEUM_HEIGHT, COLOSSEUM_WIDTH ; dimensions (y, x)
+	dw ColosseumBlocks, ColosseumTextPointers, ColosseumScript ; blocks, texts, scripts
+	db $00 ; connections
+	dw ColosseumObject ; objects
--- /dev/null
+++ b/data/mapHeaders/tradecenter.asm
@@ -1,0 +1,6 @@
+TradeCenter_h: ; 0x4fd04 to 0x4fd10 (12 bytes) (id=239)
+	db CLUB ; tileset
+	db TRADE_CENTER_HEIGHT, TRADE_CENTER_WIDTH ; dimensions (y, x)
+	dw TradeCenterBlocks, TradeCenterTextPointers, TradeCenterScript ; blocks, texts, scripts
+	db $00 ; connections
+	dw TradeCenterObject ; objects
--- a/data/mapHeaders/tradecenterm.asm
+++ /dev/null
@@ -1,6 +1,0 @@
-TradeCenterM_h: ; 0x4fd71 to 0x4fd7d (12 bytes) (id=240)
-	db CLUB ; tileset
-	db TRADE_CENTER_HEIGHT, TRADE_CENTER_WIDTH ; dimensions (y, x)
-	dw TradeCenterMBlocks, TradeCenterMTextPointers, TradeCenterMScript ; blocks, texts, scripts
-	db $00 ; connections
-	dw TradeCenterMObject ; objects
--- a/data/mapObjects/battlecenterm.asm
+++ /dev/null
@@ -1,9 +1,0 @@
-BattleCenterMObject: ; 0x4fd53 (size=10)
-	db $e ; border block
-
-	db $0 ; warps
-
-	db $0 ; signs
-
-	db $1 ; people
-	db SPRITE_RED, $2 + 4, $2 + 4, $ff, $0, $1 ; person
--- /dev/null
+++ b/data/mapObjects/colosseum.asm
@@ -1,0 +1,9 @@
+ColosseumObject: ; 0x4fd87 (size=10)
+	db $e ; border block
+
+	db $0 ; warps
+
+	db $0 ; signs
+
+	db $1 ; people
+	db SPRITE_RED, $2 + 4, $2 + 4, $ff, $0, $1 ; person
--- /dev/null
+++ b/data/mapObjects/tradecenter.asm
@@ -1,0 +1,9 @@
+TradeCenterObject: ; 0x4fd53 (size=10)
+	db $e ; border block
+
+	db $0 ; warps
+
+	db $0 ; signs
+
+	db $1 ; people
+	db SPRITE_RED, $2 + 4, $2 + 4, $ff, $0, $1 ; person
--- a/data/mapObjects/tradecenterm.asm
+++ /dev/null
@@ -1,9 +1,0 @@
-TradeCenterMObject: ; 0x4fd87 (size=10)
-	db $e ; border block
-
-	db $0 ; warps
-
-	db $0 ; signs
-
-	db $1 ; people
-	db SPRITE_RED, $2 + 4, $2 + 4, $ff, $0, $1 ; person
--- a/data/map_header_banks.asm
+++ b/data/map_header_banks.asm
@@ -239,8 +239,8 @@
 	db BANK(SilphCoElevator_h)
 	db $11
 	db $11
-	db BANK(BattleCenterM_h)
-	db BANK(TradeCenterM_h)
+	db BANK(TradeCenter_h)
+	db BANK(Colosseum_h)
 	db $11
 	db $11
 	db $11
--- a/data/map_header_pointers.asm
+++ b/data/map_header_pointers.asm
@@ -239,8 +239,8 @@
 	dw SilphCoElevator_h
 	dw SilphCo2_h ; unused
 	dw SilphCo2_h ; unused
-	dw BattleCenterM_h
-	dw TradeCenterM_h
+	dw TradeCenter_h
+	dw Colosseum_h
 	dw SilphCo2_h ; unused
 	dw SilphCo2_h ; unused
 	dw SilphCo2_h ; unused
--- a/data/map_songs.asm
+++ b/data/map_songs.asm
@@ -238,8 +238,8 @@
 	db MUSIC_SILPH_CO, BANK(Music_SilphCo) ; SilphCoElevator
 	db MUSIC_SILPH_CO, BANK(Music_SilphCo)
 	db MUSIC_SILPH_CO, BANK(Music_SilphCo)
-	db MUSIC_CELADON, BANK(Music_Celadon) ; BattleCenterM
-	db MUSIC_CELADON, BANK(Music_Celadon) ; TradeCenterM
+	db MUSIC_CELADON, BANK(Music_Celadon) ; TradeCenter
+	db MUSIC_CELADON, BANK(Music_Celadon) ; Colosseum
 	db MUSIC_SILPH_CO, BANK(Music_SilphCo)
 	db MUSIC_SILPH_CO, BANK(Music_SilphCo)
 	db MUSIC_SILPH_CO, BANK(Music_SilphCo)
--- a/data/special_warps.asm
+++ b/data/special_warps.asm
@@ -39,24 +39,24 @@
 	FLYWARP_DATA REDS_HOUSE_2F_WIDTH,6,3
 	db REDS_HOUSE_2
 
-BattleCenterSpec1: ; 6428 (1:6428)
-	db BATTLE_CENTER
-	FLYWARP_DATA BATTLE_CENTER_WIDTH,4,3
-	db CLUB
-
-BattleCenterSpec2: ; 6430 (1:6430)
-	db BATTLE_CENTER
-	FLYWARP_DATA BATTLE_CENTER_WIDTH,4,6
-	db CLUB
-
-TradeCenterSpec1: ; 6438 (1:6438)
+TradeCenterSpec1: ; 6428 (1:6428)
 	db TRADE_CENTER
 	FLYWARP_DATA TRADE_CENTER_WIDTH,4,3
 	db CLUB
 
-TradeCenterSpec2: ; 6440 (1:6440)
+TradeCenterSpec2: ; 6430 (1:6430)
 	db TRADE_CENTER
 	FLYWARP_DATA TRADE_CENTER_WIDTH,4,6
+	db CLUB
+
+ColosseumSpec1: ; 6438 (1:6438)
+	db COLOSSEUM
+	FLYWARP_DATA COLOSSEUM_WIDTH,4,3
+	db CLUB
+
+ColosseumSpec2: ; 6440 (1:6440)
+	db COLOSSEUM
+	FLYWARP_DATA COLOSSEUM_WIDTH,4,6
 	db CLUB
 
 FlyWarpDataPtr: ; 6448 (1:6448)
--- a/engine/cable_club.asm
+++ b/engine/cable_club.asm
@@ -1,5 +1,5 @@
-; performs the appropriate action when the player uses the gameboy on the table in the Colosseum or Trade Centre
-; In the Colosseum, it starts a battle. In the Trade Centre, it displays the trade selection screen.
+; performs the appropriate action when the player uses the gameboy on the table in the Colosseum or Trade Center
+; In the Colosseum, it starts a battle. In the Trade Center, it displays the trade selection screen.
 ; Before doing either action, it swaps random numbers, trainer names and party data with the other gameboy.
 CableClub_DoBattleOrTrade: ; 5317 (1:5317)
 	ld c, 80
--- a/engine/menu/bills_pc.asm
+++ b/engine/menu/bills_pc.asm
@@ -516,7 +516,7 @@
 	cp SPRITE_FACING_RIGHT
 	ret nz
 	ld a, [W_CURMAP]
-	cp BATTLE_CENTER
+	cp TRADE_CENTER
 	ld a, LINK_STATE_START_TRADE
 	jr z, .asm_2183a
 	inc a ; LINK_STATE_START_BATTLE
@@ -533,7 +533,7 @@
 	cp SPRITE_FACING_LEFT
 	ret nz
 	ld a, [W_CURMAP]
-	cp BATTLE_CENTER
+	cp TRADE_CENTER
 	ld a, LINK_STATE_START_TRADE
 	jr z, .asm_2185a
 	inc a ; LINK_STATE_START_BATTLE
--- a/engine/menu/main_menu.asm
+++ b/engine/menu/main_menu.asm
@@ -145,7 +145,7 @@
 	call TextBoxBorder
 	call UpdateSprites
 	hlCoord 7, 7
-	ld de, TradeCenterText
+	ld de, CableClubOptionsText
 	call PlaceString
 	xor a
 	ld [wcd37], a
@@ -255,9 +255,9 @@
 	ld [wWalkBikeSurfState], a ; start walking
 	ld a, [wCurrentMenuItem]
 	and a
-	ld a, TRADE_CENTER
+	ld a, COLOSSEUM
 	jr nz, .next
-	ld a, BATTLE_CENTER
+	ld a, TRADE_CENTER
 .next
 	ld [wd72d], a
 	ld hl, PleaseWaitText
@@ -332,7 +332,7 @@
 	db "NEW GAME", $4e
 	db "OPTION@"
 
-TradeCenterText: ; 5d97 (1:5d97)
+CableClubOptionsText: ; 5d97 (1:5d97)
 	db "TRADE CENTER", $4e
 	db "COLOSSEUM",    $4e
 	db "CANCEL@"
--- a/main.asm
+++ b/main.asm
@@ -630,24 +630,24 @@
 ; gets the map ID, tile block map view pointer, tileset, and coordinates
 LoadSpecialWarpData: ; 62ff (1:62ff)
 	ld a, [wd72d]
-	cp BATTLE_CENTER
-	jr nz, .notBattleCenter
-	ld hl, BattleCenterSpec1
-	ld a, [hSerialConnectionStatus]
-	cp USING_INTERNAL_CLOCK ; which gameboy is clocking determines who is on the left and who is on the right
-	jr z, .copyWarpData
-	ld hl, BattleCenterSpec2
-	jr .copyWarpData
-.notBattleCenter
 	cp TRADE_CENTER
 	jr nz, .notTradeCenter
 	ld hl, TradeCenterSpec1
 	ld a, [hSerialConnectionStatus]
-	cp USING_INTERNAL_CLOCK
+	cp USING_INTERNAL_CLOCK ; which gameboy is clocking determines who is on the left and who is on the right
 	jr z, .copyWarpData
 	ld hl, TradeCenterSpec2
 	jr .copyWarpData
 .notTradeCenter
+	cp COLOSSEUM
+	jr nz, .notColosseum
+	ld hl, ColosseumSpec1
+	ld a, [hSerialConnectionStatus]
+	cp USING_INTERNAL_CLOCK
+	jr z, .copyWarpData
+	ld hl, ColosseumSpec2
+	jr .copyWarpData
+.notColosseum
 	ld a, [wd732]
 	bit 1, a
 	jr nz, .notFirstMap
@@ -5872,15 +5872,15 @@
 AgathaPic::        INCBIN "pic/trainer/agatha.pic"
 LancePic::         INCBIN "pic/trainer/lance.pic"
 
-INCLUDE "data/mapHeaders/battlecenterm.asm"
-INCLUDE "scripts/battlecenterm.asm"
-INCLUDE "data/mapObjects/battlecenterm.asm"
-BattleCenterMBlocks: INCBIN "maps/battlecenterm.blk"
+INCLUDE "data/mapHeaders/tradecenter.asm"
+INCLUDE "scripts/tradecenter.asm"
+INCLUDE "data/mapObjects/tradecenter.asm"
+TradeCenterBlocks: INCBIN "maps/tradecenter.blk"
 
-INCLUDE "data/mapHeaders/tradecenterm.asm"
-INCLUDE "scripts/tradecenterm.asm"
-INCLUDE "data/mapObjects/tradecenterm.asm"
-TradeCenterMBlocks: INCBIN "maps/tradecenterm.blk"
+INCLUDE "data/mapHeaders/colosseum.asm"
+INCLUDE "scripts/colosseum.asm"
+INCLUDE "data/mapObjects/colosseum.asm"
+ColosseumBlocks: INCBIN "maps/colosseum.blk"
 
 INCLUDE "engine/give_pokemon.asm"
 
--- a/maps/battlecenterm.blk
+++ /dev/null
@@ -1,4 +1,0 @@
-
-
- !"#
-
--- /dev/null
+++ b/maps/colosseum.blk
@@ -1,0 +1,6 @@
+
+
+
+
+
+
--- /dev/null
+++ b/maps/tradecenter.blk
@@ -1,0 +1,4 @@
+
+
+ !"#
+
--- a/maps/tradecenterm.blk
+++ /dev/null
@@ -1,6 +1,0 @@
-
-
-
-
-
-
--- a/scripts/battlecenterm.asm
+++ /dev/null
@@ -1,38 +1,0 @@
-BattleCenterMScript: ; 4fd10 (13:7d10)
-	call EnableAutoTextBoxDrawing
-	ld a, [$ffaa]
-	cp $2
-	ld a, $8
-	jr z, .asm_4fd1d
-	ld a, $c
-.asm_4fd1d
-	ld [$ff8d], a
-	ld a, $1
-	ld [$ff8c], a
-	call SetSpriteFacingDirection
-	ld hl, wd72d
-	bit 0, [hl]
-	set 0, [hl]
-	ret nz
-	ld hl, wSpriteStateData2 + $14
-	ld a, $8
-	ld [hli], a
-	ld a, $a
-	ld [hl], a
-	ld a, SPRITE_FACING_LEFT
-	ld [wSpriteStateData1 + $19], a
-	ld a, [$ffaa]
-	cp $2
-	ret z
-	ld a, $7
-	ld [wSpriteStateData2 + $15], a
-	ld a, SPRITE_FACING_RIGHT
-	ld [wSpriteStateData1 + $19], a
-	ret
-
-BattleCenterMTextPointers: ; 4fd4c (13:7d4c)
-	dw BattleCenterMText1
-
-BattleCenterMText1: ; 4fd4e (13:7d4e)
-	TX_FAR _BattleCenterMText1
-	db "@"
--- /dev/null
+++ b/scripts/colosseum.asm
@@ -1,0 +1,9 @@
+ColosseumScript: ; 4fd7d (13:7d7d)
+	jp TradeCenterScript
+
+ColosseumTextPointers: ; 4fd80 (13:7d80)
+	dw ColosseumText1
+
+ColosseumText1: ; 4fd82 (13:7d82)
+	TX_FAR _ColosseumText1
+	db "@"
--- /dev/null
+++ b/scripts/tradecenter.asm
@@ -1,0 +1,38 @@
+TradeCenterScript: ; 4fd10 (13:7d10)
+	call EnableAutoTextBoxDrawing
+	ld a, [$ffaa]
+	cp $2
+	ld a, $8
+	jr z, .asm_4fd1d
+	ld a, $c
+.asm_4fd1d
+	ld [$ff8d], a
+	ld a, $1
+	ld [$ff8c], a
+	call SetSpriteFacingDirection
+	ld hl, wd72d
+	bit 0, [hl]
+	set 0, [hl]
+	ret nz
+	ld hl, wSpriteStateData2 + $14
+	ld a, $8
+	ld [hli], a
+	ld a, $a
+	ld [hl], a
+	ld a, SPRITE_FACING_LEFT
+	ld [wSpriteStateData1 + $19], a
+	ld a, [$ffaa]
+	cp $2
+	ret z
+	ld a, $7
+	ld [wSpriteStateData2 + $15], a
+	ld a, SPRITE_FACING_RIGHT
+	ld [wSpriteStateData1 + $19], a
+	ret
+
+TradeCenterTextPointers: ; 4fd4c (13:7d4c)
+	dw TradeCenterText1
+
+TradeCenterText1: ; 4fd4e (13:7d4e)
+	TX_FAR _TradeCenterText1
+	db "@"
--- a/scripts/tradecenterm.asm
+++ /dev/null
@@ -1,9 +1,0 @@
-TradeCenterMScript: ; 4fd7d (13:7d7d)
-	jp BattleCenterMScript
-
-TradeCenterMTextPointers: ; 4fd80 (13:7d80)
-	dw TradeCenterMText1
-
-TradeCenterMText1: ; 4fd82 (13:7d82)
-	TX_FAR _TradeCenterMText1
-	db "@"
--- a/text.asm
+++ b/text.asm
@@ -2494,11 +2494,11 @@
 	line "dream was eaten!"
 	prompt
 
-_BattleCenterMText1:: ; 94b01 (25:4b01)
+_TradeCenterText1:: ; 94b01 (25:4b01)
 	text "!"
 	done
 
-_TradeCenterMText1:: ; 94b04 (25:4b04)
+_ColosseumText1:: ; 94b04 (25:4b04)
 	text "!"
 	done