projects
/
super-star-trek.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
setwnd() is now a save no-op in TTY mode.
[super-star-trek.git]
/
sst.c
diff --git
a/sst.c
b/sst.c
index fb508be4ce8e6dacc46618327b1c5b29424e36ab..f6b86b1cedb6f876bb9d92e3747696183214e206 100644
(file)
--- a/
sst.c
+++ b/
sst.c
@@
-135,48
+135,44
@@
commands[] = {
#endif /* SERGEEV */
#define ORBIT 15
{"ORBIT", ORBIT},
#endif /* SERGEEV */
#define ORBIT 15
{"ORBIT", ORBIT},
-#define TRANSPORT 1
7
+#define TRANSPORT 1
6
{"TRANSPORT", TRANSPORT},
{"TRANSPORT", TRANSPORT},
-#define MINE 1
8
+#define MINE 1
7
{"MINE", MINE},
{"MINE", MINE},
-#define CRYSTALS 1
9
+#define CRYSTALS 1
8
{"CRYSTALS", CRYSTALS},
{"CRYSTALS", CRYSTALS},
-#define SHUTTLE
20
+#define SHUTTLE
19
{"SHUTTLE", SHUTTLE},
{"SHUTTLE", SHUTTLE},
-#define PLANETS 2
1
+#define PLANETS 2
0
{"PLANETS", PLANETS},
{"PLANETS", PLANETS},
-#ifdef SERGEEV
-#define REQUEST 22
- {"REQUEST", REQUEST},
-#endif /* SERGEEV */
-#define REPORT 23
+#define REPORT 21
{"REPORT", REPORT},
{"REPORT", REPORT},
-#define COMPUTER 2
4
+#define COMPUTER 2
3
{"COMPUTER", COMPUTER},
{"COMPUTER", COMPUTER},
-#define COMMANDS 2
5
+#define COMMANDS 2
4
{"COMMANDS", COMMANDS},
{"COMMANDS", COMMANDS},
-#define EMEXIT 2
6
+#define EMEXIT 2
5
{"EMEXIT", EMEXIT},
{"EMEXIT", EMEXIT},
-#define PROBE 2
7
+#define PROBE 2
6
{"PROBE", PROBE},
{"PROBE", PROBE},
-#define SAVE 2
8
+#define SAVE 2
7
{"SAVE", SAVE},
{"FREEZE", SAVE},
{"SAVE", SAVE},
{"FREEZE", SAVE},
-#define ABANDON 2
9
+#define ABANDON 2
8
{"ABANDON", ABANDON},
{"ABANDON", ABANDON},
-#define DESTRUCT
30
+#define DESTRUCT
29
{"DESTRUCT", DESTRUCT},
{"DESTRUCT", DESTRUCT},
-#define DEATHRAY 3
1
+#define DEATHRAY 3
0
{"DEATHRAY", DEATHRAY},
{"DEATHRAY", DEATHRAY},
-#define DEBUGCMD 3
2
+#define DEBUGCMD 3
1
{"DEBUG", DEBUGCMD},
{"DEBUG", DEBUGCMD},
-#define MAYDAY 3
3
+#define MAYDAY 3
2
{"MAYDAY", MAYDAY},
{"SOS", MAYDAY},
{"CALL", MAYDAY},
{"MAYDAY", MAYDAY},
{"SOS", MAYDAY},
{"CALL", MAYDAY},
-#define QUIT 3
4
+#define QUIT 3
3
{"QUIT", QUIT},
{"QUIT", QUIT},
-#define HELP 3
5
+#define HELP 3
4
{"HELP", HELP},
};
{"HELP", HELP},
};
@@
-203,15
+199,11
@@
static void helpme(void) {
key = scan();
while (TRUE) {
if (key == IHEOL) {
key = scan();
while (TRUE) {
if (key == IHEOL) {
-#ifdef SERGEEV
setwnd(BOTTOM_WINDOW);
setwnd(BOTTOM_WINDOW);
-#endif /* SERGEEV */
proutn("Help on what command? ");
key = scan();
}
proutn("Help on what command? ");
key = scan();
}
-#ifdef SERGEEV
setwnd(LOWER_WINDOW);
setwnd(LOWER_WINDOW);
-#endif /* SERGEEV */
if (key == IHEOL) return;
for (i = 0; i < NUMCOMMANDS; i++) {
if (strcasecmp(commands[i].name, citem)==0) {
if (key == IHEOL) return;
for (i = 0; i < NUMCOMMANDS; i++) {
if (strcasecmp(commands[i].name, citem)==0) {
@@
-296,10
+288,8
@@
void drawmaps(short l) {
static void makemoves(void) {
int i, hitme;
static void makemoves(void) {
int i, hitme;
-#ifdef SERGEEV
clrscr();
setwnd(LOWER_WINDOW);
clrscr();
setwnd(LOWER_WINDOW);
-#endif /* SERGEEV */
while (TRUE) { /* command loop */
drawmaps(1);
while (TRUE) { /* get a command */
while (TRUE) { /* command loop */
drawmaps(1);
while (TRUE) { /* get a command */
@@
-308,10
+298,8
@@
static void makemoves(void) {
Time = 0.0;
i = -1;
chew();
Time = 0.0;
i = -1;
chew();
-#ifdef SERGEEV
setwnd(BOTTOM_WINDOW);
clrscr();
setwnd(BOTTOM_WINDOW);
clrscr();
-#endif /* SERGEEV */
proutn("COMMAND> ");
if (scan() == IHEOL) {
#ifdef SERGEEV
proutn("COMMAND> ");
if (scan() == IHEOL) {
#ifdef SERGEEV
@@
-323,12
+311,10
@@
static void makemoves(void) {
#endif /* SERGEEV */
continue;
}
#endif /* SERGEEV */
continue;
}
-#ifdef SERGEEV
ididit=0;
clrscr();
setwnd(LOWER_WINDOW);
clrscr();
ididit=0;
clrscr();
setwnd(LOWER_WINDOW);
clrscr();
-#endif /* SERGEEV */
for (i=0; i < ABANDON; i++)
if (isit(commands[i].name)) {
i = commands[i].value;
for (i=0; i < ABANDON; i++)
if (isit(commands[i].name)) {
i = commands[i].value;
@@
-448,9
+434,7
@@
static void makemoves(void) {
break;
case SAVE: // Save Game
freeze(FALSE);
break;
case SAVE: // Save Game
freeze(FALSE);
-#ifdef SERGEEV
clrscr();
clrscr();
-#endif /* SERGEEV */
if (skill > 3)
prout("WARNING--Saved games produce no plaques!");
break;
if (skill > 3)
prout("WARNING--Saved games produce no plaques!");
break;
@@
-555,10
+539,8
@@
int main(int argc, char **argv) {
}
proutn("Do you want to play again? ");
if (!ja()) break;
}
proutn("Do you want to play again? ");
if (!ja()) break;
-#ifdef SERGEEV
setwnd(FULLSCREEN_WINDOW);
clrscr();
setwnd(FULLSCREEN_WINDOW);
clrscr();
-#endif /* SERGEEV */
}
skip(1);
#ifndef SERGEEV
}
skip(1);
#ifndef SERGEEV
@@
-664,7
+646,7
@@
int scan(void) {
chew();
return IHEOL;
}
chew();
return IHEOL;
}
- getline(line, sizeof(line));
+
c
getline(line, sizeof(line));
#ifdef SERGEEV
fflush(stdin);
if (curwnd==BOTTOM_WINDOW){
#ifdef SERGEEV
fflush(stdin);
if (curwnd==BOTTOM_WINDOW){