summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
Diffstat (limited to 'src/net')
-rw-r--r--src/net/messagein.cpp2
-rw-r--r--src/net/messageout.cpp6
-rw-r--r--src/net/win2mac.cpp12
-rw-r--r--src/net/win2mac.h1
4 files changed, 4 insertions, 17 deletions
diff --git a/src/net/messagein.cpp b/src/net/messagein.cpp
index 9ea6f12e..c599a453 100644
--- a/src/net/messagein.cpp
+++ b/src/net/messagein.cpp
@@ -24,7 +24,7 @@
#include "messagein.h"
#include <cassert>
-#include <SDL_net.h>
+#include <SDL.h>
#if SDL_BYTEORDER == SDL_BIG_ENDIAN
#include "win2mac.h"
#endif
diff --git a/src/net/messageout.cpp b/src/net/messageout.cpp
index e7928a4d..77819b63 100644
--- a/src/net/messageout.cpp
+++ b/src/net/messageout.cpp
@@ -24,8 +24,10 @@
#include "messageout.h"
#include <string>
-#include <SDL_net.h>
+#include <SDL.h>
+#if SDL_BYTEORDER == SDL_BIG_ENDIAN
#include "win2mac.h"
+#endif
#include "network.h"
#include "packet.h"
@@ -73,7 +75,6 @@ void MessageOut::writeShort(short value)
#else
(*(short *)(mData + mPos)) = value;
#endif
- //SDLNet_Write16(value, &mData[mPos]);
mPos += sizeof(short);
out_size += sizeof(short);
}
@@ -86,7 +87,6 @@ void MessageOut::writeLong(long value)
#else
(*(long *)(mData + mPos)) = value;
#endif
- //SDLNet_Write32(value, &mData[mPos]);
mPos += sizeof(long);
out_size += sizeof(long);
}
diff --git a/src/net/win2mac.cpp b/src/net/win2mac.cpp
index d6da2cf2..020b808b 100644
--- a/src/net/win2mac.cpp
+++ b/src/net/win2mac.cpp
@@ -1,7 +1,5 @@
#include "win2mac.h"
-#define SWAP( a, b ) { char c; c=a; a=b; b=c; }
-
UInt32 DR_SwapFourBytes(UInt32 dw)
{
UInt32 tmp;
@@ -19,13 +17,3 @@ UInt16 DR_SwapTwoBytes(UInt16 w)
tmp = ((w & 0xFF00) >> 0x08) | (tmp << 0x08);
return(tmp);
}
-
-char* SwapChar(char charlist[])
-{
- for (int i = 0; i < 24 / 2; i++)
- {
- SWAP(charlist[i], charlist[24 - i]);
- }
-
- return charlist;
-}
diff --git a/src/net/win2mac.h b/src/net/win2mac.h
index 29102fae..d0a99dad 100644
--- a/src/net/win2mac.h
+++ b/src/net/win2mac.h
@@ -8,6 +8,5 @@
UInt32 DR_SwapFourBytes(UInt32 dw);
UInt16 DR_SwapTwoBytes(UInt16 w);
-char* SwapChar(char charlist[]);
#endif