mirror of
https://github.com/SAT-R/sa2.git
synced 2026-10-28 09:43:38 +00:00
Initial code required to build Japanese ROM (#135)
* Update UI Positions of Timer/1-Up * Update results.c
This commit is contained in:
1 parent
86d632cf01
commit
0e92bf9b1d
15 files changed
+72
-24
No files matched your search
@@ -90,6 +90,11 @@ jobs:
|
||||
echo "REPORTS_COMMIT_MSG=$( git log --format=%s ${GITHUB_SHA} )" >> $GITHUB_ENV
|
||||
cp sa2.map gh-pages/maps/${GITHUB_SHA}.map
|
||||
|
||||
#- name: Japan
|
||||
#run: |
|
||||
#make clean
|
||||
#make japan -j${nproc}
|
||||
|
||||
- name: Europe
|
||||
run: |
|
||||
make clean
|
||||
|
||||
+5
-1
@@ -49,6 +49,7 @@ Temporary Items
|
||||
# =========================
|
||||
# Build Outputs
|
||||
# =========================
|
||||
|
||||
*.gba
|
||||
*.sav
|
||||
*.elf
|
||||
@@ -56,6 +57,7 @@ Temporary Items
|
||||
*.bin
|
||||
|
||||
*.a
|
||||
|
||||
*.hex
|
||||
*.o
|
||||
*.dump
|
||||
@@ -73,4 +75,6 @@ reports
|
||||
*.4bpp
|
||||
*.8bpp
|
||||
|
||||
!data/maps/*/*/tilemaps/*/*.bin
|
||||
|
||||
!data/maps/*/*/tilemaps/*/*.bin
|
||||
*.exe
|
||||
@@ -193,6 +193,7 @@ clean-tools:
|
||||
tidy:
|
||||
$(RM) -f $(ROM) $(ELF) $(MAP)
|
||||
$(RM) -f $(BUILD_NAME)_europe.gba $(BUILD_NAME)_europe.elf $(BUILD_NAME)_europe.map
|
||||
$(RM) -f $(BUILD_NAME)_japan.gba $(BUILD_NAME)_japan.elf $(BUILD_NAME)_japan.map
|
||||
$(RM) -r build/*
|
||||
|
||||
#### Recipes ####
|
||||
@@ -285,6 +286,8 @@ $(SONG_BUILDDIR)/%.o: $(SONG_SUBDIR)/%.s
|
||||
@$(AS) $(ASFLAGS) -I sound -o $@ $<
|
||||
|
||||
|
||||
japan: ; @$(MAKE) GAME_REGION=JAPAN
|
||||
|
||||
europe: ; @$(MAKE) GAME_REGION=EUROPE
|
||||
|
||||
chao_garden/mb_chao_garden.gba:
|
||||
|
||||
@@ -18,6 +18,7 @@ This is a work in progress matching decompilation of Sonic Advance 2
|
||||
It so far builds the following ROMs:
|
||||
* [**sa2.gba**](https://datomatic.no-intro.org/index.php?page=show_record&s=23&n=0890) `sha1: 7bcd6a07af7c894746fa28073fe0c0e34408022d` (USA) (En,Ja,Fr,De,Es,It)
|
||||
* [**sa2_europe.gba**](https://datomatic.no-intro.org/index.php?page=show_record&s=23&n=0900) `sha1: b0f64bdca097f2de8f05ac4c8caea2b80c5faeb1` (Europe) (En,Ja,Fr,De,Es,It)
|
||||
* [**sa2_japan.gba**](https://datomatic.no-intro.org/index.php?page=show_record&s=23&n=0799) `sha1: dffd0188fc78154b42b401398a224ae0713edf23` (Japan) (En,Ja,Fr,De,Es,It) (:warning: Work in Progress)
|
||||
|
||||
### Current state
|
||||
|
||||
|
||||
@@ -27,6 +27,11 @@ ifeq ($(GAME_REGION), USA)
|
||||
BUILD_NAME := $(BUILD_NAME)
|
||||
GAME_CODE := $(GAME_CODE)E
|
||||
else
|
||||
ifeq ($(GAME_REGION), JAPAN)
|
||||
BUILD_NAME := $(BUILD_NAME)_japan
|
||||
GAME_CODE := $(GAME_CODE)J
|
||||
MAKER_CODE := 8P
|
||||
else
|
||||
ifeq ($(GAME_REGION), EUROPE)
|
||||
BUILD_NAME := $(BUILD_NAME)_europe
|
||||
GAME_CODE := $(GAME_CODE)P
|
||||
@@ -36,6 +41,7 @@ else
|
||||
$(error unknown region $(GAME_REGION))
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# Debug
|
||||
ifeq ($(DEBUG), 1)
|
||||
|
||||
@@ -7264,7 +7264,7 @@
|
||||
.incbin "graphics/obj_tiles/4bpp/anim_1117/f027.4bpp"
|
||||
.incbin "graphics/obj_tiles/4bpp/anim_1117/f028.4bpp"
|
||||
|
||||
#ifdef EUROPE
|
||||
#ifndef USA
|
||||
.incbin "graphics/obj_tiles/4bpp/anim_1117_europe/f029.4bpp"
|
||||
.incbin "graphics/obj_tiles/4bpp/anim_1117_europe/f030.4bpp"
|
||||
.incbin "graphics/obj_tiles/4bpp/anim_1117_europe/f031.4bpp"
|
||||
|
||||
@@ -30,10 +30,15 @@ else
|
||||
ifeq ($(GAME_REGION), EUROPE)
|
||||
BUILD_NAME := $(BUILD_NAME)_europe
|
||||
GAME_CODE := $(GAME_CODE)P
|
||||
else
|
||||
ifeq ($(GAME_REGION), JAPAN)
|
||||
BUILD_NAME := $(BUILD_NAME)_japan
|
||||
GAME_CODE := $(GAME_CODE)J
|
||||
else
|
||||
$(error unknown region $(GAME_REGION))
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# Debug
|
||||
ifeq ($(DEBUG), 1)
|
||||
|
||||
@@ -30,10 +30,15 @@ else
|
||||
ifeq ($(GAME_REGION), EUROPE)
|
||||
BUILD_NAME := $(BUILD_NAME)_europe
|
||||
GAME_CODE := $(GAME_CODE)P
|
||||
else
|
||||
ifeq ($(GAME_REGION), JAPAN)
|
||||
BUILD_NAME := $(BUILD_NAME)_japan
|
||||
GAME_CODE := $(GAME_CODE)J
|
||||
else
|
||||
$(error unknown region $(GAME_REGION))
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# Debug
|
||||
ifeq ($(DEBUG), 1)
|
||||
|
||||
@@ -56,12 +56,15 @@ static void sub_0203b798(void);
|
||||
// 8P
|
||||
#define DIMPS_MAKER_CODE 0x96
|
||||
|
||||
#ifndef EUROPE
|
||||
#ifdef USA
|
||||
// "A2NE"
|
||||
#define EXPECTED_GAME_CODE 0x454e3241
|
||||
#else
|
||||
#elif EUROPE
|
||||
// "A2NP"
|
||||
#define EXPECTED_GAME_CODE 0x504e3241
|
||||
#else
|
||||
// "A2NJ"
|
||||
#define EXPECTED_GAME_CODE 0x4a4e3241
|
||||
#endif
|
||||
|
||||
// .rodata
|
||||
|
||||
@@ -30,10 +30,15 @@ else
|
||||
ifeq ($(GAME_REGION), EUROPE)
|
||||
BUILD_NAME := $(BUILD_NAME)_europe
|
||||
GAME_CODE := $(GAME_CODE)P
|
||||
else
|
||||
ifeq ($(GAME_REGION), JAPAN)
|
||||
BUILD_NAME := $(BUILD_NAME)_japan
|
||||
GAME_CODE := $(GAME_CODE)J
|
||||
else
|
||||
$(error unknown region $(GAME_REGION))
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# Debug
|
||||
ifeq ($(DEBUG), 1)
|
||||
|
||||
@@ -30,10 +30,15 @@ else
|
||||
ifeq ($(GAME_REGION), EUROPE)
|
||||
BUILD_NAME := $(BUILD_NAME)_europe
|
||||
GAME_CODE := $(GAME_CODE)P
|
||||
else
|
||||
ifeq ($(GAME_REGION), JAPAN)
|
||||
BUILD_NAME := $(BUILD_NAME)_japan
|
||||
GAME_CODE := $(GAME_CODE)J
|
||||
else
|
||||
$(error unknown region $(GAME_REGION))
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# Debug
|
||||
ifeq ($(DEBUG), 1)
|
||||
|
||||
@@ -30,10 +30,15 @@ else
|
||||
ifeq ($(GAME_REGION), EUROPE)
|
||||
BUILD_NAME := $(BUILD_NAME)_europe
|
||||
GAME_CODE := $(GAME_CODE)P
|
||||
else
|
||||
ifeq ($(GAME_REGION), JAPAN)
|
||||
BUILD_NAME := $(BUILD_NAME)_japan
|
||||
GAME_CODE := $(GAME_CODE)J
|
||||
else
|
||||
$(error unknown region $(GAME_REGION))
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
# Debug
|
||||
ifeq ($(DEBUG), 1)
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
dffd0188fc78154b42b401398a224ae0713edf23 sa2_japan.gba
|
||||
@@ -165,7 +165,7 @@ u16 CreateStageResults(u32 courseTime, u16 ringCount, u8 spRingCount)
|
||||
|
||||
s = &outro->s7;
|
||||
s->x = DISPLAY_WIDTH + 16;
|
||||
s->y = 80;
|
||||
s->y = (DISPLAY_HEIGHT / 2);
|
||||
s->graphics.dest = VramMalloc(4);
|
||||
s->graphics.anim = SA2_ANIM_TA_WHITE_BAR;
|
||||
s->variant = 0;
|
||||
|
||||
@@ -64,7 +64,7 @@ u32 CreateTimeAttackResults(u32 finishTime)
|
||||
|
||||
fade->window = 0;
|
||||
fade->flags = 1;
|
||||
fade->speed = 0x100;
|
||||
fade->speed = Q_8_8(1);
|
||||
fade->brightness = Q_8_8(0);
|
||||
fade->bldCnt = 0x3FFF;
|
||||
fade->bldAlpha = 0;
|
||||
@@ -125,7 +125,7 @@ u32 CreateTimeAttackResults(u32 finishTime)
|
||||
resultsCutScene->unk2D8 = sub_80899B8(finishTime);
|
||||
|
||||
s = &resultsCutScene->unk12C;
|
||||
s->x = 256;
|
||||
s->x = DISPLAY_WIDTH + 16;
|
||||
s->y = (DISPLAY_HEIGHT / 2);
|
||||
s->graphics.dest = VramMalloc(4);
|
||||
s->graphics.anim = SA2_ANIM_TA_WHITE_BAR;
|
||||
@@ -142,7 +142,7 @@ u32 CreateTimeAttackResults(u32 finishTime)
|
||||
UpdateSpriteAnimation(s);
|
||||
|
||||
s = &resultsCutScene->unkC[0];
|
||||
s->x = 256;
|
||||
s->x = DISPLAY_WIDTH + 16;
|
||||
s->y = 41;
|
||||
s->graphics.dest = VramMalloc(sAnimsGotThroughCharacterNames[gSelectedCharacter][0]);
|
||||
s->graphics.anim = sAnimsGotThroughCharacterNames[gSelectedCharacter][1];
|
||||
@@ -161,7 +161,7 @@ u32 CreateTimeAttackResults(u32 finishTime)
|
||||
isBossLevel = ACT_INDEX(gCurrentLevel) >> 1;
|
||||
|
||||
s = &resultsCutScene->unkC[1];
|
||||
s->x = 256;
|
||||
s->x = DISPLAY_WIDTH + 16;
|
||||
s->y = 49;
|
||||
s->graphics.dest = VramMalloc(sStageResultsHeadlineTexts[isBossLevel][0]);
|
||||
s->graphics.anim = sStageResultsHeadlineTexts[isBossLevel][1];
|
||||
@@ -219,7 +219,7 @@ u32 CreateTimeAttackResults(u32 finishTime)
|
||||
|
||||
s = &resultsCutScene->unk9C[1];
|
||||
s->x = (DISPLAY_WIDTH / 2);
|
||||
s->y = (DISPLAY_HEIGHT * (3. / 4.));
|
||||
s->y = (DISPLAY_HEIGHT / 2) + 40;
|
||||
s->graphics.dest = VramMalloc(16);
|
||||
s->graphics.anim = SA2_ANIM_TIME_ATTACK_DIGITS;
|
||||
if (resultsCutScene->unk2D8 != 0) {
|
||||
@@ -288,27 +288,27 @@ void sub_80897E8(void)
|
||||
u32 unk168 = resultsCutScene->unk168;
|
||||
u32 i;
|
||||
|
||||
if (unk168 < 0x18) {
|
||||
if (unk168 < 24) {
|
||||
s32 temp;
|
||||
s = &resultsCutScene->unk12C;
|
||||
temp = 0;
|
||||
if (unk168 < 0x11) {
|
||||
temp = (0x10 - unk168) * 0x18;
|
||||
if (unk168 < 17) {
|
||||
temp = ((16 - unk168) * 24);
|
||||
}
|
||||
|
||||
for (i = 0; i < 8; i++) {
|
||||
s->x = temp + i * 0x20;
|
||||
s->x = temp + (i * 32);
|
||||
DisplaySprite(s);
|
||||
}
|
||||
} else {
|
||||
s = &resultsCutScene->unk12C;
|
||||
for (i = 0; i < 8; i++) {
|
||||
s->x = i << 5; // TODO: Does (i * 32) match?
|
||||
s->x = (i * 32); // TODO: Does (i * 32) match?
|
||||
DisplaySprite(s);
|
||||
}
|
||||
}
|
||||
|
||||
if (unk168 > 0x1C) {
|
||||
if (unk168 > 28) {
|
||||
s32 temp;
|
||||
if ((gCurrentLevel & ACT_BOSS) && !(gCurrentLevel & ACT_2)) {
|
||||
temp = 2;
|
||||
@@ -322,17 +322,17 @@ void sub_80897E8(void)
|
||||
}
|
||||
}
|
||||
|
||||
if (unk168 > 0x59) {
|
||||
if (unk168 > 89) {
|
||||
s = &resultsCutScene->unk9C[0];
|
||||
if ((unk168 - 0x5A) < 0xB) {
|
||||
s->x = (100 - unk168) * 16 + 40;
|
||||
if ((unk168 - 90) < 11) {
|
||||
s->x = (((DISPLAY_WIDTH / 2) - 20) - unk168) * 16 + 40;
|
||||
}
|
||||
DisplaySprite(s);
|
||||
}
|
||||
|
||||
if (unk168 > 0x77) {
|
||||
s32 temp = (unk168 - 0x7F);
|
||||
if (temp > 0x10) {
|
||||
if (unk168 > 119) {
|
||||
s32 temp = (unk168 - 127);
|
||||
if (temp > 16) {
|
||||
if (resultsCutScene->unk2D8) {
|
||||
s = &resultsCutScene->unk9C[1];
|
||||
resultsCutScene->transform.width
|
||||
@@ -361,7 +361,7 @@ void sub_80897E8(void)
|
||||
}
|
||||
|
||||
for (i = 0; i < 7; i++) {
|
||||
s32 index = (unk168 - 0x78) - i;
|
||||
s32 index = (unk168 - 120) - i;
|
||||
if (index < 0) {
|
||||
break;
|
||||
}
|
||||
@@ -421,7 +421,7 @@ void sub_8089AEC(void)
|
||||
sub_8031314();
|
||||
sub_80897E8();
|
||||
|
||||
if (((unk168 > 0xA0) && (gPressedKeys & (A_BUTTON | START_BUTTON)))
|
||||
if (((unk168 > 160) && (gPressedKeys & (A_BUTTON | START_BUTTON)))
|
||||
|| (unk168 > 600)) {
|
||||
gCurTask->main = sub_8089B40;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user