com.b3dgs.lionengine
Class Engine

java.lang.Object
  extended by com.b3dgs.lionengine.Engine
Direct Known Subclasses:
EngineFactory

public abstract class Engine
extends java.lang.Object

LionEngine
By Byron 3D Games Studio

Since:
13 June 2010
Version:
4.0.0
Author:
Pierre-Alexandre

Field Summary
static java.lang.String AUTHOR
          Engine author.
static int CORES
          Number of available cores.
static java.lang.String DATE
          Engine last release date.
static Engine ENGINE
          Engine factory.
protected static java.lang.String name
           
static java.lang.String NAME
          Engine name.
protected static boolean started
           
protected static java.lang.String version
           
static java.lang.String VERSION
          Engine version.
 
Constructor Summary
Engine()
           
 
Method Summary
abstract  Initializer createInitializer(int widthRef, int heightRef, int depthRef, int rateRef)
          Create a new initializer, used for game configuration reference.
abstract  Loader createLoader(Initializer init, Config config, AbstractLauncher launcher)
          Create a loader, from an initializer and a config.
static void start(java.lang.String programName, java.lang.String programVersion, java.lang.String ressourcesDir, boolean debug, int theme)
          Start engine; has to be called before first and only one time.
static java.lang.String tempDir()
          Get temporary directory (where are stored files from jar)
static void verbose(boolean error, java.lang.String function, java.lang.String... message)
          Display a verbose message
static void verbose(java.lang.String function, java.lang.String... message)
          Display a verbose message to standard output.
static java.lang.String workingDir()
          Get current working directory (execution directory).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

public static final java.lang.String NAME
Engine name.

See Also:
Constant Field Values

VERSION

public static final java.lang.String VERSION
Engine version.

See Also:
Constant Field Values

DATE

public static final java.lang.String DATE
Engine last release date.

See Also:
Constant Field Values

AUTHOR

public static final java.lang.String AUTHOR
Engine author.

See Also:
Constant Field Values

ENGINE

public static final Engine ENGINE
Engine factory.


CORES

public static final int CORES
Number of available cores.


started

protected static boolean started

name

protected static java.lang.String name

version

protected static java.lang.String version
Constructor Detail

Engine

public Engine()
Method Detail

start

public static void start(java.lang.String programName,
                         java.lang.String programVersion,
                         java.lang.String ressourcesDir,
                         boolean debug,
                         int theme)
Start engine; has to be called before first and only one time.

Parameters:
programName - program name.
programVersion - program version.
ressourcesDir - main ressources directory.
debug - debug state (false for release state).
theme - theme to use for any window.

verbose

public static void verbose(boolean error,
                           java.lang.String function,
                           java.lang.String... message)
Display a verbose message

Parameters:
error - true to use err output, standard else.
function - current function name.
message - list of messages.

verbose

public static void verbose(java.lang.String function,
                           java.lang.String... message)
Display a verbose message to standard output.

Parameters:
function - current function name.
message - list of messages.

tempDir

public static java.lang.String tempDir()
Get temporary directory (where are stored files from jar)

Returns:
temp directory (/tmp, .../AppData/Local/Temp, ...)

workingDir

public static java.lang.String workingDir()
Get current working directory (execution directory).

Returns:
working directory.

createInitializer

public abstract Initializer createInitializer(int widthRef,
                                              int heightRef,
                                              int depthRef,
                                              int rateRef)
Create a new initializer, used for game configuration reference. This structure will describe the standard game requirements, and will allow to know scaling factor.

Parameters:
widthRef - game standard width.
heightRef - game standard height.
depthRef - game standard depth.
rateRef - game standard frame rate.
Returns:
created initializer.

createLoader

public abstract Loader createLoader(Initializer init,
                                    Config config,
                                    AbstractLauncher launcher)
Create a loader, from an initializer and a config. The launcher reference will allow to go back to the launcher on exiting.

Parameters:
init - initializer reference.
config - configuration reference.
launcher - launcher reference.
Returns:
created loader.