- Added support for the 3D plug-in system, with a Null driver and an openGL one
This commit is contained in:
parent
a49fd6bc00
commit
0ba79ff378
|
@ -47,6 +47,7 @@
|
||||||
#include "oamView.h"
|
#include "oamView.h"
|
||||||
#include "mapview.h"
|
#include "mapview.h"
|
||||||
#include "ConfigKeys.h"
|
#include "ConfigKeys.h"
|
||||||
|
#include "OGLRender.h"
|
||||||
|
|
||||||
#include "snddx.h"
|
#include "snddx.h"
|
||||||
|
|
||||||
|
@ -101,6 +102,11 @@ SoundInterface_struct *SNDCoreList[] = {
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
GPU3DInterface *core3DList[] = {
|
||||||
|
&gpu3DNull,
|
||||||
|
&gpu3Dgl,
|
||||||
|
};
|
||||||
|
|
||||||
int autoframeskipenab=1;
|
int autoframeskipenab=1;
|
||||||
int frameskiprate=0;
|
int frameskiprate=0;
|
||||||
static int backupmemorytype=MC_TYPE_AUTODETECT;
|
static int backupmemorytype=MC_TYPE_AUTODETECT;
|
||||||
|
@ -278,9 +284,14 @@ DWORD WINAPI run( LPVOID lpParameter)
|
||||||
rotationbmi.bV4Width = 256;
|
rotationbmi.bV4Width = 256;
|
||||||
rotationbmi.bV4Height = -192;
|
rotationbmi.bV4Height = -192;
|
||||||
|
|
||||||
#ifdef RENDER3D
|
NDS_3D_SetDriver (GPU3D_OPENGL);
|
||||||
OGLRender::init(&hdc);
|
|
||||||
#endif
|
if (!gpu3D->NDS_3D_Init ())
|
||||||
|
{
|
||||||
|
MessageBox(hwnd,"Unable to initialize openGL","Error",MB_OK);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
QueryPerformanceFrequency((LARGE_INTEGER *)&freq);
|
QueryPerformanceFrequency((LARGE_INTEGER *)&freq);
|
||||||
QueryPerformanceCounter((LARGE_INTEGER *)&lastticks);
|
QueryPerformanceCounter((LARGE_INTEGER *)&lastticks);
|
||||||
OneFrameTime = freq / 60;
|
OneFrameTime = freq / 60;
|
||||||
|
@ -495,7 +506,7 @@ int WINAPI WinMain (HINSTANCE hThisInstance,
|
||||||
return messages.wParam;
|
return messages.wParam;
|
||||||
}
|
}
|
||||||
|
|
||||||
sndvolume = GetPrivateProfileInt("Sound","Volume",100, IniName);
|
sndvolume = GetPrivateProfileInt("Sound","Volume",100, IniName);
|
||||||
SPU_SetVolume(sndvolume);
|
SPU_SetVolume(sndvolume);
|
||||||
|
|
||||||
runthread = CreateThread(NULL, 0, run, NULL, 0, &threadID);
|
runthread = CreateThread(NULL, 0, run, NULL, 0, &threadID);
|
||||||
|
|
Loading…
Reference in New Issue