Merge pull request #424 from roukaour/master

Rename a routine and some maps; remove all code from main.asm
This commit is contained in:
yenatch 2017-12-24 20:29:55 -05:00 committed by GitHub
commit c2a7216d9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
100 changed files with 1471 additions and 1450 deletions

6
FAQ.md
View File

@ -8,6 +8,7 @@
- [Can't build ROM; "Segmentation fault" from `rgbgfx`](#cant-build-rom-segmentation-fault-from-rgbgfx)
- [Can't build ROM; "Section is too big" or "Unable to place section in bank"](#cant-build-rom-section-is-too-big-or-unable-to-place-section-in-bank)
- [How do I edit maps?](#how-do-i-edit-maps)
- [How do I write new features?](#how-do-i-write-new-features)
- [I need more help!](#i-need-more-help)
@ -38,6 +39,11 @@ If you added or changed any code, it has to fit in the **memory banks**. The 2MB
For `asm` scripts, read [docs/map_scripts.md](docs/map_scripts.md). For `blk` layouts, try [crowdmap](crowdmap) or [Polished Map](polished-map).
## How do I write new features?
There are a number of special-purpose scripting languages used for different purposes, as described in [docs](docs/). For more general features, you'll need to code directly in assembly language. See [docs/assembly_programming.md](docs/assembly_programming.md).
## I need more help!
Try asking on IRC or Discord (see [README.md](README.md)).

View File

@ -1166,7 +1166,7 @@ Cry_Weepinbell: ; f35ca
musicheader 1, 8, Cry_Weepinbell_Ch8
; f35d3
Unknown_Cry_Ch5: ; f35d3
Unused_Cry_Ch5: ; f35d3
sound_duty 0, 0, 3, 3
sound __, 16, $e0, $0780
sound __, 16, $f0, $0784
@ -1177,7 +1177,7 @@ Unknown_Cry_Ch5: ; f35d3
endchannel
; f35ee
Unknown_Cry_Ch6: ; f35ee
Unused_Cry_Ch6: ; f35ee
sound_duty 1, 1, 0, 0
sound __, 16, $a0, $0741
sound __, 16, $b0, $0743
@ -1188,7 +1188,7 @@ Unknown_Cry_Ch6: ; f35ee
endchannel
; f3609
Unknown_Cry_Ch8: ; f3609
Unused_Cry_Ch8: ; f3609
noise __, 3, $f2, $4c
noise __, 7, $e0, $3a
noise __, 16, $d0, $3a

View File

@ -968,14 +968,14 @@ Sfx_Fanfare2: ; f0d56
musicheader 1, 8, Sfx_Fanfare2_Ch8
; f0d5f
UnknownSfx: ; f0d5f
musicheader 4, 5, UnknownSfx_Ch5
musicheader 1, 6, UnknownSfx_Ch6
musicheader 1, 7, UnknownSfx_Ch7
musicheader 1, 8, UnknownSfx_Ch8
UnusedSfx: ; f0d5f
musicheader 4, 5, UnusedSfx_Ch5
musicheader 1, 6, UnusedSfx_Ch6
musicheader 1, 7, UnusedSfx_Ch7
musicheader 1, 8, UnusedSfx_Ch8
; f0d6b
UnknownSfx_Ch5: ; f0d6b
UnusedSfx_Ch5: ; f0d6b
togglesfx
tempo 124
volume $77
@ -1000,7 +1000,7 @@ UnknownSfx_Ch5: ; f0d6b
endchannel
; f0d8a
UnknownSfx_Ch6: ; f0d8a
UnusedSfx_Ch6: ; f0d8a
togglesfx
vibrato $8, $27
dutycycle $2
@ -1025,7 +1025,7 @@ UnknownSfx_Ch6: ; f0d8a
endchannel
; f0da6
UnknownSfx_Ch7: ; f0da6
UnusedSfx_Ch7: ; f0da6
togglesfx
notetype $c, $25
octave 4
@ -1041,7 +1041,7 @@ UnknownSfx_Ch7: ; f0da6
endchannel
; f0db6
UnknownSfx_Ch8: ; f0db6
UnusedSfx_Ch8: ; f0db6
togglesfx
sfxtogglenoise $4
notetype $c

View File

@ -2573,11 +2573,11 @@ WinTrainerBattle: ; 3cfa4
.CheckMaxedOutMomMoney: ; 3d0b1
ld hl, wMomsMoney + 2
ld a, [hld]
cp 999999 % $100
cp MAX_MONEY % $100
ld a, [hld]
sbc 999999 / $100 % $100
sbc MAX_MONEY / $100 % $100
ld a, [hl]
sbc 999999 / $10000 % $100
sbc MAX_MONEY / $10000 % $100
ret
; 3d0be
@ -2602,17 +2602,17 @@ AddBattleMoneyToAccount: ; 3d0be
jr nz, .loop
pop hl
ld a, [hld]
cp 999999 % $100
cp MAX_MONEY % $100
ld a, [hld]
sbc 999999 / $100 % $100
sbc MAX_MONEY / $100 % $100
ld a, [hl]
sbc 999999 / $10000 % $100
sbc MAX_MONEY / $10000 % $100
ret c
ld [hl], 999999 / $10000 % $100
ld [hl], MAX_MONEY / $10000 % $100
inc hl
ld [hl], 999999 / $100 % $100
ld [hl], MAX_MONEY / $100 % $100
inc hl
ld [hl], 999999 % $100
ld [hl], MAX_MONEY % $100
ret
; 3d0ea
@ -7009,14 +7009,14 @@ ApplyStatLevelMultiplier: ; 3ecb7
; Cap at 999.
ld a, [hQuotient + 2]
sub 999 % $100
sub MAX_STAT_VALUE % $100
ld a, [hQuotient + 1]
sbc 999 / $100
sbc MAX_STAT_VALUE / $100
jp c, .okay3
ld a, 999 / $100
ld a, MAX_STAT_VALUE / $100
ld [hQuotient + 1], a
ld a, 999 % $100
ld a, MAX_STAT_VALUE % $100
ld [hQuotient + 2], a
.okay3
@ -7132,13 +7132,13 @@ BoostStat: ; 3ed7c
; Cap at 999.
ld a, [hld]
sub 999 % $100
sub MAX_STAT_VALUE % $100
ld a, [hl]
sbc 999 / $100
sbc MAX_STAT_VALUE / $100
ret c
ld a, 999 / $100
ld a, MAX_STAT_VALUE / $100
ld [hli], a
ld a, 999 % $100
ld a, MAX_STAT_VALUE % $100
ld [hld], a
ret
; 3ed9f
@ -9135,10 +9135,10 @@ AddLastMobileBattleToLinkRecord: ; 3fa42
dec hl
ld a, [hl]
inc hl
cp 9999 / $100
cp MAX_LINK_RECORD / $100
ret c
ld a, [hl]
cp 9999 % $100
cp MAX_LINK_RECORD % $100
ret
; 3fac8

View File

@ -5651,10 +5651,10 @@ CheckIfStatCanBeRaised: ; 361ef
.no_carry
pop bc
ld a, [hld]
sub 999 % $100
sub MAX_STAT_VALUE % $100
jr nz, .not_already_max
ld a, [hl]
sbc 999 / $100
sbc MAX_STAT_VALUE / $100
jp z, .stats_already_max
.not_already_max
ld a, [hBattleTurn]
@ -6417,14 +6417,14 @@ CalcStats: ; 3661d
.check_maxed_out
ld a, [hQuotient + 2]
cp 999 % $100
cp MAX_STAT_VALUE % $100
ld a, b
sbc 999 / $100
sbc MAX_STAT_VALUE / $100
jr c, .not_maxed_out
ld a, 999 % $100
ld a, MAX_STAT_VALUE % $100
ld [hQuotient + 2], a
ld a, 999 / $100
ld a, MAX_STAT_VALUE / $100
ld [hQuotient + 1], a
.not_maxed_out

View File

@ -263,7 +263,6 @@ MoveFDDescription:
MoveFEDescription:
MoveFFDescription:
Move00Description:
UnknownMoveDescription:
db "?@"
PoundDescription:

View File

@ -54,6 +54,8 @@ NUM_STATS EQU const_value
STAT_MIN_NORMAL EQU 5
STAT_MIN_HP EQU 10
MAX_STAT_VALUE EQU 999
; shiny dvs
ATKDEFDV_SHINY EQU $EA
SPDSPCDV_SHINY EQU $AA

View File

@ -145,11 +145,11 @@
const EVENT_ILEX_FOREST_HIDDEN_ETHER
const EVENT_ILEX_FOREST_HIDDEN_SUPER_POTION
const EVENT_ILEX_FOREST_HIDDEN_FULL_HEAL
const EVENT_WAREHOUSE_ENTRANCE_HIDDEN_PARLYZ_HEAL
const EVENT_WAREHOUSE_ENTRANCE_HIDDEN_SUPER_POTION
const EVENT_WAREHOUSE_ENTRANCE_HIDDEN_ANTIDOTE
const EVENT_UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES_HIDDEN_MAX_POTION
const EVENT_UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES_HIDDEN_REVIVE
const EVENT_GOLDENROD_UNDERGROUND_HIDDEN_PARLYZ_HEAL
const EVENT_GOLDENROD_UNDERGROUND_HIDDEN_SUPER_POTION
const EVENT_GOLDENROD_UNDERGROUND_HIDDEN_ANTIDOTE
const EVENT_GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES_HIDDEN_MAX_POTION
const EVENT_GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES_HIDDEN_REVIVE
const EVENT_MOUNT_MORTAR_1F_OUTSIDE_HIDDEN_HYPER_POTION
const EVENT_MOUNT_MORTAR_1F_INSIDE_HIDDEN_MAX_REPEL
const EVENT_MOUNT_MORTAR_2F_INSIDE_HIDDEN_FULL_RESTORE
@ -238,8 +238,8 @@
const EVENT_GOT_TM29_PSYCHIC
; Kanto hidden items
const EVENT_DIGLETTS_CAVE_HIDDEN_MAX_REVIVE
const EVENT_UNDERGROUND_HIDDEN_FULL_RESTORE
const EVENT_UNDERGROUND_HIDDEN_X_SPECIAL
const EVENT_UNDERGROUND_PATH_HIDDEN_FULL_RESTORE
const EVENT_UNDERGROUND_PATH_HIDDEN_X_SPECIAL
const EVENT_ROCK_TUNNEL_1F_HIDDEN_X_ACCURACY
const EVENT_ROCK_TUNNEL_1F_HIDDEN_X_DEFEND
const EVENT_ROCK_TUNNEL_B1F_HIDDEN_MAX_POTION
@ -787,10 +787,10 @@
const EVENT_LEARNED_SLOWPOKETAIL
const EVENT_LEARNED_RATICATE_TAIL
const EVENT_OPENED_DOOR_TO_GIOVANNIS_OFFICE
const EVENT_WAREHOUSE_LAYOUT_1
const EVENT_WAREHOUSE_LAYOUT_2
const EVENT_WAREHOUSE_LAYOUT_3
const EVENT_WAREHOUSE_BLOCKED_OFF
const EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_1
const EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_2
const EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_3
const EVENT_GOLDENROD_UNDERGROUND_WAREHOUSE_BLOCKED_OFF
const EVENT_LEFT_MONS_WITH_CONTEST_OFFICER
const EVENT_WILLS_ROOM_ENTRANCE_CLOSED
const EVENT_WILLS_ROOM_EXIT_OPEN
@ -1691,7 +1691,7 @@
const EVENT_TIN_TOWER_8F_MAX_ELIXER
const EVENT_TIN_TOWER_8F_FULL_RESTORE
const EVENT_TEAM_ROCKET_BASE_B3F_ULTRA_BALL
const EVENT_UNDERGROUND_WAREHOUSE_ULTRA_BALL
const EVENT_GOLDENROD_UNDERGROUND_WAREHOUSE_ULTRA_BALL
const EVENT_BURNED_TOWER_1F_HP_UP
const EVENT_BURNED_TOWER_B1F_TM_ENDURE
const EVENT_NATIONAL_PARK_PARLYZ_HEAL
@ -1720,15 +1720,15 @@
const EVENT_TEAM_ROCKET_BASE_B3F_FULL_HEAL
const EVENT_TEAM_ROCKET_BASE_B3F_ICE_HEAL
const EVENT_ILEX_FOREST_REVIVE
const EVENT_WAREHOUSE_ENTRANCE_COIN_CASE
const EVENT_UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES_SMOKE_BALL
const EVENT_UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES_FULL_HEAL
const EVENT_GOLDENROD_UNDERGROUND_COIN_CASE
const EVENT_GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES_SMOKE_BALL
const EVENT_GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES_FULL_HEAL
const EVENT_GOLDENROD_DEPT_STORE_B1F_ETHER
const EVENT_GOLDENROD_DEPT_STORE_B1F_AMULET_COIN
const EVENT_GOLDENROD_DEPT_STORE_B1F_BURN_HEAL
const EVENT_GOLDENROD_DEPT_STORE_B1F_ULTRA_BALL
const EVENT_UNDERGROUND_WAREHOUSE_MAX_ETHER
const EVENT_UNDERGROUND_WAREHOUSE_TM_SLEEP_TALK
const EVENT_GOLDENROD_UNDERGROUND_WAREHOUSE_MAX_ETHER
const EVENT_GOLDENROD_UNDERGROUND_WAREHOUSE_TM_SLEEP_TALK
const EVENT_MOUNT_MORTAR_1F_OUTSIDE_ETHER
const EVENT_MOUNT_MORTAR_1F_OUTSIDE_REVIVE
const EVENT_MOUNT_MORTAR_1F_INSIDE_ESCAPE_ROPE
@ -1800,7 +1800,7 @@
const EVENT_RIVAL_CHERRYGROVE_CITY
const EVENT_RIVAL_AZALEA_TOWN
const EVENT_RIVAL_TEAM_ROCKET_BASE
const EVENT_RIVAL_UNDERGROUND_PATH
const EVENT_RIVAL_GOLDENROD_UNDERGROUND
const EVENT_RIVAL_VICTORY_ROAD
const EVENT_RIVAL_OLIVINE_CITY
const EVENT_RIVAL_SPROUT_TOWER
@ -1945,10 +1945,10 @@
const EVENT_OPENED_MT_SILVER
const EVENT_FOUGHT_SNORLAX ; 750
const EVENT_LAKE_OF_RAGE_RED_GYARADOS
const EVENT_WAREHOUSE_ENTRANCE_GRANNY
const EVENT_WAREHOUSE_ENTRANCE_GRAMPS
const EVENT_WAREHOUSE_ENTRANCE_OLDER_HAIRCUT_BROTHER
const EVENT_WAREHOUSE_ENTRANCE_YOUNGER_HAIRCUT_BROTHER
const EVENT_GOLDENROD_UNDERGROUND_GRANNY
const EVENT_GOLDENROD_UNDERGROUND_GRAMPS
const EVENT_GOLDENROD_UNDERGROUND_OLDER_HAIRCUT_BROTHER
const EVENT_GOLDENROD_UNDERGROUND_YOUNGER_HAIRCUT_BROTHER
const EVENT_MAHOGANY_TOWN_POKEFAN_M_BLOCKS_EAST
const EVENT_MAHOGANY_TOWN_POKEFAN_M_BLOCKS_GYM
const EVENT_ROUTE_32_FRIEDA_OF_FRIDAY

View File

@ -63,7 +63,7 @@ KANTO_LANDMARK EQU const_value
const ROUTE_24 ; 38
const ROUTE_25 ; 39
const ROUTE_5 ; 3a
const UNDERGROUND ; 3b
const UNDERGROUND_PATH ; 3b
const ROUTE_6 ; 3c
const VERMILION_CITY ; 3d
const DIGLETTS_CAVE ; 3e

View File

@ -102,10 +102,10 @@ endm
mapgroup TEAM_ROCKET_BASE_B2F, 9, 15 ; 50
mapgroup TEAM_ROCKET_BASE_B3F, 9, 15 ; 51
mapgroup ILEX_FOREST, 27, 15 ; 52
mapgroup WAREHOUSE_ENTRANCE, 18, 15 ; 53
mapgroup UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES, 18, 15 ; 54
mapgroup GOLDENROD_UNDERGROUND, 18, 15 ; 53
mapgroup GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES, 18, 15 ; 54
mapgroup GOLDENROD_DEPT_STORE_B1F, 9, 10 ; 55
mapgroup UNDERGROUND_WAREHOUSE, 9, 10 ; 56
mapgroup GOLDENROD_UNDERGROUND_WAREHOUSE, 9, 10 ; 56
mapgroup MOUNT_MORTAR_1F_OUTSIDE, 18, 20 ; 57
mapgroup MOUNT_MORTAR_1F_INSIDE, 27, 20 ; 58
mapgroup MOUNT_MORTAR_2F_INSIDE, 18, 20 ; 59
@ -135,7 +135,7 @@ endm
mapgroup TOHJO_FALLS, 9, 15 ; 83
mapgroup DIGLETTS_CAVE, 18, 10 ; 84
mapgroup MOUNT_MOON, 9, 15 ; 85
mapgroup UNDERGROUND, 14, 3 ; 86
mapgroup UNDERGROUND_PATH, 14, 3 ; 86
mapgroup ROCK_TUNNEL_1F, 18, 15 ; 87
mapgroup ROCK_TUNNEL_B1F, 18, 15 ; 88
mapgroup SAFARI_ZONE_FUCHSIA_GATE_BETA, 4, 5 ; 89
@ -278,7 +278,7 @@ endm
mapgroup VERMILION_HOUSE_DIGLETTS_CAVE_SPEECH_HOUSE, 4, 4 ; 10
mapgroup VERMILION_GYM, 9, 5 ; 11
mapgroup ROUTE_6_SAFFRON_GATE, 4, 5 ; 12
mapgroup ROUTE_6_UNDERGROUND_ENTRANCE, 4, 4 ; 13
mapgroup ROUTE_6_UNDERGROUND_PATH_ENTRANCE, 4, 4 ; 13
newgroup ; 13
@ -469,7 +469,7 @@ endm
mapgroup SILPH_CO_1F, 4, 8 ; 10
mapgroup COPYCATS_HOUSE_1F, 4, 4 ; 11
mapgroup COPYCATS_HOUSE_2F, 3, 5 ; 12
mapgroup ROUTE_5_UNDERGROUND_ENTRANCE, 4, 4 ; 13
mapgroup ROUTE_5_UNDERGROUND_PATH_ENTRANCE, 4, 4 ; 13
mapgroup ROUTE_5_SAFFRON_CITY_GATE, 4, 5 ; 14
mapgroup ROUTE_5_CLEANSE_TAG_SPEECH_HOUSE, 4, 4 ; 15

View File

@ -89,10 +89,14 @@ HOF_MON_LENGTH = 1 + 2 + 2 + 1 + (PKMN_NAME_LENGTH +- 1) ; species, id, dvs, lev
HOF_LENGTH = 1 + HOF_MON_LENGTH * PARTY_LENGTH + 1 ; win count, party, terminator
NUM_HOF_TEAMS = 30
MAX_LINK_RECORD EQU 9999
; significant money values
START_MONEY EQU 3000
MOM_MONEY EQU 2300
MAX_MONEY EQU 999999
MAX_COINS EQU 9999
; ChangeHappiness arguments (see data/happiness_changes.asm)

View File

@ -73,7 +73,7 @@ MapScenes:: ; 4d01e
scene_def TEAM_ROCKET_BASE_B1F, wTeamRocketBaseB1FSceneID
scene_def TEAM_ROCKET_BASE_B2F, wTeamRocketBaseB2FSceneID
scene_def TEAM_ROCKET_BASE_B3F, wTeamRocketBaseB3FSceneID
scene_def UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES, wUndergroundPathSwitchRoomEntrancesSceneID
scene_def GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES, wGoldenrodUndergroundSwitchRoomEntrancesSceneID
scene_def SILVER_CAVE_ROOM_3, wSilverCaveRoom3SceneID
scene_def VICTORY_ROAD, wVictoryRoadSceneID
scene_def DRAGONS_DEN_B1F, wDragonsDenB1FSceneID

View File

@ -4,7 +4,9 @@ INCLUDE "includes.asm"
SECTION "Egg Moves", ROMX
; All instances of Charm, Steel Wing, Sweet Scent, and Lovely Kiss were
; removed from egg move lists in Crystal, because they are also TMs.
; removed from egg move lists in Crystal.
; Sweet Scent and Steel Wing were redundant since they're TMs, and
; Charm and Lovely Kiss were unobtainable.
; Staryu's egg moves were removed in Crystal, because Staryu is genderless
; and can only breed with Ditto.

View File

@ -0,0 +1,15 @@
# Assembly Programming
- [**RGBDS documentation**](rgbds-doc): Includes information on the RGBDS tools and the assembly language syntax.
- [**Pan Docs**](pan-docs): Everything You Always Wanted To Know About GAMEBOY (but were afraid to ask).
- [**GameBoy Programming Manual](gb-manual): The official GameBoy programming and hardware manual by Nintendo.
- [**GameBoy Opcode Summary**](gb-opcodes): Describes the opcodes of GameBoy assembly language.
- [**GameBoy Memory Map**](gb-memory-map): Describes the GameBoy Color address space.
- [**awesome-gbdev**](awesome-gbdev): A curated list of Game Boy development resources such as tools, docs, emulators, related projects and open-source ROMs.
[rgbds-doc]: https://rednex.github.io/
[pan-docs]: http://bgb.bircd.org/pandocs.htm
[gb-manual]: https://ia801906.us.archive.org/19/items/GameBoyProgManVer1.1/GameBoyProgManVer1.1.pdf
[gb-opcodes]: http://www.devrs.com/gb/files/opcodes.html
[gb-memory-map]: http://gameboy.mongenel.com/dmg/asmmemmap.html
[awesome-gbdev]: https://github.com/avivace/awesome-gbdev

View File

@ -60,7 +60,7 @@ Predef_StartBattle: ; 8c20f
call UpdateSprites
call DelayFrame
call .NonMobile_LoadPokeballTiles
call BattleStart_LoadEDTile
call BattleStart_CopyTilemapAtOnce
jr .resume
.mobile
@ -663,7 +663,7 @@ StartTrainerBattle_LoadPokeBallGraphics: ; 8c5dc (23:45dc)
ld a, $1
ld [hCGBPalUpdate], a
call DelayFrame
call BattleStart_LoadEDTile
call BattleStart_CopyTilemapAtOnce
.nextscene ; 8c673 (23:4673)
call StartTrainerBattle_NextScene

View File

@ -1185,14 +1185,14 @@ CardFlip_CheckWinCondition: ; e0637
.IsCoinCaseFull: ; e0833
ld a, [Coins]
cp 9999 / $100
cp MAX_COINS / $100
jr c, .less
jr z, .check_low
jr .more
.check_low
ld a, [Coins + 1]
cp 9999 % $100
cp MAX_COINS % $100
jr c, .less
.more

View File

@ -307,7 +307,7 @@ Function8bec:
ld a, [EnemySafeguardCount] ; value
and $3
call FillBoxCGB
call LoadEDTile
call CopyTilemapAtOnce
ret
ApplyMonOrTrainerPals:

View File

@ -1,4 +1,3 @@
_Diploma: ; 1dd702
call PlaceDiplomaOnScreen
call WaitPressAorB_BlinkCursor

View File

@ -78,7 +78,7 @@ ReturnFromMapSetupScript:: ; b8000
ret z
cp LAV_RADIO_TOWER
ret z
cp UNDERGROUND
cp UNDERGROUND_PATH
ret z
cp INDIGO_PLATEAU
ret z

View File

@ -2147,8 +2147,8 @@ GetHealingItemAmount: ; f395 (3:7395)
dbw HYPER_POTION, 200
dbw SUPER_POTION, 50
dbw POTION, 20
dbw MAX_POTION, 999
dbw FULL_RESTORE, 999
dbw MAX_POTION, MAX_STAT_VALUE
dbw FULL_RESTORE, MAX_STAT_VALUE
dbw MOOMOO_MILK, 100
dbw BERRY, 10
dbw GOLD_BERRY, 30
@ -3314,5 +3314,3 @@ GetMthMoveOfCurrentMon: ; f969
add hl, bc
ret
; f971
INCLUDE "engine/pokeball_wobble.asm"

91
engine/link_2.asm Normal file
View File

@ -0,0 +1,91 @@
LinkMonStatsScreen: ; 4d319
ld a, [wMenuCursorY]
dec a
ld [CurPartyMon], a
call LowVolume
predef StatsScreenInit
ld a, [CurPartyMon]
inc a
ld [wMenuCursorY], a
call ClearScreen
call ClearBGPalettes
call MaxVolume
farcall LoadTradeScreenBorder
farcall Link_WaitBGMap
farcall InitTradeSpeciesList
farcall SetTradeRoomBGPals
call WaitBGMap2
ret
Link_WaitBGMap: ; 4d354
call WaitBGMap
call WaitBGMap2
ret
LinkTextbox2: ; 4d35b
ld h, d
ld l, e
push bc
push hl
call .PlaceBorder
pop hl
pop bc
ld de, AttrMap - TileMap
add hl, de
inc b
inc b
inc c
inc c
ld a, $7
.row
push bc
push hl
.col
ld [hli], a
dec c
jr nz, .col
pop hl
ld de, SCREEN_WIDTH
add hl, de
pop bc
dec b
jr nz, .row
ret
.PlaceBorder: ; 4d37e
push hl
ld a, $76
ld [hli], a
inc a
call .PlaceRow
inc a
ld [hl], a
pop hl
ld de, SCREEN_WIDTH
add hl, de
.loop
push hl
ld a, "┌"
ld [hli], a
ld a, " "
call .PlaceRow
ld [hl], "─"
pop hl
ld de, SCREEN_WIDTH
add hl, de
dec b
jr nz, .loop
ld a, "┐"
ld [hli], a
ld a, "│"
call .PlaceRow
ld [hl], "└"
ret
.PlaceRow: ; 4d3ab
ld d, c
.row_loop
ld [hli], a
dec d
jr nz, .row_loop
ret

View File

@ -24,7 +24,7 @@ GiveMoney:: ; 15fd7
; 15ff7
MaxMoney: ; 15ff7
dt 999999
dt MAX_MONEY
; 15ffa
@ -192,7 +192,7 @@ GiveCoins:: ; 1606f
; 1608d
.maxcoins ; 1608d
bigdw 9999
bigdw MAX_COINS
; 1608f

View File

@ -1579,9 +1579,9 @@ CalcPkmnStatC: ; e17b
jr c, .stat_value_okay
.max_stat
ld a, 999 / $100
ld a, MAX_STAT_VALUE / $100
ld [hMultiplicand + 1], a
ld a, 999 % $100
ld a, MAX_STAT_VALUE % $100
ld [hMultiplicand + 2], a
.stat_value_okay

View File

@ -599,7 +599,7 @@ Phone_StartRinging: ; 9033f
call PlaySFX
call Phone_CallerTextbox
call UpdateSprites
farcall PhoneRing_LoadEDTile
farcall PhoneRing_CopyTilemapAtOnce
ret
; 90355
@ -609,7 +609,7 @@ HangUp_Wait20Frames: ; 90355
Phone_Wait20Frames
ld c, 20
call DelayFrames
farcall PhoneRing_LoadEDTile
farcall PhoneRing_CopyTilemapAtOnce
ret
; 90363

View File

@ -1,5 +0,0 @@
ChrisBackpic: ; 2ba1a
INCBIN "gfx/player/chris_back.2bpp.lz"
DudeBackpic: ; 2bbaa
INCBIN "gfx/battle/dude.2bpp.lz"

View File

@ -1688,7 +1688,7 @@ LoadStation_UnownRadio: ; 917d5 (24:57d5)
ld a, BANK(PlayRadioShow)
ld hl, PlayRadioShow
call Radio_BackUpFarCallParams
ld de, UnknownStationName
ld de, UnownStationName
ret
LoadStation_PlacesAndPeople: ; 917ea (24:57ea)
@ -1747,7 +1747,7 @@ LoadStation_EvolutionRadio: ; 9183e (24:583e)
ld a, BANK(PlayRadioShow)
ld hl, PlayRadioShow
call Radio_BackUpFarCallParams
ld de, UnknownStationName
ld de, UnownStationName
ret
; 91853 (24:5853)
@ -1821,7 +1821,7 @@ OaksPkmnTalkName: db "OAK's <PK><MN> Talk@"
PokedexShowName: db "#DEX Show@"
PokemonMusicName: db "#MON Music@"
LuckyChannelName: db "Lucky Channel@"
UnknownStationName: db "?????@"
UnownStationName: db "?????@"
PlacesAndPeopleName: db "Places & People@"
LetsAllSingName: db "Let's All Sing!@"

View File

@ -0,0 +1,25 @@
CheckPokerus: ; 4d860
; Return carry if a monster in your party has Pokerus
; Get number of monsters to iterate over
ld a, [PartyCount]
and a
jr z, .NoPokerus
ld b, a
; Check each monster in the party for Pokerus
ld hl, PartyMon1PokerusStatus
ld de, PARTYMON_STRUCT_LENGTH
.Check:
ld a, [hl]
and $0f ; only the bottom nybble is used
jr nz, .HasPokerus
; Next PartyMon
add hl, de
dec b
jr nz, .Check
.NoPokerus:
and a
ret
.HasPokerus:
scf
ret

View File

@ -0,0 +1,3 @@
BattleStart_CopyTilemapAtOnce: ; 8cf4f
call CGBOnly_CopyTilemapAtOnce
ret

View File

@ -0,0 +1,20 @@
CheckSave:: ; 4cffe
ld a, BANK(sCheckValue1) ; BANK(sCheckValue2)
call GetSRAMBank
ld a, [sCheckValue1]
ld b, a
ld a, [sCheckValue2]
ld c, a
call CloseSRAM
ld a, b
cp SAVE_CHECK_VALUE_1
jr nz, .ok
ld a, c
cp SAVE_CHECK_VALUE_2
jr nz, .ok
ld c, $1
ret
.ok
ld c, $0
ret

View File

@ -1,6 +1,6 @@
CheckTime:: ; c000
ld a, [TimeOfDay]
ld hl, TimeOfDayTable
ld hl, .TimeOfDayTable
ld de, 2
call IsInArray
inc hl
@ -11,7 +11,7 @@ CheckTime:: ; c000
ld c, a
ret
TimeOfDayTable: ; c012
.TimeOfDayTable: ; c012
db MORN_F, MORN
db DAY_F, DAY
db NITE_F, NITE

View File

@ -4,7 +4,7 @@ GetSquareRoot: ; 13b87
; Rather than calculating the result, we take the index of the
; first value in a table of squares that isn't lower than de.
ld hl, Squares
ld hl, .Squares
ld b, 0
.loop
; Make sure we don't go past the end of the table.
@ -22,7 +22,7 @@ GetSquareRoot: ; 13b87
jr c, .loop
ret
Squares: ; 13b98
.Squares: ; 13b98
root set 1
rept $ff
dw root*root

View File

@ -0,0 +1,4 @@
Kurt_SelectQuantity_InterpretJoypad: ; 27a28
call BuySellToss_InterpretJoypad
ld b, a
ret

View File

@ -0,0 +1,20 @@
LevelUpHappinessMod: ; 2709e
ld a, [CurPartyMon]
ld hl, PartyMon1CaughtLocation
call GetPartyLocation
ld a, [hl]
and $7f
ld d, a
ld a, [MapGroup]
ld b, a
ld a, [MapNumber]
ld c, a
call GetWorldMapLocation
cp d
ld c, HAPPINESS_GAINLEVEL
jr nz, .ok
ld c, HAPPINESS_GAINLEVELATHOME
.ok
callfar ChangeHappiness
ret

View File

@ -0,0 +1,36 @@
_LoadMapPart:: ; 4d15b
ld hl, wMisc
ld a, [wMetatileStandingY]
and a
jr z, .top_row
ld bc, WMISC_WIDTH * 2
add hl, bc
.top_row
ld a, [wMetatileStandingX]
and a
jr z, .left_column
inc hl
inc hl
.left_column
decoord 0, 0
ld b, SCREEN_HEIGHT
.loop
ld c, SCREEN_WIDTH
.loop2
ld a, [hli]
ld [de], a
inc de
dec c
jr nz, .loop2
ld a, l
add 4
ld l, a
jr nc, .carry
inc h
.carry
dec b
jr nz, .loop
ret

View File

@ -0,0 +1,21 @@
LoadPushOAM:: ; 4031
ld c, hPushOAM - $ff00
ld b, .PushOAMEnd - .PushOAM
ld hl, .PushOAM
.loop
ld a, [hli]
ld [$ff00+c], a
inc c
dec b
jr nz, .loop
ret
.PushOAM: ; 403f
ld a, Sprites / $100
ld [rDMA], a
ld a, (SpritesEnd - Sprites) / 4 ; 40
.pushoam_loop
dec a
jr nz, .pushoam_loop
ret
.PushOAMEnd

View File

@ -0,0 +1,80 @@
PhoneRing_CopyTilemapAtOnce: ; 4d188
ld a, [hCGB]
and a
jp z, WaitBGMap
ld a, [wSpriteUpdatesEnabled]
cp $0
jp z, WaitBGMap
; What follows is a modified version of CopyTilemapAtOnce.
ld a, [hBGMapMode]
push af
xor a
ld [hBGMapMode], a
ld a, [hMapAnims]
push af
xor a
ld [hMapAnims], a
.wait
ld a, [rLY]
cp $8f
jr c, .wait
di
ld a, BANK(VBGMap2)
ld [rVBK], a
hlcoord 0, 0, AttrMap
call .CopyTilemapAtOnce
ld a, BANK(VBGMap0)
ld [rVBK], a
hlcoord 0, 0
call .CopyTilemapAtOnce
.wait2
ld a, [rLY]
cp $8f
jr c, .wait2
ei
pop af
ld [hMapAnims], a
pop af
ld [hBGMapMode], a
ret
.CopyTilemapAtOnce: ; 4d1cb
ld [hSPBuffer], sp
ld sp, hl
ld a, [hBGMapAddress + 1]
ld h, a
ld l, 0
ld a, SCREEN_HEIGHT
ld [hTilesPerCycle], a
ld b, 1 << 1 ; not in v/hblank
ld c, rSTAT % $100
.loop
rept SCREEN_WIDTH / 2
pop de
.loop\@
ld a, [$ff00+c]
and b
jr nz, .loop\@
ld [hl], e
inc l
ld [hl], d
inc l
endr
ld de, BG_MAP_WIDTH - SCREEN_WIDTH
add hl, de
ld a, [hTilesPerCycle]
dec a
ld [hTilesPerCycle], a
jr nz, .loop
ld a, [hSPBuffer]
ld l, a
ld a, [hSPBuffer + 1]
ld h, a
ld sp, hl
ret

View File

@ -0,0 +1,24 @@
PlaceWaitingText:: ; 4000
hlcoord 3, 10
ld b, 1
ld c, 11
ld a, [wBattleMode]
and a
jr z, .notinbattle
call TextBox
jr .proceed
.notinbattle
predef Predef_LinkTextbox
.proceed
hlcoord 4, 11
ld de, .Waiting
call PlaceString
ld c, 50
jp DelayFrames
.Waiting: ; 4025
db "Waiting...!@"

View File

@ -14,7 +14,7 @@ Function1dd6a9: ; 1dd6a9
pop bc
ret
PrintHoursMins ; 1dd6bb (77:56bb)
PrintHoursMins: ; 1dd6bb (77:56bb)
; Hours in b, minutes in c
ld a, b
cp 12

View File

@ -0,0 +1,19 @@
_ReturnToBattle_UseBall: ; 2715c
call ClearBGPalettes
call ClearTileMap
ld a, [BattleType]
cp BATTLETYPE_TUTORIAL
jr z, .gettutorialbackpic
farcall GetBattleMonBackpic
jr .continue
.gettutorialbackpic
farcall GetTrainerBackpic
.continue
farcall GetEnemyMonFrontpic
farcall _LoadBattleFontsHPBar
call GetMemSGBLayout
call CloseWindow
call LoadStandardMenuDataHeader
call WaitBGMap
jp SetPalettes

View File

@ -0,0 +1,77 @@
SaveMenu_CopyTilemapAtOnce: ; 4cf45 (13:4f45)
ld a, [hCGB]
and a
jp z, WaitBGMap
; The following is a modified version of CopyTilemapAtOnce.
ld a, [hBGMapMode]
push af
xor a
ld [hBGMapMode], a
ld a, [hMapAnims]
push af
xor a
ld [hMapAnims], a
.WaitLY:
ld a, [rLY]
cp $60
jr c, .WaitLY
di
ld a, BANK(VBGMap2)
ld [rVBK], a
hlcoord 0, 0, AttrMap
call .CopyTilemapAtOnce
ld a, BANK(VBGMap0)
ld [rVBK], a
hlcoord 0, 0
call .CopyTilemapAtOnce
.WaitLY2:
ld a, [rLY]
cp $60
jr c, .WaitLY2
ei
pop af
ld [hMapAnims], a
pop af
ld [hBGMapMode], a
ret
.CopyTilemapAtOnce: ; 4cf80 (13:4f80)
ld [hSPBuffer], sp ; $ffd9
ld sp, hl
ld a, [hBGMapAddress + 1]
ld h, a
ld l, 0
ld a, SCREEN_HEIGHT
ld [hTilesPerCycle], a
ld b, 1 << 1
ld c, rSTAT % $100
.loop
rept SCREEN_WIDTH / 2
pop de
.loop\@
ld a, [$ff00+c]
and b
jr nz, .loop\@
ld [hl], e
inc l
ld [hl], d
inc l
endr
ld de, BG_MAP_WIDTH - SCREEN_WIDTH
add hl, de
ld a, [hTilesPerCycle]
dec a
ld [hTilesPerCycle], a
jr nz, .loop
ld a, [hSPBuffer]
ld l, a
ld a, [hSPBuffer + 1]
ld h, a
ld sp, hl
ret

View File

@ -19,7 +19,3 @@ TownMap_ConvertLineBreakCharacters: ; 1de2c5
hlcoord 9, 0
call PlaceString
ret
PokegearGFX: ; 1de2e4
INCBIN "gfx/pokegear/pokegear.2bpp.lz"

View File

@ -0,0 +1,9 @@
_UpdateBattleHUDs:
farcall DrawPlayerHUD
ld hl, PlayerHPPal
call SetHPPal
farcall DrawEnemyHUD
ld hl, EnemyHPPal
call SetHPPal
farcall FinishBattleAnim
ret

View File

@ -0,0 +1,13 @@
UpdateItemDescription: ; 0x244c3
ld a, [MenuSelection]
ld [CurSpecies], a
hlcoord 0, 12
ld b, 4
ld c, SCREEN_WIDTH - 2
call TextBox
ld a, [MenuSelection]
cp -1
ret z
decoord 1, 14
farcall PrintItemDescription
ret

View File

@ -58,11 +58,11 @@ TimesOfDay: ; 14044
db -1, MORN_F
; 1404e
Unknown_1404e: ; Unreferenced
db 20, 2
db 40, 0
db 60, 1
db -1, 0
Unknown_1404e: ; unreferenced
db 20, NITE_F
db 40, MORN_F
db 60, DAY_F
db -1, MORN_F
; 14056
StageRTCTimeForSave: ; 14056

View File

@ -3,7 +3,7 @@ SaveMenu: ; 14a1a
farcall DisplaySaveInfoOnSave
call SpeechTextBox
call UpdateSprites
farcall SaveMenu_LoadEDTile
farcall SaveMenu_CopyTilemapAtOnce
ld hl, Text_WouldYouLikeToSaveTheGame
call SaveTheGame_yesorno
jr nz, .refused
@ -19,7 +19,7 @@ SaveMenu: ; 14a1a
.refused
call ExitMenu
call ret_d90
farcall SaveMenu_LoadEDTile
farcall SaveMenu_CopyTilemapAtOnce
scf
ret

View File

@ -471,10 +471,10 @@ Slots_LoadReelState: ; 929f6 (24:69f6)
Slot_CheckCoinCaseFull: ; 92a04 (24:6a04)
ld a, d
cp 9999 / $100
cp MAX_COINS / $100
jr c, .not_full
ld a, e
cp 9999 % $100
cp MAX_COINS % $100
jr c, .not_full
scf
ret
@ -766,14 +766,15 @@ UpdateReelPositionAndOAM: ; 92b53 (24:6b53)
; 92bbe (24:6bbe)
; unreferenced
Function92bbe: ; 92bbe
push hl
srl a
srl a
add Unknown_92bce % $100
add .Unknown_92bce % $100
ld l, a
ld a, 0
adc Unknown_92bce / $100
adc .Unknown_92bce / $100
ld h, a
ld a, [hl]
pop hl
@ -781,7 +782,7 @@ Function92bbe: ; 92bbe
; 92bce
Unknown_92bce: ; 92bce
.Unknown_92bce: ; 92bce
db 0, 1, 2, 3, 4, 5
; 92bd4

View File

@ -1,4 +1,3 @@
INCLUDE "data/maps/spawn_points.asm"

View File

@ -965,6 +965,7 @@ StatsScreen_LoadTextBoxSpaceGFX: ; 4e307 (13:6307)
ret
; 4e32a (13:632a)
; unreferenced
Unknown_4e32a: ; 4e32a
; A blank tile?
ds 16

View File

@ -497,7 +497,7 @@ InitializeEventsScript:
setevent EVENT_USED_THE_CARD_KEY_IN_THE_RADIO_TOWER
setevent EVENT_RIVAL_CHERRYGROVE_CITY
setevent EVENT_RIVAL_AZALEA_TOWN
setevent EVENT_RIVAL_UNDERGROUND_PATH
setevent EVENT_RIVAL_GOLDENROD_UNDERGROUND
setevent EVENT_AZALEA_TOWN_SLOWPOKES
setevent EVENT_KURTS_HOUSE_SLOWPOKE
setevent EVENT_GUIDE_GENT_VISIBLE_IN_CHERRYGROVE
@ -550,8 +550,8 @@ InitializeEventsScript:
setevent EVENT_ECRUTEAK_POKE_CENTER_BILL
setevent EVENT_MYSTERY_GIFT_DELIVERY_GUY
setevent EVENT_LAKE_OF_RAGE_LANCE
setevent EVENT_WAREHOUSE_LAYOUT_1
setevent EVENT_WAREHOUSE_BLOCKED_OFF
setevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_1
setevent EVENT_GOLDENROD_UNDERGROUND_WAREHOUSE_BLOCKED_OFF
setevent EVENT_DRAGONS_DEN_CLAIR
setevent EVENT_RIVAL_OLIVINE_CITY
setevent EVENT_RIVAL_VICTORY_ROAD

View File

@ -48,4 +48,5 @@ PrintUnownWord: ; fba2e (3e:7a2e)
jr .loop
; fba5a (3e:7a5a)
INCLUDE "data/unown_words.asm"

View File

@ -1,11 +1,11 @@
_BasementKey: ; 507b4
; Are we even in the right map to use this?
ld a, [MapGroup]
cp GROUP_WAREHOUSE_ENTRANCE
cp GROUP_GOLDENROD_UNDERGROUND
jr nz, .nope
ld a, [MapNumber]
cp MAP_WAREHOUSE_ENTRANCE
cp MAP_GOLDENROD_UNDERGROUND
jr nz, .nope
; Are we on the tile in front of the door?
call GetFacingTileCoord

View File

@ -476,7 +476,7 @@ Mom_ContinueMenuSetup: ; 1651a
lb bc, PRINTNUM_MONEY | PRINTNUM_LEADINGZEROS | 3, 6
call PrintNum
call UpdateSprites
call CGBOnly_LoadEDTile
call CGBOnly_CopyTilemapAtOnce
ret
; 1656b

View File

@ -532,7 +532,7 @@ ApplyTilemap:: ; 321c
ld a, 1
ld [hBGMapMode], a
jr LoadEDTile
jr CopyTilemapAtOnce
.dmg
; WaitBGMap
@ -543,13 +543,13 @@ ApplyTilemap:: ; 321c
ret
; 3238
CGBOnly_LoadEDTile:: ; 3238
CGBOnly_CopyTilemapAtOnce:: ; 3238
ld a, [hCGB]
and a
jr z, WaitBGMap
LoadEDTile:: ; 323d
jr .LoadEDTile
CopyTilemapAtOnce:: ; 323d
jr .CopyTilemapAtOnce
; 323f
; XXX
@ -557,7 +557,7 @@ LoadEDTile:: ; 323d
ret
; 3246
.LoadEDTile: ; 3246
.CopyTilemapAtOnce: ; 3246
ld a, [hBGMapMode]
push af
xor a
@ -574,11 +574,11 @@ LoadEDTile:: ; 323d
jr c, .wait
di
ld a, 1 ; BANK(VTiles3)
ld a, BANK(VTiles3)
ld [rVBK], a
hlcoord 0, 0, AttrMap
call .StackPointerMagic
ld a, 0 ; BANK(VTiles0)
ld a, BANK(VTiles0)
ld [rVBK], a
hlcoord 0, 0
call .StackPointerMagic
@ -623,7 +623,7 @@ rept SCREEN_WIDTH / 2
inc l
endr
ld de, $20 - SCREEN_WIDTH
ld de, BG_MAP_WIDTH - SCREEN_WIDTH
add hl, de
ld a, [hTilesPerCycle]
dec a

534
main.asm
View File

@ -3,58 +3,13 @@ INCLUDE "includes.asm"
SECTION "bank1", ROMX
PlaceWaitingText:: ; 4000
hlcoord 3, 10
ld b, 1
ld c, 11
ld a, [wBattleMode]
and a
jr z, .notinbattle
call TextBox
jr .proceed
.notinbattle
predef Predef_LinkTextbox
.proceed
hlcoord 4, 11
ld de, .Waiting
call PlaceString
ld c, 50
jp DelayFrames
.Waiting: ; 4025
db "Waiting...!@"
LoadPushOAM:: ; 4031
ld c, hPushOAM - $ff00
ld b, PushOAMEnd - PushOAM
ld hl, PushOAM
.loop
ld a, [hli]
ld [$ff00+c], a
inc c
dec b
jr nz, .loop
ret
PushOAM: ; 403f
ld a, Sprites / $100
ld [rDMA], a
ld a, (SpritesEnd - Sprites) / 4 ; 40
.loop
dec a
jr nz, .loop
ret
PushOAMEnd
INCLUDE "engine/routines/placewaitingtext.asm"
INCLUDE "engine/routines/loadpushoam.asm"
INCLUDE "engine/map_objects.asm"
INCLUDE "engine/intro_menu.asm"
INCLUDE "engine/init_map.asm"
INCLUDE "engine/learn.asm"
INCLUDE "engine/check_nick_errors.asm"
INCLUDE "engine/routines/checknickerrors.asm"
INCLUDE "engine/math.asm"
INCLUDE "data/items/item_attributes.asm"
INCLUDE "engine/npc_movement.asm"
@ -65,14 +20,14 @@ INCLUDE "event/special.asm"
SECTION "bank2", ROMX
INCLUDE "engine/player_object.asm"
INCLUDE "engine/sine.asm"
INCLUDE "engine/routines/sine.asm"
INCLUDE "engine/predef.asm"
INCLUDE "engine/color.asm"
SECTION "bank3", ROMX
INCLUDE "engine/check_time.asm"
INCLUDE "engine/routines/checktime.asm"
INCLUDE "engine/specials.asm"
INCLUDE "engine/printnum.asm"
INCLUDE "engine/health.asm"
@ -82,10 +37,11 @@ INCLUDE "engine/player_step.asm"
INCLUDE "engine/anim_hp_bar.asm"
INCLUDE "engine/move_mon.asm"
INCLUDE "engine/billspctop.asm"
INCLUDE "engine/get_breedmon_growth.asm"
INCLUDE "engine/routines/getbreedmonlevelgrowth.asm"
INCLUDE "event/bug_contest/caught_mon.asm"
INCLUDE "engine/item_effects.asm"
INCLUDE "engine/knows_move.asm"
INCLUDE "engine/routines/getpokeballwobble.asm"
INCLUDE "engine/routines/knowsmove.asm"
SECTION "bank4", ROMX
@ -106,10 +62,10 @@ INCLUDE "event/bug_contest/contest.asm"
INCLUDE "event/misc_scripts_2.asm"
INCLUDE "event/std_collision.asm"
INCLUDE "event/bug_contest/judging.asm"
INCLUDE "engine/pokerus_tick.asm"
INCLUDE "engine/pokerus/apply_pokerus_tick.asm"
INCLUDE "event/bug_contest/contest_2.asm"
INCLUDE "engine/unused_correct_party.asm"
INCLUDE "engine/square_root.asm"
INCLUDE "engine/routines/correcterrorsinplayerparty.asm"
INCLUDE "engine/routines/getsquareroot.asm"
SECTION "bank5", ROMX
@ -141,21 +97,7 @@ SECTION "bank9", ROMX
INCLUDE "data/text_buffers.asm"
INCLUDE "engine/menu.asm"
UpdateItemDescription: ; 0x244c3
ld a, [MenuSelection]
ld [CurSpecies], a
hlcoord 0, 12
ld b, 4
ld c, SCREEN_WIDTH - 2
call TextBox
ld a, [MenuSelection]
cp -1
ret z
decoord 1, 14
farcall PrintItemDescription
ret
INCLUDE "engine/routines/updateitemdescription.asm"
INCLUDE "engine/pokepic.asm"
INCLUDE "engine/map_objects_2.asm"
INCLUDE "engine/scrolling_menu.asm"
@ -167,58 +109,13 @@ INCLUDE "engine/buy_sell_toss.asm"
INCLUDE "engine/trainer_card.asm"
INCLUDE "engine/prof_oaks_pc.asm"
INCLUDE "engine/decorations.asm"
LevelUpHappinessMod: ; 2709e
ld a, [CurPartyMon]
ld hl, PartyMon1CaughtLocation
call GetPartyLocation
ld a, [hl]
and $7f
ld d, a
ld a, [MapGroup]
ld b, a
ld a, [MapNumber]
ld c, a
call GetWorldMapLocation
cp d
ld c, HAPPINESS_GAINLEVEL
jr nz, .ok
ld c, HAPPINESS_GAINLEVELATHOME
.ok
callfar ChangeHappiness
ret
INCLUDE "engine/routines/leveluphappinessmod.asm"
INCLUDE "data/trainers/trainer_dvs.asm"
_ReturnToBattle_UseBall: ; 2715c
call ClearBGPalettes
call ClearTileMap
ld a, [BattleType]
cp BATTLETYPE_TUTORIAL
jr z, .gettutorialbackpic
farcall GetBattleMonBackpic
jr .continue
.gettutorialbackpic
farcall GetTrainerBackpic
.continue
farcall GetEnemyMonFrontpic
farcall _LoadBattleFontsHPBar
call GetMemSGBLayout
call CloseWindow
call LoadStandardMenuDataHeader
call WaitBGMap
jp SetPalettes
INCLUDE "engine/consume_held_item.asm"
INCLUDE "engine/routines/returntobattle_useball.asm"
INCLUDE "engine/routines/consumehelditem.asm"
INCLUDE "battle/moves/move_effects_pointers.asm"
INCLUDE "battle/moves/move_effects.asm"
Kurt_SelectQuantity_InterpretJoypad: ; 27a28
call BuySellToss_InterpretJoypad
ld b, a
ret
INCLUDE "engine/routines/kurt_selectquantity_interpretjoypad.asm"
SECTION "bankA", ROMX
@ -226,7 +123,12 @@ SECTION "bankA", ROMX
INCLUDE "engine/link.asm"
INCLUDE "engine/wildmons.asm"
INCLUDE "battle/link_result.asm"
INCLUDE "engine/player_gfx_2.asm"
ChrisBackpic: ; 2ba1a
INCBIN "gfx/player/chris_back.2bpp.lz"
DudeBackpic: ; 2bbaa
INCBIN "gfx/battle/dude.2bpp.lz"
SECTION "bankB", ROMX
@ -238,9 +140,9 @@ INCLUDE "event/move_deleter.asm"
INCLUDE "engine/mystery_gift_2.asm"
INCLUDE "engine/tmhm2.asm"
INCLUDE "battle/moves/move_descriptions.asm"
INCLUDE "engine/pokerus.asm"
INCLUDE "engine/pokerus/pokerus.asm"
INCLUDE "engine/start_battle.asm"
INCLUDE "engine/place_graphics.asm"
INCLUDE "engine/routines/placegraphic.asm"
SECTION "Effect Commands", ROMX
@ -284,7 +186,7 @@ INCLUDE "engine/mail.asm"
SECTION "Crystal Unique", ROMX
INCLUDE "engine/init_gender.asm"
INCLUDE "engine/pack_f.asm"
INCLUDE "engine/routines/drawkrispackgfx.asm"
INCLUDE "event/move_tutor.asm"
INCLUDE "engine/crystal_colors.asm"
INCLUDE "event/celebi.asm"
@ -300,233 +202,20 @@ SECTION "bank13", ROMX
INCLUDE "engine/map_palettes.asm"
INCLUDE "tilesets/palette_maps.asm"
Unknown_4ce05: ; unreferenced
; unreferenced
; 0x4ce05
rept 26
db $06
endr
; 0x4ce1f
INCLUDE "data/collision_permissions.asm"
INCLUDE "engine/empty_sram.asm"
SaveMenu_LoadEDTile: ; 4cf45 (13:4f45)
ld a, [hCGB]
and a
jp z, WaitBGMap
; The following is a modified version of LoadEDTile.
ld a, [hBGMapMode]
push af
xor a
ld [hBGMapMode], a
ld a, [hMapAnims]
push af
xor a
ld [hMapAnims], a
.WaitLY:
ld a, [rLY]
cp $60
jr c, .WaitLY
di
ld a, 1 ; BANK(VBGMap2)
ld [rVBK], a
hlcoord 0, 0, AttrMap
call .LoadEDTile
ld a, 0 ; BANK(VBGMap0)
ld [rVBK], a
hlcoord 0, 0
call .LoadEDTile
.WaitLY2:
ld a, [rLY]
cp $60
jr c, .WaitLY2
ei
pop af
ld [hMapAnims], a
pop af
ld [hBGMapMode], a
ret
.LoadEDTile: ; 4cf80 (13:4f80)
ld [hSPBuffer], sp ; $ffd9
ld sp, hl
ld a, [hBGMapAddress + 1]
ld h, a
ld l, 0
ld a, SCREEN_HEIGHT
ld [hTilesPerCycle], a
ld b, 1 << 1
ld c, rSTAT % $100
.loop
rept SCREEN_WIDTH / 2
pop de
.loop\@
ld a, [$ff00+c]
and b
jr nz, .loop\@
ld [hl], e
inc l
ld [hl], d
inc l
endr
ld de, $20 - SCREEN_WIDTH
add hl, de
ld a, [hTilesPerCycle]
dec a
ld [hTilesPerCycle], a
jr nz, .loop
ld a, [hSPBuffer]
ld l, a
ld a, [hSPBuffer + 1]
ld h, a
ld sp, hl
ret
CheckSave:: ; 4cffe
ld a, BANK(sCheckValue1) ; BANK(sCheckValue2)
call GetSRAMBank
ld a, [sCheckValue1]
ld b, a
ld a, [sCheckValue2]
ld c, a
call CloseSRAM
ld a, b
cp SAVE_CHECK_VALUE_1
jr nz, .ok
ld a, c
cp SAVE_CHECK_VALUE_2
jr nz, .ok
ld c, $1
ret
.ok
ld c, $0
ret
INCLUDE "engine/routines/emptyallsrambanks.asm"
INCLUDE "engine/routines/savemenu_copytilemapatonce.asm"
INCLUDE "engine/routines/checksave.asm"
INCLUDE "data/maps/map_scenes.asm"
_LoadMapPart:: ; 4d15b
ld hl, wMisc
ld a, [wMetatileStandingY]
and a
jr z, .top_row
ld bc, WMISC_WIDTH * 2
add hl, bc
.top_row
ld a, [wMetatileStandingX]
and a
jr z, .left_column
inc hl
inc hl
.left_column
decoord 0, 0
ld b, SCREEN_HEIGHT
.loop
ld c, SCREEN_WIDTH
.loop2
ld a, [hli]
ld [de], a
inc de
dec c
jr nz, .loop2
ld a, l
add 4
ld l, a
jr nc, .carry
inc h
.carry
dec b
jr nz, .loop
ret
PhoneRing_LoadEDTile: ; 4d188
ld a, [hCGB]
and a
jp z, WaitBGMap
ld a, [wSpriteUpdatesEnabled]
cp $0
jp z, WaitBGMap
; What follows is a modified version of LoadEDTile.
ld a, [hBGMapMode]
push af
xor a
ld [hBGMapMode], a
ld a, [hMapAnims]
push af
xor a
ld [hMapAnims], a
.wait
ld a, [rLY]
cp $8f
jr c, .wait
di
ld a, 1 ; BANK(VBGMap2)
ld [rVBK], a
hlcoord 0, 0, AttrMap
call .LoadEDTile
ld a, 0 ; BANK(VBGMap0)
ld [rVBK], a
hlcoord 0, 0
call .LoadEDTile
.wait2
ld a, [rLY]
cp $8f
jr c, .wait2
ei
pop af
ld [hMapAnims], a
pop af
ld [hBGMapMode], a
ret
.LoadEDTile: ; 4d1cb
ld [hSPBuffer], sp
ld sp, hl
ld a, [hBGMapAddress + 1]
ld h, a
ld l, 0
ld a, SCREEN_HEIGHT
ld [hTilesPerCycle], a
ld b, 1 << 1 ; not in v/hblank
ld c, rSTAT % $100
.loop
rept SCREEN_WIDTH / 2
pop de
.loop\@
ld a, [$ff00+c]
and b
jr nz, .loop\@
ld [hl], e
inc l
ld [hl], d
inc l
endr
ld de, $20 - SCREEN_WIDTH
add hl, de
ld a, [hTilesPerCycle]
dec a
ld [hTilesPerCycle], a
jr nz, .loop
ld a, [hSPBuffer]
ld l, a
ld a, [hSPBuffer + 1]
ld h, a
ld sp, hl
ret
INCLUDE "engine/routines/loadmappart.asm"
INCLUDE "engine/routines/phonering_copytilemapatonce.asm"
Shrink1Pic: ; 4d249
INCBIN "gfx/shrink/shrink1.2bpp.lz"
@ -534,129 +223,12 @@ INCBIN "gfx/shrink/shrink1.2bpp.lz"
Shrink2Pic: ; 4d2d9
INCBIN "gfx/shrink/shrink2.2bpp.lz"
LinkMonStatsScreen: ; 4d319
ld a, [wMenuCursorY]
dec a
ld [CurPartyMon], a
call LowVolume
predef StatsScreenInit
ld a, [CurPartyMon]
inc a
ld [wMenuCursorY], a
call ClearScreen
call ClearBGPalettes
call MaxVolume
farcall LoadTradeScreenBorder
farcall Link_WaitBGMap
farcall InitTradeSpeciesList
farcall SetTradeRoomBGPals
call WaitBGMap2
ret
Link_WaitBGMap: ; 4d354
call WaitBGMap
call WaitBGMap2
ret
LinkTextbox2: ; 4d35b
ld h, d
ld l, e
push bc
push hl
call .PlaceBorder
pop hl
pop bc
ld de, AttrMap - TileMap
add hl, de
inc b
inc b
inc c
inc c
ld a, $7
.row
push bc
push hl
.col
ld [hli], a
dec c
jr nz, .col
pop hl
ld de, SCREEN_WIDTH
add hl, de
pop bc
dec b
jr nz, .row
ret
.PlaceBorder: ; 4d37e
push hl
ld a, $76
ld [hli], a
inc a
call .PlaceRow
inc a
ld [hl], a
pop hl
ld de, SCREEN_WIDTH
add hl, de
.loop
push hl
ld a, "┌"
ld [hli], a
ld a, " "
call .PlaceRow
ld [hl], "─"
pop hl
ld de, SCREEN_WIDTH
add hl, de
dec b
jr nz, .loop
ld a, "┐"
ld [hli], a
ld a, "│"
call .PlaceRow
ld [hl], "└"
ret
.PlaceRow: ; 4d3ab
ld d, c
.row_loop
ld [hli], a
dec d
jr nz, .row_loop
ret
INCLUDE "engine/link_2.asm"
INCLUDE "engine/delete_save_change_clock.asm"
INCLUDE "tilesets/tileset_headers.asm"
INCLUDE "engine/flag_predef.asm"
INCLUDE "engine/trademon_frontpic.asm"
CheckPokerus: ; 4d860
; Return carry if a monster in your party has Pokerus
; Get number of monsters to iterate over
ld a, [PartyCount]
and a
jr z, .NoPokerus
ld b, a
; Check each monster in the party for Pokerus
ld hl, PartyMon1PokerusStatus
ld de, PARTYMON_STRUCT_LENGTH
.Check:
ld a, [hl]
and $0f ; only the bottom nybble is used
jr nz, .HasPokerus
; Next PartyMon
add hl, de
dec b
jr nz, .Check
.NoPokerus:
and a
ret
.HasPokerus:
scf
ret
INCLUDE "engine/routines/flagpredef.asm"
INCLUDE "engine/routines/trademonfrontpic.asm"
INCLUDE "engine/pokerus/check_pokerus.asm"
INCLUDE "event/lucky_number.asm"
INCLUDE "engine/caught_data.asm"
INCLUDE "engine/search2.asm"
@ -667,7 +239,7 @@ INCLUDE "engine/init_hof_credits.asm"
INCLUDE "mobile/get_trainer_class.asm"
INCLUDE "battle/sliding_intro.asm"
INCLUDE "mobile/print_opp_message.asm"
INCLUDE "engine/check_battle_scene.asm"
INCLUDE "engine/routines/checkbattlescene.asm"
INCLUDE "engine/gbc_only.asm"
INCLUDE "event/poke_seer.asm"
@ -685,9 +257,9 @@ INCLUDE "engine/tempmon.asm"
INCLUDE "text/types.asm"
INCLUDE "text/unused_gen_1_trainers.asm"
INCLUDE "engine/mon_stats.asm"
INCLUDE "engine/init_list.asm"
INCLUDE "engine/routines/initlist.asm"
INCLUDE "engine/experience.asm"
INCLUDE "engine/switch_party_mons.asm"
INCLUDE "engine/routines/switchpartymons.asm"
INCLUDE "gfx/load_pics.asm"
INCLUDE "engine/move_mon_wo_mail.asm"
INCLUDE "data/pokemon/base_stats.asm"
@ -751,11 +323,7 @@ INCLUDE "engine/timeofdaypals.asm"
INCLUDE "engine/battle_transition.asm"
INCLUDE "event/field_moves.asm"
INCLUDE "event/magnet_train.asm"
BattleStart_LoadEDTile: ; 8cf4f
call CGBOnly_LoadEDTile
ret
INCLUDE "engine/routines/battlestart_copytilemapatonce.asm"
INCLUDE "engine/sprites.asm"
INCLUDE "engine/mon_icons.asm"
@ -897,8 +465,8 @@ SECTION "bank3E", ROMX
INCLUDE "gfx/font.asm"
INCLUDE "engine/time_capsule.asm"
INCLUDE "event/name_rater.asm"
INCLUDE "engine/play_slow_cry.asm"
INCLUDE "engine/new_pokedex_entry.asm"
INCLUDE "engine/routines/playslowcry.asm"
INCLUDE "engine/routines/newpokedexentry.asm"
INCLUDE "engine/time_capsule_2.asm"
INCLUDE "engine/unown_dex.asm"
INCLUDE "event/magikarp.asm"
@ -973,15 +541,7 @@ INCLUDE "text/phone/extra2.asm"
SECTION "bank5E", ROMX
_UpdateBattleHUDs:
farcall DrawPlayerHUD
ld hl, PlayerHPPal
call SetHPPal
farcall DrawEnemyHUD
ld hl, EnemyHPPal
call SetHPPal
farcall FinishBattleAnim
ret
INCLUDE "engine/routines/updatebattlehuds.asm"
SECTION "mobile_5e", ROMX
@ -1036,11 +596,15 @@ INCLUDE "engine/print_party.asm"
SECTION "bank77_2", ROMX
INCLUDE "engine/printhoursmins.asm"
INCLUDE "engine/routines/printhoursmins.asm"
INCLUDE "engine/diploma.asm"
INCLUDE "engine/pokedex_3.asm"
INCLUDE "event/catch_tutorial_input.asm"
INCLUDE "engine/pokegear_2.asm"
INCLUDE "engine/routines/townmap_convertlinebreakcharacters.asm"
PokegearGFX: ; 1de2e4
INCBIN "gfx/pokegear/pokegear.2bpp.lz"
INCLUDE "engine/european_mail.asm"

View File

@ -139,7 +139,7 @@ SECTION "Map Scripts 8", ROMX
INCLUDE "maps/DiglettsCave.asm"
INCLUDE "maps/MountMoon.asm"
INCLUDE "maps/Underground.asm"
INCLUDE "maps/UndergroundPath.asm"
INCLUDE "maps/RockTunnel1F.asm"
INCLUDE "maps/RockTunnelB1F.asm"
INCLUDE "maps/SafariZoneFuchsiaGateBeta.asm"
@ -176,10 +176,10 @@ INCLUDE "maps/Route2946Gate.asm"
SECTION "Map Scripts 10", ROMX
INCLUDE "maps/Route22.asm"
INCLUDE "maps/WarehouseEntrance.asm"
INCLUDE "maps/UndergroundPathSwitchRoomEntrances.asm"
INCLUDE "maps/GoldenrodUnderground.asm"
INCLUDE "maps/GoldenrodUndergroundSwitchRoomEntrances.asm"
INCLUDE "maps/GoldenrodDeptStoreB1F.asm"
INCLUDE "maps/UndergroundWarehouse.asm"
INCLUDE "maps/GoldenrodUndergroundWarehouse.asm"
INCLUDE "maps/MountMortar1FOutside.asm"
INCLUDE "maps/MountMortar1FInside.asm"
INCLUDE "maps/MountMortar2FInside.asm"
@ -304,7 +304,7 @@ INCLUDE "maps/SaffronTrainStation.asm"
INCLUDE "maps/SilphCo1F.asm"
INCLUDE "maps/CopycatsHouse1F.asm"
INCLUDE "maps/CopycatsHouse2F.asm"
INCLUDE "maps/Route5UndergroundEntrance.asm"
INCLUDE "maps/Route5UndergroundPathEntrance.asm"
INCLUDE "maps/Route5SaffronCityGate.asm"
INCLUDE "maps/Route5CleanseTagSpeechHouse.asm"
@ -350,7 +350,7 @@ INCLUDE "maps/VermilionMart.asm"
INCLUDE "maps/VermilionHouseDiglettsCaveSpeechHouse.asm"
INCLUDE "maps/VermilionGym.asm"
INCLUDE "maps/Route6SaffronGate.asm"
INCLUDE "maps/Route6UndergroundEntrance.asm"
INCLUDE "maps/Route6UndergroundPathEntrance.asm"
INCLUDE "maps/Pokecenter2F.asm"
INCLUDE "maps/TradeCenter.asm"
INCLUDE "maps/Colosseum.asm"

View File

@ -58,7 +58,7 @@ CeladonGameCornerFisherScript:
buttonsound
checkitem COIN_CASE
iffalse .NoCoinCase
checkcoins 9998
checkcoins MAX_COINS - 1
if_equal $0, .FullCoinCase
stringtotext .coinname, $1
scall .GiveCoins

View File

@ -572,8 +572,8 @@ GoldenrodCity_MapEventHeader:
warp_def $15, $e, 1, GOLDENROD_GAME_CORNER
warp_def $f, $5, 1, RADIO_TOWER_1F
warp_def $1, $13, 3, ROUTE_35_GOLDENROD_GATE
warp_def $5, $9, 8, UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES
warp_def $1d, $b, 5, UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES
warp_def $5, $9, 8, GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES
warp_def $1d, $b, 5, GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES
warp_def $1b, $f, 1, GOLDENROD_POKECENTER_1F
.CoordEvents:

View File

@ -27,9 +27,9 @@ UnknownScript_0x7d78a:
jump UnknownScript_0x7d791
UnknownScript_0x7d791:
checkevent EVENT_WAREHOUSE_LAYOUT_2
checkevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_2
iftrue .Layout2
checkevent EVENT_WAREHOUSE_LAYOUT_3
checkevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_3
iftrue .Layout3
changeblock $a, $8, $d
return
@ -43,7 +43,7 @@ UnknownScript_0x7d791:
return
UnknownScript_0x7d7ac:
clearevent EVENT_WAREHOUSE_BLOCKED_OFF
clearevent EVENT_GOLDENROD_UNDERGROUND_WAREHOUSE_BLOCKED_OFF
return
GoldenrodDeptStoreB1FBlackBelt1Script:
@ -115,7 +115,7 @@ GoldenrodDeptStoreB1F_MapEventHeader:
.Warps:
db 3
warp_def $2, $11, 3, UNDERGROUND_WAREHOUSE
warp_def $2, $11, 3, GOLDENROD_UNDERGROUND_WAREHOUSE
warp_def $4, $9, 1, GOLDENROD_DEPT_STORE_ELEVATOR
warp_def $4, $a, 2, GOLDENROD_DEPT_STORE_ELEVATOR

View File

@ -14,30 +14,30 @@ MapGoldenrodDeptStoreElevatorSignpost0Script:
playsound SFX_ELEVATOR
earthquake 60
waitsfx
checkevent EVENT_WAREHOUSE_BLOCKED_OFF
checkevent EVENT_GOLDENROD_UNDERGROUND_WAREHOUSE_BLOCKED_OFF
iftrue .Done
checkevent EVENT_WAREHOUSE_LAYOUT_1
checkevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_1
iftrue .BoxLayout1
checkevent EVENT_WAREHOUSE_LAYOUT_2
checkevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_2
iftrue .BoxLayout2
checkevent EVENT_WAREHOUSE_LAYOUT_3
checkevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_3
iftrue .BoxLayout3
.BoxLayout3:
setevent EVENT_WAREHOUSE_LAYOUT_1
clearevent EVENT_WAREHOUSE_LAYOUT_2
clearevent EVENT_WAREHOUSE_LAYOUT_3
setevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_1
clearevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_2
clearevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_3
end
.BoxLayout1:
clearevent EVENT_WAREHOUSE_LAYOUT_1
setevent EVENT_WAREHOUSE_LAYOUT_2
clearevent EVENT_WAREHOUSE_LAYOUT_3
clearevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_1
setevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_2
clearevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_3
end
.BoxLayout2:
clearevent EVENT_WAREHOUSE_LAYOUT_1
clearevent EVENT_WAREHOUSE_LAYOUT_2
setevent EVENT_WAREHOUSE_LAYOUT_3
clearevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_1
clearevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_2
setevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_3
end
.Done:

View File

@ -1,15 +1,15 @@
const_value set 2
const WAREHOUSEENTRANCE_SUPER_NERD1
const WAREHOUSEENTRANCE_SUPER_NERD2
const WAREHOUSEENTRANCE_SUPER_NERD3
const WAREHOUSEENTRANCE_SUPER_NERD4
const WAREHOUSEENTRANCE_POKE_BALL
const WAREHOUSEENTRANCE_GRAMPS
const WAREHOUSEENTRANCE_SUPER_NERD5
const WAREHOUSEENTRANCE_SUPER_NERD6
const WAREHOUSEENTRANCE_GRANNY
const GOLDENRODUNDERGROUND_SUPER_NERD1
const GOLDENRODUNDERGROUND_SUPER_NERD2
const GOLDENRODUNDERGROUND_SUPER_NERD3
const GOLDENRODUNDERGROUND_SUPER_NERD4
const GOLDENRODUNDERGROUND_POKE_BALL
const GOLDENRODUNDERGROUND_GRAMPS
const GOLDENRODUNDERGROUND_SUPER_NERD5
const GOLDENRODUNDERGROUND_SUPER_NERD6
const GOLDENRODUNDERGROUND_GRANNY
WarehouseEntrance_MapScriptHeader:
GoldenrodUnderground_MapScriptHeader:
.SceneScripts:
db 0
@ -58,56 +58,56 @@ WarehouseEntrance_MapScriptHeader:
if_equal SATURDAY, .Saturday
.Sunday:
disappear WAREHOUSEENTRANCE_GRAMPS
disappear WAREHOUSEENTRANCE_SUPER_NERD5
appear WAREHOUSEENTRANCE_SUPER_NERD6
appear WAREHOUSEENTRANCE_GRANNY
disappear GOLDENRODUNDERGROUND_GRAMPS
disappear GOLDENRODUNDERGROUND_SUPER_NERD5
appear GOLDENRODUNDERGROUND_SUPER_NERD6
appear GOLDENRODUNDERGROUND_GRANNY
return
.Monday:
disappear WAREHOUSEENTRANCE_GRAMPS
disappear GOLDENRODUNDERGROUND_GRAMPS
checkmorn
iffalse .NotMondayMorning
appear WAREHOUSEENTRANCE_GRAMPS
appear GOLDENRODUNDERGROUND_GRAMPS
.NotMondayMorning:
disappear WAREHOUSEENTRANCE_SUPER_NERD5
disappear WAREHOUSEENTRANCE_SUPER_NERD6
disappear WAREHOUSEENTRANCE_GRANNY
disappear GOLDENRODUNDERGROUND_SUPER_NERD5
disappear GOLDENRODUNDERGROUND_SUPER_NERD6
disappear GOLDENRODUNDERGROUND_GRANNY
return
.Tuesday:
disappear WAREHOUSEENTRANCE_GRAMPS
appear WAREHOUSEENTRANCE_SUPER_NERD5
disappear WAREHOUSEENTRANCE_SUPER_NERD6
disappear WAREHOUSEENTRANCE_GRANNY
disappear GOLDENRODUNDERGROUND_GRAMPS
appear GOLDENRODUNDERGROUND_SUPER_NERD5
disappear GOLDENRODUNDERGROUND_SUPER_NERD6
disappear GOLDENRODUNDERGROUND_GRANNY
return
.Wednesday:
disappear WAREHOUSEENTRANCE_GRAMPS
disappear WAREHOUSEENTRANCE_SUPER_NERD5
appear WAREHOUSEENTRANCE_SUPER_NERD6
disappear WAREHOUSEENTRANCE_GRANNY
disappear GOLDENRODUNDERGROUND_GRAMPS
disappear GOLDENRODUNDERGROUND_SUPER_NERD5
appear GOLDENRODUNDERGROUND_SUPER_NERD6
disappear GOLDENRODUNDERGROUND_GRANNY
return
.Thursday:
disappear WAREHOUSEENTRANCE_GRAMPS
appear WAREHOUSEENTRANCE_SUPER_NERD5
disappear WAREHOUSEENTRANCE_SUPER_NERD6
disappear WAREHOUSEENTRANCE_GRANNY
disappear GOLDENRODUNDERGROUND_GRAMPS
appear GOLDENRODUNDERGROUND_SUPER_NERD5
disappear GOLDENRODUNDERGROUND_SUPER_NERD6
disappear GOLDENRODUNDERGROUND_GRANNY
return
.Friday:
disappear WAREHOUSEENTRANCE_GRAMPS
disappear WAREHOUSEENTRANCE_SUPER_NERD5
appear WAREHOUSEENTRANCE_SUPER_NERD6
disappear WAREHOUSEENTRANCE_GRANNY
disappear GOLDENRODUNDERGROUND_GRAMPS
disappear GOLDENRODUNDERGROUND_SUPER_NERD5
appear GOLDENRODUNDERGROUND_SUPER_NERD6
disappear GOLDENRODUNDERGROUND_GRANNY
return
.Saturday:
disappear WAREHOUSEENTRANCE_GRAMPS
appear WAREHOUSEENTRANCE_SUPER_NERD5
disappear WAREHOUSEENTRANCE_SUPER_NERD6
appear WAREHOUSEENTRANCE_GRANNY
disappear GOLDENRODUNDERGROUND_GRAMPS
appear GOLDENRODUNDERGROUND_SUPER_NERD5
disappear GOLDENRODUNDERGROUND_SUPER_NERD6
appear GOLDENRODUNDERGROUND_GRANNY
return
TrainerSupernerdEric:
@ -159,7 +159,7 @@ GrannyScript_0x7c132:
checkcode VAR_WEEKDAY
if_equal SUNDAY, .Open
if_equal SATURDAY, .Open
jump WarehouseEntranceScript_ShopClosed
jump GoldenrodUndergroundScript_ShopClosed
.Open:
pokemart MARTTYPE_BITTER, MART_UNDERGROUND
@ -169,14 +169,14 @@ GrannyScript_0x7c132:
GrampsScript_0x7c146:
opentext
checkflag ENGINE_GOLDENROD_UNDERGROUND_MERCHANT_CLOSED
iftrue WarehouseEntranceScript_ShopClosed
iftrue GoldenrodUndergroundScript_ShopClosed
checkcode VAR_WEEKDAY
if_equal MONDAY, .CheckMorn
jump WarehouseEntranceScript_ShopClosed
jump GoldenrodUndergroundScript_ShopClosed
.CheckMorn:
checkmorn
iffalse WarehouseEntranceScript_ShopClosed
iffalse GoldenrodUndergroundScript_ShopClosed
pokemart MARTTYPE_BARGAIN, 0
closetext
end
@ -187,7 +187,7 @@ OlderHaircutBrotherScript:
if_equal TUESDAY, .DoHaircut
if_equal THURSDAY, .DoHaircut
if_equal SATURDAY, .DoHaircut
jump WarehouseEntranceScript_ShopClosed
jump GoldenrodUndergroundScript_ShopClosed
.DoHaircut:
checkflag ENGINE_GOLDENROD_UNDERGROUND_GOT_HAIRCUT
@ -270,7 +270,7 @@ YoungerHaircutBrotherScript:
if_equal SUNDAY, .DoHaircut
if_equal WEDNESDAY, .DoHaircut
if_equal FRIDAY, .DoHaircut
jump WarehouseEntranceScript_ShopClosed
jump GoldenrodUndergroundScript_ShopClosed
.DoHaircut:
checkflag ENGINE_GOLDENROD_UNDERGROUND_GOT_HAIRCUT
@ -396,29 +396,26 @@ BasementDoorScript::
closetext
end
WarehouseEntranceScript_ShopClosed:
GoldenrodUndergroundScript_ShopClosed:
writetext UnknownText_0x7c904
waitbutton
closetext
end
WarehouseEntranceCoinCase:
GoldenrodUndergroundCoinCase:
itemball COIN_CASE
MapWarehouseEntranceSignpost1Script:
MapGoldenrodUndergroundSignpost1Script:
jumptext UnknownText_0x7c91a
WarehouseEntranceHiddenParlyzHeal:
dwb EVENT_WAREHOUSE_ENTRANCE_HIDDEN_PARLYZ_HEAL, PARLYZ_HEAL
GoldenrodUndergroundHiddenParlyzHeal:
dwb EVENT_GOLDENROD_UNDERGROUND_HIDDEN_PARLYZ_HEAL, PARLYZ_HEAL
GoldenrodUndergroundHiddenSuperPotion:
dwb EVENT_GOLDENROD_UNDERGROUND_HIDDEN_SUPER_POTION, SUPER_POTION
WarehouseEntranceHiddenSuperPotion:
dwb EVENT_WAREHOUSE_ENTRANCE_HIDDEN_SUPER_POTION, SUPER_POTION
WarehouseEntranceHiddenAntidote:
dwb EVENT_WAREHOUSE_ENTRANCE_HIDDEN_ANTIDOTE, ANTIDOTE
GoldenrodUndergroundHiddenAntidote:
dwb EVENT_GOLDENROD_UNDERGROUND_HIDDEN_ANTIDOTE, ANTIDOTE
SupernerdEricSeenText:
text "I got booted out"
@ -649,18 +646,18 @@ UnknownText_0x7c91a:
line "THIS POINT"
done
WarehouseEntrance_MapEventHeader:
GoldenrodUnderground_MapEventHeader:
; filler
db 0, 0
.Warps:
db 6
warp_def $2, $3, 7, UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES
warp_def $22, $3, 4, UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES
warp_def $6, $12, 4, WAREHOUSE_ENTRANCE
warp_def $1f, $15, 3, WAREHOUSE_ENTRANCE
warp_def $1f, $16, 3, WAREHOUSE_ENTRANCE
warp_def $1b, $16, 1, UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES
warp_def $2, $3, 7, GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES
warp_def $22, $3, 4, GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES
warp_def $6, $12, 4, GOLDENROD_UNDERGROUND
warp_def $1f, $15, 3, GOLDENROD_UNDERGROUND
warp_def $1f, $16, 3, GOLDENROD_UNDERGROUND
warp_def $1b, $16, 1, GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES
.CoordEvents:
db 0
@ -668,10 +665,10 @@ WarehouseEntrance_MapEventHeader:
.BGEvents:
db 5
bg_event 6, 18, BGEVENT_READ, BasementDoorScript
bg_event 6, 19, BGEVENT_READ, MapWarehouseEntranceSignpost1Script
bg_event 13, 6, BGEVENT_ITEM, WarehouseEntranceHiddenParlyzHeal
bg_event 18, 4, BGEVENT_ITEM, WarehouseEntranceHiddenSuperPotion
bg_event 8, 17, BGEVENT_ITEM, WarehouseEntranceHiddenAntidote
bg_event 6, 19, BGEVENT_READ, MapGoldenrodUndergroundSignpost1Script
bg_event 13, 6, BGEVENT_ITEM, GoldenrodUndergroundHiddenParlyzHeal
bg_event 18, 4, BGEVENT_ITEM, GoldenrodUndergroundHiddenSuperPotion
bg_event 8, 17, BGEVENT_ITEM, GoldenrodUndergroundHiddenAntidote
.ObjectEvents:
db 9
@ -679,8 +676,8 @@ WarehouseEntrance_MapEventHeader:
object_event SPRITE_SUPER_NERD, 9, 6, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_TRAINER, 2, TrainerSupernerdTeru, -1
object_event SPRITE_SUPER_NERD, 27, 3, SPRITEMOVEDATA_SPINRANDOM_FAST, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 2, TrainerPokemaniacIssac, -1
object_event SPRITE_SUPER_NERD, 6, 2, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_TRAINER, 3, TrainerPokemaniacDonald, -1
object_event SPRITE_POKE_BALL, 25, 7, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, WarehouseEntranceCoinCase, EVENT_WAREHOUSE_ENTRANCE_COIN_CASE
object_event SPRITE_GRAMPS, 11, 7, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, GrampsScript_0x7c146, EVENT_WAREHOUSE_ENTRANCE_GRAMPS
object_event SPRITE_SUPER_NERD, 14, 7, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, OlderHaircutBrotherScript, EVENT_WAREHOUSE_ENTRANCE_OLDER_HAIRCUT_BROTHER
object_event SPRITE_SUPER_NERD, 15, 7, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, YoungerHaircutBrotherScript, EVENT_WAREHOUSE_ENTRANCE_YOUNGER_HAIRCUT_BROTHER
object_event SPRITE_GRANNY, 21, 7, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, GrannyScript_0x7c132, EVENT_WAREHOUSE_ENTRANCE_GRANNY
object_event SPRITE_POKE_BALL, 25, 7, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, GoldenrodUndergroundCoinCase, EVENT_GOLDENROD_UNDERGROUND_COIN_CASE
object_event SPRITE_GRAMPS, 11, 7, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, GrampsScript_0x7c146, EVENT_GOLDENROD_UNDERGROUND_GRAMPS
object_event SPRITE_SUPER_NERD, 14, 7, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BLUE, OBJECTTYPE_SCRIPT, 0, OlderHaircutBrotherScript, EVENT_GOLDENROD_UNDERGROUND_OLDER_HAIRCUT_BROTHER
object_event SPRITE_SUPER_NERD, 15, 7, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, YoungerHaircutBrotherScript, EVENT_GOLDENROD_UNDERGROUND_YOUNGER_HAIRCUT_BROTHER
object_event SPRITE_GRANNY, 21, 7, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, PAL_NPC_BROWN, OBJECTTYPE_SCRIPT, 0, GrannyScript_0x7c132, EVENT_GOLDENROD_UNDERGROUND_GRANNY

View File

@ -31,19 +31,19 @@ doorstate: macro
endm
const_value set 2
const UNDERGROUNDPATHSWITCHROOMENTRANCES_PHARMACIST1
const UNDERGROUNDPATHSWITCHROOMENTRANCES_PHARMACIST2
const UNDERGROUNDPATHSWITCHROOMENTRANCES_ROCKET1
const UNDERGROUNDPATHSWITCHROOMENTRANCES_ROCKET2
const UNDERGROUNDPATHSWITCHROOMENTRANCES_ROCKET3
const UNDERGROUNDPATHSWITCHROOMENTRANCES_ROCKET_GIRL
const UNDERGROUNDPATHSWITCHROOMENTRANCES_TEACHER
const UNDERGROUNDPATHSWITCHROOMENTRANCES_SUPER_NERD
const UNDERGROUNDPATHSWITCHROOMENTRANCES_POKE_BALL1
const UNDERGROUNDPATHSWITCHROOMENTRANCES_POKE_BALL2
const UNDERGROUNDPATHSWITCHROOMENTRANCES_SILVER
const GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_PHARMACIST1
const GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_PHARMACIST2
const GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_ROCKET1
const GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_ROCKET2
const GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_ROCKET3
const GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_ROCKET_GIRL
const GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_TEACHER
const GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_SUPER_NERD
const GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_POKE_BALL1
const GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_POKE_BALL2
const GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_SILVER
UndergroundPathSwitchRoomEntrances_MapScriptHeader:
GoldenrodUndergroundSwitchRoomEntrances_MapScriptHeader:
.SceneScripts:
db 2
scene_script .DummyScene0
@ -112,10 +112,10 @@ UndergroundPathSwitchRoomEntrances_MapScriptHeader:
return
SuperNerdScript_0x7ca7a:
jumptextfaceplayer UndergroundPathSwitchRoomEntrances_SuperNerdText
jumptextfaceplayer GoldenrodUndergroundSwitchRoomEntrances_SuperNerdText
TeacherScript_0x7ca7d:
jumptextfaceplayer UndergroundPathSwitchRoomEntrances_TeacherText
jumptextfaceplayer GoldenrodUndergroundSwitchRoomEntrances_TeacherText
UndergroundSilverScene1:
spriteface PLAYER, RIGHT
@ -123,14 +123,14 @@ UndergroundSilverScene1:
special Special_FadeOutMusic
pause 15
playsound SFX_EXIT_BUILDING
appear UNDERGROUNDPATHSWITCHROOMENTRANCES_SILVER
appear GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_SILVER
waitsfx
applymovement UNDERGROUNDPATHSWITCHROOMENTRANCES_SILVER, UndergroundSilverApproachMovement1
applymovement GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_SILVER, UndergroundSilverApproachMovement1
spriteface PLAYER, RIGHT
scall UndergroundSilverBattleScript
applymovement UNDERGROUNDPATHSWITCHROOMENTRANCES_SILVER, UndergroundSilverRetreatMovement1
applymovement GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_SILVER, UndergroundSilverRetreatMovement1
playsound SFX_EXIT_BUILDING
disappear UNDERGROUNDPATHSWITCHROOMENTRANCES_SILVER
disappear GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_SILVER
setscene 1
waitsfx
playmapmusic
@ -142,14 +142,14 @@ UndergroundSilverScene2:
special Special_FadeOutMusic
pause 15
playsound SFX_EXIT_BUILDING
appear UNDERGROUNDPATHSWITCHROOMENTRANCES_SILVER
appear GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_SILVER
waitsfx
applymovement UNDERGROUNDPATHSWITCHROOMENTRANCES_SILVER, UndergroundSilverApproachMovement2
applymovement GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_SILVER, UndergroundSilverApproachMovement2
spriteface PLAYER, RIGHT
scall UndergroundSilverBattleScript
applymovement UNDERGROUNDPATHSWITCHROOMENTRANCES_SILVER, UndergroundSilverRetreatMovement2
applymovement GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_SILVER, UndergroundSilverRetreatMovement2
playsound SFX_EXIT_BUILDING
disappear UNDERGROUNDPATHSWITCHROOMENTRANCES_SILVER
disappear GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_SILVER
setscene 1
waitsfx
playmapmusic
@ -166,13 +166,13 @@ UndergroundSilverBattleScript:
writetext UndergroundSilverBeforeText
waitbutton
closetext
setevent EVENT_RIVAL_UNDERGROUND_PATH
setevent EVENT_RIVAL_GOLDENROD_UNDERGROUND
checkevent EVENT_GOT_TOTODILE_FROM_ELM
iftrue .Totodile
checkevent EVENT_GOT_CHIKORITA_FROM_ELM
iftrue .Chikorita
winlosstext UndergroundSilverWinText, UndergroundSilverLossText
setlasttalked UNDERGROUNDPATHSWITCHROOMENTRANCES_SILVER
setlasttalked GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_SILVER
loadtrainer RIVAL1, RIVAL1_4_TOTODILE
startbattle
dontrestartmapmusic
@ -181,7 +181,7 @@ UndergroundSilverBattleScript:
.Totodile:
winlosstext UndergroundSilverWinText, UndergroundSilverLossText
setlasttalked UNDERGROUNDPATHSWITCHROOMENTRANCES_SILVER
setlasttalked GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_SILVER
loadtrainer RIVAL1, RIVAL1_4_CHIKORITA
startbattle
dontrestartmapmusic
@ -190,7 +190,7 @@ UndergroundSilverBattleScript:
.Chikorita:
winlosstext UndergroundSilverWinText, UndergroundSilverLossText
setlasttalked UNDERGROUNDPATHSWITCHROOMENTRANCES_SILVER
setlasttalked GOLDENRODUNDERGROUNDSWITCHROOMENTRANCES_SILVER
loadtrainer RIVAL1, RIVAL1_4_CYNDAQUIL
startbattle
dontrestartmapmusic
@ -279,22 +279,22 @@ Switch1Script:
iftrue .On
writetext SwitchRoomText_OffTurnOn
yesorno
iffalse UndergroundPathSwitchRoomEntrances_DontToggle
iffalse GoldenrodUndergroundSwitchRoomEntrances_DontToggle
copybytetovar UndergroundSwitchPositions
addvar 1
copyvartobyte UndergroundSwitchPositions
setevent EVENT_SWITCH_1
jump UndergroundPathSwitchRoomEntrances_UpdateDoors
jump GoldenrodUndergroundSwitchRoomEntrances_UpdateDoors
.On:
writetext SwitchRoomText_OnTurnOff
yesorno
iffalse UndergroundPathSwitchRoomEntrances_DontToggle
iffalse GoldenrodUndergroundSwitchRoomEntrances_DontToggle
copybytetovar UndergroundSwitchPositions
addvar -1
copyvartobyte UndergroundSwitchPositions
clearevent EVENT_SWITCH_1
jump UndergroundPathSwitchRoomEntrances_UpdateDoors
jump GoldenrodUndergroundSwitchRoomEntrances_UpdateDoors
Switch2Script:
opentext
@ -304,22 +304,22 @@ Switch2Script:
iftrue .On
writetext SwitchRoomText_OffTurnOn
yesorno
iffalse UndergroundPathSwitchRoomEntrances_DontToggle
iffalse GoldenrodUndergroundSwitchRoomEntrances_DontToggle
copybytetovar UndergroundSwitchPositions
addvar 2
copyvartobyte UndergroundSwitchPositions
setevent EVENT_SWITCH_2
jump UndergroundPathSwitchRoomEntrances_UpdateDoors
jump GoldenrodUndergroundSwitchRoomEntrances_UpdateDoors
.On:
writetext SwitchRoomText_OnTurnOff
yesorno
iffalse UndergroundPathSwitchRoomEntrances_DontToggle
iffalse GoldenrodUndergroundSwitchRoomEntrances_DontToggle
copybytetovar UndergroundSwitchPositions
addvar -2
copyvartobyte UndergroundSwitchPositions
clearevent EVENT_SWITCH_2
jump UndergroundPathSwitchRoomEntrances_UpdateDoors
jump GoldenrodUndergroundSwitchRoomEntrances_UpdateDoors
Switch3Script:
opentext
@ -329,22 +329,22 @@ Switch3Script:
iftrue .On
writetext SwitchRoomText_OffTurnOn
yesorno
iffalse UndergroundPathSwitchRoomEntrances_DontToggle
iffalse GoldenrodUndergroundSwitchRoomEntrances_DontToggle
copybytetovar UndergroundSwitchPositions
addvar 3
copyvartobyte UndergroundSwitchPositions
setevent EVENT_SWITCH_3
jump UndergroundPathSwitchRoomEntrances_UpdateDoors
jump GoldenrodUndergroundSwitchRoomEntrances_UpdateDoors
.On:
writetext SwitchRoomText_OnTurnOff
yesorno
iffalse UndergroundPathSwitchRoomEntrances_DontToggle
iffalse GoldenrodUndergroundSwitchRoomEntrances_DontToggle
copybytetovar UndergroundSwitchPositions
addvar -3
copyvartobyte UndergroundSwitchPositions
clearevent EVENT_SWITCH_3
jump UndergroundPathSwitchRoomEntrances_UpdateDoors
jump GoldenrodUndergroundSwitchRoomEntrances_UpdateDoors
EmergencySwitchScript:
opentext
@ -354,32 +354,32 @@ EmergencySwitchScript:
iftrue .On
writetext SwitchRoomText_OffTurnOn
yesorno
iffalse UndergroundPathSwitchRoomEntrances_DontToggle
iffalse GoldenrodUndergroundSwitchRoomEntrances_DontToggle
writebyte 7
copyvartobyte UndergroundSwitchPositions
setevent EVENT_EMERGENCY_SWITCH
setevent EVENT_SWITCH_1
setevent EVENT_SWITCH_2
setevent EVENT_SWITCH_3
jump UndergroundPathSwitchRoomEntrances_UpdateDoors
jump GoldenrodUndergroundSwitchRoomEntrances_UpdateDoors
.On:
writetext SwitchRoomText_OnTurnOff
yesorno
iffalse UndergroundPathSwitchRoomEntrances_DontToggle
iffalse GoldenrodUndergroundSwitchRoomEntrances_DontToggle
writebyte 0
copyvartobyte UndergroundSwitchPositions
clearevent EVENT_EMERGENCY_SWITCH
clearevent EVENT_SWITCH_1
clearevent EVENT_SWITCH_2
clearevent EVENT_SWITCH_3
jump UndergroundPathSwitchRoomEntrances_UpdateDoors
jump GoldenrodUndergroundSwitchRoomEntrances_UpdateDoors
UndergroundPathSwitchRoomEntrances_DontToggle:
GoldenrodUndergroundSwitchRoomEntrances_DontToggle:
closetext
end
UndergroundPathSwitchRoomEntrances_UpdateDoors:
GoldenrodUndergroundSwitchRoomEntrances_UpdateDoors:
copybytetovar UndergroundSwitchPositions
if_equal 0, .Position0
if_equal 1, .Position1
@ -623,19 +623,17 @@ UndergroundPathSwitchRoomEntrances_UpdateDoors:
clearevent EVENT_SWITCH_14
end
UndergroundPathSwitchRoomEntrancesSmokeBall:
GoldenrodUndergroundSwitchRoomEntrancesSmokeBall:
itemball SMOKE_BALL
UndergroundPathSwitchRoomEntrancesFullHeal:
GoldenrodUndergroundSwitchRoomEntrancesFullHeal:
itemball FULL_HEAL
UndergroundPathSwitchRoomEntrancesHiddenMaxPotion:
dwb EVENT_UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES_HIDDEN_MAX_POTION, MAX_POTION
UndergroundPathSwitchRoomEntrancesHiddenRevive:
dwb EVENT_UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES_HIDDEN_REVIVE, REVIVE
GoldenrodUndergroundSwitchRoomEntrancesHiddenMaxPotion:
dwb EVENT_GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES_HIDDEN_MAX_POTION, MAX_POTION
GoldenrodUndergroundSwitchRoomEntrancesHiddenRevive:
dwb EVENT_GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES_HIDDEN_REVIVE, REVIVE
UndergroundSilverApproachMovement1:
step DOWN
@ -751,7 +749,7 @@ UndergroundSilverLossText:
cont "under my heels."
done
UndergroundPathSwitchRoomEntrances_SuperNerdText:
GoldenrodUndergroundSwitchRoomEntrances_SuperNerdText:
text "I was challenged"
line "to a battle down-"
cont "stairs."
@ -761,7 +759,7 @@ UndergroundPathSwitchRoomEntrances_SuperNerdText:
cont "better be careful."
done
UndergroundPathSwitchRoomEntrances_TeacherText:
GoldenrodUndergroundSwitchRoomEntrances_TeacherText:
text "There are some"
line "shops downstairs…"
@ -931,19 +929,19 @@ SwitchRoomText_Emergency:
line "EMERGENCY."
done
UndergroundPathSwitchRoomEntrances_MapEventHeader:
GoldenrodUndergroundSwitchRoomEntrances_MapEventHeader:
; filler
db 0, 0
.Warps:
db 9
warp_def $3, $17, 6, WAREHOUSE_ENTRANCE
warp_def $a, $16, 1, UNDERGROUND_WAREHOUSE
warp_def $a, $17, 2, UNDERGROUND_WAREHOUSE
warp_def $19, $5, 2, WAREHOUSE_ENTRANCE
warp_def $3, $17, 6, GOLDENROD_UNDERGROUND
warp_def $a, $16, 1, GOLDENROD_UNDERGROUND_WAREHOUSE
warp_def $a, $17, 2, GOLDENROD_UNDERGROUND_WAREHOUSE
warp_def $19, $5, 2, GOLDENROD_UNDERGROUND
warp_def $1d, $4, 14, GOLDENROD_CITY
warp_def $1d, $5, 14, GOLDENROD_CITY
warp_def $19, $15, 1, WAREHOUSE_ENTRANCE
warp_def $19, $15, 1, GOLDENROD_UNDERGROUND
warp_def $1d, $14, 13, GOLDENROD_CITY
warp_def $1d, $15, 13, GOLDENROD_CITY
@ -958,8 +956,8 @@ UndergroundPathSwitchRoomEntrances_MapEventHeader:
bg_event 1, 10, BGEVENT_READ, Switch2Script
bg_event 1, 2, BGEVENT_READ, Switch3Script
bg_event 11, 20, BGEVENT_READ, EmergencySwitchScript
bg_event 9, 8, BGEVENT_ITEM, UndergroundPathSwitchRoomEntrancesHiddenMaxPotion
bg_event 8, 1, BGEVENT_ITEM, UndergroundPathSwitchRoomEntrancesHiddenRevive
bg_event 9, 8, BGEVENT_ITEM, GoldenrodUndergroundSwitchRoomEntrancesHiddenMaxPotion
bg_event 8, 1, BGEVENT_ITEM, GoldenrodUndergroundSwitchRoomEntrancesHiddenRevive
.ObjectEvents:
db 11
@ -971,6 +969,6 @@ UndergroundPathSwitchRoomEntrances_MapEventHeader:
object_event SPRITE_ROCKET_GIRL, 12, 19, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, PAL_NPC_RED, OBJECTTYPE_TRAINER, 1, TrainerGruntF3, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
object_event SPRITE_TEACHER, 27, 3, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, TeacherScript_0x7ca7d, -1
object_event SPRITE_SUPER_NERD, 27, 19, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, SuperNerdScript_0x7ca7a, -1
object_event SPRITE_POKE_BALL, 12, 1, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, UndergroundPathSwitchRoomEntrancesSmokeBall, EVENT_UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES_SMOKE_BALL
object_event SPRITE_POKE_BALL, 9, 14, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, UndergroundPathSwitchRoomEntrancesFullHeal, EVENT_UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES_FULL_HEAL
object_event SPRITE_SILVER, 3, 23, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_RIVAL_UNDERGROUND_PATH
object_event SPRITE_POKE_BALL, 12, 1, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, GoldenrodUndergroundSwitchRoomEntrancesSmokeBall, EVENT_GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES_SMOKE_BALL
object_event SPRITE_POKE_BALL, 9, 14, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, GoldenrodUndergroundSwitchRoomEntrancesFullHeal, EVENT_GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES_FULL_HEAL
object_event SPRITE_SILVER, 3, 23, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, ObjectEvent, EVENT_RIVAL_GOLDENROD_UNDERGROUND

View File

@ -1,13 +1,13 @@
const_value set 2
const UNDERGROUNDWAREHOUSE_ROCKET1
const UNDERGROUNDWAREHOUSE_ROCKET2
const UNDERGROUNDWAREHOUSE_ROCKET3
const UNDERGROUNDWAREHOUSE_GENTLEMAN
const UNDERGROUNDWAREHOUSE_POKE_BALL1
const UNDERGROUNDWAREHOUSE_POKE_BALL2
const UNDERGROUNDWAREHOUSE_POKE_BALL3
const GOLDENRODUNDERGROUNDWAREHOUSE_ROCKET1
const GOLDENRODUNDERGROUNDWAREHOUSE_ROCKET2
const GOLDENRODUNDERGROUNDWAREHOUSE_ROCKET3
const GOLDENRODUNDERGROUNDWAREHOUSE_GENTLEMAN
const GOLDENRODUNDERGROUNDWAREHOUSE_POKE_BALL1
const GOLDENRODUNDERGROUNDWAREHOUSE_POKE_BALL2
const GOLDENRODUNDERGROUNDWAREHOUSE_POKE_BALL3
UndergroundWarehouse_MapScriptHeader:
GoldenrodUndergroundWarehouse_MapScriptHeader:
.SceneScripts:
db 0
@ -77,9 +77,9 @@ GentlemanScript_0x7d9bf:
buttonsound
verbosegiveitem CARD_KEY
setevent EVENT_RECEIVED_CARD_KEY
setevent EVENT_WAREHOUSE_LAYOUT_1
clearevent EVENT_WAREHOUSE_LAYOUT_2
clearevent EVENT_WAREHOUSE_LAYOUT_3
setevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_1
clearevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_2
clearevent EVENT_GOLDENROD_DEPT_STORE_B1F_LAYOUT_3
writetext UnknownText_0x7dc5b
buttonsound
UnknownScript_0x7d9de:
@ -88,13 +88,13 @@ UnknownScript_0x7d9de:
closetext
end
UndergroundWarehouseMaxEther:
GoldenrodUndergroundWarehouseMaxEther:
itemball MAX_ETHER
UndergroundWarehouseTMSleepTalk:
GoldenrodUndergroundWarehouseTMSleepTalk:
itemball TM_SLEEP_TALK
UndergroundWarehouseUltraBall:
GoldenrodUndergroundWarehouseUltraBall:
itemball ULTRA_BALL
GruntM24SeenText:
@ -210,14 +210,14 @@ UnknownText_0x7dc8d:
line "MON nationwide!"
done
UndergroundWarehouse_MapEventHeader:
GoldenrodUndergroundWarehouse_MapEventHeader:
; filler
db 0, 0
.Warps:
db 3
warp_def $c, $2, 2, UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES
warp_def $c, $3, 3, UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES
warp_def $c, $2, 2, GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES
warp_def $c, $3, 3, GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES
warp_def $2, $11, 1, GOLDENROD_DEPT_STORE_B1F
.CoordEvents:
@ -232,6 +232,6 @@ UndergroundWarehouse_MapEventHeader:
object_event SPRITE_ROCKET, 15, 8, SPRITEMOVEDATA_STANDING_UP, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 3, TrainerGruntM14, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
object_event SPRITE_ROCKET, 3, 14, SPRITEMOVEDATA_STANDING_RIGHT, 0, 0, -1, -1, 0, OBJECTTYPE_TRAINER, 4, TrainerGruntM15, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
object_event SPRITE_GENTLEMAN, 8, 12, SPRITEMOVEDATA_SPINRANDOM_SLOW, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GentlemanScript_0x7d9bf, EVENT_RADIO_TOWER_ROCKET_TAKEOVER
object_event SPRITE_POKE_BALL, 15, 18, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, UndergroundWarehouseMaxEther, EVENT_UNDERGROUND_WAREHOUSE_MAX_ETHER
object_event SPRITE_POKE_BALL, 9, 13, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, UndergroundWarehouseTMSleepTalk, EVENT_UNDERGROUND_WAREHOUSE_TM_SLEEP_TALK
object_event SPRITE_POKE_BALL, 1, 2, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, UndergroundWarehouseUltraBall, EVENT_UNDERGROUND_WAREHOUSE_ULTRA_BALL
object_event SPRITE_POKE_BALL, 15, 18, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, GoldenrodUndergroundWarehouseMaxEther, EVENT_GOLDENROD_UNDERGROUND_WAREHOUSE_MAX_ETHER
object_event SPRITE_POKE_BALL, 9, 13, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, GoldenrodUndergroundWarehouseTMSleepTalk, EVENT_GOLDENROD_UNDERGROUND_WAREHOUSE_TM_SLEEP_TALK
object_event SPRITE_POKE_BALL, 1, 2, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_ITEMBALL, 0, GoldenrodUndergroundWarehouseUltraBall, EVENT_GOLDENROD_UNDERGROUND_WAREHOUSE_ULTRA_BALL

View File

@ -1,3 +1,5 @@
ROUTE43GATE_TOLL EQU 1000
const_value set 2
const ROUTE43GATE_OFFICER
const ROUTE43GATE_ROCKET1
@ -48,17 +50,17 @@ RocketScript_Southbound:
opentext
writetext RocketText_TollFee
buttonsound
checkmoney $0, 999
checkmoney $0, ROUTE43GATE_TOLL - 1
if_equal $0, RocketScript_TollSouth
jump RocketScript_YoureBrokeSouth
RocketScript_TollSouth:
takemoney $0, 1000
takemoney $0, ROUTE43GATE_TOLL
writetext RocketText_ThankYou
jump RocketScript_ShakeDownSouth
RocketScript_YoureBrokeSouth:
takemoney $0, 1000
takemoney $0, ROUTE43GATE_TOLL
writetext RocketText_AllYouGot
jump RocketScript_ShakeDownSouth
@ -80,17 +82,17 @@ RocketScript_Northbound:
opentext
writetext RocketText_TollFee
buttonsound
checkmoney $0, 999
checkmoney $0, ROUTE43GATE_TOLL - 1
if_equal $0, RocketScript_TollNorth
jump RocketScript_YoureBrokeNorth
RocketScript_TollNorth:
takemoney $0, 1000
takemoney $0, ROUTE43GATE_TOLL
writetext RocketText_ThankYou
jump RocketScript_ShakeDownNorth
RocketScript_YoureBrokeNorth:
takemoney $0, 1000
takemoney $0, ROUTE43GATE_TOLL
writetext RocketText_AllYouGot
jump RocketScript_ShakeDownNorth

View File

@ -45,7 +45,7 @@ Route5_MapEventHeader:
.Warps:
db 4
warp_def $f, $11, 1, ROUTE_5_UNDERGROUND_ENTRANCE
warp_def $f, $11, 1, ROUTE_5_UNDERGROUND_PATH_ENTRANCE
warp_def $11, $8, 1, ROUTE_5_SAFFRON_CITY_GATE
warp_def $11, $9, 2, ROUTE_5_SAFFRON_CITY_GATE
warp_def $b, $a, 1, ROUTE_5_CLEANSE_TAG_SPEECH_HOUSE

View File

@ -1,40 +0,0 @@
const_value set 2
const ROUTE5UNDERGROUNDENTRANCE_TEACHER
Route5UndergroundEntrance_MapScriptHeader:
.SceneScripts:
db 0
.MapCallbacks:
db 0
Route5UndergroundEntranceTeacherScript:
jumptextfaceplayer Route5UndergroundEntranceTeacherText
Route5UndergroundEntranceTeacherText:
text "Many cities in"
line "JOHTO have long"
para "histories. I'd"
line "love to visit!"
done
Route5UndergroundEntrance_MapEventHeader:
; filler
db 0, 0
.Warps:
db 3
warp_def $7, $3, 1, ROUTE_5
warp_def $7, $4, 1, ROUTE_5
warp_def $3, $4, 1, UNDERGROUND
.CoordEvents:
db 0
.BGEvents:
db 0
.ObjectEvents:
db 1
object_event SPRITE_TEACHER, 2, 2, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, Route5UndergroundEntranceTeacherScript, -1

View File

@ -0,0 +1,40 @@
const_value set 2
const ROUTE5UNDERGROUNDPATHENTRANCE_TEACHER
Route5UndergroundPathEntrance_MapScriptHeader:
.SceneScripts:
db 0
.MapCallbacks:
db 0
Route5UndergroundPathEntranceTeacherScript:
jumptextfaceplayer Route5UndergroundPathEntranceTeacherText
Route5UndergroundPathEntranceTeacherText:
text "Many cities in"
line "JOHTO have long"
para "histories. I'd"
line "love to visit!"
done
Route5UndergroundPathEntrance_MapEventHeader:
; filler
db 0, 0
.Warps:
db 3
warp_def $7, $3, 1, ROUTE_5
warp_def $7, $4, 1, ROUTE_5
warp_def $3, $4, 1, UNDERGROUND_PATH
.CoordEvents:
db 0
.BGEvents:
db 0
.ObjectEvents:
db 1
object_event SPRITE_TEACHER, 2, 2, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, PAL_NPC_GREEN, OBJECTTYPE_SCRIPT, 0, Route5UndergroundPathEntranceTeacherScript, -1

View File

@ -97,7 +97,7 @@ Route6_MapEventHeader:
.Warps:
db 2
warp_def $3, $11, 1, ROUTE_6_UNDERGROUND_ENTRANCE
warp_def $3, $11, 1, ROUTE_6_UNDERGROUND_PATH_ENTRANCE
warp_def $1, $6, 3, ROUTE_6_SAFFRON_GATE
.CoordEvents:

View File

@ -1,11 +1,11 @@
Route6UndergroundEntrance_MapScriptHeader:
Route6UndergroundPathEntrance_MapScriptHeader:
.SceneScripts:
db 0
.MapCallbacks:
db 0
Route6UndergroundEntrance_MapEventHeader:
Route6UndergroundPathEntrance_MapEventHeader:
; filler
db 0, 0
@ -13,7 +13,7 @@ Route6UndergroundEntrance_MapEventHeader:
db 3
warp_def $7, $3, 1, ROUTE_6
warp_def $7, $4, 1, ROUTE_6
warp_def $3, $4, 2, UNDERGROUND
warp_def $3, $4, 2, UNDERGROUND_PATH
.CoordEvents:
db 0

View File

@ -1,34 +0,0 @@
Underground_MapScriptHeader:
.SceneScripts:
db 0
.MapCallbacks:
db 0
UndergroundHiddenFullRestore:
dwb EVENT_UNDERGROUND_HIDDEN_FULL_RESTORE, FULL_RESTORE
UndergroundHiddenXSpecial:
dwb EVENT_UNDERGROUND_HIDDEN_X_SPECIAL, X_SPECIAL
Underground_MapEventHeader:
; filler
db 0, 0
.Warps:
db 2
warp_def $2, $3, 3, ROUTE_5_UNDERGROUND_ENTRANCE
warp_def $18, $3, 3, ROUTE_6_UNDERGROUND_ENTRANCE
.CoordEvents:
db 0
.BGEvents:
db 2
bg_event 9, 3, BGEVENT_ITEM, UndergroundHiddenFullRestore
bg_event 19, 1, BGEVENT_ITEM, UndergroundHiddenXSpecial
.ObjectEvents:
db 0

34
maps/UndergroundPath.asm Normal file
View File

@ -0,0 +1,34 @@
UndergroundPath_MapScriptHeader:
.SceneScripts:
db 0
.MapCallbacks:
db 0
UndergroundPathHiddenFullRestore:
dwb EVENT_UNDERGROUND_PATH_HIDDEN_FULL_RESTORE, FULL_RESTORE
UndergroundPathHiddenXSpecial:
dwb EVENT_UNDERGROUND_PATH_HIDDEN_X_SPECIAL, X_SPECIAL
UndergroundPath_MapEventHeader:
; filler
db 0, 0
.Warps:
db 2
warp_def $2, $3, 3, ROUTE_5_UNDERGROUND_PATH_ENTRANCE
warp_def $18, $3, 3, ROUTE_6_UNDERGROUND_PATH_ENTRANCE
.CoordEvents:
db 0
.BGEvents:
db 2
bg_event 9, 3, BGEVENT_ITEM, UndergroundPathHiddenFullRestore
bg_event 19, 1, BGEVENT_ITEM, UndergroundPathHiddenXSpecial
.ObjectEvents:
db 0

View File

@ -462,8 +462,8 @@ NationalPark_BlockData:
NationalParkBugContest_BlockData:
INCBIN "maps/NationalPark.blk"
Route6UndergroundEntrance_BlockData:
Route5UndergroundEntrance_BlockData:
Route5UndergroundPathEntrance_BlockData:
Route6UndergroundPathEntrance_BlockData:
INCBIN "maps/UndergroundPathEntrance.blk"
BetaPokecenterTradeStation_BlockData:
@ -571,17 +571,17 @@ Route16_BlockData:
Route18_BlockData:
INCBIN "maps/Route18.blk"
WarehouseEntrance_BlockData:
INCBIN "maps/WarehouseEntrance.blk"
GoldenrodUnderground_BlockData:
INCBIN "maps/GoldenrodUnderground.blk"
UndergroundPathSwitchRoomEntrances_BlockData:
INCBIN "maps/UndergroundPathSwitchRoomEntrances.blk"
GoldenrodUndergroundSwitchRoomEntrances_BlockData:
INCBIN "maps/GoldenrodUndergroundSwitchRoomEntrances.blk"
GoldenrodDeptStoreB1F_BlockData:
INCBIN "maps/GoldenrodDeptStoreB1F.blk"
UndergroundWarehouse_BlockData:
INCBIN "maps/UndergroundWarehouse.blk"
GoldenrodUndergroundWarehouse_BlockData:
INCBIN "maps/GoldenrodUndergroundWarehouse.blk"
BetaElevator_BlockData:
INCBIN "maps/BetaElevator.blk"
@ -953,8 +953,8 @@ FuchsiaGym_BlockData:
SafariZoneBeta_BlockData:
INCBIN "maps/SafariZoneBeta.blk"
Underground_BlockData:
INCBIN "maps/Underground.blk"
UndergroundPath_BlockData:
INCBIN "maps/UndergroundPath.blk"
Route39Barn_BlockData:
INCBIN "maps/Route39Barn.blk"

View File

@ -124,10 +124,10 @@ MapGroup_Dungeons:
map_header TeamRocketBaseB2F, TILESET_POWER_PLANT, DUNGEON, MAHOGANY_TOWN, MUSIC_ROCKET_HIDEOUT, 1, PALETTE_DAY, FISHGROUP_SHORE
map_header TeamRocketBaseB3F, TILESET_POWER_PLANT, DUNGEON, MAHOGANY_TOWN, MUSIC_ROCKET_HIDEOUT, 1, PALETTE_DAY, FISHGROUP_SHORE
map_header IlexForest, TILESET_ILEX_FOREST, CAVE, ILEX_FOREST, MUSIC_UNION_CAVE, 0, PALETTE_NITE, FISHGROUP_POND
map_header WarehouseEntrance, TILESET_GATE, DUNGEON, GOLDENROD_CITY, MUSIC_UNION_CAVE, 1, PALETTE_DAY, FISHGROUP_SHORE
map_header UndergroundPathSwitchRoomEntrances, TILESET_GYM_1, DUNGEON, GOLDENROD_CITY, MUSIC_UNION_CAVE, 1, PALETTE_DAY, FISHGROUP_SHORE
map_header GoldenrodUnderground, TILESET_GATE, DUNGEON, GOLDENROD_CITY, MUSIC_UNION_CAVE, 1, PALETTE_DAY, FISHGROUP_SHORE
map_header GoldenrodUndergroundSwitchRoomEntrances, TILESET_GYM_1, DUNGEON, GOLDENROD_CITY, MUSIC_UNION_CAVE, 1, PALETTE_DAY, FISHGROUP_SHORE
map_header GoldenrodDeptStoreB1F, TILESET_UNDERGROUND, DUNGEON, GOLDENROD_CITY, MUSIC_GOLDENROD_CITY, 1, PALETTE_DAY, FISHGROUP_SHORE
map_header UndergroundWarehouse, TILESET_UNDERGROUND, DUNGEON, GOLDENROD_CITY, MUSIC_UNION_CAVE, 1, PALETTE_DAY, FISHGROUP_SHORE
map_header GoldenrodUndergroundWarehouse, TILESET_UNDERGROUND, DUNGEON, GOLDENROD_CITY, MUSIC_UNION_CAVE, 1, PALETTE_DAY, FISHGROUP_SHORE
map_header MountMortar1FOutside, TILESET_WHIRL_ISLANDS, CAVE, MT_MORTAR, MUSIC_UNION_CAVE, 1, PALETTE_NITE, FISHGROUP_LAKE
map_header MountMortar1FInside, TILESET_WHIRL_ISLANDS, CAVE, MT_MORTAR, MUSIC_UNION_CAVE, 1, PALETTE_NITE, FISHGROUP_LAKE
map_header MountMortar2FInside, TILESET_WHIRL_ISLANDS, CAVE, MT_MORTAR, MUSIC_UNION_CAVE, 1, PALETTE_NITE, FISHGROUP_LAKE
@ -157,7 +157,7 @@ MapGroup_Dungeons:
map_header TohjoFalls, TILESET_CAVE, CAVE, TOHJO_FALLS, MUSIC_UNION_CAVE, 1, PALETTE_NITE, FISHGROUP_LAKE
map_header DiglettsCave, TILESET_CAVE, CAVE, DIGLETTS_CAVE, MUSIC_MT_MOON, 1, PALETTE_NITE, FISHGROUP_SHORE
map_header MountMoon, TILESET_CAVE, CAVE, MT_MOON, MUSIC_MT_MOON, 1, PALETTE_NITE, FISHGROUP_SHORE
map_header Underground, TILESET_UNDERGROUND, GATE, UNDERGROUND, MUSIC_MT_MOON, 0, PALETTE_NITE, FISHGROUP_SHORE
map_header UndergroundPath, TILESET_UNDERGROUND, GATE, UNDERGROUND_PATH, MUSIC_MT_MOON, 0, PALETTE_NITE, FISHGROUP_SHORE
map_header RockTunnel1F, TILESET_WHIRL_ISLANDS, CAVE, ROCK_TUNNEL, MUSIC_MT_MOON, 1, PALETTE_DARK, FISHGROUP_SHORE
map_header RockTunnelB1F, TILESET_WHIRL_ISLANDS, CAVE, ROCK_TUNNEL, MUSIC_MT_MOON, 1, PALETTE_DARK, FISHGROUP_SHORE
map_header SafariZoneFuchsiaGateBeta, TILESET_GATE, INDOOR, FUCHSIA_CITY, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
@ -300,7 +300,7 @@ MapGroup_Vermilion:
map_header VermilionHouseDiglettsCaveSpeechHouse, TILESET_HOUSE_1, INDOOR, VERMILION_CITY, MUSIC_VERMILION_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header VermilionGym, TILESET_GAME_CORNER, INDOOR, VERMILION_CITY, MUSIC_GYM, 1, PALETTE_DAY, FISHGROUP_SHORE
map_header Route6SaffronGate, TILESET_GATE, GATE, ROUTE_6, MUSIC_ROUTE_3, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header Route6UndergroundEntrance, TILESET_GATE, GATE, ROUTE_6, MUSIC_ROUTE_3, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header Route6UndergroundPathEntrance, TILESET_GATE, GATE, ROUTE_6, MUSIC_ROUTE_3, 0, PALETTE_DAY, FISHGROUP_SHORE
MapGroup_Pallet:
@ -491,7 +491,7 @@ MapGroup_Saffron:
map_header SilphCo1F, TILESET_POWER_PLANT, INDOOR, SAFFRON_CITY, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header CopycatsHouse1F, TILESET_PLAYERS_HOUSE, INDOOR, SAFFRON_CITY, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header CopycatsHouse2F, TILESET_PLAYERS_HOUSE, INDOOR, SAFFRON_CITY, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header Route5UndergroundEntrance, TILESET_GATE, GATE, ROUTE_5, MUSIC_ROUTE_3, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header Route5UndergroundPathEntrance, TILESET_GATE, GATE, ROUTE_5, MUSIC_ROUTE_3, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header Route5SaffronCityGate, TILESET_GATE, GATE, ROUTE_5, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE
map_header Route5CleanseTagSpeechHouse, TILESET_HOUSE_1, INDOOR, ROUTE_5, MUSIC_VIRIDIAN_CITY, 0, PALETTE_DAY, FISHGROUP_SHORE

View File

@ -416,10 +416,10 @@ endm
map_header_2 TeamRocketBaseB2F, TEAM_ROCKET_BASE_B2F, $0, 0
map_header_2 TeamRocketBaseB3F, TEAM_ROCKET_BASE_B3F, $0, 0
map_header_2 IlexForest, ILEX_FOREST, $5, 0
map_header_2 WarehouseEntrance, WAREHOUSE_ENTRANCE, $0, 0
map_header_2 UndergroundPathSwitchRoomEntrances, UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES, $0, 0
map_header_2 GoldenrodUnderground, GOLDENROD_UNDERGROUND, $0, 0
map_header_2 GoldenrodUndergroundSwitchRoomEntrances, GOLDENROD_UNDERGROUND_SWITCH_ROOM_ENTRANCES, $0, 0
map_header_2 GoldenrodDeptStoreB1F, GOLDENROD_DEPT_STORE_B1F, $0, 0
map_header_2 UndergroundWarehouse, UNDERGROUND_WAREHOUSE, $0, 0
map_header_2 GoldenrodUndergroundWarehouse, GOLDENROD_UNDERGROUND_WAREHOUSE, $0, 0
map_header_2 MountMortar1FOutside, MOUNT_MORTAR_1F_OUTSIDE, $9, 0
map_header_2 MountMortar1FInside, MOUNT_MORTAR_1F_INSIDE, $9, 0
map_header_2 MountMortar2FInside, MOUNT_MORTAR_2F_INSIDE, $9, 0
@ -464,7 +464,7 @@ endm
map_header_2 Route42EcruteakGate, ROUTE_42_ECRUTEAK_GATE, $0, 0
map_header_2 DiglettsCave, DIGLETTS_CAVE, $9, 0
map_header_2 MountMoon, MOUNT_MOON, $9, 0
map_header_2 Underground, UNDERGROUND, $0, 0
map_header_2 UndergroundPath, UNDERGROUND_PATH, $0, 0
map_header_2 RockTunnel1F, ROCK_TUNNEL_1F, $9, 0
map_header_2 RockTunnelB1F, ROCK_TUNNEL_B1F, $9, 0
map_header_2 SafariZoneFuchsiaGateBeta, SAFARI_ZONE_FUCHSIA_GATE_BETA, $0, 0
@ -552,7 +552,7 @@ endm
map_header_2 VermilionHouseDiglettsCaveSpeechHouse, VERMILION_HOUSE_DIGLETTS_CAVE_SPEECH_HOUSE, $0, 0
map_header_2 VermilionGym, VERMILION_GYM, $0, 0
map_header_2 Route6SaffronGate, ROUTE_6_SAFFRON_GATE, $0, 0
map_header_2 Route6UndergroundEntrance, ROUTE_6_UNDERGROUND_ENTRANCE, $0, 0
map_header_2 Route6UndergroundPathEntrance, ROUTE_6_UNDERGROUND_PATH_ENTRANCE, $0, 0
map_header_2 RedsHouse1F, REDS_HOUSE_1F, $0, 0
map_header_2 RedsHouse2F, REDS_HOUSE_2F, $0, 0
map_header_2 BluesHouse, BLUES_HOUSE, $0, 0
@ -672,7 +672,7 @@ endm
map_header_2 SilphCo1F, SILPH_CO_1F, $0, 0
map_header_2 CopycatsHouse1F, COPYCATS_HOUSE_1F, $0, 0
map_header_2 CopycatsHouse2F, COPYCATS_HOUSE_2F, $0, 0
map_header_2 Route5UndergroundEntrance, ROUTE_5_UNDERGROUND_ENTRANCE, $0, 0
map_header_2 Route5UndergroundPathEntrance, ROUTE_5_UNDERGROUND_PATH_ENTRANCE, $0, 0
map_header_2 Route5SaffronCityGate, ROUTE_5_SAFFRON_CITY_GATE, $0, 0
map_header_2 Route5CleanseTagSpeechHouse, ROUTE_5_CLEANSE_TAG_SPEECH_HOUSE, $0, 0
map_header_2 CherrygroveMart, CHERRYGROVE_MART, $0, 0

View File

@ -2226,7 +2226,7 @@ Function89d85: ; 89d85 (22:5d85)
push hl
call Mobile22_SetBGMapMode0
call _hl_
call CGBOnly_LoadEDTile
call CGBOnly_CopyTilemapAtOnce
pop hl
asm_89d90: ; 89d90 (22:5d90)
@ -2670,7 +2670,7 @@ Function8a055: ; 8a055 (22:6055)
inc hl
ld a, $6
call Function8a5a3
call CGBOnly_LoadEDTile
call CGBOnly_CopyTilemapAtOnce
pop bc
ld a, c
cp $b
@ -2685,7 +2685,7 @@ Function8a055: ; 8a055 (22:6055)
ld a, $6
hlcoord 15, 4, AttrMap
call Function8a5a3
call CGBOnly_LoadEDTile
call CGBOnly_CopyTilemapAtOnce
jp Function89e36
Function8a0a1: ; 8a0a1 (22:60a1)

View File

@ -411,7 +411,7 @@ Function8b539: ; 8b539 (22:7539)
call Function8b4fd
ld e, $0
call Function89c44
call CGBOnly_LoadEDTile
call CGBOnly_CopyTilemapAtOnce
ret
Function8b555: ; 8b555 (22:7555)

View File

@ -3089,7 +3089,7 @@ Function1013d6: ; 1013d6
; 1013dd
Function1013dd: ; 1013dd
call CGBOnly_LoadEDTile
call CGBOnly_CopyTilemapAtOnce
ret
; 1013e1

View File

@ -2494,7 +2494,7 @@ wMahoganyMart1FSceneID:: db ; d9b1
wTeamRocketBaseB1FSceneID:: db ; d9b2
wTeamRocketBaseB2FSceneID:: db ; d9b3
wTeamRocketBaseB3FSceneID:: db ; d9b4
wUndergroundPathSwitchRoomEntrancesSceneID:: db ; d9b5
wGoldenrodUndergroundSwitchRoomEntrancesSceneID:: db ; d9b5
wSilverCaveRoom3SceneID:: db ; d9b6
wVictoryRoadSceneID:: db ; d9b7
wDragonsDenB1FSceneID:: db ; d9b8