removed revision and game language

This commit is contained in:
cawtds
2024-06-14 22:52:58 +02:00
parent 1713087c9e
commit a5332b0eed
10 changed files with 7 additions and 69 deletions

View File

@@ -37,8 +37,7 @@ EXE :=
endif
GAME_VERSION ?= FIRERED
GAME_LANGUAGE ?= ENGLISH
GAME_REVISION ?= 0
REVISION ?= 0
MAKER_CODE := 01
MODERN ?= 1
TEST ?= 0
@@ -60,25 +59,6 @@ $(error unknown version $(GAME_VERSION))
endif
endif
# Revision
ifeq ($(GAME_REVISION),0)
BUILD_NAME := $(BUILD_NAME)
else
ifeq ($(GAME_REVISION),1)
BUILD_NAME := $(BUILD_NAME)_rev1
else
$(error unknown revision $(GAME_REVISION))
endif
endif
# Language
ifeq ($(GAME_LANGUAGE),ENGLISH)
BUILD_NAME := $(BUILD_NAME)
GAME_CODE := $(GAME_CODE)E
else
$(error unknown language $(GAME_LANGUAGE))
endif
ifeq (agbcc,$(MAKECMDGOALS))
MODERN := 0
endif
@@ -150,7 +130,7 @@ SONG_BUILDDIR = $(OBJ_DIR)/$(SONG_SUBDIR)
MID_BUILDDIR = $(OBJ_DIR)/$(MID_SUBDIR)
TEST_BUILDDIR = $(OBJ_DIR)/$(TEST_SUBDIR)
ASFLAGS := -mcpu=arm7tdmi --defsym MODERN=$(MODERN) --defsym $(GAME_VERSION)=1 --defsym REVISION=$(GAME_REVISION) --defsym $(GAME_LANGUAGE)=1
ASFLAGS := -mcpu=arm7tdmi --defsym MODERN=$(MODERN) --defsym $(GAME_VERSION)=1
ifeq ($(MODERN),0)
CC1 := tools/agbcc/bin/agbcc$(EXE)
@@ -185,7 +165,7 @@ ifeq ($(TEST),1)
OBJ_DIR := $(TEST_OBJ_DIR_NAME)
endif
CPPFLAGS := -iquote include -iquote $(GFLIB_SUBDIR) -Wno-trigraphs -DMODERN=$(MODERN) -DTESTING=$(TEST) -D$(GAME_VERSION) -DREVISION=$(GAME_REVISION) -D$(GAME_LANGUAGE)
CPPFLAGS := -iquote include -iquote $(GFLIB_SUBDIR) -Wno-trigraphs -DMODERN=$(MODERN) -DTESTING=$(TEST) -D$(GAME_VERSION)
ifneq ($(MODERN),1)
CPPFLAGS += -I tools/agbcc/include -I tools/agbcc -nostdinc -undef
endif
@@ -525,7 +505,7 @@ LDFLAGS = -Map ../../$(MAP)
$(ELF): $(OBJ_DIR)/ld_script.ld $(OBJS) libagbsyscall
@echo "cd $(OBJ_DIR) && $(LD) $(LDFLAGS) -T ld_script.ld -o ../../$@ <objects> <lib>"
@cd $(OBJ_DIR) && $(LD) $(LDFLAGS) -T ld_script.ld --print-memory-usage -o ../../$@ $(OBJS_REL) $(LIB) | cat
$(FIX) $@ -t"$(TITLE)" -c$(GAME_CODE) -m$(MAKER_CODE) -r$(GAME_REVISION) --silent
$(FIX) $@ -t"$(TITLE)" -c$(GAME_CODE) -m$(MAKER_CODE) -r$(REVISION) --silent
$(ROM): $(ELF)
$(OBJCOPY) -O binary $< $@
@@ -543,7 +523,7 @@ $(OBJ_DIR)/ld_script_test.ld: $(LD_SCRIPT_TEST) $(LD_SCRIPT_DEPS)
$(TESTELF): $(OBJ_DIR)/ld_script_test.ld $(OBJS) $(TEST_OBJS) libagbsyscall tools check-tools
@echo "cd $(OBJ_DIR) && $(LD) -T ld_script_test.ld -o ../../$@ <objects> <test-objects> <lib>"
@cd $(OBJ_DIR) && $(LD) $(TESTLDFLAGS) -T ld_script_test.ld -o ../../$@ $(OBJS_REL) $(TEST_OBJS_REL) $(LIB)
$(FIX) $@ -t"$(TITLE)" -c$(GAME_CODE) -m$(MAKER_CODE) -r$(GAME_REVISION) -d0 --silent
$(FIX) $@ -t"$(TITLE)" -c$(GAME_CODE) -m$(MAKER_CODE) -r$(REVISION) -d0 --silent
$(PATCHELF) $(TESTELF) gTestRunnerArgv "$(TESTS)\0"
ifeq ($(GITHUB_REPOSITORY_OWNER),rh-hideout)

View File

@@ -160,10 +160,6 @@
.endm
.macro abspath relative
.if REVISION == 0
.ascii "C:/WORK/POKeFRLG/src/pm_lgfr_ose/source/"
.else
.ascii "C:/WORK/POKeFRLG/Src/pm_lgfr_ose/source/"
.endif
.asciz "\relative"
.endm

View File

@@ -3,11 +3,4 @@
.else
.equiv GAME_VERSION, 5
.endif
.ifdef ENGLISH
.equiv GAME_LANGUAGE, 2
.else
.ifdef GERMAN
.equiv GAME_LANGUAGE, 5
.endif
.endif

View File

@@ -977,13 +977,8 @@ Help_Text_HowToReadPokedex::
.string " the POKéDEX list.\n"
.string "{CIRCLE_2} A caught POKéMON will provide a\n"
.string " large amount of data.\n"
.if REVISION < 1
.string "{CIRCLE_3} Select “AREA” to display the TOWN\n"
.string " MAP with the POKéMON's habitat(s).$"
.else
.string "{CIRCLE_3} Select “NEXT DATA” to display the\n"
.string " TOWN MAP with its habitat(s).$"
.endif
Help_Text_HowToUseHomePC::
.string "{CIRCLE_1} Go up to the PC at home, then press\n"

View File

@@ -41,12 +41,7 @@
#endif // GAME_VERSION
// rev1 renamed the source folder for reasons
#if REVISION == 0
#define CODE_ROOT "C:/WORK/POKeFRLG/src/pm_lgfr_ose/source/"
#else
#define CODE_ROOT "C:/WORK/POKeFRLG/Src/pm_lgfr_ose/source/"
#endif // REVISION
#define ABSPATH(x) (CODE_ROOT x)
// Crashes may occur due to section reordering in the modern build,

View File

@@ -33,9 +33,7 @@
#define LANGUAGE_SPANISH 7
#define NUM_LANGUAGES 7
#ifdef ENGLISH
#define GAME_LANGUAGE (LANGUAGE_ENGLISH)
#endif
// party sizes
#define PARTY_SIZE 6

View File

@@ -1625,11 +1625,7 @@ static void DaycarePrintMonLvl(struct DayCare *daycare, u8 windowId, u32 daycare
u8 lvlText[12];
u8 intText[8];
#if REVISION == 0
strcpy((char *)lvlText, (const char *)gText_Lv);
#else
StringCopy(lvlText, gText_Lv);
#endif
level = GetLevelAfterDaycareSteps(&daycare->mons[daycareSlotId].mon, daycare->mons[daycareSlotId].steps);
ConvertIntToDecimalStringN(intText, level, STR_CONV_MODE_LEFT_ALIGN, 3);
StringAppend(lvlText, intText);

View File

@@ -1253,9 +1253,7 @@ static void IntroCB_GF_RevealLogo(struct IntroSequenceData * this)
if (!IsDma3ManagerBusyWithBgCopy())
{
DestroySprite(this->gameFreakLogoArtSprite);
#if REVISION >= 1
GFScene_CreatePresentsSprite();
#endif
this->timer = 0;
this->state++;
}
@@ -2099,14 +2097,12 @@ static struct Sprite *GFScene_CreateLogoSprite(void)
return &gSprites[spriteId];
}
#if REVISION >= 1
static void GFScene_CreatePresentsSprite(void)
{
int i;
for (i = 0; i < 2; i++)
gSprites[CreateSprite(&sSpriteTemplate_Presents, 104 + 32 * i, 108, 5)].oam.tileNum += i * 4;
}
#endif
#define tState data[0]
#define tTimer data[1]

View File

@@ -30,17 +30,12 @@ static void IntrDummy(void);
extern void gInitialMainCB2(void);
const u8 gGameVersion = GAME_VERSION;
const u8 gGameLanguage = GAME_LANGUAGE;
#if MODERN
const char BuildDateTime[] = __DATE__ " " __TIME__;
#else
#if REVISION == 0
const char BuildDateTime[] = "2004 04 26 11:20";
#else
const char BuildDateTime[] = "2004 07 20 09:30";
#endif //REVISION
#endif //MODERN
const IntrFunc gIntrTableTemplate[] =
@@ -158,10 +153,8 @@ void AgbMain()
#endif
#endif
#if REVISION == 1
if (gFlashMemoryPresent != TRUE)
SetMainCallback2(NULL);
#endif
gLinkTransferringData = FALSE;
gAgbMainLoop_sp = __builtin_frame_address(0);

View File

@@ -2699,7 +2699,7 @@ void DexScreen_DexPageZoomEffectFrame(u8 bg, u8 scale)
void DexScreen_PrintMonCategory(u8 windowId, u16 species, u8 x, u8 y)
{
u8 * categoryName;
u8 *categoryName;
u8 index, categoryStr[12];
u16 natDexNum = SpeciesToNationalDexNum(species);
@@ -2707,11 +2707,7 @@ void DexScreen_PrintMonCategory(u8 windowId, u16 species, u8 x, u8 y)
index = 0;
if (DexScreen_GetSetPokedexFlag(natDexNum, FLAG_GET_CAUGHT, FALSE))
{
#if REVISION == 0
while ((categoryName[index] != CHAR_SPACE) && (index < 11))
#else
while ((categoryName[index] != EOS) && (index < 11))
#endif
{
categoryStr[index] = categoryName[index];
index++;