]> 4ch.mooo.com Git - 16.git/blobdiff - src/lib/16_mm.c
reverted part 2
[16.git] / src / lib / 16_mm.c
index b6d2a26743327cbd250e565f91fbe225b9f33fa5..706aaff19a0f217bed5152a375ab3d54edd61bcf 100755 (executable)
@@ -1,19 +1,23 @@
-/* Catacomb Apocalypse Source Code\r
- * Copyright (C) 1993-2014 Flat Rock Software\r
+/* Project 16 Source Code~\r
+ * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover\r
  *\r
- * This program is free software; you can redistribute it and/or modify\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 2 of the License, or\r
+ * the Free Software Foundation; either version 3 of the License, or\r
  * (at your option) any later version.\r
  *\r
- * This program is distributed in the hope that it will be useful,\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 along\r
- * with this program; if not, write to the Free Software Foundation, Inc.,\r
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\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
 // NEWMM.C\r
@@ -550,7 +554,7 @@ getmemory:
        }\r
 #endif\r
 //     printf("base=%u ", base); printf("size=%u\n", size);\r
-       MML_UseSpace(base,size, gvar);\r
+       MML_UseSpace (base,size, gvar);\r
        gvar->mmi.XMSmem += size*16;\r
        gvar->mm.UMBbase[gvar->mm.numUMBs] = base;\r
        gvar->mm.numUMBs++;\r
@@ -609,7 +613,7 @@ void MML_ShutdownXMS(global_game_variables_t *gvar)
        {\r
                scan->blob=segm;\r
 \r
-               //MML_UseSpace(segstart, seglength, gvar);\r
+               //MML_UseSpace (segstart, seglength, gvar);\r
 \r
                printf("MML_UseSpace: Segment spans two blocks!\n");\r
        //}\r
@@ -624,7 +628,7 @@ void MML_ShutdownXMS(global_game_variables_t *gvar)
        }\r
 //++++todo: linked list of segment!\r
 */\r
-void MML_UseSpace(word segstart, dword seglength, global_game_variables_t *gvar)\r
+void MML_UseSpace (word segstart, dword seglength, global_game_variables_t *gvar)\r
 {\r
        mmblocktype far *scan,far *last;\r
        word    oldend;\r
@@ -740,7 +744,7 @@ void MML_ClearBlock(global_game_variables_t *gvar)
 ===================\r
 */\r
 \r
-void MM_Startup(global_game_variables_t *gvar)\r
+void MM_Startup (global_game_variables_t *gvar)\r
 {\r
        int i;\r
        //dword length,seglength;\r
@@ -793,7 +797,7 @@ void MM_Startup(global_game_variables_t *gvar)
        length -= SAVENEARHEAP;\r
        seglength = length / 16;                        // now in paragraphs\r
        segstart = FP_SEG(start)+(FP_OFF(start)+15)/16;\r
-       MML_UseSpace(segstart,seglength, gvar);\r
+       MML_UseSpace (segstart,seglength, gvar);\r
        gvar->mmi.nearheap = length;\r
        //0000printf("near:     start=%Fp       segstart=%x     seglen=%lu      len=%lu\n", start, segstart, (dword)seglength, length);\r
 \r
@@ -814,7 +818,7 @@ void MM_Startup(global_game_variables_t *gvar)
        length -= SAVEFARHEAP;\r
        seglength = length / 16;                        // now in paragraphs\r
        segstart = FP_SEG(start)+(FP_OFF(start)+15)/16;\r
-       MML_UseSpace(segstart,seglength, gvar);\r
+       MML_UseSpace (segstart,seglength, gvar);\r
        gvar->mmi.farheap = length;\r
        //0000printf("far:      start=%Fp       segstart=%x     seglen=%lu      len=%lu\n", start, segstart, (dword)seglength, length);\r
 \r
@@ -837,7 +841,7 @@ void MM_Startup(global_game_variables_t *gvar)
        {\r
                MML_SetupEMS(gvar);                                     // allocate space\r
                //16_PM: EMS4! AND EMS 3.2 MASSIVE DATA HANDLMENT!\r
-               MML_UseSpace(gvar->mm.EMSPageFrame,(MAPPAGES)*0x4000lu, gvar);\r
+               MML_UseSpace (gvar->mm.EMSPageFrame,(MAPPAGES)*0x4000lu, gvar);\r
                //if(gvar->pm.emm.EMSVer<0x40)\r
                        MM_MapEMS(gvar);                                        // map in used pages\r
                //else\r
@@ -884,7 +888,7 @@ xmsskip:
 ====================\r
 */\r
 \r
-void MM_Shutdown(global_game_variables_t *gvar)\r
+void MM_Shutdown (global_game_variables_t *gvar)\r
 {\r
        if(!(gvar->mm.mmstarted))\r
                return;\r