aboutsummaryrefslogtreecommitdiff
path: root/src/scene33.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/scene33.c')
-rw-r--r--src/scene33.c45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/scene33.c b/src/scene33.c
new file mode 100644
index 0000000..00bd177
--- /dev/null
+++ b/src/scene33.c
@@ -0,0 +1,45 @@
+#include "logger33.h"
+#include "scene33.h"
+#include "strings33.h"
+
+
+Scene33 __scene = {0,};
+
+
+Error scene33_init( void )
+{
+ Size i;
+
+ Vec4 verts[ GFX33_QUAD_VERTEX_COUNT ] = GFX33_QUAD_VERTICES;
+ ModelEdge33 medge[ GFX33_QUAD_EDGE_COUNT ] = GFX33_QUAD_MEDGES;
+ Size sedge[ GFX33_QUAD_SEDGE_COUNT ] = GFX33_QUAD_SEDGES;
+
+ __scene.cube.vertices = malloc( sizeof(Vec4) * GFX33_QUAD_VERTEX_COUNT );
+ __scene.cube.medges = malloc( sizeof(ModelEdge33) * GFX33_QUAD_EDGE_COUNT );
+ __scene.cube.sedges = malloc( sizeof(Size) * GFX33_QUAD_SEDGE_COUNT );
+
+ memcpy( __scene.cube.vertices, verts, sizeof(Vec4) * GFX33_QUAD_VERTEX_COUNT );
+ memcpy( __scene.cube.medges, medge, sizeof(ModelEdge33) * GFX33_QUAD_EDGE_COUNT );
+ memcpy( __scene.cube.sedges, sedge, sizeof(Size) * GFX33_QUAD_SEDGE_COUNT );
+
+ __scene.cube.vertexCount = GFX33_QUAD_VERTEX_COUNT;
+ __scene.cube.edgeCount = GFX33_QUAD_EDGE_COUNT;
+ __scene.cube.surfaceCount = GFX33_QUAD_SFACE_COUNT;
+
+ __scene.cube.t[2] = 10.0;
+ __scene.cube.s[0] = 1.0;
+ __scene.cube.s[1] = 1.0;
+ __scene.cube.s[2] = 1.0;
+
+ return E33_EXIT_SUCCESS;
+}
+
+
+Error scene33_term( void )
+{
+ free( __scene.cube.vertices );
+ free( __scene.cube.medges );
+ free( __scene.cube.sedges );
+
+ return E33_EXIT_SUCCESS;
+}