|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectJTP.Images
public class Images
Defines and loads game graphics resources (staged). Note: Images are not loaded in constructor to enable (more granular) loading progress to be shown on program startup. (Hence there is no custom constructor method.)
Field Summary | |
---|---|
static int |
E_ARROW_DOWN
|
static int |
E_ARROW_LEFT
|
static int |
E_ARROW_RIGHT
|
static int |
E_ARROW_UP
|
static int |
E_CLEAR
|
static int |
E_CLOSE
|
static int |
E_LEVEL_BACK
|
static int |
E_LEVEL_FIRST
|
static int |
E_LEVEL_FORWARD
|
static int |
E_LEVEL_LAST
|
static int |
E_LEVEL_MESSAGES
|
static int |
E_LEVEL_NUMBER_BG
|
static int |
E_LEVEL_SWAP
|
static int |
E_LEVEL_TIME
|
static int |
E_PLAY
|
static int |
E_SAVE
|
static int |
E_SAVECLOSE
|
static int |
O_1P
|
static int |
O_2P
|
static int |
O_3D
|
static int |
O_3D_GRAVITY
|
static int |
O_3D_ICE
|
static int |
O_3D_TELEPORT
|
static int |
O_BACK
|
static int |
O_CLOSE
|
static int |
O_DISABLED_TILE
|
static int |
O_DISABLED_TILE_P1
|
static int |
O_DISABLED_TILE_P2
|
static int |
O_ERROR
|
static int |
O_FIRST
|
static int |
O_FORWARD
|
static int |
O_INFO
|
static int |
O_LAST
|
static int |
O_MEDIAMERGE
|
static int |
O_QUESTION
|
static int |
O_START_BOTH
|
static int |
O_TIME
|
static int |
O_WARNING
|
static int |
T_ARROW_DOWN
|
static int |
T_ARROW_LEFT
|
static int |
T_ARROW_RIGHT
|
static int |
T_ARROW_UP
|
static int |
T_GRAVITY
|
static int |
T_ICE
|
static int |
T_NORMAL
|
static int |
T_START
|
static int |
T_START2
|
static int |
T_TELEPORT
|
Constructor Summary | |
---|---|
Images()
|
Method Summary | |
---|---|
BufferedImage |
get3DImage(int tileIndex,
boolean in)
Returns the matching "3D" wall for a tile of the given index. |
int |
getEditorImageCount()
Returns the total number of editor image resources (excluding common ones) |
int |
getEditorImageOffset()
Returns starting offset for the editor image group. |
ImageIcon |
getIcon(int index)
Returns the image resource with the given (absolute) index in icon form. |
BufferedImage |
getImage(int index)
Returns the image resource associated with the given index. |
BufferedImage |
getImage(int index,
boolean in)
Returns the image resource associated with the given index. |
BufferedImage |
getOtherImage(int index,
boolean in)
Returns the image resource assicated with the given index (relative to the "other" image group). |
int |
getOtherImageCount()
Returns the total number of other (common) image resources. |
int |
getOtherImageOffset()
Returns starting offset for the other (common) image group. |
int |
getTileImageCount()
Returns the total number of tile image resources (excluding "3D" walls) |
int |
getTileImageOffset()
Returns starting offset for the tile image group. |
boolean |
loadNextSet()
Loads the next set of image resources into memory. |
boolean |
moreToLoad()
Indicates whether more images still have to be loaded. |
void |
toggleMediaMerge()
Swaps the T_NORMAL image resource with O_MEDIAMERGE
. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int T_NORMAL
public static final int T_ICE
public static final int T_TELEPORT
public static final int T_GRAVITY
public static final int T_ARROW_UP
public static final int T_ARROW_DOWN
public static final int T_ARROW_LEFT
public static final int T_ARROW_RIGHT
public static final int T_START
public static final int T_START2
public static final int E_LEVEL_SWAP
public static final int E_LEVEL_FIRST
public static final int E_LEVEL_LAST
public static final int E_LEVEL_MESSAGES
public static final int E_LEVEL_BACK
public static final int E_LEVEL_FORWARD
public static final int E_LEVEL_TIME
public static final int E_CLEAR
public static final int E_PLAY
public static final int E_SAVE
public static final int E_CLOSE
public static final int E_SAVECLOSE
public static final int E_ARROW_UP
public static final int E_ARROW_DOWN
public static final int E_ARROW_LEFT
public static final int E_ARROW_RIGHT
public static final int E_LEVEL_NUMBER_BG
public static final int O_CLOSE
public static final int O_1P
public static final int O_2P
public static final int O_3D
public static final int O_3D_GRAVITY
public static final int O_3D_ICE
public static final int O_3D_TELEPORT
public static final int O_START_BOTH
public static final int O_TIME
public static final int O_FIRST
public static final int O_BACK
public static final int O_FORWARD
public static final int O_LAST
public static final int O_MEDIAMERGE
public static final int O_DISABLED_TILE
public static final int O_DISABLED_TILE_P1
public static final int O_DISABLED_TILE_P2
public static final int O_INFO
public static final int O_QUESTION
public static final int O_WARNING
public static final int O_ERROR
Constructor Detail |
---|
public Images()
Method Detail |
---|
public boolean moreToLoad()
false
if all image resources have been loaded into
memory, true
otherwise.public boolean loadNextSet() throws IOException
false
if there is nothing left to load, true
otherwise.
IOException
public BufferedImage getImage(int index, boolean in)
index
- of the wanted imagein
- set to true
to request the "_in" version of this
resource
public BufferedImage getImage(int index)
index
- of the wanted image
public BufferedImage getOtherImage(int index, boolean in)
index
- relative index of the wanted imagein
- set to true
to request the "_in" version of this
resource
public BufferedImage get3DImage(int tileIndex, boolean in)
Tile
class for a list of tile indices.
tileIndex
- index of the wanted "3D" imagein
- set to true
to request the "_in" version of this
resource
public int getTileImageCount()
public int getTileImageOffset()
public int getEditorImageCount()
public int getEditorImageOffset()
public int getOtherImageCount()
public int getOtherImageOffset()
public ImageIcon getIcon(int index)
index
- the absolute index of this image
public void toggleMediaMerge()
T_NORMAL
image resource with O_MEDIAMERGE
.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |