projects
/
super-star-trek.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
More dependency reduction.
[super-star-trek.git]
/
reports.c
diff --git
a/reports.c
b/reports.c
index 6486d9db73f666ded87be3720ae781e2549912ec..32ee650d8b71c90623e5eadf9c9567b41b711d51 100644
(file)
--- a/
reports.c
+++ b/
reports.c
@@
-2,9
+2,19
@@
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
-#ifdef SERGEEV
-#include <conio.h>
+#include "conio.h"
#include "sstlinux.h"
#include "sstlinux.h"
+
+#ifdef SERGEEV
+int c_printf (char *format, ... )
+{
+ char buffer[BUFSIZ]; /* Well, BUFSIZ is from ncurses... */
+ va_list argp;
+ va_start(argp,format);
+ vsprintf(buffer,format,argp);
+ va_end(argp);
+ return waddstr(conio_scr,buffer);
+}
#else
#define c_printf proutn
#endif /* SERGEEV */
#else
#define c_printf proutn
#endif /* SERGEEV */
@@
-281,7
+291,6
@@
int srscan(int l) {
for (j = 1; j <= 10; j++) {
if (goodScan || (abs(i-sectx)<= 1 && abs(j-secty) <= 1)){
if ((game.quad[i][j]==IHMATER0)||(game.quad[i][j]==IHMATER1)||(game.quad[i][j]==IHMATER2)||(game.quad[i][j]==IHE)||(game.quad[i][j]==IHF)){
for (j = 1; j <= 10; j++) {
if (goodScan || (abs(i-sectx)<= 1 && abs(j-secty) <= 1)){
if ((game.quad[i][j]==IHMATER0)||(game.quad[i][j]==IHMATER1)||(game.quad[i][j]==IHMATER2)||(game.quad[i][j]==IHE)||(game.quad[i][j]==IHF)){
-#ifdef SERGEEV
switch (condit) {
case IHRED: textcolor(RED); break;
case IHGREEN: textcolor(GREEN); break;
switch (condit) {
case IHRED: textcolor(RED); break;
case IHGREEN: textcolor(GREEN); break;
@@
-289,6
+298,7
@@
int srscan(int l) {
case IHDOCKED: textcolor(LIGHTGRAY); break;
case IHDEAD: textcolor(WHITE);
}
case IHDOCKED: textcolor(LIGHTGRAY); break;
case IHDEAD: textcolor(WHITE);
}
+#ifdef SERGEEV
if (game.quad[i][j]!=ship) highvideo();
#endif /* SERGEEV */
}
if (game.quad[i][j]!=ship) highvideo();
#endif /* SERGEEV */
}
@@
-296,9
+306,7
@@
int srscan(int l) {
if (game.quad[i][j] & 128) highvideo();
#endif /* SERGEEV */
c_printf("%c ",game.quad[i][j] & 127);
if (game.quad[i][j] & 128) highvideo();
#endif /* SERGEEV */
c_printf("%c ",game.quad[i][j] & 127);
-#ifdef SERGEEV
textcolor(LIGHTGRAY);
textcolor(LIGHTGRAY);
-#endif /* SERGEEV */
}
else
proutn("- ");
}
else
proutn("- ");