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);\r
+void mapDrawCol(map_view_t *mv, int tx, int ty, word x);
+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 TILEWH 16\r
byte *ptr;\r
actor_t player;\r
//actor_t npc0;\r
-\r
- if(isEMS() || checkEMS()){ printf("%d\n", coretotalEMS()); emmhandle = mallocEMS(coretotalEMS()); }\r
+
+// atexit(qclean());\r
+// if(isEMS() || checkEMS()){ printf("%d\n", coretotalEMS()); emmhandle = mallocEMS(coretotalEMS()); }\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
//xmsfree(spri);\r
//xmsfree(mask);\r
//xmsreport();\r
- if(isEMS())\r
+ /*if(isEMS())\r
{\r
printf("%d\n", get_emem());\r
printf("%d\n", coretotalEMS());\r
dealloc_emem(emmhandle);\r
printf("%d\n", coretotalEMS());\r
- }\r
+ }*/\r
switch(detectcpu())\r
{\r
case 0: cpus = "8086/8088 or 186/88"; break;\r
}\r
i += mv->map->width;\r
}\r
-}\r
+}
+
+void qclean()
+{
+ modexLeave();\r
+ setkb(0);
+}
+\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
{\r