diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index 3c4bd4a65..13eff8c4b 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -958,6 +958,84 @@ set (PCH_SOURCES blood/src/view.cpp blood/src/warp.cpp blood/src/weapon.cpp + + sw/src/actor.cpp + sw/src/ai.cpp + sw/src/anim.cpp + sw/src/bldscript.cpp + sw/src/border.cpp + sw/src/break.cpp + sw/src/brooms.cpp + sw/src/bunny.cpp + sw/src/cache.cpp + sw/src/cheats.cpp + sw/src/colormap.cpp + sw/src/common.cpp + sw/src/config.cpp + sw/src/console.cpp + sw/src/coolg.cpp + sw/src/coolie.cpp + sw/src/copysect.cpp + sw/src/demo.cpp + sw/src/draw.cpp + sw/src/eel.cpp + sw/src/game.cpp + sw/src/girlninj.cpp + sw/src/goro.cpp + sw/src/grpscan.cpp + sw/src/hornet.cpp + sw/src/interp.cpp + sw/src/interpsh.cpp + sw/src/inv.cpp + sw/src/jbhlp.cpp + sw/src/jplayer.cpp + sw/src/jsector.cpp + sw/src/jweapon.cpp + sw/src/lava.cpp + sw/src/light.cpp + sw/src/mclip.cpp + sw/src/mdastr.cpp + sw/src/menus.cpp + sw/src/miscactr.cpp + sw/src/morph.cpp + sw/src/network.cpp + sw/src/ninja.cpp + sw/src/panel.cpp + sw/src/player.cpp + sw/src/predict.cpp + sw/src/quake.cpp + sw/src/ripper.cpp + sw/src/ripper2.cpp + sw/src/rooms.cpp + sw/src/rotator.cpp + sw/src/rts.cpp + sw/src/save.cpp + sw/src/saveable.cpp + sw/src/scrip2.cpp + sw/src/sector.cpp + sw/src/serp.cpp + sw/src/setup.cpp + sw/src/skel.cpp + sw/src/skull.cpp + sw/src/slidor.cpp + sw/src/sounds.cpp + sw/src/spike.cpp + sw/src/sprite.cpp + sw/src/startgtk.game.cpp + sw/src/startwin.game.cpp + sw/src/sumo.cpp + sw/src/swconfig.cpp + sw/src/sync.cpp + sw/src/text.cpp + sw/src/track.cpp + sw/src/vator.cpp + sw/src/vis.cpp + sw/src/wallmove.cpp + sw/src/warp.cpp + sw/src/weapon.cpp + sw/src/zilla.cpp + sw/src/zombie.cpp + common/utility/m_argv.cpp common/utility/files.cpp diff --git a/source/common/ns.h b/source/common/ns.h index 3787b5246..378c99324 100644 --- a/source/common/ns.h +++ b/source/common/ns.h @@ -11,7 +11,7 @@ #define BEGIN_BLD_NS namespace Blood { #define END_BLD_NS } -#define BEGIN_SW_NS namespace Blood { +#define BEGIN_SW_NS namespace ShadowWarrior { #define END_SW_NS } #else diff --git a/source/sw/src/_functio.h b/source/sw/src/_functio.h index 2a7efe775..915b5948e 100644 --- a/source/sw/src/_functio.h +++ b/source/sw/src/_functio.h @@ -34,6 +34,9 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #ifndef function_private_ #define function_private_ + +BEGIN_SW_NS + const char *gamefunctions[] = { "Move_Forward", @@ -381,4 +384,5 @@ static const char *joystickdigitaldefaults[] = "", "", }; +END_SW_NS #endif diff --git a/source/sw/src/_rts.h b/source/sw/src/_rts.h index 0b3b933e2..1e6e65bfc 100644 --- a/source/sw/src/_rts.h +++ b/source/sw/src/_rts.h @@ -51,6 +51,7 @@ Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms #ifndef rts_private__ #define rts_private__ +BEGIN_SW_NS //=============== // TYPES @@ -76,4 +77,6 @@ typedef struct char name[8]; } filelump_t; +END_SW_NS + #endif diff --git a/source/sw/src/actor.cpp b/source/sw/src/actor.cpp index c93ac35bb..349aad2cf 100644 --- a/source/sw/src/actor.cpp +++ b/source/sw/src/actor.cpp @@ -23,6 +23,9 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- + +#include "ns.h" + #include "build.h" #include "keys.h" @@ -34,6 +37,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "sprite.h" #include "actor.h" +BEGIN_SW_NS + extern int jump_grav; extern STATE s_DebrisNinja[]; @@ -1017,3 +1022,5 @@ saveable_module saveable_actor = // data NULL,0 }; + +END_SW_NS diff --git a/source/sw/src/actor.h b/source/sw/src/actor.h index 8fb45ec94..b6ba8a4c8 100644 --- a/source/sw/src/actor.h +++ b/source/sw/src/actor.h @@ -1,3 +1,5 @@ +#pragma once +BEGIN_SW_NS int DoBeginJump(short SpriteNum); int DoJump(short SpriteNum); int DoBeginFall(short SpriteNum); @@ -6,3 +8,4 @@ void KeepActorOnFloor(short SpriteNum); int DoActorSlide(short SpriteNum); int DoActorSectorDamage(short SpriteNum); int DoScaleSprite(short SpriteNum); +END_SW_NS diff --git a/source/sw/src/ai.cpp b/source/sw/src/ai.cpp index f4e9c009f..a056851a8 100644 --- a/source/sw/src/ai.cpp +++ b/source/sw/src/ai.cpp @@ -23,6 +23,8 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" + #include "build.h" #include "common.h" @@ -39,6 +41,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "network.h" +BEGIN_SW_NS + SWBOOL PlayerTakeDamage(PLAYERp, short); ANIMATOR InitActorRunToward; SWBOOL FAF_Sector(short); @@ -2229,3 +2233,4 @@ saveable_module saveable_ai = saveable_ai_data, SIZ(saveable_ai_data) }; +END_SW_NS diff --git a/source/sw/src/ai.h b/source/sw/src/ai.h index 923c94910..582a03c60 100644 --- a/source/sw/src/ai.h +++ b/source/sw/src/ai.h @@ -27,6 +27,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #ifndef AI_H #define AI_H +BEGIN_SW_NS // Call functions based on a random range value typedef struct @@ -163,4 +164,6 @@ DoActorExtra6Noise; void DoActorSetSpeed(short SpriteNum, uint8_t speed); +END_SW_NS + #endif diff --git a/source/sw/src/ambient.h b/source/sw/src/ambient.h index bab2d5f92..e0ed4c714 100644 --- a/source/sw/src/ambient.h +++ b/source/sw/src/ambient.h @@ -23,6 +23,7 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +BEGIN_SW_NS #ifdef AMBIENT_TABLE #define AMB_ENTRY(name, diginame, ambient_flags, maxtics) {name, diginame, ambient_flags, maxtics}, @@ -213,3 +214,4 @@ AMB_ENTRY(81, DIGI_SHIPBELL, AMB_INTERMIT, AMB_30) AMB_ENTRY(82, DIGI_FOGHORN, AMB_INTERMIT, AMB_120) #undef AMB_ENTRY +END_SW_NS diff --git a/source/sw/src/anim.cpp b/source/sw/src/anim.cpp index 8aecf3cbb..352769831 100644 --- a/source/sw/src/anim.cpp +++ b/source/sw/src/anim.cpp @@ -23,6 +23,8 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- + +#include "ns.h" #include "build.h" #include "cache1d.h" @@ -46,6 +48,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "animlib.h" #include "anim.h" +BEGIN_SW_NS + #define MAX_ANMS 10 anim_t *anm_ptr[MAX_ANMS]; @@ -387,3 +391,4 @@ ENDOFANIMLOOP: ANIM_FreeAnim(); walock[ANIM_TILE(ANIMnum)] = 1; } +END_SW_NS diff --git a/source/sw/src/anim.h b/source/sw/src/anim.h index f51867c19..c5bc4c410 100644 --- a/source/sw/src/anim.h +++ b/source/sw/src/anim.h @@ -23,6 +23,7 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +BEGIN_SW_NS #define ANIM_INTRO 0 #define ANIM_SERP 1 @@ -31,3 +32,4 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms unsigned char *LoadAnm(short anim_num); void playanm(short anim_num); +END_SW_NS diff --git a/source/sw/src/bldscript.cpp b/source/sw/src/bldscript.cpp index 1674de753..59e5af2b2 100644 --- a/source/sw/src/bldscript.cpp +++ b/source/sw/src/bldscript.cpp @@ -26,6 +26,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" // scriplib.c #include "build.h" #include "editor.h" @@ -38,6 +39,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #define PATHSEPERATOR '\\' +BEGIN_SW_NS //#define COMPUTE_TOTALS 1 @@ -641,3 +643,4 @@ void LogUserTime( SWBOOL bIsLoggingIn ) } */ +END_SW_NS diff --git a/source/sw/src/border.cpp b/source/sw/src/border.cpp index 4371b317d..ed83bf6d0 100644 --- a/source/sw/src/border.cpp +++ b/source/sw/src/border.cpp @@ -23,6 +23,8 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" + #include "build.h" #include "keys.h" @@ -34,6 +36,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "network.h" #include "text.h" +BEGIN_SW_NS + #define BAR_HEIGHT 48 #define XDIM 320 #define YDIM 200 @@ -582,3 +586,4 @@ SetRedrawScreen(PLAYERp pp) RedrawScreen = TRUE; } +END_SW_NS diff --git a/source/sw/src/bots.h b/source/sw/src/bots.h index 49de9357d..de079ec13 100644 --- a/source/sw/src/bots.h +++ b/source/sw/src/bots.h @@ -30,6 +30,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #ifndef BOTS_H #define BOTS_H +BEGIN_SW_NS // BOT DEFINITIONS AND STRUCTURES @@ -106,4 +107,6 @@ typedef struct BOT_BRAIN extern NODETREE BOT_TREELIST[25][50]; // There can be up to 50 of each item // with a cooresponding search tree for each +END_SW_NS + #endif diff --git a/source/sw/src/break.cpp b/source/sw/src/break.cpp index a47884025..9d60bf756 100644 --- a/source/sw/src/break.cpp +++ b/source/sw/src/break.cpp @@ -23,6 +23,7 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" #include "build.h" #include "keys.h" @@ -37,6 +38,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "break.h" +BEGIN_SW_NS + BREAK_INFOp GlobBreakInfo; static int SectorOfWall(short theline); @@ -1135,3 +1138,4 @@ static void DoWallBreakSpriteMatch(short match) } } } +END_SW_NS diff --git a/source/sw/src/break.h b/source/sw/src/break.h index ec00a1861..02f69851d 100644 --- a/source/sw/src/break.h +++ b/source/sw/src/break.h @@ -27,6 +27,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #ifndef BREAK_PUBLIC_ #define BREAK_PUBLIC_ +BEGIN_SW_NS + #define BF_TOUGH (BIT(0)) #define BF_KILL (BIT(1)) #define BF_BURN (BIT(2)) @@ -52,4 +54,6 @@ SWBOOL CheckBreakToughness(BREAK_INFOp break_info, short ID); int WallBreakPosition(short hit_wall, short *sectnum, int *x, int *y, int *z, short *ang); void SortBreakInfo(void); +END_SW_NS + #endif diff --git a/source/sw/src/brooms.cpp b/source/sw/src/brooms.cpp index 10627c75d..6d801d819 100644 --- a/source/sw/src/brooms.cpp +++ b/source/sw/src/brooms.cpp @@ -25,6 +25,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" #include "build.h" #include "editor.h" @@ -33,6 +34,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "names2.h" #include "game.h" +BEGIN_SW_NS extern int qsetmode; @@ -731,3 +733,4 @@ DrawOverlapRoom(int tx, int ty, int tz, short tang, int thoriz, short tsectnum) } } } +END_SW_NS diff --git a/source/sw/src/bunny.cpp b/source/sw/src/bunny.cpp index 15d3486ad..aa36b02e2 100644 --- a/source/sw/src/bunny.cpp +++ b/source/sw/src/bunny.cpp @@ -23,6 +23,8 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" + #include "build.h" #include "keys.h" @@ -37,6 +39,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "weapon.h" #include "track.h" +BEGIN_SW_NS + short Bunny_Count = 0; ANIMATOR DoActorMoveJump; ANIMATOR DoBunnyMoveJump; @@ -1628,3 +1632,4 @@ saveable_module saveable_bunny = saveable_bunny_data, SIZ(saveable_bunny_data) }; +END_SW_NS diff --git a/source/sw/src/cache.cpp b/source/sw/src/cache.cpp index 2e88af2f7..fc6c832f6 100644 --- a/source/sw/src/cache.cpp +++ b/source/sw/src/cache.cpp @@ -28,6 +28,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms Removed sounds that were causing "Could not load" error messages. ****************************************/ +#include "ns.h" #include "build.h" @@ -42,6 +43,8 @@ not load" error messages. #include "sounds.h" #include "network.h" +BEGIN_SW_NS + // Run the game with the -CACHEPRINT option and redirect to a file. // It will save out the tile and sound number every time one caches. // @@ -726,3 +729,4 @@ precache(void) } +END_SW_NS diff --git a/source/sw/src/cache.h b/source/sw/src/cache.h index 3e784326c..6c66bfb89 100644 --- a/source/sw/src/cache.h +++ b/source/sw/src/cache.h @@ -24,6 +24,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +BEGIN_SW_NS + #define CACHE_NONE 0 // don't use this - this is for ken #define CACHE_LOCK_MAX 255 #define CACHE_LOCK_START 200 @@ -38,3 +40,4 @@ void PreCacheRange(short start_pic, short end_pic); void DoTheCache(void); void precache(void); +END_SW_NS diff --git a/source/sw/src/cheats.cpp b/source/sw/src/cheats.cpp index 231c864f0..065b0ba36 100644 --- a/source/sw/src/cheats.cpp +++ b/source/sw/src/cheats.cpp @@ -23,6 +23,8 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" + #include "build.h" #include "keys.h" @@ -36,6 +38,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "function.h" //#include "inv.h" +BEGIN_SW_NS SWBOOL CheatInputMode = FALSE; char CheatInputString[256]; @@ -470,3 +473,4 @@ void CheatInput(void) } */ +END_SW_NS diff --git a/source/sw/src/colormap.cpp b/source/sw/src/colormap.cpp index 3fdfd4cb1..670f8c902 100644 --- a/source/sw/src/colormap.cpp +++ b/source/sw/src/colormap.cpp @@ -23,12 +23,16 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" + #include "build.h" #include "keys.h" #include "pal.h" #include "game.h" +BEGIN_SW_NS + short f_c = 3; static char tempbuf[256]; unsigned char DefaultPalette[256 * 32]; @@ -465,3 +469,4 @@ void GetPaletteFromVESA(unsigned char *pal) } // fprintf(stderr,"GetPaletteFromVESA() called\n"); } +END_SW_NS diff --git a/source/sw/src/colormap.h b/source/sw/src/colormap.h index 5d3a98837..557213e18 100644 --- a/source/sw/src/colormap.h +++ b/source/sw/src/colormap.h @@ -1,6 +1,8 @@ #ifndef colormap_public_ #define colormap_public_ +BEGIN_SW_NS + extern unsigned char DefaultPalette[]; void MapColors(short num,COLOR_MAP cm,short create); @@ -10,4 +12,6 @@ void set_pal(unsigned char *pal); void GetPaletteFromVESA(unsigned char *pal); void InitPalette(void); +END_SW_NS + #endif diff --git a/source/sw/src/common.cpp b/source/sw/src/common.cpp index d3240e216..71daeaca2 100644 --- a/source/sw/src/common.cpp +++ b/source/sw/src/common.cpp @@ -1,8 +1,11 @@ +#include "ns.h" #include "build.h" #include "common_game.h" +BEGIN_SW_NS + static const char *defaultgrpfilename = "sw.grp"; static const char *defaultdeffilename = "sw.def"; @@ -47,3 +50,4 @@ void SW_InitMultiPsky(void) defaultsky->lognumtiles = 1; defaultsky->horizfrac = 8192; } +END_SW_NS diff --git a/source/sw/src/common_game.h b/source/sw/src/common_game.h index efda2c31f..3f8d3e5a3 100644 --- a/source/sw/src/common_game.h +++ b/source/sw/src/common_game.h @@ -34,9 +34,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #ifndef common_public_ #define common_public_ -#ifdef __cplusplus -extern "C" { -#endif +BEGIN_SW_NS //**************************************************************************** // @@ -143,7 +141,5 @@ void clearGrpNamePtr(void); void SW_InitMultiPsky(void); -#ifdef __cplusplus -}; -#endif +END_SW_NS #endif diff --git a/source/sw/src/config.cpp b/source/sw/src/config.cpp index 6d17bdddc..a96feb6b0 100644 --- a/source/sw/src/config.cpp +++ b/source/sw/src/config.cpp @@ -23,6 +23,8 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" + #include "build.h" #include "baselayer.h" #include "osd.h" @@ -49,6 +51,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms # include "sdl_inc.h" #endif +BEGIN_SW_NS + extern void ReadGameSetup(int32_t scripthandle); extern void WriteGameSetup(int32_t scripthandle); @@ -753,3 +757,4 @@ void CONFIG_WriteSetup(void) SCRIPT_Free(scripthandle); } +END_SW_NS diff --git a/source/sw/src/config.h b/source/sw/src/config.h index f1a7e1ae3..5d09014c0 100644 --- a/source/sw/src/config.h +++ b/source/sw/src/config.h @@ -33,9 +33,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "keyboard.h" #include "control.h" -#ifdef __cplusplus -extern "C" { -#endif +BEGIN_SW_NS #define SETUPNAMEPARM "SETUPFILE" @@ -132,7 +130,5 @@ int32_t CONFIG_FunctionNameToNum(const char *func); const char *CONFIG_AnalogNumToName(int32_t func); int32_t CONFIG_AnalogNameToNum(const char *func); -#ifdef __cplusplus -}; -#endif +END_SW_NS #endif diff --git a/source/sw/src/console.cpp b/source/sw/src/console.cpp index 6f5e7e4e3..3178bdcba 100644 --- a/source/sw/src/console.cpp +++ b/source/sw/src/console.cpp @@ -28,6 +28,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms // Handles all argument storing and user console variable modifications. // Copyright (c) 1996 by Jim Norwood +#include "ns.h" + #include "build.h" #include "mytypes.h" @@ -55,6 +57,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "text.h" #include "jsector.h" +BEGIN_SW_NS + // DEFINES /////////////////////////////////////////////////////////////////////////////////// #define MAX_USER_ARGS 100 #define MAX_CONSOLE_COMMANDS 100 @@ -1422,3 +1426,4 @@ void CON_DumpSoundList(void) } +END_SW_NS diff --git a/source/sw/src/coolg.cpp b/source/sw/src/coolg.cpp index a40493ed2..0dc518e22 100644 --- a/source/sw/src/coolg.cpp +++ b/source/sw/src/coolg.cpp @@ -23,6 +23,8 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" + #include "build.h" #include "keys.h" @@ -35,6 +37,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "weapon.h" #include "track.h" +BEGIN_SW_NS + ANIMATOR DoCoolgCircle,InitCoolgCircle; DECISION CoolgBattle[] = @@ -994,3 +998,4 @@ saveable_module saveable_coolg = saveable_coolg_data, SIZ(saveable_coolg_data) }; +END_SW_NS diff --git a/source/sw/src/coolie.cpp b/source/sw/src/coolie.cpp index 7c9f655f1..4f4ffa5bc 100644 --- a/source/sw/src/coolie.cpp +++ b/source/sw/src/coolie.cpp @@ -23,6 +23,8 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" + #include "build.h" #include "keys.h" @@ -36,6 +38,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "track.h" #include "weapon.h" +BEGIN_SW_NS + ANIMATOR InitCoolieCharge; DECISION CoolieBattle[] = @@ -734,3 +738,4 @@ saveable_module saveable_coolie = saveable_coolie_data, SIZ(saveable_coolie_data) }; +END_SW_NS diff --git a/source/sw/src/copysect.cpp b/source/sw/src/copysect.cpp index 820953929..e0e50e84a 100644 --- a/source/sw/src/copysect.cpp +++ b/source/sw/src/copysect.cpp @@ -23,6 +23,8 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" + #include "build.h" #include "names2.h" @@ -32,6 +34,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "sprite.h" #include "track.h" +BEGIN_SW_NS + void CopySectorWalls(short dest_sectnum, short src_sectnum) { short dest_wall_num, src_wall_num, start_wall; @@ -236,3 +240,4 @@ void CopySectorMatch(short match) } } +END_SW_NS diff --git a/source/sw/src/damage.h b/source/sw/src/damage.h index c395632f8..21a3123f6 100644 --- a/source/sw/src/damage.h +++ b/source/sw/src/damage.h @@ -23,6 +23,7 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +BEGIN_SW_NS #ifdef DAMAGE_TABLE #define DAMAGE_ENTRY(id, init_func, damage_lo, damage_hi, radius, max_ammo, min_ammo, with_weapon) \ @@ -106,3 +107,4 @@ DAMAGE_ENTRY(MAX_WEAPONS, NULL, 10, 20, 0, -1, -1, - #undef DAMAGE_ENTRY #undef DAMAGE_ENTRY_WPN +END_SW_NS diff --git a/source/sw/src/demo.cpp b/source/sw/src/demo.cpp index 0c358c3e0..94a4b7107 100644 --- a/source/sw/src/demo.cpp +++ b/source/sw/src/demo.cpp @@ -24,6 +24,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" //#define MAIN //#define QUIET #include "build.h" @@ -43,6 +44,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "player.h" #include "menus.h" +BEGIN_SW_NS DFILE DemoFileIn = DF_ERR; FILE *DemoFileOut; @@ -654,3 +656,4 @@ ScenePlayBack(void) +END_SW_NS diff --git a/source/sw/src/demo.h b/source/sw/src/demo.h index 6441e1f15..8c0b462a7 100644 --- a/source/sw/src/demo.h +++ b/source/sw/src/demo.h @@ -23,6 +23,7 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +BEGIN_SW_NS extern FILE *DemoFile; extern SWBOOL DemoPlaying; @@ -74,3 +75,4 @@ void ScenePlayBack(void); void DemoRecordSetup(void); void DemoDebugWrite(void); void DemoWriteBuffer(void); +END_SW_NS diff --git a/source/sw/src/digi.h b/source/sw/src/digi.h index 4e6e34e1e..d44f9d3ee 100644 --- a/source/sw/src/digi.h +++ b/source/sw/src/digi.h @@ -23,6 +23,7 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +BEGIN_SW_NS #ifdef DIGI_TABLE #define DIGI_ENTRY(name, id, id_num, pri, pitch_lo, pitch_hi, voc_num, voc_dist, voc_flags) { name, NULL, 0, pitch_lo, pitch_hi, pri, voc_num, voc_dist, voc_flags, 0,0}, @@ -990,3 +991,4 @@ DIGI_ENTRY("ZC9.VOC", DIGI_ZC9, 624, PRI_PLAYERVOICE, 0, DIGI_ENTRY("Z16043.VOC", DIGI_Z16043, 625, PRI_PLAYERVOICE, 0, 0, 0, DIST_NORMAL, VF_NORMAL) #undef DIGI_ENTRY +END_SW_NS diff --git a/source/sw/src/draw.cpp b/source/sw/src/draw.cpp index 930dac3f9..cd7eb3b9b 100644 --- a/source/sw/src/draw.cpp +++ b/source/sw/src/draw.cpp @@ -23,6 +23,8 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" + #define QUIET #include "build.h" #include "pragmas.h" @@ -55,6 +57,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "sector.h" #include "config.h" +BEGIN_SW_NS + static int OverlapDraw = FALSE; extern SWBOOL QuitFlag, LocationInfo, ConPanel, SpriteInfo, PauseKeySet; extern SWBOOL Voxel; @@ -2718,3 +2722,4 @@ ScreenSaveSetup(PLAYERp pp) +END_SW_NS diff --git a/source/sw/src/eel.cpp b/source/sw/src/eel.cpp index ee3b1a396..8d011b9b1 100644 --- a/source/sw/src/eel.cpp +++ b/source/sw/src/eel.cpp @@ -23,6 +23,8 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" + #include "build.h" #include "keys.h" @@ -34,6 +36,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "weapon.h" #include "track.h" +BEGIN_SW_NS DECISION EelBattle[] = { @@ -680,3 +683,4 @@ saveable_module saveable_eel = saveable_eel_data, SIZ(saveable_eel_data) }; +END_SW_NS diff --git a/source/sw/src/function.h b/source/sw/src/function.h index c43ede065..e48a87547 100644 --- a/source/sw/src/function.h +++ b/source/sw/src/function.h @@ -34,6 +34,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #ifndef function_public_ #define function_public_ +BEGIN_SW_NS #define NUMGAMEFUNCTIONS 51 @@ -93,4 +94,6 @@ enum gamefunc_Show_Menu, gamefunc_Show_Console, }; +END_SW_NS + #endif diff --git a/source/sw/src/game.cpp b/source/sw/src/game.cpp index c2bfdccbc..553f5b361 100644 --- a/source/sw/src/game.cpp +++ b/source/sw/src/game.cpp @@ -24,6 +24,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" // CTW NOTE /* Known remaining issues: @@ -94,6 +95,8 @@ Things required to make savegames work: #include "crc32.h" +BEGIN_SW_NS + const char* AppProperName = "VoidSW"; const char* AppTechnicalName = "voidsw"; @@ -5992,3 +5995,4 @@ saveable_module saveable_build = }; // vim:ts=4:sw=4:expandtab: +END_SW_NS diff --git a/source/sw/src/game.h b/source/sw/src/game.h index 274a0b09f..2a8a25c3e 100644 --- a/source/sw/src/game.h +++ b/source/sw/src/game.h @@ -41,6 +41,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "sounds.h" #include "settings.h" +BEGIN_SW_NS + //#define SW_SHAREWARE 1 // This determines whether game is shareware compile or not! extern char isShareware, useDarts; #define SW_SHAREWARE (isShareware) @@ -2384,3 +2386,5 @@ void SetSpikeActive(short SpriteNum); // spike.c int COVERinsertsprite(short sectnum, short statnum); //returns (short)spritenum; void AudioUpdate(void); // stupid + +END_SW_NS diff --git a/source/sw/src/gamedefs.h b/source/sw/src/gamedefs.h index 206bd582a..5b28ce899 100644 --- a/source/sw/src/gamedefs.h +++ b/source/sw/src/gamedefs.h @@ -34,9 +34,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #ifndef gamedefs_public_ #define gamedefs_public_ -#ifdef __cplusplus -extern "C" { -#endif +BEGIN_SW_NS //**************************************************************************** // @@ -215,8 +213,6 @@ enum }; -#ifdef __cplusplus -}; -#endif +END_SW_NS #endif diff --git a/source/sw/src/girlninj.cpp b/source/sw/src/girlninj.cpp index 2b11797b4..096b2b9e5 100644 --- a/source/sw/src/girlninj.cpp +++ b/source/sw/src/girlninj.cpp @@ -23,6 +23,8 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" + #include "build.h" #include "keys.h" @@ -38,6 +40,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "track.h" #include "sprite.h" +BEGIN_SW_NS + int DoHariKariBlood(short SpriteNum); //int InitActorMoveCloser(short SpriteNum); @@ -930,3 +934,4 @@ saveable_module saveable_girlninj = saveable_girlninj_data, SIZ(saveable_girlninj_data) }; +END_SW_NS diff --git a/source/sw/src/goro.cpp b/source/sw/src/goro.cpp index 8f8a0aa57..ff1747a42 100644 --- a/source/sw/src/goro.cpp +++ b/source/sw/src/goro.cpp @@ -23,6 +23,8 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" + #include "build.h" #include "keys.h" @@ -33,6 +35,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "actor.h" #include "track.h" +BEGIN_SW_NS + #define GORO_PAIN_R0 GORO_STAND_R0 #define GORO_PAIN_R1 GORO_STAND_R1 #define GORO_PAIN_R2 GORO_STAND_R2 @@ -617,3 +621,4 @@ saveable_module saveable_goro = saveable_goro_data, SIZ(saveable_goro_data) }; +END_SW_NS diff --git a/source/sw/src/grpscan.cpp b/source/sw/src/grpscan.cpp index b7bd24222..8d2ab71b3 100644 --- a/source/sw/src/grpscan.cpp +++ b/source/sw/src/grpscan.cpp @@ -21,6 +21,8 @@ */ //------------------------------------------------------------------------- +#include "ns.h" + #include "build.h" #include "baselayer.h" @@ -30,6 +32,8 @@ #include "grpscan.h" +BEGIN_SW_NS + internalgrpfile grpfiles[numgrpfiles] = { { "Registered Version", 0x7545319Fu, 47536148 }, @@ -210,3 +214,4 @@ void FreeGroups(void) } } +END_SW_NS diff --git a/source/sw/src/grpscan.h b/source/sw/src/grpscan.h index 782102a40..0ceb938df 100644 --- a/source/sw/src/grpscan.h +++ b/source/sw/src/grpscan.h @@ -24,6 +24,8 @@ #ifndef grpscan_h__ #define grpscan_h__ +BEGIN_SW_NS + // List of internally-known GRP files #define numgrpfiles 3 struct internalgrpfile @@ -46,4 +48,6 @@ extern grpfile *foundgrps; int ScanGroups(void); void FreeGroups(void); +END_SW_NS + #endif diff --git a/source/sw/src/hornet.cpp b/source/sw/src/hornet.cpp index f3ef02335..179d9ecfa 100644 --- a/source/sw/src/hornet.cpp +++ b/source/sw/src/hornet.cpp @@ -23,6 +23,8 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" + #include "build.h" #include "keys.h" @@ -35,6 +37,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "track.h" #include "sprite.h" +BEGIN_SW_NS + ANIMATOR DoHornetCircle, InitHornetCircle; @@ -673,3 +677,4 @@ saveable_module saveable_hornet = saveable_hornet_data, SIZ(saveable_hornet_data) }; +END_SW_NS diff --git a/source/sw/src/interp.cpp b/source/sw/src/interp.cpp index f62c71b9c..923db284b 100644 --- a/source/sw/src/interp.cpp +++ b/source/sw/src/interp.cpp @@ -24,11 +24,15 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" + #include "compat.h" #include "pragmas.h" #include "interp.h" +BEGIN_SW_NS + #define MAXINTERPOLATIONS 1024 int numinterpolations = 0, startofdynamicinterpolations = 0; int oldipos[MAXINTERPOLATIONS]; @@ -107,3 +111,4 @@ void restoreinterpolations(void) // Stick at end of drawscreen for (i = numinterpolations - 1; i >= 0; i--) *curipos[i] = bakipos[i]; } +END_SW_NS diff --git a/source/sw/src/interp.h b/source/sw/src/interp.h index 08531c424..9b8704a9f 100644 --- a/source/sw/src/interp.h +++ b/source/sw/src/interp.h @@ -23,6 +23,7 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +BEGIN_SW_NS #define SHORT_MAXINTERPOLATIONS 256 extern short short_numinterpolations, short_startofdynamicinterpolations; @@ -41,3 +42,4 @@ void stopinterpolation(int *posptr); void updateinterpolations(void); void dointerpolations(int smoothratio); void restoreinterpolations(void); +END_SW_NS diff --git a/source/sw/src/interpsh.cpp b/source/sw/src/interpsh.cpp index 10b070d31..fa513ba1a 100644 --- a/source/sw/src/interpsh.cpp +++ b/source/sw/src/interpsh.cpp @@ -24,11 +24,15 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" + #include "compat.h" #include "pragmas.h" #include "interp.h" +BEGIN_SW_NS + #define SHORT_MAXINTERPOLATIONS 256 short short_numinterpolations = 0, short_startofdynamicinterpolations = 0; short short_oldipos[SHORT_MAXINTERPOLATIONS]; @@ -107,3 +111,4 @@ void short_restoreinterpolations(void) // Stick at end of drawsc for (i = short_numinterpolations - 1; i >= 0; i--) *short_curipos[i] = short_bakipos[i]; } +END_SW_NS diff --git a/source/sw/src/inv.cpp b/source/sw/src/inv.cpp index 166ecd292..65a355e5e 100644 --- a/source/sw/src/inv.cpp +++ b/source/sw/src/inv.cpp @@ -24,6 +24,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" + #undef MAIN #include "build.h" @@ -36,6 +38,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "colormap.h" #include "player.h" +BEGIN_SW_NS + //#define SAVE_EXTERN //#include "_save.h" //#undef SAVE_EXTERN @@ -1148,3 +1152,4 @@ PlayerUpdateInventoryState(PLAYERp pp) InventoryDisplayString(pp, x, y, 0, ds); } } +END_SW_NS diff --git a/source/sw/src/inv.h b/source/sw/src/inv.h index 3d35b2d8a..19218dd43 100644 --- a/source/sw/src/inv.h +++ b/source/sw/src/inv.h @@ -23,6 +23,7 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +BEGIN_SW_NS enum InventoryNames { @@ -59,3 +60,4 @@ void UpdateMiniBar(PLAYERp pp); void InventoryKeys(PLAYERp pp); void UseInventoryRepairKit(PLAYERp pp); void InventoryTimer(PLAYERp pp); +END_SW_NS diff --git a/source/sw/src/jbhlp.cpp b/source/sw/src/jbhlp.cpp index 42c79e58f..78e1e6202 100644 --- a/source/sw/src/jbhlp.cpp +++ b/source/sw/src/jbhlp.cpp @@ -26,6 +26,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" + #include "build.h" #include "editor.h" #include "cache1d.h" @@ -34,6 +36,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "names2.h" #include "game.h" +BEGIN_SW_NS #define M_RED 12 #define M_BLUE 9 @@ -219,3 +222,4 @@ void ContextHelp(short spritenum) } +END_SW_NS diff --git a/source/sw/src/jplayer.cpp b/source/sw/src/jplayer.cpp index 4167114f7..348074662 100644 --- a/source/sw/src/jplayer.cpp +++ b/source/sw/src/jplayer.cpp @@ -26,6 +26,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms // JPLAYER.C // Copyright (c) 1996 by Jim Norwood +#include "ns.h" #include "build.h" @@ -52,6 +53,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "bots.h" +BEGIN_SW_NS + SWBOOL WeaponOK(PLAYERp pp); #define MAXANGVEL 80 @@ -898,3 +901,4 @@ void computergetinput(int snum, SW_PACKET *syn) */ } +END_SW_NS diff --git a/source/sw/src/jsector.cpp b/source/sw/src/jsector.cpp index 5c89d2977..c336dc736 100644 --- a/source/sw/src/jsector.cpp +++ b/source/sw/src/jsector.cpp @@ -26,6 +26,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms // JSECTOR.C // This is all Jim's programming having to do with sectors. +#include "ns.h" #include "build.h" @@ -45,6 +46,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "pal.h" #include "parent.h" +BEGIN_SW_NS // V A R I A B L E D E C L A R A T I O N S ////////////////////////////////////////////////////// @@ -1474,3 +1476,4 @@ UnlockKeyLock(short key_num, short hit_sprite) } } +END_SW_NS diff --git a/source/sw/src/jsector.h b/source/sw/src/jsector.h index 2b7a1a110..3ac8a8660 100644 --- a/source/sw/src/jsector.h +++ b/source/sw/src/jsector.h @@ -29,6 +29,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "reserve.h" +BEGIN_SW_NS + #define MAXMIRRORDIST 3300 // At this distance, or less, the magic mirrors activate. #define MAXMIRRORMONSTERS 4 // Max monsters any one magic mirror can spawn @@ -77,4 +79,6 @@ void JS_UnInitLockouts(void); void JS_ProcessEchoSpot(void); void JS_SpriteSetup(void); +END_SW_NS + #endif diff --git a/source/sw/src/jweapon.cpp b/source/sw/src/jweapon.cpp index e70d25f04..58aa92bc9 100644 --- a/source/sw/src/jweapon.cpp +++ b/source/sw/src/jweapon.cpp @@ -23,6 +23,8 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" + #include "build.h" #include "common.h" @@ -44,6 +46,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "sector.h" #include "actor.h" +BEGIN_SW_NS + ANIMATOR NullAnimator,DoSuicide; ANIMATOR DoBloodSpray; int SpawnFlashBombOnActor(int16_t enemy); @@ -2614,3 +2618,4 @@ saveable_module saveable_jweapon = saveable_jweapon_data, SIZ(saveable_jweapon_data) }; +END_SW_NS diff --git a/source/sw/src/lava.cpp b/source/sw/src/lava.cpp index f47b49973..4664de863 100644 --- a/source/sw/src/lava.cpp +++ b/source/sw/src/lava.cpp @@ -23,6 +23,8 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" + #include "build.h" #include "keys.h" @@ -34,6 +36,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "actor.h" #include "track.h" +BEGIN_SW_NS + DECISION LavaBattle[] = { {600, InitActorMoveCloser }, @@ -567,3 +571,4 @@ saveable_module saveable_lava = saveable_lava_data, SIZ(saveable_lava_data) }; +END_SW_NS diff --git a/source/sw/src/light.cpp b/source/sw/src/light.cpp index ebdbfe122..b7c0c530b 100644 --- a/source/sw/src/light.cpp +++ b/source/sw/src/light.cpp @@ -23,12 +23,16 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" + #include "build.h" #include "names2.h" #include "game.h" #include "light.h" +BEGIN_SW_NS + /* #define LIGHT_Match(sp) (SP_TAG2((sp))) */ /* #define LIGHT_Type(sp) (SP_TAG3((sp))) */ /* #define LIGHT_MaxTics(sp) (SP_TAG4((sp))) */ @@ -424,3 +428,4 @@ void DoLighting(void) } } } +END_SW_NS diff --git a/source/sw/src/light.h b/source/sw/src/light.h index bdde8b809..6887ac387 100644 --- a/source/sw/src/light.h +++ b/source/sw/src/light.h @@ -23,6 +23,7 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +BEGIN_SW_NS void SectorLightShade(SPRITEp sp, short intensity); @@ -52,3 +53,4 @@ void DoLighting(void); #define LIGHT_DiffuseMult(sp) (SP_TAG4((sp))) enum LightTypes {LIGHT_CONSTANT, LIGHT_FLICKER, LIGHT_FADE, LIGHT_FLICKER_ON, LIGHT_FADE_TO_ON_OFF}; +END_SW_NS diff --git a/source/sw/src/lists.h b/source/sw/src/lists.h index 0ed59014a..e3a98e98e 100644 --- a/source/sw/src/lists.h +++ b/source/sw/src/lists.h @@ -28,6 +28,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #define LISTS_H +BEGIN_SW_NS + /********************************************************************/ typedef @@ -64,6 +66,8 @@ typedef #define EMPTY(list) (((LIST) list)->Next == (LIST) list) +END_SW_NS + #endif diff --git a/source/sw/src/mclip.cpp b/source/sw/src/mclip.cpp index 012fad66e..f28f90671 100644 --- a/source/sw/src/mclip.cpp +++ b/source/sw/src/mclip.cpp @@ -23,6 +23,8 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" + #include "build.h" #include "common.h" @@ -35,6 +37,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "player.h" #include "mclip.h" +BEGIN_SW_NS + #if 0 int MultiClipMove(PLAYERp pp, int z, int floor_dist) { @@ -560,3 +564,4 @@ short RectClipTurn(PLAYERp pp, short new_ang, int *qx, int *qy, int *ox, int *oy return FALSE; } +END_SW_NS diff --git a/source/sw/src/mclip.h b/source/sw/src/mclip.h index c8544144f..ca47b7c87 100644 --- a/source/sw/src/mclip.h +++ b/source/sw/src/mclip.h @@ -23,6 +23,7 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +BEGIN_SW_NS #define RECT_CLIP 1 @@ -33,3 +34,4 @@ int RectClipMove(PLAYERp pp, int *qx, int *qy); int testpointinquad(int x, int y, int *qx, int *qy); //short RectClipTurn(PLAYERp pp, short new_ang, int z, int floor_dist, int *qx, int *qy); short RectClipTurn(PLAYERp pp, short new_ang, int *qx, int *qy, int *ox, int *oy); +END_SW_NS diff --git a/source/sw/src/mdastr.cpp b/source/sw/src/mdastr.cpp index d073cc909..14bca4c12 100644 --- a/source/sw/src/mdastr.cpp +++ b/source/sw/src/mdastr.cpp @@ -23,6 +23,8 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" + #include "build.h" #include "mytypes.h" @@ -31,6 +33,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms //#include "panel.h" #include "game.h" +BEGIN_SW_NS + // macros this function needs //#define MK_FP(seg,ofs) ((void _seg *)(seg)+(void near *)(ofs)) //#define PokeByte(a,b,c) (*((char far *)MK_FP((a),(b)))=(char)(c)) @@ -80,3 +84,4 @@ PokeStringMono(uint8_t Attr, uint8_t* String) } //#endif +END_SW_NS diff --git a/source/sw/src/menus.cpp b/source/sw/src/menus.cpp index 7dd3a1604..8cd579c6b 100644 --- a/source/sw/src/menus.cpp +++ b/source/sw/src/menus.cpp @@ -23,6 +23,8 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" + #include "build.h" #include "osd.h" @@ -53,6 +55,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "colormap.h" #include "config.h" +BEGIN_SW_NS + //#define PLOCK_VERSION TRUE @@ -5295,3 +5299,4 @@ void ResetPalette(PLAYERp pp) // vim:ts=4:sw=4:enc=utf-8: +END_SW_NS diff --git a/source/sw/src/menus.h b/source/sw/src/menus.h index cca4a995b..5104af15b 100644 --- a/source/sw/src/menus.h +++ b/source/sw/src/menus.h @@ -30,6 +30,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #ifndef MENUS_PUBLIC_ #define MENUS_PUBLIC_ +BEGIN_SW_NS + #define MENU_SHADE_DEFAULT 0 #define MENU_SHADE_INACTIVE 20 @@ -340,4 +342,6 @@ typedef struct int x,y; } VMODE; +END_SW_NS + #endif diff --git a/source/sw/src/mfile.h b/source/sw/src/mfile.h index 6f80b773e..646ed620d 100644 --- a/source/sw/src/mfile.h +++ b/source/sw/src/mfile.h @@ -27,6 +27,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "compat.h" #include "cache1d.h" +BEGIN_SW_NS + typedef BFILE* MFILE_WRITE; typedef int32_t MFILE_READ; #define MREAD(ptr, size, num,handle) kdfread((ptr),(size),(num),(handle)) @@ -37,3 +39,4 @@ typedef int32_t MFILE_READ; #define MCLOSE_READ(handle) kclose(handle) #define MOPEN_WRITE_ERR 0 #define MOPEN_READ_ERR -1 +END_SW_NS diff --git a/source/sw/src/miscactr.cpp b/source/sw/src/miscactr.cpp index bdf4dccb4..9c1001308 100644 --- a/source/sw/src/miscactr.cpp +++ b/source/sw/src/miscactr.cpp @@ -23,6 +23,8 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" + #include "build.h" #include "keys.h" @@ -37,6 +39,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "sector.h" #include "sprite.h" +BEGIN_SW_NS ANIMATOR NullToiletGirl; @@ -2211,3 +2214,4 @@ saveable_module saveable_miscactr = saveable_miscactr_data, SIZ(saveable_miscactr_data) }; +END_SW_NS diff --git a/source/sw/src/morph.cpp b/source/sw/src/morph.cpp index 4505c66d2..0e858ebeb 100644 --- a/source/sw/src/morph.cpp +++ b/source/sw/src/morph.cpp @@ -23,6 +23,8 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" + #include "build.h" #include "names2.h" @@ -34,6 +36,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "player.h" #include "game.h" +BEGIN_SW_NS + void ScaleSectorObject(SECTOR_OBJECTp); short @@ -586,3 +590,4 @@ saveable_module saveable_morph = // data NULL,0 }; +END_SW_NS diff --git a/source/sw/src/mytypes.h b/source/sw/src/mytypes.h index 4238093ed..99aac048c 100644 --- a/source/sw/src/mytypes.h +++ b/source/sw/src/mytypes.h @@ -30,6 +30,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "compat.h" +BEGIN_SW_NS + #define OFF 0 #define ON (!OFF) @@ -153,5 +155,7 @@ typedef unsigned char SWBOOL; #define BETWEEN(x,low,high) (((x) >= (low)) && ((x) <= (high))) +END_SW_NS + #endif diff --git a/source/sw/src/names2.h b/source/sw/src/names2.h index 777bf260e..eb2aa0267 100644 --- a/source/sw/src/names2.h +++ b/source/sw/src/names2.h @@ -29,6 +29,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "names.h" +BEGIN_SW_NS + // Rotation info // 4 @@ -1246,4 +1248,6 @@ enum STAT_ENUMS #define SCROLL 516 #define SCROLL_FIRE 524 +END_SW_NS + #endif diff --git a/source/sw/src/network.cpp b/source/sw/src/network.cpp index df75e37d1..7e670e9c3 100644 --- a/source/sw/src/network.cpp +++ b/source/sw/src/network.cpp @@ -23,6 +23,8 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" + #include "build.h" #include "baselayer.h" #include "mmulti.h" @@ -39,6 +41,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "text.h" #include "menus.h" +BEGIN_SW_NS /* SYNC BUG NOTES: @@ -1624,3 +1627,4 @@ getpackets(void) } } } +END_SW_NS diff --git a/source/sw/src/network.h b/source/sw/src/network.h index ec90d3e97..8e9f175df 100644 --- a/source/sw/src/network.h +++ b/source/sw/src/network.h @@ -23,6 +23,7 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +BEGIN_SW_NS #define PACKET_TYPE_MASTER_TO_SLAVE 0 #define PACKET_TYPE_SLAVE_TO_MASTER 1 @@ -204,3 +205,4 @@ void SW_SendMessage(short pnum,const char *text); void PauseGame(void); void ResumeGame(void); +END_SW_NS diff --git a/source/sw/src/ninja.cpp b/source/sw/src/ninja.cpp index 5107fc598..c3e1e97f0 100644 --- a/source/sw/src/ninja.cpp +++ b/source/sw/src/ninja.cpp @@ -23,6 +23,8 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" + #include "build.h" #include "keys.h" @@ -40,6 +42,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "ninja.h" #include "sprite.h" +BEGIN_SW_NS + /* !AIC - Decision tables used in mostly ai.c DoActorActionDecide(). @@ -2604,3 +2608,4 @@ saveable_module saveable_ninja = SIZ(saveable_ninja_data) }; +END_SW_NS diff --git a/source/sw/src/ninja.h b/source/sw/src/ninja.h index 5317f605c..94a483c06 100644 --- a/source/sw/src/ninja.h +++ b/source/sw/src/ninja.h @@ -27,6 +27,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #ifndef NINJA_H #define NINJA_H +BEGIN_SW_NS + #define NINJA_NORMAL_SPEED 60 #define NINJA_RUN_AWAY_SPEED 130 #define NINJA_FIND_PLAYER_SPEED 100 @@ -39,4 +41,6 @@ void PlayerPanelSetup(void); void PlayerDeathReset(PLAYERp pp); void SpawnPlayerUnderSprite(PLAYERp pp); +END_SW_NS + #endif diff --git a/source/sw/src/panel.cpp b/source/sw/src/panel.cpp index bc74bbe29..f093c2e5c 100644 --- a/source/sw/src/panel.cpp +++ b/source/sw/src/panel.cpp @@ -24,6 +24,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" + #undef MAIN #include "build.h" #include "common.h" @@ -43,6 +45,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "weapon.h" #include "fx_man.h" +BEGIN_SW_NS + //#define UK_VERSION TRUE #define PANF_UZI_XFLIP (BIT(21)) @@ -8073,3 +8077,4 @@ saveable_module saveable_panel = SIZ(saveable_panel_data) }; +END_SW_NS diff --git a/source/sw/src/panel.h b/source/sw/src/panel.h index 83b8291c3..ac5acb1c1 100644 --- a/source/sw/src/panel.h +++ b/source/sw/src/panel.h @@ -31,6 +31,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "mytypes.h" #include "game.h" +BEGIN_SW_NS + #define FRAG_BAR 2920 #define PRI_FRONT_MAX 250 @@ -198,4 +200,6 @@ void InitChops(PLAYERp pp); void ChopsSetRetract(PLAYERp pp); void PlayerUpdateTimeLimit(PLAYERp pp); +END_SW_NS + #endif diff --git a/source/sw/src/parent.h b/source/sw/src/parent.h index 1333a8334..dac70f152 100644 --- a/source/sw/src/parent.h +++ b/source/sw/src/parent.h @@ -27,6 +27,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #ifndef PARENT_PUBLIC_ #define PARENT_PUBLIC_ +BEGIN_SW_NS + #define INVISTILE 6145 typedef struct TILE_INFO_TYPE @@ -65,4 +67,7 @@ extern OrgTileList orgsectorceilinglist; // The list containing orginal se // ceiling pics extern OrgTileList orgsectorfloorlist; // The list containing orginal sector // floor pics + +END_SW_NS + #endif diff --git a/source/sw/src/parse.h b/source/sw/src/parse.h index 36846ce7f..20b0f1171 100644 --- a/source/sw/src/parse.h +++ b/source/sw/src/parse.h @@ -25,6 +25,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms //------------------------------------------------------------------------- // scriplib.h +BEGIN_SW_NS #define MAXTOKEN 255 @@ -47,3 +48,4 @@ void ExtractFileBase(char *path, char *dest); int ParseNum(char *str); +END_SW_NS diff --git a/source/sw/src/player.cpp b/source/sw/src/player.cpp index 32b758e25..7d2e318fa 100644 --- a/source/sw/src/player.cpp +++ b/source/sw/src/player.cpp @@ -23,6 +23,8 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" + #include "build.h" #include "common.h" @@ -64,6 +66,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "track.h" #include "interp.h" +BEGIN_SW_NS #define SO_DRIVE_SOUND 2 #define SO_IDLE_SOUND 1 @@ -8537,3 +8540,4 @@ saveable_module saveable_player = saveable_player_data, SIZ(saveable_player_data) }; +END_SW_NS diff --git a/source/sw/src/player.h b/source/sw/src/player.h index d91a599dd..b841a9644 100644 --- a/source/sw/src/player.h +++ b/source/sw/src/player.h @@ -119,6 +119,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #define PLAYER_NINJA_XREPEAT (47) #define PLAYER_NINJA_YREPEAT (33) +BEGIN_SW_NS + int SetVisHigh(void); int SetVisNorm(void); void DoWeapon(void); @@ -142,4 +144,6 @@ void PlaySOsound(short sectnum,short sound_num); void DoSpawnTeleporterEffectPlace(SPRITEp sp); void FindMainSector(SECTOR_OBJECTp sop); +END_SW_NS + #endif diff --git a/source/sw/src/predict.cpp b/source/sw/src/predict.cpp index 3834ec94a..b35fc95e1 100644 --- a/source/sw/src/predict.cpp +++ b/source/sw/src/predict.cpp @@ -24,6 +24,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" //#define MAIN #define QUIET #include "build.h" @@ -41,6 +42,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "network.h" //#include "symutil.h" +BEGIN_SW_NS + SWBOOL PredictionOn = TRUE; SWBOOL Prediction = FALSE; PLAYER PredictPlayer; @@ -226,3 +229,4 @@ CorrectPrediction(int actualfifoplc) } } +END_SW_NS diff --git a/source/sw/src/quake.cpp b/source/sw/src/quake.cpp index 75346b2cb..2e4ce0dcd 100644 --- a/source/sw/src/quake.cpp +++ b/source/sw/src/quake.cpp @@ -23,6 +23,8 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" + #include "build.h" #include "common.h" @@ -34,6 +36,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "quake.h" #include "sprite.h" +BEGIN_SW_NS + #define QUAKE_Match(sp) (SP_TAG2(sp)) #define QUAKE_Zamt(sp) (SP_TAG3(sp)) #define QUAKE_Radius(sp) (SP_TAG4(sp)) @@ -367,3 +371,4 @@ saveable_module saveable_quake = NULL,0 }; +END_SW_NS diff --git a/source/sw/src/quake.h b/source/sw/src/quake.h index b4c59ea15..9c9b6826c 100644 --- a/source/sw/src/quake.h +++ b/source/sw/src/quake.h @@ -23,6 +23,7 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +BEGIN_SW_NS void DoQuakeMatch(short match); void ProcessQuakeOn(void); @@ -37,3 +38,4 @@ int SetNuclearQuake(int16_t Weapon); int SetSumoQuake(int16_t SpriteNum); int SetSumoFartQuake(int16_t SpriteNum); +END_SW_NS diff --git a/source/sw/src/ripper.cpp b/source/sw/src/ripper.cpp index 2ed3cde82..f8d085ef8 100644 --- a/source/sw/src/ripper.cpp +++ b/source/sw/src/ripper.cpp @@ -23,6 +23,8 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" + #include "build.h" #include "keys.h" @@ -36,6 +38,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "sprite.h" #include "track.h" +BEGIN_SW_NS + ANIMATOR InitRipperHang; ANIMATOR DoActorMoveJump; ANIMATOR DoRipperMoveJump; @@ -1421,3 +1425,4 @@ saveable_module saveable_ripper = saveable_ripper_data, SIZ(saveable_ripper_data) }; +END_SW_NS diff --git a/source/sw/src/ripper2.cpp b/source/sw/src/ripper2.cpp index 99b6296a2..ec2d9d2a8 100644 --- a/source/sw/src/ripper2.cpp +++ b/source/sw/src/ripper2.cpp @@ -23,6 +23,7 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" #include "build.h" #include "keys.h" @@ -37,6 +38,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "track.h" #include "fx_man.h" +BEGIN_SW_NS + ANIMATOR InitRipper2Hang; ANIMATOR DoActorMoveJump; ANIMATOR DoRipper2MoveJump; @@ -1464,3 +1467,4 @@ saveable_module saveable_ripper2 = saveable_ripper2_data, SIZ(saveable_ripper2_data) }; +END_SW_NS diff --git a/source/sw/src/rooms.cpp b/source/sw/src/rooms.cpp index a4e890cfd..420d3a565 100644 --- a/source/sw/src/rooms.cpp +++ b/source/sw/src/rooms.cpp @@ -23,6 +23,7 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" #include "build.h" #include "names2.h" @@ -30,6 +31,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "game.h" #include "warp.h" +BEGIN_SW_NS + void _ErrMsg(const char *strFile, unsigned uLine, const char *format, ...); void FAF_DrawRooms(int posx, int posy, int posz, short ang, int horiz, short cursectnum); @@ -1148,3 +1151,4 @@ DrawOverlapRoom(int tx, int ty, int tz, short tang, int thoriz, short tsectnum) } } +END_SW_NS diff --git a/source/sw/src/rotator.cpp b/source/sw/src/rotator.cpp index fc59ed765..c187faa5c 100644 --- a/source/sw/src/rotator.cpp +++ b/source/sw/src/rotator.cpp @@ -23,6 +23,7 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" #include "build.h" #include "names2.h" @@ -35,6 +36,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "interp.h" #include "sprite.h" +BEGIN_SW_NS + short DoRotatorMatch(PLAYERp pp, short match, SWBOOL); SWBOOL TestRotatorMatchActive(short match); void InterpSectorSprites(short sectnum, SWBOOL state); @@ -466,3 +469,4 @@ saveable_module saveable_rotator = NULL,0 }; +END_SW_NS diff --git a/source/sw/src/rts.cpp b/source/sw/src/rts.cpp index f3cd62e05..7a93a962d 100644 --- a/source/sw/src/rts.cpp +++ b/source/sw/src/rts.cpp @@ -24,6 +24,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" // rts.c #include "build.h" @@ -35,6 +36,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "rts.h" #include "cache.h" +BEGIN_SW_NS + char ValidPtr(void *ptr); void *AllocMem(int size); void *CallocMem(int size, int num); @@ -339,3 +342,4 @@ void *RTS_GetSound(int32_t lump) return (void *)lumpcache[lump]; } #endif +END_SW_NS diff --git a/source/sw/src/rts.h b/source/sw/src/rts.h index 3658da3aa..5524af052 100644 --- a/source/sw/src/rts.h +++ b/source/sw/src/rts.h @@ -58,6 +58,8 @@ Prepared for public release: 03/21/2003 - Charlie Wiederhold, 3D Realms #ifndef rts_public__ #define rts_public__ +BEGIN_SW_NS + /* ==================== = @@ -108,4 +110,7 @@ char *RTS_GetSoundName(int32_t i); ==================== */ void *RTS_GetSound(int32_t lump); + +END_SW_NS + #endif diff --git a/source/sw/src/save.cpp b/source/sw/src/save.cpp index dc938eb23..32cac936b 100644 --- a/source/sw/src/save.cpp +++ b/source/sw/src/save.cpp @@ -24,6 +24,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" + #define MAIN #define QUIET #include "build.h" @@ -57,6 +59,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "saveable.h" //void TimerFunc(task * Task); +BEGIN_SW_NS /* ////////////////////////////////////////////////////////////////////////////// @@ -1325,3 +1328,4 @@ ScreenLoad(MFILE_READ fin) renderRestoreTarget(); } +END_SW_NS diff --git a/source/sw/src/saveable.cpp b/source/sw/src/saveable.cpp index 296683fee..538bf7139 100644 --- a/source/sw/src/saveable.cpp +++ b/source/sw/src/saveable.cpp @@ -21,9 +21,13 @@ */ //------------------------------------------------------------------------- +#include "ns.h" + #include "compat.h" #include "saveable.h" +BEGIN_SW_NS + #define maxModules 35 static saveable_module *saveablemodules[maxModules]; @@ -165,3 +169,4 @@ int Saveable_RestoreDataSym(saveddatasym *sym, void **ptr) return 0; } +END_SW_NS diff --git a/source/sw/src/saveable.h b/source/sw/src/saveable.h index 2c5074929..37f91a1ba 100644 --- a/source/sw/src/saveable.h +++ b/source/sw/src/saveable.h @@ -24,6 +24,8 @@ #ifndef SAVEABLE_H #define SAVEABLE_H +BEGIN_SW_NS + typedef void *saveable_code; typedef struct @@ -67,4 +69,6 @@ int Saveable_FindDataSym(void *ptr, saveddatasym *sym); int Saveable_RestoreCodeSym(savedcodesym *sym, void **ptr); int Saveable_RestoreDataSym(saveddatasym *sym, void **ptr); +END_SW_NS + #endif diff --git a/source/sw/src/scrip2.cpp b/source/sw/src/scrip2.cpp index 96dc8fe99..dd0825d74 100644 --- a/source/sw/src/scrip2.cpp +++ b/source/sw/src/scrip2.cpp @@ -24,6 +24,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" // scriplib.c #include "build.h" #include "cache1d.h" @@ -38,6 +39,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "jsector.h" #include "parent.h" +BEGIN_SW_NS + #define PATHSEPERATOR '\\' //#define COMPUTE_TOTALS 1 @@ -993,3 +996,4 @@ void LoadCustomInfoFromScript(const char *filename) scriptfile_clearsymbols(); } +END_SW_NS diff --git a/source/sw/src/sector.cpp b/source/sw/src/sector.cpp index e7fa7631b..c98f205bd 100644 --- a/source/sw/src/sector.cpp +++ b/source/sw/src/sector.cpp @@ -23,6 +23,7 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" #include "build.h" #include "common.h" @@ -46,6 +47,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "light.h" #include "text.h" +BEGIN_SW_NS + #define LAVASIZ 128 #define LAVALOGSIZ 7 #define LAVAMAXDROPS 32 @@ -3584,3 +3587,4 @@ saveable_module saveable_sector = }; +END_SW_NS diff --git a/source/sw/src/sector.h b/source/sw/src/sector.h index 152437a2c..ff1adabf2 100644 --- a/source/sw/src/sector.h +++ b/source/sw/src/sector.h @@ -27,6 +27,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #define SECTOR_H +BEGIN_SW_NS void SectorSetup(void); DOOR_AUTO_CLOSEp SetDoorAutoClose(short SectorNum, short Type); @@ -77,4 +78,6 @@ void WeaponExplodeSectorInRange(short weapon); void initlava(void); void movelava(char *dapic); +END_SW_NS + #endif diff --git a/source/sw/src/serp.cpp b/source/sw/src/serp.cpp index 8cd478c50..978f2361e 100644 --- a/source/sw/src/serp.cpp +++ b/source/sw/src/serp.cpp @@ -23,6 +23,7 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" #include "build.h" #include "keys.h" @@ -34,6 +35,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "track.h" #include "sector.h" +BEGIN_SW_NS + extern uint8_t RedBookSong[40]; extern short BossSpriteNum[3]; @@ -884,3 +887,4 @@ saveable_module saveable_serp = SIZ(saveable_serp_data) }; +END_SW_NS diff --git a/source/sw/src/settings.h b/source/sw/src/settings.h index 43ccc2f3b..c47816a3d 100644 --- a/source/sw/src/settings.h +++ b/source/sw/src/settings.h @@ -27,6 +27,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "gamedefs.h" // Only ad to the end. These currently have to be in this order because of the // way they are initilized. +BEGIN_SW_NS typedef struct { @@ -74,3 +75,4 @@ typedef struct extern const GAME_SET gs_defaults; extern GAME_SET gs; +END_SW_NS diff --git a/source/sw/src/setup.cpp b/source/sw/src/setup.cpp index af44d3637..694c2a1e7 100644 --- a/source/sw/src/setup.cpp +++ b/source/sw/src/setup.cpp @@ -23,6 +23,7 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" #include "build.h" #include "keys.h" @@ -42,6 +43,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "rts.h" +BEGIN_SW_NS + /* =================== @@ -401,3 +404,4 @@ void main() ShutDown(); } #endif +END_SW_NS diff --git a/source/sw/src/skel.cpp b/source/sw/src/skel.cpp index bc9b26935..0b79ecbf7 100644 --- a/source/sw/src/skel.cpp +++ b/source/sw/src/skel.cpp @@ -23,6 +23,7 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" #include "build.h" #include "keys.h" @@ -33,6 +34,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "actor.h" #include "track.h" +BEGIN_SW_NS + DECISION SkelBattle[] = { {600, InitActorMoveCloser }, @@ -691,3 +694,4 @@ saveable_module saveable_skel = saveable_skel_data, SIZ(saveable_skel_data) }; +END_SW_NS diff --git a/source/sw/src/skull.cpp b/source/sw/src/skull.cpp index d31c08288..c8d09245e 100644 --- a/source/sw/src/skull.cpp +++ b/source/sw/src/skull.cpp @@ -23,6 +23,7 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" #include "build.h" #include "keys.h" @@ -33,6 +34,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "weapon.h" #include "actor.h" +BEGIN_SW_NS + int InitSpriteGrenade(short SpriteNum); int InitSpriteChemBomb(short SpriteNum); int InitFlashBomb(short SpriteNum); @@ -972,3 +975,4 @@ saveable_module saveable_skull = saveable_skull_data, SIZ(saveable_skull_data) }; +END_SW_NS diff --git a/source/sw/src/slidor.cpp b/source/sw/src/slidor.cpp index 6d86cfd6f..61c247ac4 100644 --- a/source/sw/src/slidor.cpp +++ b/source/sw/src/slidor.cpp @@ -23,6 +23,7 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" #include "build.h" #include "names2.h" @@ -36,6 +37,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "text.h" #include "sprite.h" +BEGIN_SW_NS + void ReverseSlidor(short SpriteNum) { USERp u = User[SpriteNum]; @@ -718,3 +721,4 @@ saveable_module saveable_slidor = // data NULL,0 }; +END_SW_NS diff --git a/source/sw/src/slidor.h b/source/sw/src/slidor.h index 603ddd9f5..6d7b7eadb 100644 --- a/source/sw/src/slidor.h +++ b/source/sw/src/slidor.h @@ -26,6 +26,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #ifndef SLIDOR_PUBLIC_ #define SLIDOR_PUBLIC_ +BEGIN_SW_NS short DoSlidorMatch(PLAYERp pp, short match, SWBOOL); SWBOOL TestSlidorMatchActive(short match); @@ -37,4 +38,5 @@ typedef INTERP_FUNC *INTERP_FUNCp; void SetSlidorActive(short SpriteNum); void DoSlidorInterp(short, INTERP_FUNCp); +END_SW_NS #endif diff --git a/source/sw/src/sounds.cpp b/source/sw/src/sounds.cpp index e37dfd294..340cd73fc 100644 --- a/source/sw/src/sounds.cpp +++ b/source/sw/src/sounds.cpp @@ -23,6 +23,7 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" #include "compat.h" #include "build.h" #include "cache1d.h" @@ -53,6 +54,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "winlayer.h" #endif +BEGIN_SW_NS + extern USERp User[MAXSPRITES]; void DumpSounds(void); @@ -2062,3 +2065,4 @@ PlaySpriteSound(short spritenum, int attrib_ndx, Voc3D_Flags flags) } // vim:ts=4:sw=4:expandtab: +END_SW_NS diff --git a/source/sw/src/sounds.h b/source/sw/src/sounds.h index 1fb6eecdc..dd9335fa8 100644 --- a/source/sw/src/sounds.h +++ b/source/sw/src/sounds.h @@ -36,6 +36,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #ifndef sounds_public_ #define sounds_public_ +BEGIN_SW_NS + void SoundStartup(void); void SoundShutdown(void); void MusicStartup(void); @@ -181,4 +183,6 @@ struct VOC3Dstruct extern VOC_INFO voc[]; +END_SW_NS + #endif diff --git a/source/sw/src/spike.cpp b/source/sw/src/spike.cpp index e011ef533..bcae7e4bb 100644 --- a/source/sw/src/spike.cpp +++ b/source/sw/src/spike.cpp @@ -23,6 +23,7 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" #include "build.h" #include "names2.h" @@ -32,6 +33,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "sector.h" #include "sprite.h" +BEGIN_SW_NS + short DoSpikeMatch(PLAYERp pp, short match); SWBOOL TestSpikeMatchActive(short match); int DoVatorMove(short SpriteNum, int *lptr); @@ -519,3 +522,4 @@ saveable_module saveable_spike = // data NULL,0 }; +END_SW_NS diff --git a/source/sw/src/sprite.cpp b/source/sw/src/sprite.cpp index 6e409b860..66f5d64e3 100644 --- a/source/sw/src/sprite.cpp +++ b/source/sw/src/sprite.cpp @@ -23,6 +23,7 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" #include "build.h" #include "keys.h" @@ -47,6 +48,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "slidor.h" #include "player.h" +BEGIN_SW_NS SWBOOL FAF_Sector(short sectnum); SWBOOL MoveSkip4, MoveSkip2, MoveSkip8; @@ -7735,3 +7737,4 @@ saveable_module saveable_sprite = SIZ(saveable_sprite_data) }; +END_SW_NS diff --git a/source/sw/src/sprite.h b/source/sw/src/sprite.h index ca69c3349..95c8f60f1 100644 --- a/source/sw/src/sprite.h +++ b/source/sw/src/sprite.h @@ -28,6 +28,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #define SPRITE_H +BEGIN_SW_NS + void KillSprite(int16_t SpriteNum); int16_t SpawnSprite(short stat, short id, STATEp state, short sectnum, int x, int y, int z, int ang, int vel); void SpriteSetup(void); @@ -80,5 +82,7 @@ struct InventoryDecl_t }; extern struct InventoryDecl_t InventoryDecls[InvDecl_TOTAL]; +END_SW_NS + #endif diff --git a/source/sw/src/stag.h b/source/sw/src/stag.h index 3c8a3c4e9..8ad23f438 100644 --- a/source/sw/src/stag.h +++ b/source/sw/src/stag.h @@ -23,6 +23,7 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +BEGIN_SW_NS #ifdef MAKE_STAG_ENUM #define STAG_ENTRY(st1_name, number, flgs) st1_name = number, @@ -227,3 +228,4 @@ STAG_ENTRY(ECHOSPOT, 1005, 0) STAG_ENTRY(DRIP_GENERATOR, 1006, 0) #undef STAG_ENTRY +END_SW_NS diff --git a/source/sw/src/startgtk.game.cpp b/source/sw/src/startgtk.game.cpp index 6a14887a3..7d82653c6 100644 --- a/source/sw/src/startgtk.game.cpp +++ b/source/sw/src/startgtk.game.cpp @@ -2,6 +2,7 @@ * then patch into this file whenever you make a change to the Glade * template. */ +#include "ns.h" #include "compat.h" @@ -25,6 +26,8 @@ #define TAB_GAME 1 #define TAB_MESSAGES 2 +BEGIN_SW_NS + static struct { int fullscreen; @@ -750,3 +753,4 @@ int startwin_run(void) return retval; } +END_SW_NS diff --git a/source/sw/src/startwin.game.cpp b/source/sw/src/startwin.game.cpp index 9eb9f177f..ec2a3bf92 100644 --- a/source/sw/src/startwin.game.cpp +++ b/source/sw/src/startwin.game.cpp @@ -1,6 +1,7 @@ #ifndef _WIN32 #error Only for Windows #endif +#include "ns.h" #include "build.h" @@ -20,6 +21,8 @@ #include "startwin.game.h" +BEGIN_SW_NS + #define TAB_CONFIG 0 #define TAB_GAME 1 #define TAB_MESSAGES 2 @@ -671,3 +674,4 @@ int startwin_run(void) } +END_SW_NS diff --git a/source/sw/src/sumo.cpp b/source/sw/src/sumo.cpp index f38804142..7beed8bba 100644 --- a/source/sw/src/sumo.cpp +++ b/source/sw/src/sumo.cpp @@ -23,6 +23,7 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" #include "build.h" #include "keys.h" @@ -37,6 +38,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "weapon.h" #include "sector.h" +BEGIN_SW_NS + extern uint8_t RedBookSong[40]; extern uint8_t playTrack; SWBOOL serpwasseen = FALSE; @@ -1059,3 +1062,4 @@ saveable_module saveable_sumo = saveable_sumo_data, SIZ(saveable_sumo_data) }; +END_SW_NS diff --git a/source/sw/src/swconfig.cpp b/source/sw/src/swconfig.cpp index ddc4df918..7e9797916 100644 --- a/source/sw/src/swconfig.cpp +++ b/source/sw/src/swconfig.cpp @@ -23,6 +23,7 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" #include "build.h" #include "keys.h" @@ -41,6 +42,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "rts.h" +BEGIN_SW_NS + short GamePlays = 0; /* @@ -356,3 +359,4 @@ void TermSetup(void) CONFIG_WriteSetup(); RTS_Shutdown(); } +END_SW_NS diff --git a/source/sw/src/sync.cpp b/source/sw/src/sync.cpp index 4626edbd9..8302a169a 100644 --- a/source/sw/src/sync.cpp +++ b/source/sw/src/sync.cpp @@ -23,6 +23,7 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" #include "build.h" #include "keys.h" @@ -32,6 +33,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "network.h" #include "menus.h" +BEGIN_SW_NS + SWBOOL SyncPrintMode = TRUE; short NumSyncBytes = 1; char sync_first[MAXSYNCBYTES][60]; @@ -564,3 +567,4 @@ getsyncbyte() */ #endif +END_SW_NS diff --git a/source/sw/src/text.cpp b/source/sw/src/text.cpp index 86a3a4b4e..8ad246026 100644 --- a/source/sw/src/text.cpp +++ b/source/sw/src/text.cpp @@ -23,6 +23,7 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" #undef MAIN #include "build.h" @@ -38,6 +39,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "network.h" +BEGIN_SW_NS + #define PANEL_FONT_G 3636 #define PANEL_FONT_Y 3646 #define PANEL_FONT_R 3656 @@ -533,3 +536,4 @@ void PutStringPlayerInfo(PLAYERp pp, const char *string) PutStringTimer(pp, x, y, string, GlobInfoStringTime); } +END_SW_NS diff --git a/source/sw/src/text.h b/source/sw/src/text.h index 6e34f60c0..4af8d0986 100644 --- a/source/sw/src/text.h +++ b/source/sw/src/text.h @@ -24,6 +24,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +BEGIN_SW_NS #define TEXT_INFO_TIME (3) #define TEXT_INFO_X (16) //#define TEXT_INFO_Y (20) @@ -43,3 +44,4 @@ void PutStringInfoLine(PLAYERp pp, const char *string); void PutStringInfoLine2(PLAYERp pp, const char *string); void pClearTextLine(PLAYERp pp,long y); void pMenuClearTextLine(PLAYERp pp); +END_SW_NS diff --git a/source/sw/src/track.cpp b/source/sw/src/track.cpp index 181e088be..a081e98b4 100644 --- a/source/sw/src/track.cpp +++ b/source/sw/src/track.cpp @@ -23,6 +23,7 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" #include "build.h" #include "names2.h" @@ -38,6 +39,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "track.h" #include "weapon.h" +BEGIN_SW_NS void DoTrack(SECTOR_OBJECTp sop, short locktics, int *nx, int *ny); void DoAutoTurretObject(SECTOR_OBJECTp sop); @@ -3894,3 +3896,4 @@ saveable_module saveable_track = NULL,0 }; +END_SW_NS diff --git a/source/sw/src/track.h b/source/sw/src/track.h index 11a86393a..31d0186d1 100644 --- a/source/sw/src/track.h +++ b/source/sw/src/track.h @@ -1,3 +1,4 @@ +BEGIN_SW_NS int ActorFollowTrack(short SpriteNum,short locktics); void ActorLeaveTrack(short SpriteNum); void RefreshPoints(SECTOR_OBJECTp sop,int nx,int ny,SWBOOL dynamic); @@ -11,3 +12,4 @@ void VehicleSetSmoke(SECTOR_OBJECTp sop,ANIMATORp animator); void CollapseSectorObject(SECTOR_OBJECTp sop,int nx,int ny); void KillSectorObjectSprites(SECTOR_OBJECTp sop); void MoveSectorObjects(SECTOR_OBJECTp sop,short locktics); +END_SW_NS diff --git a/source/sw/src/trigger.h b/source/sw/src/trigger.h index c24670bd4..0cd05c7e6 100644 --- a/source/sw/src/trigger.h +++ b/source/sw/src/trigger.h @@ -24,4 +24,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +BEGIN_SW_NS + enum TriggerType {TRIGGER_TYPE_REMOTE_SO}; +END_SW_NS diff --git a/source/sw/src/vator.cpp b/source/sw/src/vator.cpp index 5251474d9..ecba7c777 100644 --- a/source/sw/src/vator.cpp +++ b/source/sw/src/vator.cpp @@ -23,6 +23,7 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" #include "build.h" #include "names2.h" @@ -36,6 +37,7 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "sprite.h" #include "weapon.h" +BEGIN_SW_NS short DoVatorMatch(PLAYERp pp, short match); SWBOOL TestVatorMatchActive(short match); @@ -703,3 +705,4 @@ saveable_module saveable_vator = // data NULL,0 }; +END_SW_NS diff --git a/source/sw/src/vis.cpp b/source/sw/src/vis.cpp index 26feffd2a..25fc2ee68 100644 --- a/source/sw/src/vis.cpp +++ b/source/sw/src/vis.cpp @@ -23,6 +23,7 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" #include "build.h" #include "names2.h" @@ -34,6 +35,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "pal.h" #include "sprite.h" +BEGIN_SW_NS + extern short NormalVisibility; // player.c extern SWBOOL GamePaused; @@ -185,3 +188,4 @@ int SpawnVis(short Parent, short sectnum, int x, int y, int z, int amt) return SpriteNum; } +END_SW_NS diff --git a/source/sw/src/vis.h b/source/sw/src/vis.h index 6ae200a75..fcbba7d8f 100644 --- a/source/sw/src/vis.h +++ b/source/sw/src/vis.h @@ -23,7 +23,9 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +BEGIN_SW_NS void ProcessVisOn(void); void VisViewChange(PLAYERp pp, int *vis); int SpawnVis(short Parent, short sectnum, int x, int y, int z, int amt); +END_SW_NS diff --git a/source/sw/src/wallmove.cpp b/source/sw/src/wallmove.cpp index cfd18f120..124adb78a 100644 --- a/source/sw/src/wallmove.cpp +++ b/source/sw/src/wallmove.cpp @@ -23,6 +23,7 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" #include "build.h" //#include "keys.h" @@ -36,6 +37,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms //#include "ai.h" +BEGIN_SW_NS + SECTOR_OBJECTp DetectSectorObjectByWall(WALLp); void SOwallmove(SECTOR_OBJECTp sop, SPRITEp sp, WALLp find_wallp, int dist, int *nx, int *ny) @@ -229,3 +232,4 @@ saveable_module saveable_wallmove = // data NULL,0 }; +END_SW_NS diff --git a/source/sw/src/warp.cpp b/source/sw/src/warp.cpp index 732ed0723..8410530ac 100644 --- a/source/sw/src/warp.cpp +++ b/source/sw/src/warp.cpp @@ -23,6 +23,7 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" #include "build.h" #include "names2.h" @@ -31,6 +32,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "warp.h" +BEGIN_SW_NS + //////////////////////////////////////////////////////////////////////////////// // // WARPING - PLANE STYLE @@ -256,3 +259,4 @@ Warp(int32_t* x, int32_t* y, int32_t* z, int16_t* sectnum) return NULL; } +END_SW_NS diff --git a/source/sw/src/warp.h b/source/sw/src/warp.h index 5e791bff1..b5a85ab67 100644 --- a/source/sw/src/warp.h +++ b/source/sw/src/warp.h @@ -24,8 +24,10 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +BEGIN_SW_NS SWBOOL WarpPlaneSectorInfo(short sectnum, SPRITEp *sp_ceiling, SPRITEp *sp_floor); SPRITEp WarpPlane(int32_t* x, int32_t* y, int32_t* z, int16_t* sectnum); SPRITEp WarpToArea(SPRITEp sp_from, int32_t* x, int32_t* y, int32_t* z, int16_t* sectnum); SWBOOL WarpSectorInfo(short sectnum, SPRITEp *sp_warp); SPRITEp Warp(int32_t* x, int32_t* y, int32_t* z, int16_t* sectnum); +END_SW_NS diff --git a/source/sw/src/weapon.cpp b/source/sw/src/weapon.cpp index 3224e8c35..36f4cf759 100644 --- a/source/sw/src/weapon.cpp +++ b/source/sw/src/weapon.cpp @@ -23,6 +23,7 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" #include "build.h" #include "common.h" @@ -47,6 +48,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "track.h" #include "player.h" +BEGIN_SW_NS + // // Damage Amounts defined in damage.h // @@ -22228,3 +22231,4 @@ saveable_module saveable_weapon = saveable_weapon_data, SIZ(saveable_weapon_data) }; +END_SW_NS diff --git a/source/sw/src/weapon.h b/source/sw/src/weapon.h index a7f5a55e4..b96e07a45 100644 --- a/source/sw/src/weapon.h +++ b/source/sw/src/weapon.h @@ -27,6 +27,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #ifndef WEAPON_H #define WEAPON_H +BEGIN_SW_NS + #define NEW_ELECTRO 1 #define HORIZ_MULT 128L @@ -238,4 +240,6 @@ int SpawnVehicleSmoke(short SpriteNum); short PrevWall(short wall_num); int DoDamage(short SpriteNum,short Weapon); +END_SW_NS + #endif diff --git a/source/sw/src/zilla.cpp b/source/sw/src/zilla.cpp index 097f9c23a..45c2952b0 100644 --- a/source/sw/src/zilla.cpp +++ b/source/sw/src/zilla.cpp @@ -23,6 +23,7 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" #include "build.h" #include "keys.h" @@ -36,6 +37,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "track.h" #include "fx_man.h" +BEGIN_SW_NS + extern uint8_t RedBookSong[40]; extern short BossSpriteNum[3]; @@ -849,3 +852,4 @@ saveable_module saveable_zilla = SIZ(saveable_zilla_data) }; +END_SW_NS diff --git a/source/sw/src/zombie.cpp b/source/sw/src/zombie.cpp index 85c3faad5..a8c9c9e2a 100644 --- a/source/sw/src/zombie.cpp +++ b/source/sw/src/zombie.cpp @@ -23,6 +23,7 @@ Original Source: 1997 - Frank Maddin and Jim Norwood Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms */ //------------------------------------------------------------------------- +#include "ns.h" #include "build.h" #include "keys.h" @@ -39,6 +40,8 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "actor.h" #include "track.h" +BEGIN_SW_NS + //extern short Zombies; #define ZOMBIE_TIME_LIMIT ((120*20)/ACTORMOVETICS) @@ -1038,3 +1041,4 @@ saveable_module saveable_zombie = saveable_zombie_data, SIZ(saveable_zombie_data) }; +END_SW_NS