]> 4ch.mooo.com Git - 16.git/commitdiff
modified: pcxtest.exe
authorsparky4 <sparky4@lappy4.4ch.mooo.com>
Tue, 9 Dec 2014 20:18:43 +0000 (14:18 -0600)
committersparky4 <sparky4@lappy4.4ch.mooo.com>
Tue, 9 Dec 2014 20:18:43 +0000 (14:18 -0600)
modified:   scroll.exe
modified:   src/scroll.c
modified:   test.exe
modified:   test2.exe

pcxtest.exe
scroll.exe
src/scroll.c
test.exe
test2.exe

index 3da4c5e946c175161d78d5a999d43771b5688f71..1a99ead2f9f3f8199f08031f468fe6ac2dd72c12 100644 (file)
Binary files a/pcxtest.exe and b/pcxtest.exe differ
index 697c964b5dcb562c19cdc746a6e9505bb6ab533a..cb6e36971f7e3921b048cc3b49eaae37eb0833f7 100644 (file)
Binary files a/scroll.exe and b/scroll.exe differ
index 2240325b669cd597262f3086c7aa2e09d7bcda7b..e67fe514553dfa0c021a75354aa124539a9f9279 100644 (file)
@@ -90,9 +90,9 @@ void main() {
        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 = &map;\r
        mv2.map = &map;\r
        mv3.map = &map;\r
@@ -495,10 +495,10 @@ allocMap(int w, int h) {
        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
@@ -510,19 +510,19 @@ initMap(map_t *map) {
        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
index 70d01767138d532fbd9c72f152a75d4f7c2da3e8..fcccbf075c9f2b7adc20c381566b5532724c4caa 100644 (file)
Binary files a/test.exe and b/test.exe differ
index ecbbf0e5a267e11b566339bbc71d708909c1ab5a..ca41644c5c0b27095806d15eecc48bb4064cc5ed 100644 (file)
Binary files a/test2.exe and b/test2.exe differ