Compare commits

..

10 commits

Author SHA1 Message Date
Echo J
a48e81a296 SilentPatchVC: Add GCC/Clang-specific inline assembly statements
This also includes a small wrapper to call a C++ function from inline ASM

(From III: This change also matches the MSVC statements more closely to
the GCC/Clang ones)
2024-11-11 12:15:16 +02:00
Echo J
b742b73ad4 SilentPatchIII: Add GCC/Clang-specific inline assembly statements
This also matches the MSVC statements more closely to the GCC/Clang
ones
2024-11-11 11:48:08 +02:00
Echo J
9ab93cd79e SilentPatchIII: Add a missing functional header include
MinGW GCC doesn't implicitly include it either
2024-11-10 10:01:32 +02:00
Echo J
0d1694aeee SilentPatch: Add missing cmath header include
It's required for the modf() function (and it isn't implicitly
included on MinGW GCC)
2024-11-10 10:01:32 +02:00
Echo J
8ed97f0e7f SilentPatch: Move a header include in SVF
This makes sure the fixed-width integer types are included in SVF.h
2024-11-10 10:01:32 +02:00
Echo J
055a319374 SilentPatch: Define a replacement for _stricmp() if needed
MinGW GCC doesn't have this MSVC-specific function
2024-11-10 10:01:32 +02:00
Echo J
5459cbf037 SilentPatch: Simplify RwIm2DRenderLine function pointer declaration
MinGW GCC doesn't seem to unwind the layers of the macro define
properly (which causes it to not find the declaration type)
2024-11-10 10:01:32 +02:00
Echo J
a3f946b30f SilentPatch: Don't define certain Rw* functions if not needed
Redefining them can cause strange compile errors with MinGW GCC
2024-11-10 10:01:32 +02:00
Echo J
0c377ae10e DDraw: Cast the memcpy() source argument
This works around the MinGW GCC type strictness
2024-11-10 10:01:32 +02:00
Echo J
47ac4d7f2d DDraw: Change the forwarded name for DirectDrawCreateEx
MinGW GCC exports this function a bit differently (which doesn't
work here)
2024-11-10 10:01:32 +02:00
7 changed files with 12 additions and 10 deletions

View file

@ -1,3 +1,3 @@
LIBRARY DDRAW
EXPORTS
DirectDrawCreateEx = DirectDrawCreateEx@16
DirectDrawCreateEx=DirectDrawCreateEx@16 @10

View file

@ -83,6 +83,7 @@
<AdditionalOptions>/Zc:threadSafeInit- /Zc:strictStrings %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<ModuleDefinitionFile>ddraw.def</ModuleDefinitionFile>
<SubSystem>Windows</SubSystem>
<DelayLoadDLLs>shell32.dll;shlwapi.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
<LargeAddressAware>true</LargeAddressAware>
@ -112,6 +113,7 @@
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<ModuleDefinitionFile>ddraw.def</ModuleDefinitionFile>
<SubSystem>Windows</SubSystem>
<DelayLoadDLLs>shell32.dll;shlwapi.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
<LargeAddressAware>true</LargeAddressAware>
@ -141,6 +143,7 @@
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<ModuleDefinitionFile>ddraw.def</ModuleDefinitionFile>
<SubSystem>Windows</SubSystem>
<DelayLoadDLLs>shell32.dll;shlwapi.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
<LargeAddressAware>true</LargeAddressAware>
@ -169,4 +172,4 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
</Project>

View file

@ -14,7 +14,6 @@
#include "Desktop.h"
#pragma comment(lib, "shlwapi.lib")
#pragma comment(linker, "/EXPORT:DirectDrawCreateEx=_DirectDrawCreateEx@16")
extern "C" HRESULT WINAPI DirectDrawCreateEx(GUID FAR *lpGUID, LPVOID *lplpDD, REFIID iid, IUnknown FAR *pUnkOuter)
{

View file

@ -9,6 +9,10 @@
#define STATIC_INLINE static inline
#endif
#define RwEngineInstance (*rwengine)
extern "C" void** rwengine;
namespace ExtraCompSpecularity
{
void ReadExtraCompSpecularityExceptions(const wchar_t* pPath);

View file

@ -3,10 +3,6 @@
#include <rwcore.h>
#include <rpworld.h>
#define RwEngineInstance (*rwengine)
extern void** rwengine;
template<RwRenderState State>
class RwScopedRenderState
{
@ -72,4 +68,4 @@ Pred RpGeometryForAllMaterials(RpGeometry* geometry, Pred callback)
break;
}
return callback;
}
}

View file

@ -3,7 +3,7 @@
#include <algorithm>
#include <map>
#ifndef _MSC_VER
#ifndef _stricmp
#include <cstring>
#define _stricmp strcasecmp
#endif

View file

@ -978,7 +978,7 @@ namespace GenerateNewPickup_ReuseObjectFix
mov edi, eax
push edi
call WorldRemove
call offset WorldRemove
add esp, 4
// Call dtor