]> 4ch.mooo.com Git - 16.git/blobdiff - src/lib/modex16.h
Documented 16_vrs files
[16.git] / src / lib / modex16.h
index c1c45252a336de6ef0d286a25f07963c2e78e151..55e0be87641900ea7e91c800237043cb00423d1b 100755 (executable)
 #include "src/lib/modex16/16planar.h"
 #include "src/lib/16text.h"
 #include "src/lib/modex16/16render.h"
-// #include "src/lib/modex16/320x240.h"
+#include "src/lib/modex16/320x240.h"
 // #include "src/lib/modex16/320x200.h"
 // #include "src/lib/modex16/256x192.h"
 // #include "src/lib/modex16/192x144_.h"
 // #include "src/lib/modex16/160x120.h"
 
+#ifdef __WATCOMC__
 #include <hw/cpu/cpu.h>
 #include <hw/dos/dos.h>
 #include <hw/vga/vga.h>
 #include <hw/vga/vrl.h>
+#endif
 
 static struct pcxHeader {
        byte id;
@@ -66,12 +68,13 @@ static struct pcxHeader {
 //192x144 = 12x9
 
 //temp defines
-#define TILEWH 16
+#define TILEWH 16
+#define TILEWHD        TILEWH*2
 #define QUADWH                 TILEWH/2
 
 /* -========================== Types & Macros ==========================- */
 #define PAGE_OFFSET(x,y) (((y)<<6)+((y)<<4)+((x)>>2))
-#define PLANE(x) (1<< (x&3))
+#define PLANE(x) (1 << ((x) & 3))
 #define SELECT_ALL_PLANES() outpw(0x03c4, 0xff02)
 #define     PALSIZE            768
 
@@ -118,6 +121,8 @@ void modexsetBaseXMode();
 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 modexHiganbanaPageSetup(video_t *video);
 void modexShowPage(page_t *page);
 void modexPanPage(page_t *page, int dx, int dy);
 void modexSelectPlane(byte plane);
@@ -145,10 +150,12 @@ void modexPalWhite();
 void modexPalUpdate(bitmap_t *bmp, word *i, word qp, word aqoffset);
 void modexPalUpdate1(byte *p);
 void modexPalUpdate0(byte *p);
-void modexPalOverscan(byte *p, word col);
+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);
+
+#if 0 // not needed anymore. maybe good for reference purposes though.
 static inline void modexwritepixel(page_t *page, int x, int y, word addr, byte color)
 {
        /* Each address accesses four neighboring pixels, so set
@@ -172,11 +179,13 @@ static inline byte modexreadPixel(page_t *page, int x, int y, word addr)
        outpw(GC_INDEX+1, x & 3);
        return vga_state.vga_graphics_ram[addr];
 }
+#endif
+
 void modexprint(page_t *page, word x, word y, word t, 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 modexWaitBorder();
-void bios_cls();
+void modexWaitBorder();
+void modexprintmeminfo(video_t *v);
 
 #endif