summaryrefslogtreecommitdiff
path: root/game/scenary/foliage.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-04-10 14:33:54 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2023-04-10 14:33:54 +0100
commite428f2145ac3b05345d42e3518a22d429ad0970e (patch)
treee5b7cf88e9978413ff701467242a43ac4d83bdd3 /game/scenary/foliage.h
parentoperator* collection helper reserves target space when possible (diff)
downloadilt-e428f2145ac3b05345d42e3518a22d429ad0970e.tar.bz2
ilt-e428f2145ac3b05345d42e3518a22d429ad0970e.tar.xz
ilt-e428f2145ac3b05345d42e3518a22d429ad0970e.zip
Add the plant/foliage game item concepts
Diffstat (limited to 'game/scenary/foliage.h')
-rw-r--r--game/scenary/foliage.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/game/scenary/foliage.h b/game/scenary/foliage.h
new file mode 100644
index 0000000..229bccb
--- /dev/null
+++ b/game/scenary/foliage.h
@@ -0,0 +1,21 @@
+#pragma once
+
+#include "assetFactory/asset.h"
+
+class SceneShader;
+class ShadowMapper;
+class Location;
+
+class Foliage : public Asset, public StdTypeDefs<Foliage> {
+ Mesh::Ptr bodyMesh;
+ std::shared_ptr<Texture> texture;
+
+public:
+ void render(const SceneShader &, const Location &) const;
+ void shadows(const ShadowMapper &, const Location &) const;
+
+protected:
+ friend Persistence::SelectionPtrBase<std::shared_ptr<Foliage>>;
+ bool persist(Persistence::PersistenceStore & store) override;
+ void postLoad() override;
+};