… | |
… | |
102 | static char * |
102 | static char * |
103 | put_score (score *sc) |
103 | put_score (score *sc) |
104 | { |
104 | { |
105 | static char buf[MAX_BUF]; |
105 | static char buf[MAX_BUF]; |
106 | |
106 | |
107 | sprintf (buf, "%s:%s:%" I64_PFd ":%s:%s:%d:%d:%d", sc->name, sc->title, (long long) sc->exp, sc->killer, sc->maplevel, |
107 | sprintf (buf, "%s:%s:%" PRId64 ":%s:%s:%d:%d:%d", |
|
|
108 | sc->name, sc->title, (sint64)sc->exp, sc->killer, |
108 | sc->maxhp, sc->maxsp, sc->maxgrace); |
109 | sc->maplevel, sc->maxhp, sc->maxsp, sc->maxgrace); |
109 | return buf; |
110 | return buf; |
110 | } |
111 | } |
111 | |
112 | |
112 | /* |
113 | /* |
113 | * The oposite of put_score, get_score reads from the given buffer into |
114 | * The oposite of put_score, get_score reads from the given buffer into |
… | |
… | |
134 | assign (sc.title, cp); |
135 | assign (sc.title, cp); |
135 | |
136 | |
136 | if ((cp = spool (0, "score")) == NULL) |
137 | if ((cp = spool (0, "score")) == NULL) |
137 | return 0; |
138 | return 0; |
138 | |
139 | |
139 | long long exp; |
|
|
140 | sscanf (cp, "%" I64_PFd, &exp); |
140 | sscanf (cp, "%" SCNd64, &sc.exp); |
141 | sc.exp = exp; |
|
|
142 | |
141 | |
143 | if ((cp = spool (0, "killer")) == NULL) |
142 | if ((cp = spool (0, "killer")) == NULL) |
144 | return 0; |
143 | return 0; |
145 | |
144 | |
146 | assign (sc.killer, cp); |
145 | assign (sc.killer, cp); |