=============================================================================\r
*/\r
\r
-#include "ID_HEADS.H"\r
-#pragma hdrstop\r
-#include "ID_STRS.H"\r
+#include "src/lib/16_head.h"\r
+//#include "ID_STRS.H"\r
\r
-#pragma warn -pro\r
-#pragma warn -use\r
-\r
-#define THREEBYTEGRSTARTS\r
+//#define THREEBYTEGRSTARTS\r
\r
/*\r
=============================================================================\r
} huffnode;\r
\r
\r
-typedef struct\r
+/*typedef struct\r
{\r
unsigned RLEWtag;\r
long headeroffsets[100];\r
byte tileinfo[];\r
-} mapfiletype;\r
+} mapfiletype;*/\r
\r
\r
/*\r
=============================================================================\r
*/\r
\r
-byte _seg *tinf;\r
+/*byte _seg *tinf;\r
int mapon;\r
\r
unsigned _seg *mapsegs[3];\r
byte far grneeded[NUMCHUNKS];\r
byte ca_levelbit,ca_levelnum;\r
\r
-int profilehandle,debughandle;\r
+int profilehandle,debughandle;*/\r
\r
void (*drawcachebox) (char *title, unsigned numcache);\r
void (*updatecachebox) (void);\r
boolean CA_FarRead (int handle, byte far *dest, long length)\r
{\r
if (length>0xffffl)\r
- Quit ("CA_FarRead doesn't support 64K reads yet!");\r
+ printf("CA_FarRead doesn't support 64K reads yet!\n");\r
\r
asm push ds\r
asm mov bx,[handle]\r
===============\r
*/\r
\r
-void CAL_OptimizeNodes (huffnode *table)\r
+void CAL_OptimizeNodes(huffnode *table)\r
{\r
huffnode *node;\r
int i;\r
if (dialog && finishcachebox)\r
finishcachebox();\r
}\r
-\r
\r
// ID_CA.H\r
\r
-#ifndef __TYPES__\r
-#include "ID_TYPES.H"\r
-#endif\r
-\r
#ifndef __ID_MM__\r
#include "ID_MM.H"\r
#endif\r
\r
-#ifndef __ID_GLOB__\r
-#include "ID_GLOB.H"\r
-#endif\r
-\r
#define __ID_CA__\r
\r
//===========================================================================\r
//#define NOGRAPHICS\r
//#define NOAUDIO\r
\r
-#define MAPHEADERLINKED\r
-#define GRHEADERLINKED\r
-#define AUDIOHEADERLINKED\r
+//#define MAPHEADERLINKED\r
+//#define GRHEADERLINKED\r
+//#define AUDIOHEADERLINKED\r
\r
-#define NUMMAPS 39\r
-#define MAPPLANES 3\r
+//#define NUMMAPS 39\r
+//#define MAPPLANES 3\r
\r
//===========================================================================\r
\r
-typedef struct\r
+/*typedef struct\r
{\r
long planestart[3];\r
unsigned planelength[3];\r
unsigned width,height;\r
char name[16];\r
-} maptype;\r
+} maptype;*/\r
\r
//===========================================================================\r
\r
-extern byte _seg *tinf;\r
+/*extern byte _seg *tinf;\r
extern int mapon;\r
\r
extern unsigned _seg *mapsegs[3];\r
\r
extern char *titleptr[8];\r
\r
-extern int profilehandle,debughandle;\r
+extern int profilehandle,debughandle;*/\r
\r
//\r
// hooks for custom cache dialogs\r
\r
// just for the score box reshifting\r
\r
-void CAL_ShiftSprite (unsigned segment,unsigned source,unsigned dest,\r
- unsigned width, unsigned height, unsigned pixshift, boolean domask);\r
+//void CAL_ShiftSprite (unsigned segment,unsigned source,unsigned dest,unsigned width, unsigned height, unsigned pixshift, boolean domask);\r
\r
//===========================================================================\r
\r
boolean CA_ReadFile (char *filename, memptr *ptr);\r
boolean CA_LoadFile (char *filename, memptr *ptr);\r
\r
-long CA_RLEWCompress (unsigned huge *source, long length, unsigned huge *dest,\r
- unsigned rlewtag);\r
+long CA_RLEWCompress (unsigned huge *source, long length, unsigned huge *dest,unsigned rlewtag);\r
\r
-void CA_RLEWexpand (unsigned huge *source, unsigned huge *dest,long length,\r
- unsigned rlewtag);\r
+void CA_RLEWexpand (unsigned huge *source, unsigned huge *dest,long length,unsigned rlewtag);\r
\r
void CA_Startup (void);\r
void CA_Shutdown (void);\r
\r
-void CA_CacheAudioChunk (int chunk);\r
-void CA_LoadAllSounds (void);\r
+//void CA_CacheAudioChunk (int chunk);\r
+//void CA_LoadAllSounds (void);\r
\r
-void CA_UpLevel (void);\r
+/*void CA_UpLevel (void);\r
void CA_DownLevel (void);\r
\r
void CA_SetAllPurge (void);\r
void CA_CacheGrChunk (int chunk);\r
void CA_CacheMap (int mapnum);\r
\r
-void CA_CacheMarks (char *title);\r
+void CA_CacheMarks (char *title);*/\r
\r
}\r
return(-1);\r
}
+
+/*\r
+==========================\r
+=\r
+= Quit\r
+=\r
+==========================\r
+*/\r
+\r
+/*void Quit(char *error, ...)\r
+{\r
+ short exit_code=0;\r
+ unsigned finscreen;\r
+\r
+ va_list ap;\r
+\r
+ va_start(ap,error);\r
+\r
+#ifndef CATALOG\r
+ if (!error)\r
+ {\r
+ CA_SetAllPurge ();\r
+ CA_CacheGrChunk (PIRACY);\r
+ finscreen = (unsigned)grsegs[PIRACY];\r
+ }\r
+#endif\r
+\r
+ //ShutdownId ();\r
+\r
+ if (error && *error)\r
+ {\r
+ vprintf(error,ap);\r
+ exit_code = 1;\r
+ }\r
+#ifndef CATALOG\r
+ else\r
+ if (!NoWait)\r
+ {\r
+ movedata (finscreen,0,0xb800,0,4000);\r
+ bioskey (0);\r
+ }\r
+#endif\r
+\r
+ va_end(ap);\r
+\r
+#ifndef CATALOG\r
+ if (!error)\r
+ {\r
+ _argc = 2;\r
+ _argv[1] = "LAST.SHL";\r
+ _argv[2] = "ENDSCN.SCN";\r
+ _argv[3] = NULL;\r
+ if (execv("LOADSCN.EXE", _argv) == -1)\r
+ {\r
+ clrscr();\r
+ puts("Couldn't find executable LOADSCN.EXE.\n");\r
+ exit(1);\r
+ }\r
+ }\r
+#endif\r
+\r
+ exit(exit_code);\r
+}*/