From c384711a5f5e461cbfa36178d4779fb5e5ede567 Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Wed, 8 Apr 2020 20:16:32 +0200 Subject: [PATCH 01/15] Backport cleanups from hellfire branch --- Source/appfat.cpp | 2 +- Source/control.cpp | 12 +++-- Source/cursor.cpp | 14 ++--- Source/cursor.h | 8 +-- Source/diablo.cpp | 35 ++++++------ Source/diablo.h | 2 +- Source/drlg_l2.cpp | 2 +- Source/drlg_l2.h | 2 +- Source/drlg_l4.cpp | 6 +-- Source/drlg_l4.h | 6 +-- Source/effects.cpp | 7 +-- Source/error.cpp | 4 +- Source/error.h | 2 +- Source/gamemenu.cpp | 23 +++----- Source/gendung.cpp | 110 +++++++++++++++++++------------------- Source/gendung.h | 96 +++++++++++++++++---------------- Source/inv.cpp | 5 +- Source/itemdat.cpp | 2 +- Source/items.cpp | 28 +++++----- Source/items.h | 10 ++-- Source/lighting.cpp | 3 +- Source/monster.cpp | 80 ++++++++++++++-------------- Source/monster.h | 1 + Source/mpqapi.cpp | 8 +-- Source/multi.cpp | 2 +- Source/objects.cpp | 126 +++++++++++++++++++++----------------------- Source/palette.cpp | 8 +-- Source/player.cpp | 82 +++++++++++++++------------- Source/quests.cpp | 2 +- Source/quests.h | 2 +- Source/scrollrt.cpp | 2 - Source/sound.cpp | 4 +- Source/textdat.cpp | 2 +- Source/textdat.h | 2 +- Source/towners.cpp | 62 ++++++++++++---------- Source/towners.h | 2 +- defs.h | 2 + enums.h | 5 +- 38 files changed, 388 insertions(+), 383 deletions(-) diff --git a/Source/appfat.cpp b/Source/appfat.cpp index d6ccf73d7..f18c51742 100644 --- a/Source/appfat.cpp +++ b/Source/appfat.cpp @@ -523,7 +523,7 @@ void __cdecl DrawDlg(char *pszFmt, ...) va_start(arglist, pszFmt); wvsprintf(text, pszFmt, arglist); va_end(arglist); - SDrawMessageBox(text, "Diablo", MB_TASKMODAL | MB_ICONEXCLAMATION); + SDrawMessageBox(text, APP_NAME, MB_TASKMODAL | MB_ICONEXCLAMATION); } #ifdef _DEBUG diff --git a/Source/control.cpp b/Source/control.cpp index de19d6716..016b40f4a 100644 --- a/Source/control.cpp +++ b/Source/control.cpp @@ -1136,9 +1136,12 @@ void DrawFlask(BYTE *pCelBuff, int w, int nSrcOff, BYTE *pBuff, int nDstOff, int */ void DrawLifeFlask() { - int filled = (double)plr[myplr]._pHitPoints / (double)plr[myplr]._pMaxHP * 80.0; - plr[myplr]._pHPPer = filled; + double p; + int filled; + p = (double)plr[myplr]._pHitPoints / (double)plr[myplr]._pMaxHP * 80.0; + plr[myplr]._pHPPer = p; + filled = plr[myplr]._pHPPer; if (filled > 80) filled = 80; filled = 80 - filled; @@ -1158,7 +1161,10 @@ void DrawLifeFlask() */ void UpdateLifeFlask() { - int filled = (double)plr[myplr]._pHitPoints / (double)plr[myplr]._pMaxHP * 80.0; + double p; + int filled; + p = (double)plr[myplr]._pHitPoints / (double)plr[myplr]._pMaxHP * 80.0; + filled = p; plr[myplr]._pHPPer = filled; if (filled > 69) diff --git a/Source/cursor.cpp b/Source/cursor.cpp index 66c70a3bf..577b08d7b 100644 --- a/Source/cursor.cpp +++ b/Source/cursor.cpp @@ -5,17 +5,17 @@ */ #include "all.h" -int cursH; -int icursH28; int cursW; +int cursH; int pcursmonst; int icursW28; +int icursH28; BYTE *pCursCels; -int icursH; /** inv_item value */ char pcursinvitem; int icursW; +int icursH; char pcursitem; char pcursobj; char pcursplr; @@ -26,7 +26,7 @@ int pcurs; /* rdata */ /** Maps from objcurs.cel frame number to frame width. */ -const int InvItemWidth[180] = { +const int InvItemWidth[] = { // Cursors 0, 33, 32, 32, 32, 32, 32, 32, 32, 32, 32, 23, // Items @@ -46,11 +46,11 @@ const int InvItemWidth[180] = { 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, - 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28 + 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, }; /** Maps from objcurs.cel frame number to frame height. */ -const int InvItemHeight[180] = { +const int InvItemHeight[] = { // Cursors 0, 29, 32, 32, 32, 32, 32, 32, 32, 32, 32, 35, // Items @@ -70,7 +70,7 @@ const int InvItemHeight[180] = { 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, - 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28 + 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, }; void InitCursor() diff --git a/Source/cursor.h b/Source/cursor.h index 42b1df215..42da1ff94 100644 --- a/Source/cursor.h +++ b/Source/cursor.h @@ -6,11 +6,11 @@ #ifndef __CURSOR_H__ #define __CURSOR_H__ -extern int cursH; -extern int icursH28; extern int cursW; +extern int cursH; extern int pcursmonst; extern int icursW28; +extern int icursH28; extern BYTE *pCursCels; extern int icursH; extern char pcursinvitem; @@ -34,7 +34,7 @@ void CheckRportal(); void CheckCursMove(); /* rdata */ -extern const int InvItemWidth[180]; -extern const int InvItemHeight[180]; +extern const int InvItemWidth[]; +extern const int InvItemHeight[]; #endif /* __CURSOR_H__ */ diff --git a/Source/diablo.cpp b/Source/diablo.cpp index 4212497d4..405142fb3 100644 --- a/Source/diablo.cpp +++ b/Source/diablo.cpp @@ -11,8 +11,8 @@ HWND ghMainWnd; int glMid1Seed[NUMLEVELS]; int glMid2Seed[NUMLEVELS]; int gnLevelTypeTbl[NUMLEVELS]; -int MouseY; int MouseX; +int MouseY; BOOL gbGameLoopStartup; DWORD glSeedTbl[NUMLEVELS]; BOOL gbRunGame; @@ -119,11 +119,11 @@ BOOL StartGame(BOOL bNewGame, BOOL bSinglePlayer) InitPortals(); InitDungMsgs(myplr); } - if (!gbValidSaveFile || !gbLoadGame) + if (!gbValidSaveFile || !gbLoadGame) { uMsg = WM_DIABNEWGAME; - else + } else { uMsg = WM_DIABLOADGAME; - + } run_game_loop(uMsg); NetClose(); pfile_create_player_description(0, 0); @@ -284,7 +284,9 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi fault_get_filter(); bNoEvent = diablo_get_not_running(); - if (!diablo_find_window("DIABLO") && bNoEvent) { + if (diablo_find_window(GAME_NAME) || !bNoEvent) + return 0; + #ifdef _DEBUG SFileEnableDirectAccess(TRUE); #endif @@ -305,11 +307,11 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi #ifndef SPAWN { char szValueName[] = "Intro"; - if (!SRegLoadValue("Diablo", szValueName, 0, &nData)) + if (!SRegLoadValue(APP_NAME, szValueName, 0, &nData)) nData = 1; if (nData) play_movie("gendata\\diablo1.smk", TRUE); - SRegSaveValue("Diablo", szValueName, 0, 0); + SRegSaveValue(APP_NAME, szValueName, 0, 0); } #endif @@ -330,9 +332,8 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi Sleep(300); DestroyWindow(ghMainWnd); } - } - return FALSE; + return 0; } void diablo_parse_flags(char *args) @@ -349,13 +350,18 @@ void diablo_parse_flags(char *args) if (_strnicmp("dd_emulate", args, strlen("dd_emulate")) == 0) { gbEmulate = 1; args += strlen("dd_emulate"); - } else if (_strnicmp("dd_backbuf", args, strlen("dd_backbuf")) == 0) { + continue; + } + if (_strnicmp("dd_backbuf", args, strlen("dd_backbuf")) == 0) { gbBackBuf = 1; args += strlen("dd_backbuf"); - } else if (_strnicmp("ds_noduplicates", args, strlen("ds_noduplicates")) == 0) { + continue; + } + if (_strnicmp("ds_noduplicates", args, strlen("ds_noduplicates")) == 0) { gbDupSounds = FALSE; args += strlen("ds_noduplicates"); - } else { + continue; + } c = tolower(*args); args++; #ifdef _DEBUG @@ -483,7 +489,6 @@ void diablo_parse_flags(char *args) #endif } } -} void diablo_init_screen() { @@ -1921,7 +1926,8 @@ void diablo_color_cyc_logic() tc = GetTickCount(); if (tc - color_cycle_timer >= 50) { color_cycle_timer = tc; - if (palette_get_color_cycling()) { + if (!palette_get_color_cycling()) + return; if (leveltype == DTYPE_HELL) { lighting_color_cycling(); } else if (leveltype == DTYPE_CAVES) { @@ -1930,4 +1936,3 @@ void diablo_color_cyc_logic() } } } -} diff --git a/Source/diablo.h b/Source/diablo.h index 1e3f50020..10197bd18 100644 --- a/Source/diablo.h +++ b/Source/diablo.h @@ -10,8 +10,8 @@ extern HWND ghMainWnd; extern int glMid1Seed[NUMLEVELS]; extern int glMid2Seed[NUMLEVELS]; extern int gnLevelTypeTbl[NUMLEVELS]; -extern int MouseY; extern int MouseX; +extern int MouseY; extern BOOL gbGameLoopStartup; extern DWORD glSeedTbl[NUMLEVELS]; extern BOOL gbRunGame; diff --git a/Source/drlg_l2.cpp b/Source/drlg_l2.cpp index 6ca206290..17608cba6 100644 --- a/Source/drlg_l2.cpp +++ b/Source/drlg_l2.cpp @@ -7,8 +7,8 @@ #include "all.h" int nSx1; -int nSx2; int nSy1; +int nSx2; int nSy2; int nRoomCnt; BYTE predungeon[DMAXX][DMAXY]; diff --git a/Source/drlg_l2.h b/Source/drlg_l2.h index 8b9e86906..c0a7a0184 100644 --- a/Source/drlg_l2.h +++ b/Source/drlg_l2.h @@ -7,8 +7,8 @@ #define __DRLG_L2_H__ extern int nSx1; -extern int nSx2; extern int nSy1; +extern int nSx2; extern int nSy2; extern int nRoomCnt; extern BYTE predungeon[DMAXX][DMAXY]; diff --git a/Source/drlg_l4.cpp b/Source/drlg_l4.cpp index 8a0f6a5ff..0be518c0b 100644 --- a/Source/drlg_l4.cpp +++ b/Source/drlg_l4.cpp @@ -7,10 +7,10 @@ int diabquad1x; int diabquad1y; -int diabquad3x; -int diabquad3y; int diabquad2x; int diabquad2y; +int diabquad3x; +int diabquad3y; int diabquad4x; int diabquad4y; #ifndef SPAWN @@ -18,8 +18,8 @@ BOOL hallok[20]; int l4holdx; int l4holdy; int SP4x1; -int SP4x2; int SP4y1; +int SP4x2; int SP4y2; BYTE L4dungeon[80][80]; BYTE dung[20][20]; diff --git a/Source/drlg_l4.h b/Source/drlg_l4.h index cf64e9176..b2e52c776 100644 --- a/Source/drlg_l4.h +++ b/Source/drlg_l4.h @@ -8,18 +8,18 @@ extern int diabquad1x; extern int diabquad1y; -extern int diabquad3x; -extern int diabquad3y; extern int diabquad2x; extern int diabquad2y; +extern int diabquad3x; +extern int diabquad3y; extern int diabquad4x; extern int diabquad4y; extern BOOL hallok[20]; extern int l4holdx; extern int l4holdy; extern int SP4x1; -extern int SP4x2; extern int SP4y1; +extern int SP4x2; extern int SP4y2; extern BYTE L4dungeon[80][80]; extern BYTE dung[20][20]; diff --git a/Source/effects.cpp b/Source/effects.cpp index 68bb52a29..c75005dca 100644 --- a/Source/effects.cpp +++ b/Source/effects.cpp @@ -914,6 +914,7 @@ TSFX sgSFX[] = { // clang-format on }; +#define PLRSFXS (SFX_WARRIOR | SFX_ROGUE | SFX_SORCEROR) BOOL effect_is_playing(int nSFX) { TSFX *sfx = &sgSFX[nSFX]; @@ -1224,7 +1225,7 @@ void sound_init() { BYTE mask = 0; if (gbMaxPlayers > 1) { - mask = SFX_WARRIOR | SFX_ROGUE | SFX_SORCEROR; + mask = PLRSFXS; } else if (plr[myplr]._pClass == PC_WARRIOR) { mask = SFX_WARRIOR; } else if (plr[myplr]._pClass == PC_ROGUE) { @@ -1247,7 +1248,7 @@ void priv_sound_init(BYTE bLoadMask) return; } - pc = bLoadMask & (SFX_ROGUE | SFX_WARRIOR | SFX_SORCEROR); + pc = bLoadMask & PLRSFXS; bLoadMask ^= pc; for (i = 0; i < sizeof(sgSFX) / sizeof(TSFX); i++) { @@ -1263,7 +1264,7 @@ void priv_sound_init(BYTE bLoadMask) continue; } - if (sgSFX[i].bFlags & (SFX_ROGUE | SFX_WARRIOR | SFX_SORCEROR) && !(sgSFX[i].bFlags & pc)) { + if (sgSFX[i].bFlags & PLRSFXS && !(sgSFX[i].bFlags & pc)) { continue; } diff --git a/Source/error.cpp b/Source/error.cpp index 2df97ac30..5d09863d6 100644 --- a/Source/error.cpp +++ b/Source/error.cpp @@ -11,7 +11,7 @@ char msgflag; char msgcnt; /** Maps from error_id to error message. */ -char *MsgStrings[44] = { +char *MsgStrings[] = { "", "No automap available in town", "No multiplayer functions in demo", @@ -55,7 +55,7 @@ char *MsgStrings[44] = { "You must be at least level 8 to use this.", "You must be at least level 13 to use this.", "You must be at least level 17 to use this.", - "Arcane knowledge gained!" + "Arcane knowledge gained!", }; void InitDiabloMsg(char e) diff --git a/Source/error.h b/Source/error.h index 046307b88..770506b18 100644 --- a/Source/error.h +++ b/Source/error.h @@ -16,6 +16,6 @@ void ClrDiabloMsg(); void DrawDiabloMsg(); /* data */ -extern char *MsgStrings[44]; +extern char *MsgStrings[]; #endif /* __ERROR_H__ */ diff --git a/Source/gamemenu.cpp b/Source/gamemenu.cpp index b761e8d49..bc1e6bdea 100644 --- a/Source/gamemenu.cpp +++ b/Source/gamemenu.cpp @@ -217,42 +217,31 @@ void gamemenu_get_gamma() void gamemenu_music_volume(BOOL bActivate) { int volume; + if (bActivate) { if (gbMusicOn) { gbMusicOn = FALSE; music_stop(); sound_get_or_set_music_volume(VOLUME_MIN); - gamemenu_get_music(); - return; - } + } else { gbMusicOn = TRUE; sound_get_or_set_music_volume(VOLUME_MAX); music_start(leveltype); - gamemenu_get_music(); - return; } - + } else { volume = gamemenu_slider_music_sound(sgOptionsMenu); sound_get_or_set_music_volume(volume); if (volume == VOLUME_MIN) { - if (gbMusicOn) { gbMusicOn = FALSE; music_stop(); } - - gamemenu_get_music(); - return; - } - - if (gbMusicOn) { - gamemenu_get_music(); - return; - } - + } else if (!gbMusicOn) { gbMusicOn = TRUE; music_start(leveltype); + } + } gamemenu_get_music(); } diff --git a/Source/gendung.cpp b/Source/gendung.cpp index 3133dc170..964994c3e 100644 --- a/Source/gendung.cpp +++ b/Source/gendung.cpp @@ -5,87 +5,85 @@ */ #include "all.h" -WORD level_frame_types[MAXTILES]; -int themeCount; -/** - * List of transparent dPieces - */ -BOOLEAN nTransTable[2049]; -//int dword_52D204; -int dMonster[MAXDUNX][MAXDUNY]; BYTE dungeon[DMAXX][DMAXY]; -char dObject[MAXDUNX][MAXDUNY]; -BYTE *pSpeedCels; -int nlevel_frames; BYTE pdungeon[DMAXX][DMAXY]; -char dDead[MAXDUNX][MAXDUNY]; -MICROS dpiece_defs_map_1[MAXDUNX * MAXDUNY]; -char dPreLight[MAXDUNX][MAXDUNY]; -char TransVal; -int MicroTileLen; char dflags[DMAXX][DMAXY]; -int dPiece[MAXDUNX][MAXDUNY]; -char dLight[MAXDUNX][MAXDUNY]; +int setpc_x; +int setpc_y; +int setpc_w; +int setpc_h; +BYTE *pSetPiece; BOOL setloadflag; -int tile_defs[MAXTILES]; +BYTE *pSpecialCels; BYTE *pMegaTiles; BYTE *pLevelPieces; -int gnDifficulty; +BYTE *pDungeonCels; +BYTE *pSpeedCels; +int SpeedFrameTbl[128][16]; /** * List of transparancy masks to use for dPieces */ char block_lvid[2049]; -//char byte_5B78EB; -char dTransVal[MAXDUNX][MAXDUNY]; -BOOLEAN nTrapTable[2049]; -BYTE leveltype; -BYTE currlevel; -BOOLEAN TransList[256]; +int level_frame_count[MAXTILES]; +int tile_defs[MAXTILES]; +WORD level_frame_types[MAXTILES]; +int level_frame_sizes[MAXTILES]; +int nlevel_frames; +/** + * List of light blocking dPieces + */ +BOOLEAN nBlockTable[2049]; /** * List of path blocking dPieces */ BOOLEAN nSolidTable[2049]; -int level_frame_count[MAXTILES]; -ScrollStruct ScrollInfo; -BYTE *pDungeonCels; -int SpeedFrameTbl[128][16]; -THEME_LOC themeLoc[MAXTHEMES]; -char dPlayer[MAXDUNX][MAXDUNY]; -int ViewBX; -int ViewBY; -int ViewDX; -int ViewDY; -char dSpecial[MAXDUNX][MAXDUNY]; /** - * List of light blocking dPieces + * List of transparent dPieces */ -BOOLEAN nBlockTable[2049]; -BYTE *pSpecialCels; -char dFlags[MAXDUNX][MAXDUNY]; -char dItem[MAXDUNX][MAXDUNY]; -BYTE setlvlnum; -int level_frame_sizes[MAXTILES]; +BOOLEAN nTransTable[2049]; /** * List of missile blocking dPieces */ BOOLEAN nMissileTable[2049]; -BYTE *pSetPiece; -char setlvltype; -BOOLEAN setlevel; -int LvlViewY; -int LvlViewX; +BOOLEAN nTrapTable[2049]; +int dminx; +int dminy; int dmaxx; int dmaxy; -int setpc_h; -int setpc_w; -int setpc_x; +int gnDifficulty; +BYTE leveltype; +BYTE currlevel; +BOOLEAN setlevel; +BYTE setlvlnum; +char setlvltype; int ViewX; int ViewY; -int setpc_y; -char dMissile[MAXDUNX][MAXDUNY]; -int dminx; -int dminy; +int ViewBX; +int ViewBY; +int ViewDX; +int ViewDY; +ScrollStruct ScrollInfo; +int LvlViewX; +int LvlViewY; +int MicroTileLen; +char TransVal; +BOOLEAN TransList[256]; +int dPiece[MAXDUNX][MAXDUNY]; MICROS dpiece_defs_map_2[MAXDUNX][MAXDUNY]; +MICROS dpiece_defs_map_1[MAXDUNX * MAXDUNY]; +char dTransVal[MAXDUNX][MAXDUNY]; +char dLight[MAXDUNX][MAXDUNY]; +char dPreLight[MAXDUNX][MAXDUNY]; +char dFlags[MAXDUNX][MAXDUNY]; +char dPlayer[MAXDUNX][MAXDUNY]; +int dMonster[MAXDUNX][MAXDUNY]; +char dDead[MAXDUNX][MAXDUNY]; +char dObject[MAXDUNX][MAXDUNY]; +char dItem[MAXDUNX][MAXDUNY]; +char dMissile[MAXDUNX][MAXDUNY]; +char dSpecial[MAXDUNX][MAXDUNY]; +int themeCount; +THEME_LOC themeLoc[MAXTHEMES]; void FillSolidBlockTbls() { diff --git a/Source/gendung.h b/Source/gendung.h index 3de618721..3a34834b2 100644 --- a/Source/gendung.h +++ b/Source/gendung.h @@ -6,72 +6,70 @@ #ifndef __GENDUNG_H__ #define __GENDUNG_H__ -extern WORD level_frame_types[MAXTILES]; -extern int themeCount; -extern BOOLEAN nTransTable[2049]; -//int dword_52D204; -extern int dMonster[MAXDUNX][MAXDUNY]; extern BYTE dungeon[DMAXX][DMAXY]; -extern char dObject[MAXDUNX][MAXDUNY]; -extern BYTE *pSpeedCels; -extern int nlevel_frames; extern BYTE pdungeon[DMAXX][DMAXY]; -extern char dDead[MAXDUNX][MAXDUNY]; -extern MICROS dpiece_defs_map_1[MAXDUNX * MAXDUNY]; -extern char dPreLight[MAXDUNX][MAXDUNY]; -extern char TransVal; -extern int MicroTileLen; extern char dflags[DMAXX][DMAXY]; -extern int dPiece[MAXDUNX][MAXDUNY]; -extern char dLight[MAXDUNX][MAXDUNY]; +extern int setpc_x; +extern int setpc_y; +extern int setpc_w; +extern int setpc_h; +extern BYTE *pSetPiece; extern BOOL setloadflag; -extern int tile_defs[MAXTILES]; +extern BYTE *pSpecialCels; extern BYTE *pMegaTiles; extern BYTE *pLevelPieces; -extern int gnDifficulty; +extern BYTE *pDungeonCels; +extern BYTE *pSpeedCels; +extern int SpeedFrameTbl[128][16]; extern char block_lvid[2049]; -//char byte_5B78EB; -extern char dTransVal[MAXDUNX][MAXDUNY]; +extern int level_frame_count[MAXTILES]; +extern int tile_defs[MAXTILES]; +extern WORD level_frame_types[MAXTILES]; +extern int level_frame_sizes[MAXTILES]; +extern int nlevel_frames; +extern BOOLEAN nBlockTable[2049]; +extern BOOLEAN nSolidTable[2049]; +extern BOOLEAN nTransTable[2049]; +extern BOOLEAN nMissileTable[2049]; extern BOOLEAN nTrapTable[2049]; +extern int dminx; +extern int dminy; +extern int dmaxx; +extern int dmaxy; +extern int gnDifficulty; extern BYTE leveltype; extern BYTE currlevel; -extern BOOLEAN TransList[256]; -extern BOOLEAN nSolidTable[2049]; -extern int level_frame_count[MAXTILES]; -extern ScrollStruct ScrollInfo; -extern BYTE *pDungeonCels; -extern int SpeedFrameTbl[128][16]; -extern THEME_LOC themeLoc[MAXTHEMES]; -extern char dPlayer[MAXDUNX][MAXDUNY]; +extern BOOLEAN setlevel; +extern BYTE setlvlnum; +extern char setlvltype; +extern int ViewX; +extern int ViewY; extern int ViewBX; extern int ViewBY; extern int ViewDX; extern int ViewDY; -extern char dSpecial[MAXDUNX][MAXDUNY]; -extern BOOLEAN nBlockTable[2049]; -extern BYTE *pSpecialCels; +extern ScrollStruct ScrollInfo; +extern int LvlViewX; +extern int LvlViewY; +extern int MicroTileLen; +extern char TransVal; +extern BOOLEAN TransList[256]; +extern int dPiece[MAXDUNX][MAXDUNY]; +extern MICROS dpiece_defs_map_2[MAXDUNX][MAXDUNY]; +extern MICROS dpiece_defs_map_1[MAXDUNX * MAXDUNY]; +extern char dTransVal[MAXDUNX][MAXDUNY]; +extern char dLight[MAXDUNX][MAXDUNY]; +extern char dPreLight[MAXDUNX][MAXDUNY]; extern char dFlags[MAXDUNX][MAXDUNY]; +extern char dPlayer[MAXDUNX][MAXDUNY]; +extern int dMonster[MAXDUNX][MAXDUNY]; +extern char dDead[MAXDUNX][MAXDUNY]; +extern char dObject[MAXDUNX][MAXDUNY]; extern char dItem[MAXDUNX][MAXDUNY]; -extern BYTE setlvlnum; -extern int level_frame_sizes[MAXTILES]; -extern BOOLEAN nMissileTable[2049]; -extern BYTE *pSetPiece; -extern char setlvltype; -extern BOOLEAN setlevel; -extern int LvlViewY; -extern int LvlViewX; -extern int dmaxx; -extern int dmaxy; -extern int setpc_h; -extern int setpc_w; -extern int setpc_x; -extern int ViewX; -extern int ViewY; -extern int setpc_y; extern char dMissile[MAXDUNX][MAXDUNY]; -extern int dminx; -extern int dminy; -extern MICROS dpiece_defs_map_2[MAXDUNX][MAXDUNY]; +extern char dSpecial[MAXDUNX][MAXDUNY]; +extern int themeCount; +extern THEME_LOC themeLoc[MAXTHEMES]; void FillSolidBlockTbls(); void MakeSpeedCels(); diff --git a/Source/inv.cpp b/Source/inv.cpp index b518f5da1..1304a07a7 100644 --- a/Source/inv.cpp +++ b/Source/inv.cpp @@ -1542,8 +1542,9 @@ void AutoGetItem(int pnum, int ii) dropGoldValue = 0; } - if (ii != MAXITEMS && !dItem[item[ii]._ix][item[ii]._iy]) { - return; + if (ii != MAXITEMS) { + if (dItem[item[ii]._ix][item[ii]._iy] == 0) + return; } item[ii]._iCreateInfo &= 0x7FFF; diff --git a/Source/itemdat.cpp b/Source/itemdat.cpp index 2def88407..4d7a5ffa6 100644 --- a/Source/itemdat.cpp +++ b/Source/itemdat.cpp @@ -17,7 +17,7 @@ ItemDataStruct AllItemsList[] = { { IDROP_NEVER, ICLASS_WEAPON, ILOC_TWOHAND, ICURS_SHORT_STAFF, 10, UITYPE_NONE, "Short Staff of Charged Bolt", NULL, 1, 25, 2, 4, 0, 0, 0, 20, 0, ISPL_NONE, IMISC_STAFF, SPL_CBOLT, FALSE, 520, 520 }, { IDROP_NEVER, ICLASS_WEAPON, ILOC_TWOHAND, ICURS_CLEAVER, 2, UITYPE_CLEAVER, "Cleaver", NULL, 10, 10, 4, 24, 0, 0, 0, 0, 0, ISPL_NONE, IMISC_UNIQUE, SPL_NULL, FALSE, 2000, 2000 }, { IDROP_NEVER, ICLASS_ARMOR, ILOC_HELM, ICURS_THE_UNDEAD_CROWN, 7, UITYPE_SKCROWN, "The Undead Crown", NULL, 0, 50, 0, 0, 15, 15, 0, 0, 0, ISPL_RNDSTEALLIFE, IMISC_UNIQUE, SPL_NULL, FALSE, 10000, 10000 }, - { IDROP_NEVER, ICLASS_MISC, ILOC_RING, ICURS_EMPYREAN_BAND, 12, UITYPE_INFRARING, "Empyrean Band", NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, ISPL_NONE, IMISC_UNIQUE, SPL_NULL, FALSE, 8000, 8000 }, + { IDROP_NEVER, ICLASS_MISC, ILOC_RING, ICURS_EMPYREAN_BAND, 12, UITYPE_INFRARING, "Empyrean Band", NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, ISPL_NONE, IMISC_UNIQUE, SPL_NULL, FALSE, 8000, 8000 }, { IDROP_NEVER, ICLASS_QUEST, ILOC_UNEQUIPABLE, ICURS_MAGIC_ROCK, 0, UITYPE_NONE, "Magic Rock", NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, ISPL_NONE, IMISC_NONE, SPL_NULL, FALSE, 0, 0 }, { IDROP_NEVER, ICLASS_MISC, ILOC_AMULET, ICURS_OPTIC_AMULET, 13, UITYPE_OPTAMULET, "Optic Amulet", NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, ISPL_NONE, IMISC_UNIQUE, SPL_NULL, FALSE, 5000, 5000 }, { IDROP_NEVER, ICLASS_MISC, ILOC_RING, ICURS_RING_OF_TRUTH, 12, UITYPE_TRING, "Ring of Truth", NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, ISPL_NONE, IMISC_UNIQUE, SPL_NULL, FALSE, 1000, 1000 }, diff --git a/Source/items.cpp b/Source/items.cpp index 7a51f1d94..557802247 100644 --- a/Source/items.cpp +++ b/Source/items.cpp @@ -19,7 +19,7 @@ int gnNumGetRecords; /* data */ -BYTE ItemCAnimTbl[169] = { +BYTE ItemCAnimTbl[] = { 20, 16, 16, 16, 4, 4, 4, 12, 12, 12, 12, 12, 12, 12, 12, 21, 21, 25, 12, 28, 28, 28, 0, 0, 0, 32, 0, 0, 0, 24, @@ -38,7 +38,7 @@ BYTE ItemCAnimTbl[169] = { 14, 17, 17, 17, 0, 34, 1, 0, 3, 17, 8, 8, 6, 1, 3, 3, 11, 3, 4 }; -char *ItemDropNames[ITEMTYPES] = { +char *ItemDropNames[] = { "Armor2", "Axe", "FBttle", @@ -73,9 +73,9 @@ char *ItemDropNames[ITEMTYPES] = { "Innsign", "Bldstn", "Fanvil", - "FLazStaf" + "FLazStaf", }; -BYTE ItemAnimLs[ITEMTYPES] = { +BYTE ItemAnimLs[] = { 15, 13, 16, @@ -110,9 +110,9 @@ BYTE ItemAnimLs[ITEMTYPES] = { 13, 13, 13, - 8 + 8, }; -int ItemDropSnds[ITEMTYPES] = { +int ItemDropSnds[] = { IS_FHARM, IS_FAXE, IS_FPOT, @@ -147,9 +147,9 @@ int ItemDropSnds[ITEMTYPES] = { IS_ISIGN, IS_FBLST, IS_FANVL, - IS_FSTAF + IS_FSTAF, }; -int ItemInvSnds[ITEMTYPES] = { +int ItemInvSnds[] = { IS_IHARM, IS_IAXE, IS_IPOT, @@ -184,7 +184,7 @@ int ItemInvSnds[ITEMTYPES] = { IS_ISIGN, IS_IBLST, IS_IANVL, - IS_ISTAF + IS_ISTAF, }; int idoppely = 16; int premiumlvladd[6] = { -1, -1, 0, 0, 1, 2 }; @@ -340,8 +340,8 @@ void CalcPlrItemVals(int p, BOOL Loadgfx) ItemStruct *itm = &plr[p].InvBody[i]; if (itm->_itype != ITYPE_NONE && itm->_iStatFlag) { - mind += itm->_iMinDam; tac += itm->_iAC; + mind += itm->_iMinDam; maxd += itm->_iMaxDam; if (itm->_iSpell != SPL_NULL) { @@ -357,7 +357,6 @@ void CalcPlrItemVals(int p, BOOL Loadgfx) tmpac = 1; bac += tmpac; } - dmod += itm->_iPLDamMod; iflgs |= itm->_iFlags; sadd += itm->_iPLStr; madd += itm->_iPLMag; @@ -366,6 +365,7 @@ void CalcPlrItemVals(int p, BOOL Loadgfx) fr += itm->_iPLFR; lr += itm->_iPLLR; mr += itm->_iPLMR; + dmod += itm->_iPLDamMod; ghit += itm->_iPLGetHit; lrad += itm->_iPLLight; ihp += itm->_iPLHP; @@ -393,15 +393,15 @@ void CalcPlrItemVals(int p, BOOL Loadgfx) } } + plr[p]._pIMinDam = mind; plr[p]._pIMaxDam = maxd; plr[p]._pIAC = tac; plr[p]._pIBonusDam = bdam; plr[p]._pIBonusToHit = btohit; plr[p]._pIBonusAC = bac; plr[p]._pIFlags = iflgs; - plr[p]._pIGetHit = ghit; - plr[p]._pIMinDam = mind; plr[p]._pIBonusDamMod = dmod; + plr[p]._pIGetHit = ghit; if (lrad < 2) { lrad = 2; @@ -2480,7 +2480,7 @@ void FreeItemGFX() { int i; - for (i = 0; i < 35; i++) { + for (i = 0; i < ITEMTYPES; i++) { MemFreeDbg(itemanims[i]); } } diff --git a/Source/items.h b/Source/items.h index 729761e96..0e4548e47 100644 --- a/Source/items.h +++ b/Source/items.h @@ -132,11 +132,11 @@ void PutItemRecord(int nSeed, WORD wCI, int nIndex); /* data */ -extern BYTE ItemCAnimTbl[169]; -extern char *ItemDropNames[ITEMTYPES]; -extern BYTE ItemAnimLs[ITEMTYPES]; -extern int ItemDropSnds[ITEMTYPES]; -extern int ItemInvSnds[ITEMTYPES]; +extern BYTE ItemCAnimTbl[]; +extern char *ItemDropNames[]; +extern BYTE ItemAnimLs[]; +extern int ItemDropSnds[]; +extern int ItemInvSnds[]; extern int idoppely; extern int premiumlvladd[6]; diff --git a/Source/lighting.cpp b/Source/lighting.cpp index 5446a221a..3895944d1 100644 --- a/Source/lighting.cpp +++ b/Source/lighting.cpp @@ -654,9 +654,8 @@ void DoUnLight(int nXPos, int nYPos, int nRadius) for (y = min_y; y < max_y; y++) { for (x = min_x; x < max_x; x++) { - if (x >= 0 && x < MAXDUNX && y >= 0 && y < MAXDUNY) { + if (x >= 0 && x < MAXDUNX && y >= 0 && y < MAXDUNY) dLight[x][y] = dPreLight[x][y]; - } } } } diff --git a/Source/monster.cpp b/Source/monster.cpp index 5c51ff4cf..c993c0ead 100644 --- a/Source/monster.cpp +++ b/Source/monster.cpp @@ -17,6 +17,7 @@ BOOLEAN sgbSaveSoundOn; MonsterStruct monster[MAXMONSTERS]; int totalmonsters; CMonster Monsters[MAX_LVLMTYPES]; +BYTE GraphicTable[NUMLEVELS][MAX_LVLMTYPES]; int monstimgtot; int uniquetrans; int nummtypes; @@ -689,15 +690,9 @@ void PlaceUniqueMonst(int uniqindex, int miniontype, int unpackfilesize) Monst->mtalkmsg = Uniq->mtalkmsg; Monst->mlid = AddLight(Monst->_mx, Monst->_my, 3); - if (gbMaxPlayers == 1) { - if (Monst->mtalkmsg) { - Monst->_mgoal = MGOAL_INQUIRING; - } - } else { - if (Monst->_mAi == AI_LAZHELP) { + if (gbMaxPlayers != 1) { + if (Monst->_mAi == AI_LAZHELP) Monst->mtalkmsg = 0; - } - if (Monst->_mAi != AI_LAZURUS || quests[Q_BETRAYER]._qvar1 <= 3) { if (Monst->mtalkmsg) { Monst->_mgoal = MGOAL_INQUIRING; @@ -706,10 +701,12 @@ void PlaceUniqueMonst(int uniqindex, int miniontype, int unpackfilesize) Monst->_mgoal = MGOAL_NORMAL; } } + else if (Monst->mtalkmsg) + Monst->_mgoal = MGOAL_INQUIRING; if (gnDifficulty == DIFF_NIGHTMARE) { - Monst->mLevel += 15; Monst->_mmaxhp = 3 * Monst->_mmaxhp + 64; + Monst->mLevel += 15; Monst->_mhitpoints = Monst->_mmaxhp; Monst->mExp = 2 * (Monst->mExp + 1000); Monst->mMinDamage = 2 * (Monst->mMinDamage + 2); @@ -719,8 +716,8 @@ void PlaceUniqueMonst(int uniqindex, int miniontype, int unpackfilesize) } if (gnDifficulty == DIFF_HELL) { - Monst->mLevel += 30; Monst->_mmaxhp = 4 * Monst->_mmaxhp + 192; + Monst->mLevel += 30; Monst->_mhitpoints = Monst->_mmaxhp; Monst->mExp = 4 * (Monst->mExp + 1000); Monst->mMinDamage = 4 * Monst->mMinDamage + 6; @@ -1632,6 +1629,7 @@ void M2MStartHit(int mid, int i, int dam) void MonstStartKill(int i, int pnum, BOOL sendmsg) { int md; + MonsterStruct *Monst; if ((DWORD)i >= MAXMONSTERS) { app_fatal("MonstStartKill: Invalid monster %d", i); @@ -1640,19 +1638,20 @@ void MonstStartKill(int i, int pnum, BOOL sendmsg) app_fatal("MonstStartKill: Monster %d \"%s\" MType NULL", i, monster[i].mName); } + Monst = &monster[i]; if (pnum >= 0) - monster[i].mWhoHit |= 1 << pnum; + Monst->mWhoHit |= 1 << pnum; if (pnum < MAX_PLRS && i > MAX_PLRS) - AddPlrMonstExper(monster[i].mLevel, monster[i].mExp, monster[i].mWhoHit); - monstkills[monster[i].MType->mtype]++; - monster[i]._mhitpoints = 0; - SetRndSeed(monster[i]._mRndSeed); - if (QuestStatus(Q_GARBUD) && monster[i].mName == UniqMonst[UMT_GARBUD].mName) { - CreateTypeItem(monster[i]._mx + 1, monster[i]._my + 1, TRUE, ITYPE_MACE, IMISC_NONE, TRUE, FALSE); + AddPlrMonstExper(Monst->mLevel, Monst->mExp, Monst->mWhoHit); + monstkills[Monst->MType->mtype]++; + Monst->_mhitpoints = 0; + SetRndSeed(Monst->_mRndSeed); + if (QuestStatus(Q_GARBUD) && Monst->mName == UniqMonst[UMT_GARBUD].mName) { + CreateTypeItem(Monst->_mx + 1, Monst->_my + 1, TRUE, ITYPE_MACE, IMISC_NONE, TRUE, FALSE); } else if (i > MAX_PLRS - 1) { // Golems should not spawn items - SpawnItem(i, monster[i]._mx, monster[i]._my, sendmsg); + SpawnItem(i, Monst->_mx, Monst->_my, sendmsg); } - if (monster[i].MType->mtype == MT_DIABLO) + if (Monst->MType->mtype == MT_DIABLO) M_DiabloDeath(i, TRUE); else PlayEffect(i, 2); @@ -1660,24 +1659,24 @@ void MonstStartKill(int i, int pnum, BOOL sendmsg) if (pnum >= 0) md = M_GetDir(i); else - md = monster[i]._mdir; - monster[i]._mdir = md; - NewMonsterAnim(i, monster[i].MType->Anims[MA_DEATH], md); - monster[i]._mmode = MM_DEATH; - monster[i]._mxoff = 0; - monster[i]._myoff = 0; - monster[i]._mVar1 = 0; - monster[i]._mx = monster[i]._moldx; - monster[i]._my = monster[i]._moldy; - monster[i]._mfutx = monster[i]._moldx; - monster[i]._mfuty = monster[i]._moldy; + md = Monst->_mdir; + Monst->_mdir = md; + NewMonsterAnim(i, Monst->MType->Anims[MA_DEATH], md); + Monst->_mmode = MM_DEATH; + Monst->_mxoff = 0; + Monst->_myoff = 0; + Monst->_mVar1 = 0; + Monst->_mx = Monst->_moldx; + Monst->_my = Monst->_moldy; + Monst->_mfutx = Monst->_moldx; + Monst->_mfuty = Monst->_moldy; M_CheckEFlag(i); M_ClearSquares(i); - dMonster[monster[i]._mx][monster[i]._my] = i + 1; + dMonster[Monst->_mx][Monst->_my] = i + 1; CheckQuestKill(i, sendmsg); - M_FallenFear(monster[i]._mx, monster[i]._my); - if (monster[i].MType->mtype >= MT_NACID && monster[i].MType->mtype <= MT_XACID) - AddMissile(monster[i]._mx, monster[i]._my, 0, 0, 0, MIS_ACIDPUD, 1, i, monster[i]._mint + 1, 0); + M_FallenFear(Monst->_mx, Monst->_my); + if (Monst->MType->mtype >= MT_NACID && Monst->MType->mtype <= MT_XACID) + AddMissile(Monst->_mx, Monst->_my, 0, 0, 0, MIS_ACIDPUD, 1, i, Monst->_mint + 1, 0); } void M2MStartKill(int i, int mid) @@ -5510,19 +5509,20 @@ BOOL CheckMonsterHit(int m, BOOL &ret) } if (monster[m]._mAi == AI_GARG && monster[m]._mFlags & MFLAG_ALLOW_SPECIAL) { - monster[m]._mmode = MM_SATTACK; monster[m]._mFlags &= ~MFLAG_ALLOW_SPECIAL; + monster[m]._mmode = MM_SATTACK; ret = TRUE; return TRUE; } - if (monster[m].MType->mtype < MT_COUNSLR || monster[m].MType->mtype > MT_ADVOCATE || monster[m]._mgoal == MGOAL_NORMAL) { - return FALSE; - } else { - ret = FALSE; + if (monster[m].MType->mtype >= MT_COUNSLR && monster[m].MType->mtype <= MT_ADVOCATE) { + if (monster[m]._mgoal != MGOAL_NORMAL) { + ret = FALSE; + return TRUE; + } } - return TRUE; + return FALSE; } int encode_enemy(int m) diff --git a/Source/monster.h b/Source/monster.h index 881e4cabd..c5028c8da 100644 --- a/Source/monster.h +++ b/Source/monster.h @@ -13,6 +13,7 @@ extern int nummonsters; extern MonsterStruct monster[MAXMONSTERS]; extern int totalmonsters; extern CMonster Monsters[MAX_LVLMTYPES]; +extern BYTE GraphicTable[NUMLEVELS][MAX_LVLMTYPES]; extern int monstimgtot; extern int uniquetrans; extern int nummtypes; diff --git a/Source/mpqapi.cpp b/Source/mpqapi.cpp index 6c88bff4f..6d33ffdb6 100644 --- a/Source/mpqapi.cpp +++ b/Source/mpqapi.cpp @@ -62,9 +62,9 @@ BOOL mpqapi_reg_load_modification_time(char *dst, int size) pszDst = dst; memset(dst, 0, size); #ifdef SPAWN - if (!SRegLoadData("Diablo", "Audio Playback ", 0, (BYTE *)pszDst, size, &nbytes_read)) { + if (!SRegLoadData(APP_NAME, "Audio Playback ", 0, (BYTE *)pszDst, size, &nbytes_read)) { #else - if (!SRegLoadData("Diablo", "Video Player ", 0, (BYTE *)pszDst, size, &nbytes_read)) { + if (!SRegLoadData(APP_NAME, "Video Player ", 0, (BYTE *)pszDst, size, &nbytes_read)) { #endif return FALSE; } @@ -132,9 +132,9 @@ BOOLEAN mpqapi_reg_store_modification_time(char *pbData, DWORD dwLen) } #ifdef SPAWN - return SRegSaveData("Diablo", "Audio Playback ", 0, (BYTE *)pbData, dwLen); + return SRegSaveData(APP_NAME, "Audio Playback ", 0, (BYTE *)pbData, dwLen); #else - return SRegSaveData("Diablo", "Video Player ", 0, (BYTE *)pbData, dwLen); + return SRegSaveData(APP_NAME, "Video Player ", 0, (BYTE *)pbData, dwLen); #endif } diff --git a/Source/multi.cpp b/Source/multi.cpp index 1eca34566..76a0c4d95 100644 --- a/Source/multi.cpp +++ b/Source/multi.cpp @@ -772,7 +772,7 @@ BOOL NetInit(BOOL bSinglePlayer, BOOL *pfExitProgram) gnDifficulty = sgGameInitInfo.bDiff; SetRndSeed(sgGameInitInfo.dwSeed); - for (i = 0; i < 17; i++) { + for (i = 0; i < NUMLEVELS; i++) { glSeedTbl[i] = GetRndSeed(); gnLevelTypeTbl[i] = InitLevelType(i); } diff --git a/Source/objects.cpp b/Source/objects.cpp index 2f75c9127..ec16cbae5 100644 --- a/Source/objects.cpp +++ b/Source/objects.cpp @@ -196,12 +196,13 @@ void InitRndLocBigObj(int min, int max, int objtype) void InitRndLocObj5x5(int min, int max, int objtype) { BOOL exit; - int xp, yp, numobjs, i, k, m, n; + int xp, yp, numobjs, i, cnt, m, n; numobjs = min + random_(139, max - min); for (i = 0; i < numobjs; i++) { - k = 0; - for (;;) { + cnt = 0; + exit = FALSE; + while (!exit) { exit = TRUE; xp = random_(139, 80) + 16; yp = random_(139, 80) + 16; @@ -211,11 +212,11 @@ void InitRndLocObj5x5(int min, int max, int objtype) exit = FALSE; } } - if (exit) - break; - k++; - if (k > 20000) - return; + if (!exit) { + cnt++; + if (cnt > 20000) + return; + } } AddObject(objtype, xp, yp); } @@ -286,11 +287,12 @@ void AddCandles() void AddBookLever(int lx1, int ly1, int lx2, int ly2, int x1, int y1, int x2, int y2, int msg) { - BOOL exit; - int xp, yp, ob, k, m, n; + DIABOOL exit; + int xp, yp, ob, cnt, m, n; - k = 0; - for (;;) { + cnt = 0; + exit = FALSE; + while (!exit) { exit = TRUE; xp = random_(139, 80) + 16; yp = random_(139, 80) + 16; @@ -300,11 +302,11 @@ void AddBookLever(int lx1, int ly1, int lx2, int ly2, int x1, int y1, int x2, in exit = FALSE; } } - if (exit) - break; - k++; - if (k > 20000) + if (!exit) { + cnt++; + if (cnt > 20000) return; + } } if (QuestStatus(Q_BLIND)) @@ -619,7 +621,8 @@ void AddStoryBooks() BOOL done; cnt = 0; - while (TRUE) { + done = FALSE; + while (!done) { done = TRUE; xp = random_(139, 80) + 16; yp = random_(139, 80) + 16; @@ -629,11 +632,11 @@ void AddStoryBooks() done = FALSE; } } - if (done) - break; + if (!done) { cnt++; if (cnt > 20000) return; + } } AddObject(OBJ_STORYBOOK, xp, yp); AddObject(OBJ_STORYCANDLE, xp - 2, yp + 1); @@ -707,8 +710,9 @@ void AddLazStand() BOOL found; cnt = 0; - while (TRUE) { - found = 1; + found = FALSE; + while (!found) { + found = TRUE; xp = random_(139, 80) + 16; yp = random_(139, 80) + 16; for (yy = -3; yy <= 3; yy++) { @@ -717,15 +721,14 @@ void AddLazStand() found = FALSE; } } - if (found) - break; - + if (!found) { cnt++; if (cnt > 10000) { InitRndLocObj(1, 1, OBJ_LAZSTAND); return; } } + } AddObject(OBJ_LAZSTAND, xp, yp); AddObject(OBJ_TNUDEM2, xp, yp + 2); AddObject(OBJ_STORYCANDLE, xp + 1, yp + 2); @@ -829,9 +832,9 @@ void InitObjects() InitRndBarrels(); AddL4Goodies(); } - InitRndLocObj(5, 10, 5); - InitRndLocObj(3, 6, 6); - InitRndLocObj(1, 5, 7); + InitRndLocObj(5, 10, OBJ_CHEST1); + InitRndLocObj(3, 6, OBJ_CHEST2); + InitRndLocObj(1, 5, OBJ_CHEST3); if (leveltype != DTYPE_HELL) AddObjTraps(); if (leveltype > DTYPE_CATHEDRAL) @@ -1104,7 +1107,8 @@ void AddBarrel(int i, int t) void AddShrine(int i) { - int val, j, slist[NUM_SHRINETYPE]; + int val, j; + BOOL slist[NUM_SHRINETYPE]; object[i]._oPreFlag = TRUE; for (j = 0; j < NUM_SHRINETYPE; j++) { @@ -1113,22 +1117,16 @@ void AddShrine(int i) } else { slist[j] = 1; } - if (gbMaxPlayers != 1) { - if (shrineavail[j] == 1) { + if (gbMaxPlayers != 1 && shrineavail[j] == 1) { slist[j] = 0; } - } else { - if (shrineavail[j] == 2) { + if (gbMaxPlayers == 1 && shrineavail[j] == 2) { slist[j] = 0; } } - } - while (1) { + do { val = random_(150, NUM_SHRINETYPE); - if (slist[val]) { - break; - } - } + } while (!slist[val]); object[i]._oVar1 = val; if (random_(150, 2)) { @@ -1548,21 +1546,21 @@ void Obj_StopAnim(int i) void Obj_Door(int i) { int dx, dy; + BOOL dok; - if (!object[i]._oVar4) { - object[i]._oMissFlag = FALSE; + if (object[i]._oVar4 == 0) { object[i]._oSelFlag = 3; + object[i]._oMissFlag = FALSE; } else { - dy = object[i]._oy; dx = object[i]._ox; + dy = object[i]._oy; + dok = !dMonster[dx][dy]; + dok = dok & !dItem[dx][dy]; + dok = dok & !dDead[dx][dy]; + dok = dok & !dPlayer[dx][dy]; object[i]._oSelFlag = 2; + object[i]._oVar4 = dok ? 1 : 2; object[i]._oMissFlag = TRUE; - object[i]._oVar4 = (((dItem[dx][dy] == 0 ? 1 : 0) - & (dDead[dx][dy] == 0 ? 1 : 0) - & (dPlayer[dx][dy] == 0 ? 1 : 0) - & (dMonster[dx][dy] == 0 ? 1 : 0)) - == 0) - + 1; } } @@ -2427,6 +2425,7 @@ void OperateBook(int pnum, int i) { int j, oi; int dx, dy; + int otype; BOOL do_add_missile, missile_added; if (object[i]._oSelFlag == 0) @@ -2436,20 +2435,19 @@ void OperateBook(int pnum, int i) missile_added = FALSE; for (j = 0; j < nobjects; j++) { oi = objectactive[j]; - if (object[oi]._otype == OBJ_MCIRCLE2) { - if (object[oi]._oVar6 == 1) { + otype = object[oi]._otype; + if (otype == OBJ_MCIRCLE2 && object[oi]._oVar6 == 1) { dx = 27; dy = 29; object[oi]._oVar6 = 4; do_add_missile = TRUE; } - if (object[oi]._oVar6 == 2) { + if (otype == OBJ_MCIRCLE2 && object[oi]._oVar6 == 2) { dx = 43; dy = 29; object[oi]._oVar6 = 4; do_add_missile = TRUE; } - } if (do_add_missile) { object[dObject[35][36] - 1]._oVar5++; AddMissile(plr[pnum]._px, plr[pnum]._py, dx, dy, plr[pnum]._pdir, MIS_RNDTELEPORT, 0, pnum, 0, 0); @@ -2460,8 +2458,8 @@ void OperateBook(int pnum, int i) if (!missile_added) return; } - object[i]._oAnimFrame++; object[i]._oSelFlag = 0; + object[i]._oAnimFrame++; if (!setlevel) return; @@ -2574,8 +2572,8 @@ void OperateChest(int pnum, int i, BOOL sendmsg) if (object[i]._oSelFlag != 0) { if (!deltaload) PlaySfxLoc(IS_CHEST, object[i]._ox, object[i]._oy); - object[i]._oAnimFrame += 2; object[i]._oSelFlag = 0; + object[i]._oAnimFrame += 2; if (!deltaload) { SetRndSeed(object[i]._oRndSeed); if (setlevel) { @@ -2664,8 +2662,8 @@ void OperateInnSignChest(int pnum, int i) if (object[i]._oSelFlag != 0) { if (!deltaload) PlaySfxLoc(IS_CHEST, object[i]._ox, object[i]._oy); - object[i]._oAnimFrame += 2; object[i]._oSelFlag = 0; + object[i]._oAnimFrame += 2; if (!deltaload) { GetSuperItemLoc(object[i]._ox, object[i]._oy, x, y); SpawnQuestItem(IDI_BANNER, x, y, 0, 0); @@ -3462,8 +3460,8 @@ void OperateSkelBook(int pnum, int i, BOOL sendmsg) if (object[i]._oSelFlag != 0) { if (!deltaload) PlaySfxLoc(IS_ISCROL, object[i]._ox, object[i]._oy); - object[i]._oAnimFrame += 2; object[i]._oSelFlag = 0; + object[i]._oAnimFrame += 2; if (!deltaload) { SetRndSeed(object[i]._oRndSeed); if (random_(161, 5)) @@ -3481,8 +3479,8 @@ void OperateBookCase(int pnum, int i, BOOL sendmsg) if (object[i]._oSelFlag != 0) { if (!deltaload) PlaySfxLoc(IS_ISCROL, object[i]._ox, object[i]._oy); - object[i]._oAnimFrame -= 2; object[i]._oSelFlag = 0; + object[i]._oAnimFrame -= 2; if (!deltaload) { SetRndSeed(object[i]._oRndSeed); CreateTypeItem(object[i]._ox, object[i]._oy, FALSE, ITYPE_MISC, IMISC_BOOK, sendmsg, FALSE); @@ -3519,8 +3517,8 @@ void OperateArmorStand(int pnum, int i, BOOL sendmsg) BOOL uniqueRnd; if (object[i]._oSelFlag != 0) { - object[i]._oAnimFrame++; object[i]._oSelFlag = 0; + object[i]._oAnimFrame++; if (!deltaload) { SetRndSeed(object[i]._oRndSeed); uniqueRnd = random_(0, 2); @@ -3728,8 +3726,8 @@ void OperateWeaponRack(int pnum, int i, BOOL sendmsg) break; } - object[i]._oAnimFrame++; object[i]._oSelFlag = 0; + object[i]._oAnimFrame++; if (deltaload) return; @@ -3898,9 +3896,7 @@ void SyncOpL1Door(int pnum, int cmd, int i) return; do_sync = FALSE; - if (cmd == CMD_OPENDOOR) { - if (object[i]._oVar4 != 0) - return; + if (cmd == CMD_OPENDOOR && object[i]._oVar4 == 0) { do_sync = TRUE; } if (cmd == CMD_CLOSEDOOR && object[i]._oVar4 == 1) @@ -3921,9 +3917,7 @@ void SyncOpL2Door(int pnum, int cmd, int i) return; do_sync = FALSE; - if (cmd == CMD_OPENDOOR) { - if (object[i]._oVar4 != 0) - return; + if (cmd == CMD_OPENDOOR && object[i]._oVar4 == 0) { do_sync = TRUE; } if (cmd == CMD_CLOSEDOOR && object[i]._oVar4 == 1) @@ -3944,9 +3938,7 @@ void SyncOpL3Door(int pnum, int cmd, int i) return; do_sync = FALSE; - if (cmd == CMD_OPENDOOR) { - if (object[i]._oVar4 != 0) - return; + if (cmd == CMD_OPENDOOR && object[i]._oVar4 == 0) { do_sync = TRUE; } if (cmd == CMD_CLOSEDOOR && object[i]._oVar4 == 1) diff --git a/Source/palette.cpp b/Source/palette.cpp index 83fc04f19..ec4f7ba04 100644 --- a/Source/palette.cpp +++ b/Source/palette.cpp @@ -46,8 +46,8 @@ static void ApplyGamma(PALETTEENTRY *dst, PALETTEENTRY *src, int n) void SaveGamma() { - SRegSaveValue("Diablo", "Gamma Correction", 0, gamma_correction); - SRegSaveValue("Diablo", "Color Cycling", FALSE, color_cycling_enabled); + SRegSaveValue(APP_NAME, "Gamma Correction", 0, gamma_correction); + SRegSaveValue(APP_NAME, "Color Cycling", FALSE, color_cycling_enabled); } static void LoadGamma() @@ -56,7 +56,7 @@ static void LoadGamma() int value; value = gamma_correction; - if (!SRegLoadValue("Diablo", "Gamma Correction", 0, &value)) + if (!SRegLoadValue(APP_NAME, "Gamma Correction", 0, &value)) value = 100; gamma_value = value; if (value < 30) { @@ -65,7 +65,7 @@ static void LoadGamma() gamma_value = 100; } gamma_correction = gamma_value - gamma_value % 5; - if (!SRegLoadValue("Diablo", "Color Cycling", 0, &value)) + if (!SRegLoadValue(APP_NAME, "Color Cycling", 0, &value)) value = 1; color_cycling_enabled = value; } diff --git a/Source/player.cpp b/Source/player.cpp index b731b287b..d3bbfa7d9 100644 --- a/Source/player.cpp +++ b/Source/player.cpp @@ -835,11 +835,11 @@ void InitPlayer(int pnum, BOOL FirstTime) ClearPlrRVars(&plr[pnum]); if (FirstTime) { + plr[pnum]._pRSplType = RSPLTYPE_INVALID; plr[pnum]._pRSpell = SPL_INVALID; plr[pnum]._pSBkSpell = SPL_INVALID; - plr[pnum]._pSpell = SPL_INVALID; - plr[pnum]._pRSplType = RSPLTYPE_INVALID; - plr[pnum]._pSplType = RSPLTYPE_INVALID; + plr[pnum]._pSpell = plr[pnum]._pRSpell; + plr[pnum]._pSplType = plr[pnum]._pRSplType; if ((plr[pnum]._pgfxnum & 0xF) == ANIM_ID_BOW) { plr[pnum]._pwtype = WT_RANGED; } else { @@ -1204,9 +1204,12 @@ void PM_ChangeOffset(int pnum) plr[pnum]._pxoff = plr[pnum]._pVar6 >> 8; plr[pnum]._pyoff = plr[pnum]._pVar7 >> 8; + px -= plr[pnum]._pVar6 >> 8; + py -= plr[pnum]._pVar7 >> 8; + if (pnum == myplr && ScrollInfo._sdir) { - ScrollInfo._sxoff += px - plr[pnum]._pxoff; - ScrollInfo._syoff += py - plr[pnum]._pyoff; + ScrollInfo._sxoff += px; + ScrollInfo._syoff += py; } PM_ChangeLightOff(pnum); @@ -1675,7 +1678,8 @@ void StartPlayerKill(int pnum, int earflag) ItemStruct ear; ItemStruct *pi; - if (plr[pnum]._pHitPoints <= 0 && plr[pnum]._pmode == PM_DEATH) { + p = &plr[pnum]; + if (p->_pHitPoints <= 0 && p->_pmode == PM_DEATH) { return; } @@ -1699,34 +1703,33 @@ void StartPlayerKill(int pnum, int earflag) #endif } - if (plr[pnum]._pgfxnum) { - plr[pnum]._pgfxnum = 0; - plr[pnum]._pGFXLoad = 0; + if (p->_pgfxnum) { + p->_pgfxnum = 0; + p->_pGFXLoad = 0; SetPlrAnims(pnum); } - if (!(plr[pnum]._pGFXLoad & PFILE_DEATH)) { + if (!(p->_pGFXLoad & PFILE_DEATH)) { LoadPlrGFX(pnum, PFILE_DEATH); } - p = &plr[pnum]; - NewPlrAnim(pnum, p->_pDAnim[plr[pnum]._pdir], p->_pDFrames, 1, p->_pDWidth); + NewPlrAnim(pnum, p->_pDAnim[p->_pdir], p->_pDFrames, 1, p->_pDWidth); - plr[pnum]._pBlockFlag = FALSE; - plr[pnum]._pmode = PM_DEATH; - plr[pnum]._pInvincible = TRUE; + p->_pBlockFlag = FALSE; + p->_pmode = PM_DEATH; + p->_pInvincible = TRUE; SetPlayerHitPoints(pnum, 0); - plr[pnum]._pVar8 = 1; + p->_pVar8 = 1; if (pnum != myplr && !earflag && !diablolevel) { for (i = 0; i < NUM_INVLOC; i++) { - plr[pnum].InvBody[i]._itype = ITYPE_NONE; + p->InvBody[i]._itype = ITYPE_NONE; } CalcPlrInv(pnum, FALSE); } if (plr[pnum].plrlevel == currlevel) { - FixPlayerLocation(pnum, plr[pnum]._pdir); + FixPlayerLocation(pnum, p->_pdir); RemovePlrFromMap(pnum); dFlags[p->_px][p->_py] |= BFLAG_DEAD_PLAYER; SetPlayerOld(pnum); @@ -1736,7 +1739,7 @@ void StartPlayerKill(int pnum, int earflag) deathdelay = 30; if (pcurs >= CURSOR_FIRSTITEM) { - PlrDeadItem(pnum, &plr[pnum].HoldItem, 0, 0); + PlrDeadItem(pnum, &p->HoldItem, 0, 0); SetCursor_(CURSOR_HAND); } @@ -1762,11 +1765,10 @@ void StartPlayerKill(int pnum, int earflag) PlrDeadItem(pnum, &ear, 0, 0); } } else { - pi = &plr[pnum].InvBody[0]; + pi = &p->InvBody[0]; i = NUM_INVLOC; - while (i != 0) { - i--; - pdd = (i + plr[pnum]._pdir) & 7; + while (i--) { + pdd = (i + p->_pdir) & 7; PlrDeadItem(pnum, pi, offset_x[pdd], offset_y[pdd]); pi++; } @@ -1827,7 +1829,8 @@ void DropHalfPlayersGold(int pnum) hGold = plr[pnum]._pGold >> 1; for (i = 0; i < MAXBELTITEMS && hGold > 0; i++) { - if (plr[pnum].SpdList[i]._itype == ITYPE_GOLD && plr[pnum].SpdList[i]._ivalue != GOLD_MAX_LIMIT) { + if (plr[pnum].SpdList[i]._itype == ITYPE_GOLD && + plr[pnum].SpdList[i]._ivalue != GOLD_MAX_LIMIT) { if (hGold < plr[pnum].SpdList[i]._ivalue) { plr[pnum].SpdList[i]._ivalue -= hGold; SetSpdbarGoldCurs(pnum, i); @@ -2100,6 +2103,7 @@ BOOL PM_DoStand(int pnum) BOOL PM_DoWalk(int pnum) { int anim_len; + BOOL rv; if ((DWORD)pnum >= MAX_PLRS) { app_fatal("PM_DoWalk: illegal player %d", pnum); @@ -2143,17 +2147,19 @@ BOOL PM_DoWalk(int pnum) if (leveltype != DTYPE_TOWN) { ChangeLightOff(plr[pnum]._plid, 0, 0); } - - return TRUE; + rv = TRUE; + } else { + PM_ChangeOffset(pnum); + rv = FALSE; } - PM_ChangeOffset(pnum); - return FALSE; + return rv; } BOOL PM_DoWalk2(int pnum) { int anim_len; + BOOL rv; if ((DWORD)pnum >= MAX_PLRS) { app_fatal("PM_DoWalk2: illegal player %d", pnum); @@ -2190,21 +2196,22 @@ BOOL PM_DoWalk2(int pnum) } ClearPlrPVars(pnum); - if (leveltype != DTYPE_TOWN) { ChangeLightOff(plr[pnum]._plid, 0, 0); } - - return TRUE; + rv = TRUE; + } else { + PM_ChangeOffset(pnum); + rv = FALSE; } - PM_ChangeOffset(pnum); - return FALSE; + return rv; } BOOL PM_DoWalk3(int pnum) { int anim_len; + BOOL rv; if ((DWORD)pnum >= MAX_PLRS) { app_fatal("PM_DoWalk3: illegal player %d", pnum); @@ -2249,12 +2256,13 @@ BOOL PM_DoWalk3(int pnum) if (leveltype != DTYPE_TOWN) { ChangeLightOff(plr[pnum]._plid, 0, 0); } - - return TRUE; + rv = TRUE; + } else { + PM_ChangeOffset(pnum); + rv = FALSE; } - PM_ChangeOffset(pnum); - return FALSE; + return rv; } BOOL WeaponDur(int pnum, int durrnd) diff --git a/Source/quests.cpp b/Source/quests.cpp index bd2075eb0..678a06090 100644 --- a/Source/quests.cpp +++ b/Source/quests.cpp @@ -8,8 +8,8 @@ int qline; int qlist[MAXQUESTS]; int numqlines; int WaterDone; -int ReturnLvlY; int ReturnLvlX; +int ReturnLvlY; int ReturnLvlT; int ALLQUESTS; /** current frame # for the pentagram selector */ int ReturnLvl; diff --git a/Source/quests.h b/Source/quests.h index 3d4ee9ccf..cf52fb578 100644 --- a/Source/quests.h +++ b/Source/quests.h @@ -10,8 +10,8 @@ extern int qline; extern int qlist[MAXQUESTS]; extern int numqlines; extern int WaterDone; -extern int ReturnLvlY; extern int ReturnLvlX; +extern int ReturnLvlY; extern int ReturnLvlT; extern int ALLQUESTS; extern int ReturnLvl; diff --git a/Source/scrollrt.cpp b/Source/scrollrt.cpp index c4037dada..298031cf0 100644 --- a/Source/scrollrt.cpp +++ b/Source/scrollrt.cpp @@ -2142,8 +2142,6 @@ static void DrawGame(int x, int y) } switch (ScrollInfo._sdir) { - case SDIR_NONE: - break; case SDIR_NE: chunks++; case SDIR_N: diff --git a/Source/sound.cpp b/Source/sound.cpp index f06dcab56..38288ba7b 100644 --- a/Source/sound.cpp +++ b/Source/sound.cpp @@ -270,7 +270,7 @@ void snd_init(HWND hWnd) void snd_get_volume(char *value_name, int *value) { int v = *value; - if (!SRegLoadValue("Diablo", value_name, 0, &v)) { + if (!SRegLoadValue(APP_NAME, value_name, 0, &v)) { v = VOLUME_MAX; } *value = v; @@ -362,7 +362,7 @@ void sound_cleanup() void snd_set_volume(char *key, int value) { - SRegSaveValue("Diablo", key, 0, value); + SRegSaveValue(APP_NAME, key, 0, value); } void music_stop() diff --git a/Source/textdat.cpp b/Source/textdat.cpp index 7df9be0d7..0eeff858d 100644 --- a/Source/textdat.cpp +++ b/Source/textdat.cpp @@ -783,7 +783,7 @@ const TextDataStruct alltext[] = { 1, 3, PS_NAR9 }, #endif { "Thank goodness you've returned!\nMuch has changed since you lived here, my friend. All was peaceful until the dark riders came and destroyed our village. Many were cut down where they stood, and those who took up arms were slain or dragged away to become slaves - or worse. The church at the edge of town has been desecrated and is being used for dark rituals. The screams that echo in the night are inhuman, but some of our townsfolk may yet survive. Follow the path that lies between my tavern and the blacksmith shop to find the church and save who you can. \n \nPerhaps I can tell you more if we speak again. Good luck.|", - 1, 5, TSFX_TAVERN0 } + 1, 5, TSFX_TAVERN0 }, }; /** unused */ const DWORD gdwAllTextEntries = 259; diff --git a/Source/textdat.h b/Source/textdat.h index 96445a648..2edb4f4ad 100644 --- a/Source/textdat.h +++ b/Source/textdat.h @@ -2,7 +2,7 @@ #ifndef __TEXTDAT_H__ #define __TEXTDAT_H__ -extern const TextDataStruct alltext[259]; +extern const TextDataStruct alltext[]; extern const DWORD gdwAllTextEntries; #endif /* __TEXTDAT_H__ */ diff --git a/Source/towners.cpp b/Source/towners.cpp index 19121d91a..5754f4830 100644 --- a/Source/towners.cpp +++ b/Source/towners.cpp @@ -91,8 +91,8 @@ int TownCowY[3] = { 16, 14, 20 }; int TownCowDir[3] = { 1, 3, 4 }; int cowoffx[8] = { -1, 0, -1, -1, -1, 0, -1, -1 }; int cowoffy[8] = { -1, -1, -1, 0, -1, -1, -1, 0 }; -QuestTalkData Qtalklist[11] = { - // clang-format off +QuestTalkData Qtalklist[] = { +// clang-format off // _qinfra, _qblkm, _qgarb, _qzhar, _qveil, _qmod, _qbutch, _qbol, _qblind, _qblood, _qanvil, _qwarlrd, _qking, _qpw, _qbone, _qvb { TEXT_INFRA6, TEXT_MUSH6, -1, -1, TEXT_VEIL5, -1, TEXT_BUTCH5, TEXT_BANNER6, TEXT_BLIND5, TEXT_BLOOD5, TEXT_ANVIL6, TEXT_WARLRD5, TEXT_KING7, TEXT_POISON7, TEXT_BONE5, TEXT_VILE9 }, { TEXT_INFRA3, -1, -1, -1, TEXT_VEIL3, -1, TEXT_BUTCH3, TEXT_BANNER4, TEXT_BLIND3, TEXT_BLOOD3, TEXT_ANVIL3, TEXT_WARLRD3, TEXT_KING5, TEXT_POISON4, TEXT_BONE3, TEXT_VILE7 }, @@ -446,12 +446,13 @@ void TownDead() tidx = GetActiveTowner(TOWN_DEADGUY); TownCtrlMsg(tidx); if (!qtextflag) { - if ((quests[Q_BUTCHER]._qactive != QUEST_ACTIVE || quests[Q_BUTCHER]._qlog) && quests[Q_BUTCHER]._qactive != QUEST_INIT) { + if (quests[Q_BUTCHER]._qactive == QUEST_ACTIVE && quests[Q_BUTCHER]._qlog == 0) { + return; + } + if (quests[Q_BUTCHER]._qactive != QUEST_INIT) { towner[tidx]._tAnimDelay = 1000; towner[tidx]._tAnimFrame = 1; strcpy(towner[tidx]._tName, "Slain Townsman"); - } else { - return; } } if (quests[Q_BUTCHER]._qactive != QUEST_INIT) @@ -665,15 +666,17 @@ void TalkToTowner(int p, int t) InitQTextMsg(TEXT_BANNER2); towner[t]._tMsgSaid = TRUE; } - if (quests[Q_LTBANNER]._qvar2 == 1 && PlrHasItem(p, IDI_BANNER, i) != NULL && !towner[t]._tMsgSaid) { - quests[Q_LTBANNER]._qactive = QUEST_DONE; - quests[Q_LTBANNER]._qvar1 = 3; - RemoveInvItem(p, i); - CreateItem(UITEM_HARCREST, towner[t]._tx, towner[t]._ty + 1); - towner[t]._tbtcnt = 150; - towner[t]._tVar1 = p; - InitQTextMsg(TEXT_BANNER3); - towner[t]._tMsgSaid = TRUE; + if (quests[Q_LTBANNER]._qvar2 == 1 && PlrHasItem(p, IDI_BANNER, i) != NULL) { + if (!towner[t]._tMsgSaid) { + quests[Q_LTBANNER]._qactive = QUEST_DONE; + quests[Q_LTBANNER]._qvar1 = 3; + RemoveInvItem(p, i); + CreateItem(UITEM_HARCREST, towner[t]._tx, towner[t]._ty + 1); + towner[t]._tbtcnt = 150; + towner[t]._tVar1 = p; + InitQTextMsg(TEXT_BANNER3); + towner[t]._tMsgSaid = TRUE; + } } } if (!qtextflag) { @@ -729,16 +732,18 @@ void TalkToTowner(int p, int t) InitQTextMsg(TEXT_INFRA5); towner[t]._tMsgSaid = TRUE; } - if (quests[Q_ROCK]._qvar2 == 1 && PlrHasItem(p, IDI_ROCK, i) != NULL && !towner[t]._tMsgSaid) { - quests[Q_ROCK]._qactive = QUEST_DONE; - quests[Q_ROCK]._qvar2 = 2; - quests[Q_ROCK]._qvar1 = 2; - RemoveInvItem(p, i); - CreateItem(UITEM_INFRARING, towner[t]._tx, towner[t]._ty + 1); - towner[t]._tbtcnt = 150; - towner[t]._tVar1 = p; - InitQTextMsg(TEXT_INFRA7); - towner[t]._tMsgSaid = TRUE; + if (quests[Q_ROCK]._qvar2 == 1 && PlrHasItem(p, IDI_ROCK, i) != NULL) { + if (!towner[t]._tMsgSaid) { + quests[Q_ROCK]._qactive = QUEST_DONE; + quests[Q_ROCK]._qvar2 = 2; + quests[Q_ROCK]._qvar1 = 2; + RemoveInvItem(p, i); + CreateItem(UITEM_INFRARING, towner[t]._tx, towner[t]._ty + 1); + towner[t]._tbtcnt = 150; + towner[t]._tVar1 = p; + InitQTextMsg(TEXT_INFRA7); + towner[t]._tMsgSaid = TRUE; + } } } if (plr[p]._pLvlVisited[9] && quests[Q_ANVIL]._qactive != QUEST_NOTAVAIL) { @@ -894,16 +899,16 @@ void TalkToTowner(int p, int t) towner[t]._tbtcnt = 150; towner[t]._tVar1 = p; InitQTextMsg(TEXT_VILE1); + towner[t]._tMsgSaid = TRUE; quests[Q_BETRAYER]._qactive = QUEST_ACTIVE; quests[Q_BETRAYER]._qlog = TRUE; - towner[t]._tMsgSaid = TRUE; } else if (quests[Q_BETRAYER]._qactive == QUEST_DONE && quests[Q_BETRAYER]._qvar1 == 7) { quests[Q_BETRAYER]._qvar1 = 8; towner[t]._tbtcnt = 150; towner[t]._tVar1 = p; InitQTextMsg(TEXT_VILE3); - quests[Q_DIABLO]._qlog = TRUE; towner[t]._tMsgSaid = TRUE; + quests[Q_DIABLO]._qlog = TRUE; } } if (gbMaxPlayers != 1) { @@ -931,8 +936,9 @@ void TalkToTowner(int p, int t) StartStore(STORE_STORY); } } - } else if (towner[t]._ttype == TOWN_COW && !qtextflag) { - CowSFX(p); + } else if (towner[t]._ttype == TOWN_COW) { + if (!qtextflag) + CowSFX(p); } } diff --git a/Source/towners.h b/Source/towners.h index fccb6eb18..4fe06a318 100644 --- a/Source/towners.h +++ b/Source/towners.h @@ -40,6 +40,6 @@ void CowSFX(int pnum); /* data */ -extern QuestTalkData Qtalklist[11]; +extern QuestTalkData Qtalklist[]; #endif /* __TOWNERS_H__ */ diff --git a/defs.h b/defs.h index 9385c921b..6c5ea2cb6 100644 --- a/defs.h +++ b/defs.h @@ -4,7 +4,9 @@ * Global definitions and Macros. */ +#define DIABOOL BOOL #define GAME_NAME "DIABLO" +#define APP_NAME "Diablo" #define DMAXX 40 #define DMAXY 40 diff --git a/enums.h b/enums.h index cf9712c95..6d8562ba2 100644 --- a/enums.h +++ b/enums.h @@ -1802,7 +1802,7 @@ typedef enum _speech_id { TEXT_BOOK31 = 0xFF, TEXT_BOOK32 = 0x100, TEXT_BOOK33 = 0x101, - TEXT_INTRO = 0x102 + TEXT_INTRO = 0x102, } _speech_id; typedef enum object_graphic_id { @@ -2560,7 +2560,8 @@ typedef enum quest_id { Q_SKELKING = 0xC, Q_PWATER = 0xD, Q_SCHAMB = 0xE, - Q_BETRAYER = 0xF + Q_BETRAYER = 0xF, + Q_INVALID = -1, } quest_id; typedef enum quest_state { From 7db4ed749a5d0d75a60081d42c0a2d448fce8b88 Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Wed, 8 Apr 2020 17:37:58 +0200 Subject: [PATCH 02/15] Apply more enums, defines and types --- Source/codec.cpp | 40 +++++++------ Source/control.cpp | 8 +-- Source/cursor.cpp | 8 +-- Source/diablo.cpp | 60 +++++++++---------- Source/dthread.cpp | 6 +- Source/effects.cpp | 3 +- Source/gamemenu.cpp | 2 +- Source/gendung.cpp | 4 +- Source/gmenu.cpp | 6 +- Source/monstdat.cpp | 141 ++++++++++++++++++++++++++++++++++++++++---- enums.h | 3 +- 11 files changed, 200 insertions(+), 81 deletions(-) diff --git a/Source/codec.cpp b/Source/codec.cpp index 04f81d0fc..cb78b9835 100644 --- a/Source/codec.cpp +++ b/Source/codec.cpp @@ -12,6 +12,8 @@ typedef struct CodecSignature { WORD unused; } CodecSignature; +#define BLOCKSIZE 64 + int codec_decode(BYTE *pbSrcDst, DWORD size, char *pszPassword) { char buf[128]; @@ -20,20 +22,20 @@ int codec_decode(BYTE *pbSrcDst, DWORD size, char *pszPassword) CodecSignature *sig; codec_init_key(0, pszPassword); - if (size <= 8) + if (size <= sizeof(CodecSignature)) return 0; - size = size - 8; - if (size % 64 != 0) + size -= sizeof(CodecSignature); + if (size % BLOCKSIZE != 0) return 0; - for (i = size; i != 0; pbSrcDst += 64, i -= 64) { - memcpy(buf, pbSrcDst, 64); + for (i = size; i != 0; pbSrcDst += BLOCKSIZE, i -= BLOCKSIZE) { + memcpy(buf, pbSrcDst, BLOCKSIZE); SHA1Result(0, dst); - for (int j = 0; j < 64; j++) { + for (int j = 0; j < BLOCKSIZE; j++) { buf[j] ^= dst[j % SHA1HashSize]; } SHA1Calculate(0, buf, NULL); memset(dst, 0, sizeof(dst)); - memcpy(pbSrcDst, buf, 64); + memcpy(pbSrcDst, buf, BLOCKSIZE); } memset(buf, 0, sizeof(buf)); @@ -48,7 +50,7 @@ int codec_decode(BYTE *pbSrcDst, DWORD size, char *pszPassword) goto error; } - size += sig->last_chunk_size - 64; + size += sig->last_chunk_size - BLOCKSIZE; SHA1Clear(); return size; error: @@ -67,7 +69,7 @@ void codec_init_key(int unused, char *pszPassword) srand(0x7058); keyInit = key; - for (i = 0; i < 136; i++) { + for (i = 0; i < sizeof(key); i++) { *keyInit = rand(); keyInit++; } @@ -81,7 +83,7 @@ void codec_init_key(int unused, char *pszPassword) SHA1Reset(0); SHA1Calculate(0, pw, digest); SHA1Clear(); - for (i = 0; (DWORD)i < 136; i++) + for (i = 0; i < sizeof(key); i++) key[i] ^= digest[i % SHA1HashSize]; memset(pw, 0, sizeof(pw)); memset(digest, 0, sizeof(digest)); @@ -94,9 +96,9 @@ void codec_init_key(int unused, char *pszPassword) DWORD codec_get_encoded_len(DWORD dwSrcBytes) { - if (dwSrcBytes % 64 != 0) - dwSrcBytes += 64 - (dwSrcBytes % 64); - return dwSrcBytes + 8; + if (dwSrcBytes % BLOCKSIZE != 0) + dwSrcBytes += BLOCKSIZE - (dwSrcBytes % BLOCKSIZE); + return dwSrcBytes + sizeof(CodecSignature); } void codec_encode(BYTE *pbSrcDst, DWORD size, int size_64, char *pszPassword) @@ -114,19 +116,19 @@ void codec_encode(BYTE *pbSrcDst, DWORD size, int size_64, char *pszPassword) last_chunk = 0; while (size != 0) { - chunk = size < 64 ? size : 64; + chunk = size < BLOCKSIZE ? size : BLOCKSIZE; memcpy(buf, pbSrcDst, chunk); - if (chunk < 64) - memset(buf + chunk, 0, 64 - chunk); + if (chunk < BLOCKSIZE) + memset(buf + chunk, 0, BLOCKSIZE - chunk); SHA1Result(0, dst); SHA1Calculate(0, buf, NULL); - for (int j = 0; j < 64; j++) { + for (int j = 0; j < BLOCKSIZE; j++) { buf[j] ^= dst[j % SHA1HashSize]; } memset(dst, 0, sizeof(dst)); - memcpy(pbSrcDst, buf, 64); + memcpy(pbSrcDst, buf, BLOCKSIZE); last_chunk = chunk; - pbSrcDst += 64; + pbSrcDst += BLOCKSIZE; size -= chunk; } memset(buf, 0, sizeof(buf)); diff --git a/Source/control.cpp b/Source/control.cpp index 016b40f4a..8482c6150 100644 --- a/Source/control.cpp +++ b/Source/control.cpp @@ -1774,7 +1774,7 @@ void CPrintString(int y, char *str, BOOL center, int lines) lineOffset = 0; lineStart = lineOffsets[lines][y] + PANEL_LEFT; - if (center == 1) { + if (center == TRUE) { strWidth = 0; tmp = str; while (*tmp) { @@ -2106,7 +2106,7 @@ void DrawLevelUpIcon() { int nCel; - if (!stextflag) { + if (stextflag == STORE_NONE) { nCel = lvlbtndown ? 3 : 2; ADD_PlrStringXY(PANEL_LEFT + 0, PANEL_TOP - 49, PANEL_LEFT + 120, "Level Up", COL_WHITE); CelDraw(40 + PANEL_X, -17 + PANEL_Y, pChrButtons, nCel, 41); @@ -2480,7 +2480,7 @@ void DrawGoldSplit(int amount) ADD_PlrStringXY(366, 121, 600, "you want to remove?", COL_GOLD); if (amount > 0) { sprintf(tempstr, "%u", amount); - PrintGameStr(388, 140, tempstr, 0); + PrintGameStr(388, 140, tempstr, COL_WHITE); for (i = 0; i < tempstr[i]; i++) { screen_x += fontkern[fontframe[gbFontTransTbl[(BYTE)tempstr[i]]]] + 1; } @@ -2598,7 +2598,7 @@ void DrawTalkPan() CelBlitFrame(gpBuffer + x, pSPentSpn2Cels, frame, 12); frame = (frame & 7) + 1; talk_btn = 0; - for (i = 0; i < 4; i++) { + for (i = 0; i < MAX_PLRS; i++) { if (i == myplr) continue; if (whisper[i]) { diff --git a/Source/cursor.cpp b/Source/cursor.cpp index 577b08d7b..07b564775 100644 --- a/Source/cursor.cpp +++ b/Source/cursor.cpp @@ -185,14 +185,14 @@ void CheckCursMove() sy = MouseY; if (chrflag || questlog) { - if (sx >= 160) { - sx -= 160; + if (sx >= SCREEN_WIDTH / 4) { + sx -= SCREEN_WIDTH / 4; } else { sx = 0; } } else if (invflag || sbookflag) { - if (sx <= 320) { - sx += 160; + if (sx <= SCREEN_WIDTH / 2) { + sx += SCREEN_WIDTH / 4; } else { sx = 0; } diff --git a/Source/diablo.cpp b/Source/diablo.cpp index 405142fb3..6d6d2df6c 100644 --- a/Source/diablo.cpp +++ b/Source/diablo.cpp @@ -348,12 +348,12 @@ void diablo_parse_flags(char *args) args++; } if (_strnicmp("dd_emulate", args, strlen("dd_emulate")) == 0) { - gbEmulate = 1; + gbEmulate = TRUE; args += strlen("dd_emulate"); continue; } if (_strnicmp("dd_backbuf", args, strlen("dd_backbuf")) == 0) { - gbBackBuf = 1; + gbBackBuf = TRUE; args += strlen("dd_backbuf"); continue; } @@ -367,25 +367,25 @@ void diablo_parse_flags(char *args) #ifdef _DEBUG switch (c) { case '^': - debug_mode_key_inverted_v = 1; + debug_mode_key_inverted_v = TRUE; break; case '$': - debug_mode_dollar_sign = 1; + debug_mode_dollar_sign = TRUE; break; case 'b': /* - debug_mode_key_b = 1; + debug_mode_key_b = TRUE; */ break; case 'd': - showintrodebug = 0; - debug_mode_key_d = 1; + showintrodebug = FALSE; + debug_mode_key_d = TRUE; break; case 'f': EnableFrameCount(); break; case 'i': - debug_mode_key_i = 1; + debug_mode_key_i = TRUE; break; case 'j': /* @@ -436,7 +436,7 @@ void diablo_parse_flags(char *args) DebugMonsters[debugmonsttypes++] = i; break; case 'n': - showintrodebug = 0; + showintrodebug = FALSE; break; case 'q': while (isspace(*args)) { @@ -461,7 +461,7 @@ void diablo_parse_flags(char *args) setseed = i; break; case 's': - debug_mode_key_s = 1; + debug_mode_key_s = TRUE; break; case 't': leveldebug = TRUE; @@ -480,7 +480,7 @@ void diablo_parse_flags(char *args) visiondebug = TRUE; break; case 'w': - debug_mode_key_w = 1; + debug_mode_key_w = TRUE; break; case 'x': fullscreen = FALSE; @@ -512,12 +512,12 @@ BOOL diablo_find_window(LPCSTR lpClassName) { HWND hWnd, active; - hWnd = FindWindow(lpClassName, 0); - if (!hWnd) + hWnd = FindWindow(lpClassName, NULL); + if (hWnd == NULL) return FALSE; active = GetLastActivePopup(hWnd); - if (active) + if (active != NULL) hWnd = active; active = GetTopWindow(hWnd); @@ -802,7 +802,7 @@ LRESULT CALLBACK GM_Game(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) BOOL LeftMouseDown(int wParam) { - if (!gmenu_left_mouse(TRUE) && !control_check_talk_btn() && !sgnTimeoutCurs) { + if (!gmenu_left_mouse(TRUE) && !control_check_talk_btn() && sgnTimeoutCurs == CURSOR_NONE) { if (deathflag) { control_check_btn_press(); } else if (PauseMode != 2) { @@ -810,7 +810,7 @@ BOOL LeftMouseDown(int wParam) doom_close(); } else if (spselflag) { SetSpell(); - } else if (stextflag) { + } else if (stextflag != STORE_NONE) { CheckStoreBtn(); } else if (MouseY < PANEL_TOP) { if (!gmenu_is_active() && !TryIconCurs()) { @@ -966,7 +966,7 @@ void LeftMouseUp() ReleaseChrBtns(); if (lvlbtndown) ReleaseLvlBtn(); - if (stextflag) + if (stextflag != STORE_NONE) ReleaseStoreBtn(); } @@ -975,7 +975,7 @@ void RightMouseDown() if (!gmenu_is_active() && sgnTimeoutCurs == CURSOR_NONE && PauseMode != 2 && !plr[myplr]._pInvincible) { if (doomflag) { doom_close(); - } else if (!stextflag) { + } else if (stextflag == STORE_NONE) { if (spselflag) { SetSpell(); } else if (MouseY >= SPANEL_HEIGHT @@ -1038,7 +1038,7 @@ void PressKey(int vkey) } if (deathflag) { - if (sgnTimeoutCurs != 0) { + if (sgnTimeoutCurs != CURSOR_NONE) { return; } if (vkey == VK_F9) { @@ -1068,7 +1068,7 @@ void PressKey(int vkey) return; } - if (sgnTimeoutCurs != 0 || dropGoldFlag) { + if (sgnTimeoutCurs != CURSOR_NONE || dropGoldFlag) { return; } if (vkey == VK_PAUSE) { @@ -1090,7 +1090,7 @@ void PressKey(int vkey) } else if (vkey == VK_F1) { if (helpflag) { helpflag = FALSE; - } else if (stextflag) { + } else if (stextflag != STORE_NONE) { ClearPanel(); AddPanelString("No help available", TRUE); /// BUGFIX: message isn't displayed AddPanelString("while in stores", TRUE); @@ -1253,7 +1253,7 @@ void diablo_pause_game() */ void PressChar(int vkey) { - if (gmenu_is_active() || control_talk_last_key(vkey) || sgnTimeoutCurs != 0 || deathflag) { + if (gmenu_is_active() || control_talk_last_key(vkey) || sgnTimeoutCurs != CURSOR_NONE || deathflag) { return; } if ((char)vkey == 'p' || (char)vkey == 'P') { @@ -1283,7 +1283,7 @@ void PressChar(int vkey) return; case 'I': case 'i': - if (!stextflag) { + if (stextflag == STORE_NONE) { sbookflag = FALSE; invflag = !invflag; if (!invflag || chrflag) { @@ -1299,7 +1299,7 @@ void PressChar(int vkey) return; case 'C': case 'c': - if (!stextflag) { + if (stextflag == STORE_NONE) { questlog = FALSE; chrflag = !chrflag; if (!chrflag || invflag) { @@ -1315,7 +1315,7 @@ void PressChar(int vkey) return; case 'Q': case 'q': - if (!stextflag) { + if (stextflag == STORE_NONE) { chrflag = FALSE; if (!questlog) { StartQuestlog(); @@ -1330,7 +1330,7 @@ void PressChar(int vkey) return; case 'S': case 's': - if (!stextflag) { + if (stextflag == STORE_NONE) { invflag = FALSE; if (!spselflag) { DoSpeedBook(); @@ -1342,7 +1342,7 @@ void PressChar(int vkey) return; case 'B': case 'b': - if (!stextflag) { + if (stextflag == STORE_NONE) { invflag = FALSE; sbookflag = !sbookflag; } @@ -1864,7 +1864,7 @@ void game_logic() return; } - if (!gmenu_is_active() && sgnTimeoutCurs == 0) { + if (!gmenu_is_active() && sgnTimeoutCurs == CURSOR_NONE) { CheckCursMove(); track_process(); } @@ -1911,9 +1911,9 @@ void timeout_cursor(BOOL bTimeout) force_redraw = 255; } scrollrt_draw_game_screen(TRUE); - } else if (sgnTimeoutCurs) { + } else if (sgnTimeoutCurs != CURSOR_NONE) { SetCursor_(sgnTimeoutCurs); - sgnTimeoutCurs = 0; + sgnTimeoutCurs = CURSOR_NONE; ClearPanel(); force_redraw = 255; } diff --git a/Source/dthread.cpp b/Source/dthread.cpp index deeb473e6..b525bc783 100644 --- a/Source/dthread.cpp +++ b/Source/dthread.cpp @@ -62,7 +62,7 @@ void dthread_start() } sghWorkToDoEvent = CreateEvent(NULL, TRUE, FALSE, NULL); - if (!sghWorkToDoEvent) { + if (sghWorkToDoEvent == NULL) { error_buf = TraceLastError(); app_fatal("dthread:1\n%s", error_buf); } @@ -83,7 +83,7 @@ unsigned int __stdcall dthread_handler(void *data) DWORD dwMilliseconds; while (dthread_running) { - if (!sgpInfoHead && WaitForSingleObject(sghWorkToDoEvent, INFINITE) == -1) { + if (!sgpInfoHead && WaitForSingleObject(sghWorkToDoEvent, INFINITE) == WAIT_FAILED) { error_buf = TraceLastError(); app_fatal("dthread4:\n%s", error_buf); } @@ -126,7 +126,7 @@ void dthread_cleanup() dthread_running = FALSE; SetEvent(sghWorkToDoEvent); if (sghThread != INVALID_HANDLE_VALUE && glpDThreadId != GetCurrentThreadId()) { - if (WaitForSingleObject(sghThread, INFINITE) == -1) { + if (WaitForSingleObject(sghThread, INFINITE) == WAIT_FAILED) { error_buf = TraceLastError(); app_fatal("dthread3:\n(%s)", error_buf); } diff --git a/Source/effects.cpp b/Source/effects.cpp index c75005dca..2ef02dd31 100644 --- a/Source/effects.cpp +++ b/Source/effects.cpp @@ -915,6 +915,7 @@ TSFX sgSFX[] = { }; #define PLRSFXS (SFX_WARRIOR | SFX_ROGUE | SFX_SORCEROR) + BOOL effect_is_playing(int nSFX) { TSFX *sfx = &sgSFX[nSFX]; @@ -1096,7 +1097,7 @@ void stream_play(TSFX *pSFX, int lVolume, int lPan) SFileEnableDirectAccess(TRUE); #endif if (!success) { - sghStream = 0; + sghStream = NULL; } else { if (!SFileDdaBeginEx(sghStream, 0x40000, 0, 0, lVolume, lPan, 0)) stream_stop(); diff --git a/Source/gamemenu.cpp b/Source/gamemenu.cpp index bc1e6bdea..b336d8324 100644 --- a/Source/gamemenu.cpp +++ b/Source/gamemenu.cpp @@ -82,7 +82,7 @@ void gamemenu_update_multi(TMenuItem *pMenuItems) void gamemenu_off() { - gmenu_set_items(0, NULL); + gmenu_set_items(NULL, NULL); } void gamemenu_handle_previous() diff --git a/Source/gendung.cpp b/Source/gendung.cpp index 964994c3e..8e0297f95 100644 --- a/Source/gendung.cpp +++ b/Source/gendung.cpp @@ -663,7 +663,7 @@ void DRLG_SetPC() for (j = 0; j < h; j++) { for (i = 0; i < w; i++) { - dFlags[i + x][j + y] |= 8; + dFlags[i + x][j + y] |= BFLAG_POPULATED; } } } @@ -680,7 +680,7 @@ void Make_SetPC(int x, int y, int w, int h) for (j = 0; j < dh; j++) { for (i = 0; i < dw; i++) { - dFlags[i + dx][j + dy] |= 8; + dFlags[i + dx][j + dy] |= BFLAG_POPULATED; } } } diff --git a/Source/gmenu.cpp b/Source/gmenu.cpp index c28a65476..6163a1ecd 100644 --- a/Source/gmenu.cpp +++ b/Source/gmenu.cpp @@ -81,8 +81,8 @@ void gmenu_init_menu() { PentSpin_frame = 1; sgpCurrentMenu = NULL; - sgpCurrItem = 0; - dword_63447C = 0; + sgpCurrItem = NULL; + dword_63447C = NULL; sgCurrentMenuIdx = 0; mouseNavigation = FALSE; sgpLogo = LoadFileInMem("Data\\Diabsmal.CEL", NULL); @@ -246,7 +246,7 @@ BOOL gmenu_presskeys(int vkey) break; case VK_ESCAPE: PlaySFX(IS_TITLEMOV); - gmenu_set_items(0, 0); + gmenu_set_items(NULL, NULL); break; case VK_SPACE: return FALSE; diff --git a/Source/monstdat.cpp b/Source/monstdat.cpp index 7db551da7..3af6488b0 100644 --- a/Source/monstdat.cpp +++ b/Source/monstdat.cpp @@ -124,19 +124,134 @@ MonsterData monsterdata[] = { }; char MonstConvTbl[128] = { - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, - 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - 20, 21, 22, 23, 24, 25, 26, 27, 29, 30, - 31, 32, 34, 35, 36, 37, 38, 40, 39, 41, - 42, 43, 44, 45, 46, 47, 48, 49, 50, 52, - 53, 54, 55, 56, 57, 59, 58, 60, 61, 62, - 63, 64, 65, 66, 67, 68, 69, 70, 71, 0, - 0, 0, 0, 72, 73, 74, 75, 0, 0, 0, - 0, 77, 76, 78, 79, 81, 82, 83, 84, 85, - 86, 87, 88, 89, 90, 92, 91, 93, 94, 95, - 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, - 106, 107, 108, 0, 110, 0, 109, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 80, 111 + MT_NZOMBIE, + MT_BZOMBIE, + MT_GZOMBIE, + MT_YZOMBIE, + MT_RFALLSP, + MT_DFALLSP, + MT_YFALLSP, + MT_BFALLSP, + MT_WSKELAX, + MT_TSKELAX, + MT_RSKELAX, + MT_XSKELAX, + MT_RFALLSD, + MT_DFALLSD, + MT_YFALLSD, + MT_BFALLSD, + MT_NSCAV, + MT_BSCAV, + MT_WSCAV, + MT_YSCAV, + MT_WSKELBW, + MT_TSKELBW, + MT_RSKELBW, + MT_XSKELBW, + MT_WSKELSD, + MT_TSKELSD, + MT_RSKELSD, + MT_XSKELSD, + MT_SNEAK, + MT_STALKER, + MT_UNSEEN, + MT_ILLWEAV, + MT_NGOATMC, + MT_BGOATMC, + MT_RGOATMC, + MT_GGOATMC, + MT_FIEND, + MT_GLOOM, + MT_BLINK, + MT_FAMILIAR, + MT_NGOATBW, + MT_BGOATBW, + MT_RGOATBW, + MT_GGOATBW, + MT_NACID, + MT_RACID, + MT_BACID, + MT_XACID, + MT_SKING, + MT_FAT, + MT_MUDMAN, + MT_TOAD, + MT_FLAYED, + MT_WYRM, + MT_CAVSLUG, + MT_DEVOUR, + MT_DVLWYRM, + MT_NMAGMA, + MT_YMAGMA, + MT_BMAGMA, + MT_WMAGMA, + MT_HORNED, + MT_MUDRUN, + MT_FROSTC, + MT_OBLORD, + MT_BONEDMN, + MT_REDDTH, + MT_LTCHDMN, + MT_UDEDBLRG, + MT_NZOMBIE, + MT_NZOMBIE, + MT_NZOMBIE, + MT_NZOMBIE, + MT_INCIN, + MT_FLAMLRD, + MT_DOOMFIRE, + MT_HELLBURN, + MT_NZOMBIE, + MT_NZOMBIE, + MT_NZOMBIE, + MT_NZOMBIE, + MT_RSTORM, + MT_STORM, + MT_STORML, + MT_MAEL, + MT_WINGED, + MT_GARGOYLE, + MT_BLOODCLW, + MT_DEATHW, + MT_MEGA, + MT_GUARD, + MT_VTEXLRD, + MT_BALROG, + MT_NSNAKE, + MT_RSNAKE, + MT_GSNAKE, + MT_BSNAKE, + MT_NBLACK, + MT_RTBLACK, + MT_BTBLACK, + MT_RBLACK, + MT_UNRAV, + MT_HOLOWONE, + MT_PAINMSTR, + MT_REALWEAV, + MT_SUCCUBUS, + MT_SNOWWICH, + MT_HLSPWN, + MT_SOLBRNR, + MT_COUNSLR, + MT_MAGISTR, + MT_CABALIST, + MT_ADVOCATE, + MT_NZOMBIE, + MT_DIABLO, + MT_NZOMBIE, + MT_GOLEM, + MT_NZOMBIE, + MT_NZOMBIE, + MT_NZOMBIE, + MT_NZOMBIE, + MT_NZOMBIE, + MT_NZOMBIE, + MT_NZOMBIE, + MT_NZOMBIE, + MT_NZOMBIE, + MT_BIGFALL, + MT_DARKMAGE, }; /** diff --git a/enums.h b/enums.h index 6d8562ba2..47407cc6b 100644 --- a/enums.h +++ b/enums.h @@ -1482,7 +1482,8 @@ typedef enum _monster_id { MT_ADVOCATE = 0x6C, MT_GOLEM = 0x6D, MT_DIABLO = 0x6E, - NUM_MTYPES, + MT_DARKMAGE = 0x6F, + NUM_MTYPES = 0x6F, /// BUGFIX the count is off by one } _monster_id; // this enum contains indexes from UniqMonst array for special unique monsters (usually quest related) From c09c37ec2197610c13de26641a9548fbb5ee377b Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Wed, 8 Apr 2020 17:39:48 +0200 Subject: [PATCH 03/15] Create define for monsterAvailTbl --- Source/monstdat.cpp | 231 ++++++++++++++++++++++---------------------- 1 file changed, 116 insertions(+), 115 deletions(-) diff --git a/Source/monstdat.cpp b/Source/monstdat.cpp index 3af6488b0..727d79908 100644 --- a/Source/monstdat.cpp +++ b/Source/monstdat.cpp @@ -254,124 +254,125 @@ char MonstConvTbl[128] = { MT_DARKMAGE, }; +#define MAT_NEVER 0 +#define MAT_ALWAYS 1 +#define MAT_RETAIL 2 /** - * 0 = Never avalible - * 1 = Avalible in retail and shareware - * 2 = avalible in retail only + * Define what version a monster type is available in */ BYTE MonstAvailTbl[] = { - 1, // Zombie - 1, // Ghoul - 1, // Rotting Carcass - 1, // Black Death - 1, // Fallen One - 1, // Carver - 1, // Devil Kin - 1, // Dark One - 1, // Skeleton - 1, // Corpse Axe - 1, // Burning Dead - 1, // Horror - 1, // Fallen One - 1, // Carver - 1, // Devil Kin - 1, // Dark One - 1, // Scavenger - 1, // Plague Eater - 1, // Shadow Beast - 1, // Bone Gasher - 1, // Skeleton - 1, // Corpse Bow - 1, // Burning Dead - 1, // Horror - 1, // Skeleton Captain - 1, // Corpse Captain - 1, // Burning Dead Captain - 1, // Horror Captain - 0, // Invisible Lord - 2, // Hidden - 2, // Stalker - 2, // Unseen - 2, // Illusion Weaver - 0, // Lord Sayter - 2, // Flesh Clan - 2, // Stone Clan - 2, // Fire Clan - 2, // Night Clan - 1, // Fiend - 1, // Blink - 1, // Gloom - 1, // Familiar - 2, // Flesh Clan - 2, // Stone Clan - 2, // Fire Clan - 2, // Night Clan - 2, // Acid Beast - 2, // Poison Spitter - 2, // Pit Beast - 2, // Lava Maw - 0, // Skeleton King - 0, // The Butcher - 2, // Overlord - 2, // Mud Man - 2, // Toad Demon - 2, // Flayed One - 0, // Wyrm - 0, // Cave Slug - 0, // Devil Wyrm - 0, // Devourer - 2, // Magma Demon - 2, // Blood Stone - 2, // Hell Stone - 2, // Lava Lord - 2, // Horned Demon - 2, // Mud Runner - 2, // Frost Charger - 2, // Obsidian Lord - 0, // Bone Demon (oldboned in Hellfire) - 0, // Red Death - 0, // Litch Demon - 0, // Undead Balrog - 0, // Incinerator - 0, // Flame Lord - 0, // Doom Fire - 0, // Hell Burner - 2, // Red Storm - 2, // Storm Rider - 2, // Storm Lord - 2, // Maelstorm - 0, // Devil Kin Brute - 2, // Winged-Demon - 2, // Gargoyle - 2, // Blood Claw - 2, // Death Wing - 2, // Slayer - 2, // Guardian - 2, // Vortex Lord - 2, // Balrog - 2, // Cave Viper - 2, // Fire Drake - 2, // Gold Viper - 2, // Azure Drake - 2, // Black Knight - 2, // Doom Guard - 2, // Steel Lord - 2, // Blood Knight - 0, // Unraveler - 0, // Hollow One - 0, // Pain Master - 0, // Reality Weaver - 2, // Succubus - 2, // Snow Witch - 2, // Hell Spawn - 2, // Soul Burner - 2, // Counselor - 2, // Magistrate - 2, // Cabalist - 2, // Advocate - 0, // Golem - 0, // The Dark Lord - 0, // The Arch-Litch Malignus + MAT_ALWAYS, // Zombie + MAT_ALWAYS, // Ghoul + MAT_ALWAYS, // Rotting Carcass + MAT_ALWAYS, // Black Death + MAT_ALWAYS, // Fallen One + MAT_ALWAYS, // Carver + MAT_ALWAYS, // Devil Kin + MAT_ALWAYS, // Dark One + MAT_ALWAYS, // Skeleton + MAT_ALWAYS, // Corpse Axe + MAT_ALWAYS, // Burning Dead + MAT_ALWAYS, // Horror + MAT_ALWAYS, // Fallen One + MAT_ALWAYS, // Carver + MAT_ALWAYS, // Devil Kin + MAT_ALWAYS, // Dark One + MAT_ALWAYS, // Scavenger + MAT_ALWAYS, // Plague Eater + MAT_ALWAYS, // Shadow Beast + MAT_ALWAYS, // Bone Gasher + MAT_ALWAYS, // Skeleton + MAT_ALWAYS, // Corpse Bow + MAT_ALWAYS, // Burning Dead + MAT_ALWAYS, // Horror + MAT_ALWAYS, // Skeleton Captain + MAT_ALWAYS, // Corpse Captain + MAT_ALWAYS, // Burning Dead Captain + MAT_ALWAYS, // Horror Captain + MAT_NEVER, // Invisible Lord + MAT_RETAIL, // Hidden + MAT_RETAIL, // Stalker + MAT_RETAIL, // Unseen + MAT_RETAIL, // Illusion Weaver + MAT_NEVER, // Lord Sayter + MAT_RETAIL, // Flesh Clan + MAT_RETAIL, // Stone Clan + MAT_RETAIL, // Fire Clan + MAT_RETAIL, // Night Clan + MAT_ALWAYS, // Fiend + MAT_ALWAYS, // Blink + MAT_ALWAYS, // Gloom + MAT_ALWAYS, // Familiar + MAT_RETAIL, // Flesh Clan + MAT_RETAIL, // Stone Clan + MAT_RETAIL, // Fire Clan + MAT_RETAIL, // Night Clan + MAT_RETAIL, // Acid Beast + MAT_RETAIL, // Poison Spitter + MAT_RETAIL, // Pit Beast + MAT_RETAIL, // Lava Maw + MAT_NEVER, // Skeleton King + MAT_NEVER, // The Butcher + MAT_RETAIL, // Overlord + MAT_RETAIL, // Mud Man + MAT_RETAIL, // Toad Demon + MAT_RETAIL, // Flayed One + MAT_NEVER, // Wyrm + MAT_NEVER, // Cave Slug + MAT_NEVER, // Devil Wyrm + MAT_NEVER, // Devourer + MAT_RETAIL, // Magma Demon + MAT_RETAIL, // Blood Stone + MAT_RETAIL, // Hell Stone + MAT_RETAIL, // Lava Lord + MAT_RETAIL, // Horned Demon + MAT_RETAIL, // Mud Runner + MAT_RETAIL, // Frost Charger + MAT_RETAIL, // Obsidian Lord + MAT_NEVER, // Bone Demon (oldboned in Hellfire) + MAT_NEVER, // Red Death + MAT_NEVER, // Litch Demon + MAT_NEVER, // Undead Balrog + MAT_NEVER, // Incinerator + MAT_NEVER, // Flame Lord + MAT_NEVER, // Doom Fire + MAT_NEVER, // Hell Burner + MAT_RETAIL, // Red Storm + MAT_RETAIL, // Storm Rider + MAT_RETAIL, // Storm Lord + MAT_RETAIL, // Maelstorm + MAT_NEVER, // Devil Kin Brute + MAT_RETAIL, // Winged-Demon + MAT_RETAIL, // Gargoyle + MAT_RETAIL, // Blood Claw + MAT_RETAIL, // Death Wing + MAT_RETAIL, // Slayer + MAT_RETAIL, // Guardian + MAT_RETAIL, // Vortex Lord + MAT_RETAIL, // Balrog + MAT_RETAIL, // Cave Viper + MAT_RETAIL, // Fire Drake + MAT_RETAIL, // Gold Viper + MAT_RETAIL, // Azure Drake + MAT_RETAIL, // Black Knight + MAT_RETAIL, // Doom Guard + MAT_RETAIL, // Steel Lord + MAT_RETAIL, // Blood Knight + MAT_NEVER, // Unraveler + MAT_NEVER, // Hollow One + MAT_NEVER, // Pain Master + MAT_NEVER, // Reality Weaver + MAT_RETAIL, // Succubus + MAT_RETAIL, // Snow Witch + MAT_RETAIL, // Hell Spawn + MAT_RETAIL, // Soul Burner + MAT_RETAIL, // Counselor + MAT_RETAIL, // Magistrate + MAT_RETAIL, // Cabalist + MAT_RETAIL, // Advocate + MAT_NEVER, // Golem + MAT_NEVER, // The Dark Lord + MAT_NEVER, // The Arch-Litch Malignus }; UniqMonstStruct UniqMonst[] = { From 1340192b594e984af3e9f84f5570c20f02b32a57 Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Wed, 8 Apr 2020 17:52:07 +0200 Subject: [PATCH 04/15] Correct array sizes --- Source/diablo.cpp | 8 ++++---- Source/diablo.h | 8 ++++---- Source/gamemenu.cpp | 6 +++--- Source/gmenu.cpp | 6 +++--- Source/gmenu.h | 4 ++-- Source/monstdat.cpp | 2 +- Source/monstdat.h | 2 +- 7 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Source/diablo.cpp b/Source/diablo.cpp index 6d6d2df6c..29ab4a27f 100644 --- a/Source/diablo.cpp +++ b/Source/diablo.cpp @@ -8,19 +8,19 @@ #include "../DiabloUI/diabloui.h" HWND ghMainWnd; -int glMid1Seed[NUMLEVELS]; -int glMid2Seed[NUMLEVELS]; +int glMid1Seed[NUMLEVELS + 1]; +int glMid2Seed[NUMLEVELS + 1]; int gnLevelTypeTbl[NUMLEVELS]; int MouseX; int MouseY; BOOL gbGameLoopStartup; DWORD glSeedTbl[NUMLEVELS]; BOOL gbRunGame; -int glMid3Seed[NUMLEVELS]; +int glMid3Seed[NUMLEVELS + 1]; BOOL gbRunGameResult; BOOL zoomflag; BOOL gbProcessPlayers; -int glEndSeed[NUMLEVELS]; +int glEndSeed[NUMLEVELS + 1]; BOOL gbLoadGame; HINSTANCE ghInst; int DebugMonsters[10]; diff --git a/Source/diablo.h b/Source/diablo.h index 10197bd18..0fa2d3467 100644 --- a/Source/diablo.h +++ b/Source/diablo.h @@ -7,19 +7,19 @@ #define __DIABLO_H__ extern HWND ghMainWnd; -extern int glMid1Seed[NUMLEVELS]; -extern int glMid2Seed[NUMLEVELS]; +extern int glMid1Seed[NUMLEVELS + 1]; +extern int glMid2Seed[NUMLEVELS + 1]; extern int gnLevelTypeTbl[NUMLEVELS]; extern int MouseX; extern int MouseY; extern BOOL gbGameLoopStartup; extern DWORD glSeedTbl[NUMLEVELS]; extern BOOL gbRunGame; -extern int glMid3Seed[NUMLEVELS]; +extern int glMid3Seed[NUMLEVELS + 1]; extern BOOL gbRunGameResult; extern BOOL zoomflag; extern BOOL gbProcessPlayers; -extern int glEndSeed[NUMLEVELS]; +extern int glEndSeed[NUMLEVELS + 1]; extern BOOL gbLoadGame; extern HINSTANCE ghInst; extern int DebugMonsters[10]; diff --git a/Source/gamemenu.cpp b/Source/gamemenu.cpp index b336d8324..354622e14 100644 --- a/Source/gamemenu.cpp +++ b/Source/gamemenu.cpp @@ -6,7 +6,7 @@ #include "all.h" /** Contains the game menu items of the single player menu. */ -TMenuItem sgSingleMenu[6] = { +TMenuItem sgSingleMenu[] = { // clang-format off // dwFlags, pszStr, fnMenu { GMENU_ENABLED, "Save Game", &gamemenu_save_game }, @@ -18,7 +18,7 @@ TMenuItem sgSingleMenu[6] = { // clang-format on }; /** Contains the game menu items of the multi player menu. */ -TMenuItem sgMultiMenu[5] = { +TMenuItem sgMultiMenu[] = { // clang-format off // dwFlags, pszStr, fnMenu { GMENU_ENABLED, "Options", &gamemenu_options }, @@ -28,7 +28,7 @@ TMenuItem sgMultiMenu[5] = { { GMENU_ENABLED, NULL, NULL } // clang-format on }; -TMenuItem sgOptionsMenu[6] = { +TMenuItem sgOptionsMenu[] = { // clang-format off // dwFlags, pszStr, fnMenu { GMENU_ENABLED | GMENU_SLIDER, NULL, &gamemenu_music_volume }, diff --git a/Source/gmenu.cpp b/Source/gmenu.cpp index 6163a1ecd..8235e1c1c 100644 --- a/Source/gmenu.cpp +++ b/Source/gmenu.cpp @@ -19,7 +19,7 @@ BYTE *sgpLogo; int sgCurrentMenuIdx; /** Maps from font index to bigtgold.cel frame number. */ -const BYTE lfontframe[127] = { +const BYTE lfontframe[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -32,11 +32,11 @@ const BYTE lfontframe[127] = { 26, 42, 0, 43, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, - 24, 25, 26, 20, 0, 21, 0 + 24, 25, 26, 20, 0, 21, 0, 0 }; /** Maps from bigtgold.cel frame number to character width. */ -const BYTE lfontkern[56] = { +const BYTE lfontkern[] = { 18, 33, 21, 26, 28, 19, 19, 26, 25, 11, 12, 25, 19, 34, 28, 32, 20, 32, 28, 20, 28, 36, 35, 46, 33, 33, 24, 11, 23, 22, diff --git a/Source/gmenu.h b/Source/gmenu.h index 8cdb3878c..2f028b214 100644 --- a/Source/gmenu.h +++ b/Source/gmenu.h @@ -40,7 +40,7 @@ void gmenu_slider_steps(TMenuItem *pItem, int dwTicks); /* rdata */ -extern const BYTE lfontframe[127]; -extern const BYTE lfontkern[56]; +extern const BYTE lfontframe[]; +extern const BYTE lfontkern[]; #endif /* __GMENU_H__ */ diff --git a/Source/monstdat.cpp b/Source/monstdat.cpp index 727d79908..fb86ee003 100644 --- a/Source/monstdat.cpp +++ b/Source/monstdat.cpp @@ -123,7 +123,7 @@ MonsterData monsterdata[] = { // clang-format on }; -char MonstConvTbl[128] = { +BYTE MonstConvTbl[] = { MT_NZOMBIE, MT_BZOMBIE, MT_GZOMBIE, diff --git a/Source/monstdat.h b/Source/monstdat.h index 2a4e845c5..28de9975f 100644 --- a/Source/monstdat.h +++ b/Source/monstdat.h @@ -7,7 +7,7 @@ #define __MONSTDAT_H__ extern MonsterData monsterdata[]; -extern char MonstConvTbl[128]; +extern BYTE MonstConvTbl[]; extern BYTE MonstAvailTbl[]; extern UniqMonstStruct UniqMonst[]; From 6704657e7124f544a9658b2c1d80ea64cb67b528 Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Wed, 8 Apr 2020 17:46:48 +0200 Subject: [PATCH 05/15] Apply sematic codestyle --- Source/automap.cpp | 14 ++--- Source/codec.cpp | 2 +- Source/control.cpp | 6 +- Source/diablo.cpp | 4 +- Source/encrypt.cpp | 4 +- Source/engine.cpp | 142 ++++++++++++++++++++++---------------------- Source/gamemenu.cpp | 18 +++--- Source/gendung.cpp | 10 ++-- Source/gmenu.cpp | 2 +- 9 files changed, 101 insertions(+), 101 deletions(-) diff --git a/Source/automap.cpp b/Source/automap.cpp index feb25ad67..557f12ec7 100644 --- a/Source/automap.cpp +++ b/Source/automap.cpp @@ -96,7 +96,7 @@ void InitAutomap() return; } - dwTiles >>= 1; + dwTiles /= 2; pTmp = pAFile; for (i = 1; i <= dwTiles; i++) { @@ -234,7 +234,7 @@ void DrawAutomap() for (j = 0; j < cells; j++) { WORD maptype = GetAutomapType(mapx + j, mapy - j, TRUE); - if (maptype) + if (maptype != 0) DrawAutomapTile(x, sy, maptype); x += AmLine64; } @@ -243,7 +243,7 @@ void DrawAutomap() y = sy + AmLine16; for (j = 0; j <= cells; j++) { WORD maptype = GetAutomapType(mapx + j, mapy - j, TRUE); - if (maptype) + if (maptype != 0) DrawAutomapTile(x, y, maptype); x += AmLine64; } @@ -366,7 +366,7 @@ void DrawAutomapTile(int sx, int sy, WORD automap_type) DrawLine(sx, sy, x1, y2, COLOR_DIM); DrawLine(sx, sy, x2, y2, COLOR_DIM); } - if (!(flags & (MAPFLAG_VERTDOOR | MAPFLAG_VERTGRATE | MAPFLAG_VERTARCH))) + if ((flags & (MAPFLAG_VERTDOOR | MAPFLAG_VERTGRATE | MAPFLAG_VERTARCH)) == 0) DrawLine(sx, sy - AmLine16, sx - AmLine32, sy, COLOR_DIM); } @@ -399,7 +399,7 @@ void DrawAutomapTile(int sx, int sy, WORD automap_type) DrawLine(sx, sy, x1, y2, COLOR_DIM); DrawLine(sx, sy, x2, y2, COLOR_DIM); } - if (!(flags & (MAPFLAG_HORZDOOR | MAPFLAG_HORZGRATE | MAPFLAG_HORZARCH))) + if ((flags & (MAPFLAG_HORZDOOR | MAPFLAG_HORZGRATE | MAPFLAG_HORZARCH)) == 0) DrawLine(sx, sy - AmLine16, sx + AmLine32, sy, COLOR_DIM); } @@ -567,9 +567,9 @@ void DrawAutomapText() nextline = 50; } } - if (setlevel) + if (setlevel) { PrintGameStr(8, nextline, quest_level_names[(BYTE)setlvlnum], COL_GOLD); - else if (currlevel) { + } else if (currlevel) { sprintf(desc, "Level: %i", currlevel); PrintGameStr(8, nextline, desc, COL_GOLD); } diff --git a/Source/codec.cpp b/Source/codec.cpp index cb78b9835..0411fcefd 100644 --- a/Source/codec.cpp +++ b/Source/codec.cpp @@ -136,7 +136,7 @@ void codec_encode(BYTE *pbSrcDst, DWORD size, int size_64, char *pszPassword) sig = (CodecSignature *)pbSrcDst; sig->error = 0; sig->unused = 0; - sig->checksum = *(DWORD *)tmp; + sig->checksum = *(DWORD *)&tmp[0]; sig->last_chunk_size = last_chunk; SHA1Clear(); } diff --git a/Source/control.cpp b/Source/control.cpp index 8482c6150..5bdd2ea44 100644 --- a/Source/control.cpp +++ b/Source/control.cpp @@ -2515,7 +2515,7 @@ void control_drop_gold(char vkey) input[strlen(input) - 1] = '\0'; dropGoldValue = atoi(input); } else if (vkey - '0' >= 0 && vkey - '0' <= 9) { - if (dropGoldValue || atoi(input) <= initialDropGoldValue) { + if (dropGoldValue != 0 || atoi(input) <= initialDropGoldValue) { input[strlen(input)] = vkey; if (atoi(input) > initialDropGoldValue) return; @@ -2643,7 +2643,7 @@ char *control_print_talk_msg(char *msg, int x, int y, int *nOffset, int color) if (width > 514 + PANEL_LEFT) return msg; msg++; - if (c) { + if (c != 0) { PrintChar(*nOffset, c, color); } *nOffset += fontkern[c] + 1; @@ -2795,7 +2795,7 @@ void control_press_enter() int i; BYTE talk_save; - if (sgszTalkMsg[0]) { + if (sgszTalkMsg[0] != 0) { control_reset_talk_msg(sgszTalkMsg); for (i = 0; i < 8; i++) { if (!strcmp(sgszTalkSave[i], sgszTalkMsg)) diff --git a/Source/diablo.cpp b/Source/diablo.cpp index 29ab4a27f..97bc81910 100644 --- a/Source/diablo.cpp +++ b/Source/diablo.cpp @@ -585,7 +585,7 @@ void diablo_reload_process(HINSTANCE hInstance) ExitProcess(0); } - if (InterlockedIncrement(plMap) == 0) { + if (InterlockedIncrement(&plMap[0]) == 0) { plMap[1] = GetCurrentProcessId(); } else { hPrev = GetForegroundWindow(); @@ -832,7 +832,7 @@ BOOL LeftMouseDown(int wParam) SetCursor_(CURSOR_HAND); } } else { - if (plr[myplr]._pStatPts && !spselflag) + if (plr[myplr]._pStatPts != 0 && !spselflag) CheckLvlBtn(); if (!lvlbtndown) return LeftMouseCmd(wParam == MK_SHIFT + MK_LBUTTON); diff --git a/Source/encrypt.cpp b/Source/encrypt.cpp index dd4d0a4a2..f3f81d4d4 100644 --- a/Source/encrypt.cpp +++ b/Source/encrypt.cpp @@ -85,8 +85,8 @@ int PkwareCompress(void *buf, int size) ptr = (char *)DiabloAllocPtr(CMP_BUFFER_SIZE); destSize = 2 * size; - if (destSize < 8192) - destSize = 8192; + if (destSize < 2 * 4096) + destSize = 2 * 4096; destData = (BYTE *)DiabloAllocPtr(destSize); diff --git a/Source/engine.cpp b/Source/engine.cpp index 2107a8333..ab70bbd7d 100644 --- a/Source/engine.cpp +++ b/Source/engine.cpp @@ -83,10 +83,10 @@ void CelBlit(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth) int w; /// ASSERT: assert(pDecodeTo != NULL); - if (!pDecodeTo) + if (pDecodeTo == NULL) return; /// ASSERT: assert(pRLEBytes != NULL); - if (!pRLEBytes) + if (pRLEBytes == NULL) return; #ifdef USE_ASM @@ -191,10 +191,10 @@ void CelDraw(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth) BYTE *pRLEBytes; /// ASSERT: assert(gpBuffer); - if (!gpBuffer) + if (gpBuffer == NULL) return; /// ASSERT: assert(pCelBuff != NULL); - if (!pCelBuff) + if (pCelBuff == NULL) return; pRLEBytes = CelGetFrame(pCelBuff, nCel, &nDataSize); @@ -214,10 +214,10 @@ void CelBlitFrame(BYTE *pBuff, BYTE *pCelBuff, int nCel, int nWidth) BYTE *pRLEBytes; /// ASSERT: assert(pCelBuff != NULL); - if (!pCelBuff) + if (pCelBuff == NULL) return; /// ASSERT: assert(pBuff != NULL); - if (!pBuff) + if (pBuff == NULL) return; pRLEBytes = CelGetFrame(pCelBuff, nCel, &nDataSize); @@ -241,10 +241,10 @@ void CelClippedDraw(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int Ce int nDataStart, nDataSize, nDataCap; /// ASSERT: assert(gpBuffer); - if (!gpBuffer) + if (gpBuffer == NULL) return; /// ASSERT: assert(pCelBuff != NULL); - if (!pCelBuff) + if (pCelBuff == NULL) return; pFrameTable = (DWORD *)pCelBuff; @@ -287,10 +287,10 @@ void CelClippedBlit(BYTE *pBuff, BYTE *pCelBuff, int nCel, int nWidth, int CelSk int nDataStart, nDataSize, nDataCap; /// ASSERT: assert(pCelBuff != NULL); - if (!pCelBuff) + if (pCelBuff == NULL) return; /// ASSERT: assert(pBuff != NULL); - if (!pBuff) + if (pBuff == NULL) return; pFrameTable = (DWORD *)pCelBuff; @@ -326,10 +326,10 @@ void CelBlitLight(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth) BYTE *tbl; /// ASSERT: assert(pDecodeTo != NULL); - if (!pDecodeTo) + if (pDecodeTo == NULL) return; /// ASSERT: assert(pRLEBytes != NULL); - if (!pRLEBytes) + if (pRLEBytes == NULL) return; #ifdef USE_ASM @@ -487,10 +487,10 @@ void CelBlitLightTrans(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWid BYTE *tbl; /// ASSERT: assert(pDecodeTo != NULL); - if (!pDecodeTo) + if (pDecodeTo == NULL) return; /// ASSERT: assert(pRLEBytes != NULL); - if (!pRLEBytes) + if (pRLEBytes == NULL) return; #ifdef USE_ASM @@ -681,10 +681,10 @@ void CelDrawLight(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth) BYTE *pDecodeTo, *pRLEBytes; /// ASSERT: assert(gpBuffer); - if (!gpBuffer) + if (gpBuffer == NULL) return; /// ASSERT: assert(pCelBuff != NULL); - if (!pCelBuff) + if (pCelBuff == NULL) return; pRLEBytes = CelGetFrame(pCelBuff, nCel, &nDataSize); @@ -713,10 +713,10 @@ void CelClippedDrawLight(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, i DWORD *pFrameTable; /// ASSERT: assert(gpBuffer); - if (!gpBuffer) + if (gpBuffer == NULL) return; /// ASSERT: assert(pCelBuff != NULL); - if (!pCelBuff) + if (pCelBuff == NULL) return; pFrameTable = (DWORD *)pCelBuff; @@ -761,10 +761,10 @@ void CelClippedBlitLightTrans(BYTE *pBuff, BYTE *pCelBuff, int nCel, int nWidth, DWORD *pFrameTable; /// ASSERT: assert(pCelBuff != NULL); - if (!pCelBuff) + if (pCelBuff == NULL) return; /// ASSERT: assert(pBuff != NULL); - if (!pBuff) + if (pBuff == NULL) return; pFrameTable = (DWORD *)pCelBuff; @@ -812,10 +812,10 @@ void CelDrawLightRed(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int C DWORD *pFrameTable; /// ASSERT: assert(gpBuffer); - if (!gpBuffer) + if (gpBuffer == NULL) return; /// ASSERT: assert(pCelBuff != NULL); - if (!pCelBuff) + if (pCelBuff == NULL) return; pFrameTable = (DWORD *)pCelBuff; @@ -840,7 +840,7 @@ void CelDrawLightRed(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int C idx = light4flag ? 1024 : 4096; if (light == 2) - idx += 256; + idx += 256; // gray colors if (light >= 4) idx += (light - 1) << 8; @@ -930,13 +930,13 @@ void CelBlitSafe(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth) int w; /// ASSERT: assert(pDecodeTo != NULL); - if (!pDecodeTo) + if (pDecodeTo == NULL) return; /// ASSERT: assert(pRLEBytes != NULL); - if (!pRLEBytes) + if (pRLEBytes == NULL) return; /// ASSERT: assert(gpBuffer); - if (!gpBuffer) + if (gpBuffer == NULL) return; #ifdef USE_ASM @@ -1055,10 +1055,10 @@ void CelClippedDrawSafe(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, in int nDataStart, nDataSize, nDataCap; /// ASSERT: assert(gpBuffer); - if (!gpBuffer) + if (gpBuffer == NULL) return; /// ASSERT: assert(pCelBuff != NULL); - if (!pCelBuff) + if (pCelBuff == NULL) return; pFrameTable = (DWORD *)pCelBuff; @@ -1101,10 +1101,10 @@ void CelClippedBlitSafe(BYTE *pBuff, BYTE *pCelBuff, int nCel, int nWidth, int C int nDataStart, nDataSize, nDataCap; /// ASSERT: assert(pCelBuff != NULL); - if (!pCelBuff) + if (pCelBuff == NULL) return; /// ASSERT: assert(pBuff != NULL); - if (!pBuff) + if (pBuff == NULL) return; pFrameTable = (DWORD *)pCelBuff; @@ -1140,13 +1140,13 @@ void CelBlitLightSafe(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidt BYTE *tbl; /// ASSERT: assert(pDecodeTo != NULL); - if (!pDecodeTo) + if (pDecodeTo == NULL) return; /// ASSERT: assert(pRLEBytes != NULL); - if (!pRLEBytes) + if (pRLEBytes == NULL) return; /// ASSERT: assert(gpBuffer); - if (!gpBuffer) + if (gpBuffer == NULL) return; #ifdef USE_ASM @@ -1316,13 +1316,13 @@ void CelBlitLightTransSafe(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int BYTE *tbl; /// ASSERT: assert(pDecodeTo != NULL); - if (!pDecodeTo) + if (pDecodeTo == NULL) return; /// ASSERT: assert(pRLEBytes != NULL); - if (!pRLEBytes) + if (pRLEBytes == NULL) return; /// ASSERT: assert(gpBuffer); - if (!gpBuffer) + if (gpBuffer == NULL) return; #ifdef USE_ASM @@ -1527,10 +1527,10 @@ void CelDrawLightSafe(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int DWORD *pFrameTable; /// ASSERT: assert(gpBuffer); - if (!gpBuffer) + if (gpBuffer == NULL) return; /// ASSERT: assert(pCelBuff != NULL); - if (!pCelBuff) + if (pCelBuff == NULL) return; pFrameTable = (DWORD *)pCelBuff; @@ -1575,7 +1575,7 @@ void CelClippedBlitLightTransSafe(BYTE *pBuff, BYTE *pCelBuff, int nCel, int nWi DWORD *pFrameTable; /// ASSERT: assert(pCelBuff != NULL); - if (!pCelBuff) + if (pCelBuff == NULL) return; pFrameTable = (DWORD *)pCelBuff; @@ -1623,10 +1623,10 @@ void CelDrawLightRedSafe(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, i DWORD *pFrameTable; /// ASSERT: assert(gpBuffer); - if (!gpBuffer) + if (gpBuffer == NULL) return; /// ASSERT: assert(pCelBuff != NULL); - if (!pCelBuff) + if (pCelBuff == NULL) return; pFrameTable = (DWORD *)pCelBuff; @@ -1651,7 +1651,7 @@ void CelDrawLightRedSafe(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, i idx = light4flag ? 1024 : 4096; if (light == 2) - idx += 256; + idx += 256; // gray colors if (light >= 4) idx += (light - 1) << 8; @@ -1752,10 +1752,10 @@ void CelBlitWidth(BYTE *pBuff, int x, int y, int wdt, BYTE *pCelBuff, int nCel, BYTE *pRLEBytes, *dst, *end; /// ASSERT: assert(pCelBuff != NULL); - if (!pCelBuff) + if (pCelBuff == NULL) return; /// ASSERT: assert(pBuff != NULL); - if (!pBuff) + if (pBuff == NULL) return; #ifdef USE_ASM @@ -1878,10 +1878,10 @@ void CelBlitOutline(char col, int sx, int sy, BYTE *pCelBuff, int nCel, int nWid BYTE *pRLEBytes, *dst; /// ASSERT: assert(pCelBuff != NULL); - if (!pCelBuff) + if (pCelBuff == NULL) return; /// ASSERT: assert(gpBuffer); - if (!gpBuffer) + if (gpBuffer == NULL) return; #ifdef USE_ASM @@ -1906,11 +1906,11 @@ void CelBlitOutline(char col, int sx, int sy, BYTE *pCelBuff, int nCel, int nWid mov nDataCap, eax } - if (!nDataStart) return; + if (nDataStart == 0) return; if (CelCap == 8) nDataCap = 0; - if (nDataCap) + if (nDataCap != 0) nDataSize = nDataCap - nDataStart; else nDataSize -= nDataStart; @@ -2026,10 +2026,10 @@ void CelBlitOutlineSafe(char col, int sx, int sy, BYTE *pCelBuff, int nCel, int BYTE *pRLEBytes, *dst; /// ASSERT: assert(pCelBuff != NULL); - if (!pCelBuff) + if (pCelBuff == NULL) return; /// ASSERT: assert(gpBuffer); - if (!gpBuffer) + if (gpBuffer == NULL) return; #ifdef USE_ASM @@ -2054,11 +2054,11 @@ void CelBlitOutlineSafe(char col, int sx, int sy, BYTE *pCelBuff, int nCel, int mov nDataCap, eax } - if (!nDataStart) return; + if (nDataStart == 0) return; if (CelCap == 8) nDataCap = 0; - if (nDataCap) + if (nDataCap != 0) nDataSize = nDataCap - nDataStart; else nDataSize -= nDataStart; @@ -2741,12 +2741,12 @@ void Cl2Draw(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int nDataStart, nDataSize; /// ASSERT: assert(gpBuffer != NULL); - if (!gpBuffer) + if (gpBuffer == NULL) return; /// ASSERT: assert(pCelBuff != NULL); - if (!pCelBuff) + if (pCelBuff == NULL) return; - /// ASSERT: assert(nCel > 0); + assert(nCel > 0); if (nCel <= 0) return; @@ -2937,10 +2937,10 @@ void Cl2DrawOutline(char col, int sx, int sy, BYTE *pCelBuff, int nCel, int nWid DWORD *pFrameTable; /// ASSERT: assert(gpBuffer != NULL); - if (!gpBuffer) + if (gpBuffer == NULL) return; /// ASSERT: assert(pCelBuff != NULL); - if (!pCelBuff) + if (pCelBuff == NULL) return; /// ASSERT: assert(nCel > 0); if (nCel <= 0) @@ -3156,10 +3156,10 @@ void Cl2DrawLightTbl(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int C DWORD *pFrameTable; /// ASSERT: assert(gpBuffer != NULL); - if (!gpBuffer) + if (gpBuffer == NULL) return; /// ASSERT: assert(pCelBuff != NULL); - if (!pCelBuff) + if (pCelBuff == NULL) return; /// ASSERT: assert(nCel > 0); if (nCel <= 0) @@ -3185,7 +3185,7 @@ void Cl2DrawLightTbl(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int C idx = light4flag ? 1024 : 4096; if (light == 2) - idx += 256; + idx += 256; // gray colors if (light >= 4) idx += (light - 1) << 8; @@ -3372,10 +3372,10 @@ void Cl2DrawLight(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelS DWORD *pFrameTable; /// ASSERT: assert(gpBuffer != NULL); - if (!gpBuffer) + if (gpBuffer == NULL) return; /// ASSERT: assert(pCelBuff != NULL); - if (!pCelBuff) + if (pCelBuff == NULL) return; /// ASSERT: assert(nCel > 0); if (nCel <= 0) @@ -3422,10 +3422,10 @@ void Cl2DrawSafe(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSk int nDataStart, nDataSize; /// ASSERT: assert(gpBuffer != NULL); - if (!gpBuffer) + if (gpBuffer == NULL) return; /// ASSERT: assert(pCelBuff != NULL); - if (!pCelBuff) + if (pCelBuff == NULL) return; /// ASSERT: assert(nCel > 0); if (nCel <= 0) @@ -3631,10 +3631,10 @@ void Cl2DrawOutlineSafe(char col, int sx, int sy, BYTE *pCelBuff, int nCel, int DWORD *pFrameTable; /// ASSERT: assert(gpBuffer != NULL); - if (!gpBuffer) + if (gpBuffer == NULL) return; /// ASSERT: assert(pCelBuff != NULL); - if (!pCelBuff) + if (pCelBuff == NULL) return; /// ASSERT: assert(nCel > 0); if (nCel <= 0) @@ -3863,10 +3863,10 @@ void Cl2DrawLightTblSafe(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, i DWORD *pFrameTable; /// ASSERT: assert(gpBuffer != NULL); - if (!gpBuffer) + if (gpBuffer == NULL) return; /// ASSERT: assert(pCelBuff != NULL); - if (!pCelBuff) + if (pCelBuff == NULL) return; /// ASSERT: assert(nCel > 0); if (nCel <= 0) @@ -3892,7 +3892,7 @@ void Cl2DrawLightTblSafe(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, i idx = light4flag ? 1024 : 4096; if (light == 2) - idx += 256; + idx += 256; // gray colors if (light >= 4) idx += (light - 1) << 8; @@ -4092,10 +4092,10 @@ void Cl2DrawLightSafe(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int DWORD *pFrameTable; /// ASSERT: assert(gpBuffer != NULL); - if (!gpBuffer) + if (gpBuffer == NULL) return; /// ASSERT: assert(pCelBuff != NULL); - if (!pCelBuff) + if (pCelBuff == NULL) return; /// ASSERT: assert(nCel > 0); if (nCel <= 0) diff --git a/Source/gamemenu.cpp b/Source/gamemenu.cpp index 354622e14..ede26776e 100644 --- a/Source/gamemenu.cpp +++ b/Source/gamemenu.cpp @@ -72,7 +72,7 @@ void gamemenu_update_single(TMenuItem *pMenuItems) if (plr[myplr]._pmode != PM_DEATH && !deathflag) enable = TRUE; - gmenu_enable(sgSingleMenu, enable); + gmenu_enable(&sgSingleMenu[0], enable); } void gamemenu_update_multi(TMenuItem *pMenuItems) @@ -229,14 +229,14 @@ void gamemenu_music_volume(BOOL bActivate) music_start(leveltype); } } else { - volume = gamemenu_slider_music_sound(sgOptionsMenu); - sound_get_or_set_music_volume(volume); - - if (volume == VOLUME_MIN) { - if (gbMusicOn) { - gbMusicOn = FALSE; - music_stop(); - } + volume = gamemenu_slider_music_sound(&sgOptionsMenu[0]); + sound_get_or_set_music_volume(volume); + + if (volume == VOLUME_MIN) { + if (gbMusicOn) { + gbMusicOn = FALSE; + music_stop(); + } } else if (!gbMusicOn) { gbMusicOn = TRUE; music_start(leveltype); diff --git a/Source/gendung.cpp b/Source/gendung.cpp index 8e0297f95..3b0cbfc9e 100644 --- a/Source/gendung.cpp +++ b/Source/gendung.cpp @@ -364,7 +364,7 @@ void MakeSpeedCels() if (total_frames > 128) total_frames = 128; - frameidx = 0; /* move into loop ? */ + frameidx = 0; if (light4flag) blk_cnt = 3; @@ -483,7 +483,7 @@ void MakeSpeedCels() for (y = 0; y < MAXDUNY; y++) { for (x = 0; x < MAXDUNX; x++) { - if (dPiece[x][y]) { + if (dPiece[x][y] != 0) { pMap = &dpiece_defs_map_2[x][y]; for (i = 0; i < blocks; i++) { if (pMap->mt[i]) { @@ -539,7 +539,7 @@ void SetDungeonMicros() for (x = 0; x < MAXDUNX; x++) { lv = dPiece[x][y]; pMap = &dpiece_defs_map_2[x][y]; - if (lv) { + if (lv != 0) { lv--; if (leveltype != DTYPE_HELL) pPiece = (WORD *)&pLevelPieces[20 * lv]; @@ -616,7 +616,7 @@ void DRLG_CopyTrans(int sx, int sy, int dx, int dy) void DRLG_ListTrans(int num, BYTE *List) { int i; - BYTE x1, x2, y1, y2; + BYTE x1, y1, x2, y2; for (i = 0; i < num; i++) { x1 = *List++; @@ -630,7 +630,7 @@ void DRLG_ListTrans(int num, BYTE *List) void DRLG_AreaTrans(int num, BYTE *List) { int i; - BYTE x1, x2, y1, y2; + BYTE x1, y1, x2, y2; for (i = 0; i < num; i++) { x1 = *List++; diff --git a/Source/gmenu.cpp b/Source/gmenu.cpp index 8235e1c1c..fee71eb71 100644 --- a/Source/gmenu.cpp +++ b/Source/gmenu.cpp @@ -62,7 +62,7 @@ void gmenu_print_text(int x, int y, char *pszStr) while (*pszStr) { c = gbFontTransTbl[(BYTE)*pszStr++]; c = lfontframe[c]; - if (c) + if (c != 0) CelDrawLight(x, y, BigTGold_cel, c, 46); x += lfontkern[c] + 2; } From c3cdc1c4ab8d36f4b78d5a069efc950736cee6f8 Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Wed, 8 Apr 2020 17:50:18 +0200 Subject: [PATCH 06/15] Decompose magic numbers --- Source/control.cpp | 3 ++- Source/dx.cpp | 4 ++-- Source/gendung.cpp | 12 ++++++------ Source/gendung.h | 12 ++++++------ 4 files changed, 16 insertions(+), 15 deletions(-) diff --git a/Source/control.cpp b/Source/control.cpp index 5bdd2ea44..46a249eb0 100644 --- a/Source/control.cpp +++ b/Source/control.cpp @@ -2634,8 +2634,9 @@ char *control_print_talk_msg(char *msg, int x, int y, int *nOffset, int color) int width; x += 264; + y += 182 + PANEL_TOP; width = x; - *nOffset = PitchTbl[y + 182 + PANEL_TOP] + x; + *nOffset = PitchTbl[y] + x; while (*msg) { c = fontframe[gbFontTransTbl[(BYTE)*msg]]; diff --git a/Source/dx.cpp b/Source/dx.cpp index ce9c25d90..54efb059a 100644 --- a/Source/dx.cpp +++ b/Source/dx.cpp @@ -44,12 +44,12 @@ static void dx_create_back_buffer() } memset(&ddsd, 0, sizeof(ddsd)); - ddsd.dwWidth = BUFFER_WIDTH; - ddsd.lPitch = BUFFER_WIDTH; ddsd.dwSize = sizeof(ddsd); ddsd.dwFlags = DDSD_PIXELFORMAT | DDSD_PITCH | DDSD_WIDTH | DDSD_HEIGHT | DDSD_CAPS; ddsd.ddsCaps.dwCaps = DDSCAPS_SYSTEMMEMORY | DDSCAPS_OFFSCREENPLAIN; ddsd.dwHeight = BUFFER_HEIGHT; + ddsd.dwWidth = BUFFER_WIDTH; + ddsd.lPitch = BUFFER_WIDTH; ddsd.ddpfPixelFormat.dwSize = sizeof(ddsd.ddpfPixelFormat); error_code = lpDDSPrimary->GetPixelFormat(&ddsd.ddpfPixelFormat); if (error_code != DD_OK) diff --git a/Source/gendung.cpp b/Source/gendung.cpp index 3b0cbfc9e..0233fb299 100644 --- a/Source/gendung.cpp +++ b/Source/gendung.cpp @@ -23,7 +23,7 @@ int SpeedFrameTbl[128][16]; /** * List of transparancy masks to use for dPieces */ -char block_lvid[2049]; +char block_lvid[MAXTILES + 1]; int level_frame_count[MAXTILES]; int tile_defs[MAXTILES]; WORD level_frame_types[MAXTILES]; @@ -32,20 +32,20 @@ int nlevel_frames; /** * List of light blocking dPieces */ -BOOLEAN nBlockTable[2049]; +BOOLEAN nBlockTable[MAXTILES + 1]; /** * List of path blocking dPieces */ -BOOLEAN nSolidTable[2049]; +BOOLEAN nSolidTable[MAXTILES + 1]; /** * List of transparent dPieces */ -BOOLEAN nTransTable[2049]; +BOOLEAN nTransTable[MAXTILES + 1]; /** * List of missile blocking dPieces */ -BOOLEAN nMissileTable[2049]; -BOOLEAN nTrapTable[2049]; +BOOLEAN nMissileTable[MAXTILES + 1]; +BOOLEAN nTrapTable[MAXTILES + 1]; int dminx; int dminy; int dmaxx; diff --git a/Source/gendung.h b/Source/gendung.h index 3a34834b2..1cd240605 100644 --- a/Source/gendung.h +++ b/Source/gendung.h @@ -21,17 +21,17 @@ extern BYTE *pLevelPieces; extern BYTE *pDungeonCels; extern BYTE *pSpeedCels; extern int SpeedFrameTbl[128][16]; -extern char block_lvid[2049]; +extern char block_lvid[MAXTILES + 1]; extern int level_frame_count[MAXTILES]; extern int tile_defs[MAXTILES]; extern WORD level_frame_types[MAXTILES]; extern int level_frame_sizes[MAXTILES]; extern int nlevel_frames; -extern BOOLEAN nBlockTable[2049]; -extern BOOLEAN nSolidTable[2049]; -extern BOOLEAN nTransTable[2049]; -extern BOOLEAN nMissileTable[2049]; -extern BOOLEAN nTrapTable[2049]; +extern BOOLEAN nBlockTable[MAXTILES + 1]; +extern BOOLEAN nSolidTable[MAXTILES + 1]; +extern BOOLEAN nTransTable[MAXTILES + 1]; +extern BOOLEAN nMissileTable[MAXTILES + 1]; +extern BOOLEAN nTrapTable[MAXTILES + 1]; extern int dminx; extern int dminy; extern int dmaxx; From 6c6ae344dedb3642d2d509c8bd2d375339e473ea Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Wed, 8 Apr 2020 17:56:28 +0200 Subject: [PATCH 07/15] Deduplicate strings in argument parsing --- Source/diablo.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Source/diablo.cpp b/Source/diablo.cpp index 97bc81910..0ae5c913f 100644 --- a/Source/diablo.cpp +++ b/Source/diablo.cpp @@ -347,19 +347,22 @@ void diablo_parse_flags(char *args) while (isspace(*args)) { args++; } - if (_strnicmp("dd_emulate", args, strlen("dd_emulate")) == 0) { + static char de[] = "dd_emulate"; + if (_strnicmp(de, args, strlen(de)) == 0) { gbEmulate = TRUE; - args += strlen("dd_emulate"); + args += strlen(de); continue; } - if (_strnicmp("dd_backbuf", args, strlen("dd_backbuf")) == 0) { + static char db[] = "dd_backbuf"; + if (_strnicmp(db, args, strlen(db)) == 0) { gbBackBuf = TRUE; - args += strlen("dd_backbuf"); + args += strlen(db); continue; } - if (_strnicmp("ds_noduplicates", args, strlen("ds_noduplicates")) == 0) { + static char ds[] = "ds_noduplicates"; + if (_strnicmp(ds, args, strlen(ds)) == 0) { gbDupSounds = FALSE; - args += strlen("ds_noduplicates"); + args += strlen(ds); continue; } c = tolower(*args); From be1a3f15038cd5032692d2ec6e0c12ace71e0c0d Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Wed, 8 Apr 2020 17:58:40 +0200 Subject: [PATCH 08/15] Clean up gamemenu_on --- Source/gamemenu.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/Source/gamemenu.cpp b/Source/gamemenu.cpp index ede26776e..76cec1a83 100644 --- a/Source/gamemenu.cpp +++ b/Source/gamemenu.cpp @@ -48,17 +48,11 @@ char *color_cycling_toggle_names[] = { "Color Cycling Off", "Color Cycling On" } void gamemenu_on() { - void (*proc)(TMenuItem *); - TMenuItem *item; - if (gbMaxPlayers == 1) { - proc = gamemenu_update_single; - item = sgSingleMenu; + gmenu_set_items(sgSingleMenu, gamemenu_update_single); } else { - proc = gamemenu_update_multi; - item = sgMultiMenu; + gmenu_set_items(sgMultiMenu, gamemenu_update_multi); } - gmenu_set_items(item, proc); PressEscKey(); } From cd18914026301e186d9573839663e23e3ba7d5ff Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Wed, 8 Apr 2020 18:01:24 +0200 Subject: [PATCH 09/15] Avoid void pointers --- Source/encrypt.cpp | 18 ++++++------------ Source/encrypt.h | 8 ++++---- Source/engine.cpp | 2 +- Source/engine.h | 2 +- Source/mpqapi.cpp | 14 +++++++------- Source/mpqapi.h | 2 +- 6 files changed, 20 insertions(+), 26 deletions(-) diff --git a/Source/encrypt.cpp b/Source/encrypt.cpp index f3f81d4d4..77abe2f2d 100644 --- a/Source/encrypt.cpp +++ b/Source/encrypt.cpp @@ -8,12 +8,10 @@ DWORD hashtable[1280]; -void Decrypt(void *block, DWORD size, DWORD key) +void Decrypt(DWORD *castBlock, DWORD size, DWORD key) { - DWORD *castBlock; DWORD seed, i; - castBlock = (DWORD *)block; seed = 0xEEEEEEEE; for (i = 0; i < (size >> 2); i++) { seed += hashtable[0x400 + (key & 0xFF)]; @@ -24,12 +22,10 @@ void Decrypt(void *block, DWORD size, DWORD key) } } -void Encrypt(void *block, DWORD size, DWORD key) +void Encrypt(DWORD *castBlock, DWORD size, DWORD key) { - DWORD *castBlock; DWORD seed, i, ch; - castBlock = (DWORD *)block; seed = 0xEEEEEEEE; for (i = 0; i < (size >> 2); i++) { ch = *castBlock; @@ -74,14 +70,13 @@ void InitHash() } } -int PkwareCompress(void *buf, int size) +int PkwareCompress(BYTE *srcData, int size) { - BYTE *srcData, *destData; + BYTE *destData; char *ptr; unsigned int destSize, type, dsize; TDataInfo param; - srcData = (BYTE *)buf; ptr = (char *)DiabloAllocPtr(CMP_BUFFER_SIZE); destSize = 2 * size; @@ -140,14 +135,13 @@ void __cdecl PkwareBufferWrite(char *buf, unsigned int *size, void *param) pInfo->destOffset += *size; } -void PkwareDecompress(void *param, int recv_size, int dwMaxBytes) +void PkwareDecompress(BYTE *pbInBuff, int recv_size, int dwMaxBytes) { char *ptr; - BYTE *pbInBuff, *pbOutBuff; + BYTE *pbOutBuff; TDataInfo info; ptr = (char *)DiabloAllocPtr(CMP_BUFFER_SIZE); - pbInBuff = (BYTE *)param; pbOutBuff = DiabloAllocPtr(dwMaxBytes); info.srcData = pbInBuff; diff --git a/Source/encrypt.h b/Source/encrypt.h index 552bed221..14e0b20f7 100644 --- a/Source/encrypt.h +++ b/Source/encrypt.h @@ -8,13 +8,13 @@ extern DWORD hashtable[1280]; -void Decrypt(void *block, DWORD size, DWORD key); -void Encrypt(void *block, DWORD size, DWORD key); +void Decrypt(DWORD *castBlock, DWORD size, DWORD key); +void Encrypt(DWORD *castBlock, DWORD size, DWORD key); DWORD Hash(const char *s, int type); void InitHash(); -int PkwareCompress(void *buf, int size); +int PkwareCompress(BYTE *srcData, int size); unsigned int __cdecl PkwareBufferRead(char *buf, unsigned int *size, void *param); void __cdecl PkwareBufferWrite(char *buf, unsigned int *size, void *param); -void PkwareDecompress(void *param, int recv_size, int dwMaxBytes); +void PkwareDecompress(BYTE *pbInBuff, int recv_size, int dwMaxBytes); #endif /* __ENCRYPT_H__ */ diff --git a/Source/engine.cpp b/Source/engine.cpp index ab70bbd7d..619cd9d38 100644 --- a/Source/engine.cpp +++ b/Source/engine.cpp @@ -2656,7 +2656,7 @@ BYTE *LoadFileInMem(char *pszName, DWORD *pdwFileLen) * @param p Target buffer * @return Size of file */ -DWORD LoadFileWithMem(const char *pszName, void *p) +DWORD LoadFileWithMem(const char *pszName, BYTE *p) { DWORD dwFileLen; HANDLE hsFile; diff --git a/Source/engine.h b/Source/engine.h index 9027445b8..9fce6d3a4 100644 --- a/Source/engine.h +++ b/Source/engine.h @@ -62,7 +62,7 @@ void engine_debug_trap(BOOL show_cursor); BYTE *DiabloAllocPtr(DWORD dwBytes); void mem_free_dbg(void *p); BYTE *LoadFileInMem(char *pszName, DWORD *pdwFileLen); -DWORD LoadFileWithMem(const char *pszName, void *p); +DWORD LoadFileWithMem(const char *pszName, BYTE *p); void Cl2ApplyTrans(BYTE *p, BYTE *ttbl, int nCel); void Cl2Draw(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, int CelCap); void Cl2Blit(BYTE *pDecodeTo, BYTE *pRLEBytes, int nDataSize, int nWidth); diff --git a/Source/mpqapi.cpp b/Source/mpqapi.cpp index 6d33ffdb6..6d1ca02a6 100644 --- a/Source/mpqapi.cpp +++ b/Source/mpqapi.cpp @@ -7,7 +7,7 @@ #include "../3rdParty/Storm/Source/storm.h" DWORD sgdwMpqOffset; -char mpq_buf[4096]; +BYTE mpq_buf[4096]; _HASHENTRY *sgpHashTbl; /** Has the savegame-file been modified in memory. */ BOOL save_archive_modified; @@ -466,7 +466,7 @@ BOOL OpenMPQ(const char *pszArchive, BOOL hidden, DWORD dwChar) if (!ReadFile(sghArchive, sgpBlockTbl, 0x8000, &dwTemp, NULL)) goto on_error; key = Hash("(block table)", 3); - Decrypt(sgpBlockTbl, 0x8000, key); + Decrypt((DWORD *)sgpBlockTbl, 0x8000, key); } sgpHashTbl = (_HASHENTRY *)DiabloAllocPtr(0x8000); memset(sgpHashTbl, 255, 0x8000); @@ -476,7 +476,7 @@ BOOL OpenMPQ(const char *pszArchive, BOOL hidden, DWORD dwChar) if (!ReadFile(sghArchive, sgpHashTbl, 0x8000, &dwTemp, NULL)) goto on_error; key = Hash("(hash table)", 3); - Decrypt(sgpHashTbl, 0x8000, key); + Decrypt((DWORD *)sgpHashTbl, 0x8000, key); } return TRUE; } @@ -615,9 +615,9 @@ BOOL mpqapi_write_block_table() if (SetFilePointer(sghArchive, 104, NULL, FILE_BEGIN) == -1) return FALSE; - Encrypt(sgpBlockTbl, 0x8000, Hash("(block table)", 3)); + Encrypt((DWORD *)sgpBlockTbl, 0x8000, Hash("(block table)", 3)); success = WriteFile(sghArchive, sgpBlockTbl, 0x8000, &NumberOfBytesWritten, 0); - Decrypt(sgpBlockTbl, 0x8000, Hash("(block table)", 3)); + Decrypt((DWORD *)sgpBlockTbl, 0x8000, Hash("(block table)", 3)); return success && NumberOfBytesWritten == 0x8000; } @@ -629,9 +629,9 @@ BOOL mpqapi_write_hash_table() if (SetFilePointer(sghArchive, 32872, NULL, FILE_BEGIN) == -1) return FALSE; - Encrypt(sgpHashTbl, 0x8000, Hash("(hash table)", 3)); + Encrypt((DWORD *)sgpHashTbl, 0x8000, Hash("(hash table)", 3)); success = WriteFile(sghArchive, sgpHashTbl, 0x8000, &NumberOfBytesWritten, 0); - Decrypt(sgpHashTbl, 0x8000, Hash("(hash table)", 3)); + Decrypt((DWORD *)sgpHashTbl, 0x8000, Hash("(hash table)", 3)); return success && NumberOfBytesWritten == 0x8000; } diff --git a/Source/mpqapi.h b/Source/mpqapi.h index ff6e61129..3f9e2f33a 100644 --- a/Source/mpqapi.h +++ b/Source/mpqapi.h @@ -6,7 +6,7 @@ #ifndef __MPQAPI_H__ #define __MPQAPI_H__ -extern char mpq_buf[4096]; +extern BYTE mpq_buf[4096]; extern BOOL save_archive_modified; extern BOOLEAN save_archive_open; From a94c2d656f4a72324c9cd37ff6369e1524c974d5 Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Wed, 8 Apr 2020 18:02:39 +0200 Subject: [PATCH 10/15] Make hashtable in to a 2d array --- Source/encrypt.cpp | 10 +++++----- Source/encrypt.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Source/encrypt.cpp b/Source/encrypt.cpp index 77abe2f2d..368b291f0 100644 --- a/Source/encrypt.cpp +++ b/Source/encrypt.cpp @@ -6,7 +6,7 @@ #include "all.h" #include "../3rdParty/PKWare/pkware.h" -DWORD hashtable[1280]; +DWORD hashtable[5][256]; void Decrypt(DWORD *castBlock, DWORD size, DWORD key) { @@ -14,7 +14,7 @@ void Decrypt(DWORD *castBlock, DWORD size, DWORD key) seed = 0xEEEEEEEE; for (i = 0; i < (size >> 2); i++) { - seed += hashtable[0x400 + (key & 0xFF)]; + seed += hashtable[4][(key & 0xFF)]; *castBlock ^= seed + key; seed += *castBlock + (seed << 5) + 3; key = ((~key << 0x15) + 0x11111111) | (key >> 0x0B); @@ -29,7 +29,7 @@ void Encrypt(DWORD *castBlock, DWORD size, DWORD key) seed = 0xEEEEEEEE; for (i = 0; i < (size >> 2); i++) { ch = *castBlock; - seed += hashtable[0x400 + (key & 0xFF)]; + seed += hashtable[4][(key & 0xFF)]; *castBlock ^= seed + key; seed += ch + (seed << 5) + 3; key = ((~key << 0x15) + 0x11111111) | (key >> 0x0B); @@ -47,7 +47,7 @@ DWORD Hash(const char *s, int type) while (s != NULL && *s) { ch = *s++; ch = toupper(ch); - seed1 = hashtable[(type << 8) + ch] ^ (seed1 + seed2); + seed1 = hashtable[type][ch] ^ (seed1 + seed2); seed2 += ch + seed1 + (seed2 << 5) + 3; } return seed1; @@ -65,7 +65,7 @@ void InitHash() seed = (125 * seed + 3) % 0x2AAAAB; ch = (seed & 0xFFFF); seed = (125 * seed + 3) % 0x2AAAAB; - hashtable[i + j * 256] = ch << 16 | (seed & 0xFFFF); + hashtable[i][j] = ch << 16 | (seed & 0xFFFF); } } } diff --git a/Source/encrypt.h b/Source/encrypt.h index 14e0b20f7..6d02bf6e4 100644 --- a/Source/encrypt.h +++ b/Source/encrypt.h @@ -6,7 +6,7 @@ #ifndef __ENCRYPT_H__ #define __ENCRYPT_H__ -extern DWORD hashtable[1280]; +extern DWORD hashtable[5][256]; void Decrypt(DWORD *castBlock, DWORD size, DWORD key); void Encrypt(DWORD *castBlock, DWORD size, DWORD key); From 3ac90dc03f915f24b8c8aaeb12316cd80c72c5e5 Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Wed, 8 Apr 2020 18:04:11 +0200 Subject: [PATCH 11/15] Use NewCursor to set cursor --- Source/diablo.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Source/diablo.cpp b/Source/diablo.cpp index 0ae5c913f..8a273b096 100644 --- a/Source/diablo.cpp +++ b/Source/diablo.cpp @@ -832,7 +832,7 @@ BOOL LeftMouseDown(int wParam) } else if (pcurs >= CURSOR_FIRSTITEM) { if (TryInvPut()) { NetSendCmdPItem(TRUE, CMD_PUTITEM, cursmx, cursmy); - SetCursor_(CURSOR_HAND); + NewCursor(CURSOR_HAND); } } else { if (plr[myplr]._pStatPts != 0 && !spselflag) @@ -846,7 +846,7 @@ BOOL LeftMouseDown(int wParam) CheckInvScrn(); DoPanBtn(); if (pcurs > CURSOR_HAND && pcurs < CURSOR_FIRSTITEM) - SetCursor_(CURSOR_HAND); + NewCursor(CURSOR_HAND); } } } @@ -924,21 +924,21 @@ BOOL TryIconCurs() if (pcursinvitem != -1) { CheckIdentify(myplr, pcursinvitem); } else { - SetCursor_(CURSOR_HAND); + NewCursor(CURSOR_HAND); } return TRUE; } else if (pcurs == CURSOR_REPAIR) { if (pcursinvitem != -1) { DoRepair(myplr, pcursinvitem); } else { - SetCursor_(CURSOR_HAND); + NewCursor(CURSOR_HAND); } return TRUE; } else if (pcurs == CURSOR_RECHARGE) { if (pcursinvitem != -1) { DoRecharge(myplr, pcursinvitem); } else { - SetCursor_(CURSOR_HAND); + NewCursor(CURSOR_HAND); } return TRUE; } else if (pcurs == CURSOR_TELEPORT) { @@ -949,10 +949,10 @@ BOOL TryIconCurs() } else { NetSendCmdLocParam2(TRUE, CMD_TSPELLXY, cursmx, cursmy, plr[myplr]._pTSpell, GetSpellLevel(myplr, plr[myplr]._pTSpell)); } - SetCursor_(CURSOR_HAND); + NewCursor(CURSOR_HAND); return TRUE; } else if (pcurs == CURSOR_DISARM && pcursobj == -1) { - SetCursor_(CURSOR_HAND); + NewCursor(CURSOR_HAND); return TRUE; } @@ -989,7 +989,7 @@ void RightMouseDown() if (pcursinvitem == -1 || !UseInvItem(myplr, pcursinvitem)) CheckPlrSpell(); } else if (pcurs > CURSOR_HAND && pcurs < CURSOR_FIRSTITEM) { - SetCursor_(CURSOR_HAND); + NewCursor(CURSOR_HAND); } } } @@ -1910,7 +1910,7 @@ void timeout_cursor(BOOL bTimeout) ClearPanel(); AddPanelString("-- Network timeout --", TRUE); AddPanelString("-- Waiting for players --", TRUE); - SetCursor_(CURSOR_HOURGLASS); + NewCursor(CURSOR_HOURGLASS); force_redraw = 255; } scrollrt_draw_game_screen(TRUE); From c9db23de5b337dab1205471d6ec26cdcc7001401 Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Wed, 8 Apr 2020 18:05:16 +0200 Subject: [PATCH 12/15] Correct sfx_* names, can be seen in assert strings --- Source/effects.cpp | 1730 ++++++++++++++++++++++---------------------- enums.h | 16 +- 2 files changed, 873 insertions(+), 873 deletions(-) diff --git a/Source/effects.cpp b/Source/effects.cpp index 2ef02dd31..35df489b8 100644 --- a/Source/effects.cpp +++ b/Source/effects.cpp @@ -27,894 +27,894 @@ const char MonstSndChar[] = { 'a', 'h', 'd', 's' }; TSFX sgSFX[] = { // clang-format off // bFlags, pszName, pSnd - { SFX_MISC, "Sfx\\Misc\\Walk1.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Walk2.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Walk3.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Walk4.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\BFire.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Fmag.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Tmag.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Lghit.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Lghit1.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Swing.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Swing2.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Dead.wav", NULL }, - { SFX_STREAM, "Sfx\\Misc\\Questdon.wav", NULL }, - { SFX_MISC, "Sfx\\Items\\Armrfkd.wav", NULL }, - { SFX_MISC, "Sfx\\Items\\Barlfire.wav", NULL }, - { SFX_MISC, "Sfx\\Items\\Barrel.wav", NULL }, - { SFX_MISC, "Sfx\\Items\\Bhit.wav", NULL }, - { SFX_MISC, "Sfx\\Items\\Bhit1.wav", NULL }, - { SFX_MISC, "Sfx\\Items\\Chest.wav", NULL }, - { SFX_MISC, "Sfx\\Items\\Doorclos.wav", NULL }, - { SFX_MISC, "Sfx\\Items\\Dooropen.wav", NULL }, - { SFX_MISC, "Sfx\\Items\\Flipanvl.wav", NULL }, - { SFX_MISC, "Sfx\\Items\\Flipaxe.wav", NULL }, - { SFX_MISC, "Sfx\\Items\\Flipblst.wav", NULL }, - { SFX_MISC, "Sfx\\Items\\Flipbody.wav", NULL }, - { SFX_MISC, "Sfx\\Items\\Flipbook.wav", NULL }, - { SFX_MISC, "Sfx\\Items\\Flipbow.wav", NULL }, - { SFX_MISC, "Sfx\\Items\\Flipcap.wav", NULL }, - { SFX_MISC, "Sfx\\Items\\Flipharm.wav", NULL }, - { SFX_MISC, "Sfx\\Items\\Fliplarm.wav", NULL }, - { SFX_MISC, "Sfx\\Items\\Flipmag.wav", NULL }, - { SFX_MISC, "Sfx\\Items\\Flipmag1.wav", NULL }, - { SFX_MISC, "Sfx\\Items\\Flipmush.wav", NULL }, - { SFX_MISC, "Sfx\\Items\\Flippot.wav", NULL }, - { SFX_MISC, "Sfx\\Items\\Flipring.wav", NULL }, - { SFX_MISC, "Sfx\\Items\\Fliprock.wav", NULL }, - { SFX_MISC, "Sfx\\Items\\Flipscrl.wav", NULL }, - { SFX_MISC, "Sfx\\Items\\Flipshld.wav", NULL }, - { SFX_MISC, "Sfx\\Items\\Flipsign.wav", NULL }, - { SFX_MISC, "Sfx\\Items\\Flipstaf.wav", NULL }, - { SFX_MISC, "Sfx\\Items\\Flipswor.wav", NULL }, - { SFX_MISC, "Sfx\\Items\\Gold.wav", NULL }, - { SFX_MISC, "Sfx\\Items\\Hlmtfkd.wav", NULL }, - { SFX_MISC, "Sfx\\Items\\Invanvl.wav", NULL }, - { SFX_MISC, "Sfx\\Items\\Invaxe.wav", NULL }, - { SFX_MISC, "Sfx\\Items\\Invblst.wav", NULL }, - { SFX_MISC, "Sfx\\Items\\Invbody.wav", NULL }, - { SFX_MISC, "Sfx\\Items\\Invbook.wav", NULL }, - { SFX_MISC, "Sfx\\Items\\Invbow.wav", NULL }, - { SFX_MISC, "Sfx\\Items\\Invcap.wav", NULL }, - { SFX_MISC, "Sfx\\Items\\Invgrab.wav", NULL }, - { SFX_MISC, "Sfx\\Items\\Invharm.wav", NULL }, - { SFX_MISC, "Sfx\\Items\\Invlarm.wav", NULL }, - { SFX_MISC, "Sfx\\Items\\Invmush.wav", NULL }, - { SFX_MISC, "Sfx\\Items\\Invpot.wav", NULL }, - { SFX_MISC, "Sfx\\Items\\Invring.wav", NULL }, - { SFX_MISC, "Sfx\\Items\\Invrock.wav", NULL }, - { SFX_MISC, "Sfx\\Items\\Invscrol.wav", NULL }, - { SFX_MISC, "Sfx\\Items\\Invshiel.wav", NULL }, - { SFX_MISC, "Sfx\\Items\\Invsign.wav", NULL }, - { SFX_MISC, "Sfx\\Items\\Invstaf.wav", NULL }, - { SFX_MISC, "Sfx\\Items\\Invsword.wav", NULL }, - { SFX_MISC, "Sfx\\Items\\Lever.wav", NULL }, - { SFX_MISC, "Sfx\\Items\\Magic.wav", NULL }, - { SFX_MISC, "Sfx\\Items\\Magic1.wav", NULL }, - { SFX_MISC, "Sfx\\Items\\Readbook.wav", NULL }, - { SFX_MISC, "Sfx\\Items\\Sarc.wav", NULL }, - { SFX_MISC, "Sfx\\Items\\Shielfkd.wav", NULL }, - { SFX_MISC, "Sfx\\Items\\Swrdfkd.wav", NULL }, - { SFX_UI, "Sfx\\Items\\Titlemov.wav", NULL }, - { SFX_UI, "Sfx\\Items\\Titlslct.wav", NULL }, - { SFX_UI, "Sfx\\Misc\\blank.wav", NULL }, - { SFX_MISC, "Sfx\\Items\\Trap.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Cast1.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Cast10.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Cast12.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Cast2.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Cast3.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Cast4.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Cast5.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Cast6.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Cast7.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Cast8.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Cast9.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Healing.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Repair.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Acids1.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Acids2.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Apoc.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Arrowall.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Bldboil.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Blodstar.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Blsimpt.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Bonesp.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Bsimpct.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Caldron.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Cbolt.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Chltning.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\DSerp.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Elecimp1.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Elementl.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Ethereal.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Fball.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Fbolt1.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Fbolt2.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Firimp1.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Firimp2.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Flamwave.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Flash.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Fountain.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Golum.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Golumded.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Gshrine.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Guard.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Grdlanch.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Holybolt.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Hyper.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Infravis.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Invisibl.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Invpot.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Lning1.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Ltning.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Mshield.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Nova.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Portal.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Puddle.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Resur.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Scurse.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Scurimp.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Sentinel.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Shatter.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Soulfire.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Spoutlop.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Spoutstr.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Storm.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Trapdis.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Teleport.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Vtheft.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Wallloop.wav", NULL }, - { SFX_MISC, "Sfx\\Misc\\Wallstrt.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Walk1.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Walk2.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Walk3.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Walk4.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\BFire.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Fmag.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Tmag.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Lghit.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Lghit1.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Swing.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Swing2.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Dead.wav", NULL }, + { sfx_STREAM, "Sfx\\Misc\\Questdon.wav", NULL }, + { sfx_MISC, "Sfx\\Items\\Armrfkd.wav", NULL }, + { sfx_MISC, "Sfx\\Items\\Barlfire.wav", NULL }, + { sfx_MISC, "Sfx\\Items\\Barrel.wav", NULL }, + { sfx_MISC, "Sfx\\Items\\Bhit.wav", NULL }, + { sfx_MISC, "Sfx\\Items\\Bhit1.wav", NULL }, + { sfx_MISC, "Sfx\\Items\\Chest.wav", NULL }, + { sfx_MISC, "Sfx\\Items\\Doorclos.wav", NULL }, + { sfx_MISC, "Sfx\\Items\\Dooropen.wav", NULL }, + { sfx_MISC, "Sfx\\Items\\Flipanvl.wav", NULL }, + { sfx_MISC, "Sfx\\Items\\Flipaxe.wav", NULL }, + { sfx_MISC, "Sfx\\Items\\Flipblst.wav", NULL }, + { sfx_MISC, "Sfx\\Items\\Flipbody.wav", NULL }, + { sfx_MISC, "Sfx\\Items\\Flipbook.wav", NULL }, + { sfx_MISC, "Sfx\\Items\\Flipbow.wav", NULL }, + { sfx_MISC, "Sfx\\Items\\Flipcap.wav", NULL }, + { sfx_MISC, "Sfx\\Items\\Flipharm.wav", NULL }, + { sfx_MISC, "Sfx\\Items\\Fliplarm.wav", NULL }, + { sfx_MISC, "Sfx\\Items\\Flipmag.wav", NULL }, + { sfx_MISC, "Sfx\\Items\\Flipmag1.wav", NULL }, + { sfx_MISC, "Sfx\\Items\\Flipmush.wav", NULL }, + { sfx_MISC, "Sfx\\Items\\Flippot.wav", NULL }, + { sfx_MISC, "Sfx\\Items\\Flipring.wav", NULL }, + { sfx_MISC, "Sfx\\Items\\Fliprock.wav", NULL }, + { sfx_MISC, "Sfx\\Items\\Flipscrl.wav", NULL }, + { sfx_MISC, "Sfx\\Items\\Flipshld.wav", NULL }, + { sfx_MISC, "Sfx\\Items\\Flipsign.wav", NULL }, + { sfx_MISC, "Sfx\\Items\\Flipstaf.wav", NULL }, + { sfx_MISC, "Sfx\\Items\\Flipswor.wav", NULL }, + { sfx_MISC, "Sfx\\Items\\Gold.wav", NULL }, + { sfx_MISC, "Sfx\\Items\\Hlmtfkd.wav", NULL }, + { sfx_MISC, "Sfx\\Items\\Invanvl.wav", NULL }, + { sfx_MISC, "Sfx\\Items\\Invaxe.wav", NULL }, + { sfx_MISC, "Sfx\\Items\\Invblst.wav", NULL }, + { sfx_MISC, "Sfx\\Items\\Invbody.wav", NULL }, + { sfx_MISC, "Sfx\\Items\\Invbook.wav", NULL }, + { sfx_MISC, "Sfx\\Items\\Invbow.wav", NULL }, + { sfx_MISC, "Sfx\\Items\\Invcap.wav", NULL }, + { sfx_MISC, "Sfx\\Items\\Invgrab.wav", NULL }, + { sfx_MISC, "Sfx\\Items\\Invharm.wav", NULL }, + { sfx_MISC, "Sfx\\Items\\Invlarm.wav", NULL }, + { sfx_MISC, "Sfx\\Items\\Invmush.wav", NULL }, + { sfx_MISC, "Sfx\\Items\\Invpot.wav", NULL }, + { sfx_MISC, "Sfx\\Items\\Invring.wav", NULL }, + { sfx_MISC, "Sfx\\Items\\Invrock.wav", NULL }, + { sfx_MISC, "Sfx\\Items\\Invscrol.wav", NULL }, + { sfx_MISC, "Sfx\\Items\\Invshiel.wav", NULL }, + { sfx_MISC, "Sfx\\Items\\Invsign.wav", NULL }, + { sfx_MISC, "Sfx\\Items\\Invstaf.wav", NULL }, + { sfx_MISC, "Sfx\\Items\\Invsword.wav", NULL }, + { sfx_MISC, "Sfx\\Items\\Lever.wav", NULL }, + { sfx_MISC, "Sfx\\Items\\Magic.wav", NULL }, + { sfx_MISC, "Sfx\\Items\\Magic1.wav", NULL }, + { sfx_MISC, "Sfx\\Items\\Readbook.wav", NULL }, + { sfx_MISC, "Sfx\\Items\\Sarc.wav", NULL }, + { sfx_MISC, "Sfx\\Items\\Shielfkd.wav", NULL }, + { sfx_MISC, "Sfx\\Items\\Swrdfkd.wav", NULL }, + { sfx_UI, "Sfx\\Items\\Titlemov.wav", NULL }, + { sfx_UI, "Sfx\\Items\\Titlslct.wav", NULL }, + { sfx_UI, "Sfx\\Misc\\blank.wav", NULL }, + { sfx_MISC, "Sfx\\Items\\Trap.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Cast1.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Cast10.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Cast12.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Cast2.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Cast3.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Cast4.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Cast5.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Cast6.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Cast7.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Cast8.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Cast9.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Healing.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Repair.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Acids1.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Acids2.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Apoc.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Arrowall.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Bldboil.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Blodstar.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Blsimpt.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Bonesp.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Bsimpct.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Caldron.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Cbolt.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Chltning.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\DSerp.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Elecimp1.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Elementl.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Ethereal.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Fball.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Fbolt1.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Fbolt2.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Firimp1.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Firimp2.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Flamwave.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Flash.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Fountain.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Golum.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Golumded.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Gshrine.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Guard.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Grdlanch.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Holybolt.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Hyper.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Infravis.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Invisibl.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Invpot.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Lning1.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Ltning.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Mshield.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Nova.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Portal.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Puddle.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Resur.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Scurse.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Scurimp.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Sentinel.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Shatter.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Soulfire.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Spoutlop.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Spoutstr.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Storm.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Trapdis.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Teleport.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Vtheft.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Wallloop.wav", NULL }, + { sfx_MISC, "Sfx\\Misc\\Wallstrt.wav", NULL }, #ifndef SPAWN - { SFX_STREAM, "Sfx\\Towners\\Bmaid01.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bmaid02.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bmaid03.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bmaid04.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bmaid05.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bmaid06.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bmaid07.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bmaid08.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bmaid09.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bmaid10.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bmaid11.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bmaid12.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bmaid13.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bmaid14.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bmaid15.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bmaid16.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bmaid17.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bmaid18.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bmaid19.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bmaid20.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bmaid21.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bmaid22.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bmaid23.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bmaid24.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bmaid25.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bmaid26.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bmaid27.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bmaid28.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bmaid29.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bmaid30.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bmaid01.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bmaid02.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bmaid03.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bmaid04.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bmaid05.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bmaid06.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bmaid07.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bmaid08.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bmaid09.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bmaid10.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bmaid11.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bmaid12.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bmaid13.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bmaid14.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bmaid15.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bmaid16.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bmaid17.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bmaid18.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bmaid19.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bmaid20.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bmaid21.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bmaid22.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bmaid23.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bmaid24.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bmaid25.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bmaid26.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bmaid27.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bmaid28.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bmaid29.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bmaid30.wav", NULL }, #endif - { SFX_STREAM, "Sfx\\Towners\\Bmaid31.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bmaid31.wav", NULL }, #ifndef SPAWN - { SFX_STREAM, "Sfx\\Towners\\Bmaid32.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bmaid33.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bmaid34.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bmaid35.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bmaid36.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bmaid37.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bmaid38.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bmaid39.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bmaid40.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bsmith01.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bsmith02.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bsmith03.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bsmith04.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bsmith05.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bsmith06.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bsmith07.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bsmith08.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bsmith09.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bsmith10.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bsmith11.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bsmith12.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bsmith13.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bsmith14.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bsmith15.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bsmith16.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bsmith17.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bsmith18.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bsmith19.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bsmith20.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bsmith21.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bsmith22.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bsmith23.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bsmith24.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bsmith25.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bsmith26.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bsmith27.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bsmith28.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bsmith29.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bsmith30.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bsmith31.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bsmith32.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bsmith33.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bsmith34.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bsmith35.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bsmith36.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bsmith37.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bsmith38.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bsmith39.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bsmith40.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bsmith41.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bsmith42.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bsmith43.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bmaid32.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bmaid33.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bmaid34.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bmaid35.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bmaid36.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bmaid37.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bmaid38.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bmaid39.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bmaid40.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bsmith01.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bsmith02.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bsmith03.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bsmith04.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bsmith05.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bsmith06.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bsmith07.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bsmith08.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bsmith09.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bsmith10.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bsmith11.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bsmith12.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bsmith13.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bsmith14.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bsmith15.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bsmith16.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bsmith17.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bsmith18.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bsmith19.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bsmith20.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bsmith21.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bsmith22.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bsmith23.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bsmith24.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bsmith25.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bsmith26.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bsmith27.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bsmith28.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bsmith29.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bsmith30.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bsmith31.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bsmith32.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bsmith33.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bsmith34.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bsmith35.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bsmith36.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bsmith37.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bsmith38.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bsmith39.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bsmith40.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bsmith41.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bsmith42.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bsmith43.wav", NULL }, #endif - { SFX_STREAM, "Sfx\\Towners\\Bsmith44.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bsmith44.wav", NULL }, #ifndef SPAWN - { SFX_STREAM, "Sfx\\Towners\\Bsmith45.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bsmith46.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bsmith47.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bsmith48.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bsmith49.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bsmith50.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bsmith51.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bsmith52.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bsmith53.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bsmith54.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bsmith55.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Bsmith56.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bsmith45.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bsmith46.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bsmith47.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bsmith48.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bsmith49.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bsmith50.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bsmith51.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bsmith52.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bsmith53.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bsmith54.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bsmith55.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Bsmith56.wav", NULL }, #endif { 0, "Sfx\\Towners\\Cow1.wav", NULL }, { 0, "Sfx\\Towners\\Cow2.wav", NULL }, #ifndef SPAWN - { SFX_STREAM, "Sfx\\Towners\\Deadguy2.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Drunk01.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Drunk02.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Drunk03.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Drunk04.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Drunk05.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Drunk06.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Drunk07.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Drunk08.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Drunk09.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Drunk10.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Drunk11.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Drunk12.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Drunk13.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Drunk14.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Drunk15.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Drunk16.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Drunk17.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Drunk18.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Drunk19.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Drunk20.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Drunk21.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Drunk22.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Drunk23.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Drunk24.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Drunk25.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Drunk26.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Deadguy2.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Drunk01.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Drunk02.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Drunk03.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Drunk04.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Drunk05.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Drunk06.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Drunk07.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Drunk08.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Drunk09.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Drunk10.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Drunk11.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Drunk12.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Drunk13.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Drunk14.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Drunk15.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Drunk16.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Drunk17.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Drunk18.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Drunk19.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Drunk20.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Drunk21.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Drunk22.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Drunk23.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Drunk24.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Drunk25.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Drunk26.wav", NULL }, #endif - { SFX_STREAM, "Sfx\\Towners\\Drunk27.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Drunk27.wav", NULL }, #ifndef SPAWN - { SFX_STREAM, "Sfx\\Towners\\Drunk28.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Drunk29.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Drunk30.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Drunk31.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Drunk32.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Drunk33.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Drunk34.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Drunk35.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Healer01.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Healer02.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Healer03.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Healer04.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Healer05.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Healer06.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Healer07.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Healer08.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Healer09.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Healer10.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Healer11.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Healer12.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Healer13.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Healer14.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Healer15.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Healer16.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Healer17.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Healer18.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Healer19.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Healer20.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Healer21.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Healer22.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Healer23.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Healer24.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Healer25.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Healer26.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Healer27.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Healer28.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Healer29.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Healer30.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Healer31.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Healer32.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Healer33.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Healer34.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Healer35.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Healer36.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Drunk28.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Drunk29.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Drunk30.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Drunk31.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Drunk32.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Drunk33.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Drunk34.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Drunk35.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Healer01.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Healer02.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Healer03.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Healer04.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Healer05.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Healer06.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Healer07.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Healer08.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Healer09.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Healer10.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Healer11.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Healer12.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Healer13.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Healer14.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Healer15.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Healer16.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Healer17.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Healer18.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Healer19.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Healer20.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Healer21.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Healer22.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Healer23.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Healer24.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Healer25.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Healer26.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Healer27.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Healer28.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Healer29.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Healer30.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Healer31.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Healer32.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Healer33.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Healer34.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Healer35.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Healer36.wav", NULL }, #endif - { SFX_STREAM, "Sfx\\Towners\\Healer37.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Healer37.wav", NULL }, #ifndef SPAWN - { SFX_STREAM, "Sfx\\Towners\\Healer38.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Healer39.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Healer40.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Healer41.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Healer42.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Healer43.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Healer44.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Healer45.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Healer46.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Healer47.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Pegboy01.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Pegboy02.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Pegboy03.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Pegboy04.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Pegboy05.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Pegboy06.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Pegboy07.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Pegboy08.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Pegboy09.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Pegboy10.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Pegboy11.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Pegboy12.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Pegboy13.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Pegboy14.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Pegboy15.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Pegboy16.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Pegboy17.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Pegboy18.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Pegboy19.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Pegboy20.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Pegboy21.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Pegboy22.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Pegboy23.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Pegboy24.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Pegboy25.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Pegboy26.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Pegboy27.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Pegboy28.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Pegboy29.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Pegboy30.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Pegboy31.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Healer38.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Healer39.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Healer40.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Healer41.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Healer42.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Healer43.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Healer44.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Healer45.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Healer46.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Healer47.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Pegboy01.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Pegboy02.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Pegboy03.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Pegboy04.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Pegboy05.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Pegboy06.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Pegboy07.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Pegboy08.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Pegboy09.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Pegboy10.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Pegboy11.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Pegboy12.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Pegboy13.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Pegboy14.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Pegboy15.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Pegboy16.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Pegboy17.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Pegboy18.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Pegboy19.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Pegboy20.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Pegboy21.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Pegboy22.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Pegboy23.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Pegboy24.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Pegboy25.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Pegboy26.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Pegboy27.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Pegboy28.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Pegboy29.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Pegboy30.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Pegboy31.wav", NULL }, #endif - { SFX_STREAM, "Sfx\\Towners\\Pegboy32.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Pegboy32.wav", NULL }, #ifndef SPAWN - { SFX_STREAM, "Sfx\\Towners\\Pegboy33.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Pegboy34.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Pegboy35.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Pegboy36.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Pegboy37.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Pegboy38.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Pegboy39.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Pegboy40.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Pegboy41.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Pegboy42.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Pegboy43.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Priest00.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Priest01.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Priest02.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Priest03.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Priest04.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Priest05.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Priest06.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Priest07.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Storyt00.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Storyt01.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Storyt02.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Storyt03.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Storyt04.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Storyt05.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Storyt06.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Storyt07.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Storyt08.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Storyt09.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Storyt10.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Storyt11.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Storyt12.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Storyt13.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Storyt14.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Storyt15.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Storyt16.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Storyt17.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Storyt18.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Storyt19.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Storyt20.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Storyt21.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Storyt22.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Storyt23.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Storyt24.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Pegboy33.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Pegboy34.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Pegboy35.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Pegboy36.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Pegboy37.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Pegboy38.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Pegboy39.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Pegboy40.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Pegboy41.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Pegboy42.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Pegboy43.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Priest00.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Priest01.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Priest02.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Priest03.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Priest04.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Priest05.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Priest06.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Priest07.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Storyt00.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Storyt01.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Storyt02.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Storyt03.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Storyt04.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Storyt05.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Storyt06.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Storyt07.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Storyt08.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Storyt09.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Storyt10.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Storyt11.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Storyt12.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Storyt13.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Storyt14.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Storyt15.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Storyt16.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Storyt17.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Storyt18.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Storyt19.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Storyt20.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Storyt21.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Storyt22.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Storyt23.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Storyt24.wav", NULL }, #endif - { SFX_STREAM, "Sfx\\Towners\\Storyt25.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Storyt25.wav", NULL }, #ifndef SPAWN - { SFX_STREAM, "Sfx\\Towners\\Storyt26.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Storyt27.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Storyt28.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Storyt29.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Storyt30.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Storyt31.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Storyt32.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Storyt33.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Storyt34.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Storyt35.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Storyt36.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Storyt37.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Storyt38.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Storyt26.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Storyt27.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Storyt28.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Storyt29.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Storyt30.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Storyt31.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Storyt32.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Storyt33.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Storyt34.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Storyt35.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Storyt36.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Storyt37.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Storyt38.wav", NULL }, #endif - { SFX_STREAM, "Sfx\\Towners\\Tavown00.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Tavown00.wav", NULL }, #ifndef SPAWN - { SFX_STREAM, "Sfx\\Towners\\Tavown01.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Tavown02.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Tavown03.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Tavown04.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Tavown05.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Tavown06.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Tavown07.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Tavown08.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Tavown09.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Tavown10.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Tavown11.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Tavown12.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Tavown13.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Tavown14.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Tavown15.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Tavown16.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Tavown17.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Tavown18.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Tavown19.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Tavown20.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Tavown21.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Tavown22.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Tavown23.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Tavown24.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Tavown25.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Tavown26.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Tavown27.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Tavown28.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Tavown29.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Tavown30.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Tavown31.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Tavown32.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Tavown33.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Tavown34.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Tavown35.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Tavown01.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Tavown02.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Tavown03.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Tavown04.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Tavown05.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Tavown06.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Tavown07.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Tavown08.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Tavown09.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Tavown10.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Tavown11.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Tavown12.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Tavown13.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Tavown14.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Tavown15.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Tavown16.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Tavown17.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Tavown18.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Tavown19.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Tavown20.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Tavown21.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Tavown22.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Tavown23.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Tavown24.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Tavown25.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Tavown26.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Tavown27.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Tavown28.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Tavown29.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Tavown30.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Tavown31.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Tavown32.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Tavown33.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Tavown34.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Tavown35.wav", NULL }, #endif - { SFX_STREAM, "Sfx\\Towners\\Tavown36.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Tavown36.wav", NULL }, #ifndef SPAWN - { SFX_STREAM, "Sfx\\Towners\\Tavown37.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Tavown38.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Tavown39.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Tavown40.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Tavown41.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Tavown42.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Tavown43.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Tavown44.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Tavown45.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Witch01.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Witch02.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Witch03.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Witch04.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Witch05.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Witch06.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Witch07.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Witch08.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Witch09.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Witch10.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Witch11.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Witch12.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Witch13.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Witch14.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Witch15.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Witch16.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Witch17.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Witch18.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Witch19.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Witch20.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Witch21.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Witch22.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Witch23.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Witch24.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Witch25.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Witch26.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Witch27.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Witch28.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Witch29.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Witch30.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Witch31.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Witch32.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Witch33.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Witch34.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Witch35.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Witch36.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Witch37.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Tavown37.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Tavown38.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Tavown39.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Tavown40.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Tavown41.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Tavown42.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Tavown43.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Tavown44.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Tavown45.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Witch01.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Witch02.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Witch03.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Witch04.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Witch05.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Witch06.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Witch07.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Witch08.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Witch09.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Witch10.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Witch11.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Witch12.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Witch13.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Witch14.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Witch15.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Witch16.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Witch17.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Witch18.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Witch19.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Witch20.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Witch21.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Witch22.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Witch23.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Witch24.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Witch25.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Witch26.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Witch27.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Witch28.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Witch29.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Witch30.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Witch31.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Witch32.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Witch33.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Witch34.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Witch35.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Witch36.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Witch37.wav", NULL }, #endif - { SFX_STREAM, "Sfx\\Towners\\Witch38.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Witch38.wav", NULL }, #ifndef SPAWN - { SFX_STREAM, "Sfx\\Towners\\Witch39.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Witch40.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Witch41.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Witch42.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Witch43.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Witch44.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Witch45.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Witch46.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Witch47.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Witch48.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Witch49.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Witch50.wav", NULL }, - { SFX_STREAM, "Sfx\\Towners\\Wound01.wav", NULL }, - { SFX_STREAM | SFX_SORCEROR, "Sfx\\Sorceror\\Mage01.wav", NULL }, - { SFX_STREAM | SFX_SORCEROR, "Sfx\\Sorceror\\Mage02.wav", NULL }, - { SFX_STREAM | SFX_SORCEROR, "Sfx\\Sorceror\\Mage03.wav", NULL }, - { SFX_STREAM | SFX_SORCEROR, "Sfx\\Sorceror\\Mage04.wav", NULL }, - { SFX_STREAM | SFX_SORCEROR, "Sfx\\Sorceror\\Mage05.wav", NULL }, - { SFX_STREAM | SFX_SORCEROR, "Sfx\\Sorceror\\Mage06.wav", NULL }, - { SFX_STREAM | SFX_SORCEROR, "Sfx\\Sorceror\\Mage07.wav", NULL }, - { SFX_STREAM | SFX_SORCEROR, "Sfx\\Sorceror\\Mage08.wav", NULL }, - { SFX_STREAM | SFX_SORCEROR, "Sfx\\Sorceror\\Mage09.wav", NULL }, - { SFX_STREAM | SFX_SORCEROR, "Sfx\\Sorceror\\Mage10.wav", NULL }, - { SFX_STREAM | SFX_SORCEROR, "Sfx\\Sorceror\\Mage11.wav", NULL }, - { SFX_STREAM | SFX_SORCEROR, "Sfx\\Sorceror\\Mage12.wav", NULL }, - { SFX_SORCEROR, "Sfx\\Sorceror\\Mage13.wav", NULL }, - { SFX_SORCEROR, "Sfx\\Sorceror\\Mage14.wav", NULL }, - { SFX_SORCEROR, "Sfx\\Sorceror\\Mage15.wav", NULL }, - { SFX_SORCEROR, "Sfx\\Sorceror\\Mage16.wav", NULL }, - { SFX_SORCEROR, "Sfx\\Sorceror\\Mage17.wav", NULL }, - { SFX_SORCEROR, "Sfx\\Sorceror\\Mage18.wav", NULL }, - { SFX_SORCEROR, "Sfx\\Sorceror\\Mage19.wav", NULL }, - { SFX_SORCEROR, "Sfx\\Sorceror\\Mage20.wav", NULL }, - { SFX_SORCEROR, "Sfx\\Sorceror\\Mage21.wav", NULL }, - { SFX_SORCEROR, "Sfx\\Sorceror\\Mage22.wav", NULL }, - { SFX_SORCEROR, "Sfx\\Sorceror\\Mage23.wav", NULL }, - { SFX_SORCEROR, "Sfx\\Sorceror\\Mage24.wav", NULL }, - { SFX_SORCEROR, "Sfx\\Sorceror\\Mage25.wav", NULL }, - { SFX_SORCEROR, "Sfx\\Sorceror\\Mage26.wav", NULL }, - { SFX_SORCEROR, "Sfx\\Sorceror\\Mage27.wav", NULL }, - { SFX_SORCEROR, "Sfx\\Sorceror\\Mage28.wav", NULL }, - { SFX_SORCEROR, "Sfx\\Sorceror\\Mage29.wav", NULL }, - { SFX_SORCEROR, "Sfx\\Sorceror\\Mage30.wav", NULL }, - { SFX_SORCEROR, "Sfx\\Sorceror\\Mage31.wav", NULL }, - { SFX_SORCEROR, "Sfx\\Sorceror\\Mage32.wav", NULL }, - { SFX_SORCEROR, "Sfx\\Sorceror\\Mage33.wav", NULL }, - { SFX_SORCEROR, "Sfx\\Sorceror\\Mage34.wav", NULL }, - { SFX_SORCEROR, "Sfx\\Sorceror\\Mage35.wav", NULL }, - { SFX_SORCEROR, "Sfx\\Sorceror\\Mage36.wav", NULL }, - { SFX_SORCEROR, "Sfx\\Sorceror\\Mage37.wav", NULL }, - { SFX_SORCEROR, "Sfx\\Sorceror\\Mage38.wav", NULL }, - { SFX_SORCEROR, "Sfx\\Sorceror\\Mage39.wav", NULL }, - { SFX_SORCEROR, "Sfx\\Sorceror\\Mage40.wav", NULL }, - { SFX_SORCEROR, "Sfx\\Sorceror\\Mage41.wav", NULL }, - { SFX_SORCEROR, "Sfx\\Sorceror\\Mage42.wav", NULL }, - { SFX_SORCEROR, "Sfx\\Sorceror\\Mage43.wav", NULL }, - { SFX_SORCEROR, "Sfx\\Sorceror\\Mage44.wav", NULL }, - { SFX_SORCEROR, "Sfx\\Sorceror\\Mage45.wav", NULL }, - { SFX_SORCEROR, "Sfx\\Sorceror\\Mage46.wav", NULL }, - { SFX_SORCEROR, "Sfx\\Sorceror\\Mage47.wav", NULL }, - { SFX_SORCEROR, "Sfx\\Sorceror\\Mage48.wav", NULL }, - { SFX_SORCEROR, "Sfx\\Sorceror\\Mage49.wav", NULL }, - { SFX_SORCEROR, "Sfx\\Sorceror\\Mage50.wav", NULL }, - { SFX_STREAM | SFX_SORCEROR, "Sfx\\Sorceror\\Mage51.wav", NULL }, - { SFX_STREAM | SFX_SORCEROR, "Sfx\\Sorceror\\Mage52.wav", NULL }, - { SFX_STREAM | SFX_SORCEROR, "Sfx\\Sorceror\\Mage53.wav", NULL }, - { SFX_STREAM | SFX_SORCEROR, "Sfx\\Sorceror\\Mage54.wav", NULL }, - { SFX_STREAM | SFX_SORCEROR, "Sfx\\Sorceror\\Mage55.wav", NULL }, - { SFX_STREAM | SFX_SORCEROR, "Sfx\\Sorceror\\Mage56.wav", NULL }, - { SFX_SORCEROR, "Sfx\\Sorceror\\Mage57.wav", NULL }, - { SFX_STREAM | SFX_SORCEROR, "Sfx\\Sorceror\\Mage58.wav", NULL }, - { SFX_STREAM | SFX_SORCEROR, "Sfx\\Sorceror\\Mage59.wav", NULL }, - { SFX_STREAM | SFX_SORCEROR, "Sfx\\Sorceror\\Mage60.wav", NULL }, - { SFX_STREAM | SFX_SORCEROR, "Sfx\\Sorceror\\Mage61.wav", NULL }, - { SFX_STREAM | SFX_SORCEROR, "Sfx\\Sorceror\\Mage62.wav", NULL }, - { SFX_STREAM | SFX_SORCEROR, "Sfx\\Sorceror\\Mage63.wav", NULL }, - { SFX_SORCEROR, "Sfx\\Sorceror\\Mage64.wav", NULL }, - { SFX_SORCEROR, "Sfx\\Sorceror\\Mage65.wav", NULL }, - { SFX_SORCEROR, "Sfx\\Sorceror\\Mage66.wav", NULL }, - { SFX_SORCEROR, "Sfx\\Sorceror\\Mage67.wav", NULL }, - { SFX_SORCEROR, "Sfx\\Sorceror\\Mage68.wav", NULL }, - { SFX_SORCEROR, "Sfx\\Sorceror\\Mage69.wav", NULL }, - { SFX_SORCEROR, "Sfx\\Sorceror\\Mage69b.wav", NULL }, - { SFX_SORCEROR, "Sfx\\Sorceror\\Mage70.wav", NULL }, - { SFX_SORCEROR, "Sfx\\Sorceror\\Mage71.wav", NULL }, - { SFX_SORCEROR, "Sfx\\Sorceror\\Mage72.wav", NULL }, - { SFX_SORCEROR, "Sfx\\Sorceror\\Mage73.wav", NULL }, - { SFX_SORCEROR, "Sfx\\Sorceror\\Mage74.wav", NULL }, - { SFX_SORCEROR, "Sfx\\Sorceror\\Mage75.wav", NULL }, - { SFX_SORCEROR, "Sfx\\Sorceror\\Mage76.wav", NULL }, - { SFX_SORCEROR, "Sfx\\Sorceror\\Mage77.wav", NULL }, - { SFX_SORCEROR, "Sfx\\Sorceror\\Mage78.wav", NULL }, - { SFX_SORCEROR, "Sfx\\Sorceror\\Mage79.wav", NULL }, - { SFX_STREAM | SFX_SORCEROR, "Sfx\\Sorceror\\Mage80.wav", NULL }, - { SFX_STREAM | SFX_SORCEROR, "Sfx\\Sorceror\\Mage81.wav", NULL }, - { SFX_STREAM | SFX_SORCEROR, "Sfx\\Sorceror\\Mage82.wav", NULL }, - { SFX_STREAM | SFX_SORCEROR, "Sfx\\Sorceror\\Mage83.wav", NULL }, - { SFX_STREAM | SFX_SORCEROR, "Sfx\\Sorceror\\Mage84.wav", NULL }, - { SFX_STREAM | SFX_SORCEROR, "Sfx\\Sorceror\\Mage85.wav", NULL }, - { SFX_STREAM | SFX_SORCEROR, "Sfx\\Sorceror\\Mage86.wav", NULL }, - { SFX_STREAM | SFX_SORCEROR, "Sfx\\Sorceror\\Mage87.wav", NULL }, - { SFX_STREAM | SFX_SORCEROR, "Sfx\\Sorceror\\Mage88.wav", NULL }, - { SFX_STREAM | SFX_SORCEROR, "Sfx\\Sorceror\\Mage89.wav", NULL }, - { SFX_STREAM | SFX_SORCEROR, "Sfx\\Sorceror\\Mage90.wav", NULL }, - { SFX_STREAM | SFX_SORCEROR, "Sfx\\Sorceror\\Mage91.wav", NULL }, - { SFX_STREAM | SFX_SORCEROR, "Sfx\\Sorceror\\Mage92.wav", NULL }, - { SFX_STREAM | SFX_SORCEROR, "Sfx\\Sorceror\\Mage93.wav", NULL }, - { SFX_STREAM | SFX_SORCEROR, "Sfx\\Sorceror\\Mage94.wav", NULL }, - { SFX_STREAM | SFX_SORCEROR, "Sfx\\Sorceror\\Mage95.wav", NULL }, - { SFX_STREAM | SFX_SORCEROR, "Sfx\\Sorceror\\Mage96.wav", NULL }, - { SFX_STREAM | SFX_SORCEROR, "Sfx\\Sorceror\\Mage97.wav", NULL }, - { SFX_STREAM | SFX_SORCEROR, "Sfx\\Sorceror\\Mage98.wav", NULL }, - { SFX_STREAM | SFX_SORCEROR, "Sfx\\Sorceror\\Mage99.wav", NULL }, - { SFX_STREAM | SFX_SORCEROR, "Sfx\\Sorceror\\Mage100.wav", NULL }, - { SFX_STREAM | SFX_SORCEROR, "Sfx\\Sorceror\\Mage101.wav", NULL }, - { SFX_STREAM | SFX_SORCEROR, "Sfx\\Sorceror\\Mage102.wav", NULL }, - { SFX_STREAM | SFX_ROGUE, "Sfx\\Rogue\\Rogue01.wav", NULL }, - { SFX_STREAM | SFX_ROGUE, "Sfx\\Rogue\\Rogue02.wav", NULL }, - { SFX_STREAM | SFX_ROGUE, "Sfx\\Rogue\\Rogue03.wav", NULL }, - { SFX_STREAM | SFX_ROGUE, "Sfx\\Rogue\\Rogue04.wav", NULL }, - { SFX_STREAM | SFX_ROGUE, "Sfx\\Rogue\\Rogue05.wav", NULL }, - { SFX_STREAM | SFX_ROGUE, "Sfx\\Rogue\\Rogue06.wav", NULL }, - { SFX_STREAM | SFX_ROGUE, "Sfx\\Rogue\\Rogue07.wav", NULL }, - { SFX_STREAM | SFX_ROGUE, "Sfx\\Rogue\\Rogue08.wav", NULL }, - { SFX_STREAM | SFX_ROGUE, "Sfx\\Rogue\\Rogue09.wav", NULL }, - { SFX_STREAM | SFX_ROGUE, "Sfx\\Rogue\\Rogue10.wav", NULL }, - { SFX_STREAM | SFX_ROGUE, "Sfx\\Rogue\\Rogue11.wav", NULL }, - { SFX_STREAM | SFX_ROGUE, "Sfx\\Rogue\\Rogue12.wav", NULL }, - { SFX_ROGUE, "Sfx\\Rogue\\Rogue13.wav", NULL }, - { SFX_ROGUE, "Sfx\\Rogue\\Rogue14.wav", NULL }, - { SFX_ROGUE, "Sfx\\Rogue\\Rogue15.wav", NULL }, - { SFX_ROGUE, "Sfx\\Rogue\\Rogue16.wav", NULL }, - { SFX_ROGUE, "Sfx\\Rogue\\Rogue17.wav", NULL }, - { SFX_ROGUE, "Sfx\\Rogue\\Rogue18.wav", NULL }, - { SFX_ROGUE, "Sfx\\Rogue\\Rogue19.wav", NULL }, - { SFX_ROGUE, "Sfx\\Rogue\\Rogue20.wav", NULL }, - { SFX_ROGUE, "Sfx\\Rogue\\Rogue21.wav", NULL }, - { SFX_ROGUE, "Sfx\\Rogue\\Rogue22.wav", NULL }, - { SFX_ROGUE, "Sfx\\Rogue\\Rogue23.wav", NULL }, - { SFX_ROGUE, "Sfx\\Rogue\\Rogue24.wav", NULL }, - { SFX_ROGUE, "Sfx\\Rogue\\Rogue25.wav", NULL }, - { SFX_ROGUE, "Sfx\\Rogue\\Rogue26.wav", NULL }, - { SFX_ROGUE, "Sfx\\Rogue\\Rogue27.wav", NULL }, - { SFX_ROGUE, "Sfx\\Rogue\\Rogue28.wav", NULL }, - { SFX_ROGUE, "Sfx\\Rogue\\Rogue29.wav", NULL }, - { SFX_ROGUE, "Sfx\\Rogue\\Rogue30.wav", NULL }, - { SFX_ROGUE, "Sfx\\Rogue\\Rogue31.wav", NULL }, - { SFX_ROGUE, "Sfx\\Rogue\\Rogue32.wav", NULL }, - { SFX_ROGUE, "Sfx\\Rogue\\Rogue33.wav", NULL }, - { SFX_ROGUE, "Sfx\\Rogue\\Rogue34.wav", NULL }, - { SFX_ROGUE, "Sfx\\Rogue\\Rogue35.wav", NULL }, - { SFX_ROGUE, "Sfx\\Rogue\\Rogue36.wav", NULL }, - { SFX_ROGUE, "Sfx\\Rogue\\Rogue37.wav", NULL }, - { SFX_ROGUE, "Sfx\\Rogue\\Rogue38.wav", NULL }, - { SFX_ROGUE, "Sfx\\Rogue\\Rogue39.wav", NULL }, - { SFX_ROGUE, "Sfx\\Rogue\\Rogue40.wav", NULL }, - { SFX_ROGUE, "Sfx\\Rogue\\Rogue41.wav", NULL }, - { SFX_ROGUE, "Sfx\\Rogue\\Rogue42.wav", NULL }, - { SFX_ROGUE, "Sfx\\Rogue\\Rogue43.wav", NULL }, - { SFX_ROGUE, "Sfx\\Rogue\\Rogue44.wav", NULL }, - { SFX_ROGUE, "Sfx\\Rogue\\Rogue45.wav", NULL }, - { SFX_ROGUE, "Sfx\\Rogue\\Rogue46.wav", NULL }, - { SFX_ROGUE, "Sfx\\Rogue\\Rogue47.wav", NULL }, - { SFX_ROGUE, "Sfx\\Rogue\\Rogue48.wav", NULL }, - { SFX_ROGUE, "Sfx\\Rogue\\Rogue49.wav", NULL }, - { SFX_ROGUE, "Sfx\\Rogue\\Rogue50.wav", NULL }, - { SFX_STREAM | SFX_ROGUE, "Sfx\\Rogue\\Rogue51.wav", NULL }, - { SFX_STREAM | SFX_ROGUE, "Sfx\\Rogue\\Rogue52.wav", NULL }, - { SFX_STREAM | SFX_ROGUE, "Sfx\\Rogue\\Rogue53.wav", NULL }, - { SFX_STREAM | SFX_ROGUE, "Sfx\\Rogue\\Rogue54.wav", NULL }, - { SFX_STREAM | SFX_ROGUE, "Sfx\\Rogue\\Rogue55.wav", NULL }, - { SFX_STREAM | SFX_ROGUE, "Sfx\\Rogue\\Rogue56.wav", NULL }, - { SFX_ROGUE, "Sfx\\Rogue\\Rogue57.wav", NULL }, - { SFX_STREAM | SFX_ROGUE, "Sfx\\Rogue\\Rogue58.wav", NULL }, - { SFX_STREAM | SFX_ROGUE, "Sfx\\Rogue\\Rogue59.wav", NULL }, - { SFX_STREAM | SFX_ROGUE, "Sfx\\Rogue\\Rogue60.wav", NULL }, - { SFX_STREAM | SFX_ROGUE, "Sfx\\Rogue\\Rogue61.wav", NULL }, - { SFX_STREAM | SFX_ROGUE, "Sfx\\Rogue\\Rogue62.wav", NULL }, - { SFX_STREAM | SFX_ROGUE, "Sfx\\Rogue\\Rogue63.wav", NULL }, - { SFX_ROGUE, "Sfx\\Rogue\\Rogue64.wav", NULL }, - { SFX_ROGUE, "Sfx\\Rogue\\Rogue65.wav", NULL }, - { SFX_ROGUE, "Sfx\\Rogue\\Rogue66.wav", NULL }, - { SFX_ROGUE, "Sfx\\Rogue\\Rogue67.wav", NULL }, - { SFX_ROGUE, "Sfx\\Rogue\\Rogue68.wav", NULL }, - { SFX_ROGUE, "Sfx\\Rogue\\Rogue69.wav", NULL }, - { SFX_ROGUE, "Sfx\\Rogue\\Rogue69b.wav", NULL }, - { SFX_ROGUE, "Sfx\\Rogue\\Rogue70.wav", NULL }, - { SFX_ROGUE, "Sfx\\Rogue\\Rogue71.wav", NULL }, - { SFX_ROGUE, "Sfx\\Rogue\\Rogue72.wav", NULL }, - { SFX_ROGUE, "Sfx\\Rogue\\Rogue73.wav", NULL }, - { SFX_ROGUE, "Sfx\\Rogue\\Rogue74.wav", NULL }, - { SFX_ROGUE, "Sfx\\Rogue\\Rogue75.wav", NULL }, - { SFX_ROGUE, "Sfx\\Rogue\\Rogue76.wav", NULL }, - { SFX_ROGUE, "Sfx\\Rogue\\Rogue77.wav", NULL }, - { SFX_ROGUE, "Sfx\\Rogue\\Rogue78.wav", NULL }, - { SFX_ROGUE, "Sfx\\Rogue\\Rogue79.wav", NULL }, - { SFX_STREAM | SFX_ROGUE, "Sfx\\Rogue\\Rogue80.wav", NULL }, - { SFX_STREAM | SFX_ROGUE, "Sfx\\Rogue\\Rogue81.wav", NULL }, - { SFX_STREAM | SFX_ROGUE, "Sfx\\Rogue\\Rogue82.wav", NULL }, - { SFX_STREAM | SFX_ROGUE, "Sfx\\Rogue\\Rogue83.wav", NULL }, - { SFX_STREAM | SFX_ROGUE, "Sfx\\Rogue\\Rogue84.wav", NULL }, - { SFX_STREAM | SFX_ROGUE, "Sfx\\Rogue\\Rogue85.wav", NULL }, - { SFX_STREAM | SFX_ROGUE, "Sfx\\Rogue\\Rogue86.wav", NULL }, - { SFX_STREAM | SFX_ROGUE, "Sfx\\Rogue\\Rogue87.wav", NULL }, - { SFX_STREAM | SFX_ROGUE, "Sfx\\Rogue\\Rogue88.wav", NULL }, - { SFX_STREAM | SFX_ROGUE, "Sfx\\Rogue\\Rogue89.wav", NULL }, - { SFX_STREAM | SFX_ROGUE, "Sfx\\Rogue\\Rogue90.wav", NULL }, - { SFX_STREAM | SFX_ROGUE, "Sfx\\Rogue\\Rogue91.wav", NULL }, - { SFX_STREAM | SFX_ROGUE, "Sfx\\Rogue\\Rogue92.wav", NULL }, - { SFX_STREAM | SFX_ROGUE, "Sfx\\Rogue\\Rogue93.wav", NULL }, - { SFX_STREAM | SFX_ROGUE, "Sfx\\Rogue\\Rogue94.wav", NULL }, - { SFX_STREAM | SFX_ROGUE, "Sfx\\Rogue\\Rogue95.wav", NULL }, - { SFX_STREAM | SFX_ROGUE, "Sfx\\Rogue\\Rogue96.wav", NULL }, - { SFX_STREAM | SFX_ROGUE, "Sfx\\Rogue\\Rogue97.wav", NULL }, - { SFX_STREAM | SFX_ROGUE, "Sfx\\Rogue\\Rogue98.wav", NULL }, - { SFX_STREAM | SFX_ROGUE, "Sfx\\Rogue\\Rogue99.wav", NULL }, - { SFX_STREAM | SFX_ROGUE, "Sfx\\Rogue\\Rogue100.wav", NULL }, - { SFX_STREAM | SFX_ROGUE, "Sfx\\Rogue\\Rogue101.wav", NULL }, - { SFX_STREAM | SFX_ROGUE, "Sfx\\Rogue\\Rogue102.wav", NULL }, - { SFX_STREAM | SFX_WARRIOR, "Sfx\\Warrior\\Warior01.wav", NULL }, - { SFX_STREAM | SFX_WARRIOR, "Sfx\\Warrior\\Warior02.wav", NULL }, - { SFX_STREAM | SFX_WARRIOR, "Sfx\\Warrior\\Warior03.wav", NULL }, - { SFX_STREAM | SFX_WARRIOR, "Sfx\\Warrior\\Warior04.wav", NULL }, - { SFX_STREAM | SFX_WARRIOR, "Sfx\\Warrior\\Warior05.wav", NULL }, - { SFX_STREAM | SFX_WARRIOR, "Sfx\\Warrior\\Warior06.wav", NULL }, - { SFX_STREAM | SFX_WARRIOR, "Sfx\\Warrior\\Warior07.wav", NULL }, - { SFX_STREAM | SFX_WARRIOR, "Sfx\\Warrior\\Warior08.wav", NULL }, - { SFX_STREAM | SFX_WARRIOR, "Sfx\\Warrior\\Warior09.wav", NULL }, - { SFX_STREAM | SFX_WARRIOR, "Sfx\\Warrior\\Warior10.wav", NULL }, - { SFX_STREAM | SFX_WARRIOR, "Sfx\\Warrior\\Warior11.wav", NULL }, - { SFX_STREAM | SFX_WARRIOR, "Sfx\\Warrior\\Warior12.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Witch39.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Witch40.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Witch41.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Witch42.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Witch43.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Witch44.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Witch45.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Witch46.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Witch47.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Witch48.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Witch49.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Witch50.wav", NULL }, + { sfx_STREAM, "Sfx\\Towners\\Wound01.wav", NULL }, + { sfx_STREAM | sfx_SORCEROR, "Sfx\\Sorceror\\Mage01.wav", NULL }, + { sfx_STREAM | sfx_SORCEROR, "Sfx\\Sorceror\\Mage02.wav", NULL }, + { sfx_STREAM | sfx_SORCEROR, "Sfx\\Sorceror\\Mage03.wav", NULL }, + { sfx_STREAM | sfx_SORCEROR, "Sfx\\Sorceror\\Mage04.wav", NULL }, + { sfx_STREAM | sfx_SORCEROR, "Sfx\\Sorceror\\Mage05.wav", NULL }, + { sfx_STREAM | sfx_SORCEROR, "Sfx\\Sorceror\\Mage06.wav", NULL }, + { sfx_STREAM | sfx_SORCEROR, "Sfx\\Sorceror\\Mage07.wav", NULL }, + { sfx_STREAM | sfx_SORCEROR, "Sfx\\Sorceror\\Mage08.wav", NULL }, + { sfx_STREAM | sfx_SORCEROR, "Sfx\\Sorceror\\Mage09.wav", NULL }, + { sfx_STREAM | sfx_SORCEROR, "Sfx\\Sorceror\\Mage10.wav", NULL }, + { sfx_STREAM | sfx_SORCEROR, "Sfx\\Sorceror\\Mage11.wav", NULL }, + { sfx_STREAM | sfx_SORCEROR, "Sfx\\Sorceror\\Mage12.wav", NULL }, + { sfx_SORCEROR, "Sfx\\Sorceror\\Mage13.wav", NULL }, + { sfx_SORCEROR, "Sfx\\Sorceror\\Mage14.wav", NULL }, + { sfx_SORCEROR, "Sfx\\Sorceror\\Mage15.wav", NULL }, + { sfx_SORCEROR, "Sfx\\Sorceror\\Mage16.wav", NULL }, + { sfx_SORCEROR, "Sfx\\Sorceror\\Mage17.wav", NULL }, + { sfx_SORCEROR, "Sfx\\Sorceror\\Mage18.wav", NULL }, + { sfx_SORCEROR, "Sfx\\Sorceror\\Mage19.wav", NULL }, + { sfx_SORCEROR, "Sfx\\Sorceror\\Mage20.wav", NULL }, + { sfx_SORCEROR, "Sfx\\Sorceror\\Mage21.wav", NULL }, + { sfx_SORCEROR, "Sfx\\Sorceror\\Mage22.wav", NULL }, + { sfx_SORCEROR, "Sfx\\Sorceror\\Mage23.wav", NULL }, + { sfx_SORCEROR, "Sfx\\Sorceror\\Mage24.wav", NULL }, + { sfx_SORCEROR, "Sfx\\Sorceror\\Mage25.wav", NULL }, + { sfx_SORCEROR, "Sfx\\Sorceror\\Mage26.wav", NULL }, + { sfx_SORCEROR, "Sfx\\Sorceror\\Mage27.wav", NULL }, + { sfx_SORCEROR, "Sfx\\Sorceror\\Mage28.wav", NULL }, + { sfx_SORCEROR, "Sfx\\Sorceror\\Mage29.wav", NULL }, + { sfx_SORCEROR, "Sfx\\Sorceror\\Mage30.wav", NULL }, + { sfx_SORCEROR, "Sfx\\Sorceror\\Mage31.wav", NULL }, + { sfx_SORCEROR, "Sfx\\Sorceror\\Mage32.wav", NULL }, + { sfx_SORCEROR, "Sfx\\Sorceror\\Mage33.wav", NULL }, + { sfx_SORCEROR, "Sfx\\Sorceror\\Mage34.wav", NULL }, + { sfx_SORCEROR, "Sfx\\Sorceror\\Mage35.wav", NULL }, + { sfx_SORCEROR, "Sfx\\Sorceror\\Mage36.wav", NULL }, + { sfx_SORCEROR, "Sfx\\Sorceror\\Mage37.wav", NULL }, + { sfx_SORCEROR, "Sfx\\Sorceror\\Mage38.wav", NULL }, + { sfx_SORCEROR, "Sfx\\Sorceror\\Mage39.wav", NULL }, + { sfx_SORCEROR, "Sfx\\Sorceror\\Mage40.wav", NULL }, + { sfx_SORCEROR, "Sfx\\Sorceror\\Mage41.wav", NULL }, + { sfx_SORCEROR, "Sfx\\Sorceror\\Mage42.wav", NULL }, + { sfx_SORCEROR, "Sfx\\Sorceror\\Mage43.wav", NULL }, + { sfx_SORCEROR, "Sfx\\Sorceror\\Mage44.wav", NULL }, + { sfx_SORCEROR, "Sfx\\Sorceror\\Mage45.wav", NULL }, + { sfx_SORCEROR, "Sfx\\Sorceror\\Mage46.wav", NULL }, + { sfx_SORCEROR, "Sfx\\Sorceror\\Mage47.wav", NULL }, + { sfx_SORCEROR, "Sfx\\Sorceror\\Mage48.wav", NULL }, + { sfx_SORCEROR, "Sfx\\Sorceror\\Mage49.wav", NULL }, + { sfx_SORCEROR, "Sfx\\Sorceror\\Mage50.wav", NULL }, + { sfx_STREAM | sfx_SORCEROR, "Sfx\\Sorceror\\Mage51.wav", NULL }, + { sfx_STREAM | sfx_SORCEROR, "Sfx\\Sorceror\\Mage52.wav", NULL }, + { sfx_STREAM | sfx_SORCEROR, "Sfx\\Sorceror\\Mage53.wav", NULL }, + { sfx_STREAM | sfx_SORCEROR, "Sfx\\Sorceror\\Mage54.wav", NULL }, + { sfx_STREAM | sfx_SORCEROR, "Sfx\\Sorceror\\Mage55.wav", NULL }, + { sfx_STREAM | sfx_SORCEROR, "Sfx\\Sorceror\\Mage56.wav", NULL }, + { sfx_SORCEROR, "Sfx\\Sorceror\\Mage57.wav", NULL }, + { sfx_STREAM | sfx_SORCEROR, "Sfx\\Sorceror\\Mage58.wav", NULL }, + { sfx_STREAM | sfx_SORCEROR, "Sfx\\Sorceror\\Mage59.wav", NULL }, + { sfx_STREAM | sfx_SORCEROR, "Sfx\\Sorceror\\Mage60.wav", NULL }, + { sfx_STREAM | sfx_SORCEROR, "Sfx\\Sorceror\\Mage61.wav", NULL }, + { sfx_STREAM | sfx_SORCEROR, "Sfx\\Sorceror\\Mage62.wav", NULL }, + { sfx_STREAM | sfx_SORCEROR, "Sfx\\Sorceror\\Mage63.wav", NULL }, + { sfx_SORCEROR, "Sfx\\Sorceror\\Mage64.wav", NULL }, + { sfx_SORCEROR, "Sfx\\Sorceror\\Mage65.wav", NULL }, + { sfx_SORCEROR, "Sfx\\Sorceror\\Mage66.wav", NULL }, + { sfx_SORCEROR, "Sfx\\Sorceror\\Mage67.wav", NULL }, + { sfx_SORCEROR, "Sfx\\Sorceror\\Mage68.wav", NULL }, + { sfx_SORCEROR, "Sfx\\Sorceror\\Mage69.wav", NULL }, + { sfx_SORCEROR, "Sfx\\Sorceror\\Mage69b.wav", NULL }, + { sfx_SORCEROR, "Sfx\\Sorceror\\Mage70.wav", NULL }, + { sfx_SORCEROR, "Sfx\\Sorceror\\Mage71.wav", NULL }, + { sfx_SORCEROR, "Sfx\\Sorceror\\Mage72.wav", NULL }, + { sfx_SORCEROR, "Sfx\\Sorceror\\Mage73.wav", NULL }, + { sfx_SORCEROR, "Sfx\\Sorceror\\Mage74.wav", NULL }, + { sfx_SORCEROR, "Sfx\\Sorceror\\Mage75.wav", NULL }, + { sfx_SORCEROR, "Sfx\\Sorceror\\Mage76.wav", NULL }, + { sfx_SORCEROR, "Sfx\\Sorceror\\Mage77.wav", NULL }, + { sfx_SORCEROR, "Sfx\\Sorceror\\Mage78.wav", NULL }, + { sfx_SORCEROR, "Sfx\\Sorceror\\Mage79.wav", NULL }, + { sfx_STREAM | sfx_SORCEROR, "Sfx\\Sorceror\\Mage80.wav", NULL }, + { sfx_STREAM | sfx_SORCEROR, "Sfx\\Sorceror\\Mage81.wav", NULL }, + { sfx_STREAM | sfx_SORCEROR, "Sfx\\Sorceror\\Mage82.wav", NULL }, + { sfx_STREAM | sfx_SORCEROR, "Sfx\\Sorceror\\Mage83.wav", NULL }, + { sfx_STREAM | sfx_SORCEROR, "Sfx\\Sorceror\\Mage84.wav", NULL }, + { sfx_STREAM | sfx_SORCEROR, "Sfx\\Sorceror\\Mage85.wav", NULL }, + { sfx_STREAM | sfx_SORCEROR, "Sfx\\Sorceror\\Mage86.wav", NULL }, + { sfx_STREAM | sfx_SORCEROR, "Sfx\\Sorceror\\Mage87.wav", NULL }, + { sfx_STREAM | sfx_SORCEROR, "Sfx\\Sorceror\\Mage88.wav", NULL }, + { sfx_STREAM | sfx_SORCEROR, "Sfx\\Sorceror\\Mage89.wav", NULL }, + { sfx_STREAM | sfx_SORCEROR, "Sfx\\Sorceror\\Mage90.wav", NULL }, + { sfx_STREAM | sfx_SORCEROR, "Sfx\\Sorceror\\Mage91.wav", NULL }, + { sfx_STREAM | sfx_SORCEROR, "Sfx\\Sorceror\\Mage92.wav", NULL }, + { sfx_STREAM | sfx_SORCEROR, "Sfx\\Sorceror\\Mage93.wav", NULL }, + { sfx_STREAM | sfx_SORCEROR, "Sfx\\Sorceror\\Mage94.wav", NULL }, + { sfx_STREAM | sfx_SORCEROR, "Sfx\\Sorceror\\Mage95.wav", NULL }, + { sfx_STREAM | sfx_SORCEROR, "Sfx\\Sorceror\\Mage96.wav", NULL }, + { sfx_STREAM | sfx_SORCEROR, "Sfx\\Sorceror\\Mage97.wav", NULL }, + { sfx_STREAM | sfx_SORCEROR, "Sfx\\Sorceror\\Mage98.wav", NULL }, + { sfx_STREAM | sfx_SORCEROR, "Sfx\\Sorceror\\Mage99.wav", NULL }, + { sfx_STREAM | sfx_SORCEROR, "Sfx\\Sorceror\\Mage100.wav", NULL }, + { sfx_STREAM | sfx_SORCEROR, "Sfx\\Sorceror\\Mage101.wav", NULL }, + { sfx_STREAM | sfx_SORCEROR, "Sfx\\Sorceror\\Mage102.wav", NULL }, + { sfx_STREAM | sfx_ROGUE, "Sfx\\Rogue\\Rogue01.wav", NULL }, + { sfx_STREAM | sfx_ROGUE, "Sfx\\Rogue\\Rogue02.wav", NULL }, + { sfx_STREAM | sfx_ROGUE, "Sfx\\Rogue\\Rogue03.wav", NULL }, + { sfx_STREAM | sfx_ROGUE, "Sfx\\Rogue\\Rogue04.wav", NULL }, + { sfx_STREAM | sfx_ROGUE, "Sfx\\Rogue\\Rogue05.wav", NULL }, + { sfx_STREAM | sfx_ROGUE, "Sfx\\Rogue\\Rogue06.wav", NULL }, + { sfx_STREAM | sfx_ROGUE, "Sfx\\Rogue\\Rogue07.wav", NULL }, + { sfx_STREAM | sfx_ROGUE, "Sfx\\Rogue\\Rogue08.wav", NULL }, + { sfx_STREAM | sfx_ROGUE, "Sfx\\Rogue\\Rogue09.wav", NULL }, + { sfx_STREAM | sfx_ROGUE, "Sfx\\Rogue\\Rogue10.wav", NULL }, + { sfx_STREAM | sfx_ROGUE, "Sfx\\Rogue\\Rogue11.wav", NULL }, + { sfx_STREAM | sfx_ROGUE, "Sfx\\Rogue\\Rogue12.wav", NULL }, + { sfx_ROGUE, "Sfx\\Rogue\\Rogue13.wav", NULL }, + { sfx_ROGUE, "Sfx\\Rogue\\Rogue14.wav", NULL }, + { sfx_ROGUE, "Sfx\\Rogue\\Rogue15.wav", NULL }, + { sfx_ROGUE, "Sfx\\Rogue\\Rogue16.wav", NULL }, + { sfx_ROGUE, "Sfx\\Rogue\\Rogue17.wav", NULL }, + { sfx_ROGUE, "Sfx\\Rogue\\Rogue18.wav", NULL }, + { sfx_ROGUE, "Sfx\\Rogue\\Rogue19.wav", NULL }, + { sfx_ROGUE, "Sfx\\Rogue\\Rogue20.wav", NULL }, + { sfx_ROGUE, "Sfx\\Rogue\\Rogue21.wav", NULL }, + { sfx_ROGUE, "Sfx\\Rogue\\Rogue22.wav", NULL }, + { sfx_ROGUE, "Sfx\\Rogue\\Rogue23.wav", NULL }, + { sfx_ROGUE, "Sfx\\Rogue\\Rogue24.wav", NULL }, + { sfx_ROGUE, "Sfx\\Rogue\\Rogue25.wav", NULL }, + { sfx_ROGUE, "Sfx\\Rogue\\Rogue26.wav", NULL }, + { sfx_ROGUE, "Sfx\\Rogue\\Rogue27.wav", NULL }, + { sfx_ROGUE, "Sfx\\Rogue\\Rogue28.wav", NULL }, + { sfx_ROGUE, "Sfx\\Rogue\\Rogue29.wav", NULL }, + { sfx_ROGUE, "Sfx\\Rogue\\Rogue30.wav", NULL }, + { sfx_ROGUE, "Sfx\\Rogue\\Rogue31.wav", NULL }, + { sfx_ROGUE, "Sfx\\Rogue\\Rogue32.wav", NULL }, + { sfx_ROGUE, "Sfx\\Rogue\\Rogue33.wav", NULL }, + { sfx_ROGUE, "Sfx\\Rogue\\Rogue34.wav", NULL }, + { sfx_ROGUE, "Sfx\\Rogue\\Rogue35.wav", NULL }, + { sfx_ROGUE, "Sfx\\Rogue\\Rogue36.wav", NULL }, + { sfx_ROGUE, "Sfx\\Rogue\\Rogue37.wav", NULL }, + { sfx_ROGUE, "Sfx\\Rogue\\Rogue38.wav", NULL }, + { sfx_ROGUE, "Sfx\\Rogue\\Rogue39.wav", NULL }, + { sfx_ROGUE, "Sfx\\Rogue\\Rogue40.wav", NULL }, + { sfx_ROGUE, "Sfx\\Rogue\\Rogue41.wav", NULL }, + { sfx_ROGUE, "Sfx\\Rogue\\Rogue42.wav", NULL }, + { sfx_ROGUE, "Sfx\\Rogue\\Rogue43.wav", NULL }, + { sfx_ROGUE, "Sfx\\Rogue\\Rogue44.wav", NULL }, + { sfx_ROGUE, "Sfx\\Rogue\\Rogue45.wav", NULL }, + { sfx_ROGUE, "Sfx\\Rogue\\Rogue46.wav", NULL }, + { sfx_ROGUE, "Sfx\\Rogue\\Rogue47.wav", NULL }, + { sfx_ROGUE, "Sfx\\Rogue\\Rogue48.wav", NULL }, + { sfx_ROGUE, "Sfx\\Rogue\\Rogue49.wav", NULL }, + { sfx_ROGUE, "Sfx\\Rogue\\Rogue50.wav", NULL }, + { sfx_STREAM | sfx_ROGUE, "Sfx\\Rogue\\Rogue51.wav", NULL }, + { sfx_STREAM | sfx_ROGUE, "Sfx\\Rogue\\Rogue52.wav", NULL }, + { sfx_STREAM | sfx_ROGUE, "Sfx\\Rogue\\Rogue53.wav", NULL }, + { sfx_STREAM | sfx_ROGUE, "Sfx\\Rogue\\Rogue54.wav", NULL }, + { sfx_STREAM | sfx_ROGUE, "Sfx\\Rogue\\Rogue55.wav", NULL }, + { sfx_STREAM | sfx_ROGUE, "Sfx\\Rogue\\Rogue56.wav", NULL }, + { sfx_ROGUE, "Sfx\\Rogue\\Rogue57.wav", NULL }, + { sfx_STREAM | sfx_ROGUE, "Sfx\\Rogue\\Rogue58.wav", NULL }, + { sfx_STREAM | sfx_ROGUE, "Sfx\\Rogue\\Rogue59.wav", NULL }, + { sfx_STREAM | sfx_ROGUE, "Sfx\\Rogue\\Rogue60.wav", NULL }, + { sfx_STREAM | sfx_ROGUE, "Sfx\\Rogue\\Rogue61.wav", NULL }, + { sfx_STREAM | sfx_ROGUE, "Sfx\\Rogue\\Rogue62.wav", NULL }, + { sfx_STREAM | sfx_ROGUE, "Sfx\\Rogue\\Rogue63.wav", NULL }, + { sfx_ROGUE, "Sfx\\Rogue\\Rogue64.wav", NULL }, + { sfx_ROGUE, "Sfx\\Rogue\\Rogue65.wav", NULL }, + { sfx_ROGUE, "Sfx\\Rogue\\Rogue66.wav", NULL }, + { sfx_ROGUE, "Sfx\\Rogue\\Rogue67.wav", NULL }, + { sfx_ROGUE, "Sfx\\Rogue\\Rogue68.wav", NULL }, + { sfx_ROGUE, "Sfx\\Rogue\\Rogue69.wav", NULL }, + { sfx_ROGUE, "Sfx\\Rogue\\Rogue69b.wav", NULL }, + { sfx_ROGUE, "Sfx\\Rogue\\Rogue70.wav", NULL }, + { sfx_ROGUE, "Sfx\\Rogue\\Rogue71.wav", NULL }, + { sfx_ROGUE, "Sfx\\Rogue\\Rogue72.wav", NULL }, + { sfx_ROGUE, "Sfx\\Rogue\\Rogue73.wav", NULL }, + { sfx_ROGUE, "Sfx\\Rogue\\Rogue74.wav", NULL }, + { sfx_ROGUE, "Sfx\\Rogue\\Rogue75.wav", NULL }, + { sfx_ROGUE, "Sfx\\Rogue\\Rogue76.wav", NULL }, + { sfx_ROGUE, "Sfx\\Rogue\\Rogue77.wav", NULL }, + { sfx_ROGUE, "Sfx\\Rogue\\Rogue78.wav", NULL }, + { sfx_ROGUE, "Sfx\\Rogue\\Rogue79.wav", NULL }, + { sfx_STREAM | sfx_ROGUE, "Sfx\\Rogue\\Rogue80.wav", NULL }, + { sfx_STREAM | sfx_ROGUE, "Sfx\\Rogue\\Rogue81.wav", NULL }, + { sfx_STREAM | sfx_ROGUE, "Sfx\\Rogue\\Rogue82.wav", NULL }, + { sfx_STREAM | sfx_ROGUE, "Sfx\\Rogue\\Rogue83.wav", NULL }, + { sfx_STREAM | sfx_ROGUE, "Sfx\\Rogue\\Rogue84.wav", NULL }, + { sfx_STREAM | sfx_ROGUE, "Sfx\\Rogue\\Rogue85.wav", NULL }, + { sfx_STREAM | sfx_ROGUE, "Sfx\\Rogue\\Rogue86.wav", NULL }, + { sfx_STREAM | sfx_ROGUE, "Sfx\\Rogue\\Rogue87.wav", NULL }, + { sfx_STREAM | sfx_ROGUE, "Sfx\\Rogue\\Rogue88.wav", NULL }, + { sfx_STREAM | sfx_ROGUE, "Sfx\\Rogue\\Rogue89.wav", NULL }, + { sfx_STREAM | sfx_ROGUE, "Sfx\\Rogue\\Rogue90.wav", NULL }, + { sfx_STREAM | sfx_ROGUE, "Sfx\\Rogue\\Rogue91.wav", NULL }, + { sfx_STREAM | sfx_ROGUE, "Sfx\\Rogue\\Rogue92.wav", NULL }, + { sfx_STREAM | sfx_ROGUE, "Sfx\\Rogue\\Rogue93.wav", NULL }, + { sfx_STREAM | sfx_ROGUE, "Sfx\\Rogue\\Rogue94.wav", NULL }, + { sfx_STREAM | sfx_ROGUE, "Sfx\\Rogue\\Rogue95.wav", NULL }, + { sfx_STREAM | sfx_ROGUE, "Sfx\\Rogue\\Rogue96.wav", NULL }, + { sfx_STREAM | sfx_ROGUE, "Sfx\\Rogue\\Rogue97.wav", NULL }, + { sfx_STREAM | sfx_ROGUE, "Sfx\\Rogue\\Rogue98.wav", NULL }, + { sfx_STREAM | sfx_ROGUE, "Sfx\\Rogue\\Rogue99.wav", NULL }, + { sfx_STREAM | sfx_ROGUE, "Sfx\\Rogue\\Rogue100.wav", NULL }, + { sfx_STREAM | sfx_ROGUE, "Sfx\\Rogue\\Rogue101.wav", NULL }, + { sfx_STREAM | sfx_ROGUE, "Sfx\\Rogue\\Rogue102.wav", NULL }, + { sfx_STREAM | sfx_WARRIOR, "Sfx\\Warrior\\Warior01.wav", NULL }, + { sfx_STREAM | sfx_WARRIOR, "Sfx\\Warrior\\Warior02.wav", NULL }, + { sfx_STREAM | sfx_WARRIOR, "Sfx\\Warrior\\Warior03.wav", NULL }, + { sfx_STREAM | sfx_WARRIOR, "Sfx\\Warrior\\Warior04.wav", NULL }, + { sfx_STREAM | sfx_WARRIOR, "Sfx\\Warrior\\Warior05.wav", NULL }, + { sfx_STREAM | sfx_WARRIOR, "Sfx\\Warrior\\Warior06.wav", NULL }, + { sfx_STREAM | sfx_WARRIOR, "Sfx\\Warrior\\Warior07.wav", NULL }, + { sfx_STREAM | sfx_WARRIOR, "Sfx\\Warrior\\Warior08.wav", NULL }, + { sfx_STREAM | sfx_WARRIOR, "Sfx\\Warrior\\Warior09.wav", NULL }, + { sfx_STREAM | sfx_WARRIOR, "Sfx\\Warrior\\Warior10.wav", NULL }, + { sfx_STREAM | sfx_WARRIOR, "Sfx\\Warrior\\Warior11.wav", NULL }, + { sfx_STREAM | sfx_WARRIOR, "Sfx\\Warrior\\Warior12.wav", NULL }, #endif - { SFX_WARRIOR, "Sfx\\Warrior\\Warior13.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Warior14.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Wario14b.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Wario14c.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Warior15.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Wario15b.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Wario15c.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Warior16.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Wario16b.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Wario16c.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Warior17.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Warior18.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Warior19.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Warior20.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Warior21.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Warior22.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Warior23.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Warior24.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Warior25.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Warior26.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Warior27.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Warior28.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Warior29.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Warior30.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Warior31.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Warior32.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Warior33.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Warior34.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Warior35.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Warior36.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Warior37.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Warior38.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Warior39.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Warior40.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Warior41.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Warior42.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Warior43.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Warior44.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Warior45.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Warior46.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Warior47.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Warior48.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Warior49.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Warior50.wav", NULL }, - { SFX_STREAM | SFX_WARRIOR, "Sfx\\Warrior\\Warior51.wav", NULL }, - { SFX_STREAM | SFX_WARRIOR, "Sfx\\Warrior\\Warior52.wav", NULL }, - { SFX_STREAM | SFX_WARRIOR, "Sfx\\Warrior\\Warior53.wav", NULL }, - { SFX_STREAM | SFX_WARRIOR, "Sfx\\Warrior\\Warior54.wav", NULL }, - { SFX_STREAM | SFX_WARRIOR, "Sfx\\Warrior\\Warior55.wav", NULL }, - { SFX_STREAM | SFX_WARRIOR, "Sfx\\Warrior\\Warior56.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Warior57.wav", NULL }, - { SFX_STREAM | SFX_WARRIOR, "Sfx\\Warrior\\Warior58.wav", NULL }, - { SFX_STREAM | SFX_WARRIOR, "Sfx\\Warrior\\Warior59.wav", NULL }, - { SFX_STREAM | SFX_WARRIOR, "Sfx\\Warrior\\Warior60.wav", NULL }, - { SFX_STREAM | SFX_WARRIOR, "Sfx\\Warrior\\Warior61.wav", NULL }, - { SFX_STREAM | SFX_WARRIOR, "Sfx\\Warrior\\Warior62.wav", NULL }, - { SFX_STREAM | SFX_WARRIOR, "Sfx\\Warrior\\Warior63.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Warior64.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Warior65.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Warior66.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Warior67.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Warior68.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Warior69.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Wario69b.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Warior70.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Warior71.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Warior72.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Warior73.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Warior74.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Warior75.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Warior76.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Warior77.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Warior78.wav", NULL }, - { SFX_WARRIOR, "Sfx\\Warrior\\Warior79.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Warior13.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Warior14.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Wario14b.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Wario14c.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Warior15.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Wario15b.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Wario15c.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Warior16.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Wario16b.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Wario16c.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Warior17.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Warior18.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Warior19.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Warior20.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Warior21.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Warior22.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Warior23.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Warior24.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Warior25.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Warior26.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Warior27.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Warior28.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Warior29.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Warior30.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Warior31.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Warior32.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Warior33.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Warior34.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Warior35.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Warior36.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Warior37.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Warior38.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Warior39.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Warior40.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Warior41.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Warior42.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Warior43.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Warior44.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Warior45.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Warior46.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Warior47.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Warior48.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Warior49.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Warior50.wav", NULL }, + { sfx_STREAM | sfx_WARRIOR, "Sfx\\Warrior\\Warior51.wav", NULL }, + { sfx_STREAM | sfx_WARRIOR, "Sfx\\Warrior\\Warior52.wav", NULL }, + { sfx_STREAM | sfx_WARRIOR, "Sfx\\Warrior\\Warior53.wav", NULL }, + { sfx_STREAM | sfx_WARRIOR, "Sfx\\Warrior\\Warior54.wav", NULL }, + { sfx_STREAM | sfx_WARRIOR, "Sfx\\Warrior\\Warior55.wav", NULL }, + { sfx_STREAM | sfx_WARRIOR, "Sfx\\Warrior\\Warior56.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Warior57.wav", NULL }, + { sfx_STREAM | sfx_WARRIOR, "Sfx\\Warrior\\Warior58.wav", NULL }, + { sfx_STREAM | sfx_WARRIOR, "Sfx\\Warrior\\Warior59.wav", NULL }, + { sfx_STREAM | sfx_WARRIOR, "Sfx\\Warrior\\Warior60.wav", NULL }, + { sfx_STREAM | sfx_WARRIOR, "Sfx\\Warrior\\Warior61.wav", NULL }, + { sfx_STREAM | sfx_WARRIOR, "Sfx\\Warrior\\Warior62.wav", NULL }, + { sfx_STREAM | sfx_WARRIOR, "Sfx\\Warrior\\Warior63.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Warior64.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Warior65.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Warior66.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Warior67.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Warior68.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Warior69.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Wario69b.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Warior70.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Warior71.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Warior72.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Warior73.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Warior74.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Warior75.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Warior76.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Warior77.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Warior78.wav", NULL }, + { sfx_WARRIOR, "Sfx\\Warrior\\Warior79.wav", NULL }, #ifndef SPAWN - { SFX_STREAM | SFX_WARRIOR, "Sfx\\Warrior\\Warior80.wav", NULL }, - { SFX_STREAM | SFX_WARRIOR, "Sfx\\Warrior\\Warior81.wav", NULL }, - { SFX_STREAM | SFX_WARRIOR, "Sfx\\Warrior\\Warior82.wav", NULL }, - { SFX_STREAM | SFX_WARRIOR, "Sfx\\Warrior\\Warior83.wav", NULL }, - { SFX_STREAM | SFX_WARRIOR, "Sfx\\Warrior\\Warior84.wav", NULL }, - { SFX_STREAM | SFX_WARRIOR, "Sfx\\Warrior\\Warior85.wav", NULL }, - { SFX_STREAM | SFX_WARRIOR, "Sfx\\Warrior\\Warior86.wav", NULL }, - { SFX_STREAM | SFX_WARRIOR, "Sfx\\Warrior\\Warior87.wav", NULL }, - { SFX_STREAM | SFX_WARRIOR, "Sfx\\Warrior\\Warior88.wav", NULL }, - { SFX_STREAM | SFX_WARRIOR, "Sfx\\Warrior\\Warior89.wav", NULL }, - { SFX_STREAM | SFX_WARRIOR, "Sfx\\Warrior\\Warior90.wav", NULL }, - { SFX_STREAM | SFX_WARRIOR, "Sfx\\Warrior\\Warior91.wav", NULL }, - { SFX_STREAM | SFX_WARRIOR, "Sfx\\Warrior\\Warior92.wav", NULL }, - { SFX_STREAM | SFX_WARRIOR, "Sfx\\Warrior\\Warior93.wav", NULL }, - { SFX_STREAM | SFX_WARRIOR, "Sfx\\Warrior\\Warior94.wav", NULL }, - { SFX_STREAM | SFX_WARRIOR, "Sfx\\Warrior\\Warior95.wav", NULL }, - { SFX_STREAM | SFX_WARRIOR, "Sfx\\Warrior\\Wario95b.wav", NULL }, - { SFX_STREAM | SFX_WARRIOR, "Sfx\\Warrior\\Wario95c.wav", NULL }, - { SFX_STREAM | SFX_WARRIOR, "Sfx\\Warrior\\Wario95d.wav", NULL }, - { SFX_STREAM | SFX_WARRIOR, "Sfx\\Warrior\\Wario95e.wav", NULL }, - { SFX_STREAM | SFX_WARRIOR, "Sfx\\Warrior\\Wario95f.wav", NULL }, + { sfx_STREAM | sfx_WARRIOR, "Sfx\\Warrior\\Warior80.wav", NULL }, + { sfx_STREAM | sfx_WARRIOR, "Sfx\\Warrior\\Warior81.wav", NULL }, + { sfx_STREAM | sfx_WARRIOR, "Sfx\\Warrior\\Warior82.wav", NULL }, + { sfx_STREAM | sfx_WARRIOR, "Sfx\\Warrior\\Warior83.wav", NULL }, + { sfx_STREAM | sfx_WARRIOR, "Sfx\\Warrior\\Warior84.wav", NULL }, + { sfx_STREAM | sfx_WARRIOR, "Sfx\\Warrior\\Warior85.wav", NULL }, + { sfx_STREAM | sfx_WARRIOR, "Sfx\\Warrior\\Warior86.wav", NULL }, + { sfx_STREAM | sfx_WARRIOR, "Sfx\\Warrior\\Warior87.wav", NULL }, + { sfx_STREAM | sfx_WARRIOR, "Sfx\\Warrior\\Warior88.wav", NULL }, + { sfx_STREAM | sfx_WARRIOR, "Sfx\\Warrior\\Warior89.wav", NULL }, + { sfx_STREAM | sfx_WARRIOR, "Sfx\\Warrior\\Warior90.wav", NULL }, + { sfx_STREAM | sfx_WARRIOR, "Sfx\\Warrior\\Warior91.wav", NULL }, + { sfx_STREAM | sfx_WARRIOR, "Sfx\\Warrior\\Warior92.wav", NULL }, + { sfx_STREAM | sfx_WARRIOR, "Sfx\\Warrior\\Warior93.wav", NULL }, + { sfx_STREAM | sfx_WARRIOR, "Sfx\\Warrior\\Warior94.wav", NULL }, + { sfx_STREAM | sfx_WARRIOR, "Sfx\\Warrior\\Warior95.wav", NULL }, + { sfx_STREAM | sfx_WARRIOR, "Sfx\\Warrior\\Wario95b.wav", NULL }, + { sfx_STREAM | sfx_WARRIOR, "Sfx\\Warrior\\Wario95c.wav", NULL }, + { sfx_STREAM | sfx_WARRIOR, "Sfx\\Warrior\\Wario95d.wav", NULL }, + { sfx_STREAM | sfx_WARRIOR, "Sfx\\Warrior\\Wario95e.wav", NULL }, + { sfx_STREAM | sfx_WARRIOR, "Sfx\\Warrior\\Wario95f.wav", NULL }, #endif - { SFX_STREAM | SFX_WARRIOR, "Sfx\\Warrior\\Wario96b.wav", NULL }, - { SFX_STREAM | SFX_WARRIOR, "Sfx\\Warrior\\Wario97.wav", NULL }, - { SFX_STREAM | SFX_WARRIOR, "Sfx\\Warrior\\Wario98.wav", NULL }, - { SFX_STREAM | SFX_WARRIOR, "Sfx\\Warrior\\Warior99.wav", NULL }, + { sfx_STREAM | sfx_WARRIOR, "Sfx\\Warrior\\Wario96b.wav", NULL }, + { sfx_STREAM | sfx_WARRIOR, "Sfx\\Warrior\\Wario97.wav", NULL }, + { sfx_STREAM | sfx_WARRIOR, "Sfx\\Warrior\\Wario98.wav", NULL }, + { sfx_STREAM | sfx_WARRIOR, "Sfx\\Warrior\\Warior99.wav", NULL }, #ifndef SPAWN - { SFX_STREAM | SFX_WARRIOR, "Sfx\\Warrior\\Wario100.wav", NULL }, - { SFX_STREAM | SFX_WARRIOR, "Sfx\\Warrior\\Wario101.wav", NULL }, - { SFX_STREAM | SFX_WARRIOR, "Sfx\\Warrior\\Wario102.wav", NULL }, - { SFX_STREAM, "Sfx\\Narrator\\Nar01.wav", NULL }, - { SFX_STREAM, "Sfx\\Narrator\\Nar02.wav", NULL }, - { SFX_STREAM, "Sfx\\Narrator\\Nar03.wav", NULL }, - { SFX_STREAM, "Sfx\\Narrator\\Nar04.wav", NULL }, - { SFX_STREAM, "Sfx\\Narrator\\Nar05.wav", NULL }, - { SFX_STREAM, "Sfx\\Narrator\\Nar06.wav", NULL }, - { SFX_STREAM, "Sfx\\Narrator\\Nar07.wav", NULL }, - { SFX_STREAM, "Sfx\\Narrator\\Nar08.wav", NULL }, - { SFX_STREAM, "Sfx\\Narrator\\Nar09.wav", NULL }, - { SFX_STREAM, "Sfx\\Misc\\Lvl16int.wav", NULL }, - { SFX_STREAM, "Sfx\\Monsters\\Butcher.wav", NULL }, - { SFX_STREAM, "Sfx\\Monsters\\Garbud01.wav", NULL }, - { SFX_STREAM, "Sfx\\Monsters\\Garbud02.wav", NULL }, - { SFX_STREAM, "Sfx\\Monsters\\Garbud03.wav", NULL }, - { SFX_STREAM, "Sfx\\Monsters\\Garbud04.wav", NULL }, - { SFX_STREAM, "Sfx\\Monsters\\Izual01.wav", NULL }, - { SFX_STREAM, "Sfx\\Monsters\\Lach01.wav", NULL }, - { SFX_STREAM, "Sfx\\Monsters\\Lach02.wav", NULL }, - { SFX_STREAM, "Sfx\\Monsters\\Lach03.wav", NULL }, - { SFX_STREAM, "Sfx\\Monsters\\Laz01.wav", NULL }, - { SFX_STREAM, "Sfx\\Monsters\\Laz02.wav", NULL }, - { SFX_STREAM, "Sfx\\Monsters\\Sking01.wav", NULL }, - { SFX_STREAM, "Sfx\\Monsters\\Snot01.wav", NULL }, - { SFX_STREAM, "Sfx\\Monsters\\Snot02.wav", NULL }, - { SFX_STREAM, "Sfx\\Monsters\\Snot03.wav", NULL }, - { SFX_STREAM, "Sfx\\Monsters\\Warlrd01.wav", NULL }, - { SFX_STREAM, "Sfx\\Monsters\\Wlock01.wav", NULL }, - { SFX_STREAM, "Sfx\\Monsters\\Zhar01.wav", NULL }, - { SFX_STREAM, "Sfx\\Monsters\\Zhar02.wav", NULL }, - { SFX_STREAM, "Sfx\\Monsters\\DiabloD.wav", NULL }, + { sfx_STREAM | sfx_WARRIOR, "Sfx\\Warrior\\Wario100.wav", NULL }, + { sfx_STREAM | sfx_WARRIOR, "Sfx\\Warrior\\Wario101.wav", NULL }, + { sfx_STREAM | sfx_WARRIOR, "Sfx\\Warrior\\Wario102.wav", NULL }, + { sfx_STREAM, "Sfx\\Narrator\\Nar01.wav", NULL }, + { sfx_STREAM, "Sfx\\Narrator\\Nar02.wav", NULL }, + { sfx_STREAM, "Sfx\\Narrator\\Nar03.wav", NULL }, + { sfx_STREAM, "Sfx\\Narrator\\Nar04.wav", NULL }, + { sfx_STREAM, "Sfx\\Narrator\\Nar05.wav", NULL }, + { sfx_STREAM, "Sfx\\Narrator\\Nar06.wav", NULL }, + { sfx_STREAM, "Sfx\\Narrator\\Nar07.wav", NULL }, + { sfx_STREAM, "Sfx\\Narrator\\Nar08.wav", NULL }, + { sfx_STREAM, "Sfx\\Narrator\\Nar09.wav", NULL }, + { sfx_STREAM, "Sfx\\Misc\\Lvl16int.wav", NULL }, + { sfx_STREAM, "Sfx\\Monsters\\Butcher.wav", NULL }, + { sfx_STREAM, "Sfx\\Monsters\\Garbud01.wav", NULL }, + { sfx_STREAM, "Sfx\\Monsters\\Garbud02.wav", NULL }, + { sfx_STREAM, "Sfx\\Monsters\\Garbud03.wav", NULL }, + { sfx_STREAM, "Sfx\\Monsters\\Garbud04.wav", NULL }, + { sfx_STREAM, "Sfx\\Monsters\\Izual01.wav", NULL }, + { sfx_STREAM, "Sfx\\Monsters\\Lach01.wav", NULL }, + { sfx_STREAM, "Sfx\\Monsters\\Lach02.wav", NULL }, + { sfx_STREAM, "Sfx\\Monsters\\Lach03.wav", NULL }, + { sfx_STREAM, "Sfx\\Monsters\\Laz01.wav", NULL }, + { sfx_STREAM, "Sfx\\Monsters\\Laz02.wav", NULL }, + { sfx_STREAM, "Sfx\\Monsters\\Sking01.wav", NULL }, + { sfx_STREAM, "Sfx\\Monsters\\Snot01.wav", NULL }, + { sfx_STREAM, "Sfx\\Monsters\\Snot02.wav", NULL }, + { sfx_STREAM, "Sfx\\Monsters\\Snot03.wav", NULL }, + { sfx_STREAM, "Sfx\\Monsters\\Warlrd01.wav", NULL }, + { sfx_STREAM, "Sfx\\Monsters\\Wlock01.wav", NULL }, + { sfx_STREAM, "Sfx\\Monsters\\Zhar01.wav", NULL }, + { sfx_STREAM, "Sfx\\Monsters\\Zhar02.wav", NULL }, + { sfx_STREAM, "Sfx\\Monsters\\DiabloD.wav", NULL }, #endif // clang-format on }; -#define PLRSFXS (SFX_WARRIOR | SFX_ROGUE | SFX_SORCEROR) +#define PLRSFXS (sfx_WARRIOR | sfx_ROGUE | sfx_SORCEROR) BOOL effect_is_playing(int nSFX) { @@ -922,7 +922,7 @@ BOOL effect_is_playing(int nSFX) if (sfx->pSnd) return snd_playing(sfx->pSnd); - if (sfx->bFlags & SFX_STREAM) + if (sfx->bFlags & sfx_STREAM) return sfx == sgpStreamSFX; return FALSE; @@ -1056,7 +1056,7 @@ void PlaySFX_priv(TSFX *pSFX, BOOL loc, int x, int y) return; } - if (!(pSFX->bFlags & (SFX_STREAM | SFX_MISC)) && pSFX->pSnd != 0 && snd_playing(pSFX->pSnd)) { + if (!(pSFX->bFlags & (sfx_STREAM | sfx_MISC)) && pSFX->pSnd != 0 && snd_playing(pSFX->pSnd)) { return; } @@ -1066,7 +1066,7 @@ void PlaySFX_priv(TSFX *pSFX, BOOL loc, int x, int y) return; } - if (pSFX->bFlags & SFX_STREAM) { + if (pSFX->bFlags & sfx_STREAM) { stream_play(pSFX, lVolume, lPan); return; } @@ -1228,11 +1228,11 @@ void sound_init() if (gbMaxPlayers > 1) { mask = PLRSFXS; } else if (plr[myplr]._pClass == PC_WARRIOR) { - mask = SFX_WARRIOR; + mask = sfx_WARRIOR; } else if (plr[myplr]._pClass == PC_ROGUE) { - mask = SFX_ROGUE; + mask = sfx_ROGUE; } else if (plr[myplr]._pClass == PC_SORCERER) { - mask = SFX_SORCEROR; + mask = sfx_SORCEROR; } else { app_fatal("effects:1"); } @@ -1257,7 +1257,7 @@ void priv_sound_init(BYTE bLoadMask) continue; } - if (sgSFX[i].bFlags & SFX_STREAM) { + if (sgSFX[i].bFlags & sfx_STREAM) { continue; } @@ -1275,7 +1275,7 @@ void priv_sound_init(BYTE bLoadMask) void ui_sound_init() { - priv_sound_init(SFX_UI); + priv_sound_init(sfx_UI); } void __stdcall effects_play_sound(char *snd_file) diff --git a/enums.h b/enums.h index 47407cc6b..b0607fa0d 100644 --- a/enums.h +++ b/enums.h @@ -1167,14 +1167,14 @@ typedef enum _sfx_id { } _sfx_id; typedef enum sfx_flag { - SFX_STREAM = 0x01, - SFX_MISC = 0x02, - SFX_UI = 0x04, - SFX_MONK = 0x08, - SFX_ROGUE = 0x10, - SFX_WARRIOR = 0x20, - SFX_SORCEROR = 0x40, - SFX_LOADED = 0x80, + sfx_STREAM = 0x01, + sfx_MISC = 0x02, + sfx_UI = 0x04, + sfx_MONK = 0x08, + sfx_ROGUE = 0x10, + sfx_WARRIOR = 0x20, + sfx_SORCEROR = 0x40, + sfx_LOADED = 0x80, } sfx_flag; typedef enum item_equip_type { From cc280eeba3ee3b42bd432b80c3d3e26c41a7d5cb Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Wed, 8 Apr 2020 18:05:51 +0200 Subject: [PATCH 13/15] Enable asserts in files that where cleaned --- Source/cursor.cpp | 2 +- Source/diablo.cpp | 10 +++++----- Source/dx.cpp | 8 ++++---- Source/effects.cpp | 4 ++-- Source/engine.cpp | 30 +++++++++++++++--------------- Source/error.cpp | 2 +- Source/gmenu.cpp | 2 +- 7 files changed, 29 insertions(+), 29 deletions(-) diff --git a/Source/cursor.cpp b/Source/cursor.cpp index 07b564775..798f5719b 100644 --- a/Source/cursor.cpp +++ b/Source/cursor.cpp @@ -75,7 +75,7 @@ const int InvItemHeight[] = { void InitCursor() { - /// ASSERT: assert(! pCursCels); + assert(! pCursCels); pCursCels = LoadFileInMem("Data\\Inv\\Objcurs.CEL", NULL); ClearCursor(); } diff --git a/Source/diablo.cpp b/Source/diablo.cpp index 8a273b096..c68dea101 100644 --- a/Source/diablo.cpp +++ b/Source/diablo.cpp @@ -858,7 +858,7 @@ BOOL LeftMouseCmd(BOOL bShift) { BOOL bNear; - /// ASSERT: assert(MouseY < 352); // PANEL_TOP + assert(MouseY < PANEL_TOP); // 352 if (leveltype == DTYPE_TOWN) { if (pcursitem != -1 && pcurs == CURSOR_HAND) @@ -1023,7 +1023,7 @@ void diablo_hotkey_msg(DWORD dwMsg) } strcat(szFileName, "\\Diablo.ini"); - /// ASSERT: assert(dwMsg < sizeof(spszMsgTbl) / sizeof(spszMsgTbl[0])); + assert(dwMsg < sizeof(spszMsgTbl) / sizeof(spszMsgTbl[0])); GetPrivateProfileString("NetMsg", spszMsgHotKeyTbl[dwMsg], spszMsgTbl[dwMsg], szMsg, sizeof(szMsg), szFileName); NetSendCmdString(-1, szMsg); } @@ -1521,7 +1521,7 @@ void PressChar(int vkey) void LoadLvlGFX() { - /// ASSERT: assert(! pDungeonCels); + assert(! pDungeonCels); switch (leveltype) { case DTYPE_TOWN: @@ -1564,7 +1564,7 @@ void LoadLvlGFX() void LoadAllGFX() { - /// ASSERT: assert(! pSpeedCels); + assert(! pSpeedCels); pSpeedCels = DiabloAllocPtr(0x100000); IncProgress(); IncProgress(); @@ -1756,7 +1756,7 @@ void LoadGameLevel(BOOL firstflag, int lvldir) ResyncMPQuests(); #ifndef SPAWN } else { - /// ASSERT: assert(! pSpeedCels); + assert(! pSpeedCels); pSpeedCels = DiabloAllocPtr(0x100000); LoadSetMap(); IncProgress(); diff --git a/Source/dx.cpp b/Source/dx.cpp index 54efb059a..b6b114f11 100644 --- a/Source/dx.cpp +++ b/Source/dx.cpp @@ -99,9 +99,9 @@ void dx_init(HWND hWnd) BOOL bSuccess; GUID *lpGUID; - /// ASSERT: assert(! gpBuffer); - /// ASSERT: assert(! sgdwLockCount); - /// ASSERT: assert(! sgpBackBuf); + assert(! gpBuffer); + assert(! sgdwLockCount); + assert(! sgpBackBuf); SetFocus(hWnd); ShowWindow(hWnd, SW_SHOWNORMAL); @@ -157,7 +157,7 @@ void dx_init(HWND hWnd) GdiSetBatchLimit(1); dx_create_back_buffer(); bSuccess = SDrawManualInitialize(hWnd, lpDDInterface, lpDDSPrimary, NULL, NULL, lpDDSBackBuf, lpDDPalette, NULL); - /// ASSERT: assert(bSuccess); + assert(bSuccess); } static void lock_buf_priv() diff --git a/Source/effects.cpp b/Source/effects.cpp index 35df489b8..477f442f1 100644 --- a/Source/effects.cpp +++ b/Source/effects.cpp @@ -1082,8 +1082,8 @@ void stream_play(TSFX *pSFX, int lVolume, int lPan) { BOOL success; - /// ASSERT: assert(pSFX); - /// ASSERT: assert(pSFX->bFlags & sfx_STREAM); + assert(pSFX); + assert(pSFX->bFlags & sfx_STREAM); stream_stop(); lVolume += sound_get_or_set_sound_volume(1); if (lVolume >= VOLUME_MIN) { diff --git a/Source/engine.cpp b/Source/engine.cpp index 619cd9d38..6fe623b17 100644 --- a/Source/engine.cpp +++ b/Source/engine.cpp @@ -2751,7 +2751,7 @@ void Cl2Draw(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSkip, return; pFrameTable = (DWORD *)pCelBuff; - /// ASSERT: assert(nCel <= (int) pFrameTable[0]); + assert(nCel <= (int)pFrameTable[0]); pRLEBytes = &pCelBuff[pFrameTable[nCel]]; nDataStart = *(WORD *)&pRLEBytes[CelSkip]; if (!nDataStart) @@ -2942,12 +2942,12 @@ void Cl2DrawOutline(char col, int sx, int sy, BYTE *pCelBuff, int nCel, int nWid /// ASSERT: assert(pCelBuff != NULL); if (pCelBuff == NULL) return; - /// ASSERT: assert(nCel > 0); + assert(nCel > 0); if (nCel <= 0) return; pFrameTable = (DWORD *)pCelBuff; - /// ASSERT: assert(nCel <= (int) pFrameTable[0]); + assert(nCel <= (int)pFrameTable[0]); pRLEBytes = &pCelBuff[pFrameTable[nCel]]; nDataStart = *(WORD *)&pRLEBytes[CelSkip]; if (!nDataStart) @@ -3161,12 +3161,12 @@ void Cl2DrawLightTbl(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int C /// ASSERT: assert(pCelBuff != NULL); if (pCelBuff == NULL) return; - /// ASSERT: assert(nCel > 0); + assert(nCel > 0); if (nCel <= 0) return; pFrameTable = (DWORD *)pCelBuff; - /// ASSERT: assert(nCel <= (int) pFrameTable[0]); + assert(nCel <= (int)pFrameTable[0]); pRLEBytes = &pCelBuff[pFrameTable[nCel]]; nDataStart = *(WORD *)&pRLEBytes[CelSkip]; if (!nDataStart) @@ -3377,12 +3377,12 @@ void Cl2DrawLight(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelS /// ASSERT: assert(pCelBuff != NULL); if (pCelBuff == NULL) return; - /// ASSERT: assert(nCel > 0); + assert(nCel > 0); if (nCel <= 0) return; pFrameTable = (DWORD *)pCelBuff; - /// ASSERT: assert(nCel <= (int) pFrameTable[0]); + assert(nCel <= (int)pFrameTable[0]); pRLEBytes = &pCelBuff[pFrameTable[nCel]]; nDataStart = *(WORD *)&pRLEBytes[CelSkip]; if (!nDataStart) @@ -3427,12 +3427,12 @@ void Cl2DrawSafe(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int CelSk /// ASSERT: assert(pCelBuff != NULL); if (pCelBuff == NULL) return; - /// ASSERT: assert(nCel > 0); + assert(nCel > 0); if (nCel <= 0) return; pFrameTable = (DWORD *)pCelBuff; - /// ASSERT: assert(nCel <= (int) pFrameTable[0]); + assert(nCel <= (int)pFrameTable[0]); pRLEBytes = &pCelBuff[pFrameTable[nCel]]; nDataStart = *(WORD *)&pRLEBytes[CelSkip]; if (!nDataStart) @@ -3636,12 +3636,12 @@ void Cl2DrawOutlineSafe(char col, int sx, int sy, BYTE *pCelBuff, int nCel, int /// ASSERT: assert(pCelBuff != NULL); if (pCelBuff == NULL) return; - /// ASSERT: assert(nCel > 0); + assert(nCel > 0); if (nCel <= 0) return; pFrameTable = (DWORD *)pCelBuff; - /// ASSERT: assert(nCel <= (int) pFrameTable[0]); + assert(nCel <= (int)pFrameTable[0]); pRLEBytes = &pCelBuff[pFrameTable[nCel]]; nDataStart = *(WORD *)&pRLEBytes[CelSkip]; if (!nDataStart) @@ -3868,12 +3868,12 @@ void Cl2DrawLightTblSafe(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, i /// ASSERT: assert(pCelBuff != NULL); if (pCelBuff == NULL) return; - /// ASSERT: assert(nCel > 0); + assert(nCel > 0); if (nCel <= 0) return; pFrameTable = (DWORD *)pCelBuff; - /// ASSERT: assert(nCel <= (int) pFrameTable[0]); + assert(nCel <= (int)pFrameTable[0]); pRLEBytes = &pCelBuff[pFrameTable[nCel]]; nDataStart = *(WORD *)&pRLEBytes[CelSkip]; if (!nDataStart) @@ -4097,12 +4097,12 @@ void Cl2DrawLightSafe(int sx, int sy, BYTE *pCelBuff, int nCel, int nWidth, int /// ASSERT: assert(pCelBuff != NULL); if (pCelBuff == NULL) return; - /// ASSERT: assert(nCel > 0); + assert(nCel > 0); if (nCel <= 0) return; pFrameTable = (DWORD *)pCelBuff; - /// ASSERT: assert(nCel <= (int) pFrameTable[0]); + assert(nCel <= (int)pFrameTable[0]); pRLEBytes = &pCelBuff[pFrameTable[nCel]]; nDataStart = *(WORD *)&pRLEBytes[CelSkip]; if (!nDataStart) diff --git a/Source/error.cpp b/Source/error.cpp index 5d09863d6..3ac8bdbce 100644 --- a/Source/error.cpp +++ b/Source/error.cpp @@ -109,7 +109,7 @@ void DrawDiabloMsg() sy += 12; } - /// ASSERT: assert(gpBuffer); + assert(gpBuffer); #define TRANS_RECT_X (PANEL_LEFT + 104) #define TRANS_RECT_Y (DIALOG_TOP - 8) diff --git a/Source/gmenu.cpp b/Source/gmenu.cpp index fee71eb71..347d7292f 100644 --- a/Source/gmenu.cpp +++ b/Source/gmenu.cpp @@ -384,7 +384,7 @@ void gmenu_slider_set(TMenuItem *pItem, int min, int max, int value) { int nSteps; - /// ASSERT: assertassert(pItem, "gmenu.cpp", 445); + assert(pItem); nSteps = (int)(pItem->dwFlags & 0xFFF000) >> 12; if (nSteps < 2) nSteps = 2; From edcd92e012ee6edd1f802c7fb064f0cd06dfdc40 Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Wed, 8 Apr 2020 21:39:13 +0200 Subject: [PATCH 14/15] Misc clean ups that missed last round --- Source/control.cpp | 4 ++-- Source/effects.cpp | 4 ++-- Source/gamemenu.cpp | 4 ++-- Source/monstdat.cpp | 3 +++ 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/Source/control.cpp b/Source/control.cpp index 46a249eb0..fd5ff1ffa 100644 --- a/Source/control.cpp +++ b/Source/control.cpp @@ -1274,7 +1274,7 @@ void InitControlPan() pMultiBtns = LoadFileInMem("CtrlPan\\P8But2.CEL", NULL); pTalkBtns = LoadFileInMem("CtrlPan\\TalkButt.CEL", NULL); sgbPlrTalkTbl = 0; - sgszTalkMsg[0] = 0; + sgszTalkMsg[0] = '\0'; for (i = 0; i < MAX_PLRS; i++) whisper[i] = TRUE; for (i = 0; i < sizeof(talkbtndown) / sizeof(talkbtndown[0]); i++) @@ -2720,7 +2720,7 @@ void control_type_message() } talkflag = TRUE; - sgszTalkMsg[0] = 0; + sgszTalkMsg[0] = '\0'; frame = 1; for (i = 0; i < 3; i++) { talkbtndown[i] = FALSE; diff --git a/Source/effects.cpp b/Source/effects.cpp index 477f442f1..2ffb2d95e 100644 --- a/Source/effects.cpp +++ b/Source/effects.cpp @@ -1021,14 +1021,14 @@ BOOL calc_snd_position(int x, int y, int *plVolume, int *plPan) x -= plr[myplr]._px; y -= plr[myplr]._py; - pan = (x - y) << 8; + pan = (x - y) * 256; *plPan = pan; if (abs(pan) > 6400) return FALSE; volume = abs(x) > abs(y) ? abs(x) : abs(y); - volume <<= 6; + volume *= 64; *plVolume = volume; if (volume >= 6400) diff --git a/Source/gamemenu.cpp b/Source/gamemenu.cpp index 76cec1a83..27bb701e7 100644 --- a/Source/gamemenu.cpp +++ b/Source/gamemenu.cpp @@ -35,8 +35,8 @@ TMenuItem sgOptionsMenu[] = { { GMENU_ENABLED | GMENU_SLIDER, NULL, &gamemenu_sound_volume }, { GMENU_ENABLED | GMENU_SLIDER, "Gamma", &gamemenu_gamma }, { GMENU_ENABLED , NULL, &gamemenu_color_cycling }, - { GMENU_ENABLED , "Previous Menu", &gamemenu_previous }, - { GMENU_ENABLED , NULL, NULL } + { GMENU_ENABLED , "Previous Menu", &gamemenu_previous }, + { GMENU_ENABLED , NULL, NULL }, // clang-format on }; /** Specifies the menu names for music enabled and disabled. */ diff --git a/Source/monstdat.cpp b/Source/monstdat.cpp index fb86ee003..cd49c6977 100644 --- a/Source/monstdat.cpp +++ b/Source/monstdat.cpp @@ -123,6 +123,9 @@ MonsterData monsterdata[] = { // clang-format on }; +/** + * Map between .DUN file value and monster type enum + */ BYTE MonstConvTbl[] = { MT_NZOMBIE, MT_BZOMBIE, From cee695c8903eebd201a6b8f6b7355e29bee3c270 Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Wed, 8 Apr 2020 21:39:25 +0200 Subject: [PATCH 15/15] Clean up menu structures --- Source/gamemenu.cpp | 42 ++++++++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/Source/gamemenu.cpp b/Source/gamemenu.cpp index 27bb701e7..4278861ef 100644 --- a/Source/gamemenu.cpp +++ b/Source/gamemenu.cpp @@ -7,42 +7,48 @@ /** Contains the game menu items of the single player menu. */ TMenuItem sgSingleMenu[] = { - // clang-format off - // dwFlags, pszStr, fnMenu - { GMENU_ENABLED, "Save Game", &gamemenu_save_game }, - { GMENU_ENABLED, "Options", &gamemenu_options }, - { GMENU_ENABLED, "New Game", &gamemenu_new_game }, - { GMENU_ENABLED, "Load Game", &gamemenu_load_game }, - { GMENU_ENABLED, "Quit Diablo", &gamemenu_quit_game }, - { GMENU_ENABLED, NULL, NULL } - // clang-format on +// clang-format off +// dwFlags, pszStr, fnMenu + { GMENU_ENABLED, "Save Game", &gamemenu_save_game }, + { GMENU_ENABLED, "Options", &gamemenu_options }, + { GMENU_ENABLED, "New Game", &gamemenu_new_game }, + { GMENU_ENABLED, "Load Game", &gamemenu_load_game }, + { GMENU_ENABLED, "Quit Diablo", &gamemenu_quit_game }, + { GMENU_ENABLED, NULL, NULL } +// clang-format on }; /** Contains the game menu items of the multi player menu. */ TMenuItem sgMultiMenu[] = { - // clang-format off - // dwFlags, pszStr, fnMenu +// clang-format off +// dwFlags, pszStr, fnMenu { GMENU_ENABLED, "Options", &gamemenu_options }, { GMENU_ENABLED, "New Game", &gamemenu_new_game }, { GMENU_ENABLED, "Restart In Town", &gamemenu_restart_town }, { GMENU_ENABLED, "Quit Diablo", &gamemenu_quit_game }, - { GMENU_ENABLED, NULL, NULL } - // clang-format on + { GMENU_ENABLED, NULL, NULL }, +// clang-format on }; TMenuItem sgOptionsMenu[] = { - // clang-format off - // dwFlags, pszStr, fnMenu +// clang-format off +// dwFlags, pszStr, fnMenu { GMENU_ENABLED | GMENU_SLIDER, NULL, &gamemenu_music_volume }, { GMENU_ENABLED | GMENU_SLIDER, NULL, &gamemenu_sound_volume }, { GMENU_ENABLED | GMENU_SLIDER, "Gamma", &gamemenu_gamma }, { GMENU_ENABLED , NULL, &gamemenu_color_cycling }, { GMENU_ENABLED , "Previous Menu", &gamemenu_previous }, { GMENU_ENABLED , NULL, NULL }, - // clang-format on +// clang-format on }; /** Specifies the menu names for music enabled and disabled. */ -char *music_toggle_names[] = { "Music", "Music Disabled" }; +char *music_toggle_names[] = { + "Music", + "Music Disabled", +}; /** Specifies the menu names for sound enabled and disabled. */ -char *sound_toggle_names[] = { "Sound", "Sound Disabled" }; +char *sound_toggle_names[] = { + "Sound", + "Sound Disabled", +}; /** Specifies the menu names for colour cycling disabled and enabled. */ char *color_cycling_toggle_names[] = { "Color Cycling Off", "Color Cycling On" };