 |
Blamite Game Engine - blam!
00398.09.22.23.2015.blamite
The core library for the Blamite Game Engine.
|
Go to the documentation of this file.
3 #include <Strings/components/classes/events/events.h>
30 bool mouse_capture_state_changed =
false;
31 int current_speed_index = 0;
38 std::vector<float> camera_speeds = {
46 int viewport_center_x = 0;
47 int viewport_center_y = 0;
49 bool zoom_state_changed =
false;
50 float zoom_increment = 0.0f;
52 std::map<BlamDirection, float> move_accelerations = {
53 std::pair<BlamDirection, float>(BlamDirection::Forward, 0.0f),
54 std::pair<BlamDirection, float>(BlamDirection::Backward, 0.0f),
55 std::pair<BlamDirection, float>(BlamDirection::Left, 0.0f),
56 std::pair<BlamDirection, float>(BlamDirection::Right, 0.0f),
57 std::pair<BlamDirection, float>(BlamDirection::Up, 0.0f),
58 std::pair<BlamDirection, float>(BlamDirection::Down, 0.0f)
61 std::map<BlamDirection, float> look_accelerations = {
62 std::pair<BlamDirection, float>(BlamDirection::Up, 0.0f),
63 std::pair<BlamDirection, float>(BlamDirection::Down, 0.0f),
64 std::pair<BlamDirection, float>(BlamDirection::Left, 0.0f),
65 std::pair<BlamDirection, float>(BlamDirection::Right, 0.0f)
68 float accel_increment = 0.0f;
70 int move_finished_tick = -1;
71 bool bounce_needed =
false;
72 bool currently_bouncing =
false;
73 bool bounceback_done =
false;
74 bool bounceforward_done =
false;
139 void MoveCamera(BlamDirection direction,
float acceleration);
BLAM BlamDirector * GetCamera()
Retrieves the director instance.
Definition: director.cpp:31
int entry_size
The size of each block entry.
Definition: tags.h:179
void OnTickEvent(TickEvent *event)
Definition: BlamDirectorCamera.cpp:84
bool mouse_captured
Whether or not the mouse is currently being captured by the camera.
Definition: director.h:84
BlamDirector()
Initializes the camera.
Definition: BlamDirectorCamera.cpp:17
#define BLAM
Definition: director.h:10
@ SDLK_w
Definition: SdlEmulationLayer.h:453
void * entry_data_address
The address of the blocks' entry data.
Definition: tags.h:181
BLAM void LogEvent(std::string message)
Logs a message to the log and/or console.
Definition: aliases.cpp:142
float fov
The camera's current field of view.
Definition: director.h:85
float far_clip_plane_distance
Definition: director.h:109
BlamVector3 camera_angle
The current looking angle of the camera. X is yaw, Y is pitch, Z is roll (unused atm).
Definition: director.h:78
float zoom_increment_count
The number of steps/increments to use when zooming in and out. Lower numbers will cause the camera to...
Definition: director.h:90
BLAM std::vector< BlamTagData * > * GetLoadedTags()
Retrieves the list of loaded tag data.
Definition: tags.cpp:151
char path[256]
The tag's path.
Definition: tags.h:84
@ SDLK_r
Definition: SdlEmulationLayer.h:448
void OnKeyPressEvent(KeyPressEvent *event)
Definition: BlamDirectorCamera.cpp:442
float near_clip_plane_distance
Definition: director.h:108
void OnNewFrameEvent(NewFrameEvent *event)
Definition: BlamDirectorCamera.cpp:32
float fov_normal
The camera's default field of view.
Definition: director.h:86
BLAM_EXT_API BlamTagClass * GetTagClass(std::string id)
Retrieves a tag class that matches the given string.
Definition: tagclass.cpp:64
#define USER_DATA_PATH(path)
Macro to quickly access a user data folder.
Definition: config.h:43
@ SDLK_f
Definition: SdlEmulationLayer.h:436
float vertical_angle
Definition: director.h:106
BLAM void PrepareCamera()
Prepares the director for use.
Definition: director.cpp:5
BlamVector3 camera_right
The calculated point representing the right of the camera.
Definition: director.h:82
BLAM bool GetEngineHookState()
Retrieves the engine's hook state.
Definition: blam_api.cpp:17
BLAM_EXT_API std::vector< BlamTagClass * > * GetRegisteredTagClasses()
Retrieves the list of all registered tag classes.
Definition: tagclass.cpp:82
bool calculate_angle
Definition: director.h:104
float accel_increment_count
The number of steps/increments to use when accelerating and decelerating. Lower numbers will cause th...
Definition: director.h:96
Namespace for things related to the debug camera (director).
Definition: director.h:161
@ SDLK_d
Definition: SdlEmulationLayer.h:434
float horizontal_angle
Definition: director.h:105
bool SetTagPath(std::string new_path)
Updates the tag path.
Definition: BlamTagData.cpp:31
void ShowImPropertyEditor()
Shows a series of ImGUI controls used to modify tag data with a simple UI.
Definition: BlamTagClass.cpp:12
int entry_count
The number of entries within the tag block.
Definition: tags.h:182
bool move_acceleration
Whether or not camera movements should use acceleration.
Definition: director.h:94
@ SDLK_LSHIFT
Definition: SdlEmulationLayer.h:608
Structure representing a tag reference.
Definition: tags.h:215
std::string class_name_long
The longer class name. Typically shown alongside short name for user-friendliness.
Definition: tags.h:134
BLAM void ShutdownCamera()
Destroys the director and cleans up any data related to it.
Definition: director.cpp:26
bool auto_verify_coords
Whether or not camera_front and camera_right should be automatically calculated.
Definition: director.h:80
float speed
The camera's current speed.
Definition: director.h:88
BLAM BlamTagData * GetTagData(std::string tag_path)
Retrieves information for a given tag.
Definition: tags.cpp:80
BLAM void ResolveAllTagReferences()
Attempts to resolve all tag references within all loaded tags.
Definition: tags.cpp:72
ARPHIC PUBLIC LICENSE Ltd Yung Chi Taiwan All rights reserved except as specified below Everyone is permitted to copy and distribute verbatim copies of this license but changing it is forbidden Preamble The licenses for most software are designed to take away your freedom to share and change it By the ARPHIC PUBLIC LICENSE specifically permits and encourages you to use this provided that you give the recipients all the rights that we gave you and make sure they can get the modifications of this software Legal Terms Font means the TrueType fonts AR PL Mingti2L AR PL KaitiM AR PL KaitiM and the derivatives of those fonts created through any modification including modifying reordering converting changing font or adding deleting some characters in from glyph table PL means Public License Copyright Holder means whoever is named in the copyright or copyrights for the Font You means the or person redistributing or modifying the Font Freely Available means that you have the freedom to copy or modify the Font as well as redistribute copies of the Font under the same conditions you not price If you you can charge for this service Copying &Distribution You may copy and distribute verbatim copies of this Font in any without provided that you retain this license including modifying reordering converting changing font or adding deleting some characters in from glyph and copy and distribute such modifications under the terms of Section provided that the following conditions are such as by offering access to copy the modifications from a designated or distributing the modifications on a medium customarily used for software interchange c If the modified fonts normally reads commands interactively when you must cause it
Definition: ARPHICPL.TXT:36
bool lock_camera
Whether or not the camera is locked. If locked, all keyboard/mouse input is ignored.
Definition: director.h:91
bool look_acceleration
Whether or not camera looking should use acceleration.
Definition: director.h:95
Class representing the Director.
Definition: director.h:27
bool pancam_lock_xy
Whether or not the camera should be locked to X/Y axis when in pan-cam mode.
Definition: director.h:93
bool data_is_tag
Whether or not tagref_address points to tag data, or the tag's path.
Definition: tags.h:222
bool zoomed
Whether or not the camera is currently zoomed in.
Definition: director.h:98
bool camera_bouncing
Whether or not the camera should have a bounce/rubber effect when moving and looking around.
Definition: director.h:97
std::vector< BlamTagClass * > registered_classes
List of all registered tag classes.
Definition: tagclass.cpp:62
BLAM bool RegisterCreatedTag(void *tag, std::string tag_class)
Registers a tag created in memory, making it available throughout the engine.
Definition: tags.cpp:41
void * data_address
The address of the referenced data.
Definition: tags.h:265
bool tick_based_looking
Whether or not camera looking should be driven by the game tick.
Definition: director.h:102
BLAM void LoadReferencedTags(std::string tag_path)
Attempts to resolve any tag references within a given tag.
Definition: tag_io.cpp:58
BlamDirector * camera
Definition: director.cpp:3
bool persistent_look_motion
Whether or not to use persistent camera look motion. Only applies when using tick based looking.
Definition: director.h:101
Structure representing a data reference.
Definition: tags.h:261
int tag_size
The size of the tag's data. Used on loading/writing tag files.
Definition: tags.h:139
BLAM void LogEventForce(std::string message)
Forcibly logs a message to the log and/or console.
Definition: aliases.cpp:274
void SetCameraSpeed(float _speed)
Sets the camera's speed, while also sending a log message indicating that the speed has been changed.
Definition: BlamDirectorCamera.cpp:804
BLAM void CleanupTagData()
Releases all memory used by tags.
Definition: tags.cpp:130
void * address
The address pointing to the start of the tag's data.
Definition: tags.h:71
BLAM void ShowImPropertyEditor(void *tag, std::string tag_class)
Shows an ImGUI editor for a given tag.
Definition: tags.cpp:17
TagOrigin origin
The origin of the tag.
Definition: tags.h:86
@ SDLK_a
Definition: SdlEmulationLayer.h:431
Class used to contain and access tag data.
Definition: tags.h:68
bool pancam
Whether or not the camera is currently in pan-cam mode. Pan-cam locks Z movement of the camera when n...
Definition: director.h:92
void OnMouseClickEvent(MouseClickEvent *event)
Definition: BlamDirectorCamera.cpp:427
void SetMemoryLocation(void *address)
Sets the address and size of the tag that this class should be applied to.
Definition: BlamTagClass.cpp:20
void ValidateCameraCoords()
If auto_verify_coords is set to true, this will verify all camera coordinates.
Definition: BlamDirectorCamera.cpp:742
void * tagref_address
The address of the tagref data.
Definition: tags.h:221
@ Tags
Directory storing user-created tags. Defaults to {DataRoot}/tags/.
IMGUI_API void NewFrame()
Definition: imgui.cpp:3689
void OnMouseMoveEvent(MouseMoveEvent *event)
Definition: BlamDirectorCamera.cpp:355
int size
The size of the tag's data in memory.
Definition: tags.h:72
@ SDLK_s
Definition: SdlEmulationLayer.h:449
BlamVector3 camera_front
The calculated point representing the front of the camera.
Definition: director.h:81
BlamVector3 camera_pos
The current position of the camera.
Definition: director.h:77
float fov_zoomed
The camera's field of view while zoomed in.
Definition: director.h:87
Class representing a tag class.
Definition: tags.h:131
float look_sensetivity_vertical
The camera's vertical look sensetivity.
Definition: director.h:99
~BlamDirector()
Destroys the camera.
Definition: BlamDirectorCamera.cpp:27
void MoveCamera(BlamDirection direction, float acceleration)
Moves the camera one "step" in the given direction.
Definition: BlamDirectorCamera.cpp:457
BLAM SDL_Window * GetMainWindowHandle()
Retrieves the main window handle of the application, when using SDL.
Definition: main.cpp:729
float look_sensetivity_horizontal
The camera's horizontal look sensetivity.
Definition: director.h:100
std::string tag_class
The tag's short class name.
Definition: tags.h:85