mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-06 15:45:24 +13:00
Remove remaining raw $xxxx values, and replace "+ -1" with "- 1" (supported by rgbds 0.4.0)
This commit is contained in:
parent
7e92d5ba8c
commit
e4e0af4d67
29 changed files with 172 additions and 158 deletions
|
|
@ -1735,7 +1735,7 @@ AnimationSlideMonDownAndHide:
|
|||
jr nz, .loop
|
||||
call AnimationHideMonPic
|
||||
ld hl, wTempPic
|
||||
ld bc, $0310
|
||||
ld bc, $310
|
||||
xor a
|
||||
call FillMemory
|
||||
jp CopyTempPicToMonPic
|
||||
|
|
@ -1896,7 +1896,7 @@ AnimationSubstitute:
|
|||
; Changes the pokemon's sprite to the mini sprite
|
||||
ld hl, wTempPic
|
||||
xor a
|
||||
ld bc, $0310
|
||||
ld bc, $310
|
||||
call FillMemory
|
||||
ld a, [hWhoseTurn]
|
||||
and a
|
||||
|
|
@ -1932,7 +1932,7 @@ AnimationSubstitute:
|
|||
jp AnimationShowMonPic
|
||||
|
||||
CopySlowbroSpriteData:
|
||||
ld bc, $0010
|
||||
ld bc, $10
|
||||
ld a, BANK(SlowbroSprite)
|
||||
jp FarCopyData2
|
||||
|
||||
|
|
|
|||
|
|
@ -582,7 +582,7 @@ HandlePoisonBurnLeechSeed_DecreaseOwnHP:
|
|||
ld a, [de] ; increment toxic counter
|
||||
inc a
|
||||
ld [de], a
|
||||
ld hl, $0000
|
||||
ld hl, 0
|
||||
.toxicTicksLoop
|
||||
add hl, bc
|
||||
dec a
|
||||
|
|
@ -5345,8 +5345,8 @@ MoveHitTest:
|
|||
ret z ; Swift never misses (interestingly, Azure Heights lists this is a myth, but it appears to be true)
|
||||
call CheckTargetSubstitute ; substitute check (note that this overwrites a)
|
||||
jr z, .checkForDigOrFlyStatus
|
||||
; this code is buggy. it's supposed to prevent HP draining moves from working on substitutes.
|
||||
; since $7b79 overwrites a with either $00 or $01, it never works.
|
||||
; This code is buggy. It's supposed to prevent HP draining moves from working on substitutes.
|
||||
; Since CheckTargetSubstitute overwrites a with either $00 or $01, it never works.
|
||||
cp DRAIN_HP_EFFECT
|
||||
jp z, .moveMissed
|
||||
cp DREAM_EATER_EFFECT
|
||||
|
|
@ -6335,9 +6335,9 @@ LoadPlayerBackPic:
|
|||
ld de, vBackPic
|
||||
call InterlaceMergeSpriteBuffers
|
||||
ld a, $a
|
||||
ld [$0], a
|
||||
ld [MBC1SRamEnable], a
|
||||
xor a
|
||||
ld [$4000], a
|
||||
ld [MBC1SRamBank], a
|
||||
ld hl, vSprites
|
||||
ld de, sSpriteBuffer1
|
||||
ld a, [hLoadedROMBank]
|
||||
|
|
@ -6345,7 +6345,7 @@ LoadPlayerBackPic:
|
|||
ld c, 7 * 7
|
||||
call CopyVideoData
|
||||
xor a
|
||||
ld [$0], a
|
||||
ld [MBC1SRamEnable], a
|
||||
ld a, $31
|
||||
ld [hStartTileID], a
|
||||
coord hl, 1, 5
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ AIMoveChoiceModification1:
|
|||
push de
|
||||
push bc
|
||||
ld hl, StatusAilmentMoveEffects
|
||||
ld de, $0001
|
||||
ld de, 1
|
||||
call IsInArray
|
||||
pop bc
|
||||
pop de
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ DisplayDiploma::
|
|||
call DisableLCD
|
||||
ld hl, CircleTile
|
||||
ld de, vChars2 + $700
|
||||
ld bc, $0010
|
||||
ld bc, $10
|
||||
ld a, BANK(CircleTile)
|
||||
call FarCopyData2
|
||||
coord hl, 0, 0
|
||||
|
|
|
|||
|
|
@ -131,10 +131,8 @@ GetPrizeMenuId:
|
|||
coord hl, 13, 5
|
||||
; reg. c:
|
||||
; [low nybble] number of bytes
|
||||
; [bit 765 = %100] space-padding (not zero-padding)
|
||||
; [bits 765 = %100] space-padding (not zero-padding)
|
||||
ld c, (1 << 7 | 2)
|
||||
; Function $15CD displays BCD value (same routine
|
||||
; used by text-command $02)
|
||||
call PrintBCDNumber
|
||||
ld de, wPrize2Price
|
||||
coord hl, 13, 7
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ DisplayTextIDInit::
|
|||
; the original direction they were facing must be restored after the dialogue is over
|
||||
ld hl, wSpriteStateData1 + $19
|
||||
ld c, $0f
|
||||
ld de, $0010
|
||||
ld de, $10
|
||||
.spriteFacingDirectionCopyLoop
|
||||
ld a, [hl]
|
||||
inc h
|
||||
|
|
@ -55,7 +55,7 @@ DisplayTextIDInit::
|
|||
; loop to force all the sprites in the middle of animation to stand still
|
||||
; (so that they don't like they're frozen mid-step during the dialogue)
|
||||
ld hl, wSpriteStateData1 + 2
|
||||
ld de, $0010
|
||||
ld de, $10
|
||||
ld c, e
|
||||
.spriteStandStillLoop
|
||||
ld a, [hl]
|
||||
|
|
|
|||
|
|
@ -702,7 +702,7 @@ ClearSAV:
|
|||
|
||||
PadSRAM_FF:
|
||||
ld [MBC1SRamBank], a
|
||||
ld hl, $a000 ; start of SRAM
|
||||
ld bc, $2000 ; size of SRAM
|
||||
ld hl, SRAM_Begin
|
||||
ld bc, SRAM_End - SRAM_Begin
|
||||
ld a, $ff
|
||||
jp FillMemory
|
||||
|
|
|
|||
|
|
@ -491,12 +491,12 @@ DrawTrainerInfo:
|
|||
call CopyData
|
||||
ld hl, TrainerInfoTextBoxTileGraphics ; trainer info text box tile patterns
|
||||
ld de, vChars2 + $770
|
||||
ld bc, $0080
|
||||
ld bc, $80
|
||||
push bc
|
||||
call TrainerInfo_FarCopyData
|
||||
ld hl, BlankLeaderNames
|
||||
ld de, vChars2 + $600
|
||||
ld bc, $0170
|
||||
ld bc, $170
|
||||
call TrainerInfo_FarCopyData
|
||||
pop bc
|
||||
ld hl, BadgeNumbersTileGraphics ; badge number tile patterns
|
||||
|
|
@ -504,14 +504,14 @@ DrawTrainerInfo:
|
|||
call TrainerInfo_FarCopyData
|
||||
ld hl, GymLeaderFaceAndBadgeTileGraphics ; gym leader face and badge tile patterns
|
||||
ld de, vChars2 + $200
|
||||
ld bc, $0400
|
||||
ld bc, $400
|
||||
ld a, $03
|
||||
call FarCopyData2
|
||||
ld hl, TextBoxGraphics
|
||||
ld de, $00d0
|
||||
ld de, $d0
|
||||
add hl, de ; hl = colon tile pattern
|
||||
ld de, vChars1 + $560
|
||||
ld bc, $0010
|
||||
ld bc, $10
|
||||
ld a, $04
|
||||
push bc
|
||||
call FarCopyData2
|
||||
|
|
|
|||
|
|
@ -317,7 +317,7 @@ DrawPlayerCharacter:
|
|||
xor a
|
||||
ld [wPlayerCharacterOAMTile], a
|
||||
ld hl, wOAMBuffer
|
||||
ld de, $605a
|
||||
lb de, $60, $5a
|
||||
ld b, 7
|
||||
.loop
|
||||
push de
|
||||
|
|
|
|||
|
|
@ -133,8 +133,7 @@ LoadMapSpriteTilePatterns:
|
|||
jr nc, .fourTileSpriteVRAMAddr
|
||||
ld d, a
|
||||
dec d
|
||||
; Equivalent to multiplying $C0 (number of bytes in 12 tiles) times the VRAM
|
||||
; slot and adding the result to $8000 (the VRAM base address).
|
||||
; vSprites += [hVRAMSlot] * $C0 (the number of bytes in 12 tiles)
|
||||
.calculateVRAMAddrLoop
|
||||
add hl, bc
|
||||
dec d
|
||||
|
|
|
|||
|
|
@ -16,10 +16,10 @@ LoadWildData::
|
|||
jr z, .NoGrassData ; if no grass data, skip to surfing data
|
||||
push hl
|
||||
ld de, wGrassMons ; otherwise, load grass data
|
||||
ld bc, $0014
|
||||
ld bc, $14
|
||||
call CopyData
|
||||
pop hl
|
||||
ld bc, $0014
|
||||
ld bc, $14
|
||||
add hl, bc
|
||||
.NoGrassData
|
||||
ld a, [hli]
|
||||
|
|
@ -27,7 +27,7 @@ LoadWildData::
|
|||
and a
|
||||
ret z ; if no water data, we're done
|
||||
ld de, wWaterMons ; otherwise, load surfing data
|
||||
ld bc, $0014
|
||||
ld bc, $14
|
||||
jp CopyData
|
||||
|
||||
INCLUDE "data/wild/grass_water.asm"
|
||||
|
|
|
|||
|
|
@ -254,7 +254,7 @@ PrintStatsBox:
|
|||
ld c, 8
|
||||
call TextBoxBorder ; Draws the box
|
||||
coord hl, 1, 9 ; Start printing stats from here
|
||||
ld bc, $0019 ; Number offset
|
||||
ld bc, $19 ; Number offset
|
||||
jr .PrintStats
|
||||
.DifferentBox
|
||||
coord hl, 9, 2
|
||||
|
|
@ -262,7 +262,7 @@ PrintStatsBox:
|
|||
ld c, 9
|
||||
call TextBoxBorder
|
||||
coord hl, 11, 3
|
||||
ld bc, $0018
|
||||
ld bc, $18
|
||||
.PrintStats
|
||||
push bc
|
||||
push hl
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ PromptUserToPlaySlots:
|
|||
xor a
|
||||
ld [wSlotMachineAllowMatchesCounter], a
|
||||
ld hl, wStoppingWhichSlotMachineWheel
|
||||
ld bc, $0014
|
||||
ld bc, $14
|
||||
call FillMemory
|
||||
call MainSlotMachineLoop
|
||||
ld hl, wd730
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue