summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorU-Fish-PC\Daniel <corrnondacqb@yahoo.com>2014-06-10 17:06:30 -0400
committerU-Fish-PC\Daniel <corrnondacqb@yahoo.com>2014-06-10 17:06:30 -0400
commit9eefed45f7ff3b9ee6023fb0829528e34aa0729a (patch)
tree84084ff2d9c3d1ba14b44e529702f83ced3e633c
parentfee52c53a40f8e36dfccfbe73668bfc2858c2a95 (diff)
Use MAX_LEVEL instead of 100/$64
-rw-r--r--constants/misc_constants.asm1
-rwxr-xr-xengine/battle/15.asm2
-rwxr-xr-xengine/items/items.asm2
-rwxr-xr-xengine/menu/status_screen.asm4
4 files changed, 5 insertions, 4 deletions
diff --git a/constants/misc_constants.asm b/constants/misc_constants.asm
index 0a22e7cc..c1d00464 100644
--- a/constants/misc_constants.asm
+++ b/constants/misc_constants.asm
@@ -7,3 +7,4 @@ D_LEFT EQU %00100000
D_UP EQU %01000000
D_DOWN EQU %10000000
+MAX_LEVEL EQU 100
diff --git a/engine/battle/15.asm b/engine/battle/15.asm
index 322bb31e..7966e634 100755
--- a/engine/battle/15.asm
+++ b/engine/battle/15.asm
@@ -115,7 +115,7 @@ Func_5525f: ; 5525f (15:525f)
ld a, [hl]
ld [wd0b5], a
call GetMonHeader
- ld d, $64
+ ld d, MAX_LEVEL
callab CalcExperience
ld a, [H_NUMTOPRINT] ; $ff96 (aliases: H_MULTIPLICAND)
ld b, a
diff --git a/engine/items/items.asm b/engine/items/items.asm
index 1f772e02..e5a6c210 100755
--- a/engine/items/items.asm
+++ b/engine/items/items.asm
@@ -1214,7 +1214,7 @@ ItemUseMedicine: ; dabb (3:5abb)
ld bc,33
add hl,bc ; hl now points to level
ld a,[hl] ; a = level
- cp a,100
+ cp a, MAX_LEVEL
jr z,.vitaminNoEffect ; can't raise level above 100
inc a
ld [hl],a ; store incremented level
diff --git a/engine/menu/status_screen.asm b/engine/menu/status_screen.asm
index ce5f85ab..ed042480 100755
--- a/engine/menu/status_screen.asm
+++ b/engine/menu/status_screen.asm
@@ -352,7 +352,7 @@ StatusScreen2: ; 12b57 (4:6b57)
call PlaceString
ld a, [wcfb9] ; level
push af
- cp 100
+ cp MAX_LEVEL
jr z, .Level100 ; 0x12c20 $4
inc a
ld [wcfb9], a ; Increase temporarily if not 100
@@ -402,7 +402,7 @@ StatusScreen2: ; 12b57 (4:6b57)
jp ClearScreen
.asm_12c86 ; This does some magic with lvl/exp?
ld a, [wcfb9] ; Load level
- cp $64
+ cp MAX_LEVEL
jr z, .asm_12ca7 ; 0x12c8b $1a ; If 100
inc a
ld d, a