updates to wx to move class declarations out of wxmain.cpp and into wxmain.h; along with primative additon of Hud font setter

This commit is contained in:
dormito 2010-12-19 12:31:19 +00:00
parent 95c40ea60a
commit 5d68b4d98e
3 changed files with 1170 additions and 953 deletions

View File

@ -111,195 +111,6 @@
Name="VCPostBuildEventTool" Name="VCPostBuildEventTool"
/> />
</Configuration> </Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)\__bins"
IntermediateDirectory="$(SolutionDir)\.VS2008\$(ConfigurationName)\$(PlatformName)"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
CommandLine=""
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="MASM"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/MP"
Optimization="2"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
EnableFiberSafeOptimizations="true"
WholeProgramOptimization="true"
AdditionalIncludeDirectories=".;..;..\windows\lua\include;&quot;..\windows\glib-2.20.1\build&quot;;&quot;..\windows\glib-2.20.1\build\glib&quot;;..\windows\zlib123;..\windows\zziplib;..\windows\winpcap;..\windows\7z;..\windows\agg\include;..\windows\examples;..\windows\wx\include;..\windows;..\windows\sdl\include;..\wxdlg"
PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;GLIB_STATIC_COMPILATION;WIN32;HAVE_LIBZ;NOMINMAX;RELEASE;NDEBUG;WXPORT"
StringPooling="true"
ExceptionHandling="1"
StructMemberAlignment="0"
BufferSecurityCheck="false"
EnableEnhancedInstructionSet="2"
FloatingPointModel="2"
WarningLevel="1"
DebugInformationFormat="3"
CallingConvention="0"
CompileAs="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="Rpcrt4.lib directx-win32-ddraw-dinput8-dsound-dxerr8-dxguid.lib lua51.lib glib-vc8-Win32.lib 7z-vc8-Win32.lib zlib-vc8-Win32.lib agg-2.5.lib vfw32.lib winmm.lib opengl32.lib glu32.lib ws2_32.lib user32.lib gdi32.lib shell32.lib comdlg32.lib shlwapi.lib comctl32.lib wxbase28.lib wxmsw28_core.lib sdl-vc8-Win32.lib"
OutputFile="$(OutDir)\$(ProjectName)_release.exe"
AdditionalLibraryDirectories="..\windows\zlib123;..\windows\agg;.libs;.libs\win32"
DelayLoadDLLs="lua51.dll"
GenerateDebugInformation="true"
OptimizeReferences="2"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
Profile="false"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
AdditionalManifestFiles="DeSmuME_x86.manifest"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Dev+|Win32"
OutputDirectory="$(SolutionDir)\__bins"
IntermediateDirectory="$(SolutionDir)\.VS2008\$(ConfigurationName)\$(PlatformName)"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
WholeProgramOptimization="0"
>
<Tool
Name="VCPreBuildEventTool"
CommandLine=""
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="MASM"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/MP"
Optimization="3"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
EnableFiberSafeOptimizations="true"
WholeProgramOptimization="false"
AdditionalIncludeDirectories=".;..;..\windows\lua\include;&quot;..\windows\glib-2.20.1\build&quot;;&quot;..\windows\glib-2.20.1\build\glib&quot;;..\windows\zlib123;..\windows\zziplib;..\windows\winpcap;..\windows\7z;..\windows\agg\include;..\windows\examples;..\windows\wx\include;..\windows;..\windows\sdl\include;..\wxdlg"
PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;GLIB_STATIC_COMPILATION;WIN32;HAVE_LIBZ;NOMINMAX;RELEASE;NDEBUG;FASTBUILD;DEVELOPER;EXPERIMENTAL_WIFI_COMM;WXPORT"
StringPooling="true"
ExceptionHandling="1"
StructMemberAlignment="0"
BufferSecurityCheck="false"
EnableEnhancedInstructionSet="2"
FloatingPointModel="2"
WarningLevel="1"
DebugInformationFormat="3"
CallingConvention="0"
CompileAs="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="Rpcrt4.lib directx-win32-ddraw-dinput8-dsound-dxerr8-dxguid.lib lua51.lib glib-vc8-Win32.lib 7z-vc8-Win32.lib zlib-vc8-Win32.lib agg-2.5.lib vfw32.lib winmm.lib opengl32.lib glu32.lib ws2_32.lib user32.lib gdi32.lib shell32.lib comdlg32.lib shlwapi.lib comctl32.lib wxbase28.lib wxmsw28_core.lib sdl-vc8-Win32.lib"
OutputFile="$(OutDir)\$(ProjectName)_dev+.exe"
AdditionalLibraryDirectories="..\windows\zlib123;..\windows\agg;.libs;.libs\win32"
DelayLoadDLLs="lua51.dll"
GenerateDebugInformation="true"
OptimizeReferences="2"
LinkTimeCodeGeneration="0"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
Profile="false"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
AdditionalManifestFiles="DeSmuME_x86.manifest"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration <Configuration
Name="Debug|x64" Name="Debug|x64"
OutputDirectory="$(SolutionDir)\__bins" OutputDirectory="$(SolutionDir)\__bins"
@ -391,6 +202,100 @@
Name="VCPostBuildEventTool" Name="VCPostBuildEventTool"
/> />
</Configuration> </Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)\__bins"
IntermediateDirectory="$(SolutionDir)\.VS2008\$(ConfigurationName)\$(PlatformName)"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
CommandLine=""
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="MASM"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/MP"
Optimization="2"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
EnableFiberSafeOptimizations="true"
WholeProgramOptimization="true"
AdditionalIncludeDirectories=".;..;..\windows\lua\include;&quot;..\windows\glib-2.20.1\build&quot;;&quot;..\windows\glib-2.20.1\build\glib&quot;;..\windows\zlib123;..\windows\zziplib;..\windows\winpcap;..\windows\7z;..\windows\agg\include;..\windows\examples;..\windows\wx\include;..\windows;..\windows\sdl\include;..\wxdlg"
PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;GLIB_STATIC_COMPILATION;WIN32;HAVE_LIBZ;NOMINMAX;RELEASE;NDEBUG;WXPORT"
StringPooling="true"
ExceptionHandling="1"
StructMemberAlignment="0"
BufferSecurityCheck="false"
EnableEnhancedInstructionSet="2"
FloatingPointModel="2"
WarningLevel="1"
DebugInformationFormat="3"
CallingConvention="0"
CompileAs="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="Rpcrt4.lib directx-win32-ddraw-dinput8-dsound-dxerr8-dxguid.lib lua51.lib glib-vc8-Win32.lib 7z-vc8-Win32.lib zlib-vc8-Win32.lib agg-2.5.lib vfw32.lib winmm.lib opengl32.lib glu32.lib ws2_32.lib user32.lib gdi32.lib shell32.lib comdlg32.lib shlwapi.lib comctl32.lib wxbase28.lib wxmsw28_core.lib sdl-vc8-Win32.lib"
OutputFile="$(OutDir)\$(ProjectName)_release.exe"
AdditionalLibraryDirectories="..\windows\zlib123;..\windows\agg;.libs;.libs\win32"
DelayLoadDLLs="lua51.dll"
GenerateDebugInformation="true"
OptimizeReferences="2"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
Profile="false"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
AdditionalManifestFiles="DeSmuME_x86.manifest"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration <Configuration
Name="Release|x64" Name="Release|x64"
OutputDirectory="$(SolutionDir)\__bins" OutputDirectory="$(SolutionDir)\__bins"
@ -486,6 +391,101 @@
Name="VCPostBuildEventTool" Name="VCPostBuildEventTool"
/> />
</Configuration> </Configuration>
<Configuration
Name="Dev+|Win32"
OutputDirectory="$(SolutionDir)\__bins"
IntermediateDirectory="$(SolutionDir)\.VS2008\$(ConfigurationName)\$(PlatformName)"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
WholeProgramOptimization="0"
>
<Tool
Name="VCPreBuildEventTool"
CommandLine=""
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="MASM"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/MP"
Optimization="3"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
EnableFiberSafeOptimizations="true"
WholeProgramOptimization="false"
AdditionalIncludeDirectories=".;..;..\windows\lua\include;&quot;..\windows\glib-2.20.1\build&quot;;&quot;..\windows\glib-2.20.1\build\glib&quot;;..\windows\zlib123;..\windows\zziplib;..\windows\winpcap;..\windows\7z;..\windows\agg\include;..\windows\examples;..\windows\wx\include;..\windows;..\windows\sdl\include;..\wxdlg"
PreprocessorDefinitions="_CRT_SECURE_NO_DEPRECATE;GLIB_STATIC_COMPILATION;WIN32;HAVE_LIBZ;NOMINMAX;RELEASE;NDEBUG;FASTBUILD;DEVELOPER;EXPERIMENTAL_WIFI_COMM;WXPORT"
StringPooling="true"
ExceptionHandling="1"
StructMemberAlignment="0"
BufferSecurityCheck="false"
EnableEnhancedInstructionSet="2"
FloatingPointModel="2"
WarningLevel="1"
DebugInformationFormat="3"
CallingConvention="0"
CompileAs="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="Rpcrt4.lib directx-win32-ddraw-dinput8-dsound-dxerr8-dxguid.lib lua51.lib glib-vc8-Win32.lib 7z-vc8-Win32.lib zlib-vc8-Win32.lib agg-2.5.lib vfw32.lib winmm.lib opengl32.lib glu32.lib ws2_32.lib user32.lib gdi32.lib shell32.lib comdlg32.lib shlwapi.lib comctl32.lib wxbase28.lib wxmsw28_core.lib sdl-vc8-Win32.lib"
OutputFile="$(OutDir)\$(ProjectName)_dev+.exe"
AdditionalLibraryDirectories="..\windows\zlib123;..\windows\agg;.libs;.libs\win32"
DelayLoadDLLs="lua51.dll"
GenerateDebugInformation="true"
OptimizeReferences="2"
LinkTimeCodeGeneration="0"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
Profile="false"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
AdditionalManifestFiles="DeSmuME_x86.manifest"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration <Configuration
Name="Dev+|x64" Name="Dev+|x64"
OutputDirectory="$(SolutionDir)\__bins" OutputDirectory="$(SolutionDir)\__bins"
@ -649,7 +649,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Dev+|Win32" Name="Release|x64"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
@ -657,7 +657,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release|x64" Name="Dev+|Win32"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
@ -1438,6 +1438,10 @@
RelativePath=".\wxMain.cpp" RelativePath=".\wxMain.cpp"
> >
</File> </File>
<File
RelativePath=".\wxMain.h"
>
</File>
<Filter <Filter
Name="PadSimple" Name="PadSimple"
> >
@ -1519,26 +1523,6 @@
Outputs=".libs\7z.tag" Outputs=".libs\7z.tag"
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCustomBuildTool"
CommandLine="un7z_and_touch.bat ..\windows\7z\7z.7z .libs\7z*&#x0D;&#x0A;"
AdditionalDependencies="7z.exe;un7z_and_touch.bat"
Outputs=".libs\7z.tag"
/>
</FileConfiguration>
<FileConfiguration
Name="Dev+|Win32"
>
<Tool
Name="VCCustomBuildTool"
CommandLine="un7z_and_touch.bat ..\windows\7z\7z.7z .libs\7z*&#x0D;&#x0A;"
AdditionalDependencies="7z.exe;un7z_and_touch.bat"
Outputs=".libs\7z.tag"
/>
</FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Debug|x64" Name="Debug|x64"
> >
@ -1549,6 +1533,16 @@
Outputs=".libs\7z.tag" Outputs=".libs\7z.tag"
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCustomBuildTool"
CommandLine="un7z_and_touch.bat ..\windows\7z\7z.7z .libs\7z*&#x0D;&#x0A;"
AdditionalDependencies="7z.exe;un7z_and_touch.bat"
Outputs=".libs\7z.tag"
/>
</FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release|x64" Name="Release|x64"
> >
@ -1559,12 +1553,22 @@
Outputs=".libs\7z.tag" Outputs=".libs\7z.tag"
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration
Name="Dev+|Win32"
>
<Tool
Name="VCCustomBuildTool"
CommandLine="un7z_and_touch.bat ..\windows\7z\7z.7z .libs\7z*&#x0D;&#x0A;"
AdditionalDependencies="7z.exe;un7z_and_touch.bat"
Outputs=".libs\7z.tag"
/>
</FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Dev+|x64" Name="Dev+|x64"
> >
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
CommandLine="un7z_and_touch.bat 7z\7z.7z .libs\7z*" CommandLine="un7z_and_touch.bat 7z\7z.7z .libs\7z*&#x0D;&#x0A;"
AdditionalDependencies="7z.exe;un7z_and_touch.bat" AdditionalDependencies="7z.exe;un7z_and_touch.bat"
Outputs=".libs\7z.tag" Outputs=".libs\7z.tag"
/> />
@ -1593,26 +1597,6 @@
Outputs=".libs\directx.tag" Outputs=".libs\directx.tag"
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCustomBuildTool"
CommandLine="un7z_and_touch.bat ..\windows\directx\directx.7z .libs\directx*&#x0D;&#x0A;"
AdditionalDependencies="7z.exe;un7z_and_touch.bat"
Outputs=".libs\directx.tag"
/>
</FileConfiguration>
<FileConfiguration
Name="Dev+|Win32"
>
<Tool
Name="VCCustomBuildTool"
CommandLine="un7z_and_touch.bat ..\windows\directx\directx.7z .libs\directx*&#x0D;&#x0A;"
AdditionalDependencies="7z.exe;un7z_and_touch.bat"
Outputs=".libs\directx.tag"
/>
</FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Debug|x64" Name="Debug|x64"
> >
@ -1623,6 +1607,16 @@
Outputs=".libs\directx.tag" Outputs=".libs\directx.tag"
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCustomBuildTool"
CommandLine="un7z_and_touch.bat ..\windows\directx\directx.7z .libs\directx*&#x0D;&#x0A;"
AdditionalDependencies="7z.exe;un7z_and_touch.bat"
Outputs=".libs\directx.tag"
/>
</FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release|x64" Name="Release|x64"
> >
@ -1633,6 +1627,16 @@
Outputs=".libs\directx.tag" Outputs=".libs\directx.tag"
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration
Name="Dev+|Win32"
>
<Tool
Name="VCCustomBuildTool"
CommandLine="un7z_and_touch.bat ..\windows\directx\directx.7z .libs\directx*&#x0D;&#x0A;"
AdditionalDependencies="7z.exe;un7z_and_touch.bat"
Outputs=".libs\directx.tag"
/>
</FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release FastBuild|x64" Name="Release FastBuild|x64"
> >
@ -1657,26 +1661,6 @@
Outputs=".libs\glib-vc8.tag" Outputs=".libs\glib-vc8.tag"
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCustomBuildTool"
CommandLine="un7z_and_touch.bat ..\windows\glib-2.20.1\glib-2.20.1.7z .libs\glib*&#x0D;&#x0A;"
AdditionalDependencies="7z.exe;un7z_and_touch.bat"
Outputs=".libs\glib-vc8.tag"
/>
</FileConfiguration>
<FileConfiguration
Name="Dev+|Win32"
>
<Tool
Name="VCCustomBuildTool"
CommandLine="un7z_and_touch.bat ..\windows\glib-2.20.1\glib-2.20.1.7z .libs\glib*&#x0D;&#x0A;"
AdditionalDependencies="7z.exe;un7z_and_touch.bat"
Outputs=".libs\glib-vc8.tag"
/>
</FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Debug|x64" Name="Debug|x64"
> >
@ -1687,6 +1671,16 @@
Outputs=".libs\glib-vc8.tag" Outputs=".libs\glib-vc8.tag"
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCustomBuildTool"
CommandLine="un7z_and_touch.bat ..\windows\glib-2.20.1\glib-2.20.1.7z .libs\glib*&#x0D;&#x0A;"
AdditionalDependencies="7z.exe;un7z_and_touch.bat"
Outputs=".libs\glib-vc8.tag"
/>
</FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release|x64" Name="Release|x64"
> >
@ -1697,6 +1691,16 @@
Outputs=".libs\glib-vc8.tag" Outputs=".libs\glib-vc8.tag"
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration
Name="Dev+|Win32"
>
<Tool
Name="VCCustomBuildTool"
CommandLine="un7z_and_touch.bat ..\windows\glib-2.20.1\glib-2.20.1.7z .libs\glib*&#x0D;&#x0A;"
AdditionalDependencies="7z.exe;un7z_and_touch.bat"
Outputs=".libs\glib-vc8.tag"
/>
</FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release FastBuild|x64" Name="Release FastBuild|x64"
> >
@ -1716,27 +1720,7 @@
> >
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
CommandLine="un7z_and_touch.bat ..\windows\lua\lua.7z .libs\win32\lua* .libs\x64\lua* .libs\lua.tag" CommandLine="un7z_and_touch.bat ..\windows\lua\lua.7z .libs\win32\lua* .libs\x64\lua* .libs\lua.tag&#x0D;&#x0A;"
AdditionalDependencies="7z.exe;un7z_and_touch.bat"
Outputs=".libs\lua.tag"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCustomBuildTool"
CommandLine="un7z_and_touch.bat ..\windows\lua\lua.7z .libs\win32\lua* .libs\x64\lua* .libs\lua.tag"
AdditionalDependencies="7z.exe;un7z_and_touch.bat"
Outputs=".libs\lua.tag"
/>
</FileConfiguration>
<FileConfiguration
Name="Dev+|Win32"
>
<Tool
Name="VCCustomBuildTool"
CommandLine="un7z_and_touch.bat ..\windows\lua\lua.7z .libs\win32\lua* .libs\x64\lua* .libs\lua.tag"
AdditionalDependencies="7z.exe;un7z_and_touch.bat" AdditionalDependencies="7z.exe;un7z_and_touch.bat"
Outputs=".libs\lua.tag" Outputs=".libs\lua.tag"
/> />
@ -1751,6 +1735,16 @@
Outputs=".libs\lua.tag" Outputs=".libs\lua.tag"
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCustomBuildTool"
CommandLine="un7z_and_touch.bat ..\windows\lua\lua.7z .libs\win32\lua* .libs\x64\lua* .libs\lua.tag&#x0D;&#x0A;"
AdditionalDependencies="7z.exe;un7z_and_touch.bat"
Outputs=".libs\lua.tag"
/>
</FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release|x64" Name="Release|x64"
> >
@ -1761,6 +1755,16 @@
Outputs=".libs\lua.tag" Outputs=".libs\lua.tag"
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration
Name="Dev+|Win32"
>
<Tool
Name="VCCustomBuildTool"
CommandLine="un7z_and_touch.bat ..\windows\lua\lua.7z .libs\win32\lua* .libs\x64\lua* .libs\lua.tag&#x0D;&#x0A;"
AdditionalDependencies="7z.exe;un7z_and_touch.bat"
Outputs=".libs\lua.tag"
/>
</FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release FastBuild|x64" Name="Release FastBuild|x64"
> >
@ -1796,21 +1800,21 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Dev+|Win32" Name="Release|x64"
> >
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
CommandLine="un7z_and_touch.bat ..\windows\sdl\sdl.7z .libs\sdl*&#x0D;&#x0A;" CommandLine="un7z_and_touch.bat ..\windows\sdl\SDL7z .libs\sdl*&#x0D;&#x0A;"
AdditionalDependencies="7z.exe;un7z_and_touch.bat" AdditionalDependencies="7z.exe;un7z_and_touch.bat"
Outputs=".libs\sdl.tag" Outputs=".libs\sdl.tag"
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release|x64" Name="Dev+|Win32"
> >
<Tool <Tool
Name="VCCustomBuildTool" Name="VCCustomBuildTool"
CommandLine="un7z_and_touch.bat ..\windows\sdl\SDL7z .libs\sdl*" CommandLine="un7z_and_touch.bat ..\windows\sdl\sdl.7z .libs\sdl*&#x0D;&#x0A;"
AdditionalDependencies="7z.exe;un7z_and_touch.bat" AdditionalDependencies="7z.exe;un7z_and_touch.bat"
Outputs=".libs\sdl.tag" Outputs=".libs\sdl.tag"
/> />
@ -1829,26 +1833,6 @@
Outputs=".libs\wx.tag" Outputs=".libs\wx.tag"
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCustomBuildTool"
CommandLine="un7z_and_touch.bat ..\windows\wx\wx.7z .libs\wx*&#x0D;&#x0A;"
AdditionalDependencies="7z.exe;un7z_and_touch.bat"
Outputs=".libs\wx.tag"
/>
</FileConfiguration>
<FileConfiguration
Name="Dev+|Win32"
>
<Tool
Name="VCCustomBuildTool"
CommandLine="un7z_and_touch.bat ..\windows\wx\wx.7z .libs\wx*&#x0D;&#x0A;"
AdditionalDependencies="7z.exe;un7z_and_touch.bat"
Outputs=".libs\wx.tag"
/>
</FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Debug|x64" Name="Debug|x64"
> >
@ -1859,6 +1843,16 @@
Outputs=".libs\wx.tag" Outputs=".libs\wx.tag"
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCustomBuildTool"
CommandLine="un7z_and_touch.bat ..\windows\wx\wx.7z .libs\wx*&#x0D;&#x0A;"
AdditionalDependencies="7z.exe;un7z_and_touch.bat"
Outputs=".libs\wx.tag"
/>
</FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release|x64" Name="Release|x64"
> >
@ -1869,6 +1863,16 @@
Outputs=".libs\wx.tag" Outputs=".libs\wx.tag"
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration
Name="Dev+|Win32"
>
<Tool
Name="VCCustomBuildTool"
CommandLine="un7z_and_touch.bat ..\windows\wx\wx.7z .libs\wx*&#x0D;&#x0A;"
AdditionalDependencies="7z.exe;un7z_and_touch.bat"
Outputs=".libs\wx.tag"
/>
</FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release FastBuild|x64" Name="Release FastBuild|x64"
> >

View File

@ -1,3 +1,5 @@
#include "wxMain.h"
#include "NDSSystem.h" #include "NDSSystem.h"
#include "GPU_osd.h" #include "GPU_osd.h"
#include <wx/wxprec.h> #include <wx/wxprec.h>
@ -37,7 +39,7 @@
#define GAP_DEFAULT 64 #define GAP_DEFAULT 64
#define GAP_MAX 90 #define GAP_MAX 90
static int nds_gap_size; static int nds_gap_size;
static int nds_screen_rotation_angle; static SPADInitialize PADInitialize;
static bool Touch = false; static bool Touch = false;
SoundInterface_struct *SNDCoreList[] = { SoundInterface_struct *SNDCoreList[] = {
@ -57,28 +59,186 @@ GPU3DInterface *core3DList[] = {
volatile bool execute = false; volatile bool execute = false;
class Desmume: public wxApp bool Desmume::OnInit()
{ {
public:
virtual bool OnInit();
};
class DesmumeFrame: public wxFrame if ( !wxApp::OnInit() )
{ return false;
public:
DesmumeFrame(const wxString& title);
~DesmumeFrame() { #ifdef WIN32
delete history; extern void OpenConsole();
OpenConsole();
#endif
SetAppName(_T("desmume"));
wxConfigBase *pConfig = new wxFileConfig(wxEmptyString,wxEmptyString,_T("desmume.ini"),wxEmptyString,wxCONFIG_USE_RELATIVE_PATH);
wxConfigBase::Set(pConfig);
wxString emu_version(EMU_DESMUME_NAME_AND_VERSION(), wxConvUTF8);
DesmumeFrame *frame = new DesmumeFrame(emu_version);
frame->NDSInitialize();
frame->Show(true);
PADInitialize.padNumber = 1;
#ifndef WIN32
extern void Initialize(void *init);
Initialize(&PADInitialize);
#endif
return true;
} }
void OnQuit(wxCommandEvent& WXUNUSED(event))
void DesmumeFrame::NDSInitialize() {
NDS_FillDefaultFirmwareConfigData( &fw_config);
#ifdef HAVE_LIBAGG
Desmume_InitOnce();
aggDraw.hud->attach((u8*)GPU_screen, 256, 384, 1024);//TODO
#endif
//TODO
addon_type = NDS_ADDON_NONE;
addonsChangePak(addon_type);
#ifdef GDB_STUB
arm9_memio = &arm9_base_memory_iface;
arm7_memio = &arm7_base_memory_iface;
NDS_Init( arm9_memio, &arm9_ctrl_iface,
arm7_memio, &arm7_ctrl_iface);
#else
NDS_Init();
#endif
SPU_ChangeSoundCore(SNDCORE_SDL, 735 * 4);
NDS_3D_ChangeCore(0);
NDS_CreateDummyFirmware( &fw_config);
}
DesmumeFrame::DesmumeFrame(const wxString& title)
: wxFrame(NULL, wxID_ANY, title)
{
history = new wxFileHistory;
wxMenuBar *menuBar = new wxMenuBar();
wxMenu *fileMenu = new wxMenu;
wxMenu *emulationMenu = new wxMenu;
wxMenu *viewMenu = new wxMenu;
wxMenu *configMenu = new wxMenu;
wxMenu *toolsMenu = new wxMenu;
wxMenu *helpMenu = new wxMenu;
wxMenu *recentMenu = new wxMenu;
wxMenu *saves(MakeStatesSubMenu(wSaveState01));
wxMenu *loads(MakeStatesSubMenu(wLoadState01));
wxMenu *layersMenu = new wxMenu;
wxMenu *rotateMenu = new wxMenu;
LoadSettings();
menuBar->Append(fileMenu, _T("&File"));
menuBar->Append(emulationMenu, _T("&Emulation"));
menuBar->Append(viewMenu, _T("&View"));
menuBar->Append(configMenu, _T("&Config"));
menuBar->Append(toolsMenu, _T("&Tools"));
menuBar->Append(helpMenu, _T("&Help"));
fileMenu->Append(wxID_OPEN, _T("Load R&om\tAlt-R"));
fileMenu->AppendSubMenu(recentMenu, _T("Recent files"));
fileMenu->Append(wCloseRom, _T("Close Rom"));
fileMenu->AppendSeparator();
fileMenu->Append(wSaveStateAs, _T("Save State As..."));
fileMenu->Append(wLoadStateFrom, _T("Load State From..."));
fileMenu->AppendSubMenu(saves, _T("Save State"));
fileMenu->AppendSubMenu(loads, _T("Load State"));
fileMenu->AppendSeparator();
fileMenu->Append(wImportBackupMemory, _T("Import Backup Memory..."));
fileMenu->Append(wExportBackupMemory, _T("Export Backup Memory..."));
fileMenu->AppendSeparator();
fileMenu->Append(wSaveScreenshotAs, _T("Save Screenshot As"));
fileMenu->Append(wQuickScreenshot, _T("Quick Screenshot"));
fileMenu->AppendSeparator();
fileMenu->Append(wPlayMovie, _T("Play Movie"));
fileMenu->Append(wRecordMovie, _T("Record Movie"));
fileMenu->Append(wStopMovie, _T("Stop Movie"));
fileMenu->AppendSeparator();
fileMenu->Append(wLuaWindow, _T("New Lua Script Window..."));
fileMenu->AppendSeparator();
fileMenu->Append(wxID_EXIT, _T("E&xit\tAlt-X"), _T("Quit this program"));
emulationMenu->Append(wPause, _T("&Pause\tAlt-P"), _T("Pause Emulation"));
emulationMenu->Append(wReset, _T("&Reset\tAlt-R"), _T("Reset Emulation"));
configMenu->Append(wConfigureControls, _T("Controls"));
toolsMenu->Append(w3dView, _T("&3d Viewer"));
toolsMenu->AppendSeparator();
toolsMenu->AppendSubMenu(layersMenu, _T("View Layers"));
layersMenu->AppendCheckItem(wMainGPU, _T("Main GPU"));
layersMenu->Check(wMainGPU, true);
layersMenu->AppendCheckItem(wMainBG0, _T("Main BG 0"));
layersMenu->Check(wMainBG0, true);
layersMenu->AppendCheckItem(wMainBG1, _T("Main BG 1"));
layersMenu->Check(wMainBG1, true);
layersMenu->AppendCheckItem(wMainBG2, _T("Main BG 2"));
layersMenu->Check(wMainBG2, true);
layersMenu->AppendCheckItem(wMainBG3, _T("Main BG 3"));
layersMenu->Check(wMainBG3, true);
layersMenu->AppendSeparator();
layersMenu->AppendCheckItem(wSubGPU, _T("Sub GPU"));
layersMenu->Check(wSubGPU, true);
layersMenu->AppendCheckItem(wSubBG0, _T("Sub BG 0"));
layersMenu->Check(wSubBG0, true);
layersMenu->AppendCheckItem(wSubBG1, _T("Sub BG 1"));
layersMenu->Check(wSubBG1, true);
layersMenu->AppendCheckItem(wSubBG2, _T("Sub BG 2"));
layersMenu->Check(wSubBG2, true);
layersMenu->AppendCheckItem(wSubBG3, _T("Sub BG 3"));
layersMenu->Check(wSubBG3, true);
helpMenu->Append(wWebsite, _T("&Website"));
helpMenu->Append(wForums, _T("&Forums"));
helpMenu->Append(wSubmitABugReport, _T("&Submit A Bug Report"));
helpMenu->Append(wxID_ABOUT);
viewMenu->AppendSubMenu(rotateMenu, _T("Rotate"));
viewMenu->AppendSeparator();
viewMenu->Append(wSetHUDFont, _T("&Set HUD Font"));
viewMenu->AppendCheckItem(wFrameCounter, _T("&Display Frame Counter"));
viewMenu->AppendCheckItem(wFPS, _T("&Display FPS"));
viewMenu->AppendCheckItem(wDisplayInput, _T("&Display Input"));
viewMenu->AppendCheckItem(wDisplayGraphicalInput, _T("&Display Graphical Input"));
viewMenu->AppendCheckItem(wDisplayLagCounter, _T("&Display Lag Counter"));
viewMenu->AppendCheckItem(wDisplayMicrophone, _T("&Display Microphone"));
rotateMenu->AppendRadioItem(wRot0, _T("0"));
rotateMenu->AppendRadioItem(wRot90, _T("90"));
rotateMenu->AppendRadioItem(wRot180, _T("180"));
rotateMenu->AppendRadioItem(wRot270, _T("270"));
rotateMenu->Check(wRot0+(nds_screen_rotation_angle/90), true);
/*
loadfileMenu(fileMenu);
loademulationMenu(emulationMenu);
loadconfigMenu(configMenu);
loadtoolsMenu(toolsMenu);
loadhelpMenu(helpMenu);
loadviewMenu(viewMenu);
loadmenuBar(menuBar);
*/
ChangeRotation(nds_screen_rotation_angle, false);
SetMenuBar(menuBar);
}
void DesmumeFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
{ {
execute = false; execute = false;
NDS_DeInit(); NDS_DeInit();
Close(true); Close(true);
} }
void DesmumeFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
void OnAbout(wxCommandEvent& WXUNUSED(event))
{ {
wxMessageBox( wxMessageBox(
wxString::Format(wxT("Desmume on %s"),wxGetOsDescription().c_str()), wxString::Format(wxT("Desmume on %s"),wxGetOsDescription().c_str()),
@ -87,7 +247,8 @@ public:
this); this);
} }
void applyInput(){ void DesmumeFrame::applyInput()
{
bool up,down,left,right,x,y,a,b,l,r,start,select; bool up,down,left,right,x,y,a,b,l,r,start,select;
@ -152,8 +313,8 @@ public:
((u16 *)MMU.ARM7_REG)[0x136>>1] = (u16)padExt; ((u16 *)MMU.ARM7_REG)[0x136>>1] = (u16)padExt;
} }
//TODO integrate paths system? void DesmumeFrame::LoadRom(wxCommandEvent& event)
void LoadRom(wxCommandEvent& event){ {
wxFileDialog dialog(this,_T("Load Rom"),wxGetHomeDir(),_T(""),_T("*.nds"),wxFD_OPEN, wxDefaultPosition, wxDefaultSize); wxFileDialog dialog(this,_T("Load Rom"),wxGetHomeDir(),_T(""),_T("*.nds"),wxFD_OPEN, wxDefaultPosition, wxDefaultSize);
if(dialog.ShowModal() == wxID_OK) { if(dialog.ShowModal() == wxID_OK) {
history->AddFileToHistory(dialog.GetPath()); history->AddFileToHistory(dialog.GetPath());
@ -161,14 +322,7 @@ public:
NDS_LoadROM(dialog.GetPath().mb_str(), dialog.GetPath().mb_str()); NDS_LoadROM(dialog.GetPath().mb_str(), dialog.GetPath().mb_str());
} }
} }
bool DesmumeFrame::DetransformTouchCoords(int& X, int& Y)
//----------------------------------------------------------------------------
// Touchscreen
//----------------------------------------------------------------------------
// De-transform coordinates.
// Returns true if the coordinates are within the touchscreen.
bool DetransformTouchCoords(int& X, int& Y)
{ {
int dtX, dtY; int dtX, dtY;
@ -197,8 +351,7 @@ public:
return true; return true;
} }
} }
void DesmumeFrame::OnTouchEvent(wxMouseEvent& evt)
void OnTouchEvent(wxMouseEvent& evt)
{ {
wxPoint pt = evt.GetPosition(); wxPoint pt = evt.GetPosition();
bool inside = DetransformTouchCoords(pt.x, pt.y); bool inside = DetransformTouchCoords(pt.x, pt.y);
@ -218,12 +371,7 @@ public:
NDS_setTouchPos((u16)pt.x, (u16)pt.y); NDS_setTouchPos((u16)pt.x, (u16)pt.y);
} }
} }
void DesmumeFrame::gpu_screen_to_rgb(u8 *rgb1, u8 *rgb2)
//----------------------------------------------------------------------------
// Video
//----------------------------------------------------------------------------
void gpu_screen_to_rgb(u8 *rgb1, u8 *rgb2)
{ {
u16 gpu_pixel; u16 gpu_pixel;
u8 pixel[3]; u8 pixel[3];
@ -264,9 +412,7 @@ loop:
goto loop; goto loop;
} }
} }
void DesmumeFrame::onPaint(wxPaintEvent &event)
//TODO should integrate filter system
void onPaint(wxPaintEvent &event)
{ {
u8 rgb1[SCREEN_SIZE], rgb2[SCREEN_SIZE]; u8 rgb1[SCREEN_SIZE], rgb2[SCREEN_SIZE];
wxPaintDC dc(this); wxPaintDC dc(this);
@ -303,7 +449,10 @@ loop:
} }
} }
void onIdle(wxIdleEvent &event){
void DesmumeFrame::onIdle(wxIdleEvent &event)
{
Refresh(false); Refresh(false);
event.RequestMore(); event.RequestMore();
if (execute) if (execute)
@ -320,7 +469,8 @@ loop:
// wxMicroSleep(16.7*1000); // wxMicroSleep(16.7*1000);
} }
void pause(wxCommandEvent& event){ void DesmumeFrame::pause(wxCommandEvent& event)
{
if (execute) { if (execute) {
execute=false; execute=false;
SPU_Pause(1); SPU_Pause(1);
@ -329,79 +479,90 @@ loop:
SPU_Pause(0); SPU_Pause(0);
} }
} }
void reset(wxCommandEvent& event){NDS_Reset();} void DesmumeFrame::frameCounter(wxCommandEvent& event)
{
void frameCounter(wxCommandEvent& event){
CommonSettings.hud.FrameCounterDisplay ^= true; CommonSettings.hud.FrameCounterDisplay ^= true;
osd->clear(); osd->clear();
} }
void DesmumeFrame::FPS(wxCommandEvent& event)
void FPS(wxCommandEvent& event){ {
CommonSettings.hud.FpsDisplay ^= true; CommonSettings.hud.FpsDisplay ^= true;
osd->clear(); osd->clear();
} }
void displayInput(wxCommandEvent& event){
void DesmumeFrame::displayInput(wxCommandEvent& event)
{
CommonSettings.hud.ShowInputDisplay ^= true; CommonSettings.hud.ShowInputDisplay ^= true;
osd->clear(); osd->clear();
} }
void displayGraphicalInput(wxCommandEvent& event){
void DesmumeFrame::displayGraphicalInput(wxCommandEvent& event)
{
CommonSettings.hud.ShowGraphicalInputDisplay ^= true; CommonSettings.hud.ShowGraphicalInputDisplay ^= true;
osd->clear(); osd->clear();
} }
void displayLagCounter(wxCommandEvent& event){ void DesmumeFrame::displayLagCounter(wxCommandEvent& event)
{
CommonSettings.hud.ShowLagFrameCounter ^= true; CommonSettings.hud.ShowLagFrameCounter ^= true;
osd->clear(); osd->clear();
} }
void displayMicrophone(wxCommandEvent& event){ void DesmumeFrame::displayMicrophone(wxCommandEvent& event)
{
CommonSettings.hud.ShowMicrophone ^= true; CommonSettings.hud.ShowMicrophone ^= true;
osd->clear(); osd->clear();
} }
void DesmumeFrame::setHUDFont(wxCommandEvent &event)
{
wxArrayString fontchoices;
for(int i = 0; i < font_Nums;i++)
{
fontchoices.Add(_T(fonts_list[i].name));
}
void mainG(int n) { wxSingleChoiceDialog fontDialog(this,
_T("Please select a font for use on the HUD:\n"),
_T("Configure HUD font"),
fontchoices);
fontDialog.SetSelection(fontchoices.GetCount() - 1);
if(fontDialog.ShowModal() == wxID_OK)
{
aggDraw.hud->setFont(fonts_list[fontDialog.GetSelection()].name);
}
}
void DesmumeFrame::mainG(int n)
{
if(CommonSettings.dispLayers[0][n]) if(CommonSettings.dispLayers[0][n])
GPU_remove(MainScreen.gpu, n); GPU_remove(MainScreen.gpu, n);
else else
GPU_addBack(MainScreen.gpu, n); GPU_addBack(MainScreen.gpu, n);
} }
void subG(int n) { void DesmumeFrame::subG(int n)
{
if(CommonSettings.dispLayers[1][n]) if(CommonSettings.dispLayers[1][n])
GPU_remove(SubScreen.gpu, n); GPU_remove(SubScreen.gpu, n);
else else
GPU_addBack(SubScreen.gpu, n); GPU_addBack(SubScreen.gpu, n);
} }
void mainGPU(wxCommandEvent& event){CommonSettings.showGpu.main^=true;} void DesmumeFrame::_3dView(wxCommandEvent& event)
void mainBG0(wxCommandEvent& event){mainG(0);} {
void mainBG1(wxCommandEvent& event){mainG(1);}
void mainBG2(wxCommandEvent& event){mainG(2);}
void mainBG3(wxCommandEvent& event){mainG(3);}
void subGPU(wxCommandEvent& event){CommonSettings.showGpu.sub^=true;}
void subBG0(wxCommandEvent& event){subG(0);}
void subBG1(wxCommandEvent& event){subG(1);}
void subBG2(wxCommandEvent& event){subG(2);}
void subBG3(wxCommandEvent& event){subG(3);}
void website(wxCommandEvent& event) {wxLaunchDefaultBrowser(_T("http://desmume.org/"));}
void forums(wxCommandEvent& event) {wxLaunchDefaultBrowser(_T("http://forums.desmume.org/index.php"));}
void submitABugReport(wxCommandEvent& event) {wxLaunchDefaultBrowser(_T("http://sourceforge.net/tracker/?func=add&group_id=164579&atid=832291"));}
void _3dView(wxCommandEvent& event) {
driver->VIEW3D_Init(); driver->VIEW3D_Init();
driver->view3d->Launch(); driver->view3d->Launch();
} }
void DesmumeFrame::saveStateAs(wxCommandEvent& event)
void saveStateAs(wxCommandEvent& event) { {
wxFileDialog dialog(this,_T("Save State As"),wxGetHomeDir(),_T(""),_T("*.dst"),wxFD_SAVE, wxDefaultPosition, wxDefaultSize); wxFileDialog dialog(this,_T("Save State As"),wxGetHomeDir(),_T(""),_T("*.dst"),wxFD_SAVE, wxDefaultPosition, wxDefaultSize);
if(dialog.ShowModal() == wxID_OK) if(dialog.ShowModal() == wxID_OK)
savestate_save (dialog.GetPath().mb_str()); savestate_save (dialog.GetPath().mb_str());
} }
void loadStateFrom(wxCommandEvent& event) { void DesmumeFrame::loadStateFrom(wxCommandEvent& event)
{
wxFileDialog dialog(this,_T("Load State From"),wxGetHomeDir(),_T(""),_T("*.dst"),wxFD_OPEN, wxDefaultPosition, wxDefaultSize); wxFileDialog dialog(this,_T("Load State From"),wxGetHomeDir(),_T(""),_T("*.dst"),wxFD_OPEN, wxDefaultPosition, wxDefaultSize);
if(dialog.ShowModal() == wxID_OK) if(dialog.ShowModal() == wxID_OK)
savestate_load (dialog.GetPath().mb_str()); savestate_load (dialog.GetPath().mb_str());
} }
void DesmumeFrame::closeRom(wxCommandEvent& event)
void closeRom(wxCommandEvent& event) { {
NDS_FreeROM(); NDS_FreeROM();
execute = false; execute = false;
SPU_Pause(1); SPU_Pause(1);
@ -410,42 +571,37 @@ loop:
#endif #endif
NDS_Reset(); NDS_Reset();
} }
void DesmumeFrame::importBackupMemory(wxCommandEvent& event)
void importBackupMemory(wxCommandEvent& event) { {
wxFileDialog dialog(this,_T("Import Backup Memory"),wxGetHomeDir(),_T(""),_T("*.duc, *.sav"),wxFD_OPEN, wxDefaultPosition, wxDefaultSize); wxFileDialog dialog(this,_T("Import Backup Memory"),wxGetHomeDir(),_T(""),_T("*.duc, *.sav"),wxFD_OPEN, wxDefaultPosition, wxDefaultSize);
if(dialog.ShowModal() == wxID_OK) if(dialog.ShowModal() == wxID_OK)
if (!NDS_ImportSave(dialog.GetPath().mb_str())) if (!NDS_ImportSave(dialog.GetPath().mb_str()))
wxMessageBox(wxString::Format(_T("Save was not successfully imported")),_T("Error"),wxOK | wxICON_ERROR,this); wxMessageBox(wxString::Format(_T("Save was not successfully imported")),_T("Error"),wxOK | wxICON_ERROR,this);
} }
void DesmumeFrame::exportBackupMemory(wxCommandEvent& event)
void exportBackupMemory(wxCommandEvent& event) { {
wxFileDialog dialog(this,_T("Export Backup Memory"),wxGetHomeDir(),_T(""),_T("*.duc, *.sav"),wxFD_SAVE, wxDefaultPosition, wxDefaultSize); wxFileDialog dialog(this,_T("Export Backup Memory"),wxGetHomeDir(),_T(""),_T("*.duc, *.sav"),wxFD_SAVE, wxDefaultPosition, wxDefaultSize);
if(dialog.ShowModal() == wxID_OK) if(dialog.ShowModal() == wxID_OK)
if (!NDS_ExportSave(dialog.GetPath().mb_str())) if (!NDS_ExportSave(dialog.GetPath().mb_str()))
wxMessageBox(wxString::Format(_T("Save was not successfully exported")),_T("Error"),wxOK | wxICON_ERROR,this); wxMessageBox(wxString::Format(_T("Save was not successfully exported")),_T("Error"),wxOK | wxICON_ERROR,this);
} }
void saveScreenshotAs(wxCommandEvent& event) { void DesmumeFrame::saveScreenshotAs(wxCommandEvent& event)
{
wxFileDialog dialog(this,_T("Save Screenshot As"),wxGetHomeDir(),_T(""),_T("*.png"),wxFD_SAVE, wxDefaultPosition, wxDefaultSize); wxFileDialog dialog(this,_T("Save Screenshot As"),wxGetHomeDir(),_T(""),_T("*.png"),wxFD_SAVE, wxDefaultPosition, wxDefaultSize);
if(dialog.ShowModal() == wxID_OK) if(dialog.ShowModal() == wxID_OK)
NDS_WritePNG(dialog.GetPath().mb_str()); NDS_WritePNG(dialog.GetPath().mb_str());
} }
void quickScreenshot(wxCommandEvent& event) { void DesmumeFrame::quickScreenshot(wxCommandEvent& event)
{
NDS_WritePNG(wxStandardPaths::Get().GetExecutablePath().mb_str());//TODO GetExecutablePath is wrong NDS_WritePNG(wxStandardPaths::Get().GetExecutablePath().mb_str());//TODO GetExecutablePath is wrong
} }
void DesmumeFrame::OnOpenLuaWindow(wxCommandEvent& WXUNUSED (event))
//TODO
void playMovie(wxCommandEvent& event) {}
void recordMovie(wxCommandEvent& event) {}
void stopMovie(wxCommandEvent& event) {FCEUI_StopMovie();}
void OnOpenLuaWindow(wxCommandEvent& WXUNUSED (event))
{ {
#ifdef WIN32 #ifdef WIN32
new wxLuaWindow(this, wxDefaultPosition, wxSize(600, 390)); new wxLuaWindow(this, wxDefaultPosition, wxSize(600, 390));
#endif #endif
} }
void DesmumeFrame::OnOpenControllerConfiguration(wxCommandEvent& WXUNUSED (event))
void OnOpenControllerConfiguration(wxCommandEvent& WXUNUSED (event))
{ {
//#ifndef _MSC_VER //#ifndef _MSC_VER
// new PADConfigDialogSimple(this); // new PADConfigDialogSimple(this);
@ -453,86 +609,6 @@ loop:
//#endif //#endif
} }
wxMenu* MakeStatesSubMenu( int baseid ) const
{
wxMenu* mnuSubstates = new wxMenu();
for (int i = 0; i < 10; i++)
{
mnuSubstates->Append( baseid+i, wxString::Format(_T("Slot %d"), i) );
}
return mnuSubstates;
}
void Menu_SaveStates(wxCommandEvent &event);
void Menu_LoadStates(wxCommandEvent &event);
void NDSInitialize();
void OnRotation(wxCommandEvent &event);
void ChangeRotation(int rot, bool skip);
void onResize(wxSizeEvent &event);
bool LoadSettings();
bool SaveSettings();
void OnClose(wxCloseEvent &event);
void OnOpenRecent(wxCommandEvent &event);
private:
struct NDS_fw_config_data fw_config;
wxFileHistory* history;
#ifdef GDB_STUB
gdbstub_handle_t arm9_gdb_stub;
gdbstub_handle_t arm7_gdb_stub;
struct armcpu_memory_iface *arm9_memio;
struct armcpu_memory_iface *arm7_memio;
struct armcpu_ctrl_iface *arm9_ctrl_iface;
struct armcpu_ctrl_iface *arm7_ctrl_iface;
#endif
DECLARE_EVENT_TABLE()
};
enum
{
wPause,
wReset,
wFrameCounter,
wFPS,
wDisplayInput,
wDisplayGraphicalInput,
wDisplayLagCounter,
wDisplayMicrophone,
wMainGPU,
wMainBG0,
wMainBG1,
wMainBG2,
wMainBG3,
wSubGPU,
wSubBG0,
wSubBG1,
wSubBG2,
wSubBG3,
wWebsite,
wForums,
wSubmitABugReport,
w3dView,
wSaveStateAs,
wLoadStateFrom,
wCloseRom,
wImportBackupMemory,
wExportBackupMemory,
wPlayMovie,
wRecordMovie,
wStopMovie,
wSaveScreenshotAs,
wQuickScreenshot,
wLuaWindow,
wConfigureControls,
wRot0,
wRot90,
wRot180,
wRot270,
/* stupid enums: these two should be the at the end */
wLoadState01,
wSaveState01 = wLoadState01+20
};
void DesmumeFrame::Menu_SaveStates(wxCommandEvent &event){savestate_slot(event.GetId() - wSaveState01);} void DesmumeFrame::Menu_SaveStates(wxCommandEvent &event){savestate_slot(event.GetId() - wSaveState01);}
void DesmumeFrame::Menu_LoadStates(wxCommandEvent &event){loadstate_slot(event.GetId() - wLoadState01);} void DesmumeFrame::Menu_LoadStates(wxCommandEvent &event){loadstate_slot(event.GetId() - wLoadState01);}
@ -599,6 +675,7 @@ EVT_MENU(wDisplayInput,DesmumeFrame::displayInput)
EVT_MENU(wDisplayGraphicalInput,DesmumeFrame::displayGraphicalInput) EVT_MENU(wDisplayGraphicalInput,DesmumeFrame::displayGraphicalInput)
EVT_MENU(wDisplayLagCounter,DesmumeFrame::displayLagCounter) EVT_MENU(wDisplayLagCounter,DesmumeFrame::displayLagCounter)
EVT_MENU(wDisplayMicrophone,DesmumeFrame::displayMicrophone) EVT_MENU(wDisplayMicrophone,DesmumeFrame::displayMicrophone)
EVT_MENU(wSetHUDFont,DesmumeFrame::setHUDFont)
EVT_MENU(wMainGPU,DesmumeFrame::mainGPU) EVT_MENU(wMainGPU,DesmumeFrame::mainGPU)
EVT_MENU(wMainBG0,DesmumeFrame::mainBG0) EVT_MENU(wMainBG0,DesmumeFrame::mainBG0)
@ -646,173 +723,6 @@ END_EVENT_TABLE()
IMPLEMENT_APP(Desmume) IMPLEMENT_APP(Desmume)
static SPADInitialize PADInitialize;
void DesmumeFrame::NDSInitialize() {
NDS_FillDefaultFirmwareConfigData( &fw_config);
#ifdef HAVE_LIBAGG
Desmume_InitOnce();
aggDraw.hud->attach((u8*)GPU_screen, 256, 384, 1024);//TODO
#endif
//TODO
addon_type = NDS_ADDON_NONE;
addonsChangePak(addon_type);
#ifdef GDB_STUB
arm9_memio = &arm9_base_memory_iface;
arm7_memio = &arm7_base_memory_iface;
NDS_Init( arm9_memio, &arm9_ctrl_iface,
arm7_memio, &arm7_ctrl_iface);
#else
NDS_Init();
#endif
SPU_ChangeSoundCore(SNDCORE_SDL, 735 * 4);
NDS_3D_ChangeCore(0);
NDS_CreateDummyFirmware( &fw_config);
}
bool Desmume::OnInit()
{
if ( !wxApp::OnInit() )
return false;
#ifdef WIN32
extern void OpenConsole();
OpenConsole();
#endif
SetAppName(_T("desmume"));
wxConfigBase *pConfig = new wxFileConfig();
wxConfigBase::Set(pConfig);
wxString emu_version(EMU_DESMUME_NAME_AND_VERSION(), wxConvUTF8);
DesmumeFrame *frame = new DesmumeFrame(emu_version);
frame->NDSInitialize();
frame->Show(true);
PADInitialize.padNumber = 1;
#ifndef WIN32
extern void Initialize(void *init);
Initialize(&PADInitialize);
#endif
return true;
}
DesmumeFrame::DesmumeFrame(const wxString& title)
: wxFrame(NULL, wxID_ANY, title)
{
history = new wxFileHistory;
wxMenu *fileMenu = new wxMenu;
wxMenu *emulationMenu = new wxMenu;
wxMenu *viewMenu = new wxMenu;
wxMenu *configMenu = new wxMenu;
wxMenu *toolsMenu = new wxMenu;
wxMenu *helpMenu = new wxMenu;
wxMenu *saves(MakeStatesSubMenu(wSaveState01));
wxMenu *loads(MakeStatesSubMenu(wLoadState01));
wxMenu *recentMenu = new wxMenu;
history->UseMenu(recentMenu);
fileMenu->Append(wxID_OPEN, _T("Load R&om\tAlt-R"));
fileMenu->AppendSubMenu(recentMenu, _T("Recent files"));
fileMenu->Append(wCloseRom, _T("Close Rom"));
fileMenu->AppendSeparator();
fileMenu->Append(wSaveStateAs, _T("Save State As..."));
fileMenu->Append(wLoadStateFrom, _T("Load State From..."));
fileMenu->AppendSubMenu(saves, _T("Save State"));
fileMenu->AppendSubMenu(loads, _T("Load State"));
fileMenu->AppendSeparator();
fileMenu->Append(wImportBackupMemory, _T("Import Backup Memory..."));
fileMenu->Append(wExportBackupMemory, _T("Export Backup Memory..."));
fileMenu->AppendSeparator();
fileMenu->Append(wSaveScreenshotAs, _T("Save Screenshot As"));
fileMenu->Append(wQuickScreenshot, _T("Quick Screenshot"));
fileMenu->AppendSeparator();
fileMenu->Append(wPlayMovie, _T("Play Movie"));
fileMenu->Append(wRecordMovie, _T("Record Movie"));
fileMenu->Append(wStopMovie, _T("Stop Movie"));
fileMenu->AppendSeparator();
fileMenu->Append(wLuaWindow, _T("New Lua Script Window..."));
fileMenu->AppendSeparator();
fileMenu->Append(wxID_EXIT, _T("E&xit\tAlt-X"), _T("Quit this program"));
emulationMenu->Append(wPause, _T("&Pause\tAlt-P"), _T("Pause Emulation"));
emulationMenu->Append(wReset, _T("&Reset\tAlt-R"), _T("Reset Emulation"));
wxMenu *rotateMenu = new wxMenu;
{
rotateMenu->AppendRadioItem(wRot0, _T("0"));
rotateMenu->AppendRadioItem(wRot90, _T("90"));
rotateMenu->AppendRadioItem(wRot180, _T("180"));
rotateMenu->AppendRadioItem(wRot270, _T("270"));
}
viewMenu->AppendSubMenu(rotateMenu, _T("Rotate"));
viewMenu->AppendSeparator();
viewMenu->AppendCheckItem(wFrameCounter, _T("&Display Frame Counter"));
viewMenu->AppendCheckItem(wFPS, _T("&Display FPS"));
viewMenu->AppendCheckItem(wDisplayInput, _T("&Display Input"));
viewMenu->AppendCheckItem(wDisplayGraphicalInput, _T("&Display Graphical Input"));
viewMenu->AppendCheckItem(wDisplayLagCounter, _T("&Display Lag Counter"));
viewMenu->AppendCheckItem(wDisplayMicrophone, _T("&Display Microphone"));
toolsMenu->Append(w3dView, _T("&3d Viewer"));
wxMenu *layersMenu = new wxMenu;
{
layersMenu->AppendCheckItem(wMainGPU, _T("Main GPU"));
layersMenu->Check(wMainGPU, true);
layersMenu->AppendCheckItem(wMainBG0, _T("Main BG 0"));
layersMenu->Check(wMainBG0, true);
layersMenu->AppendCheckItem(wMainBG1, _T("Main BG 1"));
layersMenu->Check(wMainBG1, true);
layersMenu->AppendCheckItem(wMainBG2, _T("Main BG 2"));
layersMenu->Check(wMainBG2, true);
layersMenu->AppendCheckItem(wMainBG3, _T("Main BG 3"));
layersMenu->Check(wMainBG3, true);
layersMenu->AppendSeparator();
layersMenu->AppendCheckItem(wSubGPU, _T("Sub GPU"));
layersMenu->Check(wSubGPU, true);
layersMenu->AppendCheckItem(wSubBG0, _T("Sub BG 0"));
layersMenu->Check(wSubBG0, true);
layersMenu->AppendCheckItem(wSubBG1, _T("Sub BG 1"));
layersMenu->Check(wSubBG1, true);
layersMenu->AppendCheckItem(wSubBG2, _T("Sub BG 2"));
layersMenu->Check(wSubBG2, true);
layersMenu->AppendCheckItem(wSubBG3, _T("Sub BG 3"));
layersMenu->Check(wSubBG3, true);
}
configMenu->Append(wConfigureControls, _T("Controls"));
toolsMenu->AppendSeparator();
toolsMenu->AppendSubMenu(layersMenu, _T("View Layers"));
helpMenu->Append(wWebsite, _T("&Website"));
helpMenu->Append(wForums, _T("&Forums"));
helpMenu->Append(wSubmitABugReport, _T("&Submit A Bug Report"));
helpMenu->Append(wxID_ABOUT);
wxMenuBar *menuBar = new wxMenuBar();
menuBar->Append(fileMenu, _T("&File"));
menuBar->Append(emulationMenu, _T("&Emulation"));
menuBar->Append(viewMenu, _T("&View"));
menuBar->Append(configMenu, _T("&Config"));
menuBar->Append(toolsMenu, _T("&Tools"));
menuBar->Append(helpMenu, _T("&Help"));
SetMenuBar(menuBar);
// CreateStatusBar(2);
// SetStatusText("Welcome to Desmume!");
LoadSettings();
rotateMenu->Check(wRot0+(nds_screen_rotation_angle/90), true);
ChangeRotation(nds_screen_rotation_angle, false);
}
#ifdef WIN32 #ifdef WIN32
/* /*
@ -863,3 +773,133 @@ void DesmumeFrame::OnOpenRecent(wxCommandEvent &event) {
else else
history->RemoveFileFromHistory(id); history->RemoveFileFromHistory(id);
} }
void DesmumeFrame::loadfileMenu(wxMenu *fileMenu)
{
wxMenu *recentMenu = new wxMenu;
wxMenu *saves(MakeStatesSubMenu(wSaveState01));
wxMenu *loads(MakeStatesSubMenu(wLoadState01));
fileMenu->Append(wxID_OPEN, _T("Load R&om\tAlt-R"));
fileMenu->AppendSubMenu(recentMenu, _T("Recent files"));
fileMenu->Append(wCloseRom, _T("Close Rom"));
fileMenu->AppendSeparator();
fileMenu->Append(wSaveStateAs, _T("Save State As..."));
fileMenu->Append(wLoadStateFrom, _T("Load State From..."));
fileMenu->AppendSubMenu(saves, _T("Save State"));
fileMenu->AppendSubMenu(loads, _T("Load State"));
fileMenu->AppendSeparator();
fileMenu->Append(wImportBackupMemory, _T("Import Backup Memory..."));
fileMenu->Append(wExportBackupMemory, _T("Export Backup Memory..."));
fileMenu->AppendSeparator();
fileMenu->Append(wSaveScreenshotAs, _T("Save Screenshot As"));
fileMenu->Append(wQuickScreenshot, _T("Quick Screenshot"));
fileMenu->AppendSeparator();
fileMenu->Append(wPlayMovie, _T("Play Movie"));
fileMenu->Append(wRecordMovie, _T("Record Movie"));
fileMenu->Append(wStopMovie, _T("Stop Movie"));
fileMenu->AppendSeparator();
fileMenu->Append(wLuaWindow, _T("New Lua Script Window..."));
fileMenu->AppendSeparator();
fileMenu->Append(wxID_EXIT, _T("E&xit\tAlt-X"), _T("Quit this program"));
// history->UseMenu(recentMenu);
}
void DesmumeFrame::loademulationMenu(wxMenu *emulationMenu)
{
emulationMenu->Append(wPause, _T("&Pause\tAlt-P"), _T("Pause Emulation"));
emulationMenu->Append(wReset, _T("&Reset\tAlt-R"), _T("Reset Emulation"));
}
void DesmumeFrame::loadrotateMenu(wxMenu *rotateMenu)
{
rotateMenu->AppendRadioItem(wRot0, _T("0"));
rotateMenu->AppendRadioItem(wRot90, _T("90"));
rotateMenu->AppendRadioItem(wRot180, _T("180"));
rotateMenu->AppendRadioItem(wRot270, _T("270"));
rotateMenu->Check(wRot0+(nds_screen_rotation_angle/90), true);
}
void DesmumeFrame::loadviewMenu(wxMenu *viewMenu)
{
wxMenu *rotateMenu = new wxMenu;
viewMenu->AppendSubMenu(rotateMenu, _T("Rotate"));
viewMenu->AppendSeparator();
viewMenu->Append(wSetHUDFont, _T("&Set HUD Font"));
viewMenu->AppendCheckItem(wFrameCounter, _T("&Display Frame Counter"));
viewMenu->AppendCheckItem(wFPS, _T("&Display FPS"));
viewMenu->AppendCheckItem(wDisplayInput, _T("&Display Input"));
viewMenu->AppendCheckItem(wDisplayGraphicalInput, _T("&Display Graphical Input"));
viewMenu->AppendCheckItem(wDisplayLagCounter, _T("&Display Lag Counter"));
viewMenu->AppendCheckItem(wDisplayMicrophone, _T("&Display Microphone"));
loadrotateMenu(rotateMenu);
}
void DesmumeFrame::loadtoolsMenu(wxMenu *toolsMenu)
{
wxMenu *layersMenu = new wxMenu;
toolsMenu->Append(w3dView, _T("&3d Viewer"));
toolsMenu->AppendSeparator();
toolsMenu->AppendSubMenu(layersMenu, _T("View Layers"));
loadlayersMenu(layersMenu);
}
void DesmumeFrame::loadlayersMenu(wxMenu *layersMenu)
{
layersMenu->AppendCheckItem(wMainGPU, _T("Main GPU"));
layersMenu->Check(wMainGPU, true);
layersMenu->AppendCheckItem(wMainBG0, _T("Main BG 0"));
layersMenu->Check(wMainBG0, true);
layersMenu->AppendCheckItem(wMainBG1, _T("Main BG 1"));
layersMenu->Check(wMainBG1, true);
layersMenu->AppendCheckItem(wMainBG2, _T("Main BG 2"));
layersMenu->Check(wMainBG2, true);
layersMenu->AppendCheckItem(wMainBG3, _T("Main BG 3"));
layersMenu->Check(wMainBG3, true);
layersMenu->AppendSeparator();
layersMenu->AppendCheckItem(wSubGPU, _T("Sub GPU"));
layersMenu->Check(wSubGPU, true);
layersMenu->AppendCheckItem(wSubBG0, _T("Sub BG 0"));
layersMenu->Check(wSubBG0, true);
layersMenu->AppendCheckItem(wSubBG1, _T("Sub BG 1"));
layersMenu->Check(wSubBG1, true);
layersMenu->AppendCheckItem(wSubBG2, _T("Sub BG 2"));
layersMenu->Check(wSubBG2, true);
layersMenu->AppendCheckItem(wSubBG3, _T("Sub BG 3"));
layersMenu->Check(wSubBG3, true);
}
void DesmumeFrame::loadconfigMenu(wxMenu *configMenu)
{
configMenu->Append(wConfigureControls, _T("Controls"));
}
void DesmumeFrame::loadhelpMenu(wxMenu *helpMenu)
{
helpMenu->Append(wWebsite, _T("&Website"));
helpMenu->Append(wForums, _T("&Forums"));
helpMenu->Append(wSubmitABugReport, _T("&Submit A Bug Report"));
helpMenu->Append(wxID_ABOUT);
}
void DesmumeFrame::loadmenuBar(wxMenuBar *menuBar)
{
wxMenu *fileMenu = new wxMenu;
wxMenu *emulationMenu = new wxMenu;
wxMenu *viewMenu = new wxMenu;
wxMenu *configMenu = new wxMenu;
wxMenu *toolsMenu = new wxMenu;
wxMenu *helpMenu = new wxMenu;
menuBar->Append(fileMenu, _T("&File"));
menuBar->Append(emulationMenu, _T("&Emulation"));
menuBar->Append(viewMenu, _T("&View"));
menuBar->Append(configMenu, _T("&Config"));
menuBar->Append(toolsMenu, _T("&Tools"));
menuBar->Append(helpMenu, _T("&Help"));
loadfileMenu(fileMenu);
loademulationMenu(emulationMenu);
loadconfigMenu(configMenu);
loadtoolsMenu(toolsMenu);
loadhelpMenu(helpMenu);
loadviewMenu(viewMenu);
}

173
desmume/src/wx/wxMain.h Normal file
View File

@ -0,0 +1,173 @@
#include "NDSSystem.h"
#include <wx/wxprec.h>
#include "movie.h"
#include <wx/docview.h>
#include <wx/config.h>
static int nds_screen_rotation_angle;
static wxFileConfig *desmumeConfig;
enum
{
wPause = 1,
wReset,
wFrameCounter,
wFPS,
wDisplayInput,
wDisplayGraphicalInput,
wDisplayLagCounter,
wDisplayMicrophone,
wSetHUDFont,
wMainGPU,
wMainBG0,
wMainBG1,
wMainBG2,
wMainBG3,
wSubGPU,
wSubBG0,
wSubBG1,
wSubBG2,
wSubBG3,
wWebsite,
wForums,
wSubmitABugReport,
w3dView,
wSaveStateAs,
wLoadStateFrom,
wCloseRom,
wImportBackupMemory,
wExportBackupMemory,
wPlayMovie,
wRecordMovie,
wStopMovie,
wSaveScreenshotAs,
wQuickScreenshot,
wLuaWindow,
wConfigureControls,
wRot0,
wRot90,
wRot180,
wRot270,
/* stupid enums: these two should be the at the end */
wLoadState01,
wSaveState01 = wLoadState01+20
};
class Desmume: public wxApp
{
public:
virtual bool OnInit();
};
class DesmumeFrame: public wxFrame
{
public:
DesmumeFrame(const wxString& title);
~DesmumeFrame() {delete history;}
void OnQuit(wxCommandEvent& WXUNUSED(event));
void OnAbout(wxCommandEvent& WXUNUSED(event));
void applyInput();
//TODO integrate paths system?
void LoadRom(wxCommandEvent& event);
//----------------------------------------------------------------------------
// Touchscreen
//----------------------------------------------------------------------------
// De-transform coordinates.
// Returns true if the coordinates are within the touchscreen.
bool DetransformTouchCoords(int& X, int& Y);
void OnTouchEvent(wxMouseEvent& evt);
//----------------------------------------------------------------------------
// Video
//----------------------------------------------------------------------------
void gpu_screen_to_rgb(u8 *rgb1, u8 *rgb2);
//TODO should integrate filter system
void onPaint(wxPaintEvent &event);
void onIdle(wxIdleEvent &event);
void pause(wxCommandEvent& event);
void reset(wxCommandEvent& event){NDS_Reset();}
void frameCounter(wxCommandEvent& event);
void FPS(wxCommandEvent& event);
void displayInput(wxCommandEvent& event);
void displayGraphicalInput(wxCommandEvent& event);
void displayLagCounter(wxCommandEvent& event);
void displayMicrophone(wxCommandEvent& event);
void setHUDFont(wxCommandEvent &event);
void mainG(int n);
void subG(int n);
void mainGPU(wxCommandEvent& event){CommonSettings.showGpu.main^=true;}
void mainBG0(wxCommandEvent& event){mainG(0);}
void mainBG1(wxCommandEvent& event){mainG(1);}
void mainBG2(wxCommandEvent& event){mainG(2);}
void mainBG3(wxCommandEvent& event){mainG(3);}
void subGPU(wxCommandEvent& event){CommonSettings.showGpu.sub^=true;}
void subBG0(wxCommandEvent& event){subG(0);}
void subBG1(wxCommandEvent& event){subG(1);}
void subBG2(wxCommandEvent& event){subG(2);}
void subBG3(wxCommandEvent& event){subG(3);}
void website(wxCommandEvent& event) {wxLaunchDefaultBrowser(_T("http://desmume.org/"));}
void forums(wxCommandEvent& event) {wxLaunchDefaultBrowser(_T("http://forums.desmume.org/index.php"));}
void submitABugReport(wxCommandEvent& event) {wxLaunchDefaultBrowser(_T("http://sourceforge.net/tracker/?func=add&group_id=164579&atid=832291"));}
void _3dView(wxCommandEvent& event);
void saveStateAs(wxCommandEvent& event);
void loadStateFrom(wxCommandEvent& event);
void closeRom(wxCommandEvent& event);
void importBackupMemory(wxCommandEvent& event);
void exportBackupMemory(wxCommandEvent& event);
void saveScreenshotAs(wxCommandEvent& event);
void quickScreenshot(wxCommandEvent& event);
//TODO
void playMovie(wxCommandEvent& event) {}
void recordMovie(wxCommandEvent& event) {}
void stopMovie(wxCommandEvent& event) {FCEUI_StopMovie();}
void OnOpenLuaWindow(wxCommandEvent& WXUNUSED (event));
void OnOpenControllerConfiguration(wxCommandEvent& WXUNUSED (event));
wxMenu* MakeStatesSubMenu( int baseid ) const
{
wxMenu* mnuSubstates = new wxMenu();
for (int i = 0; i < 10; i++)
{
mnuSubstates->Append( baseid+i, wxString::Format(_T("Slot %d"), i) );
}
return mnuSubstates;
}
void Menu_SaveStates(wxCommandEvent &event);
void Menu_LoadStates(wxCommandEvent &event);
void NDSInitialize();
void OnRotation(wxCommandEvent &event);
void ChangeRotation(int rot, bool skip);
void onResize(wxSizeEvent &event);
bool LoadSettings();
bool SaveSettings();
void OnClose(wxCloseEvent &event);
void OnOpenRecent(wxCommandEvent &event);
private:
void loadfileMenu(wxMenu *fileMenu);
void loadmenuBar(wxMenuBar *menuBar);
void loadhelpMenu(wxMenu *helpMenu);
void loadconfigMenu(wxMenu *configMenu);
void loadtoolsMenu(wxMenu *toolsMenu);
void loadlayersMenu(wxMenu *layersMenu);
void loadviewMenu(wxMenu *viewMenu);
void loadrotateMenu(wxMenu *rotateMenu);
void loademulationMenu(wxMenu *emulationMenu);
struct NDS_fw_config_data fw_config;
wxFileHistory* history;
#ifdef GDB_STUB
gdbstub_handle_t arm9_gdb_stub;
gdbstub_handle_t arm7_gdb_stub;
struct armcpu_memory_iface *arm9_memio;
struct armcpu_memory_iface *arm7_memio;
struct armcpu_ctrl_iface *arm9_ctrl_iface;
struct armcpu_ctrl_iface *arm7_ctrl_iface;
#endif
DECLARE_EVENT_TABLE()
};