diff options
author | Eugenio Favalli <elvenprogrammer@gmail.com> | 2006-11-09 22:19:45 +0000 |
---|---|---|
committer | Eugenio Favalli <elvenprogrammer@gmail.com> | 2006-11-09 22:19:45 +0000 |
commit | 3eca8915fd14dcebe88647a198bfce5d789a6efb (patch) | |
tree | b0ae43817d759c1868eeb638907f4c0ee209effd | |
parent | aa1989471451e15321357f4422afb79c9a9bae20 (diff) | |
download | Mana-3eca8915fd14dcebe88647a198bfce5d789a6efb.tar.gz Mana-3eca8915fd14dcebe88647a198bfce5d789a6efb.tar.bz2 Mana-3eca8915fd14dcebe88647a198bfce5d789a6efb.tar.xz Mana-3eca8915fd14dcebe88647a198bfce5d789a6efb.zip |
Fixed a conflict with Windows headers and updated project files
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | The Mana World.dev | 22 | ||||
-rw-r--r-- | src/main.cpp | 2 | ||||
-rw-r--r-- | src/net/network.cpp | 24 | ||||
-rw-r--r-- | src/net/network.h | 3 | ||||
-rw-r--r-- | tmw.cbp | 10 |
6 files changed, 52 insertions, 15 deletions
@@ -1,3 +1,9 @@ +2006-11-09 Eugenio Favalli <elvenprogrammer@gmail.com> + + * src/main.cpp, src/net/network.cpp, src/net/network.h, + The Mana World.dev, tmw.cbp: Fixed a conflict with Windows headers and + updated project files. + 2006-11-05 Bjørn Lindeijer <bjorn@lindeijer.nl> * src/gui/trade.cpp: Fixed money field to no longer hide below the diff --git a/The Mana World.dev b/The Mana World.dev index 4c250deb..1d731b14 100644 --- a/The Mana World.dev +++ b/The Mana World.dev @@ -1,7 +1,7 @@ [Project] FileName=The Mana World.dev Name=tmw -UnitCount=237 +UnitCount=239 Type=0 Ver=1 ObjFiles= @@ -2427,3 +2427,23 @@ Priority=1000 OverrideBuildCmd=0 BuildCmd= +[Unit238] +FileName=src\gui\shoplistbox.cpp +CompileCpp=1 +Folder=tmw +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit239] +FileName=src\gui\shoplistbox.h +CompileCpp=1 +Folder=tmw +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + diff --git a/src/main.cpp b/src/main.cpp index 8cd993fb..0e0fad2f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -578,7 +578,7 @@ int main(int argc, char *argv[]) network->flush(); network->dispatchMessages(); - if (network->getState() == Network::ERROR) + if (network->getState() == Network::NET_ERROR) { state = ERROR_STATE; errorMessage = "Got disconnected from server!"; diff --git a/src/net/network.cpp b/src/net/network.cpp index a7ff6d1d..8da0033d 100644 --- a/src/net/network.cpp +++ b/src/net/network.cpp @@ -107,7 +107,7 @@ Network::~Network() { clearHandlers(); - if (mState != IDLE && mState != ERROR) + if (mState != IDLE && mState != NET_ERROR) disconnect(); SDL_DestroyMutex(mMutex); @@ -118,7 +118,7 @@ Network::~Network() bool Network::connect(const std::string &address, short port) { - if (mState != IDLE && mState != ERROR) + if (mState != IDLE && mState != NET_ERROR) { logger->log("Tried to connect an already connected socket!"); return false; @@ -127,7 +127,7 @@ bool Network::connect(const std::string &address, short port) if (address.empty()) { logger->log("Empty address given to Network::connect()!"); - mState = ERROR; + mState = NET_ERROR; return false; } @@ -146,7 +146,7 @@ bool Network::connect(const std::string &address, short port) if (!mWorkerThread) { logger->log("Unable to create network worker thread"); - mState = ERROR; + mState = NET_ERROR; return false; } @@ -233,7 +233,7 @@ void Network::flush() if (ret < (int)mOutSize) { logger->log("Error in SDLNet_TCP_Send(): %s", SDLNet_GetError()); - mState = ERROR; + mState = NET_ERROR; } mOutSize = 0; SDL_mutexV(mMutex); @@ -287,7 +287,7 @@ MessageIn Network::getNextMessage() { while (!messageReady()) { - if (mState == ERROR) + if (mState == NET_ERROR) break; } @@ -315,7 +315,7 @@ bool Network::realConnect() if (SDLNet_ResolveHost(&ipAddress, mAddress.c_str(), mPort) == -1) { logger->log("Error in SDLNet_ResolveHost(): %s", SDLNet_GetError()); - mState = ERROR; + mState = NET_ERROR; return false; } @@ -325,7 +325,7 @@ bool Network::realConnect() if (!mSocket) { logger->log("Error in SDLNet_TCP_Open(): %s", SDLNet_GetError()); - mState = ERROR; + mState = NET_ERROR; return false; } @@ -344,14 +344,14 @@ void Network::receive() if (!(set = SDLNet_AllocSocketSet(1))) { logger->log("Error in SDLNet_AllocSocketSet(): %s", SDLNet_GetError()); - mState = ERROR; + mState = NET_ERROR; return; } if (SDLNet_TCP_AddSocket(set, mSocket) == -1) { logger->log("Error in SDLNet_AddSocket(): %s", SDLNet_GetError()); - mState = ERROR; + mState = NET_ERROR; } while (mState == CONNECTED) @@ -382,7 +382,7 @@ void Network::receive() else if (ret < 0) { logger->log("Error in SDLNet_TCP_Recv(): %s", SDLNet_GetError()); - mState = ERROR; + mState = NET_ERROR; } else { mInSize += ret; @@ -408,7 +408,7 @@ void Network::receive() // more than one socket is ready.. // this should not happen since we only listen once socket. logger->log("Error in SDLNet_TCP_Recv(), %d sockets are ready : %s", numReady, SDLNet_GetError()); - mState = ERROR; + mState = NET_ERROR; break; } } diff --git a/src/net/network.h b/src/net/network.h index f4637f73..13929ec1 100644 --- a/src/net/network.h +++ b/src/net/network.h @@ -63,12 +63,13 @@ class Network void dispatchMessages(); void flush(); + // ERROR replaced by NET_ERROR because already defined in Windows enum { IDLE, CONNECTED, CONNECTING, DATA, - ERROR + NET_ERROR }; protected: @@ -659,6 +659,16 @@ <Option link="0"/> <Option target="default"/> </Unit> + <Unit filename="src\gui\shoplistbox.cpp"> + <Option compilerVar="CPP"/> + <Option target="default"/> + </Unit> + <Unit filename="src\gui\shoplistbox.h"> + <Option compilerVar=""/> + <Option compile="0"/> + <Option link="0"/> + <Option target="default"/> + </Unit> <Unit filename="src\gui\skill.cpp"> <Option compilerVar="CPP"/> <Option target="default"/> |