Skip to content

Commit

Permalink
Update company name
Browse files Browse the repository at this point in the history
  • Loading branch information
larioteo committed Dec 30, 2023
1 parent 5d75c17 commit 2fc36c7
Show file tree
Hide file tree
Showing 17 changed files with 150 additions and 90 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@
*.vcxproj
*.vcxproj.filters
*.vcxproj.user

2 changes: 1 addition & 1 deletion License
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021-present Omni Vortex Studios
Copyright (c) 2020-present VITX-Studios

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
18 changes: 9 additions & 9 deletions Scripts/Update.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
Set-Location "$PSScriptRoot\..\"

### Update SubTree
git subtree pull --prefix=3rd-Party/assimp https://github.com/OmniVortexStudios/assimp.git master --squash
git subtree pull --prefix=3rd-Party/entt https://github.com/OmniVortexStudios/entt.git master --squash
git subtree pull --prefix=3rd-Party/freetype https://github.com/OmniVortexStudios/freetype.git master --squash
git subtree pull --prefix=3rd-Party/glm https://github.com/OmniVortexStudios/glm.git master --squash
git subtree pull --prefix=3rd-Party/imgui https://github.com/OmniVortexStudios/imgui.git docking --squash
git subtree pull --prefix=3rd-Party/msdf-atlas-gen https://github.com/OmniVortexStudios/msdf-atlas-gen.git master --squash
git subtree pull --prefix=3rd-Party/msdfgen https://github.com/OmniVortexStudios/msdfgen.git master --squash
git subtree pull --prefix=3rd-Party/stb https://github.com/OmniVortexStudios/stb.git master --squash
git subtree pull --prefix=3rd-Party/yaml-cpp https://github.com/OmniVortexStudios/yaml-cpp.git master --squash
git subtree pull --prefix=3rd-Party/assimp https://github.com/vitx-studios/assimp.git master --squash
git subtree pull --prefix=3rd-Party/entt https://github.com/vitx-studios/entt.git master --squash
git subtree pull --prefix=3rd-Party/freetype https://github.com/vitx-studios/freetype.git master --squash
git subtree pull --prefix=3rd-Party/glm https://github.com/vitx-studios/glm.git master --squash
git subtree pull --prefix=3rd-Party/imgui https://github.com/vitx-studios/imgui.git docking --squash
git subtree pull --prefix=3rd-Party/msdf-atlas-gen https://github.com/vitx-studios/msdf-atlas-gen.git master --squash
git subtree pull --prefix=3rd-Party/msdfgen https://github.com/vitx-studios/msdfgen.git master --squash
git subtree pull --prefix=3rd-Party/stb https://github.com/vitx-studios/stb.git master --squash
git subtree pull --prefix=3rd-Party/yaml-cpp https://github.com/vitx-studios/yaml-cpp.git master --squash

### Update MainTree
git pull origin master
Expand Down
1 change: 1 addition & 0 deletions Solution.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ workspace "Ultra Spectra"
group "3rd-Party"
include "3rd-Party/3rd-Party.lua"
group ""

2 changes: 1 addition & 1 deletion Source/Library/Library.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
staticruntime "on"
toolset "msc"
warnings "Extra"

debugdir "%{wks.location}/Build/%{cfg.buildcfg}"
files { "**.h", "**.cpp", "**.cppm", "**.cxx", "**.inl", "**.ixx", "**.natvis" }
postbuildcommands {
Expand Down
6 changes: 3 additions & 3 deletions Source/Library/Ultra/Core/Application.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public:
mContext = Context::Create(mWindow->GetNativeWindow());
mContext->Attach();
mContext->Load();
mContext->SetViewport(mWindow->GetContexttSize().Width, mWindow->GetContexttSize().Height);
mContext->SetViewport(mWindow->GetContextSize().Width, mWindow->GetContextSize().Height);
mContext->SetVSync(true);
mContext->Clear();

Expand Down Expand Up @@ -272,7 +272,7 @@ protected:
context->Attach();
context->Load();

auto &[width, height] = GetWindow().GetContexttSize();
auto &[width, height] = GetWindow().GetContextSize();
context->SetViewport(width, height);

for (auto *layer : layers) layer->Detach();
Expand Down Expand Up @@ -321,7 +321,7 @@ protected:
}

case WindowAction::Resize: {
mContext->SetViewport(mWindow->GetContexttSize().Width, mWindow->GetContexttSize().Height);
mContext->SetViewport(mWindow->GetContextSize().Width, mWindow->GetContextSize().Height);
break;
}

Expand Down
20 changes: 16 additions & 4 deletions Source/Library/Ultra/Math/Vector.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -598,25 +598,37 @@ struct VectorBase<bool, N, VectorAliases::None>: public VectorData<bool, N, Vect
/// @brief Aliases
///

using Vector2 = VectorBase<float, 2, VectorAliases::Coordinate>;
using Vector3 = VectorBase<float, 3, VectorAliases::Coordinate>;
using Vector4 = VectorBase<float, 4, VectorAliases::Coordinate>;

using Acceleration2D = VectorBase<float, 2, VectorAliases::None>;
using Acceleration3D = VectorBase<float, 3, VectorAliases::None>;

using Direction2D = VectorBase<float, 2, VectorAliases::Coordinate>;
using Direction3D = VectorBase<float, 3, VectorAliases::Coordinate>;

using Force2D = VectorBase<float, 2, VectorAliases::None>;
using Force3D = VectorBase<float, 3, VectorAliases::None>;

using Normal2D = VectorBase<float, 2, VectorAliases::Normal>;
using Normal3D = VectorBase<float, 3, VectorAliases::Normal>;

using Position2D = VectorBase<float, 2, VectorAliases::Coordinate>;
using Position3D = VectorBase<float, 3, VectorAliases::Coordinate>;
using Position4D = VectorBase<float, 4, VectorAliases::Coordinate>;

//using Rotation2D = VectorBase<float, 1, VectorAliases::None>;
using Rotation2D = VectorBase<float, 2, VectorAliases::None>; // ToDo: Are two components needed here?
using Rotation3D = VectorBase<float, 3, VectorAliases::Rotation>;

using Scale2D = VectorBase<float, 2, VectorAliases::None>;
using Scale3D = VectorBase<float, 3, VectorAliases::None>;

using TextureCoord2D = VectorBase<float, 2, VectorAliases::TextureCoordinate>;
using TextureCoord3D = VectorBase<float, 3, VectorAliases::TextureCoordinate>;

using Vector2 = VectorBase<float, 2, VectorAliases::Coordinate>;
using Vector3 = VectorBase<float, 3, VectorAliases::Coordinate>;
using Vector4 = VectorBase<float, 4, VectorAliases::Coordinate>;
using Velocity2D = VectorBase<float, 2, VectorAliases::None>;
using Velocity3D = VectorBase<float, 3, VectorAliases::None>;

///
/// @brief Test Interface
Expand Down
54 changes: 28 additions & 26 deletions Source/Library/Ultra/Platform/System/WinAPI/WinEvent.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
import <Windows.h>;
import <WindowsX.h>;

#ifndef HID_USAGE_PAGE_GENERIC
#define HID_USAGE_PAGE_GENERIC ((USHORT) 0x01)
#endif
#ifndef HID_USAGE_GENERIC_MOUSE
#define HID_USAGE_GENERIC_MOUSE ((USHORT) 0x02)
#endif
#ifndef HID_USAGE_PAGE_GENERIC
#define HID_USAGE_PAGE_GENERIC ((USHORT) 0x01)
#endif

import Ultra.Platform.UI.WinAPI.Window;
import Ultra.Core.Event.Data;
Expand All @@ -19,11 +19,6 @@ namespace Ultra {
// Properties
RAWINPUTDEVICE RawInputDevice[1];

// Default
WinEventListener::WinEventListener() {}
WinEventListener::~WinEventListener() {}


// Events
bool WinEventListener::Callback(void *event) {
return Register(event) ? false : true;
Expand All @@ -41,10 +36,10 @@ intptr_t WinEventListener::Register(void *event) {
// Properties
LRESULT result = 1;
MSG &msg = *reinterpret_cast<MSG *>(event);
[[maybe_unused]] HWND &hWnd = msg.hwnd;
[[maybe_unused]] UINT &uMsg = msg.message;
[[maybe_unused]] WPARAM &wParam = msg.wParam;
[[maybe_unused]] LPARAM &lParam = msg.lParam;
HWND &hWnd = msg.hwnd;
UINT &uMsg = msg.message;
WPARAM &wParam = msg.wParam;
LPARAM &lParam = msg.lParam;

static bool Initialized = false;
if (!Initialized) {
Expand All @@ -56,16 +51,19 @@ intptr_t WinEventListener::Register(void *event) {
RegisterRawInputDevices(RawInputDevice, 1, sizeof(RawInputDevice[0]));
}

// Do the magic
// Sources:
// - Raw Input: https://docs.microsoft.com/en-us/windows/win32/inputdev/raw-input-notifications
// - Keyboard Input: https://docs.microsoft.com/en-us/windows/win32/inputdev/keyboard-input-notifications
// - Mouse Input: https://docs.microsoft.com/en-us/windows/win32/inputdev/mouse-input-notifications
///
/// Do the magic
/// Sources:
/// - Raw Input: https://docs.microsoft.com/en-us/windows/win32/inputdev/raw-input-notifications
/// - Keyboard Input: https://docs.microsoft.com/en-us/windows/win32/inputdev/keyboard-input-notifications
/// - Mouse Input: https://docs.microsoft.com/en-us/windows/win32/inputdev/mouse-input-notifications

// Pre-Flight-Test: Check if there are any observers in the groups, so the user gets only what he needs.
switch (uMsg) {
/**
* Input Events
*/
///
/// Input Events
///

// Raw (must be requested by HighPrecision flag)
case WM_INPUT: {
//if (MouseEvent.Empty()) break; // || KeyboardEvent.Empty()
Expand Down Expand Up @@ -242,7 +240,6 @@ intptr_t WinEventListener::Register(void *event) {
}
}


// Get Modifiers
data.Modifier.Control = GetKeyState(VK_CONTROL);
data.Modifier.Shift = GetKeyState(VK_SHIFT);
Expand Down Expand Up @@ -377,7 +374,7 @@ intptr_t WinEventListener::Register(void *event) {
MouseEventData data;
data.Action = MouseAction::Wheel;

data.DeltaWheelY =(float) GET_WHEEL_DELTA_WPARAM(msg.wParam) / (float)WHEEL_DELTA;
data.DeltaWheelY = (float)GET_WHEEL_DELTA_WPARAM(msg.wParam) / (float)WHEEL_DELTA;

Input::sMouseWheelDelta = data.DeltaWheelY;

Expand Down Expand Up @@ -421,9 +418,11 @@ intptr_t WinEventListener::Register(void *event) {
break;
}

/**
* Window Events (they serve only for notification purposes, the windows handle the events on their own)
*/
///
/// Window Events
/// They serve only for notification purposes, the windows handle the events on their own.
///

// Information
case WM_DPICHANGED: {
WindowEventData data;
Expand Down Expand Up @@ -563,7 +562,10 @@ intptr_t WinEventListener::Register(void *event) {
}
break;
}


///
/// Nothing of interest
///
default: {
break;
}
Expand Down
13 changes: 7 additions & 6 deletions Source/Library/Ultra/Platform/System/WinAPI/WinEvent.ixx
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
module;

export module Ultra.Platform.System.WinAPI.Event;
export module Ultra.Platform.System.WinAPI.Event;

import Ultra.Core;
import Ultra.System.Event;

export namespace Ultra {

// Events: https://msdn.microsoft.com/en-us/library/windows/desktop/ms644958%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396
///
/// WinEvents
/// Source: https://msdn.microsoft.com/en-us/library/windows/desktop/ms644958%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396
///
class WinEventListener: public EventListener {
public:
// Default
WinEventListener();
virtual ~WinEventListener();
WinEventListener() = default;
virtual ~WinEventListener() = default;

// Events
virtual bool Callback(void *event) override;
Expand Down
Loading

0 comments on commit 2fc36c7

Please sign in to comment.