diff --git a/SConstruct b/SConstruct index 7a177991d..072aefe89 100644 --- a/SConstruct +++ b/SConstruct @@ -1100,7 +1100,7 @@ class D1XProgram(DXXProgram): 'main/bm.c', 'main/bmread.c', 'main/collide.c', -'main/custom.c', +'main/custom.cpp', 'main/fireball.c', 'main/fuelcen.c', 'main/gamemine.c', diff --git a/d1x-rebirth/main/custom.c b/d1x-rebirth/main/custom.cpp similarity index 100% rename from d1x-rebirth/main/custom.c rename to d1x-rebirth/main/custom.cpp diff --git a/d1x-rebirth/main/custom.h b/d1x-rebirth/main/custom.h index 1fa487bf6..bf15baf7a 100644 --- a/d1x-rebirth/main/custom.h +++ b/d1x-rebirth/main/custom.h @@ -4,6 +4,10 @@ #include "pstypes.h" #include "piggy.h" +#ifdef __cplusplus +extern "C" { +#endif + /* from piggy.c */ #define DBM_FLAG_LARGE 128 // Flags added onto the flags struct in b #define DBM_FLAG_ABM 64 @@ -16,4 +20,8 @@ void load_custom_data(char *level_file); void custom_close(); +#ifdef __cplusplus +} +#endif + #endif