Remove unused EmuPatch field of the OOVPA

This commit is contained in:
Luke Usher 2017-04-28 22:41:18 +01:00
parent 7b60aa1020
commit 5169141d4d
1 changed files with 6 additions and 24 deletions

View File

@ -36,23 +36,6 @@
#include "Cxbx.h"
// ******************************************************************
// * Take THIS C++ !!
// ******************************************************************
template <class BaseClass, typename MFT> inline void *MFPtoFP(MFT pMemFunc)
{
union
{
MFT pMemFunc;
void(*pFunc)();
}
ThisConv;
ThisConv.pMemFunc = pMemFunc;
return ThisConv.pFunc;
}
#pragma pack(1)
// ******************************************************************
@ -150,7 +133,6 @@ OOVPA_XREF(Name, Version, Count, XRefNoSaveIndex, XRefZero)
struct OOVPATable
{
OOVPA *Oovpa;
void *emuPatch;
char *szFuncName;
uint16_t Version : 13; // 2^13 = 8192, enough to store lowest and higest possible Library Version number in
uint16_t Flags : 3;
@ -160,8 +142,8 @@ const uint16_t Flag_DontScan = 1; // Indicates an entry that's currently disable
const uint16_t Flag_XRef = 2; // Indicates that an entry is an X-Ref
const uint16_t Flag_Reserved = 4;
#define OOVPA_TABLE_ENTRY_FULL(Oovpa, Patch, DebugName, Version, Flags) \
{ & Oovpa ## _ ## Version.Header, Patch, DebugName, Version, Flags }
#define OOVPA_TABLE_ENTRY_FULL(Oovpa, DebugName, Version, Flags) \
{ & Oovpa ## _ ## Version.Header, DebugName, Version, Flags }
// REGISTER_OOVPA is the ONLY allowed macro for registrations.
// Registrations MUST stay sorted to prevent duplicates and maintain overview.
@ -174,19 +156,19 @@ const uint16_t Flag_Reserved = 4;
#define PATCH /* most common registration, Symbol indicates both an OOVPA and Patch */
#define REGISTER_OOVPA_PATCH(Symbol, Version, ...) \
OOVPA_TABLE_ENTRY_FULL(Symbol, XTL::EMUPATCH(Symbol), #Symbol ##, Version, 0)
OOVPA_TABLE_ENTRY_FULL(Symbol, #Symbol ##, Version, 0)
#define XREF /* registration of an XRef-only OOVPA, for which no Patch is present */
#define REGISTER_OOVPA_XREF(Symbol, Version, ...) \
OOVPA_TABLE_ENTRY_FULL(Symbol, nullptr, #Symbol ##, Version, Flag_XRef)
OOVPA_TABLE_ENTRY_FULL(Symbol, #Symbol ##, Version, Flag_XRef)
#define ALIAS /* registration of a Patch using an alternatively named OOVPA */
#define REGISTER_OOVPA_ALIAS(Symbol, Version, AliasOovpa) \
OOVPA_TABLE_ENTRY_FULL(AliasOovpa, XTL::EMUPATCH(Symbol), #Symbol ##, Version, 0)
OOVPA_TABLE_ENTRY_FULL(AliasOovpa, #Symbol ##, Version, 0)
#define DISABLED /* registration is (temporarily) disabled by a flag */
#define REGISTER_OOVPA_DISABLED(Symbol, Version, ...) \
OOVPA_TABLE_ENTRY_FULL(Symbol, nullptr, #Symbol ##, Version, Flag_DontScan)
OOVPA_TABLE_ENTRY_FULL(Symbol, #Symbol ##, Version, Flag_DontScan)
#pragma pack()