OSDN Git Service

modified: BITMAP.C
authorsparky4 <sparky4@cock.li>
Mon, 24 Nov 2014 07:06:45 +0000 (01:06 -0600)
committersparky4 <sparky4@cock.li>
Mon, 24 Nov 2014 07:06:45 +0000 (01:06 -0600)
modified:   Project 16.bfproject
modified:   pcxtest.exe
modified:   scroll.c
modified:   scroll.exe
modified:   test.exe
modified:   test2.exe

BITMAP.C
Project 16.bfproject
pcxtest.exe
scroll.c
scroll.exe
test.exe
test2.exe

index 8287e57..191b460 100644 (file)
--- a/BITMAP.C
+++ b/BITMAP.C
@@ -79,10 +79,10 @@ bitmapLoadPcx(char *filename) {
 \r
     /* open the PCX file for reading */\r
     file = fopen(filename, "rb");\r
-    if(!file) {\r
+    /*if(!file) {\r
        printf("Could not open %s for reading.\n", filename);\r
        exit(-2);\r
-    }\r
+    }*/\r
 \r
     /* load the first part of the pcx file */\r
     loadPcxStage1(file, &result);\r
index 5e39df7..4a4078c 100644 (file)
@@ -1,7 +1,7 @@
 c2e.convert_special: 0
 e2c.convert_num: 0
 openfiles: /dos/z/16/doc/project.txt:102:0:0:
-openfiles: /dos/z/16/scroll.c:12991:12348:1:
+openfiles: /dos/z/16/scroll.c:3426:2959:1:
 openfiles: /dos/z/16/modex16.c:9475:0:0:
 openfiles: /dos/z/16/modex16.h:1512:344:0:
 openfiles: /dos/z/16/pcxtest.c:1339:442:0:
@@ -22,7 +22,7 @@ c2e.convert_iso: 0
 opendir: file:///dos/z/16/lib
 wrap_text_default: 0
 bookmarks_filename_mode: 1
-ssearch_text: modexDrawSpriteRegion
+ssearch_text: )*2
 snr_casesens: 1
 view_blocks: 1
 name: project 16
@@ -115,9 +115,6 @@ snr_escape_chars: 0
 htmlbar_view: 0
 spell_lang: en
 ssearch_dotmatchall: 0
-searchlist: w->page
-searchlist: modexShowPage(spri
-searchlist: howPage(draw
 searchlist: wPage(draw
 searchlist: 32);
 searchlist: 33)
@@ -130,6 +127,9 @@ searchlist: mv
 searchlist: animatePlayer(spri, bg,
 searchlist: clearpl
 searchlist: modexDrawSpriteRegion
+searchlist: bg
+searchlist: )*-
+searchlist: )*2
 autocomplete: 1
 outputb_show_all_output: 0
 bookmarks_show_mode: 0
index de765ec..d1d3940 100644 (file)
Binary files a/pcxtest.exe and b/pcxtest.exe differ
index 2e27dbc..057a5ee 100644 (file)
--- a/scroll.c
+++ b/scroll.c
@@ -63,7 +63,7 @@ void animatePlayer(map_view_t *src, map_view_t *dest, short d1, short d2, int x,
 #define SWAP(a, b) tmp=a; a=b; b=tmp;\r
 void main() {\r
        bitmap_t ptmp; // player sprite\r
-       int q=0;\r
+       int q=1;\r
        page_t screen, screen2;\r
        map_t map;\r
        map_view_t mv, mv2;\r
@@ -118,7 +118,7 @@ void main() {
        {\r
                if(bg->tx >= 0 && bg->tx+20 < MAPX && player.tx == bg->tx + 10)\r
                {\r
-                       for(q=0; q<(TILEWH/SPEED); q++)\r
+                       for(q=1; q<=(TILEWH/SPEED); q++)\r
                        {\r
                                animatePlayer(bg, spri, 1, 1, player.x, player.y, q, &ptmp);\r
                                mapScrollRight(bg, SPEED);\r
@@ -129,7 +129,7 @@ void main() {
                }\r
                else if(player.tx < MAPX)\r
                {\r
-                       for(q=0; q<(TILEWH/SPEED); q++)\r
+                       for(q=1; q<=(TILEWH/SPEED); q++)\r
                        {\r
                                player.x+=SPEED;\r
                                animatePlayer(bg, spri, 1, 0, player.x, player.y, q, &ptmp);\r
@@ -149,7 +149,7 @@ void main() {
        {\r
                if(bg->tx > 0 && bg->tx+20 <= MAPX && player.tx == bg->tx + 10)\r
                {\r
-                       for(q=0; q<(TILEWH/SPEED); q++)\r
+                       for(q=1; q<=(TILEWH/SPEED); q++)\r
                        {\r
                                \r
                                animatePlayer(bg, spri, 3, 1, player.x, player.y, q, &ptmp);\r
@@ -161,7 +161,7 @@ void main() {
                }\r
                else if(player.tx > 1)\r
                {\r
-                       for(q=0; q<(TILEWH/SPEED); q++)\r
+                       for(q=1; q<=(TILEWH/SPEED); q++)\r
                        {\r
                                player.x-=SPEED;\r
                                animatePlayer(bg, spri, 3, 0, player.x, player.y, q, &ptmp);\r
@@ -181,7 +181,7 @@ void main() {
        {\r
                if(bg->ty >= 0 && bg->ty+15 < MAPY && player.ty == bg->ty + 8)\r
                {\r
-                       for(q=0; q<(TILEWH/SPEED); q++)\r
+                       for(q=1; q<=(TILEWH/SPEED); q++)\r
                        {\r
                                animatePlayer(bg, spri, 2, 1, player.x, player.y, q, &ptmp);\r
                                mapScrollDown(bg, SPEED);\r
@@ -192,7 +192,7 @@ void main() {
                }\r
                else if(player.ty < MAPY)\r
                {\r
-                       for(q=0; q<(TILEWH/SPEED); q++)\r
+                       for(q=1; q<=(TILEWH/SPEED); q++)\r
                        {\r
                                player.y+=SPEED;\r
                                animatePlayer(bg, spri, 2, 0, player.x, player.y, q, &ptmp);\r
@@ -212,7 +212,7 @@ void main() {
        {\r
                if(bg->ty > 0 && bg->ty+15 <= MAPY && player.ty == bg->ty + 8)\r
                {\r
-                       for(q=0; q<(TILEWH/SPEED); q++)\r
+                       for(q=1; q<=(TILEWH/SPEED); q++)\r
                        {\r
                                animatePlayer(bg, spri, 0, 1, player.x, player.y, q, &ptmp);\r
                                mapScrollUp(bg, SPEED);\r
@@ -223,7 +223,7 @@ void main() {
                }\r
                else if(player.ty > 1)\r
                {\r
-                       for(q=0; q<(TILEWH/SPEED); q++)\r
+                       for(q=1; q<=(TILEWH/SPEED); q++)\r
                        {\r
                                player.y-=SPEED;\r
                                animatePlayer(bg, spri, 0, 0, player.x, player.y, q, &ptmp);\r
@@ -472,11 +472,11 @@ mapDrawCol(map_view_t *mv, int tx, int ty, word x) {
 \r
 void\r
 animatePlayer(map_view_t *src, map_view_t *dest, short d1, short d2, int x, int y, int ls, bitmap_t *bmp)\r
-{\r
+{
        short dire=32*d1;\r
        short qq;\r
        short lo = ((TILEWH / SPEED) / 3);\r
-       short loo = (ls + lo);\r
+       short loo = (ls + lo);
 \r
        if(d2==0) qq = 0;\r
        else qq = ((ls+1)*SPEED);\r
@@ -504,13 +504,13 @@ animatePlayer(map_view_t *src, map_view_t *dest, short d1, short d2, int x, int
                break;\r
        }
        //TODO: make flexible animation thingy\r
-       if(2>ls && ls>=0) { modexCopyPageRegion(dest->page, src->page, x-2, y-4, x-2, y-4, 28, 40);\r
+       if(2>ls && ls>=1) { modexCopyPageRegion(dest->page, src->page, x-2, y-4, x-2, y-4, 28, 40);\r
        modexDrawSpriteRegion(dest->page, x, y, 48, dire, 24, 32, bmp); }else\r
-       if(4>ls && ls>=2) { modexCopyPageRegion(dest->page, src->page, x-2, y-4, x-2, y-4, 28, 40);\r
+       if(3>ls && ls>=2) { modexCopyPageRegion(dest->page, src->page, x-2, y-4, x-2, y-4, 28, 40);\r
        modexDrawSpriteRegion(dest->page, x, y, 24, dire, 24, 32, bmp); }else\r
-       if(6>ls && ls>=4) { modexCopyPageRegion(dest->page, src->page, x-2, y-4, x-2, y-4, 28, 40);\r
+       if(4>ls && ls>=3) { modexCopyPageRegion(dest->page, src->page, x-2, y-4, x-2, y-4, 28, 40);\r
        modexDrawSpriteRegion(dest->page, x, y, 0, dire, 24, 32, bmp); }else\r
-       if(8>ls && ls>=6) { modexCopyPageRegion(dest->page, src->page, x-2, y-4, x-2, y-4, 28, 40);\r
-       modexDrawSpriteRegion(dest->page, x, y, 24, dire, 24, 32, bmp); }else ls-=ls;
+       if(5>ls && ls>=4) { modexCopyPageRegion(dest->page, src->page, x-2, y-4, x-2, y-4, 28, 40);\r
+       modexDrawSpriteRegion(dest->page, x, y, 24, dire, 24, 32, bmp); }
        modexWaitBorder();\r
 }\r
index 28987bc..98e9290 100644 (file)
Binary files a/scroll.exe and b/scroll.exe differ
index 99404b1..b417dca 100644 (file)
Binary files a/test.exe and b/test.exe differ
index 2b870ef..b061884 100644 (file)
Binary files a/test2.exe and b/test2.exe differ