]> 4ch.mooo.com Git - 16.git/blobdiff - src/scroll.c
wwww
[16.git] / src / scroll.c
index d9ad13a98455aa888002dd47abd2a6718325ca02..65929b5a9bca125bb8a076b16a0ecef6929f3839 100644 (file)
@@ -1,7 +1,29 @@
+/* Project 16 Source Code~
+ * Copyright (C) 2012-2015 sparky4 & pngwen & andrius4669
+ *
+ * This file is part of Project 16.
+ *
+ * Project 16 is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Project 16 is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>, or
+ * write to the Free Software Foundation, Inc., 51 Franklin Street,
+ * Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ */
+
 #include "src/lib/dos_kb.h"\r
 #include "src/lib/mapread.h"\r
-#include "src/lib/wtest/wtest.c"\r
-#include "src/lib/planar.c"\r
+#include "src/lib/wcpu/wcpu.h"\r
+#include "src/lib/planar.h"\r
 //====#include "src\lib\ems.c"\r
 \r
 //word far *clock= (word far*) 0x046C; /* 18.2hz clock */\r
@@ -63,7 +85,7 @@ void animatePlayer(map_view_t *src, map_view_t *dest, /*map_view_t *top, */sword
 //#define TRIGGY 9\r
 \r
 void main() {\r
-       size_t oldfreemem=GetFreeSize();\r
+//++++ size_t oldfreemem=GetFreeSize();\r
        /*long emmhandle;\r
        long emsavail;\r
        char teststr[80];*/\r
@@ -196,11 +218,11 @@ void main() {
        /* setup camera and screen~ */\r
        screen = modexDefaultPage();\r
        screen.width += (TILEWH*2);\r
-       screen.height += (TILEWH*2)+QUADWH;\r
+       screen.height += (TILEWH*2);//+QUADWH;\r
        mv[0].page = &screen;\r
        screen2 = modexNextPage(mv[0].page);\r
        mv[1].page = &screen2;\r
-       screen3 = modexNextPage0(mv[1].page, 352, 176); //(352*176)+1024 is the remaining amount of memory left wwww\r
+       screen3 = modexNextPage0(mv[1].page, 320, 240); //(352*176)+1024 is the remaining amount of memory left wwww\r
        //screen3 = modexNextPage0(mv2.page, 320, 192); //(352*176)+1024 is the remaining amount of memory left wwww\r
        mv[2].page = &screen3;\r
 \r
@@ -238,7 +260,8 @@ void main() {
        modexDrawSpriteRegion(spri->page, player.x-4, player.y-TILEWH, 24, 64, 24, 32, &ptmp);\r
 \r
        modexShowPage(spri->page);\r
-//     printf("Total used @ before loop:                       %zu\n", oldfreemem-GetFreeSize());\r
+//     printf("Total used @ before loop:                       %zu\n", oldfreemem-GetFreeSize());
+       modexClearRegion(mv[2].page, 0, 0, mv[2].page->width, mv[2].page->height, 1);\r
        modexFadeOn(4, gpal);\r
        while(!keyp(1) && player.hp>0)\r
        {\r
@@ -592,8 +615,8 @@ void main() {
        printf("player.hp: %d", player.hp);     printf("        player.q: %d", player.q);       printf("        player.d: %d\n", player.d);\r
        printf("tile data value at player trigger position: %d\n", bg->map->data[(player.triggerx-1)+(map.width*(player.triggery-1))]);\r
        printf("palette offset: %d\n", paloffset/3);\r
-       printf("Total used: %zu\n", oldfreemem-GetFreeSize());\r
-       printf("Total free: %zu\n", GetFreeSize());\r
+//++++ printf("Total used: %zu\n", oldfreemem-GetFreeSize());\r
+//++++ printf("Total free: %zu\n", GetFreeSize());\r
        printf("temporary player sprite 0: http://www.pixiv.net/member_illust.php?mode=medium&illust_id=45556867\n");\r
        printf("temporary player sprite 1: http://www.pixiv.net/member_illust.php?mode=medium&illust_id=44606385\n");\r
        printf("Screen: %dx", screen.width);    printf("%d\n", screen.height);\r
@@ -954,6 +977,6 @@ animatePlayer(map_view_t *src, map_view_t *dest, /*map_view_t *top, */sword d, s
        //modexClearRegion(top->page, 66, 66, 2, 40, 0);\r
        //modexCopyPageRegion(dest->page, top->page, 66, 66, 66, 66, 2, 40);\r
        //turn this off if XT\r
-       //XTif(detectcpu() > 0) 
+       //XTif(detectcpu() > 0)
        modexWaitBorder();\r
 }\r