EXMMLIB=$(SRCLIB)exmm$(DIRSEP)
WCPULIB=$(SRCLIB)wcpu$(DIRSEP)
-16LIBOBJS = 16_in.$(OBJ) 16_mm.$(OBJ) wcpu.$(OBJ) 16_head.$(OBJ) scroll16.$(OBJ) 16text.$(OBJ) 16_ca.$(OBJ)
-GFXLIBOBJS = modex16.$(OBJ) bitmap.$(OBJ) planar.$(OBJ)
+16LIBOBJS = 16_in.$(OBJ) 16_mm.$(OBJ) wcpu.$(OBJ) 16_head.$(OBJ) scroll16.$(OBJ) 16_ca.$(OBJ)
+GFXLIBOBJS = modex16.$(OBJ) bitmap.$(OBJ) planar.$(OBJ) 16text.$(OBJ)
-all: 16.exe test.exe pcxtest.exe test2.exe palettec.exe maptest.exe fmemtest.exe fonttest.exe inputest.exe exmmtest.exe fonttes0.exe
+all: 16.exe test.exe pcxtest.exe test2.exe palettec.exe maptest.exe fmemtest.exe fonttest.exe inputest.exe exmmtest.exe fonttes0.exe fontgfx.exe
#
#executables
fonttes0.exe: fonttes0.$(OBJ) 16.lib
wcl $(FLAGS) fonttes0.$(OBJ) 16.lib
+fontgfx.exe: fontgfx.$(OBJ) 16.lib
+ wcl $(FLAGS) fontgfx.$(OBJ) 16.lib
+
inputest.exe: inputest.$(OBJ) 16.lib
wcl $(FLAGS) inputest.$(OBJ) 16.lib
pcxtest.exe: pcxtest.$(OBJ) gfx.lib
wcl $(FLAGS) pcxtest.$(OBJ) gfx.lib
-palettec.exe: palettec.$(OBJ) modex16.$(OBJ)
- wcl $(FLAGS) palettec.$(OBJ) modex16.$(OBJ)
+palettec.exe: palettec.$(OBJ) 16.lib
+ wcl $(FLAGS) palettec.$(OBJ) 16.lib
maptest.exe: maptest.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) 16.lib
wcl $(FLAGS) maptest.$(OBJ) mapread.$(OBJ) jsmn.$(OBJ) 16.lib
fonttes0.$(OBJ): $(SRC)fonttes0.c
wcl $(FLAGS) -c $(SRC)fonttes0.c
+fontgfx.$(OBJ): $(SRC)fontgfx.c
+ wcl $(FLAGS) -c $(SRC)fontgfx.c
+
inputest.$(OBJ): $(SRC)inputest.c
wcl $(FLAGS) -c $(SRC)inputest.c
--- /dev/null
+/* Project 16 Source Code~\r
+ * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669\r
+ *\r
+ * This file is part of Project 16.\r
+ *\r
+ * Project 16 is free software; you can redistribute it and/or modify\r
+ * it under the terms of the GNU General Public License as published by\r
+ * the Free Software Foundation; either version 3 of the License, or\r
+ * (at your option) any later version.\r
+ *\r
+ * Project 16 is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+ * GNU General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with this program. If not, see <http://www.gnu.org/licenses/>, or\r
+ * write to the Free Software Foundation, Inc., 51 Franklin Street,\r
+ * Fifth Floor, Boston, MA 02110-1301 USA.\r
+ *\r
+ */\r
+#include <stdio.h>\r
+#include <conio.h>\r
+#include "lib/types.h"\r
+//#include "lib/16text.h"
+#include "lib/modex16.h"\r
+\r
+void main(int argc, char near *argv[])\r
+{
+ textInit();
+ modexEnter();\r
+ modexprint(16, 16, 1, 15, "wwww");
+ getch();
+ modexLeave();
+}\r
\r
}\r
\r
-void bputs(word x, unsigned y, , const char *s)\r
+void modexprint(word x, word y, word t, word col, const byte *str)\r
{
- int j;
- word s, o, t, w;\r
- word addr = (word) l;\r
+ word i, s, o, w, j, xp;
+ char l[16];\r
+ word addr = (word) l;
+ word chw=0;
+ byte c;
+
+ switch(t)\r
+ {\r
+ case 0:
+ w=14;\r
+ break;\r
+ case 1:
+ w=8;\r
+ break;\r
+ case 2:
+ w=8;\r
+ break;\r
+ case 3:
+ w=16;\r
+ break;\r
+ default:
+ t=3;\r
+ w=16;\r
+ break;\r
+ }
+\r
s=romFonts[t].seg;\r
- o=romFonts[t].off;\r
+ o=romFonts[t].off;
\r
+ for(; *str != '\0'; str++)\r
+ {
+ c = *(str);
//load the letter 'A'\r
__asm {\r
MOV DI, addr\r
JNZ L1\r
}
\r
- for(; *s != '\0'; s++)\r
- {\r
for(i=0; i<w; i++)
{\r
j=1<<8;
- x=0;\r
+ xp=0;\r
while(j)
{
- modexputPixel(x, i, l[i] & j ? 15:0);
+ modexputPixel(x+xp+chw, y+i, l[i] & j ? col:0);
xp++;
j>>=1;
}
void modexPalUpdate0(byte *p);
void chkcolor(bitmap_t *bmp, word *q, word *a, word *aa, word *z, word *i/*, word *offset*/);
void modexputPixel(int x, int y, byte color);
-void bputs(/*bmp_t *bmp, */unsigned x, unsigned y, const char *s);
+void modexprint(word x, word y, word t, word col, const byte *str);
void modexWaitBorder();
/* -======================= Constants & Vars ==========================- */