# objects
#
VGMSNDOBJ = vgmSnd.$(OBJ) 16_snd.$(OBJ)
-16LIBOBJS = 16_in.$(OBJ) 16_mm.$(OBJ) wcpu.$(OBJ) 16_head.$(OBJ) 16_ca.$(OBJ) 16_dbg.$(OBJ) kitten.$(OBJ) 16_hc.$(OBJ) 16_timer.$(OBJ)
+16LIBOBJS = 16_lib.$(OBJ) 16_in.$(OBJ) 16_mm.$(OBJ) wcpu.$(OBJ) 16_head.$(OBJ) 16_ca.$(OBJ) 16_dbg.$(OBJ) kitten.$(OBJ) 16_hc.$(OBJ) 16_timer.$(OBJ)
GFXLIBOBJS = modex16.$(OBJ) bitmap.$(OBJ) 16text.$(OBJ) bakapee.$(OBJ) scroll16.$(OBJ) 16render.$(OBJ) 16_vrs.$(OBJ) 16_sprit.$(OBJ) #scroll16.$(OBJ)
#16planar.$(OBJ) planar.$(OBJ)
DOSLIBOBJ = adlib.$(OBJ) 8254.$(OBJ) 8259.$(OBJ) dos.$(OBJ) cpu.$(OBJ)
# List of executables to build
#
TESTEXEC = &
+ tesuto.exe &
+ 0.exe &
test.exe &
test0.exe &
pcxtest.exe &
EXEC = &
16.exe &
bakapi.exe &
- tesuto.exe &
- 0.exe &
$(TESTEXEC)
all: $(EXEC) joytest.exe
16_dbg.$(OBJ): $(SRCLIB)/16_dbg.c $(SRCLIB)/16_dbg.h
midi.$(OBJ): $(SRCLIB)/midi.c $(SRCLIB)/midi.h
16_head.$(OBJ): $(SRCLIB)/16_head.c $(SRCLIB)/16_head.h
+16_lib.$(OBJ): $(SRCLIB)/16_lib.c $(SRCLIB)/16_lib.h
16_hc.$(OBJ): $(SRCLIB)/16_hc.c $(SRCLIB)/16_hc.h
16_snd.$(OBJ): $(SRCLIB)/16_snd.c $(SRCLIB)/16_snd.h
jsmn.$(OBJ): $(JSMNLIB)/jsmn.c $(JSMNLIB)/jsmn.h
#include "src/lib/16_ca.h"\r
#include "src/lib/16_mm.h"\r
#include "src/lib/16_hc.h"\r
+#include "src/lib/16_lib.h"\r
//#include "src/lib/modex16.h"\r
#pragma hdrstop\r
\r
}\r
return(-1);\r
}\r
-\r
+#ifdef __BORLANDC__\r
//===========================================================================\r
\r
/*\r
}\r
\r
//===========================================================================\r
-\r
+#endif\r
\r
byte dirchar(byte in)\r
{\r
long int filesize(FILE *fp);\r
void printmeminfoline(byte *strc, const byte *pee, size_t h_total, size_t h_used, size_t h_free);\r
int US_CheckParm(char *parm,char **strings);\r
+#ifdef __BORLANDC__\r
void Quit (char *error);\r
+#endif\r
byte dirchar(byte in);\r
\r
#endif/*_LIBHEAD_H_*/\r
--- /dev/null
+/* 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_lib.h"\r
+\r
+//===========================================================================\r
+\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
+ puts(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
+\r
+//===========================================================================\r
--- /dev/null
+/* 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_LIB__\r
+#define __16_LIB__\r
+\r
+#include "src/lib/16_head.h"\r
+#include "src/lib/16_in.h"\r
+\r
+void Quit (char *error);\r
+\r
+#endif\r
#include <malloc.h>
#include "src/lib/16_head.h"
#include "src/lib/16_hc.h"
+#include "src/lib/16_lib.h"
//#include "src/lib/modex16.h"
//++++mh #include "src/lib/16_in.h"
*
*/
-#include <stdio.h>
-#include <dos.h>
-#include <string.h>
#include "src/lib/modex16.h"
#include "src/lib/16_sprit.h"
#include "src/lib/16_ca.h"