Blamite Game Engine - Blam (Core)
haloscript.h File Reference
#include "components/core/colors/colors.h"
#include <string>
#include <map>
#include <vector>

Go to the source code of this file.

Classes

class  Blam::command_object
 Legacy class representing a CommandScript command. More...
 
struct  BlamScript::Globals::ScriptGlobal
 Structure containing data for a game engine global. More...
 
class  BlamScript::script_action
 
class  BlamScript::cmd_script_object
 
class  BlamScript::script_gvar
 
class  BlamScript::script_object
 

Namespaces

 Blam
 Namespace surrounding all major engine components.
 
 BlamScript
 
 BlamScript::Globals
 Namespace containing things relating to game engine globals.
 

Macros

#define GVARS_FILE   "./gvars.xml"
 The file to read globals from. More...
 
#define BLAM
 
#define HSC
 

Enumerations

enum  BlamScript::Globals::GvarUpdateResult {
  BlamScript::Globals::InvalidType, BlamScript::Globals::UnknownGlobal, BlamScript::Globals::Ok, BlamScript::Globals::InvalidArgs,
  BlamScript::Globals::OutOfBounds, BlamScript::Globals::GlobalIsProtected
}
 Enumerator for the result of a global update attempt. More...
 
enum  BlamScript::Globals::GvarType {
  BlamScript::Globals::Boolean, BlamScript::Globals::Real, BlamScript::Globals::Short, BlamScript::Globals::Long,
  BlamScript::Globals::Object, BlamScript::Globals::String, BlamScript::Globals::Int, BlamScript::Globals::Float,
  BlamScript::Globals::Color
}
 Enumerator for the type of global variable. More...
 

Functions

BLAM command_object Blam::CreateCommandFromFile (std::string filename)
 
BLAM std::string Blam::get_csc_cmd_name (std::string filename)
 
BLAM std::string Blam::csc_var_process (std::string const &s)
 
BLAM std::string Blam::csc_var_process (std::string const &s, char read_until)
 
HSC std::map< std::string, ScriptGlobal > * BlamScript::Globals::GetGlobalsList ()
 Retrieves the list of loaded globals. More...
 
HSC bool BlamScript::Globals::LoadGlobalsFromFile ()
 Loads any globals from GVARS_FILE. More...
 
HSC std::string BlamScript::Globals::GetGvarTypeLabel (GvarType type)
 Retrieves a string representation of a global's type, for use in UI. More...
 
HSC bool BlamScript::Globals::GlobalExists (std::string id)
 Determines whether or not a global exists. More...
 
HSC void BlamScript::Globals::RegisterGvar (ScriptGlobal var)
 Registers a new engine global. More...
 
HSC void BlamScript::Globals::RegisterGvar (std::string name, std::string value_raw, GvarType type)
 Registers a new engine global. More...
 
HSC void BlamScript::Globals::RegisterGvar (std::string name, std::string value_raw, GvarType type, std::string info)
 Registers a new engine global. More...
 
HSC ScriptGlobalBlamScript::Globals::GetGlobal (std::string name)
 Retrieves a global with the specified ID. More...
 
HSC GvarUpdateResult BlamScript::Globals::UpdateGlobalWrap (std::string name, std::string new_value)
 Updates a global's raw value. More...
 
HSC GvarUpdateResult BlamScript::Globals::UpdateGlobal (std::string name, std::string new_value)
 Updates the value of a String global. More...
 
HSC GvarUpdateResult BlamScript::Globals::UpdateGlobal (std::string name, bool new_value)
 Updates the value of a Boolean global. More...
 
HSC GvarUpdateResult BlamScript::Globals::UpdateGlobal (std::string name, int new_value)
 Updates the value of a Integer global. More...
 
HSC GvarUpdateResult BlamScript::Globals::UpdateGlobal (std::string name, short new_value)
 Updates the value of a Short global. More...
 
HSC GvarUpdateResult BlamScript::Globals::UpdateGlobal (std::string name, long new_value)
 Updates the value of a Long global. More...
 
HSC GvarUpdateResult BlamScript::Globals::UpdateGlobal (std::string name, float new_value)
 Updates the value of a Float global. More...
 
HSC GvarUpdateResult BlamScript::Globals::UpdateGlobal (std::string name, BlamColor new_value)
 Updates the value of a Color global. More...
 
HSC bool * BlamScript::Globals::GetGlobalAsBoolean (std::string name)
 Retrieves a global's value as a boolean. More...
 
HSC std::string * BlamScript::Globals::GetGlobalAsString (std::string name)
 Retrieves a global's value as a string. More...
 
HSC short * BlamScript::Globals::GetGlobalAsShort (std::string name)
 Retrieves a global's value as a short. More...
 
HSC long * BlamScript::Globals::GetGlobalAsLong (std::string name)
 Retrieves a global's value as a long. More...
 
HSC int * BlamScript::Globals::GetGlobalAsInteger (std::string name)
 Retrieves a global's value as an int. More...
 
HSC float * BlamScript::Globals::GetGlobalAsFloat (std::string name)
 Retrieves a global's value as a float. More...
 
HSC BlamColorBlamScript::Globals::GetGlobalAsColor (std::string name)
 Retrieves a global's value as a BlamColor. More...
 
HSC cmd_script_object BlamScript::parse_cmd_script (std::string filename)
 
HSC std::string BlamScript::get_cmd_name (std::string filename)
 
HSC std::vector< std::string > BlamScript::getCommandsCSC ()
 
HSC std::vector< cmd_script_object > BlamScript::getCommandsHSC ()
 
HSC std::vector< std::string > BlamScript::get_csc_data ()
 
HSC std::vector< cmd_script_object > BlamScript::get_hsc_data ()
 
HSC void BlamScript::InitCSC ()
 
HSC void BlamScript::InitHSC ()
 

Macro Definition Documentation

◆ BLAM

#define BLAM

◆ GVARS_FILE

#define GVARS_FILE   "./gvars.xml"

The file to read globals from.

◆ HSC

#define HSC