summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/cutScene.cpp59
-rw-r--r--src/cutScene.h25
2 files changed, 84 insertions, 0 deletions
diff --git a/src/cutScene.cpp b/src/cutScene.cpp
new file mode 100644
index 0000000..27fbafc
--- /dev/null
+++ b/src/cutScene.cpp
@@ -0,0 +1,59 @@
+#include "cutScene.h"
+
+dScCutScene_c *dScCutScene_c::instance = 0;
+
+dScCutScene_c *dScCutScene_c::build() {
+ // return new dScCutScene_c;
+ void *buffer = AllocFromGameHeap1(sizeof(dScCutScene_c));
+ dScCutScene_c *c = new(buffer) dScCutScene_c;
+
+ instance = c;
+ return c;
+}
+
+dScCutScene_c::dScCutScene_c() : state(this) {
+}
+
+
+
+int dScCutScene_c::onCreate() {
+ *CurrentDrawFunc = CutSceneDrawFunc;
+
+ return true;
+}
+
+int dScCutScene_c::onDelete() {
+ return true;
+}
+
+int dScCutScene_c::onExecute() {
+ return true;
+}
+
+int dScCutScene_c::onDraw() {
+ return true;
+}
+
+void CutSceneDrawFunc() {
+ Reset3DState();
+ SetupLYTDrawing();
+ DrawAllLayoutsBeforeX(0x81);
+ RenderEffects(0, 3);
+ RenderEffects(0, 2);
+ GXDrawDone();
+ RemoveAllFromScnRoot();
+ Reset3DState();
+ SetCurrentCameraID(1);
+ DoSpecialDrawing1();
+ SetCurrentCameraID(0);
+ for (int i = 0; i < 4; i++)
+ RenderEffects(0, 0xB+i);
+ for (int i = 0; i < 4; i++)
+ RenderEffects(0, 7+i);
+ GXDrawDone();
+ // Leaving out some stuff here
+ DrawAllLayoutsAfterX(0x80);
+ ClearLayoutDrawList();
+ SetCurrentCameraID(0);
+}
+
diff --git a/src/cutScene.h b/src/cutScene.h
new file mode 100644
index 0000000..e875822
--- /dev/null
+++ b/src/cutScene.h
@@ -0,0 +1,25 @@
+#ifndef __CUT_SCENE_H
+#define __CUT_SCENE_H
+
+#include <common.h>
+#include <game.h>
+#include <g3dhax.h>
+#include <sfx.h>
+
+void CutSceneDrawFunc();
+
+class dScCutScene_c : public dScene_c {
+ public:
+ dScCutScene_c();
+
+ int onCreate();
+ int onDelete();
+ int onExecute();
+ int onDraw();
+
+ static dScCutScene_c *build();
+ static dScCutScene_c *instance;
+};
+
+#endif
+