/programs/games/sstartrek/ru/sst.c |
---|
File deleted |
/programs/games/sstartrek/ru/ai.c |
---|
File deleted |
/programs/games/sstartrek/ru/osx.c |
---|
File deleted |
\ No newline at end of file |
/programs/games/sstartrek/ru/battle.c |
---|
File deleted |
\ No newline at end of file |
/programs/games/sstartrek/ru/sst.doc |
---|
File deleted |
/programs/games/sstartrek/ru/makefile |
---|
File deleted |
/programs/games/sstartrek/ru/sst.h |
---|
File deleted |
/programs/games/sstartrek/ru/buildforwindows.txt |
---|
File deleted |
/programs/games/sstartrek/ru/reports.c |
---|
File deleted |
/programs/games/sstartrek/ru/moving.c |
---|
File deleted |
/programs/games/sstartrek/ru/finish.c |
---|
File deleted |
/programs/games/sstartrek/ru/setup.c |
---|
File deleted |
/programs/games/sstartrek/ru/events.c |
---|
File deleted |
/programs/games/sstartrek/ru/planets.c |
---|
File deleted |
/programs/games/sstartrek/ru/buildforkolibri.bat |
---|
File deleted |
/programs/games/sstartrek/en/buildforkolibri.bat |
---|
1,5 → 1,5 |
rem To build under Windows, execute |
SET TCC=D:\_bin\tcc_26_180312 |
SET TCC=D:\_bin\ktcc_26_161007 |
%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 |
%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 |
/programs/games/sstartrek/en/finish.c |
---|
457,8 → 457,7 |
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,20 → 1,25 |
#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 |
} |
#if !defined(KOS32) && !defined(__TINYC__) |
///#ifndef WINDOWS |
int max(int a, int b) { |
if (a > b) return a; |
return b; |
24,10 → 29,7 |
if (a < b) return a; |
return b; |
} |
#endif |
#ifndef WINDOWS |
#ifndef KOS32 |
int // <editor-fold defaultstate="collapsed" desc="comment"> |
getch// </editor-fold> |
(void) { |
43,5 → 45,4 |
tcsetattr(0, TCSANOW, &oldstate); |
return chbuf[0]; |
} |
#endif |
#endif |
/programs/games/sstartrek/en/sst.c |
---|
1,18 → 1,14 |
#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 <kos32sys0.h> |
#include <kos32sys1.h> |
#endif |
#define INCLUDED // Define externs here |
439,12 → 435,7 |
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 |
594,7 → 585,7 |
} |
#ifdef KOS32 |
cp = gets(line); |
if (!cp) exit(0); |
if (!cp) exit(); |
#else |
// We should really be using fgets |
fgets(line,sizeof(line),stdin); |
/programs/games/sstartrek/en/sst.h |
---|
475,12 → 475,10 |
void movetho(void); |
void probe(void); |
#ifndef WINDOWS |
#ifndef KOS32 |
///#ifndef WINDOWS |
int min(int, int); |
int max(int, int); |
#endif |
#endif |
///#endif |
void randomize(void); |
///int getch(void); |