From 64350f83b85714b014f9cd468501723139d970e1 Mon Sep 17 00:00:00 2001 From: Kp Date: Sun, 11 Nov 2012 22:12:51 +0000 Subject: [PATCH] Move similar/main/cntrlcen.c -> similar/main/cntrlcen.cpp --- SConstruct | 2 +- common/main/cntrlcen.h | 8 ++++++++ common/main/gameseq.h | 8 ++++++++ common/main/laser.h | 8 ++++++++ similar/main/{cntrlcen.c => cntrlcen.cpp} | 0 5 files changed, 25 insertions(+), 1 deletion(-) rename similar/main/{cntrlcen.c => cntrlcen.cpp} (100%) diff --git a/SConstruct b/SConstruct index db9c30475..4989ea253 100644 --- a/SConstruct +++ b/SConstruct @@ -753,7 +753,7 @@ class DXXProgram(DXXCommon): 'arch/sdl/timer.cpp', 'main/aipath.cpp', 'main/automap.cpp', -'main/cntrlcen.c', +'main/cntrlcen.cpp', 'main/config.c', 'main/console.c', 'main/controls.c', diff --git a/common/main/cntrlcen.h b/common/main/cntrlcen.h index d2f62466a..716064dc1 100644 --- a/common/main/cntrlcen.h +++ b/common/main/cntrlcen.h @@ -25,6 +25,10 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "wall.h" #include "switch.h" +#ifdef __cplusplus +extern "C" { +#endif + #define CONTROLCEN_WEAPON_NUM 6 #define MAX_CONTROLCEN_LINKS 10 @@ -129,4 +133,8 @@ extern void control_center_triggers_read_n_swap(control_center_triggers *cct, in extern int control_center_triggers_write(control_center_triggers *cct, PHYSFS_file *fp); +#ifdef __cplusplus +} +#endif + #endif /* _CNTRLCEN_H */ diff --git a/common/main/gameseq.h b/common/main/gameseq.h index 6ba53c4e4..f8f73d1d1 100644 --- a/common/main/gameseq.h +++ b/common/main/gameseq.h @@ -25,6 +25,10 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #include "mission.h" #include "object.h" +#ifdef __cplusplus +extern "C" { +#endif + #define SUPER_MISSILE 0 #define SUPER_SEEKER 1 #define SUPER_SMARTBOMB 2 @@ -120,4 +124,8 @@ void EnterSecretLevel(void); void copy_defaults_to_robot(struct object *objp); void init_player_stats_new_ship(ubyte pnum); +#ifdef __cplusplus +} +#endif + #endif /* _GAMESEQ_H */ diff --git a/common/main/laser.h b/common/main/laser.h index e10f2d9f4..5852804ef 100644 --- a/common/main/laser.h +++ b/common/main/laser.h @@ -20,6 +20,10 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #ifndef _LASER_H #define _LASER_H +#ifdef __cplusplus +extern "C" { +#endif + enum weapon_type_t { #if defined(DXX_BUILD_DESCENT_II) @@ -196,4 +200,8 @@ static inline int is_proximity_bomb_or_smart_mine_or_placed_mine(enum weapon_typ return id == PROXIMITY_ID; } +#ifdef __cplusplus +} +#endif + #endif /* _LASER_H */ diff --git a/similar/main/cntrlcen.c b/similar/main/cntrlcen.cpp similarity index 100% rename from similar/main/cntrlcen.c rename to similar/main/cntrlcen.cpp