From 386ba500c2ea7a9ee9442fdbef558df227d03e87 Mon Sep 17 00:00:00 2001 From: Taylor Richards Date: Sat, 1 Oct 2005 21:38:32 +0000 Subject: [PATCH] some reorg of includes to not requires the same headers in many different files handle FS1 specific language changes some OS X changes for paths and to handle socklen_t better --- include/ds.h | 16 ++++++++++++++++ include/gropengl.h | 11 +++++++++++ include/localize.h | 10 ++++++++++ include/osregistry.h | 4 ++-- include/psnet2.h | 27 +++++++++++++++++++-------- include/pstypes.h | 9 +++++---- include/unix.h | 5 ++--- 7 files changed, 65 insertions(+), 17 deletions(-) diff --git a/include/ds.h b/include/ds.h index b885734..9bd8818 100644 --- a/include/ds.h +++ b/include/ds.h @@ -15,6 +15,11 @@ * Header file for interface to DirectSound * * $Log$ + * Revision 1.6 2005/10/01 21:38:32 taylor + * some reorg of includes to not requires the same headers in many different files + * handle FS1 specific language changes + * some OS X changes for paths and to handle socklen_t better + * * Revision 1.5 2005/08/13 17:01:34 taylor * gah, fix stupid commit message * @@ -160,6 +165,17 @@ extern int ds_initialized; #ifdef PLAT_UNIX + +#ifdef __APPLE__ + #include + #include + #include +#else + #include + #include + #include +#endif + extern const char* openal_error_string(); // if an error occurs after executing 'x' then do 'y' diff --git a/include/gropengl.h b/include/gropengl.h index 7ddab70..c671950 100644 --- a/include/gropengl.h +++ b/include/gropengl.h @@ -15,6 +15,11 @@ * Include file for OpenGL renderer * * $Log$ + * Revision 1.3 2005/10/01 21:38:32 taylor + * some reorg of includes to not requires the same headers in many different files + * handle FS1 specific language changes + * some OS X changes for paths and to handle socklen_t better + * * Revision 1.2 2002/06/09 04:41:13 relnev * added copyright header * @@ -38,6 +43,12 @@ #ifndef _GROPENGL_H #define _GROPENGL_H +#ifdef __APPLE__ +#include +#else +#include +#endif + void gr_opengl_init(); void gr_opengl_cleanup(); diff --git a/include/localize.h b/include/localize.h index bae8b7c..f5827ab 100644 --- a/include/localize.h +++ b/include/localize.h @@ -14,6 +14,11 @@ * * * $Log$ + * Revision 1.4 2005/10/01 21:38:32 taylor + * some reorg of includes to not requires the same headers in many different files + * handle FS1 specific language changes + * some OS X changes for paths and to handle socklen_t better + * * Revision 1.3 2003/06/03 04:00:39 taylor * Polish language support (Janusz Dziemidowicz) * @@ -71,6 +76,11 @@ #define LCL_DEFAULT_LANGUAGE LCL_ENGLISH +#ifdef MAKE_FS1 +#define LCL_NUM_LANGUAGES_FS1 3 +#define LCL_NUM_STRINGS_FS1 1570 +#endif + // following is the offset where special characters start in our font extern int Lcl_special_chars; diff --git a/include/osregistry.h b/include/osregistry.h index 81b65d8..ecb35fa 100644 --- a/include/osregistry.h +++ b/include/osregistry.h @@ -62,8 +62,8 @@ unsigned int os_config_read_uint( char *section, char *name, unsigned int defau // uses Ex versions of Windows registry functions char * os_config_read_string_ex( char *keyname, char *name, char *default_value ); -#ifdef __APPLE__ -extern char app_path[], full_path[]; +#if defined(__APPLE__) && !defined(MACOSX) +extern char full_path[]; #endif #endif diff --git a/include/psnet2.h b/include/psnet2.h index 8bbecff..a4778ac 100644 --- a/include/psnet2.h +++ b/include/psnet2.h @@ -15,6 +15,11 @@ * Header file for the application level network-interface. * * $Log$ + * Revision 1.7 2005/10/01 21:38:32 taylor + * some reorg of includes to not requires the same headers in many different files + * handle FS1 specific language changes + * some OS X changes for paths and to handle socklen_t better + * * Revision 1.6 2002/06/16 05:20:01 relnev * work around some gcc 3.1 weirdness * @@ -65,8 +70,21 @@ #ifndef _PSNET2_H #define _PSNET2_H +/* sigh */ +#ifdef PLAT_UNIX +#include +#include +#include +#include +#include +#endif + #include "pstypes.h" +#if defined(__APPLE__) && !defined(_SOCKLEN_T) +typedef int socklen_t; +#endif + // ------------------------------------------------------------------------------------------------------- // PSNET 2 DEFINES/VARS // @@ -155,14 +173,7 @@ extern SOCKET Unreliable_socket; // all PXO API modules should use this to send // PSNET 2 TOP LAYER FUNCTIONS - these functions simply buffer and store packets based upon type (see PSNET_TYPE_* defines) // -/* sigh */ -#ifdef PLAT_UNIX -#include -#include -#include -#include -#include -#else +#ifndef PLAT_UNIX struct sockaddr; struct fd_set; struct timeval; diff --git a/include/pstypes.h b/include/pstypes.h index 7f05bc7..f28ecdd 100644 --- a/include/pstypes.h +++ b/include/pstypes.h @@ -15,6 +15,11 @@ * Header file containg global typedefs, constants and macros * * $Log$ + * Revision 1.12 2005/10/01 21:38:32 taylor + * some reorg of includes to not requires the same headers in many different files + * handle FS1 specific language changes + * some OS X changes for paths and to handle socklen_t better + * * Revision 1.11 2004/12/15 04:10:45 taylor * outwnd_unix.cpp from fs2_open for logging to file in debug mode * fixes for default function values @@ -278,10 +283,6 @@ #define LOCAL static // make module local varilable static. -#ifdef __APPLE__ -typedef int socklen_t; -#endif - typedef __int64 longlong; typedef long fix; typedef unsigned char ubyte; diff --git a/include/unix.h b/include/unix.h index fe3588a..ce9972b 100644 --- a/include/unix.h +++ b/include/unix.h @@ -65,8 +65,7 @@ typedef struct FILETIME_s { #define WAVE_FORMAT_PCM 1 #define WAVE_FORMAT_ADPCM 2 -// these structures are packed on WIN32 so do it here too -#pragma pack(push, 1) +#pragma pack(1) typedef struct { WORD wFormatTag; WORD nChannels; @@ -89,7 +88,7 @@ typedef struct { WORD wBitsPerSample; WORD cbSize; } WAVEFORMATEX; -#pragma pack(pop) +#pragma pack() #define CRITICAL_SECTION SDL_mutex* -- 2.39.2