Compare commits
2 Commits
DICOM_View
...
4002030de8
| Author | SHA256 | Date | |
|---|---|---|---|
| 4002030de8 | |||
| 4fce05a927 |
@@ -1,2 +1,5 @@
|
|||||||
# TSE
|
# TSE
|
||||||
|
|
||||||
|
packages needed for building under linux:
|
||||||
|
|
||||||
|
build-essential llvm cmake ninja-build clang mesa-common-dev gdb
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
#include "OrdererSpriteSet.hpp"
|
#include "OrdererSpriteSet.hpp"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <tuple>
|
#include <tuple>
|
||||||
|
#include <cmath>
|
||||||
#include "Debug.hpp"
|
#include "Debug.hpp"
|
||||||
|
|
||||||
TSE::OrdererSpriteSetChunk::OrdererSpriteSetChunk(int _chunksize, const Vector2 &_pos, SortingOrder _order)
|
TSE::OrdererSpriteSetChunk::OrdererSpriteSetChunk(int _chunksize, const Vector2 &_pos, SortingOrder _order)
|
||||||
@@ -210,14 +211,6 @@ const std::vector<TSE::Vector2> *TSE::OrdererSpriteSet::GetChunkPositionsInOrder
|
|||||||
}
|
}
|
||||||
|
|
||||||
dirty = false;
|
dirty = false;
|
||||||
string poses = "[";
|
|
||||||
for(auto pos : orderedChunks)
|
|
||||||
{
|
|
||||||
poses += pos.ToString() + ",";
|
|
||||||
}
|
|
||||||
poses.erase(poses.end() - 1);
|
|
||||||
poses += "]";
|
|
||||||
TSE_LOG("orderedPositions: " + poses);
|
|
||||||
}
|
}
|
||||||
return &orderedChunks;
|
return &orderedChunks;
|
||||||
}
|
}
|
||||||
@@ -245,7 +238,7 @@ void TSE::OrdererSpriteSet::DirtyAll()
|
|||||||
|
|
||||||
TSE::Vector2 TSE::OrdererSpriteSet::LocalToChunkPos(const Vector2 &v)
|
TSE::Vector2 TSE::OrdererSpriteSet::LocalToChunkPos(const Vector2 &v)
|
||||||
{
|
{
|
||||||
Vector2 p = Vector2((int)v.x % chunkSize, (int)v.y % chunkSize);
|
Vector2 p = Vector2(std::fmod(v.x, chunkSize), std::fmod(v.y, chunkSize));
|
||||||
if(p.x < 0) p.x += chunkSize;
|
if(p.x < 0) p.x += chunkSize;
|
||||||
if(p.y < 0) p.y += chunkSize;
|
if(p.y < 0) p.y += chunkSize;
|
||||||
return p;
|
return p;
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ namespace TSE
|
|||||||
Rect bounds = Rect(0,0,0,0);
|
Rect bounds = Rect(0,0,0,0);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
int chunkSize = 16;
|
float chunkSize = 16;
|
||||||
SortingOrder order = TopRight;
|
SortingOrder order = TopRight;
|
||||||
TileSet* set;
|
TileSet* set;
|
||||||
std::unordered_map<Vector2, OrdererSpriteSetChunk> chunks;
|
std::unordered_map<Vector2, OrdererSpriteSetChunk> chunks;
|
||||||
|
|||||||
@@ -8,13 +8,14 @@
|
|||||||
#include "BehaviourScripts/PhysicsObject.hpp"
|
#include "BehaviourScripts/PhysicsObject.hpp"
|
||||||
#include "BehaviourScripts/basicEditorCamera.hpp"
|
#include "BehaviourScripts/basicEditorCamera.hpp"
|
||||||
|
|
||||||
TSE::EDITOR::EditorSubsystem::EditorSubsystem() : sv(nullptr), editorLayer("")
|
TSE::EDITOR::EditorSubsystem::EditorSubsystem(ConsolView* cvp) : sv(nullptr), editorLayer("")
|
||||||
{
|
{
|
||||||
rt = IRenderTexture::factory->CreateTextureHeap({100,100}, 5);
|
rt = IRenderTexture::factory->CreateTextureHeap({100,100}, 5);
|
||||||
sv = SceneView(rt);
|
sv = SceneView(rt);
|
||||||
|
cv = cvp;
|
||||||
|
|
||||||
controller.AddGuiElement("Scene", &sv);
|
controller.AddGuiElement("Scene", &sv);
|
||||||
controller.AddGuiElement("Consol", &cv);
|
controller.AddGuiElement("Consol", cv);
|
||||||
controller.AddGuiElement("Hirearchie", &hv);
|
controller.AddGuiElement("Hirearchie", &hv);
|
||||||
controller.AddGuiElement("Properties", &pv);
|
controller.AddGuiElement("Properties", &pv);
|
||||||
controller.AddGuiElement("Debug", &dv);
|
controller.AddGuiElement("Debug", &dv);
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ namespace TSE::EDITOR
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ViewportController controller;
|
ViewportController controller;
|
||||||
ConsolView cv;
|
ConsolView* cv = nullptr;
|
||||||
DebugView dv;
|
DebugView dv;
|
||||||
HirearchieView hv = HirearchieView(nullptr);
|
HirearchieView hv = HirearchieView(nullptr);
|
||||||
PropertiesView pv;
|
PropertiesView pv;
|
||||||
@@ -24,6 +24,6 @@ namespace TSE::EDITOR
|
|||||||
SceneView sv;
|
SceneView sv;
|
||||||
Layer editorLayer;
|
Layer editorLayer;
|
||||||
|
|
||||||
EditorSubsystem();
|
EditorSubsystem(ConsolView* cvp);
|
||||||
};
|
};
|
||||||
} // namespace TSE::EDITOR
|
} // namespace TSE::EDITOR
|
||||||
|
|||||||
@@ -934,7 +934,7 @@ namespace TSE::EDITOR
|
|||||||
}
|
}
|
||||||
|
|
||||||
ImGui::BeginDisabled();
|
ImGui::BeginDisabled();
|
||||||
ImGui::DragInt("Chunk Size", &element->chunkSize, 1.0f);
|
ImGui::DragFloat("Chunk Size", &element->chunkSize, 1.0f);
|
||||||
ImGui::EndDisabled();
|
ImGui::EndDisabled();
|
||||||
|
|
||||||
if (debug)
|
if (debug)
|
||||||
|
|||||||
Reference in New Issue
Block a user