]> 4ch.mooo.com Git - 16.git/blobdiff - src/lib/16_mm.h
made it cooler~
[16.git] / src / lib / 16_mm.h
index f2b41c2cbbdacfef91ee2c9bfbcf18dd1cde26df..f16663bf06d329106cb03b8a34bdaa21db5f3bac 100644 (file)
@@ -1,19 +1,19 @@
-/* Catacomb Armageddon Source Code
- * Copyright (C) 1993-2014 Flat Rock Software
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+/* Catacomb Apocalypse Source Code\r
+ * Copyright (C) 1993-2014 Flat Rock Software\r
+ *\r
+ * This program 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
+ * (at your option) any later version.\r
+ *\r
+ * This program 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
  */
 
 // ID_MM.H
 
 #include <string.h>
 #include <malloc.h>
-#include "src/lib/lib_head.h"
+#include "src/lib/16_head.h"
 //++++mh       #include "src/lib/16_in.h"
 
-//****#if 1            // 1 == Debug/Dev  ;  0 == Production/final
+#ifdef __DEBUG__               // 1 == Debug/Dev  ;  0 == Production/final
 #define OUT_OF_MEM_MSG "MM_GetPtr: Out of memory!\nYou were short :%ld bytes"
-//****#else
-//****#define OUT_OF_MEM_MSG   "\npee\n"
-//****#endif
+#else
+#define OUT_OF_MEM_MSG "\npee\n"
+#endif
 
 
 #define SAVENEARHEAP   0x400           // space to leave in data segment
@@ -79,8 +79,9 @@
 #define        XMS_FREEUMB             0x11
 
 //==========================================================================
-__segment                seg;
-typedef void __based(seg) * memptr;
+//I hope this is correct!
+//__segment                seg;
+typedef void __based(__self) * memptr; //__based(seg) * memptr;
 
 typedef struct
 {
@@ -135,11 +136,11 @@ typedef struct mmblockstruct
 =============================================================================
 */
 
-static mminfotype      mminfo;
+/*static mminfotype    mminfo;
 static memptr          bufferseg;
 
 static void            (* beforesort) (void);
-static void            (* aftersort) (void);
+static void            (* aftersort) (void);*/
 
 /*
 =============================================================================
@@ -149,7 +150,7 @@ static void         (* aftersort) (void);
 =============================================================================
 */
 
-static void huge       *hugeheap;
+/*static void huge     *hugeheap;
 static void far        *farheap;
 static void            *nearheap;
 
@@ -162,15 +163,12 @@ static unsigned int EMSVer;
 
 static void            (* XMSaddr) (void);             // far pointer to XMS driver
 
-static unsigned        numUMBs,UMBbase[MAXUMBS];
-
-static char *ParmStringsexmm[] = {"noems","noxms",""};
+static unsigned        numUMBs,UMBbase[MAXUMBS];*/
 
 //==========================================================================
 
 void MM_Startup (void);
 void MM_Shutdown (void);
-void MM_MapEMS (void);
 
 void MM_GetPtr (memptr *baseptr,dword size);
 void MM_FreePtr (memptr *baseptr);
@@ -195,15 +193,14 @@ void MM_BombOnError (boolean bomb);
 //
 
 boolean                MML_CheckForEMS (void);
+unsigned               MML_SetupEMS (void);
 void           MML_ShutdownEMS (void);
-void           MM_MapEMS (void);
+unsigned               MM_MapEMS (void);
 boolean        MML_CheckForXMS (void);
 void           MML_ShutdownXMS (void);
 void           MML_UseSpace (unsigned segstart, unsigned seglength);
 void           MML_ClearBlock (void);
 
-int US_CheckParm(char *parm,char **strings);
-
 //==========================================================================
 
 #endif