shithub: pokered

Download patch

ref: 7db2fe99f83e196a92bd3dab2e4c6b8c7b191682
parent: a3d3f8324a670aad8bf1348b65192544c8ab2d9f
author: IIMarckus <iimarckus@gmail.com>
date: Fri Oct 17 04:13:51 EDT 2014

Add more from the beach house.

--- a/constants/map_dimensions.asm
+++ b/constants/map_dimensions.asm
@@ -890,4 +890,9 @@
 
 ; Agatha_h map_id=247
 AGATHAS_ROOM_HEIGHT EQU $06
-AGATHAS_ROOM_WIDTH  EQU $05
\ No newline at end of file
+AGATHAS_ROOM_WIDTH  EQU $05
+
+IF DEF(_YELLOW)
+BEACH_HOUSE_HEIGHT EQU 4
+BEACH_HOUSE_WIDTH  EQU 7
+ENDC
--- a/constants/tilesets.asm
+++ b/constants/tilesets.asm
@@ -22,4 +22,6 @@
 CLUB         EQU 21
 FACILITY     EQU 22
 PLATEAU      EQU 23
-
+IF DEF(_YELLOW)
+BEACH_HOUSE_TILESET EQU 24
+ENDC
--- /dev/null
+++ b/data/mapHeaders/beach_house.asm
@@ -1,0 +1,6 @@
+BeachHouse_h: 
+	db BEACH_HOUSE_TILESET
+	dw BEACH_HOUSE_HEIGHT, BEACH_HOUSE_WIDTH ; dimensions (y, x)
+	dw BeachHouseBlockdata,BeachHouseTextPointers,BeachHouseScript ; blocks, texts, scripts
+	db 0 ; connections
+	dw BeachHouseObjects ; objects
--- /dev/null
+++ b/data/mapObjects/beach_house.asm
@@ -1,0 +1,20 @@
+BeachHouseObjects: ; 0xf23a4
+	db $a ; border block
+
+	db 2 ; warps
+	db 7,2,0,$ff
+	db 7,3,0,$ff
+
+	db 4 ; signs
+	db 0,3,3
+	db 0,7,4,
+	db 0,$b,5
+	db 1,$d,6
+
+	db 2 ; people
+	db $27, 3+4, 2+4, $ff, $d0, 1 ; surfin' dude
+	db $3d, 3+4, 5+4, $fe, $01, 2 ; pikachu
+
+	; warp-to
+	EVENT_DISP BEACH_HOUSE_WIDTH,7,2
+	EVENT_DISP BEACH_HOUSE_WIDTH,7,3
--- a/main.asm
+++ b/main.asm
@@ -5715,6 +5715,9 @@
 
 INCLUDE "data/mapHeaders/mtmoonpokecenter.asm"
 INCLUDE "scripts/mtmoonpokecenter.asm"
+IF DEF(_YELLOW)
+INCLUDE "scripts/beach_house.asm"
+ENDC
 INCLUDE "data/mapObjects/mtmoonpokecenter.asm"
 
 INCLUDE "data/mapHeaders/rocktunnelpokecenter.asm"
--- /dev/null
+++ b/maps/beach_house.blk
@@ -1,0 +1,1 @@
+		






\ No newline at end of file
--- /dev/null
+++ b/scripts/beach_house.asm
@@ -1,0 +1,195 @@
+BeachHouseScript:
+	call $3c29
+	ret
+
+BeachHouseTextPointers:
+	dw SurfinDudeText
+	dw BeachHousePikachuText
+	dw BeachHouseSign1Text
+	dw BeachHouseSign2Text
+	dw BeachHouseSign3Text
+	dw BeachHouseSign4Text
+
+SurfinDudeText:
+	db 8
+	ld a,[$d471]
+	bit 6,a
+	jr nz,.next
+	ld hl,.SurfinDudeText4
+	call PrintText
+	jr .xf2271
+.next
+	ld hl,$d492
+	bit 0,[hl]
+	set 0,[hl]
+	jr nz,.next2
+	ld hl,.SurfinDudeText1
+	jr .next3
+.next2
+	ld hl,.SurfinDudeText3
+.next3
+	call PrintText
+	call $35ef
+	ld a,[$cc26]
+	and a
+	jr nz,.xf226b
+	ld a,1
+	ld [$cc3c],a
+	ld b,$3e
+	ld hl,$4000
+	call $3e84
+	ld hl,$d492
+	set 1,[hl]
+	jr .xf2271
+.xf226b
+	ld hl,.SurfinDudeText2
+	call PrintText
+.xf2271
+	jp TextScriptEnd
+
+.SurfinDudeText1
+	TX_FAR _SurfinDudeText1
+	db "@"
+.SurfinDudeText2
+	TX_FAR _SurfinDudeText2
+	db "@"
+.SurfinDudeText3
+	TX_FAR _SurfinDudeText3
+	db "@"
+.SurfinDudeText4
+	TX_FAR _SurfinDudeText4
+	db "@"
+
+BeachHousePikachuText:
+	db 8
+	ld hl,.BeachHousePikachuText
+	call PrintText
+	ld a,PIKACHU
+	call PlayCry
+	call WaitForSoundToFinish
+	jp TextScriptEnd
+
+.BeachHousePikachuText
+	TX_FAR _BeachHousePikachuText
+	db "@"
+
+BeachHouseSign1Text:
+	db 8
+	ld hl,.BeachHouseSign1Text2
+	ld a,[$d471]
+	bit 6,a
+	jr z,.next
+	ld hl,.BeachHouseSign1Text1
+.next
+	call PrintText
+	jp TextScriptEnd
+
+.BeachHouseSign1Text1
+	TX_FAR _BeachHouseSign1Text1
+	db "@"
+.BeachHouseSign1Text2
+	TX_FAR _BeachHouseSign1Text2
+	db "@"
+
+BeachHouseSign2Text:
+	db 8
+	ld hl,.BeachHouseSign2Text2
+	ld a,[$d471]
+	bit 6,a
+	jr z,.next
+	ld hl,.BeachHouseSign2Text1
+.next
+	call PrintText
+	jp TextScriptEnd
+
+.BeachHouseSign2Text1
+	TX_FAR _BeachHouseSign2Text1
+	db "@"
+.BeachHouseSign2Text2
+	TX_FAR _BeachHouseSign2Text2
+	db "@"
+
+BeachHouseSign3Text:
+	db 8
+	ld hl,$62f4
+	ld a,[$d471]
+	bit 6,a
+	jr z,.next
+	ld hl,.BeachHouseSign3Text1
+.next
+	call PrintText
+	jp TextScriptEnd
+
+.BeachHouseSign3Text1
+	TX_FAR _BeachHouseSign3Text1
+	db "@"
+.BeachHouseSign3Text2
+	TX_FAR _BeachHouseSign3Text2
+	db "@"
+
+BeachHouseSign4Text:
+	db 8
+	ld a,1
+	ld [$cc3c],a
+	ld a,[$d471]
+	bit 6,a
+	jr z,.xf2369
+
+	ld hl,$d492
+	bit 1,[hl]
+	jr z,.next2
+	ld a,0
+	ld [$cc3c],a
+.next2
+	ld hl,.BeachHousePrinterText2
+	call PrintText
+	ld a,[$d492]
+	bit 1,a
+	jr z,.xf236f
+
+	ld a,1
+	ld [$cc3c],a
+	ld hl,.BeachHousePrinterText3
+	call PrintText
+	call $35ef
+	ld a,[$cc26]
+	and a
+	jp z,$63d0 ; 0xf23d0
+	call $36ec
+	ld hl,$d72f
+	set 6,[hl]
+	xor a
+	ld [$cfca],a
+	ld hl,$510a
+	ld b,$3a
+	call $3e84
+	call $3852
+	ld hl,$d72f
+	res 6,[hl]
+	call $3dd8
+	call $2f83
+	call $3dc2
+	call $36f8
+	call $3ddb
+	call $3de0
+	ld a,1
+	ld [$cfca],a
+	jr .xf236f
+.xf2369
+	ld hl,.BeachHousePrinterText1
+	call PrintText
+.xf236f
+	jp TextScriptEnd
+
+.BeachHousePrinterText1
+	TX_FAR _BeachHousePrinterText1
+	db $d,"@"
+.BeachHousePrinterText2
+	TX_FAR _BeachHousePrinterText2
+	db $d,"@"
+.BeachHousePrinterText3
+	TX_FAR _BeachHousePrinterText3
+	db "@"
+.xf2383
+	TX_FAR _BeachHousePrinterText4
+	db "@"
--- a/text.asm
+++ b/text.asm
@@ -2136,7 +2136,7 @@
 INCLUDE "text/maps/route_18_gate.asm"
 INCLUDE "text/maps/route_18_gate_upstairs.asm"
 IF DEF(_YELLOW)
-INCLUDE "text/maps/surf_house.asm"
+INCLUDE "text/maps/beach_house.asm"
 ENDC
 INCLUDE "text/maps/pokemon_league_gate.asm"
 INCLUDE "text/maps/victory_road_2f.asm"
--- /dev/null
+++ b/text/maps/beach_house.asm
@@ -1,0 +1,103 @@
+_SurfinDudeText1::
+	text "Whoa!"
+
+	para "Your PIKACHU knows"
+	line "how to SURF! So,"
+	cont "I'm not alone..."
+
+	para "Great! You earned"
+	line "the right to SURF"
+	cont "with the DUDE!"
+
+	para "Give it a go?"
+	done
+
+_SurfinDudeText2::
+	text "Come SURF anytime,"
+	line "my friend!"
+	done
+
+_SurfinDudeText3::
+	text "Wanna go SURF?"
+	done
+
+_SurfinDudeText4::
+	text "Dogs and burgers"
+	line "on special today!"
+	done
+
+_BeachHousePikachuText::
+	text "PIKACHU: Pikaa."
+	done
+
+_BeachHouseSign1Text1::
+	text "SURFIN' DUDE's"
+	line "scribbles..."
+
+	para "When I shoot the"
+	line "tube, the tunes"
+	cont "hit the groove!"
+	done
+
+_BeachHouseSign1Text2::
+	text "30 years of waves!"
+	line "SURFIN' DUDE"
+	done
+
+_BeachHouseSign2Text1::
+	text "SURFING TIP 1!"
+
+	para "After flips, line"
+	line "the board up with"
+	cont "a wave for a cool"
+	cont "effect!"
+	done
+
+_BeachHouseSign2Text2::
+	text "SUMMER BEACH HOUSE"
+	line "#MON welcome!"
+	done
+
+_BeachHouseSign3Text1::
+	text "SURFING TIP 2!"
+
+	para "Pulling flips in"
+	line "a jump is totally"
+	cont "rad!"
+	done
+
+_BeachHouseSign3Text2::
+	text "The sea unites"
+	line "all in surfdom!"
+	done
+
+_BeachHousePrinterText1::
+	text "It's some sort of"
+	line "a machine...@@"
+
+_BeachHousePrinterText2::
+	text "SUMMER BEACH HOUSE"
+	line "PRINTER, it says.@@"
+
+_BeachHousePrinterText3::
+	text "The Hi.Score is"
+	line "shown."
+
+	para "PRINT it out?"
+	done
+
+_BeachHousePrinterText4::
+	text "SUMMER BEACH HOUSE"
+	line "PRINTER, it says."
+
+	para "The Hi.Score is"
+	line "shown."
+
+	para "PRINT it out?"
+	done
+
+_BeachHousePrinterText5::
+	text "PRINT completed.@@"
+
+_BeachHousePrinterText6::
+	text "PRINT error!@@"
--- a/text/maps/surf_house.asm
+++ /dev/null
@@ -1,99 +1,0 @@
-SurfinDudeText1::
-	text "Whoa!"
-
-	para "Your PIKACHU knows"
-	line "how to SURF! So,"
-	cont "I'm not alone..."
-
-	para "Great! You earned"
-	line "the right to SURF"
-	cont "with the DUDE!"
-
-	para "Give it a go?"
-	done
-
-SurfinDudeText2::
-	text "Come SURF anytime,"
-	line "my friend!"
-	done
-
-SurfinDudeText3::
-	text "Wanna go SURF?"
-	done
-
-SurfinDudeText4::
-	text "Dogs and burgers"
-	line "on special today!"
-	done
-
-BeachHousePikachuText::
-	text "PIKACHU: Pikaa."
-	done
-
-BeachHouseSign1Text1::
-	text "SURFIN' DUDE's"
-	line "scribbles..."
-
-	para "When I shoot the"
-	line "tube, the tunes"
-	cont "hit the groove!"
-	done
-
-BeachHouseSign1Text2::
-	text "30 years of waves!"
-	line "SURFIN' DUDE"
-	done
-
-BeachHouseSign2Text1::
-	text "SURFING TIP 1!"
-
-	para "After flips, line"
-	line "the board up with"
-	cont "a wave for a cool"
-	cont "effect!"
-	done
-
-BeachHouseSign2Text2::
-	text "SUMMER BEACH HOUSE"
-	line "#MON welcome!"
-	done
-
-BeachHouseSign3Text1::
-	text "SURFING TIP 2!"
-
-	para "Pulling flips in"
-	line "a jump is totally"
-	cont "rad!"
-	done
-
-BeachHouseSign3Text2::
-	text "The sea unites"
-	line "all in surfdom!"
-	done
-
-BeachHousePrinterText1::
-	text "SUMMER BEACH HOUSE"
-	line "PRINTER, it says.@@"
-
-BeachHousePrinterText2::
-	text "The Hi.Score is"
-	line "shown."
-
-	para "PRINT it out?"
-	done
-
-BeachHousePrinterText3::
-	text "SUMMER BEACH HOUSE"
-	line "PRINTER, it says."
-
-	para "The Hi.Score is"
-	line "shown."
-
-	para "PRINT it out?"
-	done
-
-BeachHousePrinterText4::
-	text "PRINT completed.@@"
-
-BeachHousePrinterText5::
-	text "PRINT error!@@"