mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-07-09 04:30:51 -04:00
Implement & link initial_menu
This commit is contained in:
@@ -0,0 +1,203 @@
|
||||
#include "bootdata.h"
|
||||
#include "libforest/gbi_extensions.h"
|
||||
|
||||
static u8 gam_win_moji1_tex[] ATTRIBUTE_ALIGN(32) = {
|
||||
#include "assets/bootdata/gam_win_moji1_tex.inc"
|
||||
};
|
||||
|
||||
static u8 gam_win_moji2_tex[] ATTRIBUTE_ALIGN(32) = {
|
||||
#include "assets/bootdata/gam_win_moji2_tex.inc"
|
||||
};
|
||||
|
||||
static u8 yes[] = {
|
||||
#include "assets/bootdata/yes.inc"
|
||||
};
|
||||
|
||||
static u8 no[] = {
|
||||
#include "assets/bootdata/no.inc"
|
||||
};
|
||||
|
||||
static u8 att_win_waku1_tex[] ATTRIBUTE_ALIGN(32) = {
|
||||
#include "assets/bootdata/att_win_waku1_tex.inc"
|
||||
};
|
||||
|
||||
static u8 att_win_waku2_tex[] ATTRIBUTE_ALIGN(32) = {
|
||||
#include "assets/bootdata/att_win_waku2_tex.inc"
|
||||
};
|
||||
|
||||
static u8 att_win_waku3_tex[] ATTRIBUTE_ALIGN(32) = {
|
||||
#include "assets/bootdata/att_win_waku3_tex.inc"
|
||||
};
|
||||
|
||||
static u8 att_win_waku4_tex[] ATTRIBUTE_ALIGN(32) = {
|
||||
#include "assets/bootdata/att_win_waku4_tex.inc"
|
||||
};
|
||||
|
||||
static u8 att_win_waku5_tex[] ATTRIBUTE_ALIGN(32) = {
|
||||
#include "assets/bootdata/att_win_waku5_tex.inc"
|
||||
};
|
||||
|
||||
static u8 att_win_waku6_tex[] ATTRIBUTE_ALIGN(32) = {
|
||||
#include "assets/bootdata/att_win_waku6_tex.inc"
|
||||
};
|
||||
|
||||
static Vtx gam_win1_v[] = {
|
||||
#include "assets/bootdata/gam_win1_v.inc"
|
||||
};
|
||||
|
||||
Gfx gam_win1_cursor_model[] = {
|
||||
gsSPTexture(0, 0, 0, 0, G_ON),
|
||||
gsDPSetCombineMode(G_CC_PRIMITIVE, G_CC_PASS2),
|
||||
gsDPSetPrimColor(0, 255, 145, 40, 40, 255),
|
||||
gsDPSetRenderMode(G_RM_FOG_SHADE_A, G_RM_AA_ZB_OPA_SURF2),
|
||||
gsSPLoadGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BACK | G_FOG | G_SHADING_SMOOTH),
|
||||
gsSPVertex(&gam_win1_v[0], 3, 0),
|
||||
gsSPNTrianglesInit_5b(
|
||||
1, // tri count
|
||||
0, 1, 2, // tri0
|
||||
0, 0, 0, // tri1
|
||||
0, 0, 0 // tri2
|
||||
),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
Gfx gam_win1_moji_model[] = {
|
||||
gsSPTexture(0, 0, 0, 0, G_ON),
|
||||
gsDPSetCombineMode(G_CC_BLENDPRIMDECALA, G_CC_PASS2),
|
||||
gsDPSetPrimColor(0, 255, 50, 50, 60, 255),
|
||||
gsDPSetRenderMode(G_RM_FOG_SHADE_A, G_RM_ZB_XLU_SURF2),
|
||||
gsDPLoadTextureBlock_4b_Dolphin(gam_win_moji2_tex, G_IM_FMT_I, 160, 16, 15, GX_CLAMP, GX_CLAMP, 0, 0),
|
||||
gsSPLoadGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BACK | G_FOG | G_SHADING_SMOOTH),
|
||||
gsSPVertex(&gam_win1_v[3], 8, 0),
|
||||
gsSPNTrianglesInit_5b(
|
||||
2, // tri count
|
||||
0, 1, 2, // tri0
|
||||
1, 3, 2, // tri1
|
||||
0, 0, 0 // tri2
|
||||
),
|
||||
gsDPLoadTextureBlock_4b_Dolphin(gam_win_moji1_tex, G_IM_FMT_I, 80, 16, 15, GX_CLAMP, GX_CLAMP, 0, 0),
|
||||
gsSPNTrianglesInit_5b(
|
||||
2, // tri count
|
||||
4, 5, 6, // tri0
|
||||
5, 7, 6, // tri1
|
||||
0, 0, 0 // tri2
|
||||
),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
Gfx gam_win1_moji2_model[] = {
|
||||
gsSPTexture(0, 0, 0, 0, G_ON),
|
||||
gsDPSetCombineMode(G_CC_BLENDPRIMDECALA, G_CC_PASS2),
|
||||
gsDPSetPrimColor(0, 255, 90, 90, 155, 255),
|
||||
gsDPSetRenderMode(G_RM_FOG_SHADE_A, G_RM_ZB_XLU_SURF2),
|
||||
gsDPLoadTextureBlock_4b_Dolphin(yes, G_IM_FMT_I, 32, 16, 15, GX_CLAMP, GX_CLAMP, 0, 0),
|
||||
gsSPLoadGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BACK | G_FOG | G_SHADING_SMOOTH),
|
||||
gsSPVertex(&gam_win1_v[11], 4, 0),
|
||||
gsSPNTrianglesInit_5b(
|
||||
2, // tri count
|
||||
0, 1, 2, // tri0
|
||||
1, 3, 2, // tri1
|
||||
0, 0, 0 // tri2
|
||||
),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
Gfx gam_win1_moji3_model[] = {
|
||||
gsSPTexture(0, 0, 0, 0, G_ON),
|
||||
gsDPSetCombineMode(G_CC_BLENDPRIMDECALA, G_CC_PASS2),
|
||||
gsDPSetPrimColor(0, 255, 90, 90, 155, 255),
|
||||
gsDPSetRenderMode(G_RM_FOG_SHADE_A, G_RM_ZB_XLU_SURF2),
|
||||
gsDPLoadTextureBlock_4b_Dolphin(no, G_IM_FMT_I, 16, 16, 15, GX_CLAMP, GX_CLAMP, 0, 0),
|
||||
gsSPLoadGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BACK | G_FOG | G_SHADING_SMOOTH),
|
||||
gsSPVertex(&gam_win1_v[15], 4, 0),
|
||||
gsSPNTrianglesInit_5b(
|
||||
2, // tri count
|
||||
0, 1, 2, // tri0
|
||||
1, 3, 2, // tri1
|
||||
0, 0, 0 // tri2
|
||||
),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
Gfx gam_win1_winT_model[] = {
|
||||
gsSPTexture(0, 0, 0, 0, G_ON),
|
||||
gsDPSetCombineMode(G_CC_BLENDPRIMDECALA, G_CC_PASS2),
|
||||
gsDPSetPrimColor(0, 255, 225, 255, 255, 255),
|
||||
gsDPSetRenderMode(G_RM_FOG_SHADE_A, G_RM_ZB_XLU_SURF2),
|
||||
gsDPLoadTextureBlock_4b_Dolphin(att_win_waku6_tex, G_IM_FMT_I, 16, 16, 15, GX_MIRROR, GX_MIRROR, 0, 0),
|
||||
gsSPLoadGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BACK | G_FOG | G_SHADING_SMOOTH),
|
||||
gsSPVertex(&gam_win1_v[19], 28, 0),
|
||||
gsSPNTrianglesInit_5b(
|
||||
2, // tri count
|
||||
0, 1, 2, // tri0
|
||||
1, 3, 2, // tri1
|
||||
0, 0, 0 // tri2
|
||||
),
|
||||
gsDPLoadTextureBlock_4b_Dolphin(att_win_waku5_tex, G_IM_FMT_I, 64, 32, 15, GX_MIRROR, GX_MIRROR, 0, 0),
|
||||
gsSPNTrianglesInit_5b(
|
||||
4, // tri count
|
||||
4, 5, 6, // tri0
|
||||
7, 4, 6, // tri1
|
||||
8, 9, 10 // tri2
|
||||
),
|
||||
gsSPNTriangles_5b(
|
||||
9, 11, 10, // tri0
|
||||
0, 0, 0, // tri1
|
||||
0, 0, 0, // tri2
|
||||
0, 0, 0 // tri3
|
||||
),
|
||||
gsDPLoadTextureBlock_4b_Dolphin(att_win_waku4_tex, G_IM_FMT_I, 64, 32, 15, GX_MIRROR, GX_MIRROR, 0, 0),
|
||||
gsSPNTrianglesInit_5b(
|
||||
4, // tri count
|
||||
12, 13, 14, // tri0
|
||||
15, 12, 14, // tri1
|
||||
16, 17, 18 // tri2
|
||||
),
|
||||
gsSPNTriangles_5b(
|
||||
17, 19, 18, // tri0
|
||||
0, 0, 0, // tri1
|
||||
0, 0, 0, // tri2
|
||||
0, 0, 0 // tri3
|
||||
),
|
||||
gsDPLoadTextureBlock_4b_Dolphin(att_win_waku3_tex, G_IM_FMT_I, 32, 64, 15, GX_MIRROR, GX_MIRROR, 0, 0),
|
||||
gsSPNTrianglesInit_5b(
|
||||
4, // tri count
|
||||
20, 21, 22, // tri0
|
||||
23, 20, 22, // tri1
|
||||
24, 25, 26 // tri2
|
||||
),
|
||||
gsSPNTriangles_5b(
|
||||
25, 27, 26, // tri0
|
||||
0, 0, 0, // tri1
|
||||
0, 0, 0, // tri2
|
||||
0, 0, 0 // tri3
|
||||
),
|
||||
gsDPLoadTextureBlock_4b_Dolphin(att_win_waku2_tex, G_IM_FMT_I, 64, 32, 15, GX_MIRROR, GX_MIRROR, 0, 0),
|
||||
gsSPVertex(&gam_win1_v[47], 16, 0),
|
||||
gsSPNTrianglesInit_5b(
|
||||
4, // tri count
|
||||
0, 1, 2, // tri0
|
||||
1, 3, 2, // tri1
|
||||
4, 5, 6 // tri2
|
||||
),
|
||||
gsSPNTriangles_5b(
|
||||
7, 4, 6, // tri0
|
||||
0, 0, 0, // tri1
|
||||
0, 0, 0, // tri2
|
||||
0, 0, 0 // tri3
|
||||
),
|
||||
gsDPLoadTextureBlock_4b_Dolphin(att_win_waku1_tex, G_IM_FMT_I, 64, 32, 15, GX_MIRROR, GX_MIRROR, 0, 0),
|
||||
gsSPNTrianglesInit_5b(
|
||||
4, // tri count
|
||||
8, 9, 10, // tri0
|
||||
11, 8, 10, // tri1
|
||||
12, 13, 14 // tri2
|
||||
),
|
||||
gsSPNTriangles_5b(
|
||||
13, 15, 14, // tri0
|
||||
0, 0, 0, // tri1
|
||||
0, 0, 0, // tri2
|
||||
0, 0, 0 // tri3
|
||||
),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
@@ -0,0 +1,145 @@
|
||||
#include "bootdata.h"
|
||||
#include "libforest/gbi_extensions.h"
|
||||
|
||||
static u8 gam_win_moji3_tex[] ATTRIBUTE_ALIGN(32) = {
|
||||
#include "assets/bootdata/gam_win_moji3_tex.inc"
|
||||
};
|
||||
|
||||
static u8 gam_win_moji4_tex[] ATTRIBUTE_ALIGN(32) = {
|
||||
#include "assets/bootdata/gam_win_moji4_tex.inc"
|
||||
};
|
||||
|
||||
static u8 att_win_waku1_tex[] ATTRIBUTE_ALIGN(32) = {
|
||||
#include "assets/bootdata/att_win_waku1_tex_1.inc"
|
||||
};
|
||||
|
||||
static u8 att_win_waku2_tex[] ATTRIBUTE_ALIGN(32) = {
|
||||
#include "assets/bootdata/att_win_waku2_tex_1.inc"
|
||||
};
|
||||
|
||||
static u8 att_win_waku3_tex[] ATTRIBUTE_ALIGN(32) = {
|
||||
#include "assets/bootdata/att_win_waku3_tex_1.inc"
|
||||
};
|
||||
|
||||
static u8 att_win_waku4_tex[] ATTRIBUTE_ALIGN(32) = {
|
||||
#include "assets/bootdata/att_win_waku4_tex_1.inc"
|
||||
};
|
||||
|
||||
static u8 att_win_waku5_tex[] ATTRIBUTE_ALIGN(32) = {
|
||||
#include "assets/bootdata/att_win_waku5_tex_1.inc"
|
||||
};
|
||||
|
||||
static u8 att_win_waku6_tex[] ATTRIBUTE_ALIGN(32) = {
|
||||
#include "assets/bootdata/att_win_waku6_tex_1.inc"
|
||||
};
|
||||
|
||||
static Vtx gam_win2_v[] = {
|
||||
#include "assets/bootdata/gam_win2_v.inc"
|
||||
};
|
||||
|
||||
Gfx gam_win2_moji_model[] = {
|
||||
gsSPTexture(0, 0, 0, 0, G_ON),
|
||||
gsDPSetCombineMode(G_CC_BLENDPRIMDECALA, G_CC_PASS2),
|
||||
gsDPSetPrimColor(0, 255, 50, 50, 60, 255),
|
||||
gsDPSetRenderMode(G_RM_FOG_SHADE_A, G_RM_ZB_XLU_SURF2),
|
||||
gsDPLoadTextureBlock_4b_Dolphin(gam_win_moji4_tex, G_IM_FMT_I, 160, 16, 15, GX_CLAMP, GX_CLAMP, 0, 0),
|
||||
gsSPLoadGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BACK | G_FOG | G_SHADING_SMOOTH),
|
||||
gsSPVertex(&gam_win2_v[0], 8, 0),
|
||||
gsSPNTrianglesInit_5b(
|
||||
2, // tri count
|
||||
0, 1, 2, // tri0
|
||||
1, 3, 2, // tri1
|
||||
0, 0, 0 // tri2
|
||||
),
|
||||
gsDPLoadTextureBlock_4b_Dolphin(gam_win_moji3_tex, G_IM_FMT_I, 160, 16, 15, GX_CLAMP, GX_CLAMP, 0, 0),
|
||||
gsSPNTrianglesInit_5b(
|
||||
2, // tri count
|
||||
4, 5, 6, // tri0
|
||||
5, 7, 6, // tri1
|
||||
0, 0, 0 // tri2
|
||||
),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
Gfx gam_win2_winT_model[] = {
|
||||
gsSPTexture(0, 0, 0, 0, G_ON),
|
||||
gsDPSetCombineMode(G_CC_BLENDPRIMDECALA, G_CC_PASS2),
|
||||
gsDPSetPrimColor(0, 255, 225, 255, 255, 255),
|
||||
gsDPSetRenderMode(G_RM_FOG_SHADE_A, G_RM_ZB_XLU_SURF2),
|
||||
gsDPLoadTextureBlock_4b_Dolphin(att_win_waku6_tex, G_IM_FMT_I, 16, 16, 15, GX_MIRROR, GX_MIRROR, 0, 0),
|
||||
gsSPLoadGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BACK | G_FOG | G_SHADING_SMOOTH),
|
||||
gsSPVertex(&gam_win2_v[8], 28, 0),
|
||||
gsSPNTrianglesInit_5b(
|
||||
2, // tri count
|
||||
0, 1, 2, // tri0
|
||||
1, 3, 2, // tri1
|
||||
0, 0, 0 // tri2
|
||||
),
|
||||
gsDPLoadTextureBlock_4b_Dolphin(att_win_waku5_tex, G_IM_FMT_I, 64, 32, 15, GX_MIRROR, GX_MIRROR, 0, 0),
|
||||
gsSPNTrianglesInit_5b(
|
||||
4, // tri count
|
||||
4, 5, 6, // tri0
|
||||
7, 4, 6, // tri1
|
||||
8, 9, 10 // tri2
|
||||
),
|
||||
gsSPNTriangles_5b(
|
||||
9, 11, 10, // tri0
|
||||
0, 0, 0, // tri1
|
||||
0, 0, 0, // tri2
|
||||
0, 0, 0 // tri3
|
||||
),
|
||||
gsDPLoadTextureBlock_4b_Dolphin(att_win_waku4_tex, G_IM_FMT_I, 64, 32, 15, GX_MIRROR, GX_MIRROR, 0, 0),
|
||||
gsSPNTrianglesInit_5b(
|
||||
4, // tri count
|
||||
12, 13, 14, // tri0
|
||||
15, 12, 14, // tri1
|
||||
16, 17, 18 // tri2
|
||||
),
|
||||
gsSPNTriangles_5b(
|
||||
17, 19, 18, // tri0
|
||||
0, 0, 0, // tri1
|
||||
0, 0, 0, // tri2
|
||||
0, 0, 0 // tri3
|
||||
),
|
||||
gsDPLoadTextureBlock_4b_Dolphin(att_win_waku3_tex, G_IM_FMT_I, 32, 64, 15, GX_MIRROR, GX_MIRROR, 0, 0),
|
||||
gsSPNTrianglesInit_5b(
|
||||
4, // tri count
|
||||
20, 21, 22, // tri0
|
||||
23, 20, 22, // tri1
|
||||
24, 25, 26 // tri2
|
||||
),
|
||||
gsSPNTriangles_5b(
|
||||
25, 27, 26, // tri0
|
||||
0, 0, 0, // tri1
|
||||
0, 0, 0, // tri2
|
||||
0, 0, 0 // tri3
|
||||
),
|
||||
gsDPLoadTextureBlock_4b_Dolphin(att_win_waku2_tex, G_IM_FMT_I, 64, 32, 15, GX_MIRROR, GX_MIRROR, 0, 0),
|
||||
gsSPVertex(&gam_win2_v[36], 16, 0),
|
||||
gsSPNTrianglesInit_5b(
|
||||
4, // tri count
|
||||
0, 1, 2, // tri0
|
||||
1, 3, 2, // tri1
|
||||
4, 5, 6 // tri2
|
||||
),
|
||||
gsSPNTriangles_5b(
|
||||
7, 4, 6, // tri0
|
||||
0, 0, 0, // tri1
|
||||
0, 0, 0, // tri2
|
||||
0, 0, 0 // tri3
|
||||
),
|
||||
gsDPLoadTextureBlock_4b_Dolphin(att_win_waku1_tex, G_IM_FMT_I, 64, 32, 15, GX_MIRROR, GX_MIRROR, 0, 0),
|
||||
gsSPNTrianglesInit_5b(
|
||||
4, // tri count
|
||||
8, 9, 10, // tri0
|
||||
11, 8, 10, // tri1
|
||||
12, 13, 14 // tri2
|
||||
),
|
||||
gsSPNTriangles_5b(
|
||||
13, 15, 14, // tri0
|
||||
0, 0, 0, // tri1
|
||||
0, 0, 0, // tri2
|
||||
0, 0, 0 // tri3
|
||||
),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
@@ -0,0 +1,38 @@
|
||||
#include "bootdata.h"
|
||||
#include "libforest/gbi_extensions.h"
|
||||
|
||||
static u8 gam_win_moji3_tex[] ATTRIBUTE_ALIGN(32) = {
|
||||
#include "assets/bootdata/gam_win_moji3_tex_1.inc"
|
||||
};
|
||||
|
||||
static u8 gam_win_moji5_tex[] ATTRIBUTE_ALIGN(32) = {
|
||||
#include "assets/bootdata/gam_win_moji5_tex.inc"
|
||||
};
|
||||
|
||||
static Vtx gam_win3_v[] = {
|
||||
#include "assets/bootdata/gam_win3_v.inc"
|
||||
};
|
||||
|
||||
Gfx gam_win3_moji_model[] = {
|
||||
gsSPTexture(0, 0, 0, 0, G_ON),
|
||||
gsDPSetCombineMode(G_CC_BLENDPRIMDECALA, G_CC_PASS2),
|
||||
gsDPSetPrimColor(0, 255, 50, 50, 60, 255),
|
||||
gsDPSetRenderMode(G_RM_FOG_SHADE_A, G_RM_ZB_XLU_SURF2),
|
||||
gsDPLoadTextureBlock_4b_Dolphin(gam_win_moji5_tex, G_IM_FMT_I, 112, 16, 15, GX_CLAMP, GX_CLAMP, 0, 0),
|
||||
gsSPLoadGeometryMode(G_ZBUFFER | G_SHADE | G_CULL_BACK | G_FOG | G_SHADING_SMOOTH),
|
||||
gsSPVertex(&gam_win3_v[0], 8, 0),
|
||||
gsSPNTrianglesInit_5b(
|
||||
2, // tri count
|
||||
0, 1, 2, // tri0
|
||||
1, 3, 2, // tri1
|
||||
0, 0, 0 // tri2
|
||||
),
|
||||
gsDPLoadTextureBlock_4b_Dolphin(gam_win_moji3_tex, G_IM_FMT_I, 160, 16, 15, GX_CLAMP, GX_CLAMP, 0, 0),
|
||||
gsSPNTrianglesInit_5b(
|
||||
2, // tri count
|
||||
4, 5, 6, // tri0
|
||||
5, 7, 6, // tri1
|
||||
0, 0, 0 // tri2
|
||||
),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
@@ -0,0 +1,22 @@
|
||||
#include "bootdata.h"
|
||||
#include "libforest/gbi_extensions.h"
|
||||
|
||||
u8 nintendo_376x104[] ATTRIBUTE_ALIGN(32) = {
|
||||
#include "assets/bootdata/nintendo_376x104.inc"
|
||||
};
|
||||
|
||||
Vtx logo_nin_v[] = {
|
||||
#include "assets/bootdata/logo_nin_v.inc"
|
||||
};
|
||||
|
||||
Gfx logo_ninT_model[] = {
|
||||
gsDPLoadTextureBlock_4b_Dolphin(nintendo_376x104, G_IM_FMT_I, 376, 104, 15, GX_CLAMP, GX_CLAMP, 0, 0),
|
||||
gsSPVertex(&logo_nin_v[0], 4, 0),
|
||||
gsSPNTrianglesInit_5b(
|
||||
2, // tri count
|
||||
0, 1, 2, // tri0
|
||||
1, 3, 2, // tri1
|
||||
0, 0, 0 // tri2
|
||||
),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
+10
-12
@@ -8,8 +8,6 @@
|
||||
#include "dolphin/vi.h"
|
||||
#include "dolphin/gx.h"
|
||||
|
||||
#define G_CC_DVDERR 0, 0, 0, PRIMITIVE, 0, 0, 0, TEXEL0
|
||||
|
||||
/* imports */
|
||||
static u8 dvd_keikoku_moji1_1_tex[] ATTRIBUTE_ALIGN(32) = {
|
||||
#include "assets/dvd_keikoku_moji1_1_tex.inc"
|
||||
@@ -49,7 +47,7 @@ static Vtx dvd_keikoku1_v[] = {
|
||||
static Gfx keikoku1_dvd_att_moji_model[] = {
|
||||
/* init */
|
||||
gsSPTexture(0, 0, 0, G_TX_RENDERTILE, G_ON),
|
||||
gsDPSetCombineMode(G_CC_DVDERR, G_CC_PASS2),
|
||||
gsDPSetCombineMode(G_CC_BLENDPRIMDECALA, G_CC_PASS2),
|
||||
gsDPSetPrimColor(0, 255, 235, 235, 255, 255),
|
||||
gsDPSetRenderMode(G_RM_FOG_SHADE_A, G_RM_AA_ZB_XLU_INTER2),
|
||||
|
||||
@@ -89,7 +87,7 @@ static Gfx keikoku1_dvd_att_moji_model[] = {
|
||||
|
||||
static Gfx keikoku1_dvd_att_winT_model[] = {
|
||||
gsSPTexture(0, 0, 0, G_TX_RENDERTILE, G_ON),
|
||||
gsDPSetCombineMode(G_CC_DVDERR, G_CC_PASS2),
|
||||
gsDPSetCombineMode(G_CC_BLENDPRIMDECALA, G_CC_PASS2),
|
||||
gsDPSetPrimColor(0, 255, 100, 0, 170, 255),
|
||||
gsDPSetRenderMode(G_RM_FOG_SHADE_A, G_RM_ZB_XLU_SURF2),
|
||||
|
||||
@@ -192,7 +190,7 @@ static Vtx dvd_keikoku2_v[] = {
|
||||
};
|
||||
static Gfx keikoku2_dvd_att_moji_model[] = {
|
||||
gsSPTexture(0, 0, 0, 0, G_ON),
|
||||
gsDPSetCombineMode(G_CC_DVDERR, G_CC_PASS2),
|
||||
gsDPSetCombineMode(G_CC_BLENDPRIMDECALA, G_CC_PASS2),
|
||||
gsDPSetPrimColor(0, 255, 235, 235, 255, 255),
|
||||
gsDPSetRenderMode(G_RM_FOG_SHADE_A, G_RM_AA_ZB_XLU_INTER2),
|
||||
gsDPLoadTextureBlock_4b_Dolphin(dvd_keikoku_moji2_3_tex, G_IM_FMT_I, 16, 16, 15, GX_MIRROR, GX_MIRROR, 0, 0),
|
||||
@@ -223,7 +221,7 @@ static Gfx keikoku2_dvd_att_moji_model[] = {
|
||||
|
||||
static Gfx keikoku2_dvd_att_winT_model[] = {
|
||||
gsSPTexture(0, 0, 0, 0, G_ON),
|
||||
gsDPSetCombineMode(G_CC_DVDERR, G_CC_PASS2),
|
||||
gsDPSetCombineMode(G_CC_BLENDPRIMDECALA, G_CC_PASS2),
|
||||
gsDPSetPrimColor(0, 255, 100, 0, 170, 255),
|
||||
gsDPSetRenderMode(G_RM_FOG_SHADE_A, G_RM_ZB_XLU_SURF2),
|
||||
gsDPLoadTextureBlock_4b_Dolphin(ctl_att_w6_tex, G_IM_FMT_I, 16, 16, 15, GX_MIRROR, GX_MIRROR, 0, 0),
|
||||
@@ -322,7 +320,7 @@ static Vtx dvd_keikoku3_v[] = {
|
||||
};
|
||||
static Gfx keikoku3_dvd_att_moji_model[] = {
|
||||
gsSPTexture(0, 0, 0, 0, G_ON),
|
||||
gsDPSetCombineMode(G_CC_DVDERR, G_CC_PASS2),
|
||||
gsDPSetCombineMode(G_CC_BLENDPRIMDECALA, G_CC_PASS2),
|
||||
gsDPSetPrimColor(0, 255, 235, 235, 255, 255),
|
||||
gsDPSetRenderMode(G_RM_FOG_SHADE_A, G_RM_AA_ZB_XLU_INTER2),
|
||||
gsDPLoadTextureBlock_4b_Dolphin(dvd_keikoku_moji3_3_tex, G_IM_FMT_I, 16, 16, 15, GX_MIRROR, GX_MIRROR, 0, 0),
|
||||
@@ -372,7 +370,7 @@ static Gfx keikoku3_dvd_att_moji_model[] = {
|
||||
|
||||
static Gfx keikoku3_dvd_att_winT_model[] = {
|
||||
gsSPTexture(0, 0, 0, 0, G_ON),
|
||||
gsDPSetCombineMode(G_CC_DVDERR, G_CC_PASS2),
|
||||
gsDPSetCombineMode(G_CC_BLENDPRIMDECALA, G_CC_PASS2),
|
||||
gsDPSetPrimColor(0, 255, 100, 0, 170, 255),
|
||||
gsDPSetRenderMode(G_RM_FOG_SHADE_A, G_RM_ZB_XLU_SURF2),
|
||||
gsDPLoadTextureBlock_4b_Dolphin(ctl_att_w6_tex, G_IM_FMT_I, 16, 16, 15, GX_MIRROR, GX_MIRROR, 0, 0),
|
||||
@@ -480,7 +478,7 @@ static Vtx dvd_keikoku4_v[] = {
|
||||
};
|
||||
static Gfx keikoku4_dvd_att_moji_model[] = {
|
||||
gsSPTexture(0, 0, 0, 0, G_ON),
|
||||
gsDPSetCombineMode(G_CC_DVDERR, G_CC_PASS2),
|
||||
gsDPSetCombineMode(G_CC_BLENDPRIMDECALA, G_CC_PASS2),
|
||||
gsDPSetPrimColor(0, 255, 235, 235, 255, 255),
|
||||
gsDPSetRenderMode(G_RM_FOG_SHADE_A, G_RM_AA_ZB_XLU_INTER2),
|
||||
gsDPLoadTextureBlock_4b_Dolphin(dvd_keikoku_moji6_new2_tex, G_IM_FMT_I, 64, 16, 15, GX_CLAMP, GX_CLAMP, 0, 0),
|
||||
@@ -539,7 +537,7 @@ static Gfx keikoku4_dvd_att_moji_model[] = {
|
||||
|
||||
static Gfx keikoku4_dvd_att_winT_model[] = {
|
||||
gsSPTexture(0, 0, 0, 0, G_ON),
|
||||
gsDPSetCombineMode(G_CC_DVDERR, G_CC_PASS2),
|
||||
gsDPSetCombineMode(G_CC_BLENDPRIMDECALA, G_CC_PASS2),
|
||||
gsDPSetPrimColor(0, 255, 100, 0, 170, 255),
|
||||
gsDPSetRenderMode(G_RM_FOG_SHADE_A, G_RM_ZB_XLU_SURF2),
|
||||
gsDPLoadTextureBlock_4b_Dolphin(ctl_att_w6_tex, G_IM_FMT_I, 16, 16, 15, GX_MIRROR, GX_MIRROR, 0, 0),
|
||||
@@ -644,7 +642,7 @@ static Vtx dvd_keikoku5_v[] = {
|
||||
};
|
||||
static Gfx keikoku5_dvd_att_moji_model[] = {
|
||||
gsSPTexture(0, 0, 0, 0, G_ON),
|
||||
gsDPSetCombineMode(G_CC_DVDERR, G_CC_PASS2),
|
||||
gsDPSetCombineMode(G_CC_BLENDPRIMDECALA, G_CC_PASS2),
|
||||
gsDPSetPrimColor(0, 255, 235, 235, 255, 255),
|
||||
gsDPSetRenderMode(G_RM_FOG_SHADE_A, G_RM_AA_ZB_XLU_INTER2),
|
||||
gsDPLoadTextureBlock_4b_Dolphin(dvd_keikoku_moji9_tex, G_IM_FMT_I, 160, 16, 15, GX_CLAMP, GX_CLAMP, 0, 0),
|
||||
@@ -696,7 +694,7 @@ static Gfx keikoku5_dvd_att_moji_model[] = {
|
||||
|
||||
static Gfx keikoku5_dvd_att_winT_model[] = {
|
||||
gsSPTexture(0, 0, 0, 0, G_ON),
|
||||
gsDPSetCombineMode(G_CC_DVDERR, G_CC_PASS2),
|
||||
gsDPSetCombineMode(G_CC_BLENDPRIMDECALA, G_CC_PASS2),
|
||||
gsDPSetPrimColor(0, 255, 100, 0, 170, 255),
|
||||
gsDPSetRenderMode(G_RM_FOG_SHADE_A, G_RM_ZB_XLU_SURF2),
|
||||
gsDPLoadTextureBlock_4b_Dolphin(ctl_att_w6_tex, G_IM_FMT_I, 16, 16, 15, GX_MIRROR, GX_MIRROR, 0, 0),
|
||||
|
||||
@@ -0,0 +1,453 @@
|
||||
#include "initial_menu.h"
|
||||
#include "PR/mbi.h"
|
||||
#include "libforest/gbi_extensions.h"
|
||||
#include "m_nmibuf.h"
|
||||
#include "dolphin/dvd.h"
|
||||
#include "libjsys/jsyswrapper.h"
|
||||
#include "boot.h"
|
||||
#include "dolphin/os/OSFont.h"
|
||||
#include "bootdata.h"
|
||||
#include "libultra/libultra.h"
|
||||
#include "libforest/emu64/emu64_wrapper.h"
|
||||
#include "dolphin/vi.h"
|
||||
#include "dolphin/os/OSRtc.h"
|
||||
#include "dolphin/os/OSMessage.h"
|
||||
#include "dolphin/os/OSResetSW.h"
|
||||
#include "dolphin/os/OSReset.h"
|
||||
#include "dolphin/os.h"
|
||||
#include "m_controller.h"
|
||||
#include "dvderr.h"
|
||||
|
||||
#define G_CC_LOGO 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0
|
||||
|
||||
static Mtx model_cursor;
|
||||
static u8 progressive_mode;
|
||||
|
||||
static Gfx gam_win1_cursor_setup[] = {
|
||||
gsSPTexture(0, 0, 0, 0, G_OFF),
|
||||
gsDPSetCombineMode(G_CC_PRIMITIVE, G_CC_PRIMITIVE),
|
||||
gsDPSetRenderMode(G_RM_AA_OPA_SURF, G_RM_AA_OPA_SURF2),
|
||||
gsSPLoadGeometryMode(G_SHADE | G_SHADING_SMOOTH),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
static Gfx gam_win1_moji_setup[] = {
|
||||
gsSPTexture(0, 0, 0, 0, G_ON),
|
||||
gsDPSetCombineMode(G_CC_BLENDPRIMDECALA, G_CC_BLENDPRIMDECALA),
|
||||
gsDPSetRenderMode(G_RM_XLU_SURF, G_RM_XLU_SURF2),
|
||||
gsSPLoadGeometryMode(G_SHADE | G_SHADING_SMOOTH),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
static Vp viewport = {
|
||||
1280, 960, 511, 0,
|
||||
1280, 960, 511, 0
|
||||
};
|
||||
|
||||
static Mtx projection = {
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0xFFFF0000, 0x00000000, 0xFFFF0001,
|
||||
0x00CC0000, 0x00000000, 0x00000111, 0x00000000,
|
||||
0x00000000, 0xFFFF0000, 0x00000000, 0x00000000
|
||||
};
|
||||
|
||||
static Mtx lookat = {
|
||||
0x10000, 0x00000, 0x00001, 0x00000,
|
||||
0x00000, 0x10000, 0x00000, 0x00001,
|
||||
0x00000, 0x00000, 0x00000, 0x00000,
|
||||
0x00000, 0x00000, 0x00000, 0x00000
|
||||
};
|
||||
|
||||
static Mtx default_model_scale = {
|
||||
0x20000, 0x00000, 0x00002, 0x00000,
|
||||
0x00000, 0x10000, 0x00000, 0x00001,
|
||||
0x00000, 0x00000, 0x00000, 0x00000,
|
||||
0x00000, 0x00000, 0x00000, 0x00000
|
||||
};
|
||||
|
||||
static Mtx logo_projection = {
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0xFFFF0000, 0x00000000, 0x00000001,
|
||||
0x00CC0000, 0x00000000, 0x000000F9, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x0000007C, 0x00000000
|
||||
};
|
||||
|
||||
static Mtx logo_model_scale = {
|
||||
0x10000, 0x00000, 0x00001, 0x00000,
|
||||
0x00000, 0x10000, 0x00000, 0x00001,
|
||||
0x00000, 0x00000, 0x00000, 0x00000,
|
||||
0x00000, 0x00000, 0x00000, 0x00000
|
||||
};
|
||||
|
||||
static Gfx initial_dl[] = {
|
||||
gsDPSetScissor(G_SC_NON_INTERLACE, 0, 0, 640, 480),
|
||||
gsSPClipRatio(FRUSTRATIO_2),
|
||||
gsSPViewport(&viewport),
|
||||
gsSPMatrix(&projection, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION),
|
||||
gsSPMatrix(&lookat, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION),
|
||||
gsSPMatrix(&default_model_scale, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW),
|
||||
gsDPSetOtherMode(G_AD_DISABLE | G_CD_DISABLE | G_CK_NONE | G_TC_FILT | G_TF_BILERP | G_TT_NONE | G_TL_TILE | G_TD_CLAMP | G_TP_PERSP | G_CYC_1CYCLE | G_PM_NPRIMITIVE, G_AC_NONE | G_ZS_PIXEL | G_RM_NOOP | G_RM_NOOP2),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
static Gfx logo_initial_dl[] = {
|
||||
gsDPSetScissor(G_SC_NON_INTERLACE, 0, 0, 640, 480),
|
||||
gsSPClipRatio(FRUSTRATIO_2),
|
||||
gsSPViewport(&viewport),
|
||||
gsSPMatrix(&logo_projection, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION),
|
||||
gsSPMatrix(&lookat, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION),
|
||||
gsSPMatrix(&default_model_scale, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW),
|
||||
gsDPSetOtherMode(G_AD_DISABLE | G_CD_DISABLE | G_CK_NONE | G_TC_FILT | G_TF_BILERP | G_TT_NONE | G_TL_TILE | G_TD_CLAMP | G_TP_PERSP | G_CYC_1CYCLE | G_PM_NPRIMITIVE, G_AC_NONE | G_ZS_PIXEL | G_RM_NOOP | G_RM_NOOP2),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
static Gfx logo_draw_dl[] = {
|
||||
gsSPDisplayList(logo_initial_dl),
|
||||
gsSPDisplayList(gam_win1_moji_setup),
|
||||
gsDPSetPrimColor(0, 255, 220, 0, 0, 255),
|
||||
gsSPMatrix(&logo_model_scale, G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW),
|
||||
gsSPDisplayList(logo_ninT_model),
|
||||
gsSPPopMatrix(G_MTX_MODELVIEW),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
static Gfx step1_draw_dl[] = {
|
||||
gsSPDisplayList(initial_dl),
|
||||
gsSPDisplayList(gam_win1_moji_setup),
|
||||
gsSPDisplayList(gam_win1_winT_model),
|
||||
gsSPDisplayList(gam_win1_moji_model),
|
||||
gsDPSetPrimColor(0, 255, 90, 90, 155, 255),
|
||||
gsSPDisplayList(0x08000000),
|
||||
gsDPSetPrimColor(0, 255, 50, 30, 150, 255),
|
||||
gsSPDisplayList(0x09000000),
|
||||
gsSPDisplayList(gam_win1_cursor_setup),
|
||||
gsSPMatrix(&model_cursor, G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW),
|
||||
gsSPDisplayList(gam_win1_cursor_model),
|
||||
gsSPPopMatrix(G_MTX_MODELVIEW),
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
static Gfx step2_draw_dl[] = {
|
||||
gsSPDisplayList(initial_dl), /* call initial dl */
|
||||
gsSPDisplayList(gam_win1_moji_setup), /* call gam_win1_moji_setup */
|
||||
gsDPSetPrimColor(0, 255, 225, 255, 255, 255), /* set primitive color to off-white */
|
||||
gsSPDisplayList(gam_win2_winT_model), /* call gam_win2_winT_model */
|
||||
gsDPSetPrimColor(0, 255, 50, 50, 60, 255), /* set primitive color to dark blue-gray */
|
||||
gsSPDisplayList(0x08000000), /* call progressive mode model set in step2_make_dl */
|
||||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
static int pad_good_frame_count = -1;
|
||||
|
||||
static void step0_make_dl(Gfx** gpp) {
|
||||
Gfx* g = *gpp;
|
||||
|
||||
if (APPNMI_TESTMODE_GET()) {
|
||||
DVDDiskID* diskId = DVDGetCurrentDiskID();
|
||||
if (boot_copyDate != NULL) {
|
||||
JW_JUTReport(150, 400, 1, "COPYDATE: %.17s", boot_copyDate);
|
||||
}
|
||||
|
||||
if (diskId != NULL) {
|
||||
JW_JUTReport(150, 330, 1, "<DISK ID>");
|
||||
JW_JUTReport(150, 342, 1, "GAMENAME: %.4s", diskId->gameName);
|
||||
JW_JUTReport(150, 354, 1, " COMPANY: %.2s", diskId->company);
|
||||
JW_JUTReport(150, 366, 1, " VERSION: 0x%02X(%d)", diskId->gameVersion, diskId->gameVersion);
|
||||
}
|
||||
|
||||
JW_JUTReport(150, 330, 1, "<DISK ID>"); /* I belive the above <DISK ID> is a 'bug', because this is the exact same print */
|
||||
JW_JUTReport(150, 50, 1, "SDK VERSION: 12Dec2001 Patch4");
|
||||
|
||||
if (OSGetFontEncode() == OS_FONT_SJIS) {
|
||||
JW_JUTReport(150, 100, 1, " ****** WARNING ******");
|
||||
JW_JUTReport(150, 112, 1, "The DISP SW is JAPAN MODE now");
|
||||
JW_JUTReport(150, 124, 1, "but this GAME is NES version");
|
||||
}
|
||||
}
|
||||
|
||||
if (APPNMI_SHOPPROMOVERSION_GET()) {
|
||||
JW_JUTReport(150, 410, 1, "SHOP PROMOTE VERSION");
|
||||
}
|
||||
|
||||
gSPDisplayList(g++, logo_draw_dl);
|
||||
*gpp = g;
|
||||
}
|
||||
|
||||
extern void make_dl_nintendo_logo(Gfx** gpp, u32 alpha) {
|
||||
Gfx* g = *gpp;
|
||||
|
||||
gSPSegment(g++, G_MWO_SEGMENT_8, logo_initial_dl); /* segment 8 = logo_initial_dl */
|
||||
gSPSegment(g++, G_MWO_SEGMENT_9, gam_win1_moji_setup); /* segment 9 = gam_win1_moji_setup */
|
||||
gSPDisplayList(g++, SEGMENT_ADDR(8, 0)); /* call to segment 8 (logo_initial_dl) */
|
||||
gSPDisplayList(g++, SEGMENT_ADDR(9, 0)); /* call to segment 9 (gam_win1_moji_setup) */
|
||||
gSPMatrix(g++, &logo_model_scale, G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); /* set logo model scale */
|
||||
gDPSetCombineMode(g++, G_CC_LOGO, G_CC_LOGO); /* set color combiner for logo */
|
||||
gDPSetPrimColor(g++, 0, 255, LOGO_COLOR_R, LOGO_COLOR_G, LOGO_COLOR_B, alpha); /* set logo color */
|
||||
gSPDisplayList(g++, logo_ninT_model); /* call logo display list (logo_ninT_model) */
|
||||
gSPPopMatrix(g++, G_MTX_MODELVIEW); /* remove logo model scale */
|
||||
|
||||
*gpp = g;
|
||||
}
|
||||
|
||||
static void step1_make_dl(Gfx** gpp) {
|
||||
static Gfx* yes_no_model[2] = {
|
||||
gam_win1_moji2_model,
|
||||
gam_win1_moji3_model
|
||||
};
|
||||
|
||||
Gfx* g = *gpp;
|
||||
|
||||
guTranslate(&model_cursor, progressive_mode != 0 ? -42 : 0, -86.0f, 0.0f);
|
||||
|
||||
gSPSegment(g++, G_MWO_SEGMENT_8, yes_no_model[progressive_mode]); /* segment 8 is yes/no */
|
||||
gSPSegment(g++, G_MWO_SEGMENT_9, yes_no_model[progressive_mode ^ 1]); /* segment 9 is inverse yes/no */
|
||||
gSPDisplayList(g++, step1_draw_dl); /* call step1 display list */
|
||||
|
||||
*gpp = g;
|
||||
}
|
||||
|
||||
static void step2_make_dl(Gfx** gpp) {
|
||||
Gfx* g = *gpp;
|
||||
|
||||
gSPSegment(g++, G_MWO_SEGMENT_8, progressive_mode != 0 ? gam_win2_moji_model : gam_win3_moji_model);
|
||||
gSPDisplayList(g++, step2_draw_dl);
|
||||
|
||||
*gpp = g;
|
||||
}
|
||||
|
||||
static u8 menu_step;
|
||||
|
||||
static void make_dl(Gfx* gfx, int size) {
|
||||
Gfx* g = gfx;
|
||||
|
||||
step0_make_dl(&g);
|
||||
if (menu_step == 1 || menu_step == 11) {
|
||||
step1_make_dl(&g);
|
||||
}
|
||||
else if (menu_step == 2) {
|
||||
step2_make_dl(&g);
|
||||
}
|
||||
|
||||
gDPFullSync(g++);
|
||||
gSPEndDisplayList(g++);
|
||||
}
|
||||
|
||||
extern void exec_dl(Gfx* gfx) {
|
||||
emu64_init();
|
||||
emu64_taskstart(gfx);
|
||||
emu64_cleanup();
|
||||
}
|
||||
|
||||
static Z_OSTime start_time;
|
||||
static u32 button;
|
||||
static u32 trigger;
|
||||
static int frame_count;
|
||||
static Z_OSTime limit_time;
|
||||
static int select_done;
|
||||
static u8 menu_sub_frame;
|
||||
|
||||
extern void keycheck() {
|
||||
Z_OSTime now = osGetTime();
|
||||
Z_OSTime delta = now - start_time;
|
||||
u32 t;
|
||||
u32 error;
|
||||
|
||||
JC_JUTGamePad_read();
|
||||
button = JW_JUTGamepad_getButton();
|
||||
t = JW_JUTGamepad_getTrigger();
|
||||
trigger = t;
|
||||
trigger |= (((t >> 16) | (t >> 24)) & 0xF);
|
||||
error = JW_JUTGamepad_getErrorStatus();
|
||||
|
||||
if (pad_good_frame_count < 0 && error == 0) {
|
||||
pad_good_frame_count = frame_count;
|
||||
}
|
||||
|
||||
if (menu_step == 0) {
|
||||
if ((button == B || OSGetProgressiveMode()) && VIGetDTVStatus()) {
|
||||
progressive_mode = VIGetDTVStatus();
|
||||
menu_step = 1;
|
||||
start_time = now;
|
||||
limit_time = button == B ? INITIAL_MENU_LIMIT_TIME : INITIAL_MENU_LIMIT_TIME; // 10 second limit
|
||||
}
|
||||
else {
|
||||
if (limit_time < delta) {
|
||||
menu_step = 3;
|
||||
select_done = TRUE;
|
||||
start_time = now;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (menu_step == 1) {
|
||||
if ((trigger & A) != 0 || limit_time < delta) {
|
||||
OSSetProgressiveMode(progressive_mode);
|
||||
start_time = now;
|
||||
menu_step = 11;
|
||||
menu_sub_frame = 0;
|
||||
}
|
||||
else {
|
||||
if ((trigger & DPAD_LEFT)) {
|
||||
progressive_mode = TRUE;
|
||||
start_time = now;
|
||||
limit_time = INITIAL_MENU_LIMIT_TIME;
|
||||
}
|
||||
else {
|
||||
if ((trigger & DPAD_RIGHT)) {
|
||||
progressive_mode = FALSE;
|
||||
start_time = now;
|
||||
limit_time = INITIAL_MENU_LIMIT_TIME;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (menu_step == 11) {
|
||||
switch (menu_sub_frame) {
|
||||
case 0:
|
||||
{
|
||||
JC_JFWDisplay_startFadeOut(JC_JFWDisplay_getManager(), 10);
|
||||
break;
|
||||
}
|
||||
|
||||
case 5:
|
||||
{
|
||||
JW_SetProgressiveMode(progressive_mode);
|
||||
break;
|
||||
}
|
||||
|
||||
case 105:
|
||||
{
|
||||
JC_JFWDisplay_startFadeIn(JC_JFWDisplay_getManager(), 15);
|
||||
start_time = now;
|
||||
menu_step = 2;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
menu_sub_frame++;
|
||||
}
|
||||
else {
|
||||
if (menu_step == 2 && INITIAL_MENU_SELECT_WAIT_TIME < delta) {
|
||||
menu_step = 3;
|
||||
select_done = TRUE;
|
||||
start_time = now;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static OSMessageQueue commandQ;
|
||||
static int fadeout_step;
|
||||
static int load_game_done;
|
||||
static Gfx gfxbuf[16];
|
||||
static OSMessageQueue statusQ;
|
||||
static OSThread* Thread_p;
|
||||
static void* initialMenuStack;
|
||||
static OSMessage commandMsgBuf[2];
|
||||
static OSMessage statusMsgBuf[1];
|
||||
|
||||
extern void proc(void* arg) {
|
||||
u32 msg;
|
||||
int proc_done;
|
||||
OSTimer timer;
|
||||
|
||||
osRecvMesg(&commandQ, (OSMessage*)&msg, OS_MESSAGE_BLOCK);
|
||||
progressive_mode = FALSE;
|
||||
fadeout_step = 0;
|
||||
menu_step = 0;
|
||||
select_done = FALSE;
|
||||
load_game_done = FALSE;
|
||||
start_time = osGetTime();
|
||||
limit_time = OSMicrosecondsToTicks(5000000ull);
|
||||
pad_good_frame_count = -1;
|
||||
frame_count = 0;
|
||||
|
||||
do {
|
||||
if (OSGetResetSwitchState()) {
|
||||
__osResetSwitchPressed = TRUE;
|
||||
}
|
||||
else {
|
||||
if (__osResetSwitchPressed) {
|
||||
osShutdownStart(OS_RESET_RESTART);
|
||||
}
|
||||
}
|
||||
|
||||
if (!osRecvMesg(&commandQ, (OSMessage*)&msg, OS_MESSAGE_NOBLOCK)) {
|
||||
if (msg == INITIAL_MENU_OSMESG_FADEOUT_STEP) {
|
||||
fadeout_step = 2;
|
||||
}
|
||||
|
||||
if (msg == INITIAL_MENU_OSMESG_LOAD_GAME_DONE) {
|
||||
load_game_done = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
if (fadeout_step == 0 && select_done && load_game_done) {
|
||||
fadeout_step = 1;
|
||||
osSetTimer(&timer, OSMicrosecondsToTicks(533312ull), 0, &commandQ, (OSMessage)INITIAL_MENU_OSMESG_FADEOUT_STEP);
|
||||
JC_JFWDisplay_startFadeOut(JC_JFWDisplay_getManager(), 32);
|
||||
}
|
||||
|
||||
if ((menu_step != 0 && menu_step != 3) || dvderr_draw() == FALSE) {
|
||||
JW_BeginFrame();
|
||||
keycheck();
|
||||
make_dl(gfxbuf, 16);
|
||||
exec_dl(gfxbuf);
|
||||
JW_EndFrame();
|
||||
frame_count++;
|
||||
}
|
||||
|
||||
proc_done = FALSE;
|
||||
if (fadeout_step == 2 && select_done && load_game_done) {
|
||||
proc_done = TRUE;
|
||||
}
|
||||
} while (!proc_done);
|
||||
|
||||
osSendMesg(&statusQ, (OSMessage)msg, OS_MESSAGE_NOBLOCK); // signal done
|
||||
}
|
||||
|
||||
static void* my_alloc(size_t size) {
|
||||
return JW_Alloc(size, 32);
|
||||
}
|
||||
|
||||
static void my_free(void* ptr) {
|
||||
JW_Free(ptr);
|
||||
}
|
||||
|
||||
extern void initial_menu_init() {
|
||||
Thread_p = (OSThread*)my_alloc(sizeof(OSThread));
|
||||
initialMenuStack = my_alloc(INITIAL_MENU_STACK_SIZE);
|
||||
if (Thread_p == NULL || initialMenuStack == NULL) {
|
||||
OSReport("initial_menu_init: Memory insufficiency.\n");
|
||||
my_free(Thread_p);
|
||||
Thread_p = NULL;
|
||||
my_free(initialMenuStack);
|
||||
initialMenuStack = NULL;
|
||||
}
|
||||
else {
|
||||
osCreateMesgQueue(&commandQ, commandMsgBuf, 2);
|
||||
osCreateMesgQueue(&statusQ, statusMsgBuf, 1);
|
||||
osCreateThread2(Thread_p, 1, &proc, NULL, (void*)((int)initialMenuStack + INITIAL_MENU_STACK_SIZE), INITIAL_MENU_STACK_SIZE, 1);
|
||||
osStartThread(Thread_p);
|
||||
JC_JFWDisplay_startFadeIn(JC_JFWDisplay_getManager(), 32);
|
||||
osSendMesg(&commandQ, (OSMessage)INITIAL_MENU_OSMESG_INIT_DONE, OS_MESSAGE_NOBLOCK);
|
||||
}
|
||||
}
|
||||
|
||||
extern void initial_menu_cleanup() {
|
||||
int msg;
|
||||
|
||||
if (Thread_p != NULL) {
|
||||
if (!osRecvMesg(&commandQ, (OSMessage*)&msg, OS_MESSAGE_NOBLOCK)) {
|
||||
osSendMesg(&commandQ, (OSMessage)INITIAL_MENU_OSMESG_LOAD_GAME_DONE, OS_MESSAGE_NOBLOCK);
|
||||
osRecvMesg(&statusQ, (OSMessage*)&msg, OS_MESSAGE_BLOCK);
|
||||
}
|
||||
|
||||
osDestroyThread(Thread_p);
|
||||
}
|
||||
|
||||
JW_SetLogoMode(0);
|
||||
JC_JFWDisplay_startFadeIn(JC_JFWDisplay_getManager(), 32);
|
||||
my_free(Thread_p);
|
||||
Thread_p = NULL;
|
||||
my_free(initialMenuStack);
|
||||
initialMenuStack = NULL;
|
||||
}
|
||||
Reference in New Issue
Block a user