[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[netPanzer-CVS] netpanzer/src Makefile NetPanzer/Interfaces/Con...
From: |
Matthias Braun |
Subject: |
[netPanzer-CVS] netpanzer/src Makefile NetPanzer/Interfaces/Con... |
Date: |
Wed, 03 Sep 2003 15:22:12 -0400 |
CVSROOT: /cvsroot/netpanzer
Module name: netpanzer
Branch:
Changes by: Matthias Braun <address@hidden> 03/09/03 15:22:12
Modified files:
src : Makefile
src/NetPanzer/Interfaces: ConsoleInterface.cpp GameManager.cpp
Log message:
some fixes to use the normal mingw console for the dedicated server
Patches:
Index: netpanzer/src/Makefile
diff -u netpanzer/src/Makefile:1.3 netpanzer/src/Makefile:1.4
--- netpanzer/src/Makefile:1.3 Wed Sep 3 04:26:33 2003
+++ netpanzer/src/Makefile Wed Sep 3 15:22:11 2003
@@ -32,7 +32,7 @@
OBJECTS = $(SOURCES:.cpp=.o)
# eventually disable if you don't have makedep installed (but you don't have
# dependency checking then)
-MAKEDEPEND=makedepend
+#MAKEDEPEND=makedepend
LINKFLAGS += -g3
INCLUDEDIRS=$(DIRS) NetPanzer/Classes/Network
Index: netpanzer/src/NetPanzer/Interfaces/ConsoleInterface.cpp
diff -u netpanzer/src/NetPanzer/Interfaces/ConsoleInterface.cpp:1.2
netpanzer/src/NetPanzer/Interfaces/ConsoleInterface.cpp:1.3
--- netpanzer/src/NetPanzer/Interfaces/ConsoleInterface.cpp:1.2 Mon Sep 1
16:24:20 2003
+++ netpanzer/src/NetPanzer/Interfaces/ConsoleInterface.cpp Wed Sep 3
15:22:12 2003
@@ -130,6 +130,7 @@
strcpy( format_str, format );
strcat( format_str, "\n" );
vprintf( format_str, vap );
+ fflush(stdout);
}
va_end( vap );
Index: netpanzer/src/NetPanzer/Interfaces/GameManager.cpp
diff -u netpanzer/src/NetPanzer/Interfaces/GameManager.cpp:1.3
netpanzer/src/NetPanzer/Interfaces/GameManager.cpp:1.4
--- netpanzer/src/NetPanzer/Interfaces/GameManager.cpp:1.3 Mon Sep 1
16:24:20 2003
+++ netpanzer/src/NetPanzer/Interfaces/GameManager.cpp Wed Sep 3 15:22:12 2003
@@ -546,14 +546,18 @@
// ******************************************************************
bool GameManager::initializeDedicatedConsole( void )
{
+ // we don't need an own console on msvc
+#ifdef MSVC
ShowWindow( gapp.hwndApp, SW_HIDE );
if( AllocConsole() == 0 )
{ return( false ); }
freopen( "CONOUT$", "a+t", stdout );
freopen( "CONIN$", "a+t", stdin );
+#endif
ConsoleInterface::setStdoutPipe( true );
+
return( true );
}
@@ -1851,11 +1855,13 @@
GameConfig::setGameMapName( input_str );
printf( "Map Name <%s> : ", GameConfig::getGameMapName() );
+ fflush(stdout);
gets( input_str );
if ( strlen(input_str) > 0 )
{ GameConfig::setGameMapName( input_str ); }
printf( "Players <%d> : ", GameConfig::GetNumberPlayers() );
+ fflush(stdout);
gets( input_str );
if ( strlen(input_str) > 0 )
{
@@ -1865,6 +1871,7 @@
}
printf( "Units <%d> : ", GameConfig::GetNumberUnits() );
+ fflush(stdout);
gets( input_str );
if ( strlen(input_str) > 0 )
{
@@ -1882,6 +1889,7 @@
printf( "(2) Frag Limit \n" );
printf( "(3) Time Limit \n" );
printf( "Choose : " );
+ fflush(stdout);
gets( input_str );
sscanf( input_str, "%d", &game_type );
} while( (game_type < 1) && (game_type > 3) );
@@ -1892,6 +1900,7 @@
{
GameConfig::SetGameType(_gametype_objective);
printf( "Outpost Occupation <%.0f %%> : ",
GameConfig::getObjectiveOccuapationPercentage() );
+ fflush(stdout);
gets( input_str );
if ( strlen(input_str) > 0 )
{
@@ -1905,6 +1914,7 @@
{
GameConfig::SetGameType(_gametype_fraglimit);
printf( "Frag Limit <%d> frags : ", GameConfig::GetFragLimit() );
+ fflush(stdout);
gets( input_str );
if ( strlen(input_str) > 0 )
{
@@ -1918,6 +1928,7 @@
{
GameConfig::SetGameType(_gametype_timelimit);
printf( "Time Limit <%d> minutes: ", GameConfig::GetTimeLimit() );
+ fflush(stdout);
gets( input_str );
if ( strlen(input_str) > 0 )
{
@@ -1930,11 +1941,13 @@
} // ** switch
printf( "PowerUps <NO> (Y/N) : " );
+ fflush(stdout);
gets( input_str );
if ( stricmp( "y", input_str ) == 0 )
{ GameConfig::setPowerUpState( true ); }
printf( "Server Name <Dedicated Server> :" );
+ fflush(stdout);
gets( input_str );
if ( strlen(input_str) > 0 )
{ GameConfig::SetPlayerName( input_str ); }
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [netPanzer-CVS] netpanzer/src Makefile NetPanzer/Interfaces/Con...,
Matthias Braun <=