mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2025-01-22 23:52:15 -05:00
Expose title screen geo functions to DynOS (#246)
* Expose title screen level/geo stuff * Move builtin defines
This commit is contained in:
parent
cc3b314096
commit
85afeb6402
7 changed files with 33 additions and 1 deletions
|
@ -9,6 +9,7 @@ extern "C" {
|
||||||
#include "src/game/level_update.h"
|
#include "src/game/level_update.h"
|
||||||
#include "include/dialog_ids.h"
|
#include "include/dialog_ids.h"
|
||||||
#include "levels/scripts.h"
|
#include "levels/scripts.h"
|
||||||
|
#include "levels/menu/header.h"
|
||||||
#include "src/game/area.h"
|
#include "src/game/area.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -308,6 +309,7 @@ s64 DynOS_Lvl_ParseLevelScriptConstants(const String& _Arg, bool* found) {
|
||||||
|
|
||||||
// global scripts
|
// global scripts
|
||||||
lvl_constant(level_main_scripts_entry);
|
lvl_constant(level_main_scripts_entry);
|
||||||
|
lvl_constant(level_main_menu_entry_1);
|
||||||
lvl_constant(script_func_global_1);
|
lvl_constant(script_func_global_1);
|
||||||
lvl_constant(script_func_global_2);
|
lvl_constant(script_func_global_2);
|
||||||
lvl_constant(script_func_global_3);
|
lvl_constant(script_func_global_3);
|
||||||
|
@ -365,6 +367,7 @@ s64 DynOS_Lvl_ParseLevelScriptConstants(const String& _Arg, bool* found) {
|
||||||
|
|
||||||
// Other constants
|
// Other constants
|
||||||
lvl_constant(NULL);
|
lvl_constant(NULL);
|
||||||
|
lvl_constant(TRUE);
|
||||||
lvl_constant(FALSE);
|
lvl_constant(FALSE);
|
||||||
|
|
||||||
*found = false;
|
*found = false;
|
||||||
|
|
|
@ -21,6 +21,8 @@ extern "C" {
|
||||||
#include "game/behavior_actions.h"
|
#include "game/behavior_actions.h"
|
||||||
#include "game/rendering_graph_node.h"
|
#include "game/rendering_graph_node.h"
|
||||||
#include "game/skybox.h"
|
#include "game/skybox.h"
|
||||||
|
#include "menu/level_select_menu.h"
|
||||||
|
#include "menu/intro_geo.h"
|
||||||
|
|
||||||
#include "actors/common0.h"
|
#include "actors/common0.h"
|
||||||
#include "actors/common1.h"
|
#include "actors/common1.h"
|
||||||
|
@ -78,6 +80,7 @@ extern "C" {
|
||||||
#include "levels/wdw/header.h"
|
#include "levels/wdw/header.h"
|
||||||
#include "levels/wf/header.h"
|
#include "levels/wf/header.h"
|
||||||
#include "levels/wmotr/header.h"
|
#include "levels/wmotr/header.h"
|
||||||
|
#include "levels/menu/header.h"
|
||||||
|
|
||||||
#include "dynos_mgr_builtin_externs.h"
|
#include "dynos_mgr_builtin_externs.h"
|
||||||
#include "textures.h"
|
#include "textures.h"
|
||||||
|
@ -175,6 +178,7 @@ static const void* sDynosBuiltinScriptPtrs[] = {
|
||||||
define_builtin(level_wdw_entry),
|
define_builtin(level_wdw_entry),
|
||||||
define_builtin(level_wf_entry),
|
define_builtin(level_wf_entry),
|
||||||
define_builtin(level_wmotr_entry),
|
define_builtin(level_wmotr_entry),
|
||||||
|
define_builtin(level_main_menu_entry_1),
|
||||||
};
|
};
|
||||||
|
|
||||||
const void* DynOS_Builtin_ScriptPtr_GetFromName(const char* aDataName) {
|
const void* DynOS_Builtin_ScriptPtr_GetFromName(const char* aDataName) {
|
||||||
|
@ -1900,6 +1904,13 @@ static const void* sDynosBuiltinFuncs[] = {
|
||||||
// Other
|
// Other
|
||||||
define_builtin(load_object_collision_model),
|
define_builtin(load_object_collision_model),
|
||||||
define_builtin(obj_set_secondary_camera_focus),
|
define_builtin(obj_set_secondary_camera_focus),
|
||||||
|
|
||||||
|
// Menu related
|
||||||
|
define_builtin(lvl_intro_update),
|
||||||
|
define_builtin(geo_intro_super_mario_64_logo),
|
||||||
|
define_builtin(geo_intro_tm_copyright),
|
||||||
|
define_builtin(geo_intro_regular_backdrop),
|
||||||
|
define_builtin(geo_draw_mario_head_goddard),
|
||||||
};
|
};
|
||||||
|
|
||||||
const void* DynOS_Builtin_Func_GetFromName(const char* aDataName) {
|
const void* DynOS_Builtin_Func_GetFromName(const char* aDataName) {
|
||||||
|
|
|
@ -1680,6 +1680,10 @@ void handle_controller_cursor_input(void) {
|
||||||
if (sCursorPos[1] < -90.0f) {
|
if (sCursorPos[1] < -90.0f) {
|
||||||
sCursorPos[1] = -90.0f;
|
sCursorPos[1] = -90.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (sCursorClickingTimer == 0) {
|
||||||
|
handle_cursor_button_input();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -63,6 +63,8 @@ static Gfx *sIntroScalePos;
|
||||||
static Vec3f sIntroScale;
|
static Vec3f sIntroScale;
|
||||||
static Vec3f sIntroScalePrev;
|
static Vec3f sIntroScalePrev;
|
||||||
|
|
||||||
|
bool skipInterpolationTitleScreen = false;
|
||||||
|
|
||||||
void patch_title_screen_before(void) {
|
void patch_title_screen_before(void) {
|
||||||
sIntroScalePos = NULL;
|
sIntroScalePos = NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,8 @@
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "engine/graph_node.h"
|
#include "engine/graph_node.h"
|
||||||
|
|
||||||
|
extern bool skipInterpolationTitleScreen;
|
||||||
|
|
||||||
Gfx *geo_intro_super_mario_64_logo(s32 sp50, struct GraphNode *sp54, UNUSED void *context);
|
Gfx *geo_intro_super_mario_64_logo(s32 sp50, struct GraphNode *sp54, UNUSED void *context);
|
||||||
Gfx *geo_intro_tm_copyright(s32 sp40, struct GraphNode *sp44, UNUSED void *context);
|
Gfx *geo_intro_tm_copyright(s32 sp40, struct GraphNode *sp44, UNUSED void *context);
|
||||||
Gfx *geo_intro_regular_backdrop(s32 sp48, struct GraphNode *sp4c, UNUSED void *context);
|
Gfx *geo_intro_regular_backdrop(s32 sp48, struct GraphNode *sp4c, UNUSED void *context);
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
#include "seq_ids.h"
|
#include "seq_ids.h"
|
||||||
#include "sm64.h"
|
#include "sm64.h"
|
||||||
#include "pc/lua/utils/smlua_level_utils.h"
|
#include "pc/lua/utils/smlua_level_utils.h"
|
||||||
|
#include "menu/intro_geo.h"
|
||||||
|
|
||||||
#define PRESS_START_DEMO_TIMER 800
|
#define PRESS_START_DEMO_TIMER 800
|
||||||
|
|
||||||
|
@ -249,6 +250,13 @@ s32 lvl_intro_update(s16 arg1, UNUSED s32 arg2) {
|
||||||
case 3:
|
case 3:
|
||||||
retVar = level_select_input_loop();
|
retVar = level_select_input_loop();
|
||||||
break;
|
break;
|
||||||
|
case 4:
|
||||||
|
gGlobalTimer = 0;
|
||||||
|
skipInterpolationTitleScreen = true;
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
skipInterpolationTitleScreen = false;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
return retVar;
|
return retVar;
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,6 +54,8 @@
|
||||||
|
|
||||||
#include "pc/mods/mods.h"
|
#include "pc/mods/mods.h"
|
||||||
|
|
||||||
|
#include "menu/intro_geo.h"
|
||||||
|
|
||||||
OSMesg D_80339BEC;
|
OSMesg D_80339BEC;
|
||||||
OSMesgQueue gSIEventMesgQueue;
|
OSMesgQueue gSIEventMesgQueue;
|
||||||
|
|
||||||
|
@ -171,7 +173,7 @@ void produce_interpolation_frames_and_delay(void) {
|
||||||
gfx_start_frame();
|
gfx_start_frame();
|
||||||
f32 delta = MIN((curTime - sFrameTimeStart) / (sFrameTargetTime - sFrameTimeStart), 1);
|
f32 delta = MIN((curTime - sFrameTimeStart) / (sFrameTargetTime - sFrameTimeStart), 1);
|
||||||
gRenderingDelta = delta;
|
gRenderingDelta = delta;
|
||||||
patch_interpolations(delta);
|
if (!skipInterpolationTitleScreen) { patch_interpolations(delta); }
|
||||||
send_display_list(gGfxSPTask);
|
send_display_list(gGfxSPTask);
|
||||||
gfx_end_frame();
|
gfx_end_frame();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue