Detailed Description

Represents a new SPA file.

Public Member Functions

 SPA (Config config, string folder)
 Creates a new SPA using graphics from the given folder. More...
 
 SPA (Config config, string[] frameFiles)
 Creates a new SPA from the given set of frame files. More...
 
bool WriteOut ()
 Builds this SPA based on current configuration settings, outputting an OK message to the log. More...
 
bool Build ()
 Builds this SPA based on the current configuration settings. No OK message is added to the log (see WriteOut). More...
 

Public Attributes

Log Logger
 A log to which all output is added. More...
 
string Folder
 The folder that the images are in if found. More...
 
int FrameWidth
 <summary?The width of the frames of the animation. More...
 
int FrameHeight
 <summary?The height of the frames of the animation. More...
 
string OutputPath
 The path the spa file has been wrote to. More...
 
string FolderName
 The name of the folder the frames were in, if any. More...
 
int MaxFramesDown
 The number of frames that fit onto a single sprite vertically. More...
 
int MaxFramesAcross
 The number of frames that fit onto a single sprite horizontally. More...
 
string[] FrameFiles
 The set of all frames for the animation. More...
 
Config Configuration
 The configuration to use while building this SPA. More...
 
SpriteFrame[] Sprites
 The frames of the animation get compacted onto sprites. More...
 

Private Member Functions

void SetLogging ()
 Sets up the message logging for this animation. More...
 
void SetFolderName (string fullPath)
 Sets the folder and folder name from the given full directory path. More...
 
int GetMaxDimension (string type)
 Gets the maximum sprite dimension for the given direction (width or height). More...
 

Constructor & Destructor Documentation

SPABuilder.SPA.SPA ( Config  config,
string  folder 
)
inline

Creates a new SPA using graphics from the given folder.

Parameters
folderThe folder containing frame images.
SPABuilder.SPA.SPA ( Config  config,
string[]  frameFiles 
)
inline

Creates a new SPA from the given set of frame files.

Parameters
frameFilesThe frames of the animation.

Member Function Documentation

bool SPABuilder.SPA.Build ( )
inline

Builds this SPA based on the current configuration settings. No OK message is added to the log (see WriteOut).

Returns
True if the SPA was successfully created.
int SPABuilder.SPA.GetMaxDimension ( string  type)
inlineprivate

Gets the maximum sprite dimension for the given direction (width or height).

Parameters
typeThe dimension direction - either width or height.
Returns
The max dimension in the given direction.
void SPABuilder.SPA.SetFolderName ( string  fullPath)
inlineprivate

Sets the folder and folder name from the given full directory path.

Parameters
fullPathThe directory path to use.
void SPABuilder.SPA.SetLogging ( )
inlineprivate

Sets up the message logging for this animation.

bool SPABuilder.SPA.WriteOut ( )
inline

Builds this SPA based on current configuration settings, outputting an OK message to the log.

Returns
True if the SPA was successfully created.

Member Data Documentation

Config SPABuilder.SPA.Configuration

The configuration to use while building this SPA.

string SPABuilder.SPA.Folder

The folder that the images are in if found.

string SPABuilder.SPA.FolderName

The name of the folder the frames were in, if any.

string [] SPABuilder.SPA.FrameFiles

The set of all frames for the animation.

int SPABuilder.SPA.FrameHeight

<summary?The height of the frames of the animation.

int SPABuilder.SPA.FrameWidth

<summary?The width of the frames of the animation.

Log SPABuilder.SPA.Logger

A log to which all output is added.

int SPABuilder.SPA.MaxFramesAcross

The number of frames that fit onto a single sprite horizontally.

int SPABuilder.SPA.MaxFramesDown

The number of frames that fit onto a single sprite vertically.

string SPABuilder.SPA.OutputPath

The path the spa file has been wrote to.

SpriteFrame [] SPABuilder.SPA.Sprites

The frames of the animation get compacted onto sprites.