X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=src%2Flib%2F16_vl.h;h=cec79507ad5189ec035ab3b06fe07a36ea6aabf7;hb=52fab2ff9ef6a39ed9303b0df1ce0ad9c9180ef1;hp=8a63781b6d4b3652325f29c8f2c210a1b6d93e6e;hpb=3506c6d20c6b49673eb3f527c25149b44f16ab12;p=proj16%2F16.git diff --git a/src/lib/16_vl.h b/src/lib/16_vl.h index 8a63781b..cec79507 100755 --- a/src/lib/16_vl.h +++ b/src/lib/16_vl.h @@ -1,5 +1,5 @@ /* Project 16 Source Code~ - * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover + * Copyright (C) 2012-2017 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover * * This file is part of Project 16. * @@ -26,7 +26,6 @@ #define MODEX16_H #include "src/lib/16_head.h" -#include "src/lib/bitmap.h" //#include "src/lib/planar.h" //#include "src/lib/modex16/16planar.h" #include "src/lib/16text.h" @@ -52,11 +51,12 @@ #define TILEWHD TILEWH*2 #define QUADWH TILEWH/2 +//#define OLDBGPRESERVE + /* -========================== 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) -#define PALSIZE 768 typedef union { @@ -84,6 +84,9 @@ extern byte far* VGA; /* The VGA Memory */ #define LOW_ADDRESS 0x0D #define VRETRACE 0x08 //#define INPUT_STATUS_1 0x03da defined in 16_head +#define STATUS_REGISTER_1 INPUT_STATUS_1 +#define ATR_INDEX AC_INDEX +#define ATR_OVERSCAN 17 #define DISPLAY_ENABLE 0x01 #define MAP_MASK 0x02 #define PAL_READ_REG 0x03C7 /* Color register, read address */ @@ -102,8 +105,9 @@ page_t modexDefaultPage(page_t *p); page_t modexNextPage(page_t *p); page_t modexNextPageFlexibleSize(page_t *p, word x, word y); void modexCalcVmemRemain(video_t *video); +void VL_Initofs(video_t *video); void modexHiganbanaPageSetup(video_t *video); -void modexShowPage(page_t *page); +//void modexShowPage(page_t *page); void VL_ShowPage(page_t *page, boolean vsync, boolean sr); void modexPanPage(page_t *page, int dx, int dy); void modexSelectPlane(byte plane); @@ -119,9 +123,11 @@ void modexFlashOff(word fade, byte *palette); /* palette loading and saving */ void modexPalSave(byte *palette); -byte *modexNewPal(); -void modexLoadPalFile(char *filename, 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 modexSavePalFile(char *filename, byte *palette); /* fixed palette functions */ @@ -129,11 +135,9 @@ void modexPalBlack(); void modexPalWhite(); /* utility functions */ -void modexPalUpdate(bitmap_t *bmp, word *i, word qp, word aqoffset); -void modexPalUpdate1(byte *p); +void modexPalUpdate(byte *p); void modexPalUpdate0(byte *p); void modexPalOverscan(word col); -void modexchkcolor(bitmap_t *bmp, word *q, word *a, word *aa, word *z, word *i/*, word *offset*/); void modexputPixel(page_t *page, int x, int y, byte color); byte modexgetPixel(page_t *page, int x, int y); @@ -164,11 +168,14 @@ static inline byte modexreadPixel(page_t *page, int x, int y, word addr) #endif void modexDrawChar(page_t *page, int x/*for planar selection only*/, word t, word col, word bgcol, word addr); -void modexprint(page_t *page, word x, word y, word t, word col, word bgcol, const byte *str); +void modexprint(page_t *page, sword x, sword y, word t, boolean tlsw, word col, word bgcol, const byte *str); void modexprintbig(page_t *page, word x, word y, word t, word col, word bgcol, const byte *str); 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 modexprintmeminfo(video_t *v); +void modexWaitBorder_start(); +void modexWaitBorder_end(); +void VL_PrintmodexmemInfo(video_t *v); #endif