modexFadeOff(4, pal);\r
modexPalBlack();\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
- initMap(&map);\r
+ /* create the map */
+ 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
+ initMap(&map);
mv.map = ↦\r
mv2.map = ↦\r
mv3.map = ↦\r
map_t result;\r
\r
result.width =w;\r
- result.height=h;\r
- //if(initxms())
+ result.height=h;
+ if(initxms()>0)
result.data = malloc(sizeof(byte) * w * h);
- //else result.data = xmsmalloc(sizeof(byte) * w * h);\r
+ else result.data = xmsmalloc(sizeof(byte) * w * h);
\r
return result;\r
}\r
int x, y;\r
int i;\r
int tile = 1;
- //if(initxms())
- map->tiles = malloc(sizeof(tiles_t));\r
- //else map->tiles = xmsmalloc(sizeof(tiles_t));\r
-\r
- /* create the tile set */\r
- //if(initxms())
+ if(initxms()>0)
map->tiles = malloc(sizeof(tiles_t));
- //else map->tiles->data = xmsmalloc(sizeof(bitmap_t));\r
+ else map->tiles = xmsmalloc(sizeof(tiles_t));\r
+\r
+ /* create the tile set */
+ if(initxms()>0)
+ map->tiles->data = malloc(sizeof(bitmap_t));
+ else map->tiles->data = xmsmalloc(sizeof(bitmap_t));
map->tiles->data->width = (TILEWH*2);\r
map->tiles->data->height= TILEWH;
- //if(initxms())
- map->tiles->data->data = malloc((TILEWH*2)*TILEWH);\r
- //else map->tiles->data->data = xmsmalloc((TILEWH*2)*TILEWH);\r
+ if(initxms()>0)
+ map->tiles->data->data = malloc((TILEWH*2)*TILEWH);
+ else map->tiles->data->data = xmsmalloc((TILEWH*2)*TILEWH);\r
map->tiles->tileHeight = TILEWH;\r
map->tiles->tileWidth =TILEWH;\r
map->tiles->rows = 1;\r