Removing named namespace from code base.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#include <Controller/DebugCameraController.h>
|
||||
#include <Controller/DebugCameraController.h>
|
||||
|
||||
#include <Controller/ControllerUtils.h>
|
||||
#include <Core/Common/CoreUtils.h>
|
||||
@@ -24,10 +24,10 @@ void ActivateDebugController()
|
||||
{
|
||||
Assert(gIsDebugCameraActive == false);
|
||||
|
||||
Juliet::Camera* currentCam = Juliet::GetCurrentCamera();
|
||||
Camera* currentCam = GetCurrentCamera();
|
||||
gPreviousCameraIndex = currentCam->Index;
|
||||
|
||||
Juliet::SetCurrentCamera(kDebugCamera);
|
||||
SetCurrentCamera(kDebugCamera);
|
||||
|
||||
gIsDebugCameraActive = true;
|
||||
gFirstUpdate = true;
|
||||
@@ -41,7 +41,7 @@ void DeactivateDebugController()
|
||||
|
||||
gIsDebugCameraActive = false;
|
||||
|
||||
Juliet::SetCurrentCamera(gPreviousCameraIndex);
|
||||
SetCurrentCamera(gPreviousCameraIndex);
|
||||
}
|
||||
|
||||
bool IsDebugControllerActive()
|
||||
@@ -51,26 +51,26 @@ bool IsDebugControllerActive()
|
||||
|
||||
void UpdateDebugController(float dt)
|
||||
{
|
||||
Juliet::Camera* currentCam = Juliet::GetCurrentCamera();
|
||||
Camera* currentCam = GetCurrentCamera();
|
||||
|
||||
if (gFirstUpdate)
|
||||
{
|
||||
Juliet::Vector3 dir = Juliet::Vector3{ 0.0f, 0.0f, 0.0f } - currentCam->Position;
|
||||
dir = Juliet::Normalize(dir);
|
||||
Vector3 dir = Vector3{ 0.0f, 0.0f, 0.0f } - currentCam->Position;
|
||||
dir = Normalize(dir);
|
||||
gPitch = asinf(dir.z);
|
||||
gYaw = atan2f(dir.y, dir.x);
|
||||
gFirstUpdate = false;
|
||||
|
||||
Juliet::Vector3 forward;
|
||||
Vector3 forward;
|
||||
forward.x = cosf(gPitch) * cosf(gYaw);
|
||||
forward.y = cosf(gPitch) * sinf(gYaw);
|
||||
forward.z = sinf(gPitch);
|
||||
Juliet::Vector3 right = Juliet::Normalize(Juliet::Cross(Juliet::Vector3{ 0.0f, 0.0f, 1.0f }, forward));
|
||||
Vector3 right = Normalize(Cross(Vector3{ 0.0f, 0.0f, 1.0f }, forward));
|
||||
currentCam->Target = currentCam->Position + forward;
|
||||
currentCam->Up = Juliet::Cross(forward, right);
|
||||
currentCam->Up = Cross(forward, right);
|
||||
}
|
||||
|
||||
bool isRightMouseButtonDown = Juliet::IsMouseButtonDown(Juliet::MouseButton::Right);
|
||||
bool isRightMouseButtonDown = IsMouseButtonDown(MouseButton::Right);
|
||||
if (isRightMouseButtonDown && !gWasRightMouseButtonDown)
|
||||
{
|
||||
gIsFpsModeActive = !gIsFpsModeActive;
|
||||
@@ -82,7 +82,7 @@ void UpdateDebugController(float dt)
|
||||
return;
|
||||
}
|
||||
|
||||
Juliet::MousePosition mouseDelta = Juliet::GetMouseDelta();
|
||||
MousePosition mouseDelta = GetMouseDelta();
|
||||
|
||||
float sensitivity = 0.005f;
|
||||
gYaw += mouseDelta.X * sensitivity;
|
||||
@@ -91,52 +91,52 @@ void UpdateDebugController(float dt)
|
||||
gPitch = std::min(gPitch, 1.5f);
|
||||
gPitch = std::max(gPitch, -1.5f);
|
||||
|
||||
if (Juliet::IsKeyDown(Juliet::ScanCode::Q))
|
||||
if (IsKeyDown(ScanCode::Q))
|
||||
{
|
||||
gYaw -= 2.0f * dt;
|
||||
}
|
||||
if (Juliet::IsKeyDown(Juliet::ScanCode::E))
|
||||
if (IsKeyDown(ScanCode::E))
|
||||
{
|
||||
gYaw += 2.0f * dt;
|
||||
}
|
||||
|
||||
Juliet::Vector3 forward;
|
||||
Vector3 forward;
|
||||
forward.x = cosf(gPitch) * cosf(gYaw);
|
||||
forward.y = cosf(gPitch) * sinf(gYaw);
|
||||
forward.z = sinf(gPitch);
|
||||
|
||||
Juliet::Vector3 right = Juliet::Normalize(Juliet::Cross(Juliet::Vector3{ 0.0f, 0.0f, 1.0f }, forward));
|
||||
Juliet::Vector3 defaultUp = Juliet::Cross(forward, right);
|
||||
Vector3 right = Normalize(Cross(Vector3{ 0.0f, 0.0f, 1.0f }, forward));
|
||||
Vector3 defaultUp = Cross(forward, right);
|
||||
|
||||
static const float kMovementPerFrame = 10.f; // 10m/s
|
||||
|
||||
float speedPerFrame = kMovementPerFrame;
|
||||
if (Juliet::IsKeyDown(Juliet::ScanCode::LeftShift))
|
||||
if (IsKeyDown(ScanCode::LeftShift))
|
||||
{
|
||||
speedPerFrame *= 10.f; // 100m/s
|
||||
}
|
||||
|
||||
if (Juliet::IsKeyDown(Juliet::ScanCode::W))
|
||||
if (IsKeyDown(ScanCode::W))
|
||||
{
|
||||
currentCam->Position = currentCam->Position + forward * (speedPerFrame * dt);
|
||||
}
|
||||
if (Juliet::IsKeyDown(Juliet::ScanCode::S))
|
||||
if (IsKeyDown(ScanCode::S))
|
||||
{
|
||||
currentCam->Position = currentCam->Position - forward * (speedPerFrame * dt);
|
||||
}
|
||||
if (Juliet::IsKeyDown(Juliet::ScanCode::D))
|
||||
if (IsKeyDown(ScanCode::D))
|
||||
{
|
||||
currentCam->Position = currentCam->Position + right * (speedPerFrame * dt);
|
||||
}
|
||||
if (Juliet::IsKeyDown(Juliet::ScanCode::A))
|
||||
if (IsKeyDown(ScanCode::A))
|
||||
{
|
||||
currentCam->Position = currentCam->Position - right * (speedPerFrame * dt);
|
||||
}
|
||||
if (Juliet::IsKeyDown(Juliet::ScanCode::Space))
|
||||
if (IsKeyDown(ScanCode::Space))
|
||||
{
|
||||
currentCam->Position = currentCam->Position + defaultUp * (speedPerFrame * dt);
|
||||
}
|
||||
if (Juliet::IsKeyDown(Juliet::ScanCode::LeftControl))
|
||||
if (IsKeyDown(ScanCode::LeftControl))
|
||||
{
|
||||
currentCam->Position = currentCam->Position - defaultUp * (speedPerFrame * dt);
|
||||
}
|
||||
@@ -148,7 +148,7 @@ void UpdateDebugController(float dt)
|
||||
#if JULIET_DEBUG
|
||||
void RenderImGuiDebugController(float dt)
|
||||
{
|
||||
Juliet::Camera* currentCam = Juliet::GetCurrentCamera();
|
||||
Camera* currentCam = GetCurrentCamera();
|
||||
|
||||
ImGui::Text("Delta time: %f", dt);
|
||||
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
#include <Debug/DebugTopBar.h>
|
||||
#include <Debug/DebugTopBar.h>
|
||||
|
||||
#include <game.h>
|
||||
#include <imgui.h>
|
||||
|
||||
namespace
|
||||
{
|
||||
Juliet::String GetGameModeName(GameMode gameMode)
|
||||
String GetGameModeName(GameMode gameMode)
|
||||
{
|
||||
using namespace Juliet;
|
||||
switch (gameMode)
|
||||
{
|
||||
case GameMode::Editor: return WrapString("Editor");
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <Core/Common/CoreUtils.h>
|
||||
#include <Core/Memory/Allocator.h>
|
||||
@@ -8,19 +8,19 @@
|
||||
|
||||
#define DECLARE_ENTITY() \
|
||||
Entity* Base; \
|
||||
static const Juliet::Class* Kind;
|
||||
static const Class* Kind;
|
||||
|
||||
// Will register the class globally at launch
|
||||
#define DEFINE_ENTITY(entity) \
|
||||
constexpr Juliet::Class entityKind##entity(#entity, sizeof(#entity) / sizeof(char)); \
|
||||
const Juliet::Class* entity::Kind = &entityKind##entity;
|
||||
constexpr Class entityKind##entity(#entity, sizeof(#entity) / sizeof(char)); \
|
||||
const Class* entity::Kind = &entityKind##entity;
|
||||
|
||||
using DerivedType = void*;
|
||||
|
||||
struct Entity final
|
||||
{
|
||||
EntityID ID;
|
||||
const Juliet::Class* Kind;
|
||||
const Class* Kind;
|
||||
DerivedType Derived;
|
||||
float X, Y;
|
||||
index_t MeshInstance = indexMax;
|
||||
@@ -28,7 +28,7 @@ struct Entity final
|
||||
|
||||
template <typename EntityType>
|
||||
concept EntityConcept = requires(EntityType entity) {
|
||||
requires std::same_as<decltype(entity.Kind), const Juliet::Class*>;
|
||||
requires std::same_as<decltype(entity.Kind), const Class*>;
|
||||
requires std::same_as<decltype(entity.Base), Entity*>;
|
||||
};
|
||||
|
||||
@@ -44,7 +44,7 @@ template <typename EntityType>
|
||||
EntityType* MakeEntity(EntityManager& manager, float x, float y)
|
||||
{
|
||||
auto* arena = manager.Arena;
|
||||
EntityType* result = Juliet::ArenaPushStruct<EntityType>(arena);
|
||||
EntityType* result = ArenaPushStruct<EntityType>(arena);
|
||||
Entity base;
|
||||
base.X = x;
|
||||
base.Y = y;
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
#include <Entity/EntityManager.h>
|
||||
#include <Entity/EntityManager.h>
|
||||
|
||||
#include <Entity/Entity.h>
|
||||
#include <Graphics/MeshRenderer.h>
|
||||
|
||||
EntityID EntityManager::ID = 0;
|
||||
|
||||
void InitEntityManager(Juliet::NonNullPtr<World> world)
|
||||
void InitEntityManager(NonNullPtr<World> world)
|
||||
{
|
||||
EntityManager* newManager = Juliet::ArenaPushStruct<EntityManager>(world->WorldArena);
|
||||
EntityManager* newManager = ArenaPushStruct<EntityManager>(world->WorldArena);
|
||||
world->EntityManager = newManager;
|
||||
|
||||
newManager->Entities.Create(world->WorldArena JULIET_DEBUG_PARAM("Entities"));
|
||||
|
||||
newManager->Arena = Juliet::ArenaAllocate({ .Name = "Entity Arena" });
|
||||
newManager->Arena = ArenaAllocate({ .Name = "Entity Arena" });
|
||||
}
|
||||
|
||||
void ShutdownEntityManager()
|
||||
@@ -22,7 +22,7 @@ void ShutdownEntityManager()
|
||||
|
||||
EntityManager& GetEntityManager()
|
||||
{
|
||||
Juliet::NonNullPtr entityManager = GetGameState()->World->EntityManager;
|
||||
NonNullPtr entityManager = GetGameState()->World->EntityManager;
|
||||
return *entityManager;
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ void UpdateEntityManager(EntityManager& manager)
|
||||
{
|
||||
if (ent.MeshInstance != indexMax)
|
||||
{
|
||||
Juliet::SetMeshInstanceTransform(ent.MeshInstance, Juliet::MatrixTranslation(ent.X, ent.Y, 0.0f));
|
||||
SetMeshInstanceTransform(ent.MeshInstance, MatrixTranslation(ent.X, ent.Y, 0.0f));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <Core/Common/CoreTypes.h>
|
||||
#include <Core/Container/Vector.h>
|
||||
@@ -11,13 +11,13 @@ struct EntityManager
|
||||
{
|
||||
static EntityID ID;
|
||||
|
||||
Juliet::Arena* Arena;
|
||||
Arena* Arena;
|
||||
|
||||
// TODO: Should be a pool
|
||||
Juliet::VectorArena<Entity, 1024> Entities;
|
||||
VectorArena<Entity, 1024> Entities;
|
||||
};
|
||||
|
||||
void InitEntityManager(Juliet::NonNullPtr<World> world);
|
||||
void InitEntityManager(NonNullPtr<World> world);
|
||||
void ShutdownEntityManager();
|
||||
EntityManager& GetEntityManager();
|
||||
void RegisterEntity(EntityManager& manager, Entity* entity);
|
||||
|
||||
+2
-4
@@ -1,4 +1,4 @@
|
||||
#include <game.h>
|
||||
#include <game.h>
|
||||
|
||||
#include <Controller/DebugCameraController.h>
|
||||
#include <Core/HAL/Filesystem/Filesystem.h>
|
||||
@@ -31,14 +31,12 @@ extern "C" JULIET_API void __cdecl GameShutdown()
|
||||
{
|
||||
printf("Shutting down game...\n");
|
||||
|
||||
using namespace Juliet;
|
||||
|
||||
ShutdownEntityManager();
|
||||
}
|
||||
|
||||
extern "C" JULIET_API void __cdecl GameUpdate(Juliet::GameData* params, [[maybe_unused]] float deltaTime)
|
||||
extern "C" JULIET_API void __cdecl GameUpdate(GameData* params, [[maybe_unused]] float deltaTime)
|
||||
{
|
||||
using namespace Juliet;
|
||||
|
||||
gGameState = params->GameState;
|
||||
if (!gGameState)
|
||||
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <Core/Memory/MemoryArena.h>
|
||||
|
||||
@@ -6,7 +6,7 @@ struct EntityManager;
|
||||
|
||||
struct World
|
||||
{
|
||||
Juliet::Arena* WorldArena;
|
||||
Arena* WorldArena;
|
||||
EntityManager* EntityManager;
|
||||
};
|
||||
|
||||
@@ -19,7 +19,7 @@ enum class GameMode
|
||||
|
||||
struct GameState
|
||||
{
|
||||
Juliet::Arena* TotalArena;
|
||||
Arena* TotalArena;
|
||||
|
||||
World* World;
|
||||
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <Core/Application/IApplication.h>
|
||||
#include <Core/Common/CoreTypes.h>
|
||||
#include <Juliet.h>
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
enum class JulietInit_Flags : uint8;
|
||||
|
||||
struct Arena;
|
||||
extern JULIET_API void StartApplication(IApplication& app, JulietInit_Flags flags);
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <Core/Common/NonNullPtr.h>
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
struct Camera;
|
||||
struct RenderPass;
|
||||
struct CommandList;
|
||||
@@ -29,4 +27,3 @@ namespace Juliet
|
||||
virtual ColorTargetInfo GetColorTargetInfo(Texture* swapchainTexture) = 0;
|
||||
virtual DepthStencilTargetInfo* GetDepthTargetInfo() = 0;
|
||||
};
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
// From https://web.mit.edu/freebsd/head/sys/libkern/crc32.c
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
namespace details
|
||||
{
|
||||
constexpr uint32_t crc32_tab[] = {
|
||||
@@ -55,4 +53,3 @@ namespace Juliet
|
||||
return crc32(str, length);
|
||||
}
|
||||
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <Core/Common/CoreTypes.h>
|
||||
#include <Juliet.h>
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
|
||||
#define global static
|
||||
|
||||
@@ -59,7 +57,7 @@ namespace Juliet
|
||||
{ \
|
||||
if (!(expression)) [[unlikely]] \
|
||||
{ \
|
||||
Juliet::JulietAssert(#expression, message); \
|
||||
JulietAssert(#expression, message); \
|
||||
} \
|
||||
} \
|
||||
JULIET_WARNING_POP \
|
||||
@@ -71,7 +69,7 @@ namespace Juliet
|
||||
long hr_val = (hr_expression); \
|
||||
if (hr_val < 0) \
|
||||
{ \
|
||||
Juliet::JulietAssert(#hr_expression, message, std::source_location::current(), hr_val); \
|
||||
JulietAssert(#hr_expression, message, std::source_location::current(), hr_val); \
|
||||
} \
|
||||
} \
|
||||
while (0)
|
||||
@@ -83,7 +81,7 @@ namespace Juliet
|
||||
#define Unimplemented() \
|
||||
do \
|
||||
{ \
|
||||
Juliet::JulietAssert("UNIMPLEMENTED", "This code path is not yet functional."); \
|
||||
JulietAssert("UNIMPLEMENTED", "This code path is not yet functional."); \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
@@ -228,4 +226,3 @@ namespace Juliet
|
||||
const uint32 bitmask16 = 0x0000'ffff;
|
||||
// ...
|
||||
const uint32 bitmask32 = 0xffff'ffff;
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
template <typename T>
|
||||
concept IsEnum = std::is_enum_v<T>;
|
||||
|
||||
@@ -86,4 +84,3 @@ namespace Juliet
|
||||
{
|
||||
return static_cast<E>(value);
|
||||
}
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <Core/Common/CoreUtils.h>
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
template <typename Type, typename OtherType>
|
||||
concept NonNullPtr_Convertible = std::is_convertible_v<OtherType*, Type*>;
|
||||
|
||||
@@ -110,4 +108,3 @@ namespace Juliet
|
||||
|
||||
template <typename T>
|
||||
NonNullPtr(T*) -> NonNullPtr<T>;
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <Core/Common/NonNullPtr.h>
|
||||
#include <Core/Math/MathUtils.h>
|
||||
@@ -14,8 +14,6 @@
|
||||
#undef RESTORE_GLOBAL
|
||||
#endif
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
struct Arena;
|
||||
|
||||
#define ConstString(str) { const_cast<char*>((str)), sizeof(str) - 1 }
|
||||
@@ -174,10 +172,9 @@ namespace Juliet
|
||||
}
|
||||
|
||||
#define juliet_snprintf snprintf
|
||||
} // namespace Juliet
|
||||
|
||||
#ifdef UNIT_TEST
|
||||
namespace Juliet::UnitTest
|
||||
namespace UnitTest
|
||||
{
|
||||
inline void TestFindChar()
|
||||
{
|
||||
@@ -192,5 +189,5 @@ namespace Juliet::UnitTest
|
||||
Assert(FindChar(s2, 'f').Str - s2.Str == 5);
|
||||
Assert(FindChar(s3, '1').Str - s3.Str == 0);
|
||||
}
|
||||
} // namespace Juliet::UnitTest
|
||||
} // namespace UnitTest
|
||||
#endif
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <Core/Common/NonNullPtr.h>
|
||||
#include <Core/Memory/MemoryArena.h>
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
template <typename Type, size_t ReserveSize = 16>
|
||||
struct VectorArena
|
||||
{
|
||||
@@ -211,4 +209,3 @@ namespace Juliet
|
||||
"VectorArena must have a standard layout to remain POD-like.");
|
||||
static_assert(std::is_trivially_copyable_v<VectorArena<int>>,
|
||||
"VectorArena must be trivially copyable (no custom destructors/assignment).");
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <Core/Common/CoreTypes.h>
|
||||
#include <Core/Common/NonNullPtr.h>
|
||||
#include <Core/Common/String.h>
|
||||
#include <Juliet.h>
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
struct Window;
|
||||
|
||||
using WindowID = uint8;
|
||||
@@ -18,4 +16,3 @@ namespace Juliet
|
||||
|
||||
extern JULIET_API WindowID GetWindowID(NonNullPtr<Window> window);
|
||||
extern JULIET_API void SetWindowTitle(NonNullPtr<Window> window, String title);
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <Core/Common/NonNullPtr.h>
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
struct DynamicLibrary;
|
||||
|
||||
extern JULIET_API DynamicLibrary* LoadDynamicLibrary(const char* filename);
|
||||
extern JULIET_API FunctionPtr LoadFunction(NonNullPtr<DynamicLibrary> lib, const char* functionName);
|
||||
extern JULIET_API void UnloadDynamicLibrary(NonNullPtr<DynamicLibrary> lib);
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <Core/HAL/Display/Display.h>
|
||||
#include <Core/HAL/Keyboard/Keyboard.h>
|
||||
@@ -9,8 +9,6 @@
|
||||
// Handles all events from systems handling the Hardware
|
||||
// Very inspired by SDL3
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
enum class EventType : uint32
|
||||
{
|
||||
None = 0,
|
||||
@@ -120,4 +118,3 @@ namespace Juliet
|
||||
extern JULIET_API bool AddEvent(SystemEvent& event);
|
||||
|
||||
extern void Events_NewFrame(float deltaTime);
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <Core/Common/String.h>
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
// Returns the path to the application directory
|
||||
[[nodiscard]] extern JULIET_API String GetBasePath();
|
||||
|
||||
@@ -17,4 +15,3 @@ namespace Juliet
|
||||
[[nodiscard]] extern JULIET_API String GetAssetPath(NonNullPtr<Arena> arena, String filename);
|
||||
|
||||
[[nodiscard]] extern JULIET_API bool IsAbsolutePath(String path);
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <Core/Common/NonNullPtr.h>
|
||||
#include <Core/Common/String.h>
|
||||
#include <Juliet.h>
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
// Opaque type
|
||||
struct IOStream;
|
||||
|
||||
@@ -66,4 +64,3 @@ namespace Juliet
|
||||
extern JULIET_API ByteBuffer LoadFile(NonNullPtr<Arena> arena, NonNullPtr<IOStream> stream, bool closeStreamWhenDone);
|
||||
|
||||
extern JULIET_API bool IOClose(NonNullPtr<IOStream> stream);
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <Core/Common/CoreTypes.h>
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
// Represents a Virtual Key corresponding to the Physical key, but localized using the keyboard layout
|
||||
// ScanCode reprensent US ASCII Keyboard
|
||||
// WASD Scan codes are ZQSD in KeyCode for French keyboard
|
||||
@@ -190,4 +188,3 @@ namespace Juliet
|
||||
Alt = LeftAlt | RightAlt,
|
||||
OSCommand = LeftOSCommand | RightOSCommand,
|
||||
};
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <Core/HAL/Keyboard/KeyCode.h>
|
||||
#include <Core/HAL/Keyboard/ScanCode.h>
|
||||
#include <Juliet.h>
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
using KeyboardID = uint8;
|
||||
|
||||
enum class KeyPosition : bool
|
||||
@@ -32,4 +30,3 @@ namespace Juliet
|
||||
|
||||
extern JULIET_API KeyMod GetKeyModState();
|
||||
extern JULIET_API KeyCode GetKeyCodeFromScanCode(ScanCode scanCode, KeyMod keyModState);
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
// Follow the HID Usage page for USB
|
||||
// https://usb.org/sites/default/files/hut1_5.pdf
|
||||
// 0 to 256 Is dedicated to Keyboard Usage Page (0x07)
|
||||
@@ -183,4 +181,3 @@ namespace Juliet
|
||||
|
||||
Count = 512
|
||||
};
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
using MouseID = uint8;
|
||||
|
||||
enum class MouseButton : uint8
|
||||
@@ -25,4 +23,3 @@ namespace Juliet
|
||||
JULIET_API extern MousePosition GetMousePosition();
|
||||
JULIET_API extern MousePosition GetMouseDelta();
|
||||
JULIET_API extern MouseButton GetMouseButtonState();
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <Core/Common/CoreTypes.h>
|
||||
#include <Juliet.h>
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
namespace Memory
|
||||
{
|
||||
Byte* OS_Reserve(size_t size);
|
||||
@@ -46,4 +44,3 @@ namespace Juliet
|
||||
|
||||
using EntryPointFunc = int (*)(int, wchar_t**);
|
||||
JULIET_API int Bootstrap(EntryPointFunc entryPointFunc, int argc, wchar_t** argv);
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <Core/Common/String.h>
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
// Fwd Declare
|
||||
struct DynamicLibrary;
|
||||
|
||||
@@ -35,4 +33,3 @@ namespace Juliet
|
||||
|
||||
extern JULIET_API void ReloadCode(HotReloadCode& code);
|
||||
extern JULIET_API bool ShouldReloadCode(const HotReloadCode& code);
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <Core/Common/CoreTypes.h>
|
||||
#include <Core/Common/NonNullPtr.h>
|
||||
@@ -7,8 +7,6 @@
|
||||
|
||||
struct ImGuiContext;
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
struct Window;
|
||||
struct GraphicsDevice;
|
||||
|
||||
@@ -26,6 +24,5 @@ namespace Juliet
|
||||
// Run internal unit tests
|
||||
JULIET_API void RunTests();
|
||||
} // namespace ImGuiService
|
||||
} // namespace Juliet
|
||||
|
||||
#endif // JULIET_ENABLE_IMGUI
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <Core/Common/NonNullPtr.h>
|
||||
#include <Core/HAL/Display/Window.h>
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#include <Juliet.h>
|
||||
|
||||
namespace Juliet::UnitTest
|
||||
namespace UnitTest
|
||||
{
|
||||
void TestImGui();
|
||||
}
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <Core/Common/CoreTypes.h>
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
enum class JulietInit_Flags : uint8
|
||||
{
|
||||
None = 0,
|
||||
@@ -23,4 +21,3 @@ namespace Juliet
|
||||
|
||||
void JulietInit(JulietInit_Flags flags);
|
||||
void JulietShutdown();
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <Core/Common/CoreTypes.h>
|
||||
#include <Core/Common/NonNullPtr.h>
|
||||
@@ -9,8 +9,6 @@
|
||||
// TODO Juliet Containers + Allocators...
|
||||
// TODO: Juliet chrono, because it prevents me from doing #define global static
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
enum class LogLevel : uint8;
|
||||
enum class LogCategory : uint8;
|
||||
|
||||
@@ -26,4 +24,3 @@ namespace Juliet
|
||||
extern void JULIET_API LogMessage(LogCategory category, const char* fmt, ...);
|
||||
extern void JULIET_API LogWarning(LogCategory category, const char* fmt, ...);
|
||||
extern void JULIET_API LogError(LogCategory category, const char* fmt, ...);
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
enum class LogLevel : uint8
|
||||
{
|
||||
Debug = 0,
|
||||
@@ -19,4 +17,3 @@ namespace Juliet
|
||||
Tool = 4,
|
||||
Game = 5,
|
||||
};
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <Core/HAL/OS/OS.h>
|
||||
|
||||
@@ -12,12 +12,12 @@ extern int JulietMain(int, wchar_t**);
|
||||
#if UNICODE
|
||||
int wmain(int argc, wchar_t** argv)
|
||||
{
|
||||
return Juliet::Bootstrap(JulietMain, argc, argv);
|
||||
return Bootstrap(JulietMain, argc, argv);
|
||||
}
|
||||
#else
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
return Juliet::Bootstrap(JulietMain, argc, argv);
|
||||
return Bootstrap(JulietMain, argc, argv);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -38,7 +38,7 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR szCmdLine, int sw)
|
||||
(void)szCmdLine;
|
||||
(void)sw;
|
||||
|
||||
return Juliet::Bootstrap(JulietMain, __argc, __wargv);
|
||||
return Bootstrap(JulietMain, __argc, __wargv);
|
||||
}
|
||||
}
|
||||
#else
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <Core/Common/CoreTypes.h>
|
||||
#include <Juliet.h>
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
extern JULIET_API float RoundF(float value);
|
||||
|
||||
inline int32 LRoundF(float value)
|
||||
@@ -49,4 +47,3 @@ namespace Juliet
|
||||
}
|
||||
return val;
|
||||
}
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <Core/Math/Vector.h>
|
||||
#include <math.h>
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
struct Matrix
|
||||
{
|
||||
float m[4][4];
|
||||
@@ -191,4 +189,3 @@ namespace Juliet
|
||||
|
||||
return out;
|
||||
}
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
struct Rectangle
|
||||
{
|
||||
int32 X;
|
||||
@@ -9,4 +7,3 @@ namespace Juliet
|
||||
int32 Width;
|
||||
int32 Height;
|
||||
};
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <Core/Common/CoreTypes.h>
|
||||
#include <Juliet.h>
|
||||
#include <math.h>
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
struct Vector3
|
||||
{
|
||||
float x, y, z;
|
||||
@@ -36,4 +34,3 @@ namespace Juliet
|
||||
}
|
||||
|
||||
inline float Dot(const Vector3& a, const Vector3& b) { return a.x * b.x + a.y * b.y + a.z * b.z; }
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <Juliet.h>
|
||||
#include <Core/Common/CoreUtils.h>
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
// Uninitialized allocation
|
||||
JULIET_API void* Malloc(size_t elem_size);
|
||||
// Initialized to 0 allocation
|
||||
@@ -28,4 +26,3 @@ namespace Juliet
|
||||
memory = nullptr;
|
||||
}
|
||||
}
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <Core/Common/CoreTypes.h>
|
||||
#include <Core/Common/CoreUtils.h>
|
||||
@@ -10,8 +10,6 @@
|
||||
#include <Core/Memory/MemoryArenaDebug.h>
|
||||
#endif
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
constexpr global uint64 g_Arena_Default_Reserve_Size = Megabytes(64);
|
||||
constexpr global uint64 g_Arena_Default_Commit_Size = Kilobytes(64);
|
||||
constexpr global uint64 k_ArenaHeaderSize = 128;
|
||||
@@ -128,4 +126,3 @@ namespace Juliet
|
||||
|
||||
TempArena ArenaTempBegin(NonNullPtr<Arena> arena);
|
||||
void ArenaTempEnd(TempArena temp);
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <Core/Common/CoreTypes.h>
|
||||
#include <Core/Common/NonNullPtr.h>
|
||||
@@ -7,8 +7,6 @@
|
||||
|
||||
#if JULIET_DEBUG
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
struct Arena;
|
||||
struct MemoryBlock;
|
||||
|
||||
@@ -47,6 +45,5 @@ namespace Juliet
|
||||
|
||||
JULIET_API Arena* GetDebugInfoArena();
|
||||
|
||||
} // namespace Juliet
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <Core/Common/CoreTypes.h>
|
||||
|
||||
#define ArraySize(array) (sizeof(array) / sizeof(array[0]))
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
inline int32 MemCompare(const void* leftValue, const void* rightValue, size_t size)
|
||||
{
|
||||
auto left = static_cast<const unsigned char*>(leftValue);
|
||||
@@ -75,4 +73,3 @@ namespace Juliet
|
||||
#define MemCopy memcpy
|
||||
|
||||
#define MemoryZero(dst, size) MemSet(dst, 0, size)
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,11 +1,8 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <Core/Common/CoreTypes.h>
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
// TODO : Do something better.
|
||||
constexpr uint32 kLocalhost = (127 << 3) | (0 << 2) | (0 << 1) | 1;
|
||||
constexpr uint32 kAnyIp = 0;
|
||||
constexpr uint32 kBroadcastIp = (255 << 3) | (255 << 2) | (255 << 1) | 255;
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <Core/Common/CoreTypes.h>
|
||||
#include <Core/Container/Vector.h>
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
class NetworkPacket
|
||||
{
|
||||
public:
|
||||
@@ -33,4 +31,3 @@ namespace Juliet
|
||||
VectorArena<Byte, 4096> Data;
|
||||
size_t PartialSendIndex = 0;
|
||||
};
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <Core/Networking/SocketHandle.h>
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
class Socket
|
||||
{
|
||||
public:
|
||||
@@ -53,4 +51,3 @@ namespace Juliet
|
||||
SocketHandle Handle;
|
||||
Protocol ProtocolType;
|
||||
};
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,14 +1,11 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#if JULIET_WIN32
|
||||
#include <basetsd.h>
|
||||
#endif
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
#if JULIET_WIN32
|
||||
using SocketHandle = UINT_PTR;
|
||||
#else
|
||||
using SocketHandle = int;
|
||||
#endif
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <Core/Networking/IPAddress.h>
|
||||
#include <Core/Networking/Socket.h>
|
||||
#include <Core/Networking/TcpSocket.h>
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
class TcpListener : public Socket
|
||||
{
|
||||
public:
|
||||
@@ -18,4 +16,3 @@ namespace Juliet
|
||||
Status Accept(TcpSocket& socket);
|
||||
void Close();
|
||||
};
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <Core/Networking/Socket.h>
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
class NetworkPacket;
|
||||
|
||||
class TcpSocket : public Socket
|
||||
@@ -21,4 +19,3 @@ namespace Juliet
|
||||
private:
|
||||
friend class TcpListener;
|
||||
};
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <algorithm>
|
||||
#include <bit>
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
using Mutex = std::mutex;
|
||||
using LockGuard = std::lock_guard<Mutex>;
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <Core/Common/String.h>
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
uint32 thread_id();
|
||||
|
||||
void set_thread_name(String name);
|
||||
@@ -16,4 +14,3 @@ namespace Juliet
|
||||
{
|
||||
}
|
||||
}
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <Core/Common/CoreTypes.h>
|
||||
#include <Core/Memory/MemoryArena.h>
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
struct thread_context
|
||||
{
|
||||
Arena* ScratchArenas[2];
|
||||
@@ -21,4 +19,3 @@ namespace Juliet
|
||||
Arena* thread_context_get_scratch(Arena** conflicts, size_t count);
|
||||
TempArena scratch_begin(Arena** conflicts, size_t count);
|
||||
void scratch_end(TempArena scratch);
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <Core/Common/String.h>
|
||||
#include <Graphics/MeshRenderer.h>
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
JULIET_API extern MeshAssetID LoadMesh(String filename);
|
||||
}
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <Core/Common/CRC32.h>
|
||||
#include <Juliet.h>
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
struct Class
|
||||
{
|
||||
uint32 CRC;
|
||||
@@ -30,4 +28,3 @@ namespace Juliet
|
||||
{
|
||||
return cls.CRC == type::StaticClass->CRC;
|
||||
}
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <Juliet.h>
|
||||
|
||||
#if JULIET_DEBUG
|
||||
|
||||
namespace Juliet::Debug
|
||||
namespace Debug
|
||||
{
|
||||
JULIET_API void DebugDrawMemoryArena();
|
||||
} // namespace Juliet::Debug
|
||||
} // namespace Debug
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <Core/Application/IApplication.h>
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
enum class JulietInit_Flags : uint8;
|
||||
|
||||
struct Engine
|
||||
@@ -22,4 +20,3 @@ namespace Juliet
|
||||
void RunEngine();
|
||||
|
||||
extern Arena* GetPlatformArena();
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <Core/Math/Matrix.h>
|
||||
#include <Juliet.h>
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
struct Camera
|
||||
{
|
||||
index_t Index;
|
||||
@@ -35,4 +33,3 @@ namespace Juliet
|
||||
JULIET_API extern void ReserveCamera(size_t amount);
|
||||
JULIET_API extern Camera* GetCurrentCamera();
|
||||
JULIET_API extern void SetCurrentCamera(index_t index);
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
template <typename Type>
|
||||
struct ColorType
|
||||
{
|
||||
@@ -13,4 +11,3 @@ namespace Juliet
|
||||
|
||||
using FColor = ColorType<float>;
|
||||
using Color = ColorType<uint8>;
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <Core/Math/Vector.h>
|
||||
#include <Graphics/Camera.h>
|
||||
@@ -6,12 +6,9 @@
|
||||
#include <Graphics/Graphics.h>
|
||||
#include <Juliet.h>
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
extern JULIET_API void DebugDisplay_Initialize(NonNullPtr<Arena> arena, GraphicsDevice* device);
|
||||
extern JULIET_API void DebugDisplay_Shutdown(GraphicsDevice* device);
|
||||
extern JULIET_API void DebugDisplay_DrawLine(const Vector3& start, const Vector3& end, const FColor& color, bool overlay);
|
||||
extern JULIET_API void DebugDisplay_DrawSphere(const Vector3& center, float radius, const FColor& color, bool overlay);
|
||||
extern JULIET_API void DebugDisplay_Prepare(CommandList* cmdList);
|
||||
extern JULIET_API void DebugDisplay_Flush(CommandList* cmdList, RenderPass* renderPass, const Camera& camera);
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -12,8 +12,6 @@
|
||||
#include <Juliet.h>
|
||||
|
||||
// Graphics Interface
|
||||
namespace Juliet
|
||||
{
|
||||
// Opaque types
|
||||
struct CommandList;
|
||||
struct GraphicsDevice;
|
||||
@@ -121,7 +119,7 @@ namespace Juliet
|
||||
extern JULIET_API void EndRenderPass(NonNullPtr<RenderPass> renderPass);
|
||||
|
||||
extern JULIET_API void SetGraphicsViewPort(NonNullPtr<RenderPass> renderPass, const GraphicsViewPort& viewPort);
|
||||
extern JULIET_API void SetScissorRect(NonNullPtr<RenderPass> renderPass, const Rectangle& rectangle);
|
||||
extern JULIET_API void SetScissorRect(NonNullPtr<RenderPass> renderPass, const struct Rectangle& rectangle);
|
||||
extern JULIET_API void SetBlendConstants(NonNullPtr<RenderPass> renderPass, FColor blendConstants);
|
||||
extern JULIET_API void SetStencilReference(NonNullPtr<RenderPass> renderPass, uint8 reference);
|
||||
|
||||
@@ -174,4 +172,3 @@ namespace Juliet
|
||||
|
||||
extern JULIET_API void DestroyGraphicsBuffer(NonNullPtr<GraphicsDevice> device, NonNullPtr<GraphicsBuffer> buffer);
|
||||
extern JULIET_API void DestroyGraphicsTransferBuffer(NonNullPtr<GraphicsDevice> device, NonNullPtr<GraphicsTransferBuffer> buffer);
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
enum class BufferUsage : uint8
|
||||
{
|
||||
None = 0,
|
||||
@@ -33,4 +31,3 @@ namespace Juliet
|
||||
// Opaque
|
||||
struct GraphicsBuffer;
|
||||
struct GraphicsTransferBuffer;
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -10,9 +10,7 @@
|
||||
#define ALLOW_SHADER_HOT_RELOAD 0
|
||||
#endif
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
enum class DriverType : uint8
|
||||
enum class GraphicsDriverType : uint8
|
||||
{
|
||||
Any = 0,
|
||||
DX12 = 1,
|
||||
@@ -20,7 +18,6 @@ namespace Juliet
|
||||
|
||||
struct GraphicsConfig
|
||||
{
|
||||
DriverType PreferredDriver = DriverType::DX12;
|
||||
GraphicsDriverType PreferredDriver = GraphicsDriverType::DX12;
|
||||
bool EnableDebug;
|
||||
};
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
#include <Graphics/Shader.h>
|
||||
#include <Graphics/Texture.h>
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
// Forward Declare
|
||||
struct ColorTargetDescription;
|
||||
|
||||
@@ -222,4 +220,3 @@ namespace Juliet
|
||||
|
||||
// Opaque type
|
||||
struct GraphicsPipeline;
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <Graphics/Graphics.h>
|
||||
#include <Juliet.h>
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
extern bool ImGuiRenderer_Initialize(GraphicsDevice* device);
|
||||
extern void ImGuiRenderer_Shutdown(GraphicsDevice* device);
|
||||
extern void ImGuiRenderer_NewFrame();
|
||||
extern JULIET_API void ImGuiRenderer_Render(CommandList* cmdList, RenderPass* renderPass);
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <Juliet.h>
|
||||
#include <Core/Math/Vector.h>
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
struct PointLight
|
||||
{
|
||||
Vector3 Position;
|
||||
@@ -12,4 +10,3 @@ namespace Juliet
|
||||
Vector3 Color;
|
||||
float Intensity;
|
||||
};
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <Core/Common/CoreTypes.h>
|
||||
#include <Core/Common/NonNullPtr.h>
|
||||
@@ -7,8 +7,6 @@
|
||||
#include <Core/Math/Vector.h>
|
||||
#include <Juliet.h>
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
struct Arena;
|
||||
struct Vertex;
|
||||
|
||||
@@ -37,4 +35,3 @@ namespace Juliet
|
||||
MaterialAssetID MaterialAsset;
|
||||
Matrix Transform = MatrixIdentity();
|
||||
};
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <Core/Container/Vector.h>
|
||||
#include <Core/Math/Matrix.h>
|
||||
@@ -9,8 +9,6 @@
|
||||
#include <Graphics/Mesh.h>
|
||||
#include <Juliet.h>
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
struct GraphicsTransferBuffer;
|
||||
struct RenderPass;
|
||||
struct CommandList;
|
||||
@@ -57,4 +55,3 @@ namespace Juliet
|
||||
JULIET_API void ReloadMeshRendererShaders();
|
||||
#endif
|
||||
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <Core/Math/Matrix.h>
|
||||
#include <Core/Math/Vector.h>
|
||||
#include <Juliet.h>
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
struct PushData
|
||||
{
|
||||
Matrix ViewProjection;
|
||||
@@ -29,4 +27,3 @@ namespace Juliet
|
||||
|
||||
Vector4 MeshAlbedo;
|
||||
};
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <Graphics/Colors.h>
|
||||
#include <Graphics/Texture.h>
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
enum struct LoadOperation : uint8
|
||||
{
|
||||
Load, // Load the texture from memory (preserve)
|
||||
@@ -112,4 +110,3 @@ namespace Juliet
|
||||
|
||||
// Opaque Type
|
||||
struct RenderPass;
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <Core/Common/String.h>
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
// Opaque type
|
||||
struct Shader;
|
||||
|
||||
@@ -20,4 +18,3 @@ namespace Juliet
|
||||
String EntryPoint;
|
||||
};
|
||||
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <Juliet.h>
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
#include <Core/Math/Matrix.h>
|
||||
#include <Graphics/GraphicsConfig.h>
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
struct RenderPass;
|
||||
struct CommandList;
|
||||
struct Window;
|
||||
@@ -28,4 +26,3 @@ namespace Juliet
|
||||
JULIET_API void ReloadSkyboxShaders();
|
||||
#endif
|
||||
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
enum struct TextureFormat : uint8
|
||||
{
|
||||
Invalid,
|
||||
@@ -180,4 +178,3 @@ namespace Juliet
|
||||
|
||||
// Opaque Type
|
||||
struct Texture;
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
struct Vertex
|
||||
{
|
||||
float Position[3];
|
||||
@@ -10,4 +8,3 @@ namespace Juliet
|
||||
};
|
||||
|
||||
using Index = uint16;
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
#include <Core/Application/ApplicationManager.h>
|
||||
#include <Core/Application/ApplicationManager.h>
|
||||
#include <Core/JulietInit.h>
|
||||
|
||||
#include <Engine/Engine.h>
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
void StartApplication(IApplication& app, JulietInit_Flags flags)
|
||||
{
|
||||
InitializeEngine(flags);
|
||||
@@ -17,4 +15,3 @@ namespace Juliet
|
||||
|
||||
ShutdownEngine();
|
||||
}
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
#include <Core/Logging/LogManager.h>
|
||||
#include <Core/Logging/LogManager.h>
|
||||
#include <Core/Logging/LogTypes.h>
|
||||
#include <Core/Memory/Allocator.h>
|
||||
|
||||
#include <comdef.h> // For _com_error to decode HRESULTs
|
||||
#include <intrin.h> // For __debugbreak
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
void JulietAssert(const char* expression, const char* message, std::source_location location, long handleResult)
|
||||
{
|
||||
Log(LogLevel::Error, LogCategory::Core, "--- ASSERTION FAILED ---");
|
||||
@@ -35,4 +33,3 @@ namespace Juliet
|
||||
}
|
||||
buffer = {};
|
||||
}
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
#include <Core/Common/CoreUtils.h>
|
||||
#include <Core/Common/CoreUtils.h>
|
||||
#include <Core/Common/String.h>
|
||||
#include <Core/Logging/LogManager.h>
|
||||
#include <Core/Logging/LogTypes.h>
|
||||
#include <Core/Memory/MemoryArena.h>
|
||||
#include <Core/Memory/Utils.h>
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
namespace
|
||||
{
|
||||
constexpr int32 kUnknown_UNICODE = 0xFFFD;
|
||||
@@ -625,4 +623,3 @@ namespace Juliet
|
||||
return result;
|
||||
}
|
||||
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,5 +1,2 @@
|
||||
#include <Core/Container/Vector.h>
|
||||
#include <Core/Container/Vector.h>
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
#include <Core/Common/CoreTypes.h>
|
||||
#include <Core/Common/CoreTypes.h>
|
||||
#include <Core/HAL/Display/Display_cpp.h>
|
||||
#include <Core/HAL/Display/DisplayDevice.h>
|
||||
#include <Core/Memory/Allocator.h>
|
||||
#include <Core/Memory/MemoryArena.h>
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
namespace
|
||||
{
|
||||
DisplayDevice* g_CurrentDisplayDevice = nullptr;
|
||||
@@ -159,4 +157,3 @@ namespace Juliet
|
||||
{
|
||||
return g_CurrentDisplayDevice;
|
||||
}
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <Core/Common/NonNullPtr.h>
|
||||
#include <Core/Container/Vector.h>
|
||||
#include <Core/HAL/Display/Window.h>
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
// Driver to the display device.
|
||||
// Functions ptr will be set by the chosen factory
|
||||
// Acts as a singleton after Initialize has been called and is freed in Shutdown.
|
||||
@@ -44,4 +42,3 @@ namespace Juliet
|
||||
|
||||
// Utils
|
||||
extern DisplayDevice* GetDisplayDevice();
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
void InitializeDisplaySystem();
|
||||
void ShutdownDisplaySystem();
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#include <Core/HAL/Display/DisplayDevice.h>
|
||||
#include <Core/HAL/Display/DisplayDevice.h>
|
||||
#include <Core/HAL/Display/Win32/Win32DisplayEvent.h>
|
||||
#include <Core/HAL/Display/Win32/Win32Window.h>
|
||||
|
||||
namespace Juliet::Win32
|
||||
namespace Win32
|
||||
{
|
||||
namespace
|
||||
{
|
||||
@@ -43,10 +43,7 @@ namespace Juliet::Win32
|
||||
}
|
||||
} // namespace
|
||||
|
||||
} // namespace Juliet::Win32
|
||||
} // namespace Win32
|
||||
|
||||
// Factory cannot be in an anonymous/unknown namespace
|
||||
namespace Juliet
|
||||
{
|
||||
DisplayDeviceFactory Win32DisplayDeviceFactory = { .Name = "Win32", .CreateDevice = Win32::CreateDevice };
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include <Core/Common/EnumUtils.h>
|
||||
#include <Core/Common/EnumUtils.h>
|
||||
#include <Core/HAL/Display/DisplayDevice.h>
|
||||
#include <Core/HAL/Display/Win32/Win32DisplayEvent.h>
|
||||
#include <Core/HAL/Display/Win32/Win32Window.h>
|
||||
@@ -20,7 +20,7 @@
|
||||
extern IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
|
||||
#endif
|
||||
|
||||
namespace Juliet::Win32
|
||||
namespace Win32
|
||||
{
|
||||
namespace
|
||||
{
|
||||
@@ -276,4 +276,4 @@ namespace Juliet::Win32
|
||||
|
||||
return CallWindowProcA(DefWindowProcA, handle, message, wParam, lParam);
|
||||
}
|
||||
} // namespace Juliet::Win32
|
||||
} // namespace Win32
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <Core/Common/NonNullPtr.h>
|
||||
#include <Core/HAL/Win32.h>
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
struct DisplayDevice;
|
||||
}
|
||||
|
||||
namespace Juliet::Win32
|
||||
namespace Win32
|
||||
{
|
||||
extern void PumpEvents(NonNullPtr<DisplayDevice> self);
|
||||
extern LRESULT CALLBACK Win32MainWindowCallback(HWND Handle, UINT Message, WPARAM WParam, LPARAM LParam);
|
||||
} // namespace Juliet::Win32
|
||||
} // namespace Win32
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#include <Core/HAL/Display/Win32/Win32DisplayEvent.h>
|
||||
#include <Core/HAL/Display/Win32/Win32DisplayEvent.h>
|
||||
#include <Core/HAL/Display/Win32/Win32Window.h>
|
||||
#include <Core/HAL/Display/Window.h>
|
||||
#include <Core/Memory/Allocator.h>
|
||||
#include <Core/Memory/MemoryArena.h>
|
||||
|
||||
namespace Juliet::Win32
|
||||
namespace Win32
|
||||
{
|
||||
namespace
|
||||
{
|
||||
@@ -101,4 +101,4 @@ namespace Juliet::Win32
|
||||
auto& win32State = static_cast<Window32State&>(*window->State);
|
||||
SetWindowTextA(win32State.Handle, CStr(title));
|
||||
}
|
||||
} // namespace Juliet::Win32
|
||||
} // namespace Win32
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <Core/Common/NonNullPtr.h>
|
||||
#include <Core/HAL/Display/Window.h>
|
||||
#include <Core/HAL/Win32.h>
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
struct DisplayDevice;
|
||||
struct Window;
|
||||
} // namespace Juliet
|
||||
|
||||
namespace Juliet::Win32
|
||||
namespace Win32
|
||||
{
|
||||
// TODO : Evaluate if its worth the burden of casting to Window32State all the time
|
||||
struct Window32State : WindowState
|
||||
@@ -26,4 +23,4 @@ namespace Juliet::Win32
|
||||
extern void ShowWindow(NonNullPtr<DisplayDevice> self, NonNullPtr<Window> window);
|
||||
extern void HideWindow(NonNullPtr<DisplayDevice> self, NonNullPtr<Window> window);
|
||||
extern void SetWindowTitle(NonNullPtr<DisplayDevice> self, NonNullPtr<Window> window, String title);
|
||||
} // namespace Juliet::Win32
|
||||
} // namespace Win32
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <Core/Common/String.h>
|
||||
#include <Core/HAL/Display/Display.h>
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
struct Window;
|
||||
struct WindowState
|
||||
{
|
||||
@@ -21,4 +19,3 @@ namespace Juliet
|
||||
int32 Height;
|
||||
String Title;
|
||||
};
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
#include <Core/HAL/DynLib/DynamicLibrary.h>
|
||||
#include <Core/HAL/DynLib/DynamicLibrary.h>
|
||||
#include <Core/HAL/Win32.h>
|
||||
#include <Core/Logging/LogManager.h>
|
||||
#include <Core/Logging/LogTypes.h>
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
DynamicLibrary* LoadDynamicLibrary(const char* filename)
|
||||
{
|
||||
if (!filename)
|
||||
@@ -41,4 +39,3 @@ namespace Juliet
|
||||
{
|
||||
FreeLibrary(reinterpret_cast<HMODULE>(lib.Get()));
|
||||
}
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
#include <Core/Common/EnumUtils.h>
|
||||
#include <Core/Common/EnumUtils.h>
|
||||
#include <Core/HAL/Event/Keyboard_Private.h>
|
||||
#include <Core/HAL/Event/KeyboardMapping.h>
|
||||
#include <Core/HAL/Event/SystemEvent.h>
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
constexpr KeyboardID kGlobalKeyboardID = 0;
|
||||
|
||||
namespace
|
||||
@@ -162,4 +160,3 @@ namespace Juliet
|
||||
static_assert(ToUnderlying(KeyPosition::Up) == false);
|
||||
static_assert(sizeof(ScanCode) == sizeof(uint16));
|
||||
static_assert(ToUnderlying(ScanCode::Count) == 512);
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
#include <Core/Common/CoreUtils.h>
|
||||
#include <Core/Common/CoreUtils.h>
|
||||
#include <Core/Common/EnumUtils.h>
|
||||
#include <Core/HAL/Event/KeyboardMapping.h>
|
||||
#include <Core/HAL/Keyboard/KeyCode.h>
|
||||
#include <Core/HAL/Keyboard/ScanCode.h>
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
namespace
|
||||
{
|
||||
// clang-format off
|
||||
@@ -201,4 +199,3 @@ namespace Juliet
|
||||
// Handle everything else (characters that do not convert to ASCII code)
|
||||
return GetNonPrintableKeys(scanCode);
|
||||
}
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <Core/HAL/Keyboard/KeyCode.h>
|
||||
#include <Core/HAL/Keyboard/ScanCode.h>
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
// Transforms ScanCode into KeyCode using the default US ASCII Mapping
|
||||
extern KeyCode GetKeyCodeFromDefaultMapping(ScanCode scanCode, KeyMod keyModState);
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <Core/HAL/Keyboard/Keyboard.h>
|
||||
#include <Core/HAL/Keyboard/KeyCode.h>
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
extern bool SendKeyboardKey(uint64 timestamp, KeyboardID ID, Key key, KeyPosition keyPosition);
|
||||
extern void UpdateKeyboardstate(float deltaTime);
|
||||
|
||||
extern const KeyboardID kGlobalKeyboardID;
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
#include <Core/Common/EnumUtils.h>
|
||||
#include <Core/Common/EnumUtils.h>
|
||||
#include <Core/HAL/Display/Window.h>
|
||||
#include <Core/HAL/Event/Mouse_Private.h>
|
||||
#include <Core/HAL/Event/SystemEvent.h>
|
||||
#include <Core/HAL/Mouse/Mouse.h>
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
namespace
|
||||
{
|
||||
Mouse MouseState;
|
||||
@@ -155,4 +153,3 @@ namespace Juliet
|
||||
mouseState.DeltaY = 0.0f;
|
||||
}
|
||||
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <Core/HAL/Mouse/Mouse.h>
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
struct Window;
|
||||
|
||||
struct Mouse
|
||||
@@ -29,4 +27,3 @@ namespace Juliet
|
||||
extern void SendMouseButton(uint64 timestamp, NonNullPtr<Window> window, MouseID mouseID, MouseButton button, bool pressed);
|
||||
|
||||
extern const MouseID kGlobalMouseID;
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include <Core/HAL/Display/DisplayDevice.h>
|
||||
#include <Core/HAL/Display/DisplayDevice.h>
|
||||
#include <Core/HAL/Event/SystemEvent.h>
|
||||
|
||||
#include <Core/HAL/Event/Keyboard_Private.h>
|
||||
@@ -9,8 +9,6 @@
|
||||
|
||||
#pragma pop_macro("global")
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
namespace
|
||||
{
|
||||
// TODO : make my own queue / using vector
|
||||
@@ -97,4 +95,3 @@ namespace Juliet
|
||||
UpdateMouseState();
|
||||
}
|
||||
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
#include <Core/HAL/Keyboard/ScanCode.h>
|
||||
|
||||
namespace Juliet::Win32
|
||||
namespace Win32
|
||||
{
|
||||
// Conversion table from Win32 scan code to HID Usage Page (see Keyboard.h)
|
||||
// https://learn.microsoft.com/en-us/windows/win32/inputdev/about-keyboard-input#extended-key-flag
|
||||
@@ -267,4 +267,4 @@ namespace Juliet::Win32
|
||||
|
||||
};
|
||||
// clang-format on
|
||||
} // namespace Juliet::Win32
|
||||
} // namespace Win32
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
#include <Core/HAL/Display/Window.h>
|
||||
#include <Core/HAL/Display/Window.h>
|
||||
#include <Core/HAL/Event/SystemEvent.h>
|
||||
#include <Core/HAL/Event/WindowEvent.h>
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
bool SendWindowEvent(Window* window, EventType type)
|
||||
{
|
||||
Assert(window);
|
||||
@@ -18,4 +16,3 @@ namespace Juliet
|
||||
return evtPosted;
|
||||
}
|
||||
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
struct Window;
|
||||
enum class EventType : uint32;
|
||||
|
||||
extern bool SendWindowEvent(Window* window, EventType type);
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include <Core/Common/CoreTypes.h>
|
||||
#include <Core/Common/CoreTypes.h>
|
||||
#include <Core/Common/CoreUtils.h>
|
||||
#include <Core/Common/String.h>
|
||||
#include <Core/HAL/Filesystem/Filesystem.h>
|
||||
@@ -9,8 +9,6 @@
|
||||
#include <Core/Logging/LogTypes.h>
|
||||
#include <Core/Memory/Allocator.h>
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
namespace
|
||||
{
|
||||
String CachedBasePath = {};
|
||||
@@ -98,4 +96,3 @@ namespace Juliet
|
||||
CachedAssetBasePath.Size = 0;
|
||||
CachedAssetBasePath.Str = nullptr;
|
||||
}
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
namespace Juliet::Platform
|
||||
namespace Platform
|
||||
{
|
||||
extern String GetBasePath(NonNullPtr<Arena> arena);
|
||||
extern bool IsAbsolutePath(String path);
|
||||
} // namespace Juliet::Platform
|
||||
} // namespace Platform
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
#pragma once
|
||||
#pragma once
|
||||
|
||||
namespace Juliet
|
||||
{
|
||||
extern void InitFilesystem(NonNullPtr<Arena> arena);
|
||||
extern void ShutdownFilesystem();
|
||||
} // namespace Juliet
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
#include <Core/Common/String.h>
|
||||
#include <Core/Common/String.h>
|
||||
#include <Core/HAL/Filesystem/Filesystem_Platform.h>
|
||||
#include <Core/HAL/Win32.h>
|
||||
#include <Core/Logging/LogManager.h>
|
||||
#include <Core/Logging/LogTypes.h>
|
||||
#include <Core/Memory/Allocator.h>
|
||||
|
||||
namespace Juliet::Platform
|
||||
namespace Platform
|
||||
{
|
||||
String GetBasePath(NonNullPtr<Arena> arena)
|
||||
{
|
||||
@@ -91,4 +91,4 @@ namespace Juliet::Platform
|
||||
|
||||
return false;
|
||||
}
|
||||
} // namespace Juliet::Platform
|
||||
} // namespace Platform
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user