From 26565f76f96d520b7b208ebb91a185c06a963a65 Mon Sep 17 00:00:00 2001 From: KiritoDev Date: Wed, 21 Apr 2021 23:09:03 -0500 Subject: [PATCH] [WIP] Added better text drawing and new n64 title screen --- Makefile | 2 +- actors/n64/geo.inc.c | 10 + actors/n64/geo_header.h | 13 ++ actors/n64/model.inc.c | 350 ++++++++++++++++++++++++++++++++ levels/entry.c | 2 +- levels/intro/geo.c | 29 +++ levels/intro/header.h | 16 ++ levels/intro/leveldata.c | 349 ++++++++++++++++++++++++++++++++ levels/intro/script.c | 25 ++- levels/n64logo/header.h | 11 ++ levels/n64logo/model.inc.c | 351 +++++++++++++++++++++++++++++++++ levels/scripts.c | 4 + src/game/ingame_menu.c | 110 ----------- src/game/ingame_menu.h | 35 +++- src/game/options_menu.c | 51 +++-- src/game/segment7.h | 2 + src/menu/intro_geo.c | 89 +++++++++ src/menu/intro_geo.h | 3 + src/moon/moon64.cpp | 4 +- src/moon/texts/moon-loader.cpp | 9 +- src/moon/texts/moon-loader.h | 2 +- src/moon/utils/moon-gfx.c | 78 ++++++++ src/moon/utils/moon-gfx.h | 8 + src/text/text-loader.h | 1 - src/text/txtconv.c | 2 +- 25 files changed, 1414 insertions(+), 142 deletions(-) create mode 100755 actors/n64/geo.inc.c create mode 100755 actors/n64/geo_header.h create mode 100755 actors/n64/model.inc.c create mode 100755 levels/n64logo/header.h create mode 100755 levels/n64logo/model.inc.c create mode 100644 src/moon/utils/moon-gfx.c create mode 100644 src/moon/utils/moon-gfx.h diff --git a/Makefile b/Makefile index c3c7af75..29834d10 100644 --- a/Makefile +++ b/Makefile @@ -259,7 +259,7 @@ LEVEL_DIRS := $(patsubst levels/%,%,$(dir $(wildcard levels/*/header.h))) SRC_DIRS := src src/engine src/game src/audio src/menu src/buffers actors levels bin data assets src/text src/text/libs src/pc src/pc/gfx src/pc/audio src/pc/controller src/pc/fs src/pc/fs/packtypes src/nx # Moon64 SRC Directories -SRC_DIRS += src/moon src/moon/texts +SRC_DIRS += src/moon src/moon/texts src/moon/utils # RapidJSON Library SRC_DIRS += src/moon/libs/rapidjson src/moon/libs/rapidjson/error src/moon/libs/rapidjson/internal src/moon/libs/rapidjson/msinttypes diff --git a/actors/n64/geo.inc.c b/actors/n64/geo.inc.c new file mode 100755 index 00000000..7d7b2d4c --- /dev/null +++ b/actors/n64/geo.inc.c @@ -0,0 +1,10 @@ +#include "src/game/envfx_snow.h" + +const GeoLayout n64_geo[] = { + GEO_NODE_START(), + GEO_OPEN_NODE(), + GEO_DISPLAY_LIST(LAYER_OPAQUE, n64_N_Logo_mesh), + GEO_DISPLAY_LIST(LAYER_OPAQUE, n64_material_revert_render_settings), + GEO_CLOSE_NODE(), + GEO_END(), +}; diff --git a/actors/n64/geo_header.h b/actors/n64/geo_header.h new file mode 100755 index 00000000..fbf449c3 --- /dev/null +++ b/actors/n64/geo_header.h @@ -0,0 +1,13 @@ +extern const GeoLayout n64_geo[]; +extern Vtx n64_N_Logo_mesh_vtx_0[56]; +extern Gfx n64_N_Logo_mesh_tri_0[]; +extern Vtx n64_N_Logo_mesh_vtx_1[56]; +extern Gfx n64_N_Logo_mesh_tri_1[]; +extern Vtx n64_N_Logo_mesh_vtx_2[16]; +extern Gfx n64_N_Logo_mesh_tri_2[]; +extern Vtx n64_N_Logo_mesh_vtx_3[32]; +extern Gfx n64_N_Logo_mesh_tri_3[]; + +extern Gfx n64_N_Logo_mesh[]; +extern Gfx n64_material_revert_render_settings[]; + diff --git a/actors/n64/model.inc.c b/actors/n64/model.inc.c new file mode 100755 index 00000000..29f00ede --- /dev/null +++ b/actors/n64/model.inc.c @@ -0,0 +1,350 @@ +Lights1 n64_N64_Green_lights = gdSPDefLights1( + 0x3, 0x49, 0x18, + 0x6, 0x93, 0x30, 0x28, 0x28, 0x28); + +Lights1 n64_N64_Blue_lights = gdSPDefLights1( + 0x0, 0xE, 0x54, + 0x1, 0x1D, 0xA9, 0x28, 0x28, 0x28); + +Lights1 n64_N64_Red_lights = gdSPDefLights1( + 0x7F, 0xF, 0xA, + 0xFE, 0x1F, 0x15, 0x28, 0x28, 0x28); + +Lights1 n64_N64_Yellow_lights = gdSPDefLights1( + 0x7F, 0x60, 0x0, + 0xFE, 0xC1, 0x0, 0x28, 0x28, 0x28); + +Vtx n64_N_Logo_mesh_vtx_0[56] = { + {{{106, 1, -107},0, {486, 496},{0x0, 0x4E, 0x9B, 0xFF}}}, + {{{106, 277, 106},0, {538, 496},{0x0, 0x4E, 0x9B, 0xFF}}}, + {{{277, 277, 106},0, {538, 240},{0x0, 0x4E, 0x9B, 0xFF}}}, + {{{277, 1, -107},0, {486, 240},{0x0, 0x4E, 0x9B, 0xFF}}}, + {{{277, -277, 277},0, {368, 240},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{277, 277, 277},0, {624, 240},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{106, 277, 277},0, {624, -16},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{106, -277, 277},0, {368, -16},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{106, -277, 106},0, {368, 752},{0x0, 0x0, 0x81, 0xFF}}}, + {{{106, 277, 106},0, {624, 752},{0x0, 0x0, 0x81, 0xFF}}}, + {{{277, 277, 106},0, {624, 496},{0x0, 0x0, 0x81, 0xFF}}}, + {{{277, -277, 106},0, {368, 496},{0x0, 0x0, 0x81, 0xFF}}}, + {{{-106, -277, 277},0, {368, 240},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{-106, 277, 277},0, {624, 240},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{-277, 277, 277},0, {624, -16},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{-277, -277, 277},0, {368, -16},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{-277, -277, 106},0, {368, 752},{0x0, 0x0, 0x81, 0xFF}}}, + {{{-277, 277, 106},0, {624, 752},{0x0, 0x0, 0x81, 0xFF}}}, + {{{-106, 277, 106},0, {624, 496},{0x0, 0x0, 0x81, 0xFF}}}, + {{{-106, -277, 106},0, {368, 496},{0x0, 0x0, 0x81, 0xFF}}}, + {{{277, -277, -106},0, {368, 240},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{277, 277, -106},0, {624, 240},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{106, 277, -106},0, {624, -16},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{106, -277, -106},0, {368, -16},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{106, -277, -277},0, {368, 752},{0x0, 0x0, 0x81, 0xFF}}}, + {{{106, 277, -277},0, {624, 752},{0x0, 0x0, 0x81, 0xFF}}}, + {{{277, 277, -277},0, {624, 496},{0x0, 0x0, 0x81, 0xFF}}}, + {{{277, -277, -277},0, {368, 496},{0x0, 0x0, 0x81, 0xFF}}}, + {{{-106, -277, -106},0, {368, 240},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{-106, 277, -106},0, {624, 240},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{-277, 277, -106},0, {624, -16},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{-277, -277, -106},0, {368, -16},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{-277, -277, -277},0, {368, 752},{0x0, 0x0, 0x81, 0xFF}}}, + {{{-277, 277, -277},0, {624, 752},{0x0, 0x0, 0x81, 0xFF}}}, + {{{-106, 277, -277},0, {624, 496},{0x0, 0x0, 0x81, 0xFF}}}, + {{{-106, -277, -277},0, {368, 496},{0x0, 0x0, 0x81, 0xFF}}}, + {{{107, -277, 106},0, {454, 752},{0x0, 0x0, 0x81, 0xFF}}}, + {{{-106, -2, 106},0, {505, 752},{0x0, 0x0, 0x81, 0xFF}}}, + {{{-106, 277, 106},0, {538, 496},{0x0, 0x0, 0x81, 0xFF}}}, + {{{107, 1, 106},0, {486, 496},{0x0, 0x0, 0x81, 0xFF}}}, + {{{107, 1, 277},0, {486, 240},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{-106, 277, 277},0, {538, 240},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{-106, -2, 277},0, {505, -16},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{107, -277, 277},0, {454, -16},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{-106, 1, 107},0, {486, 496},{0x0, 0x4E, 0x65, 0xFF}}}, + {{{-106, 277, -106},0, {538, 496},{0x0, 0x4E, 0x65, 0xFF}}}, + {{{-277, 277, -106},0, {538, 240},{0x0, 0x4E, 0x65, 0xFF}}}, + {{{-277, 1, 107},0, {486, 240},{0x0, 0x4E, 0x65, 0xFF}}}, + {{{-107, -277, -106},0, {454, 752},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{106, -2, -106},0, {505, 752},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{106, 277, -106},0, {538, 496},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{-107, 1, -106},0, {486, 496},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{-107, 1, -277},0, {486, 240},{0x0, 0x0, 0x81, 0xFF}}}, + {{{106, 277, -277},0, {538, 240},{0x0, 0x0, 0x81, 0xFF}}}, + {{{106, -2, -277},0, {505, -16},{0x0, 0x0, 0x81, 0xFF}}}, + {{{-107, -277, -277},0, {454, -16},{0x0, 0x0, 0x81, 0xFF}}}, +}; + +Gfx n64_N_Logo_mesh_tri_0[] = { + gsSPVertex(n64_N_Logo_mesh_vtx_0 + 0, 16, 0), + gsSP1Triangle(0, 1, 2, 0), + gsSP1Triangle(0, 2, 3, 0), + gsSP1Triangle(4, 5, 6, 0), + gsSP1Triangle(4, 6, 7, 0), + gsSP1Triangle(8, 9, 10, 0), + gsSP1Triangle(8, 10, 11, 0), + gsSP1Triangle(12, 13, 14, 0), + gsSP1Triangle(12, 14, 15, 0), + gsSPVertex(n64_N_Logo_mesh_vtx_0 + 16, 16, 0), + gsSP1Triangle(0, 1, 2, 0), + gsSP1Triangle(0, 2, 3, 0), + gsSP1Triangle(4, 5, 6, 0), + gsSP1Triangle(4, 6, 7, 0), + gsSP1Triangle(8, 9, 10, 0), + gsSP1Triangle(8, 10, 11, 0), + gsSP1Triangle(12, 13, 14, 0), + gsSP1Triangle(12, 14, 15, 0), + gsSPVertex(n64_N_Logo_mesh_vtx_0 + 32, 16, 0), + gsSP1Triangle(0, 1, 2, 0), + gsSP1Triangle(0, 2, 3, 0), + gsSP1Triangle(4, 5, 6, 0), + gsSP1Triangle(4, 6, 7, 0), + gsSP1Triangle(8, 9, 10, 0), + gsSP1Triangle(8, 10, 11, 0), + gsSP1Triangle(12, 13, 14, 0), + gsSP1Triangle(12, 14, 15, 0), + gsSPVertex(n64_N_Logo_mesh_vtx_0 + 48, 8, 0), + gsSP1Triangle(0, 1, 2, 0), + gsSP1Triangle(0, 2, 3, 0), + gsSP1Triangle(4, 5, 6, 0), + gsSP1Triangle(4, 6, 7, 0), + gsSPEndDisplayList(), +};Vtx n64_N_Logo_mesh_vtx_1[56] = { + {{{106, -277, -107},0, {454, 752},{0x81, 0x0, 0x0, 0xFF}}}, + {{{106, -2, 106},0, {505, 752},{0x81, 0x0, 0x0, 0xFF}}}, + {{{106, 277, 106},0, {538, 496},{0x81, 0x0, 0x0, 0xFF}}}, + {{{106, 1, -107},0, {486, 496},{0x81, 0x0, 0x0, 0xFF}}}, + {{{277, 1, -107},0, {486, 240},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{277, 277, 106},0, {538, 240},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{277, -2, 106},0, {505, -16},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{277, -277, -107},0, {454, -16},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{106, -277, 277},0, {368, 1008},{0x81, 0x0, 0x0, 0xFF}}}, + {{{106, 277, 277},0, {624, 1008},{0x81, 0x0, 0x0, 0xFF}}}, + {{{106, 277, 106},0, {624, 752},{0x81, 0x0, 0x0, 0xFF}}}, + {{{106, -277, 106},0, {368, 752},{0x81, 0x0, 0x0, 0xFF}}}, + {{{277, -277, 106},0, {368, 496},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{277, 277, 106},0, {624, 496},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{277, 277, 277},0, {624, 240},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{277, -277, 277},0, {368, 240},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{-277, -277, 277},0, {368, 1008},{0x81, 0x0, 0x0, 0xFF}}}, + {{{-277, 277, 277},0, {624, 1008},{0x81, 0x0, 0x0, 0xFF}}}, + {{{-277, 277, 106},0, {624, 752},{0x81, 0x0, 0x0, 0xFF}}}, + {{{-277, -277, 106},0, {368, 752},{0x81, 0x0, 0x0, 0xFF}}}, + {{{-106, -277, 106},0, {368, 496},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{-106, 277, 106},0, {624, 496},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{-106, 277, 277},0, {624, 240},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{-106, -277, 277},0, {368, 240},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{106, -277, -106},0, {368, 1008},{0x81, 0x0, 0x0, 0xFF}}}, + {{{106, 277, -106},0, {624, 1008},{0x81, 0x0, 0x0, 0xFF}}}, + {{{106, 277, -277},0, {624, 752},{0x81, 0x0, 0x0, 0xFF}}}, + {{{106, -277, -277},0, {368, 752},{0x81, 0x0, 0x0, 0xFF}}}, + {{{277, -277, -277},0, {368, 496},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{277, 277, -277},0, {624, 496},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{277, 277, -106},0, {624, 240},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{277, -277, -106},0, {368, 240},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{-277, -277, -106},0, {368, 1008},{0x81, 0x0, 0x0, 0xFF}}}, + {{{-277, 277, -106},0, {624, 1008},{0x81, 0x0, 0x0, 0xFF}}}, + {{{-277, 277, -277},0, {624, 752},{0x81, 0x0, 0x0, 0xFF}}}, + {{{-277, -277, -277},0, {368, 752},{0x81, 0x0, 0x0, 0xFF}}}, + {{{-106, -277, -277},0, {368, 496},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{-106, 277, -277},0, {624, 496},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{-106, 277, -106},0, {624, 240},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{-106, -277, -106},0, {368, 240},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{107, -277, 277},0, {454, 1008},{0x9B, 0xB2, 0x0, 0xFF}}}, + {{{-106, -2, 277},0, {505, 1008},{0x9B, 0xB2, 0x0, 0xFF}}}, + {{{-106, -2, 106},0, {505, 752},{0x9B, 0xB2, 0x0, 0xFF}}}, + {{{107, -277, 106},0, {454, 752},{0x9B, 0xB2, 0x0, 0xFF}}}, + {{{-106, -277, 107},0, {454, 752},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{-106, -2, -106},0, {505, 752},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{-106, 277, -106},0, {538, 496},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{-106, 1, 107},0, {486, 496},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{-277, 1, 107},0, {486, 240},{0x81, 0x0, 0x0, 0xFF}}}, + {{{-277, 277, -106},0, {538, 240},{0x81, 0x0, 0x0, 0xFF}}}, + {{{-277, -2, -106},0, {505, -16},{0x81, 0x0, 0x0, 0xFF}}}, + {{{-277, -277, 107},0, {454, -16},{0x81, 0x0, 0x0, 0xFF}}}, + {{{-107, -277, -277},0, {454, 1008},{0x65, 0xB2, 0x0, 0xFF}}}, + {{{106, -2, -277},0, {505, 1008},{0x65, 0xB2, 0x0, 0xFF}}}, + {{{106, -2, -106},0, {505, 752},{0x65, 0xB2, 0x0, 0xFF}}}, + {{{-107, -277, -106},0, {454, 752},{0x65, 0xB2, 0x0, 0xFF}}}, +}; + +Gfx n64_N_Logo_mesh_tri_1[] = { + gsSPVertex(n64_N_Logo_mesh_vtx_1 + 0, 16, 0), + gsSP1Triangle(0, 1, 2, 0), + gsSP1Triangle(0, 2, 3, 0), + gsSP1Triangle(4, 5, 6, 0), + gsSP1Triangle(4, 6, 7, 0), + gsSP1Triangle(8, 9, 10, 0), + gsSP1Triangle(8, 10, 11, 0), + gsSP1Triangle(12, 13, 14, 0), + gsSP1Triangle(12, 14, 15, 0), + gsSPVertex(n64_N_Logo_mesh_vtx_1 + 16, 16, 0), + gsSP1Triangle(0, 1, 2, 0), + gsSP1Triangle(0, 2, 3, 0), + gsSP1Triangle(4, 5, 6, 0), + gsSP1Triangle(4, 6, 7, 0), + gsSP1Triangle(8, 9, 10, 0), + gsSP1Triangle(8, 10, 11, 0), + gsSP1Triangle(12, 13, 14, 0), + gsSP1Triangle(12, 14, 15, 0), + gsSPVertex(n64_N_Logo_mesh_vtx_1 + 32, 16, 0), + gsSP1Triangle(0, 1, 2, 0), + gsSP1Triangle(0, 2, 3, 0), + gsSP1Triangle(4, 5, 6, 0), + gsSP1Triangle(4, 6, 7, 0), + gsSP1Triangle(8, 9, 10, 0), + gsSP1Triangle(8, 10, 11, 0), + gsSP1Triangle(12, 13, 14, 0), + gsSP1Triangle(12, 14, 15, 0), + gsSPVertex(n64_N_Logo_mesh_vtx_1 + 48, 8, 0), + gsSP1Triangle(0, 1, 2, 0), + gsSP1Triangle(0, 2, 3, 0), + gsSP1Triangle(4, 5, 6, 0), + gsSP1Triangle(4, 6, 7, 0), + gsSPEndDisplayList(), +};Vtx n64_N_Logo_mesh_vtx_2[16] = { + {{{277, -277, -107},0, {454, 1008},{0x0, 0xB2, 0x65, 0xFF}}}, + {{{277, -2, 106},0, {505, 1008},{0x0, 0xB2, 0x65, 0xFF}}}, + {{{106, -2, 106},0, {505, 752},{0x0, 0xB2, 0x65, 0xFF}}}, + {{{106, -277, -107},0, {454, 752},{0x0, 0xB2, 0x65, 0xFF}}}, + {{{107, 1, 106},0, {486, 496},{0x65, 0x4E, 0x0, 0xFF}}}, + {{{-106, 277, 106},0, {538, 496},{0x65, 0x4E, 0x0, 0xFF}}}, + {{{-106, 277, 277},0, {538, 240},{0x65, 0x4E, 0x0, 0xFF}}}, + {{{107, 1, 277},0, {486, 240},{0x65, 0x4E, 0x0, 0xFF}}}, + {{{-277, -277, 107},0, {454, 1008},{0x0, 0xB2, 0x9B, 0xFF}}}, + {{{-277, -2, -106},0, {505, 1008},{0x0, 0xB2, 0x9B, 0xFF}}}, + {{{-106, -2, -106},0, {505, 752},{0x0, 0xB2, 0x9B, 0xFF}}}, + {{{-106, -277, 107},0, {454, 752},{0x0, 0xB2, 0x9B, 0xFF}}}, + {{{-107, 1, -106},0, {486, 496},{0x9B, 0x4E, 0x0, 0xFF}}}, + {{{106, 277, -106},0, {538, 496},{0x9B, 0x4E, 0x0, 0xFF}}}, + {{{106, 277, -277},0, {538, 240},{0x9B, 0x4E, 0x0, 0xFF}}}, + {{{-107, 1, -277},0, {486, 240},{0x9B, 0x4E, 0x0, 0xFF}}}, +}; + +Gfx n64_N_Logo_mesh_tri_2[] = { + gsSPVertex(n64_N_Logo_mesh_vtx_2 + 0, 16, 0), + gsSP1Triangle(0, 1, 2, 0), + gsSP1Triangle(0, 2, 3, 0), + gsSP1Triangle(4, 5, 6, 0), + gsSP1Triangle(4, 6, 7, 0), + gsSP1Triangle(8, 9, 10, 0), + gsSP1Triangle(8, 10, 11, 0), + gsSP1Triangle(12, 13, 14, 0), + gsSP1Triangle(12, 14, 15, 0), + gsSPEndDisplayList(), +};Vtx n64_N_Logo_mesh_vtx_3[32] = { + {{{277, 277, 106},0, {624, 496},{0x0, 0x7F, 0x0, 0xFF}}}, + {{{106, 277, 106},0, {880, 496},{0x0, 0x7F, 0x0, 0xFF}}}, + {{{106, 277, 277},0, {880, 240},{0x0, 0x7F, 0x0, 0xFF}}}, + {{{277, 277, 277},0, {624, 240},{0x0, 0x7F, 0x0, 0xFF}}}, + {{{106, -277, 106},0, {112, 496},{0x0, 0x81, 0x0, 0xFF}}}, + {{{277, -277, 106},0, {368, 496},{0x0, 0x81, 0x0, 0xFF}}}, + {{{277, -277, 277},0, {368, 240},{0x0, 0x81, 0x0, 0xFF}}}, + {{{106, -277, 277},0, {112, 240},{0x0, 0x81, 0x0, 0xFF}}}, + {{{-106, 277, 106},0, {624, 496},{0x0, 0x7F, 0x0, 0xFF}}}, + {{{-277, 277, 106},0, {880, 496},{0x0, 0x7F, 0x0, 0xFF}}}, + {{{-277, 277, 277},0, {880, 240},{0x0, 0x7F, 0x0, 0xFF}}}, + {{{-106, 277, 277},0, {624, 240},{0x0, 0x7F, 0x0, 0xFF}}}, + {{{-277, -277, 106},0, {112, 496},{0x0, 0x81, 0x0, 0xFF}}}, + {{{-106, -277, 106},0, {368, 496},{0x0, 0x81, 0x0, 0xFF}}}, + {{{-106, -277, 277},0, {368, 240},{0x0, 0x81, 0x0, 0xFF}}}, + {{{-277, -277, 277},0, {112, 240},{0x0, 0x81, 0x0, 0xFF}}}, + {{{277, 277, -277},0, {624, 496},{0x0, 0x7F, 0x0, 0xFF}}}, + {{{106, 277, -277},0, {880, 496},{0x0, 0x7F, 0x0, 0xFF}}}, + {{{106, 277, -106},0, {880, 240},{0x0, 0x7F, 0x0, 0xFF}}}, + {{{277, 277, -106},0, {624, 240},{0x0, 0x7F, 0x0, 0xFF}}}, + {{{106, -277, -277},0, {112, 496},{0x0, 0x81, 0x0, 0xFF}}}, + {{{277, -277, -277},0, {368, 496},{0x0, 0x81, 0x0, 0xFF}}}, + {{{277, -277, -106},0, {368, 240},{0x0, 0x81, 0x0, 0xFF}}}, + {{{106, -277, -106},0, {112, 240},{0x0, 0x81, 0x0, 0xFF}}}, + {{{-106, 277, -277},0, {624, 496},{0x0, 0x7F, 0x0, 0xFF}}}, + {{{-277, 277, -277},0, {880, 496},{0x0, 0x7F, 0x0, 0xFF}}}, + {{{-277, 277, -106},0, {880, 240},{0x0, 0x7F, 0x0, 0xFF}}}, + {{{-106, 277, -106},0, {624, 240},{0x0, 0x7F, 0x0, 0xFF}}}, + {{{-277, -277, -277},0, {112, 496},{0x0, 0x81, 0x0, 0xFF}}}, + {{{-106, -277, -277},0, {368, 496},{0x0, 0x81, 0x0, 0xFF}}}, + {{{-106, -277, -106},0, {368, 240},{0x0, 0x81, 0x0, 0xFF}}}, + {{{-277, -277, -106},0, {112, 240},{0x0, 0x81, 0x0, 0xFF}}}, +}; + +Gfx n64_N_Logo_mesh_tri_3[] = { + gsSPVertex(n64_N_Logo_mesh_vtx_3 + 0, 16, 0), + gsSP1Triangle(0, 1, 2, 0), + gsSP1Triangle(0, 2, 3, 0), + gsSP1Triangle(4, 5, 6, 0), + gsSP1Triangle(4, 6, 7, 0), + gsSP1Triangle(8, 9, 10, 0), + gsSP1Triangle(8, 10, 11, 0), + gsSP1Triangle(12, 13, 14, 0), + gsSP1Triangle(12, 14, 15, 0), + gsSPVertex(n64_N_Logo_mesh_vtx_3 + 16, 16, 0), + gsSP1Triangle(0, 1, 2, 0), + gsSP1Triangle(0, 2, 3, 0), + gsSP1Triangle(4, 5, 6, 0), + gsSP1Triangle(4, 6, 7, 0), + gsSP1Triangle(8, 9, 10, 0), + gsSP1Triangle(8, 10, 11, 0), + gsSP1Triangle(12, 13, 14, 0), + gsSP1Triangle(12, 14, 15, 0), + gsSPEndDisplayList(), +}; + + +Gfx mat_n64_N64_Green[] = { + gsDPPipeSync(), + gsDPSetCombineLERP(0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT, 0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT), + gsSPTexture(65535, 65535, 0, 0, 1), + gsSPSetLights1(n64_N64_Green_lights), + gsSPEndDisplayList(), +}; + + +Gfx mat_n64_N64_Blue[] = { + gsDPPipeSync(), + gsDPSetCombineLERP(0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT, 0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT), + gsSPTexture(65535, 65535, 0, 0, 1), + gsSPSetLights1(n64_N64_Blue_lights), + gsSPEndDisplayList(), +}; + + +Gfx mat_n64_N64_Red[] = { + gsDPPipeSync(), + gsDPSetCombineLERP(0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT, 0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT), + gsSPTexture(65535, 65535, 0, 0, 1), + gsSPSetLights1(n64_N64_Red_lights), + gsSPEndDisplayList(), +}; + + +Gfx mat_n64_N64_Yellow[] = { + gsDPPipeSync(), + gsDPSetCombineLERP(0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT, 0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT), + gsSPTexture(65535, 65535, 0, 0, 1), + gsSPSetLights1(n64_N64_Yellow_lights), + gsSPEndDisplayList(), +}; + + +Gfx n64_N_Logo_mesh[] = { + gsSPDisplayList(mat_n64_N64_Green), + gsSPDisplayList(n64_N_Logo_mesh_tri_0), + gsSPDisplayList(mat_n64_N64_Blue), + gsSPDisplayList(n64_N_Logo_mesh_tri_1), + gsSPDisplayList(mat_n64_N64_Red), + gsSPDisplayList(n64_N_Logo_mesh_tri_2), + gsSPDisplayList(mat_n64_N64_Yellow), + gsSPDisplayList(n64_N_Logo_mesh_tri_3), + gsSPEndDisplayList(), +}; + + + +Gfx n64_material_revert_render_settings[] = { + gsDPPipeSync(), + gsSPSetGeometryMode(G_LIGHTING), + gsSPClearGeometryMode(G_TEXTURE_GEN), + gsDPSetCombineLERP(0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT, 0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT), + gsSPTexture(65535, 65535, 0, 0, 0), + gsDPSetEnvColor(255, 255, 255, 255), + gsDPSetAlphaCompare(G_AC_NONE), + gsSPEndDisplayList(), +}; diff --git a/levels/entry.c b/levels/entry.c index 015eeb6b..7ce455ba 100644 --- a/levels/entry.c +++ b/levels/entry.c @@ -12,6 +12,6 @@ const LevelScript level_script_entry[] = { SLEEP(/*frames*/ 2), BLACKOUT(/*active*/ FALSE), SET_REG(/*value*/ 0), - EXECUTE(/*seg*/ 0x14, /*script*/ _introSegmentRomStart, /*scriptEnd*/ _introSegmentRomEnd, /*entry*/ level_intro_entry_1), + EXECUTE(/*seg*/ 0x14, /*script*/ _introSegmentRomStart, /*scriptEnd*/ _introSegmentRomEnd, /*entry*/ level_intro_n64), JUMP(/*target*/ level_script_entry), }; diff --git a/levels/intro/geo.c b/levels/intro/geo.c index 8ac70024..62fb97b2 100644 --- a/levels/intro/geo.c +++ b/levels/intro/geo.c @@ -15,6 +15,35 @@ #include "levels/intro/header.h" +// 0x0E0002D0 +const GeoLayout intro_n64_geo[] = { + GEO_NODE_SCREEN_AREA(0, SCREEN_WIDTH/2, SCREEN_HEIGHT/2, SCREEN_WIDTH/2, SCREEN_HEIGHT/2), + GEO_OPEN_NODE(), + GEO_ZBUFFER(0), + GEO_OPEN_NODE(), + GEO_NODE_ORTHO(100), + GEO_OPEN_NODE(), + GEO_BACKGROUND_COLOR(0x0001), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_ZBUFFER(1), + GEO_OPEN_NODE(), + GEO_CAMERA_FRUSTUM(45, 128, 16384), + GEO_OPEN_NODE(), + GEO_CAMERA(0, 0, 0, 3200, 0, 0, 0, 0x00000000), + GEO_OPEN_NODE(), + GEO_ASM(0, geo_n64_screen), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_ZBUFFER(0), + GEO_OPEN_NODE(), + GEO_ASM(0, geo_fade_transition), + GEO_CLOSE_NODE(), + GEO_CLOSE_NODE(), + GEO_END(), +}; + // 0x0E0002D0 const GeoLayout intro_geo_0002D0[] = { GEO_NODE_SCREEN_AREA(0, SCREEN_WIDTH/2, SCREEN_HEIGHT/2, SCREEN_WIDTH/2, SCREEN_HEIGHT/2), diff --git a/levels/intro/header.h b/levels/intro/header.h index 2fc66c03..23734846 100644 --- a/levels/intro/header.h +++ b/levels/intro/header.h @@ -36,4 +36,20 @@ extern const LevelScript script_intro_L3[]; extern const LevelScript script_intro_L4[]; extern const LevelScript script_intro_L5[]; +// Start Logo +extern const GeoLayout intro_n64_geo[]; +extern const LevelScript level_intro_n64[]; + +extern Vtx n64logo_N64_mesh_vtx_0[56]; +extern Gfx n64logo_N64_mesh_tri_0[]; +extern Vtx n64logo_N64_mesh_vtx_1[56]; +extern Gfx n64logo_N64_mesh_tri_1[]; +extern Vtx n64logo_N64_mesh_vtx_2[16]; +extern Gfx n64logo_N64_mesh_tri_2[]; +extern Vtx n64logo_N64_mesh_vtx_3[32]; +extern Gfx n64logo_N64_mesh_tri_3[]; + +extern Gfx n64logo_N64_mesh[]; +// End Logo + #endif diff --git a/levels/intro/leveldata.c b/levels/intro/leveldata.c index 530538a3..b26c2e72 100644 --- a/levels/intro/leveldata.c +++ b/levels/intro/leveldata.c @@ -5903,3 +5903,352 @@ const f32 intro_seg7_table_0700C880[] = { 0.048600f, 0.048600f, 0.012800f, 0.012800f, 0.012800f, 0.000000f, 0.000000f, 0.000000f, }; + + +Lights1 n64logo_N64_Green_lights = gdSPDefLights1( + 0x3, 0x49, 0x18, + 0x6, 0x93, 0x30, 0x28, 0x28, 0x28); + +Lights1 n64logo_N64_Blue_lights = gdSPDefLights1( + 0x0, 0xE, 0x54, + 0x1, 0x1D, 0xA9, 0x28, 0x28, 0x28); + +Lights1 n64logo_N64_Red_lights = gdSPDefLights1( + 0x7F, 0xF, 0xA, + 0xFE, 0x1F, 0x15, 0x28, 0x28, 0x28); + +Lights1 n64logo_N64_Yellow_lights = gdSPDefLights1( + 0x7F, 0x60, 0x0, + 0xFE, 0xC1, 0x0, 0x28, 0x28, 0x28); + +Vtx n64logo_N64_mesh_vtx_0[56] = { + {{{106, 1, -107},0, {486, 496},{0x0, 0x4E, 0x9B, 0xFF}}}, + {{{106, 277, 106},0, {538, 496},{0x0, 0x4E, 0x9B, 0xFF}}}, + {{{277, 277, 106},0, {538, 240},{0x0, 0x4E, 0x9B, 0xFF}}}, + {{{277, 1, -107},0, {486, 240},{0x0, 0x4E, 0x9B, 0xFF}}}, + {{{277, -277, 277},0, {368, 240},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{277, 277, 277},0, {624, 240},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{106, 277, 277},0, {624, -16},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{106, -277, 277},0, {368, -16},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{106, -277, 106},0, {368, 752},{0x0, 0x0, 0x81, 0xFF}}}, + {{{106, 277, 106},0, {624, 752},{0x0, 0x0, 0x81, 0xFF}}}, + {{{277, 277, 106},0, {624, 496},{0x0, 0x0, 0x81, 0xFF}}}, + {{{277, -277, 106},0, {368, 496},{0x0, 0x0, 0x81, 0xFF}}}, + {{{-106, -277, 277},0, {368, 240},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{-106, 277, 277},0, {624, 240},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{-277, 277, 277},0, {624, -16},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{-277, -277, 277},0, {368, -16},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{-277, -277, 106},0, {368, 752},{0x0, 0x0, 0x81, 0xFF}}}, + {{{-277, 277, 106},0, {624, 752},{0x0, 0x0, 0x81, 0xFF}}}, + {{{-106, 277, 106},0, {624, 496},{0x0, 0x0, 0x81, 0xFF}}}, + {{{-106, -277, 106},0, {368, 496},{0x0, 0x0, 0x81, 0xFF}}}, + {{{277, -277, -106},0, {368, 240},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{277, 277, -106},0, {624, 240},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{106, 277, -106},0, {624, -16},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{106, -277, -106},0, {368, -16},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{106, -277, -277},0, {368, 752},{0x0, 0x0, 0x81, 0xFF}}}, + {{{106, 277, -277},0, {624, 752},{0x0, 0x0, 0x81, 0xFF}}}, + {{{277, 277, -277},0, {624, 496},{0x0, 0x0, 0x81, 0xFF}}}, + {{{277, -277, -277},0, {368, 496},{0x0, 0x0, 0x81, 0xFF}}}, + {{{-106, -277, -106},0, {368, 240},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{-106, 277, -106},0, {624, 240},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{-277, 277, -106},0, {624, -16},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{-277, -277, -106},0, {368, -16},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{-277, -277, -277},0, {368, 752},{0x0, 0x0, 0x81, 0xFF}}}, + {{{-277, 277, -277},0, {624, 752},{0x0, 0x0, 0x81, 0xFF}}}, + {{{-106, 277, -277},0, {624, 496},{0x0, 0x0, 0x81, 0xFF}}}, + {{{-106, -277, -277},0, {368, 496},{0x0, 0x0, 0x81, 0xFF}}}, + {{{107, -277, 106},0, {454, 752},{0x0, 0x0, 0x81, 0xFF}}}, + {{{-106, -2, 106},0, {505, 752},{0x0, 0x0, 0x81, 0xFF}}}, + {{{-106, 277, 106},0, {538, 496},{0x0, 0x0, 0x81, 0xFF}}}, + {{{107, 1, 106},0, {486, 496},{0x0, 0x0, 0x81, 0xFF}}}, + {{{107, 1, 277},0, {486, 240},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{-106, 277, 277},0, {538, 240},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{-106, -2, 277},0, {505, -16},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{107, -277, 277},0, {454, -16},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{-106, 1, 107},0, {486, 496},{0x0, 0x4E, 0x65, 0xFF}}}, + {{{-106, 277, -106},0, {538, 496},{0x0, 0x4E, 0x65, 0xFF}}}, + {{{-277, 277, -106},0, {538, 240},{0x0, 0x4E, 0x65, 0xFF}}}, + {{{-277, 1, 107},0, {486, 240},{0x0, 0x4E, 0x65, 0xFF}}}, + {{{-107, -277, -106},0, {454, 752},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{106, -2, -106},0, {505, 752},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{106, 277, -106},0, {538, 496},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{-107, 1, -106},0, {486, 496},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{-107, 1, -277},0, {486, 240},{0x0, 0x0, 0x81, 0xFF}}}, + {{{106, 277, -277},0, {538, 240},{0x0, 0x0, 0x81, 0xFF}}}, + {{{106, -2, -277},0, {505, -16},{0x0, 0x0, 0x81, 0xFF}}}, + {{{-107, -277, -277},0, {454, -16},{0x0, 0x0, 0x81, 0xFF}}}, +}; + +Gfx n64logo_N64_mesh_tri_0[] = { + gsSPVertex(n64logo_N64_mesh_vtx_0 + 0, 16, 0), + gsSP1Triangle(0, 1, 2, 0), + gsSP1Triangle(0, 2, 3, 0), + gsSP1Triangle(4, 5, 6, 0), + gsSP1Triangle(4, 6, 7, 0), + gsSP1Triangle(8, 9, 10, 0), + gsSP1Triangle(8, 10, 11, 0), + gsSP1Triangle(12, 13, 14, 0), + gsSP1Triangle(12, 14, 15, 0), + gsSPVertex(n64logo_N64_mesh_vtx_0 + 16, 16, 0), + gsSP1Triangle(0, 1, 2, 0), + gsSP1Triangle(0, 2, 3, 0), + gsSP1Triangle(4, 5, 6, 0), + gsSP1Triangle(4, 6, 7, 0), + gsSP1Triangle(8, 9, 10, 0), + gsSP1Triangle(8, 10, 11, 0), + gsSP1Triangle(12, 13, 14, 0), + gsSP1Triangle(12, 14, 15, 0), + gsSPVertex(n64logo_N64_mesh_vtx_0 + 32, 16, 0), + gsSP1Triangle(0, 1, 2, 0), + gsSP1Triangle(0, 2, 3, 0), + gsSP1Triangle(4, 5, 6, 0), + gsSP1Triangle(4, 6, 7, 0), + gsSP1Triangle(8, 9, 10, 0), + gsSP1Triangle(8, 10, 11, 0), + gsSP1Triangle(12, 13, 14, 0), + gsSP1Triangle(12, 14, 15, 0), + gsSPVertex(n64logo_N64_mesh_vtx_0 + 48, 8, 0), + gsSP1Triangle(0, 1, 2, 0), + gsSP1Triangle(0, 2, 3, 0), + gsSP1Triangle(4, 5, 6, 0), + gsSP1Triangle(4, 6, 7, 0), + gsSPEndDisplayList(), +}; + +Vtx n64logo_N64_mesh_vtx_1[56] = { + {{{106, -277, -107},0, {454, 752},{0x81, 0x0, 0x0, 0xFF}}}, + {{{106, -2, 106},0, {505, 752},{0x81, 0x0, 0x0, 0xFF}}}, + {{{106, 277, 106},0, {538, 496},{0x81, 0x0, 0x0, 0xFF}}}, + {{{106, 1, -107},0, {486, 496},{0x81, 0x0, 0x0, 0xFF}}}, + {{{277, 1, -107},0, {486, 240},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{277, 277, 106},0, {538, 240},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{277, -2, 106},0, {505, -16},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{277, -277, -107},0, {454, -16},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{106, -277, 277},0, {368, 1008},{0x81, 0x0, 0x0, 0xFF}}}, + {{{106, 277, 277},0, {624, 1008},{0x81, 0x0, 0x0, 0xFF}}}, + {{{106, 277, 106},0, {624, 752},{0x81, 0x0, 0x0, 0xFF}}}, + {{{106, -277, 106},0, {368, 752},{0x81, 0x0, 0x0, 0xFF}}}, + {{{277, -277, 106},0, {368, 496},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{277, 277, 106},0, {624, 496},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{277, 277, 277},0, {624, 240},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{277, -277, 277},0, {368, 240},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{-277, -277, 277},0, {368, 1008},{0x81, 0x0, 0x0, 0xFF}}}, + {{{-277, 277, 277},0, {624, 1008},{0x81, 0x0, 0x0, 0xFF}}}, + {{{-277, 277, 106},0, {624, 752},{0x81, 0x0, 0x0, 0xFF}}}, + {{{-277, -277, 106},0, {368, 752},{0x81, 0x0, 0x0, 0xFF}}}, + {{{-106, -277, 106},0, {368, 496},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{-106, 277, 106},0, {624, 496},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{-106, 277, 277},0, {624, 240},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{-106, -277, 277},0, {368, 240},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{106, -277, -106},0, {368, 1008},{0x81, 0x0, 0x0, 0xFF}}}, + {{{106, 277, -106},0, {624, 1008},{0x81, 0x0, 0x0, 0xFF}}}, + {{{106, 277, -277},0, {624, 752},{0x81, 0x0, 0x0, 0xFF}}}, + {{{106, -277, -277},0, {368, 752},{0x81, 0x0, 0x0, 0xFF}}}, + {{{277, -277, -277},0, {368, 496},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{277, 277, -277},0, {624, 496},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{277, 277, -106},0, {624, 240},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{277, -277, -106},0, {368, 240},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{-277, -277, -106},0, {368, 1008},{0x81, 0x0, 0x0, 0xFF}}}, + {{{-277, 277, -106},0, {624, 1008},{0x81, 0x0, 0x0, 0xFF}}}, + {{{-277, 277, -277},0, {624, 752},{0x81, 0x0, 0x0, 0xFF}}}, + {{{-277, -277, -277},0, {368, 752},{0x81, 0x0, 0x0, 0xFF}}}, + {{{-106, -277, -277},0, {368, 496},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{-106, 277, -277},0, {624, 496},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{-106, 277, -106},0, {624, 240},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{-106, -277, -106},0, {368, 240},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{107, -277, 277},0, {454, 1008},{0x9B, 0xB2, 0x0, 0xFF}}}, + {{{-106, -2, 277},0, {505, 1008},{0x9B, 0xB2, 0x0, 0xFF}}}, + {{{-106, -2, 106},0, {505, 752},{0x9B, 0xB2, 0x0, 0xFF}}}, + {{{107, -277, 106},0, {454, 752},{0x9B, 0xB2, 0x0, 0xFF}}}, + {{{-106, -277, 107},0, {454, 752},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{-106, -2, -106},0, {505, 752},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{-106, 277, -106},0, {538, 496},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{-106, 1, 107},0, {486, 496},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{-277, 1, 107},0, {486, 240},{0x81, 0x0, 0x0, 0xFF}}}, + {{{-277, 277, -106},0, {538, 240},{0x81, 0x0, 0x0, 0xFF}}}, + {{{-277, -2, -106},0, {505, -16},{0x81, 0x0, 0x0, 0xFF}}}, + {{{-277, -277, 107},0, {454, -16},{0x81, 0x0, 0x0, 0xFF}}}, + {{{-107, -277, -277},0, {454, 1008},{0x65, 0xB2, 0x0, 0xFF}}}, + {{{106, -2, -277},0, {505, 1008},{0x65, 0xB2, 0x0, 0xFF}}}, + {{{106, -2, -106},0, {505, 752},{0x65, 0xB2, 0x0, 0xFF}}}, + {{{-107, -277, -106},0, {454, 752},{0x65, 0xB2, 0x0, 0xFF}}}, +}; + +Gfx n64logo_N64_mesh_tri_1[] = { + gsSPVertex(n64logo_N64_mesh_vtx_1 + 0, 16, 0), + gsSP1Triangle(0, 1, 2, 0), + gsSP1Triangle(0, 2, 3, 0), + gsSP1Triangle(4, 5, 6, 0), + gsSP1Triangle(4, 6, 7, 0), + gsSP1Triangle(8, 9, 10, 0), + gsSP1Triangle(8, 10, 11, 0), + gsSP1Triangle(12, 13, 14, 0), + gsSP1Triangle(12, 14, 15, 0), + gsSPVertex(n64logo_N64_mesh_vtx_1 + 16, 16, 0), + gsSP1Triangle(0, 1, 2, 0), + gsSP1Triangle(0, 2, 3, 0), + gsSP1Triangle(4, 5, 6, 0), + gsSP1Triangle(4, 6, 7, 0), + gsSP1Triangle(8, 9, 10, 0), + gsSP1Triangle(8, 10, 11, 0), + gsSP1Triangle(12, 13, 14, 0), + gsSP1Triangle(12, 14, 15, 0), + gsSPVertex(n64logo_N64_mesh_vtx_1 + 32, 16, 0), + gsSP1Triangle(0, 1, 2, 0), + gsSP1Triangle(0, 2, 3, 0), + gsSP1Triangle(4, 5, 6, 0), + gsSP1Triangle(4, 6, 7, 0), + gsSP1Triangle(8, 9, 10, 0), + gsSP1Triangle(8, 10, 11, 0), + gsSP1Triangle(12, 13, 14, 0), + gsSP1Triangle(12, 14, 15, 0), + gsSPVertex(n64logo_N64_mesh_vtx_1 + 48, 8, 0), + gsSP1Triangle(0, 1, 2, 0), + gsSP1Triangle(0, 2, 3, 0), + gsSP1Triangle(4, 5, 6, 0), + gsSP1Triangle(4, 6, 7, 0), + gsSPEndDisplayList(), +}; + +Vtx n64logo_N64_mesh_vtx_2[16] = { + {{{277, -277, -107},0, {454, 1008},{0x0, 0xB2, 0x65, 0xFF}}}, + {{{277, -2, 106},0, {505, 1008},{0x0, 0xB2, 0x65, 0xFF}}}, + {{{106, -2, 106},0, {505, 752},{0x0, 0xB2, 0x65, 0xFF}}}, + {{{106, -277, -107},0, {454, 752},{0x0, 0xB2, 0x65, 0xFF}}}, + {{{107, 1, 106},0, {486, 496},{0x65, 0x4E, 0x0, 0xFF}}}, + {{{-106, 277, 106},0, {538, 496},{0x65, 0x4E, 0x0, 0xFF}}}, + {{{-106, 277, 277},0, {538, 240},{0x65, 0x4E, 0x0, 0xFF}}}, + {{{107, 1, 277},0, {486, 240},{0x65, 0x4E, 0x0, 0xFF}}}, + {{{-277, -277, 107},0, {454, 1008},{0x0, 0xB2, 0x9B, 0xFF}}}, + {{{-277, -2, -106},0, {505, 1008},{0x0, 0xB2, 0x9B, 0xFF}}}, + {{{-106, -2, -106},0, {505, 752},{0x0, 0xB2, 0x9B, 0xFF}}}, + {{{-106, -277, 107},0, {454, 752},{0x0, 0xB2, 0x9B, 0xFF}}}, + {{{-107, 1, -106},0, {486, 496},{0x9B, 0x4E, 0x0, 0xFF}}}, + {{{106, 277, -106},0, {538, 496},{0x9B, 0x4E, 0x0, 0xFF}}}, + {{{106, 277, -277},0, {538, 240},{0x9B, 0x4E, 0x0, 0xFF}}}, + {{{-107, 1, -277},0, {486, 240},{0x9B, 0x4E, 0x0, 0xFF}}}, +}; + +Gfx n64logo_N64_mesh_tri_2[] = { + gsSPVertex(n64logo_N64_mesh_vtx_2 + 0, 16, 0), + gsSP1Triangle(0, 1, 2, 0), + gsSP1Triangle(0, 2, 3, 0), + gsSP1Triangle(4, 5, 6, 0), + gsSP1Triangle(4, 6, 7, 0), + gsSP1Triangle(8, 9, 10, 0), + gsSP1Triangle(8, 10, 11, 0), + gsSP1Triangle(12, 13, 14, 0), + gsSP1Triangle(12, 14, 15, 0), + gsSPEndDisplayList(), +}; + +Vtx n64logo_N64_mesh_vtx_3[32] = { + {{{277, 277, 106},0, {624, 496},{0x0, 0x7F, 0x0, 0xFF}}}, + {{{106, 277, 106},0, {880, 496},{0x0, 0x7F, 0x0, 0xFF}}}, + {{{106, 277, 277},0, {880, 240},{0x0, 0x7F, 0x0, 0xFF}}}, + {{{277, 277, 277},0, {624, 240},{0x0, 0x7F, 0x0, 0xFF}}}, + {{{106, -277, 106},0, {112, 496},{0x0, 0x81, 0x0, 0xFF}}}, + {{{277, -277, 106},0, {368, 496},{0x0, 0x81, 0x0, 0xFF}}}, + {{{277, -277, 277},0, {368, 240},{0x0, 0x81, 0x0, 0xFF}}}, + {{{106, -277, 277},0, {112, 240},{0x0, 0x81, 0x0, 0xFF}}}, + {{{-106, 277, 106},0, {624, 496},{0x0, 0x7F, 0x0, 0xFF}}}, + {{{-277, 277, 106},0, {880, 496},{0x0, 0x7F, 0x0, 0xFF}}}, + {{{-277, 277, 277},0, {880, 240},{0x0, 0x7F, 0x0, 0xFF}}}, + {{{-106, 277, 277},0, {624, 240},{0x0, 0x7F, 0x0, 0xFF}}}, + {{{-277, -277, 106},0, {112, 496},{0x0, 0x81, 0x0, 0xFF}}}, + {{{-106, -277, 106},0, {368, 496},{0x0, 0x81, 0x0, 0xFF}}}, + {{{-106, -277, 277},0, {368, 240},{0x0, 0x81, 0x0, 0xFF}}}, + {{{-277, -277, 277},0, {112, 240},{0x0, 0x81, 0x0, 0xFF}}}, + {{{277, 277, -277},0, {624, 496},{0x0, 0x7F, 0x0, 0xFF}}}, + {{{106, 277, -277},0, {880, 496},{0x0, 0x7F, 0x0, 0xFF}}}, + {{{106, 277, -106},0, {880, 240},{0x0, 0x7F, 0x0, 0xFF}}}, + {{{277, 277, -106},0, {624, 240},{0x0, 0x7F, 0x0, 0xFF}}}, + {{{106, -277, -277},0, {112, 496},{0x0, 0x81, 0x0, 0xFF}}}, + {{{277, -277, -277},0, {368, 496},{0x0, 0x81, 0x0, 0xFF}}}, + {{{277, -277, -106},0, {368, 240},{0x0, 0x81, 0x0, 0xFF}}}, + {{{106, -277, -106},0, {112, 240},{0x0, 0x81, 0x0, 0xFF}}}, + {{{-106, 277, -277},0, {624, 496},{0x0, 0x7F, 0x0, 0xFF}}}, + {{{-277, 277, -277},0, {880, 496},{0x0, 0x7F, 0x0, 0xFF}}}, + {{{-277, 277, -106},0, {880, 240},{0x0, 0x7F, 0x0, 0xFF}}}, + {{{-106, 277, -106},0, {624, 240},{0x0, 0x7F, 0x0, 0xFF}}}, + {{{-277, -277, -277},0, {112, 496},{0x0, 0x81, 0x0, 0xFF}}}, + {{{-106, -277, -277},0, {368, 496},{0x0, 0x81, 0x0, 0xFF}}}, + {{{-106, -277, -106},0, {368, 240},{0x0, 0x81, 0x0, 0xFF}}}, + {{{-277, -277, -106},0, {112, 240},{0x0, 0x81, 0x0, 0xFF}}}, +}; + +Gfx n64logo_N64_mesh_tri_3[] = { + gsSPVertex(n64logo_N64_mesh_vtx_3 + 0, 16, 0), + gsSP1Triangle(0, 1, 2, 0), + gsSP1Triangle(0, 2, 3, 0), + gsSP1Triangle(4, 5, 6, 0), + gsSP1Triangle(4, 6, 7, 0), + gsSP1Triangle(8, 9, 10, 0), + gsSP1Triangle(8, 10, 11, 0), + gsSP1Triangle(12, 13, 14, 0), + gsSP1Triangle(12, 14, 15, 0), + gsSPVertex(n64logo_N64_mesh_vtx_3 + 16, 16, 0), + gsSP1Triangle(0, 1, 2, 0), + gsSP1Triangle(0, 2, 3, 0), + gsSP1Triangle(4, 5, 6, 0), + gsSP1Triangle(4, 6, 7, 0), + gsSP1Triangle(8, 9, 10, 0), + gsSP1Triangle(8, 10, 11, 0), + gsSP1Triangle(12, 13, 14, 0), + gsSP1Triangle(12, 14, 15, 0), + gsSPEndDisplayList(), +}; + + +Gfx mat_n64logo_N64_Green[] = { + gsDPPipeSync(), + gsDPSetCombineLERP(0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT, 0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT), + gsSPTexture(65535, 65535, 0, 0, 1), + gsSPSetLights1(n64logo_N64_Green_lights), + gsSPEndDisplayList(), +}; + + +Gfx mat_n64logo_N64_Blue[] = { + gsDPPipeSync(), + gsDPSetCombineLERP(0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT, 0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT), + gsSPTexture(65535, 65535, 0, 0, 1), + gsSPSetLights1(n64logo_N64_Blue_lights), + gsSPEndDisplayList(), +}; + + +Gfx mat_n64logo_N64_Red[] = { + gsDPPipeSync(), + gsDPSetCombineLERP(0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT, 0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT), + gsSPTexture(65535, 65535, 0, 0, 1), + gsSPSetLights1(n64logo_N64_Red_lights), + gsSPEndDisplayList(), +}; + + +Gfx mat_n64logo_N64_Yellow[] = { + gsDPPipeSync(), + gsDPSetCombineLERP(0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT, 0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT), + gsSPTexture(65535, 65535, 0, 0, 1), + gsSPSetLights1(n64logo_N64_Yellow_lights), + gsSPEndDisplayList(), +}; + +Gfx n64logo_N64_mesh[] = { + gsSPDisplayList(mat_n64logo_N64_Green), + gsSPDisplayList(n64logo_N64_mesh_tri_0), + gsSPDisplayList(mat_n64logo_N64_Blue), + gsSPDisplayList(n64logo_N64_mesh_tri_1), + gsSPDisplayList(mat_n64logo_N64_Red), + gsSPDisplayList(n64logo_N64_mesh_tri_2), + gsSPDisplayList(mat_n64logo_N64_Yellow), + gsSPDisplayList(n64logo_N64_mesh_tri_3), + gsDPPipeSync(), + gsSPSetGeometryMode(G_LIGHTING), + gsSPClearGeometryMode(G_TEXTURE_GEN), + gsDPSetCombineLERP(0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT, 0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT), + gsSPTexture(65535, 65535, 0, 0, 0), + gsSPEndDisplayList(), +}; \ No newline at end of file diff --git a/levels/intro/script.c b/levels/intro/script.c index 4975dbb2..1745045d 100644 --- a/levels/intro/script.c +++ b/levels/intro/script.c @@ -18,6 +18,29 @@ #include "make_const_nonconst.h" #include "levels/intro/header.h" +const LevelScript level_intro_n64[] = { + INIT_LEVEL(), + FIXED_LOAD(/*loadAddr*/ _goddardSegmentStart, /*romStart*/ _goddardSegmentRomStart, /*romEnd*/ _goddardSegmentRomEnd), + LOAD_RAW(/*seg*/ 0x13, _behaviorSegmentRomStart, _behaviorSegmentRomEnd), + LOAD_MIO0(/*seg*/ 0x07, _intro_segment_7SegmentRomStart, _intro_segment_7SegmentRomEnd), + ALLOC_LEVEL_POOL(), + + AREA(/*index*/ 1, intro_n64_geo), + END_AREA(), + + FREE_LEVEL_POOL(), + //SLEEP(/*frames*/ 500), + LOAD_AREA(/*area*/ 1), + CALL(/*arg*/ 0, /*func*/ lvl_intro_update), + SLEEP(/*frames*/ 90), + TRANSITION(/*transType*/ WARP_TRANSITION_FADE_INTO_COLOR, /*time*/ 16, /*color*/ 0x00, 0x00, 0x00), + SLEEP(/*frames*/ 16), + CMD2A(/*unk2*/ 1), + CLEAR_LEVEL(), + SLEEP(/*frames*/ 2), + EXIT_AND_EXECUTE(/*seg*/ 0x14, _introSegmentRomStart, _introSegmentRomEnd, level_intro_entry_1), +}; + const LevelScript level_intro_entry_1[] = { INIT_LEVEL(), FIXED_LOAD(/*loadAddr*/ _goddardSegmentStart, /*romStart*/ _goddardSegmentRomStart, /*romEnd*/ _goddardSegmentRomEnd), @@ -31,7 +54,7 @@ const LevelScript level_intro_entry_1[] = { FREE_LEVEL_POOL(), LOAD_AREA(/*area*/ 1), CALL(/*arg*/ 0, /*func*/ lvl_intro_update), - SLEEP(/*frames*/ 75), + SLEEP(/*frames*/ 80), TRANSITION(/*transType*/ WARP_TRANSITION_FADE_INTO_COLOR, /*time*/ 16, /*color*/ 0x00, 0x00, 0x00), SLEEP(/*frames*/ 16), CMD2A(/*unk2*/ 1), diff --git a/levels/n64logo/header.h b/levels/n64logo/header.h new file mode 100755 index 00000000..d55fd3e0 --- /dev/null +++ b/levels/n64logo/header.h @@ -0,0 +1,11 @@ +extern Vtx n64logo_N64_mesh_vtx_0[56]; +extern Gfx n64logo_N64_mesh_tri_0[]; +extern Vtx n64logo_N64_mesh_vtx_1[56]; +extern Gfx n64logo_N64_mesh_tri_1[]; +extern Vtx n64logo_N64_mesh_vtx_2[16]; +extern Gfx n64logo_N64_mesh_tri_2[]; +extern Vtx n64logo_N64_mesh_vtx_3[32]; +extern Gfx n64logo_N64_mesh_tri_3[]; + +extern Gfx n64logo_N64_mesh[]; + diff --git a/levels/n64logo/model.inc.c b/levels/n64logo/model.inc.c new file mode 100755 index 00000000..3ee26250 --- /dev/null +++ b/levels/n64logo/model.inc.c @@ -0,0 +1,351 @@ +Lights1 n64logo_N64_Green_lights = gdSPDefLights1( + 0x3, 0x49, 0x18, + 0x6, 0x93, 0x30, 0x28, 0x28, 0x28); + +Lights1 n64logo_N64_Blue_lights = gdSPDefLights1( + 0x0, 0xE, 0x54, + 0x1, 0x1D, 0xA9, 0x28, 0x28, 0x28); + +Lights1 n64logo_N64_Red_lights = gdSPDefLights1( + 0x7F, 0xF, 0xA, + 0xFE, 0x1F, 0x15, 0x28, 0x28, 0x28); + +Lights1 n64logo_N64_Yellow_lights = gdSPDefLights1( + 0x7F, 0x60, 0x0, + 0xFE, 0xC1, 0x0, 0x28, 0x28, 0x28); + +Vtx n64logo_N64_mesh_vtx_0[56] = { + {{{106, 1, -107},0, {486, 496},{0x0, 0x4E, 0x9B, 0xFF}}}, + {{{106, 277, 106},0, {538, 496},{0x0, 0x4E, 0x9B, 0xFF}}}, + {{{277, 277, 106},0, {538, 240},{0x0, 0x4E, 0x9B, 0xFF}}}, + {{{277, 1, -107},0, {486, 240},{0x0, 0x4E, 0x9B, 0xFF}}}, + {{{277, -277, 277},0, {368, 240},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{277, 277, 277},0, {624, 240},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{106, 277, 277},0, {624, -16},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{106, -277, 277},0, {368, -16},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{106, -277, 106},0, {368, 752},{0x0, 0x0, 0x81, 0xFF}}}, + {{{106, 277, 106},0, {624, 752},{0x0, 0x0, 0x81, 0xFF}}}, + {{{277, 277, 106},0, {624, 496},{0x0, 0x0, 0x81, 0xFF}}}, + {{{277, -277, 106},0, {368, 496},{0x0, 0x0, 0x81, 0xFF}}}, + {{{-106, -277, 277},0, {368, 240},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{-106, 277, 277},0, {624, 240},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{-277, 277, 277},0, {624, -16},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{-277, -277, 277},0, {368, -16},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{-277, -277, 106},0, {368, 752},{0x0, 0x0, 0x81, 0xFF}}}, + {{{-277, 277, 106},0, {624, 752},{0x0, 0x0, 0x81, 0xFF}}}, + {{{-106, 277, 106},0, {624, 496},{0x0, 0x0, 0x81, 0xFF}}}, + {{{-106, -277, 106},0, {368, 496},{0x0, 0x0, 0x81, 0xFF}}}, + {{{277, -277, -106},0, {368, 240},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{277, 277, -106},0, {624, 240},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{106, 277, -106},0, {624, -16},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{106, -277, -106},0, {368, -16},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{106, -277, -277},0, {368, 752},{0x0, 0x0, 0x81, 0xFF}}}, + {{{106, 277, -277},0, {624, 752},{0x0, 0x0, 0x81, 0xFF}}}, + {{{277, 277, -277},0, {624, 496},{0x0, 0x0, 0x81, 0xFF}}}, + {{{277, -277, -277},0, {368, 496},{0x0, 0x0, 0x81, 0xFF}}}, + {{{-106, -277, -106},0, {368, 240},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{-106, 277, -106},0, {624, 240},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{-277, 277, -106},0, {624, -16},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{-277, -277, -106},0, {368, -16},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{-277, -277, -277},0, {368, 752},{0x0, 0x0, 0x81, 0xFF}}}, + {{{-277, 277, -277},0, {624, 752},{0x0, 0x0, 0x81, 0xFF}}}, + {{{-106, 277, -277},0, {624, 496},{0x0, 0x0, 0x81, 0xFF}}}, + {{{-106, -277, -277},0, {368, 496},{0x0, 0x0, 0x81, 0xFF}}}, + {{{107, -277, 106},0, {454, 752},{0x0, 0x0, 0x81, 0xFF}}}, + {{{-106, -2, 106},0, {505, 752},{0x0, 0x0, 0x81, 0xFF}}}, + {{{-106, 277, 106},0, {538, 496},{0x0, 0x0, 0x81, 0xFF}}}, + {{{107, 1, 106},0, {486, 496},{0x0, 0x0, 0x81, 0xFF}}}, + {{{107, 1, 277},0, {486, 240},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{-106, 277, 277},0, {538, 240},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{-106, -2, 277},0, {505, -16},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{107, -277, 277},0, {454, -16},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{-106, 1, 107},0, {486, 496},{0x0, 0x4E, 0x65, 0xFF}}}, + {{{-106, 277, -106},0, {538, 496},{0x0, 0x4E, 0x65, 0xFF}}}, + {{{-277, 277, -106},0, {538, 240},{0x0, 0x4E, 0x65, 0xFF}}}, + {{{-277, 1, 107},0, {486, 240},{0x0, 0x4E, 0x65, 0xFF}}}, + {{{-107, -277, -106},0, {454, 752},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{106, -2, -106},0, {505, 752},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{106, 277, -106},0, {538, 496},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{-107, 1, -106},0, {486, 496},{0x0, 0x0, 0x7F, 0xFF}}}, + {{{-107, 1, -277},0, {486, 240},{0x0, 0x0, 0x81, 0xFF}}}, + {{{106, 277, -277},0, {538, 240},{0x0, 0x0, 0x81, 0xFF}}}, + {{{106, -2, -277},0, {505, -16},{0x0, 0x0, 0x81, 0xFF}}}, + {{{-107, -277, -277},0, {454, -16},{0x0, 0x0, 0x81, 0xFF}}}, +}; + +Gfx n64logo_N64_mesh_tri_0[] = { + gsSPVertex(n64logo_N64_mesh_vtx_0 + 0, 16, 0), + gsSP1Triangle(0, 1, 2, 0), + gsSP1Triangle(0, 2, 3, 0), + gsSP1Triangle(4, 5, 6, 0), + gsSP1Triangle(4, 6, 7, 0), + gsSP1Triangle(8, 9, 10, 0), + gsSP1Triangle(8, 10, 11, 0), + gsSP1Triangle(12, 13, 14, 0), + gsSP1Triangle(12, 14, 15, 0), + gsSPVertex(n64logo_N64_mesh_vtx_0 + 16, 16, 0), + gsSP1Triangle(0, 1, 2, 0), + gsSP1Triangle(0, 2, 3, 0), + gsSP1Triangle(4, 5, 6, 0), + gsSP1Triangle(4, 6, 7, 0), + gsSP1Triangle(8, 9, 10, 0), + gsSP1Triangle(8, 10, 11, 0), + gsSP1Triangle(12, 13, 14, 0), + gsSP1Triangle(12, 14, 15, 0), + gsSPVertex(n64logo_N64_mesh_vtx_0 + 32, 16, 0), + gsSP1Triangle(0, 1, 2, 0), + gsSP1Triangle(0, 2, 3, 0), + gsSP1Triangle(4, 5, 6, 0), + gsSP1Triangle(4, 6, 7, 0), + gsSP1Triangle(8, 9, 10, 0), + gsSP1Triangle(8, 10, 11, 0), + gsSP1Triangle(12, 13, 14, 0), + gsSP1Triangle(12, 14, 15, 0), + gsSPVertex(n64logo_N64_mesh_vtx_0 + 48, 8, 0), + gsSP1Triangle(0, 1, 2, 0), + gsSP1Triangle(0, 2, 3, 0), + gsSP1Triangle(4, 5, 6, 0), + gsSP1Triangle(4, 6, 7, 0), + gsSPEndDisplayList(), +}; + +Vtx n64logo_N64_mesh_vtx_1[56] = { + {{{106, -277, -107},0, {454, 752},{0x81, 0x0, 0x0, 0xFF}}}, + {{{106, -2, 106},0, {505, 752},{0x81, 0x0, 0x0, 0xFF}}}, + {{{106, 277, 106},0, {538, 496},{0x81, 0x0, 0x0, 0xFF}}}, + {{{106, 1, -107},0, {486, 496},{0x81, 0x0, 0x0, 0xFF}}}, + {{{277, 1, -107},0, {486, 240},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{277, 277, 106},0, {538, 240},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{277, -2, 106},0, {505, -16},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{277, -277, -107},0, {454, -16},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{106, -277, 277},0, {368, 1008},{0x81, 0x0, 0x0, 0xFF}}}, + {{{106, 277, 277},0, {624, 1008},{0x81, 0x0, 0x0, 0xFF}}}, + {{{106, 277, 106},0, {624, 752},{0x81, 0x0, 0x0, 0xFF}}}, + {{{106, -277, 106},0, {368, 752},{0x81, 0x0, 0x0, 0xFF}}}, + {{{277, -277, 106},0, {368, 496},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{277, 277, 106},0, {624, 496},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{277, 277, 277},0, {624, 240},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{277, -277, 277},0, {368, 240},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{-277, -277, 277},0, {368, 1008},{0x81, 0x0, 0x0, 0xFF}}}, + {{{-277, 277, 277},0, {624, 1008},{0x81, 0x0, 0x0, 0xFF}}}, + {{{-277, 277, 106},0, {624, 752},{0x81, 0x0, 0x0, 0xFF}}}, + {{{-277, -277, 106},0, {368, 752},{0x81, 0x0, 0x0, 0xFF}}}, + {{{-106, -277, 106},0, {368, 496},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{-106, 277, 106},0, {624, 496},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{-106, 277, 277},0, {624, 240},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{-106, -277, 277},0, {368, 240},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{106, -277, -106},0, {368, 1008},{0x81, 0x0, 0x0, 0xFF}}}, + {{{106, 277, -106},0, {624, 1008},{0x81, 0x0, 0x0, 0xFF}}}, + {{{106, 277, -277},0, {624, 752},{0x81, 0x0, 0x0, 0xFF}}}, + {{{106, -277, -277},0, {368, 752},{0x81, 0x0, 0x0, 0xFF}}}, + {{{277, -277, -277},0, {368, 496},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{277, 277, -277},0, {624, 496},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{277, 277, -106},0, {624, 240},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{277, -277, -106},0, {368, 240},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{-277, -277, -106},0, {368, 1008},{0x81, 0x0, 0x0, 0xFF}}}, + {{{-277, 277, -106},0, {624, 1008},{0x81, 0x0, 0x0, 0xFF}}}, + {{{-277, 277, -277},0, {624, 752},{0x81, 0x0, 0x0, 0xFF}}}, + {{{-277, -277, -277},0, {368, 752},{0x81, 0x0, 0x0, 0xFF}}}, + {{{-106, -277, -277},0, {368, 496},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{-106, 277, -277},0, {624, 496},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{-106, 277, -106},0, {624, 240},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{-106, -277, -106},0, {368, 240},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{107, -277, 277},0, {454, 1008},{0x9B, 0xB2, 0x0, 0xFF}}}, + {{{-106, -2, 277},0, {505, 1008},{0x9B, 0xB2, 0x0, 0xFF}}}, + {{{-106, -2, 106},0, {505, 752},{0x9B, 0xB2, 0x0, 0xFF}}}, + {{{107, -277, 106},0, {454, 752},{0x9B, 0xB2, 0x0, 0xFF}}}, + {{{-106, -277, 107},0, {454, 752},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{-106, -2, -106},0, {505, 752},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{-106, 277, -106},0, {538, 496},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{-106, 1, 107},0, {486, 496},{0x7F, 0x0, 0x0, 0xFF}}}, + {{{-277, 1, 107},0, {486, 240},{0x81, 0x0, 0x0, 0xFF}}}, + {{{-277, 277, -106},0, {538, 240},{0x81, 0x0, 0x0, 0xFF}}}, + {{{-277, -2, -106},0, {505, -16},{0x81, 0x0, 0x0, 0xFF}}}, + {{{-277, -277, 107},0, {454, -16},{0x81, 0x0, 0x0, 0xFF}}}, + {{{-107, -277, -277},0, {454, 1008},{0x65, 0xB2, 0x0, 0xFF}}}, + {{{106, -2, -277},0, {505, 1008},{0x65, 0xB2, 0x0, 0xFF}}}, + {{{106, -2, -106},0, {505, 752},{0x65, 0xB2, 0x0, 0xFF}}}, + {{{-107, -277, -106},0, {454, 752},{0x65, 0xB2, 0x0, 0xFF}}}, +}; + +Gfx n64logo_N64_mesh_tri_1[] = { + gsSPVertex(n64logo_N64_mesh_vtx_1 + 0, 16, 0), + gsSP1Triangle(0, 1, 2, 0), + gsSP1Triangle(0, 2, 3, 0), + gsSP1Triangle(4, 5, 6, 0), + gsSP1Triangle(4, 6, 7, 0), + gsSP1Triangle(8, 9, 10, 0), + gsSP1Triangle(8, 10, 11, 0), + gsSP1Triangle(12, 13, 14, 0), + gsSP1Triangle(12, 14, 15, 0), + gsSPVertex(n64logo_N64_mesh_vtx_1 + 16, 16, 0), + gsSP1Triangle(0, 1, 2, 0), + gsSP1Triangle(0, 2, 3, 0), + gsSP1Triangle(4, 5, 6, 0), + gsSP1Triangle(4, 6, 7, 0), + gsSP1Triangle(8, 9, 10, 0), + gsSP1Triangle(8, 10, 11, 0), + gsSP1Triangle(12, 13, 14, 0), + gsSP1Triangle(12, 14, 15, 0), + gsSPVertex(n64logo_N64_mesh_vtx_1 + 32, 16, 0), + gsSP1Triangle(0, 1, 2, 0), + gsSP1Triangle(0, 2, 3, 0), + gsSP1Triangle(4, 5, 6, 0), + gsSP1Triangle(4, 6, 7, 0), + gsSP1Triangle(8, 9, 10, 0), + gsSP1Triangle(8, 10, 11, 0), + gsSP1Triangle(12, 13, 14, 0), + gsSP1Triangle(12, 14, 15, 0), + gsSPVertex(n64logo_N64_mesh_vtx_1 + 48, 8, 0), + gsSP1Triangle(0, 1, 2, 0), + gsSP1Triangle(0, 2, 3, 0), + gsSP1Triangle(4, 5, 6, 0), + gsSP1Triangle(4, 6, 7, 0), + gsSPEndDisplayList(), +}; + +Vtx n64logo_N64_mesh_vtx_2[16] = { + {{{277, -277, -107},0, {454, 1008},{0x0, 0xB2, 0x65, 0xFF}}}, + {{{277, -2, 106},0, {505, 1008},{0x0, 0xB2, 0x65, 0xFF}}}, + {{{106, -2, 106},0, {505, 752},{0x0, 0xB2, 0x65, 0xFF}}}, + {{{106, -277, -107},0, {454, 752},{0x0, 0xB2, 0x65, 0xFF}}}, + {{{107, 1, 106},0, {486, 496},{0x65, 0x4E, 0x0, 0xFF}}}, + {{{-106, 277, 106},0, {538, 496},{0x65, 0x4E, 0x0, 0xFF}}}, + {{{-106, 277, 277},0, {538, 240},{0x65, 0x4E, 0x0, 0xFF}}}, + {{{107, 1, 277},0, {486, 240},{0x65, 0x4E, 0x0, 0xFF}}}, + {{{-277, -277, 107},0, {454, 1008},{0x0, 0xB2, 0x9B, 0xFF}}}, + {{{-277, -2, -106},0, {505, 1008},{0x0, 0xB2, 0x9B, 0xFF}}}, + {{{-106, -2, -106},0, {505, 752},{0x0, 0xB2, 0x9B, 0xFF}}}, + {{{-106, -277, 107},0, {454, 752},{0x0, 0xB2, 0x9B, 0xFF}}}, + {{{-107, 1, -106},0, {486, 496},{0x9B, 0x4E, 0x0, 0xFF}}}, + {{{106, 277, -106},0, {538, 496},{0x9B, 0x4E, 0x0, 0xFF}}}, + {{{106, 277, -277},0, {538, 240},{0x9B, 0x4E, 0x0, 0xFF}}}, + {{{-107, 1, -277},0, {486, 240},{0x9B, 0x4E, 0x0, 0xFF}}}, +}; + +Gfx n64logo_N64_mesh_tri_2[] = { + gsSPVertex(n64logo_N64_mesh_vtx_2 + 0, 16, 0), + gsSP1Triangle(0, 1, 2, 0), + gsSP1Triangle(0, 2, 3, 0), + gsSP1Triangle(4, 5, 6, 0), + gsSP1Triangle(4, 6, 7, 0), + gsSP1Triangle(8, 9, 10, 0), + gsSP1Triangle(8, 10, 11, 0), + gsSP1Triangle(12, 13, 14, 0), + gsSP1Triangle(12, 14, 15, 0), + gsSPEndDisplayList(), +}; + +Vtx n64logo_N64_mesh_vtx_3[32] = { + {{{277, 277, 106},0, {624, 496},{0x0, 0x7F, 0x0, 0xFF}}}, + {{{106, 277, 106},0, {880, 496},{0x0, 0x7F, 0x0, 0xFF}}}, + {{{106, 277, 277},0, {880, 240},{0x0, 0x7F, 0x0, 0xFF}}}, + {{{277, 277, 277},0, {624, 240},{0x0, 0x7F, 0x0, 0xFF}}}, + {{{106, -277, 106},0, {112, 496},{0x0, 0x81, 0x0, 0xFF}}}, + {{{277, -277, 106},0, {368, 496},{0x0, 0x81, 0x0, 0xFF}}}, + {{{277, -277, 277},0, {368, 240},{0x0, 0x81, 0x0, 0xFF}}}, + {{{106, -277, 277},0, {112, 240},{0x0, 0x81, 0x0, 0xFF}}}, + {{{-106, 277, 106},0, {624, 496},{0x0, 0x7F, 0x0, 0xFF}}}, + {{{-277, 277, 106},0, {880, 496},{0x0, 0x7F, 0x0, 0xFF}}}, + {{{-277, 277, 277},0, {880, 240},{0x0, 0x7F, 0x0, 0xFF}}}, + {{{-106, 277, 277},0, {624, 240},{0x0, 0x7F, 0x0, 0xFF}}}, + {{{-277, -277, 106},0, {112, 496},{0x0, 0x81, 0x0, 0xFF}}}, + {{{-106, -277, 106},0, {368, 496},{0x0, 0x81, 0x0, 0xFF}}}, + {{{-106, -277, 277},0, {368, 240},{0x0, 0x81, 0x0, 0xFF}}}, + {{{-277, -277, 277},0, {112, 240},{0x0, 0x81, 0x0, 0xFF}}}, + {{{277, 277, -277},0, {624, 496},{0x0, 0x7F, 0x0, 0xFF}}}, + {{{106, 277, -277},0, {880, 496},{0x0, 0x7F, 0x0, 0xFF}}}, + {{{106, 277, -106},0, {880, 240},{0x0, 0x7F, 0x0, 0xFF}}}, + {{{277, 277, -106},0, {624, 240},{0x0, 0x7F, 0x0, 0xFF}}}, + {{{106, -277, -277},0, {112, 496},{0x0, 0x81, 0x0, 0xFF}}}, + {{{277, -277, -277},0, {368, 496},{0x0, 0x81, 0x0, 0xFF}}}, + {{{277, -277, -106},0, {368, 240},{0x0, 0x81, 0x0, 0xFF}}}, + {{{106, -277, -106},0, {112, 240},{0x0, 0x81, 0x0, 0xFF}}}, + {{{-106, 277, -277},0, {624, 496},{0x0, 0x7F, 0x0, 0xFF}}}, + {{{-277, 277, -277},0, {880, 496},{0x0, 0x7F, 0x0, 0xFF}}}, + {{{-277, 277, -106},0, {880, 240},{0x0, 0x7F, 0x0, 0xFF}}}, + {{{-106, 277, -106},0, {624, 240},{0x0, 0x7F, 0x0, 0xFF}}}, + {{{-277, -277, -277},0, {112, 496},{0x0, 0x81, 0x0, 0xFF}}}, + {{{-106, -277, -277},0, {368, 496},{0x0, 0x81, 0x0, 0xFF}}}, + {{{-106, -277, -106},0, {368, 240},{0x0, 0x81, 0x0, 0xFF}}}, + {{{-277, -277, -106},0, {112, 240},{0x0, 0x81, 0x0, 0xFF}}}, +}; + +Gfx n64logo_N64_mesh_tri_3[] = { + gsSPVertex(n64logo_N64_mesh_vtx_3 + 0, 16, 0), + gsSP1Triangle(0, 1, 2, 0), + gsSP1Triangle(0, 2, 3, 0), + gsSP1Triangle(4, 5, 6, 0), + gsSP1Triangle(4, 6, 7, 0), + gsSP1Triangle(8, 9, 10, 0), + gsSP1Triangle(8, 10, 11, 0), + gsSP1Triangle(12, 13, 14, 0), + gsSP1Triangle(12, 14, 15, 0), + gsSPVertex(n64logo_N64_mesh_vtx_3 + 16, 16, 0), + gsSP1Triangle(0, 1, 2, 0), + gsSP1Triangle(0, 2, 3, 0), + gsSP1Triangle(4, 5, 6, 0), + gsSP1Triangle(4, 6, 7, 0), + gsSP1Triangle(8, 9, 10, 0), + gsSP1Triangle(8, 10, 11, 0), + gsSP1Triangle(12, 13, 14, 0), + gsSP1Triangle(12, 14, 15, 0), + gsSPEndDisplayList(), +}; + + +Gfx mat_n64logo_N64_Green[] = { + gsDPPipeSync(), + gsDPSetCombineLERP(0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT, 0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT), + gsSPTexture(65535, 65535, 0, 0, 1), + gsSPSetLights1(n64logo_N64_Green_lights), + gsSPEndDisplayList(), +}; + + +Gfx mat_n64logo_N64_Blue[] = { + gsDPPipeSync(), + gsDPSetCombineLERP(0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT, 0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT), + gsSPTexture(65535, 65535, 0, 0, 1), + gsSPSetLights1(n64logo_N64_Blue_lights), + gsSPEndDisplayList(), +}; + + +Gfx mat_n64logo_N64_Red[] = { + gsDPPipeSync(), + gsDPSetCombineLERP(0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT, 0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT), + gsSPTexture(65535, 65535, 0, 0, 1), + gsSPSetLights1(n64logo_N64_Red_lights), + gsSPEndDisplayList(), +}; + + +Gfx mat_n64logo_N64_Yellow[] = { + gsDPPipeSync(), + gsDPSetCombineLERP(0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT, 0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT), + gsSPTexture(65535, 65535, 0, 0, 1), + gsSPSetLights1(n64logo_N64_Yellow_lights), + gsSPEndDisplayList(), +}; + + +Gfx n64logo_N64_mesh[] = { + gsSPDisplayList(mat_n64logo_N64_Green), + gsSPDisplayList(n64logo_N64_mesh_tri_0), + gsSPDisplayList(mat_n64logo_N64_Blue), + gsSPDisplayList(n64logo_N64_mesh_tri_1), + gsSPDisplayList(mat_n64logo_N64_Red), + gsSPDisplayList(n64logo_N64_mesh_tri_2), + gsSPDisplayList(mat_n64logo_N64_Yellow), + gsSPDisplayList(n64logo_N64_mesh_tri_3), + gsDPPipeSync(), + gsSPSetGeometryMode(G_LIGHTING), + gsSPClearGeometryMode(G_TEXTURE_GEN), + gsDPSetCombineLERP(0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT, 0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT), + gsSPTexture(65535, 65535, 0, 0, 0), + gsSPEndDisplayList(), +}; + + + diff --git a/levels/scripts.c b/levels/scripts.c index 972c9ad0..02727b9b 100644 --- a/levels/scripts.c +++ b/levels/scripts.c @@ -126,6 +126,10 @@ const LevelScript level_main_scripts_entry[] = { JUMP_IF(/*op*/ OP_EQ, /*arg*/ -9, script_L5), }; +static const LevelScript script_N64[] = { + EXIT_AND_EXECUTE(/*seg*/ 0x14, _introSegmentRomStart, _introSegmentRomEnd, level_intro_n64), +}; + static const LevelScript script_L1[] = { EXIT_AND_EXECUTE(/*seg*/ 0x14, _introSegmentRomStart, _introSegmentRomEnd, level_intro_entry_1), }; diff --git a/src/game/ingame_menu.c b/src/game/ingame_menu.c index aa9be1af..d4d473bd 100644 --- a/src/game/ingame_menu.c +++ b/src/game/ingame_menu.c @@ -49,30 +49,9 @@ s8 gRedCoinsCollected; extern u8 gLastCompletedCourseNum; extern u8 gLastCompletedStarNum; -enum DialogBoxState { - DIALOG_STATE_OPENING, - DIALOG_STATE_VERTICAL, - DIALOG_STATE_HORIZONTAL, - DIALOG_STATE_CLOSING -}; - -enum DialogBoxPageState { - DIALOG_PAGE_STATE_NONE, - DIALOG_PAGE_STATE_SCROLL, - DIALOG_PAGE_STATE_END -}; - -enum DialogBoxType { - DIALOG_TYPE_ROTATE, // used in NPCs and level messages - DIALOG_TYPE_ZOOM // used in signposts and wall signs and etc -}; - -enum DialogMark { DIALOG_MARK_NONE = 0, DIALOG_MARK_DAKUTEN = 1, DIALOG_MARK_HANDAKUTEN = 2 }; - #define DEFAULT_DIALOG_BOX_ANGLE 90.0f #define DEFAULT_DIALOG_BOX_SCALE 19.0f -#if !defined(VERSION_JP) && !defined(VERSION_SH) u8 gDialogCharWidths[256] = { // TODO: Is there a way to auto generate this? 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 5, 6, 6, 5, 8, 8, 6, 6, 6, 6, 6, 5, 6, 6, @@ -80,30 +59,17 @@ u8 gDialogCharWidths[256] = { // TODO: Is there a way to auto generate this? 7, 5, 5, 5, 6, 5, 5, 5, 5, 5, 7, 7, 5, 5, 4, 4, 8, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 8, 8, 8, 7, 7, 6, 7, 7, 0, 0, 0, 0, 0, 0, 0, -#ifdef VERSION_EU - 6, 6, 6, 0, 6, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 4, - 5, 5, 5, 5, 6, 6, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, - 5, 5, 5, 0, 6, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 5, 5, 0, 0, 6, 6, 0, 0, 0, 0, 0, 0, 0, 5, 6, - 0, 4, 4, 0, 0, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, -#else 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -#endif 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -#ifdef VERSION_EU - 7, 5, 10, 5, 9, 8, 4, 0, 0, 0, 0, 5, 5, 6, 5, 0, -#else 7, 5, 10, 5, 9, 8, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, -#endif 0, 0, 5, 7, 7, 6, 6, 8, 0, 8, 10, 6, 4, 10, 0, 0 }; -#endif s8 gDialogBoxState = DIALOG_STATE_OPENING; f32 gDialogBoxOpenTimer = DEFAULT_DIALOG_BOX_ANGLE; @@ -306,17 +272,6 @@ void render_uppercase_diacritic(s16 *xPos, s16 *yPos, u8 letter, u8 diacritic) { } #endif // VERSION_EU -#if !defined(VERSION_JP) && !defined(VERSION_SH) -struct MultiTextEntry { - u8 length; - u8 str[4]; -}; - -#define TEXT_THE_RAW ASCII_TO_DIALOG('t'), ASCII_TO_DIALOG('h'), ASCII_TO_DIALOG('e'), 0x00 -#define TEXT_YOU_RAW ASCII_TO_DIALOG('y'), ASCII_TO_DIALOG('o'), ASCII_TO_DIALOG('u'), 0x00 - -enum MultiStringIDs { STRING_THE, STRING_YOU }; - /* * Place the multi-text string according to the ID passed. (US, EU) * 0: 'the' @@ -344,13 +299,6 @@ void render_multi_text_string(s16 *xPos, s16 *yPos, s8 multiTextID) #endif } } -#endif - -#if defined(VERSION_JP) || defined(VERSION_SH) -#define MAX_STRING_WIDTH 18 -#else -#define MAX_STRING_WIDTH 16 -#endif /** * Prints a generic white string. @@ -409,65 +357,7 @@ void print_generic_string(s16 x, s16 y, const u8 *str) { gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); } -void print_scaled_generic_string(s16 x, s16 y, const u8 *str, float scale) { - UNUSED s8 mark = DIALOG_MARK_NONE; // unused in EU - s32 strPos = 0; - u8 lineNum = 1; - Mtx *_Matrix = (Mtx *) alloc_display_list(sizeof(Mtx)); - if (!_Matrix) return; - create_dl_translation_matrix(MENU_MTX_PUSH, x, y, 0.0f); - guScale(_Matrix, scale, scale, 1.f); - gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(_Matrix), G_MTX_MODELVIEW | G_MTX_MUL | G_MTX_NOPUSH); - - while (str[strPos] != DIALOG_CHAR_TERMINATOR) { - switch (str[strPos]) { - case DIALOG_CHAR_DAKUTEN: - mark = DIALOG_MARK_DAKUTEN; - break; - case DIALOG_CHAR_PERIOD_OR_HANDAKUTEN: - mark = DIALOG_MARK_HANDAKUTEN; - break; - case DIALOG_CHAR_NEWLINE: - gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); - create_dl_translation_matrix(MENU_MTX_PUSH, x, y - (lineNum * MAX_STRING_WIDTH), 0.0f); - lineNum++; - break; - case DIALOG_CHAR_PERIOD: - create_dl_translation_matrix(MENU_MTX_PUSH, -2.0f, -5.0f, 0.0f); - render_generic_char(DIALOG_CHAR_PERIOD_OR_HANDAKUTEN); - gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); - break; - case DIALOG_CHAR_SLASH: - create_dl_translation_matrix(MENU_MTX_NOPUSH, (f32)(gDialogCharWidths[DIALOG_CHAR_SPACE] * 2), 0.0f, 0.0f); - break; - case DIALOG_CHAR_MULTI_THE: - render_multi_text_string(STRING_THE); - break; - case DIALOG_CHAR_MULTI_YOU: - render_multi_text_string(STRING_YOU); - break; - case DIALOG_CHAR_SPACE: - create_dl_translation_matrix(MENU_MTX_NOPUSH, (f32)(gDialogCharWidths[DIALOG_CHAR_SPACE]), 0.0f, 0.0f); - break; // ? needed to match - default: - render_generic_char(str[strPos]); - if (mark != DIALOG_MARK_NONE) { - create_dl_translation_matrix(MENU_MTX_PUSH, 5.0f, 5.0f, 0.0f); - guScale(gDisplayListHead++, scale, scale, scale); - render_generic_char(mark + 0xEF); - gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); - mark = DIALOG_MARK_NONE; - } - create_dl_translation_matrix(MENU_MTX_NOPUSH, (f32)(gDialogCharWidths[str[strPos]]), 0.0f, 0.0f); - } - - strPos++; - } - - create_dl_scale_matrix(MENU_MTX_NOPUSH, 1.0f, 1.0f, 1.0f); - gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); -} f32 getStringWidth(u8* txt, float scale) { f32 size = 0; diff --git a/src/game/ingame_menu.h b/src/game/ingame_menu.h index 3b3fec3c..e53167d2 100644 --- a/src/game/ingame_menu.h +++ b/src/game/ingame_menu.h @@ -103,6 +103,40 @@ enum DialogSpecialChars { DIALOG_CHAR_TERMINATOR = 0xFF }; +extern u8 gDialogCharWidths[]; + +enum DialogBoxState { + DIALOG_STATE_OPENING, + DIALOG_STATE_VERTICAL, + DIALOG_STATE_HORIZONTAL, + DIALOG_STATE_CLOSING +}; + +enum DialogBoxPageState { + DIALOG_PAGE_STATE_NONE, + DIALOG_PAGE_STATE_SCROLL, + DIALOG_PAGE_STATE_END +}; + +enum DialogBoxType { + DIALOG_TYPE_ROTATE, // used in NPCs and level messages + DIALOG_TYPE_ZOOM // used in signposts and wall signs and etc +}; + +enum DialogMark { DIALOG_MARK_NONE = 0, DIALOG_MARK_DAKUTEN = 1, DIALOG_MARK_HANDAKUTEN = 2 }; + +#define MAX_STRING_WIDTH 16 + +struct MultiTextEntry { + u8 length; + u8 str[4]; +}; + +#define TEXT_THE_RAW ASCII_TO_DIALOG('t'), ASCII_TO_DIALOG('h'), ASCII_TO_DIALOG('e'), 0x00 +#define TEXT_YOU_RAW ASCII_TO_DIALOG('y'), ASCII_TO_DIALOG('o'), ASCII_TO_DIALOG('u'), 0x00 + +enum MultiStringIDs { STRING_THE, STRING_YOU }; + extern s32 gDialogResponse; extern u16 gDialogColorFadeTimer; extern s8 gLastDialogLineNum; @@ -116,7 +150,6 @@ void create_dl_identity_matrix(void); void create_dl_translation_matrix(s8 pushOp, f32 x, f32 y, f32 z); void create_dl_ortho_matrix(void); void print_generic_string(s16 x, s16 y, const u8 *str); -void print_scaled_generic_string(s16 x, s16 y, const u8 *str, float scale); f32 getStringWidth(u8* txt, float scale); void print_hud_lut_string(s8 hudLUT, s16 x, s16 y, const u8 *str); void print_menu_generic_string(s16 x, s16 y, const u8 *str); diff --git a/src/game/options_menu.c b/src/game/options_menu.c index e4cc7b53..b956435e 100644 --- a/src/game/options_menu.c +++ b/src/game/options_menu.c @@ -27,6 +27,8 @@ #include "text/txtconv.h" #include "text/text-loader.h" #include "gfx_dimensions.h" +#include "gfx_dimensions.h" +#include "moon/utils/moon-gfx.h" u8 optmenu_open = 0; @@ -391,7 +393,7 @@ static void optmenu_draw_text(s16 x, s16 y, const u8 *str, u8 col) { static void optmenu_draw_scaled_text(s16 x, s16 y, const u8 *str, int col, float scale) { gDPSetEnvColor(gDisplayListHead++, 0, 0, 0, 255); - print_scaled_generic_string(x + 1, y-1, str, scale); + moon_draw_text(x + 1, y-1, str, scale); if (col == -1) { gDPSetEnvColor(gDisplayListHead++, 255, 255, 255, 255); } else if (col == 0) { @@ -401,7 +403,7 @@ static void optmenu_draw_scaled_text(s16 x, s16 y, const u8 *str, int col, float } else { gDPSetEnvColor(gDisplayListHead++, 0, 255, 242, 255); } - print_scaled_generic_string(x, y, str, scale); + moon_draw_text(x, y, str, scale); } #include @@ -450,16 +452,16 @@ static void optmenu_draw_opt(const struct Option *opt, s16 x, s16 y, u8 sel) { lbl = base; tmpText = get_key_string( opt->type == OPT_TOGGLE ? toggleStr[(int)*opt->bval] : opt->choices[*opt->uval]); - width = (getStringWidth(lbl, scale) + 8 + getStringWidth(tmpText, scale)) / 2; + width = (moon_get_text_width(lbl, scale, FALSE) + 8 + moon_get_text_width(tmpText, scale, FALSE)) / 2; optmenu_draw_scaled_text(x - width, y, lbl, -1, scale); - optmenu_draw_scaled_text(x - width + 1 + getStringWidth(lbl, scale), y, getTranslatedText(":"), -1, scale); - optmenu_draw_scaled_text(x - width + 9 + getStringWidth(lbl, scale), y, tmpText, opt->type & OPT_TOGGLE ? (int)*opt->bval : 2, scale); + optmenu_draw_scaled_text(x - width + 1 + moon_get_text_width(lbl, scale, FALSE), y, getTranslatedText(":"), -1, scale); + optmenu_draw_scaled_text(x - width + 9 + moon_get_text_width(lbl, scale, FALSE), y, tmpText, opt->type & OPT_TOGGLE ? (int)*opt->bval : 2, scale); } switch (opt->type) { case OPT_BUTTON: lbl = base; - width = getStringWidth(lbl, scale) / 2; + width = moon_get_text_width(lbl, scale, FALSE) / 2; optmenu_draw_scaled_text(x - width, y, lbl, -1, scale); break; @@ -472,26 +474,37 @@ static void optmenu_draw_opt(const struct Option *opt, s16 x, s16 y, u8 sel) { lbl = base; int_to_str(*opt->uval, buf); - width = (getStringWidth(lbl, scale) + 9 + getStringWidth(buf, scale) + 3) / 2; + width = (moon_get_text_width(lbl, scale, FALSE) + 9 + moon_get_text_width(buf, scale, FALSE) + 3) / 2; optmenu_draw_scaled_text(x - width, y, lbl, -1, scale); - optmenu_draw_scaled_text(x - width + 1 + getStringWidth(lbl, scale), y, getTranslatedText(":"), -1, scale); - optmenu_draw_scaled_text(x - width + 9 + getStringWidth(lbl, scale), y, buf, 2, scale); - optmenu_draw_scaled_text(x - width + 9 + getStringWidth(lbl, scale) + getStringWidth(buf, scale) + 1, y, getTranslatedText("%"), 2, scale); + optmenu_draw_scaled_text(x - width + 1 + moon_get_text_width(lbl, scale, FALSE), y, getTranslatedText(":"), -1, scale); + optmenu_draw_scaled_text(x - width + 9 + moon_get_text_width(lbl, scale, FALSE), y, buf, 2, scale); + optmenu_draw_scaled_text(x - width + 9 + moon_get_text_width(lbl, scale, FALSE) + moon_get_text_width(buf, scale, FALSE) + 1, y, getTranslatedText("%"), 2, scale); break; case OPT_BIND: - x = 112; - for (u8 i = 0; i < MAX_BINDS; ++i, x += 48) { + lbl = base; + tmpText = getTranslatedText( "Test"); + + width = (moon_get_text_width(lbl, scale, FALSE)) / 2; + optmenu_draw_scaled_text(x - width, y, lbl, -1, scale); + // optmenu_draw_scaled_text(x - width + 1 + moon_get_text_width(lbl, scale), y, getTranslatedText("-"), -1, scale); + // optmenu_draw_scaled_text(x - width + 9 + moon_get_text_width(lbl, scale), y, tmpText, opt->type & OPT_TOGGLE ? (int)*opt->bval : 2, scale); + + int base_width = moon_get_text_width(lbl, scale, FALSE); + int padding = 3; + u8* txt; + + for (u8 i = 0; i < MAX_BINDS; ++i) { const u8 white = (sel && (optmenu_bind_idx == i)); // TODO: button names if (opt->uval[i] == VK_INVALID) { - if (optmenu_binding && white) - optmenu_draw_text(x, y-13, get_key_string(bindStr[1]), 1); - else - optmenu_draw_text(x, y-13, get_key_string(bindStr[0]), white); - } else { - uint_to_hex(opt->uval[i], buf); - optmenu_draw_text(x, y-13, buf, white); + txt = get_key_string(bindStr[optmenu_binding && white ? 1 : 0]); + base_width += moon_get_text_width(txt, scale, FALSE) + padding; + optmenu_draw_scaled_text(x - width + base_width, y, txt, -1, scale); + } else { + u8* txt = getTranslatedText("0000"); + base_width += moon_get_text_width(txt, scale, FALSE) + padding; + optmenu_draw_scaled_text(x - width + base_width, y, txt, -1, scale); } } break; diff --git a/src/game/segment7.h b/src/game/segment7.h index 14fc0390..74da8526 100644 --- a/src/game/segment7.h +++ b/src/game/segment7.h @@ -23,6 +23,8 @@ extern const u8 eu_course_strings_fr_table[]; extern const u8 eu_course_strings_de_table[]; #endif +extern Gfx *n64logo_N64_mesh; + // from intro_segment7 extern Gfx *titletest_test_mesh; extern Gfx *intro_seg7_dl_0700C6A0; diff --git a/src/menu/intro_geo.c b/src/menu/intro_geo.c index 1d3be071..85cfd641 100644 --- a/src/menu/intro_geo.c +++ b/src/menu/intro_geo.c @@ -8,6 +8,7 @@ #include "textures.h" #include "types.h" #include "prevent_bss_reordering.h" +#include "engine/math_util.h" #include "gfx_dimensions.h" @@ -32,6 +33,14 @@ s32 gGameOverTableIndex; s16 gTitleZoomCounter; s32 gTitleFadeCounter; +float gGlobalCounter = 0; + +s32 gTitlePingPong = 0; +float gTitlePos = 0; +float gTitleNewPos = 0; + +s32 gTitleRotationCounter = 0; + // intro screen background display lists for each of four 80x20 textures const Gfx *introBackgroundDlRows[] = { title_screen_bg_dl_0A000130, title_screen_bg_dl_0A000148, title_screen_bg_dl_0A000160, title_screen_bg_dl_0A000178 }; @@ -70,6 +79,86 @@ s8 gameOverBackgroundTable[] = { s8 gameOverBackgroundFlipOrder[] = { 0x00, 0x01, 0x02, 0x03, 0x07, 0x0B, 0x0a, 0x09, 0x08, 0x04, 0x05, 0x06 }; +float Clamp01(float value){ + if (value < 0.0) + return 0.0; + else if (value > 1.0) + return 1.0; + else + return value; +} + +// Interpolates between /a/ and /b/ by /t/. /t/ is clamped between 0 and 1. +float Lerp(float a, float b, float t) { + return a + (b - a) * Clamp01(t); +} + +Gfx *geo_n64_screen(s32 sp50, struct GraphNode *sp54, UNUSED void *context) { + struct GraphNode *graphNode; // sp4c + Gfx *displayList; // sp48 + Gfx *displayListIter; // sp44 + + Mtx *mtxDest; + Mtx *scaleMat; + Mtx *rotMat; + Mtx *transMat; + + f32 *scaleTable1; // sp3c + f32 *scaleTable2; // sp38 + f32 scaleX; // sp34 + f32 scaleY; // sp30 + f32 scaleZ; // sp2c + graphNode = sp54; + displayList = NULL; + displayListIter = NULL; + scaleTable1 = segmented_to_virtual(intro_seg7_table_0700C790); + scaleTable2 = segmented_to_virtual(intro_seg7_table_0700C880); + graphNode->flags = (graphNode->flags & 0xFF) | 0x100; + + mtxDest = alloc_display_list(3 * sizeof(*mtxDest)); + scaleMat = alloc_display_list(3 * sizeof(*scaleMat)); + rotMat = alloc_display_list(3 * sizeof(*rotMat)); + transMat = alloc_display_list(3 * sizeof(*transMat)); + + displayList = alloc_display_list(5 * sizeof(*displayList)); + displayListIter = displayList; + scaleX = 1.0f; + scaleY = 1.0f; + scaleZ = 1.0f; + guScale(scaleMat, 0, scaleY, scaleZ); + guRotate(scaleMat, 10, 1, 0, 0); + guRotate(rotMat, gTitleRotationCounter, 0, 1, 0); + //guTranslate(transMat, 0, -700 + gTitleTransCounter, 0); + guTranslate(transMat, 0, gTitlePos, 0); + + mtxf_mul(mtxDest, scaleMat, rotMat); + mtxf_mul(mtxDest, mtxDest, transMat); + + gSPMatrix(displayListIter++, mtxDest, G_MTX_MODELVIEW | G_MTX_MUL | G_MTX_PUSH); + gSPDisplayList(displayListIter++, &n64logo_N64_mesh); + gSPPopMatrix(displayListIter++, G_MTX_MODELVIEW); + gSPEndDisplayList(displayListIter); + gGlobalCounter += 1.0f; + + int range = 80; + float step = 1; + + if(gTitlePos >= range) + gTitlePingPong = 1; + else if (gTitlePos <= -range) + gTitlePingPong = 0; + + printf("%d\n", gTitlePingPong); + + gTitleNewPos += step * (gTitlePingPong ? -1 : 1); + gTitlePos = Lerp(gTitlePos, gTitleNewPos, (gGlobalCounter / 1000) * 100); + + gTitleRotationCounter += 2; + + return displayList; +} + + Gfx *geo_title_screen(s32 sp50, struct GraphNode *sp54, UNUSED void *context) { struct GraphNode *graphNode; // sp4c Gfx *displayList; // sp48 diff --git a/src/menu/intro_geo.h b/src/menu/intro_geo.h index 6fa6c84f..16b0dd93 100644 --- a/src/menu/intro_geo.h +++ b/src/menu/intro_geo.h @@ -5,6 +5,9 @@ #include #include "types.h" +// Moon64 N64 Screen +Gfx *geo_n64_screen(s32 sp50, struct GraphNode *sp54, UNUSED void *context); +// END Gfx *geo_title_screen(s32 sp50, struct GraphNode *sp54, UNUSED void *context); Gfx *geo_fade_transition(s32 sp40, struct GraphNode *sp44, UNUSED void *context); diff --git a/src/moon/moon64.cpp b/src/moon/moon64.cpp index 6c558516..44608cfb 100644 --- a/src/moon/moon64.cpp +++ b/src/moon/moon64.cpp @@ -16,11 +16,11 @@ u8 * moon_language_get_key( char* key ){ } void moon_set_language( int id ) { - Moon_SetLanguage(languages2[id]); + Moon_SetLanguage(languages[id]); } const char* moon_get_language_name( int id ) { - return languages2[id]->name.c_str(); + return languages[id]->name.c_str(); } } \ No newline at end of file diff --git a/src/moon/texts/moon-loader.cpp b/src/moon/texts/moon-loader.cpp index 4a2606d4..32cb4ba5 100644 --- a/src/moon/texts/moon-loader.cpp +++ b/src/moon/texts/moon-loader.cpp @@ -10,6 +10,7 @@ extern "C" { #include "text/text-loader.h" #include "pc/platform.h" +#include "pc/configfile.h" #include "text/libs/io_utils.h" } @@ -19,7 +20,7 @@ using namespace rapidjson; typedef GenericDocument> WDocument; typedef GenericValue> WValue; -vector languages2; +vector languages; LanguageEntry *current; @@ -115,8 +116,8 @@ void Moon_LoadLanguage( string path ) { )); } - languages2.push_back(language); - languagesAmount = languages2.size(); + languages.push_back(language); + languagesAmount = languages.size(); } u8 *Moon_GetKey(string key) { @@ -145,7 +146,7 @@ void Moon_InitLanguages( char *exePath, char *gamedir ) { closedir(dir); } - Moon_SetLanguage(languages2[0]); + Moon_SetLanguage(languages[configLanguage]); } void Moon_SetLanguage(LanguageEntry *new_language) { diff --git a/src/moon/texts/moon-loader.h b/src/moon/texts/moon-loader.h index c1e87b3f..380582a8 100644 --- a/src/moon/texts/moon-loader.h +++ b/src/moon/texts/moon-loader.h @@ -34,7 +34,7 @@ struct LanguageEntry { std::vector dialogs; }; -extern std::vector languages2; +extern std::vector languages; void Moon_LoadLanguage( std::string path ); void Moon_InitLanguages( char *exePath, char *gamedir ) ; diff --git a/src/moon/utils/moon-gfx.c b/src/moon/utils/moon-gfx.c new file mode 100644 index 00000000..4648bab0 --- /dev/null +++ b/src/moon/utils/moon-gfx.c @@ -0,0 +1,78 @@ +#include "moon-gfx.h" +#include "game/ingame_menu.h" +#include "game/game_init.h" + +f32 moon_get_text_width(u8* text, float scale, u8 colored) { + f32 size = 0; + s32 strPos = 0; + + while (text[strPos] != colored ? GLOBAR_CHAR_TERMINATOR : DIALOG_CHAR_TERMINATOR) { + if(colored) + size += (text[strPos] == GLOBAL_CHAR_SPACE ? 8.0 : 12.0) * scale; + else + size += (f32)(gDialogCharWidths[text[strPos]]) * scale; + strPos++; + } + + return size; +} + +void moon_draw_text(s16 x, s16 y, const u8 *str, float scale) { + UNUSED s8 mark = DIALOG_MARK_NONE; // unused in EU + s32 strPos = 0; + u8 lineNum = 1; + + Mtx *_Matrix = (Mtx *) alloc_display_list(sizeof(Mtx)); + if (!_Matrix) return; + create_dl_translation_matrix(MENU_MTX_PUSH, x, y, 0.0f); + guScale(_Matrix, scale, scale, 1.f); + gSPMatrix(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(_Matrix), G_MTX_MODELVIEW | G_MTX_MUL | G_MTX_NOPUSH); + + while (str[strPos] != DIALOG_CHAR_TERMINATOR) { + switch (str[strPos]) { + case DIALOG_CHAR_DAKUTEN: + mark = DIALOG_MARK_DAKUTEN; + break; + case DIALOG_CHAR_PERIOD_OR_HANDAKUTEN: + mark = DIALOG_MARK_HANDAKUTEN; + break; + case DIALOG_CHAR_NEWLINE: + gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); + create_dl_translation_matrix(MENU_MTX_PUSH, x, y - (lineNum * MAX_STRING_WIDTH), 0.0f); + lineNum++; + break; + case DIALOG_CHAR_PERIOD: + create_dl_translation_matrix(MENU_MTX_PUSH, -2.0f, -5.0f, 0.0f); + render_generic_char(DIALOG_CHAR_PERIOD_OR_HANDAKUTEN); + gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); + break; + case DIALOG_CHAR_SLASH: + create_dl_translation_matrix(MENU_MTX_NOPUSH, (f32)(gDialogCharWidths[DIALOG_CHAR_SPACE] * 2), 0.0f, 0.0f); + break; + case DIALOG_CHAR_MULTI_THE: + render_multi_text_string(STRING_THE); + break; + case DIALOG_CHAR_MULTI_YOU: + render_multi_text_string(STRING_YOU); + break; + case DIALOG_CHAR_SPACE: + create_dl_translation_matrix(MENU_MTX_NOPUSH, (f32)(gDialogCharWidths[DIALOG_CHAR_SPACE]), 0.0f, 0.0f); + break; // ? needed to match + default: + render_generic_char(str[strPos]); + if (mark != DIALOG_MARK_NONE) { + create_dl_translation_matrix(MENU_MTX_PUSH, 5.0f, 5.0f, 0.0f); + guScale(gDisplayListHead++, scale, scale, scale); + render_generic_char(mark + 0xEF); + gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); + mark = DIALOG_MARK_NONE; + } + create_dl_translation_matrix(MENU_MTX_NOPUSH, (f32)(gDialogCharWidths[str[strPos]]), 0.0f, 0.0f); + } + + strPos++; + } + + create_dl_scale_matrix(MENU_MTX_NOPUSH, 1.0f, 1.0f, 1.0f); + gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW); +} \ No newline at end of file diff --git a/src/moon/utils/moon-gfx.h b/src/moon/utils/moon-gfx.h new file mode 100644 index 00000000..4b726335 --- /dev/null +++ b/src/moon/utils/moon-gfx.h @@ -0,0 +1,8 @@ +#ifndef MoonGFX +#define MoonGFX + +#include "types.h" +f32 moon_get_text_width(u8* text, float scale, u8 colored); +void moon_draw_text(s16 x, s16 y, const u8 *str, float scale); + +#endif \ No newline at end of file diff --git a/src/text/text-loader.h b/src/text/text-loader.h index 8c7822c9..2655136a 100644 --- a/src/text/text-loader.h +++ b/src/text/text-loader.h @@ -9,7 +9,6 @@ extern u8 languagesAmount; extern struct DialogEntry* * dialogPool; extern u8* * seg2_course_name_table; extern u8* * seg2_act_name_table; -extern struct LanguageEntry* * languages; struct StringTable { char* key; diff --git a/src/text/txtconv.c b/src/text/txtconv.c index 59e09f7c..48e5d011 100644 --- a/src/text/txtconv.c +++ b/src/text/txtconv.c @@ -242,7 +242,7 @@ u8 *getTranslatedText(const char *txt){ } } } else { - printf("Loading File: missing special character found: %s\n", tmpSpecialChar); + // printf("Loading File: missing special character found: %s\n", tmpSpecialChar); } memset(tmpSpecialChar, 0, sizeof(tmpSpecialChar)); } else {