Browse Source

Sanitize use of namespace

Wrap individual headers in dvl namespace to prevent
including standard header in another namespace.
pull/714/head
Joel Falcou 6 years ago committed by Anders Jenbo
parent
commit
64d26a7934
  1. 8
      Source/all.h
  2. 4
      Source/appfat.h
  3. 4
      Source/automap.h
  4. 4
      Source/capture.h
  5. 4
      Source/codec.h
  6. 4
      Source/control.h
  7. 4
      Source/cursor.h
  8. 4
      Source/dead.h
  9. 4
      Source/debug.h
  10. 4
      Source/diablo.h
  11. 4
      Source/doom.h
  12. 4
      Source/drlg_l1.h
  13. 4
      Source/drlg_l2.h
  14. 4
      Source/drlg_l3.h
  15. 4
      Source/drlg_l4.h
  16. 3
      Source/dthread.h
  17. 3
      Source/dx.h
  18. 3
      Source/effects.h
  19. 4
      Source/encrypt.h
  20. 4
      Source/engine.h
  21. 4
      Source/error.h
  22. 4
      Source/gamemenu.h
  23. 4
      Source/gendung.h
  24. 4
      Source/gmenu.h
  25. 4
      Source/help.h
  26. 4
      Source/init.h
  27. 4
      Source/interfac.h
  28. 4
      Source/inv.h
  29. 4
      Source/itemdat.h
  30. 4
      Source/items.h
  31. 4
      Source/lighting.h
  32. 4
      Source/loadsave.h
  33. 4
      Source/mainmenu.h
  34. 4
      Source/minitext.h
  35. 4
      Source/misdat.h
  36. 4
      Source/missiles.h
  37. 4
      Source/monstdat.h
  38. 4
      Source/monster.h
  39. 4
      Source/movie.h
  40. 4
      Source/mpqapi.h
  41. 4
      Source/msg.h
  42. 4
      Source/multi.h
  43. 3
      Source/nthread.h
  44. 4
      Source/objdat.h
  45. 4
      Source/objects.h
  46. 3
      Source/pack.h
  47. 4
      Source/palette.h
  48. 4
      Source/path.h
  49. 3
      Source/pfile.h
  50. 4
      Source/player.h
  51. 4
      Source/plrmsg.h
  52. 4
      Source/portal.h
  53. 4
      Source/quests.h
  54. 4
      Source/render.h
  55. 4
      Source/restrict.h
  56. 4
      Source/scrollrt.h
  57. 4
      Source/setmaps.h
  58. 4
      Source/sha.h
  59. 4
      Source/sound.h
  60. 4
      Source/spelldat.h
  61. 4
      Source/spells.h
  62. 3
      Source/stores.h
  63. 4
      Source/sync.h
  64. 3
      Source/textdat.h
  65. 3
      Source/themes.h
  66. 3
      Source/tmsg.h
  67. 3
      Source/town.h
  68. 3
      Source/towners.h
  69. 4
      Source/track.h
  70. 3
      Source/trigs.h
  71. 4
      Source/wave.h
  72. 4
      enums.h
  73. 4
      structs.h
  74. 2
      types.h

8
Source/all.h

@ -18,9 +18,6 @@
#include "../types.h"
#ifdef __cplusplus
extern "C" {
#endif
#include "appfat.h"
#include "automap.h"
#include "capture.h"
@ -91,10 +88,5 @@ extern "C" {
#include "trigs.h"
#include "wave.h"
#include "render.h" // linked last, likely .s/.asm
#ifdef __cplusplus
}
#endif
DEVILUTION_END_NAMESPACE
#endif /* __ALL_H__ */

4
Source/appfat.h

@ -6,6 +6,8 @@
#ifndef __APPFAT_H__
#define __APPFAT_H__
DEVILUTION_BEGIN_NAMESPACE
extern char sz_error_buf[256];
extern BOOL terminating;
extern int cleanup_thread_id;
@ -30,4 +32,6 @@ void DiskFreeDlg(char *error);
void InsertCDDlg(const char *fileName);
void DirErrorDlg(char *error);
DEVILUTION_END_NAMESPACE
#endif /* __APPFAT_H__ */

4
Source/automap.h

@ -6,6 +6,8 @@
#ifndef __AUTOMAP_H__
#define __AUTOMAP_H__
DEVILUTION_BEGIN_NAMESPACE
extern WORD automaptype[512];
extern BOOL automapflag;
extern char AmShiftTab[31];
@ -36,4 +38,6 @@ void DrawAutomapText();
void SetAutomapView(int x, int y);
void AutomapZoomReset();
DEVILUTION_END_NAMESPACE
#endif /* __AUTOMAP_H__ */

4
Source/capture.h

@ -6,6 +6,10 @@
#ifndef __CAPTURE_H__
#define __CAPTURE_H__
DEVILUTION_BEGIN_NAMESPACE
void CaptureScreen();
DEVILUTION_END_NAMESPACE
#endif /* __CAPTURE_H__ */

4
Source/codec.h

@ -6,9 +6,13 @@
#ifndef __CODEC_H__
#define __CODEC_H__
DEVILUTION_BEGIN_NAMESPACE
int codec_decode(BYTE *pbSrcDst, DWORD size, char *pszPassword);
void codec_init_key(int unused, char *pszPassword);
DWORD codec_get_encoded_len(DWORD dwSrcBytes);
void codec_encode(BYTE *pbSrcDst, DWORD size, int size_64, char *pszPassword);
DEVILUTION_END_NAMESPACE
#endif /* __CODEC_H__ */

4
Source/control.h

@ -6,6 +6,8 @@
#ifndef __CONTROL_H__
#define __CONTROL_H__
DEVILUTION_BEGIN_NAMESPACE
extern BYTE *pDurIcons;
extern BYTE *pChrButtons;
extern BOOL drawhpflag;
@ -137,4 +139,6 @@ extern char *PanBtnStr[8];
extern RECT32 ChrBtnsRect[4];
extern int SpellPages[6][7];
DEVILUTION_END_NAMESPACE
#endif /* __CONTROL_H__ */

4
Source/cursor.h

@ -6,6 +6,8 @@
#ifndef __CURSOR_H__
#define __CURSOR_H__
DEVILUTION_BEGIN_NAMESPACE
extern int cursW;
extern int cursH;
extern int pcursmonst;
@ -37,4 +39,6 @@ void CheckCursMove();
extern const int InvItemWidth[];
extern const int InvItemHeight[];
DEVILUTION_END_NAMESPACE
#endif /* __CURSOR_H__ */

4
Source/dead.h

@ -6,6 +6,8 @@
#ifndef __DEAD_H__
#define __DEAD_H__
DEVILUTION_BEGIN_NAMESPACE
extern int spurtndx;
extern DeadStruct dead[MAXDEAD];
extern int stonendx;
@ -14,4 +16,6 @@ void InitDead();
void AddDead(int dx, int dy, char dv, int ddir);
void SetDead();
DEVILUTION_END_NAMESPACE
#endif /* __DEAD_H__ */

4
Source/debug.h

@ -6,6 +6,8 @@
#ifndef __DEBUG_H__
#define __DEBUG_H__
DEVILUTION_BEGIN_NAMESPACE
extern BYTE *pSquareCel;
extern char dMonsDbg[NUMLEVELS][MAXDUNX][MAXDUNY];
extern char dFlagDbg[NUMLEVELS][MAXDUNX][MAXDUNY];
@ -27,4 +29,6 @@ void GetDebugMonster();
void NextDebugMonster();
#endif
DEVILUTION_END_NAMESPACE
#endif /* __DEBUG_H__ */

4
Source/diablo.h

@ -6,6 +6,8 @@
#ifndef __DIABLO_H__
#define __DIABLO_H__
DEVILUTION_BEGIN_NAMESPACE
extern SDL_Window *ghMainWnd;
extern DWORD glSeedTbl[NUMLEVELS];
extern int gnLevelTypeTbl[NUMLEVELS];
@ -103,4 +105,6 @@ extern BOOL FriendlyMode;
extern char *spszMsgTbl[4];
extern char *spszMsgHotKeyTbl[4];
DEVILUTION_END_NAMESPACE
#endif /* __DIABLO_H__ */

4
Source/doom.h

@ -6,6 +6,8 @@
#ifndef __DOOM_H__
#define __DOOM_H__
DEVILUTION_BEGIN_NAMESPACE
extern int doom_quest_time;
extern int doom_stars_drawn;
extern BYTE *pDoomCel;
@ -24,4 +26,6 @@ void doom_init();
void doom_close();
void doom_draw();
DEVILUTION_END_NAMESPACE
#endif /* __DOOM_H__ */

4
Source/drlg_l1.h

@ -6,6 +6,8 @@
#ifndef __DRLG_L1_H__
#define __DRLG_L1_H__
DEVILUTION_BEGIN_NAMESPACE
extern BYTE L5dungeon[80][80];
extern BYTE L5dflags[DMAXX][DMAXY];
extern BOOL L5setloadflag;
@ -38,4 +40,6 @@ extern const BYTE PWATERIN[];
/* data */
extern BYTE L5ConvTbl[16];
DEVILUTION_END_NAMESPACE
#endif /* __DRLG_L1_H__ */

4
Source/drlg_l2.h

@ -6,6 +6,8 @@
#ifndef __DRLG_L2_H__
#define __DRLG_L2_H__
DEVILUTION_BEGIN_NAMESPACE
extern int nSx1;
extern int nSy1;
extern int nSx2;
@ -145,4 +147,6 @@ extern BYTE CTRDOOR7[];
extern BYTE CTRDOOR8[];
extern int Patterns[100][10];
DEVILUTION_END_NAMESPACE
#endif /* __DRLG_L2_H__ */

4
Source/drlg_l3.h

@ -6,6 +6,8 @@
#ifndef __DRLG_L3_H__
#define __DRLG_L3_H__
DEVILUTION_BEGIN_NAMESPACE
extern BOOLEAN lavapool;
extern int abyssx;
extern int lockoutcnt;
@ -61,4 +63,6 @@ extern const BYTE L3XTRA4[4];
extern const BYTE L3XTRA5[4];
extern const BYTE L3ANVIL[244];
DEVILUTION_END_NAMESPACE
#endif /* __DRLG_L3_H__ */

4
Source/drlg_l4.h

@ -6,6 +6,8 @@
#ifndef __DRLG_L4_H__
#define __DRLG_L4_H__
DEVILUTION_BEGIN_NAMESPACE
extern int diabquad1x;
extern int diabquad1y;
extern int diabquad2x;
@ -49,4 +51,6 @@ extern const BYTE L4PENTA[52];
extern const BYTE L4PENTA2[52];
extern const BYTE L4BTYPES[140];
DEVILUTION_END_NAMESPACE
#endif /* __DRLG_L4_H__ */

3
Source/dthread.h

@ -6,6 +6,8 @@
#ifndef __DTHREAD_H__
#define __DTHREAD_H__
DEVILUTION_BEGIN_NAMESPACE
extern SDL_threadID glpDThreadId;
extern BOOLEAN dthread_running;
@ -16,5 +18,6 @@ unsigned int dthread_handler(void *data);
void dthread_cleanup();
/* data */
DEVILUTION_END_NAMESPACE
#endif /* __DTHREAD_H__ */

3
Source/dx.h

@ -6,6 +6,8 @@
#ifndef __DX_H__
#define __DX_H__
DEVILUTION_BEGIN_NAMESPACE
extern BYTE *gpBuffer;
extern char gbBackBuf;
extern char gbEmulate;
@ -25,5 +27,6 @@ void PaletteGetEntries(DWORD dwNumEntries, SDL_Color *lpEntries);
void PaletteSetEntries(DWORD dwCount, SDL_Color *lpEntries);
/* data */
DEVILUTION_END_NAMESPACE
#endif /* __DX_H__ */

3
Source/effects.h

@ -6,6 +6,8 @@
#ifndef __EFFECTS_H__
#define __EFFECTS_H__
DEVILUTION_BEGIN_NAMESPACE
extern int sfxdelay;
extern int sfxdnum;
extern HANDLE sghStream;
@ -37,5 +39,6 @@ void effects_play_sound(char *snd_file);
extern const char MonstSndChar[];
/* data */
DEVILUTION_END_NAMESPACE
#endif /* __EFFECTS_H__ */

4
Source/encrypt.h

@ -6,6 +6,8 @@
#ifndef __ENCRYPT_H__
#define __ENCRYPT_H__
DEVILUTION_BEGIN_NAMESPACE
extern DWORD hashtable[5][256];
void Decrypt(DWORD *castBlock, DWORD size, DWORD key);
@ -17,4 +19,6 @@ unsigned int PkwareBufferRead(char *buf, unsigned int *size, void *param);
void PkwareBufferWrite(char *buf, unsigned int *size, void *param);
void PkwareDecompress(BYTE *pbInBuff, int recv_size, int dwMaxBytes);
DEVILUTION_END_NAMESPACE
#endif /* __ENCRYPT_H__ */

4
Source/engine.h

@ -13,6 +13,8 @@
#ifndef __ENGINE_H__
#define __ENGINE_H__
DEVILUTION_BEGIN_NAMESPACE
//offset 0
//pCelBuff->pFrameTable[0]
@ -98,4 +100,6 @@ void PlayInGameMovie(char *pszMovie);
extern const int RndInc;
extern const int RndMult;
DEVILUTION_END_NAMESPACE
#endif /* __ENGINE_H__ */

4
Source/error.h

@ -6,6 +6,8 @@
#ifndef __ERROR_H__
#define __ERROR_H__
DEVILUTION_BEGIN_NAMESPACE
extern char msgtable[MAX_SEND_STR_LEN];
extern DWORD msgdelay;
extern char msgflag;
@ -18,4 +20,6 @@ void DrawDiabloMsg();
/* data */
extern char *MsgStrings[];
DEVILUTION_END_NAMESPACE
#endif /* __ERROR_H__ */

4
Source/gamemenu.h

@ -6,6 +6,8 @@
#ifndef __GAMEMENU_H__
#define __GAMEMENU_H__
DEVILUTION_BEGIN_NAMESPACE
void gamemenu_on();
void gamemenu_update_single(TMenuItem *pMenuItems);
void gamemenu_update_multi(TMenuItem *pMenuItems);
@ -35,4 +37,6 @@ extern char *music_toggle_names[];
extern char *sound_toggle_names[];
extern char *color_cycling_toggle_names[];
DEVILUTION_END_NAMESPACE
#endif /* __GAMEMENU_H__ */

4
Source/gendung.h

@ -6,6 +6,8 @@
#ifndef __GENDUNG_H__
#define __GENDUNG_H__
DEVILUTION_BEGIN_NAMESPACE
extern BYTE dungeon[DMAXX][DMAXY];
extern BYTE pdungeon[DMAXX][DMAXY];
extern char dflags[DMAXX][DMAXY];
@ -89,4 +91,6 @@ void DRLG_HoldThemeRooms();
BOOL SkipThemeRoom(int x, int y);
void InitLevels();
DEVILUTION_END_NAMESPACE
#endif /* __GENDUNG_H__ */

4
Source/gmenu.h

@ -6,6 +6,8 @@
#ifndef __GMENU_H__
#define __GMENU_H__
DEVILUTION_BEGIN_NAMESPACE
extern BYTE *optbar_cel;
extern BOOLEAN mouseNavigation;
extern BYTE *PentSpin_cel;
@ -43,4 +45,6 @@ void gmenu_slider_steps(TMenuItem *pItem, int dwTicks);
extern const BYTE lfontframe[];
extern const BYTE lfontkern[];
DEVILUTION_END_NAMESPACE
#endif /* __GMENU_H__ */

4
Source/help.h

@ -6,6 +6,8 @@
#ifndef __HELP_H__
#define __HELP_H__
DEVILUTION_BEGIN_NAMESPACE
extern int help_select_line;
extern int dword_634494;
extern BOOL helpflag;
@ -22,4 +24,6 @@ void HelpScrollDown();
/* rdata */
extern const char gszHelpText[];
DEVILUTION_END_NAMESPACE
#endif /* __HELP_H__ */

4
Source/init.h

@ -6,6 +6,8 @@
#ifndef __INIT_H__
#define __INIT_H__
DEVILUTION_BEGIN_NAMESPACE
extern _SNETVERSIONDATA fileinfo;
extern int gbActive;
extern char diablo_exe_path[MAX_PATH];
@ -36,4 +38,6 @@ extern BOOL was_window_init; /** defined in dx.cpp */
extern char gszVersionNumber[MAX_PATH];
extern char gszProductName[MAX_PATH];
DEVILUTION_END_NAMESPACE
#endif /* __INIT_H__ */

4
Source/interfac.h

@ -6,6 +6,8 @@
#ifndef __INTERFAC_H__
#define __INTERFAC_H__
DEVILUTION_BEGIN_NAMESPACE
extern int progress_id;
void interface_msg_pump();
@ -21,4 +23,6 @@ void InitCutscene(unsigned int uMsg);
extern const BYTE BarColor[3];
extern const int BarPos[3][2];
DEVILUTION_END_NAMESPACE
#endif /* __INTERFAC_H__ */

4
Source/inv.h

@ -6,6 +6,8 @@
#ifndef __INV_H__
#define __INV_H__
DEVILUTION_BEGIN_NAMESPACE
extern BOOL invflag;
extern BOOL drawsbarflag;
extern const InvXY InvRect[73];
@ -55,4 +57,6 @@ BOOL DropItemBeforeTrig();
extern int AP2x2Tbl[10];
DEVILUTION_END_NAMESPACE
#endif /* __INV_H__ */

4
Source/itemdat.h

@ -6,9 +6,13 @@
#ifndef __ITEMDAT_H__
#define __ITEMDAT_H__
DEVILUTION_BEGIN_NAMESPACE
extern ItemDataStruct AllItemsList[];
extern const PLStruct PL_Prefix[];
extern const PLStruct PL_Suffix[];
extern const UItemStruct UniqueItemList[];
DEVILUTION_END_NAMESPACE
#endif /* __ITEMDAT_H__ */

4
Source/items.h

@ -6,6 +6,8 @@
#ifndef __ITEMS_H__
#define __ITEMS_H__
DEVILUTION_BEGIN_NAMESPACE
extern int itemactive[MAXITEMS];
extern BOOL uitemflag;
extern int itemavail[MAXITEMS];
@ -140,4 +142,6 @@ extern int ItemInvSnds[];
extern int idoppely;
extern int premiumlvladd[6];
DEVILUTION_END_NAMESPACE
#endif /* __ITEMS_H__ */

4
Source/lighting.h

@ -6,6 +6,8 @@
#ifndef __LIGHTING_H__
#define __LIGHTING_H__
DEVILUTION_BEGIN_NAMESPACE
extern LightListStruct VisionList[MAXVISION];
extern BYTE lightactive[MAXLIGHTS];
extern LightListStruct LightList[MAXLIGHTS];
@ -56,4 +58,6 @@ extern BYTE vCrawlTable[23][30];
extern BYTE byte_49463C[18][18];
extern BYTE RadiusAdj[23];
DEVILUTION_END_NAMESPACE
#endif /* __LIGHTING_H__ */

4
Source/loadsave.h

@ -6,6 +6,8 @@
#ifndef __LOADSAVE_H__
#define __LOADSAVE_H__
DEVILUTION_BEGIN_NAMESPACE
extern BYTE *tbuff;
void LoadGame(BOOL firstflag);
@ -45,4 +47,6 @@ void SavePortal(int i);
void SaveLevel();
void LoadLevel();
DEVILUTION_END_NAMESPACE
#endif /* __LOADSAVE_H__ */

4
Source/mainmenu.h

@ -6,6 +6,8 @@
#ifndef __MAINMENU_H__
#define __MAINMENU_H__
DEVILUTION_BEGIN_NAMESPACE
extern char gszHero[16];
void mainmenu_refresh_music();
@ -31,4 +33,6 @@ void mainmenu_play_intro();
extern int menu_music_track_id;
DEVILUTION_END_NAMESPACE
#endif /* __MAINMENU_H__ */

4
Source/minitext.h

@ -6,6 +6,8 @@
#ifndef __MINITEXT_H__
#define __MINITEXT_H__
DEVILUTION_BEGIN_NAMESPACE
extern int qtexty;
extern char *qtextptr;
extern BOOLEAN qtextflag;
@ -28,4 +30,6 @@ extern const BYTE mfontkern[56];
extern int qscroll_spd_tbl[9];
DEVILUTION_END_NAMESPACE
#endif /* __MINITEXT_H__ */

4
Source/misdat.h

@ -6,7 +6,11 @@
#ifndef __MISDAT_H__
#define __MISDAT_H__
DEVILUTION_BEGIN_NAMESPACE
extern MissileData missiledata[];
extern MisFileData misfiledata[];
DEVILUTION_END_NAMESPACE
#endif /* __MISDAT_H__ */

4
Source/missiles.h

@ -6,6 +6,8 @@
#ifndef __MISSILES_H__
#define __MISSILES_H__
DEVILUTION_BEGIN_NAMESPACE
extern int missileactive[MAXMISSILES];
extern int missileavail[MAXMISSILES];
extern MissileStruct missile[MAXMISSILES];
@ -155,4 +157,6 @@ void ClearMissileSpot(int mi);
extern int XDirAdd[8];
extern int YDirAdd[8];
DEVILUTION_END_NAMESPACE
#endif /* __MISSILES_H__ */

4
Source/monstdat.h

@ -6,9 +6,13 @@
#ifndef __MONSTDAT_H__
#define __MONSTDAT_H__
DEVILUTION_BEGIN_NAMESPACE
extern MonsterData monsterdata[];
extern BYTE MonstConvTbl[];
extern BYTE MonstAvailTbl[];
extern UniqMonstStruct UniqMonst[];
DEVILUTION_END_NAMESPACE
#endif /* __MONSTDAT_H__ */

4
Source/monster.h

@ -6,6 +6,8 @@
#ifndef __MONSTER_H__
#define __MONSTER_H__
DEVILUTION_BEGIN_NAMESPACE
extern int MissileFileFlag;
extern int monstkills[MAXMONSTERS];
extern int monstactive[MAXMONSTERS];
@ -189,4 +191,6 @@ extern int rnd60[4];
extern void (*AiProc[])(int i);
DEVILUTION_END_NAMESPACE
#endif /* __MONSTER_H__ */

4
Source/movie.h

@ -6,6 +6,8 @@
#ifndef __MOVIE_H__
#define __MOVIE_H__
DEVILUTION_BEGIN_NAMESPACE
extern BYTE movie_playing;
extern BOOL loop_movie;
@ -14,4 +16,6 @@ LRESULT MovieWndProc(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
/* rdata */
DEVILUTION_END_NAMESPACE
#endif /* __MOVIE_H__ */

4
Source/mpqapi.h

@ -7,6 +7,9 @@
#define __MPQAPI_H__
#include <stdint.h>
DEVILUTION_BEGIN_NAMESPACE
extern BYTE mpq_buf[4096];
extern BOOL save_archive_modified;
extern BOOLEAN save_archive_open;
@ -28,5 +31,6 @@ BOOL mpqapi_flush_and_close(const char *pszArchive, BOOL bFree, DWORD dwChar);
/* rdata */
/* data */
DEVILUTION_END_NAMESPACE
#endif /* __MPQAPI_H__ */

4
Source/msg.h

@ -6,6 +6,8 @@
#ifndef __MSG_H__
#define __MSG_H__
DEVILUTION_BEGIN_NAMESPACE
extern BOOL deltaload;
extern BYTE gbBufferMsgs;
extern int dwRecCount;
@ -146,4 +148,6 @@ DWORD On_NOVA(TCmd *pCmd, int pnum);
DWORD On_SETSHIELD(TCmd *pCmd, int pnum);
DWORD On_REMSHIELD(TCmd *pCmd, int pnum);
DEVILUTION_END_NAMESPACE
#endif /* __MSG_H__ */

4
Source/multi.h

@ -6,6 +6,8 @@
#ifndef __MULTI_H__
#define __MULTI_H__
DEVILUTION_BEGIN_NAMESPACE
extern BOOLEAN gbSomebodyWonGameKludge;
extern char szPlayerDescript[128];
extern WORD sgwPackPlrOffsetTbl[MAX_PLRS];
@ -60,4 +62,6 @@ void recv_plrinfo(int pnum, TCmdPlrInfoHdr *p, BOOL recv);
extern const int event_types[3];
DEVILUTION_END_NAMESPACE
#endif /* __MULTI_H__ */

3
Source/nthread.h

@ -6,6 +6,8 @@
#ifndef __NTHREAD_H__
#define __NTHREAD_H__
DEVILUTION_BEGIN_NAMESPACE
extern BYTE sgbNetUpdateRate;
extern DWORD gdwMsgLenTbl[MAX_PLRS];
extern DWORD gdwDeltaBytesSec;
@ -30,5 +32,6 @@ void nthread_ignore_mutex(BOOL bStart);
BOOL nthread_has_500ms_passed(BOOL unused);
/* rdata */
DEVILUTION_END_NAMESPACE
#endif /* __NTHREAD_H__ */

4
Source/objdat.h

@ -2,8 +2,12 @@
#ifndef __OBJDAT_H__
#define __OBJDAT_H__
DEVILUTION_BEGIN_NAMESPACE
extern int ObjTypeConv[];
extern ObjDataStruct AllObjects[99];
extern char *ObjMasterLoadList[56];
DEVILUTION_END_NAMESPACE
#endif /* __OBJDAT_H__ */

4
Source/objects.h

@ -2,6 +2,8 @@
#ifndef __OBJECTS_H__
#define __OBJECTS_H__
DEVILUTION_BEGIN_NAMESPACE
extern int trapid;
extern int trapdir;
extern BYTE *pObjCels[40];
@ -163,4 +165,6 @@ extern BYTE shrineavail[NUM_SHRINETYPE];
extern char *StoryBookName[9];
extern int StoryText[3][3];
DEVILUTION_END_NAMESPACE
#endif /* __OBJECTS_H__ */

3
Source/pack.h

@ -2,10 +2,13 @@
#ifndef __PACK_H__
#define __PACK_H__
DEVILUTION_BEGIN_NAMESPACE
void PackPlayer(PkPlayerStruct *pPack, int pnum, BOOL manashield);
void VerifyGoldSeeds(PlayerStruct *pPlayer);
void UnPackPlayer(PkPlayerStruct *pPack, int pnum, BOOL killok);
/* rdata */
DEVILUTION_END_NAMESPACE
#endif /* __PACK_H__ */

4
Source/palette.h

@ -2,6 +2,8 @@
#ifndef __PALETTE_H__
#define __PALETTE_H__
DEVILUTION_BEGIN_NAMESPACE
extern SDL_Color logical_palette[256];
extern SDL_Color system_palette[256];
extern SDL_Color orig_palette[256];
@ -32,4 +34,6 @@ BOOL palette_set_color_cycling(BOOL enabled);
extern int gamma_correction;
extern BOOL color_cycling_enabled;
DEVILUTION_END_NAMESPACE
#endif /* __PALETTE_H__ */

4
Source/path.h

@ -6,6 +6,8 @@
#ifndef __PATH_H__
#define __PATH_H__
DEVILUTION_BEGIN_NAMESPACE
extern PATHNODE path_nodes[MAXPATHNODES];
extern int gdwCurPathStep;
extern int gdwCurNodes;
@ -38,4 +40,6 @@ extern const char pathydir[8];
/* data */
extern char path_directions[9];
DEVILUTION_END_NAMESPACE
#endif /* __PATH_H__ */

3
Source/pfile.h

@ -2,6 +2,8 @@
#ifndef __PFILE_H__
#define __PFILE_H__
DEVILUTION_BEGIN_NAMESPACE
extern BOOL gbValidSaveFile;
void pfile_init_save_directory();
@ -42,5 +44,6 @@ BYTE *pfile_read(const char *pszName, DWORD *pdwLen);
void pfile_update(BOOL force_save);
/* rdata */
DEVILUTION_END_NAMESPACE
#endif /* __PFILE_H__ */

4
Source/player.h

@ -2,6 +2,8 @@
#ifndef __PLAYER_H__
#define __PLAYER_H__
DEVILUTION_BEGIN_NAMESPACE
extern int plr_lframe_size;
extern int plr_wframe_size;
extern BYTE plr_gfx_flag;
@ -135,4 +137,6 @@ extern int ExpLvlsTbl[MAXCHARLEVEL];
extern char *ClassStrTbl[];
extern BYTE fix[9];
DEVILUTION_END_NAMESPACE
#endif /* __PLAYER_H__ */

4
Source/plrmsg.h

@ -2,6 +2,8 @@
#ifndef __PLRMSG_H__
#define __PLRMSG_H__
DEVILUTION_BEGIN_NAMESPACE
extern _plrmsg plr_msgs[PMSG_COUNT];
void plrmsg_delay(BOOL delay);
@ -17,4 +19,6 @@ void PrintPlrMsg(DWORD x, DWORD y, DWORD width, const char *str, BYTE col);
extern const char text_color_from_player_num[MAX_PLRS + 1];
DEVILUTION_END_NAMESPACE
#endif /* __PLRMSG_H__ */

4
Source/portal.h

@ -2,6 +2,8 @@
#ifndef __PORTAL_H__
#define __PORTAL_H__
DEVILUTION_BEGIN_NAMESPACE
extern PortalStruct portal[MAXPORTAL];
extern int portalindex;
@ -23,4 +25,6 @@ BOOL PosOkPortal(int lvl, int x, int y);
extern int WarpDropX[MAXPORTAL];
extern int WarpDropY[MAXPORTAL];
DEVILUTION_END_NAMESPACE
#endif /* __PORTAL_H__ */

4
Source/quests.h

@ -2,6 +2,8 @@
#ifndef __QUESTS_H__
#define __QUESTS_H__
DEVILUTION_BEGIN_NAMESPACE
extern int qtopline;
extern BOOL questlog;
extern BYTE *pQLogCel;
@ -52,4 +54,6 @@ extern int QuestGroup2[3];
extern int QuestGroup3[3];
extern int QuestGroup4[2];
DEVILUTION_END_NAMESPACE
#endif /* __QUESTS_H__ */

4
Source/render.h

@ -1,8 +1,12 @@
#ifndef __RENDER_H__
#define __RENDER_H__
DEVILUTION_BEGIN_NAMESPACE
void RenderTile(BYTE *pBuff);
void world_draw_black_tile(int sx, int sy);
void trans_rect(int sx, int sy, int width, int height);
DEVILUTION_END_NAMESPACE
#endif /* __RENDER_H__ */

4
Source/restrict.h

@ -2,6 +2,10 @@
#ifndef __RESTRICT_H__
#define __RESTRICT_H__
DEVILUTION_BEGIN_NAMESPACE
void ReadOnlyTest();
DEVILUTION_END_NAMESPACE
#endif /* __RESTRICT_H__ */

4
Source/scrollrt.h

@ -2,6 +2,8 @@
#ifndef __SCROLLRT_H__
#define __SCROLLRT_H__
DEVILUTION_BEGIN_NAMESPACE
extern bool sgbControllerActive;
extern int light_table_index;
extern BYTE *gpBufStart;
@ -33,4 +35,6 @@ void DrawAndBlit();
extern char *szMonModeAssert[18];
extern char *szPlrModeAssert[12];
DEVILUTION_END_NAMESPACE
#endif /* __SCROLLRT_H__ */

4
Source/setmaps.h

@ -2,6 +2,8 @@
#ifndef __SETMAPS_H__
#define __SETMAPS_H__
DEVILUTION_BEGIN_NAMESPACE
int ObjIndex(int x, int y);
void AddSKingObjs();
void AddSChamObjs();
@ -19,4 +21,6 @@ extern BYTE SkelChamTrans2[8];
extern BYTE SkelChamTrans3[36];
extern char *quest_level_names[];
DEVILUTION_END_NAMESPACE
#endif /* __SETMAPS_H__ */

4
Source/sha.h

@ -2,6 +2,8 @@
#ifndef __SHA_H__
#define __SHA_H__
DEVILUTION_BEGIN_NAMESPACE
#define SHA1HashSize 20
//sha
@ -14,4 +16,6 @@ void SHA1ProcessMessageBlock(SHA1Context *context);
void SHA1Reset(int n);
void SHA1Init(SHA1Context *context);
DEVILUTION_END_NAMESPACE
#endif /* __SHA_H__ */

4
Source/sound.h

@ -2,6 +2,8 @@
#ifndef __SOUND_H__
#define __SOUND_H__
DEVILUTION_BEGIN_NAMESPACE
extern SoundSample *DSBs[8];
extern BOOLEAN gbSndInited;
extern HMODULE hDsound_dll;
@ -35,4 +37,6 @@ extern BOOLEAN gbSoundOn;
extern BOOLEAN gbDupSounds;
extern char unk_volume[4][2];
DEVILUTION_END_NAMESPACE
#endif /* __SOUND_H__ */

4
Source/spelldat.h

@ -2,6 +2,10 @@
#ifndef __SPELLDAT_H__
#define __SPELLDAT_H__
DEVILUTION_BEGIN_NAMESPACE
extern SpellData spelldata[];
DEVILUTION_END_NAMESPACE
#endif /* __SPELLDAT_H__ */

4
Source/spells.h

@ -2,6 +2,8 @@
#ifndef __SPELLS_H__
#define __SPELLS_H__
DEVILUTION_BEGIN_NAMESPACE
int GetManaAmount(int id, int sn);
void UseMana(int id, int sn);
BOOL CheckSpell(int id, int sn, char st, BOOL manaonly);
@ -9,4 +11,6 @@ void CastSpell(int id, int spl, int sx, int sy, int dx, int dy, int caster, int
void DoResurrect(int pnum, int rid);
void DoHealOther(int pnum, int rid);
DEVILUTION_END_NAMESPACE
#endif /* __SPELLS_H__ */

3
Source/stores.h

@ -2,6 +2,8 @@
#ifndef __STORES_H__
#define __STORES_H__
DEVILUTION_BEGIN_NAMESPACE
extern int stextup;
extern int storenumh;
extern int stextlhold;
@ -136,5 +138,6 @@ void ReleaseStoreBtn();
/* rdata */
extern char *talkname[9];
DEVILUTION_END_NAMESPACE
#endif /* __STORES_H__ */

4
Source/sync.h

@ -2,6 +2,8 @@
#ifndef __SYNC_H__
#define __SYNC_H__
DEVILUTION_BEGIN_NAMESPACE
extern WORD sync_word_6AA708[MAXMONSTERS];
extern int sgnMonsters;
extern WORD sgwLRU[MAXMONSTERS];
@ -17,4 +19,6 @@ DWORD sync_update(int pnum, const BYTE *pbBuf);
void sync_monster(int pnum, const TSyncMonster *p);
void sync_init();
DEVILUTION_END_NAMESPACE
#endif /* __SYNC_H__ */

3
Source/textdat.h

@ -2,7 +2,10 @@
#ifndef __TEXTDAT_H__
#define __TEXTDAT_H__
DEVILUTION_BEGIN_NAMESPACE
extern const TextDataStruct alltext[];
extern const DWORD gdwAllTextEntries;
DEVILUTION_END_NAMESPACE
#endif /* __TEXTDAT_H__ */

3
Source/themes.h

@ -6,6 +6,8 @@
#ifndef __THEMES_H__
#define __THEMES_H__
DEVILUTION_BEGIN_NAMESPACE
extern int numthemes;
extern BOOL armorFlag;
extern BOOL ThemeGoodIn[4];
@ -63,4 +65,5 @@ extern int trm5y[25];
extern int trm3x[9];
extern int trm3y[9];
DEVILUTION_END_NAMESPACE
#endif /* __THEMES_H__ */

3
Source/tmsg.h

@ -2,9 +2,12 @@
#ifndef __TMSG_H__
#define __TMSG_H__
DEVILUTION_BEGIN_NAMESPACE
int tmsg_get(BYTE *pbMsg, DWORD dwMaxLen);
void tmsg_add(BYTE *pbMsg, BYTE bLen);
void tmsg_start();
void tmsg_cleanup();
DEVILUTION_END_NAMESPACE
#endif /* __TMSG_H__ */

3
Source/town.h

@ -2,10 +2,13 @@
#ifndef __TOWN_H__
#define __TOWN_H__
DEVILUTION_BEGIN_NAMESPACE
void SetTownMicros();
void T_FillSector(BYTE *P3Tiles, BYTE *pSector, int xi, int yi, int w, int h);
void T_FillTile(BYTE *P3Tiles, int xx, int yy, int t);
void T_Pass3();
void CreateTown(int entry);
DEVILUTION_END_NAMESPACE
#endif /* __TOWN_H__ */

3
Source/towners.h

@ -2,6 +2,8 @@
#ifndef __TOWNERS_H__
#define __TOWNERS_H__
DEVILUTION_BEGIN_NAMESPACE
extern TownerStruct towner[16];
int GetActiveTowner(int t);
@ -41,5 +43,6 @@ void CowSFX(int pnum);
/* data */
extern QuestTalkData Qtalklist[];
DEVILUTION_END_NAMESPACE
#endif /* __TOWNERS_H__ */

4
Source/track.h

@ -2,8 +2,12 @@
#ifndef __TRACK_H__
#define __TRACK_H__
DEVILUTION_BEGIN_NAMESPACE
void track_process();
void track_repeat_walk(BOOL rep);
BOOL track_isscrolling();
DEVILUTION_END_NAMESPACE
#endif /* __TRACK_H__ */

3
Source/trigs.h

@ -2,6 +2,8 @@
#ifndef __TRIGS_H__
#define __TRIGS_H__
DEVILUTION_BEGIN_NAMESPACE
extern BOOL townwarps[3];
extern BOOL trigflag;
extern int numtrigs;
@ -47,4 +49,5 @@ extern int L4DownList[6];
extern int L4TWarpUpList[4];
extern int L4PentaList[33];
DEVILUTION_END_NAMESPACE
#endif /* __TRIGS_H__ */

4
Source/wave.h

@ -2,6 +2,8 @@
#ifndef __WAVE_H__
#define __WAVE_H__
DEVILUTION_BEGIN_NAMESPACE
void WCloseFile(HANDLE file);
LONG WGetFileSize(HANDLE hsFile, DWORD *lpFileSizeHigh, const char *FileName);
void WGetFileArchive(HANDLE hsFile, DWORD *retry, const char *FileName);
@ -9,4 +11,6 @@ BOOL WOpenFile(const char *FileName, HANDLE *phsFile, BOOL mayNotExist);
void WReadFile(HANDLE hsFile, LPVOID buf, DWORD to_read, const char *FileName);
int WSetFilePointer(HANDLE file1, int offset, HANDLE file2, int whence);
DEVILUTION_END_NAMESPACE
#endif /* __WAVE_H__ */

4
enums.h

@ -4,6 +4,8 @@
* Various global enumerators.
*/
DEVILUTION_BEGIN_NAMESPACE
typedef enum item_quality {
ITEM_QUALITY_NORMAL = 0,
ITEM_QUALITY_MAGIC = 1,
@ -2940,3 +2942,5 @@ typedef enum conn_type {
#endif
SELCONN_LOOPBACK,
} conn_type;
DEVILUTION_END_NAMESPACE

4
structs.h

@ -4,6 +4,8 @@
* Various global structures.
*/
DEVILUTION_BEGIN_NAMESPACE
//////////////////////////////////////////////////
// control
//////////////////////////////////////////////////
@ -1585,3 +1587,5 @@ typedef struct TDataInfo {
DWORD destOffset;
DWORD size;
} TDataInfo;
DEVILUTION_END_NAMESPACE

2
types.h

@ -14,8 +14,6 @@
#include "thread.h"
#include "ui_fwd.h"
DEVILUTION_BEGIN_NAMESPACE
#include <limits.h>
#include "defs.h"
#include "enums.h"

Loading…
Cancel
Save