// #include "src/lib/modex16/192x144_.h"\r
// #include "src/lib/modex16/160x120.h"\r
\r
-#ifdef __WATCOMC__\r
-#include <hw/cpu/cpu.h>\r
-#include <hw/dos/dos.h>\r
-#include <hw/vga/vga.h>\r
-#include <hw/vga/vrl.h>\r
-#include <hw/vga/vrs.h>\r
-#endif\r
-\r
//320x240 = 20x15\r
//192x144 = 12x9\r
\r
#define ATR_INDEX AC_INDEX\r
#define ATR_OVERSCAN 17\r
#define DISPLAY_ENABLE 0x01\r
-#define MAP_MASK 0x02\r
+//#define MAP_MASK 0x02\r
#define PAL_READ_REG 0x03C7 /* Color register, read address */\r
#define PAL_WRITE_REG 0x03C8 /* Color register, write address */\r
#define PAL_DATA_REG 0x03C9 /* Color register, data port */\r
//\r
// VGA hardware routines\r
//\r
-\r
-void VGAMAPMASK(byte x);\r
-void VGAWRITEMODE(byte x);\r
-void VGAREADMAP(byte x);\r
+void VGAWRITEMODE(byte x),\r
+ VGAMAPMASK(byte x),\r
+ VGAREADMAP(byte x),\r
+ VGABITMASK(byte x);\r
\r
#define VW_Hlin(x,z,y,c,q) VL_Hlin(x,y,(z)-(x)+1,c,q)\r
#define VW_Vlin(y,z,x,c,q) VL_Vlin(x,y,(z)-(y)+1,c,q)\r
\r
/* -============================ Functions =============================- */\r
/* mode switching, page, and plane functions */\r
-void VGAmodeX(sword vq, boolean cmem, global_game_variables_t *gv);\r
-void modexEnter(sword vq, boolean cmem, global_game_variables_t *gv);\r
-byte vgaGetMode();\r
-void modexLeave();\r
-void VL_SetLineWidth (unsigned width, ofs_t *ofs);\r
+void VL_Startup (global_game_variables_t *gvar),\r
+ VL_Shutdown (global_game_variables_t *gvar),\r
+ VL_SetVGAPlaneMode (global_game_variables_t *gvar),\r
+ VL_ClearVideo (byte color),\r
+ VL_DePlaneVGA (),\r
+ VGAmodeX(sword vq, boolean cmem, global_game_variables_t *gv),\r
+ modexEnter(sword vq, boolean cmem, global_game_variables_t *gv);\r
+void VL_vgaSetMode(byte mode);\r
+byte VL_vgaGetMode(void);\r
+extern void TL_VidInit(global_game_variables_t *gvar);\r
+void modexLeave(void);\r
void modexsetBaseXMode();\r
-page_t modexDefaultPage(page_t *p);\r
+page_t modexDefaultPage(page_t *p, video_t *v);\r
page_t modexNextPage(page_t *p);\r
page_t modexNextPageFlexibleSize(page_t *p, word x, word y);\r
void modexCalcVmemRemain(video_t *video);\r
void modexPalSave(byte *palette);\r
//byte *modexNewPal();\r
void modexLoadPalFile(char *filename, byte *palette);\r
-void VL_LoadPalFile(const char *filename, byte *palette);\r
-void VL_LoadPalFilewithoffset(const char *filename, byte *palette, word o);\r
-void VL_UpdatePaletteWrite(byte *palette, word o);\r
+void VL_LoadPalFile(const char *filename, byte *palette, global_game_variables_t *gvar);\r
+void VL_LoadPalFileCore(byte *palette, global_game_variables_t *gvar);\r
+void VL_LoadPalFilewithoffset(const char *filename, byte *palette, word o, global_game_variables_t *gvar);\r
+void VL_UpdatePaletteWrite(byte *palette, word o, global_game_variables_t *gvar);\r
+void VL_PaletteSync(global_game_variables_t *gvar);\r
void modexSavePalFile(char *filename, byte *palette);\r
#define MenuFadeIn() VL_FadeIn(0,255,&gamepal,10)\r
\r
\r
/* utility functions */\r
void modexPalUpdate(byte *p);\r
-void modexPalUpdate0(byte *p);\r
+void VL_modexPalScramble(byte *p);\r
word modexPalOverscan(word col);\r
void VL_Plot (int x, int y, int color, ofs_t *ofs);\r
void VL_Hlin (unsigned x, unsigned y, unsigned width, unsigned color, ofs_t *ofs);\r
void VL_Vlin (int x, int y, int height, int color, ofs_t *ofs);\r
void VL_Bar (int x, int y, int width, int height, int color, ofs_t *ofs);\r
+void VL_MemToScreen (byte far *source, int width, int height, int x, int y, ofs_t *ofs);\r
void modexputPixel(page_t *page, int x, int y, byte color);\r
byte modexgetPixel(page_t *page, int x, int y);\r
\r
void modexDrawChar(page_t *page, int x/*for planar selection only*/, word t, word col, word bgcol, word addr);\r
void modexprint(page_t *page, sword x, sword y, word t, boolean tlsw, word col, word bgcol, boolean sw, const byte *str);\r
void modexprintbig(page_t *page, word x, word y, word t, word col, word bgcol, const byte *str);\r
+void VL_modexPrintTextBox(global_game_variables_t *gvar);\r
void modexpdump(page_t *pee);\r
-void modexcls(page_t *page, byte color, byte *Where);\r
void VL_PatternDraw(video_t *video, word pn, boolean sw, boolean allsw);\r
void modexWaitBorder();\r
void modexWaitBorder_start();\r
void modexWaitBorder_end();\r
void VL_WaitVBL(word num);\r
+void VL_SetLineWidth (unsigned width, global_game_variables_t *gvar);\r
void VL_PrintmodexmemInfo(video_t *v);\r
\r
#endif\r