From 376f3f7693b5fa3339bbe760bdadb29d83ab8f7b Mon Sep 17 00:00:00 2001 From: q66 Date: Sat, 25 Apr 2020 20:02:52 +0200 Subject: [PATCH] add missing file --- src/engine/blend.hh | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 src/engine/blend.hh diff --git a/src/engine/blend.hh b/src/engine/blend.hh new file mode 100644 index 0000000..c360fca --- /dev/null +++ b/src/engine/blend.hh @@ -0,0 +1,45 @@ +#ifndef BLEND_HH +#define BLEND_HH + +#include + +#include +#include + +extern int worldsize; /* FIXME: remove */ + +void optimizeblendmap(); +void resetblendmap(); +void enlargeblendmap(); +void shrinkblendmap(int octant); +bool usesblendmap(int x1 = 0, int y1 = 0, int x2 = worldsize, int y2 = worldsize); +void cleanupblendmap(); + +int calcblendlayer(int x1, int y1, int x2, int y2); +void bindblendtexture(const ivec &p); +void updateblendtextures(int x1 = 0, int y1 = 0, int x2 = worldsize, int y2 = worldsize); +void renderblendtexture(uchar *dst, int dsize, int dx, int dy, int dw, int dh); +void clearblendtextures(); + +extern int blendpaintmode; + +void stoppaintblendmap(); +void trypaintblendmap(); + +void renderblendbrush(GLuint tex, float x, float y, float w, float h); +void renderblendbrush(); + +bool loadblendmap(stream *f, int info); +void saveblendmap(stream *f); +uchar shouldsaveblendmap(); + +/* currently not used */ + +struct BlendMapCache; +BlendMapCache *newblendmapcache(); +void freeblendmapcache(BlendMapCache *&cache); +bool setblendmaporigin(BlendMapCache *cache, const ivec &o, int size); +bool hasblendmap(BlendMapCache *cache); +uchar lookupblendmap(BlendMapCache *cache, const vec &pos); + +#endif