#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; }