Skip to content

Commit 13957c5

Browse files
committed
Update to new load system
1 parent 0934b57 commit 13957c5

22 files changed

Lines changed: 338 additions & 43 deletions

File tree

includes/scenes/MainFile.hpp

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
** Society: Creative Rift
3+
** SHIPWRECK ENGINE, 2021
4+
** Author: Guillaume S.
5+
** File name: Main.hpp
6+
** Description: [CHANGE]
7+
*/
8+
9+
#ifndef INCARIBUS_MAINFILE_HPP
10+
#define INCARIBUS_MAINFILE_HPP
11+
12+
#include "event/EventInfo.hpp"
13+
14+
class MainFile{
15+
public:
16+
std::string name() {return ("ye");}
17+
void onLoad(sw::EventInfo& info);
18+
};
19+
20+
#endif //INCARIBUS_MAINFILE_HPP

includes/script/entity/Entity.hpp

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/*
2+
** Society: Creative Rift
3+
** SHIPWRECK ENGINE, 2022
4+
** Author: Guillaume S.
5+
** File name: Entity.hpp
6+
** Description: [CHANGE]
7+
*/
8+
9+
#ifndef INCARIBUS_ENTITY_HPP
10+
#define INCARIBUS_ENTITY_HPP
11+
12+
#include "components/Components.hpp"
13+
#include "interface/IDoSetUp.hpp"
14+
#include "entity/EntityHealth.hpp"
15+
#include "utils/Reference.hpp"
16+
17+
namespace swc
18+
{
19+
class Entity : public sw::Component, public IDoSetup
20+
{
21+
protected:
22+
sw::Reference<EntityHealth> m_entityHealth;
23+
24+
public:
25+
explicit Entity(sw::GameObject& gameObject);
26+
~Entity() override;
27+
void DoSetup() override;
28+
29+
}; // class Entity
30+
} // namespace swc
31+
32+
#endif //INCARIBUS_ENTITY_HPP
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
** Society: Creative Rift
3+
** SHIPWRECK ENGINE, 2022
4+
** Author: Guillaume S.
5+
** File name: EntityHealth.cpp
6+
** Description: [CHANGE]
7+
*/
8+
9+
10+
#ifndef INCARIBUS_ENTITYHEALTH_HPP
11+
#define INCARIBUS_ENTITYHEALTH_HPP
12+
13+
#include "components/Components.hpp"
14+
#include "interface/IDoSetUp.hpp"
15+
16+
namespace swc
17+
{
18+
class EntityHealth : public sw::Component, public IDoSetup
19+
{
20+
protected:
21+
int m_maxHealth{};
22+
int m_currentHealth{};
23+
24+
public:
25+
explicit EntityHealth(sw::GameObject& gameObject);
26+
~EntityHealth() override;
27+
void DoSetup() override;
28+
};
29+
}
30+
31+
#endif //INCARIBUS_ENTITYHEALTH_HPP
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*
2+
** Society: Creative Rift
3+
** SHIPWRECK ENGINE, 2022
4+
** Author: Guillaume S.
5+
** File name: IDoSetup.hpp
6+
** Description: [CHANGE]
7+
*/
8+
9+
#ifndef INCARIBUS_IDOSETUP_HPP
10+
#define INCARIBUS_IDOSETUP_HPP
11+
12+
namespace swc
13+
{
14+
class IDoSetup
15+
{
16+
public:
17+
~IDoSetup() = default;
18+
virtual void DoSetup() = 0;
19+
}; // class IDoSetup
20+
} // namespace swc
21+
22+
#endif //INCARIBUS_IDOSETUP_HPP
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*
2+
** Society: Creative Rift
3+
** SHIPWRECK ENGINE, 2022
4+
** Author: Guillaume S.
5+
** File name: IDoTearDown.hpp
6+
** Description: [CHANGE]
7+
*/
8+
9+
#ifndef INCARIBUS_IDOTEARDOWN_HPP
10+
#define INCARIBUS_IDOTEARDOWN_HPP
11+
12+
namespace swc
13+
{
14+
class IDoTearDown
15+
{
16+
public:
17+
~IDoTearDown() = default;
18+
virtual void DoTearDown() = 0;
19+
}; // class IDoTearDown
20+
} // namespace swc
21+
22+
#endif //INCARIBUS_IDOTEARDOWN_HPP
305 KB
Binary file not shown.
295 KB
Binary file not shown.
298 KB
Binary file not shown.
299 KB
Binary file not shown.

out/Debug/resources/shaders/fragment_shader.glsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#version 460 core
2-
out vec4 FragColor;
2+
layout(location = 0) out vec4 FragColor;
33

44
in vec4 ourColor;
55
in vec2 TexCoord;

0 commit comments

Comments
 (0)