]> 4ch.mooo.com Git - 16.git/commitdiff
about to add collision detection to null tiles!
authorsparky4 <sparky4@cock.li>
Sun, 19 Apr 2015 20:28:01 +0000 (15:28 -0500)
committersparky4 <sparky4@cock.li>
Sun, 19 Apr 2015 20:28:01 +0000 (15:28 -0500)
modified:   README
modified:   scroll.exe
modified:   src/scroll.c

README
scroll.exe
src/scroll.c

diff --git a/README b/README
index baa061b330f4cea0ea89e94c9c4e912a61ef4d8a..b7e124f1b88c7dbdd96ad64a0833eaad64e2d659 100644 (file)
--- a/README
+++ b/README
@@ -14,11 +14,11 @@ DONE 5. sprite rendering
 7. text rendering\r
 DONE! YAY! 8. map loading\r
 DONE! YAY! wwww 9. map rendering~\r
-10. map and item interation\r
+10. map and item interation (working currently on this!)\r
 11. item inventory~\r
 12. Memory management (EMS + XMS)\r
 13. case switch with keyboard code (when your holding 2 arrow keys and a key is released the keyboard controller dose not read input from the port anymore for some weired reason)\r
-14. masking layer!\r
+14. masking layer! (i think this is not easy to accomplish!)\r
 DONE 15. 8088 detection to turn off vsync!\r
 16. (very important!) optoimize draw row and draw col\r
 \r
@@ -26,6 +26,7 @@ not needed ... really... 17. merge map system and interperator from verge 2
 18. save feature!\r
 19. (also important) interperator! and possibly custom map system\r
 20. (also important) lua scripting system!\r
+21. extend the map system!\r
 \r
 To compile:\r
 You need Open Watcom stable to compile and just run wmake\r
index f1815d58f3dea2eb964d2f5d9a685474860a85b9..744d667bdc760a2cd33b02336582806dd00c37dd 100644 (file)
Binary files a/scroll.exe and b/scroll.exe differ
index b27f329869a34c2e2954533aa8a99cb2ff899da9..8c19de2faea74f66c8ab966802cdbf103bd12852 100644 (file)
@@ -241,11 +241,6 @@ void main() {
        modexDrawSpriteRegion(spri->page, npc0.x-4, npc0.y-TILEWH, 24, 64, 24, 32, &npctmp);*/\r
        modexDrawSpriteRegion(spri->page, player.x-4, player.y-TILEWH, 24, 64, 24, 32, &ptmp);\r
 \r
-       //----modexClearRegion(spri->page, player.triggerx*16, player.triggery*16, 16, 16, 1);\r
-       //----modexClearRegion(bg->page, player.triggerx*16, player.triggery*16, 16, 16, 1);\r
-\r
-       //----modexClearRegion(spri->page, 5*16, 5*16, 16, 16, 255);\r
-       //----modexClearRegion(bg->page, 5*16, 5*16, 16, 16, 255);\r
        modexShowPage(spri->page);\r
 //     printf("Total used @ before loop:                       %zu\n", oldfreemem-GetFreeSize());\r
        modexFadeOn(4, gpal);\r
@@ -375,7 +370,8 @@ void main() {
        if((keyp(77) && !keyp(75) && player.d == 0) || player.d == 2)\r
        {\r
                if(player.d == 0){ player.d = 2; }\r
-               if(bg->tx >= 0 && bg->tx+20 < map.width && player.tx == bg->tx + 10 && !(player.tx+1 == TRIGGX && player.ty == TRIGGY))\r
+               if(bg->tx >= 0 && bg->tx+20 < map.width && player.tx == bg->tx + 10 &&
+               !(player.tx+1 == TRIGGX && player.ty == TRIGGY))        //collision detection!\r
                {\r
                        if(player.q<=(TILEWH/SPEED))\r
                        {\r
@@ -416,7 +412,8 @@ void main() {
        if((keyp(75) && !keyp(77) && player.d == 0) || player.d == 4)\r
        {\r
                if(player.d == 0){ player.d = 4; }\r
-               if(bg->tx > 0 && bg->tx+20 <= map.width && player.tx == bg->tx + 10 && !(player.tx-1 == TRIGGX && player.ty == TRIGGY))\r
+               if(bg->tx > 0 && bg->tx+20 <= map.width && player.tx == bg->tx + 10 &&
+               !(player.tx-1 == TRIGGX && player.ty == TRIGGY))        //collision detection!\r
                {\r
                        if(player.q<=(TILEWH/SPEED))\r
                        {\r
@@ -457,7 +454,8 @@ void main() {
        if((keyp(80) && !keyp(72) && player.d == 0) || player.d == 3)\r
        {\r
                if(player.d == 0){ player.d = 3; }\r
-               if(bg->ty >= 0 && bg->ty+15 < map.height && player.ty == bg->ty + 8 && !(player.tx == TRIGGX && player.ty+1 == TRIGGY))\r
+               if(bg->ty >= 0 && bg->ty+15 < map.height && player.ty == bg->ty + 8 &&
+               !(player.tx == TRIGGX && player.ty+1 == TRIGGY))        //collision detection!\r
                {\r
                        if(player.q<=(TILEWH/SPEED))\r
                        {\r
@@ -498,7 +496,8 @@ void main() {
        if((keyp(72) && !keyp(80) && player.d == 0) || player.d == 1)\r
        {\r
                if(player.d == 0){ player.d = 1; }\r
-               if(bg->ty > 0 && bg->ty+15 <= map.height && player.ty == bg->ty + 8 && !(player.tx == TRIGGX && player.ty-1 == TRIGGY))\r
+               if(bg->ty > 0 && bg->ty+15 <= map.height && player.ty == bg->ty + 8 &&
+               !(player.tx == TRIGGX && player.ty-1 == TRIGGY))        //collision detection!\r
                {\r
                        if(player.q<=(TILEWH/SPEED))\r
                        {\r