![]() |
Gamedev Framework (gf) 1.2.0
A C++17 framework for 2D games
|
Vocabulary classes. More...
Classes | |
class | gf::Flags< E > |
Bitfield relying on an enumeration. More... | |
class | gf::Ref< T > |
A reference wrapper. More... | |
class | gf::Singleton< T > |
A singleton that wraps a pointer provided by a storage. More... | |
class | gf::SingletonStorage< T > |
A storage for a singleton. More... | |
class | gf::StaticSpan< T, N > |
A static span. More... | |
class | gf::Span< T > |
A span. More... | |
struct | gf::NoneType |
Semantic type to represent "none". More... | |
struct | gf::AllType |
Semantic type to represent "all". More... | |
struct | gf::AnyType |
Semantic type to represent "any". More... | |
struct | gf::ZeroType |
Semantic type to represent "zero". More... | |
Typedefs | |
using | gf::Id = uint64_t |
An identifier. More... | |
Enumerations | |
enum class | gf::AngularMove : uint8_t { gf::AngularMove::None , gf::AngularMove::Left , gf::AngularMove::Right } |
An angular move. More... | |
enum class | gf::LinearMove : uint8_t { gf::LinearMove::None , gf::LinearMove::Forward , gf::LinearMove::Backward } |
A linear move. More... | |
enum | gf::Quarter { gf::UpperLeft , gf::UpperRight , gf::LowerRight , gf::LowerLeft } |
A quarter in a square. More... | |
Functions | |
constexpr Id | gf::hash (const char *str, std::size_t sz) |
Get an identifier from a string. More... | |
constexpr Id | gf::hash (std::string_view str) |
Get an idenfitier from a string. More... | |
constexpr gf::Id | gf::literals::operator""_id (const char *str, std::size_t sz) |
User defined operator for creating compile time ids from strings. More... | |
GF_CORE_API float | gf::angularFactor (AngularMove move) |
Get the angular factor from the angular move. More... | |
GF_CORE_API float | gf::linearFactor (LinearMove move) |
Get the linear factor from the linear move. More... | |
Variables | |
constexpr Id | gf::InvalidId = 0 |
The invalid id (which is 0) More... | |
constexpr NoneType | gf::None = { } |
Constant to represent "none". More... | |
constexpr AllType | gf::All = { } |
Constant to represent "all". More... | |
constexpr AnyType | gf::Any = { } |
Constant to represent "any". More... | |
constexpr ZeroType | gf::Zero = { } |
Constant to represent "zero". More... | |
Vocabulary classes.
using gf::Id = typedef uint64_t |
An identifier.
|
strong |
An angular move.
An angular move represents a rotation move to the right or to the left.
Enumerator | |
---|---|
None | No angular move. |
Left | Move to the left (i.e. counter-clockwise) |
Right | Move to the right (i.e. clockwise) |
|
strong |
A linear move.
A linear move represents a translation move forward or backward.
Enumerator | |
---|---|
None | No linear move. |
Forward | Move forward. |
Backward | Move backward. |
enum gf::Quarter |
GF_CORE_API float gf::angularFactor | ( | AngularMove | move | ) |
Get the angular factor from the angular move.
|
constexpr |
Get an identifier from a string.
The hash is a Fowler–Noll–Vo 1a hash. This function is mainly for internal use. You should instead use the user-defined literal _id
.
Example:
str | The string |
sz | The size of the string |
|
constexpr |
Get an idenfitier from a string.
The hash is a Fowler–Noll–Vo 1a hash. This function can be used for computing an id at runtime. For computing an id from a string at compile time, you should use the the user-defined literal _id
.
str | The string |
GF_CORE_API float gf::linearFactor | ( | LinearMove | move | ) |
Get the linear factor from the linear move.
|
constexpr |
User defined operator for creating compile time ids from strings.
To use it, you have to use the gf::literals
namespace:
|
constexpr |
Constant to represent "all".
|
constexpr |
Constant to represent "any".
|
constexpr |
The invalid id (which is 0)
|
constexpr |
Constant to represent "none".
|
constexpr |
Constant to represent "zero".