~ubuntu-branches/ubuntu/hardy/gravitywars/hardy

« back to all changes in this revision

Viewing changes to GravityWars101.c

  • Committer: Bazaar Package Importer
  • Author(s): Sam Hocevar (Debian packages)
  • Date: 2004-07-11 11:48:51 UTC
  • mfrom: (2.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20040711114851-2xcl09fhx9o65ojb
Tags: 1.102-28
* debian/control:
  + Set policy to 3.6.1.1.
* moveship.c:
  + Fixed build with gcc-3.4, thanks to Andreas Jochens (Closes: #258737).
  + Fixed other warnings.

Show diffs side-by-side

added added

removed removed

Lines of Context:
82
82
  }
83
83
*/
84
84
 
85
 
        strcpy(gamename,"/usr/lib/games/gravitywars/");
 
85
        strcpy(gamename,"/usr/share/games/gravitywars/");
86
86
        gamenamelen=strlen(gamename);
87
87
 
88
88
  if (n_args>1) {
92
92
    } while ( (strncmp(arg[1],codes[n],6)) && (n<99));
93
93
    if (n!=99) {
94
94
      levelnum=n+1;
 
95
#ifndef USE_SDL
95
96
      if (n_args>2)
96
97
        delay_len=atoi(arg[2]);
 
98
#endif
97
99
    } else {
 
100
#ifdef USE_SDL
 
101
      printf("\nUsage: %s [code-to-a-given-level]\n"
 
102
             "(Sure you've got the right code?)\n\n",arg[0]);
 
103
      exit(0);
 
104
#else
98
105
      if ((arg[1][0]<'0') || (arg[1][0]>'9')) {
99
106
        printf("\nUsage: %s [code-to-a-given-level] [beam-adjustment]\n"
100
107
               "(Sure you've got the right code?)\n\n",arg[0]);
101
108
        exit(0);
102
109
      }
103
 
      else 
 
110
      else
104
111
        delay_len=atoi(arg[1]);
 
112
#endif
105
113
    } 
106
114
  }    
107
115
  
110
118
  strcpy(firstlevel,nextlevel);
111
119
 
112
120
 
113
 
  printf("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
114
 
"\n"
115
 
"-----------------------------------------------------------------------------\n"
116
 
"                         G R A V I T Y    W A R S\n\n"
117
 
"                                   v 1.1\n"
118
 
"                              (November 1995)\n"
119
 
"\n"
120
 
"            A Gravity Force clone for the Linux operating system\n"
121
 
 
122
 
"\n\n"
123
 
"                           Coding by Sami Niemi\n\n"
124
 
 
125
 
"                       Graphics by P�r Johannesson\n"
126
 
 
127
 
"-----------------------------------------------------------------------------\n"
 
121
  printf(
 
122
"Gravity Wars v1.1 (November 1995), a Gravity Force clone for Unix\n"
 
123
"Coding by Sami Niemi, graphics by P�r Johannesson, SDL port by Sam Hocevar\n"
128
124
);
129
125
 
130
126
  initParams();
229
225
 
230
226
        strcpy(filename,"/var/games/gravitywars/hscore.gw");
231
227
        if ( ( fileptr=fopen(filename,"w") ) != NULL) {
232
 
          fprintf(fileptr,"%d\n",ShipScore);
 
228
          fprintf(fileptr,"%ld\n",ShipScore);
233
229
          fclose(fileptr);
234
230
        }
235
231
        else {
236
 
          printf("Can't write the HighScore!!!!");
 
232
          printf("Can't write the HighScore!!!!\n");
237
233
          doPanic();
238
234
        }
239
235
      }