#include "SDL/SDL.h"#include "Logger.h"#include <cmath>#include <algorithm>#include <iostream>#include <sstream>#include <string>#include <cctype>#include <vector>Classes | |
| struct | Color4ub |
| Four component Color structure. More... | |
| struct | Vec2f |
| Contains two values. More... | |
| struct | Recti |
| Basic 2D rectangle. More... | |
| class | IdManager |
| Generates basic GUIDs for use in controls. More... | |
| class | Timer |
| Convenience class to return high-resolution timer values. More... | |
Typedefs | |
| typedef unsigned int | Uint |
| An Unsigned Integer value. | |
| typedef unsigned char | Uchar |
| An Unsigned Character value. | |
| typedef std::pair< Uint, Uint > | AbsCoordinate |
| A pair of absolute value coordinates. | |
| typedef std::vector< std::string > | StringList |
| A list of strings. | |
Enumerations | |
| enum | EntityType { ITEM, MONSTER, PLAYER, NPC } |
An Unsigned Integer value. More... | |
Functions | |
| bool | isPointInRect (int pointX, int pointY, int rectX, int rectY, int rectW, int rectH) |
| bool | isRectInRect (int aX, int aY, int aX2, int aY2, int bX, int bY, int bX2, int bY2) |
| bool | isRectInRect (Recti a, Recti b) |
| std::string | toLowercase (const std::string &str) |
| std::string | toUppercase (const std::string &str) |
| void | system_launch (const std::string cmd) |
| int | clamp (int x, int a, int b) |
| float | clamp (float x, float a, float b) |
| float | degToRad (float degree) |
| float | radToDeg (float rad) |
| float | angleFromPoints (float x, float y, float x2, float y2) |
| Vec2f | getDirectionVector (float angle) |
| template<typename T > | |
| bool | from_string (T &t, const std::string &s, std::ios_base &(*f)(std::ios_base &)) |
Variables | |
| const float | PI |
| const float | PI_2 |
| const float | DEG2RAD |
| const float | RAD2DEG |
A pair of absolute value coordinates.
A list of strings.
An Unsigned Character value.
Typically used for color definitions as values can only be between 0 - 255.
An Unsigned Integer value.
| enum EntityType |
| float angleFromPoints | ( | float | x, | |
| float | y, | |||
| float | x2, | |||
| float | y2 | |||
| ) |
Gets the angle of a line in degrees given two points.
| int clamp | ( | int | x, | |
| int | a, | |||
| int | b | |||
| ) |
Clamps an int value to a specified range.
| x | Value to clamp. | |
| a | Minimum value to clamp to. | |
| b | Maximum value to clamp to. |
| float clamp | ( | float | x, | |
| float | a, | |||
| float | b | |||
| ) |
Clamps an float value to a specified range.
| x | Value to clamp. | |
| a | Minimum value to clamp to. | |
| b | Maximum value to clamp to. |
| float degToRad | ( | float | degree | ) |
Gets an angle in radians from degrees.
| bool from_string | ( | T & | t, | |
| const std::string & | s, | |||
| std::ios_base &(*)(std::ios_base &) | f | |||
| ) |
| Vec2f getDirectionVector | ( | float | angle | ) |
Gets a directional vector from an angle in degrees.
| bool isPointInRect | ( | int | pointX, | |
| int | pointY, | |||
| int | rectX, | |||
| int | rectY, | |||
| int | rectW, | |||
| int | rectH | |||
| ) |
| bool isRectInRect | ( | int | aX, | |
| int | aY, | |||
| int | aX2, | |||
| int | aY2, | |||
| int | bX, | |||
| int | bY, | |||
| int | bX2, | |||
| int | bY2 | |||
| ) |
| float radToDeg | ( | float | rad | ) |
Gets an angle in degrees from radians.
| void system_launch | ( | const std::string | cmd | ) |
| std::string toLowercase | ( | const std::string & | str | ) |
| std::string toUppercase | ( | const std::string & | str | ) |
| const float DEG2RAD |
| const float PI |
| const float PI_2 |
| const float RAD2DEG |
1.7.1