#include "src/lib/modex16/256x192.h"
#include "src/lib/modex16/192x144_.h"
#include "src/lib/modex16/160x120.h"
+#include "src/lib/modex16/planar16.h"
//320x240 = 20x15
//192x144 = 12x9
#ifndef __RENDER_H__\r
#define __RENDER_H__\r
\r
+#include "src/lib/planar.h"\r
#include "src/lib/modex16.h"\r
\r
void modexDrawPBufRegion(page_t *page, int x, int y, int rx, int ry, int rw, int rh, planar_buf_t *p, boolean sprite);\r
} head;\r
\r
\r
-static void loadPcxStage1(FILE *file, planar_buf_t *result) {\r
+static void loadPcxpbufStage1(FILE *file, planar_buf_t *result) {\r
int index;\r
byte count, val;\r
long int pos;\r
}\r
}\r
\r
-static void loadPcxPalette(FILE *file, planar_buf_t *result) {\r
+static void loadPcxpbufPalette(FILE *file, planar_buf_t *result) {\r
byte val;\r
int index;\r
\r
}\r
\r
/* load the first part of the pcx file */\r
- loadPcxStage1(file, &result);\r
+ loadPcxpbufStage1(file, &result);\r
\r
/* allocate the buffer */\r
bufSize = (/*(dword)*/result.width * result.height);\r
- result = *planar_buf_alloc(result.width, result.height);\r
+ //result = pbuf_alloc(result.width, result.height);\r
if(!result.plane[0]) {\r
fprintf(stderr, "Could not allocate memory for bitmap data.");\r
fclose(file);\r
}\r
} while(index < bufSize);\r
\r
- loadPcxPalette(file, &result);\r
+ //++++loadPcxpbufPalette(file, &result);\r
fclose(file);\r
return result;\r
\r
* Functions and types for loading and manipulating bitmaps.\r
*/\r
\r
-#ifndef PLANARW_H\r
-#define PLANARW_H\r
+#ifndef PLANW_H\r
+#define PLANW_H\r
\r
-#include "src/lib/16_head.h"\r
-#include "src/lib/planar.h"\r
-\r
-#define PALSIZE 768\r
+#include "src/lib/modex16.h"\r
\r
planar_buf_t planarLoadPcx(char *filename);\r
tileset_t planarLoadPcxTiles(char *filename, word twidth, word theight);\r
#ifndef PLANAR_H
#define PLANAR_H
-#include "src/lib/bitmap.h"
-
-extern byte *modexNewPal();
+#include "src/lib/modex16.h"
typedef struct {
byte huge *plane[4]; /* 4 planes of image data */
\r
p = planarLoadPcx(bakapeee);\r
ptmp = planarLoadPcx("data/ptmp.pcx");\r
- VGAmodeX(baka, &gvar);\r
+/* VGAmodeX(baka, &gvar);\r
gvar.video.page[0]=modexDefaultPage(&gvar.video.page[0]);\r
\r
- /* fix up the palette and everything */\r
+ //fix up the palette and everything\r
modexPalUpdate1(p.palette);\r
\r
- /* clear and draw one sprite and one bitmap */\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
\r
- /* update display~*/\r
+ //update display~\r
gvar.video.page[0].dx+=32;\r
gvar.video.page[0].dy+=32;\r
modexShowPage(&gvar.video.page[0]);\r
\r
- /* non sprite comparison */\r
+ //non sprite comparison\r
start = *clockw;\r
// oldDrawBmp(VGA, 20, 20, &bmp, 0);\r
for(i=0; i<100 ;i++) {\r
while(!kbhit())\r
{\r
}\r
- VGAmodeX(0, &gvar);\r
+ VGAmodeX(0, &gvar);*/\r
\r
- /* print out the contents of each plane */\r
+ //print out the contents of each plane\r
for(plane=0; plane < 4; plane++) {\r
i=0;\r
printf("Plane %d\n", plane);\r