 |
Blamite Game Engine - blam!
00453.06.08.26.0624.blamite
The core library for the Blamite Game Engine.
|
Go to the documentation of this file. 1 #include "../console.h"
22 description =
"sets the specified camera object as the active camera";
23 syntax =
"set_camera <string>";
28 BlamResult
Execute(std::vector<std::string> args)
32 return BlamResult::Error_Command_WrongArgumentCount;
35 std::string camera_name =
"";
37 for (std::string arg : args)
42 camera_name = camera_name.substr(0, camera_name.size());
49 return BlamResult::Success_OK;
52 if (camera_name ==
"#NULL")
56 return BlamResult::Success_OK;
64 return BlamResult::Success_OK;
69 Blam::Logger::LogEvent(
"cannot set camera: object '" + camera_name +
"' is of wrong object type", WSV_ERROR);
70 return BlamResult::Success_OK;
78 return BlamResult::Success_OK;
84 return BlamResult::Success_OK;
BLAM BlamWorldState * GetWorldState()
Retrieves the current world state.
Definition: world.cpp:56
#define tag_camr
Definition: camera.h:19
BLAM void LogEvent(std::string message)
Logs a message to the log and/or console.
Definition: aliases.cpp:130
std::string description
An optional description of the command. Shown when using the classify command.
Definition: console.h:36
Class used to represent a console command.
Definition: console.h:33
BlamTagData * tag_data
Pointer to the tag data associated with this object.
Definition: world_objects.h:304
Class representing a tag-based world object.
Definition: world_objects.h:278
BlamResult Execute(std::vector< std::string > args)
Called upon command execution.
Definition: set_camera.hpp:28
std::string name
The name of the console command.
Definition: console.h:35
BlamWorldObject * GetObjectByName(std::string name, bool recursive_search=false)
Definition: BlamWorldState.cpp:202
Class representing a world object.
Definition: world_objects.h:138
std::string syntax
The syntax information for the command. Shown to the user when using the help command with an argumen...
Definition: console.h:37
BlamCommandType type
The type of command this is. See #Blam::Resources::Console::BlamCommandType for more information.
Definition: console.h:40
SetCameraCommand()
Definition: set_camera.hpp:19
void SetActiveCamera(BlamWorldObject_Tag *camera)
Definition: BlamWorldState.cpp:248
Class for the set_camera command.
Definition: set_camera.hpp:16
Namespace for things relating to the debug console.
Definition: abort.hpp:5
Class representing a world state.
Definition: world_objects.h:715
@ Builtin
A command that is hard-coded into the engine.
std::string tag_class
The tag's short class name.
Definition: tags.h:146