v1.4.4
This commit is contained in:
commit
9c94d113d3
10260 changed files with 1237388 additions and 0 deletions
47
attic/old_source/StarFlowingLiquidAgent.hpp
Normal file
47
attic/old_source/StarFlowingLiquidAgent.hpp
Normal file
|
@ -0,0 +1,47 @@
|
|||
#ifndef STAR_FLOWING_LIQUID_AGENT_HPP
|
||||
#define STAR_FLOWING_LIQUID_AGENT_HPP
|
||||
|
||||
#include "StarRandom.hpp"
|
||||
#include "StarVector.hpp"
|
||||
#include "StarLiquidTypes.hpp"
|
||||
|
||||
namespace Star {
|
||||
|
||||
STAR_CLASS(LivingWorldAgent);
|
||||
STAR_CLASS(LivingWorldFacade);
|
||||
STAR_CLASS(FlowingLiquidAgent);
|
||||
|
||||
class FlowingLiquidAgent {
|
||||
public:
|
||||
FlowingLiquidAgent();
|
||||
|
||||
void bind(LivingWorldFacadePtr world, LivingWorldAgent* livingWorld);
|
||||
void processLocation(Vec2I const& location);
|
||||
|
||||
private:
|
||||
LiquidLevel getLiquidLevel(int x, int y);
|
||||
bool hasBackground(int x, int y);
|
||||
bool isOcean(int x, int y);
|
||||
LiquidId oceanLiquid(int x, int y);
|
||||
uint16_t oceanLiquidPressure(int x, int y);
|
||||
|
||||
|
||||
void moveLiquid(int x, int y, int dx, int dy, LiquidLevel proposedSourceLevel, LiquidLevel proposedTargetLevel);
|
||||
void setLiquidLevel(int x, int y, LiquidLevel level);
|
||||
|
||||
bool moveLiquidDown(Vec2I c, LiquidLevel above, bool attemptMoveOut);
|
||||
bool moveLiquidSideWays(Vec2I c, int fountain);
|
||||
int checkMoveLiquidSideways(int x, int y, LiquidLevel level);
|
||||
bool moveLiquidUpwards(Vec2I c, LiquidLevel level);
|
||||
bool moveLiquidOut(Vec2I c);
|
||||
|
||||
bool sanityCheckLiquid(LiquidLevel const& level) const;
|
||||
|
||||
LivingWorldAgent* m_livingWorld;
|
||||
RandomSource m_random;
|
||||
LivingWorldFacadePtr m_world;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue