\r
#include "src/lib/16_head.h"\r
//#include "src/lib/bakapee.h"\r
-#include "src/lib/modex16.h"\r
+#include "src/lib/16_vl.h"\r
//#include "src/lib/16_in.h"\r
#include "src/lib/bitmap.h"\r
#include "src/lib/16_map.h" //map is loaded here www\r
* 1. Calculate, store and update a panning info, which includes, but not limited to:\r
* combined layer information, actual map representation (reflecting real state of the game),\r
* pixel shift for smooth tile scrolling.\r
- * 2. Provide ways to draw a visible part of map. For simplicity with smooth scrolling, \r
+ * 2. Provide ways to draw a visible part of map. For simplicity with smooth scrolling,\r
* additional row/column is always drawn at the each side of the map. This implies that 'fence'\r
* should have a sprite too. Map is drawn left-to-right, top-to-bottom.\r
*/\r
JSMNLIB=src/lib/jsmn
NYANLIB=src/lib/nyan
EXMMLIB=src/lib/exmm
-MODEXLIB16=src/lib/modex16
+MODEXLIB16=src/lib/16_vl
MODEXLIB=src/lib/modex
VGMSNDLIB=src/lib/vgmsnd
DOSLIB=src/lib/doslib
# objects
#
VGMSNDOBJ = vgmSnd.$(OBJ) 16_snd.$(OBJ)
-GFXLIBOBJS = modex16.$(OBJ) bitmap.$(OBJ) 16text.$(OBJ) bakapee.$(OBJ) scroll16.$(OBJ) 16render.$(OBJ) 16_vrs.$(OBJ) 16_sprit.$(OBJ)
+GFXLIBOBJS = 16_vl.$(OBJ) 16text.$(OBJ) bakapee.$(OBJ) scroll16.$(OBJ) 16render.$(OBJ) 16_vrs.$(OBJ) 16_sprit.$(OBJ)
+OLDGFXLIBOBJS=bitmap.$(OBJ)
16LIBOBJS = 16_mm.$(OBJ) 16_pm.$(OBJ) 16_ca.$(OBJ) 16_tail.$(OBJ) 16_in.$(OBJ) 16_head.$(OBJ) 16_dbg.$(OBJ) kitten.$(OBJ) 16_hc.$(OBJ) wcpu.$(OBJ) 16_timer.$(OBJ)
#16planar.$(OBJ) planar.$(OBJ)
DOSLIBOBJ = adlib.$(OBJ) 8254.$(OBJ) 8259.$(OBJ) dos.$(OBJ) cpu.$(OBJ)
$(TESTEXEC)
all: $(EXEC) joytest.exe
+testexec: $(EXEC) joytest.exe $(TESTEXEC2)
#
# game and bakapi executables
#
# Test Executables!
#
-scroll.exe: scroll.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) $(16LIB) gfx.lib $(DOSLIBLIBS)
+scroll.exe: scroll.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) $(16LIB) gfx.lib $(DOSLIBLIBS) $(OLDGFXLIBOBJS)
scroll.$(OBJ): $(SRC)/scroll.c
zcroll.exe: zcroll.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) $(16LIB) gfx.lib $(DOSLIBLIBS)
zcroll.$(OBJ): $(SRC)/zcroll.c
fontgfx.exe: fontgfx.$(OBJ) gfx.lib $(DOSLIBLIBS)
inputest.exe: inputest.$(OBJ) $(16LIB) $(DOSLIBLIBS)
#sountest.exe: sountest.$(OBJ) $(16LIB)
-pcxtest.exe: pcxtest.$(OBJ) gfx.lib $(DOSLIBLIBS)
+pcxtest.exe: pcxtest.$(OBJ) gfx.lib $(DOSLIBLIBS) $(OLDGFXLIBOBJS)
vrstest.exe: vrstest.$(OBJ) $(16LIB) gfx.lib $(DOSLIBLIBS)
#vgacamm.exe: vgacamm.$(OBJ) $(16LIB) gfx.lib $(DOSLIBLIBS)
palettec.exe: palettec.$(OBJ) gfx.lib $(DOSLIBLIBS)
palettel.exe: palettel.$(OBJ) gfx.lib $(DOSLIBLIBS)
-pcxtest2.exe: pcxtest2.$(OBJ) gfx.lib $(DOSLIBLIBS)
+pcxtest2.exe: pcxtest2.$(OBJ) gfx.lib $(DOSLIBLIBS) $(OLDGFXLIBOBJS)
#planrpcx.exe: planrpcx.$(OBJ) gfx.lib
maptest.exe: maptest.$(OBJ) 16_map.$(OBJ) 16_head.$(OBJ) jsmn.$(OBJ) gfx.lib $(DOSLIBLIBS)
fmemtest.exe: fmemtest.$(OBJ)
#
16.$(OBJ): $(SRC)/16.c $(SRC)/16.h
bakapi.$(OBJ): $(SRC)/bakapi.c $(SRC)/bakapi.h
-test.$(OBJ): $(SRC)/test.c $(SRCLIB)/modex16.h
-#test2.$(OBJ): $(SRC)/test2.c $(SRCLIB)/modex16.h
+test.$(OBJ): $(SRC)/test.c $(SRCLIB)/16_vl.h
+#test2.$(OBJ): $(SRC)/test2.c $(SRCLIB)/16_vl.h
test0.$(OBJ): $(SRC)/test0.c
-pcxtest.$(OBJ): $(SRC)/pcxtest.c $(SRCLIB)/modex16.h
-vrstest.$(OBJ): $(SRC)/vrstest.c $(SRCLIB)/modex16.h
-#vgacamm.$(OBJ): $(SRC)/vgacamm.c $(SRCLIB)/modex16.h
-#planrpcx.$(OBJ): $(SRC)/planrpcx.c $(SRCLIB)/modex16.h
-pcxtest2.$(OBJ): $(SRC)/pcxtest2.c $(SRCLIB)/modex16.h
+pcxtest.$(OBJ): $(SRC)/pcxtest.c $(SRCLIB)/16_vl.h
+vrstest.$(OBJ): $(SRC)/vrstest.c $(SRCLIB)/16_vl.h
+#vgacamm.$(OBJ): $(SRC)/vgacamm.c $(SRCLIB)/16_vl.h
+#planrpcx.$(OBJ): $(SRC)/planrpcx.c $(SRCLIB)/16_vl.h
+pcxtest2.$(OBJ): $(SRC)/pcxtest2.c $(SRCLIB)/16_vl.h
palettec.$(OBJ): $(SRC)/palettec.c
palettel.$(OBJ): $(SRC)/palettel.c
-maptest.$(OBJ): $(SRC)/maptest.c $(SRCLIB)/modex16.h
+maptest.$(OBJ): $(SRC)/maptest.c $(SRCLIB)/16_vl.h
#emmtest.$(OBJ): $(SRC)/emmtest.c
#emsdump.$(OBJ): $(SRC)/emsdump.c
fmemtest.$(OBJ): $(SRC)/fmemtest.c
cd $(DOSLIB_JOYSTICK:$(to_os_path)) && $(DOSLIBMAKE) && cd $(BUILD_ROOT)
$(COPYCOMMAND) $(DOSLIB_JOYSTICK:$(to_os_path))$(DIRSEP)dos86h$(DIRSEP)test.exe joytest.exe
-modex16.$(OBJ): $(SRCLIB)/modex16.c $(SRCLIB)/modex16.h
+16_vl.$(OBJ): $(SRCLIB)/16_vl.c $(SRCLIB)/16_vl.h
bakapee.$(OBJ): $(SRCLIB)/bakapee.c $(SRCLIB)/bakapee.h
16render.$(OBJ): $(SRCLIB)/16render.c $(SRCLIB)/16render.h
16planar.$(OBJ): $(MODEXLIB16)/16planar.c $(MODEXLIB16)/16planar.h
--- /dev/null
+grep -iR "$1" src/*
\r
#include "src/lib/16_head.h"\r
#include "src/lib/16_in.h"\r
-#include "src/lib/modex16.h"\r
+#include "src/lib/16_vl.h"\r
#include "src/lib/wcpu/wcpu.h"\r
//#include "src/lib/planar.h"\r
#include "src/lib/scroll16.h"\r
#include "src/lib/16_ca.h"\r
#include "src/lib/16_mm.h"\r
#include "src/lib/16_hc.h"\r
-//#include "src/lib/modex16.h"\r
+//#include "src/lib/16_vl.h"\r
#pragma hdrstop\r
\r
#pragma warn -pro\r
{\r
byte w=1;\r
static global_game_variables_t gvar;\r
-#ifdef __WATCOMC__\r
- __segment sega;\r
-#endif\r
+//#ifdef __WATCOMC__\r
+// __segment sega;\r
+//#endif\r
memptr bigbuffer;\r
\r
//static byte bakapee[64];\r
}\r
// close(bakapeehandle);\r
//hmm functions in cache system use the buffered stuff\r
-#ifdef __WATCOMC__\r
- printf("\nsize of big buffer~=%u\n", _bmsize(sega, bigbuffer));\r
-#endif\r
+//#ifdef __WATCOMC__\r
+// printf("\nsize of big buffer~=%u\n", _bmsize(sega, bigbuffer));\r
+//#endif\r
\r
printf("contents of the buffer\n[\n%s\n]\n", bigbuffer);\r
//printf("dark purple = purgable\n");\r
*/\r
#include <stdio.h>\r
#include <conio.h>\r
-#include "lib/types.h"\r
+#include "src/lib/types.h"\r
//#include "lib/16text.h"\r
-#include "lib/modex16.h"\r
+#include "src/lib/16_vl.h"\r
\r
#include <hw/cpu/cpu.h>\r
#include <hw/dos/dos.h>\r
global_game_variables_t gvar;\r
player_t player[MaxPlayers];\r
//extern struct inconfig inpu;\r
- dbg_testkeyin=0;\r
+ dbg_testkeyin=1;\r
dbg_testcontrolnoisy=1;\r
IN_Startup();\r
IN_Default(0,&player,ctrl_Joystick1);\r
#define KEY_MENU (0x75)\r
*/\r
\r
-static word far* clockw= (word far*) 0x046C; /* 18.2hz clock */\r
+//static word far* clockw= (word far*) 0x046C; /* 18.2hz clock */\r
extern int profilehandle,debughandle; //make it into game global\r
\r
#define __DEBUG__\r
//#define __DEBUG_PM__\r
//#define __DEBUG_MM__\r
\r
+//#define OLD16_VL\r
+\r
#define nil ((void *)0)\r
#ifdef __BORLANDC__\r
#define _FCORELEFT 0x90000UL-16UL\r
#endif\r
#ifdef __WATCOMC__\r
#define _FCORELEFT 0x90000UL+16UL\r
-static union REGS CPURegs;\r
+/*static union REGS CPURegs;\r
\r
#define _AX CPURegs.x.ax\r
#define _BX CPURegs.x.bx\r
#define _DH CPURegs.h.dh\r
#define _DL CPURegs.h.dl\r
\r
-#define geninterrupt(n) int86(n,&CPURegs,&CPURegs);\r
+#define geninterrupt(n) int86(n,&CPURegs,&CPURegs);*/\r
#define peekb(segm,ofs) (*(byte far*)MK_FP((segm),(ofs)))\r
#define peekw(segm,ofs) (*(word far*)MK_FP((segm),(ofs)))\r
#define pokeb(segm,ofs,value) (peekb((segm),(ofs)) = (byte)(value))\r
boolean dbg_testkeyin=0,dbg_testcontrolnoisy=0;\r
#endif\r
\r
+static word far* clockw= (word far*) 0x046C; /* 18.2hz clock */\r
+\r
/*\r
=============================================================================\r
\r
#ifdef __WATCOMC__ //borland C BCEXMM.EXE\r
#include "src/lib/16_dbg.h"\r
#include "src/lib/16_sprit.h"\r
-#include "src/lib/bitmap.h" //old format\r
+//#include "src/lib/bitmap.h" //old format\r
#endif\r
#ifdef __DEBUG__\r
#define __DEBUG_InputMgr__\r
map->tiles[k]->debug_text=false;\r
//Fix to load tileset specified.\r
//And move to vrs, probably\r
- bp = bitmapLoadPcx("data/ed.pcx");\r
+ //bp = bitmapLoadPcx("data/ed.pcx");\r
map->tiles[k]->btdata = &bp;\r
k++;\r
}\r
free(js);\r
free(tok);\r
fclose(fh);\r
- \r
+\r
return 0;\r
}\r
#include "jsmn/jsmn.h"\r
//#include "stdio.h" included in 16_head.h\r
//#include "stdlib.h" included in 16_head.h\r
-#include "src/lib/modex16.h"\r
+#include "src/lib/16_vl.h"\r
#include "src/lib/16_head.h"\r
#include "src/lib/16_ca.h"\r
#include "src/lib/16_mm.h"\r
gvar->mm.mmhead = NULL;
gvar->mm.mmfree = &(gvar->mm.mmblocks[0]);
for(i=0;i<MAXBLOCKS-1;i++)
- {
gvar->mm.mmblocks[i].next = &(gvar->mm.mmblocks[i+1]);
- }
gvar->mm.mmblocks[i].next = NULL;
//
PageListStruct far *gvar->pm.PMPages,\r
_seg *gvar->pm.PMSegPages;*/\r
\r
+static union REGS CPURegs;\r
+\r
+#define _AX CPURegs.x.ax\r
+#define _BX CPURegs.x.bx\r
+#define _CX CPURegs.x.cx\r
+#define _DX CPURegs.x.dx\r
+\r
+#define _SI CPURegs.x.si\r
+\r
+#define _AH CPURegs.h.ah\r
+#define _AL CPURegs.h.al\r
+#define _BH CPURegs.h.bh\r
+#define _BL CPURegs.h.bl\r
+#define _CH CPURegs.h.ch\r
+#define _CL CPURegs.h.cl\r
+#define _DH CPURegs.h.dh\r
+#define _DL CPURegs.h.dl\r
+\r
+#define geninterrupt(n) int86(n,&CPURegs,&CPURegs);\r
+\r
static char *ParmStrings[] = {"nomain","noems","noxms",nil};\r
\r
/////////////////////////////////////////////////////////////////////////////\r
\r
#include "src/lib/16_timer.h"\r
\r
+static word far* clockw= (word far*) 0x046C; /* 18.2hz clock */\r
+\r
clock_t start_timer(global_game_variables_t *gv)\r
{\r
gv->kurokku.t = clock();\r
#include <conio.h>\r
#include <stdio.h>\r
#include <stdlib.h>\r
-#include "src/lib/modex16.h"\r
+#include "src/lib/16_vl.h"\r
\r
byte far* VGA=(byte far*) 0xA0000000; /* this points to video memory. */\r
\r
#include <hw/vga/vrs.h>\r
#endif\r
\r
-static struct pcxHeader {\r
- byte id;\r
- byte version;\r
- byte encoding;\r
- byte bpp;\r
- word xmin;\r
- word ymin;\r
- word xmax;\r
- word ymax;\r
- word hres;\r
- word vres;\r
- byte pal16[48];\r
- byte res1;\r
- word bpplane;\r
- word palType;\r
- word hScreenSize;\r
- word vScreenSize;\r
- byte padding[54];\r
-} head;\r
-\r
//320x240 = 20x15\r
//192x144 = 12x9\r
\r
#ifndef __16_VRS__\r
#define __16_VRS__\r
\r
-#include "src/lib/modex16.h"\r
+#include "src/lib/16_vl.h"\r
#include "src/lib/typdefst.h"\r
//#include <hw/cpu/cpu.h>\r
//#include <hw/dos/dos.h>\r
#ifndef __RENDER_H__\r
#define __RENDER_H__\r
\r
-#include "src/lib/modex16.h"\r
+#include "src/lib/16_vl.h"\r
\r
void modexDrawPBufRegion(page_t *page, int x, int y, int rx, int ry, int rw, int rh, planar_buf_t *p, boolean sprite);\r
void modexDrawPBuf(page_t *page, int x, int y, planar_buf_t *p, boolean sprite); /*temp*/\r
*\r
*/\r
#include "src/lib/16_head.h"\r
-#include "src/lib/modex16.h"\r
+#include "src/lib/16_vl.h"\r
#include <hw/cpu/cpu.h>\r
#include <hw/dos/dos.h>\r
#include <hw/vga/vga.h>\r
#include <malloc.h>\r
#include "src/lib/bitmap.h"\r
\r
+static struct pcxHeader {\r
+ byte id;\r
+ byte version;\r
+ byte encoding;\r
+ byte bpp;\r
+ word xmin;\r
+ word ymin;\r
+ word xmax;\r
+ word ymax;\r
+ word hres;\r
+ word vres;\r
+ byte pal16[48];\r
+ byte res1;\r
+ word bpplane;\r
+ word palType;\r
+ word hScreenSize;\r
+ word vScreenSize;\r
+ byte padding[54];\r
+} head;\r
+\r
static void loadPcxStage1(FILE *file, bitmap_t *result) {\r
long bufSize;\r
int index;\r
#ifndef BITMAP_H\r
#define BITMAP_H\r
\r
-#include "src/lib/modex16.h"\r
+#include "src/lib/16_vl.h"\r
\r
bitmap_t bitmapLoadPcx(char *filename);\r
tileset_t bitmapLoadPcxTiles(char *filename, word twidth, word theight);\r
-Subproject commit 979eddc7c8c7b92b6905d147c242ef7ea055d847
+Subproject commit 0ee1f206b4a2591ecfeca688c070a354e2ac0249
map->tiles = malloc(sizeof(tiles_t));\r
map->tiles->btdata = malloc(sizeof(bitmap_t));\r
//fix this to be far~\r
- bp = bitmapLoadPcx("data/ed.pcx");\r
+//0000 bp = bitmapLoadPcx("data/ed.pcx");\r
// bp = bitmapLoadPcx("data/koishi^^.pcx");\r
map->tiles->btdata = &bp;\r
//---- map->tiles->data = planar_buf_from_bitmap(&bp);\r
#define _LIBMAPREAD_H_\r
\r
#include "src/lib/jsmn/jsmn.h"\r
-#include "src/lib/modex16.h"\r
+#include "src/lib/16_vl.h"\r
#include "src/lib/16_head.h"\r
\r
//#define DEBUG_MAPDATA\r
#ifndef PLANW_H\r
#define PLANW_H\r
\r
-#include "src/lib/modex16.h"\r
+#include "src/lib/16_vl.h"\r
\r
planar_buf_t planarLoadPcx(char *filename);\r
tileset_t planarLoadPcxTiles(char *filename, word twidth, word theight);\r
\r
#include "src/lib/16_head.h"\r
#include "src/lib/bakapee.h"\r
-#include "src/lib/modex16.h"\r
+#include "src/lib/16_vl.h"\r
#include "src/lib/16_in.h"\r
#include "src/lib/bitmap.h"\r
#include "src/lib/mapread.h" //map is loaded here www\r
*\r
*/\r
\r
-#include "src/lib/modex16.h"\r
+#include "src/lib/16_vl.h"\r
\r
global_game_variables_t gvar;\r
\r
*\r
*/\r
\r
-#include "src/lib/modex16.h"\r
+#include "src/lib/16_vl.h"\r
#include "src/lib/bakapee.h"\r
\r
global_game_variables_t gvar;\r
#include <stdio.h>\r
#include <dos.h>\r
#include <string.h>\r
-#include "src/lib/modex16.h"\r
+#include "src/lib/16_vl.h"\r
#include "src/lib/bitmap.h"\r
//----#include "src/lib/planar.h"\r
\r
global_game_variables_t gvar;\r
+static word far* clockw= (word far*) 0x046C; /* 18.2hz clock */\r
\r
void main() {\r
bitmap_t bmp;\r
#include <stdio.h>\r
#include <dos.h>\r
#include <string.h>\r
-#include "src/lib/modex16.h"\r
+#include "src/lib/16_vl.h"\r
#include "src/lib/bitmap.h"\r
//----#include "src/lib/planar.h"\r
\r
global_game_variables_t gvar;\r
+static word far* clockw= (word far*) 0x046C; /* 18.2hz clock */\r
\r
/*\r
void\r
#include <stdio.h>\r
#include <dos.h>\r
#include <string.h>\r
-#include "src/lib/modex16.h"\r
+#include "src/lib/16_vl.h"\r
#include "src/lib/modex16/16planar.h"\r
\r
global_game_variables_t gvar;\r
*/\r
\r
#include <stdio.h>\r
-#include "src/lib/modex16.h"\r
+#include "src/lib/16_vl.h"\r
#include "src/lib/16_in.h"\r
#include "src/lib/scroll16.h"\r
#include "src/lib/bakapee.h"\r
\r
+static word far* clockw= (word far*) 0x046C; /* 18.2hz clock */\r
global_game_variables_t gvar;\r
player_t player[MaxPlayers];\r
map_view_t mv[4];\r
\r
#include <stdio.h>\r
#include <conio.h>\r
-#include "src/lib/modex16.h"\r
+#include "src/lib/16_vl.h"\r
#include "src/lib/planar.h"\r
//#include "src/lib/bitmap.h"\r
\r
#define __TESUTO_H__\r
\r
#include "src/lib/16_head.h"\r
-#include "src/lib/modex16.h"\r
+#include "src/lib/16_vl.h"\r
#include "src/lib/16_in.h"\r
#include <hw/cpu/cpu.h>\r
#include <hw/dos/dos.h>\r
*\r
*/\r
\r
-#include "src/lib/modex16.h"\r
+#include "src/lib/16_vl.h"\r
#include "src/lib/16_sprit.h"\r
#include "src/lib/16_ca.h"\r
#include "src/lib/16_mm.h"\r
\r
+static word far* clockw= (word far*) 0x046C; /* 18.2hz clock */\r
+\r
void main() {\r
global_game_variables_t gvar;\r
__segment sega;\r
*\r
*/\r
\r
-#include "src/lib/modex16.h"\r
+#include "src/lib/16_vl.h"\r
#include "src/lib/16_sprit.h"\r
#include "src/lib/16_tail.h"\r
#include "src/lib/16_pm.h"\r
#include "src/lib/16_ca.h"\r
#include "src/lib/16_mm.h"\r
\r
+static word far* clockw= (word far*) 0x046C; /* 18.2hz clock */\r
+\r
void main() {\r
static global_game_variables_t gvar;\r
- __segment sega;\r
+ //__segment sega;\r
memptr bigbuffer;\r
int i;\r
word start;\r
float t1, t2;\r
boolean baka;\r
- byte *pal;\r
- int size;\r
+ byte *pal=0;\r
+ int size=0;\r
struct sprite spri;\r
- vrl1_vgax_offset_t * off, *off1;\r
+ //vrl1_vgax_offset_t * off, *off1;\r
struct vrs_container vrs;\r
vrl1_vgax_offset_t **vrl_line_offsets;\r
uint32_t huge *vrl_headers_offsets;\r