Common.h file
Namespaces
- namespace Jazz2
- Root namespace of Jazz² Resurrection.
- namespace Jazz2::Actors
- Implementation of all objects.
- namespace Jazz2::UI
- User interface and menus.
- namespace Jazz2::Resources
- Structures for game resources.
- namespace Jazz2::Tiles
- Tile sets and maps.
- namespace Jazz2::Scripting
- Scripting-related classes, compiled only if
WITH_ANGELSCRIPT. - namespace Jazz2::Scripting::Legacy
- Legacy JJ2+ definitions.
Functions
- void Unimplemented(const char* sourceName)
- Logs that a script called a function that isn't implemented, with where it called it from.
-
auto OpenScriptFile(StringView path) -> std::
unique_ptr<Death:: IO:: Stream> - Opens a file a script names, from the content or the directory of the original game.
- auto IsScriptFileNameSafe(StringView filename) -> bool
- Returns whether a file name a script gives stays inside the data directory of the game.
-
auto get_sinTable(std::
uint32_t angle) -> float - Returns the sine of the given table angle.
-
auto get_cosTable(std::
uint32_t angle) -> float - Returns the cosine of the given table angle.
-
auto RandWord32() -> std::
uint32_t - Returns a random 32-bit word.
-
auto unixTimeSec() -> std::
uint64_t - Returns the current Unix time in seconds.
-
auto unixTimeMs() -> std::
uint64_t - Returns the current Unix time in milliseconds.
- auto jjRegexIsValid(const String& expression) -> bool
- Returns whether the given regular expression is valid.
- auto jjRegexMatch(const String& text, const String& expression, bool ignoreCase) -> bool
- Returns whether the text fully matches the regular expression.
- auto jjRegexMatchWithResults(const String& text, const String& expression, CScriptArray& results, bool ignoreCase) -> bool
- Returns whether the text fully matches the regular expression, outputting captured groups.
- auto jjRegexSearch(const String& text, const String& expression, bool ignoreCase) -> bool
- Returns whether the regular expression is found anywhere in the text.
- auto jjRegexSearchWithResults(const String& text, const String& expression, CScriptArray& results, bool ignoreCase) -> bool
- Returns whether the regular expression is found anywhere in the text, outputting captured groups.
- auto jjRegexReplace(const String& text, const String& expression, const String& replacement, bool ignoreCase) -> String
- Returns the text with regular expression matches replaced.
-
auto GetFPS() -> std::
int32_t - Returns the current frames per second.
- auto isAdmin() -> bool
- Returns whether the local player is a server administrator.