gate frame fix
[carveJwlIkooP6JGAAIwe30JlM.git] / world_sfd.h
index 515232cf31dc8daea63fe5c6671359f7d8a40be0..c6fa66b0fdb49942485fb85c8fb3ab022fc22132 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef SFD_H
 #define SFD_H
 
-#include "common.h"
-#include "model.h"
 #include "world.h"
 
 #include "shaders/scoretext.h"
@@ -11,25 +9,9 @@
 vg_tex2d tex_scoretext = { .path = "textures/scoretext.qoi",
                            .flags = VG_TEXTURE_CLAMP|VG_TEXTURE_NEAREST };
 
-struct sfd_instance
-{
-   float *buffer;
-
-   u32 w,h;
-};
-
-
-struct subworld_sfd
-{
-   scene mesh;
-   mdl_submesh *sm_module, *sm_card;
-   glmesh temp;
-
-   struct sfd_instance tester;
-};
-
-static struct subworld_sfd *subworld_sfd(void);
-
+/* 
+ * TODO: utf-8 -> ascii
+ */
 
 float sfd_encode_glyph( char c )
 {
@@ -120,7 +102,7 @@ static void sfd_update( struct sfd_instance *display )
 static void sfd_render( struct sfd_instance *display, 
                         m4x4f projection, v3f camera, m4x3f transform )
 {
-   struct subworld_sfd *sfd = subworld_sfd();
+   struct subworld_sfd *sfd = &world.sfd;
    scene_bind( &sfd->mesh );
 
    shader_scoretext_use();
@@ -160,7 +142,7 @@ static void sfd_render( struct sfd_instance *display,
 
 static int world_sfd_test( int argc, const char *argv[] )
 {
-   struct subworld_sfd *sfd = subworld_sfd();
+   struct subworld_sfd *sfd = &world.sfd;
 
    if( argc == 2 )
    {
@@ -173,7 +155,7 @@ static int world_sfd_test( int argc, const char *argv[] )
 
 static void world_sfd_init(void)
 {
-   struct subworld_sfd *sfd = subworld_sfd();
+   struct subworld_sfd *sfd = &world.sfd;
 
        vg_function_push( (struct vg_cmd){
                .name = "sfd",