- Added support for the 3D plug-in system, with a Null driver and an openGL one

This commit is contained in:
shashclp 2007-03-17 04:06:25 +00:00
parent a49fd6bc00
commit 0ba79ff378
1 changed files with 15 additions and 4 deletions

View File

@ -47,6 +47,7 @@
#include "oamView.h"
#include "mapview.h"
#include "ConfigKeys.h"
#include "OGLRender.h"
#include "snddx.h"
@ -101,6 +102,11 @@ SoundInterface_struct *SNDCoreList[] = {
NULL
};
GPU3DInterface *core3DList[] = {
&gpu3DNull,
&gpu3Dgl,
};
int autoframeskipenab=1;
int frameskiprate=0;
static int backupmemorytype=MC_TYPE_AUTODETECT;
@ -278,9 +284,14 @@ DWORD WINAPI run( LPVOID lpParameter)
rotationbmi.bV4Width = 256;
rotationbmi.bV4Height = -192;
#ifdef RENDER3D
OGLRender::init(&hdc);
#endif
NDS_3D_SetDriver (GPU3D_OPENGL);
if (!gpu3D->NDS_3D_Init ())
{
MessageBox(hwnd,"Unable to initialize openGL","Error",MB_OK);
return -1;
}
QueryPerformanceFrequency((LARGE_INTEGER *)&freq);
QueryPerformanceCounter((LARGE_INTEGER *)&lastticks);
OneFrameTime = freq / 60;
@ -495,7 +506,7 @@ int WINAPI WinMain (HINSTANCE hThisInstance,
return messages.wParam;
}
sndvolume = GetPrivateProfileInt("Sound","Volume",100, IniName);
sndvolume = GetPrivateProfileInt("Sound","Volume",100, IniName);
SPU_SetVolume(sndvolume);
runthread = CreateThread(NULL, 0, run, NULL, 0, &threadID);