From c2a969692e1f9cb4b822d934fedc508a997ab3d3 Mon Sep 17 00:00:00 2001 From: mrb0nk500 Date: Sat, 11 Feb 2023 15:24:10 -0400 Subject: TMainTask: Add, and match `render_clipout_and_fade()` --- context.h | 3 ++- include/pso/TMainTask.h | 3 ++- src/pso/TMainTask.cpp | 23 +++++++++++++++++++++++ 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/context.h b/context.h index 0421a89..041ef81 100644 --- a/context.h +++ b/context.h @@ -317,8 +317,9 @@ public: void unused_render_func(); void render_objects(); void render_ui(); - + void render_clipout_and_fade(); void init_main_task(); + virtual ~TMainTask(); virtual void run_task(); virtual void render(); diff --git a/include/pso/TMainTask.h b/include/pso/TMainTask.h index 7ab182f..6de10f7 100644 --- a/include/pso/TMainTask.h +++ b/include/pso/TMainTask.h @@ -47,8 +47,9 @@ public: void unused_render_func(); void render_objects(); void render_ui(); - + void render_clipout_and_fade(); void init_main_task(); + virtual ~TMainTask(); virtual void run_task(); virtual void render(); diff --git a/src/pso/TMainTask.cpp b/src/pso/TMainTask.cpp index 7e543bf..337e8cd 100644 --- a/src/pso/TMainTask.cpp +++ b/src/pso/TMainTask.cpp @@ -160,6 +160,29 @@ void TMainTask::render() { set_task_flags(0x100); } +void TMainTask::render_clipout_and_fade() { + u32 some_id; + set_task_flags(2); + + set_depth_buffer_settings_2(); + set_depth_buffer_settings_id(1); + save_depth_buffer_settings(); + some_id = some_id_805c6f74; + func_803db618(1); + + tl_clipout->allow_rendering(); + tl_clipout->render_nodes(); + tl_fade->allow_rendering(); + tl_fade->render_nodes(); + tl_fadeafter->allow_rendering(); + tl_fadeafter->render_nodes(); + + func_803db618(some_id); + restore_depth_buffer_settings(); + + clear_task_flags(2); +}; + void TMainTask::run_task() { SET_OR_CLEAR_CHILD_FLAGS(update_flags, old_update_flags, 3); some_main_task_flag = 0; -- cgit v1.2.3-13-gbd6f