mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 13:44:56 +00:00
Windows build fixes and warning avoidance
This commit is contained in:
@@ -65,7 +65,7 @@ enum {
|
||||
#endif
|
||||
};
|
||||
|
||||
static void nesEmuFdsSetup(uint8_t *src, uint8_t *dst);
|
||||
//static void nesEmuFdsSetup(uint8_t *src, uint8_t *dst);
|
||||
|
||||
static int emuFileType = FTYPE_UNK;
|
||||
static char emuFileName[1024];
|
||||
@@ -82,11 +82,11 @@ bool doOverscan = false;
|
||||
bool nesPAL = false;
|
||||
bool nesEmuNSFPlayback = false;
|
||||
|
||||
static bool inPause = false;
|
||||
static bool inOverscanToggle = false;
|
||||
static bool inResize = false;
|
||||
static bool inDiskSwitch = false;
|
||||
static bool inReset = false;
|
||||
//static bool inPause = false;
|
||||
//static bool inOverscanToggle = false;
|
||||
//static bool inResize = false;
|
||||
//static bool inDiskSwitch = false;
|
||||
//static bool inReset = false;
|
||||
|
||||
#if DEBUG_HZ
|
||||
static int emuFrameStart = 0;
|
||||
@@ -107,7 +107,7 @@ static int emuMainTotalElapsed = 0;
|
||||
|
||||
static uint32_t linesToDraw = VISIBLE_LINES;
|
||||
static const uint32_t visibleImg = VISIBLE_DOTS*VISIBLE_LINES*4;
|
||||
static uint8_t scaleFactor = 2;
|
||||
//static uint8_t scaleFactor = 2;
|
||||
static bool emuSaveEnabled = false;
|
||||
static bool emuFdsHasSideB = false;
|
||||
static uint32_t mainLoopRuns;
|
||||
@@ -252,7 +252,7 @@ void CNESEmulator::InitializeEmulator()
|
||||
//mainLoopRuns *= ppuLinesTotal;
|
||||
mainLoopPos = mainLoopRuns;
|
||||
|
||||
CGraphicsCommitResources([this](boo::IGraphicsDataFactory::Context& ctx)
|
||||
CGraphics::CommitResources([this](boo::IGraphicsDataFactory::Context& ctx)
|
||||
{
|
||||
// Nearest-neighbor FTW!
|
||||
m_texture = ctx.newDynamicTexture(VISIBLE_DOTS, linesToDraw,
|
||||
@@ -269,7 +269,7 @@ void CNESEmulator::InitializeEmulator()
|
||||
m_uniBuf = ctx.newDynamicBuffer(boo::BufferUse::Uniform, sizeof(Uniform), 1);
|
||||
m_shadBind = CNESShader::BuildShaderDataBinding(ctx, m_vbo, m_uniBuf, m_texture);
|
||||
return true;
|
||||
});
|
||||
} BooTrace);
|
||||
|
||||
//double useFreq = 223740;
|
||||
double useFreq = apuGetFrequency();
|
||||
@@ -547,6 +547,7 @@ void CNESEmulator::NesEmuMainLoop(bool forceDraw)
|
||||
#endif
|
||||
}
|
||||
|
||||
#if 0
|
||||
static void nesEmuFdsSetup(uint8_t *src, uint8_t *dst)
|
||||
{
|
||||
memcpy(dst, src, 0x38);
|
||||
@@ -567,6 +568,7 @@ static void nesEmuFdsSetup(uint8_t *src, uint8_t *dst)
|
||||
} while(cROMPos < 0xFFDC && cDiskPos < 0xFFFF);
|
||||
printf("%04x -> %04x\n", cROMPos, cDiskPos);
|
||||
}
|
||||
#endif
|
||||
|
||||
void CNESEmulator::DecompressROM(u8* dataIn, u8* dataOut, u32 dataOutLen, u8 descrambleSeed,
|
||||
u32 checkDataLen, u32 checksumMagic)
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace MP1
|
||||
|
||||
#define NUM_AUDIO_BUFFERS 10
|
||||
|
||||
class CNESEmulator : public boo::IAudioVoiceCallback
|
||||
class CNESEmulator final : public boo::IAudioVoiceCallback
|
||||
{
|
||||
public:
|
||||
enum class EPasswordEntryState
|
||||
|
||||
@@ -179,7 +179,7 @@ boo::ObjToken<boo::IShaderDataBinding> CNESShader::BuildShaderDataBinding(boo::G
|
||||
#endif
|
||||
|
||||
#if _WIN32
|
||||
void CNESShader::Initialize(boo::ID3DDataFactory::Context& ctx)
|
||||
void CNESShader::Initialize(boo::D3DDataFactory::Context& ctx)
|
||||
{
|
||||
const boo::VertexElementDescriptor VtxVmt[] =
|
||||
{
|
||||
@@ -193,7 +193,7 @@ void CNESShader::Initialize(boo::ID3DDataFactory::Context& ctx)
|
||||
boo::ZTest::None, false, true, false, boo::CullMode::None);
|
||||
}
|
||||
|
||||
boo::ObjToken<boo::IShaderDataBinding> CNESShader::BuildShaderDataBinding(boo::ID3DDataFactory::Context& ctx,
|
||||
boo::ObjToken<boo::IShaderDataBinding> CNESShader::BuildShaderDataBinding(boo::D3DDataFactory::Context& ctx,
|
||||
boo::ObjToken<boo::IGraphicsBufferS> vbo,
|
||||
boo::ObjToken<boo::IGraphicsBufferD> uniBuf,
|
||||
boo::ObjToken<boo::ITextureD> tex)
|
||||
@@ -274,8 +274,7 @@ boo::ObjToken<boo::IShaderDataBinding> CNESShader::BuildShaderDataBinding(boo::I
|
||||
#endif
|
||||
#if _WIN32
|
||||
case boo::IGraphicsDataFactory::Platform::D3D11:
|
||||
case boo::IGraphicsDataFactory::Platform::D3D12:
|
||||
return BuildShaderDataBinding(static_cast<boo::ID3DDataFactory::Context&>(ctx), vbo, uniBuf, tex);
|
||||
return BuildShaderDataBinding(static_cast<boo::D3DDataFactory::Context&>(ctx), vbo, uniBuf, tex);
|
||||
#endif
|
||||
#if BOO_HAS_METAL
|
||||
case boo::IGraphicsDataFactory::Platform::Metal:
|
||||
@@ -295,7 +294,7 @@ void CNESShader::Initialize()
|
||||
if (!CGraphics::g_BooFactory)
|
||||
return;
|
||||
|
||||
CGraphicsCommitResources(
|
||||
CGraphics::CommitResources(
|
||||
[&](boo::IGraphicsDataFactory::Context& ctx)
|
||||
{
|
||||
switch (ctx.platform())
|
||||
@@ -307,8 +306,7 @@ void CNESShader::Initialize()
|
||||
#endif
|
||||
#if _WIN32
|
||||
case boo::IGraphicsDataFactory::Platform::D3D11:
|
||||
case boo::IGraphicsDataFactory::Platform::D3D12:
|
||||
Initialize(static_cast<boo::ID3DDataFactory::Context&>(ctx));
|
||||
Initialize(static_cast<boo::D3DDataFactory::Context&>(ctx));
|
||||
break;
|
||||
#endif
|
||||
#if BOO_HAS_METAL
|
||||
@@ -324,7 +322,7 @@ void CNESShader::Initialize()
|
||||
default: break;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
} BooTrace);
|
||||
}
|
||||
|
||||
void CNESShader::Shutdown()
|
||||
|
||||
@@ -20,8 +20,8 @@ public:
|
||||
boo::ObjToken<boo::ITextureD> tex);
|
||||
#endif
|
||||
#if _WIN32
|
||||
static void Initialize(boo::ID3DDataFactory::Context& ctx);
|
||||
static boo::ObjToken<boo::IShaderDataBinding> BuildShaderDataBinding(boo::ID3DDataFactory::Context& ctx,
|
||||
static void Initialize(boo::D3DDataFactory::Context& ctx);
|
||||
static boo::ObjToken<boo::IShaderDataBinding> BuildShaderDataBinding(boo::D3DDataFactory::Context& ctx,
|
||||
boo::ObjToken<boo::IGraphicsBufferS> vbo,
|
||||
boo::ObjToken<boo::IGraphicsBufferD> uniBuf,
|
||||
boo::ObjToken<boo::ITextureD> tex);
|
||||
|
||||
Reference in New Issue
Block a user