diff --git a/stella/configure b/stella/configure index af28aaec9..aa446b5c9 100755 --- a/stella/configure +++ b/stella/configure @@ -761,7 +761,7 @@ fi if test "$_build_snapshot" = yes ; then DEFINES="$DEFINES -DSNAPSHOT_SUPPORT" - LIBS="$LIBS -lpng -lz" # FIXME: -lz included twice + LIBS="$LIBS -lpng" fi if test "$_build_joystick" = yes ; then diff --git a/stella/src/common/Snapshot.cxx b/stella/src/common/Snapshot.cxx index 98c44196e..e20a51052 100644 --- a/stella/src/common/Snapshot.cxx +++ b/stella/src/common/Snapshot.cxx @@ -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.8 2005-08-25 15:19:17 stephena Exp $ +// $Id: Snapshot.cxx,v 1.9 2005-09-06 22:25:40 stephena Exp $ //============================================================================ #ifdef SNAPSHOT_SUPPORT @@ -74,8 +74,8 @@ string Snapshot::savePNG(string filename) uInt32 width = myFrameBuffer.imageWidth(); uInt32 height = myFrameBuffer.imageHeight(); - // FIXME - this should really call something like OSystem::message() - // so we can get rid of annoying ifdefs everywhere + // TODO - this should really call something like OSystem::message() + // so we can get rid of annoying ifdefs everywhere #ifdef PSP fprintf(stdout,"ok w=%i h=%i\n",width,height); #endif diff --git a/stella/src/debugger/PackedBitArray.cxx b/stella/src/debugger/PackedBitArray.cxx index 2f2a23fae..38f640d87 100644 --- a/stella/src/debugger/PackedBitArray.cxx +++ b/stella/src/debugger/PackedBitArray.cxx @@ -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: PackedBitArray.cxx,v 1.4 2005-06-29 13:11:03 stephena Exp $ +// $Id: PackedBitArray.cxx,v 1.5 2005-09-06 22:25:40 stephena Exp $ //============================================================================ #include "bspf.hxx" @@ -24,8 +24,6 @@ PackedBitArray::PackedBitArray(int length) { words = length / wordSize + 1; bits = new unsigned int[ words ]; - // FIXME: find out if this is necessary (does a new array - // start out zeroed already? for(int i=0; iaddDialog(myColorDialog); diff --git a/stella/src/debugger/gui/DebuggerDialog.cxx b/stella/src/debugger/gui/DebuggerDialog.cxx index d3154686e..e9e7309cd 100644 --- a/stella/src/debugger/gui/DebuggerDialog.cxx +++ b/stella/src/debugger/gui/DebuggerDialog.cxx @@ -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: DebuggerDialog.cxx,v 1.3 2005-08-31 22:34:43 stephena Exp $ +// $Id: DebuggerDialog.cxx,v 1.4 2005-09-06 22:25:40 stephena Exp $ // // Based on code from ScummVM - Scumm Interpreter // Copyright (C) 2002-2004 The ScummVM project @@ -176,10 +176,10 @@ void DebuggerDialog::addStatusArea() int xpos, ypos; xpos = r.left; ypos = r.top; - myTiaInfo = new TiaInfoWidget(this, xpos, ypos); + myTiaInfo = new TiaInfoWidget(this, xpos+20, ypos); ypos += myTiaInfo->getHeight() + 10; - myTiaZoom = new TiaZoomWidget(this, xpos, ypos); + myTiaZoom = new TiaZoomWidget(this, xpos+10, ypos); addToFocusList(myTiaZoom->getFocusList()); } diff --git a/stella/src/debugger/gui/TiaInfoWidget.cxx b/stella/src/debugger/gui/TiaInfoWidget.cxx index 53c7fd983..8df36206d 100644 --- a/stella/src/debugger/gui/TiaInfoWidget.cxx +++ b/stella/src/debugger/gui/TiaInfoWidget.cxx @@ -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: TiaInfoWidget.cxx,v 1.2 2005-08-31 19:15:10 stephena Exp $ +// $Id: TiaInfoWidget.cxx,v 1.3 2005-09-06 22:25:40 stephena Exp $ // // Based on code from ScummVM - Scumm Interpreter // Copyright (C) 2002-2004 The ScummVM project @@ -35,56 +35,54 @@ TiaInfoWidget::TiaInfoWidget(GuiObject* boss, int x, int y) CommandSender(boss) { const GUI::Font& font = instance()->consoleFont(); - const int fontWidth = font.getMaxCharWidth(), - fontHeight = font.getFontHeight(), - lineHeight = font.getLineHeight(); + const int lineHeight = font.getLineHeight(); int xpos = x, ypos = y, lwidth = 45; // Add frame info - xpos = x + 10; ypos = y + 10; + xpos = x; ypos = y + 10; new StaticTextWidget(boss, xpos, ypos, lwidth, kLineHeight, "Frame:", kTextAlignLeft); xpos += lwidth; myFrameCount = new EditTextWidget(boss, xpos, ypos-2, 45, lineHeight, ""); myFrameCount->setFont(font); myFrameCount->setEditable(false); - xpos = x + 10; ypos += kLineHeight + 5; + xpos = x; ypos += kLineHeight + 5; new StaticTextWidget(boss, xpos, ypos, lwidth, kLineHeight, "F. Cycles:", kTextAlignLeft); xpos += lwidth; myFrameCycles = new EditTextWidget(boss, xpos, ypos-2, 45, lineHeight, ""); myFrameCycles->setFont(font); myFrameCycles->setEditable(false); - xpos = x + 20; ypos += kLineHeight + 5; + xpos = x + 10; ypos += kLineHeight + 5; myVSync = new CheckboxWidget(boss, instance()->font(), xpos, ypos-3, "VSync", 0); myVSync->setEditable(false); - xpos = x + 20; ypos += kLineHeight + 5; + xpos = x + 10; ypos += kLineHeight + 5; myVBlank = new CheckboxWidget(boss, instance()->font(), xpos, ypos-3, "VBlank", 0); myVBlank->setEditable(false); - xpos = x + 10 + 100; ypos = y + 10; + xpos = x + 100; ypos = y + 10; new StaticTextWidget(boss, xpos, ypos, lwidth, kLineHeight, "Scanline:", kTextAlignLeft); xpos += lwidth; myScanlineCount = new EditTextWidget(boss, xpos, ypos-2, 30, lineHeight, ""); myScanlineCount->setFont(font); myScanlineCount->setEditable(false); - xpos = x + 10 + 100; ypos += kLineHeight + 5; + xpos = x + 100; ypos += kLineHeight + 5; new StaticTextWidget(boss, xpos, ypos, lwidth, kLineHeight, "S. Cycles:", kTextAlignLeft); xpos += lwidth; myScanlineCycles = new EditTextWidget(boss, xpos, ypos-2, 30, lineHeight, ""); myScanlineCycles->setFont(font); myScanlineCycles->setEditable(false); - xpos = x + 10 + 100; ypos += kLineHeight + 5; + xpos = x + 100; ypos += kLineHeight + 5; new StaticTextWidget(boss, xpos, ypos, lwidth, kLineHeight, "Pixel Pos:", kTextAlignLeft); xpos += lwidth; myPixelPosition = new EditTextWidget(boss, xpos, ypos-2, 30, lineHeight, ""); myPixelPosition->setFont(font); myPixelPosition->setEditable(false); - xpos = x + 10 + 100; ypos += kLineHeight + 5; + xpos = x + 100; ypos += kLineHeight + 5; new StaticTextWidget(boss, xpos, ypos, lwidth, kLineHeight, "Color Clk:", kTextAlignLeft); xpos += lwidth; myColorClocks = new EditTextWidget(boss, xpos, ypos-2, 30, lineHeight, ""); @@ -92,7 +90,7 @@ TiaInfoWidget::TiaInfoWidget(GuiObject* boss, int x, int y) myColorClocks->setEditable(false); // Calculate actual dimensions - _w = 110 + 30 + lwidth; + _w = 100 + 30 + lwidth; _h = ypos + lineHeight; } diff --git a/stella/src/debugger/gui/TiaOutputWidget.cxx b/stella/src/debugger/gui/TiaOutputWidget.cxx index e0987483a..32b9f9b85 100644 --- a/stella/src/debugger/gui/TiaOutputWidget.cxx +++ b/stella/src/debugger/gui/TiaOutputWidget.cxx @@ -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.3 2005-09-01 16:49:52 stephena Exp $ +// $Id: TiaOutputWidget.cxx,v 1.4 2005-09-06 22:25:40 stephena Exp $ // // Based on code from ScummVM - Scumm Interpreter // Copyright (C) 2002-2004 The ScummVM project @@ -98,12 +98,6 @@ void TiaOutputWidget::handleMouseDown(int x, int y, int button, int clickCount) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - void TiaOutputWidget::handleCommand(CommandSender* sender, int cmd, int data, int id) { - // FIXME - these coords aren't yet accurate, but that doesn't stop - // us from implementing the functionality - // Maybe they're accurate enough for our purposes?? - int xstart = atoi(instance()->console().properties().get("Display.XStart").c_str()); - int ystart = atoi(instance()->console().properties().get("Display.YStart").c_str()); - switch(cmd) { case kCMenuItemSelectedCmd: @@ -111,6 +105,7 @@ void TiaOutputWidget::handleCommand(CommandSender* sender, int cmd, int data, in { case 0: { + int ystart = atoi(instance()->console().properties().get("Display.YStart").c_str()); int lines = myClickY + ystart - instance()->debugger().tiaDebug().scanlines(); if(lines > 0) instance()->debugger().nextScanline(lines); diff --git a/stella/src/debugger/gui/TiaZoomWidget.cxx b/stella/src/debugger/gui/TiaZoomWidget.cxx index 0c8d32755..28e47b428 100644 --- a/stella/src/debugger/gui/TiaZoomWidget.cxx +++ b/stella/src/debugger/gui/TiaZoomWidget.cxx @@ -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: TiaZoomWidget.cxx,v 1.3 2005-09-01 16:49:52 stephena Exp $ +// $Id: TiaZoomWidget.cxx,v 1.4 2005-09-06 22:25:40 stephena Exp $ // // Based on code from ScummVM - Scumm Interpreter // Copyright (C) 2002-2004 The ScummVM project @@ -35,7 +35,7 @@ TiaZoomWidget::TiaZoomWidget(GuiObject* boss, int x, int y) { _flags = WIDGET_ENABLED | WIDGET_CLEARBG | WIDGET_RETAIN_FOCUS; - _w = 200; + _w = 210; _h = 120; addFocusWidget(this); diff --git a/stella/src/gui/LauncherOptionsDialog.cxx b/stella/src/gui/LauncherOptionsDialog.cxx index aa26ff604..f43bd4b30 100644 --- a/stella/src/gui/LauncherOptionsDialog.cxx +++ b/stella/src/gui/LauncherOptionsDialog.cxx @@ -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: LauncherOptionsDialog.cxx,v 1.11 2005-08-30 17:51:26 stephena Exp $ +// $Id: LauncherOptionsDialog.cxx,v 1.12 2005-09-06 22:25:40 stephena Exp $ // // Based on code from ScummVM - Scumm Interpreter // Copyright (C) 2002-2004 The ScummVM project @@ -39,41 +39,46 @@ LauncherOptionsDialog::LauncherOptionsDialog( const GUI::Font& font = instance()->font(); const int vBorder = 4; - int yoffset; + int xpos, ypos; // The tab widget - myTab = new TabWidget(this, 0, vBorder, _w, _h - 24 - 2 * vBorder); + xpos = 2; ypos = vBorder; + myTab = new TabWidget(this, xpos, ypos, _w - 2*xpos, _h - 24 - 2*ypos); // 1) The ROM locations tab myTab->addTab("ROM Settings"); - yoffset = vBorder; // ROM path - new ButtonWidget(myTab, 15, yoffset, kButtonWidth + 14, 16, "Path", kChooseRomDirCmd, 0); - myRomPath = new StaticTextWidget(myTab, 5 + kButtonWidth + 30, - yoffset + 3, _w - (5 + kButtonWidth + 20) - 10, - kLineHeight, "", kTextAlignLeft); + xpos = 15; + new ButtonWidget(myTab, xpos, ypos, kButtonWidth + 14, 16, "Path", + kChooseRomDirCmd, 0); + xpos += kButtonWidth + 30; + myRomPath = new StaticTextWidget(myTab, xpos, ypos + 3, + _w - xpos - 10, kLineHeight, + "", kTextAlignLeft); // 2) The snapshot settings tab myTab->addTab(" Snapshot Settings "); - yoffset = vBorder; // Snapshot path - new ButtonWidget(myTab, 15, yoffset, kButtonWidth + 14, 16, "Path", kChooseSnapDirCmd, 0); - mySnapPath = new StaticTextWidget(myTab, 5 + kButtonWidth + 30, - yoffset + 3, _w - (5 + kButtonWidth + 20) - 10, - kLineHeight, "", kTextAlignLeft); - yoffset += 22; + xpos = 15; + new ButtonWidget(myTab, xpos, ypos, kButtonWidth + 14, 16, "Path", + kChooseSnapDirCmd, 0); + xpos += kButtonWidth + 30; + mySnapPath = new StaticTextWidget(myTab, xpos, ypos + 3, + _w - xpos - 10, kLineHeight, + "", kTextAlignLeft); // Snapshot save name - mySnapTypePopup = new PopUpWidget(myTab, 10, yoffset, 140, kLineHeight, + xpos = 10; ypos += 22; + mySnapTypePopup = new PopUpWidget(myTab, xpos, ypos, 140, kLineHeight, "Save snapshot as: ", 87, 0); mySnapTypePopup->appendEntry("romname", 1); mySnapTypePopup->appendEntry("md5sum", 2); - yoffset += 18; // Snapshot single or multiple saves - mySnapSingleCheckbox = new CheckboxWidget(myTab, font, 30, yoffset, + xpos = 30; ypos += 18; + mySnapSingleCheckbox = new CheckboxWidget(myTab, font, xpos, ypos, "Multiple snapshots"); // Activate the first tab diff --git a/stella/src/gui/OptionsDialog.cxx b/stella/src/gui/OptionsDialog.cxx index 1210160f8..a92c22313 100644 --- a/stella/src/gui/OptionsDialog.cxx +++ b/stella/src/gui/OptionsDialog.cxx @@ -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: OptionsDialog.cxx,v 1.25 2005-09-06 19:42:35 stephena Exp $ +// $Id: OptionsDialog.cxx,v 1.26 2005-09-06 22:25:40 stephena Exp $ // // Based on code from ScummVM - Scumm Interpreter // Copyright (C) 2002-2004 The ScummVM project @@ -71,17 +71,19 @@ OptionsDialog::OptionsDialog(OSystem* osystem, DialogContainer* parent) { int yoffset = 7; const int xoffset = (_w - kBigButtonWidth) / 2; + ButtonWidget* b = NULL; addBigButton("Video Settings", kVidCmd, 0); #ifdef SOUND_SUPPORT addBigButton("Audio Settings", kAudCmd, 0); #else - ButtonWidget* b = addBigButton("Audio Settings", kAudCmd, 0); + b = addBigButton("Audio Settings", kAudCmd, 0); b->clearFlags(WIDGET_ENABLED); #endif addBigButton("Event Mapping", kEMapCmd, 0); addBigButton("Game Information", kInfoCmd, 0); - addBigButton("Cheat Code", kCheatCmd, 0); + b = addBigButton("Cheat Code", kCheatCmd, 0); + b->clearFlags(WIDGET_ENABLED); // TODO - finish after next release addBigButton("Help", kHelpCmd, 0); addBigButton("About", kAboutCmd, 0); addBigButton("Exit Menu", kExitCmd, 0);