summaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorPokeglitch <pokeglitchx@gmail.com>2018-06-17 07:38:57 -0400
committerPokeglitch <pokeglitchx@gmail.com>2018-06-17 07:38:57 -0400
commit2cb260953de9bc2f05e7016427b4d8e57c451fab (patch)
treec094a8e024b4645a3f826866c939ea3f5630db11 /engine
parent0ddae2eac07d890bad3bfe79fa9e59cb9d214040 (diff)
Added constants, removed TODOs to health.asm
Diffstat (limited to 'engine')
-rwxr-xr-xengine/events/overworld.asm4
-rwxr-xr-xengine/items/inventory.asm2
-rwxr-xr-xengine/pokemon/health.asm14
3 files changed, 10 insertions, 10 deletions
diff --git a/engine/events/overworld.asm b/engine/events/overworld.asm
index 6b5bbc7..0a6eaef 100755
--- a/engine/events/overworld.asm
+++ b/engine/events/overworld.asm
@@ -395,7 +395,7 @@ DigFunction: ; 03:5260
call .reset
.loop
ld a, [wFieldMoveScriptID]
- bit SCRIPT_FINISHED_FLAG, a
+ bit SCRIPT_FINISHED_F, a
jr nz, .finish
ld hl, DigTable
call CallJumptable
@@ -470,7 +470,7 @@ TeleportFunction: ; 03:52db
ld [wFieldMoveScriptID], a
.loop
ld a, [wFieldMoveScriptID]
- bit SCRIPT_FINISHED_FLAG, a
+ bit SCRIPT_FINISHED_F, a
jr nz, .finish
ld hl, TeleportTable
call CallJumptable
diff --git a/engine/items/inventory.asm b/engine/items/inventory.asm
index 729ba45..9524d70 100755
--- a/engine/items/inventory.asm
+++ b/engine/items/inventory.asm
@@ -1,6 +1,6 @@
INCLUDE "constants.asm"
-SECTION "AddItemToInventory_", ROMX[$4AA1], BANK[$03]
+SECTION "Inventory", ROMX[$4AA1], BANK[$03]
_ReceiveItem: ; 03:4AA1
call DoesHLEqualwNumBagItems
diff --git a/engine/pokemon/health.asm b/engine/pokemon/health.asm
index 96616ae..2810fd5 100755
--- a/engine/pokemon/health.asm
+++ b/engine/pokemon/health.asm
@@ -21,7 +21,7 @@ HealParty: ; 03:4d6f
ld [hl], a
; Reset the PP
- ld hl, MON_MAXHP - MON_HP ; TODO - This should point to the MOVES, not max HP...
+ ld hl, MON_MOVES
add hl, de
ld b, NUM_MOVES
@@ -105,7 +105,7 @@ ComputeHPBarPixels: ; 03:4e3c
ldh [hMultiplicand + 1], a
ld a, c
ldh [hMultiplicand + 2], a
- ld a, 6 * 8
+ ld a, HP_BAR_LENGTH_PX
ldh [hMultiplier], a
call Multiply
; We need de to be under 256 because hDivisor is only 1 byte.
@@ -222,7 +222,7 @@ UpdateHPBar: ; 03:4e7c
ld d, e
.mon_fainted
call UpdateHPBar_PrintHPNumber
- ld a, 1 ; TODO - Constant
+ ld a, 1
call UpdateHPBar_AnimateHPBar
jp WaitBGMap
@@ -235,9 +235,9 @@ UpdateHPBar_AnimateHPBar: ; 03:4F11
.bar_animation_loop
push af
push de
- ld d, 6 ; TODO - constant
+ ld d, HP_BAR_LENGTH
ld a, [wHPBarType]
- and $01 ; TODO - what mask is this?
+ and BATTLE_HP_BAR
ld b, a
call DrawBattleHPBar
ld c, 2
@@ -245,7 +245,7 @@ UpdateHPBar_AnimateHPBar: ; 03:4F11
pop de
ld a, [wHPBarDelta]
add e
- cp $31 ; TODO - constant
+ cp HP_BAR_LENGTH_PX + 1
jr nc, .bar_filled_up
ld e, a
pop af
@@ -308,7 +308,7 @@ UpdateHPBar_PrintHPNumber: ; 03:4F5B
ld a, [wHPBarOldHP + 1]
ld [wHPBarTempHP], a
push hl
- ld de, $15 ; TODO - Constant
+ ld de, SCREEN_WIDTH + 1
add hl, de
push hl
ld a, " "