From 1c529a52e7b0927fd31b2442aeae877c368604d9 Mon Sep 17 00:00:00 2001 From: spacy51 Date: Sat, 8 Mar 2008 13:59:23 +0000 Subject: [PATCH] Update MSVC2008 project files. Fix compiler errors. --- VBA2008.sln | 49 +- VBA2008.vcproj | 868 ++++++++++------------------------- doc/DevInfo.txt | 23 +- nasm.rules | 168 +++++++ src/win32/MainWnd.cpp | 4 +- src/win32/MainWnd.h | 2 + src/win32/MainWndOptions.cpp | 12 +- src/win32/OpenGL.cpp | 2 +- src/win32/VBA.cpp | 2 +- src/win32/stdafx.h | 33 +- 10 files changed, 451 insertions(+), 712 deletions(-) create mode 100644 nasm.rules diff --git a/VBA2008.sln b/VBA2008.sln index 4a385055..1bfdc565 100644 --- a/VBA2008.sln +++ b/VBA2008.sln @@ -2,72 +2,25 @@ Microsoft Visual Studio Solution File, Format Version 10.00 # Visual Studio 2008 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "VisualBoyAdvance", "VBA2008.vcproj", "{6D4C5EC8-933F-4C05-A1BF-498E658576DF}" ProjectSection(ProjectDependencies) = postProject - {DB5C12E9-BCD3-4517-8708-475C0D1D88CE} = {DB5C12E9-BCD3-4517-8708-475C0D1D88CE} - {96E945F7-0377-48DA-A5F8-1C192DE9F25F} = {96E945F7-0377-48DA-A5F8-1C192DE9F25F} - {B938FBD9-C7F9-4BF7-8C27-68865D1FA092} = {B938FBD9-C7F9-4BF7-8C27-68865D1FA092} {7AEC599C-7C82-4F00-AA60-411E0A359CB0} = {7AEC599C-7C82-4F00-AA60-411E0A359CB0} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "..\dependencies\zlib\zlib2008.vcproj", "{B938FBD9-C7F9-4BF7-8C27-68865D1FA092}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libpng", "..\dependencies\libpng\libpng2008.vcproj", "{96E945F7-0377-48DA-A5F8-1C192DE9F25F}" - ProjectSection(ProjectDependencies) = postProject - {B938FBD9-C7F9-4BF7-8C27-68865D1FA092} = {B938FBD9-C7F9-4BF7-8C27-68865D1FA092} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "File_Extractor", "..\dependencies\File_Extractor-0.4.2\File_Extractor2008.vcproj", "{7AEC599C-7C82-4F00-AA60-411E0A359CB0}" - ProjectSection(ProjectDependencies) = postProject - {B938FBD9-C7F9-4BF7-8C27-68865D1FA092} = {B938FBD9-C7F9-4BF7-8C27-68865D1FA092} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cximage", "..\dependencies\cximage\cximage2008.vcproj", "{DB5C12E9-BCD3-4517-8708-475C0D1D88CE}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "File_Extractor", "..\dependencies\File_Extractor-0.4.3\File_Extractor2008.vcproj", "{7AEC599C-7C82-4F00-AA60-411E0A359CB0}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 Release|Win32 = Release|Win32 - Release|x64 = Release|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {6D4C5EC8-933F-4C05-A1BF-498E658576DF}.Debug|Win32.ActiveCfg = Debug|Win32 {6D4C5EC8-933F-4C05-A1BF-498E658576DF}.Debug|Win32.Build.0 = Debug|Win32 - {6D4C5EC8-933F-4C05-A1BF-498E658576DF}.Debug|x64.ActiveCfg = Debug|x64 - {6D4C5EC8-933F-4C05-A1BF-498E658576DF}.Debug|x64.Build.0 = Debug|x64 {6D4C5EC8-933F-4C05-A1BF-498E658576DF}.Release|Win32.ActiveCfg = Release|Win32 {6D4C5EC8-933F-4C05-A1BF-498E658576DF}.Release|Win32.Build.0 = Release|Win32 - {6D4C5EC8-933F-4C05-A1BF-498E658576DF}.Release|x64.ActiveCfg = Release|x64 - {6D4C5EC8-933F-4C05-A1BF-498E658576DF}.Release|x64.Build.0 = Release|x64 - {B938FBD9-C7F9-4BF7-8C27-68865D1FA092}.Debug|Win32.ActiveCfg = Debug|Win32 - {B938FBD9-C7F9-4BF7-8C27-68865D1FA092}.Debug|Win32.Build.0 = Debug|Win32 - {B938FBD9-C7F9-4BF7-8C27-68865D1FA092}.Debug|x64.ActiveCfg = Debug|x64 - {B938FBD9-C7F9-4BF7-8C27-68865D1FA092}.Debug|x64.Build.0 = Debug|x64 - {B938FBD9-C7F9-4BF7-8C27-68865D1FA092}.Release|Win32.ActiveCfg = Release|Win32 - {B938FBD9-C7F9-4BF7-8C27-68865D1FA092}.Release|Win32.Build.0 = Release|Win32 - {B938FBD9-C7F9-4BF7-8C27-68865D1FA092}.Release|x64.ActiveCfg = Release|x64 - {B938FBD9-C7F9-4BF7-8C27-68865D1FA092}.Release|x64.Build.0 = Release|x64 - {96E945F7-0377-48DA-A5F8-1C192DE9F25F}.Debug|Win32.ActiveCfg = Debug|Win32 - {96E945F7-0377-48DA-A5F8-1C192DE9F25F}.Debug|Win32.Build.0 = Debug|Win32 - {96E945F7-0377-48DA-A5F8-1C192DE9F25F}.Debug|x64.ActiveCfg = Debug|x64 - {96E945F7-0377-48DA-A5F8-1C192DE9F25F}.Debug|x64.Build.0 = Debug|x64 - {96E945F7-0377-48DA-A5F8-1C192DE9F25F}.Release|Win32.ActiveCfg = Release|Win32 - {96E945F7-0377-48DA-A5F8-1C192DE9F25F}.Release|Win32.Build.0 = Release|Win32 - {96E945F7-0377-48DA-A5F8-1C192DE9F25F}.Release|x64.ActiveCfg = Release|x64 - {96E945F7-0377-48DA-A5F8-1C192DE9F25F}.Release|x64.Build.0 = Release|x64 {7AEC599C-7C82-4F00-AA60-411E0A359CB0}.Debug|Win32.ActiveCfg = Debug|Win32 {7AEC599C-7C82-4F00-AA60-411E0A359CB0}.Debug|Win32.Build.0 = Debug|Win32 - {7AEC599C-7C82-4F00-AA60-411E0A359CB0}.Debug|x64.ActiveCfg = Debug|x64 - {7AEC599C-7C82-4F00-AA60-411E0A359CB0}.Debug|x64.Build.0 = Debug|x64 {7AEC599C-7C82-4F00-AA60-411E0A359CB0}.Release|Win32.ActiveCfg = Release|Win32 {7AEC599C-7C82-4F00-AA60-411E0A359CB0}.Release|Win32.Build.0 = Release|Win32 - {7AEC599C-7C82-4F00-AA60-411E0A359CB0}.Release|x64.ActiveCfg = Release|x64 - {7AEC599C-7C82-4F00-AA60-411E0A359CB0}.Release|x64.Build.0 = Release|x64 - {DB5C12E9-BCD3-4517-8708-475C0D1D88CE}.Debug|Win32.ActiveCfg = Debug|Win32 - {DB5C12E9-BCD3-4517-8708-475C0D1D88CE}.Debug|Win32.Build.0 = Debug|Win32 - {DB5C12E9-BCD3-4517-8708-475C0D1D88CE}.Debug|x64.ActiveCfg = Debug|Win32 - {DB5C12E9-BCD3-4517-8708-475C0D1D88CE}.Release|Win32.ActiveCfg = Release|Win32 - {DB5C12E9-BCD3-4517-8708-475C0D1D88CE}.Release|Win32.Build.0 = Release|Win32 - {DB5C12E9-BCD3-4517-8708-475C0D1D88CE}.Release|x64.ActiveCfg = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/VBA2008.vcproj b/VBA2008.vcproj index c8275291..b21bb87a 100644 --- a/VBA2008.vcproj +++ b/VBA2008.vcproj @@ -1,7 +1,7 @@ - - @@ -39,7 +36,7 @@ Name="VCCustomBuildTool" /> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -500,14 +262,6 @@ WholeProgramOptimization="true" /> - - - - - - - - - @@ -565,10 +297,6 @@ RelativePath=".\src\interframe.cpp" > - - @@ -592,202 +320,114 @@ RelativePath=".\src\hq2x.cpp" > - - - - - - - + + + + + + + - - - + + + + + + + - - - + + + + + + + - - - + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - @@ -860,26 +460,6 @@ CompileAs="1" /> - - - - - - - - - + + @@ -1069,6 +653,10 @@ RelativePath=".\src\win32\FileDlg.cpp" > + + @@ -1153,10 +741,6 @@ RelativePath=".\src\win32\MemoryViewerDlg.cpp" > - - @@ -1189,14 +773,6 @@ RelativePath=".\src\win32\SelectPlugin.cpp" > - - - - @@ -1209,10 +785,6 @@ RelativePath=".\src\win32\TileView.cpp" > - - @@ -1285,10 +857,6 @@ RelativePath=".\src\win32\Direct3D.cpp" > - - @@ -1297,10 +865,6 @@ RelativePath=".\src\win32\DirectSound.cpp" > - - @@ -1320,22 +884,18 @@ CompileAs="1" /> - - - - - - + + + + + + - - + + + + + + + + + + + + @@ -1422,14 +1002,6 @@ RelativePath=".\src\hq2x.h" > - - - - @@ -1438,13 +1010,21 @@ RelativePath=".\src\lq2x.h" > + + + + + + + + @@ -1595,6 +1183,10 @@ RelativePath=".\src\win32\FileDlg.h" > + + @@ -1663,10 +1255,6 @@ RelativePath=".\src\win32\MemoryViewerDlg.h" > - - @@ -1699,10 +1287,6 @@ RelativePath=".\src\win32\SelectPlugin.h" > - - @@ -1715,14 +1299,6 @@ RelativePath=".\src\win32\TileView.h" > - - - - @@ -1791,6 +1367,10 @@ RelativePath=".\src\win32\Input.h" > + + @@ -1808,6 +1388,54 @@ > + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/win32/MainWnd.cpp b/src/win32/MainWnd.cpp index 0c8548d7..36816dfa 100644 --- a/src/win32/MainWnd.cpp +++ b/src/win32/MainWnd.cpp @@ -444,8 +444,6 @@ void MainWnd::OnClose() { emulating = false; CWnd::OnClose(); - - delete this; } bool MainWnd::FileRun() @@ -767,7 +765,7 @@ void MainWnd::OnSizing(UINT fwSide, LPRECT pRect) 0 ); MENUBARINFO mbi; mbi.cbSize = sizeof(MENUBARINFO); - this->GetMenuBarInfo( OBJID_MENU, 0, &mbi ); + GetMenuBarInfo( this->GetSafeHwnd(), OBJID_MENU, 0, &mbi ); const LONG menuHeight = mbi.rcBar.bottom - mbi.rcBar.top + 1; // +1 because of that white line, wherever it comes from const LONG width = size.right - size.left; diff --git a/src/win32/MainWnd.h b/src/win32/MainWnd.h index 472fb8ba..16a5874a 100644 --- a/src/win32/MainWnd.h +++ b/src/win32/MainWnd.h @@ -26,6 +26,8 @@ // MainWnd.h : header file // +#include "stdafx.h" + ///////////////////////////////////////////////////////////////////////////// // MainWnd window diff --git a/src/win32/MainWndOptions.cpp b/src/win32/MainWndOptions.cpp index 2d028925..5efe3479 100644 --- a/src/win32/MainWndOptions.cpp +++ b/src/win32/MainWndOptions.cpp @@ -36,14 +36,14 @@ #include "BIOSDialog.h" #include "../System.h" -#include "../agbprint.h" -#include "../GBA.h" +#include "../agb/agbprint.h" +#include "../agb/GBA.h" #include "../Globals.h" #include "../Sound.h" -#include "../gb/GB.h" -#include "../gb/gbGlobals.h" -#include "../gb/gbPrinter.h" -#include "../Link.h" +#include "../dmg/GB.h" +#include "../dmg/gbGlobals.h" +#include "../dmg/gbPrinter.h" +#include "../agb/GBALink.h" #include extern int emulating; diff --git a/src/win32/OpenGL.cpp b/src/win32/OpenGL.cpp index abfe0892..4cbb18d7 100644 --- a/src/win32/OpenGL.cpp +++ b/src/win32/OpenGL.cpp @@ -261,7 +261,7 @@ bool OpenGLDisplay::initialize() case VIDEO_640x480: case VIDEO_800x600: case VIDEO_1024x768: - case VIDEO_1280x960: + case VIDEO_1280x1024: case VIDEO_OTHER: { if( theApp.fullScreenStretch ) { diff --git a/src/win32/VBA.cpp b/src/win32/VBA.cpp index 0b091217..aa71e85a 100644 --- a/src/win32/VBA.cpp +++ b/src/win32/VBA.cpp @@ -1909,7 +1909,7 @@ void VBA::updateWindowSize(int value) // content of old seperate 'winCheckMenuBarInfo' function: MENUBARINFO info; info.cbSize = sizeof(MENUBARINFO); - theApp.m_pMainWnd->GetMenuBarInfo(OBJID_MENU, 0, &info); + GetMenuBarInfo( theApp.m_pMainWnd->GetSafeHwnd(), OBJID_MENU, 0, &info ); int menuHeight = GetSystemMetrics(SM_CYMENU); // includes white line if((info.rcBar.bottom - info.rcBar.top) > menuHeight) { diff --git a/src/win32/stdafx.h b/src/win32/stdafx.h index 01f6d5b2..29146ff2 100644 --- a/src/win32/stdafx.h +++ b/src/win32/stdafx.h @@ -1,7 +1,7 @@ -// -*- C++ -*- // VisualBoyAdvance - Nintendo Gameboy/GameboyAdvance (TM) emulator. // Copyright (C) 1999-2003 Forgotten // Copyright (C) 2004 Forgotten and the VBA development team +// Copyright (C) 2007-2008 VBA-M development team // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -17,26 +17,18 @@ // along with this program; if not, write to the Free Software Foundation, // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -// stdafx.h : include file for standard system include files, -// or project specific include files that are used frequently, but -// are changed infrequently -// - -#if !defined(AFX_STDAFX_H__A7126ECB_A234_4116_A7D0_BE50547E87F8__INCLUDED_) -#define AFX_STDAFX_H__A7126ECB_A234_4116_A7D0_BE50547E87F8__INCLUDED_ - -#if _MSC_VER > 1000 #pragma once -#endif // _MSC_VER > 1000 +// Exclude rarely-used stuff from Windows headers like +// Cryptography, DDE, RPC, Shell, and Windows Sockets +#define WIN32_LEAN_AND_MEAN -// Insert your headers here -//#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers - -// Target for Windows 2000 -#define WINVER 0x0500 -#define _WIN32_WINNT 0x0500 +// Target for Windows 2000 (Required by GetMenuBar and other functions) +#define NTDDI_VERSION NTDDI_WIN2K // new +#define _WIN32_WINNT 0x0500 // old +//#define WINVER 0x0500 +// Enable STRICT type checking #define STRICT @@ -44,10 +36,3 @@ #include #include #include "VBA.h" - -// TODO: reference additional headers your program requires here - -//{{AFX_INSERT_LOCATION}} -// Microsoft Visual C++ will insert additional declarations immediately before the previous line. - -#endif // !defined(AFX_STDAFX_H__A7126ECB_A234_4116_A7D0_BE50547E87F8__INCLUDED_)