diff options
author | Eugenio Favalli <elvenprogrammer@gmail.com> | 2004-09-26 13:08:46 +0000 |
---|---|---|
committer | Eugenio Favalli <elvenprogrammer@gmail.com> | 2004-09-26 13:08:46 +0000 |
commit | 92bbeab96bf61edf9b7caa125ed67e634258383e (patch) | |
tree | a95dd426590c8e6208445290fa8b9b47c1a57bcb /src/net/win2mac.cpp | |
parent | e46b2cdbf205d3d2e17266e3168fdbecd5f53222 (diff) | |
download | mana-92bbeab96bf61edf9b7caa125ed67e634258383e.tar.gz mana-92bbeab96bf61edf9b7caa125ed67e634258383e.tar.bz2 mana-92bbeab96bf61edf9b7caa125ed67e634258383e.tar.xz mana-92bbeab96bf61edf9b7caa125ed67e634258383e.zip |
*** empty log message ***
Diffstat (limited to 'src/net/win2mac.cpp')
-rw-r--r-- | src/net/win2mac.cpp | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/net/win2mac.cpp b/src/net/win2mac.cpp new file mode 100644 index 00000000..be4bad1d --- /dev/null +++ b/src/net/win2mac.cpp @@ -0,0 +1,42 @@ +#include "win2mac.h" + + +void dummy() +{ + +printf("hej\n"); +} + +UInt32 DR_SwapFourBytes(UInt32 dw) +{ +UInt32 tmp; +tmp = (dw & 0x000000FF); +tmp = ((dw & 0x0000FF00) >> 0x08) | (tmp << 0x08); +tmp = ((dw & 0x00FF0000) >> 0x10) | (tmp << 0x08); +tmp = ((dw & 0xFF000000) >> 0x18) | (tmp << 0x08); +return (tmp); +} + +UInt16 DR_SwapTwoBytes(UInt16 w) +{ +UInt16 tmp; +tmp = (w & 0x00FF); +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; +} + +/* +char* SwapChar(char charlist[]) +{ +for(int i =0; i< sizeof(charlist)*4/2; i++) + SWAP(charlist[i],charlist[sizeof(charlist)*4-i]); +return charlist; +} +*/
\ No newline at end of file |