mirror of
https://github.com/izzy2lost/Ghostship.git
synced 2026-06-19 01:17:03 -07:00
[WIP] Splitted texts into regions and added first ingame_menu jp support
This commit is contained in:
+27
-11
@@ -941,7 +941,7 @@ const Texture *const main_hud_lut[] = {
|
||||
};
|
||||
|
||||
// Main small font print table 0x02008338-0x02008737
|
||||
const Texture *const main_font_lut[] = {
|
||||
const Texture *const main_font_lut_eu[] = {
|
||||
#ifdef VERSION_EU // EU Font Table
|
||||
texture_font_char_eu_0, texture_font_char_eu_1, texture_font_char_eu_2, texture_font_char_eu_3,
|
||||
texture_font_char_eu_4, texture_font_char_eu_5, texture_font_char_eu_6, texture_font_char_eu_7,
|
||||
@@ -1009,7 +1009,11 @@ const Texture *const main_font_lut[] = {
|
||||
texture_font_char_eu_interpunct,
|
||||
texture_font_char_eu_star_hollow,
|
||||
0x0, 0x0,
|
||||
#elif defined(VERSION_US) // US Font Table
|
||||
#endif
|
||||
};
|
||||
|
||||
const Texture *const main_font_lut_us[] = {
|
||||
// US Font Table
|
||||
texture_font_char_us_0, texture_font_char_us_1, texture_font_char_us_2, texture_font_char_us_3,
|
||||
texture_font_char_us_4, texture_font_char_us_5, texture_font_char_us_6, texture_font_char_us_7,
|
||||
texture_font_char_us_8, texture_font_char_us_9, texture_font_char_us_A, texture_font_char_us_B,
|
||||
@@ -1074,7 +1078,9 @@ const Texture *const main_font_lut[] = {
|
||||
texture_font_char_us_question, texture_font_char_us_double_quote_open, texture_font_char_us_double_quote_close, texture_font_char_us_tilde,
|
||||
0x0, texture_font_char_us_coin, texture_font_char_us_star_filled, texture_font_char_us_multiply,
|
||||
texture_font_char_us_interpunct, texture_font_char_us_star_hollow, 0x0, 0x0,
|
||||
#elif defined(VERSION_JP) || defined(VERSION_SH)
|
||||
};
|
||||
|
||||
const Texture *const main_font_lut_jp[] = {
|
||||
texture_font_char_jp_0, texture_font_char_jp_1, texture_font_char_jp_2, texture_font_char_jp_3,
|
||||
texture_font_char_jp_4, texture_font_char_jp_5, texture_font_char_jp_6, texture_font_char_jp_7,
|
||||
texture_font_char_jp_8, texture_font_char_jp_9, texture_font_char_jp_A, texture_font_char_jp_B,
|
||||
@@ -1139,7 +1145,6 @@ const Texture *const main_font_lut[] = {
|
||||
texture_font_char_jp_question, texture_font_char_jp_double_quotation_open, texture_font_char_jp_double_quotation_close, texture_font_char_jp_wave_dash,
|
||||
texture_font_char_jp_ellipsis, texture_font_char_jp_coin, texture_font_char_jp_star_filled, texture_font_char_jp_multiply,
|
||||
texture_font_char_jp_interpunct, texture_font_char_jp_star_hollow, 0x0, 0x0,
|
||||
#endif
|
||||
};
|
||||
|
||||
// credits font LUT 0x02008738-0x020087CB
|
||||
@@ -1271,18 +1276,18 @@ const Gfx dl_draw_text_bg_box[] = {
|
||||
|
||||
#ifndef VERSION_EU
|
||||
// 0x0200EE28 - 0x0200EE68
|
||||
static const Vtx vertex_ia8_char[] = {
|
||||
#if defined(VERSION_JP) || defined(VERSION_SH)
|
||||
static const Vtx vertex_ia8_char_jp[] = {
|
||||
{{{ 0, 0, 0}, 0, { 0, 1024}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
{{{ 8, 0, 0}, 0, { 512, 1024}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
{{{ 8, 16, 0}, 0, { 512, 0}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
{{{ 0, 16, 0}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
#else
|
||||
};
|
||||
|
||||
static const Vtx vertex_ia8_char_us[] = {
|
||||
{{{ 0, 0, 0}, 0, { 0, 256}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
{{{ 8, 0, 0}, 0, { 0, 0}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
{{{ 8, 16, 0}, 0, { 480, 0}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
{{{ 0, 16, 0}, 0, { 480, 256}, {0xff, 0xff, 0xff, 0xff}}},
|
||||
#endif
|
||||
};
|
||||
// !EU
|
||||
#endif
|
||||
@@ -1332,13 +1337,24 @@ const Gfx dl_ia_text_begin[] = {
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
const Gfx dl_ia_text_tex_settings[] = {
|
||||
const Gfx dl_ia_text_tex_settings_us[] = {
|
||||
gsDPSetTile(G_IM_FMT_IA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, 3, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, 4, G_TX_NOLOD),
|
||||
gsDPLoadSync(),
|
||||
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, ((16 * 8 + G_IM_SIZ_4b_INCR) >> G_IM_SIZ_4b_SHIFT) - 1, CALC_DXT(16, G_IM_SIZ_4b_BYTES)),
|
||||
gsDPSetTile(G_IM_FMT_IA, G_IM_SIZ_4b, 1, 0, G_TX_RENDERTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, 3, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, 4, G_TX_NOLOD),
|
||||
gsDPSetTileSize(0, 0, 0, (16 - 1) << G_TEXTURE_IMAGE_FRAC, (8 - 1) << G_TEXTURE_IMAGE_FRAC),
|
||||
gsSPVertex(vertex_ia8_char, 4, 0),
|
||||
gsSPVertex(vertex_ia8_char_us, 4, 0),
|
||||
gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
const Gfx dl_ia_text_tex_settings_jp[] = {
|
||||
gsDPSetTile(G_IM_FMT_IA, G_IM_SIZ_16b, 0, 0, G_TX_LOADTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, 3, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, 4, G_TX_NOLOD),
|
||||
gsDPLoadSync(),
|
||||
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, ((16 * 8 + G_IM_SIZ_4b_INCR) >> G_IM_SIZ_4b_SHIFT) - 1, CALC_DXT(16, G_IM_SIZ_4b_BYTES)),
|
||||
gsDPSetTile(G_IM_FMT_IA, G_IM_SIZ_4b, 1, 0, G_TX_RENDERTILE, 0, G_TX_WRAP | G_TX_NOMIRROR, 3, G_TX_NOLOD, G_TX_WRAP | G_TX_NOMIRROR, 4, G_TX_NOLOD),
|
||||
gsDPSetTileSize(0, 0, 0, (16 - 1) << G_TEXTURE_IMAGE_FRAC, (8 - 1) << G_TEXTURE_IMAGE_FRAC),
|
||||
gsSPVertex(vertex_ia8_char_jp, 4, 0),
|
||||
gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
@@ -1363,7 +1379,7 @@ const Gfx dl_ia_text_tex_settings[] = {
|
||||
gsDPLoadBlock(G_TX_LOADTILE, 0, 0, 8 * 16 - 1, CALC_DXT(8, G_IM_SIZ_8b_BYTES)),
|
||||
gsDPSetTile(G_IM_FMT_IA, G_IM_SIZ_8b, 1, 0, G_TX_RENDERTILE, 0, G_TX_CLAMP, 4, G_TX_NOLOD, G_TX_CLAMP, 3, G_TX_NOLOD),
|
||||
gsDPSetTileSize(0, 0, 0, (8 - 1) << G_TEXTURE_IMAGE_FRAC, (16 - 1) << G_TEXTURE_IMAGE_FRAC),
|
||||
gsSPVertex(vertex_ia8_char, 4, 0),
|
||||
gsSPVertex(vertex_ia8_char_us, 4, 0),
|
||||
gsSP2Triangles( 0, 1, 2, 0x0, 0, 2, 3, 0x0),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
@@ -66,21 +66,12 @@ ALIGNED8 static const Texture inside_castle_seg7_texture_0700E800[] = "__OTR__le
|
||||
// 0x0700F800 - 0x07010800
|
||||
ALIGNED8 static const Texture inside_castle_seg7_texture_0700F800[] = "__OTR__levels/castle_inside/22";
|
||||
|
||||
#ifdef VERSION_JP
|
||||
// 0x07010800 - 0x07011800
|
||||
ALIGNED8 static const Texture inside_castle_seg7_texture_07010800[] = "__OTR__levels/castle_inside/23";
|
||||
|
||||
// 0x07011800 - 0x0701200
|
||||
ALIGNED8 static const Texture inside_castle_seg7_texture_07011800[] = "__OTR__levels/castle_inside/24";
|
||||
|
||||
#else
|
||||
// 0x07010800 - 0x07011800
|
||||
ALIGNED8 static const Texture inside_castle_seg7_texture_07010800[] = "__OTR__levels/castle_inside/23_us";
|
||||
|
||||
// 0x07011800 - 0x0701200
|
||||
ALIGNED8 static const Texture inside_castle_seg7_texture_07011800[] = "__OTR__levels/castle_inside/24_us";
|
||||
#endif
|
||||
|
||||
// 0x07012800 - 0x07013800
|
||||
ALIGNED8 static const Texture inside_castle_seg7_texture_07012800[] = "__OTR__levels/castle_inside/25";
|
||||
|
||||
|
||||
+1
-1
@@ -140,7 +140,7 @@ extern OSMesgQueue *D_SH_80350FA8;
|
||||
#define AUDIO_INIT_POOL_SIZE 0x2c00
|
||||
#else
|
||||
#define UNUSED_COUNT_80333EE8 24
|
||||
#define AUDIO_HEAP_SIZE 0x41150
|
||||
#define AUDIO_HEAP_SIZE 0x51150
|
||||
#define AUDIO_INIT_POOL_SIZE 0x3500
|
||||
#endif
|
||||
|
||||
|
||||
@@ -2551,7 +2551,7 @@ void sound_reset(u8 presetId) {
|
||||
func_802ad74c(0xF2000000, 0);
|
||||
#endif
|
||||
#if defined(VERSION_JP) || defined(VERSION_US)
|
||||
audio_reset_session(&gAudioSessionPresets[presetId]);
|
||||
// audio_reset_session(&gAudioSessionPresets[presetId]);
|
||||
#else
|
||||
audio_reset_session_eu(presetId);
|
||||
#endif
|
||||
|
||||
+2
-10
@@ -200,11 +200,7 @@ void *dma_sample_data(uintptr_t devAddr, u32 size, s32 arg2, u8 *dmaIndexRef) {
|
||||
|
||||
if (arg2 != 0 || *dmaIndexRef >= sSampleDmaListSize1) {
|
||||
for (i = sSampleDmaListSize1; i < gSampleDmaNumListItems; i++) {
|
||||
#if defined(VERSION_EU)
|
||||
dma = &sSampleDmas[i];
|
||||
#else
|
||||
dma = sSampleDmas + i;
|
||||
#endif
|
||||
bufferPos = devAddr - dma->source;
|
||||
if (0 <= bufferPos && (size_t) bufferPos <= dma->bufSize - size) {
|
||||
// We already have a DMA request for this memory range.
|
||||
@@ -221,11 +217,7 @@ void *dma_sample_data(uintptr_t devAddr, u32 size, s32 arg2, u8 *dmaIndexRef) {
|
||||
}
|
||||
dma->ttl = 60;
|
||||
*dmaIndexRef = (u8) i;
|
||||
#if defined(VERSION_EU)
|
||||
return &dma->buffer[(devAddr - dma->source)];
|
||||
#else
|
||||
return (devAddr - dma->source) + dma->buffer;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -297,7 +289,7 @@ void *dma_sample_data(uintptr_t devAddr, u32 size, s32 arg2, u8 *dmaIndexRef) {
|
||||
osPiStartDma(&gCurrAudioFrameDmaIoMesgBufs[gCurrAudioFrameDmaCount - 1], OS_MESG_PRI_NORMAL,
|
||||
OS_READ, dmaDevAddr, dma->buffer, transfer, &gCurrAudioFrameDmaQueue);
|
||||
*dmaIndexRef = dmaIndex;
|
||||
return dma->buffer + (devAddr - dmaDevAddr);
|
||||
return (devAddr - dmaDevAddr) + dma->buffer;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -313,7 +305,7 @@ void init_sample_dma_buffers(UNUSED s32 arg0) {
|
||||
#if defined(VERSION_EU)
|
||||
sDmaBufSize = 0x400;
|
||||
#else
|
||||
sDmaBufSize = 144 * 9;
|
||||
sDmaBufSize = 0x800;
|
||||
#endif
|
||||
|
||||
#if defined(VERSION_EU)
|
||||
|
||||
+168
-254
File diff suppressed because it is too large
Load Diff
+5
-2
@@ -45,8 +45,11 @@ extern u8* main_hud_lut[58];
|
||||
extern Gfx dl_hud_img_load_tex_block[];
|
||||
extern Gfx dl_hud_img_begin[];
|
||||
extern Gfx dl_hud_img_end[];
|
||||
extern void *main_font_lut[];
|
||||
extern Gfx dl_ia_text_tex_settings[];
|
||||
extern void *main_font_lut_eu[];
|
||||
extern void *main_font_lut_us[];
|
||||
extern void *main_font_lut_jp[];
|
||||
extern Gfx dl_ia_text_tex_settings_us[];
|
||||
extern Gfx dl_ia_text_tex_settings_jp[];
|
||||
extern Gfx dl_rgba16_load_tex_block[];
|
||||
extern void *main_credits_font_lut[];
|
||||
extern u8* main_hud_camera_lut[6];
|
||||
|
||||
Reference in New Issue
Block a user