~ubuntu-branches/ubuntu/utopic/xbill/utopic

« back to all changes in this revision

Viewing changes to Scorelist.cc

  • Committer: Bazaar Package Importer
  • Author(s): Adrian Bridgett
  • Date: 2001-06-24 22:44:40 UTC
  • Revision ID: james.westby@ubuntu.com-20010624224440-yjlyolgxf9tr7pi5
Tags: 2.0-14
use FHS /var/games rather /var/lib/games (closes: #92515)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#include "objects.h"
2
2
 
3
3
FILE *Scorelist::open_file(char *mode) {
4
 
        char file[255];
5
 
        sprintf (file, "%sscores", XBILL_HOME);
6
 
        return fopen (file, mode);
 
4
        return fopen (XBILL_SCORE, mode);
7
5
}
8
6
 
9
7
void Scorelist::read() {
61
59
        for (i=0; i<10; i++) {
62
60
                strcat (str, name[i]);
63
61
                for (j=strlen(name[i]); j<21; j++) strcat (str, " ");
 
62
                if (level[i] > 99999)
 
63
                        level[i]=99999;
 
64
                if (score[i] > 9999999)
 
65
                        score[i]=9999999;
64
66
                sprintf (temp, "%5d  %7d\n", level[i], score[i]);
65
67
                strcat (str, temp);
66
68
        }