X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=16%2Fmodex16%2Fmodex16.h;h=ff4913f6bdfdad3daffaa58fe2d3ace8f4cf5a84;hb=e8708918d29a425379a2c93ccc4ae0c974741338;hp=81960dd8ab4cb979e6685b29e4f00aa5ab503298;hpb=42b3ed060a69fb588c7b933748400f2a052add0c;p=16.git diff --git a/16/modex16/modex16.h b/16/modex16/modex16.h old mode 100644 new mode 100755 index 81960dd8..ff4913f6 --- a/16/modex16/modex16.h +++ b/16/modex16/modex16.h @@ -5,18 +5,15 @@ #define MODEX16_H #include #include "types.h" +#include "bitmap.h" /* -========================== Types & Macros ==========================- */ #define PAGE_OFFSET(x,y) (((y)<<6)+((y)<<4)+((x)>>2)) #define PLANE(x) (1<< (x&3)) #define SELECT_ALL_PLANES() outpw(0x03c4, 0xff02) -typedef struct { - byte *data; - word width; - word height; - byte *palette; -} bitmap_t; +#ifndef PAGET +#define PAGET typedef struct { byte far* data; /* the data for the page */ word dx; /* col we are viewing on the virtual screen */ @@ -24,6 +21,7 @@ typedef struct { word width; /* virtual width of the page */ word height; /* virtual height of the page */ } page_t; +#endif /* -============================ Functions =============================- */ /* mode switching, page, and plane functions */ @@ -39,6 +37,7 @@ void modexDrawBmp(page_t *page, int x, int y, bitmap_t *bmp); void modexDrawBmpRegion(page_t *page, int x, int y, int rx, int ry, int rw, int rh, bitmap_t *bmp); void modexDrawSprite(page_t *page, int x, int y, bitmap_t *bmp); void modexDrawSpriteRegion(page_t *page, int x, int y, int rx, int ry, int rw, int rh, bitmap_t *bmp); +void modexCopyPageRegion(page_t *dest, page_t *src, word sx, word sy, word dx, word dy, word width, word height); /* Palette fade and flash effects */ void modexFadeOn(word fade, byte *palette); @@ -60,9 +59,6 @@ void modexPalWhite(); void modexPalUpdate(byte *p); void modexWaitBorder(); -/* bitmap functions */ -bitmap_t modexLoadPcx(char *filename); - /* -======================= Constants & Vars ==========================- */ extern byte far* VGA; /* The VGA Memory */ #define SCREEN_SEG 0xa000 @@ -79,6 +75,7 @@ extern byte far* VGA; /* The VGA Memory */ #define SC_DATA 0x03c5 #define CRTC_INDEX 0x03d4 #define CRTC_DATA 0x03d5 +#define GC_INDEX 0x03ce #define MISC_OUTPUT 0x03c2 #define HIGH_ADDRESS 0x0C #define LOW_ADDRESS 0x0D