summaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
Diffstat (limited to 'engine')
-rwxr-xr-xengine/battle/animations.asm6
-rwxr-xr-xengine/battle/core.asm12
-rw-r--r--engine/battle/trainer_ai.asm2
-rwxr-xr-xengine/events/diploma.asm2
-rwxr-xr-xengine/events/prize_menu.asm4
-rw-r--r--engine/menus/display_text_id_init.asm4
-rwxr-xr-xengine/menus/save.asm4
-rwxr-xr-xengine/menus/start_sub_menus.asm10
-rwxr-xr-xengine/movie/title.asm2
-rwxr-xr-xengine/overworld/map_sprites.asm3
-rw-r--r--engine/overworld/wild_mons.asm6
-rwxr-xr-xengine/pokemon/status_screen.asm4
-rwxr-xr-xengine/slots/slot_machine.asm2
13 files changed, 29 insertions, 32 deletions
diff --git a/engine/battle/animations.asm b/engine/battle/animations.asm
index d858e066..ee476ce9 100755
--- a/engine/battle/animations.asm
+++ b/engine/battle/animations.asm
@@ -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
diff --git a/engine/battle/core.asm b/engine/battle/core.asm
index 00852b2b..6881aef5 100755
--- a/engine/battle/core.asm
+++ b/engine/battle/core.asm
@@ -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
diff --git a/engine/battle/trainer_ai.asm b/engine/battle/trainer_ai.asm
index 2178be38..d61b44f8 100644
--- a/engine/battle/trainer_ai.asm
+++ b/engine/battle/trainer_ai.asm
@@ -134,7 +134,7 @@ AIMoveChoiceModification1:
push de
push bc
ld hl, StatusAilmentMoveEffects
- ld de, $0001
+ ld de, 1
call IsInArray
pop bc
pop de
diff --git a/engine/events/diploma.asm b/engine/events/diploma.asm
index 24bd2f22..53d78e57 100755
--- a/engine/events/diploma.asm
+++ b/engine/events/diploma.asm
@@ -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
diff --git a/engine/events/prize_menu.asm b/engine/events/prize_menu.asm
index aa86f828..5a00a89e 100755
--- a/engine/events/prize_menu.asm
+++ b/engine/events/prize_menu.asm
@@ -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
diff --git a/engine/menus/display_text_id_init.asm b/engine/menus/display_text_id_init.asm
index e1f6c678..45c76f9c 100644
--- a/engine/menus/display_text_id_init.asm
+++ b/engine/menus/display_text_id_init.asm
@@ -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]
diff --git a/engine/menus/save.asm b/engine/menus/save.asm
index f2ecc3aa..ee73c850 100755
--- a/engine/menus/save.asm
+++ b/engine/menus/save.asm
@@ -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
diff --git a/engine/menus/start_sub_menus.asm b/engine/menus/start_sub_menus.asm
index 43c767e2..526540df 100755
--- a/engine/menus/start_sub_menus.asm
+++ b/engine/menus/start_sub_menus.asm
@@ -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
diff --git a/engine/movie/title.asm b/engine/movie/title.asm
index 1a2d16a0..9cbe5494 100755
--- a/engine/movie/title.asm
+++ b/engine/movie/title.asm
@@ -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
diff --git a/engine/overworld/map_sprites.asm b/engine/overworld/map_sprites.asm
index eb8edb10..904e9b04 100755
--- a/engine/overworld/map_sprites.asm
+++ b/engine/overworld/map_sprites.asm
@@ -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
diff --git a/engine/overworld/wild_mons.asm b/engine/overworld/wild_mons.asm
index 24dc7681..2593e0ec 100644
--- a/engine/overworld/wild_mons.asm
+++ b/engine/overworld/wild_mons.asm
@@ -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"
diff --git a/engine/pokemon/status_screen.asm b/engine/pokemon/status_screen.asm
index f66cdf5a..b262a8b7 100755
--- a/engine/pokemon/status_screen.asm
+++ b/engine/pokemon/status_screen.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
diff --git a/engine/slots/slot_machine.asm b/engine/slots/slot_machine.asm
index 16696713..c3de5dd2 100755
--- a/engine/slots/slot_machine.asm
+++ b/engine/slots/slot_machine.asm
@@ -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