OSDN Git Service

okies~
authorsparky4 <sparky4@cock.li>
Tue, 11 Oct 2016 21:24:08 +0000 (16:24 -0500)
committersparky4 <sparky4@cock.li>
Tue, 11 Oct 2016 21:24:08 +0000 (16:24 -0500)
16/_6_tail.c [deleted file]
16/_6_tail.h [deleted file]
src/lib/16_mm.c
src/lib/16_tail.c
src/lib/16_tail.h
swaptail.sh [deleted file]

diff --git a/16/_6_tail.c b/16/_6_tail.c
deleted file mode 100755 (executable)
index 6d66ec1..0000000
+++ /dev/null
@@ -1,194 +0,0 @@
-/* Project 16 Source Code~\r
- * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover\r
- *\r
- * This file is part of Project 16.\r
- *\r
- * Project 16 is free software; you can redistribute it and/or modify\r
- * it under the terms of the GNU General Public License as published by\r
- * the Free Software Foundation; either version 3 of the License, or\r
- * (at your option) any later version.\r
- *\r
- * Project 16 is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
- * GNU General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU General Public License\r
- * along with this program.  If not, see <http://www.gnu.org/licenses/>, or\r
- * write to the Free Software Foundation, Inc., 51 Franklin Street,\r
- * Fifth Floor, Boston, MA 02110-1301 USA.\r
- *\r
- */\r
-/*\r
- * 16 library\r
- */\r
-\r
-#include "src/lib/16_tail.h"\r
-\r
-/*\r
-==========================\r
-=\r
-= Startup16\r
-=\r
-= Load a few things right away\r
-=\r
-==========================\r
-*/\r
-\r
-void Startup16(global_game_variables_t *gvar)\r
-{\r
-       // DOSLIB: check our environment\r
-       probe_dos();\r
-\r
-       // DOSLIB: what CPU are we using?\r
-       // NTS: I can see from the makefile Sparky4 intends this to run on 8088 by the -0 switch in CFLAGS.\r
-       //      So this code by itself shouldn't care too much what CPU it's running on. Except that other\r
-       //      parts of this project (DOSLIB itself) rely on CPU detection to know what is appropriate for\r
-       //      the CPU to carry out tasks. --J.C.\r
-       cpu_probe();\r
-\r
-       // DOSLIB: check for VGA\r
-       if (!probe_vga()) {\r
-               printf("VGA probe failed\n");\r
-               return;\r
-       }\r
-       // hardware must be VGA or higher!\r
-       if (!(vga_state.vga_flags & VGA_IS_VGA)) {\r
-               printf("This program requires VGA or higher graphics hardware\n");\r
-               return;\r
-       }\r
-\r
-       gvar->mm.mmstarted=0;\r
-       gvar->pm.PMStarted=0;\r
-       MM_Startup(gvar);\r
-       IN_Startup(gvar);\r
-       PM_Startup(gvar);\r
-       PM_UnlockMainMem(gvar);\r
-       CA_Startup(gvar);\r
-\r
-}\r
-\r
-//===========================================================================\r
-\r
-/*\r
-==========================\r
-=\r
-= Shutdown16\r
-=\r
-= Shuts down all ID_?? managers\r
-=\r
-==========================\r
-*/\r
-\r
-void Shutdown16(global_game_variables_t *gvar)\r
-{\r
-       PM_Shutdown(gvar);\r
-       IN_Shutdown(gvar);\r
-       CA_Shutdown(gvar);\r
-       MM_Shutdown(gvar);\r
-}\r
-\r
-\r
-//===========================================================================\r
-\r
-/*\r
-==================\r
-=\r
-= DebugMemory\r
-=\r
-==================\r
-*/\r
-\r
-void DebugMemory_(global_game_variables_t *gvar, boolean q)\r
-{\r
-       /*VW_FixRefreshBuffer ();\r
-       US_CenterWindow (16,7);\r
-\r
-       US_CPrint ("Memory Usage");\r
-       US_CPrint ("------------");\r
-       US_Print ("Total     :");\r
-       US_PrintUnsigned (mminfo.mainmem/1024);\r
-       US_Print ("k\nFree      :");\r
-       US_PrintUnsigned (MM_UnusedMemory()/1024);\r
-       US_Print ("k\nWith purge:");\r
-       US_PrintUnsigned (MM_TotalFree()/1024);\r
-       US_Print ("k\n");\r
-       VW_UpdateScreen();*/\r
-       if(q){\r
-       printf("========================================\n");\r
-       printf("                DebugMemory_\n");\r
-       printf("========================================\n");}\r
-       if(q) { printf("Memory Usage\n");\r
-       printf("------------\n"); }else printf("        %c%c", 0xD3, 0xC4);\r
-       printf("Total:  "); if(q) printf("      "); printf("%uk", gvar->mmi.mainmem/1024);\r
-       if(q) printf("\n"); else printf("       ");\r
-       printf("Free:   "); if(q) printf("      "); printf("%uk", MM_UnusedMemory(gvar)/1024);\r
-       if(q) printf("\n"); else printf("       ");\r
-       printf("With purge:"); if(q) printf("   "); printf("%uk\n", MM_TotalFree(gvar)/1024);\r
-       if(q) printf("------------\n");\r
-#ifdef __WATCOMC__\r
-       IN_Ack ();\r
-#endif\r
-       if(q) MM_ShowMemory (gvar);\r
-}\r
-#ifdef __WATCOMC__\r
-/*\r
-==========================\r
-=\r
-= Quit\r
-=\r
-==========================\r
-*/\r
-\r
-void Quit (char *error)\r
-{\r
-       unsigned        finscreen;\r
-       memptr  screen;\r
-       union REGS in, out;\r
-\r
-       //ClearMemory ();\r
-       if (!*error)\r
-       {\r
-        //WriteConfig ();\r
-       }\r
-       else\r
-       {\r
-        //CA_CacheGrChunk (ERRORSCREEN);\r
-        //screen = grsegs[ERRORSCREEN];\r
-       }\r
-\r
-       //ShutdownId ();\r
-       IN_Shutdown();\r
-       //modexLeave();\r
-       in.h.ah = 0x00;\r
-       in.h.al = 0x3;\r
-       int86(0x10, &in, &out);\r
-\r
-       if (error && *error)\r
-       {\r
-         //movedata ((unsigned)screen,7,0xb800,0,7*160);\r
-         //gotoxy (10,4);\r
-         fprintf(stderr, "%s\n", error);\r
-         //gotoxy (1,8);\r
-         exit(1);\r
-       }\r
-       else\r
-       if (!error || !(*error))\r
-       {\r
-               //clrscr();\r
-               //#ifndef JAPAN\r
-               movedata ((unsigned)screen,7,0xb800,0,4000);\r
-               //gotoxy(1,24);\r
-               //#endif\r
-//asm  mov     bh,0\r
-//asm  mov     dh,23   // row\r
-//asm  mov     dl,0    // collumn\r
-//asm  mov ah,2\r
-//asm  int     0x10\r
-       }\r
-\r
-       exit(0);\r
-}\r
-#endif\r
-\r
-//===========================================================================\r
diff --git a/16/_6_tail.h b/16/_6_tail.h
deleted file mode 100755 (executable)
index 6dddc51..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/* Project 16 Source Code~\r
- * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover\r
- *\r
- * This file is part of Project 16.\r
- *\r
- * Project 16 is free software; you can redistribute it and/or modify\r
- * it under the terms of the GNU General Public License as published by\r
- * the Free Software Foundation; either version 3 of the License, or\r
- * (at your option) any later version.\r
- *\r
- * Project 16 is distributed in the hope that it will be useful,\r
- * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
- * GNU General Public License for more details.\r
- *\r
- * You should have received a copy of the GNU General Public License\r
- * along with this program.  If not, see <http://www.gnu.org/licenses/>, or\r
- * write to the Free Software Foundation, Inc., 51 Franklin Street,\r
- * Fifth Floor, Boston, MA 02110-1301 USA.\r
- *\r
- */\r
-\r
-#ifndef        __16_TAIL__\r
-#define        __16_TAIL__\r
-\r
-#include "src/lib/16_head.h"\r
-#include "src/lib/16_pm.h"\r
-#include "src/lib/16_mm.h"\r
-#include "src/lib/16_in.h"\r
-\r
-void DebugMemory_(global_game_variables_t *gvar, boolean q);\r
-#ifdef __WATCOMC__\r
-void Quit (char *error);\r
-#endif\r
-\r
-#endif\r
index 9c8bcdb..d40c40e 100755 (executable)
@@ -903,11 +903,11 @@ goto xmsskip;//0000
        }
 
        }
+xmsskip:
 #endif
 //
 // allocate the misc buffer
 //
-xmsskip:
        gvar->mm.mmrover = gvar->mm.mmhead;             // start looking for space after low block
 
        MM_GetPtr(&(gvar->mm.bufferseg),BUFFERSIZE, gvar);
index 8ebc0c3..6d66ec1 100755 (executable)
 \r
 #include "src/lib/16_tail.h"\r
 \r
+/*\r
+==========================\r
+=\r
+= Startup16\r
+=\r
+= Load a few things right away\r
+=\r
+==========================\r
+*/\r
+\r
+void Startup16(global_game_variables_t *gvar)\r
+{\r
+       // DOSLIB: check our environment\r
+       probe_dos();\r
+\r
+       // DOSLIB: what CPU are we using?\r
+       // NTS: I can see from the makefile Sparky4 intends this to run on 8088 by the -0 switch in CFLAGS.\r
+       //      So this code by itself shouldn't care too much what CPU it's running on. Except that other\r
+       //      parts of this project (DOSLIB itself) rely on CPU detection to know what is appropriate for\r
+       //      the CPU to carry out tasks. --J.C.\r
+       cpu_probe();\r
+\r
+       // DOSLIB: check for VGA\r
+       if (!probe_vga()) {\r
+               printf("VGA probe failed\n");\r
+               return;\r
+       }\r
+       // hardware must be VGA or higher!\r
+       if (!(vga_state.vga_flags & VGA_IS_VGA)) {\r
+               printf("This program requires VGA or higher graphics hardware\n");\r
+               return;\r
+       }\r
+\r
+       gvar->mm.mmstarted=0;\r
+       gvar->pm.PMStarted=0;\r
+       MM_Startup(gvar);\r
+       IN_Startup(gvar);\r
+       PM_Startup(gvar);\r
+       PM_UnlockMainMem(gvar);\r
+       CA_Startup(gvar);\r
+\r
+}\r
+\r
+//===========================================================================\r
+\r
+/*\r
+==========================\r
+=\r
+= Shutdown16\r
+=\r
+= Shuts down all ID_?? managers\r
+=\r
+==========================\r
+*/\r
+\r
+void Shutdown16(global_game_variables_t *gvar)\r
+{\r
+       PM_Shutdown(gvar);\r
+       IN_Shutdown(gvar);\r
+       CA_Shutdown(gvar);\r
+       MM_Shutdown(gvar);\r
+}\r
+\r
+\r
 //===========================================================================\r
 \r
 /*\r
index 76916ae..aadfeaf 100755 (executable)
 #define        __16_TAIL__\r
 \r
 #include "src/lib/16_head.h"\r
+#include "src/lib/16_pm.h"\r
 #include "src/lib/16_mm.h"\r
+#include "src/lib/16_ca.h"\r
 #include "src/lib/16_in.h"\r
 \r
+extern boolean dbg_debugpm;\r
+\r
 void DebugMemory_(global_game_variables_t *gvar, boolean q);\r
 #ifdef __WATCOMC__\r
 void Quit (char *error);\r
diff --git a/swaptail.sh b/swaptail.sh
deleted file mode 100755 (executable)
index 7e9180d..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/bash
-mv src/lib/16_tail.c 16/1__tail.c
-mv 16/_6_tail.c src/lib/16_tail.c
-mv 16/1__tail.c 16/_6_tail.c
-mv src/lib/16_tail.h 16/1__tail.h
-mv 16/_6_tail.h src/lib/16_tail.h
-mv 16/1__tail.h 16/_6_tail.h
-