diff --git a/Sources/Jazz2.vcxproj b/Sources/Jazz2.vcxproj
index 060dc7e9..e7a9238c 100644
--- a/Sources/Jazz2.vcxproj
+++ b/Sources/Jazz2.vcxproj
@@ -321,6 +321,7 @@
+
@@ -520,7 +521,6 @@
-
@@ -856,6 +856,7 @@
+
@@ -908,7 +909,6 @@
-
diff --git a/Sources/Jazz2.vcxproj.filters b/Sources/Jazz2.vcxproj.filters
index 5d3cedd0..4ae9d4be 100644
--- a/Sources/Jazz2.vcxproj.filters
+++ b/Sources/Jazz2.vcxproj.filters
@@ -948,9 +948,6 @@
Header Files\Jazz2\UI\Menu
-
- Header Files\Jazz2\UI
-
Header Files\Jazz2\UI\Menu
@@ -1569,6 +1566,9 @@
Header Files\Jazz2\Rendering
+
+ Header Files\Jazz2\Rendering
+
@@ -2114,9 +2114,6 @@
Source Files\Jazz2\UI\Menu
-
- Source Files\Jazz2\UI
-
Source Files\Jazz2\UI\Menu
@@ -2573,6 +2570,9 @@
Source Files\Jazz2\Rendering
+
+ Source Files\Jazz2\Rendering
+
diff --git a/Sources/Jazz2/Actors/Collectibles/CollectibleBase.cpp b/Sources/Jazz2/Actors/Collectibles/CollectibleBase.cpp
index 9dc0c38d..4bd14368 100644
--- a/Sources/Jazz2/Actors/Collectibles/CollectibleBase.cpp
+++ b/Sources/Jazz2/Actors/Collectibles/CollectibleBase.cpp
@@ -44,7 +44,7 @@ namespace Jazz2::Actors::Collectibles
if ((details.State & ActorState::Illuminated) == ActorState::Illuminated) {
_illuminateLights.reserve(IlluminateLightCount);
- for (int i = 0; i < IlluminateLightCount; i++) {
+ for (std::int32_t i = 0; i < IlluminateLightCount; i++) {
auto& light = _illuminateLights.emplace_back();
light.Intensity = Random().NextFloat(0.22f, 0.42f);
light.Distance = Random().NextFloat(4.0f, 36.0f);
diff --git a/Sources/Jazz2/Compatibility/AnimSetMapping.h b/Sources/Jazz2/Compatibility/AnimSetMapping.h
index b4c8ef1d..74fa7f4d 100644
--- a/Sources/Jazz2/Compatibility/AnimSetMapping.h
+++ b/Sources/Jazz2/Compatibility/AnimSetMapping.h
@@ -20,11 +20,13 @@ namespace Jazz2::Compatibility
Menu
};
+ /** @brief Maps indices from original data file to organized entries */
class AnimSetMapping
{
public:
static constexpr char Discard[] = ":discard";
+ /** @brief Mapped entry */
struct Entry {
String Category;
String Name;
diff --git a/Sources/Jazz2/Compatibility/EventConverter.h b/Sources/Jazz2/Compatibility/EventConverter.h
index fa87025d..859b39c6 100644
--- a/Sources/Jazz2/Compatibility/EventConverter.h
+++ b/Sources/Jazz2/Compatibility/EventConverter.h
@@ -28,6 +28,7 @@ namespace Jazz2::Compatibility
constexpr std::int32_t JJ2ParamUInt = 2;
constexpr std::int32_t JJ2ParamInt = 3;
+ /** @brief Maps original events to extended event descriptions */
class EventConverter
{
public:
diff --git a/Sources/Jazz2/Compatibility/JJ2Anims.h b/Sources/Jazz2/Compatibility/JJ2Anims.h
index 60aa73f5..d6518bb2 100644
--- a/Sources/Jazz2/Compatibility/JJ2Anims.h
+++ b/Sources/Jazz2/Compatibility/JJ2Anims.h
@@ -17,7 +17,8 @@ using namespace nCine;
namespace Jazz2::Compatibility
{
- class JJ2Anims // .j2a
+ /** @brief Parses original `.j2a` animation files */
+ class JJ2Anims
{
public:
static constexpr std::uint16_t CacheVersion = 22;
@@ -29,6 +30,8 @@ namespace Jazz2::Compatibility
private:
static constexpr int32_t AddBorder = 2;
+#ifndef DOXYGEN_GENERATING_OUTPUT
+ // Doxygen 1.12.0 outputs also private structs/unions even if it shouldn't
struct AnimFrameSection {
std::int16_t SizeX, SizeY;
std::int16_t ColdspotX, ColdspotY;
@@ -64,6 +67,7 @@ namespace Jazz2::Compatibility
std::unique_ptr Data;
std::uint16_t Multiplier;
};
+#endif
JJ2Anims();
diff --git a/Sources/Jazz2/Compatibility/JJ2Block.h b/Sources/Jazz2/Compatibility/JJ2Block.h
index b38caa1a..4406523c 100644
--- a/Sources/Jazz2/Compatibility/JJ2Block.h
+++ b/Sources/Jazz2/Compatibility/JJ2Block.h
@@ -10,6 +10,7 @@ using namespace Death::IO;
namespace Jazz2::Compatibility
{
+ /** @brief Processes compressed or uncompressed blocks from original files */
class JJ2Block
{
public:
diff --git a/Sources/Jazz2/Compatibility/JJ2Data.h b/Sources/Jazz2/Compatibility/JJ2Data.h
index dc5d8043..2077dab9 100644
--- a/Sources/Jazz2/Compatibility/JJ2Data.h
+++ b/Sources/Jazz2/Compatibility/JJ2Data.h
@@ -14,9 +14,11 @@ using namespace Death::IO;
namespace Jazz2::Compatibility
{
- class JJ2Data // .j2d
+ /** @brief Parses original `.j2d` data files */
+ class JJ2Data
{
public:
+ /** @brief Item from a `.j2d` data file */
struct Item {
String Filename;
std::unique_ptr Blob;
@@ -26,7 +28,7 @@ namespace Jazz2::Compatibility
SmallVector- Items;
- JJ2Data() { }
+ JJ2Data() {}
bool Open(const StringView path, bool strictParser);
diff --git a/Sources/Jazz2/Compatibility/JJ2Episode.h b/Sources/Jazz2/Compatibility/JJ2Episode.h
index d3b7c211..3ccbbc32 100644
--- a/Sources/Jazz2/Compatibility/JJ2Episode.h
+++ b/Sources/Jazz2/Compatibility/JJ2Episode.h
@@ -13,7 +13,8 @@ using namespace Death::Containers;
namespace Jazz2::Compatibility
{
- class JJ2Episode // .j2e / .j2pe
+ /** @brief Parses original `.j2e`/`.j2pe` episode files */
+ class JJ2Episode
{
public:
std::int32_t Position;
diff --git a/Sources/Jazz2/Compatibility/JJ2Level.cpp b/Sources/Jazz2/Compatibility/JJ2Level.cpp
index 65e2039e..adfd88d1 100644
--- a/Sources/Jazz2/Compatibility/JJ2Level.cpp
+++ b/Sources/Jazz2/Compatibility/JJ2Level.cpp
@@ -436,11 +436,11 @@ namespace Jazz2::Compatibility
JJ2Level extraLayersFile;
if (extraLayersFile.Open(extraLayersPath, strictParser)) {
for (std::int32_t j = 0; j < 8 && (i + j) < layerCount; j++) {
- _layers.emplace_back(std::move(extraLayersFile._layers[j]));
+ _layers.push_back(std::move(extraLayersFile._layers[j]));
}
} else {
for (std::int32_t j = 0; j < 8 && (i + j) < layerCount; j++) {
- _layers.emplace_back(LayerSection{});
+ _layers.emplace_back();
}
}
}
diff --git a/Sources/Jazz2/Compatibility/JJ2Level.h b/Sources/Jazz2/Compatibility/JJ2Level.h
index 21254497..739eeedf 100644
--- a/Sources/Jazz2/Compatibility/JJ2Level.h
+++ b/Sources/Jazz2/Compatibility/JJ2Level.h
@@ -20,7 +20,8 @@ namespace Jazz2::Compatibility
{
class JJ2Episode;
- class JJ2Level // .j2l
+ /** @brief Parses original `.j2l` level files */
+ class JJ2Level
{
friend class JJ2Episode;
@@ -79,6 +80,8 @@ namespace Jazz2::Compatibility
SpeedMultipliers
};
+#ifndef DOXYGEN_GENERATING_OUTPUT
+ // Doxygen 1.12.0 outputs also private structs/unions even if it shouldn't
struct LayerSection {
std::uint32_t Flags;
std::uint8_t Type; // Ignored
@@ -132,6 +135,7 @@ namespace Jazz2::Compatibility
std::uint8_t FrameCount;
std::uint16_t Frames[64];
};
+#endif
JJ2Version _version;
diff --git a/Sources/Jazz2/Compatibility/JJ2Strings.cpp b/Sources/Jazz2/Compatibility/JJ2Strings.cpp
index 0a533348..ffaa6c82 100644
--- a/Sources/Jazz2/Compatibility/JJ2Strings.cpp
+++ b/Sources/Jazz2/Compatibility/JJ2Strings.cpp
@@ -73,7 +73,7 @@ namespace Jazz2::Compatibility
s->Read(levelName, 8);
levelName[8] = '\0';
- LevelEntry& levelEntry = LevelTexts.emplace_back(String(levelName));
+ LevelEntry& levelEntry = LevelTexts.emplace_back(levelName);
StringUtils::lowercaseInPlace(levelEntry.Name);
/*uint8_t unknown =*/ s->ReadValue();
diff --git a/Sources/Jazz2/Compatibility/JJ2Strings.h b/Sources/Jazz2/Compatibility/JJ2Strings.h
index e529bfcb..ea1bcf4d 100644
--- a/Sources/Jazz2/Compatibility/JJ2Strings.h
+++ b/Sources/Jazz2/Compatibility/JJ2Strings.h
@@ -11,9 +11,11 @@ using namespace Death::Containers;
namespace Jazz2::Compatibility
{
- class JJ2Strings // .j2s
+ /** @brief Parses original `.j2s` localization files */
+ class JJ2Strings
{
public:
+ /** @brief Texts for specific level */
struct LevelEntry
{
String Name;
diff --git a/Sources/Jazz2/Compatibility/JJ2Tileset.h b/Sources/Jazz2/Compatibility/JJ2Tileset.h
index b8270b10..c5885f86 100644
--- a/Sources/Jazz2/Compatibility/JJ2Tileset.h
+++ b/Sources/Jazz2/Compatibility/JJ2Tileset.h
@@ -13,7 +13,8 @@ using namespace Death::Containers;
namespace Jazz2::Compatibility
{
- class JJ2Tileset // .j2t
+ /** @brief Parses original `.j2t` tileset files */
+ class JJ2Tileset
{
public:
static constexpr std::int32_t BlockSize = 32;
@@ -29,6 +30,8 @@ namespace Jazz2::Compatibility
}
private:
+#ifndef DOXYGEN_GENERATING_OUTPUT
+ // Doxygen 1.12.0 outputs also private structs/unions even if it shouldn't
struct TilesetTileSection {
bool Opaque;
std::uint32_t ImageDataOffset;
@@ -39,6 +42,7 @@ namespace Jazz2::Compatibility
//std::uint8_t Mask[BlockSize * BlockSize];
std::uint8_t Mask[BlockSize * BlockSize / 8];
};
+#endif
static constexpr std::int32_t PaletteSize = 256;
diff --git a/Sources/Jazz2/ContentResolver.cpp b/Sources/Jazz2/ContentResolver.cpp
index 7dfb0145..397f9bb1 100644
--- a/Sources/Jazz2/ContentResolver.cpp
+++ b/Sources/Jazz2/ContentResolver.cpp
@@ -631,12 +631,12 @@ namespace Jazz2
auto it = _cachedSounds.find(assetPathNormalized);
if (it != _cachedSounds.end()) {
it->second->Flags |= GenericSoundResourceFlags::Referenced;
- sound.Buffers.emplace_back(it->second.get());
+ sound.Buffers.push_back(it->second.get());
} else {
auto s = OpenContentFile(fs::CombinePath("Animations"_s, assetPathNormalized));
auto res = _cachedSounds.emplace(assetPathNormalized, std::make_unique(std::move(s), assetPathNormalized));
res.first->second->Flags |= GenericSoundResourceFlags::Referenced;
- sound.Buffers.emplace_back(res.first->second.get());
+ sound.Buffers.push_back(res.first->second.get());
}
}
}
diff --git a/Sources/Jazz2/IResumable.h b/Sources/Jazz2/IResumable.h
index f7d04c78..afac94c1 100644
--- a/Sources/Jazz2/IResumable.h
+++ b/Sources/Jazz2/IResumable.h
@@ -8,7 +8,7 @@ using namespace Death::IO;
namespace Jazz2
{
- /** @brief Base interface of a resumable objects */
+ /** @brief Base interface of a resumable object */
class IResumable
{
public:
diff --git a/Sources/Jazz2/LevelHandler.cpp b/Sources/Jazz2/LevelHandler.cpp
index 32567911..e26d9ba8 100644
--- a/Sources/Jazz2/LevelHandler.cpp
+++ b/Sources/Jazz2/LevelHandler.cpp
@@ -771,7 +771,7 @@ namespace Jazz2
actor->CollisionProxyID = _collisions.CreateProxy(actor->AABB, actor.get());
}
- _actors.emplace_back(actor);
+ _actors.push_back(std::move(actor));
}
std::shared_ptr LevelHandler::PlaySfx(Actors::ActorBase* self, const StringView identifier, AudioBuffer* buffer, const Vector3f& pos, bool sourceRelative, float gain, float pitch)
@@ -1587,7 +1587,7 @@ namespace Jazz2
}
if (!found) {
- playerZones.emplace_back(cullingRect);
+ playerZones.push_back(std::move(cullingRect));
}
}
@@ -1742,7 +1742,7 @@ namespace Jazz2
void LevelHandler::AssignViewport(Actors::Player* player)
{
- _assignedViewports.emplace_back(std::make_unique(this, player));
+ _assignedViewports.push_back(std::make_unique(this, player));
#if defined(WITH_AUDIO)
for (auto& current : _playingSounds) {
diff --git a/Sources/Jazz2/LevelHandler.h b/Sources/Jazz2/LevelHandler.h
index f5a70e0b..7d086a13 100644
--- a/Sources/Jazz2/LevelHandler.h
+++ b/Sources/Jazz2/LevelHandler.h
@@ -12,8 +12,8 @@
#include "Tiles/ITileMapOwner.h"
#include "Tiles/TileMap.h"
#include "Collisions/DynamicTreeBroadPhase.h"
+#include "Rendering/UpscaleRenderPass.h"
#include "UI/ControlScheme.h"
-#include "UI/UpscaleRenderPass.h"
#include "UI/Menu/InGameMenu.h"
#include "../nCine/Graphics/Shader.h"
@@ -189,7 +189,7 @@ namespace Jazz2
Shader* _combineShader;
Shader* _combineWithWaterShader;
- UI::UpscaleRenderPassWithClipping _upscalePass;
+ Rendering::UpscaleRenderPassWithClipping _upscalePass;
std::unique_ptr _rootNode;
std::unique_ptr _noiseTexture;
diff --git a/Sources/Jazz2/LightEmitter.h b/Sources/Jazz2/LightEmitter.h
index adf7145f..f1ac475e 100644
--- a/Sources/Jazz2/LightEmitter.h
+++ b/Sources/Jazz2/LightEmitter.h
@@ -6,7 +6,7 @@ using namespace nCine;
namespace Jazz2
{
- /** @brief Light emitter */
+ /** @brief Allows objects to emit light */
struct LightEmitter
{
Vector2f Pos;
diff --git a/Sources/Jazz2/Multiplayer/ConnectionResult.h b/Sources/Jazz2/Multiplayer/ConnectionResult.h
index 45e5dc97..89accdf9 100644
--- a/Sources/Jazz2/Multiplayer/ConnectionResult.h
+++ b/Sources/Jazz2/Multiplayer/ConnectionResult.h
@@ -6,6 +6,7 @@
namespace Jazz2::Multiplayer
{
+ /** @brief Describes a connection result of @ref INetworkHandler::OnPeerConnected() */
struct ConnectionResult
{
Reason FailureReason;
diff --git a/Sources/Jazz2/Multiplayer/INetworkHandler.h b/Sources/Jazz2/Multiplayer/INetworkHandler.h
index 518bf7aa..d915e40b 100644
--- a/Sources/Jazz2/Multiplayer/INetworkHandler.h
+++ b/Sources/Jazz2/Multiplayer/INetworkHandler.h
@@ -13,6 +13,11 @@ using namespace Death::Containers;
namespace Jazz2::Multiplayer
{
+ /**
+ @brief Interface to handle network requests on a server
+
+ @experimental
+ */
class INetworkHandler
{
public:
diff --git a/Sources/Jazz2/Multiplayer/MultiLevelHandler.cpp b/Sources/Jazz2/Multiplayer/MultiLevelHandler.cpp
index ec339c17..24dc535b 100644
--- a/Sources/Jazz2/Multiplayer/MultiLevelHandler.cpp
+++ b/Sources/Jazz2/Multiplayer/MultiLevelHandler.cpp
@@ -1150,7 +1150,7 @@ namespace Jazz2::Multiplayer
// Cache all possible multiplayer spawn points (if it's not coop level)
_multiplayerSpawnPoints.clear();
_eventMap->ForEachEvent(EventType::LevelStartMultiplayer, [this](const Events::EventMap::EventTile& event, std::int32_t x, std::int32_t y) {
- _multiplayerSpawnPoints.emplace_back(MultiplayerSpawnPoint { Vector2f(x * Tiles::TileSet::DefaultTileSize, y * Tiles::TileSet::DefaultTileSize - 8), event.EventParams[0] });
+ _multiplayerSpawnPoints.emplace_back(Vector2f(x * Tiles::TileSet::DefaultTileSize, y * Tiles::TileSet::DefaultTileSize - 8), event.EventParams[0]);
return true;
});
} else {
@@ -2254,7 +2254,7 @@ namespace Jazz2::Multiplayer
std::int32_t splitIdx = (playerCount + 1) / 2;
SmallVector teamIds(playerCount);
for (std::int32_t i = 0; i < playerCount; i++) {
- teamIds.emplace_back(i);
+ teamIds.push_back(i);
}
Random().Shuffle(arrayView(teamIds));
diff --git a/Sources/Jazz2/Multiplayer/MultiLevelHandler.h b/Sources/Jazz2/Multiplayer/MultiLevelHandler.h
index eb272f4e..790de828 100644
--- a/Sources/Jazz2/Multiplayer/MultiLevelHandler.h
+++ b/Sources/Jazz2/Multiplayer/MultiLevelHandler.h
@@ -161,6 +161,9 @@ namespace Jazz2::Multiplayer
struct MultiplayerSpawnPoint {
Vector2f Pos;
std::uint8_t Team;
+
+ MultiplayerSpawnPoint(Vector2f pos, std::uint8_t team)
+ : Pos(pos), Team(team) {}
};
#endif
diff --git a/Sources/Jazz2/Multiplayer/MultiplayerGameMode.h b/Sources/Jazz2/Multiplayer/MultiplayerGameMode.h
index ffa74e4d..a518a053 100644
--- a/Sources/Jazz2/Multiplayer/MultiplayerGameMode.h
+++ b/Sources/Jazz2/Multiplayer/MultiplayerGameMode.h
@@ -4,6 +4,7 @@
namespace Jazz2::Multiplayer
{
+ /** @brief Multiplayer game mode */
enum class MultiplayerGameMode
{
Unknown = 0,
diff --git a/Sources/Jazz2/Multiplayer/NetworkManager.h b/Sources/Jazz2/Multiplayer/NetworkManager.h
index dd37cbb6..7ef2d65e 100644
--- a/Sources/Jazz2/Multiplayer/NetworkManager.h
+++ b/Sources/Jazz2/Multiplayer/NetworkManager.h
@@ -38,6 +38,11 @@ namespace Jazz2::Multiplayer
Connected
};
+ /**
+ @brief Allows to create network clients and servers
+
+ @experimental
+ */
class NetworkManager
{
friend class ServerDiscovery;
diff --git a/Sources/Jazz2/Multiplayer/Peer.h b/Sources/Jazz2/Multiplayer/Peer.h
index 4da28ccc..71230905 100644
--- a/Sources/Jazz2/Multiplayer/Peer.h
+++ b/Sources/Jazz2/Multiplayer/Peer.h
@@ -8,6 +8,7 @@ struct _ENetPeer;
namespace Jazz2::Multiplayer
{
+ /** @brief Remote peer */
struct Peer
{
Peer(std::nullptr_t = nullptr) : _enet(nullptr) {}
diff --git a/Sources/Jazz2/Multiplayer/Reason.h b/Sources/Jazz2/Multiplayer/Reason.h
index c70468b4..7c7eca60 100644
--- a/Sources/Jazz2/Multiplayer/Reason.h
+++ b/Sources/Jazz2/Multiplayer/Reason.h
@@ -6,6 +6,7 @@
namespace Jazz2::Multiplayer
{
+ /** @brief Client disconnect reason */
enum class Reason : std::uint32_t
{
Unknown,
diff --git a/Sources/Jazz2/Multiplayer/ServerDiscovery.h b/Sources/Jazz2/Multiplayer/ServerDiscovery.h
index c6bb6bf5..1bf39e53 100644
--- a/Sources/Jazz2/Multiplayer/ServerDiscovery.h
+++ b/Sources/Jazz2/Multiplayer/ServerDiscovery.h
@@ -28,6 +28,7 @@ using namespace nCine;
namespace Jazz2::Multiplayer
{
+ /** @brief Server description */
struct ServerDesc
{
ENetAddress Endpoint;
@@ -43,12 +44,18 @@ namespace Jazz2::Multiplayer
//bool IsLost;
};
+ /** @brief Interface to observe publicly-listed running servers */
class IServerObserver
{
public:
virtual void OnServerFound(ServerDesc&& desc) = 0;
};
+ /**
+ @brief Allows to monitor publicly-listed running servers
+
+ @experimental
+ */
class ServerDiscovery
{
public:
diff --git a/Sources/Jazz2/UI/UpscaleRenderPass.cpp b/Sources/Jazz2/Rendering/UpscaleRenderPass.cpp
similarity index 97%
rename from Sources/Jazz2/UI/UpscaleRenderPass.cpp
rename to Sources/Jazz2/Rendering/UpscaleRenderPass.cpp
index 81b52932..6f00dfd3 100644
--- a/Sources/Jazz2/UI/UpscaleRenderPass.cpp
+++ b/Sources/Jazz2/Rendering/UpscaleRenderPass.cpp
@@ -5,7 +5,7 @@
#include "../../nCine/Graphics/RenderQueue.h"
#include "../../nCine/Graphics/Viewport.h"
-namespace Jazz2::UI
+namespace Jazz2::Rendering
{
void UpscaleRenderPass::Initialize(std::int32_t width, std::int32_t height, std::int32_t targetWidth, std::int32_t targetHeight)
{
@@ -160,6 +160,11 @@ namespace Jazz2::UI
return true;
}
+ UpscaleRenderPass::AntialiasingSubpass::AntialiasingSubpass()
+ {
+ setVisitOrderState(SceneNode::VisitOrderState::Disabled);
+ }
+
void UpscaleRenderPass::AntialiasingSubpass::Register()
{
if (_view != nullptr) {
@@ -182,6 +187,11 @@ namespace Jazz2::UI
return true;
}
+ UpscaleRenderPassWithClipping::UpscaleRenderPassWithClipping()
+ : UpscaleRenderPass()
+ {
+ }
+
void UpscaleRenderPassWithClipping::Initialize(std::int32_t width, std::int32_t height, std::int32_t targetWidth, std::int32_t targetHeight)
{
if (_clippedView != nullptr) {
diff --git a/Sources/Jazz2/UI/UpscaleRenderPass.h b/Sources/Jazz2/Rendering/UpscaleRenderPass.h
similarity index 85%
rename from Sources/Jazz2/UI/UpscaleRenderPass.h
rename to Sources/Jazz2/Rendering/UpscaleRenderPass.h
index 68965c30..fa7acd79 100644
--- a/Sources/Jazz2/UI/UpscaleRenderPass.h
+++ b/Sources/Jazz2/Rendering/UpscaleRenderPass.h
@@ -9,8 +9,9 @@
using namespace nCine;
-namespace Jazz2::UI
+namespace Jazz2::Rendering
{
+ /** @brief Upscales input image usually to a native resolution */
class UpscaleRenderPass : public SceneNode
{
public:
@@ -39,15 +40,13 @@ namespace Jazz2::UI
}
protected:
+ /** @brief Optional antialiasing subpass */
class AntialiasingSubpass : public SceneNode
{
friend class UpscaleRenderPass;
public:
- AntialiasingSubpass()
- {
- setVisitOrderState(SceneNode::VisitOrderState::Disabled);
- }
+ AntialiasingSubpass();
void Register();
@@ -75,12 +74,11 @@ namespace Jazz2::UI
RenderCommand _renderCommand;
};
+ /** @brief Upscales input image usually to a native resolution, additionaly supports 3 independent layers (background layer, clipped main layer, overlay layer) */
class UpscaleRenderPassWithClipping : public UpscaleRenderPass
{
public:
- UpscaleRenderPassWithClipping() : UpscaleRenderPass()
- {
- }
+ UpscaleRenderPassWithClipping();
void Initialize(std::int32_t width, std::int32_t height, std::int32_t targetWidth, std::int32_t targetHeight) override;
void Register() override;
diff --git a/Sources/Jazz2/Resources.h b/Sources/Jazz2/Resources.h
index b2797759..d8db2b36 100644
--- a/Sources/Jazz2/Resources.h
+++ b/Sources/Jazz2/Resources.h
@@ -113,7 +113,7 @@ namespace Jazz2
GraphicResource* FindAnimation(AnimState state) noexcept;
};
- /** @brief Episode */
+ /** @brief Describes (singleplayer) episode */
struct Episode
{
String Name;
diff --git a/Sources/Jazz2/Scripting/LevelScriptLoader.h b/Sources/Jazz2/Scripting/LevelScriptLoader.h
index 1e7de209..e17858f4 100644
--- a/Sources/Jazz2/Scripting/LevelScriptLoader.h
+++ b/Sources/Jazz2/Scripting/LevelScriptLoader.h
@@ -26,6 +26,11 @@ namespace Jazz2::Scripting
GameModeHUD
};
+ /**
+ @brief Binds an **AngelScript** script file to @ref LevelHandler and executes the script
+
+ @experimental
+ */
class LevelScriptLoader : public ScriptLoader
{
friend class jjPLAYER;
diff --git a/Sources/Jazz2/Scripting/RegisterArray.h b/Sources/Jazz2/Scripting/RegisterArray.h
index fc2ea48a..371dfae6 100644
--- a/Sources/Jazz2/Scripting/RegisterArray.h
+++ b/Sources/Jazz2/Scripting/RegisterArray.h
@@ -1,6 +1,6 @@
#pragma once
-#if defined(WITH_ANGELSCRIPT)
+#if defined(WITH_ANGELSCRIPT) || defined(DOXYGEN_GENERATING_OUTPUT)
#include
diff --git a/Sources/Jazz2/Scripting/RegisterDictionary.h b/Sources/Jazz2/Scripting/RegisterDictionary.h
index a7d345d4..187a528b 100644
--- a/Sources/Jazz2/Scripting/RegisterDictionary.h
+++ b/Sources/Jazz2/Scripting/RegisterDictionary.h
@@ -1,6 +1,6 @@
#pragma once
-#if defined(WITH_ANGELSCRIPT)
+#if defined(WITH_ANGELSCRIPT) || defined(DOXYGEN_GENERATING_OUTPUT)
#include "../../nCine/Base/HashMap.h"
diff --git a/Sources/Jazz2/Scripting/RegisterImGuiBindings.h b/Sources/Jazz2/Scripting/RegisterImGuiBindings.h
index c70dc7d6..4fb3f983 100644
--- a/Sources/Jazz2/Scripting/RegisterImGuiBindings.h
+++ b/Sources/Jazz2/Scripting/RegisterImGuiBindings.h
@@ -1,6 +1,6 @@
#pragma once
-#if defined(WITH_ANGELSCRIPT) && defined(WITH_IMGUI)
+#if (defined(WITH_ANGELSCRIPT) && defined(WITH_IMGUI)) || defined(DOXYGEN_GENERATING_OUTPUT)
#include
diff --git a/Sources/Jazz2/Scripting/RegisterMath.h b/Sources/Jazz2/Scripting/RegisterMath.h
index c2205b30..d18976bf 100644
--- a/Sources/Jazz2/Scripting/RegisterMath.h
+++ b/Sources/Jazz2/Scripting/RegisterMath.h
@@ -1,6 +1,6 @@
#pragma once
-#if defined(WITH_ANGELSCRIPT)
+#if defined(WITH_ANGELSCRIPT) || defined(DOXYGEN_GENERATING_OUTPUT)
#include
diff --git a/Sources/Jazz2/Scripting/RegisterRef.h b/Sources/Jazz2/Scripting/RegisterRef.h
index ecb1e93b..a977c226 100644
--- a/Sources/Jazz2/Scripting/RegisterRef.h
+++ b/Sources/Jazz2/Scripting/RegisterRef.h
@@ -1,6 +1,6 @@
#pragma once
-#if defined(WITH_ANGELSCRIPT)
+#if defined(WITH_ANGELSCRIPT) || defined(DOXYGEN_GENERATING_OUTPUT)
#include
diff --git a/Sources/Jazz2/Scripting/RegisterString.h b/Sources/Jazz2/Scripting/RegisterString.h
index f0f716e9..9ce4e579 100644
--- a/Sources/Jazz2/Scripting/RegisterString.h
+++ b/Sources/Jazz2/Scripting/RegisterString.h
@@ -1,6 +1,6 @@
#pragma once
-#if defined(WITH_ANGELSCRIPT)
+#if defined(WITH_ANGELSCRIPT) || defined(DOXYGEN_GENERATING_OUTPUT)
#include
diff --git a/Sources/Jazz2/Scripting/ScriptLoader.h b/Sources/Jazz2/Scripting/ScriptLoader.h
index 9a2d725f..873b9adc 100644
--- a/Sources/Jazz2/Scripting/ScriptLoader.h
+++ b/Sources/Jazz2/Scripting/ScriptLoader.h
@@ -19,13 +19,23 @@ namespace Jazz2::Scripting
{
class CScriptArray;
+ /** @brief Script context type */
enum class ScriptContextType {
+ /** @brief Unknown/unsupported script part */
Unknown,
+ /** @brief Already included script part */
AlreadyIncluded,
+ /** @brief Legacy (JJ2+ compatible) script part */
Legacy,
+ /** @brief Standard (Jazz² Resurrection compatible) script part */
Standard
};
+ /**
+ @brief Generic **AngelScript** script loader with @cpp #include @ce and @cpp #pragma @ce support
+
+ @experimental
+ */
class ScriptLoader
{
public:
diff --git a/Sources/Jazz2/UI/Alignment.h b/Sources/Jazz2/UI/Alignment.h
index 065a6851..d98fa034 100644
--- a/Sources/Jazz2/UI/Alignment.h
+++ b/Sources/Jazz2/UI/Alignment.h
@@ -4,6 +4,7 @@
namespace Jazz2::UI
{
+ /** @brief Alignment, supports a bitwise combination of its member values */
enum class Alignment
{
Center = 0x00,
diff --git a/Sources/Jazz2/UI/Cinematics.h b/Sources/Jazz2/UI/Cinematics.h
index a78eca7f..fae0f7c9 100644
--- a/Sources/Jazz2/UI/Cinematics.h
+++ b/Sources/Jazz2/UI/Cinematics.h
@@ -2,8 +2,8 @@
#include "../IStateHandler.h"
#include "../IRootController.h"
-#include "UpscaleRenderPass.h"
#include "../ContentResolver.h"
+#include "../Rendering/UpscaleRenderPass.h"
#include "../../nCine/Base/BitArray.h"
#include "../../nCine/Graphics/Camera.h"
@@ -80,7 +80,7 @@ namespace Jazz2::UI
#endif
IRootController* _root;
- UI::UpscaleRenderPass _upscalePass;
+ Rendering::UpscaleRenderPass _upscalePass;
std::unique_ptr _canvas;
#if defined(WITH_AUDIO)
std::unique_ptr _music;
diff --git a/Sources/Jazz2/UI/ControlScheme.cpp b/Sources/Jazz2/UI/ControlScheme.cpp
index 6f3d68b3..dc4bc587 100644
--- a/Sources/Jazz2/UI/ControlScheme.cpp
+++ b/Sources/Jazz2/UI/ControlScheme.cpp
@@ -17,71 +17,71 @@ namespace Jazz2::UI
// Set default mappings for 1st player
auto first = GetMappings(0);
- first[(std::int32_t)PlayerActions::Left].Targets.emplace_back(CreateTarget(Keys::Left));
- first[(std::int32_t)PlayerActions::Left].Targets.emplace_back(CreateTarget(0, ButtonName::Left));
- first[(std::int32_t)PlayerActions::Left].Targets.emplace_back(CreateTarget(0, AxisName::LeftX, true));
- first[(std::int32_t)PlayerActions::Right].Targets.emplace_back(CreateTarget(Keys::Right));
- first[(std::int32_t)PlayerActions::Right].Targets.emplace_back(CreateTarget(0, ButtonName::Right));
- first[(std::int32_t)PlayerActions::Right].Targets.emplace_back(CreateTarget(0, AxisName::LeftX));
- first[(std::int32_t)PlayerActions::Up].Targets.emplace_back(CreateTarget(Keys::Up));
- first[(std::int32_t)PlayerActions::Up].Targets.emplace_back(CreateTarget(0, ButtonName::Up));
- first[(std::int32_t)PlayerActions::Up].Targets.emplace_back(CreateTarget(0, AxisName::LeftY, true));
- first[(std::int32_t)PlayerActions::Down].Targets.emplace_back(CreateTarget(Keys::Down));
- first[(std::int32_t)PlayerActions::Down].Targets.emplace_back(CreateTarget(0, ButtonName::Down));
- first[(std::int32_t)PlayerActions::Down].Targets.emplace_back(CreateTarget(0, AxisName::LeftY));
+ first[(std::int32_t)PlayerActions::Left].Targets.push_back(CreateTarget(Keys::Left));
+ first[(std::int32_t)PlayerActions::Left].Targets.push_back(CreateTarget(0, ButtonName::Left));
+ first[(std::int32_t)PlayerActions::Left].Targets.push_back(CreateTarget(0, AxisName::LeftX, true));
+ first[(std::int32_t)PlayerActions::Right].Targets.push_back(CreateTarget(Keys::Right));
+ first[(std::int32_t)PlayerActions::Right].Targets.push_back(CreateTarget(0, ButtonName::Right));
+ first[(std::int32_t)PlayerActions::Right].Targets.push_back(CreateTarget(0, AxisName::LeftX));
+ first[(std::int32_t)PlayerActions::Up].Targets.push_back(CreateTarget(Keys::Up));
+ first[(std::int32_t)PlayerActions::Up].Targets.push_back(CreateTarget(0, ButtonName::Up));
+ first[(std::int32_t)PlayerActions::Up].Targets.push_back(CreateTarget(0, AxisName::LeftY, true));
+ first[(std::int32_t)PlayerActions::Down].Targets.push_back(CreateTarget(Keys::Down));
+ first[(std::int32_t)PlayerActions::Down].Targets.push_back(CreateTarget(0, ButtonName::Down));
+ first[(std::int32_t)PlayerActions::Down].Targets.push_back(CreateTarget(0, AxisName::LeftY));
- first[(std::int32_t)PlayerActions::Fire].Targets.emplace_back(CreateTarget(Keys::Space));
- first[(std::int32_t)PlayerActions::Fire].Targets.emplace_back(CreateTarget(0, ButtonName::X));
- first[(std::int32_t)PlayerActions::Fire].Targets.emplace_back(CreateTarget(0, AxisName::RightTrigger));
- first[(std::int32_t)PlayerActions::Jump].Targets.emplace_back(CreateTarget(Keys::V));
- first[(std::int32_t)PlayerActions::Jump].Targets.emplace_back(CreateTarget(0, ButtonName::A));
- first[(std::int32_t)PlayerActions::Run].Targets.emplace_back(CreateTarget(Keys::C));
- first[(std::int32_t)PlayerActions::Run].Targets.emplace_back(CreateTarget(0, ButtonName::B));
- first[(std::int32_t)PlayerActions::Run].Targets.emplace_back(CreateTarget(0, AxisName::LeftTrigger));
- first[(std::int32_t)PlayerActions::ChangeWeapon].Targets.emplace_back(CreateTarget(Keys::X));
- first[(std::int32_t)PlayerActions::ChangeWeapon].Targets.emplace_back(CreateTarget(0, ButtonName::Y));
- first[(std::int32_t)PlayerActions::Menu].Targets.emplace_back(CreateTarget(Keys::Escape));
- first[(std::int32_t)PlayerActions::Menu].Targets.emplace_back(CreateTarget(0, ButtonName::Start));
- first[(std::int32_t)PlayerActions::Console].Targets.emplace_back(CreateTarget(Keys::Backquote));
+ first[(std::int32_t)PlayerActions::Fire].Targets.push_back(CreateTarget(Keys::Space));
+ first[(std::int32_t)PlayerActions::Fire].Targets.push_back(CreateTarget(0, ButtonName::X));
+ first[(std::int32_t)PlayerActions::Fire].Targets.push_back(CreateTarget(0, AxisName::RightTrigger));
+ first[(std::int32_t)PlayerActions::Jump].Targets.push_back(CreateTarget(Keys::V));
+ first[(std::int32_t)PlayerActions::Jump].Targets.push_back(CreateTarget(0, ButtonName::A));
+ first[(std::int32_t)PlayerActions::Run].Targets.push_back(CreateTarget(Keys::C));
+ first[(std::int32_t)PlayerActions::Run].Targets.push_back(CreateTarget(0, ButtonName::B));
+ first[(std::int32_t)PlayerActions::Run].Targets.push_back(CreateTarget(0, AxisName::LeftTrigger));
+ first[(std::int32_t)PlayerActions::ChangeWeapon].Targets.push_back(CreateTarget(Keys::X));
+ first[(std::int32_t)PlayerActions::ChangeWeapon].Targets.push_back(CreateTarget(0, ButtonName::Y));
+ first[(std::int32_t)PlayerActions::Menu].Targets.push_back(CreateTarget(Keys::Escape));
+ first[(std::int32_t)PlayerActions::Menu].Targets.push_back(CreateTarget(0, ButtonName::Start));
+ first[(std::int32_t)PlayerActions::Console].Targets.push_back(CreateTarget(Keys::Backquote));
- first[(std::int32_t)PlayerActions::SwitchToBlaster].Targets.emplace_back(CreateTarget(Keys::D1));
- first[(std::int32_t)PlayerActions::SwitchToBouncer].Targets.emplace_back(CreateTarget(Keys::D2));
- first[(std::int32_t)PlayerActions::SwitchToFreezer].Targets.emplace_back(CreateTarget(Keys::D3));
- first[(std::int32_t)PlayerActions::SwitchToSeeker].Targets.emplace_back(CreateTarget(Keys::D4));
- first[(std::int32_t)PlayerActions::SwitchToRF].Targets.emplace_back(CreateTarget(Keys::D5));
- first[(std::int32_t)PlayerActions::SwitchToToaster].Targets.emplace_back(CreateTarget(Keys::D6));
- first[(std::int32_t)PlayerActions::SwitchToTNT].Targets.emplace_back(CreateTarget(Keys::D7));
- first[(std::int32_t)PlayerActions::SwitchToPepper].Targets.emplace_back(CreateTarget(Keys::D8));
- first[(std::int32_t)PlayerActions::SwitchToElectro].Targets.emplace_back(CreateTarget(Keys::D9));
- first[(std::int32_t)PlayerActions::SwitchToThunderbolt].Targets.emplace_back(CreateTarget(Keys::D0));
+ first[(std::int32_t)PlayerActions::SwitchToBlaster].Targets.push_back(CreateTarget(Keys::D1));
+ first[(std::int32_t)PlayerActions::SwitchToBouncer].Targets.push_back(CreateTarget(Keys::D2));
+ first[(std::int32_t)PlayerActions::SwitchToFreezer].Targets.push_back(CreateTarget(Keys::D3));
+ first[(std::int32_t)PlayerActions::SwitchToSeeker].Targets.push_back(CreateTarget(Keys::D4));
+ first[(std::int32_t)PlayerActions::SwitchToRF].Targets.push_back(CreateTarget(Keys::D5));
+ first[(std::int32_t)PlayerActions::SwitchToToaster].Targets.push_back(CreateTarget(Keys::D6));
+ first[(std::int32_t)PlayerActions::SwitchToTNT].Targets.push_back(CreateTarget(Keys::D7));
+ first[(std::int32_t)PlayerActions::SwitchToPepper].Targets.push_back(CreateTarget(Keys::D8));
+ first[(std::int32_t)PlayerActions::SwitchToElectro].Targets.push_back(CreateTarget(Keys::D9));
+ first[(std::int32_t)PlayerActions::SwitchToThunderbolt].Targets.push_back(CreateTarget(Keys::D0));
// Set default mappings for 2nd player
if (MaxSupportedPlayers >= 2) {
auto second = GetMappings(1);
- second[(std::int32_t)PlayerActions::Left].Targets.emplace_back(CreateTarget(Keys::A));
- second[(std::int32_t)PlayerActions::Left].Targets.emplace_back(CreateTarget(1, ButtonName::Left));
- second[(std::int32_t)PlayerActions::Left].Targets.emplace_back(CreateTarget(1, AxisName::LeftX, true));
- second[(std::int32_t)PlayerActions::Right].Targets.emplace_back(CreateTarget(Keys::D));
- second[(std::int32_t)PlayerActions::Right].Targets.emplace_back(CreateTarget(1, ButtonName::Right));
- second[(std::int32_t)PlayerActions::Right].Targets.emplace_back(CreateTarget(1, AxisName::LeftX));
- second[(std::int32_t)PlayerActions::Up].Targets.emplace_back(CreateTarget(Keys::W));
- second[(std::int32_t)PlayerActions::Up].Targets.emplace_back(CreateTarget(1, ButtonName::Up));
- second[(std::int32_t)PlayerActions::Up].Targets.emplace_back(CreateTarget(1, AxisName::LeftY, true));
- second[(std::int32_t)PlayerActions::Down].Targets.emplace_back(CreateTarget(Keys::S));
- second[(std::int32_t)PlayerActions::Down].Targets.emplace_back(CreateTarget(1, ButtonName::Down));
- second[(std::int32_t)PlayerActions::Down].Targets.emplace_back(CreateTarget(1, AxisName::LeftY));
+ second[(std::int32_t)PlayerActions::Left].Targets.push_back(CreateTarget(Keys::A));
+ second[(std::int32_t)PlayerActions::Left].Targets.push_back(CreateTarget(1, ButtonName::Left));
+ second[(std::int32_t)PlayerActions::Left].Targets.push_back(CreateTarget(1, AxisName::LeftX, true));
+ second[(std::int32_t)PlayerActions::Right].Targets.push_back(CreateTarget(Keys::D));
+ second[(std::int32_t)PlayerActions::Right].Targets.push_back(CreateTarget(1, ButtonName::Right));
+ second[(std::int32_t)PlayerActions::Right].Targets.push_back(CreateTarget(1, AxisName::LeftX));
+ second[(std::int32_t)PlayerActions::Up].Targets.push_back(CreateTarget(Keys::W));
+ second[(std::int32_t)PlayerActions::Up].Targets.push_back(CreateTarget(1, ButtonName::Up));
+ second[(std::int32_t)PlayerActions::Up].Targets.push_back(CreateTarget(1, AxisName::LeftY, true));
+ second[(std::int32_t)PlayerActions::Down].Targets.push_back(CreateTarget(Keys::S));
+ second[(std::int32_t)PlayerActions::Down].Targets.push_back(CreateTarget(1, ButtonName::Down));
+ second[(std::int32_t)PlayerActions::Down].Targets.push_back(CreateTarget(1, AxisName::LeftY));
- second[(std::int32_t)PlayerActions::Fire].Targets.emplace_back(CreateTarget(Keys::R));
- second[(std::int32_t)PlayerActions::Fire].Targets.emplace_back(CreateTarget(1, ButtonName::X));
- second[(std::int32_t)PlayerActions::Fire].Targets.emplace_back(CreateTarget(1, AxisName::RightTrigger));
- second[(std::int32_t)PlayerActions::Jump].Targets.emplace_back(CreateTarget(Keys::F));
- second[(std::int32_t)PlayerActions::Jump].Targets.emplace_back(CreateTarget(1, ButtonName::A));
- second[(std::int32_t)PlayerActions::Run].Targets.emplace_back(CreateTarget(Keys::G));
- second[(std::int32_t)PlayerActions::Run].Targets.emplace_back(CreateTarget(1, ButtonName::B));
- second[(std::int32_t)PlayerActions::Run].Targets.emplace_back(CreateTarget(1, AxisName::LeftTrigger));
- second[(std::int32_t)PlayerActions::ChangeWeapon].Targets.emplace_back(CreateTarget(Keys::T));
- second[(std::int32_t)PlayerActions::ChangeWeapon].Targets.emplace_back(CreateTarget(1, ButtonName::Y));
- second[(std::int32_t)PlayerActions::Menu].Targets.emplace_back(CreateTarget(1, ButtonName::Start));
+ second[(std::int32_t)PlayerActions::Fire].Targets.push_back(CreateTarget(Keys::R));
+ second[(std::int32_t)PlayerActions::Fire].Targets.push_back(CreateTarget(1, ButtonName::X));
+ second[(std::int32_t)PlayerActions::Fire].Targets.push_back(CreateTarget(1, AxisName::RightTrigger));
+ second[(std::int32_t)PlayerActions::Jump].Targets.push_back(CreateTarget(Keys::F));
+ second[(std::int32_t)PlayerActions::Jump].Targets.push_back(CreateTarget(1, ButtonName::A));
+ second[(std::int32_t)PlayerActions::Run].Targets.push_back(CreateTarget(Keys::G));
+ second[(std::int32_t)PlayerActions::Run].Targets.push_back(CreateTarget(1, ButtonName::B));
+ second[(std::int32_t)PlayerActions::Run].Targets.push_back(CreateTarget(1, AxisName::LeftTrigger));
+ second[(std::int32_t)PlayerActions::ChangeWeapon].Targets.push_back(CreateTarget(Keys::T));
+ second[(std::int32_t)PlayerActions::ChangeWeapon].Targets.push_back(CreateTarget(1, ButtonName::Y));
+ second[(std::int32_t)PlayerActions::Menu].Targets.push_back(CreateTarget(1, ButtonName::Start));
}
}
diff --git a/Sources/Jazz2/UI/ControlScheme.h b/Sources/Jazz2/UI/ControlScheme.h
index a14b67b5..96deb19a 100644
--- a/Sources/Jazz2/UI/ControlScheme.h
+++ b/Sources/Jazz2/UI/ControlScheme.h
@@ -18,6 +18,7 @@ namespace Jazz2::UI
class RemapControlsSection;
}
+ /** @brief Navigation flags for @ref ControlScheme::FetchNavigation(), supports a bitwise combination of its member values */
enum class NavigationFlags
{
None = 0,
@@ -63,9 +64,12 @@ namespace Jazz2::UI
static constexpr std::int32_t MaxConnectedGamepads = 6;
#endif
+ /** @brief Resets all bindings to default */
static void Reset();
+ /** @brief Fetches processed standard input for specified player according to the current bindings */
static ProcessedInput FetchProcessedInput(std::int32_t playerIndex, const BitArray& pressedKeys, const ArrayView joyStates, bool analogAsButtons = true);
+ /** @brief Fetches navigation input according to the current bindings */
static std::uint32_t FetchNativation(const BitArray& pressedKeys, const ArrayView joyStates, NavigationFlags flags = NavigationFlags::AllowAll);
static ArrayView GetAllMappings();
diff --git a/Sources/Jazz2/UI/InGameConsole.h b/Sources/Jazz2/UI/InGameConsole.h
index 455b48d5..ee859795 100644
--- a/Sources/Jazz2/UI/InGameConsole.h
+++ b/Sources/Jazz2/UI/InGameConsole.h
@@ -8,6 +8,7 @@
namespace Jazz2::UI
{
+ /** @brief Message importance level */
enum class MessageLevel
{
Unknown,
diff --git a/Sources/Jazz2/UI/LoadingHandler.h b/Sources/Jazz2/UI/LoadingHandler.h
index b5a3bf64..0f78df8c 100644
--- a/Sources/Jazz2/UI/LoadingHandler.h
+++ b/Sources/Jazz2/UI/LoadingHandler.h
@@ -3,8 +3,8 @@
#include "../IStateHandler.h"
#include "../IRootController.h"
#include "Canvas.h"
-#include "UpscaleRenderPass.h"
#include "../ContentResolver.h"
+#include "../Rendering/UpscaleRenderPass.h"
namespace Jazz2::UI
{
@@ -41,7 +41,7 @@ namespace Jazz2::UI
};
#endif
- UI::UpscaleRenderPass _upscalePass;
+ Rendering::UpscaleRenderPass _upscalePass;
std::unique_ptr _canvasBackground;
Metadata* _metadata;
Function _callback;
diff --git a/Sources/Jazz2/UI/Menu/BeginSection.cpp b/Sources/Jazz2/UI/Menu/BeginSection.cpp
index 23ee4b49..2885c1c6 100644
--- a/Sources/Jazz2/UI/Menu/BeginSection.cpp
+++ b/Sources/Jazz2/UI/Menu/BeginSection.cpp
@@ -56,49 +56,49 @@ namespace Jazz2::UI::Menu
#if defined(SHAREWARE_DEMO_ONLY)
if (PreferencesCache::UnlockedEpisodes != UnlockableEpisodes::None) {
// TRANSLATORS: Menu item in main menu
- _items.emplace_back(ItemData { Item::PlayEpisodes, _("Play Story") });
+ _items.emplace_back(Item::PlayEpisodes, _("Play Story"));
} else {
// TRANSLATORS: Menu item in main menu (Emscripten only)
- _items.emplace_back(ItemData { Item::PlayEpisodes, _("Play Shareware Demo") });
+ _items.emplace_back(Item::PlayEpisodes, _("Play Shareware Demo"));
}
# if defined(DEATH_TARGET_EMSCRIPTEN)
// TRANSLATORS: Menu item in main menu (Emscripten only)
- _items.emplace_back(ItemData { Item::Import, _("Import Episodes") });
+ _items.emplace_back(Item::Import, _("Import Episodes"));
# endif
#else
if (_isPlayable && root->HasResumableState()) {
// TRANSLATORS: Menu item in main menu
- _items.emplace_back(ItemData { Item::Continue, _("Continue") });
+ _items.emplace_back(Item::Continue, _("Continue"));
}
// TRANSLATORS: Menu item in main menu
- _items.emplace_back(ItemData { Item::PlayEpisodes, _("Play Story") });
+ _items.emplace_back(Item::PlayEpisodes, _("Play Story"));
if (_isPlayable) {
# if defined(WITH_MULTIPLAYER)
// TRANSLATORS: Menu item in main menu
- _items.emplace_back(ItemData { Item::PlayCustomLevels, _("Play Custom Game") });
+ _items.emplace_back(Item::PlayCustomLevels, _("Play Custom Game"));
# else
// TRANSLATORS: Menu item in main menu
- _items.emplace_back(ItemData { Item::PlayCustomLevels, _("Play Custom Levels") });
+ _items.emplace_back(Item::PlayCustomLevels, _("Play Custom Levels"));
# endif
}
#endif
// TRANSLATORS: Menu item in main menu
- _items.emplace_back(ItemData { Item::Highscores, _("Highscores") });
+ _items.emplace_back(Item::Highscores, _("Highscores"));
// TRANSLATORS: Menu item in main menu
- _items.emplace_back(ItemData { Item::Options, _("Options") });
+ _items.emplace_back(Item::Options, _("Options"));
// TRANSLATORS: Menu item in main menu
- _items.emplace_back(ItemData { Item::About, _("About") });
+ _items.emplace_back(Item::About, _("About"));
#if !defined(DEATH_TARGET_IOS) && !defined(DEATH_TARGET_SWITCH)
# if defined(DEATH_TARGET_EMSCRIPTEN)
// Show quit button only in PWA/standalone environment
if (PreferencesCache::IsStandalone)
# endif
// TRANSLATORS: Menu item in main menu
- _items.emplace_back(ItemData { Item::Quit, _("Quit") });
+ _items.emplace_back(Item::Quit, _("Quit"));
#endif
#if !defined(DEATH_TARGET_EMSCRIPTEN)
diff --git a/Sources/Jazz2/UI/Menu/BeginSection.h b/Sources/Jazz2/UI/Menu/BeginSection.h
index 614502ad..d95ee9a4 100644
--- a/Sources/Jazz2/UI/Menu/BeginSection.h
+++ b/Sources/Jazz2/UI/Menu/BeginSection.h
@@ -38,7 +38,8 @@ namespace Jazz2::UI::Menu
String Name;
float Y;
- ItemData(Item type, StringView name) : Type(type), Name(name), Y(0.0f) { }
+ ItemData(Item type, StringView name)
+ : Type(type), Name(name), Y(0.0f) {}
};
SmallVector _items;
diff --git a/Sources/Jazz2/UI/Menu/FirstRunSection.cpp b/Sources/Jazz2/UI/Menu/FirstRunSection.cpp
index af5bf5a8..434d14cb 100644
--- a/Sources/Jazz2/UI/Menu/FirstRunSection.cpp
+++ b/Sources/Jazz2/UI/Menu/FirstRunSection.cpp
@@ -1,5 +1,4 @@
#include "FirstRunSection.h"
-#include "InGameMenu.h"
#include "MenuResources.h"
#include "../../PreferencesCache.h"
diff --git a/Sources/Jazz2/UI/Menu/HighscoresSection.cpp b/Sources/Jazz2/UI/Menu/HighscoresSection.cpp
index be3a232c..43caeb93 100644
--- a/Sources/Jazz2/UI/Menu/HighscoresSection.cpp
+++ b/Sources/Jazz2/UI/Menu/HighscoresSection.cpp
@@ -450,44 +450,44 @@ namespace Jazz2::UI::Menu
{
auto& baseGame = _series[(std::int32_t)SeriesName::BaseGame];
if (baseGame.Items.empty()) {
- baseGame.Items.emplace_back(HighscoreItem { "Dan"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Jazz, GameDifficulty::Normal, 16, 600000, { 400, 40, 10, 0 } });
- baseGame.Items.emplace_back(HighscoreItem { "Tina"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Jazz, GameDifficulty::Normal, 12, 500000, { 300, 35, 8, 0 } });
- baseGame.Items.emplace_back(HighscoreItem { "Paul"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Spaz, GameDifficulty::Normal, 10, 400000, { 260, 30, 8, 0 } });
- baseGame.Items.emplace_back(HighscoreItem { "Monica"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Lori, GameDifficulty::Normal, 4, 300000, { 200, 25, 6, 0 } });
- baseGame.Items.emplace_back(HighscoreItem { "Eve"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Jazz, GameDifficulty::Normal, 1, 200000, { 120, 20, 5, 0 } });
- baseGame.Items.emplace_back(HighscoreItem { "William"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Spaz, GameDifficulty::Normal, 1, 100000, { 80, 16, 5, 0 } });
- baseGame.Items.emplace_back(HighscoreItem { "Scarlett"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Lori, GameDifficulty::Normal, 1, 50000, { 40, 10, 4, 0 } });
- baseGame.Items.emplace_back(HighscoreItem { "Thomas"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Lori, GameDifficulty::Normal, 1, 40000, { 20, 8, 4, 0 } });
- baseGame.Items.emplace_back(HighscoreItem { "James"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Spaz, GameDifficulty::Normal, 1, 30000, { 12, 4, 2, 0 } });
- baseGame.Items.emplace_back(HighscoreItem { "Oliver"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Lori, GameDifficulty::Normal, 1, 14000, { 6, 2, 0, 0 } });
+ baseGame.Items.push_back(HighscoreItem { "Dan"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Jazz, GameDifficulty::Normal, 16, 600000, { 400, 40, 10, 0 } });
+ baseGame.Items.push_back(HighscoreItem { "Tina"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Jazz, GameDifficulty::Normal, 12, 500000, { 300, 35, 8, 0 } });
+ baseGame.Items.push_back(HighscoreItem { "Paul"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Spaz, GameDifficulty::Normal, 10, 400000, { 260, 30, 8, 0 } });
+ baseGame.Items.push_back(HighscoreItem { "Monica"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Lori, GameDifficulty::Normal, 4, 300000, { 200, 25, 6, 0 } });
+ baseGame.Items.push_back(HighscoreItem { "Eve"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Jazz, GameDifficulty::Normal, 1, 200000, { 120, 20, 5, 0 } });
+ baseGame.Items.push_back(HighscoreItem { "William"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Spaz, GameDifficulty::Normal, 1, 100000, { 80, 16, 5, 0 } });
+ baseGame.Items.push_back(HighscoreItem { "Scarlett"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Lori, GameDifficulty::Normal, 1, 50000, { 40, 10, 4, 0 } });
+ baseGame.Items.push_back(HighscoreItem { "Thomas"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Lori, GameDifficulty::Normal, 1, 40000, { 20, 8, 4, 0 } });
+ baseGame.Items.push_back(HighscoreItem { "James"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Spaz, GameDifficulty::Normal, 1, 30000, { 12, 4, 2, 0 } });
+ baseGame.Items.push_back(HighscoreItem { "Oliver"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Lori, GameDifficulty::Normal, 1, 14000, { 6, 2, 0, 0 } });
}
auto& sharewareDemo = _series[(std::int32_t)SeriesName::SharewareDemo];
if (sharewareDemo.Items.empty()) {
- sharewareDemo.Items.emplace_back(HighscoreItem { "Monica"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Spaz, GameDifficulty::Normal, 4, 50000, { 50, 1, 1, 0 } });
- sharewareDemo.Items.emplace_back(HighscoreItem { "Dan"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Jazz, GameDifficulty::Normal, 4, 45000, { 45, 1, 1, 0 } });
- sharewareDemo.Items.emplace_back(HighscoreItem { "Eve"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Spaz, GameDifficulty::Normal, 3, 40000, { 40, 1, 1, 0 } });
- sharewareDemo.Items.emplace_back(HighscoreItem { "Paul"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Jazz, GameDifficulty::Normal, 2, 35000, { 35, 1, 1, 0 } });
- sharewareDemo.Items.emplace_back(HighscoreItem { "Tina"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Spaz, GameDifficulty::Normal, 1, 30000, { 30, 1, 0, 0 } });
- sharewareDemo.Items.emplace_back(HighscoreItem { "Scarlett"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Spaz, GameDifficulty::Normal, 1, 25000, { 25, 1, 0, 0 } });
- sharewareDemo.Items.emplace_back(HighscoreItem { "Matthew"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Lori, GameDifficulty::Normal, 1, 20000, { 20, 1, 0, 0 } });
- sharewareDemo.Items.emplace_back(HighscoreItem { "Andrew"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Lori, GameDifficulty::Normal, 1, 15000, { 12, 1, 0, 0 } });
- sharewareDemo.Items.emplace_back(HighscoreItem { "Violet"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Jazz, GameDifficulty::Normal, 1, 10000, { 6, 0, 0, 0 } });
- sharewareDemo.Items.emplace_back(HighscoreItem { "Patrick"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Spaz, GameDifficulty::Normal, 1, 5000, { 2, 0, 0, 0 } });
+ sharewareDemo.Items.push_back(HighscoreItem { "Monica"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Spaz, GameDifficulty::Normal, 4, 50000, { 50, 1, 1, 0 } });
+ sharewareDemo.Items.push_back(HighscoreItem { "Dan"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Jazz, GameDifficulty::Normal, 4, 45000, { 45, 1, 1, 0 } });
+ sharewareDemo.Items.push_back(HighscoreItem { "Eve"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Spaz, GameDifficulty::Normal, 3, 40000, { 40, 1, 1, 0 } });
+ sharewareDemo.Items.push_back(HighscoreItem { "Paul"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Jazz, GameDifficulty::Normal, 2, 35000, { 35, 1, 1, 0 } });
+ sharewareDemo.Items.push_back(HighscoreItem { "Tina"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Spaz, GameDifficulty::Normal, 1, 30000, { 30, 1, 0, 0 } });
+ sharewareDemo.Items.push_back(HighscoreItem { "Scarlett"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Spaz, GameDifficulty::Normal, 1, 25000, { 25, 1, 0, 0 } });
+ sharewareDemo.Items.push_back(HighscoreItem { "Matthew"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Lori, GameDifficulty::Normal, 1, 20000, { 20, 1, 0, 0 } });
+ sharewareDemo.Items.push_back(HighscoreItem { "Andrew"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Lori, GameDifficulty::Normal, 1, 15000, { 12, 1, 0, 0 } });
+ sharewareDemo.Items.push_back(HighscoreItem { "Violet"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Jazz, GameDifficulty::Normal, 1, 10000, { 6, 0, 0, 0 } });
+ sharewareDemo.Items.push_back(HighscoreItem { "Patrick"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Spaz, GameDifficulty::Normal, 1, 5000, { 2, 0, 0, 0 } });
}
auto& theSecretFiles = _series[(std::int32_t)SeriesName::TheSecretFiles];
if (theSecretFiles.Items.empty()) {
- theSecretFiles.Items.emplace_back(HighscoreItem { "Dan"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Spaz, GameDifficulty::Normal, 10, 400000, { 350, 80, 15, 1 } });
- theSecretFiles.Items.emplace_back(HighscoreItem { "Tina"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Lori, GameDifficulty::Normal, 6, 350000, { 300, 50, 15, 0 } });
- theSecretFiles.Items.emplace_back(HighscoreItem { "Eve"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Jazz, GameDifficulty::Normal, 4, 300000, { 240, 40, 12, 0 } });
- theSecretFiles.Items.emplace_back(HighscoreItem { "Monica"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Jazz, GameDifficulty::Normal, 2, 250000, { 180, 35, 10, 0 } });
- theSecretFiles.Items.emplace_back(HighscoreItem { "Paul"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Lori, GameDifficulty::Normal, 1, 200000, { 140, 30, 8, 0 } });
- theSecretFiles.Items.emplace_back(HighscoreItem { "Christopher"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Spaz, GameDifficulty::Normal, 1, 150000, { 100, 25, 6, 0 } });
- theSecretFiles.Items.emplace_back(HighscoreItem { "Andrew"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Jazz, GameDifficulty::Normal, 1, 100000, { 60, 18, 4, 0 } });
- theSecretFiles.Items.emplace_back(HighscoreItem { "Victoria"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Lori, GameDifficulty::Normal, 1, 50000, { 30, 12, 2, 0 } });
- theSecretFiles.Items.emplace_back(HighscoreItem { "Thomas"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Spaz, GameDifficulty::Normal, 1, 25000, { 16, 6, 0, 0 } });
- theSecretFiles.Items.emplace_back(HighscoreItem { "Alexander"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Jazz, GameDifficulty::Normal, 1, 10000, { 8, 2, 0, 0 } });
+ theSecretFiles.Items.push_back(HighscoreItem { "Dan"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Spaz, GameDifficulty::Normal, 10, 400000, { 350, 80, 15, 1 } });
+ theSecretFiles.Items.push_back(HighscoreItem { "Tina"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Lori, GameDifficulty::Normal, 6, 350000, { 300, 50, 15, 0 } });
+ theSecretFiles.Items.push_back(HighscoreItem { "Eve"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Jazz, GameDifficulty::Normal, 4, 300000, { 240, 40, 12, 0 } });
+ theSecretFiles.Items.push_back(HighscoreItem { "Monica"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Jazz, GameDifficulty::Normal, 2, 250000, { 180, 35, 10, 0 } });
+ theSecretFiles.Items.push_back(HighscoreItem { "Paul"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Lori, GameDifficulty::Normal, 1, 200000, { 140, 30, 8, 0 } });
+ theSecretFiles.Items.push_back(HighscoreItem { "Christopher"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Spaz, GameDifficulty::Normal, 1, 150000, { 100, 25, 6, 0 } });
+ theSecretFiles.Items.push_back(HighscoreItem { "Andrew"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Jazz, GameDifficulty::Normal, 1, 100000, { 60, 18, 4, 0 } });
+ theSecretFiles.Items.push_back(HighscoreItem { "Victoria"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Lori, GameDifficulty::Normal, 1, 50000, { 30, 12, 2, 0 } });
+ theSecretFiles.Items.push_back(HighscoreItem { "Thomas"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Spaz, GameDifficulty::Normal, 1, 25000, { 16, 6, 0, 0 } });
+ theSecretFiles.Items.push_back(HighscoreItem { "Alexander"_s, UINT64_MAX, HighscoreFlags::IsDefault, PlayerType::Jazz, GameDifficulty::Normal, 1, 10000, { 8, 2, 0, 0 } });
}
}
diff --git a/Sources/Jazz2/UI/Menu/MainMenu.h b/Sources/Jazz2/UI/Menu/MainMenu.h
index e298a1e8..796ed246 100644
--- a/Sources/Jazz2/UI/Menu/MainMenu.h
+++ b/Sources/Jazz2/UI/Menu/MainMenu.h
@@ -5,8 +5,8 @@
#include "../../IStateHandler.h"
#include "../../IRootController.h"
#include "../Canvas.h"
-#include "../UpscaleRenderPass.h"
#include "../../ContentResolver.h"
+#include "../../Rendering/UpscaleRenderPass.h"
#include "../../Tiles/TileMap.h"
#include "../../../nCine/Graphics/Camera.h"
@@ -159,7 +159,7 @@ namespace Jazz2::UI::Menu
};
TexturedBackgroundPass _texturedBackgroundPass;
- UI::UpscaleRenderPassWithClipping _upscalePass;
+ Rendering::UpscaleRenderPassWithClipping _upscalePass;
std::unique_ptr _tileSet;
TileMapLayer _texturedBackgroundLayer;
diff --git a/Sources/Jazz2/UI/Menu/ServerSelectSection.cpp b/Sources/Jazz2/UI/Menu/ServerSelectSection.cpp
index 1398ffe9..0fec86e0 100644
--- a/Sources/Jazz2/UI/Menu/ServerSelectSection.cpp
+++ b/Sources/Jazz2/UI/Menu/ServerSelectSection.cpp
@@ -233,7 +233,7 @@ namespace Jazz2::UI::Menu
}
}
- _items.emplace_back(std::move(desc));
+ _items.push_back(std::move(desc));
}
void ServerSelectSection::ExecuteSelected()
diff --git a/Sources/Main.cpp b/Sources/Main.cpp
index c1f61a8f..dfd7315c 100644
--- a/Sources/Main.cpp
+++ b/Sources/Main.cpp
@@ -485,7 +485,7 @@ void GameEventHandler::OnTouchEvent(const TouchEvent& event)
void GameEventHandler::InvokeAsync(Function&& callback, const char* sourceFunc)
{
- _pendingCallbacks.emplace_back(std::move(callback));
+ _pendingCallbacks.push_back(std::move(callback));
LOGD("Callback queued for async execution from %s", sourceFunc);
}
diff --git a/Sources/Shared/Containers/Array.h b/Sources/Shared/Containers/Array.h
index d7eddedd..d7f64fa3 100644
--- a/Sources/Shared/Containers/Array.h
+++ b/Sources/Shared/Containers/Array.h
@@ -147,7 +147,7 @@ namespace Death { namespace Containers {
@par Aligned allocations
Please note that @ref Array allocations are by default only aligned to
@cpp 2*sizeof(void*) @ce. If you need overaligned memory for working with
- SIMD types, use @ref Utility::allocateAligned() instead.
+ SIMD types, use @ref Memory::allocateAligned() instead.
@subsection Containers-Array-usage-wrapping Wrapping externally allocated arrays
diff --git a/Sources/Shared/Containers/ArrayView.h b/Sources/Shared/Containers/ArrayView.h
index c7c52c8d..c63a749b 100644
--- a/Sources/Shared/Containers/ArrayView.h
+++ b/Sources/Shared/Containers/ArrayView.h
@@ -92,10 +92,9 @@ namespace Death { namespace Containers {
and @ref suffix() are called with @cpp nullptr @ce, they return a zero-sized
@cpp nullptr @ce view.
- Finally, the slicing operations provide a conversion to
- @ref StaticArrayView (or its convenience typedefs @ref ArrayView2,
- @ref ArrayView3 etc.). Compile-time-sized arrays are useful for APIs that want
- to enforce a particular number of elements at compile time.
+ Finally, the slicing operations provide a conversion to @ref StaticArrayView.
+ Compile-time-sized arrays are useful for APIs that want to enforce
+ a particular number of elements at compile time.
All slice operations fire an assert if the arguments are out of range, for
@ref StaticArrayView conversions the checks are done at compile time when
@@ -723,7 +722,7 @@ namespace Death { namespace Containers {
The general API is similar to what's shown in
@ref Containers-ArrayView-usage "ArrayView usage docs", except that here are
additional compile-time overloads of @ref slice(), @ref sliceSize(),
- @ref prefix(), @paramref suffix(), @ref exceptPrefix() and @ref exceptSuffix().
+ @ref prefix(), @ref suffix(), @ref exceptPrefix() and @ref exceptSuffix().
*/
template class StaticArrayView
{
diff --git a/Sources/Shared/Containers/Pair.h b/Sources/Shared/Containers/Pair.h
index 2c982947..7e54c199 100644
--- a/Sources/Shared/Containers/Pair.h
+++ b/Sources/Shared/Containers/Pair.h
@@ -255,6 +255,11 @@ namespace Death { namespace Containers {
S _second;
};
+ /** @relatesalso Pair
+ @brief Make a pair
+
+ Convernience alternative to @ref Pair::Pair(const F&, const S&) and overloads.
+ */
template constexpr Pair::type, typename std::decay
::type> pair(F&& first, S&& second) {
return Pair::type, typename std::decay::type>{std::forward(first), std::forward(second)};
}
@@ -264,6 +269,9 @@ namespace Death { namespace Containers {
template struct DeducedPairConverter;
}
+ /** @relatesalso Pair
+ @brief Make a pair from external representation
+ */
template inline auto pair(T&& other) -> decltype(Implementation::DeducedPairConverter::type>::from(std::forward(other))) {
return Implementation::DeducedPairConverter::type>::from(std::forward(other));
}
diff --git a/Sources/Shared/Containers/Reference.h b/Sources/Shared/Containers/Reference.h
index a0b57435..7338dff4 100644
--- a/Sources/Shared/Containers/Reference.h
+++ b/Sources/Shared/Containers/Reference.h
@@ -96,8 +96,6 @@ namespace Death { namespace Containers {
/**
* @brief Access the underlying reference
- *
- * @ref get(), @ref operator*()
*/
constexpr T* operator->() const
{
diff --git a/Sources/Shared/Containers/StringView.h b/Sources/Shared/Containers/StringView.h
index 92f7d5c0..6522b6cc 100644
--- a/Sources/Shared/Containers/StringView.h
+++ b/Sources/Shared/Containers/StringView.h
@@ -132,10 +132,6 @@ namespace Death { namespace Containers {
checks that a view starts (or ends) with given string and then removes it.
- @subsection Containers-BasicStringView-usage-find Character and substring lookup
-
- @todoc document once also the findNotAny() and findLastNotAny() variants exist
-
@subsection Containers-BasicStringView-usage-c-string-conversion Converting StringView instances to null-terminated C strings
If possible when interacting with 3rd party APIs, passing a string together
diff --git a/Sources/Shared/IO/FileSystem.h b/Sources/Shared/IO/FileSystem.h
index e21aa282..640f2714 100644
--- a/Sources/Shared/IO/FileSystem.h
+++ b/Sources/Shared/IO/FileSystem.h
@@ -181,7 +181,7 @@ namespace Death { namespace IO {
/** @brief Returns an absolute path from a relative one */
static Containers::String GetAbsolutePath(Containers::StringView path);
- /** @brief Returns true if the specified path is not empty and is absolute */
+ /** @brief Returns @cpp true @ce if the specified path is not empty and is absolute */
static bool IsAbsolutePath(Containers::StringView path);
/** @brief Returns the path of executable */
@@ -203,33 +203,33 @@ namespace Death { namespace IO {
static Containers::String GetWindowsDirectory();
#endif
- /** @brief Returns true if the specified path is a directory */
+ /** @brief Returns @cpp true @ce if the specified path is a directory */
static bool DirectoryExists(Containers::StringView path);
- /** @brief Returns true if the specified path is a file */
+ /** @brief Returns @cpp true @ce if the specified path is a file */
static bool FileExists(Containers::StringView path);
- /** @brief Returns true if the file or directory exists */
+ /** @brief Returns @cpp true @ce if the file or directory exists */
static bool Exists(Containers::StringView path);
- /** @brief Returns true if the file or directory is readable */
+ /** @brief Returns @cpp true @ce if the file or directory is readable */
static bool IsReadable(Containers::StringView path);
- /** @brief Returns true if the file or directory is writeable */
+ /** @brief Returns @cpp true @ce if the file or directory is writeable */
static bool IsWritable(Containers::StringView path);
- /** @brief Returns true if the file or directory is executable */
+ /** @brief Returns @cpp true @ce if the file or directory is executable */
static bool IsExecutable(Containers::StringView path);
- /** @brief Returns true if the path is a file and is readable */
+ /** @brief Returns @cpp true @ce if the path is a file and is readable */
static bool IsReadableFile(Containers::StringView path);
- /** @brief Returns true if the path is a file and is writeable */
+ /** @brief Returns @cpp true @ce if the path is a file and is writeable */
static bool IsWritableFile(Containers::StringView path);
- /** @brief Returns true if the path is a symbolic link */
+ /** @brief Returns @cpp true @ce if the path is a symbolic link */
static bool IsSymbolicLink(Containers::StringView path);
- /** @brief Returns true if the file or directory is hidden */
+ /** @brief Returns @cpp true @ce if the file or directory is hidden */
static bool IsHidden(Containers::StringView path);
- /** @brief Makes a file or directory hidden or not */
+ /** @brief Makes a @cpp true @ce or directory hidden or not */
static bool SetHidden(Containers::StringView path, bool hidden);
- /** @brief Returns true if the file or directory is read-only */
+ /** @brief Returns @cpp true @ce if the file or directory is read-only */
static bool IsReadOnly(Containers::StringView path);
/** @brief Makes a file or directory read-only or not */
static bool SetReadOnly(Containers::StringView path, bool readonly);
diff --git a/Sources/Shared/IO/Stream.h b/Sources/Shared/IO/Stream.h
index f0600464..911ede7a 100644
--- a/Sources/Shared/IO/Stream.h
+++ b/Sources/Shared/IO/Stream.h
@@ -60,7 +60,7 @@ namespace Death { namespace IO {
virtual std::int64_t Write(const void* source, std::int64_t bytesToWrite) = 0;
/** @brief Clears all buffers for this stream and causes any buffered data to be written to the underlying device */
virtual bool Flush() = 0;
- /** @brief Returns true if the stream has been sucessfully opened */
+ /** @brief Returns @cpp true @ce if the stream has been sucessfully opened */
virtual bool IsValid() = 0;
/** @brief Returns stream size in bytes */
diff --git a/Sources/Shared/Threading/Event.h b/Sources/Shared/Threading/Event.h
index 706b407c..507a98b2 100644
--- a/Sources/Shared/Threading/Event.h
+++ b/Sources/Shared/Threading/Event.h
@@ -218,10 +218,10 @@ namespace Death { namespace Threading {
#endif
};
- /** @brief An event object that will atomically revert to an unsignaled state anytime a @relativeref{Event,Wait()} call succeeds (i.e., returns true). */
+ /** @brief Event object that will atomically revert to an unsignaled state anytime a @relativeref{Event,Wait()} call succeeds (i.e., returns @cpp true @ce). */
using AutoResetEvent = Event;
- /** @brief An event object that once signaled remains that way forever, unless @relativeref{Event,ResetEvent()} is called. */
+ /** @brief Event object that once signaled remains that way forever, unless @relativeref{Event,ResetEvent()} is called. */
using ManualResetEvent = Event;
}}
\ No newline at end of file
diff --git a/Sources/nCine/Base/Object.h b/Sources/nCine/Base/Object.h
index d6230c7f..65267372 100644
--- a/Sources/nCine/Base/Object.h
+++ b/Sources/nCine/Base/Object.h
@@ -4,7 +4,7 @@
namespace nCine
{
- /// Static RRTI and identification index
+ /// Base class of nCine objects
class Object
{
public:
diff --git a/Sources/nCine/Base/StaticHashMap.h b/Sources/nCine/Base/StaticHashMap.h
index 5124d490..c52ada61 100644
--- a/Sources/nCine/Base/StaticHashMap.h
+++ b/Sources/nCine/Base/StaticHashMap.h
@@ -12,7 +12,7 @@ namespace nCine
template class StaticHashMapIterator;
template struct StaticHashMapHelperTraits;
- /// A template based hashmap implementation with open addressing and leapfrog probing (version with static allocation)
+ /// Static hashmap implementation with open addressing and leapfrog probing (version with static allocation)
template>
class StaticHashMap
{
diff --git a/Sources/nCine/Base/Timer.h b/Sources/nCine/Base/Timer.h
index 2b65eb99..f6ec7cb4 100644
--- a/Sources/nCine/Base/Timer.h
+++ b/Sources/nCine/Base/Timer.h
@@ -4,7 +4,7 @@
namespace nCine
{
- /// Basic timer and synchronization class
+ /// Accumulates the time between starting and stopping the time measurement
class Timer
{
public:
diff --git a/Sources/nCine/Graphics/Camera.h b/Sources/nCine/Graphics/Camera.h
index aa37b266..903e40d7 100644
--- a/Sources/nCine/Graphics/Camera.h
+++ b/Sources/nCine/Graphics/Camera.h
@@ -5,7 +5,7 @@
namespace nCine
{
- /// The camera class that handles matrices for shaders
+ /// Camera that handles matrices for shaders
class Camera
{
public:
diff --git a/Sources/nCine/Graphics/GL/GLAttribute.h b/Sources/nCine/Graphics/GL/GLAttribute.h
index 888d8d4b..a92faec0 100644
--- a/Sources/nCine/Graphics/GL/GLAttribute.h
+++ b/Sources/nCine/Graphics/GL/GLAttribute.h
@@ -5,7 +5,7 @@
namespace nCine
{
- /// A class to store information about an active OpenGL shader attribute
+ /// Stores information about an active OpenGL shader attribute
class GLAttribute
{
public:
diff --git a/Sources/nCine/Graphics/GL/GLBlending.h b/Sources/nCine/Graphics/GL/GLBlending.h
index 7946b71c..e381821c 100644
--- a/Sources/nCine/Graphics/GL/GLBlending.h
+++ b/Sources/nCine/Graphics/GL/GLBlending.h
@@ -5,7 +5,7 @@
namespace nCine
{
- /// A class to handle OpenGL blending
+ /// Handles OpenGL blending
class GLBlending
{
public:
diff --git a/Sources/nCine/Graphics/GL/GLBufferObject.h b/Sources/nCine/Graphics/GL/GLBufferObject.h
index fd2566be..165c53c6 100644
--- a/Sources/nCine/Graphics/GL/GLBufferObject.h
+++ b/Sources/nCine/Graphics/GL/GLBufferObject.h
@@ -4,7 +4,7 @@
namespace nCine
{
- /// A class to handle OpenGL buffer objects of different kinds
+ /// Handles OpenGL buffer objects of different kinds
class GLBufferObject
{
public:
diff --git a/Sources/nCine/Graphics/GL/GLClearColor.h b/Sources/nCine/Graphics/GL/GLClearColor.h
index dea099f4..10973061 100644
--- a/Sources/nCine/Graphics/GL/GLClearColor.h
+++ b/Sources/nCine/Graphics/GL/GLClearColor.h
@@ -7,7 +7,7 @@
namespace nCine
{
- /// A class to handle OpenGL clear color
+ /// Handles OpenGL clear color
class GLClearColor
{
public:
diff --git a/Sources/nCine/Graphics/GL/GLCullFace.h b/Sources/nCine/Graphics/GL/GLCullFace.h
index e1fb52d0..3bb9a5ea 100644
--- a/Sources/nCine/Graphics/GL/GLCullFace.h
+++ b/Sources/nCine/Graphics/GL/GLCullFace.h
@@ -5,7 +5,7 @@
namespace nCine
{
- /// A class to handle OpenGL face culling
+ /// Handles OpenGL face culling
class GLCullFace
{
public:
diff --git a/Sources/nCine/Graphics/GL/GLDebug.h b/Sources/nCine/Graphics/GL/GLDebug.h
index 72f703b1..02f9d54d 100644
--- a/Sources/nCine/Graphics/GL/GLDebug.h
+++ b/Sources/nCine/Graphics/GL/GLDebug.h
@@ -20,7 +20,7 @@ namespace nCine
{
class IGfxCapabilities;
- /// A class to handle OpenGL debug functions
+ /// Handles OpenGL debug functions
class GLDebug
{
public:
diff --git a/Sources/nCine/Graphics/GL/GLDepthTest.h b/Sources/nCine/Graphics/GL/GLDepthTest.h
index b56956a6..f191c643 100644
--- a/Sources/nCine/Graphics/GL/GLDepthTest.h
+++ b/Sources/nCine/Graphics/GL/GLDepthTest.h
@@ -5,7 +5,7 @@
namespace nCine
{
- /// A class to handle OpenGL depth test
+ /// Handles OpenGL depth test
class GLDepthTest
{
public:
diff --git a/Sources/nCine/Graphics/GL/GLFramebuffer.h b/Sources/nCine/Graphics/GL/GLFramebuffer.h
index 42c5deef..16025914 100644
--- a/Sources/nCine/Graphics/GL/GLFramebuffer.h
+++ b/Sources/nCine/Graphics/GL/GLFramebuffer.h
@@ -14,7 +14,7 @@ namespace nCine
class GLRenderbuffer;
class GLTexture;
- /// A class to handle OpenGL framebuffer objects
+ /// Handles OpenGL framebuffer objects
class GLFramebuffer
{
public:
diff --git a/Sources/nCine/Graphics/GL/GLHashMap.h b/Sources/nCine/Graphics/GL/GLHashMap.h
index 9c47e357..51a3a920 100644
--- a/Sources/nCine/Graphics/GL/GLHashMap.h
+++ b/Sources/nCine/Graphics/GL/GLHashMap.h
@@ -10,7 +10,7 @@ namespace nCine
using key_t = GLenum;
using value_t = GLuint;
- /// Naive implementation of a hashmap for storing pairs of OpenGL targets and object ids
+ /// Naive implementation of a hashmap for storing pairs of OpenGL targets and object IDs
template
class GLHashMap
{
@@ -38,7 +38,7 @@ namespace nCine
return buckets_[mappingFunc(key)];
}
- /// A class to perform a mapping between OpenGL buffer object targets and array indices
+ /// Performs a mapping between OpenGL buffer object targets and array indices
class GLBufferObjectMappingFunc
{
public:
@@ -77,7 +77,7 @@ namespace nCine
}
};
- /// A class to perform a mapping between OpenGL texture targets and array indices
+ /// Performs a mapping between OpenGL texture targets and array indices
class GLTextureMappingFunc
{
public:
diff --git a/Sources/nCine/Graphics/GL/GLRenderbuffer.h b/Sources/nCine/Graphics/GL/GLRenderbuffer.h
index df732de7..79a162e7 100644
--- a/Sources/nCine/Graphics/GL/GLRenderbuffer.h
+++ b/Sources/nCine/Graphics/GL/GLRenderbuffer.h
@@ -5,7 +5,7 @@
namespace nCine
{
- /// A class to handle OpenGL renderbuffer objects
+ /// Handles OpenGL renderbuffer objects
class GLRenderbuffer
{
public:
diff --git a/Sources/nCine/Graphics/GL/GLScissorTest.h b/Sources/nCine/Graphics/GL/GLScissorTest.h
index 19e68a91..0d048240 100644
--- a/Sources/nCine/Graphics/GL/GLScissorTest.h
+++ b/Sources/nCine/Graphics/GL/GLScissorTest.h
@@ -7,7 +7,7 @@
namespace nCine
{
- /// A class to handle OpenGL scissor test
+ /// Handles OpenGL scissor test
class GLScissorTest
{
public:
diff --git a/Sources/nCine/Graphics/GL/GLShader.h b/Sources/nCine/Graphics/GL/GLShader.h
index 9894e249..96fc61d1 100644
--- a/Sources/nCine/Graphics/GL/GLShader.h
+++ b/Sources/nCine/Graphics/GL/GLShader.h
@@ -11,7 +11,7 @@ using namespace Death::Containers;
namespace nCine
{
- /// A class to handle OpenGL shader objects
+ /// Handles OpenGL shader objects
class GLShader
{
public:
diff --git a/Sources/nCine/Graphics/GL/GLShaderProgram.h b/Sources/nCine/Graphics/GL/GLShaderProgram.h
index fcefdb38..573679ea 100644
--- a/Sources/nCine/Graphics/GL/GLShaderProgram.h
+++ b/Sources/nCine/Graphics/GL/GLShaderProgram.h
@@ -20,7 +20,7 @@ namespace nCine
{
class GLShader;
- /// A class to handle OpenGL shader programs
+ /// Handles OpenGL shader programs
class GLShaderProgram
{
public:
diff --git a/Sources/nCine/Graphics/GL/GLShaderUniformBlocks.h b/Sources/nCine/Graphics/GL/GLShaderUniformBlocks.h
index 2fa17829..45ba4117 100644
--- a/Sources/nCine/Graphics/GL/GLShaderUniformBlocks.h
+++ b/Sources/nCine/Graphics/GL/GLShaderUniformBlocks.h
@@ -10,7 +10,7 @@ namespace nCine
class GLShaderProgram;
class GLBufferObject;
- /// A class to handle all the uniform blocks of a shader program using a hashmap
+ /// Handles all the uniform blocks of a shader program
class GLShaderUniformBlocks
{
public:
diff --git a/Sources/nCine/Graphics/GL/GLShaderUniforms.h b/Sources/nCine/Graphics/GL/GLShaderUniforms.h
index 8e942bc1..e4d862c5 100644
--- a/Sources/nCine/Graphics/GL/GLShaderUniforms.h
+++ b/Sources/nCine/Graphics/GL/GLShaderUniforms.h
@@ -9,7 +9,7 @@ namespace nCine
{
class GLShaderProgram;
- /// A class to handle all the uniforms of a shader program using a hashmap
+ /// Handles all the uniforms of a shader program
class GLShaderUniforms
{
public:
diff --git a/Sources/nCine/Graphics/GL/GLTexture.h b/Sources/nCine/Graphics/GL/GLTexture.h
index f590cf30..71687249 100644
--- a/Sources/nCine/Graphics/GL/GLTexture.h
+++ b/Sources/nCine/Graphics/GL/GLTexture.h
@@ -4,7 +4,7 @@
namespace nCine
{
- /// A class to handle OpenGL 2D textures
+ /// Handles OpenGL 2D textures
class GLTexture
{
public:
diff --git a/Sources/nCine/Graphics/GL/GLUniform.h b/Sources/nCine/Graphics/GL/GLUniform.h
index 338b3921..18162037 100644
--- a/Sources/nCine/Graphics/GL/GLUniform.h
+++ b/Sources/nCine/Graphics/GL/GLUniform.h
@@ -5,7 +5,7 @@
namespace nCine
{
- /// A class to store information about an active OpenGL shader uniform
+ /// Stores information about an active OpenGL shader uniform
/*! Its only purpose is to initialize a `GLUniformCache` class. */
class GLUniform
{
diff --git a/Sources/nCine/Graphics/GL/GLUniformBlock.h b/Sources/nCine/Graphics/GL/GLUniformBlock.h
index 1abb44b0..0095efd7 100644
--- a/Sources/nCine/Graphics/GL/GLUniformBlock.h
+++ b/Sources/nCine/Graphics/GL/GLUniformBlock.h
@@ -10,7 +10,7 @@ namespace nCine
{
class GLShaderProgram;
- /// A class to store information about an OpenGL uniform block
+ /// Stores information about an OpenGL uniform block
class GLUniformBlock
{
public:
diff --git a/Sources/nCine/Graphics/GL/GLUniformBlockCache.h b/Sources/nCine/Graphics/GL/GLUniformBlockCache.h
index 9acdf329..ce52371c 100644
--- a/Sources/nCine/Graphics/GL/GLUniformBlockCache.h
+++ b/Sources/nCine/Graphics/GL/GLUniformBlockCache.h
@@ -11,7 +11,7 @@ namespace nCine
class GLUniformBlock;
class GLBufferObject;
- /// A class to cache a uniform block buffer and then update it in the shader
+ /// Caches a uniform block buffer and then updates it in the shader
class GLUniformBlockCache
{
public:
diff --git a/Sources/nCine/Graphics/GL/GLUniformCache.h b/Sources/nCine/Graphics/GL/GLUniformCache.h
index 15ab7b0e..d2dd76e1 100644
--- a/Sources/nCine/Graphics/GL/GLUniformCache.h
+++ b/Sources/nCine/Graphics/GL/GLUniformCache.h
@@ -7,7 +7,7 @@ namespace nCine
{
class GLUniform;
- /// A class to cache a uniform value and then update it in the shader
+ /// Caches a uniform value and then updates it in the shader
class GLUniformCache
{
public:
diff --git a/Sources/nCine/Graphics/GL/GLVertexArrayObject.h b/Sources/nCine/Graphics/GL/GLVertexArrayObject.h
index 494790d9..f514b8ed 100644
--- a/Sources/nCine/Graphics/GL/GLVertexArrayObject.h
+++ b/Sources/nCine/Graphics/GL/GLVertexArrayObject.h
@@ -4,7 +4,7 @@
namespace nCine
{
- /// A class to handle OpenGL Vertex Array Object
+ /// Handles OpenGL vertex array object
class GLVertexArrayObject
{
public:
diff --git a/Sources/nCine/Graphics/GL/GLVertexFormat.h b/Sources/nCine/Graphics/GL/GLVertexFormat.h
index 43d3d295..ab7b4993 100644
--- a/Sources/nCine/Graphics/GL/GLVertexFormat.h
+++ b/Sources/nCine/Graphics/GL/GLVertexFormat.h
@@ -11,7 +11,7 @@ namespace nCine
{
class GLBufferObject;
- /// A class that collects all the state that specifies the format of a vertex
+ /// Collects all the state that specifies the format of a vertex
class GLVertexFormat
{
public:
diff --git a/Sources/nCine/Graphics/GL/GLViewport.h b/Sources/nCine/Graphics/GL/GLViewport.h
index 9b6ec47d..ac43a454 100644
--- a/Sources/nCine/Graphics/GL/GLViewport.h
+++ b/Sources/nCine/Graphics/GL/GLViewport.h
@@ -7,7 +7,7 @@
namespace nCine
{
- /// A class to handle OpenGL viewport
+ /// Handles OpenGL viewport
class GLViewport
{
friend class IGfxDevice; // for `initRect()`
diff --git a/Sources/nCine/Input/JoyMapping.cpp b/Sources/nCine/Input/JoyMapping.cpp
index 707fd3f1..7730fc2a 100644
--- a/Sources/nCine/Input/JoyMapping.cpp
+++ b/Sources/nCine/Input/JoyMapping.cpp
@@ -145,7 +145,7 @@ namespace nCine
DEATH_DEBUG_ASSERT(parsed);
if (parsed) {
- mappings_.emplace_back(std::move(mapping));
+ mappings_.push_back(std::move(mapping));
}
}
@@ -199,7 +199,7 @@ namespace nCine
std::int32_t index = FindMappingByGuid(newMapping.guid);
// if GUID is not found then mapping has to be added, not replaced
if (index < 0) {
- mappings_.emplace_back(std::move(newMapping));
+ mappings_.push_back(std::move(newMapping));
} else {
mappings_[index] = std::move(newMapping);
}
diff --git a/Sources/nCine/Primitives/AABB.h b/Sources/nCine/Primitives/AABB.h
index 27f831dd..2836f017 100644
--- a/Sources/nCine/Primitives/AABB.h
+++ b/Sources/nCine/Primitives/AABB.h
@@ -82,7 +82,9 @@ namespace nCine
AABB operator-(const Vector2& v) const;
};
+ /// Axis-Aligned Bounding Box in a two dimensional space of floats
using AABBf = AABB;
+ /// Axis-Aligned Bounding Box in a two dimensional space of 32-bit integers
using AABBi = AABB;
template
diff --git a/Sources/nCine/Primitives/Color.h b/Sources/nCine/Primitives/Color.h
index 52e60df3..c9f55810 100644
--- a/Sources/nCine/Primitives/Color.h
+++ b/Sources/nCine/Primitives/Color.h
@@ -9,7 +9,7 @@ namespace nCine
using Death::Containers::NoInitT;
- /// Four-channels 8-bit color
+ /// Four-channels color with 8-bits integer per component
class Color
{
public:
diff --git a/Sources/nCine/Primitives/Colorf.h b/Sources/nCine/Primitives/Colorf.h
index f549176e..3c0bb98e 100644
--- a/Sources/nCine/Primitives/Colorf.h
+++ b/Sources/nCine/Primitives/Colorf.h
@@ -12,7 +12,7 @@ namespace nCine
using Death::Containers::NoInitT;
- /// Four-channels normalized float color
+ /// Four-channels normalized color with float per component
class Colorf
{
public:
diff --git a/Sources/nCine/Primitives/Matrix4x4.h b/Sources/nCine/Primitives/Matrix4x4.h
index 1f3f225d..4d3c33ad 100644
--- a/Sources/nCine/Primitives/Matrix4x4.h
+++ b/Sources/nCine/Primitives/Matrix4x4.h
@@ -102,6 +102,7 @@ namespace nCine
Vector4 vecs_[4];
};
+ /// Four-by-four matrix of floats
using Matrix4x4f = Matrix4x4;
template
diff --git a/Sources/nCine/Primitives/Quaternion.h b/Sources/nCine/Primitives/Quaternion.h
index bca82c3f..8e87c305 100644
--- a/Sources/nCine/Primitives/Quaternion.h
+++ b/Sources/nCine/Primitives/Quaternion.h
@@ -72,6 +72,7 @@ namespace nCine
static const Quaternion Identity;
};
+ /// Quaternion of floats
using Quaternionf = Quaternion;
template
diff --git a/Sources/nCine/Primitives/Rect.h b/Sources/nCine/Primitives/Rect.h
index af2993e9..49fdd89b 100644
--- a/Sources/nCine/Primitives/Rect.h
+++ b/Sources/nCine/Primitives/Rect.h
@@ -79,6 +79,7 @@ namespace nCine
/// Sets rectangle minimum and maximum coordinates as two `Vector2`
void SetMinMax(const Vector2& min, const Vector2& max);
+ /// Converts elements of the rectangle to a specified type
template
Rect As() {
return Rect(static_cast(X), static_cast(Y), static_cast(W), static_cast(H));
@@ -111,7 +112,9 @@ namespace nCine
static const Rect Empty;
};
+ /// Rectangle in a two dimensional space of floats
using Rectf = Rect;
+ /// Rectangle in a two dimensional space of 32-bit integers
using Recti = Rect;
template
diff --git a/Sources/nCine/Primitives/Vector2.h b/Sources/nCine/Primitives/Vector2.h
index 657fe4f5..d1da728a 100644
--- a/Sources/nCine/Primitives/Vector2.h
+++ b/Sources/nCine/Primitives/Vector2.h
@@ -72,6 +72,7 @@ namespace nCine
Vector2 Normalized() const;
Vector2& Normalize();
+ /// Converts elements of the vector to a specified type
template
Vector2 As() {
return Vector2(static_cast(X), static_cast(Y));
@@ -89,7 +90,9 @@ namespace nCine
static const Vector2 YAxis;
};
+ /// Two-component vector of floats
using Vector2f = Vector2;
+ /// Two-component vector of 32-bit integers
using Vector2i = Vector2;
template
diff --git a/Sources/nCine/Primitives/Vector3.h b/Sources/nCine/Primitives/Vector3.h
index d2435aa8..6e46d654 100644
--- a/Sources/nCine/Primitives/Vector3.h
+++ b/Sources/nCine/Primitives/Vector3.h
@@ -77,6 +77,7 @@ namespace nCine
Vector3 Normalized() const;
Vector3& Normalize();
+ /// Converts elements of the vector to a specified type
template
Vector3 As() {
return Vector3(static_cast(X), static_cast(Y), static_cast(Z));
@@ -98,7 +99,9 @@ namespace nCine
static const Vector3 ZAxis;
};
+ /// Three-component vector of floats
using Vector3f = Vector3;
+ /// Three-component vector of 32-bit integers
using Vector3i = Vector3;
template
diff --git a/Sources/nCine/Primitives/Vector4.h b/Sources/nCine/Primitives/Vector4.h
index 38a98313..67c5ad83 100644
--- a/Sources/nCine/Primitives/Vector4.h
+++ b/Sources/nCine/Primitives/Vector4.h
@@ -82,6 +82,7 @@ namespace nCine
Vector4 Normalized() const;
Vector4& Normalize();
+ /// Converts elements of the vector to a specified type
template
Vector4 As() {
return Vector4(static_cast(X), static_cast(Y), static_cast(Z), static_cast(W));
@@ -105,7 +106,9 @@ namespace nCine
static const Vector4 WAxis;
};
+ /// Four-component vector of floats
using Vector4f = Vector4;
+ /// Four-component vector of 32-bit integers
using Vector4i = Vector4;
template
diff --git a/Sources/nCine/Threading/Thread.h b/Sources/nCine/Threading/Thread.h
index 69b0ff98..496f47dd 100644
--- a/Sources/nCine/Threading/Thread.h
+++ b/Sources/nCine/Threading/Thread.h
@@ -37,7 +37,7 @@ namespace nCine
void Set(std::int32_t cpuNum);
/** @brief Sets the specified CPU number to be excluded by the set */
void Clear(std::int32_t cpuNum);
- /** @brief Returns true if the specified CPU number belongs to the set */
+ /** @brief Returns @cpp true @ce if the specified CPU number belongs to the set */
bool IsSet(std::int32_t cpuNum);
private:
diff --git a/Sources/nCine/Threading/ThreadSync.h b/Sources/nCine/Threading/ThreadSync.h
index 9e8e9ef3..51a9c017 100644
--- a/Sources/nCine/Threading/ThreadSync.h
+++ b/Sources/nCine/Threading/ThreadSync.h
@@ -8,7 +8,7 @@
namespace nCine
{
- /// Mutex class (threads synchronization)
+ /// Mutex for threads synchronization
class Mutex
{
public:
@@ -40,7 +40,7 @@ namespace nCine
friend class CondVariable;
};
- /// Condition variable class (threads synchronization)
+ /// Condition variable for threads synchronization
/*! Windows version based on the TinyThread++ library implementation.
* More info at: http://www.cs.wustl.edu/~schmidt/win32-cv-1.html */
class CondVariable
@@ -70,7 +70,7 @@ namespace nCine
CondVariable& operator=(const CondVariable&) = delete;
};
- /// Read/write lock class (threads synchronization)
+ /// Read/write lock for threads synchronization
class ReadWriteLock
{
public:
@@ -135,7 +135,7 @@ namespace nCine
#if !defined(DEATH_TARGET_ANDROID) && !defined(DEATH_TARGET_APPLE) && !defined(DEATH_TARGET_WINDOWS)
- /// Barrier class (threads synchronization)
+ /// Barrier for threads synchronization
class Barrier
{
public:
diff --git a/cmake/ncine_headers.cmake b/cmake/ncine_headers.cmake
index b70b5d8b..13531667 100644
--- a/cmake/ncine_headers.cmake
+++ b/cmake/ncine_headers.cmake
@@ -330,6 +330,7 @@ list(APPEND HEADERS
${NCINE_SOURCE_DIR}/Jazz2/Rendering/CombineRenderer.h
${NCINE_SOURCE_DIR}/Jazz2/Rendering/LightingRenderer.h
${NCINE_SOURCE_DIR}/Jazz2/Rendering/PlayerViewport.h
+ ${NCINE_SOURCE_DIR}/Jazz2/Rendering/UpscaleRenderPass.h
${NCINE_SOURCE_DIR}/Jazz2/Scripting/JJ2PlusDefinitions.h
${NCINE_SOURCE_DIR}/Jazz2/Scripting/LevelScriptLoader.h
${NCINE_SOURCE_DIR}/Jazz2/Scripting/RegisterArray.h
@@ -356,7 +357,6 @@ list(APPEND HEADERS
${NCINE_SOURCE_DIR}/Jazz2/UI/InGameConsole.h
${NCINE_SOURCE_DIR}/Jazz2/UI/LoadingHandler.h
${NCINE_SOURCE_DIR}/Jazz2/UI/RgbLights.h
- ${NCINE_SOURCE_DIR}/Jazz2/UI/UpscaleRenderPass.h
${NCINE_SOURCE_DIR}/Jazz2/UI/Menu/AboutSection.h
${NCINE_SOURCE_DIR}/Jazz2/UI/Menu/BeginSection.h
${NCINE_SOURCE_DIR}/Jazz2/UI/Menu/ControlsOptionsSection.h
diff --git a/cmake/ncine_sources.cmake b/cmake/ncine_sources.cmake
index e26b3d8f..36248a7c 100644
--- a/cmake/ncine_sources.cmake
+++ b/cmake/ncine_sources.cmake
@@ -240,6 +240,7 @@ list(APPEND SOURCES
${NCINE_SOURCE_DIR}/Jazz2/Rendering/CombineRenderer.cpp
${NCINE_SOURCE_DIR}/Jazz2/Rendering/LightingRenderer.cpp
${NCINE_SOURCE_DIR}/Jazz2/Rendering/PlayerViewport.cpp
+ ${NCINE_SOURCE_DIR}/Jazz2/Rendering/UpscaleRenderPass.cpp
${NCINE_SOURCE_DIR}/Jazz2/Scripting/JJ2PlusDefinitions.cpp
${NCINE_SOURCE_DIR}/Jazz2/Scripting/LevelScriptLoader.cpp
${NCINE_SOURCE_DIR}/Jazz2/Scripting/RegisterArray.cpp
@@ -263,7 +264,6 @@ list(APPEND SOURCES
${NCINE_SOURCE_DIR}/Jazz2/UI/InGameConsole.cpp
${NCINE_SOURCE_DIR}/Jazz2/UI/LoadingHandler.cpp
${NCINE_SOURCE_DIR}/Jazz2/UI/RgbLights.cpp
- ${NCINE_SOURCE_DIR}/Jazz2/UI/UpscaleRenderPass.cpp
${NCINE_SOURCE_DIR}/Jazz2/UI/Menu/AboutSection.cpp
${NCINE_SOURCE_DIR}/Jazz2/UI/Menu/BeginSection.cpp
${NCINE_SOURCE_DIR}/Jazz2/UI/Menu/ControlsOptionsSection.cpp