# Conflicts:
#	macros/scripts/maps.asm
This commit is contained in:
Remy Oukaour
2017-12-28 20:56:21 -05:00
156 changed files with 2060 additions and 1926 deletions

View File

@@ -72,11 +72,11 @@ Special_CelebiShrineEvent: ; 4989a
LoadCelebiGFX: ; 49912
farcall ClearSpriteAnims
ld de, SpecialCelebiLeafGFX
ld hl, VTiles1
ld hl, vTiles1
lb bc, BANK(SpecialCelebiLeafGFX), 4
call Request2bpp
ld de, SpecialCelebiGFX
ld hl, VTiles0 tile $84
ld hl, vTiles0 tile $84
lb bc, BANK(SpecialCelebiGFX), $10
call Request2bpp
xor a

View File

@@ -176,7 +176,7 @@ endc
shift
endr
db $ff
endm
ENDM
.UnownText: ; 8aebc
;.UnownText_Escape:

View File

@@ -8,7 +8,7 @@ PlayWhirlpoolSound: ; 8c7d4
BlindingFlash: ; 8c7e1
farcall FadeOutPalettes
ld hl, StatusFlags
ld hl, wStatusFlags
set 2, [hl] ; Flash
farcall ReplaceTimeOfDayPals
farcall UpdateTimeOfDayPal
@@ -22,11 +22,11 @@ BlindingFlash: ; 8c7e1
ShakeHeadbuttTree: ; 8c80a
farcall ClearSpriteAnims
ld de, CutGrassGFX
ld hl, VTiles1
ld hl, vTiles1
lb bc, BANK(CutGrassGFX), 4
call Request2bpp
ld de, HeadbuttTreeGFX
ld hl, VTiles1 tile $04
ld hl, vTiles1 tile $04
lb bc, BANK(HeadbuttTreeGFX), 8
call Request2bpp
call Cut_Headbutt_GetPixelFacing
@@ -67,7 +67,7 @@ ShakeHeadbuttTree: ; 8c80a
xor a
call ByteFill
ld de, Font
ld hl, VTiles1
ld hl, vTiles1
lb bc, BANK(Font), 12
call Get1bpp
call ReplaceKrisSprite
@@ -141,11 +141,11 @@ OWCutAnimation: ; 8c940
.LoadCutGFX: ; 8c96d
callfar ClearSpriteAnims ; pointless to farcall
ld de, CutGrassGFX
ld hl, VTiles1
ld hl, vTiles1
lb bc, BANK(CutGrassGFX), 4
call Request2bpp
ld de, CutTreeGFX
ld hl, VTiles1 tile $4
ld hl, vTiles1 tile $4
lb bc, BANK(CutTreeGFX), 4
call Request2bpp
ret
@@ -413,7 +413,7 @@ FlyToAnim: ; 8cb33
FlyFunction_InitGFX: ; 8cb9b (23:4b9b)
callfar ClearSpriteAnims
ld de, CutGrassGFX
ld hl, VTiles1 tile $00
ld hl, vTiles1 tile $00
lb bc, BANK(CutGrassGFX), 4
call Request2bpp
ld a, [CurPartyMon]

View File

@@ -97,7 +97,7 @@ GetFishGroupIndex: ; 9245b
; Return the index of fishgroup d in de.
push hl
ld hl, DailyFlags
ld hl, wDailyFlags
bit 2, [hl]
pop hl
jr z, .done

View File

@@ -43,7 +43,7 @@ GetCurTreeFruit: ; 44041
; 4404c
TryResetFruitTrees: ; 4404c
ld hl, DailyFlags
ld hl, wDailyFlags
bit 4, [hl]
ret nz
jp ResetFruitTrees
@@ -70,7 +70,7 @@ ResetFruitTrees: ; 4406a
ld [hli], a
ld [hli], a
ld [hl], a
ld hl, DailyFlags
ld hl, wDailyFlags
set 4, [hl]
ret
; 44078

View File

@@ -2,7 +2,7 @@ HALLOFFAME_COLON EQU $63
HallOfFame:: ; 0x8640e
call HallOfFame_FadeOutMusic
ld a, [StatusFlags]
ld a, [wStatusFlags]
push af
ld a, 1
ld [wGameLogicPaused], a
@@ -11,7 +11,7 @@ HallOfFame:: ; 0x8640e
ld [wSpawnAfterChampion], a
; Enable the Pokégear map to cycle through all of Kanto
ld hl, StatusFlags
ld hl, wStatusFlags
set 6, [hl] ; hall of fame
farcall HallOfFame_InitSaveIfNeeded
@@ -52,7 +52,7 @@ RedCredits:: ; 86455
call DisableSpriteUpdates
ld a, SPAWN_RED
ld [wSpawnAfterChampion], a
ld a, [StatusFlags]
ld a, [wStatusFlags]
ld b, a
farcall Credits
ret
@@ -249,7 +249,7 @@ AnimateHOFMonEntrance: ; 865b5
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
ld a, " "
call ByteFill
ld de, VTiles2 tile $31
ld de, vTiles2 tile $31
predef GetMonBackpic
ld a, $31
ld [hGraphicStartTile], a
@@ -533,7 +533,7 @@ DisplayHOFMon: ; 86748
HOF_AnimatePlayerPic: ; 86810
call ClearBGPalettes
ld hl, VTiles2 tile HALLOFFAME_COLON
ld hl, vTiles2 tile HALLOFFAME_COLON
ld de, FontExtra + 13 tiles ; "<COLON>"
lb bc, BANK(FontExtra), 1
call Request2bpp

View File

@@ -72,7 +72,7 @@ HealMachineAnim: ; 12324
.LoadGFX: ; 12383
call .LoadPalettes
ld de, .HealMachineGFX
ld hl, VTiles0 tile $7c
ld hl, vTiles0 tile $7c
lb bc, BANK(.HealMachineGFX), $2
call Request2bpp
ret

View File

@@ -79,7 +79,7 @@ Special_CheckMagikarpLength: ; fbb32
; 0xfbbae
Magikarp_LoadFeetInchesChars: ; fbbae
ld hl, VTiles2 tile "" ; $6e
ld hl, vTiles2 tile "" ; $6e
ld de, .feetinchchars
lb bc, BANK(.feetinchchars), 2
call Request2bpp
@@ -108,7 +108,7 @@ PrintMagikarpLength: ; fbbdb
; fbbfc
CalcMagikarpLength: ; fbbfc
; Return Magikarp's length (in mm) at wMagikarpLength (big endian).
; Return Magikarp's length (in feet and inches) at wMagikarpLength (big endian).
;
; input:
; de: EnemyMonDVs
@@ -247,6 +247,10 @@ CalcMagikarpLength: ; fbbfc
ld e, l
.done
; convert from mm to feet and inches
; in = mm / 25.4
; ft = in / 12
; hl = de × 10
ld h, d
ld l, e
@@ -275,9 +279,9 @@ CalcMagikarpLength: ; fbbfc
ld e, a
ld hl, wMagikarpLength
ld [hl], d
ld [hl], d ; ft
inc hl
ld [hl], e
ld [hl], e ; in
ret
; fbc9a
@@ -305,8 +309,11 @@ CalcMagikarpLength: ; fbbfc
; fbca8
.Lengths: ; fbca8
; ????, divisor
dwb 110, 1
; [wMagikarpLength] = z * 100 + (bc - x) / y
; First argument is the bc threshold as well as x.
; Second argument is y.
; In reality, due to the bug at .BCLessThanDE, the threshold is determined by only register b.
dwb 110, 1 ; not used unless the bug is fixed
dwb 310, 2
dwb 710, 4
dwb 2710, 20

View File

@@ -134,14 +134,14 @@ MagntTrain_LoadGFX_PlayMusic: ; 8ccc9
farcall GetPlayerIcon
pop af
ld [rSVBK], a
ld hl, VTiles0
ld hl, vTiles0
ld c, 4
call Request2bpp
ld hl, 12 tiles
add hl, de
ld d, h
ld e, l
ld hl, VTiles0 tile $04
ld hl, vTiles0 tile $04
ld c, 4
call Request2bpp
call MagnetTrain_InitLYOverrides
@@ -328,7 +328,7 @@ MagnetTrain_Jumptable: ; 8cdf7
push af
ld a, $1
ld [rSVBK], a
ld a, [PlayerGender]
ld a, [wPlayerGender]
bit 0, a
jr z, .got_gender
ld b, SPRITE_ANIM_INDEX_MAGNET_TRAIN_BLUE

View File

@@ -358,7 +358,7 @@ SurfFunction: ; c909
ld de, ENGINE_FOGBADGE
call CheckBadge
jr c, .asm_c956
ld hl, BikeFlags
ld hl, wBikeFlags
bit 1, [hl] ; always on bike
jr nz, .cannotsurf
ld a, [PlayerState]
@@ -520,7 +520,7 @@ TrySurfOW:: ; c9e7
call CheckPartyMove
jr c, .quit
ld hl, BikeFlags
ld hl, wBikeFlags
bit 1, [hl] ; always on bike (can't surf)
jr nz, .quit
@@ -1008,7 +1008,7 @@ StrengthFunction: ; cce5
ret
SetStrengthFlag: ; cd12
ld hl, BikeFlags
ld hl, wBikeFlags
set 0, [hl]
ld a, [CurPartyMon]
ld e, a
@@ -1086,7 +1086,7 @@ TryStrengthOW: ; cd78
call CheckEngineFlag
jr c, .nope
ld hl, BikeFlags
ld hl, wBikeFlags
bit 0, [hl]
jr z, .already_using
@@ -1683,7 +1683,7 @@ BikeFunction: ; d0b3
ret
.GetOffBike:
ld hl, BikeFlags
ld hl, wBikeFlags
bit 1, [hl]
jr nz, .CantGetOffBike
ld hl, Script_GetOffBike

View File

@@ -11,7 +11,7 @@ Pokepic:: ; 244e3
ld a, [CurPartySpecies]
ld [CurSpecies], a
call GetBaseData
ld de, VTiles1
ld de, vTiles1
predef GetMonFrontpic
ld a, [wMenuBorderTopCoord]
inc a

View File

@@ -18,7 +18,7 @@ GivePokerusAndConvertBerries: ; 2ed44
; If we haven't been to Goldenrod City at least once,
; prevent the contraction of Pokerus.
ld hl, StatusFlags2
ld hl, wStatusFlags2
bit 6, [hl]
ret z
call Random
@@ -123,7 +123,7 @@ GivePokerusAndConvertBerries: ; 2ed44
; any berry held by a Shuckle may be converted to berry juice
ConvertBerriesToBerryJuice: ; 2ede6
ld hl, StatusFlags2
ld hl, wStatusFlags2
bit 6, [hl]
ret z
call Random

View File

@@ -15,12 +15,12 @@ UnownPrinter: ; 16be4
call ClearTileMap
ld de, UnownDexATile
ld hl, VTiles1 tile $6f
ld hl, vTiles1 tile $6f
lb bc, BANK(UnownDexBTile), 1
call Request1bpp
ld de, UnownDexBTile
ld hl, VTiles1 tile $75
ld hl, vTiles1 tile $75
lb bc, BANK(UnownDexBTile), 1
call Request1bpp
@@ -139,7 +139,7 @@ UnownPrinter: ; 16be4
ld [CurPartySpecies], a
xor a
ld [wBoxAlignment], a
ld de, VTiles2
ld de, vTiles2
predef GetMonFrontpic
call .Load2bppToSRAM
hlcoord 1, 6
@@ -147,7 +147,7 @@ UnownPrinter: ; 16be4
ld [hGraphicStartTile], a
lb bc, 7, 7
predef PlaceGraphic
ld de, VTiles2 tile $31
ld de, vTiles2 tile $31
farcall RotateUnownFrontpic
ret
@@ -184,7 +184,7 @@ UnownPrinter: ; 16be4
ld bc, $31 tiles
xor a
call ByteFill
ld hl, VTiles2 tile $31
ld hl, vTiles2 tile $31
ld de, sScratch
ld c, $31
ld a, [hROMBank]

View File

@@ -105,7 +105,7 @@ x = x +- \2
endr
y = y + 1
endr
endm
ENDM
UnownPrinter_OverworldMapRectangle: ; e008b
overworldmaprect 7, 7

View File

@@ -53,7 +53,7 @@ SpecialGiveShuckle: ; 7305
call CopyName2
; Engine flag for this event.
ld hl, DailyFlags
ld hl, wDailyFlags
set 5, [hl]
; setflag ENGINE_SHUCKLE_GIVEN
ld a, 1

View File

@@ -36,7 +36,7 @@ SweetScentNothing: ; 0x506e9
SweetScentEncounter: ; 506ef
farcall CanUseSweetScent
jr nc, .no_battle
ld hl, StatusFlags2
ld hl, wStatusFlags2
bit 2, [hl]
jr nz, .not_in_bug_contest
farcall GetMapEncounterRate