From: sparky4 Date: Fri, 16 Sep 2016 17:42:43 +0000 (-0500) Subject: quit works with input system now X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=d65c8be05249df8109a523747ad3c4e163d2d975;p=16.git quit works with input system now --- diff --git a/bcexmm.dsk b/bcexmm.dsk index 115d6b99..b1f56e47 100755 Binary files a/bcexmm.dsk and b/bcexmm.dsk differ diff --git a/bcexmm.exe b/bcexmm.exe index b0c69877..8939ee24 100755 Binary files a/bcexmm.exe and b/bcexmm.exe differ diff --git a/bcexmm.prj b/bcexmm.prj index 8ea92c50..9b9bba0d 100755 Binary files a/bcexmm.prj and b/bcexmm.prj differ diff --git a/makefile b/makefile index 90f4b27d..ddf393d1 100755 --- a/makefile +++ b/makefile @@ -106,7 +106,7 @@ LIBFLAGS=$(WLIBQ) -b -n # 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) @@ -154,6 +154,8 @@ DOSLIBLIBS += $(DOSLIB_8250)/dos86h/8250.lib # List of executables to build # TESTEXEC = & + tesuto.exe & + 0.exe & test.exe & test0.exe & pcxtest.exe & @@ -172,8 +174,6 @@ TESTEXEC = & EXEC = & 16.exe & bakapi.exe & - tesuto.exe & - 0.exe & $(TESTEXEC) all: $(EXEC) joytest.exe @@ -292,6 +292,7 @@ mapread.$(OBJ): $(SRCLIB)/mapread.c $(SRCLIB)/mapread.h 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 diff --git a/src/exmmtest.c b/src/exmmtest.c index 06835abf..d6a44fc6 100755 --- a/src/exmmtest.c +++ b/src/exmmtest.c @@ -26,6 +26,7 @@ #include "src/lib/16_ca.h" #include "src/lib/16_mm.h" #include "src/lib/16_hc.h" +#include "src/lib/16_lib.h" //#include "src/lib/modex16.h" #pragma hdrstop diff --git a/src/lib/16_head.c b/src/lib/16_head.c index 69f69db2..30e4444f 100755 --- a/src/lib/16_head.c +++ b/src/lib/16_head.c @@ -94,7 +94,7 @@ US_CheckParm(char *parm,char **strings) } return(-1); } - +#ifdef __BORLANDC__ //=========================================================================== /* @@ -156,7 +156,7 @@ void Quit (char *error) } //=========================================================================== - +#endif byte dirchar(byte in) { diff --git a/src/lib/16_head.h b/src/lib/16_head.h index e804410f..acd1e1ec 100755 --- a/src/lib/16_head.h +++ b/src/lib/16_head.h @@ -176,7 +176,9 @@ void wait(clock_t wait); long int filesize(FILE *fp); void printmeminfoline(byte *strc, const byte *pee, size_t h_total, size_t h_used, size_t h_free); int US_CheckParm(char *parm,char **strings); +#ifdef __BORLANDC__ void Quit (char *error); +#endif byte dirchar(byte in); #endif/*_LIBHEAD_H_*/ diff --git a/src/lib/16_lib.c b/src/lib/16_lib.c new file mode 100755 index 00000000..67251d43 --- /dev/null +++ b/src/lib/16_lib.c @@ -0,0 +1,88 @@ +/* Project 16 Source Code~ + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * + * This file is part of Project 16. + * + * Project 16 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 3 of the License, or + * (at your option) any later version. + * + * Project 16 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, see , or + * write to the Free Software Foundation, Inc., 51 Franklin Street, + * Fifth Floor, Boston, MA 02110-1301 USA. + * + */ +/* + * 16 library + */ + +#include "src/lib/16_lib.h" + +//=========================================================================== + +/* +========================== += += Quit += +========================== +*/ + +void Quit (char *error) +{ + unsigned finscreen; + memptr screen; + union REGS in, out; + + //ClearMemory (); + if (!*error) + { + //WriteConfig (); + } + else + { + //CA_CacheGrChunk (ERRORSCREEN); + //screen = grsegs[ERRORSCREEN]; + } + + //ShutdownId (); + IN_Shutdown(); + //modexLeave(); + in.h.ah = 0x00; + in.h.al = 0x3; + int86(0x10, &in, &out); + + if (error && *error) + { + movedata ((unsigned)screen,7,0xb800,0,7*160); + //gotoxy (10,4); + puts(error); + //gotoxy (1,8); + exit(1); + } + else + if (!error || !(*error)) + { + //clrscr(); + //#ifndef JAPAN + movedata ((unsigned)screen,7,0xb800,0,4000); + //gotoxy(1,24); + //#endif +//asm mov bh,0 +//asm mov dh,23 // row +//asm mov dl,0 // collumn +//asm mov ah,2 +//asm int 0x10 + } + + exit(0); +} + +//=========================================================================== diff --git a/src/lib/16_lib.h b/src/lib/16_lib.h new file mode 100755 index 00000000..9b3df181 --- /dev/null +++ b/src/lib/16_lib.h @@ -0,0 +1,31 @@ +/* Project 16 Source Code~ + * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * + * This file is part of Project 16. + * + * Project 16 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 3 of the License, or + * (at your option) any later version. + * + * Project 16 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, see , or + * write to the Free Software Foundation, Inc., 51 Franklin Street, + * Fifth Floor, Boston, MA 02110-1301 USA. + * + */ + +#ifndef __16_LIB__ +#define __16_LIB__ + +#include "src/lib/16_head.h" +#include "src/lib/16_in.h" + +void Quit (char *error); + +#endif diff --git a/src/lib/16_mm.h b/src/lib/16_mm.h index 6d4e8ec0..48c64353 100755 --- a/src/lib/16_mm.h +++ b/src/lib/16_mm.h @@ -25,6 +25,7 @@ #include #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" diff --git a/src/vrstest.c b/src/vrstest.c index 0e9020d9..11bfc670 100755 --- a/src/vrstest.c +++ b/src/vrstest.c @@ -20,9 +20,6 @@ * */ -#include -#include -#include #include "src/lib/modex16.h" #include "src/lib/16_sprit.h" #include "src/lib/16_ca.h"