Added mike.c for testing
authorMichael Georgoulopoulos <mgeorgoulopoulos@gmail.com>
Thu, 1 Sep 2016 00:29:33 +0000 (03:29 +0300)
committerMichael Georgoulopoulos <mgeorgoulopoulos@gmail.com>
Thu, 1 Sep 2016 00:29:33 +0000 (03:29 +0300)
.gitignore
dosdemo.vcxproj
dosdemo.vcxproj.filters
src/mike.c [new file with mode: 0644]
src/screen.c

index 8fd165c..27e5618 100644 (file)
@@ -22,3 +22,5 @@ demo
 *.zip
 data
 *.a
+\r
+/SDL.dll\r
index 0199594..d964fdb 100644 (file)
@@ -87,6 +87,7 @@
     <ClCompile Include="src\demo.c" />\r
     <ClCompile Include="src\fract.c" />\r
     <ClCompile Include="src\gfxutil.c" />\r
+    <ClCompile Include="src\mike.c" />\r
     <ClCompile Include="src\screen.c" />\r
     <ClCompile Include="src\sdl\main.c" />\r
     <ClCompile Include="src\tunnel.c" />\r
index 40e402e..a922489 100644 (file)
@@ -28,6 +28,9 @@
     <ClCompile Include="src\gfxutil.c">\r
       <Filter>src</Filter>\r
     </ClCompile>\r
+    <ClCompile Include="src\mike.c">\r
+      <Filter>src</Filter>\r
+    </ClCompile>\r
   </ItemGroup>\r
   <ItemGroup>\r
     <ClInclude Include="src\demo.h">\r
diff --git a/src/mike.c b/src/mike.c
new file mode 100644 (file)
index 0000000..f985886
--- /dev/null
@@ -0,0 +1,66 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+#include <assert.h>
+#include "imago2.h"
+#include "demo.h"
+#include "screen.h"
+
+static int init(void);
+static void destroy(void);
+static void start(long trans_time);
+static void stop(long trans_time);
+static void draw(void);
+
+static struct screen scr = {
+       "mike",
+       init,
+       destroy,
+       start,
+       stop,
+       draw
+};
+
+struct screen *mike_screen(void)
+{
+       return &scr;
+}
+
+
+static int init(void)
+{
+       return 0;
+}
+
+static void destroy(void)
+{
+}
+
+static void start(long trans_time)
+{
+       if(trans_time) {
+               
+       }
+}
+
+static void stop(long trans_time)
+{
+       if(trans_time) {
+
+       }
+}
+
+static void draw(void)
+{      
+       unsigned short *pixels = fb_pixels;
+
+       int j, i;
+       for (j = 0; j < fb_height; j++) {
+               for (i = 0; i < fb_width; i++) {
+                       *pixels++ = 0xF800;
+               }
+       }
+}
+
+
index 2387d52..178cf7d 100644 (file)
@@ -7,6 +7,7 @@
 
 struct screen *tunnel_screen(void);
 struct screen *fract_screen(void);
+struct screen *mike_screen(void);
 
 #define NUM_SCR        32
 static struct screen *scr[NUM_SCR];
@@ -25,6 +26,9 @@ int scr_init(void)
        if(!(scr[idx++] = fract_screen())) {
                return -1;
        }
+       if (!(scr[idx++] = mike_screen())) {
+               return -1;
+       }
        num_screens = idx;
 
        assert(num_screens <= NUM_SCR);