18#include "../modules/worldmap/WorldmapModule.h"
50 std::cout <<
"[SCRIPT] " << text << std::endl;
51 Console::getSingleton().AddTextToOutput(text);
63 EntityManager::getSingleton().Clear();
66 XmlMapFile xml_map(
"./data/fields/" + file_name);
79 Console::getSingleton().ExecuteCommand(text);
86 luabind::def(
"print", (
void(*)(
const char*)) &
ScriptPrint),
87 luabind::def(
"map", (
void(*)(
const char*)) &
ScriptMap),
88 luabind::def(
"console", (
void(*)(
const char*)) &
ScriptConsole)
93 luabind::class_<Entity>(
"Entity")
127 "linear_to_position",
130 const char*,
const float,
const int
138 (
void(
Entity::*)(
const float,
const float,
const float,
const float,
const int))
143 "offset_to_position",
144 (
void(
Entity::*)(
const float,
const float,
const float,
const ActionType,
const float))
153 "turn_to_direction", (
169 "play_animation_stop",
170 (
void(
Entity::*)(
const char*,
const float,
const float))
174 "set_default_animation",
179 luabind::value(
"NONE",
AT_NONE),
195 luabind::class_<EntityManager>(
"Field")
197 "random_encounters_on",
204 luabind::class_<EntityPoint>(
"EntityPoint")
212 luabind::class_<EntityManager>(
"EntityManager")
217 const char*,
const char*,
const float,
const float,
218 const float,
const float,
const int
229 "get_entity_from_index",
233 "get_entity_from_character_id",
249 "unset_player_entity",
256 "random_encounters_on",
262 "set_entity_to_character",
269 luabind::class_<BattleManager>(
"BattleManager")
283 luabind::class_<Enemy>(
"Enemy")
310 "get_camera_for_attack",
324 luabind::class_<AudioManager>(
"AudioManager")
333 (
void(
AudioManager::*)(
const char*,
const char*,
const char*,
const char*))
345 luabind::class_<CameraManager>(
"CameraManager")
348 const int,
const int,
const int,
const int,
const int,
const int
355 luabind::class_<SavemapHandler>(
"SavemapHandler")
360 "get_current_savemap",
369 (
void(
SavemapHandler::*)(
const unsigned int,
const unsigned int,
const int))
376 "set_window_colours",
378 const unsigned int,
const unsigned int,
const unsigned int,
379 const unsigned int,
const unsigned int,
const unsigned int,
380 const unsigned int,
const unsigned int,
const unsigned int,
381 const unsigned int,
const unsigned int,
const unsigned int
390 "set_countdown_time",
403 (
void(
SavemapHandler::*)(
const unsigned int,
const unsigned int,
const unsigned int))
408 (
void(
SavemapHandler::*)(
const unsigned int,
const unsigned int,
const unsigned int))
412 "set_e_skill_materia",
413 (
void(
SavemapHandler::*)(
const unsigned int,
const unsigned int,
const bool))
418 (
void(
SavemapHandler::*)(
const unsigned int,
const unsigned int,
const unsigned int))
422 "set_e_skill_materia_stash",
423 (
void(
SavemapHandler::*)(
const unsigned int,
const unsigned int,
const bool))
429 const float,
const float,
const float,
const unsigned int,
const int,
430 const char*,
const char*
439 "set_character_info",
441 const unsigned int,
const int,
const char*,
const bool,
const bool,
const unsigned int,
442 const unsigned int,
const bool,
const unsigned int,
const unsigned int,
443 const unsigned int,
const unsigned int,
const unsigned int,
const unsigned int,
448 "set_character_stat",
450 const unsigned int,
const unsigned int,
const unsigned int,
const unsigned int
454 "set_character_limit_learned",
456 const unsigned int,
const unsigned int,
const unsigned int,
457 const bool,
const unsigned int
461 "set_character_materia",
463 const unsigned int,
const bool,
const unsigned int,
464 const unsigned int,
const unsigned int
468 "set_character_e_skill_materia",
470 const unsigned int,
const bool,
const unsigned int,
const unsigned int,
const bool
474 "set_character_status",
475 (
void(
SavemapHandler::*)(
const unsigned int,
const unsigned int,
const bool))
486 "get_slot_control_key",
490 "get_slot_control_key",
492 const unsigned int,
const unsigned int,
const unsigned int
500 "get_slot_game_time",
504 "get_slot_countdown_time",
509 "get_slot_party_member",
514 "get_slot_item_at_pos_id",
515 (
unsigned int(
SavemapHandler::*)(
const unsigned int,
const unsigned int))
519 "get_slot_item_at_pos_qty",
520 (
unsigned int(
SavemapHandler::*)(
const unsigned int,
const unsigned int))
529 "get_slot_materia_at_pos_id",
534 "get_slot_materia_at_pos_ap",
535 (
unsigned int(
SavemapHandler::*)(
const unsigned int,
const unsigned int))
539 "is_slot_materia_at_pos_e_skill",
544 "is_slot_materia_at_pos_e_skill_learned",
546 const unsigned int,
const unsigned int,
const unsigned int
550 "get_slot_stash_at_pos_id",
555 "get_slot_stash_at_pos_ap",
556 (
unsigned int(
SavemapHandler::*)(
const unsigned int,
const unsigned int))
560 "is_slot_stash_at_pos_e_skill",
565 "is_slot_stash_at_pos_e_skill_learned",
567 const unsigned int,
const unsigned int,
const unsigned int
571 "get_slot_location_x",
575 "get_slot_location_y",
579 "get_slot_location_z",
583 "get_slot_location_triangle",
588 "get_slot_location_angle",
593 "get_slot_location_field",
598 "get_slot_location_name",
608 "get_slot_character_char_id",
613 "get_slot_character_name",
614 (std::string(
SavemapHandler::*)(
const unsigned int,
const unsigned int))
618 "get_slot_character_level",
619 (
unsigned int(
SavemapHandler::*)(
const unsigned int,
const unsigned int))
623 "get_slot_character_kills",
624 (
unsigned int(
SavemapHandler::*)(
const unsigned int,
const unsigned int))
628 "is_slot_character_enabled",
633 "is_slot_character_locked",
638 "is_slot_character_back_row",
643 "get_slot_character_exp",
644 (
unsigned int(
SavemapHandler::*)(
const unsigned int,
const unsigned int))
648 "get_slot_character_exp_to_next",
649 (
unsigned int(
SavemapHandler::*)(
const unsigned int,
const unsigned int))
653 "get_slot_character_limit_level",
654 (
unsigned int(
SavemapHandler::*)(
const unsigned int,
const unsigned int))
658 "get_slot_character_limit_bar",
659 (
unsigned int(
SavemapHandler::*)(
const unsigned int,
const unsigned int))
663 "get_slot_character_weapon_id",
664 (
unsigned int(
SavemapHandler::*)(
const unsigned int,
const unsigned int))
668 "get_slot_character_armor_id",
669 (
unsigned int(
SavemapHandler::*)(
const unsigned int,
const unsigned int))
673 "get_slot_character_accessory_id",
678 "get_slot_character_stat_base",
680 const unsigned int,
const unsigned int,
const unsigned int
684 "get_slot_character_stat_extra",
686 const unsigned int,
const unsigned int,
const unsigned int
690 "get_slot_character_limit_uses",
692 const unsigned int,
const unsigned int,
const unsigned int
696 "is_slot_character_limit_learned",
698 const unsigned int,
const unsigned int,
const unsigned int,
const unsigned int
702 "get_slot_character_materia_id",
704 const unsigned int,
const unsigned int,
const bool,
const unsigned int
708 "get_slot_character_materia_ap",
710 const unsigned int,
const unsigned int,
const bool,
const unsigned int
714 "get_slot_character_materia_e_skill",
716 const unsigned int,
const unsigned int,
const bool,
717 const unsigned int,
const unsigned int
721 "get_slot_character_materia_e_skill_learned",
723 const unsigned int,
const unsigned int,
const bool,
724 const unsigned int,
const unsigned int
729 (
int(
SavemapHandler::*)(
const unsigned int,
const unsigned int,
const unsigned int))
736 luabind::class_<Background2D>(
"Background2D")
738 "autoscroll_to_entity",
747 "scroll_to_position",
759 "play_animation_looped",
763 "play_animation_once",
772 luabind::value(
"NONE",
AT_NONE),
780 luabind::class_<Walkmesh>(
"Walkmesh")
787 luabind::class_<TextHandler>(
"TextHandler")
789 "set_character_name",
797 luabind::class_<DialogsManager>(
"Dialog")
813 (
void(
DialogsManager::*)(
const char*,
const unsigned int,
const bool))
821 "dialog_wait_for_close",
855 luabind::class_<UiWidget>(
"UiWidget")
860 "play_animation_stop",
865 (
void(
UiWidget::*)(
const char*,
const float,
const float))
869 "play_animation_stop",
870 (
void(
UiWidget::*)(
const char*,
const float,
const float))
874 "set_default_animation",
900 luabind::class_<UiManager>(
"UiManager")
906 luabind::class_<Timer>(
"Timer")
914 luabind::class_<ScriptManager>(
"Script")
924 "request_start_sync",
944 luabind::class_<VGears::WorldmapModule>(
"world_map_module")
949 auto a = boost::ref(*(EntityManager::getSingletonPtr()));
952 luabind::globals(
lua_state_)[
"camera_manager"]
953 = boost::ref(*(CameraManager::getSingletonPtr()));
954 luabind::globals(
lua_state_)[
"entity_manager"]
955 = boost::ref(*(EntityManager::getSingletonPtr()));
956 luabind::globals(
lua_state_)[
"battle_manager"]
957 = boost::ref(*(BattleManager::getSingletonPtr()));
958 luabind::globals(
lua_state_)[
"audio_manager"] = boost::ref(*(AudioManager::getSingletonPtr()));
959 luabind::globals(
lua_state_)[
"savemap_manager"]
960 = boost::ref(*(SavemapHandler::getSingletonPtr()));
962 = boost::ref(*(EntityManager::getSingletonPtr()->GetBackground2D()));
964 = boost::ref(*(EntityManager::getSingletonPtr()->GetWalkmesh()));
965 luabind::globals(
lua_state_)[
"text_manager"] = boost::ref(*(TextHandler::getSingletonPtr()));
966 luabind::globals(
lua_state_)[
"dialog"] = boost::ref(*(DialogsManager::getSingletonPtr()));
967 luabind::globals(
lua_state_)[
"ui_manager"] = boost::ref(*(UiManager::getSingletonPtr()));
968 luabind::globals(
lua_state_)[
"world_map_module"]
969 = boost::ref(*(VGears::WorldmapModule::getSingletonPtr()));
970 luabind::globals(
lua_state_)[
"timer"] = boost::ref(*(Timer::getSingletonPtr()));
971 luabind::globals(
lua_state_)[
"script"] = boost::ref(*
this);
@ MSL_SOLID
Regular message box, solid background.
Definition: DialogsManager.h:64
@ MSL_TRANSPARENT
Translucent message box.
Definition: DialogsManager.h:69
@ MSL_NONE
No message box.
Definition: DialogsManager.h:74
ActionType
Action types.
Definition: Entity.h:26
@ AT_SMOOTH
Smooth action.
Definition: Entity.h:46
@ AT_LINEAR
Linear action.
Definition: Entity.h:38
@ AT_NONE
No action.
Definition: Entity.h:31
TurnDirection
The direction for an entity turn.
Definition: Entity.h:52
@ TD_CLOSEST
Choose direction automatically.
Definition: Entity.h:69
@ TD_CLOCKWISE
Turn clockwise.
Definition: Entity.h:57
@ TD_ANTICLOCKWISE
Turn anticlockwise.
Definition: Entity.h:62
LinearMovement
Linear movement modes.
Definition: Entity.h:75
@ LM_UP_TO_DOWN
Move down.
Definition: Entity.h:80
@ LM_RIGHT_TO_LEFT
Move left.
Definition: Entity.h:95
@ LM_LEFT_TO_RIGHT
Move right.
Definition: Entity.h:90
@ LM_DOWN_TO_UP
Move up.
Definition: Entity.h:85
void ScriptPrint(const char *text)
Prints to the game console.
Definition: ScriptManagerBinds.h:49
void ScriptConsole(const char *text)
Executes a script in the game console.
Definition: ScriptManagerBinds.h:78
void ScriptMap(const char *text)
Changes the current map.
Definition: ScriptManagerBinds.h:62
uint16 a
Alpha component.
Definition: TxzFileSerializer.h:19
The audio manager.
Definition: AudioManager.h:39
void ScriptSetBattleTrack(int id)
Sets the music track for upcoming battles.
Definition: AudioManager.cpp:234
void ScriptPlaySounds(const char *name1, const char *name2, const char *name3, const char *name4)
Plays up to 4 sounds, in 4 different channels.
Definition: AudioManager.cpp:166
int ScriptGetBattleTrack()
Retrieves the music ID for the current or next battle.
Definition: AudioManager.cpp:232
int ScriptGetTrack(int id)
Retrieves the music ID for the specified track for a field or world map.
Definition: AudioManager.cpp:227
void ScriptPlaySound(const char *name)
Plays a sound.
Definition: AudioManager.cpp:159
void ScriptPlayMusic(const char *name)
Plays a music track.
Definition: AudioManager.cpp:120
A field background.
Definition: Background2D.h:29
int ScriptAnimationSync(const char *name)
Plays an animation once, then stops.
Definition: Background2D.cpp:633
void ScriptScrollToPosition(const float x, const float y, const SCROLL_TYPE type, const float seconds)
Scrolls the background to a position.
Definition: Background2D.cpp:282
void ScriptOffset(const float x, const float y)
Offsets the background to a position.
Definition: Background2D.cpp:312
void ScriptScrollToPlayer(const SCROLL_TYPE type, const unsigned int seconds)
Scrolls the background to the position of the playable character.
Definition: Background2D.cpp:269
void ScriptPlayAnimationOnce(const char *name)
Plays an animation once, then stops.
Definition: Background2D.cpp:629
int ScriptScrollSync()
Waits for the scroll to complete.
Definition: Background2D.cpp:302
SCROLL_TYPE
How to scroll the background.
Definition: Background2D.h:38
void ScriptPlayAnimationLooped(const char *name)
Plays an animation in a loop.
Definition: Background2D.cpp:624
void ScriptAutoScrollToEntity(Entity *entity)
Flags the background to automatically scroll to an entity position.
Definition: Background2D.cpp:265
The battle manager.
Definition: BattleManager.h:28
void EndBattle()
Ends the current battle.
Definition: BattleManager.cpp:147
Enemy * ScriptGetEnemy(const unsigned int index)
Retrieves an enemy.
Definition: BattleManager.cpp:195
unsigned int ScriptGetEnemyCount() const
Retrieves the number of enemies in the battle.
Definition: BattleManager.cpp:193
void StartBattle(const unsigned int id)
Starts a battle.
Definition: BattleManager.cpp:103
The camera manager.
Definition: CameraManager.h:26
void ScriptSetCamera(const int x, const int y, const int z, const int d_x, const int d_y, const int d_z)
Sets the camera position and orientation.
Definition: CameraManager.cpp:284
The dialog manager.
Definition: DialogsManager.h:239
void SetVariable(const char *d_name, const char *name, const char *value)
Sets a variable in a dialog.
Definition: DialogsManager.cpp:263
void SetCursor(const char *d_name, const int first_row, const int last_row)
Sets a choice sursor in the dialog.
Definition: DialogsManager.cpp:281
void SetText(const char *d_name, const char *text)
Sets the text of a dialog.
Definition: DialogsManager.cpp:147
int GetCursor(const char *d_name) const
Gets the cursor position in a dialog.
Definition: DialogsManager.cpp:299
void SetMode(const char *d_name, const int bg, const bool closeable)
Sets the window mode.
Definition: DialogsManager.cpp:210
void UpdateTimer(const unsigned int seconds)
Updates the timer.
Definition: DialogsManager.cpp:198
void SetNumeric(const char *d_name, const bool numeric, const bool timer)
Sets or unsets a dialog window as numeric.
Definition: DialogsManager.cpp:172
std::string GetMapName()
Retrieves the current map name.
Definition: DialogsManager.cpp:122
void Hide(const char *d_name)
Closes and hides a dialog window.
Definition: DialogsManager.cpp:250
int Sync(const char *d_name)
Syncs the dialog and makes the script wait until it is closed.
Definition: DialogsManager.cpp:239
void ScriptSetMapName(const char *text_id)
Sets the map name from a text ID.
Definition: DialogsManager.cpp:115
void SetClickable(const char *d_name, const bool clickable)
Makes the dialog clickable or not.
Definition: DialogsManager.cpp:272
void OpenDialog(const char *d_name, int x, int y, int w, int h)
Opens a dialog.
Definition: DialogsManager.cpp:124
Any enemy in a battle.
Definition: Enemy.h:24
unsigned int GetDef() const
Retrieves the enemy's defense stat.
Definition: Enemy.cpp:165
bool IsFront() const
Checks if the enemy is in the front row.
Definition: Enemy.cpp:225
unsigned int GetSpr() const
Retrieves the enemy's spirit stat.
Definition: Enemy.cpp:173
const int GetId() const
Retrieves the enemy ID.
Definition: Enemy.cpp:94
unsigned int GetMpMax() const
Retrieves the enemy's max MP.
Definition: Enemy.cpp:208
unsigned int GetHp() const
Retrieves the enemy's current HP.
Definition: Enemy.cpp:193
unsigned int GetMeva() const
Retrieves the enemy's magic evasion stat.
Definition: Enemy.cpp:189
bool IsActive() const
Checks whether the enemy's main script is active.
Definition: Enemy.cpp:237
unsigned int GetLevel() const
Retrieves the enemy level.
Definition: Enemy.cpp:106
unsigned int GetDex() const
Retrieves the enemy's dexterity stat.
Definition: Enemy.cpp:177
void ScriptGetPos() const
Retrieves the enemy position.
Definition: Enemy.cpp:219
bool IsVisible() const
Checks the enemy visibility.
Definition: Enemy.cpp:229
unsigned int GetExp() const
Retrieves the EXP gain upon defeating the enemy.
Definition: Enemy.cpp:114
unsigned int GetAp() const
Retrieves the AP gain upon defeating the enemy.
Definition: Enemy.cpp:110
const std::string GetName() const
Retrieves the enemy name.
Definition: Enemy.cpp:102
bool IsTargeteable() const
Checks whether the enemy can be targeted.
Definition: Enemy.cpp:233
unsigned int GetMp() const
Retrieves the enemy's current MP.
Definition: Enemy.cpp:204
int ScriptGetAttack(const unsigned int index)
Retrieves an attack.
Definition: Enemy.cpp:247
int ScriptGetAttackCount()
Retrieves the number of attacks of the enemy.
Definition: Enemy.cpp:245
int ScriptGetCameraForAttack(const unsigned int index)
Retrieves the camera for an attack.
Definition: Enemy.cpp:252
unsigned int GetEva() const
Retrieves the enemy's evasion stat.
Definition: Enemy.cpp:185
unsigned int GetLck() const
Retrieves the enemy's luck stat.
Definition: Enemy.cpp:181
unsigned int GetStr() const
Retrieves the enemy's strength stat.
Definition: Enemy.cpp:161
unsigned int GetMoney() const
Retrieves the money gain upon defeating the enemy.
Definition: Enemy.cpp:118
unsigned int GetHpMax() const
Retrieves the enemy's max HP.
Definition: Enemy.cpp:197
unsigned int GetMag() const
Retrieves the enemy's magic stat.
Definition: Enemy.cpp:169
The entity manager.
Definition: EntityManager.h:30
void ScriptAddEntity(const char *name, const char *file_name, const float x, const float y, const float z, const float direction, int index)
Adds an entity to the manager.
Definition: EntityManager.cpp:507
bool IsKeyOff(unsigned int key_code)
Checks if a key is not being pressed.
Definition: EntityManager.cpp:674
void ScriptAddEntityScript(const char *name)
Adds an entity script to the manager.
Definition: EntityManager.cpp:546
void SetRandomEncounters(bool active)
Enables or disables random encounters in the field.
Definition: EntityManager.cpp:648
void ScriptSetPlayerEntity(const char *name)
Sets the playable entity.
Definition: EntityManager.cpp:597
EntityPoint * ScriptGetEntityPoint(const char *name) const
Retrieves an entity point by name.
Definition: EntityManager.cpp:591
Entity * ScriptGetEntity(const char *name) const
Retrieves an entity by name.
Definition: EntityManager.cpp:587
Entity * ScriptGetPlayerEntity() const
Retrieves the playable entity.
Definition: EntityManager.cpp:613
void ScriptPlayerLock(const bool lock)
Locks or unlocks player control of the playable entity.
Definition: EntityManager.cpp:629
void SetEntityToCharacter(const char *entity_name, unsigned int char_id)
Assigns a character to an entity.
Definition: EntityManager.cpp:676
bool IsKeyOn(unsigned int key_code)
Checks if a key is being pressed.
Definition: EntityManager.cpp:658
Entity * GetEntityFromIndex(const int id) const
Retrieves an entity by it's index in the field.
Definition: EntityManager.cpp:560
void ScriptUnsetPlayerEntity()
Unsets any playable entities.
Definition: EntityManager.cpp:621
Entity * GetEntityFromCharacterId(const int id) const
Retrieves an entity by it's assigned character ID.
Definition: EntityManager.cpp:574
An entity point.
Definition: EntityPoint.h:22
void ScriptGetPosition() const
Informs the script manager of the point position.
Definition: EntityPoint.cpp:64
float ScriptGetRotation() const
Retrieves the point orientation.
Definition: EntityPoint.cpp:87
Any entity in a field.
Definition: Entity.h:101
void ScriptGetPosition() const
Retrieves the entity position.
Definition: Entity.cpp:218
void ScriptPlayAnimationStop(const char *name)
Stops one of the entity's animations.
Definition: Entity.cpp:645
float GetTalkRadius() const
Retrieves the entity talk radius.
Definition: Entity.cpp:299
int ScriptTurnSync()
Adds the entity's turn to the sync queue.
Definition: Entity.cpp:564
void ScriptLinearToPosition(const float x, const float y, const float z, const LinearMovement movement, const char *animation, const float orientation, const int dest_triangle)
Linearly moves the entity.
Definition: Entity.cpp:380
float ScriptGetRotation() const
Retrieves the entity rotation.
Definition: Entity.cpp:262
int ScriptJumpSync()
Waits for the jump to finish.
Definition: Entity.cpp:451
void ScriptPlayAnimation(const char *name)
Plays one of the entity's animations.
Definition: Entity.cpp:641
void ScriptSetAnimationSpeed(const float speed)
Sets the animation speed.
Definition: Entity.cpp:633
void SetSolid(const bool solid)
Makes the entity solid or non-solid.
Definition: Entity.cpp:290
void ScriptTurnToEntity(Entity *entity, const TurnDirection turn_direction, const float seconds)
Makes the entity turn towards another entity.
Definition: Entity.cpp:554
virtual bool IsVisible() const =0
Checks if the entity is visible or invisible.
float GetMoveAutoSpeed() const
Retrieves the entity's automatic movement speed.
Definition: Entity.cpp:311
bool IsTalkable() const
Checks if an entity is talkable or non-talkable.
Definition: Entity.cpp:303
void SetMoveAutoSpeed(const float speed)
Sets the entity's automatic movement speed.
Definition: Entity.cpp:309
int ScriptLinearSync()
Adds the unit linear movement to the sync queue.
Definition: Entity.cpp:392
void SetTalkRadius(const float radius)
Sets the entity talk radius.
Definition: Entity.cpp:294
void ScriptTurnToDirection(const float direction, const TurnDirection turn_direction, const ActionType turn_type, const float seconds)
Makes the entity turn to a fixed direction.
Definition: Entity.cpp:543
void ScriptJumpToPosition(const float x, const float y, const float z, const float seconds, const int dest_triangle)
Makes the unit jump to a point in the field.
Definition: Entity.cpp:437
void ScriptOffsetToPosition(const float x, const float y, const float z, const ActionType type, const float seconds)
Definition: Entity.cpp:495
void ScriptSetPosition(const float x, const float y, const float z)
Sets the entity position.
Definition: Entity.cpp:203
void ScriptMoveToPosition(const float x, const float y)
Makes the entity move to a point in the map.
Definition: Entity.cpp:343
void ScriptSetDefaultAnimation(const char *animation)
Sets the default animation of the entity.
Definition: Entity.cpp:659
void SetMoveAutoRotation(const bool rotate)
Enables or disables autorotation while the entity is moving.
Definition: Entity.cpp:331
void SetSolidRadius(const float radius)
Sets the entity's solid radius.
Definition: Entity.cpp:283
int ScriptMoveSync()
Waits for entity's movement to end.
Definition: Entity.cpp:362
void ScriptMoveToEntity(Entity *entity)
Makes the unit move towards another in the map.
Definition: Entity.cpp:354
void ScriptSetRotation(const float rotation)
Sets the entity rotation.
Definition: Entity.cpp:249
void SetMoveAutoAnimation(const bool animate)
Enables or disables autoanimation while the entity is moving.
Definition: Entity.cpp:335
int ScriptAnimationSync()
Adds the entity's animation to the sync queue.
Definition: Entity.cpp:663
int GetMoveTriangleId() const
Sets the destination triangle in the walkmesh.
Definition: Entity.cpp:329
bool IsSolid() const
Checks if the entity is solid.
Definition: Entity.cpp:292
void SetMoveTriangleId(const int triangle)
Sets the destination triangle in the walkmesh.
Definition: Entity.cpp:327
float GetSolidRadius() const
Retrieves the entity's solid radius.
Definition: Entity.cpp:288
virtual void SetVisible(const bool visible)=0
Makes the entity visible or invisible.
int ScriptOffsetSync()
Definition: Entity.cpp:514
void SetTalkable(const bool talkable)
Sets an entity as talkable or non-talkable.
Definition: Entity.cpp:301
void ScriptSetPaused(const bool paused)
Handles game pausing.
Definition: Manager.cpp:115
A handler for savemaps.
Definition: SavemapHandler.h:26
int GetSlotCharacterCharId(const unsigned int slot, const unsigned int id)
Retrieves the char ID of a character from a saved savemap.
Definition: SavemapHandler.cpp:402
void SetParty(const int member_1, const int member_2, const int member_3)
Sets the current party in the current savemap.
Definition: SavemapHandler.cpp:138
void SetMateriaStash(const unsigned int slot, const int id, const unsigned int ap)
Sets a materia in a materia inventory slot in the current savemap.
Definition: SavemapHandler.cpp:162
bool IsSlotCharacterEnabled(const unsigned int slot, const unsigned int id)
Checks the enabled status of a character from a saved savemap.
Definition: SavemapHandler.cpp:426
void SetESkillMateria(const unsigned slot, const unsigned int skill, const bool learned)
Sets a skill as learned in an Enemy Skill materia inventory slot in the current savemap.
Definition: SavemapHandler.cpp:155
bool IsSlotEmpty(const unsigned int slot)
Checks if a slot is empty.
Definition: SavemapHandler.cpp:240
unsigned int GetSlotCharacterMateriaAp(const unsigned int slot, const unsigned int id, const bool weapon, const unsigned int pos)
Retrieves the AP of an equipped materia from a saved savemap.
Definition: SavemapHandler.cpp:536
void Release()
Releases savemaps from memory.
Definition: SavemapHandler.cpp:81
unsigned int GetSlotStashAtPosAp(const unsigned int slot, const unsigned int pos)
Retrieves the AP of a materia in the stash from a saved savemap.
Definition: SavemapHandler.cpp:334
unsigned int GetSlotItemAtPosId(const unsigned int slot, const unsigned int pos)
Retrieves the ID of an item in the inventory from a saved savemap.
Definition: SavemapHandler.cpp:284
int GetSlotStashAtPosId(const unsigned int slot, const unsigned int pos)
Retrieves the ID of a materia in the stash from a saved savemap.
Definition: SavemapHandler.cpp:328
unsigned int GetSlotMateriaAtPosAp(const unsigned int slot, const unsigned int pos)
Retrieves the AP of a materia in the inventory from a saved savemap.
Definition: SavemapHandler.cpp:308
bool IsSlotCharacterLimitLearned(const unsigned int slot, const unsigned int id, const unsigned int level, const unsigned int tech)
Checks if a limit technique is learned by a character from a savemap.
Definition: SavemapHandler.cpp:520
bool IsSlotStashAtPosESkillLearned(const unsigned int slot, const unsigned int pos, const unsigned int skill)
Checks if a a enemy skill is learned by a mat.
Definition: SavemapHandler.cpp:346
void SetMoney(const unsigned int money)
Sets the money of the current savemap.
Definition: SavemapHandler.cpp:119
void SetCharacterInfo(const unsigned int id, const int char_id, const char *name, const bool enabled, const bool locked, const unsigned int level, const unsigned int kills, const bool back_row, const unsigned int exp, const unsigned int exp_to_next, const unsigned int limit_level, const unsigned int limit_bar, const unsigned int weapon, const unsigned int armor, const int accessory)
Sets a character basic information in the current savemap.
Definition: SavemapHandler.cpp:187
void SetCountdownTime(const unsigned int seconds)
Sets the time of the curent timer in the default savemap.
Definition: SavemapHandler.cpp:128
void SetData(const unsigned int bank, const unsigned int address, const int value)
Pushes data to the current savemap memory banks.
Definition: SavemapHandler.cpp:97
void SetCharacterMateria(const unsigned int id, const bool weapon, const unsigned int slot, const int materia, const unsigned int ap)
Sets a materia in a character weapon or armor slot in the current savemap.
Definition: SavemapHandler.cpp:217
std::string GetSlotLocationField(const unsigned int slot)
Retrieves the field ID from a saved savemap.
Definition: SavemapHandler.cpp:384
unsigned int GetSlotLocationTriangle(const unsigned int slot)
Retrieves the walkmesh triangle of the player from a saved savemap.
Definition: SavemapHandler.cpp:372
unsigned int GetSlotCharacterWeaponId(const unsigned int slot, const unsigned int id)
Retrieves the ID of the weapon of a character from a saved savemap.
Definition: SavemapHandler.cpp:474
unsigned int GetSlotCharacterKills(const unsigned int slot, const unsigned int id)
Retrieves the total kills of a character from a saved savemap.
Definition: SavemapHandler.cpp:420
unsigned int GetSlotGameTime(const unsigned int slot)
Retrieves the total playtime from a saved savemap.
Definition: SavemapHandler.cpp:266
std::string GetSlotLocationName(const unsigned int slot)
Retrieves the location name from a saved savemap.
Definition: SavemapHandler.cpp:390
bool IsSlotCharacterBackRow(const unsigned int slot, const unsigned int id)
Checks the row of a character from a saved savemap.
Definition: SavemapHandler.cpp:438
int GetSlotPartyMember(const unsigned int slot, const unsigned int pos)
Retrieves the ID of a party member from a saved savemap.
Definition: SavemapHandler.cpp:278
bool Save(unsigned int slot, bool force)
Copies the current savemap to a slot and writes the file.
Definition: SavemapHandler.cpp:51
unsigned int GetSlotItemAtPosQty(const unsigned int slot, const unsigned int pos)
Retrieves the quantity of an item in the inventory from a saved savemap.
Definition: SavemapHandler.cpp:290
std::string GetSlotControlKey(const unsigned int slot)
Retrieves the control key from a saved savemap.
Definition: SavemapHandler.cpp:246
unsigned int GetSlotCharacterLevel(const unsigned int slot, const unsigned int id)
Retrieves the level of a character from a saved savemap.
Definition: SavemapHandler.cpp:414
int GetSlotLocationAngle(const unsigned int slot)
Retrieves the facing angle of the player from a saved savemap.
Definition: SavemapHandler.cpp:378
void SetSetting(const unsigned int key, const unsigned int value)
Sets a setting value in the current savemap.
Definition: SavemapHandler.cpp:182
unsigned int GetSlotCharacterLimitLevel(const unsigned int slot, const unsigned int id)
Retrieves the current limit level of a character from a saved savemap.
Definition: SavemapHandler.cpp:458
void SetWindowColours(const unsigned int t_l_r, const unsigned int t_l_g, const unsigned int t_l_b, const unsigned int t_r_r, const unsigned int t_r_g, const unsigned int t_r_b, const unsigned int b_r_r, const unsigned int b_r_g, const unsigned int b_r_b, const unsigned int b_l_r, const unsigned int b_l_g, const unsigned int b_l_b)
Sets the window colours in the current savemap.
Definition: SavemapHandler.cpp:107
bool IsSlotCharacterMateriaESkill(const unsigned int slot, const unsigned int id, const bool weapon, const unsigned int pos)
Checks if an equipped materia is Enemy Skill from a saved savemap.
Definition: SavemapHandler.cpp:544
void SetESkillMateriaStash(const unsigned slot, const unsigned int skill, const bool learned)
Sets a skill as learned in an Enemy Skill materia stash slot in the current savemap.
Definition: SavemapHandler.cpp:167
int GetSlotMateriaAtPosId(const unsigned int slot, const unsigned int pos)
Retrieves the ID of a materia in the inventory from a saved savemap.
Definition: SavemapHandler.cpp:302
int GetSlotSetting(const unsigned int slot, const unsigned int key)
Retrieves a setting from a saved savemap.
Definition: SavemapHandler.cpp:396
unsigned int GetSlotMoney(const unsigned int slot)
Retrieves the money from a saved savemap.
Definition: SavemapHandler.cpp:260
void SetControlKey(const char *control)
Sets the control string of the current savemap.
Definition: SavemapHandler.cpp:102
void SetCharacterStat(const unsigned int id, const unsigned int stat, const unsigned int base, const unsigned int extra)
Sets a character stat values in the current savemap.
Definition: SavemapHandler.cpp:202
float GetSlotLocationX(const unsigned int slot)
Retrieves the X coordinate of the player from a saved savemap.
Definition: SavemapHandler.cpp:354
unsigned int GetSlotCharacterLimitUses(const unsigned int slot, const unsigned int id, const unsigned int level)
Retrieves the uses of a character's limit level from a saved savemap.
Definition: SavemapHandler.cpp:512
void SetCharacterLimitLearned(const unsigned int id, const unsigned int level, const unsigned int technique, const bool learned, const unsigned int uses)
Sets a character limit learned status in the current savemap.
Definition: SavemapHandler.cpp:209
bool IsSlotMateriaAtPosESkillLearned(const unsigned int slot, const unsigned int pos, const unsigned int skill)
Checks if a a enemy skill is learned by a materia at a position from a saved savemap.
Definition: SavemapHandler.cpp:320
unsigned int GetSlotCharacterExpToNext(const unsigned int slot, const unsigned int id)
Retrieves the experience for next level of a character from a saved savemap.
Definition: SavemapHandler.cpp:450
std::string GetSlotCharacterName(const unsigned int slot, const unsigned int id)
Retrieves the name of a character from a saved savemap.
Definition: SavemapHandler.cpp:408
bool IsSlotCharacterMateriaESkillLearned(const unsigned int slot, const unsigned int id, const bool weapon, const unsigned int pos, const unsigned int skill)
Checks if a a enemy skill is learned by a equipped materia from a saved savemap.
Definition: SavemapHandler.cpp:552
int GetSlotCharacterAccessoryId(const unsigned int slot, const unsigned int id)
Retrieves the ID of the accessory of a character from a saved savemap.
Definition: SavemapHandler.cpp:490
Savemap GetCurrentSavemap()
Retrieves the current savemap.
Definition: SavemapHandler.cpp:38
void SetMateria(const unsigned int slot, const int id, const unsigned int ap)
Sets a materia in a materia inventory slot in the current savemap.
Definition: SavemapHandler.cpp:150
unsigned int GetSlotCountdownTime(const unsigned int slot)
Retrieves the time in the timer from a saved savemap.
Definition: SavemapHandler.cpp:272
float GetSlotLocationY(const unsigned int slot)
Retrieves the Y coordinate of the player from a saved savemap.
Definition: SavemapHandler.cpp:360
bool IsSlotMateriaAtPosESkill(const unsigned int slot, const unsigned int pos)
Checks if there is an Enemy Skill materia at a inventory position from a saved savemap.
Definition: SavemapHandler.cpp:314
int GetSlotData(const unsigned int slot, const unsigned int bank, const unsigned int address)
Retrieves the value of a bank address from a saved savemap.
Definition: SavemapHandler.cpp:561
unsigned int GetSlotWindowCornerColourComponent(const unsigned int slot, const unsigned int corner, const unsigned int comp)
Retrieves a colour component from a window corner from a saved savemap.
Definition: SavemapHandler.cpp:252
float GetSlotLocationZ(const unsigned int slot)
Retrieves the Z coordinate of the player from a saved savemap.
Definition: SavemapHandler.cpp:366
void SetCharacterStatus(const unsigned int id, const unsigned int status, const bool inflicted)
Adds or removes a status to a character in the current savemap.
Definition: SavemapHandler.cpp:233
unsigned int GetSlotCharacterLimitBar(const unsigned int slot, const unsigned int id)
Retrieves the current limit bar status level of a character from a saved savemap.
Definition: SavemapHandler.cpp:466
unsigned int GetSlotCharacterStatBase(const unsigned int slot, const unsigned int id, const unsigned int stat)
Retrieves the base value of a stat of a character from a saved savemap.
Definition: SavemapHandler.cpp:496
void SetItem(const unsigned int slot, const unsigned int id, const unsigned int quantity)
Sets an item in a inventory slot in the current savemap.
Definition: SavemapHandler.cpp:143
void SetCharacterESkillMateria(const unsigned int id, const bool weapon, const unsigned int slot, const unsigned int skill, const bool learned)
Sets a skill as learned in a character's Enemy Skill materia in the current savemap.
Definition: SavemapHandler.cpp:225
unsigned int GetSlotCharacterExp(const unsigned int slot, const unsigned int id)
Retrieves the total experience of a character from a saved savemap.
Definition: SavemapHandler.cpp:444
Savemap * GetSavemap(unsigned int slot)
Retrieves a savemap saved in a slot.
Definition: SavemapHandler.cpp:40
int GetSlotCharacterMateriaId(const unsigned int slot, const unsigned int id, const bool weapon, const unsigned int pos)
Retrieves the ID of an equipped materia from a saved savemap.
Definition: SavemapHandler.cpp:528
unsigned int GetSlotCharacterArmorId(const unsigned int slot, const unsigned int id)
Retrieves the ID of the armor of a character from a saved savemap.
Definition: SavemapHandler.cpp:482
void SetLocation(const float x, const float y, const float z, const unsigned int triangle, const int angle, const char *field, const char *name)
Sets the current location in the current savemap.
Definition: SavemapHandler.cpp:174
unsigned int GetSlotCharacterStatExtra(const unsigned int slot, const unsigned int id, const unsigned int stat)
Retrieves the extra value of a stat of a character from a saved savemap.
Definition: SavemapHandler.cpp:504
void SetGameTime(const unsigned int seconds)
Sets the total playtime of the current savemap.
Definition: SavemapHandler.cpp:124
void SetKeyItem(const unsigned int item, const bool owned)
Marks a key item as owned or non-owned in the current savemap.
Definition: SavemapHandler.cpp:133
bool IsSlotStashAtPosESkill(const unsigned int slot, const unsigned int pos)
Checks if there is an Enemy Skill materia at a stash position from a saved savemap.
Definition: SavemapHandler.cpp:340
bool IsSlotCharacterLocked(const unsigned int slot, const unsigned int id)
Checks the lock status of a character from a saved savemap.
Definition: SavemapHandler.cpp:432
bool GetSlotKeyItem(const unsigned int slot, const unsigned int id)
Checks the status of a key item from a saved savemap.
Definition: SavemapHandler.cpp:296
A savemap.
Definition: Savemap.h:24
Definition: ScriptManager.h:131
Type
Script types.
Definition: ScriptManager.h:138
@ UI
A UI element script.
Definition: ScriptManager.h:159
@ ENTITY
A field or world map entity script.
Definition: ScriptManager.h:152
@ SYSTEM
System script.
Definition: ScriptManager.h:145
int ScriptRequestEndSync(const Type type, const char *entity, const char *function, const int priority)
Request a synchronous script execution to end.
Definition: ScriptManager.cpp:572
void InitBinds()
Initializes Lua binds.
Definition: ScriptManagerBinds.h:82
void ScriptRequest(const Type type, const char *entity, const char *function, const int priority)
Request an script execution.
Definition: ScriptManager.cpp:516
int ScriptRequestStartSync(const Type type, const char *entity, const char *function, const int priority)
Request a synchronous script execution to start.
Definition: ScriptManager.cpp:542
int ScriptWait(const float seconds)
Makes an script wait.
Definition: ScriptManager.cpp:501
lua_State * lua_state_
Lua state.
Definition: ScriptManager.h:439
The text handler.
Definition: TextHandler.h:25
void SetParty(int char_1, int char_2, int char_3)
Sets the party member IDs.
Definition: TextHandler.cpp:121
void SetCharacterName(int id, char *name)
Sets a character name.
Definition: TextHandler.cpp:116
The game timer.
Definition: Timer.h:23
float GetGameTimeTotal()
Retrieves the total game time.
Definition: Timer.cpp:40
int GetGameTimer() const
Retrieves the game timer.
Definition: Timer.cpp:57
void SetGameTimer(const float timer)
Sets the game timer.
Definition: Timer.cpp:55
The UI manager.
Definition: UiManager.h:31
UiWidget * ScriptGetWidget(const char *name)
Retrieves a UI widget by name.
Definition: UiManager.cpp:124
The world map module.
Definition: WorldmapModule.h:26
void Init()
Initializes the world map module.
Definition: WorldmapModule.cpp:669
A walkmesh.
Definition: Walkmesh.h:68
bool IsLocked(unsigned int triangle_id) const
Checks if a triangle is locked.
Definition: Walkmesh.cpp:103
void LockWalkmesh(unsigned int triangle_id, bool lock)
Locks or unlocks a triangle.
Definition: Walkmesh.cpp:95
Handles XML map files.
Definition: XmlMapFile.h:23
void LoadMap()
Parses the file and loads the map data.
Definition: XmlMapFile.cpp:30
Handles the main maps file.
Definition: XmlMapsFile.h:24
const Ogre::String GetMapFileNameByName(const Ogre::String &name)
Retrieves a map file by map name.
Definition: XmlMapsFile.cpp:23
Ogre::String String
Definition: TypeDefine.h:37