Foundation to support LG, Rev1 in the future
This commit is contained in:
@@ -3,15 +3,41 @@ CPP := $(CC) -E
|
||||
LD := tools/binutils/bin/arm-none-eabi-ld
|
||||
OBJCOPY := tools/binutils/bin/arm-none-eabi-objcopy
|
||||
|
||||
GAME_VERSION := FIRERED
|
||||
REVISION := 0
|
||||
GAME_LANGUAGE := ENGLISH
|
||||
|
||||
# So long as baserom.gba is required, we error out if the
|
||||
# user tries to build any ROM other than FireRed.
|
||||
ifneq ($(GAME_VERSION),FIRERED)
|
||||
$(error We can only build English Pokemon FireRed v1.0 currently)
|
||||
else ifneq ($(REVISION),0)
|
||||
$(error We can only build English Pokemon FireRed v1.0 currently)
|
||||
else ifneq ($(GAME_LANGUAGE),ENGLISH)
|
||||
$(error We can only build English Pokemon FireRed v1.0 currently)
|
||||
endif
|
||||
|
||||
ifeq ($(GAME_VERSION),FIRERED)
|
||||
TITLE := POKEMON FIRE
|
||||
GAME_CODE := BPRE
|
||||
GAME_CODE := BPR
|
||||
BUILD_NAME := firered
|
||||
else
|
||||
TITLE := POKEMON LEAF
|
||||
GAME_CODE := BPL
|
||||
BUILD_NAME := leafgreen
|
||||
endif
|
||||
ifeq ($(GAME_LANGUAGE),ENGLISH)
|
||||
GAME_CODE := $(GAME_CODE)E
|
||||
endif
|
||||
ifneq ($(REVISION),0)
|
||||
BUILD_NAME := $(BUILD_NAME)_rev$(REVISION)
|
||||
endif
|
||||
MAKER_CODE := 01
|
||||
REVISION := 0
|
||||
|
||||
SHELL := /bin/bash -o pipefail
|
||||
|
||||
ROM := pokefirered.gba
|
||||
OBJ_DIR := build/firered
|
||||
ROM := poke$(BUILD_NAME).gba
|
||||
OBJ_DIR := build/$(BUILD_NAME)
|
||||
|
||||
ELF = $(ROM:.gba=.elf)
|
||||
MAP = $(ROM:.gba=.map)
|
||||
@@ -26,12 +52,12 @@ ASM_BUILDDIR = $(OBJ_DIR)/$(ASM_SUBDIR)
|
||||
DATA_ASM_BUILDDIR = $(OBJ_DIR)/$(DATA_ASM_SUBDIR)
|
||||
SONG_BUILDDIR = $(OBJ_DIR)/$(SONG_SUBDIR)
|
||||
|
||||
ASFLAGS := -mcpu=arm7tdmi
|
||||
ASFLAGS := -mcpu=arm7tdmi --defsym $(GAME_VERSION)=1 --defsym REVISION=$(REVISION) --defsym $(GAME_LANGUAGE)=1
|
||||
|
||||
CC1 := tools/agbcc/bin/agbcc
|
||||
override CFLAGS += -mthumb-interwork -Wimplicit -Wparentheses -Werror -O2 -fhex-asm
|
||||
|
||||
CPPFLAGS := -I tools/agbcc -I tools/agbcc/include -iquote include -nostdinc -undef
|
||||
CPPFLAGS := -I tools/agbcc -I tools/agbcc/include -iquote include -nostdinc -undef -D$(GAME_VERSION) -DREVISION=$(REVISION) -D$(GAME_LANGUAGE)
|
||||
|
||||
LDFLAGS = -Map ../../$(MAP)
|
||||
|
||||
|
||||
@@ -1056,7 +1056,11 @@ _080791DE:
|
||||
lsrs r5, r0, 24
|
||||
cmp r5, 0
|
||||
bne _080792A6
|
||||
.ifdef FIRERED
|
||||
movs r0, 0x6
|
||||
.else
|
||||
movs r0, 0x3
|
||||
.endif
|
||||
movs r1, 0
|
||||
bl PlayCry1
|
||||
ldrb r0, [r4, 0xC]
|
||||
|
||||
@@ -15,8 +15,6 @@
|
||||
// since not all baseroms and pointers have been dumped yet and will result in
|
||||
// a broken ROM.
|
||||
|
||||
#define ENGLISH
|
||||
|
||||
#ifdef ENGLISH
|
||||
#define UNITS_IMPERIAL
|
||||
#else
|
||||
|
||||
@@ -23,10 +23,12 @@ enum LanguageId {
|
||||
LANGUAGE_ITALIAN = 4,
|
||||
LANGUAGE_GERMAN = 5,
|
||||
// 6 goes unused but the theory is it was meant to be Korean
|
||||
LANGUAGE_SPANISH = 7,
|
||||
LANGUAGE_SPANISH = 7,
|
||||
};
|
||||
|
||||
#ifdef ENGLISH
|
||||
#define GAME_LANGUAGE (LANGUAGE_ENGLISH)
|
||||
#endif
|
||||
|
||||
#define PC_ITEMS_COUNT 30
|
||||
#define BAG_ITEMS_COUNT 42
|
||||
|
||||
+6
-1
@@ -55,7 +55,12 @@ static void VCountIntr(void);
|
||||
static void SerialIntr(void);
|
||||
static void IntrDummy(void);
|
||||
|
||||
const u8 gGameVersion = VERSION_FIRE_RED;
|
||||
#if defined(FIRERED)
|
||||
#define GAME_VERSION VERSION_FIRE_RED
|
||||
#elif defined(LEAF_GREEN)
|
||||
#define GAME_VERSION VERSION_LEAF_GREEN
|
||||
#endif
|
||||
const u8 gGameVersion = GAME_VERSION;
|
||||
|
||||
const u8 gGameLanguage = GAME_LANGUAGE;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user