diff options
author | Matheus Macabu <mkbu95@gmail.com> | 2013-05-19 19:38:50 -0300 |
---|---|---|
committer | Matheus Macabu <mkbu95@gmail.com> | 2013-05-19 19:38:54 -0300 |
commit | 2ff4db5f8a441f8c8b9f74dda010b605e6f50d67 (patch) | |
tree | 95b3a5f294c197b028989f1d09117e381940005c /src/common | |
parent | c7a830bce88df87d3a91d60e67fece1e49cfb18f (diff) | |
download | hercules-2ff4db5f8a441f8c8b9f74dda010b605e6f50d67.tar.gz hercules-2ff4db5f8a441f8c8b9f74dda010b605e6f50d67.tar.bz2 hercules-2ff4db5f8a441f8c8b9f74dda010b605e6f50d67.tar.xz hercules-2ff4db5f8a441f8c8b9f74dda010b605e6f50d67.zip |
Added new packets for 2013-05-15aRagexe (thanks to Shakto!).
Signed-off-by: Matheus Macabu <mkbu95@gmail.com>
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/cbasetypes.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/common/cbasetypes.h b/src/common/cbasetypes.h index 731a8b578..bfe8bf8f8 100644 --- a/src/common/cbasetypes.h +++ b/src/common/cbasetypes.h @@ -281,6 +281,24 @@ typedef char bool; //#define swap(a,b) ((a == b) || ((a ^= b), (b ^= a), (a ^= b))) // Avoid "value computed is not used" warning and generates the same assembly code #define swap(a,b) if (a != b) ((a ^= b), (b ^= a), (a ^= b)) +#if 0 //to be activated soon, more tests needed on how VS works with the macro above +#ifdef WIN32 +#undef swap +#define swap(a,b)__asm \ +{ \ + __asm mov eax, dword ptr [a] \ + __asm cmp eax, dword ptr [b] \ + __asm je _ret \ + __asm xor eax, dword ptr [b] \ + __asm mov dword ptr [a], eax \ + __asm xor eax, dword ptr [b] \ + __asm mov dword ptr [b], eax \ + __asm xor eax, dword ptr [a] \ + __asm mov dword ptr [a], eax \ + __asm _ret: \ +} +#endif +#endif #ifndef max #define max(a,b) (((a) > (b)) ? (a) : (b)) |