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