From 4a9f71b43349cb0421a5049c4cafd20786128c52 Mon Sep 17 00:00:00 2001 From: limb Date: Sat, 18 Jul 2009 05:01:42 +0000 Subject: [PATCH] Dropped extern in draw_object. git-svn-id: svn+ssh://svn/var/repos/curfender@848 bc5cbbab-a4ec-0310-bb52-ff3d296db539 --- draw.cpp | 70 ++++++++++++++++++++++++++++++---------------------------------- main.cpp | 4 +++- 2 files changed, 36 insertions(+), 38 deletions(-) diff --git a/draw.cpp b/draw.cpp index e8a4080..48e9c8b 100644 --- a/draw.cpp +++ b/draw.cpp @@ -4,51 +4,47 @@ #include "game_object.h" int draw_object(game_object object, int drawlocation){ - extern int pod_in; - if(object.number!=pod_in){ - if(object.number==1){ - if((object.y-drawlocation<35) and (object.direction==4)){ - drawlocation=drawlocation-object.speed; - }; - if((object.y-drawlocation>40) and (object.direction==6)){ - drawlocation=drawlocation+object.speed; - }; + if(object.number==1){ + if((object.y-drawlocation<35) and (object.direction==4)){ + drawlocation=drawlocation-object.speed; }; + if((object.y-drawlocation>40) and (object.direction==6)){ + drawlocation=drawlocation+object.speed; + }; + }; - int offset = 0; + int offset = 0; - offset = object.y-drawlocation; + offset = object.y-drawlocation; - if(drawlocation>=540&&object.y<620-drawlocation&&object.number!=1){ - offset = 620-drawlocation+object.y; //right of player wrap correction - }; + if(drawlocation>=540&&object.y<620-drawlocation&&object.number!=1){ + offset = 620-drawlocation+object.y; //right of player wrap correction + }; - if(drawlocation<0&&object.y>=540&&object.number!=1){ - offset = abs(drawlocation)-abs(620-object.y); //left of player wrap correction - }; + if(drawlocation<0&&object.y>=540&&object.number!=1){ + offset = abs(drawlocation)-abs(620-object.y); //left of player wrap correction + }; - if((object.active==1&&object.x>=1&&object.x<=18&&offset>=0&&offset<=79)||((object.number>=200&&object.number<=230)&&(offset>=0&&offset<=79))){ - if(object.face==0){ - mvprintw(object.x,offset,"%s",object.line0); - } else if(object.face==1){ - mvprintw(object.x,offset,"%s",object.line1); - } else if(object.face==2){ - mvprintw(object.x,offset,"%s",object.line2); - } else if(object.face==3){ - mvprintw(object.x,offset,"%s",object.line3); - } else if(object.face==4){ - mvprintw(object.x,offset,"%s",object.line1); - mvprintw(object.x-1,offset,"%s",object.line0); - } else if(object.face==5){ - mvprintw(object.x,offset,"%s",object.line1); - mvprintw(object.x-1,offset,"%s",object.line0); - } else if(object.face==6){ - mvprintw(object.x,offset,"%s",object.line3); - mvprintw(object.x-1,offset,"%s",object.line2); - }; + if((object.active==1&&object.x>=1&&object.x<=18&&offset>=0&&offset<=79)||((object.number>=200&&object.number<=230)&&(offset>=0&&offset<=79))){ + if(object.face==0){ + mvprintw(object.x,offset,"%s",object.line0); + } else if(object.face==1){ + mvprintw(object.x,offset,"%s",object.line1); + } else if(object.face==2){ + mvprintw(object.x,offset,"%s",object.line2); + } else if(object.face==3){ + mvprintw(object.x,offset,"%s",object.line3); + } else if(object.face==4){ + mvprintw(object.x,offset,"%s",object.line1); + mvprintw(object.x-1,offset,"%s",object.line0); + } else if(object.face==5){ + mvprintw(object.x,offset,"%s",object.line1); + mvprintw(object.x-1,offset,"%s",object.line0); + } else if(object.face==6){ + mvprintw(object.x,offset,"%s",object.line3); + mvprintw(object.x-1,offset,"%s",object.line2); }; - }; return drawlocation; diff --git a/main.cpp b/main.cpp index 6ca0a98..e1554b3 100644 --- a/main.cpp +++ b/main.cpp @@ -802,7 +802,9 @@ int main(int argc, char *argv[]){ // Draw pods objects 2-9 for(int podloop = 0; podloop