mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-04-09 05:44:44 -07:00
Merge pull request #237 from yenatch/incbins
Map triggers and egg hatching.
This commit is contained in:
commit
f676c3d357
@ -1884,7 +1884,7 @@ Script_checkmaptriggers: ; 0x975d1
|
||||
ld b, a
|
||||
call GetScriptByte
|
||||
ld c, a
|
||||
call Function2147
|
||||
call GetMapTrigger
|
||||
ld a, d
|
||||
or e
|
||||
jr z, .asm_975e5 ; 0x975de $5
|
||||
@ -1923,7 +1923,7 @@ Script_domaptrigger: ; 0x975f5
|
||||
; fallthrough
|
||||
|
||||
Unknown_975fd: ; 0x975fd
|
||||
call Function2147
|
||||
call GetMapTrigger
|
||||
ld a, d
|
||||
or e
|
||||
jr z, .asm_97608 ; 0x97602 $4
|
||||
|
25
home.asm
25
home.asm
@ -1765,13 +1765,14 @@ Function37e2:: ; 37e2
|
||||
push hl
|
||||
push de
|
||||
push bc
|
||||
|
||||
call Function381e
|
||||
jr c, .asm_37ef
|
||||
ld e, c
|
||||
ld d, b
|
||||
call PlayCryHeader
|
||||
|
||||
.asm_37ef
|
||||
|
||||
pop bc
|
||||
pop de
|
||||
pop hl
|
||||
@ -1783,16 +1784,17 @@ Function37f3:: ; 37f3
|
||||
ret c
|
||||
ld a, [hROMBank]
|
||||
push af
|
||||
ld a, $3c
|
||||
ld a, BANK(CryHeaders)
|
||||
rst Bankswitch
|
||||
|
||||
ld hl, $6787
|
||||
ld hl, CryHeaders
|
||||
add hl, bc
|
||||
add hl, bc
|
||||
add hl, bc
|
||||
add hl, bc
|
||||
add hl, bc
|
||||
add hl, bc
|
||||
|
||||
ld e, [hl]
|
||||
inc hl
|
||||
ld d, [hl]
|
||||
@ -1804,10 +1806,10 @@ Function37f3:: ; 37f3
|
||||
ld a, [hli]
|
||||
ld [CryLength], a
|
||||
ld a, [hl]
|
||||
ld [$c2b3], a
|
||||
ld [CryLength + 1], a
|
||||
|
||||
pop af
|
||||
rst Bankswitch
|
||||
|
||||
and a
|
||||
ret
|
||||
; 381e
|
||||
@ -1815,11 +1817,12 @@ Function37f3:: ; 37f3
|
||||
Function381e:: ; 381e
|
||||
and a
|
||||
jr z, .asm_382b
|
||||
cp $fc
|
||||
cp NUM_POKEMON + 1
|
||||
jr nc, .asm_382b
|
||||
|
||||
dec a
|
||||
ld c, a
|
||||
ld b, $0
|
||||
ld b, 0
|
||||
and a
|
||||
ret
|
||||
|
||||
@ -2042,7 +2045,7 @@ GetPartyParamLocation:: ; 3917
|
||||
push bc
|
||||
ld hl, PartyMons
|
||||
ld c, a
|
||||
ld b, $00
|
||||
ld b, 0
|
||||
add hl, bc
|
||||
ld a, [CurPartyMon]
|
||||
call GetPartyLocation
|
||||
@ -2061,12 +2064,12 @@ Function392d:: ; 392d
|
||||
push hl
|
||||
ld a, b
|
||||
dec a
|
||||
ld b, $0
|
||||
ld b, 0
|
||||
add hl, bc
|
||||
ld hl, $5424
|
||||
ld hl, BaseData + 0
|
||||
ld bc, $0020
|
||||
call AddNTimes
|
||||
ld a, $14
|
||||
ld a, BANK(BaseData)
|
||||
call GetFarHalfword
|
||||
ld b, l
|
||||
ld c, h
|
||||
|
14
home/map.asm
14
home/map.asm
@ -24,7 +24,7 @@ Function211b:: ; 211b
|
||||
ret
|
||||
; 212a
|
||||
|
||||
Function212a:: ; 212a
|
||||
GetCurrentMapTrigger:: ; 212a
|
||||
ld a, [MapGroup]
|
||||
ld b, a
|
||||
ld a, [MapNumber]
|
||||
@ -32,7 +32,7 @@ Function212a:: ; 212a
|
||||
xor a
|
||||
ld [$dbf7], a
|
||||
ld [$dbf8], a
|
||||
call Function2147
|
||||
call GetMapTrigger
|
||||
ret c
|
||||
ld a, e
|
||||
ld [$dbf7], a
|
||||
@ -42,14 +42,14 @@ Function212a:: ; 212a
|
||||
ret
|
||||
; 2147
|
||||
|
||||
Function2147:: ; 2147
|
||||
GetMapTrigger:: ; 2147
|
||||
push bc
|
||||
ld a, [hROMBank]
|
||||
push af
|
||||
ld a, $13
|
||||
ld a, BANK(MapTriggers)
|
||||
rst Bankswitch
|
||||
|
||||
ld hl, $501e
|
||||
ld hl, MapTriggers
|
||||
.asm_2151
|
||||
push hl
|
||||
ld a, [hli]
|
||||
@ -106,9 +106,9 @@ Function217a:: ; 217a
|
||||
ld bc, TileMapEnd - TileMap
|
||||
call ByteFill
|
||||
|
||||
ld a, $13
|
||||
ld a, BANK(Function4d15b)
|
||||
rst Bankswitch
|
||||
call $515b
|
||||
call Function4d15b
|
||||
|
||||
pop af
|
||||
rst Bankswitch
|
||||
|
@ -586,10 +586,10 @@ Function2048:: ; 2048
|
||||
Function2057:: ; 2057
|
||||
ld a, [hROMBank]
|
||||
push af
|
||||
ld a, $21
|
||||
ld a, BANK(Function842db)
|
||||
rst Bankswitch
|
||||
|
||||
call $42db
|
||||
call Function842db
|
||||
pop af
|
||||
rst Bankswitch
|
||||
|
||||
|
@ -209,7 +209,7 @@ CheckDict:: ; 1087
|
||||
and a
|
||||
jp z, Function1383
|
||||
cp $4c
|
||||
jp z, $1337
|
||||
jp z, Function1337
|
||||
cp $4b
|
||||
jp z, Char4B
|
||||
cp $51 ; Player name
|
||||
@ -249,7 +249,7 @@ CheckDict:: ; 1087
|
||||
cp $56
|
||||
jp z, Function11d3
|
||||
cp $57
|
||||
jp z, $137c
|
||||
jp z, Function137c
|
||||
cp $58
|
||||
jp z, Function135a
|
||||
cp $4a
|
||||
@ -269,9 +269,9 @@ CheckDict:: ; 1087
|
||||
cp $5a
|
||||
jp z, Char5D
|
||||
cp $3f
|
||||
jp z, $121b
|
||||
jp z, Function121b
|
||||
cp $14
|
||||
jp z, $1252
|
||||
jp z, Function1252
|
||||
cp $e4
|
||||
jr z, .asm_1174 ; 0x113d $35
|
||||
cp $e5
|
||||
@ -322,103 +322,103 @@ Function117b:: ; 117b
|
||||
Function1186:: ; 1186
|
||||
push de
|
||||
ld de, MomsName
|
||||
jp $126a
|
||||
jp Function126a
|
||||
; 118d
|
||||
|
||||
Function118d:: ; 118d
|
||||
push de
|
||||
ld de, PlayerName
|
||||
jp $126a
|
||||
jp Function126a
|
||||
; 1194
|
||||
|
||||
Function1194:: ; 1194
|
||||
push de
|
||||
ld de, RivalName
|
||||
jp $126a
|
||||
jp Function126a
|
||||
; 119b
|
||||
|
||||
Function119b:: ; 119b
|
||||
push de
|
||||
ld de, RedsName
|
||||
jp $126a
|
||||
jp Function126a
|
||||
; 11a2
|
||||
|
||||
Function11a2:: ; 11a2
|
||||
push de
|
||||
ld de, GreensName
|
||||
jp $126a
|
||||
jp Function126a
|
||||
; 11a9
|
||||
|
||||
Function11a9:: ; 11a9
|
||||
push de
|
||||
ld de, Char5DText
|
||||
jp $126a
|
||||
jp Function126a
|
||||
; 11b0
|
||||
|
||||
Function11b0:: ; 11b0
|
||||
push de
|
||||
ld de, Char5CText
|
||||
jp $126a
|
||||
jp Function126a
|
||||
; 11b7
|
||||
|
||||
Function11b7:: ; 11b7
|
||||
push de
|
||||
ld de, Char5BText
|
||||
jp $126a
|
||||
jp Function126a
|
||||
; 11be
|
||||
|
||||
Function11be:: ; 11be
|
||||
push de
|
||||
ld de, Char5EText
|
||||
jp $126a
|
||||
jp Function126a
|
||||
; 11c5
|
||||
|
||||
Function11c5:: ; 11c5
|
||||
push de
|
||||
ld de, Char54Text
|
||||
jp $126a
|
||||
jp Function126a
|
||||
; 11cc
|
||||
|
||||
Function11cc:: ; 11cc
|
||||
push de
|
||||
ld de, Char23Text
|
||||
jp $126a
|
||||
jp Function126a
|
||||
; 11d3
|
||||
|
||||
Function11d3:: ; 11d3
|
||||
push de
|
||||
ld de, $1292
|
||||
jp $126a
|
||||
ld de, Char56Text
|
||||
jp Function126a
|
||||
; 11da
|
||||
|
||||
Function11da:: ; 11da
|
||||
push de
|
||||
ld de, Char4AText
|
||||
jp $126a
|
||||
jp Function126a
|
||||
; 11e1
|
||||
|
||||
Function11e1:: ; 11e1
|
||||
push de
|
||||
ld de, Char24Text
|
||||
jp $126a
|
||||
jp Function126a
|
||||
; 11e8
|
||||
|
||||
Function11e8:: ; 11e8
|
||||
push de
|
||||
ld de, Char37Text
|
||||
jp $126a
|
||||
jp Function126a
|
||||
; 11ef
|
||||
|
||||
Function11ef:: ; 11ef
|
||||
push de
|
||||
ld de, Char37Text
|
||||
jp $126a
|
||||
jp Function126a
|
||||
; 11f6
|
||||
|
||||
Function11f6:: ; 11f6
|
||||
push de
|
||||
ld de, Char37Text
|
||||
jp $126a
|
||||
jp Function126a
|
||||
; 11fd
|
||||
|
||||
|
||||
@ -437,22 +437,24 @@ Function1205:: ; 1205
|
||||
and a
|
||||
jr nz, .asm_120e ; 0x1207 $5
|
||||
ld de, BattleMonNick
|
||||
jr .asm_126a ; 0x120c $5c
|
||||
jr Function126a ; 0x120c $5c
|
||||
.asm_120e
|
||||
ld de, Char5AText ; Enemy
|
||||
call PlaceString
|
||||
ld h, b
|
||||
ld l, c
|
||||
ld de, EnemyMonNick
|
||||
jr .asm_126a ; 0x1219 $4f
|
||||
jr Function126a ; 0x1219 $4f
|
||||
|
||||
Function121b:: ; 121b
|
||||
push de
|
||||
ld a, [InLinkBattle]
|
||||
and a
|
||||
jr nz, .linkbattle
|
||||
ld a, [TrainerClass]
|
||||
cp $9
|
||||
cp RIVAL1
|
||||
jr z, .asm_1248 ; 0x1227 $1f
|
||||
cp $2a
|
||||
cp RIVAL2
|
||||
jr z, .asm_1248 ; 0x122b $1b
|
||||
ld de, $c656
|
||||
call PlaceString
|
||||
@ -464,13 +466,15 @@ Function1205:: ; 1205
|
||||
callab Function39939
|
||||
pop hl
|
||||
ld de, StringBuffer1
|
||||
jr .asm_126a ; 0x1246 $22
|
||||
jr Function126a ; 0x1246 $22
|
||||
.asm_1248
|
||||
ld de, RivalName
|
||||
jr .asm_126a ; 0x124b $1d
|
||||
jr Function126a ; 0x124b $1d
|
||||
.linkbattle
|
||||
ld de, $c656
|
||||
jr .asm_126a ; 0x1250 $18
|
||||
jr Function126a ; 0x1250 $18
|
||||
|
||||
Function1252:: ; 1252
|
||||
push de
|
||||
ld de, PlayerName
|
||||
call PlaceString
|
||||
@ -479,10 +483,11 @@ Function1205:: ; 1205
|
||||
ld a, [PlayerGender]
|
||||
bit 0, a
|
||||
ld de, String12a5
|
||||
jr z, .asm_126a ; 0x1263 $5
|
||||
jr z, Function126a ; 0x1263 $5
|
||||
ld de, String12a6
|
||||
jr .asm_126a ; 0x1268 $0
|
||||
.asm_126a
|
||||
jr Function126a ; 0x1268 $0
|
||||
|
||||
Function126a:: ; 126a
|
||||
call PlaceString
|
||||
ld h, b
|
||||
ld l, c
|
||||
@ -629,6 +634,7 @@ Char4B:: ; 131f
|
||||
or a
|
||||
call z, Function13cd
|
||||
|
||||
Function1337:: ; 1337
|
||||
push de
|
||||
call Function138c
|
||||
call Function138c
|
||||
@ -675,12 +681,12 @@ Function135a:: ; 135a
|
||||
call Functionaaf
|
||||
ld a, [InLinkBattle]
|
||||
cp $3
|
||||
jr z, .asm_137c
|
||||
jr z, Function137c
|
||||
cp $4
|
||||
jr z, .asm_137c
|
||||
jr z, Function137c
|
||||
call Function13cd
|
||||
|
||||
.asm_137c
|
||||
Function137c:: ; 137c
|
||||
pop hl
|
||||
ld de, .string_1382
|
||||
dec de
|
||||
@ -770,10 +776,10 @@ Function13d4:: ; 13d4
|
||||
; 13e0
|
||||
|
||||
Function13e0:: ; 13e0
|
||||
ld hl, $13e4
|
||||
ld hl, String_13e4
|
||||
ret
|
||||
|
||||
.string_13e4
|
||||
String_13e4: ; 13e4
|
||||
db "@"
|
||||
; 13e5
|
||||
|
||||
|
@ -20,6 +20,11 @@ dbw: MACRO
|
||||
dw \2
|
||||
ENDM
|
||||
|
||||
dbbw: MACRO
|
||||
db \1, \2
|
||||
dw \3
|
||||
ENDM
|
||||
|
||||
dn: MACRO
|
||||
db \1 << 4 + \2
|
||||
ENDM
|
||||
|
@ -1,4 +1,4 @@
|
||||
EggMovePointers: ; 0x23b11
|
||||
EggMovePointers:: ; 0x23b11
|
||||
dw BulbasaurEggMoves
|
||||
dw NoEggMoves
|
||||
dw NoEggMoves
|
||||
|
@ -13,6 +13,8 @@ SECTION "Egg Moves", ROMX, BANK[EGG_MOVES]
|
||||
INCLUDE "stats/egg_move_pointers.asm"
|
||||
|
||||
|
||||
EggMoves::
|
||||
|
||||
BulbasaurEggMoves:
|
||||
db LIGHT_SCREEN
|
||||
db SKULL_BASH
|
||||
|
83
wram.asm
83
wram.asm
@ -1782,6 +1782,89 @@ UndergroundSwitchPositions:: ; d963
|
||||
FarfetchdPosition:: ; d964
|
||||
ds 1 ; which position the ilex farfetch'd is in
|
||||
|
||||
SECTION "Map Triggers", WRAMX[$d972], BANK[1]
|
||||
|
||||
wPokecenter2FTrigger:: ds 1 ; d972
|
||||
wTradeCenterTrigger:: ds 1 ; d973
|
||||
wColosseumTrigger:: ds 1 ; d974
|
||||
wTimeCapsuleTrigger:: ds 1 ; d975
|
||||
wPowerPlantTrigger:: ds 1 ; d976
|
||||
wCeruleanGymTrigger:: ds 1 ; d977
|
||||
wRoute25Trigger:: ds 1 ; d978
|
||||
wTrainerHouseB1FTrigger:: ds 1 ; d979
|
||||
wVictoryRoadGateTrigger:: ds 1 ; d97a
|
||||
wSaffronTrainStationTrigger:: ds 1 ; d97b
|
||||
wRoute16GateTrigger:: ds 1 ; d97c
|
||||
wRoute1718GateTrigger:: ds 1 ; d97d
|
||||
wIndigoPlateauPokecenter1FTrigger:: ds 1 ; d97e
|
||||
wWillsRoomTrigger:: ds 1 ; d97f
|
||||
wKogasRoomTrigger:: ds 1 ; d980
|
||||
wBrunosRoomTrigger:: ds 1 ; d981
|
||||
wKarensRoomTrigger:: ds 1 ; d982
|
||||
wLancesRoomTrigger:: ds 1 ; d983
|
||||
wHallOfFameTrigger:: ds 1 ; d984
|
||||
wRoute27Trigger:: ds 1 ; d985
|
||||
wNewBarkTownTrigger:: ds 1 ; d986
|
||||
wElmsLabTrigger:: ds 1 ; d987
|
||||
wKrissHouse1FTrigger:: ds 1 ; d988
|
||||
wRoute29Trigger:: ds 1 ; d989
|
||||
wCherrygroveCityTrigger:: ds 1 ; d98a
|
||||
wMrPokemonsHouseTrigger:: ds 1 ; d98b
|
||||
wRoute32Trigger:: ds 1 ; d98c
|
||||
wRoute35NationalParkGateTrigger:: ds 1 ; d98d
|
||||
wRoute36Trigger:: ds 1 ; d98e
|
||||
wRoute36NationalParkGateTrigger:: ds 1 ; d98f
|
||||
wAzaleaTownTrigger:: ds 1 ; d990
|
||||
wGoldenrodGymTrigger:: ds 1 ; d991
|
||||
wGoldenrodMagnetTrainStationTrigger:: ds 1 ; d992
|
||||
wGoldenrodPokecenter1FTrigger:: ds 1 ; d993
|
||||
wOlivineCityTrigger:: ds 1 ; d994
|
||||
wRoute34Trigger:: ds 1 ; d995
|
||||
wRoute34IlexForestGateTrigger:: ds 1 ; d996
|
||||
wEcruteakHouseTrigger:: ds 1 ; d997
|
||||
wWiseTriosRoomTrigger:: ds 1 ; d998
|
||||
wEcruteakPokecenter1FTrigger:: ds 1 ; d999
|
||||
wEcruteakGymTrigger:: ds 1 ; d99a
|
||||
wMahoganyTownTrigger:: ds 1 ; d99b
|
||||
wRoute42Trigger:: ds 1 ; d99c
|
||||
wCianwoodCityTrigger:: ds 1 ; d99d
|
||||
wBattleTower1FTrigger:: ds 1 ; d99e
|
||||
wBattleTowerBattleRoomTrigger:: ds 1 ; d99f
|
||||
wBattleTowerElevatorTrigger:: ds 1 ; d9a0
|
||||
wBattleTowerHallwayTrigger:: ds 1 ; d9a1
|
||||
wBattleTowerOutsideTrigger:: ds 1 ; d9a2
|
||||
wRoute43GateTrigger:: ds 1 ; d9a3
|
||||
wMountMoonTrigger:: ds 1 ; d9a4
|
||||
wSproutTower3FTrigger:: ds 1 ; d9a5
|
||||
wTinTower1FTrigger:: ds 1 ; d9a6
|
||||
wBurnedTower1FTrigger:: ds 1 ; d9a7
|
||||
wBurnedTowerB1FTrigger:: ds 1 ; d9a8
|
||||
wRadioTower5FTrigger:: ds 1 ; d9a9
|
||||
wRuinsOfAlphOutsideTrigger:: ds 1 ; d9aa
|
||||
wRuinsOfAlphResearchCenterTrigger:: ds 1 ; d9ab
|
||||
wRuinsOfAlphHoOhChamberTrigger:: ds 1 ; d9ac
|
||||
wRuinsOfAlphKabutoChamberTrigger:: ds 1 ; d9ad
|
||||
wRuinsOfAlphOmanyteChamberTrigger:: ds 1 ; d9ae
|
||||
wRuinsOfAlphAerodactylChamberTrigger:: ds 1 ; d9af
|
||||
wRuinsOfAlphInnerChamberTrigger:: ds 1 ; d9b0
|
||||
wMahoganyMart1FTrigger:: ds 1 ; d9b1
|
||||
wTeamRocketBaseB1FTrigger:: ds 1 ; d9b2
|
||||
wTeamRocketBaseB2FTrigger:: ds 1 ; d9b3
|
||||
wTeamRocketBaseB3FTrigger:: ds 1 ; d9b4
|
||||
wUndergroundPathSwitchRoomEntrancesTrigger:: ds 1 ; d9b5
|
||||
wSilverCaveRoom3Trigger:: ds 1 ; d9b6
|
||||
wVictoryRoadTrigger:: ds 1 ; d9b7
|
||||
wDragonsDenB1FTrigger:: ds 1 ; d9b8
|
||||
wDragonShrineTrigger:: ds 1 ; d9b9
|
||||
wOlivinePortTrigger:: ds 1 ; d9ba
|
||||
wVermilionPortTrigger:: ds 1 ; d9bb
|
||||
wFastShip1FTrigger:: ds 1 ; d9bc
|
||||
wFastShipB1FTrigger:: ds 1 ; d9bd
|
||||
wMountMoonSquareTrigger:: ds 1 ; d9be
|
||||
wMobileTradeRoomMobileTrigger:: ds 1 ; d9bf
|
||||
wMobileBattleRoomTrigger:: ds 1 ; d9c0
|
||||
|
||||
|
||||
SECTION "Events",WRAMX[$da72],BANK[1]
|
||||
|
||||
EventFlags:: ; da72
|
||||
|
Loading…
x
Reference in New Issue
Block a user