light: finish c++ifying

This commit is contained in:
Eric Wasylishen 2016-07-06 13:14:06 -06:00
parent 1c8e7e6585
commit e012a2c93e
10 changed files with 22 additions and 43 deletions

View File

@ -22,12 +22,8 @@
#include <common/mathlib.h> #include <common/mathlib.h>
#include <common/bspfile.h> #include <common/bspfile.h>
#include <light/light.h> #include <light/light.hh>
#ifdef __cplusplus
extern "C" {
#endif
#define DEFAULTLIGHTLEVEL 300 #define DEFAULTLIGHTLEVEL 300
typedef struct epair_s { typedef struct epair_s {
@ -138,9 +134,5 @@ void WriteEntitiesToString(bsp2_t *bsp);
vec_t GetLightValue(const lightsample_t *light, const entity_t *entity, vec_t dist); vec_t GetLightValue(const lightsample_t *light, const entity_t *entity, vec_t dist);
bool Light_PointInSolid(const bsp2_t *bsp, const vec3_t point ); bool Light_PointInSolid(const bsp2_t *bsp, const vec3_t point );
#ifdef __cplusplus
}
#endif
#endif /* __LIGHT_ENTITIES_H__ */ #endif /* __LIGHT_ENTITIES_H__ */

View File

@ -26,11 +26,8 @@
#include <common/log.h> #include <common/log.h>
#include <common/threads.h> #include <common/threads.h>
#include <common/polylib.h> #include <common/polylib.h>
#include <light/litfile.h>
#ifdef __cplusplus #include <light/litfile.hh>
extern "C" {
#endif
#define ON_EPSILON 0.1 #define ON_EPSILON 0.1
#define ANGLE_EPSILON 0.001 #define ANGLE_EPSILON 0.001
@ -357,9 +354,5 @@ bool Pvs_LeafVisible(const bsp2_t *bsp, const byte *pvs, const bsp2_dleaf_t *lea
bool Leaf_HasSky(const bsp2_t *bsp, const bsp2_dleaf_t *leaf); bool Leaf_HasSky(const bsp2_t *bsp, const bsp2_dleaf_t *leaf);
const bsp2_dleaf_t **Face_CopyLeafList(const bsp2_t *bsp, const bsp2_dface_t *face); const bsp2_dleaf_t **Face_CopyLeafList(const bsp2_t *bsp, const bsp2_dface_t *face);
qboolean VisCullEntity(const bsp2_t *bsp, const byte *pvs, const bsp2_dleaf_t *entleaf); qboolean VisCullEntity(const bsp2_t *bsp, const byte *pvs, const bsp2_dleaf_t *entleaf);
#ifdef __cplusplus
}
#endif
#endif /* __LIGHT_LIGHT_H__ */ #endif /* __LIGHT_LIGHT_H__ */

View File

@ -22,10 +22,6 @@
#include <common/bspfile.h> #include <common/bspfile.h>
#ifdef __cplusplus
extern "C" {
#endif
#define LIT_VERSION 1 #define LIT_VERSION 1
typedef struct litheader_s { typedef struct litheader_s {
@ -50,8 +46,4 @@ typedef struct {
void WriteLitFile(const bsp2_t *bsp, facesup_t *facesup, const char *filename, int version); void WriteLitFile(const bsp2_t *bsp, facesup_t *facesup, const char *filename, int version);
void WriteLuxFile(const bsp2_t *bsp, const char *filename, int version); void WriteLuxFile(const bsp2_t *bsp, const char *filename, int version);
#ifdef __cplusplus
}
#endif
#endif /* __LIGHT_LITFILE_H__ */ #endif /* __LIGHT_LITFILE_H__ */

View File

@ -2,9 +2,9 @@ cmake_minimum_required (VERSION 2.6)
project (light CXX C) project (light CXX C)
set(LIGHT_INCLUDES set(LIGHT_INCLUDES
${CMAKE_SOURCE_DIR}/include/light/entities.h ${CMAKE_SOURCE_DIR}/include/light/entities.hh
${CMAKE_SOURCE_DIR}/include/light/light.h ${CMAKE_SOURCE_DIR}/include/light/light.hh
${CMAKE_SOURCE_DIR}/include/light/litfile.h) ${CMAKE_SOURCE_DIR}/include/light/litfile.hh)
set(LIGHT_SOURCES set(LIGHT_SOURCES
entities.cc entities.cc

View File

@ -17,11 +17,11 @@
See file, 'COPYING', for details. See file, 'COPYING', for details.
*/ */
#include <string.h> #include <cstring>
#include <common/cmdlib.h> #include <common/cmdlib.h>
#include <light/light.h> #include <light/light.hh>
#include <light/entities.h> #include <light/entities.hh>
entity_t *entities; entity_t *entities;
static entity_t *entities_tail; static entity_t *entities_tail;

View File

@ -17,12 +17,12 @@
See file, 'COPYING', for details. See file, 'COPYING', for details.
*/ */
#include <stdint.h> #include <cstdint>
#include <assert.h> #include <cassert>
#include <stdio.h> #include <cstdio>
#include <light/light.h> #include <light/light.hh>
#include <light/entities.h> #include <light/entities.hh>
#include <common/polylib.h> #include <common/polylib.h>

View File

@ -17,8 +17,9 @@
See file, 'COPYING', for details. See file, 'COPYING', for details.
*/ */
#include <light/litfile.h> #include <light/litfile.hh>
#include <light/light.h> #include <light/light.hh>
#include <common/bspfile.h> #include <common/bspfile.h>
#include <common/cmdlib.h> #include <common/cmdlib.h>

View File

@ -17,9 +17,10 @@
See file, 'COPYING', for details. See file, 'COPYING', for details.
*/ */
#include <light/light.h> #include <light/light.hh>
#include <light/entities.h> #include <light/entities.hh>
#include <assert.h>
#include <cassert>
/* ======================================================================== */ /* ======================================================================== */

View File

@ -17,7 +17,7 @@
See file, 'COPYING', for details. See file, 'COPYING', for details.
*/ */
#include <light/light.h> #include <light/light.hh>
#define TRACE_HIT_NONE 0 #define TRACE_HIT_NONE 0
#define TRACE_HIT_SOLID (1 << 0) #define TRACE_HIT_SOLID (1 << 0)

View File

@ -17,7 +17,7 @@
See file, 'COPYING', for details. See file, 'COPYING', for details.
*/ */
#include <light/light.h> #include <light/light.hh>
#include <embree2/rtcore.h> #include <embree2/rtcore.h>
#include <embree2/rtcore_ray.h> #include <embree2/rtcore_ray.h>
#include <vector> #include <vector>