mirror of https://github.com/stella-emu/stella.git
Initial checkin of Mac project for working with new version of Stella
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@443 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
6dc0465d35
commit
ec27cb2b1c
|
@ -4,7 +4,8 @@
|
|||
|
||||
Feel free to customize this file to suit your needs
|
||||
*/
|
||||
/* $Id: SDLMain.m,v 1.1.1.1 2004-06-16 02:30:30 markgrebe Exp $ */
|
||||
/* $Id: SDLMain.m,v 1.2 2005-05-27 17:13:23 markgrebe Exp $ */
|
||||
// TBD - Fix ICON drop to dock after running.
|
||||
|
||||
#import "SDL.h"
|
||||
#import "SDLMain.h"
|
||||
|
@ -117,10 +118,14 @@ char fileName[FILENAME_MAX];
|
|||
/* Hand off to main application code */
|
||||
args[0] = appName;
|
||||
if (fileToLoad)
|
||||
{
|
||||
args[1] = startupFile;
|
||||
status = stellaMain(2,args);
|
||||
}
|
||||
else
|
||||
args[1] = NULL;
|
||||
status = stellaMain(2,args);
|
||||
{
|
||||
status = stellaMain(1,args);
|
||||
}
|
||||
|
||||
/* We're done, thank you for playing */
|
||||
exit(status);
|
||||
|
|
|
@ -7,16 +7,15 @@
|
|||
<key>IBEditorPositions</key>
|
||||
<dict>
|
||||
<key>29</key>
|
||||
<string>116 460 371 44 0 0 1280 1002 </string>
|
||||
<string>116 460 205 44 0 0 1280 1002 </string>
|
||||
</dict>
|
||||
<key>IBFramework Version</key>
|
||||
<string>349.0</string>
|
||||
<string>437.0</string>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>29</integer>
|
||||
<integer>578</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>7U16</string>
|
||||
<string>8B15</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
Binary file not shown.
|
@ -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: SettingsMACOSX.cxx,v 1.3 2005-02-18 01:05:23 markgrebe Exp $
|
||||
// $Id: SettingsMACOSX.cxx,v 1.4 2005-05-27 17:12:58 markgrebe Exp $
|
||||
//============================================================================
|
||||
|
||||
#include <cassert>
|
||||
|
@ -27,7 +27,6 @@
|
|||
#include "bspf.hxx"
|
||||
#include "Console.hxx"
|
||||
#include "EventHandler.hxx"
|
||||
#include "StellaEvent.hxx"
|
||||
|
||||
#include "Settings.hxx"
|
||||
#include "SettingsMACOSX.hxx"
|
||||
|
@ -39,45 +38,9 @@ void prefsSave(void);
|
|||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
SettingsMACOSX::SettingsMACOSX()
|
||||
SettingsMACOSX::SettingsMACOSX(OSystem* osystem)
|
||||
: Settings(osystem)
|
||||
{
|
||||
char workingDir[FILENAME_MAX];
|
||||
|
||||
// First set variables that the parent class needs
|
||||
myBaseDir = "./";
|
||||
string stelladir = myBaseDir;
|
||||
|
||||
myStateDir = stelladir + "state/";
|
||||
if(access(myStateDir.c_str(), R_OK|W_OK|X_OK) != 0 )
|
||||
mkdir(myStateDir.c_str(), 0777);
|
||||
|
||||
string userPropertiesFile = stelladir + "stella.pro";
|
||||
// mySystemPropertiesFile = stelladir + "stella.pro";
|
||||
string userConfigFile = "";
|
||||
// mySystemConfigFile = "";
|
||||
|
||||
// Set up the names of the input and output config files
|
||||
myConfigOutputFile = userConfigFile;
|
||||
if (fileExists(userConfigFile))
|
||||
myConfigInputFile = userConfigFile;
|
||||
else
|
||||
myConfigInputFile = "";
|
||||
|
||||
myPropertiesOutputFile = userPropertiesFile;
|
||||
if(fileExists(userPropertiesFile))
|
||||
myPropertiesInputFile = userPropertiesFile;
|
||||
// Êelse if(fileExists(systemPropertiesFile)
|
||||
// Ê ÊmyPropertiesInputFile = systemPropertiesFile;
|
||||
else
|
||||
myPropertiesInputFile = "";
|
||||
|
||||
// Now create MacOSX specific settings
|
||||
#ifdef SNAPSHOT_SUPPORT
|
||||
set("ssdir", "./");
|
||||
#endif
|
||||
getwd(workingDir);
|
||||
set("romdir", workingDir);
|
||||
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
@ -85,11 +48,6 @@ SettingsMACOSX::~SettingsMACOSX()
|
|||
{
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void SettingsMACOSX::usage(string& message)
|
||||
{
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
void SettingsMACOSX::loadConfig()
|
||||
{
|
||||
|
@ -118,16 +76,3 @@ void SettingsMACOSX::saveConfig()
|
|||
prefsSave();
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
string SettingsMACOSX::stateFilename(const string& md5, uInt32 state)
|
||||
{
|
||||
ostringstream buf;
|
||||
buf << myStateDir << md5 << ".st" << state;
|
||||
return buf.str();
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
bool SettingsMACOSX::fileExists(const string& filename)
|
||||
{
|
||||
return (access(filename.c_str(), F_OK|W_OK) == 0);
|
||||
}
|
||||
|
|
|
@ -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: SettingsMACOSX.hxx,v 1.1.1.1 2004-06-16 02:30:30 markgrebe Exp $
|
||||
// $Id: SettingsMACOSX.hxx,v 1.2 2005-05-27 17:12:35 markgrebe Exp $
|
||||
//============================================================================
|
||||
|
||||
#ifndef SETTINGS_MAC_OSX_HXX
|
||||
|
@ -28,7 +28,7 @@ class Console;
|
|||
This class defines Macintosh OSX system specific settings.
|
||||
|
||||
@author Mark Grebe
|
||||
@version $Id: SettingsMACOSX.hxx,v 1.1.1.1 2004-06-16 02:30:30 markgrebe Exp $
|
||||
@version $Id: SettingsMACOSX.hxx,v 1.2 2005-05-27 17:12:35 markgrebe Exp $
|
||||
*/
|
||||
class SettingsMACOSX : public Settings
|
||||
{
|
||||
|
@ -36,7 +36,7 @@ class SettingsMACOSX : public Settings
|
|||
/**
|
||||
Create a new UNIX settings object
|
||||
*/
|
||||
SettingsMACOSX();
|
||||
SettingsMACOSX(OSystem* osystem);
|
||||
|
||||
/**
|
||||
Destructor
|
||||
|
@ -44,29 +44,6 @@ class SettingsMACOSX : public Settings
|
|||
virtual ~SettingsMACOSX();
|
||||
|
||||
public:
|
||||
/**
|
||||
This method should be called to get the filename of a state file
|
||||
given the state number.
|
||||
|
||||
@return String representing the full path of the state filename.
|
||||
*/
|
||||
virtual string stateFilename(const string& md5, uInt32 state);
|
||||
|
||||
/**
|
||||
This method should be called to test whether the given file exists.
|
||||
|
||||
@param filename The filename to test for existence.
|
||||
|
||||
@return boolean representing whether or not the file exists
|
||||
*/
|
||||
virtual bool fileExists(const string& filename);
|
||||
|
||||
/**
|
||||
Display the commandline settings for this UNIX version of Stella.
|
||||
|
||||
@param message A short message about this version of Stella
|
||||
*/
|
||||
virtual void usage(string& message);
|
||||
|
||||
/**
|
||||
This method should be called to load the current settings from the
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue