summaryrefslogtreecommitdiff
path: root/main.asm
diff options
context:
space:
mode:
authorpikalaxalt <PikalaxALT@gmail.com>2016-06-21 13:08:20 -0400
committerpikalaxalt <PikalaxALT@gmail.com>2016-06-21 13:08:20 -0400
commitdef16f56d0212de6dc99f7b733fb190e3784aad9 (patch)
tree8c31f10206477422c6b53148ddf3c20160abdbda /main.asm
parentdc48fd153a0ed7a9236da657f72a7b7fde4034fd (diff)
engine/health.asm; overworld move/item fns pt 1
Diffstat (limited to 'main.asm')
-rw-r--r--main.asm82
1 files changed, 71 insertions, 11 deletions
diff --git a/main.asm b/main.asm
index 5694b0ef..3224b389 100644
--- a/main.asm
+++ b/main.asm
@@ -347,12 +347,67 @@ INCLUDE "engine/engine_flags.asm"
INCLUDE "engine/variables.asm"
INCLUDE "engine/specials.asm"
-ComputeHPBarPixels:
-IF DEF(GOLD)
- dr $c6de, $c725
-AnimateHPBar:
- dr $c725, $d1e2
+Functionc660:
+ nop
+FlagPredef:
+ push hl
+ push bc
+ push bc
+ srl c
+ srl c
+ srl c
+ ld b, $0
+ add hl, bc
+ pop bc
+ ld a, c
+ and $7
+ ld c, a
+ ld a, $1
+ jr z, .asm_c67a
+.asm_c676
+ add a
+ dec c
+ jr nz, .asm_c676
+.asm_c67a
+ ld c, a
+ dec b
+ jr z, .asm_c687
+ dec b
+ jr z, .asm_c68c
+ ld a, c
+ cpl
+ and [hl]
+ ld [hl], a
+ jr .asm_c699
+
+.asm_c687
+ ld a, [hl]
+ or c
+ ld [hl], a
+ jr .asm_c699
+
+.asm_c68c
+ ld a, d
+ cp $0
+ jr nz, .asm_c695
+ ld a, [hl]
+ and c
+ jr .asm_c699
+
+.asm_c695
+ call GetFarByte
+ and c
+.asm_c699
+ pop bc
+ pop hl
+ ld c, a
+ ret
+
+INCLUDE "engine/health.asm"
+INCLUDE "engine/overworld.asm"
+
ReceiveItem_::
+IF DEF(GOLD)
dr $d1e2, $d21a
TossItem_::
dr $d21a, $d251
@@ -408,10 +463,6 @@ Functionf900:
ENDC
IF DEF(SILVER)
- dr $c6dc, $c723
-AnimateHPBar:
- dr $c723, $d1e0
-ReceiveItem_::
dr $d1e0, $d218
TossItem_::
dr $d218, $d24f
@@ -1303,10 +1354,19 @@ Text_UsedCut_::
Text_NothingToCut_::
dr $1920f2, $19210f
Text_UsedFlash_::
- dr $19210f, $194000
+ dr $19210f, $192135
+UsedSurfText_::
+ dr $192135, $194000
SECTION "bank65", ROMX, BANK[$65]
- dr $194000, $195610
+CantSurfText_::
+ dr $194000, $194015
+
+AlreadySurfingText_::
+ dr $194015, $19402d
+
+AskSurfText_::
+ dr $19402d, $195610
ClockTimeUnknownText_:: ; 195610
dr $195610, $195624