Skip to content
This repository has been archived by the owner on Dec 31, 2024. It is now read-only.

Commit

Permalink
Update to v2.8 (including D3D12 addon sample code)
Browse files Browse the repository at this point in the history
  • Loading branch information
dege-diosg committed Mar 15, 2023
1 parent ffda187 commit 3706948
Show file tree
Hide file tree
Showing 64 changed files with 3,531 additions and 208 deletions.
Binary file removed dgVoodooAPI/Bin/Release/dgVoodooAPI.dll
Binary file not shown.
Binary file removed dgVoodooAPI/Bin/Spec Release/dgVoodooAPI.dll
Binary file not shown.
Binary file added dgVoodooAPI/Bin/x64/Release/dgVoodooAPI.dll
Binary file not shown.
Binary file added dgVoodooAPI/Bin/x64/Spec Release/dgVoodooAPI.dll
Binary file not shown.
Binary file added dgVoodooAPI/Bin/x86/Release/dgVoodooAPI.dll
Binary file not shown.
Binary file added dgVoodooAPI/Bin/x86/Spec Release/dgVoodooAPI.dll
Binary file not shown.
Binary file modified dgVoodooAPI/Doc/dgVoodooAPI.chm
Binary file not shown.
56 changes: 56 additions & 0 deletions dgVoodooAPI/Inc/APIControl.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
// *****************************************************************************
// File: APIControl.hpp
//
// Description: Functions and structures for controlling dgVoodoo
//
// Contact person: DG
//
// *****************************************************************************

#ifndef APICONTROL_HPP
#define APICONTROL_HPP

// --- Includes ----------------------------------------------------------------

#include "APITypes.h"

// --- Defines -----------------------------------------------------------------

#define IMPORT /*_declspec(dllimport)*/ _stdcall

// --- Predeclarations ---------------------------------------------------------

namespace dgVoodoo {

// --- APIControl --------------------------------------------------------------

// --- Objects

struct APIControl
{
struct Debug
{
bool enableGlideVisualDebug;
bool enableDDrawVisualDebug;
bool enableD3DVisualDebug;
};

Debug debug;

void* internalHandle;
};

// --- Functions

typedef APIControl* (IMPORT *DGAPIGetAPIControlPtrType) ();
typedef bool (IMPORT *DGAPIReleaseAPIControlPtrType) (APIControl* pCtrl);

extern "C" {

APIControl* DGAPIGetAPIControlPtr ();
bool DGAPIReleaseAPIControlPtr (APIControl* pCtrl);
}

} // namespace dgVoodoo

#endif // !APICONTROL_HPP
File renamed without changes.
File renamed without changes.
55 changes: 55 additions & 0 deletions dgVoodooAPI/Inc/Addon/AddonDefs.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
// *****************************************************************************
// File: AddonDefs.hpp
//
// Description: Main dgVoodoo addon header
//
// Contact person: DG
//
// *****************************************************************************

#ifndef ADDONDEFS_HPP
#define ADDONDEFS_HPP

// --- Includes ----------------------------------------------------------------

#include <Windows.h>
#include "APITypes.h"

// --- Defines -----------------------------------------------------------------

#define DEFINE_ADDON_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
EXTERN_C const GUID FAR name

// --- Interface GUIDs

DEFINE_ADDON_GUID (IID_D3DObserver, 0x1ad8ea63, 0x72c4, 0x4219, 0xbf, 0xf3, 0x88, 0x87, 0x98, 0xc6, 0xb7, 0xc0);
DEFINE_ADDON_GUID (IID_D3DDeviceObserver, 0x80b505f3, 0x9b00, 0x428e, 0x92, 0x7, 0xcb, 0x60, 0x9, 0x58, 0xec, 0xe1);
DEFINE_ADDON_GUID (IID_D3DResourceObserver, 0xd5010988, 0x96b2, 0x4158, 0xa9, 0xd4, 0x9, 0x45, 0xaa, 0xaf, 0x24, 0xb3);

DEFINE_ADDON_GUID (IID_D3D12RootObserver, 0x68801515, 0xfec7, 0x43d2, 0xae, 0xc4, 0x21, 0xa8, 0xab, 0x9a, 0x6c, 0x62);

// --- Predeclarations ---------------------------------------------------------

// --- Addon interfaces

namespace dgVoodoo {

class IAddonMainCallback;

class ID3DObserver;
class ID3DDeviceObserver;
class ID3DResourceObserver;

class ID3D12RootObserver;

};

// --- TypeDefs ----------------------------------------------------------------

// --- Mandatory functions to be implemented in the addon

typedef bool API_EXPORT (*AddonInitType) (dgVoodoo::IAddonMainCallback* pAddonMain);
typedef void API_EXPORT (*AddonExitType) ();


#endif // ADDONDEFS_HPP
53 changes: 53 additions & 0 deletions dgVoodooAPI/Inc/Addon/IAddonMainCallback.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
// *****************************************************************************
// File: IAddonMain.hpp
//
// Description: Main callback interface for dgVoodoo add-ons
//
// Contact person: DG
//
// *****************************************************************************

#ifndef IADDONMAIN_HPP
#define IADDONMAIN_HPP

// --- Includes ----------------------------------------------------------------

#include <Windows.h>
#include "..\APIDebugObj.hpp"
#include "..\IIniParser.hpp"

namespace dgVoodoo {

// --- IAddonMain --------------------------------------------------------------

class IAddonMainCallback
{
public:
// --- Query

virtual UInt32 GetVersion () const = 0;

// --- Interface registering

virtual bool RegisterForCallback (REFIID iid, void* pCallbackObject) = 0;
virtual void UnregisterForCallback (REFIID iid, void* pCallbackObject) = 0;

// --- Factoring

virtual IIniParser* CreateIniParser (const APIDebugObj* pDebugObj = NULL) = 0;

virtual UInt32 RSSizeOfResource (HMODULE hModule, LPCTSTR name, LPCTSTR type) = 0;
virtual bool RSLoadResource (HMODULE hModule, LPCTSTR name, LPCTSTR type, BYTE* dst) = 0;
virtual const BYTE* RSLoadResource (HMODULE hModule, LPCTSTR name, LPCTSTR type) = 0;

// --- Debug

virtual void IssueInfo (const APIDebugObj* pDebugObj, const char* pInfoMessage, ...) = 0;
virtual void IssueWarning (const APIDebugObj* pDebugObj, const char* pWarningMessage, ...) = 0;
virtual void IssueError (const APIDebugObj* pDebugObj, const char* pErrorMessage, ...) = 0;
};


} // namespace dgVoodoo

#endif // !IADDONMAIN_HPP
37 changes: 37 additions & 0 deletions dgVoodooAPI/Inc/Addon/ID3D.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// *****************************************************************************
// File: ID3D.hpp
//
// Description: Interface for D3D objects
//
// Contact person: DG
//
// *****************************************************************************

#ifndef ID3D_HPP
#define ID3D_HPP

// --- Includes ----------------------------------------------------------------

#include "..\APITypes.h"

namespace dgVoodoo {

// --- ID3D --------------------------------------------------------------------

class ID3D
{
public:
enum ObjectType
{
OT_D3D = 0,
OT_D3D8,
OT_D3D9
};

virtual ObjectType GetObjectType () const = 0;
};


} // namespace dgVoodoo

#endif // !ID3D_HPP
Loading

0 comments on commit 3706948

Please sign in to comment.