This commit is contained in:
dannye 2019-04-13 17:21:23 -05:00
commit b1108ba91e
1427 changed files with 13219 additions and 8377 deletions

View file

@ -2607,21 +2607,21 @@ CopyTileIDs:
TileIDListPointerTable:
dw Unknown_79b24
db $77
dn 7, 7
dw Unknown_79b55
db $57
dn 5, 7
dw Unknown_79b78
db $37
dw Unknown_79b8d
db $77
dw Unknown_79bbe
db $77
dw Unknown_79bef
db $77
dn 3, 7
dw GengarIntroTiles1
dn 7, 7
dw GengarIntroTiles2
dn 7, 7
dw GengarIntroTiles3
dn 7, 7
dw Unknown_79c20
db $86
dn 8, 6
dw Unknown_79c50
db $3C
dn 3, 12
DownscaledMonTiles_5x5:
db $31,$38,$46,$54,$5B
@ -2656,7 +2656,7 @@ Unknown_79b78:
db $02,$09,$10,$17,$1E,$25,$2C
db $04,$0B,$12,$19,$20,$27,$2E
Unknown_79b8d:
GengarIntroTiles1:
db $00,$00,$00,$00,$00,$00,$00
db $00,$00,$00,$00,$00,$19,$00
db $02,$06,$0B,$10,$14,$1A,$00
@ -2665,7 +2665,7 @@ Unknown_79b8d:
db $04,$09,$0E,$13,$17,$1D,$1F
db $05,$0A,$0F,$01,$18,$1E,$20
Unknown_79bbe:
GengarIntroTiles2:
db $00,$00,$00,$30,$00,$37,$00
db $00,$00,$2B,$31,$34,$38,$3D
db $21,$26,$2C,$01,$35,$39,$3E
@ -2674,7 +2674,7 @@ Unknown_79bbe:
db $24,$29,$2F,$01,$01,$3B,$00
db $25,$2A,$01,$01,$01,$3C,$00
Unknown_79bef:
GengarIntroTiles3:
db $00,$00,$00,$00,$00,$00,$00
db $00,$00,$47,$4D,$00,$00,$00
db $00,$00,$48,$4E,$52,$56,$5B

View file

@ -118,8 +118,8 @@ GetBattleTransitionID_CompareLevels:
ld [wBattleTransitionSpiralDirection], a
ret
; fails to recognize VICTORY_ROAD_2, VICTORY_ROAD_3, all ROCKET_HIDEOUT maps,
; MANSION_1, SEAFOAM_ISLANDS_[2-5], POWER_PLANT, DIGLETTS_CAVE
; fails to recognize VICTORY_ROAD_2F, VICTORY_ROAD_3F, all ROCKET_HIDEOUT maps,
; POKEMON_MANSION_1F, SEAFOAM_ISLANDS_[B1F-B4F], POWER_PLANT, DIGLETTS_CAVE
; and SILPH_CO_[9-11]F as dungeon maps
GetBattleTransitionID_IsDungeonMap:
ld a, [wCurMap]
@ -155,30 +155,30 @@ GetBattleTransitionID_IsDungeonMap:
; is equal to one of these maps
DungeonMaps1:
db VIRIDIAN_FOREST
db ROCK_TUNNEL_1
db SEAFOAM_ISLANDS_1
db ROCK_TUNNEL_2
db ROCK_TUNNEL_1F
db SEAFOAM_ISLANDS_1F
db ROCK_TUNNEL_B1F
db $FF
; GetBattleTransitionID_IsDungeonMap checks if wCurMap
; is in between or equal to each pair of maps
DungeonMaps2:
; all MT_MOON maps
db MT_MOON_1
db MT_MOON_3
db MT_MOON_1F
db MT_MOON_B2F
; all SS_ANNE maps, VICTORY_ROAD_1, LANCES_ROOM, and HALL_OF_FAME
db SS_ANNE_1
; all SS_ANNE maps, VICTORY_ROAD_1F, LANCES_ROOM, and HALL_OF_FAME
db SS_ANNE_1F
db HALL_OF_FAME
; all POKEMONTOWER maps and Lavender Town buildings
; all POKEMON_TOWER maps and Lavender Town buildings
db LAVENDER_POKECENTER
db LAVENDER_HOUSE_2
db LAVENDER_CUBONE_HOUSE
; SILPH_CO_[2-8]F, MANSION[2-4], SAFARI_ZONE, and UNKNOWN_DUNGEON maps,
; except for SILPH_CO_1F
; SILPH_CO_[2-8]F, POKEMON_MANSION[2F-B1F], SAFARI_ZONE, and
; CERULEAN_CAVE maps, except for SILPH_CO_1F
db SILPH_CO_2F
db UNKNOWN_DUNGEON_1
db CERULEAN_CAVE_1F
db $FF
LoadBattleTransitionTile:

View file

@ -3,9 +3,9 @@ PrintBeginningBattleText:
dec a
jr nz, .trainerBattle
ld a, [wCurMap]
cp POKEMONTOWER_3
cp POKEMON_TOWER_3F
jr c, .notPokemonTower
cp LAVENDER_HOUSE_1
cp MR_FUJIS_HOUSE
jr c, .pokemonTower
.notPokemonTower
ld a, [wEnemyMonSpecies2]

View file

@ -3371,9 +3371,9 @@ IsGhostBattle:
dec a
ret nz
ld a, [wCurMap]
cp POKEMONTOWER_1
cp POKEMON_TOWER_1F
jr c, .next
cp LAVENDER_HOUSE_1
cp MR_FUJIS_HOUSE
jr nc, .next
ld b, SILPH_SCOPE
call IsItemInBag

View file

@ -30,7 +30,7 @@ InitBattleVariables:
ld a, [wCurMap]
cp SAFARI_ZONE_EAST
jr c, .notSafariBattle
cp SAFARI_ZONE_REST_HOUSE_1
cp SAFARI_ZONE_CENTER_REST_HOUSE
jr nc, .notSafariBattle
ld a, BATTLE_TYPE_SAFARI
ld [wBattleType], a

View file

@ -19,7 +19,7 @@ PrintSafariZoneBattleText:
ld [wd0b5], a
call GetMonHeader
ld a, [wMonHCatchRate]
ld [wEnemyMonCatchRate], a
ld [wEnemyMonActualCatchRate], a
pop hl
.asm_429f
push hl

View file

@ -77,12 +77,12 @@ SafariZoneGameOver:
call DisplayTextID
xor a
ld [wPlayerMovingDirection], a
ld a, SAFARI_ZONE_ENTRANCE
ld a, SAFARI_ZONE_GATE
ld [hWarpDestinationMap], a
ld a, $3
ld [wDestinationWarpID], a
ld a, $5
ld [wSafariZoneEntranceCurScript], a
ld [wSafariZoneGateCurScript], a
SetEvent EVENT_SAFARI_GAME_OVER
ld a, 1
ld [wSafariZoneGameOver], a

View file

@ -1,6 +1,14 @@
MOVE_GENGAR_RIGHT EQU $00
MOVE_GENGAR_LEFT EQU $01
MOVE_NIDORINO_RIGHT EQU $ff
const_value = -1
const MOVE_NIDORINO_RIGHT
const MOVE_GENGAR_RIGHT
const MOVE_GENGAR_LEFT
ANIMATION_END EQU 80
const_value = 3
const GENGAR_INTRO_TILES1
const GENGAR_INTRO_TILES2
const GENGAR_INTRO_TILES3
PlayIntro:
xor a
@ -20,13 +28,13 @@ PlayIntro:
PlayIntroScene:
ld b, SET_PAL_NIDORINO_INTRO
call RunPaletteCommand
ld a, %11100100
ldPal a, BLACK, DARK_GRAY, LIGHT_GRAY, WHITE
ld [rBGP], a
ld [rOBP0], a
ld [rOBP1], a
xor a
ld [hSCX], a
ld b, $3 ; Gengar tiles
ld b, GENGAR_INTRO_TILES1
call IntroCopyTiles
ld a, 0
ld [wBaseCoordX], a
@ -50,7 +58,7 @@ PlayIntroScene:
call PlaySound
ld de, IntroNidorinoAnimation2
call AnimateIntroNidorino
ld c, $a
ld c, 10
call CheckForUserInterruption
ret c
@ -64,23 +72,23 @@ PlayIntroScene:
call PlaySound
ld de, IntroNidorinoAnimation2
call AnimateIntroNidorino
ld c, $1e
ld c, 30
call CheckForUserInterruption
ret c
; raise
ld b, $4
ld b, GENGAR_INTRO_TILES2
call IntroCopyTiles
ld a, SFX_INTRO_RAISE
call PlaySound
lb de, 8 / 2, MOVE_GENGAR_LEFT
call IntroMoveMon
ld c, $1e
ld c, 30
call CheckForUserInterruption
ret c
; slash
ld b, $5
ld b, GENGAR_INTRO_TILES3
call IntroCopyTiles
ld a, SFX_INTRO_CRASH
call PlaySound
@ -89,19 +97,19 @@ PlayIntroScene:
; hip
ld a, SFX_INTRO_HIP
call PlaySound
ld a, $24
ld a, (FightIntroFrontMon2 - FightIntroFrontMon) / BYTES_PER_TILE
ld [wIntroNidorinoBaseTile], a
ld de, IntroNidorinoAnimation3
call AnimateIntroNidorino
ld c, $1e
ld c, 30
call CheckForUserInterruption
ret c
lb de, 8 / 2, MOVE_GENGAR_LEFT
call IntroMoveMon
ld b, $3
ld b, GENGAR_INTRO_TILES1
call IntroCopyTiles
ld c, $3c
ld c, 60
call CheckForUserInterruption
ret c
@ -117,29 +125,29 @@ PlayIntroScene:
call PlaySound
ld de, IntroNidorinoAnimation5
call AnimateIntroNidorino
ld c, $14
ld c, 20
call CheckForUserInterruption
ret c
ld a, $24
ld a, (FightIntroFrontMon2 - FightIntroFrontMon) / BYTES_PER_TILE
ld [wIntroNidorinoBaseTile], a
ld de, IntroNidorinoAnimation6
call AnimateIntroNidorino
ld c, $1e
ld c, 30
call CheckForUserInterruption
ret c
; lunge
ld a, SFX_INTRO_LUNGE
call PlaySound
ld a, $48
ld a, (FightIntroFrontMon3 - FightIntroFrontMon) / BYTES_PER_TILE
ld [wIntroNidorinoBaseTile], a
ld de, IntroNidorinoAnimation7
jp AnimateIntroNidorino
AnimateIntroNidorino:
ld a, [de]
cp $50
cp ANIMATION_END
ret z
ld [wBaseCoordY], a
inc de
@ -189,7 +197,7 @@ InitIntroNidorinoOAM:
ld [hli], a ; X
ld a, d
ld [hli], a ; tile
ld a, $80
ld a, OAM_BEHIND_BG
ld [hli], a ; attributes
inc d
dec c
@ -204,7 +212,7 @@ InitIntroNidorinoOAM:
IntroClearScreen:
ld hl, vBGMap1
ld bc, $240
ld bc, BG_MAP_WIDTH * SCREEN_HEIGHT
jr IntroClearCommon
IntroClearMiddleOfScreen:
@ -213,7 +221,7 @@ IntroClearMiddleOfScreen:
ld bc, SCREEN_WIDTH * 10
IntroClearCommon:
ld [hl], $0
ld [hl], 0
inc hl
dec bc
ld a, b
@ -222,7 +230,7 @@ IntroClearCommon:
ret
IntroPlaceBlackTiles:
ld a, $1
ld a, 1
.loop
ld [hli], a
dec c
@ -231,11 +239,10 @@ IntroPlaceBlackTiles:
IntroMoveMon:
; d = number of times to move the mon (2 pixels each time)
; e: $00 = move Gengar right, $01 = move Gengar left, $ff = move Nidorino right
ld a, e
cp $ff
cp MOVE_NIDORINO_RIGHT
jr z, .moveNidorinoRight
cp $1
cp MOVE_GENGAR_LEFT
jr z, .moveGengarLeft
; move Gengar right
ld a, [hSCX]
@ -286,7 +293,7 @@ LoadIntroGraphics:
ld a, BANK(FightIntroBackMon)
call FarCopyData2
ld hl, GameFreakIntro
ld de, vChars2 + $600
ld de, vChars2 + (FightIntroBackMonEnd - FightIntroBackMon)
ld bc, GameFreakIntroEnd - GameFreakIntro
ld a, BANK(GameFreakIntro)
call FarCopyData2
@ -305,7 +312,7 @@ PlayShootingStar:
ld b, SET_PAL_GAME_FREAK_INTRO
call RunPaletteCommand
callba LoadCopyrightAndTextBoxTiles
ld a, %11100100
ldPal a, BLACK, DARK_GRAY, LIGHT_GRAY, WHITE
ld [rBGP], a
ld c, 180
call DelayFrames
@ -348,10 +355,10 @@ IntroDrawBlackBars:
ld c, SCREEN_WIDTH * 4
call IntroPlaceBlackTiles
ld hl, vBGMap1
ld c, $80
ld c, BG_MAP_WIDTH * 4
call IntroPlaceBlackTiles
ld hl, vBGMap1 + $1c0
ld c, $80
ld hl, vBGMap1 + BG_MAP_WIDTH * 14
ld c, BG_MAP_WIDTH * 4
jp IntroPlaceBlackTiles
EmptyFunc4:
@ -359,7 +366,7 @@ EmptyFunc4:
IntroNidorinoAnimation0:
db 0, 0
db $50
db ANIMATION_END
IntroNidorinoAnimation1:
; This is a sequence of pixel movements for part of the Nidorino animation. This
@ -370,7 +377,7 @@ IntroNidorinoAnimation1:
db -1, 2
db 1, 2
db 2, 2
db $50 ; list terminator
db ANIMATION_END
IntroNidorinoAnimation2:
; This is a sequence of pixel movements for part of the Nidorino animation.
@ -380,7 +387,7 @@ IntroNidorinoAnimation2:
db -1, -2
db 1, -2
db 2, -2
db $50 ; list terminator
db ANIMATION_END
IntroNidorinoAnimation3:
; This is a sequence of pixel movements for part of the Nidorino animation.
@ -390,7 +397,7 @@ IntroNidorinoAnimation3:
db -8, 6
db 8, 6
db 12, 6
db $50 ; list terminator
db ANIMATION_END
IntroNidorinoAnimation4:
; This is a sequence of pixel movements for part of the Nidorino animation.
@ -400,7 +407,7 @@ IntroNidorinoAnimation4:
db -4, -4
db 4, -4
db 8, -4
db $50 ; list terminator
db ANIMATION_END
IntroNidorinoAnimation5:
; This is a sequence of pixel movements for part of the Nidorino animation.
@ -410,7 +417,7 @@ IntroNidorinoAnimation5:
db -4, 4
db 4, 4
db 8, 4
db $50 ; list terminator
db ANIMATION_END
IntroNidorinoAnimation6:
; This is a sequence of pixel movements for part of the Nidorino animation.
@ -419,7 +426,7 @@ IntroNidorinoAnimation6:
db 2, 0
db 2, 0
db 0, 0
db $50 ; list terminator
db ANIMATION_END
IntroNidorinoAnimation7:
; This is a sequence of pixel movements for part of the Nidorino animation.
@ -428,12 +435,14 @@ IntroNidorinoAnimation7:
db -7, -14
db -6, -12
db -4, -10
db $50 ; list terminator
db ANIMATION_END
GameFreakIntro:
INCBIN "gfx/gamefreak_intro.2bpp"
INCBIN "gfx/gamefreak_logo.2bpp"
ds $10 ; blank tile
rept 16
db $00 ; blank tile
endr
GameFreakIntroEnd:
FightIntroBackMon:
@ -444,12 +453,17 @@ FightIntroFrontMon:
IF DEF(_RED)
INCBIN "gfx/red/intro_nido_1.2bpp"
FightIntroFrontMon2:
INCBIN "gfx/red/intro_nido_2.2bpp"
FightIntroFrontMon3:
INCBIN "gfx/red/intro_nido_3.2bpp"
ENDC
IF DEF(_BLUE)
INCBIN "gfx/blue/intro_purin_1.2bpp"
FightIntroFrontMon2:
INCBIN "gfx/blue/intro_purin_2.2bpp"
FightIntroFrontMon3:
INCBIN "gfx/blue/intro_purin_3.2bpp"
ENDC

View file

@ -166,7 +166,7 @@ ItemUseBall:
; If the player is fighting the ghost Marowak, set the value that indicates the
; Pokémon can't be caught and skip the capture calculations.
ld a, [wCurMap]
cp POKEMONTOWER_6
cp POKEMON_TOWER_6F
jr nz, .loop
ld a, [wEnemyMonSpecies2]
cp MAROWAK
@ -297,7 +297,7 @@ ItemUseBall:
pop bc ; b = Rand1 - Status
; If Rand1 - Status > CatchRate, the ball fails to capture the Pokémon.
ld a, [wEnemyMonCatchRate]
ld a, [wEnemyMonActualCatchRate]
cp b
jr c, .failedToCapture
@ -325,7 +325,7 @@ ItemUseBall:
xor a
ld [H_MULTIPLICAND], a
ld [H_MULTIPLICAND + 1], a
ld a, [wEnemyMonCatchRate]
ld a, [wEnemyMonActualCatchRate]
ld [H_MULTIPLICAND + 2], a
ld a, 100
ld [H_MULTIPLIER], a
@ -1434,7 +1434,7 @@ VitaminText:
ItemUseBait:
ld hl, ThrewBaitText
call PrintText
ld hl, wEnemyMonCatchRate ; catch rate
ld hl, wEnemyMonActualCatchRate ; catch rate
srl [hl] ; halve catch rate
ld a, BAIT_ANIM
ld hl, wSafariBaitFactor ; bait factor
@ -1444,7 +1444,7 @@ ItemUseBait:
ItemUseRock:
ld hl, ThrewRockText
call PrintText
ld hl, wEnemyMonCatchRate ; catch rate
ld hl, wEnemyMonActualCatchRate ; catch rate
ld a, [hl]
add a ; double catch rate
jr nc, .noCarry
@ -1511,7 +1511,7 @@ ItemUseEscapeRope:
ResetEvent EVENT_IN_SAFARI_ZONE
xor a
ld [wNumSafariBalls], a
ld [wSafariZoneEntranceCurScript], a
ld [wSafariZoneGateCurScript], a
inc a
ld [wEscapedFromBattle], a
ld [wActionResultOrTookBattleTurn], a ; item used

View file

@ -140,19 +140,19 @@ RedrawPartyMenu_:
rl b
ld c, a
add hl, bc
ld de, wcd6d
ld de, wEvosMoves
ld a, BANK(EvosMovesPointerTable)
ld bc, 2
call FarCopyData
ld hl, wcd6d
ld hl, wEvosMoves
ld a, [hli]
ld h, [hl]
ld l, a
ld de, wcd6d
ld de, wEvosMoves
ld a, BANK(EvosMovesPointerTable)
ld bc, Mon133_EvosEnd - Mon133_EvosMoves
ld bc, wEvosMoves.end - wEvosMoves
call FarCopyData
ld hl, wcd6d
ld hl, wEvosMoves
ld de, .notAbleToEvolveText
; loop through the pokemon's evolution entries
.checkEvolutionsLoop

View file

@ -28,7 +28,7 @@ IsSurfingAllowed:
bit 5, a
jr nz, .forcedToRideBike
ld a, [wCurMap]
cp SEAFOAM_ISLANDS_5
cp SEAFOAM_ISLANDS_B4F
ret nz
CheckBothEventsSet EVENT_SEAFOAM4_BOULDER1_DOWN_HOLE, EVENT_SEAFOAM4_BOULDER2_DOWN_HOLE
ret z

View file

@ -268,7 +268,7 @@ RLEList_PewterGymGuy:
FreezeEnemyTrainerSprite:
ld a, [wCurMap]
cp POKEMONTOWER_7
cp POKEMON_TOWER_7F
ret z ; the Rockets on Pokemon Tower 7F leave after battling, so don't freeze them
ld hl, RivalIDs
ld a, [wEngagedTrainerClass]

View file

@ -55,14 +55,14 @@ CheckForceBikeOrSurf:
cp c ;compare x-coord
jr nz, .loop ; incorrect x-coord, check next item
ld a, [wCurMap]
cp SEAFOAM_ISLANDS_4
cp SEAFOAM_ISLANDS_B3F
ld a, $2
ld [wSeafoamIslands4CurScript], a
ld [wSeafoamIslandsB3FCurScript], a
jr z, .forceSurfing
ld a, [wCurMap]
cp SEAFOAM_ISLANDS_5
cp SEAFOAM_ISLANDS_B4F
ld a, $2
ld [wSeafoamIslands5CurScript], a
ld [wSeafoamIslandsB4FCurScript], a
jr z, .forceSurfing
;force bike riding
ld hl, wd732
@ -156,7 +156,7 @@ IsWarpTileInFrontOfPlayer:
push bc
call _GetTileAndCoordsInFrontOfPlayer
ld a, [wCurMap]
cp SS_ANNE_5
cp SS_ANNE_BOW
jr z, .ssAnne5
ld a, [wSpriteStateData1 + 9] ; player sprite's facing direction
srl a
@ -237,7 +237,7 @@ PrintSafariZoneSteps:
ld a, [wCurMap]
cp SAFARI_ZONE_EAST
ret c
cp UNKNOWN_DUNGEON_2
cp CERULEAN_CAVE_2F
ret nc
coord hl, 0, 0
ld b, 3

View file

@ -23,7 +23,7 @@ SetLastBlackoutMap:
ret
SafariZoneRestHouses:
db SAFARI_ZONE_REST_HOUSE_2
db SAFARI_ZONE_REST_HOUSE_3
db SAFARI_ZONE_REST_HOUSE_4
db SAFARI_ZONE_WEST_REST_HOUSE
db SAFARI_ZONE_EAST_REST_HOUSE
db SAFARI_ZONE_NORTH_REST_HOUSE
db -1

View file

@ -147,7 +147,7 @@ SetPal_Overworld:
ld a, [wCurMap]
cp REDS_HOUSE_1F
jr c, .townOrRoute
cp UNKNOWN_DUNGEON_2
cp CERULEAN_CAVE_2F
jr c, .normalDungeonOrBuilding
cp NAME_RATERS_HOUSE
jr c, .caveOrBruno