uk.co.javagear
Class Setup

java.lang.Object
  extended by uk.co.javagear.Setup

public final class Setup
extends java.lang.Object

Global system settings.

Version:
17th March 2002
Author:
Copyright (C) 2002 Chris White
See Also:
"JavaGear Final Project Report"

Nested Class Summary
static class Setup.System
          The different kinds of systems for which ROMs can be read.
 
Field Summary
static int GG_HEIGHT
          GG Screen Height.
static int GG_WIDTH
          GG Screen Width.
static int GG_X_OFFSET
          GG Window Starts Here (x).
static int GG_Y_OFFSET
          GG Window Starts Here (y).
private  boolean ggModeActive
          GG Mode.
private  int hEnd
          Horizontal Viewport End.
private  int hEndScaled
          Horizontal Viewport End (Scaled Mode).
private  int hEndScaledGG
          Horizontal Viewport End (Scaled Game Gear Mode).
private  int hStart
          Horizontal Viewport Start.
private  int hStartScaled
          Horizontal Viewport Start (Scaled Mode).
private  boolean pauseButton
          SMS Pause Button.
private  int scale
          The viewport's scale.
static int SMS_HEIGHT
          SMS Screen Height.
static int SMS_WIDTH
          SMS Screen Width.
private  boolean smsModeActive
          SMS Mode.
private  Setup.System system
          The system being emulated.
private  int vEnd
          Vertical Viewport End.
private  int vEndScaled
          Vertical Viewport End (Scaled Mode).
private  int vEndScaledGG
          Vertical Viewport End (Scaled Game Gear Mode).
private  int vStart
          Vertical Viewport Start.
private  int vStartScaled
          Vertical Viewport Start (Scaled Mode).
static java.lang.String ZIP_FILE_EXTENSION
          The extension Zip files containing SMS or GG ROMs should have.
 
Constructor Summary
Setup()
          Setup.
 
Method Summary
 int getHEnd()
          Return the horizontal viewport end.
 int getHEndScaled()
          Return the horizontal viewport end (scaled mode).
 int getHEndScaledGG()
          Return the horizontal viewport end (scaled Game Gear mode).
 int getHStart()
          Return the horizontal viewport start.
 int getHStartScaled()
          Return the horizontal viewport start (scaled mode).
 int getScale()
          Return the viewport's scale.
 Setup.System getSystem()
          Getter for property system.
 int getVEnd()
          Return the vertical viewport end.
 int getVEndScaled()
          Return the vertical viewport end (scaled mode).
 int getVEndScaledGG()
          Return the vertical viewport end (scaled Game Gear mode).
 int getVStart()
          Return the vertical viewport start.
 int getVStartScaled()
          Return the vertical viewport start (scaled mode).
 boolean isPauseButton()
          Returns true if the SMS is paused and false otherwise.
 void setPauseButton(boolean pause)
          Set if the SMS is paused.
 void setScreenSize(int s)
          Set Screen Size.
 void setSystem(Setup.System system)
          Setter for property system.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ZIP_FILE_EXTENSION

public static final java.lang.String ZIP_FILE_EXTENSION
The extension Zip files containing SMS or GG ROMs should have.

See Also:
Constant Field Values

SMS_WIDTH

public static final int SMS_WIDTH
SMS Screen Width.

See Also:
Constant Field Values

SMS_HEIGHT

public static final int SMS_HEIGHT
SMS Screen Height.

See Also:
Constant Field Values

GG_WIDTH

public static final int GG_WIDTH
GG Screen Width.

See Also:
Constant Field Values

GG_HEIGHT

public static final int GG_HEIGHT
GG Screen Height.

See Also:
Constant Field Values

GG_X_OFFSET

public static final int GG_X_OFFSET
GG Window Starts Here (x).

See Also:
Constant Field Values

GG_Y_OFFSET

public static final int GG_Y_OFFSET
GG Window Starts Here (y).

See Also:
Constant Field Values

system

private Setup.System system
The system being emulated.


smsModeActive

private boolean smsModeActive
SMS Mode.


ggModeActive

private boolean ggModeActive
GG Mode.


hStart

private int hStart
Horizontal Viewport Start.


hEnd

private int hEnd
Horizontal Viewport End.


vStart

private int vStart
Vertical Viewport Start.


vEnd

private int vEnd
Vertical Viewport End.


hStartScaled

private int hStartScaled
Horizontal Viewport Start (Scaled Mode).


vStartScaled

private int vStartScaled
Vertical Viewport Start (Scaled Mode).


hEndScaled

private int hEndScaled
Horizontal Viewport End (Scaled Mode).


vEndScaled

private int vEndScaled
Vertical Viewport End (Scaled Mode).


hEndScaledGG

private int hEndScaledGG
Horizontal Viewport End (Scaled Game Gear Mode).


vEndScaledGG

private int vEndScaledGG
Vertical Viewport End (Scaled Game Gear Mode).


scale

private int scale
The viewport's scale.


pauseButton

private boolean pauseButton
SMS Pause Button.

Constructor Detail

Setup

public Setup()
Setup. Constructor. Default to Screen Size 1.

Method Detail

getSystem

public Setup.System getSystem()
Getter for property system. Returns the kind of system being emulated.

Returns:
value of property system. The kind of system being emulated.

setSystem

public void setSystem(Setup.System system)
               throws java.lang.IllegalArgumentException
Setter for property system. Sets the kind of system to emulate.

Parameters:
system - New value of property system.
Throws:
java.lang.IllegalArgumentException - if system is neither System.SMS nor System.GG

getHStart

public int getHStart()
Return the horizontal viewport start.

Returns:
the horizontal viewport start.

getHEnd

public int getHEnd()
Return the horizontal viewport end.

Returns:
the horizontal viewport end.

getVStart

public int getVStart()
Return the vertical viewport start.

Returns:
the vertical viewport start.

getVEnd

public int getVEnd()
Return the vertical viewport end.

Returns:
the vertical viewport end.

getHStartScaled

public int getHStartScaled()
Return the horizontal viewport start (scaled mode).

Returns:
the horizontal viewport start (scaled mode).

getVStartScaled

public int getVStartScaled()
Return the vertical viewport start (scaled mode).

Returns:
the vertical viewport start (scaled mode).

getHEndScaled

public int getHEndScaled()
Return the horizontal viewport end (scaled mode).

Returns:
the horizontal viewport end (scaled mode).

getVEndScaled

public int getVEndScaled()
Return the vertical viewport end (scaled mode).

Returns:
the vertical viewport end (scaled mode).

getHEndScaledGG

public int getHEndScaledGG()
Return the horizontal viewport end (scaled Game Gear mode).

Returns:
the horozontal viewport end (scaled Game Gear mode).

getVEndScaledGG

public int getVEndScaledGG()
Return the vertical viewport end (scaled Game Gear mode).

Returns:
the vertical viewport end (scaled Game Gear mode).

getScale

public int getScale()
Return the viewport's scale.

Returns:
the viewport's scale.

isPauseButton

public boolean isPauseButton()
Returns true if the SMS is paused and false otherwise.

Returns:
true if the SMS is paused and false otherwise.

setPauseButton

public void setPauseButton(boolean pause)
Set if the SMS is paused.

Parameters:
pause - true to pause the SMS, false otherwise.

setScreenSize

public void setScreenSize(int s)
Set Screen Size.

Parameters:
s - Screen Size will be (normal * s)


Copyright © 2007 JavaGear. All Rights Reserved.