hoa_battle::private_battle Namespace Reference

An internal namespace to be used only within the battle code. Don't use this namespace anywhere else! More...


Classes

class  ActionWindow
 Represents the battle window where the player selects actions to execute. More...
class  BattleActor
 This is an interface class for all the battle actors (eg. the player and the monsters). More...
class  BattleActorEffect
 Temporary enum used to determine which phase of the time meter a character/enemy is in. Represents postive and negative afflictions that affect actors in battle. More...
class  BattleCharacterActor
 Represents the player-controlled character in the battle. More...
class  BattleEnemyActor
 Represents the entity for an enemy in the battle. More...
class  FinishWindow
 The window displayed once a battle has either been won or lost. More...
class  ScriptEvent
 Representation of a single, scripted action to be executed in battle. More...

Enumerations

enum  ACTION_WINDOW_VIEWS {
  VIEW_INVALID = -1, VIEW_ACTION_CATEGORY = 0, VIEW_ACTION_SELECTION = 1, VIEW_TARGET_SELECTION = 2,
  VIEW_ACTION_INFORMATION = 3, VIEW_TOTAL = 4
}
 Enums for the various states that the ActionWindow class may be in See the descriptions of the various views for the ActionWindow class to understand what these constants represent. More...
enum  CURSOR_STATE {
  CURSOR_IDLE = 0, CURSOR_WAIT = 1, CURSOR_SELECT_ATTACK_POINT = 2, CURSOR_SELECT_TARGET = 3,
  CURSOR_SELECT_PARTY = 4
}
 Enumerated values for the possible states that the user's input context may be in These constants are used throughout the battle code for various purposes, including determining what user input commands should do, which components of the battle scene should be updated, and what objects in the battle scene should be drawn. More...
enum  FINISH_WINDOW_VIEWS { FINISH_INVALID = -1, FINISH_ANNOUNCE_WIN = 0, FINISH_ANNOUNCE_LOSE = 1, FINISH_TOTAL = 2 }
 Enums for the various states that the FinishWindow class may be in See the descriptions of the various views for the ActionWindow class to understand what these constants represent. More...

Functions

float ComputeAveragePartyLevel ()
 Finds the average experience level of all members in the party.

Variables

const bool ACTIVE_BATTLE_MODE = false
 True if we are using active battle mode (i.e. timers do not pause when player is making choices.
BattleModecurrent_battle
 A pointer to the BattleMode object that is managing the current battle that is taking place.
BattleModecurrent_battle = NULL
 A pointer to the BattleMode object that is managing the current battle that is taking place.
const uint32 INVALID_BATTLE_ACTOR_INDEX = 999
 Returned as an index when looking for a character or enemy and they do not exist.
const uint32 ITEM_WARM_UP_TIME = 1000
 Warm up time for using items (try to keep short, should be constant regardless.
const uint32 MAX_INIT_WAIT_TIME = 8000
 When a battle first starts, this is the wait time for the slowest actor.
const float MONSTER_LOCATIONS [][2]
 Possible monster locations in monster creation order.
Action Type Constants
Identifications for the types of actions a player's characters may perform

const uint32 ACTION_TYPE_ATTACK = 0
const uint32 ACTION_TYPE_DEFEND = 1
const uint32 ACTION_TYPE_ITEM = 3
const uint32 ACTION_TYPE_SUPPORT = 2
Screen dimension constants
const uint32 SCREEN_HEIGHT = 12
 The height of the screen in number of tiles (12 x 64 = 768).
const uint32 SCREEN_LENGTH = 16
 The length of the screen in number of tiles (16 x 64 = 1024).
const uint32 TILE_SIZE = 64
 Battle scenes are visualized via an invisible grid of 64x64 tiles.


Detailed Description

An internal namespace to be used only within the battle code. Don't use this namespace anywhere else!

Enumeration Type Documentation

enum hoa_battle::private_battle::ACTION_WINDOW_VIEWS

Enums for the various states that the ActionWindow class may be in See the descriptions of the various views for the ActionWindow class to understand what these constants represent.

Enumerator:
VIEW_INVALID 
VIEW_ACTION_CATEGORY 
VIEW_ACTION_SELECTION 
VIEW_TARGET_SELECTION 
VIEW_ACTION_INFORMATION 
VIEW_TOTAL 

Definition at line 43 of file battle_windows.h.

enum hoa_battle::private_battle::CURSOR_STATE

Enumerated values for the possible states that the user's input context may be in These constants are used throughout the battle code for various purposes, including determining what user input commands should do, which components of the battle scene should be updated, and what objects in the battle scene should be drawn.

Todo:
Don't think select_attack_point or select_party will be necessary with the new control scheme
Enumerator:
CURSOR_IDLE 
CURSOR_WAIT 
CURSOR_SELECT_ATTACK_POINT 
CURSOR_SELECT_TARGET 
CURSOR_SELECT_PARTY 

Definition at line 97 of file battle.h.

enum hoa_battle::private_battle::FINISH_WINDOW_VIEWS

Enums for the various states that the FinishWindow class may be in See the descriptions of the various views for the ActionWindow class to understand what these constants represent.

Enumerator:
FINISH_INVALID 
FINISH_ANNOUNCE_WIN 
FINISH_ANNOUNCE_LOSE 
FINISH_TOTAL 

Definition at line 57 of file battle_windows.h.


Function Documentation

float hoa_battle::private_battle::ComputeAveragePartyLevel (  ) 

Finds the average experience level of all members in the party.

Returns:
A floating point value representing the average level|
This calculation includes both characters in the active party and those in the reservers.


Variable Documentation

const uint32 hoa_battle::private_battle::ACTION_TYPE_ATTACK = 0

Definition at line 80 of file battle.h.

Referenced by hoa_battle::private_battle::ActionWindow::_ConstructActionSelectionList(), hoa_battle::private_battle::ActionWindow::_DrawActionInformation(), hoa_battle::private_battle::ActionWindow::_DrawActionSelection(), and hoa_battle::private_battle::ActionWindow::_UpdateActionSelection().

const uint32 hoa_battle::private_battle::ACTION_TYPE_DEFEND = 1

Definition at line 81 of file battle.h.

Referenced by hoa_battle::private_battle::ActionWindow::_ConstructActionSelectionList(), hoa_battle::private_battle::ActionWindow::_DrawActionInformation(), hoa_battle::private_battle::ActionWindow::_DrawActionSelection(), and hoa_battle::private_battle::ActionWindow::_UpdateActionSelection().

const uint32 hoa_battle::private_battle::ACTION_TYPE_ITEM = 3

Definition at line 83 of file battle.h.

Referenced by hoa_battle::private_battle::ActionWindow::_ConstructActionSelectionList(), hoa_battle::private_battle::ActionWindow::_DrawActionInformation(), hoa_battle::private_battle::ActionWindow::_DrawActionSelection(), hoa_battle::BattleMode::_DrawTimeMeter(), hoa_battle::private_battle::ActionWindow::_UpdateActionSelection(), hoa_battle::BattleMode::_UpdateAttackPointSelection(), and hoa_battle::BattleMode::_UpdateTargetSelection().

const uint32 hoa_battle::private_battle::ACTION_TYPE_SUPPORT = 2

Definition at line 82 of file battle.h.

Referenced by hoa_battle::private_battle::ActionWindow::_ConstructActionSelectionList(), hoa_battle::private_battle::ActionWindow::_DrawActionInformation(), hoa_battle::private_battle::ActionWindow::_DrawActionSelection(), and hoa_battle::private_battle::ActionWindow::_UpdateActionSelection().

const bool hoa_battle::private_battle::ACTIVE_BATTLE_MODE = false

True if we are using active battle mode (i.e. timers do not pause when player is making choices.

Definition at line 117 of file battle.h.

Referenced by hoa_battle::BattleMode::_UpdateAttackPointSelection(), hoa_battle::BattleMode::_UpdateCharacterSelection(), and hoa_battle::BattleMode::_UpdateTargetSelection().

BattleMode* hoa_battle::private_battle::current_battle

A pointer to the BattleMode object that is managing the current battle that is taking place.

Definition at line 53 of file battle.cpp.

Referenced by hoa_battle::private_battle::ActionWindow::_UpdateActionSelection(), hoa_battle::private_battle::FinishWindow::Draw(), hoa_battle::private_battle::BattleCharacterActor::DrawSprite(), hoa_battle::private_battle::BattleEnemyActor::DrawSprite(), hoa_battle::private_battle::BattleCharacterActor::DrawStatus(), hoa_battle::private_battle::BattleEnemyActor::DrawStatus(), hoa_battle::private_battle::FinishWindow::Initialize(), hoa_battle::BattleMode::Reset(), hoa_battle::private_battle::ScriptEvent::RunScript(), hoa_battle::private_battle::BattleActor::TakeDamage(), hoa_input::TEMP_HandlePause(), hoa_battle::private_battle::BattleEnemyActor::Update(), hoa_battle::private_battle::FinishWindow::Update(), and hoa_battle::BattleMode::~BattleMode().

BattleMode* hoa_battle::private_battle::current_battle = NULL

A pointer to the BattleMode object that is managing the current battle that is taking place.

Definition at line 53 of file battle.cpp.

Referenced by hoa_battle::private_battle::ActionWindow::_UpdateActionSelection(), hoa_battle::private_battle::FinishWindow::Draw(), hoa_battle::private_battle::BattleEnemyActor::DrawSprite(), hoa_battle::private_battle::BattleCharacterActor::DrawSprite(), hoa_battle::private_battle::BattleEnemyActor::DrawStatus(), hoa_battle::private_battle::BattleCharacterActor::DrawStatus(), hoa_battle::private_battle::FinishWindow::Initialize(), hoa_battle::BattleMode::Reset(), hoa_battle::private_battle::ScriptEvent::RunScript(), hoa_battle::private_battle::BattleActor::TakeDamage(), hoa_input::TEMP_HandlePause(), hoa_battle::private_battle::FinishWindow::Update(), hoa_battle::private_battle::BattleEnemyActor::Update(), and hoa_battle::BattleMode::~BattleMode().

const uint32 hoa_battle::private_battle::INVALID_BATTLE_ACTOR_INDEX = 999

Returned as an index when looking for a character or enemy and they do not exist.

Definition at line 106 of file battle.h.

Referenced by hoa_battle::BattleMode::_UpdateCharacterSelection(), hoa_battle::BattleMode::GetIndexOfCharacter(), hoa_battle::BattleMode::GetIndexOfFirstAliveEnemy(), hoa_battle::BattleMode::GetIndexOfFirstIdleCharacter(), hoa_battle::BattleMode::GetIndexOfLastAliveEnemy(), and hoa_battle::BattleMode::GetIndexOfNextAliveEnemy().

const uint32 hoa_battle::private_battle::ITEM_WARM_UP_TIME = 1000

Warm up time for using items (try to keep short, should be constant regardless.

Definition at line 113 of file battle.h.

const uint32 hoa_battle::private_battle::MAX_INIT_WAIT_TIME = 8000

When a battle first starts, this is the wait time for the slowest actor.

Definition at line 109 of file battle.h.

Referenced by hoa_battle::BattleMode::_Initialize().

const float hoa_battle::private_battle::MONSTER_LOCATIONS[][2]

Initial value:

{
  { 515.0f, 768.0f - 360.0f }, 
  { 494.0f, 768.0f - 450.0f },
  { 510.0f, 768.0f - 550.0f },
  { 580.0f, 768.0f - 630.0f },
  { 675.0f, 768.0f - 390.0f },
  { 655.0f, 768.0f - 494.0f },
  { 793.0f, 768.0f - 505.0f },
  { 730.0f, 768.0f - 600.0f }
}
Possible monster locations in monster creation order.

Note:
This is probably only a temporary fix until we get the monster sorting to work correctly

Definition at line 63 of file battle.h.

Referenced by hoa_battle::BattleMode::AddEnemy().

const uint32 hoa_battle::private_battle::SCREEN_HEIGHT = 12

The height of the screen in number of tiles (12 x 64 = 768).

Definition at line 57 of file battle.h.

Referenced by hoa_battle::BattleMode::_TEMP_LoadTestData().

const uint32 hoa_battle::private_battle::SCREEN_LENGTH = 16

The length of the screen in number of tiles (16 x 64 = 1024).

Definition at line 55 of file battle.h.

Referenced by hoa_battle::BattleMode::_TEMP_LoadTestData().

const uint32 hoa_battle::private_battle::TILE_SIZE = 64

Battle scenes are visualized via an invisible grid of 64x64 tiles.

Definition at line 53 of file battle.h.

Referenced by hoa_battle::BattleMode::_TEMP_LoadTestData().


Generated on Fri Jul 6 23:12:50 2007 for Hero of Allacrost by  doxygen 1.5.1