]> 4ch.mooo.com Git - 16.git/commitdiff
wwww
authorsparky4 <sparky4@cock.li>
Thu, 16 Jul 2015 20:18:27 +0000 (15:18 -0500)
committersparky4 <sparky4@cock.li>
Thu, 16 Jul 2015 20:18:27 +0000 (15:18 -0500)
modified:   16.exe
renamed:    rose -> data/rose
modified:   fontgfx.exe
modified:   fonttes0.exe
modified:   maptest.exe
modified:   palettec.exe
modified:   pcxtest.exe
modified:   src/fontgfx.c
modified:   src/lib/modex16.c
modified:   src/lib/modex16.h
modified:   test.exe
modified:   test2.exe

12 files changed:
16.exe
data/rose [moved from rose with 100% similarity]
fontgfx.exe
fonttes0.exe
maptest.exe
palettec.exe
pcxtest.exe
src/fontgfx.c
src/lib/modex16.c
src/lib/modex16.h
test.exe
test2.exe

diff --git a/16.exe b/16.exe
index b74b601a1e558eee032d0bb0af1723dfb7dd20a9..5385c3d7c3428cf29edfd57569d3ab87a54528be 100644 (file)
Binary files a/16.exe and b/16.exe differ
diff --git a/rose b/data/rose
similarity index 100%
rename from rose
rename to data/rose
index fe30ff4749a60754a12819c07f84dbe953b2e728..383c6074e420e8cc4c86b65ad224f042244e74ef 100644 (file)
Binary files a/fontgfx.exe and b/fontgfx.exe differ
index 0f5bfce7e3df1777175049304b11bb6225c2071b..7de3837f90baa01c0dc987cee1dd991ee2fb5c8f 100644 (file)
Binary files a/fonttes0.exe and b/fonttes0.exe differ
index 342a6beae5754b67e79f93cb3b69887b2b8f9f8a..93a389d390ebbc3ab2e4988002de7d72eab739ae 100644 (file)
Binary files a/maptest.exe and b/maptest.exe differ
index 96e18a076e09ce6bd532fd2704b31885ed5109be..1b6fda6cff231b032c0f272d74d2527651bef6ba 100644 (file)
Binary files a/palettec.exe and b/palettec.exe differ
index c7abb981e119d68495dfcbdaae3bd11aa24e23ca..f7ee0d8d750846af97e56ea85ea854fce2a8e574 100644 (file)
Binary files a/pcxtest.exe and b/pcxtest.exe differ
index 369037216a98d6425497f1f8348cca381e73c29a..ebfbb6d5918bd358805c2e177595cfba1628777c 100644 (file)
@@ -31,28 +31,42 @@ void main(int argc, char near *argv[])
        static byte e;\r
        //word ri;\r
        byte pee[2];\r
-       static byte rose[]="                                              :. ,..\n\\r
-                                            .' :~.':_.,\n\\r
-                                          .'   ::.::'.'\n\\r
-                                         :     ::'  .:\n\\r
-                                       `.:    .:  .:/\n\\r
-                                        `::--.:'.::'\n\\r
-                                          |. _:===-'\n\\r
-                                         / /\n\\r
-                        ,---.---.    __,','\n\\r
-                       (~`.  \   )   )','.,---..\n\\r
-                        `v`\ | ,' .-'.:,'_____   `.\n\\r
-                            )|/.-~.--~~--.   ~~~-. \ \n\\r
-                          _/-'_.-~        ""---.._`.|\n\\r
-                     _.-~~_.-~                    ""'\n\\r
-              _..--~~_.(~~\n\\r
-   __...---~~~_..--~~\n\\r
-,'___...---~~~\n\\r
+       page_t screen;\r
+       static byte ibmlogo[]="IIIIIII  BBBBBBBBB    MMMMM       MMMMM\n\\r
+IIIIIII  BBBBBBBBBBB  MMMMMM     MMMMMM\n\\r
+  III     BBB    BBB   MMMMMM   MMMMMM\n\\r
+  III     BBBBBBBBB    MMMMMMM MMMMMMM\n\\r
+  III     BBBBBBBBB    MMM MMMMMMM MMM\n\\r
+  III     BBB    BBB   MMM  MMMMM  MMM\n\\r
+IIIIIII  BBBBBBBBBBB  MMMM   MMM   MMMM\n\\r
+IIIIIII  BBBBBBBBB    MMMM    M    MMMM\n\\r
+";\r
+       static byte rose[]="                                              :. ,..\\r
+                                            .' :~.':_.,\\r
+                                          .'   ::.::'.'\\r
+                                         :     ::'  .:\\r
+                                       `.:    .:  .:/\\r
+                                        `::--.:'.::'\\r
+                                          |. _:===-'\\r
+                                         / /\\r
+                        ,---.---.    __,','\\r
+                       (~`.  \   )   )','.,---..\\r
+                        `v`\ | ,' .-'.:,'_____   `.\\r
+                            )|/.-~.--~~--.   ~~~-. \\\r
+                          _/-'_.-~        ""---.._`.|\\r
+                     _.-~~_.-~                    ""'\\r
+              _..--~~_.(~~\\r
+   __...---~~~_..--~~\\r
+,'___...---~~~\\r
 ";\r
 //     static byte *rosa;\r
        static word chx, chy, colpee;\r
        textInit();\r
        modexEnter();\r
+       /* setup camera and screen~ */\r
+       screen = modexDefaultPage();\r
+       screen.width += (16*2);\r
+       screen.height += (16*2);\r
        //modexprint(16, 16, 1, 15, "wwww");\r
        //getch();\r
        chx=0;\r
@@ -65,17 +79,18 @@ void main(int argc, char near *argv[])
                        chx=0;\r
                        chy+=8;\r
                        sprintf(pee,"%u", colpee);\r
-                       modexprint(200, 200, 1, 47, 0, &pee);\r
+                       modexprint(&screen, 200, 200, 1, 47, 0, &pee);\r
                        //getch();\r
                }\r
-               modexprint(chx, chy, 1, 0, colpee, &e);\r
+               modexprint(&screen, chx, chy, 1, 0, colpee, &e);\r
                chx+=9;\r
                colpee++;\r
                if(colpee>=32+24) colpee=32;\r
        }\r
        //modexprint(100, 100, 1, 47, 0, "wwww");\r
        getch();\r
-       modexprint(0, 0, 1, 0, colpee, &rose);\r
+//     modexprint(0, 0, 1, 0, colpee, &rose);\r
+       modexprint(&screen, 0, 0, 1, 0, colpee, &ibmlogo);\r
 //     modexprint(0, 0, 1, 0, colpee, ROSE);\r
        getch();\r
        modexLeave();\r
index e4dfeea23da9051b2daddbb9e970a3f490a9d20e..7ac8f1b2a375d3129451d6e70e4a9d7a72331f4c 100644 (file)
@@ -969,7 +969,7 @@ byte modexgetPixel(int x, int y)
 \r
 }\r
 \r
-void modexprint(word x, word y, word t, word col, word bgcol, const byte *str)\r
+void modexprint(page_t *page, word x, word y, word t, word col, word bgcol, const byte *str)\r
 {
        word i, s, o, w, j, xp;
        byte l[1024];\r
@@ -1002,8 +1002,20 @@ void modexprint(word x, word y, word t, word col, word bgcol, const byte *str)
 \r
        for(; *str != '\0'; str++)\r
        {
-       if(chw>=SCREEN_WIDTH-1) y+=w;
+       if(chw>=page->width-1)
+       {
+               x=chw=0;
+               y+=w;
+               continue;
+       }
        c = (*str);
+       if(c=='\n' || c=="\
+")
+       {
+               y+=w;
+               x=chw=0;
+               continue;
+       }
        //load the letter 'A'\r
        __asm {\r
                MOV DI, addr\r
@@ -1033,7 +1045,7 @@ void modexprint(word x, word y, word t, word col, word bgcol, const byte *str)
                                j>>=1;
                        }
                }\r
-               chw += xp;\r
+               chw += xp-1;\r
        }\r
 }\r
 \r
index 61e75d9c3409399f5b0bc9ba6a1d364fea2c76e1..f311a69ede71c0b1a0d5dfe16c30f96872de06c0 100644 (file)
@@ -94,7 +94,7 @@ void modexPalUpdate1(byte *p);
 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 modexprint(word x, word y, word t, word col, word bgcol, const byte *str);
+void modexprint(page_t *page, word x, word y, word t, word col, word bgcol, const byte *str);
 void modexWaitBorder();
 
 /* -======================= Constants & Vars ==========================- */
index 17d922a3f367c63d62fc84aab9ac206c0e3c6bb0..135dea41c50460cf6b3581e5760020185001ae5e 100644 (file)
Binary files a/test.exe and b/test.exe differ
index f9dc51744c9fd23509211d443480d8867153ac1e..8769557826b1977024808bf0810d8607bd1dd6e6 100644 (file)
Binary files a/test2.exe and b/test2.exe differ