From: sparky4 Date: Sun, 19 Apr 2015 20:28:01 +0000 (-0500) Subject: about to add collision detection to null tiles! X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=a90e0d1e727754573f287bc7ed5107d76e83c52b;p=16.git about to add collision detection to null tiles! modified: README modified: scroll.exe modified: src/scroll.c --- diff --git a/README b/README index baa061b3..b7e124f1 100644 --- a/README +++ b/README @@ -14,11 +14,11 @@ DONE 5. sprite rendering 7. text rendering DONE! YAY! 8. map loading DONE! YAY! wwww 9. map rendering~ -10. map and item interation +10. map and item interation (working currently on this!) 11. item inventory~ 12. Memory management (EMS + XMS) 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) -14. masking layer! +14. masking layer! (i think this is not easy to accomplish!) DONE 15. 8088 detection to turn off vsync! 16. (very important!) optoimize draw row and draw col @@ -26,6 +26,7 @@ not needed ... really... 17. merge map system and interperator from verge 2 18. save feature! 19. (also important) interperator! and possibly custom map system 20. (also important) lua scripting system! +21. extend the map system! To compile: You need Open Watcom stable to compile and just run wmake diff --git a/scroll.exe b/scroll.exe index f1815d58..744d667b 100644 Binary files a/scroll.exe and b/scroll.exe differ diff --git a/src/scroll.c b/src/scroll.c index b27f3298..8c19de2f 100644 --- a/src/scroll.c +++ b/src/scroll.c @@ -241,11 +241,6 @@ void main() { modexDrawSpriteRegion(spri->page, npc0.x-4, npc0.y-TILEWH, 24, 64, 24, 32, &npctmp);*/ modexDrawSpriteRegion(spri->page, player.x-4, player.y-TILEWH, 24, 64, 24, 32, &ptmp); - //----modexClearRegion(spri->page, player.triggerx*16, player.triggery*16, 16, 16, 1); - //----modexClearRegion(bg->page, player.triggerx*16, player.triggery*16, 16, 16, 1); - - //----modexClearRegion(spri->page, 5*16, 5*16, 16, 16, 255); - //----modexClearRegion(bg->page, 5*16, 5*16, 16, 16, 255); modexShowPage(spri->page); // printf("Total used @ before loop: %zu\n", oldfreemem-GetFreeSize()); modexFadeOn(4, gpal); @@ -375,7 +370,8 @@ void main() { if((keyp(77) && !keyp(75) && player.d == 0) || player.d == 2) { if(player.d == 0){ player.d = 2; } - if(bg->tx >= 0 && bg->tx+20 < map.width && player.tx == bg->tx + 10 && !(player.tx+1 == TRIGGX && player.ty == TRIGGY)) + if(bg->tx >= 0 && bg->tx+20 < map.width && player.tx == bg->tx + 10 && + !(player.tx+1 == TRIGGX && player.ty == TRIGGY)) //collision detection! { if(player.q<=(TILEWH/SPEED)) { @@ -416,7 +412,8 @@ void main() { if((keyp(75) && !keyp(77) && player.d == 0) || player.d == 4) { if(player.d == 0){ player.d = 4; } - if(bg->tx > 0 && bg->tx+20 <= map.width && player.tx == bg->tx + 10 && !(player.tx-1 == TRIGGX && player.ty == TRIGGY)) + if(bg->tx > 0 && bg->tx+20 <= map.width && player.tx == bg->tx + 10 && + !(player.tx-1 == TRIGGX && player.ty == TRIGGY)) //collision detection! { if(player.q<=(TILEWH/SPEED)) { @@ -457,7 +454,8 @@ void main() { if((keyp(80) && !keyp(72) && player.d == 0) || player.d == 3) { if(player.d == 0){ player.d = 3; } - if(bg->ty >= 0 && bg->ty+15 < map.height && player.ty == bg->ty + 8 && !(player.tx == TRIGGX && player.ty+1 == TRIGGY)) + if(bg->ty >= 0 && bg->ty+15 < map.height && player.ty == bg->ty + 8 && + !(player.tx == TRIGGX && player.ty+1 == TRIGGY)) //collision detection! { if(player.q<=(TILEWH/SPEED)) { @@ -498,7 +496,8 @@ void main() { if((keyp(72) && !keyp(80) && player.d == 0) || player.d == 1) { if(player.d == 0){ player.d = 1; } - if(bg->ty > 0 && bg->ty+15 <= map.height && player.ty == bg->ty + 8 && !(player.tx == TRIGGX && player.ty-1 == TRIGGY)) + if(bg->ty > 0 && bg->ty+15 <= map.height && player.ty == bg->ty + 8 && + !(player.tx == TRIGGX && player.ty-1 == TRIGGY)) //collision detection! { if(player.q<=(TILEWH/SPEED)) {