Gridarta Editor
net.sf.gridarta.model.gameobject.MultiPositionData Class Reference

The MultiPositionData class stores an array of numbers which is required in order to calculate display positions of ISO multi-part objects. More...

+ Collaboration diagram for net.sf.gridarta.model.gameobject.MultiPositionData:

Public Member Functions

int getHeight (final int shapeID)
 Returns the total height for a multi-square image. More...
 
int getWidth (final int shapeID)
 Returns the total width for a multi-square image. More...
 
int getXOffset (final int shapeID, final int positionID)
 Calculate the x-offset from the leftmost pixel of the big face image and the default x-position (The default position is where a single-square image would be put). More...
 
int getYOffset (final int shapeID, final int positionID)
 Calculate the y-offset from the topmost pixel of the big face image and the default y-position (The default position is where a single-square image would be put). More...
 
void load (@NotNull final ErrorView errorView, @NotNull final URL url)
 Load the array-data from file. More...
 
 MultiPositionData (@NotNull final IsoMapSquareInfo isoMapSquareInfo)
 Creates a new instance. More...
 

Static Public Attributes

static final int Y_DIM = 16
 Number of rows in the array. More...
 

Private Attributes

final MultiPositionEntry[] data = new MultiPositionEntry[Y_DIM]
 Array with position data. More...
 
final IsoMapSquareInfo isoMapSquareInfo
 The IsoMapSquareInfo to use. More...
 

Static Private Attributes

static final Category LOG = Logger.getLogger(MultiPositionData.class)
 The Logger for printing log messages. More...
 

Detailed Description

The MultiPositionData class stores an array of numbers which is required in order to calculate display positions of ISO multi-part objects.

Author
Andreas Vogl

Definition at line 44 of file MultiPositionData.java.

Constructor & Destructor Documentation

◆ MultiPositionData()

net.sf.gridarta.model.gameobject.MultiPositionData.MultiPositionData ( @NotNull final IsoMapSquareInfo  isoMapSquareInfo)

Creates a new instance.

Parameters
isoMapSquareInfothe iso square info to use

Definition at line 73 of file MultiPositionData.java.

References net.sf.gridarta.model.gameobject.MultiPositionData.isoMapSquareInfo.

Member Function Documentation

◆ getHeight()

int net.sf.gridarta.model.gameobject.MultiPositionData.getHeight ( final int  shapeID)

Returns the total height for a multi-square image.

Parameters
shapeIDthe shape ID
Returns
the height in pixels

Definition at line 195 of file MultiPositionData.java.

References net.sf.gridarta.model.gameobject.MultiPositionData.data, and net.sf.gridarta.model.gameobject.MultiPositionEntry.getHeight().

+ Here is the call graph for this function:

◆ getWidth()

int net.sf.gridarta.model.gameobject.MultiPositionData.getWidth ( final int  shapeID)

Returns the total width for a multi-square image.

Parameters
shapeIDthe shape ID
Returns
the width in pixels

Definition at line 185 of file MultiPositionData.java.

References net.sf.gridarta.model.gameobject.MultiPositionData.data, and net.sf.gridarta.model.gameobject.MultiPositionEntry.getWidth().

Referenced by net.sf.gridarta.gui.map.renderer.AbstractIsoMapRenderer< G, A, R >.paintGameObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getXOffset()

int net.sf.gridarta.model.gameobject.MultiPositionData.getXOffset ( final int  shapeID,
final int  positionID 
)

Calculate the x-offset from the leftmost pixel of the big face image and the default x-position (The default position is where a single-square image would be put).

Parameters
shapeIDID number for the multi-square shape (-> rows in position data file)
positionIDnumber of square in the big bunch
Returns
x-offset

Definition at line 161 of file MultiPositionData.java.

References net.sf.gridarta.model.gameobject.MultiPositionData.data, and net.sf.gridarta.model.gameobject.MultiPositionEntry.getXOffset().

Referenced by net.sf.gridarta.gui.map.renderer.SimpleIsoMapRenderer< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.paint(), and net.sf.gridarta.gui.map.renderer.AbstractIsoMapRenderer< G, A, R >.paintGameObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getYOffset()

int net.sf.gridarta.model.gameobject.MultiPositionData.getYOffset ( final int  shapeID,
final int  positionID 
)

Calculate the y-offset from the topmost pixel of the big face image and the default y-position (The default position is where a single-square image would be put).

Parameters
shapeIDID number for the multi-square shape (-> rows in position data file)
positionIDnumber of square in the big bunch
Returns
y-offset

Definition at line 175 of file MultiPositionData.java.

References net.sf.gridarta.model.gameobject.MultiPositionData.data, and net.sf.gridarta.model.gameobject.MultiPositionEntry.getYOffset().

Referenced by net.sf.gridarta.var.daimonin.model.io.ArchetypeParser.calculateLowestMulti(), net.sf.gridarta.var.atrinik.model.io.ArchetypeParser.calculateLowestMulti(), net.sf.gridarta.gui.map.renderer.SimpleIsoMapRenderer< G extends GameObject< G, A, R, A extends MapArchObject< A, R extends Archetype< G, A, R >.paint(), and net.sf.gridarta.gui.map.renderer.AbstractIsoMapRenderer< G, A, R >.paintGameObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ load()

Member Data Documentation

◆ data

◆ isoMapSquareInfo

final IsoMapSquareInfo net.sf.gridarta.model.gameobject.MultiPositionData.isoMapSquareInfo
private

◆ LOG

final Category net.sf.gridarta.model.gameobject.MultiPositionData.LOG = Logger.getLogger(MultiPositionData.class)
staticprivate

The Logger for printing log messages.

Definition at line 50 of file MultiPositionData.java.

Referenced by net.sf.gridarta.model.gameobject.MultiPositionData.load().

◆ Y_DIM

final int net.sf.gridarta.model.gameobject.MultiPositionData.Y_DIM = 16
static

The documentation for this class was generated from the following file: