mirror of https://github.com/stella-emu/stella.git
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:
parent
21062f5ca3
commit
c895942252
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// 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>
|
#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)
|
void Snapshot::writePNGText(ofstream& out, const string& key, const string& text)
|
||||||
{
|
{
|
||||||
int length = key.length() + 1 + text.length() + 1;
|
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.c_str());
|
||||||
strcpy((char*)data + key.length() + 1, text.c_str());
|
strcpy((char*)data + key.length() + 1, text.c_str());
|
||||||
|
|
||||||
writePNGChunk(out, "tEXt", data, length-1);
|
writePNGChunk(out, "tEXt", data, length-1);
|
||||||
|
delete[] data;
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// 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
|
// Based on code from ScummVM - Scumm Interpreter
|
||||||
// Copyright (C) 2002-2004 The ScummVM project
|
// 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
|
// FIXME - maybe 'greyed out mode' should be done here, not in the TIA class
|
||||||
FBSurface& s = dialog().surface();
|
FBSurface& s = dialog().surface();
|
||||||
|
|
||||||
const uInt32 width = instance().console().mediaSource().width(),
|
const uInt32 width = 160, // width is always 160
|
||||||
height = instance().console().mediaSource().height();
|
height = instance().console().mediaSource().height();
|
||||||
uInt32 line[width << 1];
|
|
||||||
for(uInt32 y = 0; y < height; ++y)
|
for(uInt32 y = 0; y < height; ++y)
|
||||||
{
|
{
|
||||||
uInt32* line_ptr = line;
|
uInt32* line_ptr = myLineBuffer;
|
||||||
for(uInt32 x = 0; x < width; ++x)
|
for(uInt32 x = 0; x < width; ++x)
|
||||||
{
|
{
|
||||||
uInt32 pixel = instance().frameBuffer().tiaPixel(y*width+x);
|
uInt32 pixel = instance().frameBuffer().tiaPixel(y*width+x);
|
||||||
*line_ptr++ = pixel;
|
*line_ptr++ = pixel;
|
||||||
*line_ptr++ = pixel;
|
*line_ptr++ = pixel;
|
||||||
}
|
}
|
||||||
s.drawPixels(line, _x, _y+y, width << 1);
|
s.drawPixels(myLineBuffer, _x, _y+y, width << 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// 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
|
// Based on code from ScummVM - Scumm Interpreter
|
||||||
// Copyright (C) 2002-2004 The ScummVM project
|
// Copyright (C) 2002-2004 The ScummVM project
|
||||||
|
@ -64,6 +64,10 @@ class TiaOutputWidget : public Widget, public CommandSender
|
||||||
TiaZoomWidget* myZoom;
|
TiaZoomWidget* myZoom;
|
||||||
|
|
||||||
int myClickX, myClickY;
|
int myClickX, myClickY;
|
||||||
|
|
||||||
|
// Create this buffer once, instead of allocating it each time the
|
||||||
|
// TIA image is redrawn
|
||||||
|
uInt32 myLineBuffer[320];
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -861,6 +861,10 @@
|
||||||
RelativePath="..\gui\GameList.cxx"
|
RelativePath="..\gui\GameList.cxx"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\gui\GlobalPropsDialog.cxx"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\gui\HelpDialog.cxx"
|
RelativePath="..\gui\HelpDialog.cxx"
|
||||||
>
|
>
|
||||||
|
@ -881,6 +885,10 @@
|
||||||
RelativePath="..\gui\LauncherDialog.cxx"
|
RelativePath="..\gui\LauncherDialog.cxx"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\gui\LauncherFilterDialog.cxx"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\gui\ListWidget.cxx"
|
RelativePath="..\gui\ListWidget.cxx"
|
||||||
>
|
>
|
||||||
|
@ -1491,6 +1499,10 @@
|
||||||
RelativePath="..\gui\GameList.hxx"
|
RelativePath="..\gui\GameList.hxx"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\gui\GlobalPropsDialog.hxx"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\gui\GuiObject.hxx"
|
RelativePath="..\gui\GuiObject.hxx"
|
||||||
>
|
>
|
||||||
|
@ -1515,6 +1527,10 @@
|
||||||
RelativePath="..\gui\LauncherDialog.hxx"
|
RelativePath="..\gui\LauncherDialog.hxx"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\gui\LauncherFilterDialog.hxx"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\gui\ListWidget.hxx"
|
RelativePath="..\gui\ListWidget.hxx"
|
||||||
>
|
>
|
||||||
|
|
Loading…
Reference in New Issue