\r
/* allocate the pixel storage for the tiles */\r
ts.data = malloc(sizeof(byte*) * ts.ntiles);\r
- ts.data[0] = malloc(sizeof(byte) * ts.ntiles * twidth * theight);\r
+ //ts.data[0] = malloc(sizeof(byte) * ts.ntiles * twidth * theight);\r
for(i=1; i < ts.ntiles; i++) {\r
ts.data[i] = ts.data[i-1] + twidth * theight;\r
}\r
/* draw the tiles */
#ifdef MODEX
ptr = map.data;
- //mappalptr = map.tiles->btdata->palette;
+ mappalptr = map.tiles->data->palette;
/* data */
p = bitmapLoadPcx("data/ptmp.pcx"); // load sprite
//++++ player[0].data.offset=(paloffset/3);
//++++ modexPalUpdate1(&player[0].data, &paloffset, 0, 0);
//modexPalUpdate1(p.palette);
- modexPalUpdate1(map.tiles->btdata->palette);
+ modexPalUpdate1(map.tiles->data->palette);
//printf(" %d\n", sizeof(ptmp->data));
//printf("1: %d\n", paloffset);
//++++ map.tiles->data->offset=(paloffset/3);
if(IN_KeyDown(22)){
paloffset=0; modexPalBlack(); modexPalUpdate(&player[0].data, &paloffset, 0, 0);
printf("1paloffset = %d\n", paloffset/3);
- modexPalUpdate(map.tiles->data, &paloffset, 0, 0);
+ modexPalUpdate(map.tiles->data, &paloffset, 0, 0);
printf("2paloffset = %d\n", paloffset/3);
- pdump(bg->page); pdump(spri->page); }
+ pdump(bg->page); pdump(spri->page); }
#endif
#endif
//pan switch