#include "src\lib\modex16.h"\r
#include <stdio.h>\r
-#include <stdlib.h>
+#include <stdlib.h>\r
#include <string.h>\r
#include "src\lib\dos_kb.h"\r
#include "16\lib\x\modex.h"\r
-#include "src\lib\wtest\wtest.c"
+#include "src\lib\wtest\wtest.c"\r
#include "src\lib\planar.c"\r
#include "src\lib\ems.c"\r
\r
void mapGoTo(map_view_t *mv, int tx, int ty);\r
void mapDrawTile(tiles_t *t, word i, page_t *page, word x, word y);\r
void mapDrawRow(map_view_t *mv, int tx, int ty, word y);\r
-void mapDrawCol(map_view_t *mv, int tx, int ty, word x);
+void mapDrawCol(map_view_t *mv, int tx, int ty, word x);\r
void qclean();\r
void animatePlayer(map_view_t *src, map_view_t *dest, /*map_view_t *top, */sword d, short scrolloffsetswitch, int x, int y, int ls, int lp, bitmap_t *bmp);\r
\r
#define TRIGGX 10\r
#define TRIGGY 9\r
\r
-void main() {
+void main() {\r
long emmhandle;\r
long emsavail;\r
char teststr[80];\r
int i;\r
- bitmap_t ptmp;//, npctmp; // player sprite
+ bitmap_t ptmp;//, npctmp; // player sprite\r
planar_buf_t *p;\r
const char *cpus;\r
static int persist_aniframe = 0; /* gonna be increased to 1 before being used, so 0 is ok for default */\r
byte *ptr;\r
actor_t player;\r
//actor_t npc0;\r
-
+\r
// atexit(qclean());\r
/*if(!emmtest())\r
{\r
printf("Expanded memory manager error\n");\r
exit(0);\r
}\r
- printf("There are %ld pages available\n",emsavail);
-
+ printf("There are %ld pages available\n",emsavail);\r
+\r
if((emmhandle = emmalloc(emsavail)) < 0)\r
{\r
printf("Insufficient pages available\n");\r
exit(0);\r
- }*/
+ }*/\r
\r
/* create the map */\r
map = allocMap(MAPX,MAPY); //20x15 is the resolution of the screen you can make maps smaller than 20x15 but the null space needs to be drawn properly\r
/* data */\r
ptmp = bitmapLoadPcx("ptmp.pcx"); // load sprite\r
//npctmp = bitmapLoadPcx("ptmp1.pcx"); // load sprite\r
-
+\r
/* create the planar buffer */\r
- p = planar_buf_from_bitmap(&ptmp);
+ p = planar_buf_from_bitmap(&ptmp);\r
\r
/*if(isEMS())\r
{\r
modexClearRegion(spri->page, 5*16, 5*16, 16, 16, 255);\r
modexClearRegion(bg->page, 5*16, 5*16, 16, 16, 255);\r
\r
- modexShowPage(spri->page);
- memcpy ( &mv2, p, (p->pwidth*(p->height))+1 );\r
+ modexShowPage(spri->page);\r
+ //memcpy ( &mv2, p, (p->pwidth*(p->height))+1 );\r
while(!keyp(1) && player.hp>0)\r
{\r
//top left corner & bottem right corner of map veiw be set as map edge trigger since maps are actually square\r
}\r
i += mv->map->width;\r
}\r
-}
-
-void qclean()
-{
+}\r
+\r
+void qclean()\r
+{\r
modexLeave();\r
- setkb(0);
-}
+ setkb(0);\r
+}\r
\r
void\r
animatePlayer(map_view_t *src, map_view_t *dest, /*map_view_t *top, */sword d, short scrolloffsetswitch, int x, int y, int ls, int lp, bitmap_t *bmp)\r