Some updates for compiling in the latest version of Visual Studio (2013).

git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2879 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2014-05-01 23:15:17 +00:00
parent e7719c334e
commit 4654975341
4 changed files with 46 additions and 37 deletions

View File

@ -22,7 +22,7 @@
#include <cstdlib> #include <cstdlib>
#define STELLA_VERSION "3.9.102_svn" #define STELLA_VERSION "3.9.103_svn"
#define STELLA_BUILD atoi("$Rev$" + 6) #define STELLA_BUILD atoi("$Rev$" + 6)
#endif #endif

View File

@ -309,6 +309,38 @@ class FrameBuffer
*/ */
uInt8 getPhosphor(uInt8 c1, uInt8 c2) const; uInt8 getPhosphor(uInt8 c1, uInt8 c2) const;
// Contains all relevant info for the dimensions of a video screen
// Also takes care of the case when the image should be 'centered'
// within the given screen:
// 'image' is the image dimensions into the screen
// 'screen' are the dimensions of the screen itself
class VideoMode
{
friend class FrameBuffer;
public:
GUI::Rect image;
GUI::Size screen;
bool fullscreen;
uInt32 zoom;
string description;
public:
VideoMode();
VideoMode(uInt32 iw, uInt32 ih, uInt32 sw, uInt32 sh, bool full,
uInt32 z = 1, const string& desc = "");
friend ostream& operator<<(ostream& os, const VideoMode& vm)
{
os << "image=" << vm.image << " screen=" << vm.screen << endl
<< "desc=" << vm.description << " zoom=" << vm.zoom;
return os;
}
private:
void applyAspectCorrection(uInt32 aspect, uInt32 stretch = false);
};
////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////
// The following methods are system-specific and can/must be // The following methods are system-specific and can/must be
// implemented in derived classes. // implemented in derived classes.
@ -372,37 +404,6 @@ class FrameBuffer
virtual void scanline(uInt32 row, uInt8* data) const = 0; virtual void scanline(uInt32 row, uInt8* data) const = 0;
protected: protected:
// Contains all relevant info for the dimensions of a video screen
// Also takes care of the case when the image should be 'centered'
// within the given screen:
// 'image' is the image dimensions into the screen
// 'screen' are the dimensions of the screen itself
class VideoMode {
friend class FrameBuffer;
public:
GUI::Rect image;
GUI::Size screen;
bool fullscreen;
uInt32 zoom;
string description;
public:
VideoMode();
VideoMode(uInt32 iw, uInt32 ih, uInt32 sw, uInt32 sh, bool full,
uInt32 z = 1, const string& desc = "");
friend ostream& operator<<(ostream& os, const VideoMode& vm)
{
os << "image=" << vm.image << " screen=" << vm.screen << endl
<< "desc=" << vm.description << " zoom=" << vm.zoom;
return os;
}
private:
void applyAspectCorrection(uInt32 aspect, uInt32 stretch = false);
};
/** /**
This method is called to query and initialize the video hardware This method is called to query and initialize the video hardware
for desktop and fullscreen resolution information. for desktop and fullscreen resolution information.

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations"> <ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32"> <ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration> <Configuration>Debug</Configuration>
@ -27,22 +27,22 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v110_xp</PlatformToolset> <PlatformToolset>v120_xp</PlatformToolset>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v110_xp</PlatformToolset> <PlatformToolset>v120_xp</PlatformToolset>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v110</PlatformToolset> <PlatformToolset>v120_xp</PlatformToolset>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType> <ConfigurationType>Application</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet> <CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v110</PlatformToolset> <PlatformToolset>v120_xp</PlatformToolset>
</PropertyGroup> </PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings"> <ImportGroup Label="ExtensionSettings">
@ -280,6 +280,7 @@
<ClCompile Include="..\emucore\CartDFSC.cxx" /> <ClCompile Include="..\emucore\CartDFSC.cxx" />
<ClCompile Include="..\emucore\CartFA2.cxx" /> <ClCompile Include="..\emucore\CartFA2.cxx" />
<ClCompile Include="..\emucore\CompuMate.cxx" /> <ClCompile Include="..\emucore\CompuMate.cxx" />
<ClCompile Include="..\emucore\FBSurface.cxx" />
<ClCompile Include="..\emucore\MindLink.cxx" /> <ClCompile Include="..\emucore\MindLink.cxx" />
<ClCompile Include="..\gui\FileListWidget.cxx" /> <ClCompile Include="..\gui\FileListWidget.cxx" />
<ClCompile Include="..\gui\LoggerDialog.cxx" /> <ClCompile Include="..\gui\LoggerDialog.cxx" />
@ -532,6 +533,7 @@
<ClInclude Include="..\emucore\CartDFSC.hxx" /> <ClInclude Include="..\emucore\CartDFSC.hxx" />
<ClInclude Include="..\emucore\CartFA2.hxx" /> <ClInclude Include="..\emucore\CartFA2.hxx" />
<ClInclude Include="..\emucore\CompuMate.hxx" /> <ClInclude Include="..\emucore\CompuMate.hxx" />
<ClInclude Include="..\emucore\FBSurface.hxx" />
<ClInclude Include="..\emucore\MindLink.hxx" /> <ClInclude Include="..\emucore\MindLink.hxx" />
<ClInclude Include="..\gui\ConsoleBFont.hxx" /> <ClInclude Include="..\gui\ConsoleBFont.hxx" />
<ClInclude Include="..\gui\ConsoleMediumBFont.hxx" /> <ClInclude Include="..\gui\ConsoleMediumBFont.hxx" />

View File

@ -753,6 +753,9 @@
<ClCompile Include="..\common\EventHandlerSDL2.cxx"> <ClCompile Include="..\common\EventHandlerSDL2.cxx">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\emucore\FBSurface.cxx">
<Filter>Source Files\emucore</Filter>
</ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="..\common\Array.hxx"> <ClInclude Include="..\common\Array.hxx">
@ -1520,6 +1523,9 @@
<ClInclude Include="..\common\EventHandlerSDL2.hxx"> <ClInclude Include="..\common\EventHandlerSDL2.hxx">
<Filter>Header Files</Filter> <Filter>Header Files</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\emucore\FBSurface.hxx">
<Filter>Header Files\emucore</Filter>
</ClInclude>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="stella.ico"> <None Include="stella.ico">