ref: 05e5eaf12fbb422d56615f15c3481d1cf53ed17b
parent: 459d5d31640334b88cc2d82bb1b2f794d13fcbfd
author: Remy Oukaour <remy.oukaour@gmail.com>
date: Mon Jan 8 19:51:53 EST 2018
Eliminate version.asm (resolves #464)
--- a/Makefile
+++ b/Makefile
@@ -52,7 +52,8 @@
$(MAKE) -C tools/
-$(crystal11_obj): RGBASMFLAGS = -D CRYSTAL11
+$(crystal_obj): RGBASMFLAGS = -D _CRYSTAL
+$(crystal11_obj): RGBASMFLAGS = -D _CRYSTAL -D CRYSTAL11
# The dep rules have to be explicit or else missing files won't be reported.
# As a side effect, they're evaluated immediately instead of when the rule is invoked.
--- a/constants.asm
+++ b/constants.asm
@@ -1,5 +1,3 @@
-INCLUDE "version.asm"
-
INCLUDE "charmap.asm"
INCLUDE "macros.asm"
--- a/constants/misc_constants.asm
+++ b/constants/misc_constants.asm
@@ -16,6 +16,9 @@
HP_YELLOW EQU 1
HP_RED EQU 2
+; G/S version ID: 0 = Gold, 1 = Silver (used by checkver)
+GS_VERSION EQU 0
+
; save file corruption check values
SAVE_CHECK_VALUE_1 EQU 99
SAVE_CHECK_VALUE_2 EQU 127
--- a/engine/scripting.asm
+++ b/engine/scripting.asm
@@ -1975,12 +1975,12 @@
Script_checkver:
; script command 0x18
- ld a, [Version]
+ ld a, [.gs_version]
ld [ScriptVar], a
ret
-Version:
- db VERSION
+.gs_version:
+ db GS_VERSION
Script_pokenamemem:
; script command 0x40
--- a/version.asm
+++ /dev/null
@@ -1,2 +1,0 @@
-_CRYSTAL EQU 1
-VERSION EQU 0