Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ assets
build
build.ninja
build-linux/
build-linux-jp/
build-linux-replay/
compile_commands.json
.ninja_deps
.ninja_log
Expand Down
6 changes: 4 additions & 2 deletions config/symbols.eu.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11727,8 +11727,10 @@ D_8013E1C4 = 0x8016C918;
temp3 = 0x8016C920;
temp4 = 0x8016CD20;
temp5 = 0x8016CF20;
D_80139F70 = 0x8016D010;
D_80139FA4 = 0x8016D060;
D_80139F20 = 0x8016D010;
D_80139F70 = 0x8016D060;
D_80139FA0 = 0x8016D090;
D_80139FB0 = 0x8016D0A0;
D_8013B7B0 = 0x8016E8A0;
D_8013B7D0 = 0x8016E8C0;
D_8013B7D8 = 0x8016E8C8;
Expand Down
6 changes: 4 additions & 2 deletions config/undefined_syms.eu.main.txt
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,10 @@ D_8013E1C4 = 0x8016C918;
temp3 = 0x8016C920;
temp4 = 0x8016CD20;
temp5 = 0x8016CF20;
D_80139F70 = 0x8016D010;
D_80139FA4 = 0x8016D060;
D_80139F20 = 0x8016D010;
D_80139F70 = 0x8016D060;
D_80139FA0 = 0x8016D090;
D_80139FB0 = 0x8016D0A0;
D_8013B7B0 = 0x8016E8A0;
D_8013B7D0 = 0x8016E8C0;
D_8013B7D8 = 0x8016E8C8;
Expand Down
6 changes: 6 additions & 0 deletions include/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,14 @@ typedef s32 arg_u16;
#define PAD_SELECTION_BUTTONS (PADRup | PADRdown)
#endif

/* EU writes the tpage mode inline; US/JP query GetGraphType(). */
#ifdef VERSION_EU
#define BG_DRAW_TPAGE(p, tpage) \
(setlen(p, 1), ((u_long*)(p))[sizeof(OT_TYPE) / sizeof(u_long)] = 0xE1000000 | (tpage))
#else
#define BG_DRAW_TPAGE(p, tpage) \
(setlen(p, 1), ((u_long*)(p))[sizeof(OT_TYPE) / sizeof(u_long)] = 0xE1000000 | ((GetGraphType() == 1 || GetGraphType() == 2) ? (tpage) : ((tpage)&0x9FF)))
#endif

union MainPaletteData {
u8 raw[0x200];
Expand Down
9 changes: 1 addition & 8 deletions src/main/14A60.c
Original file line number Diff line number Diff line change
Expand Up @@ -795,9 +795,6 @@ void func_80024260(void)

INCLUDE_ASM("main/nonmatchings/14A60", func_80024334);

#ifdef VERSION_EU
INCLUDE_ASM("main/nonmatchings/14A60", func_80024920);
#else
void func_80024920(struct QuadObj* quad)
{
POLY_F4* primitive;
Expand Down Expand Up @@ -857,11 +854,7 @@ void func_80024920(struct QuadObj* quad)
SP_PRIM_CURSOR += sizeof(POLY_FT4);
SP_DRAW_MODE_CURSOR += sizeof(DR_TPAGE);
}
#endif

#ifdef VERSION_EU
INCLUDE_ASM("main/nonmatchings/14A60", func_80024B9C);
#else
void func_80024B9C(struct QuadObj* quad)
{
POLY_G4* primitive;
Expand Down Expand Up @@ -926,7 +919,7 @@ void func_80024B9C(struct QuadObj* quad)
SP_PRIM_CURSOR += sizeof(POLY_FT4);
SP_DRAW_MODE_CURSOR += sizeof(DR_TPAGE);
}
#endif

void func_80024E70(void)
{
struct PlayerObj* player = &g_Player;
Expand Down
9 changes: 5 additions & 4 deletions src/main/165A0.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,15 @@ void func_800257BC(struct PlayerObj* arg0);

void func_80025CDC(void);

/* EU always uses the getTPage layout; US/JP pick it from GetGraphType(). */
#ifdef VERSION_EU
#define BG_TPAGE(tp, abr, x, y) getTPage(tp, abr, x, y)
#else
#define BG_TPAGE(tp, abr, x, y) \
((GetGraphType() == 1 || GetGraphType() == 2) \
? (((tp)&3) << 9) | (((abr)&3) << 7) | (((y)&0x300) >> 3) | (((x)&0x3FF) >> 6) \
: getTPage(tp, abr, x, y))
#endif

s16 D_800F2FDC[2] = { 0x0300, 0x0600 };

Expand Down Expand Up @@ -246,9 +251,6 @@ void (*D_800F30C8[])(struct MiscObj*) = {
func_80023C0C,
};

#ifdef VERSION_EU
INCLUDE_ASM("main/nonmatchings/165A0", func_80025DA0);
#else
void func_80025DA0(s32 texture_depth, s32 blend_mode)
{
u32 buffer, i, j;
Expand Down Expand Up @@ -281,7 +283,6 @@ void func_80025DA0(s32 texture_depth, s32 blend_mode)
}
SP_BG_TILEMAP = D_80141BE8;
}
#endif
#undef BG_TPAGE

void func_80026118(void)
Expand Down
Loading