Added pause, worked on the wrap vanish issue.
authorlimb <limb@bc5cbbab-a4ec-0310-bb52-ff3d296db539>
Tue, 28 Nov 2006 21:02:47 +0000 (21:02 +0000)
committerlimb <limb@bc5cbbab-a4ec-0310-bb52-ff3d296db539>
Tue, 28 Nov 2006 21:02:47 +0000 (21:02 +0000)
Try taking out the object.y on 176 next.

git-svn-id: svn+ssh://svn/var/repos/curfender@545 bc5cbbab-a4ec-0310-bb52-ff3d296db539

main.cpp

index 7859679..5e2c0e5 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -171,26 +171,26 @@ int draw_object(game_object object, int drawlocation){
       };
     };
     
-    int offset;
+    int offset = 0;
     
-    if((drawlocation>=540)&&(object.number!=1)){
-      offset = drawlocation-620;
+    if((drawlocation>=540)&&(object.number!=1)&&(object.y>=540)){
+      offset = object.y-drawlocation;
     } else {
-      offset = drawlocation;
+      offset = object.y-drawlocation;
     };
     
     if(object.active==1){
       if(object.face==0){
-       mvprintw(object.x,object.y-offset,"%s",object.line0);
+       mvprintw(object.x,offset,"%s",object.line0);
       } else if(object.face==1){
-       mvprintw(object.x,object.y-offset,"%s",object.line1);
+       mvprintw(object.x,offset,"%s",object.line1);
       } else if(object.face==2){
-       mvprintw(object.x,object.y-offset,"%s",object.line2);
+       mvprintw(object.x,offset,"%s",object.line2);
       } else if(object.face==3){
-       mvprintw(object.x,object.y-offset,"%s",object.line3);
+       mvprintw(object.x,offset,"%s",object.line3);
       } else if(object.face==4){
-       mvprintw(object.x,object.y-offset,"%s",object.line1);
-       mvprintw(object.x-1,object.y-offset,"%s",object.line0);
+       mvprintw(object.x,offset,"%s",object.line1);
+       mvprintw(object.x-1,offset,"%s",object.line0);
       };
     };
     
@@ -539,6 +539,14 @@ game_object pod9;
       player = process_direction(player, input);
     };
 
+    //pause
+    if(input==' '){
+      cbreak();
+      mvprintw(10,25,"Paused.  Press any key to continue.\n");
+      getch();
+      halfdelay(1);
+    };
+
     //check for / process pod pickup
     if((pod_in==0)&&(pod2.active==1)){pod_in = pod_check(pod2, player);};
     if((pod_in==0)&&(pod3.active==1)){pod_in = pod_check(pod3, player);};