summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/pso/TMainTask.h1
-rw-r--r--src/pso/TMainTask.cpp23
2 files changed, 24 insertions, 0 deletions
diff --git a/include/pso/TMainTask.h b/include/pso/TMainTask.h
index d90216c..7ab182f 100644
--- a/include/pso/TMainTask.h
+++ b/include/pso/TMainTask.h
@@ -52,6 +52,7 @@ public:
virtual ~TMainTask();
virtual void run_task();
virtual void render();
+ virtual void render_shadows();
private:
void set_task_flags(u32 flags) {
this->task_flags |= flags;
diff --git a/src/pso/TMainTask.cpp b/src/pso/TMainTask.cpp
index 7045d21..7e543bf 100644
--- a/src/pso/TMainTask.cpp
+++ b/src/pso/TMainTask.cpp
@@ -13,8 +13,12 @@ u32 update_flags;
u32 old_update_flags;
u32 render_flags;
u32 old_render_flags;
+u32 render_shadow_flags;
+u32 old_render_shadow_flags;
u32 some_id_805c6f74;
+void camera_stuff() {}
+
void set_depth_buffer_settings_1() {}
void set_depth_buffer_settings_2() {}
void set_depth_buffer_settings_3() {}
@@ -22,6 +26,7 @@ void set_depth_buffer_settings_id(u32 id) {}
void save_depth_buffer_settings() {}
void restore_depth_buffer_settings() {}
+void func_80083a00() {}
void func_80141618() {}
void func_803db618(u32 arg1) {}
void func_803e11e8(u32 arg1) {}
@@ -164,6 +169,24 @@ void TMainTask::run_task() {
set_task_flags(0x80);
}
+void TMainTask::render_shadows() {
+ tl_particlemodel->disallow_rendering_shadows();
+ camera_stuff();
+ DISALLOW_OR_ALLOW_CHILD(render_shadow_flags, old_render_shadow_flags, rendering_shadows);
+
+ set_depth_buffer_settings_2();
+ set_depth_buffer_settings_id(1);
+ save_depth_buffer_settings();
+
+ render_shadows_for_each_node();
+ func_80083a00();
+
+ tl_particlemodel->allow_rendering_shadows();
+ tl_particlemodel->render_shadows_for_each_node();
+
+ restore_depth_buffer_settings();
+}
+
TMainTask::~TMainTask() {
delete_children();
delete alt_heap;