dolphin/Source/Plugins/Plugin_VideoDX9/Src/DLCompiler.h
Soren Jorvang 30e437f9e3 Fix some cases of variables being used uninitialized. Also some unused
variables, writeable strings and dangerously shadowed variables.

index(), gamma(), exp() and y0() are POSIX functions and using those
names can cause namespace confusion.

A number of C files were missing the final newline required by ANSI C
and some versions of GCC are pedantic enough to complain about this.

These changes simply the scons build, allowing us to get rid of
filterWarnings which is simply more trouble than it's worth.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5574 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-02 20:35:12 +00:00

72 lines
973 B
C++

#pragma once
#if 0
#include "D3DBase.h"
#include "DecodedVArray.h"
#include <map>
class CompiledDList
{
u32 *data;
int dataSize;
int pass;
int codeSize;
u8 *code;
struct Batch
{
DecodedVArray varray;
LPDIRECT3DINDEXBUFFER9 ibuffer;
int numDraws;
};
Batch *batches;
int numBatches;
u32 addr, size;
bool Compile();
bool Pass1();
void Pass2();
void Run();
public:
CompiledDList(u32 _addr, u32 _size);
~CompiledDList();
bool Call();
static void DrawHelperHelper(CompiledDList *dl, int vno, int prim);
};
class DListCache
{
struct DLCacheEntry
{
CompiledDList *dlist;
int frameCount;
int pass;
u32 size;
DLCacheEntry()
{
pass=0;
dlist=0;
frameCount=0;
}
void Destroy()
{
if (dlist)
delete dlist;
}
};
typedef std::map<DWORD,DLCacheEntry> DLCache;
static DLCache dlists;
public:
static void Init();
static void Cleanup();
static void Shutdown();
static void Call(u32 _addr, u32 _size);
};
#endif