strcpy (pod2.line2, " + ");
strcpy (pod2.line3, " + ");
+ game_object pods[1] = { pod2 };
+
initscr();
//main loop
int loopvar = 0;
int input = 0;
+ int pod_in = 0;
cbreak();
halfdelay(1);
// Draw pods objects 2-9
drawlocation = draw_object(pod2, drawlocation);
-
- //Debug
- //mvprintw(21,1,"Pod face:%d", pod2.face);
// Draw gate object 10
drawlocation = draw_object(gate, drawlocation);
if(input==66||input==68||input==67||input==65||input==69){
player = process_direction(player, input);
};
-
- //check for /process player fire
+
+ //check for / process pod pickup
+ if(pod_in==0){
+ for each (game_object pod in pods){
+ if(pod_in==0){
+ if(check_collision(pod)==1){ //declare me!
+ pod_in=pod.number;
+ };
+ };
+ };
+ };
+
+ //if pod in hand, check for gate dropoff
+ if(pod_in>0){
+ if((abs(player.y-gate.y)<player.speed)&&(player.x>12)){
+ //set pod inactive
+ //increment score
+ pod_in = 0;
+ };
+ };
+ //check for / process player fire
+
+ //check for 0 active pods, saved pods, level victory
}; //end main loop