Skip to content

Commit 2d06120

Browse files
committed
Re-added 3D debug grid to render example
1 parent 4dae29b commit 2d06120

File tree

5 files changed

+9
-16
lines changed

5 files changed

+9
-16
lines changed

examples/game/src/entities/Player.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,6 @@
1818
// Static member initialisation
1919
const Siege::String Player::ENTITY_NAME("Player");
2020

21-
void Player::OnStart()
22-
{
23-
// Register the entity with systems
24-
}
25-
2621
void Player::OnUpdate()
2722
{
2823
// Get move axes as vector
@@ -49,11 +44,6 @@ void Player::OnUpdate()
4944
velocity = velocity * 0.9f;
5045
}
5146

52-
void Player::OnDestroy()
53-
{
54-
// Deregister the entity from systems before freeing it
55-
}
56-
5747
Siege::BoundedBox Player::GetBoundingBox() const
5848
{
5949
Siege::Vec3 position = transform.GetPosition();

examples/game/src/entities/Player.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,8 @@ class Player : public Siege::Entity
4040

4141
// Protected overrides
4242

43-
void OnStart() override;
44-
4543
void OnUpdate() override;
4644

47-
void OnDestroy() override;
48-
4945
private:
5046

5147
// Private fields

examples/render/src/main.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,8 @@ int main()
124124
window.GetHeight());
125125
OrthoCamera camera2D = OrthoCamera({0.f, -1.f, -2.5f}, {0.f, -1.f, 1.f});
126126

127+
Siege::Renderer3D::SetGridEnabled(true);
128+
127129
auto currentTime = std::chrono::high_resolution_clock::now();
128130

129131
bool inputEnabled = true;

make/Platform.mk

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ ifeq ($(OS), Windows_NT)
1818
COPY = powershell -executionpolicy bypass $(scriptsDir)/copy.ps1 $1 $2 $3
1919
VALIDATION_LAYERS_INSTALL_DIR := explicit_layer.d
2020
BUILD_FLAGS_SCRIPT = powershell -executionpolicy bypass $(scriptsDir)/buildflags.ps1 --Target $1 --CXXFlags $2 --Dirs $3
21+
BUILD_LIB = powershell -executionpolicy bypass $(scriptsDir)/combinelibs.ps1 --src_objs $1 --output_dir $2 --output_name $3
2122
COMBINE_LIBS = powershell -executionpolicy bypass $(scriptsDir)/combinelibs.ps1 --src_libs $1 --src_objs $2 --output_dir $3 --output_name $4
2223
PACKAGE_SCRIPT = powershell -executionpolicy bypass $(scriptsDir)/package.ps1 --pkg-name $1 --exe-name $2 --output-dir $3 --build-dir $4 $5
2324
else
24-
COMBINE_LIBS = $(scriptsDir)/combinelibs.sh --src_libs $1 --src_objs $2 --output_dir $3 --output_name $4
2525
# Check for MacOS/Linux
2626
UNAMEOS := $(shell uname)
2727
ifeq ($(UNAMEOS), Linux)
@@ -46,5 +46,7 @@ else
4646
COPY_DIR = $(call COPY,$1,$2,$3)
4747
VALIDATION_LAYERS_INSTALL_DIR := lib/explicit_layer.d
4848
BUILD_FLAGS_SCRIPT = $(scriptsDir)/buildflags.sh $1 "$2" "$3"
49+
BUILD_LIB = $(scriptsDir)/combinelibs.sh --src_objs $1 --output_dir $2 --output_name $3
50+
COMBINE_LIBS = $(scriptsDir)/combinelibs.sh --src_libs $1 --src_objs $2 --output_dir $3 --output_name $4
4951
PACKAGE_SCRIPT = $(scriptsDir)/package.sh $1 $2 $3 $4 $5
5052
endif

tests/core/test_SceneFile.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,10 +241,13 @@ UTEST_F(test_SceneFile, DeserialiseSingleEntity)
241241
// It should retain its standard field values
242242
ASSERT_STREQ("TestEntity1", entities[0]->GetName().Str());
243243
Vec3 pos(entities[0]->GetPosition());
244+
Vec3 rot(entities[0]->GetRotation());
244245
ASSERT_EQ(1.f, pos.x);
245246
ASSERT_EQ(2.f, pos.y);
246247
ASSERT_EQ(3.f, pos.z);
247-
ASSERT_EQ(25.f, entities[0]->GetRotation().y);
248+
ASSERT_EQ(0.f, rot.x);
249+
ASSERT_EQ(25.f, rot.y);
250+
ASSERT_EQ(0.f, rot.z);
248251
ASSERT_EQ(-3, entities[0]->GetZIndex());
249252

250253
// It should retain its custom data

0 commit comments

Comments
 (0)