From a90e0d1e727754573f287bc7ed5107d76e83c52b Mon Sep 17 00:00:00 2001 From: sparky4 Date: Sun, 19 Apr 2015 15:28:01 -0500 Subject: [PATCH] about to add collision detection to null tiles! modified: README modified: scroll.exe modified: src/scroll.c --- README | 5 +++-- scroll.exe | Bin 67622 -> 67628 bytes src/scroll.c | 17 ++++++++--------- 3 files changed, 11 insertions(+), 11 deletions(-) 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 f1815d58f3dea2eb964d2f5d9a685474860a85b9..744d667bdc760a2cd33b02336582806dd00c37dd 100644 GIT binary patch delta 194 zcmZ2Bfo07EmJJJ<8ShPA*sRRBW%AKxb;k3P-!`kWUTa}skeR%&UU;%jivZ)N&9*I8 z5{y-wE9QI`XFRaEV9P`%M!(HW+YQ;7nAta*?qgwObl7aQe=0j;)aDDv_8BpjZSMcM zmyvI)p#k$xhG@f;4$RCP$&;ggOFMxWnuTi&3=MQLZ)z4Ot^m@a54ISn8ZfhHL)1Z~ cQy)U4Q^C?Y%q;p4>CGE|7xJ)_v@$RN05ESvm;e9( delta 166 zcmV;X09pU6kOZcX1hAlk0oaqFgCha1lf{E40m+l?gC_;hga7~>lc9eTlPrV~0qnCq zggO`jbhCJz_ZI=Wvv9PL0s%;~0=F>-0{sTFHNFG^0Xnlfzm*38RI|{=zA^!Dvyb_` z0S*HPvoSCO`2brnsXz#2lUn;50tjW3dHWk52xTd8tS~V!EM?&-a3QELEM*nov@j(s U0|YOrKnP{CxBGDn1a5@@0FvrHlK=n! 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)) { -- 2.39.5