\r
/* allocate the buffer */\r
bufSize = result.width * result.height;
- result.data = _fmalloc(bufSize); //it breaks right here~
+ result.data = malloc(bufSize); //it breaks right here~
if(!result.data) {\r
printf("Could not allocate memory for bitmap data.");\r
fclose(file);\r
ts.palette = result.palette;\r
\r
/* allocate the pixel storage for the tiles */\r
- ts.data = _fmalloc(sizeof(byte*) * ts.ntiles);\r
- ts.data[0] = _fmalloc(sizeof(byte) * ts.ntiles * twidth * theight);\r
+ ts.data = malloc(sizeof(byte*) * ts.ntiles);\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
#include <malloc.h>\r
#include "src/lib/types.h"\r
typedef struct {\r
- byte far *data;
+ byte *data;
word width;\r
word height;\r
byte *palette;
} bitmap_t;\r
\r
typedef struct {\r
- byte far **data;\r
+ byte **data;\r
word ntiles; /* the number of tiles */\r
word twidth; /* width of the tiles */\r
word theight; /* height of the tiles */\r
modexDrawBmpRegion(page_t *page, int x, int y,
int rx, int ry, int rw, int rh, bitmap_t *bmp) {
word poffset = (word) page->data + y*(page->width/4) + x/4;
- byte far *data = bmp->data;//+bmp->offset;
+ byte *data = bmp->data;//+bmp->offset;
word bmpOffset = (word) data + ry * bmp->width + rx;
word width = rw;
word height = rh;
modexDrawSpriteRegion(page_t *page, int x, int y,
int rx, int ry, int rw, int rh, bitmap_t *bmp) {
word poffset = (word)page->data + y*(page->width/4) + x/4;
- byte far *data = bmp->data;//+bmp->offset;
+ byte *data = bmp->data;//+bmp->offset;
word bmpOffset = (word) data + ry * bmp->width + rx;
word width = rw;
word height = rh;