#ifndef DARK_SDK_DARK_LIGHTS_H
#define DARK_SDK_DARK_LIGHTS_H
//---------------------------------------------------------------------------
#include "DBO Format\DBOData.h"
//---------------------------------------------------------------------------
// Start and Setup Functions
void  dbLMStart                           (void);
void  dbLMSetLightMapName                 (char* pInString);
void  dbLMSetLightMapFolder               (char* pInString);
void  dbLMSetLightMapFileFormat           (int iFormat);                      // 0: png, 1: dds, 2: bmp

// Adjust Settings
void  dbLMSetMode                         (int iMode);                        // (see documentation at the end of this file)
void  dbLMSetBlendMode                    (int iNewMode);                     // (see documentation at the end of this file)
void  dbLMSetShadowPower                  (float fPower);
void  dbLMSetAmbientOcclusionOn           (int iIterations, float fRayDist, int iPattern);
void  dbLMSetAmbientOcclusionOff          (void);
void  dbLMBoostCurvedSurfaceQuality       (float fMaxSize, float fBoost);

// Add Objects for Light-Collision (to create shadows)
void  dbLMAddCollisionObject              (int iObjID);
void  dbLMAddTransparentCollisionObject   (int iObjID, int iType);

// Add Objects for Illumination
void  dbLMAddLightMapObject               (int iObjID);
void  dbLMAddLightMapObject               (int iObjID, int iBaseStage);
void  dbLMAddLightMapObject               (int iObjID, int iBaseStage, int iDynamicLight);
void  dbLMAddLightMapObject               (int iObjID, int iBaseStage, int iDynamicLight, int iFlatShaded);

void  dbLMAddShadedLightMapObject         (int iObjID, int iLightMapStage);
void  dbLMAddShadedLightMapObject         (int iObjID, int iLightMapStage, int iFlatShaded);

// Add Lights
void  dbLMSetAmbientLight                 (float red, float green, float blue);
void  dbLMAddDirectionalLight             (float dirX, float dirY, float dirZ, float red, float green, float blue);
void  dbLMAddSpotLight                    (float posX, float posY, float posZ, float dirX, float dirY, float dirZ, float ang1, float ang2, float range, float red, float green, float blue);
void  dbLMAddPointLight                   (float posX, float posY, float posZ, float radius, float red, float green, float blue);
void  dbLMAddCustomPointLight             (float posX, float posY, float posZ, float radius, float attenuation, float attenuation2, float red, float green, float blue);

// Build Collision Data
void  dbLMBuildCollisionData              (void);

// Build LightMaps
void  dbLMBuildLightMaps                  (int iTexSize, float fQuality, int iBlur);   // Quality: 0.00001..10000, Pixel Blur: 0..3
void  dbLMBuildLightMapsThread            (int iTexSize, float fQuality, int iBlur);
void  dbLMBuildLightMapsThread            (int iTexSize, float fQuality, int iBlur, int iNumThreads);
void  dbLMBuildLightMaps                  (int iTexSize, float fQuality, int iBlur, int iNumThreads);

void  dbLMTerminateThread                 (void);

// Check the progress of threads (if using threads)
float dbLMGetPercent                      (void);
char* dbLMGetStatus                       (void);
int   dbLMGetComplete                     (void);

// Clearing and Cleanup
void  dbLMClearCollisionObjects           (void);
void  dbLMClearLightMapObjects            (void);
void  dbLMClearLights                     (void);
void  dbLMReset                           (void);

// These were not listed in LightMapper.rc
void  dbLMAddLightMapObject               (int iObjID, sObject *pObject, int iBaseStage, int iDynamicLight, int iShaded, int iFlatNormals);
void  dbLMAddCollisionObject              (sObject *pObject, int iTransparent);
void  dbLMUpdateObjects                   (void);
//---------------------------------------------------------------------------
#pragma comment (lib, "LightMapper.lib")
//---------------------------------------------------------------------------
/* -------------------------Brief Documentation -----------------------------
//---------------------------------------------------------------------------
void dbLMSetMode (int iMode)
   Mode 0: Combined (extend valid, clamp invalid) (default)
	Mode 1: Extend all edges
	Mode 2: Clamp all edges
	Mode 3: Colour with normals

void dbLMSetBlendMode (int iNewMode)
   Range: 1..26 (Default is 4: D3DTOP_MODULATE)
   See _D3DTEXTUREOP in d3d9types.h for the full list.
//---------------------------------------------------------------------------*/
#endif