working on mulitplayer

This commit is contained in:
Chris Danford
2002-12-02 05:25:44 +00:00
parent d377737f9f
commit ca7c1ab78f
22 changed files with 983 additions and 227 deletions
+3
View File
@@ -148,6 +148,9 @@ public:
PlayerOptions m_SelectedOptions[NUM_PLAYERS]; // Keep track of player-selected options for
// courses separately from the active options.
SongOptions m_SongOptions;
vector<CString> m_asNetworkNames;
};
+24
View File
@@ -0,0 +1,24 @@
#ifndef NETGAMESTATE_H
#define NETGAMESTATE_H
#define MAX_PLAYERS 8
#define MAX_NAME_LENGTH 32
struct NetPlayerState
{
char name[MAX_NAME_LENGTH];
float score;
int combo;
bool bReady;
};
struct NetGameState
{
int num_players;
NetPlayerState player[MAX_PLAYERS];
};
#endif
+152
View File
@@ -0,0 +1,152 @@
#include "stdafx.h"
/*
-----------------------------------------------------------------------------
Class: RageNetworkClient
Desc: See header.
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
Brendan Walker
Chris Danford
-----------------------------------------------------------------------------
*/
#include "RageNetworkClient.h"
#include "RageUtil.h"
#include "RageException.h"
#include "RageLog.h"
#include "RageTimer.h"
#include "RageException.h"
#include "GameState.h" // remove this dependency later
#include "RageNetworkPacket.h"
#include "SDL_net-1.2.4/include/SDL_net.h"
//#ifdef _DEBUG
//#pragma comment(lib, "SDL_net-1.2.4/lib/SDL_netd.lib")
//#else
#pragma comment(lib, "SDL_net-1.2.4/lib/SDL_net.lib")
//#endif
RageNetworkClient* CLIENT = NULL;
const int MAX_CLIENTS = 16;
/*
///////////////////////////////
//
// THIS IS UNTESTED SINCE THE CONVERSION TO SDL_net!!!!!
//
///////////////////////////////
*/
RageNetworkClient::RageNetworkClient()
{
m_priSock = 0;
m_priSockSet = NULL;
SDL_Init(0); // this may have already been init'd somewhere else
if( SDLNet_Init() < 0 )
throw RageException("SDLNet_Init: %s\n", SDLNet_GetError());
// allocate socket sets
m_priSockSet = SDLNet_AllocSocketSet(1);
if(!m_priSockSet)
throw RageException("SDLNet_AllocSocketSet: %s\n", SDLNet_GetError());
}
RageNetworkClient::~RageNetworkClient()
{
Disconnect();
SDLNet_FreeSocketSet( m_priSockSet );
SDLNet_Quit();
}
void RageNetworkClient::Disconnect()
{
if( m_priSock == NULL )
return;
SDLNet_TCP_DelSocket( m_priSockSet, m_priSock );
SDLNet_TCP_Close( m_priSock );
m_priSock = NULL;
}
void RageNetworkClient::Connect(CString host, unsigned short port)
{
Disconnect();
char szHost[1024];
strcpy( szHost, host );
IPaddress ip;
if( SDLNet_ResolveHost(&ip,szHost,port)==-1 )
{
LOG->Warn("SDLNet_ResolveHost: %s\n", SDLNet_GetError());
return;
}
m_priSock=SDLNet_TCP_Open(&ip);
if( !m_priSock )
{
LOG->Warn("SDLNet_TCP_Open: %s\n", SDLNet_GetError());
return;
}
SDLNet_TCP_AddSocket( m_priSockSet, m_priSock );
return;
}
void RageNetworkClient::Update( float fDeltaTime )
{
// receive
int numready = SDLNet_CheckSockets(m_priSockSet, 0);
if(numready==-1)
{
LOG->Warn("SDLNet_CheckSockets: %s\n", SDLNet_GetError());
}
else if( numready )
{
if( SDLNet_SocketReady(m_priSock) )
{
RageNetworkPacket packet;
SDLNet_TCP_Recv( m_priSock, &packet, sizeof(RageNetworkPacket) );
switch( packet.type )
{
case RageNetworkPacket::update_game:
this->m_NetGameState = packet.game;
break;
default:
LOG->Warn( "Invalid packet received with type '%d'", packet.type );
break;
}
}
}
}
void RageNetworkClient::SendMyPlayerState( NetPlayerState ps )
{
RageNetworkPacket packet;
packet.type = RageNetworkPacket::update_player;
packet.player = ps;
SendToServer( &packet );
}
void RageNetworkClient::Send( TCPsocket& socket, RageNetworkPacket* pPacket )
{
int result = SDLNet_TCP_Send(socket,pPacket,sizeof(RageNetworkPacket));
if( result<int(sizeof(RageNetworkPacket)) )
{
LOG->Warn("SDLNet_TCP_Send: %s\n", SDLNet_GetError());
// It may be good to disconnect sock because it is likely invalid now.
}
}
void RageNetworkClient::SendToServer( RageNetworkPacket* pPacket )
{
Send( m_priSock, pPacket );
}
+54
View File
@@ -0,0 +1,54 @@
#ifndef RAGENETWORKCLIENT_H
#define RAGENETWORKCLIENT_H
/*
-----------------------------------------------------------------------------
Class: RageNetworkClient
Desc: Network transport layer. Note that this currently has SM-specific
functionality. All SM stuff should be moved out eventually.
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
Chris Danford
-----------------------------------------------------------------------------
*/
struct _TCPsocket;
typedef struct _TCPsocket *TCPsocket;
struct _SDLNet_SocketSet;
typedef struct _SDLNet_SocketSet *SDLNet_SocketSet;
#include "NetGameState.h"
class RageNetworkPacket;
class RageNetworkClient
{
public:
RageNetworkClient();
~RageNetworkClient();
void Update( float fDeltaTime );
void Connect(CString ip, unsigned short port);
void Disconnect();
void SendMyPlayerState( NetPlayerState ps ); // calling this implies bReady = true
NetGameState m_NetGameState;
protected:
void SendToServer( RageNetworkPacket* pPacket );
void Send( TCPsocket& socket, RageNetworkPacket* pPacket );
TCPsocket m_priSock; // client: active socket. server: listen socket
SDLNet_SocketSet m_priSockSet;
};
extern RageNetworkClient* CLIENT; // global and accessable from anywhere in our program
#endif
+30
View File
@@ -0,0 +1,30 @@
#ifndef RAGENETWORKPACKET
#define RAGENETWORKPACKET
#include "NetGameState.h"
const int MAX_DATA_SIZE = sizeof(NetGameState);
class RageNetworkPacket
{
public:
RageNetworkPacket() { type=invalid; }
~RageNetworkPacket() {}
enum {
invalid,
update_player, // sent by clients
update_game, // sent by server
go_to_next_screen // sent by server
} type;
union
{
// char data[MAX_DATA_SIZE];
NetGameState game;
NetPlayerState player;
};
};
#endif
+202
View File
@@ -0,0 +1,202 @@
#include "stdafx.h"
/*
-----------------------------------------------------------------------------
Class: RageNetworkServer
Desc: See header.
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
Brendan Walker
Chris Danford
-----------------------------------------------------------------------------
*/
#include "RageNetworkServer.h"
#include "RageUtil.h"
#include "RageException.h"
#include "RageLog.h"
#include "RageException.h"
#include "RageNetworkPacket.h"
#include "SDL_net-1.2.4/include/SDL_net.h"
//#ifdef _DEBUG
//#pragma comment(lib, "SDL_net-1.2.4/lib/SDL_netd.lib")
//#else
#pragma comment(lib, "SDL_net-1.2.4/lib/SDL_net.lib")
//#endif
#ifdef _DEBUG
#pragma comment(lib, "SDL-1.2.5/lib/SDLmaind.lib")
#else
#pragma comment(lib, "SDL-1.2.5/lib/SDLmain.lib")
#endif
/* Pull in all of our SDL libraries here. */
#ifdef _DEBUG
#pragma comment(lib, "SDL-1.2.5/lib/SDLd.lib")
#pragma comment(lib, "SDL_image-1.2/SDL_imaged.lib")
#else
#pragma comment(lib, "SDL-1.2.5/lib/SDL.lib")
#pragma comment(lib, "SDL_image-1.2/SDL_image.lib")
#endif
RageNetworkServer* SERVER = NULL;
const int MAX_CLIENTS = 16;
/*
///////////////////////////////
//
// THIS IS UNTESTED SINCE THE CONVERSION TO SDL_net!!!!!
//
///////////////////////////////
*/
RageNetworkServer::RageNetworkServer()
{
m_listenSock = 0;
m_listenSockSet = NULL;
m_clientSocksSet = NULL;
SDL_Init(0); // this may have already been init'd somewhere else
if( SDLNet_Init() < 0 )
throw RageException("SDLNet_Init: %s\n", SDLNet_GetError());
// allocate socket sets
m_listenSockSet = SDLNet_AllocSocketSet(1);
if(!m_listenSockSet)
throw RageException("SDLNet_AllocSocketSet: %s\n", SDLNet_GetError());
m_clientSocksSet = SDLNet_AllocSocketSet(MAX_CLIENTS);
if(!m_clientSocksSet)
throw RageException("SDLNet_AllocSocketSet: %s\n", SDLNet_GetError());
}
RageNetworkServer::~RageNetworkServer()
{
StopListening();
DisconnectAllClients();
SDLNet_FreeSocketSet( m_listenSockSet );
SDLNet_FreeSocketSet( m_clientSocksSet );
SDLNet_Quit();
}
void RageNetworkServer::StopListening()
{
if( m_listenSock == NULL )
return;
SDLNet_TCP_DelSocket( m_listenSockSet, m_listenSock );
SDLNet_TCP_Close( m_listenSock );
m_listenSock = NULL;
}
void RageNetworkServer::DisconnectAllClients()
{
// I hope passing NULL to these is OK...
for( unsigned int i=0; i<m_clientSocks.size(); i++ )
{
SDLNet_TCP_DelSocket( m_clientSocksSet, m_clientSocks[i] );
SDLNet_TCP_Close( m_clientSocks[i] );
}
m_clientSocks.erase( m_clientSocks.begin(), m_clientSocks.end() );
}
void RageNetworkServer::Listen(unsigned short port)
{
StopListening();
IPaddress ip;
if( SDLNet_ResolveHost(&ip,NULL,port)==-1 )
throw RageException("SDLNet_ResolveHost: %s\n", SDLNet_GetError());
m_listenSock=SDLNet_TCP_Open(&ip);
if( !m_listenSock )
throw RageException("SDLNet_TCP_Open: %s\n", SDLNet_GetError());
SDLNet_TCP_AddSocket( m_listenSockSet, m_listenSock );
}
void RageNetworkServer::Update( float fDeltaTime )
{
// accept
if( m_listenSock )
{
TCPsocket new_sock = SDLNet_TCP_Accept( m_listenSock ) ;
if( new_sock != 0 )
{
m_clientSocks.push_back( new_sock );
SDLNet_TCP_AddSocket( m_clientSocksSet, new_sock );
LOG->Trace( "Accepting new client." );
m_NetGameState.num_players = m_clientSocks.size();
}
}
// receive
if( m_clientSocks.size() > 0 ) // there are some clients connected
{
int numready = SDLNet_CheckSockets(m_clientSocksSet, 0);
if(numready==-1)
{
LOG->Warn("SDLNet_CheckSockets: %s\n", SDLNet_GetError());
}
else if( numready > 0 )
{
for( unsigned int i=0; i<m_clientSocks.size(); i++ )
{
if( SDLNet_SocketReady(m_clientSocks[i]) )
{
RageNetworkPacket packet;
SDLNet_TCP_Recv( m_clientSocks[i], &packet, sizeof(RageNetworkPacket) );
switch( packet.type )
{
case RageNetworkPacket::update_player:
m_NetGameState.player[i] = packet.player;
break;
default:
LOG->Warn( "Invalid packet received with type '%d'", packet.type );
break;
}
}
}
}
}
}
void RageNetworkServer::TellClientsNetGameState()
{
// tell everyone about the new names
RageNetworkPacket packet;
packet.type = RageNetworkPacket::update_game;
packet.game = m_NetGameState;
this->SendToClients( &packet );
}
void RageNetworkServer::Send( TCPsocket& socket, RageNetworkPacket* pPacket )
{
}
void RageNetworkServer::SendToClients( RageNetworkPacket* pPacket )
{
for( int i=m_clientSocks.size()-1; i>=0; i-- ) // iterate backwards in case we need to delete
{
int result = SDLNet_TCP_Send(m_clientSocks[i],pPacket,sizeof(RageNetworkPacket));
if( result<int(sizeof(RageNetworkPacket)) )
{
LOG->Warn("SDLNet_TCP_Send: %s\n", SDLNet_GetError());
LOG->Trace( "disconnecting %d", i );
SDLNet_TCP_DelSocket( m_clientSocksSet, m_clientSocks[i] );
SDLNet_TCP_Close( m_clientSocks[i] );
m_clientSocks.erase( m_clientSocks.begin() + i );
}
}
}
+57
View File
@@ -0,0 +1,57 @@
#ifndef RAGENETWORKSERVER_H
#define RAGENETWORKSERVER_H
/*
-----------------------------------------------------------------------------
Class: RageNetworkServer
Desc: Network transport layer. Note that this currently has SM-specific
functionality. All SM stuff should be moved out eventually.
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
Chris Danford
-----------------------------------------------------------------------------
*/
struct _TCPsocket;
typedef struct _TCPsocket *TCPsocket;
struct _SDLNet_SocketSet;
typedef struct _SDLNet_SocketSet *SDLNet_SocketSet;
#include "NetGameState.h"
class RageNetworkPacket;
class RageNetworkServer
{
public:
RageNetworkServer();
~RageNetworkServer();
void Update( float fDeltaTime );
void Listen(unsigned short port);
void StopListening();
void DisconnectAllClients();
void TellClientsNetGameState();
NetGameState m_NetGameState;
protected:
void Send( TCPsocket& socket, RageNetworkPacket* pPacket );
void SendToClients( RageNetworkPacket* pPacket );
TCPsocket m_listenSock;
SDLNet_SocketSet m_listenSockSet;
vector<TCPsocket> m_clientSocks;
SDLNet_SocketSet m_clientSocksSet;
};
extern RageNetworkServer* SERVER; // global and accessable from anywhere in our program
#endif
+3 -1
View File
@@ -170,6 +170,7 @@ void ScreenManager::Input( const DeviceInput& DeviceI, const InputEventType type
#include "ScreenMachineOptions.h"
#include "ScreenMapControllers.h"
#include "ScreenMusicScroll.h"
#include "ScreenNetworkWaiting.h"
#include "ScreenPlayerOptions.h"
#include "ScreenSandbox.h"
#include "ScreenSelectCourse.h"
@@ -198,7 +199,7 @@ Screen* ScreenManager::MakeNewScreen( CString sClassName )
else if( 0==stricmp(sClassName, "ScreenEvaluation") ) return new ScreenEvaluation;
else if( 0==stricmp(sClassName, "ScreenFinalEvaluation") ) return new ScreenFinalEvaluation;
else if( 0==stricmp(sClassName, "ScreenEz2SelectPlayer") ) return new ScreenEz2SelectPlayer;
else if( 0==stricmp(sClassName, "ScreenSelectMode") ) return new ScreenSelectMode;
else if( 0==stricmp(sClassName, "ScreenSelectMode") ) return new ScreenSelectMode;
else if( 0==stricmp(sClassName, "ScreenGameOver") ) return new ScreenGameOver;
else if( 0==stricmp(sClassName, "ScreenGameplay") ) return new ScreenGameplay;
else if( 0==stricmp(sClassName, "ScreenGraphicOptions") ) return new ScreenGraphicOptions;
@@ -208,6 +209,7 @@ Screen* ScreenManager::MakeNewScreen( CString sClassName )
else if( 0==stricmp(sClassName, "ScreenMapControllers") ) return new ScreenMapControllers;
else if( 0==stricmp(sClassName, "ScreenInputOptions") ) return new ScreenInputOptions;
else if( 0==stricmp(sClassName, "ScreenMusicScroll") ) return new ScreenMusicScroll;
else if( 0==stricmp(sClassName, "ScreenNetworkWaiting") ) return new ScreenNetworkWaiting;
else if( 0==stricmp(sClassName, "ScreenPlayerOptions") ) return new ScreenPlayerOptions;
else if( 0==stricmp(sClassName, "ScreenSandbox") ) return new ScreenSandbox;
else if( 0==stricmp(sClassName, "ScreenSelectCourse") ) return new ScreenSelectCourse;
+170
View File
@@ -0,0 +1,170 @@
#include "stdafx.h"
/*
-----------------------------------------------------------------------------
Class: ScreenNetworkWaiting
Desc: The main title screen and menu.
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
Chris Danford
-----------------------------------------------------------------------------
*/
#include "ScreenNetworkWaiting.h"
#include "SongManager.h"
#include "ScreenManager.h"
#include "GameConstantsAndTypes.h"
#include "RageUtil.h"
#include "PrefsManager.h"
#include "GameManager.h"
#include "RageLog.h"
#include "GameState.h"
#include "RageMusic.h"
#include "ThemeManager.h"
#include "RageNetworkClient.h"
#include "NetGameState.h"
#include "InputMapper.h"
//
// Defines specific to ScreenNetworkWaiting
//
const int SERVER_WAIT_TIMEOUT_SECS = 60;
const float REFRESH_SECONDS = 0.2f;
#define SERVER_INFO_X THEME->GetMetricF("ScreenNetworkWaiting","ServerInfoX")
#define SERVER_INFO_Y THEME->GetMetricF("ScreenNetworkWaiting","ServerInfoY")
#define PLAYER_LIST_X THEME->GetMetricF("ScreenNetworkWaiting","PlayerListX")
#define PLAYER_LIST_Y THEME->GetMetricF("ScreenNetworkWaiting","PlayerListY")
#define HELP_TEXT THEME->GetMetric("ScreenNetworkWaiting","HelpText")
const ScreenMessage SM_ServerGoToNextScreen = ScreenMessage(SM_User+1);
const ScreenMessage SM_GoToPrevScreen = ScreenMessage(SM_User+3);
const ScreenMessage SM_GoToNextScreen = ScreenMessage(SM_User+4);
ScreenNetworkWaiting::ScreenNetworkWaiting()
{
LOG->Trace( "ScreenNetworkWaiting::ScreenNetworkWaiting()" );
//
// I think it's better to do all the initialization here rather than have it scattered
// about in all the global singleton classes
//
GAMESTATE->Reset();
PREFSMAN->ReadGamePrefsFromDisk();
INPUTMAPPER->ReadMappingsFromDisk();
GAMESTATE->m_bPlayersCanJoin = true;
if( !GAMEMAN->DoesNoteSkinExist( GAMEMAN->GetCurNoteSkin() ) )
{
CStringArray asNoteSkinNames;
GAMEMAN->GetNoteSkinNames( asNoteSkinNames );
GAMEMAN->SwitchNoteSkin( asNoteSkinNames[0] );
}
if( !THEME->DoesThemeExist( THEME->GetCurThemeName() ) )
{
CString sGameName = GAMESTATE->GetCurrentGameDef()->m_szName;
if( THEME->DoesThemeExist( sGameName ) )
THEME->SwitchTheme( sGameName );
else
THEME->SwitchTheme( "default" );
}
PREFSMAN->SaveGamePrefsToDisk();
m_Menu.Load(
THEME->GetPathTo("BGAnimations","network waiting"),
THEME->GetPathTo("Graphics","network waiting top edge"),
HELP_TEXT, false, false, 99
);
this->AddChild( &m_Menu );
m_textServerInfo.LoadFromFont( THEME->GetPathTo("Fonts","normal") );
m_textServerInfo.SetXY( SERVER_INFO_X, SERVER_INFO_Y );
m_textServerInfo.SetText( "Server Info" );
this->AddChild( &m_textServerInfo );
m_textPlayerList.LoadFromFont( THEME->GetPathTo("Fonts","normal") );
m_textPlayerList.SetXY( PLAYER_LIST_X, PLAYER_LIST_Y );
this->AddChild( &m_textPlayerList );
MUSIC->LoadAndPlayIfNotAlready( THEME->GetPathTo("Sounds","network waiting music") );
m_Menu.TweenOnScreenFromBlack( SM_None );
m_bReady = false;
NetPlayerState ps = { "billy", 100, 100, m_bReady };
CLIENT->SendMyPlayerState( ps );
m_fUpdateTimer = REFRESH_SECONDS;
}
ScreenNetworkWaiting::~ScreenNetworkWaiting()
{
LOG->Trace( "ScreenNetworkWaiting::~ScreenNetworkWaiting()" );
}
void ScreenNetworkWaiting::Update( float fDeltaTime )
{
Screen::Update( fDeltaTime );
m_fUpdateTimer -= fDeltaTime;
if( m_fUpdateTimer < 0 )
{
CString s;
NetGameState& gns = CLIENT->m_NetGameState;
for( int i=0; i<gns.num_players; i++ )
{
s += gns.player[i].name;
s += gns.player[i].bReady ? " (Ready)" : " (Not Ready)";
s += '\n';
}
m_textPlayerList.SetText( s );
m_fUpdateTimer = REFRESH_SECONDS;
}
}
void ScreenNetworkWaiting::DrawPrimitives()
{
m_Menu.DrawBottomLayer();
Screen::DrawPrimitives();
m_Menu.DrawTopLayer();
}
void ScreenNetworkWaiting::Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI )
{
LOG->Trace( "ScreenNetworkWaiting::Input()" );
Screen::Input( DeviceI, type, GameI, MenuI, StyleI );
}
void ScreenNetworkWaiting::HandleScreenMessage( const ScreenMessage SM )
{
switch( SM )
{
case SM_ServerGoToNextScreen:
SCREENMAN->SetNewScreen( "ScreenNetworkMenu" );
break;
}
}
void ScreenNetworkWaiting::MenuUp( PlayerNumber pn )
{
m_bReady = true;
NetPlayerState ps = { "billy", 100, 100, m_bReady };
CLIENT->SendMyPlayerState( ps );
}
void ScreenNetworkWaiting::MenuDown( PlayerNumber pn )
{
m_bReady = false;
NetPlayerState ps = { "billy", 100, 100, m_bReady };
CLIENT->SendMyPlayerState( ps );
}
+43
View File
@@ -0,0 +1,43 @@
/*
-----------------------------------------------------------------------------
Class: ScreenNetworkWaiting
Desc: See header.
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
Chris Danford
-----------------------------------------------------------------------------
*/
#include "Screen.h"
#include "SongSelector.h"
#include "BitmapText.h"
#include "TransitionFade.h"
#include "RandomSample.h"
class ScreenNetworkWaiting : public Screen
{
public:
ScreenNetworkWaiting();
virtual ~ScreenNetworkWaiting();
virtual void Update( float fDeltaTime );
virtual void DrawPrimitives();
virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI );
virtual void HandleScreenMessage( const ScreenMessage SM );
virtual void MenuUp( PlayerNumber pn );
virtual void MenuDown( PlayerNumber pn );
private:
MenuElements m_Menu;
BitmapText m_textServerInfo;
BitmapText m_textPlayerList;
bool m_bReady;
float m_fUpdateTimer;
};
-1
View File
@@ -28,7 +28,6 @@
#include "PrefsManager.h"
#include "Quad.h"
#include "ThemeManager.h"
#include "RageNetwork.h"
ScreenSandbox::ScreenSandbox()
+5
View File
@@ -1087,6 +1087,11 @@ CString Song::GetBackgroundPath() const
return m_sSongDir+m_sBackgroundFile;
}
const CString& Song::GetSongDir() const
{
return m_sSongDir;
}
/* Get the first/last beat of any currently active note pattern. If two
* players are active, they often have the same start beat, but they don't
* have to.
+5 -2
View File
@@ -643,10 +643,13 @@ bool SongManager::ChooseRandomSong()
return false;
}
Song* SongManager::GetSongFromPath( const CString &sSongPath )
Song* SongManager::GetSongFromDir( CString sDir )
{
if( sDir[sDir.GetLength()-1] != '\\' )
sDir += '\\';
for( unsigned int i=0; i<m_pSongs.size(); i++ )
if( sSongPath.CompareNoCase(m_pSongs[i]->GetSongFilePath()) == 0 )
if( sDir.CompareNoCase(m_pSongs[i]->GetSongDir()) == 0 )
return m_pSongs[i];
return NULL;
+1 -1
View File
@@ -65,7 +65,7 @@ public:
* if successful, false if no song could be found. */
bool ChooseRandomSong();
Song* GetSongFromPath( const CString &sSongPath );
Song* GetSongFromDir( CString sDir );
protected:
void LoadStepManiaSongDir( CString sDir, LoadingWindow *ld );
+16 -43
View File
@@ -27,7 +27,7 @@
#include "RageInput.h"
#include "RageTimer.h"
#include "RageException.h"
#include "RageNetwork.h"
#include "RageNetworkClient.h"
#include "RageMath.h"
#include "arch/arch.h"
@@ -78,12 +78,9 @@
// command line arguments
CString g_sSongPath = "";
bool g_bBeClient = false;
bool g_bBeServer = false;
CString g_sServerIP = "";
int g_iNumClients = 0;
const int SM_PORT = 26573; // Quake port + "Ko" + "na" + "mitsu"
const int SM_PORT = 573; // "Ko" + "na" + "mitsu"
/*------------------------------------------------
Common stuff
@@ -265,24 +262,14 @@ int main(int argc, char* argv[])
atexit(SDL_Quit); /* Clean up on exit */
/*
* Handle command line args
* Handle command line args.
* Only allow one command line arg so we can validate the number of
* parameters easier.
*/
for(int i=0; i<argc; i++)
{
if(!strcmp(argv[i], "--fsck"))
;//crash();
else if(!strcmp(argv[i], "--song"))
g_sSongPath = argv[++i];
else if(!strcmp(argv[i], "--client"))
g_bBeClient = true;
else if(!strcmp(argv[i], "--server"))
g_bBeServer = true;
else if(!strcmp(argv[i], "--ip"))
g_sServerIP = argv[++i];
else if(!strcmp(argv[i], "--numclients"))
g_iNumClients = atoi(argv[++i]);
}
if( argc > 1 )
g_sSongPath = argv[1];
if( argc > 2 )
g_sServerIP = argv[2];
#ifdef _DEBUG
_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF|_CRTDBG_LEAK_CHECK_DF);
@@ -327,7 +314,7 @@ int main(int argc, char* argv[])
ANNOUNCER = new AnnouncerManager;
INPUTFILTER = new InputFilter;
INPUTMAPPER = new InputMapper;
NETWORK = new RageNetwork;
CLIENT = new RageNetworkClient;
INPUTQUEUE = new InputQueue;
SONGINDEX = new SongCacheIndex;
/* depends on SONGINDEX: */
@@ -363,33 +350,19 @@ int main(int argc, char* argv[])
/*
* Load initial screen depending on network mode
*/
if( g_bBeClient )
if( g_sServerIP != "" )
{
// immediately try to connect to server
GAMESTATE->m_pCurSong = SONGMAN->GetSongFromPath( g_sSongPath );
GAMESTATE->m_pCurSong = SONGMAN->GetSongFromDir( g_sSongPath );
if( GAMESTATE->m_pCurSong == NULL )
throw RageException( "The song '%s' is required to play this network game.", g_sSongPath.GetString() );
NETWORK->Init( false );
if( !NETWORK->Connect( (const char*)g_sServerIP, SM_PORT ) )
throw RageException( "Could not connect to server '%s'", g_sServerIP.GetString() );
SCREENMAN->SetNewScreen( "ScreenSandbox" );
}
else if( g_bBeServer )
{
// wait for clients to connect
GAMESTATE->m_pCurSong = SONGMAN->GetSongFromPath( g_sSongPath );
if( GAMESTATE->m_pCurSong == NULL )
throw RageException( "The song '%s' is required to play this network game.", g_sSongPath.GetString() );
NETWORK->Init( true );
if( !NETWORK->Listen( SM_PORT ) )
throw RageException( "Could not connect to server '%s'", g_sServerIP.GetString() );
// SCREENMAN->SetNewScreen( "ScreenSandbox" );
CLIENT->Connect( (const char*)g_sServerIP, SM_PORT );
SCREENMAN->SetNewScreen( "ScreenNetworkWaiting" );
}
else
{
// normal game
SCREENMAN->SetNewScreen( "ScreenTitleMenu" );
// SCREENMAN->SetNewScreen( "ScreenSandbox" );
}
/* Run the main loop. */
@@ -415,7 +388,7 @@ int main(int argc, char* argv[])
#endif
SAFE_DELETE( SCREENMAN );
SAFE_DELETE( NETWORK );
SAFE_DELETE( CLIENT );
SAFE_DELETE( INPUTQUEUE );
SAFE_DELETE( INPUTMAPPER );
SAFE_DELETE( INPUTFILTER );
@@ -494,7 +467,7 @@ void GameLoop()
TEXTUREMAN->Update( fDeltaTime );
MUSIC->Update( fDeltaTime );
SCREENMAN->Update( fDeltaTime );
NETWORK->Update( fDeltaTime );
CLIENT->Update( fDeltaTime );
static InputEventArray ieArray;
ieArray.clear(); // empty the array
+12 -4
View File
@@ -60,7 +60,7 @@ IntDir=.\../Release6
TargetDir=\stepmania\stepmania
TargetName=StepMania
SOURCE="$(InputPath)"
PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
PostBuild_Cmds=disasm\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania.vdi ia32.vdi
# End Special Build Tool
@@ -95,7 +95,7 @@ IntDir=.\../Debug6
TargetDir=\stepmania\stepmania
TargetName=StepMania-debug
SOURCE="$(InputPath)"
PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
PostBuild_Cmds=disasm\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania.vdi ia32.vdi
# End Special Build Tool
@@ -211,11 +211,11 @@ SOURCE=.\RageMusic.h
# End Source File
# Begin Source File
SOURCE=.\RageNetwork.cpp
SOURCE=.\RageNetworkClient.cpp
# End Source File
# Begin Source File
SOURCE=.\RageNetwork.h
SOURCE=.\RageNetworkClient.h
# End Source File
# Begin Source File
@@ -1301,6 +1301,14 @@ SOURCE=.\ScreenMusicScroll.h
# End Source File
# Begin Source File
SOURCE=.\ScreenNetworkWaiting.cpp
# End Source File
# Begin Source File
SOURCE=.\ScreenNetworkWaiting.h
# End Source File
# Begin Source File
SOURCE=.\ScreenOptions.cpp
# End Source File
# Begin Source File
+2 -1
View File
@@ -168,7 +168,8 @@ try_element_again:
if( asPossibleElementFilePaths.empty() )
{
#ifdef _DEBUG
switch( MessageBox(NULL,"ThemeManager",ssprintf("The theme element %s/%s is missing.",sAssetCategory.GetString(),sFileName.GetString()), MB_ABORTRETRYIGNORE ) )
CString sMessage = ssprintf("The theme element %s/%s is missing.",sAssetCategory.GetString(),sFileName.GetString());
switch( MessageBox(NULL, sMessage, "ThemeManager", MB_ABORTRETRYIGNORE ) )
{
case IDRETRY:
goto try_element_again;
-174
View File
@@ -1,174 +0,0 @@
log.txt: last compiled on Sun Apr 7 14:19:25 2002.
Log starting 2002-04-30 13:16:42
RageSound::RageSound()
Sound card info:
- play latency is 3 ms
- total device hardware memory is 0 bytes
- free device hardware memory is 0 bytes
- number of free sample slots in the hardware is 94
- number of free 3D sample slots in the hardware is 94
- min sample rate supported by the hardware is 8000
- max sample rate supported by the hardware is 48000
Video card info:
- max texture width is 4096
- max texture height is 4096
- max texture blend stages is 8
- max simultaneous textures is 4
This display adaptor supports the following modes:
Group banner for 'Dance Dance Revolution 1st Mix' is 'Songs\Dance Dance Revolution 1st Mix\banner.png'.
Song::LoadFromSongDir(Songs\Dance Dance Revolution 1st Mix\trip)
Song::LoadFromDWIFile(Songs\Dance Dance Revolution 1st Mix\trip\trip.dwi)
Group banner for 'Dance Dance Revolution 2nd Mix' is 'Songs\Dance Dance Revolution 2nd Mix\banner.png'.
Song::LoadFromSongDir(Songs\Dance Dance Revolution 2nd Mix\Tubthumping)
Song::LoadFromSMDir(Songs\Dance Dance Revolution 2nd Mix\Tubthumping\)
Unexpected value named '#TITLE'
Unexpected value named ''
Group banner for 'Dance Dance Revolution 3rd Mix' is 'Songs\Dance Dance Revolution 3rd Mix\banner.png'.
Song::LoadFromSongDir(Songs\Dance Dance Revolution 3rd Mix\Xanadu)
Song::LoadFromBMSDir(Songs\Dance Dance Revolution 3rd Mix\Xanadu\)
NoteMetadata description found to be 'another'
NoteMetadata description found to be 'basic'
NoteMetadata description found to be '4th+ maniac'
NoteMetadata description found to be 'ssr'
NoteMetadata description found to be 'another double'
NoteMetadata description found to be 'basic double'
NoteMetadata description found to be '4th+ maniac double'
NoteMetadata description found to be 'ssr double'
Inserting new BPM change at beat 0.000000, BPM 130.000000
There is a BPM change at beat 0.000000, BPM 130.000000, index 0
Group banner for 'Dance Dance Revolution 3rd Mix Plus' is 'Songs\Dance Dance Revolution 3rd Mix Plus\banner.png'.
Song::LoadFromSongDir(Songs\Dance Dance Revolution 3rd Mix Plus\WA)
Song::LoadFromBMSDir(Songs\Dance Dance Revolution 3rd Mix Plus\WA\)
NoteMetadata description found to be 'basic'
NoteMetadata description found to be 'maniac'
NoteMetadata description found to be 'trick'
NoteMetadata description found to be '6panels basic'
NoteMetadata description found to be '6panels maniac'
NoteMetadata description found to be '6panels trick'
NoteMetadata description found to be 'basic double'
NoteMetadata description found to be 'maniac double'
NoteMetadata description found to be 'trick double'
NoteMetadata description found to be 'battle'
Inserting new BPM change at beat 0.000000, BPM 141.000000
There is a BPM change at beat 0.000000, BPM 141.000000, index 0
Group banner for 'Dance Dance Revolution 4th Mix' is 'Songs\Dance Dance Revolution 4th Mix\banner.png'.
Song::LoadFromSongDir(Songs\Dance Dance Revolution 4th Mix\Young Forever)
Song::LoadFromBMSDir(Songs\Dance Dance Revolution 4th Mix\Young Forever\)
NoteMetadata description found to be 'basic'
NoteMetadata description found to be 'maniac'
NoteMetadata description found to be 'trick'
NoteMetadata description found to be '6panels basic'
NoteMetadata description found to be '6panels maniac'
NoteMetadata description found to be '6panels trick'
NoteMetadata description found to be 'basic double'
NoteMetadata description found to be 'maniac double'
NoteMetadata description found to be 'trick double'
NoteMetadata description found to be 'battle'
Inserting new BPM change at beat 0.000000, BPM 140.000000
There is a BPM change at beat 0.000000, BPM 140.000000, index 0
Group banner for 'Dance Dance Revolution 4th Mix Plus' is 'Songs\Dance Dance Revolution 4th Mix Plus\banner.png'.
Song::LoadFromSongDir(Songs\Dance Dance Revolution 4th Mix Plus\Wonda -Speed K Mix-)
Song::LoadFromBMSDir(Songs\Dance Dance Revolution 4th Mix Plus\Wonda -Speed K Mix-\)
NoteMetadata description found to be 'basic'
NoteMetadata description found to be 'maniac'
NoteMetadata description found to be 'trick'
NoteMetadata description found to be '6panels basic'
NoteMetadata description found to be '6panels maniac'
NoteMetadata description found to be '6panels trick'
NoteMetadata description found to be 'basic double'
NoteMetadata description found to be 'maniac double'
NoteMetadata description found to be 'trick double'
NoteMetadata description found to be 'battle'
Inserting new BPM change at beat 0.000000, BPM 170.000000
There is a BPM change at beat 0.000000, BPM 170.000000, index 0
Group banner for 'Dance Dance Revolution 5th Mix' is 'Songs\Dance Dance Revolution 5th Mix\banner.png'.
Song::LoadFromSongDir(Songs\Dance Dance Revolution 5th Mix\tribal)
Song::LoadFromDWIFile(Songs\Dance Dance Revolution 5th Mix\tribal\tribal.dwi)
Group banner for 'Dance Dance Revolution 6th Mix' is 'Songs\Dance Dance Revolution 6th Mix\banner.png'.
Song::LoadFromSongDir(Songs\Dance Dance Revolution 6th Mix\Orion 78 Civilization Mix)
Song::LoadFromDWIFile(Songs\Dance Dance Revolution 6th Mix\Orion 78 Civilization Mix\orion78civ.dwi)
Song::LoadFromSongDir(Songs\Dance Dance Revolution 6th Mix\So Deep)
Song::LoadFromDWIFile(Songs\Dance Dance Revolution 6th Mix\So Deep\sodeep.dwi)
Song::LoadFromSongDir(Songs\Dance Dance Revolution 6th Mix\Somewhere Over The Rainbow)
Song::LoadFromDWIFile(Songs\Dance Dance Revolution 6th Mix\Somewhere Over The Rainbow\somewhere.dwi)
Song::LoadFromSongDir(Songs\Dance Dance Revolution 6th Mix\The Centre of the Heart)
Song::LoadFromDWIFile(Songs\Dance Dance Revolution 6th Mix\The Centre of the Heart\centreheart.dwi)
Song::LoadFromSongDir(Songs\Dance Dance Revolution 6th Mix\True)
Song::LoadFromDWIFile(Songs\Dance Dance Revolution 6th Mix\True\true.dwi)
Song::LoadFromSongDir(Songs\Dance Dance Revolution 6th Mix\True (Trance Sunrise Mix))
Song::LoadFromDWIFile(Songs\Dance Dance Revolution 6th Mix\True (Trance Sunrise Mix)\truetrance.dwi)
Song::LoadFromSongDir(Songs\Dance Dance Revolution 6th Mix\Twilight Zone)
Song::LoadFromDWIFile(Songs\Dance Dance Revolution 6th Mix\Twilight Zone\twilightzone.dwi)
Song::LoadFromSongDir(Songs\Dance Dance Revolution 6th Mix\Witch Doctor)
Song::LoadFromDWIFile(Songs\Dance Dance Revolution 6th Mix\Witch Doctor\witchdoctor.dwi)
Song::LoadFromSongDir(Songs\Dance Dance Revolution 6th Mix\www Blonde Girl)
Song::LoadFromDWIFile(Songs\Dance Dance Revolution 6th Mix\www Blonde Girl\wwwblonde.dwi)
Song::LoadFromSongDir(Songs\Dance Dance Revolution 6th Mix\Yozora No Muko)
Song::LoadFromDWIFile(Songs\Dance Dance Revolution 6th Mix\Yozora No Muko\yozoranomuko.dwi)
Found 17 Songs.
GameDef::GameDef( 'Games\dance )
StyleDef::StyleDef( 'Games\dance\couple.style )
StyleDef::StyleDef( 'Games\dance\double.style )
StyleDef::StyleDef( 'Games\dance\single.style )
StyleDef::StyleDef( 'Games\dance\solo.style )
StyleDef::StyleDef( 'Games\dance\versus.style )
GameDef::GameDef( 'Games\pump )
StyleDef::StyleDef( 'Games\pump\couple.style )
StyleDef::StyleDef( 'Games\pump\double.style )
StyleDef::StyleDef( 'Games\pump\single.style )
StyleDef::StyleDef( 'Games\pump\versus.style )
RageScreen::SwitchDisplayModes( 1, 640, 480, 16 )
Testing format: display 22, back buffer 23, windowed 1...
This won't work. Keep searching.
Testing format: display 22, back buffer 24, windowed 1...
This won't work. Keep searching.
Testing format: display 22, back buffer 25, windowed 1...
This won't work. Keep searching.
Testing format: display 22, back buffer 20, windowed 1...
This won't work. Keep searching.
Testing format: display 22, back buffer 22, windowed 1...
This will work.
Present Parameters: 640, 480, 22, 1, 0, 1, 0, 1, 1, 80, 0, 0, 0
Mode change was successful.
FPS: 1
RageScreen::SwitchDisplayModes( 1, 640, 480, 16 )
Testing format: display 22, back buffer 23, windowed 1...
This won't work. Keep searching.
Testing format: display 22, back buffer 24, windowed 1...
This won't work. Keep searching.
Testing format: display 22, back buffer 25, windowed 1...
This won't work. Keep searching.
Testing format: display 22, back buffer 20, windowed 1...
This won't work. Keep searching.
Testing format: display 22, back buffer 22, windowed 1...
This will work.
Present Parameters: 640, 480, 22, 1, 0, 1, 0, 1, 1, 80, 0, 0, 0
Mode change was successful.
BitmapText::LoadFromFontName(Themes\default\Fonts\Normal.font)
RageBitmapTexture: Loaded 'themes\default\fonts\normal 16x16.png' (512x512) from disk. bScaleImageToTextureSize = 0, source 512,512; image 512,512.
RageTextureManager: Finished loading 'themes\default\fonts\normal 16x16.png' - 1237292 references.
FontManager: Loading 'themes\default\fonts\normal.font' from disk.
BitmapText::LoadFromFontName(Themes\default\Fonts\Normal.font)
FontManager: The Font 'themes\default\fonts\normal.font' now has 1 references.
RageScreen::SwitchDisplayModes( 1, 640, 480, 16 )
Testing format: display 22, back buffer 23, windowed 1...
This won't work. Keep searching.
Testing format: display 22, back buffer 24, windowed 1...
This won't work. Keep searching.
Testing format: display 22, back buffer 25, windowed 1...
This won't work. Keep searching.
Testing format: display 22, back buffer 20, windowed 1...
This won't work. Keep searching.
Testing format: display 22, back buffer 22, windowed 1...
This will work.
Present Parameters: 640, 480, 22, 1, 0, 1, 0, 1, 1, 80, 0, 0, 0
Mode change was successful.
RageBitmapTexture: Loaded 'themes\default\fonts\normal 16x16.png' (512x512) from disk. bScaleImageToTextureSize = 0, source 512,512; image 512,512.
WARNING: Didn't find an empty system messages slot.
WARNING: Didn't find an empty system messages slot.
Sprite::LoadFromTexture(Themes\default\Graphics\results banner frame.png)
RageBitmapTexture: Loaded 'themes\default\graphics\results banner frame.png' (256x128) from disk. bScaleImageToTextureSize = 0, source 256,100; image 256,100.
RageTextureManager: Finished loading 'themes\default\graphics\results banner frame.png' - 1236440 references.
+40
View File
@@ -0,0 +1,40 @@
#include "stdafx.h"
#include "SDL.h"
#include "RageNetworkServer.h"
#include "RageLog.h"
const int SM_PORT = 573; // "Ko" + "na" + "mitsu"
int main(int argc, char* argv[])
{
SDL_Init(0); /* Fire up the SDL, but don't actually start any subsystems. */
LOG = new RageLog;
LOG->ShowConsole();
LOG->Trace( "smserver starting up..." );
SERVER = new RageNetworkServer;
SERVER->Listen( SM_PORT );
SDL_Event event;
while( 1 )
{
// process all queued events
while(SDL_PollEvent(&event))
{
switch(event.type)
{
case SDL_KEYDOWN:
SERVER->DisconnectAllClients();
exit(1);
break;
}
}
SERVER->Update( 0.1f );
SERVER->TellClientsNetGameState();
::Sleep( 100 );
}
}
+134
View File
@@ -0,0 +1,134 @@
# Microsoft Developer Studio Project File - Name="smserver" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Application" 0x0101
CFG=smserver - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "smserver.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "smserver.mak" CFG="smserver - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "smserver - Win32 Release" (based on "Win32 (x86) Application")
!MESSAGE "smserver - Win32 Debug" (based on "Win32 (x86) Application")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "smserver - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
# ADD CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /machine:I386
!ELSEIF "$(CFG)" == "smserver - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "../"
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /FR /YX /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /debug /machine:I386 /pdbtype:sept
!ENDIF
# Begin Target
# Name "smserver - Win32 Release"
# Name "smserver - Win32 Debug"
# Begin Source File
SOURCE=.\NetGameState.h
# End Source File
# Begin Source File
SOURCE=.\RageException.cpp
# End Source File
# Begin Source File
SOURCE=.\RageException.h
# End Source File
# Begin Source File
SOURCE=.\RageLog.cpp
# End Source File
# Begin Source File
SOURCE=.\RageLog.h
# End Source File
# Begin Source File
SOURCE=.\RageNetworkPacket.h
# End Source File
# Begin Source File
SOURCE=.\RageNetworkServer.cpp
# End Source File
# Begin Source File
SOURCE=.\RageNetworkServer.h
# End Source File
# Begin Source File
SOURCE=.\RageUtil.cpp
# End Source File
# Begin Source File
SOURCE=.\RageUtil.h
# End Source File
# Begin Source File
SOURCE=.\smserver.cpp
# End Source File
# End Target
# End Project
+29
View File
@@ -0,0 +1,29 @@
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "smserver"=.\smserver.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################
+1
View File
@@ -77,6 +77,7 @@ public:
void AutoGen( NotesType ntTo, NotesType ntFrom ); // create Notes of type ntTo from Notes of type ntFrom
/* Directory this song data came from: */
const CString &GetSongDir() const;
CString m_sSongDir;
/* Filename associated with this file. This will always have