Skip to content

Commit

Permalink
Removed the unfinished and obsolete battle event system.
Browse files Browse the repository at this point in the history
When I'll add one, it won't be likely done like that anyway.
  • Loading branch information
Yohann Ferreira committed Sep 20, 2012
1 parent 8756da9 commit 5e6afc3
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 53 deletions.
29 changes: 0 additions & 29 deletions dat/battle_events.lua

This file was deleted.

9 changes: 0 additions & 9 deletions src/common/global/global.cpp
Expand Up @@ -125,9 +125,6 @@ GameGlobal::~GameGlobal() {
_map_sprites_script.CloseFile();
_map_objects_script.CloseFile();
_map_treasures_script.CloseFile();

_battle_events_script.CloseTable();
_battle_events_script.CloseFile();
} // GameGlobal::~GameGlobal()

bool GameGlobal::SingletonInitialize() {
Expand Down Expand Up @@ -198,12 +195,6 @@ bool GameGlobal::SingletonInitialize() {
if (!_map_treasures_script.OpenFile("dat/actors/map_treasures.lua"))
return false;


if (_battle_events_script.OpenFile("dat/battle_events.lua") == false) {
return false;
}
_battle_events_script.OpenTable("battle_events");

return true;
} // bool GameGlobal::SingletonInitialize()

Expand Down
6 changes: 0 additions & 6 deletions src/common/global/global.h
Expand Up @@ -525,9 +525,6 @@ class GameGlobal : public hoa_utils::Singleton<GameGlobal> {
hoa_script::ReadScriptDescriptor& GetStatusEffectsScript()
{ return _status_effects_script; }

hoa_script::ReadScriptDescriptor* GetBattleEventScript()
{ return &_battle_events_script; }

hoa_script::ReadScriptDescriptor& GetMapSpriteScript()
{ return _map_sprites_script; }
//@}
Expand Down Expand Up @@ -671,9 +668,6 @@ class GameGlobal : public hoa_utils::Singleton<GameGlobal> {

//! \brief Contains data and functional definitions for map treasures seen in game maps
hoa_script::ReadScriptDescriptor _map_treasures_script;

//! \brief Contains data and functional definitions for scripted events in key game battles
hoa_script::ReadScriptDescriptor _battle_events_script;
//@}

/** \brief The container which stores all of the groups of events that have occured in the game
Expand Down
3 changes: 0 additions & 3 deletions src/modes/battle/battle.cpp
Expand Up @@ -607,9 +607,6 @@ void BattleMode::ChangeState(BATTLE_STATE new_state) {
_actor_state_paused = true;
}
break;
case BATTLE_STATE_EVENT:
// TODO
break;
case BATTLE_STATE_VICTORY:
// Official victory:
// Cancel all character actions to free possible involved objects
Expand Down
9 changes: 4 additions & 5 deletions src/modes/battle/battle_utils.h
Expand Up @@ -79,11 +79,10 @@ enum BATTLE_STATE {
BATTLE_STATE_INITIAL = 0, //!< Character sprites are running in from off-screen to their battle positions
BATTLE_STATE_NORMAL = 1, //!< Normal state where player is watching actions play out and waiting for a turn
BATTLE_STATE_COMMAND = 2, //!< Player is choosing a command for a character
BATTLE_STATE_EVENT = 3, //!< A scripted event is taking place, suspending all standard action
BATTLE_STATE_VICTORY = 4, //!< Battle has ended with the characters victorious
BATTLE_STATE_DEFEAT = 5, //!< Battle has ended with the characters defeated
BATTLE_STATE_EXITING = 6, //!< Player has closed battle windows and battle mode is fading out
BATTLE_STATE_TOTAL = 7
BATTLE_STATE_VICTORY = 3, //!< Battle has ended with the characters victorious
BATTLE_STATE_DEFEAT = 4, //!< Battle has ended with the characters defeated
BATTLE_STATE_EXITING = 5, //!< Player has closed battle windows and battle mode is fading out
BATTLE_STATE_TOTAL = 6
};


Expand Down
1 change: 0 additions & 1 deletion src/modes/mode_bindings.cpp
Expand Up @@ -622,7 +622,6 @@ void BindModeCode() {
luabind::value("BATTLE_STATE_INITIAL", BATTLE_STATE_INITIAL),
luabind::value("BATTLE_STATE_NORMAL", BATTLE_STATE_NORMAL),
luabind::value("BATTLE_STATE_COMMAND", BATTLE_STATE_COMMAND),
luabind::value("BATTLE_STATE_EVENT", BATTLE_STATE_EVENT),
luabind::value("BATTLE_STATE_VICTORY", BATTLE_STATE_VICTORY),
luabind::value("BATTLE_STATE_DEFEAT", BATTLE_STATE_DEFEAT),
luabind::value("BATTLE_STATE_EXITING", BATTLE_STATE_EXITING),
Expand Down

0 comments on commit 5e6afc3

Please sign in to comment.