software rendering
[retroray] / src / scr_mod.c
index 29ce348..12d0d1e 100644 (file)
@@ -84,6 +84,8 @@ static int mdl_init(void)
                if(tbn_icon_name[i]) {
                        tbn_icons[i] = rtk_define_icon(icons, tbn_icon_name[i],
                                        tbn_icon_pos[i][0], tbn_icon_pos[i][1], 16, 16);
+               } else {
+                       tbn_icons[i] = 0;
                }
        }
 
@@ -135,17 +137,6 @@ static void mdl_display(void)
 
        draw_grid();
 
-       gaw_begin(GAW_QUADS);
-       gaw_color3f(1, 0, 0);
-       gaw_vertex2f(-1, -1);
-       gaw_color3f(0, 1, 0);
-       gaw_vertex2f(1, -1);
-       gaw_color3f(0, 0, 1);
-       gaw_vertex2f(1, 1);
-       gaw_color3f(1, 1, 0);
-       gaw_vertex2f(-1, 1);
-       gaw_end();
-
        gaw_viewport(0, 0, win_width, win_height);
 }
 
@@ -154,14 +145,14 @@ static void draw_grid(void)
        gaw_begin(GAW_LINES);
        gaw_color3f(0.5, 0, 0);
        gaw_vertex4f(0, 0, 0, 1);
-       gaw_vertex4f(-1, 0, 0, 0);
+       gaw_vertex4f(-100, 0, 0, 1);
        gaw_vertex4f(0, 0, 0, 1);
-       gaw_vertex4f(1, 0, 0, 0);
+       gaw_vertex4f(100, 0, 0, 1);
        gaw_color3f(0, 0.5, 0);
        gaw_vertex4f(0, 0, 0, 1);
-       gaw_vertex4f(0, 0, -1, 0);
+       gaw_vertex4f(0, 0, -100, 1);
        gaw_vertex4f(0, 0, 0, 1);
-       gaw_vertex4f(0, 0, 1, 0);
+       gaw_vertex4f(0, 0, 100, 1);
        gaw_end();
 }