summaryrefslogtreecommitdiffstats
path: root/rwsdk/include/d3d8/rpltmap.h
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2019-05-18 12:39:39 +0200
committeraap <aap@papnet.eu>2019-05-18 12:39:39 +0200
commit9e496100b7baff8834658f577d3138d9f8fc3765 (patch)
treea725be9b0dba9a4ce76c19a6629ef62c36e46814 /rwsdk/include/d3d8/rpltmap.h
parentfixed pathfind (diff)
downloadre3-9e496100b7baff8834658f577d3138d9f8fc3765.tar
re3-9e496100b7baff8834658f577d3138d9f8fc3765.tar.gz
re3-9e496100b7baff8834658f577d3138d9f8fc3765.tar.bz2
re3-9e496100b7baff8834658f577d3138d9f8fc3765.tar.lz
re3-9e496100b7baff8834658f577d3138d9f8fc3765.tar.xz
re3-9e496100b7baff8834658f577d3138d9f8fc3765.tar.zst
re3-9e496100b7baff8834658f577d3138d9f8fc3765.zip
Diffstat (limited to 'rwsdk/include/d3d8/rpltmap.h')
-rw-r--r--rwsdk/include/d3d8/rpltmap.h90
1 files changed, 90 insertions, 0 deletions
diff --git a/rwsdk/include/d3d8/rpltmap.h b/rwsdk/include/d3d8/rpltmap.h
new file mode 100644
index 00000000..5add9a26
--- /dev/null
+++ b/rwsdk/include/d3d8/rpltmap.h
@@ -0,0 +1,90 @@
+
+/**
+ * \defgroup rpltmap RpLtMap
+ * \ingroup rpplugin
+ *
+ * Lightmap Plugin for RenderWare Graphics.
+ */
+
+#ifndef RPLTMAP_H
+#define RPLTMAP_H
+
+/*===========================================================================*
+ *--- Includes --------------------------------------------------------------*
+ *===========================================================================*/
+
+#include "rwcore.h"
+#include "rpworld.h"
+
+
+#define rpLTMAPDEFAULTLIGHTMAPSIZE 128
+#define rpLTMAPMINLIGHTMAPSIZE 16
+#define rpLTMAPMAXLIGHTMAPSIZE 512/*?? any better way of determining this ??*/
+
+#define rpLTMAPMAXPREFIXSTRINGLENGTH 4
+
+#define rpLTMAPDEFAULTMAXAREALIGHTSAMPLESPERMESH 256
+/* The default tolerance for errors induced by area light ROIs is 1
+ * (being the smallest difference in lightmap colour values) */
+#define rpLTMAPDEFAULTAREALIGHTROICUTOFF (1.0f)
+
+
+/**
+ * \ingroup rpltmap
+ * \ref RpLtMapStyle
+ * Flags specifying the rendering style of the lightmap plugin.
+ *
+ * \see RpLtMapGetRenderStyle
+ * \see RpLtMapSetRenderStyle
+ */
+enum RpLtMapStyle
+{
+ rpLTMAPSTYLENASTYLE = 0x0,
+
+ rpLTMAPSTYLERENDERBASE = 0x1, /**< The base texture should be rendered */
+ rpLTMAPSTYLERENDERLIGHTMAP = 0x2, /**< The lightmap should be rendered */
+ rpLTMAPSTYLEPOINTSAMPLE = 0x4, /**< The lightmap should be point-sampled */
+
+ rpLTMAPSTYLEFORCEENUMSIZEINT = 0x7FFFFFFF
+};
+typedef enum RpLtMapStyle RpLtMapStyle;
+
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif /* __cplusplus */
+
+
+extern RwBool
+RpLtMapPluginAttach(void);
+
+extern RxPipeline *
+RpLtMapGetPlatformAtomicPipeline(void);
+extern RxPipeline *
+RpLtMapGetPlatformWorldSectorPipeline(void);
+
+extern RwBool
+RpLtMapSetRenderStyle(RpLtMapStyle style, RpWorld *world);
+extern RpLtMapStyle
+RpLtMapGetRenderStyle(void);
+
+extern RwUInt32
+RpLtMapWorldLightMapsQuery(RpWorld *world);
+
+extern RwTexture *
+RpLtMapWorldSectorGetLightMap(RpWorldSector *sector);
+extern RpWorldSector *
+RpLtMapWorldSectorSetLightMap(RpWorldSector *sector, RwTexture *lightMap);
+extern RwTexture *
+RpLtMapAtomicGetLightMap(RpAtomic *atomic);
+extern RpAtomic *
+RpLtMapAtomicSetLightMap(RpAtomic *atomic, RwTexture *lightMap);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* RPLTMAP_H */
+
+