-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MRG] Overhaul atmos and introduce world's subsystems
Base changes for new atmos locales logic, which supports z-levels, and produces more accurate locales. Also atmos is mostly prepared for moving to separate thread. For this purpose subsystems are introduced. Also some minor bugs are fixed. At the GameLogic side opacity and airtightness attributes are added to Object. Airtightness is used for locales creating and opacity will be used later. PR #74
- Loading branch information
Showing
47 changed files
with
700 additions
and
551 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#pragma once | ||
|
||
#include <chrono> | ||
|
||
#include <Shared/IFaces/IFace.h> | ||
|
||
struct ISubsystem : IFace { | ||
virtual void Update(std::chrono::microseconds timeElapsed) = 0; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#pragma once | ||
|
||
#include <chrono> | ||
#include <list> | ||
|
||
#include <Shared/IFaces/IFace.h> | ||
#include <Shared/Geometry/DirectionSet.h> | ||
|
||
class Object; | ||
class Map; | ||
|
||
struct ITile : public IFace { | ||
virtual void Update(std::chrono::microseconds timeElapsed) = 0; | ||
|
||
virtual bool MoveTo(Object *) = 0; | ||
virtual void PlaceTo(Object *) = 0; | ||
virtual bool RemoveObject(Object *obj) = 0; | ||
|
||
virtual const std::list<Object *> &Content() const = 0; | ||
|
||
virtual uf::vec3i GetPos() const = 0; | ||
virtual ITile *StepTo(uf::Direction direction) const = 0; | ||
virtual Map *GetMap() const = 0; | ||
|
||
virtual bool IsDense(uf::DirectionSet directions) const = 0; | ||
virtual Object *GetDenseObject(uf::DirectionSet directions) const = 0; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#pragma once | ||
|
||
#include <Shared/IFaces/IHasRepeatableID.h> | ||
#include <Shared/Geometry/DirectionSet.h> | ||
|
||
#include <World/ISubsystem.h> | ||
|
||
namespace subsystem { | ||
|
||
namespace atmos { | ||
|
||
struct ILocale : public IFace, public IHasRepeatableID { | ||
|
||
}; | ||
|
||
} // namespace atmos | ||
|
||
struct IAtmos : public ISubsystem { | ||
|
||
}; | ||
|
||
} // namespace subsystem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#pragma once | ||
|
||
#include <World/ITile.h> | ||
#include <World/Subsystems/IAtmos.h> | ||
|
||
namespace subsystem { | ||
namespace atmos { | ||
|
||
struct IAtmosTile : public ITile { | ||
virtual bool SynchronizeAtmos() = 0; | ||
|
||
virtual ILocale *GetLocale() = 0; | ||
virtual void SetLocale(ILocale *locale) = 0; | ||
|
||
virtual uf::DirectionSetFractional GetAirtightness() const = 0; | ||
virtual float GetAirtightnessTo(uf::Direction direction) const = 0; | ||
}; | ||
|
||
} // namespace atmos | ||
} // namespace subsystem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.