Removed from FIXME's, either by fixing them or changing to TODO :)

Disabled 'Cheat' button in OptionsDialog, since we won't have time
to finish it before the 2.0 release.

Fixed some graphical glitches when TabWidget was used.

Still TODO is get Win32 hardware surfaces working.  I'm tempted to
just disable it for the next release, because it's just too much work.

There's still some work left to do in the debugger, but I won't be
implementing any new features (for the next release) beyond what's
there now.  From this point on, we're only fixing bugs and adding
any remaining functionality to current widgets.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@769 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2005-09-06 22:25:40 +00:00
parent 4dfb229566
commit a8c8c62bca
10 changed files with 52 additions and 54 deletions

2
stella/configure vendored
View File

@ -761,7 +761,7 @@ fi
if test "$_build_snapshot" = yes ; then if test "$_build_snapshot" = yes ; then
DEFINES="$DEFINES -DSNAPSHOT_SUPPORT" DEFINES="$DEFINES -DSNAPSHOT_SUPPORT"
LIBS="$LIBS -lpng -lz" # FIXME: -lz included twice LIBS="$LIBS -lpng"
fi fi
if test "$_build_joystick" = yes ; then if test "$_build_joystick" = yes ; then

View File

@ -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.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 #ifdef SNAPSHOT_SUPPORT
@ -74,7 +74,7 @@ string Snapshot::savePNG(string filename)
uInt32 width = myFrameBuffer.imageWidth(); uInt32 width = myFrameBuffer.imageWidth();
uInt32 height = myFrameBuffer.imageHeight(); uInt32 height = myFrameBuffer.imageHeight();
// FIXME - this should really call something like OSystem::message() // TODO - this should really call something like OSystem::message()
// so we can get rid of annoying ifdefs everywhere // so we can get rid of annoying ifdefs everywhere
#ifdef PSP #ifdef PSP
fprintf(stdout,"ok w=%i h=%i\n",width,height); fprintf(stdout,"ok w=%i h=%i\n",width,height);

View File

@ -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: 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" #include "bspf.hxx"
@ -24,8 +24,6 @@ PackedBitArray::PackedBitArray(int length) {
words = length / wordSize + 1; words = length / wordSize + 1;
bits = new unsigned int[ words ]; bits = new unsigned int[ words ];
// FIXME: find out if this is necessary (does a new array
// start out zeroed already?
for(int i=0; i<words; i++) for(int i=0; i<words; i++)
bits[i] = 0; bits[i] = 0;
} }

View File

@ -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: ColorWidget.cxx,v 1.1 2005-08-30 17:51:26 stephena Exp $ // $Id: ColorWidget.cxx,v 1.2 2005-09-06 22:25:40 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
@ -53,7 +53,7 @@ void ColorWidget::setColor(int color)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void ColorWidget::handleMouseDown(int x, int y, int button, int clickCount) void ColorWidget::handleMouseDown(int x, int y, int button, int clickCount)
{ {
// FIXME - add ColorDialog, which will show all 256 colors in the // TODO - add ColorDialog, which will show all 256 colors in the
// TIA palette // TIA palette
// if(isEnabled()) // if(isEnabled())
// parent()->addDialog(myColorDialog); // parent()->addDialog(myColorDialog);

View File

@ -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: 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 // Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project // Copyright (C) 2002-2004 The ScummVM project
@ -176,10 +176,10 @@ void DebuggerDialog::addStatusArea()
int xpos, ypos; int xpos, ypos;
xpos = r.left; ypos = r.top; xpos = r.left; ypos = r.top;
myTiaInfo = new TiaInfoWidget(this, xpos, ypos); myTiaInfo = new TiaInfoWidget(this, xpos+20, ypos);
ypos += myTiaInfo->getHeight() + 10; ypos += myTiaInfo->getHeight() + 10;
myTiaZoom = new TiaZoomWidget(this, xpos, ypos); myTiaZoom = new TiaZoomWidget(this, xpos+10, ypos);
addToFocusList(myTiaZoom->getFocusList()); addToFocusList(myTiaZoom->getFocusList());
} }

View File

@ -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: 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 // Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project // Copyright (C) 2002-2004 The ScummVM project
@ -35,56 +35,54 @@ TiaInfoWidget::TiaInfoWidget(GuiObject* boss, int x, int y)
CommandSender(boss) CommandSender(boss)
{ {
const GUI::Font& font = instance()->consoleFont(); const GUI::Font& font = instance()->consoleFont();
const int fontWidth = font.getMaxCharWidth(), const int lineHeight = font.getLineHeight();
fontHeight = font.getFontHeight(),
lineHeight = font.getLineHeight();
int xpos = x, ypos = y, lwidth = 45; int xpos = x, ypos = y, lwidth = 45;
// Add frame info // Add frame info
xpos = x + 10; ypos = y + 10; xpos = x; ypos = y + 10;
new StaticTextWidget(boss, xpos, ypos, lwidth, kLineHeight, "Frame:", kTextAlignLeft); new StaticTextWidget(boss, xpos, ypos, lwidth, kLineHeight, "Frame:", kTextAlignLeft);
xpos += lwidth; xpos += lwidth;
myFrameCount = new EditTextWidget(boss, xpos, ypos-2, 45, lineHeight, ""); myFrameCount = new EditTextWidget(boss, xpos, ypos-2, 45, lineHeight, "");
myFrameCount->setFont(font); myFrameCount->setFont(font);
myFrameCount->setEditable(false); myFrameCount->setEditable(false);
xpos = x + 10; ypos += kLineHeight + 5; xpos = x; ypos += kLineHeight + 5;
new StaticTextWidget(boss, xpos, ypos, lwidth, kLineHeight, "F. Cycles:", kTextAlignLeft); new StaticTextWidget(boss, xpos, ypos, lwidth, kLineHeight, "F. Cycles:", kTextAlignLeft);
xpos += lwidth; xpos += lwidth;
myFrameCycles = new EditTextWidget(boss, xpos, ypos-2, 45, lineHeight, ""); myFrameCycles = new EditTextWidget(boss, xpos, ypos-2, 45, lineHeight, "");
myFrameCycles->setFont(font); myFrameCycles->setFont(font);
myFrameCycles->setEditable(false); 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 = new CheckboxWidget(boss, instance()->font(), xpos, ypos-3, "VSync", 0);
myVSync->setEditable(false); 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 = new CheckboxWidget(boss, instance()->font(), xpos, ypos-3, "VBlank", 0);
myVBlank->setEditable(false); 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); new StaticTextWidget(boss, xpos, ypos, lwidth, kLineHeight, "Scanline:", kTextAlignLeft);
xpos += lwidth; xpos += lwidth;
myScanlineCount = new EditTextWidget(boss, xpos, ypos-2, 30, lineHeight, ""); myScanlineCount = new EditTextWidget(boss, xpos, ypos-2, 30, lineHeight, "");
myScanlineCount->setFont(font); myScanlineCount->setFont(font);
myScanlineCount->setEditable(false); 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); new StaticTextWidget(boss, xpos, ypos, lwidth, kLineHeight, "S. Cycles:", kTextAlignLeft);
xpos += lwidth; xpos += lwidth;
myScanlineCycles = new EditTextWidget(boss, xpos, ypos-2, 30, lineHeight, ""); myScanlineCycles = new EditTextWidget(boss, xpos, ypos-2, 30, lineHeight, "");
myScanlineCycles->setFont(font); myScanlineCycles->setFont(font);
myScanlineCycles->setEditable(false); 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); new StaticTextWidget(boss, xpos, ypos, lwidth, kLineHeight, "Pixel Pos:", kTextAlignLeft);
xpos += lwidth; xpos += lwidth;
myPixelPosition = new EditTextWidget(boss, xpos, ypos-2, 30, lineHeight, ""); myPixelPosition = new EditTextWidget(boss, xpos, ypos-2, 30, lineHeight, "");
myPixelPosition->setFont(font); myPixelPosition->setFont(font);
myPixelPosition->setEditable(false); 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); new StaticTextWidget(boss, xpos, ypos, lwidth, kLineHeight, "Color Clk:", kTextAlignLeft);
xpos += lwidth; xpos += lwidth;
myColorClocks = new EditTextWidget(boss, xpos, ypos-2, 30, lineHeight, ""); myColorClocks = new EditTextWidget(boss, xpos, ypos-2, 30, lineHeight, "");
@ -92,7 +90,7 @@ TiaInfoWidget::TiaInfoWidget(GuiObject* boss, int x, int y)
myColorClocks->setEditable(false); myColorClocks->setEditable(false);
// Calculate actual dimensions // Calculate actual dimensions
_w = 110 + 30 + lwidth; _w = 100 + 30 + lwidth;
_h = ypos + lineHeight; _h = ypos + lineHeight;
} }

View File

@ -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.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 // Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project // 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) 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) switch(cmd)
{ {
case kCMenuItemSelectedCmd: case kCMenuItemSelectedCmd:
@ -111,6 +105,7 @@ void TiaOutputWidget::handleCommand(CommandSender* sender, int cmd, int data, in
{ {
case 0: case 0:
{ {
int ystart = atoi(instance()->console().properties().get("Display.YStart").c_str());
int lines = myClickY + ystart - instance()->debugger().tiaDebug().scanlines(); int lines = myClickY + ystart - instance()->debugger().tiaDebug().scanlines();
if(lines > 0) if(lines > 0)
instance()->debugger().nextScanline(lines); instance()->debugger().nextScanline(lines);

View File

@ -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: 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 // Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project // 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; _flags = WIDGET_ENABLED | WIDGET_CLEARBG | WIDGET_RETAIN_FOCUS;
_w = 200; _w = 210;
_h = 120; _h = 120;
addFocusWidget(this); addFocusWidget(this);

View File

@ -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: 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 // Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project // Copyright (C) 2002-2004 The ScummVM project
@ -39,41 +39,46 @@ LauncherOptionsDialog::LauncherOptionsDialog(
const GUI::Font& font = instance()->font(); const GUI::Font& font = instance()->font();
const int vBorder = 4; const int vBorder = 4;
int yoffset; int xpos, ypos;
// The tab widget // 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 // 1) The ROM locations tab
myTab->addTab("ROM Settings"); myTab->addTab("ROM Settings");
yoffset = vBorder;
// ROM path // ROM path
new ButtonWidget(myTab, 15, yoffset, kButtonWidth + 14, 16, "Path", kChooseRomDirCmd, 0); xpos = 15;
myRomPath = new StaticTextWidget(myTab, 5 + kButtonWidth + 30, new ButtonWidget(myTab, xpos, ypos, kButtonWidth + 14, 16, "Path",
yoffset + 3, _w - (5 + kButtonWidth + 20) - 10, kChooseRomDirCmd, 0);
kLineHeight, "", kTextAlignLeft); xpos += kButtonWidth + 30;
myRomPath = new StaticTextWidget(myTab, xpos, ypos + 3,
_w - xpos - 10, kLineHeight,
"", kTextAlignLeft);
// 2) The snapshot settings tab // 2) The snapshot settings tab
myTab->addTab(" Snapshot Settings "); myTab->addTab(" Snapshot Settings ");
yoffset = vBorder;
// Snapshot path // Snapshot path
new ButtonWidget(myTab, 15, yoffset, kButtonWidth + 14, 16, "Path", kChooseSnapDirCmd, 0); xpos = 15;
mySnapPath = new StaticTextWidget(myTab, 5 + kButtonWidth + 30, new ButtonWidget(myTab, xpos, ypos, kButtonWidth + 14, 16, "Path",
yoffset + 3, _w - (5 + kButtonWidth + 20) - 10, kChooseSnapDirCmd, 0);
kLineHeight, "", kTextAlignLeft); xpos += kButtonWidth + 30;
yoffset += 22; mySnapPath = new StaticTextWidget(myTab, xpos, ypos + 3,
_w - xpos - 10, kLineHeight,
"", kTextAlignLeft);
// Snapshot save name // 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); "Save snapshot as: ", 87, 0);
mySnapTypePopup->appendEntry("romname", 1); mySnapTypePopup->appendEntry("romname", 1);
mySnapTypePopup->appendEntry("md5sum", 2); mySnapTypePopup->appendEntry("md5sum", 2);
yoffset += 18;
// Snapshot single or multiple saves // 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"); "Multiple snapshots");
// Activate the first tab // Activate the first tab

View File

@ -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: 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 // Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project // Copyright (C) 2002-2004 The ScummVM project
@ -71,17 +71,19 @@ OptionsDialog::OptionsDialog(OSystem* osystem, DialogContainer* parent)
{ {
int yoffset = 7; int yoffset = 7;
const int xoffset = (_w - kBigButtonWidth) / 2; const int xoffset = (_w - kBigButtonWidth) / 2;
ButtonWidget* b = NULL;
addBigButton("Video Settings", kVidCmd, 0); addBigButton("Video Settings", kVidCmd, 0);
#ifdef SOUND_SUPPORT #ifdef SOUND_SUPPORT
addBigButton("Audio Settings", kAudCmd, 0); addBigButton("Audio Settings", kAudCmd, 0);
#else #else
ButtonWidget* b = addBigButton("Audio Settings", kAudCmd, 0); b = addBigButton("Audio Settings", kAudCmd, 0);
b->clearFlags(WIDGET_ENABLED); b->clearFlags(WIDGET_ENABLED);
#endif #endif
addBigButton("Event Mapping", kEMapCmd, 0); addBigButton("Event Mapping", kEMapCmd, 0);
addBigButton("Game Information", kInfoCmd, 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("Help", kHelpCmd, 0);
addBigButton("About", kAboutCmd, 0); addBigButton("About", kAboutCmd, 0);
addBigButton("Exit Menu", kExitCmd, 0); addBigButton("Exit Menu", kExitCmd, 0);