# Copyright (C) 2007  Peter De Wachter <pdewacht@gmail.com>
# Distributed under the same license as the game. See debian/copyright.

Sat Aug 25 23:57:31 CEST 2007  pdewacht@gmail.com
  * 05_remove_windows_code
diff -rN -u old-a7xpg/src/abagames/a7xpg/A7xBoot.d new-a7xpg/src/abagames/a7xpg/A7xBoot.d
--- old-a7xpg/src/abagames/a7xpg/A7xBoot.d	2007-08-26 00:03:10.000000000 +0200
+++ new-a7xpg/src/abagames/a7xpg/A7xBoot.d	2007-08-26 00:03:10.000000000 +0200
@@ -29,8 +29,7 @@
 }
 
 private void parseArgs(char[][] args) {
-  //for (int i = 1; i < argv.length; i++) {
-  for (int i = 0; i < args.length; i++) {
+  for (int i = 1; i < args.length; i++) {
     switch (args[i]) {
     case "-brightness":
       if (i >= args.length - 1) {
@@ -77,9 +76,7 @@
   }
 }
 
-//public int main(char[][] argc) {
-private int boot(char[] argl) {
-  char[][] args = split(argl);
+public int main(char[][] args) {
   screen = new A7xScreen;
   input = new Input;
   try {
@@ -92,32 +89,3 @@
   mainLoop.loop();
   return EXIT_SUCCESS;
 }
-
-// Boot as the windows executable.
-import windows;
-
-extern (C) void gc_init();
-extern (C) void gc_term();
-extern (C) void _minit();
-extern (C) void _moduleCtor();
-
-extern (Windows)
-int WinMain(HINSTANCE hInstance,
-	    HINSTANCE hPrevInstance,
-	    LPSTR lpCmdLine,
-	    int nCmdShow) {
-  int result;
-  
-  gc_init();
-  _minit();
-  try {
-    _moduleCtor();
-    result = boot(string.toString(lpCmdLine));
-  } catch (Object o) {
-    MessageBoxA(null, (char *)o.toString(), "Error",
-		MB_OK | MB_ICONEXCLAMATION);
-    result = 0;
-  }
-  gc_term();
-  return result;
-}

