Renamed GB to DMG, fixed makefiles and vc project files to accomodate this change
This commit is contained in:
parent
1479e11435
commit
df3ae15cac
4
Makefile
4
Makefile
|
@ -58,8 +58,8 @@ endif
|
|||
|
||||
MAINDIR=src
|
||||
SDLDIR=src/sdl
|
||||
DMGDIR=src/gb
|
||||
GBAPUDIR=src/gb/gb_apu
|
||||
DMGDIR=src/dmg
|
||||
GBAPUDIR=src/dmg/gb_apu
|
||||
FEXDIR=../dependencies/File_Extractor-0.4.3
|
||||
HQCDIR=src/hq/c
|
||||
HQASMDIR=src/hq/asm
|
||||
|
|
64
VBA.vcproj
64
VBA.vcproj
|
@ -726,66 +726,66 @@
|
|||
Name="GB"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\src\gb\gb.cpp"
|
||||
RelativePath=".\src\dmg\gb.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gb\gbCheats.cpp"
|
||||
RelativePath=".\src\dmg\gbCheats.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gb\gbDis.cpp"
|
||||
RelativePath=".\src\dmg\gbDis.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gb\gbGfx.cpp"
|
||||
RelativePath=".\src\dmg\gbGfx.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gb\gbGlobals.cpp"
|
||||
RelativePath=".\src\dmg\gbGlobals.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gb\gbMemory.cpp"
|
||||
RelativePath=".\src\dmg\gbMemory.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gb\gbPrinter.cpp"
|
||||
RelativePath=".\src\dmg\gbPrinter.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gb\gbSGB.cpp"
|
||||
RelativePath=".\src\dmg\gbSGB.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gb\gbSound.cpp"
|
||||
RelativePath=".\src\dmg\gbSound.cpp"
|
||||
>
|
||||
</File>
|
||||
<Filter
|
||||
Name="GB APU"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\src\gb\gb_apu\Blip_Buffer.cpp"
|
||||
RelativePath=".\src\dmg\gb_apu\Blip_Buffer.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gb\gb_apu\Effects_Buffer.cpp"
|
||||
RelativePath=".\src\dmg\gb_apu\Effects_Buffer.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gb\gb_apu\Gb_Apu.cpp"
|
||||
RelativePath=".\src\dmg\gb_apu\Gb_Apu.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gb\gb_apu\Gb_Apu_State.cpp"
|
||||
RelativePath=".\src\dmg\gb_apu\Gb_Apu_State.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gb\gb_apu\Gb_Oscs.cpp"
|
||||
RelativePath=".\src\dmg\gb_apu\Gb_Oscs.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gb\gb_apu\Multi_Buffer.cpp"
|
||||
RelativePath=".\src\dmg\gb_apu\Multi_Buffer.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
|
@ -1156,74 +1156,74 @@
|
|||
Name="GB"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\src\gb\gb.h"
|
||||
RelativePath=".\src\dmg\gb.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gb\gbCheats.h"
|
||||
RelativePath=".\src\dmg\gbCheats.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gb\gbCodes.h"
|
||||
RelativePath=".\src\dmg\gbCodes.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gb\gbCodesCB.h"
|
||||
RelativePath=".\src\dmg\gbCodesCB.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gb\gbGlobals.h"
|
||||
RelativePath=".\src\dmg\gbGlobals.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gb\gbMemory.h"
|
||||
RelativePath=".\src\dmg\gbMemory.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gb\gbPrinter.h"
|
||||
RelativePath=".\src\dmg\gbPrinter.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gb\gbSGB.h"
|
||||
RelativePath=".\src\dmg\gbSGB.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gb\gbSound.h"
|
||||
RelativePath=".\src\dmg\gbSound.h"
|
||||
>
|
||||
</File>
|
||||
<Filter
|
||||
Name="GB APU"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\src\gb\gb_apu\blargg_common.h"
|
||||
RelativePath=".\src\dmg\gb_apu\blargg_common.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gb\gb_apu\blargg_config.h"
|
||||
RelativePath=".\src\dmg\gb_apu\blargg_config.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gb\gb_apu\blargg_source.h"
|
||||
RelativePath=".\src\dmg\gb_apu\blargg_source.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gb\gb_apu\Blip_Buffer.h"
|
||||
RelativePath=".\src\dmg\gb_apu\Blip_Buffer.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gb\gb_apu\Effects_Buffer.h"
|
||||
RelativePath=".\src\dmg\gb_apu\Effects_Buffer.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gb\gb_apu\Gb_Apu.h"
|
||||
RelativePath=".\src\dmg\gb_apu\Gb_Apu.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gb\gb_apu\Gb_Oscs.h"
|
||||
RelativePath=".\src\dmg\gb_apu\Gb_Oscs.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gb\gb_apu\Multi_Buffer.h"
|
||||
RelativePath=".\src\dmg\gb_apu\Multi_Buffer.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
|
|
|
@ -974,39 +974,39 @@
|
|||
Name="GB"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\src\gb\gb.cpp"
|
||||
RelativePath=".\src\dmg\gb.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gb\gbCheats.cpp"
|
||||
RelativePath=".\src\dmg\gbCheats.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gb\gbDis.cpp"
|
||||
RelativePath=".\src\dmg\gbDis.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gb\gbGfx.cpp"
|
||||
RelativePath=".\src\dmg\gbGfx.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gb\gbGlobals.cpp"
|
||||
RelativePath=".\src\dmg\gbGlobals.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gb\gbMemory.cpp"
|
||||
RelativePath=".\src\dmg\gbMemory.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gb\gbPrinter.cpp"
|
||||
RelativePath=".\src\dmg\gbPrinter.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gb\gbSGB.cpp"
|
||||
RelativePath=".\src\dmg\gbSGB.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gb\gbSound.cpp"
|
||||
RelativePath=".\src\dmg\gbSound.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
|
@ -1372,39 +1372,39 @@
|
|||
Name="GB"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\src\gb\gb.h"
|
||||
RelativePath=".\src\dmg\gb.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gb\gbCheats.h"
|
||||
RelativePath=".\src\dmg\gbCheats.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gb\gbCodes.h"
|
||||
RelativePath=".\src\dmg\gbCodes.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gb\gbCodesCB.h"
|
||||
RelativePath=".\src\dmg\gbCodesCB.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gb\gbGlobals.h"
|
||||
RelativePath=".\src\dmg\gbGlobals.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gb\gbMemory.h"
|
||||
RelativePath=".\src\dmg\gbMemory.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gb\gbPrinter.h"
|
||||
RelativePath=".\src\dmg\gbPrinter.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gb\gbSGB.h"
|
||||
RelativePath=".\src\dmg\gbSGB.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\src\gb\gbSound.h"
|
||||
RelativePath=".\src\dmg\gbSound.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
AGB files will go here once src folder is cleaned up.
|
|
@ -28,8 +28,8 @@
|
|||
|
||||
#include "../System.h"
|
||||
#include "../CheatSearch.h"
|
||||
#include "../gb/gbCheats.h"
|
||||
#include "../gb/gbGlobals.h"
|
||||
#include "../dmg/gbCheats.h"
|
||||
#include "../dmg/gbGlobals.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
#include "../GBA.h"
|
||||
#include "../Globals.h"
|
||||
#include "../Util.h"
|
||||
#include "../gb/gbGlobals.h"
|
||||
#include "../dmg/gbGlobals.h"
|
||||
#include "..\memgzio.h"
|
||||
|
||||
//Math
|
||||
|
@ -97,8 +97,9 @@ public:
|
|||
virtual void DisableOpenGL();
|
||||
virtual bool initialize();
|
||||
virtual void cleanup();
|
||||
virtual void render();
|
||||
virtual void clear();
|
||||
virtual void render();
|
||||
|
||||
virtual bool changeRenderSize( int w, int h );
|
||||
virtual void resize( int w, int h );
|
||||
virtual void setOption( const char *, int );
|
||||
|
@ -217,6 +218,124 @@ void OpenGLDisplay::cleanup()
|
|||
//init renderer
|
||||
bool OpenGLDisplay::initialize()
|
||||
{
|
||||
switch( theApp.cartridgeType )
|
||||
{
|
||||
case IMAGE_GBA:
|
||||
theApp.sizeX = 240;
|
||||
theApp.sizeY = 160;
|
||||
break;
|
||||
case IMAGE_GB:
|
||||
if ( gbBorderOn )
|
||||
{
|
||||
theApp.sizeX = 256;
|
||||
theApp.sizeY = 224;
|
||||
}
|
||||
else
|
||||
{
|
||||
theApp.sizeX = 160;
|
||||
theApp.sizeY = 144;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
switch(theApp.videoOption)
|
||||
{
|
||||
case VIDEO_1X:
|
||||
theApp.surfaceSizeX = theApp.sizeX;
|
||||
theApp.surfaceSizeY = theApp.sizeY;
|
||||
break;
|
||||
case VIDEO_2X:
|
||||
theApp.surfaceSizeX = theApp.sizeX * 2;
|
||||
theApp.surfaceSizeY = theApp.sizeY * 2;
|
||||
break;
|
||||
case VIDEO_3X:
|
||||
theApp.surfaceSizeX = theApp.sizeX * 3;
|
||||
theApp.surfaceSizeY = theApp.sizeY * 3;
|
||||
break;
|
||||
case VIDEO_4X:
|
||||
theApp.surfaceSizeX = theApp.sizeX * 4;
|
||||
theApp.surfaceSizeY = theApp.sizeY * 4;
|
||||
break;
|
||||
case VIDEO_320x240:
|
||||
case VIDEO_640x480:
|
||||
case VIDEO_800x600:
|
||||
case VIDEO_1024x768:
|
||||
case VIDEO_1280x960:
|
||||
case VIDEO_OTHER:
|
||||
{
|
||||
if( theApp.fullScreenStretch ) {
|
||||
theApp.surfaceSizeX = theApp.fsWidth;
|
||||
theApp.surfaceSizeY = theApp.fsHeight;
|
||||
} else {
|
||||
float scaleX = (float)theApp.fsWidth / (float)theApp.sizeX;
|
||||
float scaleY = (float)theApp.fsHeight / (float)theApp.sizeY;
|
||||
float min = ( scaleX < scaleY ) ? scaleX : scaleY;
|
||||
if( theApp.fsMaxScale )
|
||||
min = ( min > (float)theApp.fsMaxScale ) ? (float)theApp.fsMaxScale : min;
|
||||
theApp.surfaceSizeX = (int)((float)theApp.sizeX * min);
|
||||
theApp.surfaceSizeY = (int)((float)theApp.sizeY * min);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
theApp.rect.left = 0;
|
||||
theApp.rect.top = 0;
|
||||
theApp.rect.right = theApp.sizeX;
|
||||
theApp.rect.bottom = theApp.sizeY;
|
||||
|
||||
theApp.dest.left = 0;
|
||||
theApp.dest.top = 0;
|
||||
theApp.dest.right = theApp.surfaceSizeX;
|
||||
theApp.dest.bottom = theApp.surfaceSizeY;
|
||||
|
||||
DWORD style = WS_POPUP | WS_VISIBLE;
|
||||
DWORD styleEx = 0;
|
||||
|
||||
if( theApp.videoOption <= VIDEO_4X )
|
||||
style |= WS_OVERLAPPEDWINDOW;
|
||||
else
|
||||
styleEx = 0;
|
||||
|
||||
if( theApp.videoOption <= VIDEO_4X )
|
||||
AdjustWindowRectEx( &theApp.dest, style, TRUE, styleEx );
|
||||
else
|
||||
AdjustWindowRectEx( &theApp.dest, style, FALSE, styleEx );
|
||||
|
||||
int winSizeX = theApp.dest.right - theApp.dest.left;
|
||||
int winSizeY = theApp.dest.bottom - theApp.dest.top;
|
||||
int x = 0, y = 0;
|
||||
|
||||
if( theApp.videoOption <= VIDEO_4X ) {
|
||||
x = theApp.windowPositionX;
|
||||
y = theApp.windowPositionY;
|
||||
} else {
|
||||
winSizeX = theApp.fsWidth;
|
||||
winSizeY = theApp.fsHeight;
|
||||
}
|
||||
|
||||
// Create a window
|
||||
MainWnd *pWnd = new MainWnd;
|
||||
theApp.m_pMainWnd = pWnd;
|
||||
|
||||
pWnd->CreateEx(
|
||||
styleEx,
|
||||
theApp.wndClass,
|
||||
"VisualBoyAdvance",
|
||||
style,
|
||||
x,y,winSizeX,winSizeY,
|
||||
NULL,
|
||||
0 );
|
||||
|
||||
if (!(HWND)*pWnd) {
|
||||
winlog("Error creating Window %08x\n", GetLastError());
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
theApp.updateMenuBar();
|
||||
|
||||
theApp.adjustDestRect();
|
||||
theApp.mode320Available = FALSE;
|
||||
theApp.mode640Available = FALSE;
|
||||
theApp.mode800Available = FALSE;
|
||||
|
|
Loading…
Reference in New Issue