/programs/games/sstartrek/en/buildforkolibri.bat |
---|
1,5 → 1,5 |
rem To build under Windows, execute |
SET TCC=D:\_bin\ktcc_26_161007 |
SET TCC=D:\_bin\tcc_26_180312 |
%TCC%\kos32-tcc -I%TCC%\INCLUDE -L%TCC%\LIB -DWINDOWS -DKOS32 sst.c ai.c battle.c events.c finish.c moving.c osx.c planets.c reports.c setup.c -lck -o SStarTrek -g |
%TCC%\kos32-tcc -I%TCC%\INCLUDE -L%TCC%\LIB -DKOS32 sst.c ai.c battle.c events.c finish.c moving.c osx.c planets.c reports.c setup.c -lck -o SStarTrek -g |
/programs/games/sstartrek/en/finish.c |
---|
457,7 → 457,8 |
fgets(winner, 128, stdin); |
#else |
gets(winner); |
#endif winner[strlen(winner)-1] = '\0'; |
#endif |
winner[strlen(winner)-1] = '\0'; |
winner[30] = '\0'; |
nskip = 64 - strlen(winner)/2; |
/programs/games/sstartrek/en/osx.c |
---|
1,25 → 1,20 |
#include <stdlib.h> |
#include <stdio.h> |
#ifndef KOS32 |
#include <time.h> |
#else |
#include <kos32sys1.h> |
#endif |
#ifndef WINDOWS |
#ifndef KOS32 |
#include <sys/ioctl.h> |
#include <termios.h> |
#include <unistd.h> |
#endif |
#endif |
void randomize(void) { |
#ifndef KOS32 |
srand((int)time(NULL)); |
#else |
srand(get_tick_count()); |
#endif |
} |
///#ifndef WINDOWS |
#if !defined(KOS32) && !defined(__TINYC__) |
int max(int a, int b) { |
if (a > b) return a; |
return b; |
29,7 → 24,10 |
if (a < b) return a; |
return b; |
} |
#endif |
#ifndef WINDOWS |
#ifndef KOS32 |
int // <editor-fold defaultstate="collapsed" desc="comment"> |
getch// </editor-fold> |
(void) { |
45,4 → 43,5 |
tcsetattr(0, TCSANOW, &oldstate); |
return chbuf[0]; |
} |
#endif |
#endif |
/programs/games/sstartrek/en/sst.c |
---|
1,14 → 1,18 |
#include <ctype.h> |
#include <ctype.h> |
#ifdef MSDOS |
#include <dos.h> |
#endif |
#ifdef WINDOWS |
#include <windows.h> |
#endif |
#ifndef KOS32 |
#include <time.h> |
#else |
#include <conio.h> |
#include <kos32sys1.h> |
#include <kos32sys0.h> |
#endif |
#define INCLUDED // Define externs here |
435,7 → 439,12 |
con_set_title("-SUPER- STAR TREK"); |
con_set_flags(CON_COLOR_GREEN); |
#endif |
#ifdef WINDOWS |
HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE); // Get handle to standard output |
SetConsoleTextAttribute(hConsole, FOREGROUND_GREEN); |
#endif |
prelim(); |
if (argc > 1) { // look for -f option |
585,7 → 594,7 |
} |
#ifdef KOS32 |
cp = gets(line); |
if (!cp) exit(); |
if (!cp) exit(0); |
#else |
// We should really be using fgets |
fgets(line,sizeof(line),stdin); |
/programs/games/sstartrek/en/sst.h |
---|
475,10 → 475,12 |
void movetho(void); |
void probe(void); |
///#ifndef WINDOWS |
#ifndef WINDOWS |
#ifndef KOS32 |
int min(int, int); |
int max(int, int); |
///#endif |
#endif |
#endif |
void randomize(void); |
///int getch(void); |