Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/ecs/ecs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ class ECS
void updateSystems(ECSSystemList& systems, float delta);

private:
Array<BaseECSSystem*> systems;
Map<uint32, Array<uint8>> components;
Array<std::pair<uint32, Array<std::pair<uint32, uint32> > >* > entities;

Expand Down
2 changes: 1 addition & 1 deletion src/ecs/ecsSystem.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "ecsSystem.hpp"

bool BaseECSSystem::isValid()
bool BaseECSSystem::isValid() const
{
for(uint32 i = 0; i < componentFlags.size(); i++) {
if((componentFlags[i] & BaseECSSystem::FLAG_OPTIONAL) == 0) {
Expand Down
8 changes: 4 additions & 4 deletions src/ecs/ecsSystem.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ class BaseECSSystem
};
BaseECSSystem() {}
virtual void updateComponents(float delta, BaseECSComponent** components) {}
const Array<uint32>& getComponentTypes()
const Array<uint32>& getComponentTypes() const
{
return componentTypes;
}
const Array<uint32>& getComponentFlags()
const Array<uint32>& getComponentFlags() const
{
return componentFlags;
}
bool isValid();
bool isValid() const;
protected:
void addComponentType(uint32 componentType, uint32 componentFlag = 0)
{
Expand All @@ -42,7 +42,7 @@ class ECSSystemList
systems.push_back(&system);
return true;
}
inline size_t size() {
inline size_t size() const {
return systems.size();
}
inline BaseECSSystem* operator[](uint32 index) {
Expand Down