Preparing for linking with C++ code, from Scott A. Colcord.

git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@3663 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
Meep-Eep
2011-07-24 19:58:25 +00:00
parent 5d22cd61ad
commit 8ab9c69b55
149 changed files with 1275 additions and 3 deletions
+9
View File
@@ -61,6 +61,11 @@
#define UQM_Swap32 __arch__swab32
#endif
#endif /* linux */
#if defined(__cplusplus)
extern "C" {
#endif
/* Use inline functions for compilers that support them, and static
functions for those that do not. Because these functions become
static for compilers that do not support inline functions, this
@@ -124,4 +129,8 @@ static __inline__ uint64 UQM_Swap64(uint64 val)
#define UQM_SwapBE64(X) (X)
#endif
#if defined(__cplusplus)
}
#endif
#endif /* _ENDIAN_H */
+7
View File
@@ -1,2 +1,9 @@
#if defined(__cplusplus)
extern "C" {
#endif
#include "callback/alarm.h"
#if defined(__cplusplus)
}
#endif
+8
View File
@@ -1,2 +1,10 @@
#if defined(__cplusplus)
extern "C" {
#endif
#include "callback/callback.h"
#if defined(__cplusplus)
}
#endif
+8
View File
@@ -19,6 +19,14 @@
#ifndef _CDPLIB_H
#define _CDPLIB_H
#if defined(__cplusplus)
extern "C" {
#endif
#include "cdp/cdp.h"
#if defined(__cplusplus)
}
#endif
#endif /* _CDPLIB_H */
+8
View File
@@ -21,6 +21,10 @@
#include "types.h"
#if defined(__cplusplus)
extern "C" {
#endif
typedef uint8 BYTE;
typedef uint8 UBYTE;
typedef sint8 SBYTE;
@@ -85,5 +89,9 @@ typedef DWORD (*PDWORDFUNC) (void);
# define _ALIGNED_ON(bytes)
#endif
#if defined(__cplusplus)
}
#endif
#endif /* _COMPILER_H */
+9
View File
@@ -20,6 +20,11 @@
#define _DECLIB_H
#include "libs/compiler.h"
#if defined(__cplusplus)
extern "C" {
#endif
typedef struct _LZHCODE_DESC* DECODE_REF;
enum
@@ -45,4 +50,8 @@ extern COUNT cread (void *pStr, COUNT size, COUNT count,
extern COUNT cwrite (const void *pStr, COUNT size, COUNT count,
DECODE_REF DecodeRef);
#if defined(__cplusplus)
}
#endif
#endif /* _DECLIB_H */
+8
View File
@@ -25,6 +25,10 @@
// for bool
#include "types.h"
#if defined(__cplusplus)
extern "C" {
#endif
#if 0
// from temp.h
void initTempDir (void);
@@ -83,5 +87,9 @@ static inline int isDriveLetter(int c)
}
#endif /* HAVE_DRIVE_LETTERS */
#if defined(__cplusplus)
}
#endif
#endif /* _FILE_H */
+17
View File
@@ -32,6 +32,10 @@ struct Color {
#include "libs/reslib.h"
#if defined(__cplusplus)
extern "C" {
#endif
typedef struct context_desc CONTEXT_DESC;
typedef struct frame_desc FRAME_DESC;
typedef struct font_desc FONT_DESC;
@@ -227,8 +231,16 @@ typedef struct text
COUNT CharCount;
} TEXT;
#if defined(__cplusplus)
}
#endif
#include "libs/strlib.h"
#if defined(__cplusplus)
extern "C" {
#endif
typedef STRING_TABLE COLORMAP_REF;
typedef STRING COLORMAP;
// COLORMAPPTR is really a pointer to colortable entry structure
@@ -237,6 +249,7 @@ typedef void *COLORMAPPTR;
#include "graphics/prim.h"
typedef BYTE BATCH_FLAGS;
// This flag is currently unused but it might make sense to restore it
#define BATCH_BUILD_PAGE (BATCH_FLAGS)(1 << 0)
@@ -454,4 +467,8 @@ extern COLORMAPPTR GetColorMapAddress (COLORMAP);
void SetSystemRect (const RECT *pRect);
void ClearSystemRect (void);
#if defined(__cplusplus)
}
#endif
#endif /* _GFXLIB_H */
+7
View File
@@ -1,2 +1,9 @@
#if defined(__cplusplus)
extern "C" {
#endif
#include "heap/heap.h"
#if defined(__cplusplus)
}
#endif
+8
View File
@@ -24,6 +24,10 @@
#include "libs/uio.h"
#include "libs/unicode.h"
#if defined(__cplusplus)
extern "C" {
#endif
extern BOOLEAN AnyButtonPress (BOOLEAN DetectSpecial);
@@ -59,5 +63,9 @@ void SaveKeyConfiguration (uio_DirHandle *path, const char *fname);
void BeginInputFrame (void);
#if defined(__cplusplus)
}
#endif
#endif /* _INPLIB_H */
+9
View File
@@ -16,5 +16,14 @@
*
*/
#if defined(__cplusplus)
extern "C" {
#endif
#include "list/list.h"
#if defined(__cplusplus)
}
#endif
+8
View File
@@ -14,4 +14,12 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#if defined(__cplusplus)
extern "C" {
#endif
#include "log/uqmlog.h"
#if defined(__cplusplus)
}
#endif
+9
View File
@@ -20,10 +20,19 @@
#define _MATHLIB_H
#include "libs/compiler.h"
#if defined(__cplusplus)
extern "C" {
#endif
#include "math/random.h"
extern COUNT square_root (DWORD value);
#if defined(__cplusplus)
}
#endif
#endif /* _MATHLIB_H */
+8
View File
@@ -19,7 +19,15 @@
#ifndef _LIB_MD5_H
#define _LIB_MD5_H
#if defined(__cplusplus)
extern "C" {
#endif
#include "md5/md5.h"
#if defined(__cplusplus)
}
#endif
#endif /* _LIB_MD5_H */
+8
View File
@@ -21,6 +21,10 @@
#include "types.h"
#if defined(__cplusplus)
extern "C" {
#endif
extern bool mem_init (void);
extern bool mem_uninit (void);
@@ -29,5 +33,9 @@ extern void HFree (void *p);
extern void *HCalloc (int size);
extern void *HRealloc (void *p, int size);
#if defined(__cplusplus)
}
#endif
#endif /* _MEMLIB_H */
+8
View File
@@ -26,6 +26,10 @@
#include <stdlib.h>
#include "port.h"
#if defined(__cplusplus)
extern "C" {
#endif
extern int TFB_DEBUG_HALT;
@@ -54,5 +58,9 @@ unconst(const void *arg) {
return u.c;
}
#if defined(__cplusplus)
}
#endif
#endif
+8
View File
@@ -19,11 +19,19 @@
#ifndef _NET_H
#define _NET_H
#if defined(__cplusplus)
extern "C" {
#endif
#include "network/network.h"
#include "network/netmanager/netmanager.h"
#include "network/connect/connect.h"
#include "network/connect/listen.h"
#include "network/connect/resolve.h"
#if defined(__cplusplus)
}
#endif
#endif /* _NET_H */
+8
View File
@@ -17,6 +17,10 @@
#ifndef PLATFORM_H_
#define PLATFORM_H_
#if defined(__cplusplus)
extern "C" {
#endif
#if defined(USE_PLATFORM_ACCEL)
# if defined(__GNUC__) && (defined(i386) || defined(__x86_64__))
# define MMX_ASM
@@ -46,4 +50,8 @@ typedef enum
extern PLATFORM_TYPE force_platform;
#if defined(__cplusplus)
}
#endif
#endif /* PLATFORM_H_ */
+16
View File
@@ -25,6 +25,10 @@
#include "libs/memlib.h"
#include "libs/uio.h"
#if defined(__cplusplus)
extern "C" {
#endif
typedef struct resource_index_desc RESOURCE_INDEX_DESC;
typedef RESOURCE_INDEX_DESC *RESOURCE_INDEX;
@@ -78,8 +82,16 @@ void *GetResourceData (uio_Stream *fp, DWORD length);
#define AllocResourceData HMalloc
BOOLEAN FreeResourceData (void *);
#if defined(__cplusplus)
}
#endif
#include "libs/strlib.h"
#include "libs/gfxlib.h"
#if defined(__cplusplus)
extern "C" {
#endif
// For Color
typedef STRING_TABLE DIRENTRY_REF;
@@ -120,4 +132,8 @@ void res_PutColor (const char *key, Color value);
BOOLEAN res_Remove (const char *key);
#if defined(__cplusplus)
}
#endif
#endif /* _RESLIB_H */
+8
View File
@@ -22,6 +22,10 @@
#include "port.h"
#include "libs/strlib.h"
#if defined(__cplusplus)
extern "C" {
#endif
typedef STRING_TABLE SOUND_REF;
typedef STRING SOUND;
// SOUNDPTR is really a TFB_SoundSample**
@@ -95,5 +99,9 @@ extern void WaitForSoundEnd (COUNT Channel);
extern DWORD FadeMusic (BYTE end_vol, SIZE TimeInterval);
#if defined(__cplusplus)
}
#endif
#endif /* _SNDLIB_H */
+8
View File
@@ -36,6 +36,10 @@ typedef char *STRINGPTR;
/* This has to go here because reslib requires the above typedefs. */
#include "libs/reslib.h"
#if defined(__cplusplus)
extern "C" {
#endif
extern BOOLEAN InstallStringTableResType (void);
extern STRING_TABLE LoadStringTableInstance (RESOURCE res);
extern STRING_TABLE LoadStringTableFile (uio_DirHandle *dir,
@@ -67,5 +71,9 @@ extern STRINGPTR GetStringTimeStamp (STRING String);
#define UNICHAR_BULLET 0x2022
#define STR_BULLET "\xE2\x80\xA2"
#if defined(__cplusplus)
}
#endif
#endif /* _STRLIB_H */
+8
View File
@@ -26,6 +26,10 @@
#include "libs/threadlib.h"
#if defined(__cplusplus)
extern "C" {
#endif
/* Bitmasks for setting task state. */
#define TASK_INUSE 1
#define TASK_EXIT 2
@@ -50,5 +54,9 @@ extern DWORD Task_ReadState (Task task, DWORD state_mask);
extern void FinishTask (Task task);
extern void ConcludeTask (Task task);
#if defined(__cplusplus)
}
#endif
#endif
+8
View File
@@ -45,6 +45,10 @@
#include <sys/types.h>
#include "libs/timelib.h"
#if defined(__cplusplus)
extern "C" {
#endif
#if defined (PROFILE_THREADS) || defined (DEBUG_THREADS)
#define THREAD_NAMES
#endif
@@ -173,5 +177,9 @@ void WaitCondVar (CondVar);
void SignalCondVar (CondVar);
void BroadcastCondVar (CondVar);
#if defined(__cplusplus)
}
#endif
#endif /* _THREADLIB_H */
+8
View File
@@ -21,6 +21,10 @@
#include "libs/compiler.h"
#if defined(__cplusplus)
extern "C" {
#endif
/* ONE_SECOND is the LCM of all the fractions of a second the game uses.
* Battle is 24 FPS, Landers are 35 FPS, most UI-level things are 15 FPS,
* The Interplanetary flight is 30 FPS, Comm ambient animation is 40 FPS,
@@ -38,5 +42,9 @@ extern void InitTimeSystem (void);
extern void UnInitTimeSystem (void);
extern TimeCount GetTimeCounter (void);
#if defined(__cplusplus)
}
#endif
#endif /* _TIMLIB_H */
+8
View File
@@ -21,7 +21,15 @@
#ifndef _UIO_H
#define _UIO_H
#if defined(__cplusplus)
extern "C" {
#endif
#include "uio/io.h"
#if defined(__cplusplus)
}
#endif
#endif /* _UIO_H */
+8
View File
@@ -21,7 +21,15 @@
#ifndef _UIOUTILS_H
#define _UIOUTILS_H
#if defined(__cplusplus)
extern "C" {
#endif
#include "uio/utils.h"
#if defined(__cplusplus)
}
#endif
#endif /* _UIOUTILS_H */
+8
View File
@@ -23,6 +23,10 @@
#include <sys/types.h>
// For size_t
#if defined(__cplusplus)
extern "C" {
#endif
typedef uint32 UniChar;
#ifdef UNICODE_INTERNAL
@@ -60,5 +64,9 @@ UniChar UniChar_toLower(UniChar ch);
#undef UNICODE_CHAR
#if defined(__cplusplus)
}
#endif
#endif /* UNICODE_H */
+8
View File
@@ -23,6 +23,10 @@
#include "libs/sndlib.h"
#include "libs/reslib.h"
#if defined(__cplusplus)
extern "C" {
#endif
typedef enum
{
NO_FMV = 0,
@@ -57,4 +61,8 @@ extern LEGACY_VIDEO_REF PlayLegacyVideo (LEGACY_VIDEO vid);
extern void StopLegacyVideo (LEGACY_VIDEO_REF ref);
extern BOOLEAN PlayingLegacyVideo (LEGACY_VIDEO_REF ref);
#if defined(__cplusplus)
}
#endif
#endif /* _VIDLIB_H */
+8
View File
@@ -26,6 +26,10 @@
#include "libs/compiler.h"
#include "libs/uio.h"
#if defined(__cplusplus)
extern "C" {
#endif
#define OPT_3DO 0x01
#define OPT_PC 0x02
#define OPT_ALL 0xFF
@@ -81,5 +85,9 @@ int loadIndices (uio_DirHandle *baseDir);
bool setGammaCorrection (float gamma);
#if defined(__cplusplus)
}
#endif
#endif
+27
View File
@@ -79,12 +79,24 @@
#ifndef HAVE_STRUPR
#if defined(__cplusplus)
extern "C" {
#endif
char *strupr (char *str);
#if defined(__cplusplus)
}
#endif
#endif
#if !defined (_MSC_VER) && !defined (HAVE_READDIR_R)
# include <dirent.h>
#if defined(__cplusplus)
extern "C" {
#endif
int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result);
#if defined(__cplusplus)
}
#endif
#endif
// Directories
@@ -161,10 +173,21 @@ typedef unsigned short mode_t;
#ifdef _MSC_VER
# include <stdarg.h>
// Defined in port.c
#if defined(__cplusplus)
extern "C" {
#endif
int snprintf(char *str, size_t size, const char *format, ...);
int vsnprintf(char *str, size_t size, const char *format, va_list args);
#if defined(__cplusplus)
}
#endif
#endif /* _MSC_VER */
#if defined(__cplusplus)
extern "C" {
#endif
// setenv()
#ifndef HAVE_SETENV
int setenv (const char *name, const char *value, int overwrite);
@@ -178,6 +201,10 @@ typedef unsigned short wchar_t;
typedef unsigned int wint_t;
#endif
#if defined(__cplusplus)
}
#endif
#if defined (_MSC_VER) || defined(__MINGW32__)
# define USE_WINSOCK
#endif
+8
View File
@@ -50,6 +50,10 @@
# endif /* defined(PRIxPTR) */
#endif
#if defined(__cplusplus)
extern "C" {
#endif
#if defined(__arch64__) || defined(__alpha) || defined(__x86_64) \
|| defined(_M_IA64) || defined(_M_AMD64)
/* 64-bit platforms */
@@ -177,4 +181,8 @@ UQM_COMPILE_TIME_ASSERT(uint64, sizeof(uint64) == 8);
#define UINT16_MAX 0xffff /* 65535U */
#define UINT32_MAX 0xffffffff /* 4294967295U */
#if defined(__cplusplus)
}
#endif
#endif /* _TYPES_H */
+8
View File
@@ -26,6 +26,10 @@ typedef DWORD BattleFrameCounter;
#include "init.h"
// For NUM_SIDES
#if defined(__cplusplus)
extern "C" {
#endif
// The callback function is called on every battle frame
// with GraphicsLock held, just before the display queue
// is drawn
@@ -56,4 +60,8 @@ BOOLEAN Battle (BattleFrameCallback *);
extern void BattleSong (BOOLEAN DoPlay);
extern void FreeBattleSong (void);
#if defined(__cplusplus)
}
#endif
#endif /* _BATTLE_H */
+8
View File
@@ -30,6 +30,10 @@ typedef struct NetworkInputContext NetworkInputContext;
#include "races.h"
#include "libs/compiler.h"
#if defined(__cplusplus)
extern "C" {
#endif
typedef BATTLE_INPUT_STATE (*BattleFrameInputFunction) (
InputContext *context, STARSHIP *StarShipPtr);
typedef BOOLEAN (*SelectShipFunction) (InputContext *context,
@@ -88,6 +92,10 @@ void InputContext_delete (InputContext *context);
// Call InputContext->handlers->freeContext() to release an
// InputContext.
#if defined(__cplusplus)
}
#endif
#endif /* _BATTLECONTROLS_H */
+8
View File
@@ -23,6 +23,10 @@
#include "displist.h"
#include "libs/compiler.h"
#if defined(__cplusplus)
extern "C" {
#endif
#define NAME_OFFSET 5
#define NUM_CAPTAINS_NAMES 16
@@ -60,5 +64,9 @@ extern RACE_DESC *load_ship (SPECIES_ID SpeciesID, BOOLEAN LoadBattleData);
extern void free_ship (RACE_DESC *RaceDescPtr, BOOLEAN FreeIconData,
BOOLEAN FreeBattleData);
#if defined(__cplusplus)
}
#endif
#endif /* _BUILD_H */
+8
View File
@@ -22,6 +22,10 @@
#include "libs/tasklib.h"
#include "displist.h"
#if defined(__cplusplus)
extern "C" {
#endif
#define START_YEAR 2155
@@ -100,5 +104,9 @@ extern void UnlockGameClock (void);
// but not much else
extern BOOLEAN GameClockRunning (void);
#if defined(__cplusplus)
}
#endif
#endif /* _CLOCK_H */
+10 -3
View File
@@ -16,16 +16,23 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifdef NETPLAY
#ifndef _CNCTDLG_H
#define _CNCTDLG_H
#ifdef NETPLAY
#include "libs/compiler.h"
#if defined(__cplusplus)
extern "C" {
#endif
BOOLEAN MeleeConnectDialog (int side);
#endif /* _CNCTDLG_H */
#if defined(__cplusplus)
}
#endif
#endif /* NETPLAY */
#endif /* _CNCTDLG_H */
+8
View File
@@ -21,6 +21,10 @@
#include "libs/reslib.h"
#if defined(__cplusplus)
extern "C" {
#endif
extern BOOLEAN InstallCodeResType (void);
extern void *LoadCodeResInstance (RESOURCE res);
extern void *CaptureCodeRes (void *hCode, void *pData, void **ppLocData);
@@ -32,5 +36,9 @@ typedef struct
UWORD size;
} CODE_REF;
#if defined(__cplusplus)
}
#endif
#endif /* _CODERES_H */
+8
View File
@@ -21,6 +21,10 @@
#include "element.h"
#if defined(__cplusplus)
extern "C" {
#endif
#define COLLISION_TURN_WAIT 1
#define COLLISION_THRUST_WAIT 3
@@ -59,5 +63,9 @@
extern void collide (ELEMENT *ElementPtr0, ELEMENT *ElementPtr1);
#if defined(__cplusplus)
}
#endif
#endif /* _COLLIDE_H */
+8
View File
@@ -31,6 +31,10 @@
#include "commanim.h"
#if defined(__cplusplus)
extern "C" {
#endif
extern LOCDATA CommData;
static inline BOOLEAN
@@ -131,6 +135,10 @@ extern void SetCommIntroMode (CommIntroMode, TimeCount howLong);
extern void EnableTalkingAnim (BOOLEAN enable);
#if defined(__cplusplus)
}
#endif
#endif /* _COMM_H */
+8
View File
@@ -20,6 +20,10 @@
#include "libs/compiler.h"
#include "libs/gfxlib.h"
#if defined(__cplusplus)
extern "C" {
#endif
// Some background: every animation has a neutral frame which returns
// the image to the state it was in before the animation began. Which
// frame is neutral depends on the animation type.
@@ -130,6 +134,10 @@ extern BOOLEAN DrawAlienFrame (SEQUENCE *pSeq, COUNT Num, BOOLEAN fullRedraw);
extern void InitCommAnimations (void);
extern BOOLEAN ProcessCommAnimations (BOOLEAN fullRedraw, BOOLEAN paused);
#if defined(__cplusplus)
}
#endif
#endif /* _COMMANIM_H */
+8
View File
@@ -23,6 +23,10 @@
#include "resinst.h"
#include "libs/sound/trackplayer.h"
#if defined(__cplusplus)
extern "C" {
#endif
typedef enum {
ARILOU_CONVERSATION,
CHMMR_CONVERSATION,
@@ -154,5 +158,9 @@ extern LOCDATA* init_zoqfot_comm (void);
extern LOCDATA* init_umgah_comm (void);
#if defined(__cplusplus)
}
#endif
#endif /* _COMMGLUE_H */
+8
View File
@@ -20,6 +20,10 @@
#include "libs/gfxlib.h"
#include "libs/sndlib.h"
#if defined(__cplusplus)
extern "C" {
#endif
void load_gravity_well (BYTE selector);
void free_gravity_well (void);
@@ -27,4 +31,8 @@ FRAME load_life_form (BYTE selector);
MUSIC_REF load_orbit_theme (BYTE selector);
#if defined(__cplusplus)
}
#endif
#endif /* CONS_RES_H_ */
+8
View File
@@ -23,6 +23,10 @@
#include "libs/strlib.h"
#include "libs/timelib.h"
#if defined(__cplusplus)
extern "C" {
#endif
// Enumerated type for controls
enum {
KEY_UP,
@@ -162,6 +166,10 @@ typedef struct textentry_state
extern BOOLEAN DoTextEntry (TEXTENTRY_STATE *pTES);
#if defined(__cplusplus)
}
#endif
#endif
+8
View File
@@ -19,7 +19,15 @@
#include "libs/compiler.h"
#if defined(__cplusplus)
extern "C" {
#endif
extern void Credits (BOOLEAN WithOuttakes);
#if defined(__cplusplus)
}
#endif
#endif /* _CREDITS_H */
+8
View File
@@ -19,6 +19,10 @@
#ifndef _DEMO_H
#define _DEMO_H
#if defined(__cplusplus)
extern "C" {
#endif
#ifndef DEMO_MODE
#define DEMO_MODE 0
#endif /* DEMO_MODE */
@@ -44,5 +48,9 @@ extern void JournalInput (INPUT_STATE InputState);
#endif
#if defined(__cplusplus)
}
#endif
#endif /* _DEMO_H */
+8
View File
@@ -24,6 +24,10 @@
#include "libs/compiler.h"
#include "libs/memlib.h"
#if defined(__cplusplus)
extern "C" {
#endif
// Note that we MUST use the QUEUE_TABLE variant at this time, because
// certain gameplay elements depend on it. Namely, the maximum number
// of HyperSpace encounter globes chasing the player is defined by the
@@ -120,5 +124,9 @@ extern void RemoveQueue (QUEUE *pq, HLINK hLink);
extern COUNT CountLinks (QUEUE *pq);
void ForAllLinks(QUEUE *pq, void (*callback)(LINK *, void *), void *arg);
#if defined(__cplusplus)
}
#endif
#endif /* _DISPLIST_H */
+8
View File
@@ -24,6 +24,10 @@
#include "velocity.h"
#include "libs/gfxlib.h"
#if defined(__cplusplus)
extern "C" {
#endif
#define NORMAL_LIFE 1
@@ -230,5 +234,9 @@ extern void MoveGalaxy (VIEW_STATE view_state, SIZE dx, SIZE dy);
extern BOOLEAN CalculateGravity (ELEMENT *ElementPtr);
#if defined(__cplusplus)
}
#endif
#endif /* _ELEMENT_H */
+8
View File
@@ -30,6 +30,10 @@ typedef struct encounter ENCOUNTER;
#include "element.h"
#include "races.h"
#if defined(__cplusplus)
extern "C" {
#endif
typedef HLINK HENCOUNTER;
@@ -190,5 +194,9 @@ extern void GenerateIlwrath (BYTE control);
extern SIZE EncounterRace;
extern BYTE EncounterGroup;
#if defined(__cplusplus)
}
#endif
#endif /* _ENCOUNT_H */
+8
View File
@@ -90,6 +90,10 @@
#include "libs/gfxlib.h"
#include "libs/timelib.h"
#if defined(__cplusplus)
extern "C" {
#endif
typedef enum {
FlashState_fadeIn = 0,
// Someway between on and off, going towards on.
@@ -211,5 +215,9 @@ void Flash_setCacheSize (FlashContext *context, COUNT size);
COUNT Flash_getCacheSize (const FlashContext *context);
#if defined(__cplusplus)
}
#endif
#endif /* _FLASH_H */
+9
View File
@@ -20,6 +20,11 @@
#include "libs/compiler.h"
#include "libs/sndlib.h"
#include "libs/gfxlib.h"
#if defined(__cplusplus)
extern "C" {
#endif
#define WANT_SHIP_SPINS
extern void SplashScreen (void (* DoProcessing)(DWORD TimeOut));
@@ -29,5 +34,9 @@ extern void DoShipSpin (COUNT index, MUSIC_REF hMusic);
extern BOOLEAN ShowPresentation (RESOURCE presentation);
#if defined(__cplusplus)
}
#endif
#endif /* _FMV_H */
+8
View File
@@ -20,6 +20,10 @@
#include "libs/compiler.h"
#include "libs/gfxlib.h"
#if defined(__cplusplus)
extern "C" {
#endif
enum
{
@@ -57,5 +61,9 @@ extern void SetRaceDest (BYTE which_race, COORD x, COORD y, BYTE days_left,
BYTE func_index);
#if defined(__cplusplus)
}
#endif
#endif /* _GAMEEV_H */
+8
View File
@@ -19,11 +19,19 @@
#include "libs/compiler.h"
#include "libs/gfxlib.h"
#if defined(__cplusplus)
extern "C" {
#endif
extern void ConfirmSaveLoad (STAMP *MsgStamp);
extern BOOLEAN GameOptions (void);
typedef void (NamingCallback) (void);
extern void SetNamingCallback (NamingCallback *);
#if defined(__cplusplus)
}
#endif
#endif /* _GAMEOPT_H */
+8
View File
@@ -25,6 +25,10 @@
#include "libs/strlib.h"
#if defined(__cplusplus)
extern "C" {
#endif
#define STAR_STRING_COUNT 133
#define DEVICE_STRING_COUNT 29
#define CARGO_STRING_COUNT 10
@@ -82,5 +86,9 @@ extern STRING GameStrings;
#if defined(__cplusplus)
}
#endif
#endif /* _GAMESTR_H */
+8
View File
@@ -4,7 +4,15 @@
#include "planets/generate.h"
#include "libs/compiler.h"
#if defined(__cplusplus)
extern "C" {
#endif
const GenerateFunctions *getGenerateFunctions (BYTE Index);
#if defined(__cplusplus)
}
#endif
#endif /* GENDEF_H */
+8
View File
@@ -27,6 +27,10 @@
#include "velocity.h"
#include "commanim.h"
#if defined(__cplusplus)
extern "C" {
#endif
// general numbers-speech generator info
// should accomodate most common base-10 languages
@@ -1010,5 +1014,9 @@ extern void InitGlobData (void);
extern BOOLEAN InitGameStructures (void);
extern void UninitGameStructures (void);
#if defined(__cplusplus)
}
#endif
#endif /* _GLOBDATA_H */
+8
View File
@@ -24,6 +24,10 @@
// for POINT
#include <assert.h>
#if defined(__cplusplus)
extern "C" {
#endif
// XXX: Needed to maintain savegame compatibility
#define NUM_SAVED_BATTLE_GROUPS 64
@@ -82,4 +86,8 @@ LockIpGroup (const QUEUE *pq, HIPGROUP h)
extern HIPGROUP BuildGroup (QUEUE *pDstQueue, BYTE race_id);
#if defined(__cplusplus)
}
#endif
#endif /* _GRPINFO_H */
+8
View File
@@ -23,6 +23,10 @@
#include "units.h"
// for UNIT_SCREEN_WIDTH/HEIGHT
#if defined(__cplusplus)
extern "C" {
#endif
#define NUM_RADAR_SCREENS 12
#define RADAR_SCAN_WIDTH (UNIT_SCREEN_WIDTH * NUM_RADAR_SCREENS)
@@ -79,5 +83,9 @@ extern BOOLEAN hyper_transition (ELEMENT *ElementPtr);
extern void HyperspaceMenu (void);
extern void SaveSisHyperState (void);
#if defined(__cplusplus)
}
#endif
#endif /* _HYPER_H */
+8
View File
@@ -20,6 +20,10 @@
#include "libs/gfxlib.h"
#include "libs/reslib.h"
#if defined(__cplusplus)
extern "C" {
#endif
#define NUM_PLAYERS 2
#define NUM_SIDES 2
@@ -35,5 +39,9 @@ extern BOOLEAN load_animation (FRAME *pixarray, RESOURCE big_res,
RESOURCE med_res, RESOURCE sml_res);
extern BOOLEAN free_image (FRAME *pixarray);
#if defined(__cplusplus)
}
#endif
#endif /* _INIT_H */
+8
View File
@@ -24,6 +24,10 @@
#include "element.h"
#include "races.h"
#if defined(__cplusplus)
extern "C" {
#endif
#define MANEUVERABILITY(pi) ((pi)->ManeuverabilityIndex)
#define WEAPON_RANGE(pi) ((pi)->WeaponRange)
@@ -74,6 +78,10 @@ extern BOOLEAN ThrustShip (ELEMENT *ShipPtr, COUNT angle);
#define AWESOME_RATING (BYTE)(1 << 6)
#if defined(__cplusplus)
}
#endif
#endif /* _INTEL_H */
+8
View File
@@ -19,6 +19,10 @@
#include "libs/compiler.h"
#if defined(__cplusplus)
extern "C" {
#endif
extern void NotifyOthers (COUNT which_race, BYTE target_loc);
// Special target locations for NotifyOthers()
#define IPNL_INTERCEPT_PLAYER 0
@@ -26,4 +30,8 @@ extern void NotifyOthers (COUNT which_race, BYTE target_loc);
extern void DoMissions (void);
#if defined(__cplusplus)
}
#endif
#endif /* UQM_IPDISP_H_INCL_ */
+8
View File
@@ -22,10 +22,18 @@
#include "libs/compiler.h"
#include "globdata.h"
#if defined(__cplusplus)
extern "C" {
#endif
extern ACTIVITY NextActivity;
extern BOOLEAN LoadGame (COUNT which_game, SUMMARY_DESC *summary_desc);
#if defined(__cplusplus)
}
#endif
#endif /* _LOAD_H */
+8
View File
@@ -20,6 +20,10 @@
#include "races.h"
#include "libs/compiler.h"
#if defined(__cplusplus)
extern "C" {
#endif
typedef HLINK HMASTERSHIP;
typedef struct
@@ -58,5 +62,9 @@ COUNT GetShipCostFromIndex (unsigned Index);
FRAME GetShipIconsFromIndex (unsigned Index);
FRAME GetShipMeleeIconsFromIndex (unsigned Index);
#if defined(__cplusplus)
}
#endif
#endif /* _MASTER_H */
+8
View File
@@ -23,6 +23,10 @@
#include "libs/sndlib.h"
#include "flash.h"
#if defined(__cplusplus)
extern "C" {
#endif
typedef struct menu_state
{
// Standard field required by DoInput()
@@ -120,5 +124,9 @@ enum
extern BOOLEAN DoMenuChooser (MENU_STATE *pMS, BYTE BaseState);
extern void DrawMenuStateStrings (BYTE beg_index, SWORD NewState);
#if defined(__cplusplus)
}
#endif
#endif /* _MENUSTAT_H */
+8
View File
@@ -20,6 +20,10 @@
#include "libs/compiler.h"
#include "libs/gfxlib.h"
#if defined(__cplusplus)
extern "C" {
#endif
extern BOOLEAN sliderDisabled;
extern BOOLEAN oscillDisabled;
@@ -32,5 +36,9 @@ extern void InitSlider (int x, int y, int width, FRAME sliderFrame,
extern void SetSliderImage (FRAME f);
void DrawSlider (void);
#if defined(__cplusplus)
}
#endif
#endif /* _OSCILL_H */
+8
View File
@@ -20,8 +20,16 @@
#include "libs/compiler.h"
#include "races.h"
#if defined(__cplusplus)
extern "C" {
#endif
extern HSTARSHIP GetEncounterStarShip (STARSHIP *LastStarShipPtr,
COUNT which_player);
extern void DrawArmadaPickShip (BOOLEAN draw_salvage_frame, RECT *pPickRect);
#if defined(__cplusplus)
}
#endif
#endif /* UQM_PICKSHIP_H_INCL_ */
+7
View File
@@ -21,6 +21,9 @@
#include "libs/compiler.h"
#if defined(__cplusplus)
extern "C" {
#endif
/*------------------------------ Type Defines ----------------------------- */
enum
@@ -205,5 +208,9 @@ enum
extern const BYTE *Elements;
#if defined(__cplusplus)
}
#endif
#endif /* _ELEMDATA_H */
+7
View File
@@ -23,6 +23,10 @@ typedef struct GenerateFunctions GenerateFunctions;
#include "planets.h"
#include "libs/compiler.h"
#if defined(__cplusplus)
extern "C" {
#endif
/*
* To do (for further cleanups):
* - split off generateOrbital in a calculation and an activation
@@ -98,6 +102,9 @@ struct GenerateFunctions {
PickupLifeFunction pickupLife;
};
#if defined(__cplusplus)
}
#endif
#endif /* GENERATE_H */
@@ -21,6 +21,10 @@
#include "../planets.h"
#include "libs/compiler.h"
#if defined(__cplusplus)
extern "C" {
#endif
bool GenerateDefault_initNpcs (SOLARSYS_STATE *solarSys);
bool GenerateDefault_reinitNpcs (SOLARSYS_STATE *solarSys);
bool GenerateDefault_uninitNpcs (SOLARSYS_STATE *solarSys);
@@ -52,5 +56,9 @@ bool GenerateDefault_landerReportCycle (SOLARSYS_STATE *);
extern const GenerateFunctions generateDefaultFunctions;
#if defined(__cplusplus)
}
#endif
#endif /* GENDEFAULT_H */
+7
View File
@@ -26,6 +26,9 @@
#include "libs/timelib.h"
#include "../element.h"
#if defined(__cplusplus)
extern "C" {
#endif
// Surface magnification shift (x4)
#define MAG_SHIFT 2
@@ -76,5 +79,9 @@ enum
PS_NON_PLAYER,
};
#if defined(__cplusplus)
}
#endif
#endif /* _LANDER_H */
+7
View File
@@ -21,6 +21,9 @@
#include "libs/compiler.h"
#if defined(__cplusplus)
extern "C" {
#endif
#define BEHAVIOR_HUNT (0 << 0)
#define BEHAVIOR_FLEE (1 << 0)
@@ -65,5 +68,9 @@ typedef struct
extern const LIFEFORM_DESC CreatureData[];
#if defined(__cplusplus)
}
#endif
#endif /* _LIFEFORM_H */
+7
View File
@@ -21,6 +21,9 @@
#include "libs/reslib.h"
#if defined(__cplusplus)
extern "C" {
#endif
/*------------------------------ Type Defines ----------------------------- */
#define NUMBER_OF_ORBITS 16
@@ -328,5 +331,9 @@ enum
extern const PlanetFrame *PlanData;
#if defined(__cplusplus)
}
#endif
#endif /* _PLANDATA_H */
+7
View File
@@ -99,6 +99,9 @@ typedef struct solarsys_state SOLARSYS_STATE;
#include "plandata.h"
#include "sundata.h"
#if defined(__cplusplus)
extern "C" {
#endif
struct planet_desc
{
@@ -286,5 +289,9 @@ extern void GetPlanetOrMoonName (UNICODE *buf, COUNT bufsize);
extern void PlanetOrbitMenu (void);
extern void SaveSolarSysLocation (void);
#if defined(__cplusplus)
}
#endif
#endif /* _PLANETS_H */
+7
View File
@@ -26,6 +26,9 @@ typedef struct scan_block SCAN_BLOCK;
#include "libs/gfxlib.h"
#include "planets.h"
#if defined(__cplusplus)
extern "C" {
#endif
struct scan_desc
{
@@ -62,5 +65,9 @@ COUNT countNodesRetrieved (PLANET_INFO *planetInfo, BYTE scanType);
void setNodeRetrieved (PLANET_INFO *planetInfo, BYTE scanType, BYTE nodeNr);
void setNodeNotRetrieved (PLANET_INFO *planetInfo, BYTE scanType, BYTE nodeNr);
#if defined(__cplusplus)
}
#endif
#endif /* _SCAN_H */
+7
View File
@@ -22,6 +22,9 @@
#include "plandata.h"
#include "libs/compiler.h"
#if defined(__cplusplus)
extern "C" {
#endif
/*------------------------------ Global Data ------------------------------ */
@@ -58,5 +61,9 @@ extern DWORD DoPlanetaryAnalysis (SYSTEM_INFO *SysInfoPtr,
extern SYSTEM_INFO CurSysInfo;
#if defined(__cplusplus)
}
#endif
#endif /* _SUNDATA_H */
+8
View File
@@ -21,9 +21,17 @@
#include "libs/gfxlib.h"
#include "element.h"
#if defined(__cplusplus)
extern "C" {
#endif
extern void RedrawQueue (BOOLEAN clear);
extern void InitDisplayList (void);
extern void SetUpElement (ELEMENT *ElementPtr);
extern void InsertPrim (PRIM_LINKS *pLinks, COUNT primIndex, COUNT iPI);
#if defined(__cplusplus)
}
#endif
#endif /* UQM_PROCESS_H_INCL_ */
+8
View File
@@ -31,6 +31,10 @@ typedef HLINK HSTARSHIP;
#include "libs/sndlib.h"
#include "libs/reslib.h"
#if defined(__cplusplus)
extern "C" {
#endif
// TODO: remove RACES_PER_PLAYER remnant of SC1
#define RACES_PER_PLAYER 7
@@ -664,5 +668,9 @@ enum
BUILD_COLOR (MAKE_RGB15_INIT (0x06, 0x06, 0x06), 0x20), /* BLACK_URQUAN_SHIP */ \
BUILD_COLOR (MAKE_RGB15_INIT (0x14, 0x07, 0x1F), 0x39), /* YEHAT_REBEL_SHIP */
#if defined(__cplusplus)
}
#endif
#endif /* _RACES_H */
+8
View File
@@ -19,8 +19,16 @@
#include "libs/compiler.h"
#if defined(__cplusplus)
extern "C" {
#endif
extern BOOLEAN StartGame (void);
#if defined(__cplusplus)
}
#endif
#endif /* _RESTART_H */
+8
View File
@@ -21,8 +21,16 @@
// for SUMMARY_DESC
#include "libs/compiler.h"
#if defined(__cplusplus)
extern "C" {
#endif
extern void SaveProblem (void);
extern BOOLEAN SaveGame (COUNT which_game, SUMMARY_DESC *summary_desc);
#if defined(__cplusplus)
}
#endif
#endif /* _SAVE_H */
+8
View File
@@ -19,6 +19,10 @@
#include "libs/sndlib.h"
#if defined(__cplusplus)
extern "C" {
#endif
extern void ToggleMusic (void);
extern void StopMusic (void);
extern void ResumeMusic (void);
@@ -30,5 +34,9 @@ extern void PlaySoundEffect (SOUND S, COUNT Channel, SoundPosition Pos,
void *PositionalObject, BYTE Priority);
#if defined(__cplusplus)
}
#endif
#endif /* _SETTINGS_H */
+8
View File
@@ -24,6 +24,10 @@
#include "libs/gfxlib.h"
#include "libs/threadlib.h"
#if defined(__cplusplus)
extern "C" {
#endif
extern RESOURCE_INDEX hResIndex;
extern FRAME Screen;
@@ -79,6 +83,10 @@ void ClearPlayerInput (COUNT playerI);
void ClearPlayerInputAll (void);
#if defined(__cplusplus)
}
#endif
#endif /* _SETUP_H */
+8
View File
@@ -21,6 +21,10 @@
#include "controls.h"
#if defined(__cplusplus)
extern "C" {
#endif
typedef enum {
OPTVAL_DISABLED,
OPTVAL_ENABLED
@@ -88,4 +92,8 @@ void SetupMenu (void);
void GetGlobalOptions (GLOBALOPTS *opts);
void SetGlobalOptions (GLOBALOPTS *opts);
#if defined(__cplusplus)
}
#endif
#endif // _SETUPMENU_H
+8
View File
@@ -21,6 +21,10 @@
#include "races.h"
#include "element.h"
#if defined(__cplusplus)
extern "C" {
#endif
extern BOOLEAN GetNextStarShip (STARSHIP *LastStarShipPtr, COUNT which_side);
extern BOOLEAN GetInitialStarShips (void);
@@ -32,4 +36,8 @@ extern void collision (ELEMENT *ElementPtr0, POINT *pPt0,
extern STATUS_FLAGS inertial_thrust (ELEMENT *ElementPtr);
#if defined(__cplusplus)
}
#endif
#endif /* UQM_SHIP_H_INCL_ */
+8
View File
@@ -21,6 +21,10 @@
#include "menustat.h"
#if defined(__cplusplus)
extern "C" {
#endif
#define FIELD_WIDTH (STATUS_WIDTH - 5)
extern void CargoMenu (void);
@@ -33,5 +37,9 @@ extern void ShowRemainingCapacity (void);
extern SIZE InventoryDevices (BYTE *pDeviceMap, COUNT Size);
#if defined(__cplusplus)
}
#endif
#endif /* _SHIPCONT_H */
+8
View File
@@ -17,7 +17,15 @@
#ifndef ANDROSYN_H
#define ANDROSYN_H
#if defined(__cplusplus)
extern "C" {
#endif
RACE_DESC *init_androsynth (void);
#if defined(__cplusplus)
}
#endif
#endif /* ANDROSYN_H */
+8
View File
@@ -17,7 +17,15 @@
#ifndef ARILOU_H
#define ARILOU_H
#if defined(__cplusplus)
extern "C" {
#endif
RACE_DESC *init_arilou (void);
#if defined(__cplusplus)
}
#endif
#endif /* ARILOU_H */
+8
View File
@@ -17,7 +17,15 @@
#ifndef BLACKURQ_H
#define BLACKURQ_H
#if defined(__cplusplus)
extern "C" {
#endif
RACE_DESC *init_black_urquan (void);
#if defined(__cplusplus)
}
#endif
#endif /* BLACKURQ_H */
+8
View File
@@ -17,7 +17,15 @@
#ifndef CHENJESU_H
#define CHENJESU_H
#if defined(__cplusplus)
extern "C" {
#endif
RACE_DESC *init_chenjesu (void);
#if defined(__cplusplus)
}
#endif
#endif /* CHENJESU_H */
+8
View File
@@ -17,7 +17,15 @@
#ifndef CHMMR_H
#define CHMMR_H
#if defined(__cplusplus)
extern "C" {
#endif
RACE_DESC *init_chmmr (void);
#if defined(__cplusplus)
}
#endif
#endif /* CHMMR_H */
+8
View File
@@ -17,7 +17,15 @@
#ifndef DRUUGE_H
#define DRUUGE_H
#if defined(__cplusplus)
extern "C" {
#endif
RACE_DESC *init_druuge (void);
#if defined(__cplusplus)
}
#endif
#endif /* DRUUGE_H */
+8
View File
@@ -17,7 +17,15 @@
#ifndef HUMAN_H
#define HUMAN_H
#if defined(__cplusplus)
extern "C" {
#endif
RACE_DESC *init_human (void);
#if defined(__cplusplus)
}
#endif
#endif /* HUMAN_H */
+8
View File
@@ -17,7 +17,15 @@
#ifndef ILWRATH_H
#define ILWRATH_H
#if defined(__cplusplus)
extern "C" {
#endif
RACE_DESC *init_ilwrath (void);
#if defined(__cplusplus)
}
#endif
#endif /* ILWRATH_H */
+8
View File
@@ -17,7 +17,15 @@
#ifndef LASTBAT_H
#define LASTBAT_H
#if defined(__cplusplus)
extern "C" {
#endif
RACE_DESC *init_samatra (void);
#if defined(__cplusplus)
}
#endif
#endif /* LASTBAT_H */
+8
View File
@@ -17,7 +17,15 @@
#ifndef MELNORME_H
#define MELNORME_H
#if defined(__cplusplus)
extern "C" {
#endif
RACE_DESC *init_melnorme (void);
#if defined(__cplusplus)
}
#endif
#endif /* MELNORME_H */
+8
View File
@@ -17,7 +17,15 @@
#ifndef MMRNMHRM_H
#define MMRNMHRM_H
#if defined(__cplusplus)
extern "C" {
#endif
RACE_DESC *init_mmrnmhrm (void);
#if defined(__cplusplus)
}
#endif
#endif /* MMRNMHRM_H */
+8
View File
@@ -17,7 +17,15 @@
#ifndef MYCON_H
#define MYCON_H
#if defined(__cplusplus)
extern "C" {
#endif
RACE_DESC *init_mycon (void);
#if defined(__cplusplus)
}
#endif
#endif /* MYCON_H */
+8
View File
@@ -17,11 +17,19 @@
#ifndef ORZ_H
#define ORZ_H
#if defined(__cplusplus)
extern "C" {
#endif
RACE_DESC *init_orz (void);
void intruder_preprocess (ELEMENT *ElementPtr);
void marine_collision (ELEMENT *ElementPtr0, POINT *pPt0,
ELEMENT *ElementPtr1, POINT *pPt1);
#if defined(__cplusplus)
}
#endif
#endif /* ORZ_H */
+8
View File
@@ -17,7 +17,15 @@
#ifndef PKUNK_H
#define PKUNK_H
#if defined(__cplusplus)
extern "C" {
#endif
RACE_DESC *init_pkunk (void);
#if defined(__cplusplus)
}
#endif
#endif /* PKUNK_H */
+8
View File
@@ -17,7 +17,15 @@
#ifndef PROBE_H
#define PROBE_H
#if defined(__cplusplus)
extern "C" {
#endif
RACE_DESC *init_probe (void);
#if defined(__cplusplus)
}
#endif
#endif /* PROBE_H */
+8
View File
@@ -17,7 +17,15 @@
#ifndef SHOFIXTI_H
#define SHOFIXTI_H
#if defined(__cplusplus)
extern "C" {
#endif
RACE_DESC *init_shofixti (void);
#if defined(__cplusplus)
}
#endif
#endif /* SHOFIXTI_H */
+8
View File
@@ -17,7 +17,15 @@
#ifndef SIS_SHIP_H
#define SIS_SHIP_H
#if defined(__cplusplus)
extern "C" {
#endif
RACE_DESC *init_sis (void);
#if defined(__cplusplus)
}
#endif
#endif /* SIS_SHIP_H */

Some files were not shown because too many files have changed in this diff Show More