Updated Win32 Visual Studio project files for latest class additions. It seems VC8 doesn't like static allocations with a dynamic size. It works fine in gcc.

git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1607 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2009-01-11 02:23:45 +00:00
parent 21062f5ca3
commit c895942252
4 changed files with 28 additions and 8 deletions

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: Snapshot.cxx,v 1.25 2009-01-03 22:57:12 stephena Exp $
// $Id: Snapshot.cxx,v 1.26 2009-01-11 02:23:45 stephena Exp $
//============================================================================
#include <zlib.h>
@ -192,10 +192,11 @@ void Snapshot::writePNGChunk(ofstream& out, const char* type,
void Snapshot::writePNGText(ofstream& out, const string& key, const string& text)
{
int length = key.length() + 1 + text.length() + 1;
uInt8 data[length];
uInt8* data = new uInt8[length];
strcpy((char*)data, key.c_str());
strcpy((char*)data + key.length() + 1, text.c_str());
writePNGChunk(out, "tEXt", data, length-1);
delete[] data;
}

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: TiaOutputWidget.cxx,v 1.24 2009-01-03 22:57:12 stephena Exp $
// $Id: TiaOutputWidget.cxx,v 1.25 2009-01-11 02:23:45 stephena Exp $
//
// Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project
@ -143,18 +143,17 @@ void TiaOutputWidget::drawWidget(bool hilite)
// FIXME - maybe 'greyed out mode' should be done here, not in the TIA class
FBSurface& s = dialog().surface();
const uInt32 width = instance().console().mediaSource().width(),
const uInt32 width = 160, // width is always 160
height = instance().console().mediaSource().height();
uInt32 line[width << 1];
for(uInt32 y = 0; y < height; ++y)
{
uInt32* line_ptr = line;
uInt32* line_ptr = myLineBuffer;
for(uInt32 x = 0; x < width; ++x)
{
uInt32 pixel = instance().frameBuffer().tiaPixel(y*width+x);
*line_ptr++ = pixel;
*line_ptr++ = pixel;
}
s.drawPixels(line, _x, _y+y, width << 1);
s.drawPixels(myLineBuffer, _x, _y+y, width << 1);
}
}

View File

@ -13,7 +13,7 @@
// See the file "license" for information on usage and redistribution of
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
//
// $Id: TiaOutputWidget.hxx,v 1.7 2009-01-01 18:13:35 stephena Exp $
// $Id: TiaOutputWidget.hxx,v 1.8 2009-01-11 02:23:45 stephena Exp $
//
// Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project
@ -64,6 +64,10 @@ class TiaOutputWidget : public Widget, public CommandSender
TiaZoomWidget* myZoom;
int myClickX, myClickY;
// Create this buffer once, instead of allocating it each time the
// TIA image is redrawn
uInt32 myLineBuffer[320];
};
#endif

View File

@ -861,6 +861,10 @@
RelativePath="..\gui\GameList.cxx"
>
</File>
<File
RelativePath="..\gui\GlobalPropsDialog.cxx"
>
</File>
<File
RelativePath="..\gui\HelpDialog.cxx"
>
@ -881,6 +885,10 @@
RelativePath="..\gui\LauncherDialog.cxx"
>
</File>
<File
RelativePath="..\gui\LauncherFilterDialog.cxx"
>
</File>
<File
RelativePath="..\gui\ListWidget.cxx"
>
@ -1491,6 +1499,10 @@
RelativePath="..\gui\GameList.hxx"
>
</File>
<File
RelativePath="..\gui\GlobalPropsDialog.hxx"
>
</File>
<File
RelativePath="..\gui\GuiObject.hxx"
>
@ -1515,6 +1527,10 @@
RelativePath="..\gui\LauncherDialog.hxx"
>
</File>
<File
RelativePath="..\gui\LauncherFilterDialog.hxx"
>
</File>
<File
RelativePath="..\gui\ListWidget.hxx"
>