Removed all references to stella.pro locations from configure and Makefile

scripts, since the properties are now built in, and will never need a
global storage directory.

Reworked the ROM launcher again, by moving the 'Reload' button to the
Launcher options dialog (by popular request from the GP2X forums).  The
'Go Up' button is now always present on the main launcher interface, but
is disabled when not in 'rom browse' mode.

Added a button to VideoDialog for the recently added 'tiadefaults'
functionality.  It defaults to off, which is the current behaviour in
Stella.  (De)selecting this item will require a ROM reload.


git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1058 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
stephena 2006-03-19 20:57:55 +00:00
parent de5af204cf
commit 893644c703
9 changed files with 84 additions and 39 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: Makefile,v 1.22 2006-03-11 21:34:37 stephena Exp $
## $Id: Makefile,v 1.23 2006-03-19 20:57:54 stephena Exp $
##
## Based on code from ScummVM - Scumm Interpreter
## Copyright (C) 2002-2004 The ScummVM project
@ -171,14 +171,12 @@ install: all
$(INSTALL) -d "$(DESTDIR)$(BINDIR)"
$(INSTALL) -c -s -m 755 "$(srcdir)/stella$(EXEEXT)" "$(DESTDIR)$(BINDIR)/stella$(EXEEXT)"
$(INSTALL) -d "$(DESTDIR)$(DOCDIR)"
$(INSTALL) -c -m 644 "$(srcdir)/Announce.txt" "$(srcdir)/Changes.txt" "$(srcdir)/Copyright.txt" "$(srcdir)/License.txt" "$(srcdir)/README-PSP.txt" "$(srcdir)/README-SDL.txt" "$(srcdir)/Readme.txt" "$(srcdir)/Todo.txt" "$(srcdir)/docs/stella.html" "$(srcdir)/docs/debugger.html" "$(DESTDIR)$(DOCDIR)/"
$(INSTALL) -c -m 644 "$(srcdir)/Announce.txt" "$(srcdir)/Changes.txt" "$(srcdir)/Copyright.txt" "$(srcdir)/License.txt" "$(srcdir)/README-SDL.txt" "$(srcdir)/Readme.txt" "$(srcdir)/Todo.txt" "$(srcdir)/docs/index.html" "$(srcdir)/docs/debugger.html" "$(DESTDIR)$(DOCDIR)/"
$(INSTALL) -d "$(DESTDIR)$(DOCDIR)/graphics"
$(INSTALL) -c -m 644 "$(srcdir)/docs/graphics/chucky_cheese.png" "$(srcdir)/docs/graphics/circuit.png" "$(srcdir)/docs/graphics/console.png" "$(srcdir)/docs/graphics/eventmapping.png" "$(srcdir)/docs/graphics/eventmapping_remap.png" "$(srcdir)/docs/graphics/jr_pacman.png" "$(srcdir)/docs/graphics/launcher_options_rom.png" "$(srcdir)/docs/graphics/launcher_options_snap.png" "$(srcdir)/docs/graphics/launcher.png" "$(srcdir)/docs/graphics/options_about.png" "$(srcdir)/docs/graphics/options_audio.png" "$(srcdir)/docs/graphics/options_gameinfo.png" "$(srcdir)/docs/graphics/options_help.png" "$(srcdir)/docs/graphics/options_video.png" "$(srcdir)/docs/graphics/pacman.png" "$(srcdir)/docs/graphics/rom_browser.png" "$(srcdir)/docs/graphics/secret_quest.png" "$(srcdir)/docs/graphics/space_invaders.png" "$(DESTDIR)$(DOCDIR)/graphics"
$(INSTALL) -d "$(DESTDIR)$(DATADIR)/icons"
$(INSTALL) -c -m 644 "$(srcdir)/src/common/stella.xpm" "$(DESTDIR)$(DATADIR)/icons"
$(INSTALL) -d "$(DESTDIR)$(DATADIR)/stella"
# $(INSTALL) -c -m 644 "$(srcdir)/src/emucore/stella.pro" "$(DESTDIR)$(DATADIR)/stella"
@echo $(PROPDIR)
install-strip: install
strip stella$(EXEEXT)
@ -186,7 +184,6 @@ uninstall:
rm -f "$(DESTDIR)$(BINDIR)/stella$(EXEEXT)"
rm -rf "$(DESTDIR)$(DOCDIR)/"
rm -f "$(DESTDIR)$(DATADIR)/icons/stella.xpm"
rm -rf "$(DESTDIR)$(DATADIR)/stella"
# Special rule for Win32 icon stuff (there's probably a better way to do this ...)
src/win32/stella_icon.o: src/win32/stella.ico src/win32/stella.rc
@ -197,8 +194,7 @@ win32dist: stella$(EXEEXT)
rm -rf $(DISTNAME)
mkdir -p $(DISTNAME)/docs/graphics
strip stella$(EXEEXT) -o $(DISTNAME)/stella$(EXEEXT)
# cp src/emucore/stella.pro $(DISTNAME)
cp Announce.txt Changes.txt Copyright.txt License.txt README-PSP.txt README-SDL.txt Readme.txt Todo.txt $(DISTNAME)/docs
cp Announce.txt Changes.txt Copyright.txt License.txt README-SDL.txt Readme.txt Todo.txt $(DISTNAME)/docs
cp -r docs/*.html $(DISTNAME)/docs
cp -r docs/graphics/*.png $(DISTNAME)/docs/graphics
cp /usr/bin/SDL.dll /mingw/bin/libpng12.dll /mingw/bin/zlib1.dll $(DISTNAME)
@ -250,7 +246,6 @@ gp2x-organize:
mkdir -p "$(srcdir)/gp2x/docs"
cp -v $(srcdir)/stella $(srcdir)/gp2x
cp -v $(srcdir)/src/gp2x/stella.gpe $(srcdir)/gp2x
# cp -v $(srcdir)/src/emucore/stella.pro $(srcdir)/gp2x
cp -v $(srcdir)/README-GP2X.txt $(srcdir)/gp2x
cp -v -r $(srcdir)/docs/* $(srcdir)/gp2x/docs

3
stella/configure vendored
View File

@ -793,9 +793,6 @@ case $_host_os in
if test "$_build_gl" = yes ; then
DEFINES="$DEFINES -DDISPLAY_OPENGL"
fi
# Add properties directory
PROPDIR="$_datadir/stella"
DEFINES="$DEFINES -DPROPDIR=\"\\\"$PROPDIR\\\"\""
;;
win32)
DEFINES="$DEFINES -DBSPF_WIN32 -DHAVE_GETTIMEOFDAY -DHAVE_INTTYPES"

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: LauncherDialog.cxx,v 1.48 2006-03-19 18:17:48 stephena Exp $
// $Id: LauncherDialog.cxx,v 1.49 2006-03-19 20:57:55 stephena Exp $
//
// Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project
@ -45,7 +45,7 @@ LauncherDialog::LauncherDialog(OSystem* osystem, DialogContainer* parent,
int x, int y, int w, int h)
: Dialog(osystem, parent, x, y, w, h),
myStartButton(NULL),
myRelPrevButton(NULL),
myPrevDirButton(NULL),
myOptionsButton(NULL),
myQuitButton(NULL),
myList(NULL),
@ -104,10 +104,10 @@ LauncherDialog::LauncherDialog(OSystem* osystem, DialogContainer* parent,
myStartButton->setEditable(true);
wid.push_back(myStartButton);
xpos += bwidth + 8;
myRelPrevButton = new ButtonWidget(this, font, xpos, ypos, bwidth, bheight,
"", kRelPrevCmd, 0);
myRelPrevButton->setEditable(true);
wid.push_back(myRelPrevButton);
myPrevDirButton = new ButtonWidget(this, font, xpos, ypos, bwidth, bheight,
"Go Up", kPrevDirCmd, 0);
myPrevDirButton->setEditable(true);
wid.push_back(myPrevDirButton);
xpos += bwidth + 8;
myOptionsButton = new ButtonWidget(this, font, xpos, ypos, bwidth, bheight,
"Options", kOptionsCmd, 0);
@ -131,10 +131,10 @@ LauncherDialog::LauncherDialog(OSystem* osystem, DialogContainer* parent,
myOptionsButton->setEditable(true);
wid.push_back(myOptionsButton);
xpos += bwidth + 8;
myRelPrevButton = new ButtonWidget(this, font, xpos, ypos, bwidth, bheight,
"", kRelPrevCmd, 0);
myRelPrevButton->setEditable(true);
wid.push_back(myRelPrevButton);
myPrevDirButton = new ButtonWidget(this, font, xpos, ypos, bwidth, bheight,
"Go Up", kPrevDirCmd, 0);
myPrevDirButton->setEditable(true);
wid.push_back(myPrevDirButton);
xpos += bwidth + 8;
myStartButton = new ButtonWidget(this, font, xpos, ypos, bwidth, bheight,
"Select", kStartCmd, 0);
@ -157,7 +157,7 @@ LauncherDialog::LauncherDialog(OSystem* osystem, DialogContainer* parent,
// (De)activate browse mode
myBrowseModeFlag = instance()->settings().getBool("rombrowse");
myRelPrevButton->setLabel(myBrowseModeFlag ? "Go Up" : "Reload");
myPrevDirButton->setEnabled(myBrowseModeFlag);
myNoteLabel->setEnabled(!myBrowseModeFlag);
}
@ -183,7 +183,7 @@ void LauncherDialog::loadConfig()
void LauncherDialog::enableButtons(bool enable)
{
myStartButton->setEnabled(enable);
myRelPrevButton->setEnabled(enable);
myPrevDirButton->setEnabled(enable && myBrowseModeFlag);
myOptionsButton->setEnabled(enable);
myQuitButton->setEnabled(enable);
}
@ -512,7 +512,7 @@ void LauncherDialog::handleCommand(CommandSender* sender, int cmd,
parent()->addDialog(myOptions);
break;
case kRelPrevCmd:
case kPrevDirCmd:
{
FilesystemNode dir(myCurrentDir);
myCurrentDir = dir.getParent().path();
@ -536,12 +536,20 @@ void LauncherDialog::handleCommand(CommandSender* sender, int cmd,
updateListing();
break;
case kSnapDirChosenCmd:
// Stub just in case we need it
break;
case kBrowseChangedCmd:
myBrowseModeFlag = instance()->settings().getBool("rombrowse");
myRelPrevButton->setLabel(myBrowseModeFlag ? "Go Up" : "Reload");
myPrevDirButton->setEnabled(myBrowseModeFlag);
myNoteLabel->setEnabled(!myBrowseModeFlag);
break;
case kReloadRomDirCmd:
updateListing(true);
break;
default:
Dialog::handleCommand(sender, cmd, data, 0);
}

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: LauncherDialog.hxx,v 1.18 2006-03-19 18:17:48 stephena Exp $
// $Id: LauncherDialog.hxx,v 1.19 2006-03-19 20:57:55 stephena Exp $
//
// Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project
@ -35,12 +35,12 @@ class OSystem;
#include "GameList.hxx"
#include "bspf.hxx"
// These must be accessible from LauncherOptionsDialog
enum {
kChooseRomDirCmd = 'roms', // rom select
kChooseSnapDirCmd = 'snps', // snap select
kRomDirChosenCmd = 'romc', // rom chosen
kSnapDirChosenCmd = 'snpc', // snap chosen
kBrowseChangedCmd = 'broc' // browse mode toggled
kBrowseChangedCmd = 'broc', // browse mode toggled
kReloadRomDirCmd = 'rdrl' // reload the current listing
};
class LauncherDialog : public Dialog
@ -62,7 +62,7 @@ class LauncherDialog : public Dialog
protected:
ButtonWidget* myStartButton;
ButtonWidget* myRelPrevButton;
ButtonWidget* myPrevDirButton;
ButtonWidget* myOptionsButton;
ButtonWidget* myQuitButton;
@ -90,7 +90,7 @@ class LauncherDialog : public Dialog
enum {
kStartCmd = 'STRT',
kRelPrevCmd = 'REPV',
kPrevDirCmd = 'PRVD',
kOptionsCmd = 'OPTI',
kQuitCmd = 'QUIT'
};

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: LauncherOptionsDialog.cxx,v 1.15 2006-03-09 17:04:01 stephena Exp $
// $Id: LauncherOptionsDialog.cxx,v 1.16 2006-03-19 20:57:55 stephena Exp $
//
// Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project
@ -62,7 +62,15 @@ LauncherOptionsDialog::LauncherOptionsDialog(
// Use ROM browse mode
xpos = 30; ypos += myRomPath->getHeight() + 8;
myBrowseCheckbox = new CheckboxWidget(myTab, font, xpos, ypos,
"Browse folders");
"Browse folders", kBrowseDirCmd);
// Reload current ROM listing
xpos += myBrowseCheckbox->getWidth() + 20;
myReloadButton = new ButtonWidget(myTab, font, xpos, ypos-2,
font.getStringWidth("Reload ROM Listing") + 20,
bheight,
"Reload ROM Listing", kReloadRomDirCmd, 0);
// 2) The snapshot settings tab
myTab->addTab(" Snapshot Settings ");
@ -134,6 +142,7 @@ void LauncherOptionsDialog::loadConfig()
b = instance()->settings().getBool("rombrowse");
myBrowseCheckbox->setState(b);
myReloadButton->setEnabled(!b);
s = instance()->settings().getString("ssdir");
mySnapPath->setLabel(s);
@ -218,6 +227,12 @@ void LauncherOptionsDialog::handleCommand(CommandSender* sender, int cmd,
openSnapBrowser();
break;
/*
case kBrowseDirCmd:
myReloadButton->setEnabled(!myBrowseCheckbox->getState());
break;
*/
case kRomDirChosenCmd:
{
FilesystemNode dir(myBrowser->getResult());
@ -232,6 +247,12 @@ void LauncherOptionsDialog::handleCommand(CommandSender* sender, int cmd,
break;
}
case kReloadRomDirCmd:
{
sendCommand(kReloadRomDirCmd, 0, 0);
break;
}
default:
Dialog::handleCommand(sender, cmd, data, 0);
break;

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: LauncherOptionsDialog.hxx,v 1.9 2006-03-09 17:04:01 stephena Exp $
// $Id: LauncherOptionsDialog.hxx,v 1.10 2006-03-19 20:57:55 stephena Exp $
//
// Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project
@ -54,6 +54,7 @@ class LauncherOptionsDialog : public Dialog, public CommandSender
// Rom path controls
StaticTextWidget* myRomPath;
CheckboxWidget* myBrowseCheckbox;
ButtonWidget* myReloadButton;
// Snapshot controls
StaticTextWidget* mySnapPath;
@ -61,6 +62,12 @@ class LauncherOptionsDialog : public Dialog, public CommandSender
CheckboxWidget* mySnapSingleCheckbox;
private:
enum {
kChooseRomDirCmd = 'LOrm', // rom select
kChooseSnapDirCmd = 'LOsn', // snap select
kBrowseDirCmd = 'LObd' // browse mode
};
void openRomBrowser();
void openSnapBrowser();
};

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: OptionsDialog.cxx,v 1.36 2006-02-22 17:38:04 stephena Exp $
// $Id: OptionsDialog.cxx,v 1.37 2006-03-19 20:57:55 stephena Exp $
//
// Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project
@ -104,7 +104,7 @@ OptionsDialog::OptionsDialog(OSystem* osystem, DialogContainer* parent)
int x, y, w, h;
// Now create all the dialogs attached to each menu button
w = 230; h = 130;
w = 230; h = 135;
checkBounds(fbWidth, fbHeight, &x, &y, &w, &h);
myVideoDialog = new VideoDialog(myOSystem, parent, font, x, y, w, h);

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: VideoDialog.cxx,v 1.27 2006-02-22 17:38:04 stephena Exp $
// $Id: VideoDialog.cxx,v 1.28 2006-03-19 20:57:55 stephena Exp $
//
// Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project
@ -122,6 +122,11 @@ VideoDialog::VideoDialog(OSystem* osystem, DialogContainer* parent,
myUseDeskResCheckbox = new CheckboxWidget(this, font, xpos + 5, ypos,
"Desktop Res in FS");
ypos += lineHeight + 4;
myTiaDefaultsCheckbox = new CheckboxWidget(this, font, xpos + 5, ypos,
"Use TIA defaults");
ypos += lineHeight + 20;
// Add Defaults, OK and Cancel buttons
@ -210,6 +215,10 @@ void VideoDialog::loadConfig()
b = instance()->settings().getBool("gl_fsmax");
myUseDeskResCheckbox->setState(b);
// Use TIA defaults instead of tweaked values
b = instance()->settings().getBool("tiadefaults");
myTiaDefaultsCheckbox->setState(b);
// Make sure that mutually-exclusive items are not enabled at the same time
i = myRendererPopup->getSelectedTag() - 1;
handleRendererChange(i);
@ -299,6 +308,12 @@ void VideoDialog::saveConfig()
restart = true;
}
// Use TIA defaults instead of tweaked values
b = myTiaDefaultsCheckbox->getState();
instance()->settings().setBool("tiadefaults", b);
myTiaDefaultsCheckbox->setState(b);
// Finally, issue a complete framebuffer re-initialization
// Not all options may require a full re-initialization, so we only
// do it when necessary
@ -325,6 +340,7 @@ void VideoDialog::setDefaults()
myFullscreenCheckbox->setState(false);
myUseDeskResCheckbox->setState(true);
myTiaDefaultsCheckbox->setState(false);
// Make sure that mutually-exclusive items are not enabled at the same time
handleRendererChange(0); // 0 indicates software mode

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: VideoDialog.hxx,v 1.11 2006-02-22 17:38:04 stephena Exp $
// $Id: VideoDialog.hxx,v 1.12 2006-03-19 20:57:55 stephena Exp $
//
// Based on code from ScummVM - Scumm Interpreter
// Copyright (C) 2002-2004 The ScummVM project
@ -60,6 +60,7 @@ class VideoDialog : public Dialog
StaticTextWidget* myZoomLabel;
CheckboxWidget* myFullscreenCheckbox;
CheckboxWidget* myUseDeskResCheckbox;
CheckboxWidget* myTiaDefaultsCheckbox;
private:
void loadConfig();