diff --git a/pokerth.pro b/pokerth.pro index 9d76c2e1..ac217e58 100755 --- a/pokerth.pro +++ b/pokerth.pro @@ -249,9 +249,9 @@ win32{ SOURCES += src/core/win32/rand.cpp \ src/net/win32/socket_helper.cpp \ src/net/win32/socket_startup.cpp - INCLUDEPATH += ../boost/ - LIBPATH += ../boost/stage/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 + INCLUDEPATH += ../boost/ ../SDL/include ../SDL_mixer + 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 sdl.lib sdlmain.lib sdl_mixer.lib RC_FILE = pokerth.rc } !win32{ diff --git a/src/net/common/clientthread.cpp b/src/net/common/clientthread.cpp index d95dc221..a319cf20 100644 --- a/src/net/common/clientthread.cpp +++ b/src/net/common/clientthread.cpp @@ -109,7 +109,7 @@ ClientThread::SendChatMessage(const std::string &msg) static_cast(chat.get())->SetData(chatData); // The sender is thread-safe, so just dump the packet. GetSender().Send(GetContext().GetSocket(), chat); - } catch (const NetException &e) + } catch (const NetException &) { } } diff --git a/src/net/common/serverrecvstate.cpp b/src/net/common/serverrecvstate.cpp index 19ddd602..3adcacf3 100644 --- a/src/net/common/serverrecvstate.cpp +++ b/src/net/common/serverrecvstate.cpp @@ -766,7 +766,7 @@ ServerRecvStateNextHand::SetTimer(const boost::microsec_timer &timer) } int -ServerRecvStateNextHand::Process(ServerRecvThread &server) +ServerRecvStateNextHand::InternalProcess(ServerRecvThread &server, SessionWrapper session, boost::shared_ptr packet) { if (m_delayTimer.elapsed().seconds() >= SERVER_NEXT_HAND_DELAY_SEC) server.SetState(ServerRecvStateStartHand::Instance()); diff --git a/src/net/serverrecvstate.h b/src/net/serverrecvstate.h index a7e70b20..8cd50359 100644 --- a/src/net/serverrecvstate.h +++ b/src/net/serverrecvstate.h @@ -181,8 +181,8 @@ protected: static void SetHighestSet(Game &curGame, int highestSet); }; -// State: Final. -class ServerRecvStateNextHand : public ServerRecvStateRunning +// State: Delay before next hand. +class ServerRecvStateNextHand : public ServerRecvStateReceiving, public ServerRecvStateRunning { public: // Access the state singleton. @@ -192,14 +192,13 @@ public: void SetTimer(const boost::microsec_timer &timer); - // - virtual int Process(ServerRecvThread &server); - protected: // Protected constructor - this is a singleton. ServerRecvStateNextHand(); + virtual int InternalProcess(ServerRecvThread &server, SessionWrapper session, boost::shared_ptr packet); + private: boost::microsec_timer m_delayTimer; diff --git a/src/sound/sdlplayer.cpp b/src/sound/sdlplayer.cpp index 0f81bb97..94017d2d 100644 --- a/src/sound/sdlplayer.cpp +++ b/src/sound/sdlplayer.cpp @@ -11,6 +11,8 @@ // #include "sdlplayer.h" +#include + using namespace std; SDLPlayer::SDLPlayer() @@ -48,7 +50,7 @@ void SDLPlayer::playSound(string audioString) { cout << "play now" << endl; /* Actually loads up the music */ - string completeAudioString = audioString + ".ogg"; + string completeAudioString = audioString + ".wav"; music = Mix_LoadMUS(completeAudioString.c_str()); /* This begins playing the music - the first argument is a diff --git a/src/sound/sdlplayer.h b/src/sound/sdlplayer.h index 5d0e2c08..4b01d4ae 100644 --- a/src/sound/sdlplayer.h +++ b/src/sound/sdlplayer.h @@ -12,20 +12,24 @@ #ifndef SDLPLAYER_H #define SDLPLAYER_H -#include -#include +#ifdef _WIN32 + #include + #include +#else + #include + #include +#endif -#include "SDL/SDL.h" -#include "SDL/SDL_mixer.h" +#include /** @author FThauer FHammer */ class SDLPlayer{ public: - SDLPlayer(); + SDLPlayer(); - ~SDLPlayer(); + ~SDLPlayer(); void initAudio(); void playSound(std::string); @@ -35,9 +39,9 @@ public: private: int audio_rate; - Uint16 audio_format; - int audio_channels; - int audio_buffers; + Uint16 audio_format; + int audio_channels; + int audio_buffers; Mix_Music *music; };