projects
/
super-star-trek.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
BSD-Trek-like critical hits with weighting.
[super-star-trek.git]
/
src
/
finish.c
diff --git
a/src/finish.c
b/src/finish.c
index 75425fbf8bbb6f902cb029ef3bb786bc9eb10760..95c7d974a22a52a6f2ab538e108ed3b4c926c6b4 100644
(file)
--- a/
src/finish.c
+++ b/
src/finish.c
@@
-2,7
+2,8
@@
#include <string.h>
#include <time.h>
#include <string.h>
#include <time.h>
-void dstrct()
+void selfdestruct(void)
+/* self-destruct maneuver */
{
/* Finish with a BANG! */
chew();
{
/* Finish with a BANG! */
chew();
@@
-61,7
+62,7
@@
void kaboom(void)
int l=1;
while (l <= game.nenhere) {
if (game.kpower[l]*game.kdist[l] <= whammo)
int l=1;
while (l <= game.nenhere) {
if (game.kpower[l]*game.kdist[l] <= whammo)
- deadkl(game.ks[l], game.quad[game.ks[l].x][game.ks[l].y], game.ks[l]
.x, game.ks[l].y
);
+ deadkl(game.ks[l], game.quad[game.ks[l].x][game.ks[l].y], game.ks[l]);
l++;
}
}
l++;
}
}
@@
-69,7
+70,8
@@
void kaboom(void)
}
}
-void finish(FINTYPE ifin)
+void finish(FINTYPE ifin)
+/* end the game, with appropriate notfications */
{
bool igotit = false;
game.alldone = true;
{
bool igotit = false;
game.alldone = true;
@@
-140,7
+142,7
@@
void finish(FINTYPE ifin)
proutn(_("Do you want your Commodore Emeritus Citation printed? "));
chew();
if (ja() == true) {
proutn(_("Do you want your Commodore Emeritus Citation printed? "));
chew();
if (ja() == true) {
- igotit =
1
;
+ igotit =
true
;
}
}
}
}
}
}
@@
-150,7
+152,7
@@
void finish(FINTYPE ifin)
prout(_("LIVE LONG AND PROSPER."));
}
score();
prout(_("LIVE LONG AND PROSPER."));
}
score();
- if (igotit
!= 0
) plaque();
+ if (igotit) plaque();
return;
case FDEPLETE: // Federation Resources Depleted
prout(_("Your time has run out and the Federation has been"));
return;
case FDEPLETE: // Federation Resources Depleted
prout(_("Your time has run out and the Federation has been"));
@@
-313,6
+315,7
@@
void finish(FINTYPE ifin)
}
void score(void)
}
void score(void)
+/* compute player's score */
{
double timused = game.state.date - game.indate;
int ithperd, iwon, klship;
{
double timused = game.state.date - game.indate;
int ithperd, iwon, klship;
@@
-392,7
+395,9
@@
void score(void)
prout(_("TOTAL SCORE %5d"), iscore);
}
prout(_("TOTAL SCORE %5d"), iscore);
}
-void plaque(void) {
+void plaque(void)
+/* emit winner's commemmorative plaque */
+{
FILE *fp=NULL;
time_t t;
char *timestring;
FILE *fp=NULL;
time_t t;
char *timestring;