_global_
Field Attributes | Field Name and Description |
---|---|
<String> |
The command to execute (eg "x64").
|
<jgamebase.model.Database> |
Reference to the current database.
|
<String> |
The path to the database directory (eg "/home/USER/.jgamebase/C64lite").
|
<jgamebase.model.Emulator> |
Reference to the current emulator.
|
<String> |
The configuration file of the emulator (eg "/home/USER/.jgamebase/C64lite/Scripts/vice.ini").
|
<String> |
The path to the emulator script or executable (eg "/home/USER/.jgamebase/C64lite/Scripts").
|
<String> |
The file to be run (eg "/tmp/jgamebase/3DGLOOPR.T64").
|
<jgamebase.db.model.Game> |
Reference to the current game.
|
<int> |
The index of the file to be started on the supplied image (eg used to start the second file in the image).
|
<String> |
The name of the image.
|
<String> |
The name of the image in the native character set.
|
<boolean> |
true if the first image can be booted, false otherwise. |
<boolean> |
true if the item is a Game, false if the item is a piece of Music. |
<boolean> |
true if the operating system is Microsoft
Windows, false otherwise. |
<boolean> |
Whether the item works on a NTSC system.
|
<boolean> |
Whether the item works on a PAL system.
|
<boolean> |
Whether the item needs true drive emulation (no fast loader).
|
<jgamebase.db.model.Item> |
Reference to the current item.
|
<String> |
The comment of the item (if any).
|
<String> |
How the item is controlled (eg "Keyboard", or "Joystick Port 2").
|
<String> |
The filename (no path) of the item (eg "3DGLOOPR.T64").
|
<String> |
The file extension (no filename) of the item (eg "t64").
|
<String> |
The filename (no file extension) of the item (eg "3DGLOOPR").
|
<Array of String> |
The filenames (no paths) of the items.
|
<Array of String> |
The file extensions (no filenames) of the items.
|
<Array of String> |
The filenames (no file extensions) of the items.
|
<String> |
The name of the item (eg "3-D Glooper").
|
<String> |
If the item needs NTSC or PAL (eg "PAL", or "PAL+NTSC").
|
<String> |
The path (no filename) of the item (eg "/tmp/jgamebase").
|
<String> |
Path and filename of the item (eg "/tmp/jgamebase/3DGLOOPR.T64").
|
<Array of String> |
The paths (no filenames) of the items.
|
<Array of String> |
Paths and filenames of the items.
|
<int> |
The maximum number of players that can play the item simultanously.
|
<int> |
The minimum number of players that can play the item simultanously.
|
<String> |
The type (equals the file extension) of the item (eg "t64").
|
<String> |
The version comment of the item (eg "load manually", or "not working").
|
<constant> <String> |
The String "Joystick Port 1" for comparison with variable itemControl.
|
<constant> <String> |
The String "Joystick Port 2" for comparison with variable itemControl.
|
<constant> <String> |
The String "Keyboard" for comparison with variable itemControl.
|
<constant> <String> |
The String "Koala Pad" for comparison with variable itemControl.
|
<constant> <String> |
The String "Light Gun" for comparison with variable itemControl.
|
<constant> <String> |
The String "Light Pen" for comparison with variable itemControl.
|
<String> |
The line separator as read from System.getProperty("line.separator").
|
<constant> <String> |
The String "Mouse" for comparison with variable itemControl.
|
<jgamebase.db.model.Music> |
Reference to the current music.
|
<constant> <String> |
The String "This type is not supported by this emulator!" for use with Show_Message().
|
<constant> <String> |
The String "NTSC" for comparison with variable itemPalNtsc.
|
<String> |
The name of the operating system as read from System.getProperty("os.name").
|
<constant> <String> |
The String "Paddle Port 1" for comparison with variable itemControl.
|
<constant> <String> |
The String "Paddle Port 2" for comparison with variable itemControl.
|
<constant> <String> |
The String "PAL" for comparison with variable itemPalNtsc.
|
<constant> <String> |
The String "PAL+NTSC" for comparison with variable itemPalNtsc.
|
<constant> <String> |
The String "PAL(+NTSC?)" for comparison with variable itemPalNtsc.
|
<String> |
The system-dependent default name-separator character.
|
<boolean> |
Whether real joysticks are to be used (instead of eg keyboard).
|
<String> |
The path to the work directory where GameBase extracts and runs files (eg "/tmp/jgamebase").
|
Method Attributes | Method Name and Description |
---|---|
Add_CLP()
Add parameters to the command line (CLP = Command Line Parameters).
|
|
Clear all Command Line Parameters.
|
|
Dump()
Print all variables (for debug purposes).
|
|
<boolean> |
existsInPath(needle)
Search command in the operating system search path and (last)
in the database script directory.
|
<String> |
findInPath(needle)
Search command in the operating system search path and (last)
in the database script directory.
|
<String> |
findRom(needle)
Search rom (single filename or array of possible filenames)
in the database "ROMs" directory (ignoring case).
|
An alias for
Run_GameEmulator() . |
|
Run the game emulator (stored in the variable "
command ")
with the parameters (stored in the array "commandline ")
by calling Java "Emulators.executeGame(commandline) ". |
|
Run the music emulator (stored in the variable "
command ")
with the parameters (stored in the array "commandline ")
by calling Java "Emulators.executeMusic(commandline) ". |
|
Set_CFG(filename, key)
Clears a value in a configuration file.
|
|
Set_CFG_Item(filename, key, delimiter, value)
Sets a value in a configuration file.
|
|
Set_CFG_Value(filename, key, value)
Sets a value in a configuration file.
|
|
Set_INI_Value(filename, section, key, value)
Sets a value in an windows style ".ini" configuration file.
|
|
Show_Message(message)
Displays a dialog with a message for the user.
|
|
<String> |
Value(key)
Get the value of an user defined "KEY=VALUE" pair set in the database.
|
Field Detail
{String}
command
The command to execute (eg "x64"). Must be set in the script,
otherwise calls to Run_Emulator() will fail.
{jgamebase.model.Database}
Database
Reference to the current database.
{String}
dbPath
The path to the database directory (eg "/home/USER/.jgamebase/C64lite").
{jgamebase.model.Emulator}
Emulator
Reference to the current emulator.
{String}
emulatorConfigFile
The configuration file of the emulator (eg "/home/USER/.jgamebase/C64lite/Scripts/vice.ini").
{String}
emulatorPath
The path to the emulator script or executable (eg "/home/USER/.jgamebase/C64lite/Scripts").
{String}
fileToRun
The file to be run (eg "/tmp/jgamebase/3DGLOOPR.T64").
{jgamebase.db.model.Game}
Game
Reference to the current game.
{int}
imageIndex
The index of the file to be started on the supplied image (eg used to start the second file in the image).
{String}
imageName
The name of the image.
{String}
imageNameNative
The name of the image in the native character set.
{boolean}
isBootable
true
if the first image can be booted, false
otherwise.
{boolean}
isGame
true
if the item is a Game, false
if the item is a piece of Music.
{boolean}
isOsWindows
true
if the operating system is Microsoft
Windows, false
otherwise.
{boolean}
isRunsOnNtsc
Whether the item works on a NTSC system.
{boolean}
isRunsOnPal
Whether the item works on a PAL system.
{boolean}
isRunsOnTrueDrive
Whether the item needs true drive emulation (no fast loader).
{jgamebase.db.model.Item}
Item
Reference to the current item.
{String}
itemComment
The comment of the item (if any).
{String}
itemControl
How the item is controlled (eg "Keyboard", or "Joystick Port 2").
{String}
itemFile
The filename (no path) of the item (eg "3DGLOOPR.T64").
{String}
itemFileExt
The file extension (no filename) of the item (eg "t64").
{String}
itemFileNoExt
The filename (no file extension) of the item (eg "3DGLOOPR").
{Array of String}
itemFiles
The filenames (no paths) of the items.
{Array of String}
itemFilesExt
The file extensions (no filenames) of the items.
{Array of String}
itemFilesNoExt
The filenames (no file extensions) of the items.
{String}
itemName
The name of the item (eg "3-D Glooper").
{String}
itemPalNtsc
If the item needs NTSC or PAL (eg "PAL", or "PAL+NTSC").
{String}
itemPath
The path (no filename) of the item (eg "/tmp/jgamebase").
{String}
itemPathAndFile
Path and filename of the item (eg "/tmp/jgamebase/3DGLOOPR.T64").
{Array of String}
itemPaths
The paths (no filenames) of the items.
{Array of String}
itemPathsAndFiles
Paths and filenames of the items.
{int}
itemPlayersMax
The maximum number of players that can play the item simultanously.
{int}
itemPlayersMin
The minimum number of players that can play the item simultanously.
{String}
itemType
The type (equals the file extension) of the item (eg "t64").
{String}
itemVersionComment
The version comment of the item (eg "load manually", or "not working").
<constant>
{String}
JOYPORT1
The String "Joystick Port 1" for comparison with variable itemControl.
<constant>
{String}
JOYPORT2
The String "Joystick Port 2" for comparison with variable itemControl.
<constant>
{String}
KEYBOARD
The String "Keyboard" for comparison with variable itemControl.
<constant>
{String}
KOALAPAD
The String "Koala Pad" for comparison with variable itemControl.
<constant>
{String}
LIGHTGUN
The String "Light Gun" for comparison with variable itemControl.
<constant>
{String}
LIGHTPEN
The String "Light Pen" for comparison with variable itemControl.
{String}
lineSeparator
The line separator as read from System.getProperty("line.separator").
<constant>
{String}
MOUSE
The String "Mouse" for comparison with variable itemControl.
{jgamebase.db.model.Music}
Music
Reference to the current music.
<constant>
{String}
NOT_SUPPORTED
The String "This type is not supported by this emulator!" for use with Show_Message().
<constant>
{String}
NTSC
The String "NTSC" for comparison with variable itemPalNtsc.
{String}
osName
The name of the operating system as read from System.getProperty("os.name").
<constant>
{String}
PADDLEPORT1
The String "Paddle Port 1" for comparison with variable itemControl.
<constant>
{String}
PADDLEPORT2
The String "Paddle Port 2" for comparison with variable itemControl.
<constant>
{String}
PAL
The String "PAL" for comparison with variable itemPalNtsc.
<constant>
{String}
PALNTSC
The String "PAL+NTSC" for comparison with variable itemPalNtsc.
<constant>
{String}
PALntsc
The String "PAL(+NTSC?)" for comparison with variable itemPalNtsc.
{String}
separator
The system-dependent default name-separator character. On UNIX
systems the value of this field is
'/'
; on Microsoft
Windows systems it is '\'
.
{boolean}
useHardwareJoystick
Whether real joysticks are to be used (instead of eg keyboard).
{String}
workPath
The path to the work directory where GameBase extracts and runs files (eg "/tmp/jgamebase").
Method Detail
Add_CLP()
Add parameters to the command line (CLP = Command Line Parameters).
- Parameters:
- ...
- the values to add
Clear_CLP()
Clear all Command Line Parameters.
Dump()
Print all variables (for debug purposes).
{boolean}
existsInPath(needle)
Search command in the operating system search path and (last)
in the database script directory.
- Parameters:
- {String} needle
- Returns:
true
if the command is found,false
otherwise.
{String}
findInPath(needle)
Search command in the operating system search path and (last)
in the database script directory.
- Parameters:
- {String} needle
- Returns:
- The absolute path to the command, or "" (empty String) otherwise.
{String}
findRom(needle)
Search rom (single filename or array of possible filenames)
in the database "ROMs" directory (ignoring case).
- Parameters:
- {String} needle
- Returns:
- The absolute path to the rom, or "" (empty String) otherwise.
Run_Emulator()
An alias for
Run_GameEmulator()
.
Run_GameEmulator()
Run the game emulator (stored in the variable "
command
")
with the parameters (stored in the array "commandline
")
by calling Java "Emulators.executeGame(commandline)
".
Run_MusicEmulator()
Run the music emulator (stored in the variable "
command
")
with the parameters (stored in the array "commandline
")
by calling Java "Emulators.executeMusic(commandline)
".
Set_CFG(filename, key)
Clears a value in a configuration file.
Shortcut for Set_CFG_Item(filename, key, "", "").
- Parameters:
- {String or File} filename
- The filename or File that describes the configuration file.
- {String} key
- The parameter to set.
Set_CFG_Item(filename, key, delimiter, value)
Sets a value in a configuration file. The file will be searched for a line
starting with key and this line will be replaced by key + delimiter + value.
(eg key = "useJoystick", delimiter = "=", value = "true": will lead to the
line "useJoystick=true")
- Parameters:
- {String or File} filename
- The filename or File that describes the configuration file.
- {String} key
- The parameter to set.
- {String} delimiter
- The String between key and value.
- value
- The value the parameter will be set to.
Set_CFG_Value(filename, key, value)
Sets a value in a configuration file.
Shortcut for Set_CFG_Item(filename, key, "=", value).
- Parameters:
- {String or File} filename
- The filename or File that describes the configuration file.
- {String} key
- The parameter to set.
- value
- The value the parameter will be set to.
Set_INI_Value(filename, section, key, value)
Sets a value in an windows style ".ini" configuration file. The file will be searched for the section and
the section will be searched for a line starting with key. This line will be replaced by key + "=" + value.
- Parameters:
- {String or File} filename
- The filename or File that describes the configuration file.
- {String} section
- The name of the section in the ini file (started through a "[section]" line).
- {String} key
- The parameter to set.
- value
- The value the parameter will be set to.
Show_Message(message)
Displays a dialog with a message for the user.
- Parameters:
- {String} message
- The message to display.
{String}
Value(key)
Get the value of an user defined "KEY=VALUE" pair set in the database.
E.g. to display the value of the user defined variable "msg" only if it is set:
if (Value("msg").contains("*")) { Show_Message( Value("msg") ); }
- Parameters:
- {String} key
- The key to get the value of.
- Returns:
- {String} The value of the given key, or "" (empty String) if not set.