From 630e507f6396783a900f862867b2facfc3ab4cf1 Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Tue, 6 Apr 2021 13:08:44 +0200 Subject: [PATCH] :truck: Apply namespace --- Source/automap.cpp | 4 ++-- Source/automap.h | 4 ++-- Source/capture.cpp | 4 ++-- Source/capture.h | 4 ++-- Source/codec.cpp | 4 ++-- Source/codec.h | 4 ++-- Source/control.cpp | 4 ++-- Source/control.h | 4 ++-- Source/cursor.cpp | 4 ++-- Source/cursor.h | 4 ++-- Source/dead.cpp | 4 ++-- Source/dead.h | 4 ++-- Source/debug.cpp | 4 ++-- Source/debug.h | 4 ++-- Source/diablo.cpp | 4 ++-- Source/diablo.h | 4 ++-- Source/doom.cpp | 4 ++-- Source/doom.h | 4 ++-- Source/drlg_l1.cpp | 4 ++-- Source/drlg_l1.h | 4 ++-- Source/drlg_l2.cpp | 4 ++-- Source/drlg_l2.h | 4 ++-- Source/drlg_l3.cpp | 4 ++-- Source/drlg_l3.h | 4 ++-- Source/drlg_l4.cpp | 4 ++-- Source/drlg_l4.h | 4 ++-- Source/dthread.cpp | 4 ++-- Source/dthread.h | 4 ++-- Source/dx.h | 4 ++-- Source/effects.cpp | 4 ++-- Source/effects.h | 4 ++-- Source/encrypt.cpp | 4 ++-- Source/encrypt.h | 4 ++-- Source/engine.cpp | 4 ++-- Source/engine.h | 4 ++-- Source/error.cpp | 4 ++-- Source/error.h | 4 ++-- Source/gamemenu.cpp | 4 ++-- Source/gamemenu.h | 4 ++-- Source/gendung.cpp | 4 ++-- Source/gendung.h | 4 ++-- Source/gmenu.cpp | 4 ++-- Source/gmenu.h | 4 ++-- Source/help.cpp | 4 ++-- Source/help.h | 4 ++-- Source/init.cpp | 4 ++-- Source/init.h | 4 ++-- Source/interfac.cpp | 4 ++-- Source/interfac.h | 4 ++-- Source/inv.cpp | 4 ++-- Source/inv.h | 4 ++-- Source/itemdat.cpp | 4 ++-- Source/itemdat.h | 4 ++-- Source/items.cpp | 4 ++-- Source/items.h | 4 ++-- Source/lighting.cpp | 4 ++-- Source/lighting.h | 4 ++-- Source/loadsave.cpp | 4 ++-- Source/loadsave.h | 4 ++-- Source/mainmenu.cpp | 4 ++-- Source/mainmenu.h | 4 ++-- Source/minitext.cpp | 4 ++-- Source/minitext.h | 4 ++-- Source/misdat.cpp | 4 ++-- Source/misdat.h | 4 ++-- Source/missiles.cpp | 4 ++-- Source/missiles.h | 4 ++-- Source/monstdat.cpp | 4 ++-- Source/monstdat.h | 4 ++-- Source/monster.cpp | 4 ++-- Source/monster.h | 4 ++-- Source/movie.cpp | 4 ++-- Source/movie.h | 4 ++-- Source/mpqapi.cpp | 4 ++-- Source/mpqapi.h | 4 ++-- Source/msg.cpp | 4 ++-- Source/msg.h | 4 ++-- Source/multi.cpp | 4 ++-- Source/multi.h | 4 ++-- Source/nthread.cpp | 4 ++-- Source/nthread.h | 4 ++-- Source/objdat.cpp | 4 ++-- Source/objdat.h | 4 ++-- Source/objects.cpp | 4 ++-- Source/objects.h | 4 ++-- Source/options.h | 4 ++-- Source/pack.cpp | 4 ++-- Source/pack.h | 4 ++-- Source/palette.cpp | 4 ++-- Source/palette.h | 4 ++-- Source/path.cpp | 4 ++-- Source/path.h | 4 ++-- Source/pfile.cpp | 4 ++-- Source/pfile.h | 4 ++-- Source/player.cpp | 4 ++-- Source/player.h | 4 ++-- Source/plrmsg.cpp | 4 ++-- Source/plrmsg.h | 4 ++-- Source/portal.cpp | 4 ++-- Source/portal.h | 4 ++-- Source/quests.cpp | 4 ++-- Source/quests.h | 4 ++-- Source/render.cpp | 4 ++-- Source/render.h | 4 ++-- Source/restrict.cpp | 4 ++-- Source/restrict.h | 4 ++-- Source/scrollrt.cpp | 4 ++-- Source/scrollrt.h | 4 ++-- Source/setmaps.cpp | 4 ++-- Source/setmaps.h | 4 ++-- Source/sha.cpp | 4 ++-- Source/sha.h | 4 ++-- Source/sound.h | 4 ++-- Source/spelldat.cpp | 4 ++-- Source/spelldat.h | 4 ++-- Source/spells.cpp | 4 ++-- Source/spells.h | 4 ++-- Source/stores.cpp | 4 ++-- Source/stores.h | 4 ++-- Source/sync.cpp | 4 ++-- Source/sync.h | 4 ++-- Source/textdat.cpp | 4 ++-- Source/textdat.h | 4 ++-- Source/themes.cpp | 4 ++-- Source/themes.h | 4 ++-- Source/tmsg.cpp | 4 ++-- Source/tmsg.h | 4 ++-- Source/town.cpp | 4 ++-- Source/town.h | 4 ++-- Source/towners.cpp | 4 ++-- Source/towners.h | 4 ++-- Source/track.cpp | 4 ++-- Source/track.h | 4 ++-- Source/trigs.cpp | 4 ++-- Source/trigs.h | 4 ++-- SourceX/qol.cpp | 4 ++-- SourceX/qol.h | 4 ++-- enums.h | 4 ++-- types.h | 3 --- 139 files changed, 276 insertions(+), 279 deletions(-) diff --git a/Source/automap.cpp b/Source/automap.cpp index 17c716b4..995c6af0 100644 --- a/Source/automap.cpp +++ b/Source/automap.cpp @@ -5,7 +5,7 @@ */ #include "all.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { namespace { /** @@ -764,4 +764,4 @@ void AutomapZoomReset() AmLine4 = AmLine8 >> 1; } -DEVILUTION_END_NAMESPACE +} diff --git a/Source/automap.h b/Source/automap.h index 5bee0556..1b5f1321 100644 --- a/Source/automap.h +++ b/Source/automap.h @@ -8,7 +8,7 @@ #include "engine.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -92,6 +92,6 @@ void AutomapZoomReset(); } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __AUTOMAP_H__ */ diff --git a/Source/capture.cpp b/Source/capture.cpp index d778059d..47bb5e49 100644 --- a/Source/capture.cpp +++ b/Source/capture.cpp @@ -10,7 +10,7 @@ #include "paths.h" #include "file_util.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { /** * @brief Write the PCX-file header @@ -205,4 +205,4 @@ void CaptureScreen() delete out_stream; } -DEVILUTION_END_NAMESPACE +} diff --git a/Source/capture.h b/Source/capture.h index fa8d0934..5c865fd5 100644 --- a/Source/capture.h +++ b/Source/capture.h @@ -6,7 +6,7 @@ #ifndef __CAPTURE_H__ #define __CAPTURE_H__ -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -18,6 +18,6 @@ void CaptureScreen(); } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __CAPTURE_H__ */ diff --git a/Source/codec.cpp b/Source/codec.cpp index e16930c6..a2cccaaf 100644 --- a/Source/codec.cpp +++ b/Source/codec.cpp @@ -8,7 +8,7 @@ #include #include -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { typedef struct CodecSignature { DWORD checksum; @@ -142,4 +142,4 @@ void codec_encode(BYTE *pbSrcDst, DWORD size, int size_64, const char *pszPasswo SHA1Clear(); } -DEVILUTION_END_NAMESPACE +} diff --git a/Source/codec.h b/Source/codec.h index 4332ed18..6287e043 100644 --- a/Source/codec.h +++ b/Source/codec.h @@ -6,7 +6,7 @@ #ifndef __CODEC_H__ #define __CODEC_H__ -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -20,6 +20,6 @@ void codec_encode(BYTE *pbSrcDst, DWORD size, int size_64, const char *pszPasswo } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __CODEC_H__ */ diff --git a/Source/control.cpp b/Source/control.cpp index a4f3add0..c589dbc5 100644 --- a/Source/control.cpp +++ b/Source/control.cpp @@ -7,7 +7,7 @@ #include -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { namespace { @@ -2311,4 +2311,4 @@ BOOL control_presskeys(int vkey) return ret; } -DEVILUTION_END_NAMESPACE +} diff --git a/Source/control.h b/Source/control.h index 7a7598b4..753a45e1 100644 --- a/Source/control.h +++ b/Source/control.h @@ -9,7 +9,7 @@ #include "engine.h" #include "spelldat.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -157,6 +157,6 @@ extern RECT32 ChrBtnsRect[4]; } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __CONTROL_H__ */ diff --git a/Source/cursor.cpp b/Source/cursor.cpp index 5b66ee21..6a310d3c 100644 --- a/Source/cursor.cpp +++ b/Source/cursor.cpp @@ -5,7 +5,7 @@ */ #include "all.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { /** Pixel width of the current cursor image */ int cursW; @@ -661,4 +661,4 @@ void CheckCursMove() } } -DEVILUTION_END_NAMESPACE +} diff --git a/Source/cursor.h b/Source/cursor.h index 98bef687..be29477c 100644 --- a/Source/cursor.h +++ b/Source/cursor.h @@ -6,7 +6,7 @@ #ifndef __CURSOR_H__ #define __CURSOR_H__ -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -47,6 +47,6 @@ extern const int InvItemHeight[]; } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __CURSOR_H__ */ diff --git a/Source/dead.cpp b/Source/dead.cpp index 591d27f2..457749d4 100644 --- a/Source/dead.cpp +++ b/Source/dead.cpp @@ -5,7 +5,7 @@ */ #include "all.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { DeadStruct dead[MAXDEAD]; int stonendx; @@ -91,4 +91,4 @@ void SetDead() } } -DEVILUTION_END_NAMESPACE +} diff --git a/Source/dead.h b/Source/dead.h index c0dad82a..fd59fc8e 100644 --- a/Source/dead.h +++ b/Source/dead.h @@ -6,7 +6,7 @@ #ifndef __DEAD_H__ #define __DEAD_H__ -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -31,6 +31,6 @@ void SetDead(); } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __DEAD_H__ */ diff --git a/Source/debug.cpp b/Source/debug.cpp index 824b1f94..caaa8838 100644 --- a/Source/debug.cpp +++ b/Source/debug.cpp @@ -5,7 +5,7 @@ */ #include "all.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef _DEBUG BOOL update_seed_check = FALSE; @@ -224,4 +224,4 @@ void NextDebugMonster() } #endif -DEVILUTION_END_NAMESPACE +} diff --git a/Source/debug.h b/Source/debug.h index f096c66d..db89fba9 100644 --- a/Source/debug.h +++ b/Source/debug.h @@ -6,7 +6,7 @@ #ifndef __DEBUG_H__ #define __DEBUG_H__ -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -30,6 +30,6 @@ void NextDebugMonster(); } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __DEBUG_H__ */ diff --git a/Source/diablo.cpp b/Source/diablo.cpp index f7fb79a5..96de3069 100644 --- a/Source/diablo.cpp +++ b/Source/diablo.cpp @@ -11,7 +11,7 @@ #include "../DiabloUI/diabloui.h" #include -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { SDL_Window *ghMainWnd; DWORD glSeedTbl[NUMLEVELS]; @@ -2094,4 +2094,4 @@ void diablo_color_cyc_logic() } } -DEVILUTION_END_NAMESPACE +} diff --git a/Source/diablo.h b/Source/diablo.h index 981cb6b6..570930fb 100644 --- a/Source/diablo.h +++ b/Source/diablo.h @@ -11,7 +11,7 @@ #include "monstdat.h" #endif -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -87,6 +87,6 @@ extern bool gbFriendlyFire; } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __DIABLO_H__ */ diff --git a/Source/doom.cpp b/Source/doom.cpp index a2a12c0e..1f6eb113 100644 --- a/Source/doom.cpp +++ b/Source/doom.cpp @@ -5,7 +5,7 @@ */ #include "all.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { int doom_quest_time; int doom_stars_drawn; @@ -95,4 +95,4 @@ void doom_draw(CelOutputBuffer out) CelDrawTo(out, PANEL_X, PANEL_Y - 1, pDoomCel, 1, 640); } -DEVILUTION_END_NAMESPACE +} diff --git a/Source/doom.h b/Source/doom.h index c08efd28..8b84b64b 100644 --- a/Source/doom.h +++ b/Source/doom.h @@ -8,7 +8,7 @@ #include "engine.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -26,6 +26,6 @@ void doom_draw(CelOutputBuffer out); } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __DOOM_H__ */ diff --git a/Source/drlg_l1.cpp b/Source/drlg_l1.cpp index 34680727..db8af329 100644 --- a/Source/drlg_l1.cpp +++ b/Source/drlg_l1.cpp @@ -5,7 +5,7 @@ */ #include "all.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { int UberRow; int UberCol; @@ -2904,4 +2904,4 @@ void drlg_l1_crypt_pattern7(int rndper) drlg_l1_crypt_rndset(byte_48A1DC, rndper); } -DEVILUTION_END_NAMESPACE +} diff --git a/Source/drlg_l1.h b/Source/drlg_l1.h index 3062a193..8746dceb 100644 --- a/Source/drlg_l1.h +++ b/Source/drlg_l1.h @@ -6,7 +6,7 @@ #ifndef __DRLG_L1_H__ #define __DRLG_L1_H__ -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -38,6 +38,6 @@ void drlg_l1_crypt_pattern7(int rndper); } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __DRLG_L1_H__ */ diff --git a/Source/drlg_l2.cpp b/Source/drlg_l2.cpp index 26af9ab1..4c0cba41 100644 --- a/Source/drlg_l2.cpp +++ b/Source/drlg_l2.cpp @@ -8,7 +8,7 @@ #include "all.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { BYTE predungeon[DMAXX][DMAXY]; @@ -3471,4 +3471,4 @@ void CreateL2Dungeon(DWORD rseed, int entry) DRLG_SetPC(); } -DEVILUTION_END_NAMESPACE +} diff --git a/Source/drlg_l2.h b/Source/drlg_l2.h index 9cd5c1ee..134de5f0 100644 --- a/Source/drlg_l2.h +++ b/Source/drlg_l2.h @@ -6,7 +6,7 @@ #ifndef __DRLG_L2_H__ #define __DRLG_L2_H__ -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -40,6 +40,6 @@ void CreateL2Dungeon(DWORD rseed, int entry); } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __DRLG_L2_H__ */ diff --git a/Source/drlg_l3.cpp b/Source/drlg_l3.cpp index 94c7f3d4..baf0d3e7 100644 --- a/Source/drlg_l3.cpp +++ b/Source/drlg_l3.cpp @@ -8,7 +8,7 @@ #include "all.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { namespace { @@ -2756,4 +2756,4 @@ void LoadPreL3Dungeon(const char *sFileName, int vx, int vy) mem_free_dbg(pLevelMap); } -DEVILUTION_END_NAMESPACE +} diff --git a/Source/drlg_l3.h b/Source/drlg_l3.h index 6a34fe63..d7ff499e 100644 --- a/Source/drlg_l3.h +++ b/Source/drlg_l3.h @@ -6,7 +6,7 @@ #ifndef __DRLG_L3_H__ #define __DRLG_L3_H__ -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -21,6 +21,6 @@ void LoadPreL3Dungeon(const char *sFileName, int vx, int vy); } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __DRLG_L3_H__ */ diff --git a/Source/drlg_l4.cpp b/Source/drlg_l4.cpp index 40cffd25..cc46b9b1 100644 --- a/Source/drlg_l4.cpp +++ b/Source/drlg_l4.cpp @@ -5,7 +5,7 @@ */ #include "all.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { int diabquad1x; int diabquad1y; @@ -1891,4 +1891,4 @@ void LoadPreL4Dungeon(char *sFileName, int vx, int vy) mem_free_dbg(pLevelMap); } -DEVILUTION_END_NAMESPACE +} diff --git a/Source/drlg_l4.h b/Source/drlg_l4.h index 5b1c6969..7ea7f7be 100644 --- a/Source/drlg_l4.h +++ b/Source/drlg_l4.h @@ -6,7 +6,7 @@ #ifndef __DRLG_L4_H__ #define __DRLG_L4_H__ -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -28,6 +28,6 @@ void CreateL4Dungeon(DWORD rseed, int entry); } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __DRLG_L4_H__ */ diff --git a/Source/dthread.cpp b/Source/dthread.cpp index d0ba30f4..b633f81d 100644 --- a/Source/dthread.cpp +++ b/Source/dthread.cpp @@ -6,7 +6,7 @@ #include "all.h" #include "../3rdParty/Storm/Source/storm.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { static CCritSect sgMemCrit; SDL_threadID glpDThreadId; @@ -140,4 +140,4 @@ void dthread_cleanup() } } -DEVILUTION_END_NAMESPACE +} diff --git a/Source/dthread.h b/Source/dthread.h index 1418d575..17010cde 100644 --- a/Source/dthread.h +++ b/Source/dthread.h @@ -6,7 +6,7 @@ #ifndef __DTHREAD_H__ #define __DTHREAD_H__ -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -22,6 +22,6 @@ void dthread_cleanup(); } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __DTHREAD_H__ */ diff --git a/Source/dx.h b/Source/dx.h index f55c5e6d..2de6b77c 100644 --- a/Source/dx.h +++ b/Source/dx.h @@ -6,7 +6,7 @@ #ifndef __DX_H__ #define __DX_H__ -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { CelOutputBuffer GlobalBackBuffer(); @@ -21,6 +21,6 @@ void Blit(SDL_Surface *src, SDL_Rect *src_rect, SDL_Rect *dst_rect); void RenderPresent(); void PaletteGetEntries(DWORD dwNumEntries, SDL_Color *lpEntries); -DEVILUTION_END_NAMESPACE +} #endif /* __DX_H__ */ diff --git a/Source/effects.cpp b/Source/effects.cpp index fd341771..bc533e5f 100644 --- a/Source/effects.cpp +++ b/Source/effects.cpp @@ -6,7 +6,7 @@ #include "all.h" #include -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { int sfxdelay; int sfxdnum; @@ -1420,4 +1420,4 @@ int GetSFXLength(int nSFX) return sgSFX[nSFX].pSnd->DSB->GetLength(); } -DEVILUTION_END_NAMESPACE +} diff --git a/Source/effects.h b/Source/effects.h index 9e88e83b..6533691d 100644 --- a/Source/effects.h +++ b/Source/effects.h @@ -8,7 +8,7 @@ #include "sound.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -43,6 +43,6 @@ int GetSFXLength(int nSFX); } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __EFFECTS_H__ */ diff --git a/Source/encrypt.cpp b/Source/encrypt.cpp index 33658bc7..4fda4b94 100644 --- a/Source/encrypt.cpp +++ b/Source/encrypt.cpp @@ -6,7 +6,7 @@ #include "all.h" #include "../3rdParty/PKWare/pkware.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { DWORD hashtable[5][256]; @@ -161,4 +161,4 @@ void PkwareDecompress(BYTE *pbInBuff, int recv_size, int dwMaxBytes) mem_free_dbg(pbOutBuff); } -DEVILUTION_END_NAMESPACE +} diff --git a/Source/encrypt.h b/Source/encrypt.h index dda2b41c..c4b2a403 100644 --- a/Source/encrypt.h +++ b/Source/encrypt.h @@ -6,7 +6,7 @@ #ifndef __ENCRYPT_H__ #define __ENCRYPT_H__ -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -31,6 +31,6 @@ void PkwareDecompress(BYTE *pbInBuff, int recv_size, int dwMaxBytes); } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __ENCRYPT_H__ */ diff --git a/Source/engine.cpp b/Source/engine.cpp index 7b737231..02daf3da 100644 --- a/Source/engine.cpp +++ b/Source/engine.cpp @@ -14,7 +14,7 @@ #include "options.h" #include "../3rdParty/Storm/Source/storm.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { /** Seed value before the most recent call to SetRndSeed() */ Sint32 orgseed; @@ -1084,4 +1084,4 @@ void PlayInGameMovie(const char *pszMovie) force_redraw = 255; } -DEVILUTION_END_NAMESPACE +} diff --git a/Source/engine.h b/Source/engine.h index 5c182a13..888a21cc 100644 --- a/Source/engine.h +++ b/Source/engine.h @@ -25,7 +25,7 @@ #include "../types.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { // `malloc` that returns a user-friendly error on OOM. // @@ -440,6 +440,6 @@ DWORD LoadFileWithMem(const char *pszName, BYTE *p); void Cl2ApplyTrans(BYTE *p, BYTE *ttbl, int nCel); void PlayInGameMovie(const char *pszMovie); -DEVILUTION_END_NAMESPACE +} #endif /* __ENGINE_H__ */ diff --git a/Source/error.cpp b/Source/error.cpp index a2864299..c6e7a877 100644 --- a/Source/error.cpp +++ b/Source/error.cpp @@ -5,7 +5,7 @@ */ #include "all.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { char msgtable[MAX_SEND_STR_LEN]; DWORD msgdelay; @@ -162,4 +162,4 @@ void DrawDiabloMsg(CelOutputBuffer out) } } -DEVILUTION_END_NAMESPACE +} diff --git a/Source/error.h b/Source/error.h index b2a82831..664e53f6 100644 --- a/Source/error.h +++ b/Source/error.h @@ -8,7 +8,7 @@ #include "engine.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -25,6 +25,6 @@ void DrawDiabloMsg(CelOutputBuffer out); } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __ERROR_H__ */ diff --git a/Source/gamemenu.cpp b/Source/gamemenu.cpp index 4459865e..6357ff02 100644 --- a/Source/gamemenu.cpp +++ b/Source/gamemenu.cpp @@ -7,7 +7,7 @@ #include "all.h" #include "options.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { bool gbRunInTown = false; @@ -396,4 +396,4 @@ void gamemenu_color_cycling(BOOL bActivate) sgOptionsMenu[3].pszStr = color_cycling_toggle_names[sgOptions.Graphics.bColorCycling ? 1 : 0]; } -DEVILUTION_END_NAMESPACE +} diff --git a/Source/gamemenu.h b/Source/gamemenu.h index 14ca4c84..166baaf1 100644 --- a/Source/gamemenu.h +++ b/Source/gamemenu.h @@ -6,7 +6,7 @@ #ifndef __GAMEMENU_H__ #define __GAMEMENU_H__ -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -35,6 +35,6 @@ void gamemenu_color_cycling(BOOL bActivate); } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __GAMEMENU_H__ */ diff --git a/Source/gendung.cpp b/Source/gendung.cpp index 37ea3409..b4134095 100644 --- a/Source/gendung.cpp +++ b/Source/gendung.cpp @@ -6,7 +6,7 @@ #include "all.h" #include "options.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { /** Contains the tile IDs of the map. */ BYTE dungeon[DMAXX][DMAXY]; @@ -604,4 +604,4 @@ void InitLevels() setlevel = FALSE; } -DEVILUTION_END_NAMESPACE +} diff --git a/Source/gendung.h b/Source/gendung.h index 1d171e04..6dd2b55d 100644 --- a/Source/gendung.h +++ b/Source/gendung.h @@ -6,7 +6,7 @@ #ifndef __GENDUNG_H__ #define __GENDUNG_H__ -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -121,6 +121,6 @@ void InitLevels(); } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __GENDUNG_H__ */ diff --git a/Source/gmenu.cpp b/Source/gmenu.cpp index f5ab7f9b..a16c74dd 100644 --- a/Source/gmenu.cpp +++ b/Source/gmenu.cpp @@ -8,7 +8,7 @@ #include "../SourceX/controls/axis_direction.h" #include "../SourceX/controls/controller_motion.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { BYTE *optbar_cel; BOOLEAN mouseNavigation; @@ -436,4 +436,4 @@ void gmenu_slider_steps(TMenuItem *pItem, int steps) pItem->dwFlags |= (steps << 12) & 0xFFF000; } -DEVILUTION_END_NAMESPACE +} diff --git a/Source/gmenu.h b/Source/gmenu.h index 503f1bfb..e397a4c6 100644 --- a/Source/gmenu.h +++ b/Source/gmenu.h @@ -8,7 +8,7 @@ #include "engine.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -40,6 +40,6 @@ void gmenu_slider_steps(TMenuItem *pItem, int dwTicks); } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __GMENU_H__ */ diff --git a/Source/help.cpp b/Source/help.cpp index 12b8dd0a..bf991659 100644 --- a/Source/help.cpp +++ b/Source/help.cpp @@ -5,7 +5,7 @@ */ #include "all.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { int help_select_line; BOOL helpflag; @@ -586,4 +586,4 @@ void HelpScrollDown() help_select_line++; } -DEVILUTION_END_NAMESPACE +} diff --git a/Source/help.h b/Source/help.h index 7a93c2cf..022bb79f 100644 --- a/Source/help.h +++ b/Source/help.h @@ -6,7 +6,7 @@ #ifndef __HELP_H__ #define __HELP_H__ -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -24,6 +24,6 @@ void HelpScrollDown(); } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __HELP_H__ */ diff --git a/Source/init.cpp b/Source/init.cpp index cb700b2d..6e818051 100644 --- a/Source/init.cpp +++ b/Source/init.cpp @@ -18,7 +18,7 @@ int _newlib_heap_size_user = 100 * 1024 * 1024; #endif -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { /** True if the game is the current active window */ int gbActive; @@ -231,4 +231,4 @@ WNDPROC SetWindowProc(WNDPROC NewProc) return OldProc; } -DEVILUTION_END_NAMESPACE +} diff --git a/Source/init.h b/Source/init.h index 4f5ccaf0..917ab4ff 100644 --- a/Source/init.h +++ b/Source/init.h @@ -6,7 +6,7 @@ #ifndef __INIT_H__ #define __INIT_H__ -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -45,6 +45,6 @@ extern char gszProductName[64]; } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __INIT_H__ */ diff --git a/Source/interfac.cpp b/Source/interfac.cpp index 4540f89c..1c39efd8 100644 --- a/Source/interfac.cpp +++ b/Source/interfac.cpp @@ -6,7 +6,7 @@ #include "all.h" #include "../SourceX/DiabloUI/art_draw.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { BYTE *sgpBackCel; Uint32 sgdwProgress; @@ -387,4 +387,4 @@ void ShowProgress(interface_mode uMsg) gbSomebodyWonGameKludge = FALSE; } -DEVILUTION_END_NAMESPACE +} diff --git a/Source/interfac.h b/Source/interfac.h index fe5d5c76..45c56e95 100644 --- a/Source/interfac.h +++ b/Source/interfac.h @@ -6,7 +6,7 @@ #ifndef __INTERFAC_H__ #define __INTERFAC_H__ -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -34,6 +34,6 @@ void ShowProgress(interface_mode uMsg); } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __INTERFAC_H__ */ diff --git a/Source/inv.cpp b/Source/inv.cpp index 61deb49c..bd0c5e25 100644 --- a/Source/inv.cpp +++ b/Source/inv.cpp @@ -6,7 +6,7 @@ #include "all.h" #include "options.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { BOOL invflag; BYTE *pInvCels; @@ -2871,4 +2871,4 @@ BOOL DropItemBeforeTrig() return FALSE; } -DEVILUTION_END_NAMESPACE +} diff --git a/Source/inv.h b/Source/inv.h index 03537f45..6a671abc 100644 --- a/Source/inv.h +++ b/Source/inv.h @@ -9,7 +9,7 @@ #include "items.h" #include "player.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -80,6 +80,6 @@ extern int AP2x2Tbl[10]; } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __INV_H__ */ diff --git a/Source/itemdat.cpp b/Source/itemdat.cpp index d0f8ae9b..1b5853da 100644 --- a/Source/itemdat.cpp +++ b/Source/itemdat.cpp @@ -5,7 +5,7 @@ */ #include "all.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { /** Contains the data related to each item ID. */ ItemDataStruct AllItemsList[] = { @@ -500,4 +500,4 @@ const UItemStruct UniqueItemList[] = { // clang-format on }; -DEVILUTION_END_NAMESPACE +} diff --git a/Source/itemdat.h b/Source/itemdat.h index 6e67b361..ed4ef783 100644 --- a/Source/itemdat.h +++ b/Source/itemdat.h @@ -6,7 +6,7 @@ #ifndef __ITEMDAT_H__ #define __ITEMDAT_H__ -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -548,6 +548,6 @@ extern const UItemStruct UniqueItemList[]; } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __ITEMDAT_H__ */ diff --git a/Source/items.cpp b/Source/items.cpp index 1bc7cfd5..9dba8b9e 100644 --- a/Source/items.cpp +++ b/Source/items.cpp @@ -7,7 +7,7 @@ #include "all.h" #include "options.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { int itemactive[MAXITEMS]; BOOL uitemflag; @@ -5472,4 +5472,4 @@ void PutItemRecord(int nSeed, WORD wCI, int nIndex) } } -DEVILUTION_END_NAMESPACE +} diff --git a/Source/items.h b/Source/items.h index 3f9caa13..d84d7d9b 100644 --- a/Source/items.h +++ b/Source/items.h @@ -8,7 +8,7 @@ #include "itemdat.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -353,6 +353,6 @@ extern int ItemInvSnds[]; } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __ITEMS_H__ */ diff --git a/Source/lighting.cpp b/Source/lighting.cpp index 014b012f..f7b55268 100644 --- a/Source/lighting.cpp +++ b/Source/lighting.cpp @@ -5,7 +5,7 @@ */ #include "all.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { LightListStruct VisionList[MAXVISION]; BYTE lightactive[MAXLIGHTS]; @@ -1297,4 +1297,4 @@ void lighting_color_cycling() } } -DEVILUTION_END_NAMESPACE +} diff --git a/Source/lighting.h b/Source/lighting.h index d5325604..2cdb14a5 100644 --- a/Source/lighting.h +++ b/Source/lighting.h @@ -6,7 +6,7 @@ #ifndef __LIGHTING_H__ #define __LIGHTING_H__ -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -73,6 +73,6 @@ extern const BYTE vCrawlTable[23][30]; } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __LIGHTING_H__ */ diff --git a/Source/loadsave.cpp b/Source/loadsave.cpp index fb27a949..bf76ab33 100644 --- a/Source/loadsave.cpp +++ b/Source/loadsave.cpp @@ -5,7 +5,7 @@ */ #include "all.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { bool gbIsHellfireSaveGame; int giNumberOfLevels; @@ -2090,4 +2090,4 @@ void LoadLevel() } } -DEVILUTION_END_NAMESPACE +} diff --git a/Source/loadsave.h b/Source/loadsave.h index 8be60352..3e821c24 100644 --- a/Source/loadsave.h +++ b/Source/loadsave.h @@ -8,7 +8,7 @@ #include "player.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -39,6 +39,6 @@ void LoadLevel(); } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __LOADSAVE_H__ */ diff --git a/Source/mainmenu.cpp b/Source/mainmenu.cpp index a2e731ca..308c3b1c 100644 --- a/Source/mainmenu.cpp +++ b/Source/mainmenu.cpp @@ -8,7 +8,7 @@ #include "../3rdParty/Storm/Source/storm.h" #include "../DiabloUI/diabloui.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { char gszHero[16]; @@ -156,4 +156,4 @@ void mainmenu_loop() music_stop(); } -DEVILUTION_END_NAMESPACE +} diff --git a/Source/mainmenu.h b/Source/mainmenu.h index 51eed7b7..2509f11d 100644 --- a/Source/mainmenu.h +++ b/Source/mainmenu.h @@ -8,7 +8,7 @@ #include "multi.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -23,6 +23,6 @@ void mainmenu_loop(); } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __MAINMENU_H__ */ diff --git a/Source/minitext.cpp b/Source/minitext.cpp index ba2c8f0f..2db53ac3 100644 --- a/Source/minitext.cpp +++ b/Source/minitext.cpp @@ -5,7 +5,7 @@ */ #include "all.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { /** Specify if the quest dialog window is being shown */ bool qtextflag; @@ -260,4 +260,4 @@ void DrawQText(CelOutputBuffer out) DrawQTextContent(out); } -DEVILUTION_END_NAMESPACE +} diff --git a/Source/minitext.h b/Source/minitext.h index 7e4ca7c0..f5ca0efa 100644 --- a/Source/minitext.h +++ b/Source/minitext.h @@ -6,7 +6,7 @@ #ifndef __MINITEXT_H__ #define __MINITEXT_H__ -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -32,6 +32,6 @@ void DrawQText(CelOutputBuffer out); } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __MINITEXT_H__ */ diff --git a/Source/misdat.cpp b/Source/misdat.cpp index 892ab838..28b8a9b5 100644 --- a/Source/misdat.cpp +++ b/Source/misdat.cpp @@ -5,7 +5,7 @@ */ #include "all.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { /** Data related to each missile ID. */ MissileData missiledata[] = { @@ -189,4 +189,4 @@ MisFileData misfiledata[] = { // clang-format on }; -DEVILUTION_END_NAMESPACE +} diff --git a/Source/misdat.h b/Source/misdat.h index e8f0c836..622ffcdd 100644 --- a/Source/misdat.h +++ b/Source/misdat.h @@ -8,7 +8,7 @@ #include "missiles.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -21,6 +21,6 @@ extern MisFileData misfiledata[]; } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __MISDAT_H__ */ diff --git a/Source/missiles.cpp b/Source/missiles.cpp index dd61fa4f..a5e018ab 100644 --- a/Source/missiles.cpp +++ b/Source/missiles.cpp @@ -5,7 +5,7 @@ */ #include "all.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { int missileactive[MAXMISSILES]; int missileavail[MAXMISSILES]; @@ -5671,4 +5671,4 @@ void ClearMissileSpot(int mi) dMissile[missile[mi]._mix][missile[mi]._miy] = 0; } -DEVILUTION_END_NAMESPACE +} diff --git a/Source/missiles.h b/Source/missiles.h index 855a4f91..0ad7231f 100644 --- a/Source/missiles.h +++ b/Source/missiles.h @@ -6,7 +6,7 @@ #ifndef __MISSILES_H__ #define __MISSILES_H__ -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -262,6 +262,6 @@ void ClearMissileSpot(int mi); } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __MISSILES_H__ */ diff --git a/Source/monstdat.cpp b/Source/monstdat.cpp index b7291d5b..234d5463 100644 --- a/Source/monstdat.cpp +++ b/Source/monstdat.cpp @@ -5,7 +5,7 @@ */ #include "all.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { /** Contains the data related to each monster ID. */ const MonsterData monsterdata[] = { @@ -566,4 +566,4 @@ const UniqMonstStruct UniqMonst[] = { // clang-format on }; -DEVILUTION_END_NAMESPACE +} diff --git a/Source/monstdat.h b/Source/monstdat.h index 27c53efb..4be40d5c 100644 --- a/Source/monstdat.h +++ b/Source/monstdat.h @@ -6,7 +6,7 @@ #ifndef __MONSTDAT_H__ #define __MONSTDAT_H__ -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -291,6 +291,6 @@ extern const UniqMonstStruct UniqMonst[]; } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __MONSTDAT_H__ */ diff --git a/Source/monster.cpp b/Source/monster.cpp index 495736a2..00f81a49 100644 --- a/Source/monster.cpp +++ b/Source/monster.cpp @@ -9,7 +9,7 @@ #include "options.h" #include "../3rdParty/Storm/Source/storm.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { /** Tracks which missile files are already loaded */ int MissileFileFlag; @@ -5707,4 +5707,4 @@ void decode_enemy(int m, int enemy) } } -DEVILUTION_END_NAMESPACE +} diff --git a/Source/monster.h b/Source/monster.h index 5cd8b517..0569f9c5 100644 --- a/Source/monster.h +++ b/Source/monster.h @@ -6,7 +6,7 @@ #ifndef __MONSTER_H__ #define __MONSTER_H__ -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -270,6 +270,6 @@ extern int offset_y[8]; } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __MONSTER_H__ */ diff --git a/Source/movie.cpp b/Source/movie.cpp index e2c5ada9..20848ca5 100644 --- a/Source/movie.cpp +++ b/Source/movie.cpp @@ -7,7 +7,7 @@ #include "../3rdParty/Storm/Source/storm.h" #include "../SourceX/display.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { /** Should the movie continue playing. */ BYTE movie_playing; @@ -56,4 +56,4 @@ void play_movie(const char *pszMovie, BOOL user_can_close) OutputToLogical(&MouseX, &MouseY); } -DEVILUTION_END_NAMESPACE +} diff --git a/Source/movie.h b/Source/movie.h index 7dbca79d..a9081437 100644 --- a/Source/movie.h +++ b/Source/movie.h @@ -6,7 +6,7 @@ #ifndef __MOVIE_H__ #define __MOVIE_H__ -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -21,6 +21,6 @@ void play_movie(const char *pszMovie, BOOL user_can_close); } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __MOVIE_H__ */ diff --git a/Source/mpqapi.cpp b/Source/mpqapi.cpp index fccd81cc..0cd04dcb 100644 --- a/Source/mpqapi.cpp +++ b/Source/mpqapi.cpp @@ -14,7 +14,7 @@ #include "all.h" #include "../SourceS/file_util.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #define INDEX_ENTRIES 2048 @@ -704,4 +704,4 @@ BOOL mpqapi_flush_and_close(const char *pszArchive, BOOL bFree, DWORD dwChar) return cur_archive.Close(/*clear_tables=*/bFree); } -DEVILUTION_END_NAMESPACE +} diff --git a/Source/mpqapi.h b/Source/mpqapi.h index 5f604873..34dd6894 100644 --- a/Source/mpqapi.h +++ b/Source/mpqapi.h @@ -8,7 +8,7 @@ #include -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -52,6 +52,6 @@ BOOL mpqapi_flush_and_close(const char *pszArchive, BOOL bFree, DWORD dwChar); } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __MPQAPI_H__ */ diff --git a/Source/msg.cpp b/Source/msg.cpp index 53d0a3cc..4b60db7f 100644 --- a/Source/msg.cpp +++ b/Source/msg.cpp @@ -8,7 +8,7 @@ #include "../DiabloUI/diabloui.h" #include "options.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { static DWORD sgdwOwnerWait; static DWORD sgdwRecvOffset; @@ -2685,4 +2685,4 @@ DWORD ParseCmd(int pnum, TCmd *pCmd) return On_DLEVEL(pnum, pCmd); } -DEVILUTION_END_NAMESPACE +} diff --git a/Source/msg.h b/Source/msg.h index d9669d10..e22ceae1 100644 --- a/Source/msg.h +++ b/Source/msg.h @@ -6,7 +6,7 @@ #ifndef __MSG_H__ #define __MSG_H__ -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -338,6 +338,6 @@ DWORD ParseCmd(int pnum, TCmd *pCmd); } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __MSG_H__ */ diff --git a/Source/multi.cpp b/Source/multi.cpp index d5fd16a5..d8897407 100644 --- a/Source/multi.cpp +++ b/Source/multi.cpp @@ -9,7 +9,7 @@ #include "../DiabloUI/diabloui.h" #include -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { BOOLEAN gbSomebodyWonGameKludge; TBuffer sgHiPriBuf; @@ -919,4 +919,4 @@ void recv_plrinfo(int pnum, TCmdPlrInfoHdr *p, BOOL recv) } } -DEVILUTION_END_NAMESPACE +} diff --git a/Source/multi.h b/Source/multi.h index 301a100e..958d6f26 100644 --- a/Source/multi.h +++ b/Source/multi.h @@ -8,7 +8,7 @@ #include "msg.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -60,6 +60,6 @@ void recv_plrinfo(int pnum, TCmdPlrInfoHdr *p, BOOL recv); } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __MULTI_H__ */ diff --git a/Source/nthread.cpp b/Source/nthread.cpp index 76fc0003..d092e3a1 100644 --- a/Source/nthread.cpp +++ b/Source/nthread.cpp @@ -6,7 +6,7 @@ #include "all.h" #include "../3rdParty/Storm/Source/storm.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { BYTE sgbNetUpdateRate; DWORD gdwMsgLenTbl[MAX_PLRS]; @@ -242,4 +242,4 @@ BOOL nthread_has_500ms_passed() return ticksElapsed >= 0; } -DEVILUTION_END_NAMESPACE +} diff --git a/Source/nthread.h b/Source/nthread.h index 7bd0e6e2..7285f467 100644 --- a/Source/nthread.h +++ b/Source/nthread.h @@ -6,7 +6,7 @@ #ifndef __NTHREAD_H__ #define __NTHREAD_H__ -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -33,6 +33,6 @@ BOOL nthread_has_500ms_passed(); } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __NTHREAD_H__ */ diff --git a/Source/objdat.cpp b/Source/objdat.cpp index fe571b4f..732240bc 100644 --- a/Source/objdat.cpp +++ b/Source/objdat.cpp @@ -5,7 +5,7 @@ */ #include "all.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { /** Maps from dun_object_id to object_id. */ const _object_id ObjTypeConv[] = { @@ -435,4 +435,4 @@ const char *ObjHiveLoadList[] = { "LzStand", }; -DEVILUTION_END_NAMESPACE +} diff --git a/Source/objdat.h b/Source/objdat.h index 703d748f..d90b77e1 100644 --- a/Source/objdat.h +++ b/Source/objdat.h @@ -6,7 +6,7 @@ #ifndef __OBJDAT_H__ #define __OBJDAT_H__ -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -205,6 +205,6 @@ extern const char *ObjHiveLoadList[]; } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __OBJDAT_H__ */ diff --git a/Source/objects.cpp b/Source/objects.cpp index 43ce7402..98c5e592 100644 --- a/Source/objects.cpp +++ b/Source/objects.cpp @@ -6,7 +6,7 @@ #include "all.h" #include "options.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { int trapid; int trapdir; @@ -5271,4 +5271,4 @@ bool objects_lv_24_454B04(int s) return FALSE; } -DEVILUTION_END_NAMESPACE +} diff --git a/Source/objects.h b/Source/objects.h index a99d84f8..13ab2d09 100644 --- a/Source/objects.h +++ b/Source/objects.h @@ -6,7 +6,7 @@ #ifndef __OBJECTS_H__ #define __OBJECTS_H__ -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -91,6 +91,6 @@ bool objects_lv_24_454B04(int s); } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __OBJECTS_H__ */ diff --git a/Source/options.h b/Source/options.h index 4e5f366b..4378d139 100644 --- a/Source/options.h +++ b/Source/options.h @@ -1,6 +1,6 @@ #pragma once -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { struct DiabloOptions { /** @brief Play game intro video on startup. */ @@ -133,4 +133,4 @@ struct Options { extern Options sgOptions; -DEVILUTION_END_NAMESPACE +} diff --git a/Source/pack.cpp b/Source/pack.cpp index ad6601a5..f98e7291 100644 --- a/Source/pack.cpp +++ b/Source/pack.cpp @@ -5,7 +5,7 @@ */ #include "all.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { void PackItem(PkItemStruct *id, const ItemStruct *is) { @@ -301,4 +301,4 @@ void UnPackPlayer(PkPlayerStruct *pPack, int pnum, BOOL netSync) pPlayer->pDamAcFlags = SwapLE32(pPack->pDamAcFlags); } -DEVILUTION_END_NAMESPACE +} diff --git a/Source/pack.h b/Source/pack.h index fa0254bc..8e520ebd 100644 --- a/Source/pack.h +++ b/Source/pack.h @@ -8,7 +8,7 @@ #include "items.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -89,6 +89,6 @@ void UnPackItem(const PkItemStruct *is, ItemStruct *id, bool isHellfire); } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __PACK_H__ */ diff --git a/Source/palette.cpp b/Source/palette.cpp index afc9bb01..ff7a15d7 100644 --- a/Source/palette.cpp +++ b/Source/palette.cpp @@ -8,7 +8,7 @@ #include "../SourceX/display.h" #include "../3rdParty/Storm/Source/storm.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { SDL_Color logical_palette[256]; SDL_Color system_palette[256]; @@ -383,4 +383,4 @@ void palette_update_quest_palette(int n) GenerateBlendedLookupTable(logical_palette, 1, 31, 32 - n); // Possible optimization would be to only update color 0 as only the UI can overlap with transparency in this quest } -DEVILUTION_END_NAMESPACE +} diff --git a/Source/palette.h b/Source/palette.h index 651eb6c3..e732edb4 100644 --- a/Source/palette.h +++ b/Source/palette.h @@ -6,7 +6,7 @@ #ifndef __PALETTE_H__ #define __PALETTE_H__ -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -39,6 +39,6 @@ void palette_update_quest_palette(int n); } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __PALETTE_H__ */ diff --git a/Source/path.cpp b/Source/path.cpp index 1bc1017a..08cc3429 100644 --- a/Source/path.cpp +++ b/Source/path.cpp @@ -5,7 +5,7 @@ */ #include "all.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { /** Notes visisted by the path finding algorithm. */ PATHNODE path_nodes[MAXPATHNODES]; /** size of the pnode_tblptr stack */ @@ -379,4 +379,4 @@ PATHNODE *path_new_step() return new_node; } -DEVILUTION_END_NAMESPACE +} diff --git a/Source/path.h b/Source/path.h index 135547f5..5cb6591d 100644 --- a/Source/path.h +++ b/Source/path.h @@ -6,7 +6,7 @@ #ifndef __PATH_H__ #define __PATH_H__ -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -45,6 +45,6 @@ extern const char pathydir[8]; } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __PATH_H__ */ diff --git a/Source/pfile.cpp b/Source/pfile.cpp index 65711cca..99972cfe 100644 --- a/Source/pfile.cpp +++ b/Source/pfile.cpp @@ -10,7 +10,7 @@ #include "../3rdParty/Storm/Source/storm.h" #include "file_util.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #define PASSWORD_SPAWN_SINGLE "adslhfb1" #define PASSWORD_SPAWN_MULTI "lshbkfg1" @@ -551,4 +551,4 @@ void pfile_update(bool force_save) pfile_write_hero(); } -DEVILUTION_END_NAMESPACE +} diff --git a/Source/pfile.h b/Source/pfile.h index 297a74c0..5ef1e4c0 100644 --- a/Source/pfile.h +++ b/Source/pfile.h @@ -9,7 +9,7 @@ #include "player.h" #include "../DiabloUI/diabloui.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -40,6 +40,6 @@ void pfile_update(bool force_save); } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __PFILE_H__ */ diff --git a/Source/player.cpp b/Source/player.cpp index eaf0f823..4a86df5e 100644 --- a/Source/player.cpp +++ b/Source/player.cpp @@ -9,7 +9,7 @@ #include "options.h" #include "../3rdParty/Storm/Source/storm.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { int plr_lframe_size; int plr_wframe_size; @@ -4411,4 +4411,4 @@ int get_max_dexterity(int i) return MaxStats[i][ATTRIB_DEX]; } -DEVILUTION_END_NAMESPACE +} diff --git a/Source/player.h b/Source/player.h index be45c3f7..76bbc206 100644 --- a/Source/player.h +++ b/Source/player.h @@ -6,7 +6,7 @@ #ifndef __PLAYER_H__ #define __PLAYER_H__ -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { typedef enum PLR_MODE { PM_STAND, @@ -325,6 +325,6 @@ extern int ExpLvlsTbl[MAXCHARLEVEL]; } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __PLAYER_H__ */ diff --git a/Source/plrmsg.cpp b/Source/plrmsg.cpp index 789d2b46..559c2e0d 100644 --- a/Source/plrmsg.cpp +++ b/Source/plrmsg.cpp @@ -5,7 +5,7 @@ */ #include "all.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { static BYTE plr_msg_slot; _plrmsg plr_msgs[PMSG_COUNT]; @@ -152,4 +152,4 @@ void DrawPlrMsg(CelOutputBuffer out) } } -DEVILUTION_END_NAMESPACE +} diff --git a/Source/plrmsg.h b/Source/plrmsg.h index 9f3d1200..66482ff8 100644 --- a/Source/plrmsg.h +++ b/Source/plrmsg.h @@ -8,7 +8,7 @@ #include "engine.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -32,6 +32,6 @@ void DrawPlrMsg(CelOutputBuffer out); } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __PLRMSG_H__ */ diff --git a/Source/portal.cpp b/Source/portal.cpp index 600aba8c..fd544d8b 100644 --- a/Source/portal.cpp +++ b/Source/portal.cpp @@ -5,7 +5,7 @@ */ #include "all.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { /** In-game state of portals. */ PortalStruct portal[MAXPORTAL]; @@ -183,4 +183,4 @@ BOOL PosOkPortal(int lvl, int x, int y) return FALSE; } -DEVILUTION_END_NAMESPACE +} diff --git a/Source/portal.h b/Source/portal.h index 447a7ff2..8a3c5515 100644 --- a/Source/portal.h +++ b/Source/portal.h @@ -6,7 +6,7 @@ #ifndef __PORTAL_H__ #define __PORTAL_H__ -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -41,6 +41,6 @@ BOOL PosOkPortal(int lvl, int x, int y); } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __PORTAL_H__ */ diff --git a/Source/quests.cpp b/Source/quests.cpp index 92bde550..f180f9e2 100644 --- a/Source/quests.cpp +++ b/Source/quests.cpp @@ -6,7 +6,7 @@ #include "all.h" #include "options.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { int qtopline; bool questlog; @@ -944,4 +944,4 @@ void SetMultiQuest(int q, int s, int l, int v1) } } -DEVILUTION_END_NAMESPACE +} diff --git a/Source/quests.h b/Source/quests.h index f19ccab0..025b91c8 100644 --- a/Source/quests.h +++ b/Source/quests.h @@ -8,7 +8,7 @@ #include "engine.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -75,6 +75,6 @@ extern QuestData questlist[]; } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __QUESTS_H__ */ diff --git a/Source/render.cpp b/Source/render.cpp index 30df94d1..ed7f6943 100644 --- a/Source/render.cpp +++ b/Source/render.cpp @@ -6,7 +6,7 @@ #include "all.h" #include "options.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #define NO_OVERDRAW @@ -616,4 +616,4 @@ void world_draw_black_tile(CelOutputBuffer out, int sx, int sy) } } -DEVILUTION_END_NAMESPACE +} diff --git a/Source/render.h b/Source/render.h index 21d6afd2..4dbf2700 100644 --- a/Source/render.h +++ b/Source/render.h @@ -6,7 +6,7 @@ #ifndef __RENDER_H__ #define __RENDER_H__ -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -32,6 +32,6 @@ void world_draw_black_tile(CelOutputBuffer out, int sx, int sy); } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __RENDER_H__ */ diff --git a/Source/restrict.cpp b/Source/restrict.cpp index 94900d21..94b42629 100644 --- a/Source/restrict.cpp +++ b/Source/restrict.cpp @@ -6,7 +6,7 @@ #include "all.h" #include "paths.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { /** * @brief Check that we have write access to the game install folder @@ -24,4 +24,4 @@ void ReadOnlyTest() remove(path.c_str()); } -DEVILUTION_END_NAMESPACE +} diff --git a/Source/restrict.h b/Source/restrict.h index db3ef8d4..b45ac629 100644 --- a/Source/restrict.h +++ b/Source/restrict.h @@ -6,7 +6,7 @@ #ifndef __RESTRICT_H__ #define __RESTRICT_H__ -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -18,6 +18,6 @@ void ReadOnlyTest(); } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __RESTRICT_H__ */ diff --git a/Source/scrollrt.cpp b/Source/scrollrt.cpp index 89ac1199..14459c47 100644 --- a/Source/scrollrt.cpp +++ b/Source/scrollrt.cpp @@ -5,7 +5,7 @@ */ #include "all.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { /** * Specifies the current light entry. @@ -1557,4 +1557,4 @@ void DrawAndBlit() drawsbarflag = FALSE; } -DEVILUTION_END_NAMESPACE +} diff --git a/Source/scrollrt.h b/Source/scrollrt.h index ef542832..0d220375 100644 --- a/Source/scrollrt.h +++ b/Source/scrollrt.h @@ -6,7 +6,7 @@ #ifndef __SCROLLRT_H__ #define __SCROLLRT_H__ -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -51,6 +51,6 @@ void DrawAndBlit(); } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __SCROLLRT_H__ */ diff --git a/Source/setmaps.cpp b/Source/setmaps.cpp index cf81066c..00e7932e 100644 --- a/Source/setmaps.cpp +++ b/Source/setmaps.cpp @@ -5,7 +5,7 @@ */ #include "all.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { // BUGFIX: constant data should be const BYTE SkelKingTrans1[] = { @@ -199,4 +199,4 @@ void LoadSetMap() } } -DEVILUTION_END_NAMESPACE +} diff --git a/Source/setmaps.h b/Source/setmaps.h index 231dd18b..04b296b7 100644 --- a/Source/setmaps.h +++ b/Source/setmaps.h @@ -6,7 +6,7 @@ #ifndef __SETMAPS_H__ #define __SETMAPS_H__ -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -22,6 +22,6 @@ extern const char *const quest_level_names[]; } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __SETMAPS_H__ */ diff --git a/Source/sha.cpp b/Source/sha.cpp index eab7edc0..52fb3862 100644 --- a/Source/sha.cpp +++ b/Source/sha.cpp @@ -7,7 +7,7 @@ #include -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { // NOTE: Diablo's "SHA1" is different from actual SHA1 in that it uses arithmetic // right shifts (sign bit extension). @@ -158,4 +158,4 @@ void SHA1Reset(int n) SHA1Init(&sgSHA1[n]); } -DEVILUTION_END_NAMESPACE +} diff --git a/Source/sha.h b/Source/sha.h index ecb17cf1..33699cbb 100644 --- a/Source/sha.h +++ b/Source/sha.h @@ -6,7 +6,7 @@ #ifndef __SHA_H__ #define __SHA_H__ -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -29,6 +29,6 @@ void SHA1Reset(int n); } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __SHA_H__ */ diff --git a/Source/sound.h b/Source/sound.h index 01df346b..3a8bbe40 100644 --- a/Source/sound.h +++ b/Source/sound.h @@ -6,7 +6,7 @@ #ifndef __SOUND_H__ #define __SOUND_H__ -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -46,6 +46,6 @@ extern BOOLEAN gbDupSounds; } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __SOUND_H__ */ diff --git a/Source/spelldat.cpp b/Source/spelldat.cpp index c2735bc2..e32ebbfd 100644 --- a/Source/spelldat.cpp +++ b/Source/spelldat.cpp @@ -5,7 +5,7 @@ */ #include "all.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { /** Data related to each spell ID. */ SpellData spelldata[] = { @@ -66,4 +66,4 @@ SpellData spelldata[] = { // clang-format on }; -DEVILUTION_END_NAMESPACE +} diff --git a/Source/spelldat.h b/Source/spelldat.h index 6c07bd96..00231c64 100644 --- a/Source/spelldat.h +++ b/Source/spelldat.h @@ -6,7 +6,7 @@ #ifndef __SPELLDAT_H__ #define __SPELLDAT_H__ -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -214,6 +214,6 @@ extern SpellData spelldata[]; } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __SPELLDAT_H__ */ diff --git a/Source/spells.cpp b/Source/spells.cpp index 0da6e969..b81aacfd 100644 --- a/Source/spells.cpp +++ b/Source/spells.cpp @@ -5,7 +5,7 @@ */ #include "all.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { int GetManaAmount(int id, int sn) { @@ -413,4 +413,4 @@ int GetSpellStaffLevel(spell_id s) return spelldata[s].sStaffLvl; } -DEVILUTION_END_NAMESPACE +} diff --git a/Source/spells.h b/Source/spells.h index 0c5ca334..37a14d5c 100644 --- a/Source/spells.h +++ b/Source/spells.h @@ -6,7 +6,7 @@ #ifndef __SPELLS_H__ #define __SPELLS_H__ -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -27,6 +27,6 @@ int GetSpellStaffLevel(spell_id s); } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __SPELLS_H__ */ diff --git a/Source/stores.cpp b/Source/stores.cpp index 53a0a703..8956f37b 100644 --- a/Source/stores.cpp +++ b/Source/stores.cpp @@ -7,7 +7,7 @@ #include "options.h" #include -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { namespace { @@ -2910,4 +2910,4 @@ void ReleaseStoreBtn() stextscrldbtn = -1; } -DEVILUTION_END_NAMESPACE +} diff --git a/Source/stores.h b/Source/stores.h index 169756da..56791f73 100644 --- a/Source/stores.h +++ b/Source/stores.h @@ -8,7 +8,7 @@ #include "engine.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -121,6 +121,6 @@ void ReleaseStoreBtn(); } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __STORES_H__ */ diff --git a/Source/sync.cpp b/Source/sync.cpp index 49a000c3..fa9f58b6 100644 --- a/Source/sync.cpp +++ b/Source/sync.cpp @@ -5,7 +5,7 @@ */ #include "all.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { namespace { @@ -289,4 +289,4 @@ void sync_init() memset(sgwLRU, 255, sizeof(sgwLRU)); } -DEVILUTION_END_NAMESPACE +} diff --git a/Source/sync.h b/Source/sync.h index 3e646bd0..b4cb3742 100644 --- a/Source/sync.h +++ b/Source/sync.h @@ -6,7 +6,7 @@ #ifndef __SYNC_H__ #define __SYNC_H__ -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -20,6 +20,6 @@ void sync_init(); } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __SYNC_H__ */ diff --git a/Source/textdat.cpp b/Source/textdat.cpp index 5fb40be1..0fd946f7 100644 --- a/Source/textdat.cpp +++ b/Source/textdat.cpp @@ -6,7 +6,7 @@ #include "all.h" #include "textdat.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { /* todo: move text out of struct */ @@ -738,4 +738,4 @@ const TextDataStruct alltext[] = { */ }; -DEVILUTION_END_NAMESPACE +} diff --git a/Source/textdat.h b/Source/textdat.h index 76cc6a32..73166261 100644 --- a/Source/textdat.h +++ b/Source/textdat.h @@ -6,7 +6,7 @@ #ifndef __TEXTDAT_H__ #define __TEXTDAT_H__ -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -24,6 +24,6 @@ extern const TextDataStruct alltext[]; } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __TEXTDAT_H__ */ diff --git a/Source/themes.cpp b/Source/themes.cpp index 42d9453a..c42ece10 100644 --- a/Source/themes.cpp +++ b/Source/themes.cpp @@ -5,7 +5,7 @@ */ #include "all.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { int numthemes; BOOL armorFlag; @@ -1066,4 +1066,4 @@ void CreateThemeRooms() } } -DEVILUTION_END_NAMESPACE +} diff --git a/Source/themes.h b/Source/themes.h index 3f813323..716a6d73 100644 --- a/Source/themes.h +++ b/Source/themes.h @@ -6,7 +6,7 @@ #ifndef __THEMES_H__ #define __THEMES_H__ -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -30,6 +30,6 @@ void CreateThemeRooms(); #ifdef __cplusplus } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __THEMES_H__ */ diff --git a/Source/tmsg.cpp b/Source/tmsg.cpp index b876ff6b..02843997 100644 --- a/Source/tmsg.cpp +++ b/Source/tmsg.cpp @@ -5,7 +5,7 @@ */ #include "all.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { namespace { @@ -63,4 +63,4 @@ void tmsg_cleanup() } } -DEVILUTION_END_NAMESPACE +} diff --git a/Source/tmsg.h b/Source/tmsg.h index 0dc8555d..c2bdbf2f 100644 --- a/Source/tmsg.h +++ b/Source/tmsg.h @@ -6,7 +6,7 @@ #ifndef __TMSG_H__ #define __TMSG_H__ -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -38,6 +38,6 @@ void tmsg_cleanup(); } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __TMSG_H__ */ diff --git a/Source/town.cpp b/Source/town.cpp index d3458cb4..647f2d6b 100644 --- a/Source/town.cpp +++ b/Source/town.cpp @@ -5,7 +5,7 @@ */ #include "all.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { namespace { @@ -385,4 +385,4 @@ void CreateTown(int entry) } } -DEVILUTION_END_NAMESPACE +} diff --git a/Source/town.h b/Source/town.h index c2463930..e1ba5fba 100644 --- a/Source/town.h +++ b/Source/town.h @@ -6,7 +6,7 @@ #ifndef __TOWN_H__ #define __TOWN_H__ -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -20,6 +20,6 @@ void CreateTown(int entry); } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __TOWN_H__ */ diff --git a/Source/towners.cpp b/Source/towners.cpp index 84870fea..3e48a15e 100644 --- a/Source/towners.cpp +++ b/Source/towners.cpp @@ -5,7 +5,7 @@ */ #include "all.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { BOOL storeflag; int sgnCowMsg; @@ -1302,4 +1302,4 @@ void TalkToTowner(int p, int t) } } -DEVILUTION_END_NAMESPACE +} diff --git a/Source/towners.h b/Source/towners.h index f56266f1..d1974c61 100644 --- a/Source/towners.h +++ b/Source/towners.h @@ -6,7 +6,7 @@ #ifndef __TOWNERS_H__ #define __TOWNERS_H__ -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -85,6 +85,6 @@ extern _speech_id Qtalklist[NUM_TOWNER_TYPES][MAXQUESTS]; } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __TOWNERS_H__ */ diff --git a/Source/track.cpp b/Source/track.cpp index 73aaf05f..0d53e3e1 100644 --- a/Source/track.cpp +++ b/Source/track.cpp @@ -5,7 +5,7 @@ */ #include "all.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { namespace { @@ -57,4 +57,4 @@ bool track_isscrolling() return sgbIsScrolling; } -DEVILUTION_END_NAMESPACE +} diff --git a/Source/track.h b/Source/track.h index ba9ac8a6..c22a0b51 100644 --- a/Source/track.h +++ b/Source/track.h @@ -6,7 +6,7 @@ #ifndef __TRACK_H__ #define __TRACK_H__ -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -20,6 +20,6 @@ bool track_isscrolling(); } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __TRACK_H__ */ diff --git a/Source/trigs.cpp b/Source/trigs.cpp index 7b1261ef..47a0f37c 100644 --- a/Source/trigs.cpp +++ b/Source/trigs.cpp @@ -5,7 +5,7 @@ */ #include "all.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { BOOL townwarps[3]; BOOL trigflag; @@ -922,4 +922,4 @@ void CheckTriggers() } } -DEVILUTION_END_NAMESPACE +} diff --git a/Source/trigs.h b/Source/trigs.h index 97df1ad1..0047e362 100644 --- a/Source/trigs.h +++ b/Source/trigs.h @@ -6,7 +6,7 @@ #ifndef __TRIGS_H__ #define __TRIGS_H__ -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { #ifdef __cplusplus extern "C" { @@ -42,6 +42,6 @@ void CheckTriggers(); } #endif -DEVILUTION_END_NAMESPACE +} #endif /* __TRIGS_H__ */ diff --git a/SourceX/qol.cpp b/SourceX/qol.cpp index cc6bc189..ec5aa7d1 100644 --- a/SourceX/qol.cpp +++ b/SourceX/qol.cpp @@ -7,7 +7,7 @@ #include "options.h" #include "DiabloUI/art_draw.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { namespace { struct QolArt { @@ -237,4 +237,4 @@ void AutoGoldPickup(int pnum) } } -DEVILUTION_END_NAMESPACE +} diff --git a/SourceX/qol.h b/SourceX/qol.h index 2e85ffcd..8aa46b68 100644 --- a/SourceX/qol.h +++ b/SourceX/qol.h @@ -8,7 +8,7 @@ #include "engine.h" -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { void FreeQol(); void InitQol(); @@ -16,6 +16,6 @@ void DrawMonsterHealthBar(CelOutputBuffer out); void DrawXPBar(CelOutputBuffer out); void AutoGoldPickup(int pnum); -DEVILUTION_END_NAMESPACE +} #endif /* __QOL_H__ */ diff --git a/enums.h b/enums.h index ffc92e5a..e637b2a7 100644 --- a/enums.h +++ b/enums.h @@ -4,7 +4,7 @@ * Various global enumerators. */ -DEVILUTION_BEGIN_NAMESPACE +namespace dvl { typedef enum _sfx_id { PS_WALK1, @@ -2343,4 +2343,4 @@ typedef enum conn_type { SELCONN_LOOPBACK, } conn_type; -DEVILUTION_END_NAMESPACE +} diff --git a/types.h b/types.h index cdbca6c9..7e3dfbbb 100644 --- a/types.h +++ b/types.h @@ -6,9 +6,6 @@ #ifndef _TYPES_H #define _TYPES_H -#define DEVILUTION_BEGIN_NAMESPACE namespace dvl { -#define DEVILUTION_END_NAMESPACE } - #include "miniwin.h" #include "soundsample.h" #include "thread.h"