Made it compile on windows. Fixed bug: Chat during change of hand did not work. Changed audio extension to wav.
This commit is contained in:
+3
-3
@@ -249,9 +249,9 @@ win32{
|
|||||||
SOURCES += src/core/win32/rand.cpp \
|
SOURCES += src/core/win32/rand.cpp \
|
||||||
src/net/win32/socket_helper.cpp \
|
src/net/win32/socket_helper.cpp \
|
||||||
src/net/win32/socket_startup.cpp
|
src/net/win32/socket_startup.cpp
|
||||||
INCLUDEPATH += ../boost/
|
INCLUDEPATH += ../boost/ ../SDL/include ../SDL_mixer
|
||||||
LIBPATH += ../boost/stage/lib
|
LIBPATH += ../boost/stage/lib ../SDL/VisualC/SDL/Release ../SDL/VisualC/SDLmain/Release ../SDL_mixer/VisualC/Release
|
||||||
LIBS += gdi32.lib comdlg32.lib oleaut32.lib imm32.lib winmm.lib winspool.lib ole32.lib uuid.lib user32.lib msimg32.lib shell32.lib kernel32.lib ws2_32.lib advapi32.lib
|
LIBS += gdi32.lib comdlg32.lib oleaut32.lib imm32.lib winmm.lib winspool.lib ole32.lib uuid.lib user32.lib msimg32.lib shell32.lib kernel32.lib ws2_32.lib advapi32.lib sdl.lib sdlmain.lib sdl_mixer.lib
|
||||||
RC_FILE = pokerth.rc
|
RC_FILE = pokerth.rc
|
||||||
}
|
}
|
||||||
!win32{
|
!win32{
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ ClientThread::SendChatMessage(const std::string &msg)
|
|||||||
static_cast<NetPacketSendChatText *>(chat.get())->SetData(chatData);
|
static_cast<NetPacketSendChatText *>(chat.get())->SetData(chatData);
|
||||||
// The sender is thread-safe, so just dump the packet.
|
// The sender is thread-safe, so just dump the packet.
|
||||||
GetSender().Send(GetContext().GetSocket(), chat);
|
GetSender().Send(GetContext().GetSocket(), chat);
|
||||||
} catch (const NetException &e)
|
} catch (const NetException &)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -766,7 +766,7 @@ ServerRecvStateNextHand::SetTimer(const boost::microsec_timer &timer)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ServerRecvStateNextHand::Process(ServerRecvThread &server)
|
ServerRecvStateNextHand::InternalProcess(ServerRecvThread &server, SessionWrapper session, boost::shared_ptr<NetPacket> packet)
|
||||||
{
|
{
|
||||||
if (m_delayTimer.elapsed().seconds() >= SERVER_NEXT_HAND_DELAY_SEC)
|
if (m_delayTimer.elapsed().seconds() >= SERVER_NEXT_HAND_DELAY_SEC)
|
||||||
server.SetState(ServerRecvStateStartHand::Instance());
|
server.SetState(ServerRecvStateStartHand::Instance());
|
||||||
|
|||||||
@@ -181,8 +181,8 @@ protected:
|
|||||||
static void SetHighestSet(Game &curGame, int highestSet);
|
static void SetHighestSet(Game &curGame, int highestSet);
|
||||||
};
|
};
|
||||||
|
|
||||||
// State: Final.
|
// State: Delay before next hand.
|
||||||
class ServerRecvStateNextHand : public ServerRecvStateRunning
|
class ServerRecvStateNextHand : public ServerRecvStateReceiving, public ServerRecvStateRunning
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// Access the state singleton.
|
// Access the state singleton.
|
||||||
@@ -192,14 +192,13 @@ public:
|
|||||||
|
|
||||||
void SetTimer(const boost::microsec_timer &timer);
|
void SetTimer(const boost::microsec_timer &timer);
|
||||||
|
|
||||||
//
|
|
||||||
virtual int Process(ServerRecvThread &server);
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
// Protected constructor - this is a singleton.
|
// Protected constructor - this is a singleton.
|
||||||
ServerRecvStateNextHand();
|
ServerRecvStateNextHand();
|
||||||
|
|
||||||
|
virtual int InternalProcess(ServerRecvThread &server, SessionWrapper session, boost::shared_ptr<NetPacket> packet);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
boost::microsec_timer m_delayTimer;
|
boost::microsec_timer m_delayTimer;
|
||||||
|
|||||||
@@ -11,6 +11,8 @@
|
|||||||
//
|
//
|
||||||
#include "sdlplayer.h"
|
#include "sdlplayer.h"
|
||||||
|
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
SDLPlayer::SDLPlayer()
|
SDLPlayer::SDLPlayer()
|
||||||
@@ -48,7 +50,7 @@ void SDLPlayer::playSound(string audioString) {
|
|||||||
|
|
||||||
cout << "play now" << endl;
|
cout << "play now" << endl;
|
||||||
/* Actually loads up the music */
|
/* Actually loads up the music */
|
||||||
string completeAudioString = audioString + ".ogg";
|
string completeAudioString = audioString + ".wav";
|
||||||
music = Mix_LoadMUS(completeAudioString.c_str());
|
music = Mix_LoadMUS(completeAudioString.c_str());
|
||||||
|
|
||||||
/* This begins playing the music - the first argument is a
|
/* This begins playing the music - the first argument is a
|
||||||
|
|||||||
@@ -12,11 +12,15 @@
|
|||||||
#ifndef SDLPLAYER_H
|
#ifndef SDLPLAYER_H
|
||||||
#define SDLPLAYER_H
|
#define SDLPLAYER_H
|
||||||
|
|
||||||
#include <iostream>
|
#ifdef _WIN32
|
||||||
#include <string>
|
#include <SDL.h>
|
||||||
|
#include <SDL_mixer.h>
|
||||||
|
#else
|
||||||
|
#include <SDL/SDL.h>
|
||||||
|
#include <SDL/SDL_mixer.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "SDL/SDL.h"
|
#include <string>
|
||||||
#include "SDL/SDL_mixer.h"
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@author FThauer FHammer <webmaster@pokerth.net>
|
@author FThauer FHammer <webmaster@pokerth.net>
|
||||||
|
|||||||
Reference in New Issue
Block a user