in the middle of something..
This commit is contained in:
parent
e41242c1f2
commit
607fc31812
|
@ -54,6 +54,9 @@ typedef signed char sint08;
|
|||
typedef signed short sint16;
|
||||
typedef signed long sint32;
|
||||
|
||||
// define this to track vertex buffers for debugging purposes
|
||||
#define _DEBUG_TRACK_VB
|
||||
|
||||
// define this to trace intercepted function calls
|
||||
#define _DEBUG_TRACE
|
||||
|
||||
|
|
|
@ -34,6 +34,40 @@
|
|||
#ifndef VERTEXBUFFER_H
|
||||
#define VERTEXBUFFER_H
|
||||
|
||||
#include "Cxbx.h"
|
||||
|
||||
#ifdef _DEBUG_TRACK_VB
|
||||
|
||||
struct VBNode
|
||||
{
|
||||
XTL::IDirect3DVertexBuffer8 *vb;
|
||||
VBNode *next;
|
||||
};
|
||||
|
||||
extern class VBTracker
|
||||
{
|
||||
public:
|
||||
VBTracker() : m_head(0), m_tail(0) {}
|
||||
~VBTracker();
|
||||
|
||||
// insert a ptr
|
||||
void insert(XTL::IDirect3DVertexBuffer8 *pVB);
|
||||
|
||||
// remove a ptr
|
||||
void remove(XTL::IDirect3DVertexBuffer8 *pVB);
|
||||
|
||||
// check for existance of ptr
|
||||
bool exists(XTL::IDirect3DVertexBuffer8 *pVB);
|
||||
|
||||
private:
|
||||
// list of "live" vertex buffers for debugging purposes
|
||||
VBNode *m_head;
|
||||
VBNode *m_tail;
|
||||
}
|
||||
g_VBTrackTotal, g_VBTrackDisable;
|
||||
|
||||
#endif
|
||||
|
||||
// fixup xbox extensions to be compatible with PC direct3d
|
||||
extern UINT EmuFixupVerticesA
|
||||
(
|
||||
|
|
|
@ -45,6 +45,52 @@ namespace XTL
|
|||
|
||||
extern XTL::LPDIRECT3DDEVICE8 g_pD3DDevice8; // Direct3D8 Device
|
||||
|
||||
#ifdef _DEBUG_TRACK_VB
|
||||
|
||||
extern XTL::VBTracker g_VBTrack;
|
||||
|
||||
XTL::VBTracker::~VBTracker()
|
||||
{
|
||||
VBNode *cur = m_head;
|
||||
|
||||
while(cur != NULL)
|
||||
{
|
||||
free(cur);
|
||||
|
||||
cur = cur->next;
|
||||
}
|
||||
}
|
||||
|
||||
void XTL::VBTracker::insert(IDirect3DVertexBuffer8 *pVB)
|
||||
{
|
||||
if(m_head == 0)
|
||||
{
|
||||
m_tail = m_head = new VBNode();
|
||||
m_tail->vb = 0;
|
||||
m_tail->next = 0;
|
||||
}
|
||||
|
||||
m_tail->vb = pVB;
|
||||
|
||||
m_tail->next = new VBNode();
|
||||
m_tail->next->vb = 0;
|
||||
m_tail->next->next = 0;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void XTL::VBTracker::remove(IDirect3DVertexBuffer8 *pVB)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
bool XTL::VBTracker::exists(IDirect3DVertexBuffer8 *pVB)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
#endif // _DEBUG_TRACK_VB
|
||||
|
||||
// fixup xbox extensions to be compatible with PC direct3d
|
||||
UINT XTL::EmuFixupVerticesA
|
||||
(
|
||||
|
|
Loading…
Reference in New Issue