#
# compile flags
#
-S_FLAGS=-sg -st -of+ -zu -zdf -zff -zgf -k40960#32768#24576
+S_FLAGS=-sg -st -of+ -zu -zdf -zff -zgf -k32768#24576
Z_FLAGS=-zk0 -zc -zm#### -zp4 -ei
O_FLAGS=-opnr -oe=24 -oil+ -outback -ohm
T_FLAGS=-bt=dos -wx -m$(MEMORYMODE) -0 -fpi87 -d1 -fo=.$(OBJ)## -e=65536
/*typedef unsigned memseg;\r
\r
memptr should be replaced by memseg in code.\r
+\r
on usage where you need pointer convert memseg type (segment) to far pointer by\r
MK_FP(segment value, 0)*/\r
- #ifdef __WATCOMC__\r
+#ifdef __WATCOMC__\r
//typedef void __based( void ) * memptr; ////old //----typedef void __based(__self) * memptr;\r
//typedef unsigned short _seg; // it will contains segment value (as Borland _seg)\r
#define _seg __based( void )\r
- #endif\r
- #ifdef __BORLANDC__\r
+// #define __SEGA __segment\r
+#endif\r
+#ifdef __BORLANDC__\r
#define _memavl() coreleft()\r
- #endif\r
+// #define __SEGA _seg\r
+#endif\r
\r
typedef void _seg * memptr;\r
\r
-Subproject commit da8765d3e9a400fd02106d23b05462fdf38b777b
+Subproject commit eac2278e502cd56fa9d17b13bea567bd5c96a16a
#include <malloc.h>\r
\r
#define DUMP\r
-#define DUMP_MAP\r
+//#define DUMP_MAP\r
\r
void\r
main(int argc, char *argv[])\r
\r
MM_Startup(&gvar);\r
PM_Startup(&gvar);\r
+ //printf("pmstarted ok\n");\r
PM_CheckMainMem(&gvar);\r
PM_UnlockMainMem(&gvar);\r
CA_Startup(&gvar);\r
\r
fprintf(stderr, fmt, _memavl());\r
fprintf(stderr, fmt0, _memmax());\r
- fprintf(stderr, "Size of map var = %u\n", _msize(&(gvar.ca.MAPSEGPTR)));\r
+ fprintf(stderr, "Size of map var = %u\n", _msize(&(gvar.ca.mapsegs)));\r
+ //getch();\r
\r
CA_loadmap("data/test.map", &map, &gvar);\r
#ifdef DUMP\r
fprintf(stdout, "map.height= %d\n", map.height);\r
getch();\r
#ifdef DUMP_MAP\r
+ //if(map.width*map.height != 1200)\r
for(k=0;k<MAPPLANES;k++)\r
{\r
printf("maplayer: %u\n[\n", k);\r
getch();\r
}\r
#else\r
- fprintf(stderr, "contents of the buffer\n[\n%s\n]\n", (gvar.ca.MAPSEGPTR));\r
+ //fprintf(stderr, "contents of the buffer\n[\n%s\n]\n", (gvar.ca.mapsegs));\r
#endif\r
/*fprintf(stdout, "&main()=%Fp\n", *argv[0]);\r
fprintf(stdout, "&map==%Fp\n", &map);\r
fprintf(stdout, "&map.data==%Fp\n", map.data);*/\r
#endif\r
//fprintf(stderr, "here comes dat boi!\n"); getch(); fprintf(stderr, "%s", datboi);\r
- MM_FreePtr(MEMPTRCONV (gvar.ca.MAPSEGPTR), &gvar);\r
+ MM_FreePtr((memptr *)&(gvar.ca.mapsegs), &gvar);\r
PM_Shutdown(&gvar);\r
CA_Shutdown(&gvar);\r
MM_Shutdown(&gvar);\r
#include "src/lib/16_timer.h"\r
#include "src/lib/16_dbg.h"\r
\r
-//#define FADE\r
+#define FADE\r
//#define NOMAPLOAD\r
\r
-//#define VERBOSESCROLL\r
-\r
static map_t map;\r
float t;\r
\r
Startup16(&gvar);\r
\r
ggvv=&gvar;\r
- // input!\r
- IN_Default(0, &gvar.player[0],ctrl_Keyboard1, &gvar);\r
\r
if (argc >= 2) {\r
if(argv[1]){ strcpy(bakapee, argv[1]);\r
//----gvar.player[0].enti.spri.spritesheet = malloc(sizeof(struct vrs_container));\r
\r
// create the map\r
- #ifdef VERBOSESCROLL\r
- fprintf(stderr, "testing map load~ ");\r
- #endif\r
+// fprintf(stderr, "testing map load~ ");\r
CA_loadmap("data/test.map", &map, &gvar);\r
#ifndef NOMAPLOAD\r
chkmap(&map, 0);\r
// initMap(&map);\r
+// printf("chkmap ok ");\r
+// fprintf(stderr, "yay map loaded~~\n");\r
#else\r
chkmap(&map, 1);\r
//initMap(&map);\r
#endif\r
- #ifdef VERBOSESCROLL\r
- fprintf(stderr, "chkmap ok ");\r
- fprintf(stderr, "yay map loaded~~\n");\r
- #endif\r
-\r
- #ifdef VERBOSESCROLL\r
- fprintf(stderr, "press a key wwww\n");\r
- IN_StartAck (&gvar); while (!IN_CheckAck (&gvar)){}\r
- #endif\r
-\r
// data\r
- #ifdef VERBOSESCROLL\r
- fprintf(stderr, "VRS_LoadVRS ");\r
- #endif\r
VRS_LoadVRS(bakapee, &gvar.player[0].enti, &gvar);\r
- #ifdef VERBOSESCROLL\r
- fprintf(stderr, "ok~\n");\r
- #endif\r
\r
- #ifdef VERBOSESCROLL\r
- fprintf(stderr, "press a key wwww\n");\r
- IN_StartAck (&gvar); while (!IN_CheckAck (&gvar)){}\r
- #endif\r
+ // input!\r
+ IN_Default(0, &gvar.player[0],ctrl_Keyboard1, &gvar);\r
\r
// save the palette\r
#ifdef FADE\r
//printf("1: %d\n", paloffset);\r
map.tiles->data->offset=(paloffset/3);\r
modexPalUpdate(map.tiles->data, &paloffset, 0, 0);*/\r
- #ifdef VERBOSESCROLL\r
- fprintf(stderr, "VL_LoadPalFile ");\r
- #endif\r
VL_LoadPalFile(bakapeep, &gvar.video.palette, &gvar);\r
//VL_LoadPalFile("data/default.pal", &gvar.video.palette);\r
\r
modexSavePalFile("data/g.pal", &gvar.video.palette);\r
modexPalBlack(); //so player will not see loadings~\r
#endif\r
- #ifdef VERBOSESCROLL\r
- fprintf(stderr, "ok\n");\r
- #endif\r
\r
// setup camera and screen~\r
modexHiganbanaPageSetup(&gvar);\r