X-Git-Url: http://4ch.mooo.com/gitweb/?a=blobdiff_plain;f=src%2Flib%2F16_vl.h;h=519b1026588cfe89d463036bcf7d1154d71a34aa;hb=320be82ab5e414d1b771b295403218b614ed9d13;hp=00cd22385536f6a52e14e9060adab4280ec0233c;hpb=3ad667193b2905bcf70aa1c628d276fa968a757d;p=16.git diff --git a/src/lib/16_vl.h b/src/lib/16_vl.h index 00cd2238..519b1026 100755 --- a/src/lib/16_vl.h +++ b/src/lib/16_vl.h @@ -35,14 +35,6 @@ // #include "src/lib/modex16/192x144_.h" // #include "src/lib/modex16/160x120.h" -#ifdef __WATCOMC__ -#include -#include -#include -#include -#include -#endif - //320x240 = 20x15 //192x144 = 12x9 @@ -138,7 +130,7 @@ extern byte far* VGA; /* The VGA Memory */ #define ATR_INDEX AC_INDEX #define ATR_OVERSCAN 17 #define DISPLAY_ENABLE 0x01 -#define MAP_MASK 0x02 +//#define MAP_MASK 0x02 #define PAL_READ_REG 0x03C7 /* Color register, read address */ #define PAL_WRITE_REG 0x03C8 /* Color register, write address */ #define PAL_DATA_REG 0x03C9 /* Color register, data port */ @@ -159,23 +151,29 @@ extern byte far* VGA; /* The VGA Memory */ // // VGA hardware routines // - -void VGAMAPMASK(byte x); -void VGAWRITEMODE(byte x); -void VGAREADMAP(byte x); +void VGAWRITEMODE(byte x), + VGAMAPMASK(byte x), + VGAREADMAP(byte x), + VGABITMASK(byte x); #define VW_Hlin(x,z,y,c,q) VL_Hlin(x,y,(z)-(x)+1,c,q) #define VW_Vlin(y,z,x,c,q) VL_Vlin(x,y,(z)-(y)+1,c,q) /* -============================ Functions =============================- */ /* mode switching, page, and plane functions */ -void VGAmodeX(sword vq, boolean cmem, global_game_variables_t *gv); -void modexEnter(sword vq, boolean cmem, global_game_variables_t *gv); -byte vgaGetMode(); -void modexLeave(); -void VL_SetLineWidth (unsigned width, ofs_t *ofs); +void VL_Startup (global_game_variables_t *gvar), + VL_Shutdown (global_game_variables_t *gvar), + VL_SetVGAPlaneMode (global_game_variables_t *gvar), + VL_ClearVideo (byte color), + VL_DePlaneVGA (), + VGAmodeX(sword vq, boolean cmem, global_game_variables_t *gv), + modexEnter(sword vq, boolean cmem, global_game_variables_t *gv); +void VL_vgaSetMode(byte mode); +byte VL_vgaGetMode(void); +extern void TL_VidInit(global_game_variables_t *gvar); +void modexLeave(void); void modexsetBaseXMode(); -page_t modexDefaultPage(page_t *p); +page_t modexDefaultPage(page_t *p, video_t *v); page_t modexNextPage(page_t *p); page_t modexNextPageFlexibleSize(page_t *p, word x, word y); void modexCalcVmemRemain(video_t *video); @@ -200,9 +198,11 @@ void modexFlashOff(word fade, byte *palette); void modexPalSave(byte *palette); //byte *modexNewPal(); void modexLoadPalFile(char *filename, byte *palette); -void VL_LoadPalFile(const char *filename, byte *palette); -void VL_LoadPalFilewithoffset(const char *filename, byte *palette, word o); -void VL_UpdatePaletteWrite(byte *palette, word o); +void VL_LoadPalFile(const char *filename, byte *palette, global_game_variables_t *gvar); +void VL_LoadPalFileCore(byte *palette, global_game_variables_t *gvar); +void VL_LoadPalFilewithoffset(const char *filename, byte *palette, word o, global_game_variables_t *gvar); +void VL_UpdatePaletteWrite(byte *palette, word o, global_game_variables_t *gvar); +void VL_PaletteSync(global_game_variables_t *gvar); void modexSavePalFile(char *filename, byte *palette); #define MenuFadeIn() VL_FadeIn(0,255,&gamepal,10) @@ -212,12 +212,13 @@ void modexPalWhite(); /* utility functions */ void modexPalUpdate(byte *p); -void modexPalUpdate0(byte *p); +void VL_modexPalScramble(byte *p); word modexPalOverscan(word col); void VL_Plot (int x, int y, int color, ofs_t *ofs); void VL_Hlin (unsigned x, unsigned y, unsigned width, unsigned color, ofs_t *ofs); void VL_Vlin (int x, int y, int height, int color, ofs_t *ofs); void VL_Bar (int x, int y, int width, int height, int color, ofs_t *ofs); +void VL_MemToScreen (byte far *source, int width, int height, int x, int y, ofs_t *ofs); void modexputPixel(page_t *page, int x, int y, byte color); byte modexgetPixel(page_t *page, int x, int y); @@ -250,13 +251,14 @@ static inline byte modexreadPixel(page_t *page, int x, int y, word addr) void modexDrawChar(page_t *page, int x/*for planar selection only*/, word t, word col, word bgcol, word addr); void modexprint(page_t *page, sword x, sword y, word t, boolean tlsw, word col, word bgcol, boolean sw, const byte *str); void modexprintbig(page_t *page, word x, word y, word t, word col, word bgcol, const byte *str); +void VL_modexPrintTextBox(global_game_variables_t *gvar); void modexpdump(page_t *pee); -void modexcls(page_t *page, byte color, byte *Where); void VL_PatternDraw(video_t *video, word pn, boolean sw, boolean allsw); void modexWaitBorder(); void modexWaitBorder_start(); void modexWaitBorder_end(); void VL_WaitVBL(word num); +void VL_SetLineWidth (unsigned width, global_game_variables_t *gvar); void VL_PrintmodexmemInfo(video_t *v); #endif