/* Project 16 Source Code~
- * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669
+ * Copyright (C) 2012-2016 sparky4 & pngwen & andrius4669 & joncampbell123 & yakui-lover
*
* This file is part of Project 16.
*
#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/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>
+#include <hw/vga/vrs.h>
+#endif
static struct pcxHeader {
byte id;
//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
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);
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
outpw(GC_INDEX+1, x & 3);
return vga_state.vga_graphics_ram[addr];
}
-void modexprint(page_t *page, word x, word y, word t, word col, word bgcol, const byte *str, word addrq, boolean q);
+#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