diff --git a/Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Addr.cpp b/Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Addr.cpp index 4e7c8545..b043a71f 100644 --- a/Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Addr.cpp +++ b/Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Addr.cpp @@ -45,8 +45,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com * ***/ -#include "../../Pch.h" -#pragma hdrstop +#include "../pnUtils.h" /***************************************************************************** diff --git a/Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Dll.cpp b/Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Dll.cpp index ff2a53d5..9c32e117 100644 --- a/Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Dll.cpp +++ b/Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Dll.cpp @@ -45,8 +45,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com * ***/ -#include "../../Pch.h" -#pragma hdrstop +#include "../pnUtils.h" /***************************************************************************** diff --git a/Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Misc.cpp b/Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Misc.cpp index 841fc7cf..8da3adb0 100644 --- a/Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Misc.cpp +++ b/Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Misc.cpp @@ -45,8 +45,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com * ***/ -#include "../../Pch.h" -#pragma hdrstop +#include "../pnUtils.h" /***************************************************************************** * diff --git a/Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Path.cpp b/Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Path.cpp index b81d199c..ccc846a6 100644 --- a/Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Path.cpp +++ b/Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Path.cpp @@ -45,8 +45,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com * ***/ -#include "../../Pch.h" -#pragma hdrstop +#include "../pnUtils.h" +#include "pnProduct/pnProduct.h" /***************************************************************************** diff --git a/Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Str.cpp b/Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Str.cpp index b7fc3b76..42edb140 100644 --- a/Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Str.cpp +++ b/Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Str.cpp @@ -45,8 +45,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com * ***/ -#include "../../Pch.h" -#pragma hdrstop +#include "../pnUtils.h" /***************************************************************************** diff --git a/Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Sync.cpp b/Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Sync.cpp index 17c96136..e5100e52 100644 --- a/Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Sync.cpp +++ b/Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Sync.cpp @@ -45,8 +45,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com * ***/ -#include "../../Pch.h" -#pragma hdrstop +#include "../pnUtils.h" /**************************************************************************** diff --git a/Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Time.cpp b/Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Time.cpp index cd4eea61..6f344434 100644 --- a/Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Time.cpp +++ b/Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Time.cpp @@ -45,8 +45,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com * ***/ -#include "../../Pch.h" -#pragma hdrstop +#include "../pnUtils.h" /***************************************************************************** diff --git a/Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Uuid.cpp b/Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Uuid.cpp index c5a734b0..6c0b1c38 100644 --- a/Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Uuid.cpp +++ b/Sources/Plasma/NucleusLib/pnUtils/Win32/pnUtW32Uuid.cpp @@ -45,8 +45,9 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com * ***/ -#include "../../Pch.h" -#pragma hdrstop +#include "../pnUtils.h" +#include +#include #if 0 @@ -162,12 +163,12 @@ bool GuidIsNil (const Uuid & uuid) { const wchar_t * GuidToString (const Uuid & uuid, wchar_t * dst, unsigned chars) { wchar_t * src; RPC_STATUS s; - s = UuidToStringW( (GUID *) &uuid, (RPC_WSTR*)&src ); + s = UuidToStringW( (GUID *) &uuid, (unsigned short**)&src ); if (RPC_S_OK == s) StrCopy(dst, src, chars); else StrCopy(dst, L"", chars); - RpcStringFreeW( (RPC_WSTR *)&src ); + RpcStringFreeW( (unsigned short**)&src ); return dst; } diff --git a/Sources/Plasma/NucleusLib/pnUtils/pnUtMath.cpp b/Sources/Plasma/NucleusLib/pnUtils/pnUtMath.cpp index 9d240519..431ea740 100644 --- a/Sources/Plasma/NucleusLib/pnUtils/pnUtMath.cpp +++ b/Sources/Plasma/NucleusLib/pnUtils/pnUtMath.cpp @@ -55,42 +55,9 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com ***/ //=========================================================================== -#ifndef _M_IX86 unsigned MathHighBitPos (uint32_t val) { ASSERT(val); double f = (double)val; return (*((uint32_t *)&f + 1) >> 20) - 1023; } - -#else - -__declspec(naked) unsigned __fastcall MathHighBitPos (uint32_t) { - __asm { - bsr eax, ecx - ret 0 - }; -} - -#endif - -//=========================================================================== -#ifndef _M_IX86 - -unsigned MathLowBitPos (uint32_t val) { - val &= ~(val - 1); // clear all but the low bit - ASSERT(val); - double f = (double)val; - return (*((uint32_t *)&f + 1) >> 20) - 1023; -} - -#else - -__declspec(naked) unsigned __fastcall MathLowBitPos (uint32_t) { - __asm { - bsf eax, ecx - ret 0 - }; -} - -#endif diff --git a/Sources/Plasma/NucleusLib/pnUtils/pnUtMath.h b/Sources/Plasma/NucleusLib/pnUtils/pnUtMath.h index ae1e67b2..7080bb83 100644 --- a/Sources/Plasma/NucleusLib/pnUtils/pnUtMath.h +++ b/Sources/Plasma/NucleusLib/pnUtils/pnUtMath.h @@ -50,27 +50,13 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #include "Pch.h" -/***************************************************************************** -* -* Calling conventions -* -***/ - -#ifdef _M_IX86 -#define MATHCALL __fastcall -#else -#define MATHCALL -#endif - - /***************************************************************************** * * Bit manipulation functions * ***/ -unsigned MATHCALL MathLowBitPos (uint32_t val); -unsigned MATHCALL MathHighBitPos (uint32_t val); +unsigned MathHighBitPos (uint32_t val); //=========================================================================== inline unsigned MathBitCount (uint32_t val) { diff --git a/Sources/Plasma/NucleusLib/pnUtilsExe/Pch.h b/Sources/Plasma/NucleusLib/pnUtilsExe/Pch.h index aceee762..32908b69 100644 --- a/Sources/Plasma/NucleusLib/pnUtilsExe/Pch.h +++ b/Sources/Plasma/NucleusLib/pnUtilsExe/Pch.h @@ -51,7 +51,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #define PLASMA20_SOURCES_PLASMA_NUCLEUSLIB_PNUTILSEXE_PCH_H -#include "pnUtils/Pch.h" +#include "pnUtils/pnUtils.h" #include "Intern.h" #include