16LIBOBJS = 16_in.$(OBJ) 16_mm.$(OBJ) wcpu.$(OBJ) 16_head.$(OBJ) 16_ca.$(OBJ) kitten.$(OBJ) 16_hc.$(OBJ) timer.$(OBJ)
#
#3812intf.$(OBJ)
-GFXLIBOBJS = modex16.$(OBJ) bitmap.$(OBJ) planar.$(OBJ) 16text.$(OBJ) bakapee.$(OBJ) scroll16.$(OBJ) 16render.$(OBJ)
+GFXLIBOBJS = modex16.$(OBJ) bitmap.$(OBJ) planar.$(OBJ) 16text.$(OBJ) bakapee.$(OBJ) scroll16.$(OBJ) 16render.$(OBJ) planar16.$(OBJ)
TESTEXEC = exmmtest.exe test.exe pcxtest.exe pcxtest2.exe test2.exe palettec.exe maptest.exe fmemtest.exe fonttest.exe fontgfx.exe scroll.exe vgmtest.exe inputest.exe palettel.exe planrpcx.exe
# tsthimem.exe
16render.$(OBJ): $(MODEXLIB)16render.h $(MODEXLIB)16render.c
wcl $(FLAGS) -c $(MODEXLIB)16render.c
+planar16.$(OBJ): $(MODEXLIB)planar16.h $(MODEXLIB)planar16.c
+ wcl $(FLAGS) -c $(MODEXLIB)planar16.c
+
bitmap.$(OBJ): $(SRCLIB)bitmap.h $(SRCLIB)bitmap.c
wcl $(FLAGS) -c $(SRCLIB)bitmap.c
#include "src/lib/modex16.h"\r
\r
static struct pcxHeader {\r
- byte id;\r
- byte version;\r
- byte encoding;\r
- byte bpp;\r
- word xmin;\r
- word ymin;\r
- word xmax;\r
- word ymax;\r
- word hres;\r
- word vres;\r
- byte pal16[48];\r
- byte res1;\r
- word bpplane;\r
- word palType;\r
- word hScreenSize;\r
- word vScreenSize;\r
- byte padding[54];\r
+ byte id;\r
+ byte version;\r
+ byte encoding;\r
+ byte bpp;\r
+ word xmin;\r
+ word ymin;\r
+ word xmax;\r
+ word ymax;\r
+ word hres;\r
+ word vres;\r
+ byte pal16[48];\r
+ byte res1;\r
+ word bpplane;\r
+ word palType;\r
+ word hScreenSize;\r
+ word vScreenSize;\r
+ byte padding[54];\r
} head;\r
\r
\r
static void loadPcxStage1(FILE *file, bitmap_t *result) {\r
- long bufSize;\r
- int index;\r
- byte count, val;\r
- long int pos;\r
+ long bufSize;\r
+ int index;\r
+ byte count, val;\r
+ long int pos;\r
\r
- /* read the header */\r
- fread(&head, sizeof(char), sizeof(struct pcxHeader), file);\r
+ /* read the header */\r
+ fread(&head, sizeof(char), sizeof(struct pcxHeader), file);\r
\r
- /* get the width and height */\r
- result->width = head.xmax - head.xmin + 1;\r
- result->height = head.ymax - head.ymin + 1;\r
+ /* get the width and height */\r
+ result->width = head.xmax - head.xmin + 1;\r
+ result->height = head.ymax - head.ymin + 1;\r
\r
- /* make sure this is 8bpp */\r
- if(head.bpp != 8) {\r
+ /* make sure this is 8bpp */\r
+ if(head.bpp != 8) {\r
printf("I only know how to handle 8bpp pcx files!\n");\r
fclose(file);\r
exit(-2);\r
- }\r
+ }\r
}\r
\r
\r
static void loadPcxPalette(FILE *file, bitmap_t *result) {\r
- byte val;\r
- int index;\r
-\r
- /* handle the palette */\r
- fseek(file, -769, SEEK_END);\r
- val = fgetc(file);\r
- result->palette = modexNewPal();\r
- if(head.version == 5 && val == 12) {\r
+ byte val;\r
+ int index;\r
+\r
+ /* handle the palette */\r
+ fseek(file, -769, SEEK_END);\r
+ val = fgetc(file);\r
+ result->palette = modexNewPal();\r
+ if(head.version == 5 && val == 12) {\r
/* use the vga palette */\r
for(index=0; !feof(file) && index < PAL_SIZE; index++) {\r
- val = fgetc(file);\r
- result->palette[index] = val >> 2;\r
+ val = fgetc(file);\r
+ result->palette[index] = val >> 2;\r
}\r
- } else {\r
+ } else {\r
/* use the 16 color palette */\r
for(index=0; index<48; index++) {\r
- result->palette[index] = head.pal16[index];\r
+ result->palette[index] = head.pal16[index];\r
+ }\r
}\r
- }\r
}\r
\r
\r
bitmap_t\r
bitmapLoadPcx(char *filename) {\r
- FILE *file;\r
- bitmap_t result;\r
- dword bufSize;\r
- int index;\r
- byte count, val;\r
-\r
- /* open the PCX file for reading */\r
- file = fopen(filename, "rb");\r
- if(!file) {\r
+ FILE *file;\r
+ bitmap_t result;\r
+ dword bufSize;\r
+ int index;\r
+ byte count, val;\r
+\r
+ /* open the PCX file for reading */\r
+ file = fopen(filename, "rb");\r
+ if(!file) {\r
printf("Could not open %s for reading.\n", filename);\r
exit(-2);\r
- }\r
+ }\r
\r
- /* load the first part of the pcx file */\r
- loadPcxStage1(file, &result);\r
+ /* load the first part of the pcx file */\r
+ loadPcxStage1(file, &result);\r
\r
/* allocate the buffer */\r
//printf("%zu\n", _memmax());\r
exit(-1);\r
}\r
\r
- /* read the buffer in */\r
- index = 0;\r
- do {\r
+ /* read the buffer in */\r
+ index = 0;\r
+ do {\r
/* get the run length and the value */\r
count = fgetc(file);\r
if(0xC0 == (count & 0xC0)) { /* this is the run count */\r
for(; count && index < bufSize; count--,index++) {\r
result.data[index] = val;\r
}\r
- } while(index < bufSize);\r
+ } while(index < bufSize);\r
\r
- loadPcxPalette(file, &result);\r
+ loadPcxPalette(file, &result);\r
\r
- fclose(file);\r
+ fclose(file);\r
\r
- return result;\r
+ return result;\r
}\r
\r
-//update!!\r
+//TODO: update!!\r
tileset_t\r
bitmapLoadPcxTiles(char *filename, word twidth, word theight) {\r
- tileset_t ts;\r
- FILE *file;\r
- bitmap_t result;\r
- int i;\r
+ tileset_t ts;\r
+ FILE *file;\r
+ bitmap_t result;\r
+ int i;\r
\r
- /* open the PCX file for reading */\r
- file = fopen(filename, "rb");\r
+ /* open the PCX file for reading */\r
+ file = fopen(filename, "rb");\r
if(!file) {\r
printf("Could not open %s for reading.\n", filename);\r
exit(-2);\r
}\r
\r
- /* load the first part of the pcx file */\r
- loadPcxStage1(file, &result);\r
+ /* load the first part of the pcx file */\r
+ loadPcxStage1(file, &result);\r
\r
- /* get the number of tiles and set up the result structure */\r
- ts.twidth = twidth;\r
- ts.theight = theight;\r
- ts.ntiles = (result.width/twidth) * (result.height/theight);\r
- ts.palette = result.palette;\r
+ /* get the number of tiles and set up the result structure */\r
+ ts.twidth = twidth;\r
+ ts.theight = theight;\r
+ ts.ntiles = (result.width/twidth) * (result.height/theight);\r
+ ts.palette = result.palette;\r
\r
/* allocate the pixel storage for the tiles */\r
ts.data = malloc(sizeof(byte*) * ts.ntiles);\r
ts.data[i] = ts.data[i-1] + twidth * theight;\r
}\r
\r
- /* finish off the file */\r
- loadPcxPalette(file, &result);\r
+ /* finish off the file */\r
+ loadPcxPalette(file, &result);\r
\r
- fclose(file);\r
+ fclose(file);\r
\r
- return ts;\r
+ return ts;\r
}\r
dword i;
word j;//, k;
bitmap_t bp;
- planar_buf_t bpp;
#ifdef DEBUG_JS
if(indent==0)
{
map->data = malloc(sizeof(byte) * (t+1)->size);
map->tiles = malloc(sizeof(tiles_t));
map->tiles->btdata = malloc(sizeof(bitmap_t));
- map->tiles->btdata = malloc(sizeof(bitmap_t));
//fix this to be far~
-// bp = bitmapLoadPcx("data/ed.pcx");
- bp = bitmapLoadPcx("data/koishi^^.pcx");
- bpp = planar_buf_from_bitmap0(&bp);
+ bp = bitmapLoadPcx("data/ed.pcx");
+// bp = bitmapLoadPcx("data/koishi^^.pcx");
map->tiles->btdata = &bp;
- //0000++++map->tiles->data = planar_buf_from_bitmap0(&bp);
- map->tiles->data = bpp;
+ map->tiles->data = planar_buf_from_bitmap(&bp);
//map->tiles->data->data = malloc((16/**2*/)*16);
//map->tiles->data->width = (16/**2*/);
//map->tiles->data->height= 16;
\r
typedef struct {\r
bitmap_t huge *btdata;\r
- planar_buf_t data;\r
+ planar_buf_t huge *data;\r
word tileHeight;\r
word tileWidth;\r
unsigned int rows;\r
--- /dev/null
+/* Project 16 Source Code~\r
+ * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669\r
+ *\r
+ * This file is part of Project 16.\r
+ *\r
+ * Project 16 is free software; you can redistribute it and/or modify\r
+ * it under the terms of the GNU General Public License as published by\r
+ * the Free Software Foundation; either version 3 of the License, or\r
+ * (at your option) any later version.\r
+ *\r
+ * Project 16 is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ * GNU General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this program. If not, see <http://www.gnu.org/licenses/>, or\r
+ * write to the Free Software Foundation, Inc., 51 Franklin Street,\r
+ * Fifth Floor, Boston, MA 02110-1301 USA.\r
+ *\r
+ */\r
+\r
+#include <stdio.h>\r
+#include <stdlib.h>\r
+#include <malloc.h>\r
+#include "src/lib/modex16/planar16.h"\r
+#include "src/lib/modex16.h"\r
+\r
+static struct pcxHeader {\r
+ byte id;\r
+ byte version;\r
+ byte encoding;\r
+ byte bpp;\r
+ word xmin;\r
+ word ymin;\r
+ word xmax;\r
+ word ymax;\r
+ word hres;\r
+ word vres;\r
+ byte pal16[48];\r
+ byte res1;\r
+ word bpplane;\r
+ word palType;\r
+ word hScreenSize;\r
+ word vScreenSize;\r
+ byte padding[54];\r
+} head;\r
+\r
+\r
+static void loadPcxStage1(FILE *file, planar_buf_t *result) {\r
+ int index;\r
+ byte count, val;\r
+ long int pos;\r
+\r
+ /* read the header */\r
+ fread(&head, sizeof(char), sizeof(struct pcxHeader), file);\r
+\r
+ /* get the width and height */\r
+ result->width = head.xmax - head.xmin + 1;\r
+ result->height = head.ymax - head.ymin + 1;\r
+\r
+ /* make sure this is 8bpp */\r
+ if(head.bpp != 8) {\r
+ printf("I only know how to handle 8bpp pcx files!\n");\r
+ fclose(file);\r
+ exit(-2);\r
+ }\r
+}\r
+\r
+\r
+static void loadPcxPalette(FILE *file, planar_buf_t *result) {\r
+ byte val;\r
+ int index;\r
+\r
+ /* handle the palette */\r
+ fseek(file, -769, SEEK_END);\r
+ val = fgetc(file);\r
+ result->palette = modexNewPal();\r
+ if(head.version == 5 && val == 12) {\r
+ /* use the vga palette */\r
+ for(index=0; !feof(file) && index < PAL_SIZE; index++) {\r
+ val = fgetc(file);\r
+ result->palette[index] = val >> 2;\r
+ }\r
+ } else {\r
+ /* use the 16 color palette */\r
+ for(index=0; index<48; index++) {\r
+ result->palette[index] = head.pal16[index];\r
+ }\r
+ }\r
+}\r
+\r
+/* sparky4's functions~ */\r
+planar_buf_t planarLoadPcx(char *filename)\r
+{\r
+ FILE *file;\r
+ planar_buf_t result;\r
+ dword bufSize;\r
+ int index, plane, x, y;\r
+ byte count, val;\r
+ word q;\r
+\r
+ /* open the PCX file for reading */\r
+ file = fopen(filename, "rb");\r
+ if(!file) {\r
+ fprintf(stderr, "Could not open %s for reading.\n", filename);\r
+ //exit(-2);\r
+ }\r
+\r
+ /* load the first part of the pcx file */\r
+ loadPcxStage1(file, &result);\r
+\r
+ /* allocate the buffer */\r
+ bufSize = (/*(dword)*/result.pwidth * result.height);\r
+ result = *planar_buf_alloc(result.width, result.height);\r
+ if(!result.plane[0]) {\r
+ fprintf(stderr, "Could not allocate memory for bitmap data.");\r
+ fclose(file);\r
+ //exit(-1);\r
+ }\r
+\r
+ /* read the buffer in */\r
+ index = 0;\r
+ do {\r
+ /* get the run length and the value */\r
+ count = fgetc(file);\r
+ if(0xC0 == (count & 0xC0)) { /* this is the run count */\r
+ count &= 0x3f;\r
+ val = fgetc(file);\r
+ } else {\r
+ val = count;\r
+ count = 1;\r
+ }\r
+\r
+ // start on the first plane\r
+ plane=0;\r
+ /* write the pixel the specified number of times */\r
+ for(; count && index < bufSize; count--,index++) {\r
+ switch (plane)\r
+ {\r
+ case 4:\r
+ plane=0;\r
+ break;\r
+ }\r
+ // copy to each plane\r
+ result.plane[plane++][index]=val;\r
+ }\r
+ } while(index < bufSize);\r
+\r
+ loadPcxPalette(file, &result);\r
+ fclose(file);\r
+ return result;\r
+\r
+}\r
+\r
+//TODO: update!!\r
+tileset_t\r
+planarLoadPcxTiles(char *filename, word twidth, word theight) {\r
+ tileset_t ts;\r
+ FILE *file;\r
+ planar_buf_t result;\r
+ int i;\r
+\r
+ /* open the PCX file for reading */\r
+ file = fopen(filename, "rb");\r
+ if(!file) {\r
+ printf("Could not open %s for reading.\n", filename);\r
+ exit(-2);\r
+ }\r
+\r
+ /* load the first part of the pcx file */\r
+ loadPcxStage1(file, &result);\r
+\r
+ /* get the number of tiles and set up the result structure */\r
+ ts.twidth = twidth;\r
+ ts.theight = theight;\r
+ ts.ntiles = (result.width/twidth) * (result.height/theight);\r
+ ts.palette = result.palette;\r
+\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
+ for(i=1; i < ts.ntiles; i++) {\r
+ ts.data[i] = ts.data[i-1] + twidth * theight;\r
+ }*/\r
+\r
+ /* finish off the file */\r
+ loadPcxPalette(file, &result);\r
+\r
+ fclose(file);\r
+\r
+ return ts;\r
+}\r
--- /dev/null
+/* Project 16 Source Code~\r
+ * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669\r
+ *\r
+ * This file is part of Project 16.\r
+ *\r
+ * Project 16 is free software; you can redistribute it and/or modify\r
+ * it under the terms of the GNU General Public License as published by\r
+ * the Free Software Foundation; either version 3 of the License, or\r
+ * (at your option) any later version.\r
+ *\r
+ * Project 16 is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ * GNU General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this program. If not, see <http://www.gnu.org/licenses/>, or\r
+ * write to the Free Software Foundation, Inc., 51 Franklin Street,\r
+ * Fifth Floor, Boston, MA 02110-1301 USA.\r
+ *\r
+ */\r
+/*\r
+ * Functions and types for a planar image buffer.\r
+ * This is meant to be able to load into video memory faster.\r
+ * Functions and types for loading and manipulating bitmaps.\r
+ */\r
+\r
+#ifndef PLANARW_H\r
+#define PLANARW_H\r
+\r
+#include "src/lib/16_head.h"\r
+#include "src/lib/planar.h"\r
+\r
+#define PALSIZE 768\r
+\r
+planar_buf_t planarLoadPcx(char *filename);\r
+tileset_t planarLoadPcxTiles(char *filename, word twidth, word theight);\r
+#endif\r
/* free the structure */\r
free(p);\r
}\r
-\r
-/* non pointer version */\r
-planar_buf_t planar_buf_from_bitmap0(bitmap_t *b) {\r
- planar_buf_t p;\r
- int plane, bi, pi, x, y;\r
- word q=0;\r
-\r
- /* allocate the buffer */\r
- p = *planar_buf_alloc(b->width, b->height);\r
-\r
- /* copy the bitmap data into the planar format */\r
- bi=0;\r
- pi=0;\r
- for(y=0; y < b->height; y++) {\r
- /* start on the first plane */\r
- plane=0;\r
- for(x=0; x < b->width; x++) {\r
- /* copy to each plane */\r
- p.plane[plane++][pi]=b->data[bi++];\r
-\r
- /* handle the completion of 4 planes. */\r
- if(plane==4) {\r
- plane=0;\r
- pi++;\r
- }\r
- }\r
-\r
- /* correct for images not divisible by 4 */\r
- if(plane) pi++;\r
- }\r
- p.palette = modexNewPal();\r
- for(;q<PALSIZE;q++)\r
- {\r
- p.palette[q]=b->palette[q];\r
- }\r
-\r
- return p;\r
-}\r
#define PLANAR_H
#include "src/lib/bitmap.h"
-#include "src/lib/16_ca.h"
-#include "src/lib/16_mm.h"
-#include "src/lib/16_hc.h"
extern byte *modexNewPal();
/* deallocates a planar buffer */
void planar_buf_free(planar_buf_t *p);
-/* non pointer version~ */
-planar_buf_t planar_buf_from_bitmap0(bitmap_t *b);
#endif
}
else
{
- rx = (((i-1) % ((t->data.width)/t->tileWidth)) * t->tileWidth);
- ry = (((i-1) / ((t->data.height)/t->tileHeight)) * t->tileHeight);
+ rx = (((i-1) % ((t->data->width)/t->tileWidth)) * t->tileWidth);
+ ry = (((i-1) / ((t->data->height)/t->tileHeight)) * t->tileHeight);
////0000printf("i=%d\n", i);
switch(t->debug_text)
{
modexClearRegion(page, x, y, t->tileWidth, t->tileHeight, ((t->debug_data[i])+1));
//cannot print number value du to it being slow as bakapee
#else
- PBUFBFUN(page, x, y, rx, ry, t->tileWidth, t->tileHeight, &(t->data));
+ PBUFBFUN(page, x, y, rx, ry, t->tileWidth, t->tileHeight, (t->data));
//modexDrawBmpRegion(page, x, y, rx, ry, t->tileWidth, t->tileHeight, (t->btdata));
#endif
break;
#include <dos.h>\r
#include <string.h>\r
#include "src/lib/modex16.h"\r
-#include "src/lib/bitmap.h"\r
-#include "src/lib/planar.h"\r
+#include "src/lib/modex16/planar16.h"\r
\r
global_game_variables_t gvar;\r
-bitmap_t bmp, ptmpbt;\r
-//planar_buf_t *p, *ptmp;\r
-planar_buf_t pnp, ptmpnp;\r
+planar_buf_t huge p, ptmp;\r
\r
void main(int argc, char *argv[])\r
{\r
// else\r
baka = 1;\r
\r
- bmp = bitmapLoadPcx(bakapeee);\r
- //p = planar_buf_from_bitmap(&bmp);\r
- pnp = planar_buf_from_bitmap0(&bmp);\r
- ptmpbt = bitmapLoadPcx("data/ptmp.pcx");\r
- //ptmp = planar_buf_from_bitmap(&ptmpbt);\r
- ptmpnp = planar_buf_from_bitmap0(&ptmpbt);\r
+ p = planarLoadPcx(bakapeee);\r
+ ptmp = planarLoadPcx("data/ptmp.pcx");\r
VGAmodeX(baka, &gvar);\r
gvar.video.page[0]=modexDefaultPage(&gvar.video.page[0]);\r
\r
/* fix up the palette and everything */\r
- modexPalUpdate1(bmp.palette);\r
+ modexPalUpdate1(p.palette);\r
\r
/* clear and draw one sprite and one bitmap */\r
modexClearRegion(&gvar.video.page[0], 0, 0, gvar.video.page[0].sw, gvar.video.page[0].sh, 0);\r
start = *clockw;\r
// oldDrawBmp(VGA, 20, 20, &bmp, 0);\r
for(i=0; i<100 ;i++) {\r
-// modexDrawBmpPBufRegion (&gvar.video.page[0], 32, 32, 0, 0, pnp.width, pnp.height, &pnp);\r
- modexDrawBmpPBuf (&gvar.video.page[0], 32, 32, &pnp);\r
+ modexDrawBmpPBufRegion (&gvar.video.page[0], 32, 32, 0, 0, p.width, p.height, &p);\r
+// modexDrawBmpPBuf (&gvar.video.page[0], 32, 32, p);\r
}\r
t1 = (*clockw-start) /18.2;\r
// start = *clockw;\r
// t2 = (*clockw-start)/18.2;\r
start = *clockw;\r
for(i=0; i<100 ;i++) {\r
- modexDrawPBuf(&gvar.video.page[0], 0, 0, &pnp, 0);\r
+ modexDrawPBuf(&gvar.video.page[0], 0, 0, &p, 0);\r
}\r
t2 = (*clockw-start) /18.2;\r
getch();\r
- modexPalUpdate1(ptmpbt.palette);\r
- //modexDrawBmpPBufRegion(&gvar.video.page[0], 64, 64, 48, 32, 24, 32, &ptmpnp);\r
- modexDrawPBuf(&gvar.video.page[0], 64, 64, &ptmpnp, 0);\r
+ modexPalUpdate1(ptmp.palette);\r
+ //modexDrawBmpPBufRegion(&gvar.video.page[0], 64, 64, 48, 32, 24, 32, ptmp);\r
+ modexDrawPBuf(&gvar.video.page[0], 64, 64, &ptmp, 0);\r
while(!kbhit())\r
{\r
}\r
for(plane=0; plane < 4; plane++) {\r
i=0;\r
printf("Plane %d\n", plane);\r
- for(py=0; py < ptmpnp.height; py++) {\r
- for(px=0; px < ptmpnp.pwidth; px++) {\r
- printf("%02X ", (int) ptmpnp.plane[plane][i++]);\r
+ for(py=0; py < ptmp.height; py++) {\r
+ for(px=0; px < ptmp.pwidth; px++) {\r
+ printf("%02X ", (int) ptmp.plane[plane][i++]);\r
}\r
printf("\n");\r
}\r
chw += xp;\r
fprintf(stderr,"Project 16 planrpcx.exe. This is just a test file!\n");\r
fprintf(stderr,"version %s\n", VERSION);\r
- fprintf(stderr,"%d\n", sizeof(pnp.plane));\r
- fprintf(stderr,"pw=%d\n", pnp.width);\r
- fprintf(stderr,"ph=%d\n", pnp.height);\r
- fprintf(stderr,"ppw=%d\n", pnp.pwidth);\r
- fprintf(stderr,"%d\n", sizeof(bmp));\r
- fprintf(stderr,"%dx%d\n", gvar.video.page[0].sw-(pnp.width), gvar.video.page[0].sh-(pnp.height));\r
+ fprintf(stderr,"%d\n", sizeof(p.plane));\r
+ fprintf(stderr,"pw=%d\n", p.width);\r
+ fprintf(stderr,"ph=%d\n", p.height);\r
+ fprintf(stderr,"ppw=%d\n", p.pwidth);\r
+ fprintf(stderr,"%d\n", sizeof(p));\r
+ fprintf(stderr,"%dx%d\n", gvar.video.page[0].sw-(p.width), gvar.video.page[0].sh-(p.height));\r
//planar_buf_free(p);\r
free(bakapeee);\r
fprintf(stderr, "modexDrawBmpPBuf: %f\n", t1);\r
map_view_t *bg, *spri, *mask;//, *tmp;
bitmap_t p;
word pn=0;
-static planar_buf_t pp;
+static planar_buf_t huge *pp;
float t;
sword bakapee;
/* create the planar buffer */
////++++ (player[0].data) = *planar_buf_from_bitmap(&p);
printf("load pee!!\n");
- pp = planar_buf_from_bitmap0(&p);
+ pp = planar_buf_from_bitmap(&p);
printf("done!\n");
#endif