From 68d51e7d27b5de2fdbb92b8a95ce60f0977850a4 Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Fri, 26 Jul 2019 03:26:50 +0200 Subject: [PATCH] Implementing Spawned Shareware version --- DiabloUI/diabloui.h | 1 + DiabloUI/diabloui_gcc.def | 1 + MakefileVC | 4 + Source/control.cpp | 4 + Source/diablo.cpp | 19 +- Source/drlg_l1.cpp | 4 + Source/drlg_l2.cpp | 2 + Source/drlg_l3.cpp | 6 +- Source/drlg_l4.cpp | 2 + Source/effects.cpp | 40 +- Source/gendung.cpp | 8 +- Source/help.cpp | 360 ++++++++ Source/init.cpp | 30 +- Source/inv.cpp | 105 ++- Source/items.cpp | 16 +- Source/mainmenu.cpp | 8 + Source/missiles.cpp | 4 + Source/monstdat.cpp | 5 + Source/monster.cpp | 34 + Source/mpqapi.cpp | 8 + Source/msg.cpp | 2 +- Source/multi.cpp | 12 +- Source/multi.h | 2 +- Source/objects.cpp | 14 + Source/palette.cpp | 2 + Source/pfile.cpp | 26 +- Source/player.cpp | 28 + Source/quests.cpp | 19 + Source/setmaps.cpp | 2 + Source/sound.cpp | 6 + Source/stores.cpp | 8 + Source/textdat.cpp | 6 +- Source/town.cpp | 8 + Source/towners.cpp | 13 + Source/trigs.cpp | 26 +- defs.h | 1 - enums.h | 1772 +++++++++++++++++++------------------ structs.h | 2 +- types.h | 2 +- 39 files changed, 1659 insertions(+), 953 deletions(-) diff --git a/DiabloUI/diabloui.h b/DiabloUI/diabloui.h index 26497ab7b..ec1e004b2 100644 --- a/DiabloUI/diabloui.h +++ b/DiabloUI/diabloui.h @@ -27,6 +27,7 @@ struct ProfFntStruct { void __stdcall UiDestroy(); BOOL __stdcall UiTitleDialog(int a1); +void __stdcall UiSetSpawned(BOOL bSpawned); void __stdcall UiInitialize(); BOOL __stdcall UiCopyProtError(int *pdwResult); void __stdcall UiAppActivate(BOOL bActive); diff --git a/DiabloUI/diabloui_gcc.def b/DiabloUI/diabloui_gcc.def index 08dd97563..f62e1f224 100644 --- a/DiabloUI/diabloui_gcc.def +++ b/DiabloUI/diabloui_gcc.def @@ -53,6 +53,7 @@ EXPORTS UiSelectRegion @28 UiSetBackgroundBitmap @29 UiSetSpawned @30 + UiSetSpawned@4 @30 NONAME UiSetupPlayerInfo @31 UiSetupPlayerInfo@12 @31 NONAME UiSoundCallback @32 diff --git a/MakefileVC b/MakefileVC index 263c5d4e7..5a2caa4e1 100644 --- a/MakefileVC +++ b/MakefileVC @@ -43,6 +43,10 @@ ifeq ($(COPYPROT),1) CFLAGS += /D "COPYPROT" endif +ifeq ($(SPAWN),1) + CFLAGS += /D "SPAWN" +endif + ifeq ($(MAKE_BUILD),pdb) VC_LINK = $(VC6_LINK) LINKFLAGS += /pdb:"Diablo.pdb" /LIBPATH:$(VC6_LIB_DIR) /debug diff --git a/Source/control.cpp b/Source/control.cpp index 65ce3a625..e69c9013e 100644 --- a/Source/control.cpp +++ b/Source/control.cpp @@ -1173,10 +1173,12 @@ void InitControlPan() sbookflag = FALSE; if (plr[myplr]._pClass == PC_WARRIOR) { SpellPages[0][0] = SPL_REPAIR; +#ifndef SPAWN } else if (plr[myplr]._pClass == PC_ROGUE) { SpellPages[0][0] = SPL_DISARM; } else if (plr[myplr]._pClass == PC_SORCERER) { SpellPages[0][0] = SPL_RECHARGE; +#endif } pQLogCel = LoadFileInMem("Data\\Quest.CEL", NULL); pGBoxBuff = LoadFileInMem("CtrlPan\\Golddrop.cel", NULL); @@ -1665,10 +1667,12 @@ void DrawChr() if (plr[myplr]._pClass == PC_WARRIOR) { ADD_PlrStringXY(168, 32, 299, "Warrior", COL_WHITE); +#ifndef SPAWN } else if (plr[myplr]._pClass == PC_ROGUE) { ADD_PlrStringXY(168, 32, 299, "Rogue", COL_WHITE); /* should use ClassStrTbl ? */ } else if (plr[myplr]._pClass == PC_SORCERER) { ADD_PlrStringXY(168, 32, 299, "Sorceror", COL_WHITE); +#endif } sprintf(chrstr, "%i", plr[myplr]._pLevel); diff --git a/Source/diablo.cpp b/Source/diablo.cpp index e43936324..86d9e352c 100644 --- a/Source/diablo.cpp +++ b/Source/diablo.cpp @@ -86,7 +86,7 @@ BOOL StartGame(BOOL bNewGame, BOOL bSinglePlayer) BOOL fExitProgram; unsigned int uMsg; - byte_678640 = 1; + gbGameUninitialized = TRUE; do { fExitProgram = FALSE; @@ -97,7 +97,7 @@ BOOL StartGame(BOOL bNewGame, BOOL bSinglePlayer) break; } - byte_678640 = 0; + gbGameUninitialized = FALSE; if (bNewGame || !gbValidSaveFile) { InitLevels(); @@ -272,12 +272,16 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi init_create_window(nCmdShow); sound_init(); UiInitialize(); +#ifdef SPAWN + UiSetSpawned(TRUE); +#endif #ifdef _DEBUG if (showintrodebug) #endif play_movie("gendata\\logo.smk", TRUE); +#ifndef SPAWN { char szValueName[] = "Intro"; if (!SRegLoadValue("Diablo", szValueName, 0, &nData)) @@ -286,6 +290,7 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi play_movie("gendata\\diablo1.smk", TRUE); SRegSaveValue("Diablo", szValueName, 0, 0); } +#endif #ifdef _DEBUG if (showintrodebug) { @@ -1496,6 +1501,7 @@ void LoadLvlGFX() pLevelPieces = LoadFileInMem("Levels\\L1Data\\L1.MIN", NULL); pSpecialCels = LoadFileInMem("Levels\\L1Data\\L1S.CEL", NULL); break; +#ifndef SPAWN case DTYPE_CATACOMBS: pDungeonCels = LoadFileInMem("Levels\\L2Data\\L2.CEL", NULL); pMegaTiles = LoadFileInMem("Levels\\L2Data\\L2.TIL", NULL); @@ -1514,6 +1520,7 @@ void LoadLvlGFX() pLevelPieces = LoadFileInMem("Levels\\L4Data\\L4.MIN", NULL); pSpecialCels = LoadFileInMem("Levels\\L2Data\\L2S.CEL", NULL); break; +#endif default: app_fatal("LoadLvlGFX"); break; @@ -1546,6 +1553,7 @@ void CreateLevel(int lvldir) Freeupstairs(); LoadRndLvlPal(1); break; +#ifndef SPAWN case DTYPE_CATACOMBS: CreateL2Dungeon(glSeedTbl[currlevel], lvldir); InitL2Triggers(); @@ -1564,6 +1572,7 @@ void CreateLevel(int lvldir) Freeupstairs(); LoadRndLvlPal(4); break; +#endif default: app_fatal("CreateLevel"); break; @@ -1707,6 +1716,7 @@ void LoadGameLevel(BOOL firstflag, int lvldir) ResyncQuests(); else ResyncMPQuests(); +#ifndef SPAWN } else { /// ASSERT: assert(! pSpeedCels); pSpeedCels = DiabloAllocPtr(0x100000); @@ -1742,6 +1752,7 @@ void LoadGameLevel(BOOL firstflag, int lvldir) InitMissiles(); IncProgress(); +#endif } SyncPortals(); @@ -1780,8 +1791,10 @@ void LoadGameLevel(BOOL firstflag, int lvldir) while (!IncProgress()) ; +#ifndef SPAWN if (setlevel && setlvlnum == SL_SKELKING && quests[QTYPE_KING]._qactive == 2) PlaySFX(USFX_SKING1); +#endif } void game_loop(BOOL bStartup) @@ -1876,7 +1889,7 @@ void diablo_color_cyc_logic() DWORD tc; tc = GetTickCount(); - if (tc - color_cycle_timer >= 0x32) { + if (tc - color_cycle_timer >= 50) { color_cycle_timer = tc; if (palette_get_colour_cycling()) { if (leveltype == DTYPE_HELL) { diff --git a/Source/drlg_l1.cpp b/Source/drlg_l1.cpp index 172a70a5f..014fdc5eb 100644 --- a/Source/drlg_l1.cpp +++ b/Source/drlg_l1.cpp @@ -127,6 +127,7 @@ void DRLG_Init_Globals() memset(dLight, c, sizeof(dLight)); } +#ifndef SPAWN void LoadL1Dungeon(char *sFileName, int vx, int vy) { int i, j, rw, rh; @@ -175,6 +176,7 @@ void LoadL1Dungeon(char *sFileName, int vx, int vy) SetMapObjects(pLevelMap, 0, 0); mem_free_dbg(pLevelMap); } +#endif void DRLG_L1Floor() { @@ -323,6 +325,7 @@ void DRLG_InitL1Vals() } } +#ifndef SPAWN void LoadPreL1Dungeon(char *sFileName, int vx, int vy) { int i, j, rw, rh; @@ -370,6 +373,7 @@ void LoadPreL1Dungeon(char *sFileName, int vx, int vy) mem_free_dbg(pLevelMap); } +#endif void CreateL5Dungeon(DWORD rseed, int entry) { diff --git a/Source/drlg_l2.cpp b/Source/drlg_l2.cpp index 2b76ffe7c..a89c72d71 100644 --- a/Source/drlg_l2.cpp +++ b/Source/drlg_l2.cpp @@ -1,3 +1,4 @@ +#ifndef SPAWN #include "diablo.h" int nSx1; @@ -2151,3 +2152,4 @@ void DRLG_InitL2Vals() } } } +#endif diff --git a/Source/drlg_l3.cpp b/Source/drlg_l3.cpp index 5f73843a3..60fd6acce 100644 --- a/Source/drlg_l3.cpp +++ b/Source/drlg_l3.cpp @@ -1,3 +1,4 @@ +#ifndef SPAWN #include "diablo.h" BOOLEAN lavapool; @@ -1020,8 +1021,8 @@ void DRLG_L3River() } } -/** - * Flood fills dirt and wall tiles looking for +/** + * Flood fills dirt and wall tiles looking for * an area of at most 40 tiles and disconnected from the map edge. * If it finds one, converts it to lava tiles and sets lavapool to TRUE. */ @@ -1825,3 +1826,4 @@ void LoadPreL3Dungeon(char *sFileName, int vx, int vy) memcpy(pdungeon, dungeon, sizeof(pdungeon)); mem_free_dbg(pLevelMap); } +#endif diff --git a/Source/drlg_l4.cpp b/Source/drlg_l4.cpp index 44cf35659..91b1ebef2 100644 --- a/Source/drlg_l4.cpp +++ b/Source/drlg_l4.cpp @@ -8,6 +8,7 @@ int diabquad2x; int diabquad2y; int diabquad4x; int diabquad4y; +#ifndef SPAWN BOOL hallok[20]; int l4holdx; int l4holdy; @@ -1988,3 +1989,4 @@ void DRLG_L4Pass3() yy += 2; } } +#endif diff --git a/Source/effects.cpp b/Source/effects.cpp index 527b6a111..2eccd7db2 100644 --- a/Source/effects.cpp +++ b/Source/effects.cpp @@ -10,7 +10,7 @@ const char monster_action_sounds[] = { 'a', 'h', 'd', 's' }; /* data */ -TSFX sgSFX[NUM_SFX] = { +TSFX sgSFX[] = { // clang-format off // bFlags, pszName, pSnd { SFX_MISC, "Sfx\\Misc\\Walk1.wav", NULL }, @@ -153,6 +153,7 @@ TSFX sgSFX[NUM_SFX] = { { 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 }, @@ -183,7 +184,9 @@ TSFX sgSFX[NUM_SFX] = { { 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 }, +#ifndef SPAWN { SFX_STREAM, "Sfx\\Towners\\Bmaid32.wav", NULL }, { SFX_STREAM, "Sfx\\Towners\\Bmaid33.wav", NULL }, { SFX_STREAM, "Sfx\\Towners\\Bmaid34.wav", NULL }, @@ -236,7 +239,9 @@ TSFX sgSFX[NUM_SFX] = { { 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 }, +#ifndef SPAWN { SFX_STREAM, "Sfx\\Towners\\Bsmith45.wav", NULL }, { SFX_STREAM, "Sfx\\Towners\\Bsmith46.wav", NULL }, { SFX_STREAM, "Sfx\\Towners\\Bsmith47.wav", NULL }, @@ -249,8 +254,10 @@ TSFX sgSFX[NUM_SFX] = { { 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 }, @@ -278,7 +285,9 @@ TSFX sgSFX[NUM_SFX] = { { 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 }, +#ifndef SPAWN { SFX_STREAM, "Sfx\\Towners\\Drunk28.wav", NULL }, { SFX_STREAM, "Sfx\\Towners\\Drunk29.wav", NULL }, { SFX_STREAM, "Sfx\\Towners\\Drunk30.wav", NULL }, @@ -323,7 +332,9 @@ TSFX sgSFX[NUM_SFX] = { { 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 }, +#ifndef SPAWN { SFX_STREAM, "Sfx\\Towners\\Healer38.wav", NULL }, { SFX_STREAM, "Sfx\\Towners\\Healer39.wav", NULL }, { SFX_STREAM, "Sfx\\Towners\\Healer40.wav", NULL }, @@ -365,7 +376,9 @@ TSFX sgSFX[NUM_SFX] = { { 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 }, +#ifndef SPAWN { SFX_STREAM, "Sfx\\Towners\\Pegboy33.wav", NULL }, { SFX_STREAM, "Sfx\\Towners\\Pegboy34.wav", NULL }, { SFX_STREAM, "Sfx\\Towners\\Pegboy35.wav", NULL }, @@ -410,7 +423,9 @@ TSFX sgSFX[NUM_SFX] = { { 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 }, +#ifndef SPAWN { SFX_STREAM, "Sfx\\Towners\\Storyt26.wav", NULL }, { SFX_STREAM, "Sfx\\Towners\\Storyt27.wav", NULL }, { SFX_STREAM, "Sfx\\Towners\\Storyt28.wav", NULL }, @@ -424,7 +439,9 @@ TSFX sgSFX[NUM_SFX] = { { 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 }, +#ifndef SPAWN { SFX_STREAM, "Sfx\\Towners\\Tavown01.wav", NULL }, { SFX_STREAM, "Sfx\\Towners\\Tavown02.wav", NULL }, { SFX_STREAM, "Sfx\\Towners\\Tavown03.wav", NULL }, @@ -460,7 +477,9 @@ TSFX sgSFX[NUM_SFX] = { { 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 }, +#ifndef SPAWN { SFX_STREAM, "Sfx\\Towners\\Tavown37.wav", NULL }, { SFX_STREAM, "Sfx\\Towners\\Tavown38.wav", NULL }, { SFX_STREAM, "Sfx\\Towners\\Tavown39.wav", NULL }, @@ -507,7 +526,9 @@ TSFX sgSFX[NUM_SFX] = { { 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 }, +#ifndef SPAWN { SFX_STREAM, "Sfx\\Towners\\Witch39.wav", NULL }, { SFX_STREAM, "Sfx\\Towners\\Witch40.wav", NULL }, { SFX_STREAM, "Sfx\\Towners\\Witch41.wav", NULL }, @@ -739,6 +760,7 @@ TSFX sgSFX[NUM_SFX] = { { 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 }, @@ -813,6 +835,7 @@ TSFX sgSFX[NUM_SFX] = { { 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 }, @@ -834,10 +857,12 @@ TSFX sgSFX[NUM_SFX] = { { 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 }, +#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 }, @@ -871,6 +896,7 @@ TSFX sgSFX[NUM_SFX] = { { 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 }; @@ -1077,10 +1103,12 @@ int RndSFX(int psfx) nRand = 3; else if (psfx == PS_WARR16) nRand = 3; +#ifndef SPAWN else if (psfx == PS_MAGE69) nRand = 2; else if (psfx == PS_ROGUE69) nRand = 2; +#endif else if (psfx == PS_SWING) nRand = 2; else if (psfx == LS_ACID) @@ -1091,8 +1119,10 @@ int RndSFX(int psfx) nRand = 2; else if (psfx == IS_BHIT) nRand = 2; +#ifndef SPAWN else if (psfx == PS_WARR2) nRand = 3; +#endif else return psfx; return psfx + random(165, nRand); @@ -1136,7 +1166,7 @@ void sound_stop() TSFX *snd; snd = &sgSFX[0]; - for (i = 0; i < NUM_SFX; i++) { + for (i = 0; i < sizeof(sgSFX) / sizeof(TSFX); i++) { if (snd->pSnd) snd_stop_snd(snd->pSnd); snd++; @@ -1168,7 +1198,7 @@ void effects_cleanup_sfx() FreeMonsterSnd(); - for (i = 0; i < NUM_SFX; i++) { + for (i = 0; i < sizeof(sgSFX) / sizeof(TSFX); i++) { if (sgSFX[i].pSnd) { sound_file_cleanup(sgSFX[i].pSnd); sgSFX[i].pSnd = NULL; @@ -1206,7 +1236,7 @@ void priv_sound_init(BYTE bLoadMask) pc = bLoadMask & (SFX_ROGUE | SFX_WARRIOR | SFX_SORCEROR); bLoadMask ^= pc; - for (i = 0; i < NUM_SFX; i++) { + for (i = 0; i < sizeof(sgSFX) / sizeof(TSFX); i++) { if (sgSFX[i].pSnd) { continue; } @@ -1241,7 +1271,7 @@ void __stdcall effects_play_sound(char *snd_file) return; } - for (i = 0; i < NUM_SFX; i++) { + for (i = 0; i < sizeof(sgSFX) / sizeof(TSFX); i++) { if (!_strcmpi(sgSFX[i].pszName, snd_file) && sgSFX[i].pSnd) { if (!snd_playing(sgSFX[i].pSnd)) snd_play_snd(sgSFX[i].pSnd, 0, 0); diff --git a/Source/gendung.cpp b/Source/gendung.cpp index c63bdf3cb..b4e251190 100644 --- a/Source/gendung.cpp +++ b/Source/gendung.cpp @@ -594,6 +594,7 @@ void DRLG_CopyTrans(int sx, int sy, int dx, int dy) dTransVal[dx][dy] = dTransVal[sx][sy]; } +#ifndef SPAWN void DRLG_ListTrans(int num, BYTE *List) { int i; @@ -619,10 +620,11 @@ void DRLG_AreaTrans(int num, BYTE *List) x2 = *List++; y2 = *List++; DRLG_RectTrans(x1, y1, x2, y2); - --TransVal; + TransVal--; } - ++TransVal; + TransVal++; } +#endif void DRLG_InitSetPC() { @@ -648,6 +650,7 @@ void DRLG_SetPC() } } +#ifndef SPAWN void Make_SetPC(int x, int y, int w, int h) { int i, j, dx, dy, dh, dw; @@ -913,6 +916,7 @@ void DRLG_PlaceThemeRooms(int minSize, int maxSize, int floor, int freq, int rnd } } } +#endif void DRLG_HoldThemeRooms() { diff --git a/Source/help.cpp b/Source/help.cpp index f83ca699e..acd016417 100644 --- a/Source/help.cpp +++ b/Source/help.cpp @@ -7,6 +7,365 @@ int displayinghelp[22]; /* check, does nothing? */ int HelpTop; const char gszHelpText[] = { +#ifdef SPAWN + "Shareware Diablo Help|" + "|" + "$Keyboard Shortcuts:|" + "Diablo can be played exclusively by using the mouse controls. " + "There are times, however, when you may want to use shortcuts to some " + "commands by using the keyboard. These shortcuts are listed below:|" + "|" + "F1: Open the Help Screen|" + "Esc: Displays the main menu|" + "Tab: Displays the Auto-map|" + "Space: Removes any pop-up menus or maps from the play area|" + "S: Open Speedbook|" + "B: Open Spellbook|" + "I: Opens the Inventory screen|" + "C: Opens the Character screen|" + "Z: Zooms the game screen in and out|" + "F: Reduces the brightness of the screen|" + "G: Increases the brightness of the screen|" + "Q: Opens the Quest log (non-functional in the Shareware version)|" + "1 - 8: Use that item from your Belt|" + "F5, F6, F7, F8: Sets a hot key for a selected skill or spell|" + "Shift + Left Click: Use any weapon without moving|" + "|" + "|" + "$Movement:|" + "Movement is controlled by the mouse. The gauntlet on the screen is " + "your cursor. Use this to indicate the destination of your character " + "and then left-click to move to that area. " + "If you hold the mouse button down while moving, the character " + "will continue to move in that direction.|" + "|" + "$Selecting Items:|" + "What you can interact with within the game is easily identifiable. " + "Move the cursor over any object or creature. If the object can be " + "picked up, attacked, activated or used in any way, it will be " + "immediately outlined. A description of the highlighted object appears " + "in the text area on the control panel.|" + "|" + "Example: If you select a door and then left-click the character will " + "walk to the door and open it. If you left-click on a highlighted " + "weapon, the character will walk over to it and put it in his " + "inventory. If you left-click on a highlighted creature...|" + "|" + "$Combat:|" + "Combat is initiated by left-clicking on a creature that has been " + "highlighted. If your character is equipped with a melee weapon " + "(Sword, Mace, Ax, etc.) your character will move to range and attack. " + "If your character is equipped with a bow, left-clicking will fire an " + "arrow at the highlighted creature. " + "Holding down the shift key and then left-clicking allows the " + "character to attack without moving.|" + "|" + "$Picking up Objects:|" + "If you left-click on an item - such as a weapon, shield, armor or " + "book - your character will move to that item and add it to his " + "inventory automatically.|" + "|" + "Useable items that are small in size - such as a potion or " + "scroll - are automatically placed in your 'belt', located at the " + "top of the Interface bar . When an item is placed in the belt, " + "a small number appears in that box. Items may be used by either " + "right-clicking on the item or pressing the corresponding number on " + "the keyboard.|" + "|" + "If you do not have enough room in your inventory or belt for an item " + "that you try to pick up, it will fall from your grasp. Open your " + "inventory screen and try re-arranging or removing items to carry " + "what you really want or need.|" + "|" + "$Inventory:|" + "You can toggle the Inventory screen on and off by clicking the " + "INV> button on the control panel. Items may be moved around in " + "your inventory by selecting them and then left-clicking to pick " + "them up. When you pick up an item while in the inventory screen, " + "your cursor changes into the item. You can then place this item into " + "empty spaces in your inventory, swap them with other items in your " + "inventory or equip them.|" + "|" + "If you have an item that you no longer wish to carry, simply " + "grab the item from your inventory and then left-click in the " + "play area to drop it.|" + "|" + "$Equipping Items:|" + "To equip an item, open the inventory screen and pick up the desired " + "item, either from play or from your inventory, placing it in the " + "appropriate box on the figure in the inventory screen. Weapons and " + "shields go into the large spaces to the right or left of the figure. " + "Two-handed weapons such as bows and axes preclude the use of a " + "shield and will take up both of these large spaces.|" + "|" + "Cloaks, robes, capes and all other armor must go in the central " + "torso slot of the figure. |" + "|" + "Helmets and caps go in the box over the head of the character.|" + "|" + "Rings go into the small boxes at the hands of the figure.|" + "|" + "Amulets go into the small box at the next to the neck of the figure.|" + "|" + "To change items that your character has equipped, pick up a new " + "item and place it on top of the item you wish to remove. Your " + "character will automatically swap the items and the cursor will " + "now change into the item that was in that box.|" + "|" + "$Usable Items:|" + "Potions, elixirs and books are classified as usable items. These " + "items can be used by right-clicking on them in the inventory screen. " + "Books are too large to be placed in the belt, but any potions or " + "scrolls that are put there can also be used by pressing the " + "corresponding number on the keyboard.|" + "|" + "$Gold:|" + "You can select a specific amount of gold to drop by right " + "clicking on a pile of gold in your inventory. " + "A dialog will appear that allows you to select a specific amount of " + "gold to take. When you have entered that number, your cursor will " + "change into that amount of gold.|" + "|" + "$Item Information:|" + "Many items in Diablo share certain common attributes. These are " + "damage, durability, charges and minimum requirements..|" + "|" + "Damage: This is represented by a range that indicates the minimum " + "and maximum damage that item can inflict. A short sword has a (2-6) " + "after its name, meaning it inflicts a minimum of two damage and a " + "maximum of six when it hits. Damage can be modified by the quality " + "of the weapon, the character's strength and magical effects.|" + "|" + "Durability: This is the amount of damage that an item can take " + "before it is rendered useless. Durability is represented by a " + "ratio of current durability to maximum durability. A shield that " + "has a durability of 15/20 would still have 15 points of damage it " + "could take from use before it was rendered useless. Maximum " + "durability can be affected by the quality of the item, enchantments " + "or repairs made upon the item. The minimum durability can be raised " + "by repairing an item.|" + "|" + "Charges: Some items have charges associated with them. Charges " + "indicate how many times that item can be used to cast the spell or " + "affect indicated in its description. Charges are represented by " + "a ratio of charges left to maximum charges. A staff that has charges " + "listed as 2/5 could be used to cast 2 more spells before it was " + "rendered powerless. It could still be used to attack with as a " + "physical weapon, however. Maximum charges can be affected by the " + "magic or recharges cast upon the item. Minimum charges can be " + "raised by recharging the item.|" + "|" + "Minimum Requirements: These are the minimum requirements that a " + "character must meet to wield the item. The more powerful an item is, " + "the higher the minimum requirements will be. If a character " + "does not meet these requirements, he will be unable to equip the " + "item and its name and information will be displayed in red. " + "The item artwork will also have a red tint in the Inventory screen.|" + "|" + "$Items Classes:|" + "There are three classes of items in Diablo - Mundane, " + "Magic and Unique:|" + "|" + "Mundane items have no special attributes. Their information is " + "displayed in white text.|" + "|" + "Magic Items are represented by blue names and text descriptions. " + "Use the Identify spell or speak to Cain in town to determine their " + "exact properties and attributes.|" + "|" + "Unique items are represented by gold names and text descriptions. " + "Use the Identify spell or speak to Cain in town to determine their " + "exact properties and attributes.|" + "|" + "$Skills & Spells:|" + "You can access your list of skills and spells by left-clicking on " + "the SPELLS button in the interface bar. This 'Spellbook' contains all " + "of the skills and spells that your character knows. Spells " + "available through staffs are also listed here. Left-clicking on " + "the Icon of the spell you wish to ready will place it in the " + "'select current spell' icon/area and set it as the current " + "readied spell. A readied spell " + "may be cast by simply right-clicking in the play area.|" + "|" + "Left-clicking on the 'select current spell' button will also " + "open a 'Speedbook' menu that also allows you to ready a skill " + "or spell for use. To use a readied skill or spell, simply " + "right-click in the main play area.|" + "|" + "Skills are the innate abilities of your character. These skills " + "are different depending on what class you choose and require no " + "mana to use.|" + "|" + "Warrior:|" + "The Warrior has the skill of Repair Items. This allows him to fix " + "an item that has been worn by use or is damaged in combat. " + "To accomplish this, select the Repair Skill through the " + "Spellbook or Speedbook and right-click the mouse as if you were " + "casting a spell. Your cursor will change into a Hammer Icon " + "that you will use to select the item to be repaired. " + "Although Repairing an item in this way will decrease the " + "maximum durability of that item, it can be done without leaving " + "the labyrinth.|" + "|" + "The Blacksmith can also repair items for a price. When the " + "Blacksmith performs this service, it does decrease the maximum " + "durability of the item.|" + "|" + "Rogue:|" + "The Rogue has the skill of Disarm Traps. This allows her to not only " + "remove traps, but also acts as a 'sixth sense' that warns her of " + "where these trapped items are located. To accomplish this, select " + "the Disarm Trap skill through the Spellbook or Speedbook and " + "right-click the mouse as if you were casting a spell. " + "Your cursor will change into a Targeting Cursor that you will " + "use to select the item to be disarmed. The success of this " + "attempt is based on the level of the Rogue and the expertise of " + "whomever set the trap.|" + "|" + "Sorcerer:|" + "The Sorcerer has the skill of Recharge Staffs. This allows him to " + "focus his mana into an staff that has been drained of its magical " + "energies. To accomplish this, select the Recharge Staffs skill " + "through the Spellbook or Speedbook and right-click the mouse as " + "if you were casting a spell. Your cursor will change into a " + "Staff Icon that you will use to select the item to be recharged. " + "Although Recharging a staff in this way will decrease its maximum " + "charges, it can be done without leaving the labyrinth.|" + "|" + "The Witch can also recharge staffs for a price. When the Witch " + "performs this service, it does decrease the maximum charges of the " + "item.|" + "|" + "Spells are magical effects that can be cast from a scroll, " + "a staff or memorized from a book. Spells may or may not require " + "mana to use and are available to all classes.|" + "|" + "Spells cast from a scroll cost no mana to use, but are limited " + "to only one charge. Casting a spell from a scroll is accomplished " + "by either right clicking on the scroll or, if it is located in " + "our belt, pressing the corresponding number on the keyboard. " + "Scrolls can also be readied in the Speedbook and are represented " + "by a red icon/button in the 'select current spell' area.|" + "|" + "Spells cast from staffs cost no mana to use, but are limited by " + "the number of charges available. To cast spells from a staff, " + "it must first be equipped. The 'select current spell' icon/button " + "will change to indicate that the spell on the staff is currently " + "ready to cast. Scrolls can also be readied in the Spellbook or " + "Speedbook and are represented by an orange icon/button in the " + "'select current spell' area.|" + "|" + "Spells that are memorized cost mana to cast, but they can be used " + "as long as the character has mana to power them. The Warrior " + "and Rogue start the game with no memorized spells while " + "the sorcerer begins with Firebolt. If the character finds a book " + "in the labyrinth, he can memorize the spell written in that book " + "by opening the Inventory screen and right-clicking on the book. " + "This will make that spell always available to the character for " + "casting. Memorized spells can be readied through either the " + "Spellbook or Speedbook and are represented by a blue icon/button " + "in the 'select current spell' area.|" + "|" + "$Important note on books:|" + "Reading more than one book increases your knowledge of that spell " + "and gives you the spell at a higher level. The higher the level " + "of a spell the more effective it is.|" + "|" + "While some spells affect the caster, other spells require a target. " + "These targeted spells are cast in the direction that you indicate " + "with your cursor on the play area. If you highlight a creature, " + "you will cast that spell at that creature. Not all items within " + "the labyrinth can be targeted.|" + "|" + "Example: A fireball spell will travel at the creature or to the " + "location you right-click on. A Healing spell will simply add " + "health to your character while diminishing his available mana " + "and requires no targeting.|" + "|" + "You can also set a spell or scroll as a Hot Key position for " + "instant selection. Start by opening the pop-up menu as described " + "in the skill section above. Assign Hot Keys by hitting the " + "F5, F6, F7 or F8 keys on your keyboard after scrolling through " + "the available spells and highlighting the one you wish to assign. |" + "|" + "$Health and Mana:|" + "The two orbs in the Information Bar display your life and mana. " + "The red sphere of fluid on the left side of the control panel " + "represents the overall health of your character. When the fluid " + "is gone - your character is dead.|" + "|" + "The blue fluid on the right side of the control panel represents " + "your character's available mana. Mana is the magical force used by " + "your character to cast spells. When the liquid in the sphere is " + "low or depleted, you may be unable to cast some (or all) of your " + "spells.|" + "|" + "$Information Bar:|" + "The Information Bar is where you receive detailed information in " + "Diablo and interact with much of your surroundings. Here is a " + "quick run-down of the control panel areas and their use:|" + "|" + "CHAR: This button is used to access your Character Statistics screen|" + "INV: This button is used to access your Inventory screen|" + "Quest: This button displays your Quest Log (inactive in " + "Shareware version)|" + "Automap: This button activates the mapping overlay|" + "Menu: This button activates the game menu screen|" + "Spells: This button is used to access your Spellbook|" + "Current Spell: This is the spell that has been readied for " + "immediate casting|" + "Life Orb: This is the amount of health your character currently has|" + "Mana Orb: This is the amount of mana your character currently has|" + "Multiplayer Message: This activates the Message Area|" + "Description Area: This is where any important information about " + "creatures or items you can interact with is displayed. " + "This is also where you will enter the text you wish to send when " + "sending multiplayer messages.|" + "|" + "$Character Info:|" + "Toggle the Character Statistics Screen on and off by clicking the " + "IDidx) { case 17: sfxdelay = 10; +#ifndef SPAWN if (plr[pnum]._pClass == PC_WARRIOR) { sfxdnum = PS_WARR95; } else if (plr[pnum]._pClass == PC_ROGUE) { @@ -2109,62 +2126,68 @@ BOOL UseInvItem(int pnum, int cii) } else if (plr[pnum]._pClass == PC_SORCERER) { sfxdnum = PS_MAGE95; } - break; +#endif + return TRUE; case 19: PlaySFX(IS_IBOOK); sfxdelay = 10; if (plr[pnum]._pClass == PC_WARRIOR) { sfxdnum = PS_WARR29; +#ifndef SPAWN } else if (plr[pnum]._pClass == PC_ROGUE) { sfxdnum = PS_ROGUE29; } else if (plr[pnum]._pClass == PC_SORCERER) { sfxdnum = PS_MAGE29; +#endif } - break; - default: - if (!AllItemsList[Item->IDidx].iUsable) - return FALSE; + return TRUE; + } - if (!Item->_iStatFlag) { - if (plr[pnum]._pClass == PC_WARRIOR) { - PlaySFX(PS_WARR13); - } else if (plr[pnum]._pClass == PC_ROGUE) { - PlaySFX(PS_ROGUE13); - } else if (plr[pnum]._pClass == PC_SORCERER) { - PlaySFX(PS_MAGE13); - } - return TRUE; - } + if (!AllItemsList[Item->IDidx].iUsable) + return FALSE; - if (Item->_iMiscId == IMISC_NONE && Item->_itype == ITYPE_GOLD) { - StartGoldDrop(); - return TRUE; + if (!Item->_iStatFlag) { + if (plr[pnum]._pClass == PC_WARRIOR) { + PlaySFX(PS_WARR13); +#ifndef SPAWN + } else if (plr[pnum]._pClass == PC_ROGUE) { + PlaySFX(PS_ROGUE13); + } else if (plr[pnum]._pClass == PC_SORCERER) { + PlaySFX(PS_MAGE13); +#endif } + return TRUE; + } - if (dropGoldFlag) { - dropGoldFlag = FALSE; - dropGoldValue = 0; - } + if (Item->_iMiscId == IMISC_NONE && Item->_itype == ITYPE_GOLD) { + StartGoldDrop(); + return TRUE; + } - if ((Item->_iMiscId == IMISC_SCROLL && currlevel == 0 && !spelldata[Item->_iSpell].sTownSpell) - || (Item->_iMiscId == IMISC_SCROLLT && currlevel == 0 && !spelldata[Item->_iSpell].sTownSpell)) { - return TRUE; - } + if (dropGoldFlag) { + dropGoldFlag = FALSE; + dropGoldValue = 0; + } - idata = ItemCAnimTbl[Item->_iCurs]; - if (Item->_iMiscId == IMISC_BOOK) - PlaySFX(IS_RBOOK); - else if (pnum == myplr) - PlaySFX(ItemInvSnds[idata]); + if (Item->_iMiscId == IMISC_SCROLL && currlevel == 0 && !spelldata[Item->_iSpell].sTownSpell) { + return TRUE; + } + + if (Item->_iMiscId == IMISC_SCROLLT && currlevel == 0 && !spelldata[Item->_iSpell].sTownSpell) { + return TRUE; + } + idata = ItemCAnimTbl[Item->_iCurs]; + if (Item->_iMiscId == IMISC_BOOK) + PlaySFX(IS_RBOOK); + else if (pnum == myplr) + PlaySFX(ItemInvSnds[idata]); - UseItem(pnum, Item->_iMiscId, Item->_iSpell); + UseItem(pnum, Item->_iMiscId, Item->_iSpell); - if (speedlist) { - RemoveSpdBarItem(pnum, c); - } else if (plr[pnum].InvList[c]._iMiscId != IMISC_MAPOFDOOM) { - RemoveInvItem(pnum, c); - } - break; + if (speedlist) { + RemoveSpdBarItem(pnum, c); + } else if (plr[pnum].InvList[c]._iMiscId != IMISC_MAPOFDOOM) { + RemoveInvItem(pnum, c); } return TRUE; diff --git a/Source/items.cpp b/Source/items.cpp index 040e7c501..3169e4d08 100644 --- a/Source/items.cpp +++ b/Source/items.cpp @@ -560,12 +560,14 @@ void CalcPlrItemVals(int p, BOOL Loadgfx) g++; } +#ifndef SPAWN if (plr[p].InvBody[INVLOC_CHEST]._itype == ITYPE_MARMOR && plr[p].InvBody[INVLOC_CHEST]._iStatFlag) { g += ANIM_ID_MEDIUM_ARMOR; } if (plr[p].InvBody[INVLOC_CHEST]._itype == ITYPE_HARMOR && plr[p].InvBody[INVLOC_CHEST]._iStatFlag) { g += ANIM_ID_HEAVY_ARMOR; } +#endif if (plr[p]._pgfxnum != g && Loadgfx) { plr[p]._pgfxnum = g; @@ -897,6 +899,7 @@ void CreatePlrItems(int p) SetPlrHandItem(&plr[p].SpdList[1], IDI_HEAL); GetPlrHandSeed(&plr[p].SpdList[1]); break; +#ifndef SPAWN case PC_ROGUE: SetPlrHandItem(&plr[p].InvBody[INVLOC_HAND_LEFT], IDI_ROGUE); GetPlrHandSeed(&plr[p].InvBody[INVLOC_HAND_LEFT]); @@ -917,6 +920,7 @@ void CreatePlrItems(int p) SetPlrHandItem(&plr[p].SpdList[1], IDI_MANA); GetPlrHandSeed(&plr[p].SpdList[1]); break; +#endif } SetPlrHandItem(&plr[p].HoldItem, IDI_GOLD); @@ -1100,9 +1104,13 @@ void GetBookSpell(int i, int lvl) { int rv, s, bs; - if (!lvl) + if (lvl == 0) lvl = 1; rv = random(14, MAX_SPELLS) + 1; +#ifdef SPAWN + if (lvl > 5) + lvl = 5; +#endif s = 1; while (rv > 0) { if (spelldata[s].sBookLvl != -1 && lvl >= spelldata[s].sBookLvl) { @@ -1197,9 +1205,13 @@ void GetStaffSpell(int i, int lvl, BOOL onlygood) GetItemPower(i, lvl >> 1, lvl, 256, onlygood); } else { l = lvl >> 1; - if (!l) + if (l == 0) l = 1; rv = random(18, MAX_SPELLS) + 1; +#ifdef SPAWN + if (lvl > 10) + lvl = 10; +#endif s = 1; while (rv > 0) { if (spelldata[s].sStaffLvl != -1 && l >= spelldata[s].sStaffLvl) { diff --git a/Source/mainmenu.cpp b/Source/mainmenu.cpp index 64e075638..5a1e94d14 100644 --- a/Source/mainmenu.cpp +++ b/Source/mainmenu.cpp @@ -11,11 +11,13 @@ int menu_music_track_id = 5; void mainmenu_refresh_music() { music_start(menu_music_track_id); +#ifndef SPAWN do { menu_music_track_id++; if (menu_music_track_id == 6) menu_music_track_id = 0; } while (!menu_music_track_id || menu_music_track_id == 1); +#endif } void __stdcall mainmenu_change_name(int arg1, int arg2, int arg3, int arg4, char *name_1, char *name_2) @@ -104,8 +106,12 @@ void mainmenu_loop() break; case MAINMENU_REPLAY_INTRO: case MAINMENU_ATTRACT_MODE: +#ifdef SPAWN + done = FALSE; +#else if (gbActive) mainmenu_play_intro(); +#endif break; case MAINMENU_SHOW_CREDITS: UiCreditsDialog(16); @@ -147,9 +153,11 @@ BOOL mainmenu_multi_player() return mainmenu_init_menu(SELHERO_CONNECT); } +#ifndef SPAWN void mainmenu_play_intro() { music_stop(); play_movie("gendata\\diablo1.smk", 1); mainmenu_refresh_music(); } +#endif diff --git a/Source/missiles.cpp b/Source/missiles.cpp index 27b8d8c73..22d72c6fd 100644 --- a/Source/missiles.cpp +++ b/Source/missiles.cpp @@ -805,10 +805,12 @@ BOOL PlayerMHit(int pnum, int m, int dist, int mind, int maxd, int mtype, BOOLEA } else { if (plr[pnum]._pClass == PC_WARRIOR) { PlaySfxLoc(PS_WARR69, plr[pnum].WorldX, plr[pnum].WorldY); +#ifndef SPAWN } else if (plr[pnum]._pClass == PC_ROGUE) { PlaySfxLoc(PS_ROGUE69, plr[pnum].WorldX, plr[pnum].WorldY); } else if (plr[pnum]._pClass == PC_SORCERER) { PlaySfxLoc(PS_MAGE69, plr[pnum].WorldX, plr[pnum].WorldY); +#endif } drawhpflag = TRUE; } @@ -930,10 +932,12 @@ BOOL Plr2PlrMHit(int pnum, int p, int mindam, int maxdam, int dist, int mtype, B NetSendCmdDamage(TRUE, p, dam - resper * dam / 100); if (plr[pnum]._pClass == PC_WARRIOR) { tac = PS_WARR69; +#ifndef SPAWN } else if (plr[pnum]._pClass == PC_ROGUE) { tac = PS_ROGUE69; } else if (plr[pnum]._pClass == PC_SORCERER) { tac = PS_MAGE69; +#endif } else { return TRUE; } diff --git a/Source/monstdat.cpp b/Source/monstdat.cpp index 980453653..a5588b21b 100644 --- a/Source/monstdat.cpp +++ b/Source/monstdat.cpp @@ -134,6 +134,11 @@ char MonstConvTbl[128] = { 0, 0, 0, 0, 0, 0, 80, 111 }; +/** + * 0 = Never avalible + * 1 = Avalible in retail and shareware + * 2 = avalible in retail only + */ BYTE MonstAvailTbl[112] = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, diff --git a/Source/monster.cpp b/Source/monster.cpp index 8095acc6c..ca1453b44 100644 --- a/Source/monster.cpp +++ b/Source/monster.cpp @@ -183,7 +183,11 @@ void GetLevelMTypes() int nt; // number of types +#ifdef SPAWN + mamask = 1; // monster availability mask +#else mamask = 3; // monster availability mask +#endif AddMonsterType(MT_GOLEM, 2); if (currlevel == 16) { @@ -553,6 +557,7 @@ void PlaceMonster(int i, int mtype, int x, int y) InitMonster(i, rd, mtype, x, y); } +#ifndef SPAWN void PlaceUniqueMonst(int uniqindex, int miniontype, int unpackfilesize) { int xp, yp, x, y, i; @@ -827,6 +832,7 @@ void PlaceQuestMonsters() PlaceUniqueMonst(UMT_SKELKING, 0, 0); } } +#endif void PlaceGroup(int mtype, int num, int leaderf, int leader) { @@ -908,6 +914,7 @@ void PlaceGroup(int mtype, int num, int leaderf, int leader) } } +#ifndef SPAWN void LoadDiabMonsts() { BYTE *lpSetPiece; @@ -925,6 +932,7 @@ void LoadDiabMonsts() SetMapMonsters(lpSetPiece, 2 * diabquad4x, 2 * diabquad4y); mem_free_dbg(lpSetPiece); } +#endif void InitMonsters() { @@ -943,8 +951,10 @@ void InitMonsters() AddMonster(1, 0, 0, 0, FALSE); AddMonster(1, 0, 0, 0, FALSE); AddMonster(1, 0, 0, 0, FALSE); +#ifndef SPAWN if (!setlevel && currlevel == 16) LoadDiabMonsts(); +#endif } nt = numtrigs; if (currlevel == 15) @@ -955,9 +965,13 @@ void InitMonsters() DoVision(s + trigs[i]._tx, t + trigs[i]._ty, 15, FALSE, FALSE); } } +#ifndef SPAWN PlaceQuestMonsters(); +#endif if (!setlevel) { +#ifndef SPAWN PlaceUniques(); +#endif na = 0; for (s = 16; s < 96; s++) for (t = 16; t < 96; t++) @@ -994,6 +1008,7 @@ void InitMonsters() } } +#ifndef SPAWN void PlaceUniques() { int u, mt; @@ -1063,6 +1078,7 @@ void SetMapMonsters(BYTE *pMap, int startx, int starty) } } } +#endif void DeleteMonster(int i) { @@ -1533,7 +1549,9 @@ void M_DiabloDeath(int i, BOOL sendmsg) int _moldx, _moldy; Monst = monster + i; +#ifndef SPAWN PlaySFX(USFX_DIABLOD); +#endif quests[QTYPE_MOD]._qactive = 3; if (sendmsg) NetSendCmdQuest(TRUE, QTYPE_MOD); @@ -2526,6 +2544,7 @@ void DoEnding() Sleep(1000); } +#ifndef SPAWN if (plr[myplr]._pClass == PC_WARRIOR) { play_movie("gendata\\DiabVic2.smk", 0); } else if (plr[myplr]._pClass == PC_SORCERER) { @@ -2549,6 +2568,7 @@ void DoEnding() sound_get_or_set_music_volume(musicVolume); gbMusicOn = bMusicOn; +#endif } void PrepDoEnding() @@ -4194,6 +4214,7 @@ void MAI_Garbud(int i) } if (dFlags[_mx][_my] & BFLAG_VISIBLE) { +#ifndef SPAWN if (Monst->mtalkmsg == QUEST_GARBUD4) { if (!effect_is_playing(USFX_GARBUD4) && Monst->_mgoal == MGOAL_TALKING) { Monst->_mgoal = MGOAL_NORMAL; @@ -4201,6 +4222,7 @@ void MAI_Garbud(int i) Monst->mtalkmsg = 0; } } +#endif } if (Monst->_mgoal == MGOAL_NORMAL || Monst->_mgoal == MGOAL_MOVE) @@ -4240,6 +4262,7 @@ void MAI_Zhar(int i) abs(_mx); else abs(_my); +#ifndef SPAWN if (Monst->mtalkmsg == QUEST_ZHAR2) { if (!effect_is_playing(USFX_ZHAR2) && Monst->_mgoal == MGOAL_TALKING) { Monst->_msquelch = UCHAR_MAX; @@ -4247,6 +4270,7 @@ void MAI_Zhar(int i) Monst->_mgoal = MGOAL_NORMAL; } } +#endif } if (Monst->_mgoal == MGOAL_NORMAL || Monst->_mgoal == MGOAL_RETREAT || Monst->_mgoal == MGOAL_MOVE) @@ -4286,6 +4310,7 @@ void MAI_SnotSpil(int i) } if (dFlags[mx][my] & BFLAG_VISIBLE) { +#ifndef SPAWN if (Monst->mtalkmsg == QUEST_BANNER12) { if (!effect_is_playing(USFX_SNOT3) && Monst->_mgoal == MGOAL_TALKING) { ObjChangeMap(setpc_x, setpc_y, setpc_x + setpc_w + 1, setpc_y + setpc_h + 1); @@ -4296,6 +4321,7 @@ void MAI_SnotSpil(int i) Monst->_mgoal = MGOAL_NORMAL; } } +#endif if (quests[QTYPE_BOL]._qvar1 == 3) { if (Monst->_mgoal == MGOAL_NORMAL || Monst->_mgoal == MGOAL_SHOOT) MAI_Fallen(i); @@ -4332,6 +4358,7 @@ void MAI_Lazurus(int i) quests[QTYPE_VB]._qvar1 = 5; } +#ifndef SPAWN if (Monst->mtalkmsg == QUEST_VILE13 && !effect_is_playing(USFX_LAZ1) && Monst->_mgoal == MGOAL_TALKING) { ObjChangeMapResync(1, 18, 20, 24); RedoPlayerVision(); @@ -4340,6 +4367,7 @@ void MAI_Lazurus(int i) quests[QTYPE_VB]._qvar1 = 6; Monst->_mgoal = MGOAL_NORMAL; } +#endif } if (gbMaxPlayers != 1 && Monst->mtalkmsg == QUEST_VILE13 && Monst->_mgoal == MGOAL_INQUIRING && quests[QTYPE_VB]._qvar1 <= 3) { @@ -4408,6 +4436,7 @@ void MAI_Lachdanan(int i) _mx = Monst->_mx; _my = Monst->_my; md = M_GetDir(i); +#ifndef SPAWN if (Monst->mtalkmsg == QUEST_VEIL9 && !(dFlags[_mx][_my] & BFLAG_VISIBLE) && monster[i]._mgoal == MGOAL_TALKING) { Monst->mtalkmsg = QUEST_VEIL10; monster[i]._mgoal = MGOAL_INQUIRING; @@ -4422,6 +4451,7 @@ void MAI_Lachdanan(int i) } } } +#endif Monst->_mdir = md; @@ -4448,11 +4478,13 @@ void MAI_Warlord(int i) if (dFlags[mx][my] & BFLAG_VISIBLE) { if (Monst->mtalkmsg == QUEST_WARLRD9 && Monst->_mgoal == MGOAL_INQUIRING) Monst->_mmode = MM_TALK; +#ifndef SPAWN if (Monst->mtalkmsg == QUEST_WARLRD9 && !effect_is_playing(USFX_WARLRD1) && Monst->_mgoal == MGOAL_TALKING) { Monst->_msquelch = UCHAR_MAX; Monst->mtalkmsg = 0; Monst->_mgoal = MGOAL_NORMAL; } +#endif } if (Monst->_mgoal == MGOAL_NORMAL) @@ -4516,9 +4548,11 @@ void ProcessMonsters() } mx = Monst->_mx; my = Monst->_my; +#ifndef SPAWN if (dFlags[mx][my] & BFLAG_VISIBLE && Monst->_msquelch == 0 && Monst->MType->mtype == MT_CLEAVER) { PlaySFX(USFX_CLEAVER); } +#endif if (Monst->_mFlags & MFLAG_TARGETS_MONSTER) { _menemy = Monst->_menemy; if ((DWORD)_menemy >= MAXMONSTERS) { diff --git a/Source/mpqapi.cpp b/Source/mpqapi.cpp index 9927710f4..dc58bfe35 100644 --- a/Source/mpqapi.cpp +++ b/Source/mpqapi.cpp @@ -54,7 +54,11 @@ 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)) { +#else if (!SRegLoadData("Diablo", "Video Player ", 0, (BYTE *)pszDst, size, &nbytes_read)) { +#endif return FALSE; } @@ -120,7 +124,11 @@ BOOLEAN mpqapi_reg_store_modification_time(char *pbData, DWORD dwLen) } while (i); } +#ifdef SPAWN + return SRegSaveData("Diablo", "Audio Playback ", 0, (BYTE *)pbData, dwLen); +#else return SRegSaveData("Diablo", "Video Player ", 0, (BYTE *)pbData, dwLen); +#endif } void mpqapi_remove_hash_entry(const char *pszName) diff --git a/Source/msg.cpp b/Source/msg.cpp index c9a361ea8..a47dc771b 100644 --- a/Source/msg.cpp +++ b/Source/msg.cpp @@ -122,7 +122,7 @@ int msg_wait_for_turns() } multi_process_network_packets(); nthread_send_and_recv_turn(0, 0); - if (nthread_has_500ms_passed(0)) + if (nthread_has_500ms_passed(FALSE)) nthread_recv_turns(&received); if (gbGameDestroyed) diff --git a/Source/multi.cpp b/Source/multi.cpp index 284adc4df..6a3b49e3d 100644 --- a/Source/multi.cpp +++ b/Source/multi.cpp @@ -18,7 +18,7 @@ BYTE gbActivePlayers; BOOLEAN gbGameDestroyed; BOOLEAN sgbSendDeltaTbl[MAX_PLRS]; _gamedata sgGameInitInfo; -char byte_678640; +BOOLEAN gbGameUninitialized; int sglTimeoutStart; int sgdwPlayerLeftReasonTbl[MAX_PLRS]; TBuffer sgLoPriBuf; @@ -651,7 +651,11 @@ BOOL NetInit(BOOL bSinglePlayer, BOOL *pfExitProgram) sgGameInitInfo.bDiff = gnDifficulty; memset(&ProgramData, 0, sizeof(ProgramData)); ProgramData.size = sizeof(ProgramData); +#ifdef SPAWN + ProgramData.programname = "Diablo Shareware"; +#else ProgramData.programname = "Diablo Retail"; +#endif ProgramData.programdescription = gszVersionNumber; ProgramData.programid = 'DRTL'; ProgramData.versionid = 42; @@ -720,7 +724,7 @@ BOOL NetInit(BOOL bSinglePlayer, BOOL *pfExitProgram) if (sgbPlayerTurnBitTbl[myplr] == 0 || msg_wait_resync()) break; NetClose(); - byte_678640 = 0; + gbGameUninitialized = FALSE; } gnDifficulty = sgGameInitInfo.bDiff; SetRndSeed(sgGameInitInfo.dwSeed); @@ -825,7 +829,7 @@ BOOL multi_init_multi(_SNETPROGRAMDATA *client_info, _SNETPLAYERDATA *user_info, for (first = TRUE;; first = FALSE) { type = 0x00; - if (byte_678640) { + if (gbGameUninitialized) { if (!UiSelectProvider(0, client_info, user_info, ui_info, &fileinfo, &type) && (!first || SErrGetLastError() != STORM_ERROR_REQUIRES_UPGRADE || !multi_upgrade(pfExitProgram))) { return FALSE; @@ -838,7 +842,7 @@ BOOL multi_init_multi(_SNETPROGRAMDATA *client_info, _SNETPLAYERDATA *user_info, if (UiSelectGame(1, client_info, user_info, ui_info, &fileinfo, &playerId)) break; - byte_678640 = 1; + gbGameUninitialized = TRUE; } if ((DWORD)playerId >= MAX_PLRS) { diff --git a/Source/multi.h b/Source/multi.h index f25a4f939..0c3c6665a 100644 --- a/Source/multi.h +++ b/Source/multi.h @@ -9,7 +9,7 @@ extern PkPlayerStruct netplr[MAX_PLRS]; extern BOOL gbShouldValidatePackage; extern BYTE gbActivePlayers; extern BOOLEAN gbGameDestroyed; -extern char byte_678640; +extern BOOLEAN gbGameUninitialized; extern BYTE gbMaxPlayers; extern char szPlayerName[128]; extern BYTE gbDeltaSender; diff --git a/Source/objects.cpp b/Source/objects.cpp index d3a5badf4..a595e95cf 100644 --- a/Source/objects.cpp +++ b/Source/objects.cpp @@ -837,6 +837,7 @@ void InitObjects() } } +#ifndef SPAWN void SetMapObjects(BYTE *pMap, int startx, int starty) { int rw, rh; @@ -896,6 +897,7 @@ void SetMapObjects(BYTE *pMap, int startx, int starty) } InitObjFlag = FALSE; } +#endif void DeleteObject_(int oi, int i) { @@ -1705,10 +1707,12 @@ void Obj_BCrossDamage(int i) } else { if (plr[myplr]._pClass == PC_WARRIOR) { PlaySfxLoc(PS_WARR68, plr[myplr].WorldX, plr[myplr].WorldY); +#ifndef SPAWN } else if (plr[myplr]._pClass == PC_ROGUE) { PlaySfxLoc(PS_ROGUE68, plr[myplr].WorldX, plr[myplr].WorldY); } else if (plr[myplr]._pClass == PC_SORCERER) { PlaySfxLoc(PS_MAGE68, plr[myplr].WorldX, plr[myplr].WorldY); +#endif } } drawhpflag = TRUE; @@ -2621,10 +2625,12 @@ void OperateMushPatch(int pnum, int i) if (!deltaload && pnum == myplr) { if (plr[myplr]._pClass == PC_WARRIOR) { PlaySFX(PS_WARR13); +#ifndef SPAWN } else if (plr[myplr]._pClass == PC_ROGUE) { PlaySFX(PS_ROGUE13); } else if (plr[myplr]._pClass == PC_SORCERER) { PlaySFX(PS_MAGE13); +#endif } } } else { @@ -2650,10 +2656,12 @@ void OperateInnSignChest(int pnum, int i) if (!deltaload && pnum == myplr) { if (plr[myplr]._pClass == PC_WARRIOR) { PlaySFX(PS_WARR24); +#ifndef SPAWN } else if (plr[myplr]._pClass == PC_ROGUE) { PlaySFX(PS_ROGUE24); } else if (plr[myplr]._pClass == PC_SORCERER) { PlaySFX(PS_MAGE24); +#endif } } } else { @@ -2677,13 +2685,19 @@ void OperateSlainHero(int pnum, int i, BOOL sendmsg) if (!deltaload) { if (plr[pnum]._pClass == PC_WARRIOR) { CreateMagicArmor(object[i]._ox, object[i]._oy, 9, ICURS_BREAST_PLATE, 0, 1); +#ifndef SPAWN PlaySfxLoc(PS_WARR9, plr[myplr].WorldX, plr[myplr].WorldY); +#endif } else if (plr[pnum]._pClass == PC_ROGUE) { CreateMagicWeapon(object[i]._ox, object[i]._oy, 3, ICURS_LONG_WAR_BOW, 0, 1); +#ifndef SPAWN PlaySfxLoc(PS_ROGUE9, plr[myplr].WorldX, plr[myplr].WorldY); +#endif } else if (plr[pnum]._pClass == PC_SORCERER) { CreateSpellBook(object[i]._ox, object[i]._oy, 3, 0, 1); +#ifndef SPAWN PlaySfxLoc(PS_MAGE9, plr[myplr].WorldX, plr[myplr].WorldY); +#endif } if (pnum == myplr) NetSendCmdParam1(FALSE, CMD_OPERATEOBJ, i); diff --git a/Source/palette.cpp b/Source/palette.cpp index f1f70a9f9..de1e9a453 100644 --- a/Source/palette.cpp +++ b/Source/palette.cpp @@ -269,6 +269,7 @@ void palette_update_caves() palette_update(); } +#ifndef SPAWN void palette_update_quest_palette(int n) { int i; @@ -279,6 +280,7 @@ void palette_update_quest_palette(int n) ApplyGamma(system_palette, logical_palette, 32); palette_update(); } +#endif BOOL palette_get_colour_cycling() { diff --git a/Source/pfile.cpp b/Source/pfile.cpp index 23d38ff7a..3921257ce 100644 --- a/Source/pfile.cpp +++ b/Source/pfile.cpp @@ -2,8 +2,13 @@ #include "../3rdParty/Storm/Source/storm.h" #include "../DiabloUI/diabloui.h" +#ifdef SPAWN +#define PASSWORD_SINGLE "adslhfb1" +#define PASSWORD_MULTI "lshbkfg1" +#else #define PASSWORD_SINGLE "xrgyrkj1" #define PASSWORD_MULTI "szqnlsk1" +#endif static char hero_names[MAX_CHARACTERS][PLR_NAME_LEN]; BOOL gbValidSaveFile; @@ -113,10 +118,17 @@ void pfile_get_save_path(char *pszBuf, DWORD dwBufSize, DWORD save_num) DWORD plen; char *s; char path[MAX_PATH]; +#ifdef SPAWN + const char *fmt = "\\share_%d.sv"; + + if (gbMaxPlayers <= 1) + fmt = "\\spawn%d.sv"; +#else const char *fmt = "\\multi_%d.sv"; if (gbMaxPlayers <= 1) fmt = "\\single_%d.sv"; +#endif // BUGFIX: ignores dwBufSize and uses MAX_PATH instead plen = GetModuleFileName(ghInst, pszBuf, MAX_PATH); @@ -209,7 +221,11 @@ void game_2_ui_player(const PlayerStruct *p, _uiheroinfo *heroinfo, BOOL bHasSav heroinfo->gold = p->_pGold; heroinfo->hassaved = bHasSaveFile; heroinfo->herorank = p->pDiabloKillLevel; - heroinfo->spawned = 0; +#ifdef SPAWN + heroinfo->spawned = TRUE; +#else + heroinfo->spawned = FALSE; +#endif } BYTE game_2_ui_class(const PlayerStruct *p) @@ -291,11 +307,19 @@ char *GetSaveDirectory(char *dst, int dst_size, DWORD save_num) // BUGFIX: ignores dst_size and uses MAX_PATH instead if (gbMaxPlayers > 1) { +#ifdef SPAWN + savename = "\\slinfo_%d.drv"; +#else savename = "\\dlinfo_%d.drv"; +#endif dirLen = GetWindowsDirectory(dst, MAX_PATH); } else { char *s; +#ifdef SPAWN + savename = "\\spawn_%d.sv"; +#else savename = "\\single_%d.sv"; +#endif dirLen = GetModuleFileName(ghInst, dst, MAX_PATH); s = strrchr(dst, '\\'); if (s) diff --git a/Source/player.cpp b/Source/player.cpp index bdf53e39f..d4e7051ca 100644 --- a/Source/player.cpp +++ b/Source/player.cpp @@ -445,6 +445,7 @@ void SetPlrAnims(int pnum) plr[pnum]._pAFrames = 16; plr[pnum]._pAFNum = 11; } +#ifndef SPAWN } else if (pc == PC_ROGUE) { if (gn == ANIM_ID_AXE) { plr[pnum]._pAFrames = 22; @@ -469,6 +470,7 @@ void SetPlrAnims(int pnum) plr[pnum]._pAFrames = 24; plr[pnum]._pAFNum = 16; } +#endif } } @@ -594,10 +596,12 @@ void CreatePlayer(int pnum, char c) if (c == PC_WARRIOR) { plr[pnum]._pAblSpells = (__int64)1 << (SPL_REPAIR - 1); +#ifndef SPAWN } else if (c == PC_ROGUE) { plr[pnum]._pAblSpells = (__int64)1 << (SPL_DISARM - 1); } else if (c == PC_SORCERER) { plr[pnum]._pAblSpells = (__int64)1 << (SPL_RECHARGE - 1); +#endif } if (c == PC_SORCERER) { @@ -624,10 +628,12 @@ void CreatePlayer(int pnum, char c) if (c == PC_WARRIOR) { plr[pnum]._pgfxnum = ANIM_ID_SWORD_SHIELD; +#ifndef SPAWN } else if (c == PC_ROGUE) { plr[pnum]._pgfxnum = ANIM_ID_BOW; } else if (c == PC_SORCERER) { plr[pnum]._pgfxnum = ANIM_ID_STAFF; +#endif } for (i = 0; i < NUMLEVELS; i++) { @@ -878,10 +884,12 @@ void InitPlayer(int pnum, BOOL FirstTime) if (plr[pnum]._pClass == PC_WARRIOR) { plr[pnum]._pAblSpells = 1 << (SPL_REPAIR - 1); +#ifndef SPAWN } else if (plr[pnum]._pClass == PC_ROGUE) { plr[pnum]._pAblSpells = 1 << (SPL_DISARM - 1); } else if (plr[pnum]._pClass == PC_SORCERER) { plr[pnum]._pAblSpells = 1 << (SPL_RECHARGE - 1); +#endif } #ifdef _DEBUG @@ -1587,10 +1595,12 @@ void StartPlrHit(int pnum, int dam, BOOL forcehit) if (plr[pnum]._pClass == PC_WARRIOR) { PlaySfxLoc(PS_WARR69, plr[pnum].WorldX, plr[pnum].WorldY); +#ifndef SPAWN } else if (plr[pnum]._pClass == PC_ROGUE) { PlaySfxLoc(PS_ROGUE69, plr[pnum].WorldX, plr[pnum].WorldY); } else if (plr[pnum]._pClass == PC_SORCERER) { PlaySfxLoc(PS_MAGE69, plr[pnum].WorldX, plr[pnum].WorldY); +#endif } drawhpflag = TRUE; @@ -1660,10 +1670,12 @@ void StartPlayerKill(int pnum, int earflag) if (plr[pnum]._pClass == PC_WARRIOR) { PlaySfxLoc(PS_DEAD, plr[pnum].WorldX, plr[pnum].WorldY); // BUGFIX: should use `PS_WARR71` like other classes +#ifndef SPAWN } else if (plr[pnum]._pClass == PC_ROGUE) { PlaySfxLoc(PS_ROGUE71, plr[pnum].WorldX, plr[pnum].WorldY); } else if (plr[pnum]._pClass == PC_SORCERER) { PlaySfxLoc(PS_MAGE71, plr[pnum].WorldX, plr[pnum].WorldY); +#endif } if (plr[pnum]._pgfxnum) { @@ -3602,10 +3614,12 @@ void CheckPlrSpell() if (rspell == SPL_INVALID) { if (plr[myplr]._pClass == PC_WARRIOR) { PlaySFX(PS_WARR34); +#ifndef SPAWN } else if (plr[myplr]._pClass == PC_ROGUE) { PlaySFX(PS_ROGUE34); } else if (plr[myplr]._pClass == PC_SORCERER) { PlaySFX(PS_MAGE34); +#endif } return; } @@ -3613,10 +3627,12 @@ void CheckPlrSpell() if (leveltype == DTYPE_TOWN && !spelldata[rspell].sTownSpell) { if (plr[myplr]._pClass == PC_WARRIOR) { PlaySFX(PS_WARR27); +#ifndef SPAWN } else if (plr[myplr]._pClass == PC_ROGUE) { PlaySFX(PS_ROGUE27); } else if (plr[myplr]._pClass == PC_SORCERER) { PlaySFX(PS_MAGE27); +#endif } return; } @@ -3667,10 +3683,12 @@ void CheckPlrSpell() if (plr[myplr]._pRSplType == RSPLTYPE_SPELL) { if (plr[myplr]._pClass == PC_WARRIOR) { PlaySFX(PS_WARR35); +#ifndef SPAWN } else if (plr[myplr]._pClass == PC_ROGUE) { PlaySFX(PS_ROGUE35); } else if (plr[myplr]._pClass == PC_SORCERER) { PlaySFX(PS_MAGE35); +#endif } } } @@ -4074,47 +4092,57 @@ void PlayDungMsgs() sfxdelay = 40; if (plr[myplr]._pClass == PC_WARRIOR) { sfxdnum = PS_WARR97; +#ifndef SPAWN } else if (plr[myplr]._pClass == PC_ROGUE) { sfxdnum = PS_ROGUE97; } else if (plr[myplr]._pClass == PC_SORCERER) { sfxdnum = PS_MAGE97; +#endif } plr[myplr].pDungMsgs = plr[myplr].pDungMsgs | DMSG_CATHEDRAL; } else if (currlevel == 5 && !plr[myplr]._pLvlVisited[5] && gbMaxPlayers == 1 && !(plr[myplr].pDungMsgs & DMSG_CATACOMBS)) { sfxdelay = 40; if (plr[myplr]._pClass == PC_WARRIOR) { sfxdnum = PS_WARR96B; +#ifndef SPAWN } else if (plr[myplr]._pClass == PC_ROGUE) { sfxdnum = PS_ROGUE96; } else if (plr[myplr]._pClass == PC_SORCERER) { sfxdnum = PS_MAGE96; +#endif } plr[myplr].pDungMsgs |= DMSG_CATACOMBS; } else if (currlevel == 9 && !plr[myplr]._pLvlVisited[9] && gbMaxPlayers == 1 && !(plr[myplr].pDungMsgs & DMSG_CAVES)) { sfxdelay = 40; if (plr[myplr]._pClass == PC_WARRIOR) { sfxdnum = PS_WARR98; +#ifndef SPAWN } else if (plr[myplr]._pClass == PC_ROGUE) { sfxdnum = PS_ROGUE98; } else if (plr[myplr]._pClass == PC_SORCERER) { sfxdnum = PS_MAGE98; +#endif } plr[myplr].pDungMsgs |= DMSG_CAVES; } else if (currlevel == 13 && !plr[myplr]._pLvlVisited[13] && gbMaxPlayers == 1 && !(plr[myplr].pDungMsgs & DMSG_HELL)) { sfxdelay = 40; if (plr[myplr]._pClass == PC_WARRIOR) { sfxdnum = PS_WARR99; +#ifndef SPAWN } else if (plr[myplr]._pClass == PC_ROGUE) { sfxdnum = PS_ROGUE99; } else if (plr[myplr]._pClass == PC_SORCERER) { sfxdnum = PS_MAGE99; +#endif } plr[myplr].pDungMsgs |= DMSG_HELL; } else if (currlevel == 16 && !plr[myplr]._pLvlVisited[15] && gbMaxPlayers == 1 && !(plr[myplr].pDungMsgs & DMSG_DIABLO)) { // BUGFIX: _pLvlVisited should check 16 or this message will never play sfxdelay = 40; +#ifndef SPAWN if (plr[myplr]._pClass == PC_WARRIOR || plr[myplr]._pClass == PC_ROGUE || plr[myplr]._pClass == PC_SORCERER) { sfxdnum = PS_DIABLVLINT; } +#endif plr[myplr].pDungMsgs |= DMSG_DIABLO; } else { sfxdelay = 0; diff --git a/Source/quests.cpp b/Source/quests.cpp index ec3310064..b9b2033cf 100644 --- a/Source/quests.cpp +++ b/Source/quests.cpp @@ -115,6 +115,13 @@ void InitQuests() if (questdebug != -1) quests[questdebug]._qactive = 2; #endif + +#ifdef SPAWN + for (z = 0; z < MAXQUESTS; z++) { + quests[z]._qactive = 0; + } +#endif + if (!quests[QTYPE_KING]._qactive) quests[QTYPE_KING]._qvar2 = 2; if (!quests[QTYPE_INFRA]._qactive) @@ -126,6 +133,7 @@ void InitQuests() void CheckQuests() { +#ifndef SPAWN int i, rportx, rporty; if (QuestStatus(QTYPE_VB) && gbMaxPlayers != 1 && quests[QTYPE_VB]._qvar1 == 2) { @@ -193,10 +201,12 @@ void CheckQuests() } } } +#endif } BOOL ForceQuests() { +#ifndef SPAWN int i, j, qx, qy, ql; if (gbMaxPlayers != 1) { @@ -220,6 +230,7 @@ BOOL ForceQuests() } } } +#endif return FALSE; } @@ -239,6 +250,7 @@ BOOL QuestStatus(int i) void CheckQuestKill(int m, BOOL sendmsg) { +#ifndef SPAWN int i, j; if (monster[m].MType->mtype == MT_SKING) { @@ -339,6 +351,7 @@ void CheckQuestKill(int m, BOOL sendmsg) sfxdnum = PS_MAGE94; } } +#endif } void DrawButcher() @@ -574,6 +587,7 @@ void GetReturnLvlPos() void ResyncMPQuests() { +#ifndef SPAWN if (quests[QTYPE_KING]._qactive == 1 && currlevel >= quests[QTYPE_KING]._qlevel - 1 && currlevel <= quests[QTYPE_KING]._qlevel + 1) { @@ -592,10 +606,12 @@ void ResyncMPQuests() } if (QuestStatus(QTYPE_VB)) AddObject(OBJ_ALTBOY, 2 * setpc_x + 20, 2 * setpc_y + 22); +#endif } void ResyncQuests() { +#ifndef SPAWN int i, tren, x, y; if (setlevel && setlvlnum == quests[QTYPE_PW]._qslvl && quests[QTYPE_PW]._qactive != 1 && leveltype == quests[QTYPE_PW]._qlvltype) { @@ -677,6 +693,7 @@ void ResyncQuests() && (quests[QTYPE_VB]._qactive == 2 || quests[QTYPE_VB]._qactive == 3)) { quests[QTYPE_VB]._qvar2 = 2; } +#endif } void PrintQLString(int x, int y, BOOL cjustflag, char *str, int col) @@ -807,6 +824,7 @@ void QuestlogESC() void SetMultiQuest(int q, int s, int l, int v1) { +#ifndef SPAWN if (quests[q]._qactive != 3) { if (s > quests[q]._qactive) quests[q]._qactive = s; @@ -814,4 +832,5 @@ void SetMultiQuest(int q, int s, int l, int v1) if (v1 > quests[q]._qvar1) quests[q]._qvar1 = v1; } +#endif } diff --git a/Source/setmaps.cpp b/Source/setmaps.cpp index 94dd659a1..273eea860 100644 --- a/Source/setmaps.cpp +++ b/Source/setmaps.cpp @@ -77,6 +77,7 @@ int ObjIndex(int x, int y) return -1; } +#ifndef SPAWN void AddSKingObjs() { SetObjMapRange(ObjIndex(64, 34), 20, 7, 23, 10, 1); @@ -188,3 +189,4 @@ void LoadSetMap() break; } } +#endif diff --git a/Source/sound.cpp b/Source/sound.cpp index 47851b756..b1d8750a2 100644 --- a/Source/sound.cpp +++ b/Source/sound.cpp @@ -17,12 +17,18 @@ BOOLEAN gbSoundOn = TRUE; BOOLEAN gbDupSounds = TRUE; int sgnMusicTrack = 6; char *sgszMusicTracks[NUM_MUSIC] = { +#ifdef SPAWN + "Music\\sTowne.wav", + "Music\\sLvlA.wav", + "Music\\sintro.wav" +#else "Music\\DTowne.wav", "Music\\DLvlA.wav", "Music\\DLvlB.wav", "Music\\DLvlC.wav", "Music\\DLvlD.wav", "Music\\Dintro.wav" +#endif }; char unk_volume[4][2] = { { 15, -16 }, diff --git a/Source/stores.cpp b/Source/stores.cpp index 948f64ccd..83a4c5e25 100644 --- a/Source/stores.cpp +++ b/Source/stores.cpp @@ -1363,6 +1363,13 @@ void S_StartTalk() sprintf(tempstr, "Talk to %s", talkname[talker]); AddSText(0, 2, 1, tempstr, COL_GOLD, 0); AddSLine(5); +#ifdef SPAWN + sprintf(tempstr, "Talking to %s", talkname[talker]); + AddSText(0, 10, 1, tempstr, COL_WHITE, 0); + AddSText(0, 12, 1, "is not available", COL_WHITE, 0); + AddSText(0, 14, 1, "in the shareware", COL_WHITE, 0); + AddSText(0, 16, 1, "version", COL_WHITE, 0); +#else sn = 0; for (i = 0; i < 16; i++) { if (quests[i]._qlevel == 2 && ((DWORD *)&Qtalklist[talker])[i] != -1 && quests[i]._qlog) @@ -1386,6 +1393,7 @@ void S_StartTalk() } } AddSText(0, sn2, 1, "Gossip", COL_BLUE, 1); +#endif AddSText(0, 22, 1, "Back", COL_WHITE, 1); } diff --git a/Source/textdat.cpp b/Source/textdat.cpp index 4b6639180..c721f5e48 100644 --- a/Source/textdat.cpp +++ b/Source/textdat.cpp @@ -2,7 +2,10 @@ /* todo: move text out of struct */ -const TextDataStruct alltext[259] = { +const TextDataStruct alltext[] = { +#ifdef SPAWN + { "Nice try... ", 0, 5, TSFX_TAVERN36 }, +#else { " Ahh, the story of our King, is it? The tragic fall of Leoric was a harsh blow to this land. The people always loved the King, and now they live in mortal fear of him. The question that I keep asking myself is how he could have fallen so far from the Light, as Leoric had always been the holiest of men. Only the vilest powers of Hell could so utterly destroy a man from within... |", 1, 5, TSFX_STORY1 }, { "The village needs your help, good master! Some months ago King Leoric's son, Prince Albrecht, was kidnapped. The King went into a rage and scoured the village for his missing child. With each passing day, Leoric seemed to slip deeper into madness. He sought to blame innocent townsfolk for the boy's disappearance and had them brutally executed. Less than half of us survived his insanity...\n \nThe King's Knights and Priests tried to placate him, but he turned against them and sadly, they were forced to kill him. With his dying breath the King called down a terrible curse upon his former followers. He vowed that they would serve him in darkness forever...\n \nThis is where things take an even darker twist than I thought possible! Our former King has risen from his eternal sleep and now commands a legion of undead minions within the Labyrinth. His body was buried in a tomb three levels beneath the Cathedral. Please, good master, put his soul at ease by destroying his now cursed form... |", @@ -505,5 +508,6 @@ const TextDataStruct alltext[259] = { 1, 3, PS_NAR9 }, { "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 } +#endif }; const DWORD gdwAllTextEntries = 259; /* unused */ diff --git a/Source/town.cpp b/Source/town.cpp index 6dc71d790..1ca9f3dab 100644 --- a/Source/town.cpp +++ b/Source/town.cpp @@ -1448,20 +1448,28 @@ void T_Pass3() T_FillSector(P3Tiles, pSector, 0, 0, 23, 23); mem_free_dbg(pSector); +#ifndef SPAWN if (gbMaxPlayers == 1) { if (!(plr[myplr].pTownWarps & 1)) { +#endif T_FillTile(P3Tiles, 48, 20, 320); +#ifndef SPAWN } if (!(plr[myplr].pTownWarps & 2)) { +#endif T_FillTile(P3Tiles, 16, 68, 332); T_FillTile(P3Tiles, 16, 70, 331); +#ifndef SPAWN } if (!(plr[myplr].pTownWarps & 4)) { +#endif for (x = 36; x < 46; x++) { T_FillTile(P3Tiles, x, 78, random(0, 4) + 1); } +#ifndef SPAWN } } +#endif if (quests[13]._qactive != 3 && quests[13]._qactive) { T_FillTile(P3Tiles, 60, 70, 342); diff --git a/Source/towners.cpp b/Source/towners.cpp index cb181498d..3e04b429e 100644 --- a/Source/towners.cpp +++ b/Source/towners.cpp @@ -9,11 +9,13 @@ BOOL boyloadflag; BYTE *pCowCels; TownerStruct towner[16]; +#ifndef SPAWN const int snSFX[3][3] = { { PS_WARR52, PS_ROGUE52, PS_MAGE52 }, { PS_WARR49, PS_ROGUE49, PS_MAGE49 }, { PS_WARR50, PS_ROGUE50, PS_MAGE50 } }; +#endif /* data */ @@ -686,6 +688,7 @@ void TalkToTowner(int p, int t) towner[t]._tbtcnt = 150; towner[t]._tVar1 = p; quests[QTYPE_BUTCH]._qvar1 = 1; +#ifndef SPAWN if (plr[p]._pClass == 0 && !effect_is_playing(PS_WARR8)) { PlaySFX(PS_WARR8); } else if (plr[p]._pClass == 1 && !effect_is_playing(PS_ROGUE8)) { @@ -693,6 +696,7 @@ void TalkToTowner(int p, int t) } else if (plr[p]._pClass == 2 && !effect_is_playing(PS_MAGE8)) { PlaySFX(PS_MAGE8); } +#endif towner[t]._tMsgSaid = TRUE; } else if (quests[QTYPE_BUTCH]._qactive == 3 && quests[QTYPE_BUTCH]._qvar1 == 1) { quests[QTYPE_BUTCH]._qvar1 = 1; @@ -937,6 +941,14 @@ void CowSFX(int pnum) { if (CowPlaying == -1 || !effect_is_playing(CowPlaying)) { sgdwCowClicks++; +#ifdef SPAWN + if (sgdwCowClicks == 4) { + sgdwCowClicks = 0; + CowPlaying = TSFX_COW2; + } else { + CowPlaying = TSFX_COW1; + } +#else if (sgdwCowClicks >= 8) { PlaySfxLoc(TSFX_COW1, plr[pnum].WorldX, plr[pnum].WorldY + 5); sgdwCowClicks = 4; @@ -947,6 +959,7 @@ void CowSFX(int pnum) } else { CowPlaying = sgdwCowClicks == 4 ? TSFX_COW2 : TSFX_COW1; } +#endif PlaySfxLoc(CowPlaying, plr[pnum].WorldX, plr[pnum].WorldY); } } diff --git a/Source/trigs.cpp b/Source/trigs.cpp index 43dee7734..c2e258c47 100644 --- a/Source/trigs.cpp +++ b/Source/trigs.cpp @@ -85,11 +85,13 @@ int L4PentaList[33] = { -1 }; +#ifndef SPAWN void InitNoTriggers() { numtrigs = 0; trigflag = 0; } +#endif void InitTownTriggers() { @@ -101,6 +103,7 @@ void InitTownTriggers() numtrigs = 1; +#ifndef SPAWN if (gbMaxPlayers == MAX_PLRS) { for (i = 0; i < sizeof(townwarps) / sizeof(townwarps[0]); i++) { townwarps[i] = TRUE; @@ -119,9 +122,11 @@ void InitTownTriggers() trigs[3]._tlvl = 13; numtrigs = 4; } else { +#endif for (i = 0; i < 3; i++) { townwarps[i] = FALSE; } +#ifndef SPAWN if (plr[myplr].pTownWarps & 1) { trigs[1]._tx = 49; trigs[1]._ty = 21; @@ -147,6 +152,7 @@ void InitTownTriggers() numtrigs++; } } +#endif trigflag = FALSE; } @@ -175,6 +181,7 @@ void InitL1Triggers() trigflag = 0; } +#ifndef SPAWN void InitL2Triggers() { int i, j; @@ -319,6 +326,7 @@ void InitVPTriggers() trigs[0]._ty = 32; trigs[0]._tmsg = WM_DIABRTNLVL; } +#endif BOOL ForceTownTrig() { @@ -711,9 +719,19 @@ void CheckTriggers() switch (trigs[i]._tmsg) { case WM_DIABNEXTLVL: - if (pcurs >= CURSOR_FIRSTITEM && DropItemBeforeTrig()) - return; - StartNewLvl(myplr, trigs[i]._tmsg, currlevel + 1); +#ifdef SPAWN + if (currlevel >= 2) { + NetSendCmdLoc(TRUE, CMD_WALKXY, plr[myplr].WorldX, plr[myplr].WorldY + 1); + PlaySFX(PS_WARR18); + InitDiabloMsg(EMSG_NOT_IN_SHAREWARE); + } else { +#endif + if (pcurs >= CURSOR_FIRSTITEM && DropItemBeforeTrig()) + return; + StartNewLvl(myplr, trigs[i]._tmsg, currlevel + 1); +#ifdef SPAWN + } +#endif break; case WM_DIABPREVLVL: if (pcurs >= CURSOR_FIRSTITEM && DropItemBeforeTrig()) @@ -751,10 +769,12 @@ void CheckTriggers() if (abort) { if (plr[myplr]._pClass == PC_WARRIOR) { PlaySFX(PS_WARR43); +#ifndef SPAWN } else if (plr[myplr]._pClass == PC_ROGUE) { PlaySFX(PS_ROGUE43); } else if (plr[myplr]._pClass == PC_SORCERER) { PlaySFX(PS_MAGE43); +#endif } InitDiabloMsg(abortflag); diff --git a/defs.h b/defs.h index a5fd33857..2c7a0446b 100644 --- a/defs.h +++ b/defs.h @@ -48,7 +48,6 @@ #define VOLUME_MAX 0 // todo: enums -#define NUM_SFX 858 #define NUMLEVELS 17 // from diablo 2 beta diff --git a/enums.h b/enums.h index 939256f00..1b2182836 100644 --- a/enums.h +++ b/enums.h @@ -271,864 +271,890 @@ typedef enum item_cursor_graphic { } item_cursor_graphic; typedef enum _sfx_id { - PS_WALK1 = 0x0, - PS_WALK2 = 0x1, - PS_WALK3 = 0x2, - PS_WALK4 = 0x3, - PS_BFIRE = 0x4, - PS_FMAG = 0x5, - PS_TMAG = 0x6, - PS_LGHIT = 0x7, - PS_LGHIT1 = 0x8, - PS_SWING = 0x9, - PS_SWING2 = 0xA, - PS_DEAD = 0xB, - IS_QUESTDN = 0xC, - IS_ARMRFKD = 0xD, - IS_BARLFIRE = 0xE, - IS_BARREL = 0xF, - IS_BHIT = 0x10, - IS_BHIT1 = 0x11, - IS_CHEST = 0x12, - IS_DOORCLOS = 0x13, - IS_DOOROPEN = 0x14, - IS_FANVL = 0x15, - IS_FAXE = 0x16, - IS_FBLST = 0x17, - IS_FBODY = 0x18, - IS_FBOOK = 0x19, - IS_FBOW = 0x1A, - IS_FCAP = 0x1B, - IS_FHARM = 0x1C, - IS_FLARM = 0x1D, - IS_FMAG = 0x1E, - IS_FMAG1 = 0x1F, - IS_FMUSH = 0x20, - IS_FPOT = 0x21, - IS_FRING = 0x22, - IS_FROCK = 0x23, - IS_FSCRL = 0x24, - IS_FSHLD = 0x25, - IS_FSIGN = 0x26, - IS_FSTAF = 0x27, - IS_FSWOR = 0x28, - IS_GOLD = 0x29, - IS_HLMTFKD = 0x2A, - IS_IANVL = 0x2B, - IS_IAXE = 0x2C, - IS_IBLST = 0x2D, - IS_IBODY = 0x2E, - IS_IBOOK = 0x2F, - IS_IBOW = 0x30, - IS_ICAP = 0x31, - IS_IGRAB = 0x32, - IS_IHARM = 0x33, - IS_ILARM = 0x34, - IS_IMUSH = 0x35, - IS_IPOT = 0x36, - IS_IRING = 0x37, - IS_IROCK = 0x38, - IS_ISCROL = 0x39, - IS_ISHIEL = 0x3A, - IS_ISIGN = 0x3B, - IS_ISTAF = 0x3C, - IS_ISWORD = 0x3D, - IS_LEVER = 0x3E, - IS_MAGIC = 0x3F, - IS_MAGIC1 = 0x40, - IS_RBOOK = 0x41, - IS_SARC = 0x42, - IS_SHLDFKD = 0x43, - IS_SWRDFKD = 0x44, - IS_TITLEMOV = 0x45, - IS_TITLSLCT = 0x46, - SFX_SILENCE = 0x47, - IS_TRAP = 0x48, - IS_CAST1 = 0x49, - IS_CAST10 = 0x4A, - IS_CAST12 = 0x4B, - IS_CAST2 = 0x4C, - IS_CAST3 = 0x4D, - IS_CAST4 = 0x4E, - IS_CAST5 = 0x4F, - IS_CAST6 = 0x50, - IS_CAST7 = 0x51, - IS_CAST8 = 0x52, - IS_CAST9 = 0x53, - LS_HEALING = 0x54, - IS_REPAIR = 0x55, - LS_ACID = 0x56, - LS_ACIDS = 0x57, - LS_APOC = 0x58, - LS_ARROWALL = 0x59, - LS_BLODBOIL = 0x5A, - LS_BLODSTAR = 0x5B, - LS_BLSIMPT = 0x5C, - LS_BONESP = 0x5D, - LS_BSIMPCT = 0x5E, - LS_CALDRON = 0x5F, - LS_CBOLT = 0x60, - LS_CHLTNING = 0x61, - LS_DSERP = 0x62, - LS_ELECIMP1 = 0x63, - LS_ELEMENTL = 0x64, - LS_ETHEREAL = 0x65, - LS_FBALL = 0x66, - LS_FBOLT1 = 0x67, - LS_FBOLT2 = 0x68, - LS_FIRIMP1 = 0x69, - LS_FIRIMP2 = 0x6A, - LS_FLAMWAVE = 0x6B, - LS_FLASH = 0x6C, - LS_FOUNTAIN = 0x6D, - LS_GOLUM = 0x6E, - LS_GOLUMDED = 0x6F, - LS_GSHRINE = 0x70, - LS_GUARD = 0x71, - LS_GUARDLAN = 0x72, - LS_HOLYBOLT = 0x73, - LS_HYPER = 0x74, - LS_INFRAVIS = 0x75, - LS_INVISIBL = 0x76, - LS_INVPOT = 0x77, - LS_LNING1 = 0x78, - LS_LTNING = 0x79, - LS_MSHIELD = 0x7A, - LS_NOVA = 0x7B, - LS_PORTAL = 0x7C, - LS_PUDDLE = 0x7D, - LS_RESUR = 0x7E, - LS_SCURSE = 0x7F, - LS_SCURIMP = 0x80, - LS_SENTINEL = 0x81, - LS_SHATTER = 0x82, - LS_SOULFIRE = 0x83, - LS_SPOUTLOP = 0x84, - LS_SPOUTSTR = 0x85, - LS_STORM = 0x86, - LS_TRAPDIS = 0x87, - LS_TELEPORT = 0x88, - LS_VTHEFT = 0x89, - LS_WALLLOOP = 0x8A, - LS_WALLSTRT = 0x8B, - TSFX_BMAID1 = 0x8C, - TSFX_BMAID2 = 0x8D, - TSFX_BMAID3 = 0x8E, - TSFX_BMAID4 = 0x8F, - TSFX_BMAID5 = 0x90, - TSFX_BMAID6 = 0x91, - TSFX_BMAID7 = 0x92, - TSFX_BMAID8 = 0x93, - TSFX_BMAID9 = 0x94, - TSFX_BMAID10 = 0x95, - TSFX_BMAID11 = 0x96, - TSFX_BMAID12 = 0x97, - TSFX_BMAID13 = 0x98, - TSFX_BMAID14 = 0x99, - TSFX_BMAID15 = 0x9A, - TSFX_BMAID16 = 0x9B, - TSFX_BMAID17 = 0x9C, - TSFX_BMAID18 = 0x9D, - TSFX_BMAID19 = 0x9E, - TSFX_BMAID20 = 0x9F, - TSFX_BMAID21 = 0xA0, - TSFX_BMAID22 = 0xA1, - TSFX_BMAID23 = 0xA2, - TSFX_BMAID24 = 0xA3, - TSFX_BMAID25 = 0xA4, - TSFX_BMAID26 = 0xA5, - TSFX_BMAID27 = 0xA6, - TSFX_BMAID28 = 0xA7, - TSFX_BMAID29 = 0xA8, - TSFX_BMAID30 = 0xA9, - TSFX_BMAID31 = 0xAA, - TSFX_BMAID32 = 0xAB, - TSFX_BMAID33 = 0xAC, - TSFX_BMAID34 = 0xAD, - TSFX_BMAID35 = 0xAE, - TSFX_BMAID36 = 0xAF, - TSFX_BMAID37 = 0xB0, - TSFX_BMAID38 = 0xB1, - TSFX_BMAID39 = 0xB2, - TSFX_BMAID40 = 0xB3, - TSFX_SMITH1 = 0xB4, - TSFX_SMITH2 = 0xB5, - TSFX_SMITH3 = 0xB6, - TSFX_SMITH4 = 0xB7, - TSFX_SMITH5 = 0xB8, - TSFX_SMITH6 = 0xB9, - TSFX_SMITH7 = 0xBA, - TSFX_SMITH8 = 0xBB, - TSFX_SMITH9 = 0xBC, - TSFX_SMITH10 = 0xBD, - TSFX_SMITH11 = 0xBE, - TSFX_SMITH12 = 0xBF, - TSFX_SMITH13 = 0xC0, - TSFX_SMITH14 = 0xC1, - TSFX_SMITH15 = 0xC2, - TSFX_SMITH16 = 0xC3, - TSFX_SMITH17 = 0xC4, - TSFX_SMITH18 = 0xC5, - TSFX_SMITH19 = 0xC6, - TSFX_SMITH20 = 0xC7, - TSFX_SMITH21 = 0xC8, - TSFX_SMITH22 = 0xC9, - TSFX_SMITH23 = 0xCA, - TSFX_SMITH24 = 0xCB, - TSFX_SMITH25 = 0xCC, - TSFX_SMITH26 = 0xCD, - TSFX_SMITH27 = 0xCE, - TSFX_SMITH28 = 0xCF, - TSFX_SMITH29 = 0xD0, - TSFX_SMITH30 = 0xD1, - TSFX_SMITH31 = 0xD2, - TSFX_SMITH32 = 0xD3, - TSFX_SMITH33 = 0xD4, - TSFX_SMITH34 = 0xD5, - TSFX_SMITH35 = 0xD6, - TSFX_SMITH36 = 0xD7, - TSFX_SMITH37 = 0xD8, - TSFX_SMITH38 = 0xD9, - TSFX_SMITH39 = 0xDA, - TSFX_SMITH40 = 0xDB, - TSFX_SMITH41 = 0xDC, - TSFX_SMITH42 = 0xDD, - TSFX_SMITH43 = 0xDE, - TSFX_SMITH44 = 0xDF, - TSFX_SMITH45 = 0xE0, - TSFX_SMITH46 = 0xE1, - TSFX_SMITH47 = 0xE2, - TSFX_SMITH48 = 0xE3, - TSFX_SMITH49 = 0xE4, - TSFX_SMITH50 = 0xE5, - TSFX_SMITH51 = 0xE6, - TSFX_SMITH52 = 0xE7, - TSFX_SMITH53 = 0xE8, - TSFX_SMITH54 = 0xE9, - TSFX_SMITH55 = 0xEA, - TSFX_SMITH56 = 0xEB, - TSFX_COW1 = 0xEC, - TSFX_COW2 = 0xED, - TSFX_DEADGUY = 0xEE, - TSFX_DRUNK1 = 0xEF, - TSFX_DRUNK2 = 0xF0, - TSFX_DRUNK3 = 0xF1, - TSFX_DRUNK4 = 0xF2, - TSFX_DRUNK5 = 0xF3, - TSFX_DRUNK6 = 0xF4, - TSFX_DRUNK7 = 0xF5, - TSFX_DRUNK8 = 0xF6, - TSFX_DRUNK9 = 0xF7, - TSFX_DRUNK10 = 0xF8, - TSFX_DRUNK11 = 0xF9, - TSFX_DRUNK12 = 0xFA, - TSFX_DRUNK13 = 0xFB, - TSFX_DRUNK14 = 0xFC, - TSFX_DRUNK15 = 0xFD, - TSFX_DRUNK16 = 0xFE, - TSFX_DRUNK17 = 0xFF, - TSFX_DRUNK18 = 0x100, - TSFX_DRUNK19 = 0x101, - TSFX_DRUNK20 = 0x102, - TSFX_DRUNK21 = 0x103, - TSFX_DRUNK22 = 0x104, - TSFX_DRUNK23 = 0x105, - TSFX_DRUNK24 = 0x106, - TSFX_DRUNK25 = 0x107, - TSFX_DRUNK26 = 0x108, - TSFX_DRUNK27 = 0x109, - TSFX_DRUNK28 = 0x10A, - TSFX_DRUNK29 = 0x10B, - TSFX_DRUNK30 = 0x10C, - TSFX_DRUNK31 = 0x10D, - TSFX_DRUNK32 = 0x10E, - TSFX_DRUNK33 = 0x10F, - TSFX_DRUNK34 = 0x110, - TSFX_DRUNK35 = 0x111, - TSFX_HEALER1 = 0x112, - TSFX_HEALER2 = 0x113, - TSFX_HEALER3 = 0x114, - TSFX_HEALER4 = 0x115, - TSFX_HEALER5 = 0x116, - TSFX_HEALER6 = 0x117, - TSFX_HEALER7 = 0x118, - TSFX_HEALER8 = 0x119, - TSFX_HEALER9 = 0x11A, - TSFX_HEALER10 = 0x11B, - TSFX_HEALER11 = 0x11C, - TSFX_HEALER12 = 0x11D, - TSFX_HEALER13 = 0x11E, - TSFX_HEALER14 = 0x11F, - TSFX_HEALER15 = 0x120, - TSFX_HEALER16 = 0x121, - TSFX_HEALER17 = 0x122, - TSFX_HEALER18 = 0x123, - TSFX_HEALER19 = 0x124, - TSFX_HEALER20 = 0x125, - TSFX_HEALER21 = 0x126, - TSFX_HEALER22 = 0x127, - TSFX_HEALER23 = 0x128, - TSFX_HEALER24 = 0x129, - TSFX_HEALER25 = 0x12A, - TSFX_HEALER26 = 0x12B, - TSFX_HEALER27 = 0x12C, - TSFX_HEALER28 = 0x12D, - TSFX_HEALER29 = 0x12E, - TSFX_HEALER30 = 0x12F, - TSFX_HEALER31 = 0x130, - TSFX_HEALER32 = 0x131, - TSFX_HEALER33 = 0x132, - TSFX_HEALER34 = 0x133, - TSFX_HEALER35 = 0x134, - TSFX_HEALER36 = 0x135, - TSFX_HEALER37 = 0x136, - TSFX_HEALER38 = 0x137, - TSFX_HEALER39 = 0x138, - TSFX_HEALER40 = 0x139, - TSFX_HEALER41 = 0x13A, - TSFX_HEALER42 = 0x13B, - TSFX_HEALER43 = 0x13C, - TSFX_HEALER44 = 0x13D, - TSFX_HEALER45 = 0x13E, - TSFX_HEALER46 = 0x13F, - TSFX_HEALER47 = 0x140, - TSFX_PEGBOY1 = 0x141, - TSFX_PEGBOY2 = 0x142, - TSFX_PEGBOY3 = 0x143, - TSFX_PEGBOY4 = 0x144, - TSFX_PEGBOY5 = 0x145, - TSFX_PEGBOY6 = 0x146, - TSFX_PEGBOY7 = 0x147, - TSFX_PEGBOY8 = 0x148, - TSFX_PEGBOY9 = 0x149, - TSFX_PEGBOY10 = 0x14A, - TSFX_PEGBOY11 = 0x14B, - TSFX_PEGBOY12 = 0x14C, - TSFX_PEGBOY13 = 0x14D, - TSFX_PEGBOY14 = 0x14E, - TSFX_PEGBOY15 = 0x14F, - TSFX_PEGBOY16 = 0x150, - TSFX_PEGBOY17 = 0x151, - TSFX_PEGBOY18 = 0x152, - TSFX_PEGBOY19 = 0x153, - TSFX_PEGBOY20 = 0x154, - TSFX_PEGBOY21 = 0x155, - TSFX_PEGBOY22 = 0x156, - TSFX_PEGBOY23 = 0x157, - TSFX_PEGBOY24 = 0x158, - TSFX_PEGBOY25 = 0x159, - TSFX_PEGBOY26 = 0x15A, - TSFX_PEGBOY27 = 0x15B, - TSFX_PEGBOY28 = 0x15C, - TSFX_PEGBOY29 = 0x15D, - TSFX_PEGBOY30 = 0x15E, - TSFX_PEGBOY31 = 0x15F, - TSFX_PEGBOY32 = 0x160, - TSFX_PEGBOY33 = 0x161, - TSFX_PEGBOY34 = 0x162, - TSFX_PEGBOY35 = 0x163, - TSFX_PEGBOY36 = 0x164, - TSFX_PEGBOY37 = 0x165, - TSFX_PEGBOY38 = 0x166, - TSFX_PEGBOY39 = 0x167, - TSFX_PEGBOY40 = 0x168, - TSFX_PEGBOY41 = 0x169, - TSFX_PEGBOY42 = 0x16A, - TSFX_PEGBOY43 = 0x16B, - TSFX_PRIEST0 = 0x16C, - TSFX_PRIEST1 = 0x16D, - TSFX_PRIEST2 = 0x16E, - TSFX_PRIEST3 = 0x16F, - TSFX_PRIEST4 = 0x170, - TSFX_PRIEST5 = 0x171, - TSFX_PRIEST6 = 0x172, - TSFX_PRIEST7 = 0x173, - TSFX_STORY0 = 0x174, - TSFX_STORY1 = 0x175, - TSFX_STORY2 = 0x176, - TSFX_STORY3 = 0x177, - TSFX_STORY4 = 0x178, - TSFX_STORY5 = 0x179, - TSFX_STORY6 = 0x17A, - TSFX_STORY7 = 0x17B, - TSFX_STORY8 = 0x17C, - TSFX_STORY9 = 0x17D, - TSFX_STORY10 = 0x17E, - TSFX_STORY11 = 0x17F, - TSFX_STORY12 = 0x180, - TSFX_STORY13 = 0x181, - TSFX_STORY14 = 0x182, - TSFX_STORY15 = 0x183, - TSFX_STORY16 = 0x184, - TSFX_STORY17 = 0x185, - TSFX_STORY18 = 0x186, - TSFX_STORY19 = 0x187, - TSFX_STORY20 = 0x188, - TSFX_STORY21 = 0x189, - TSFX_STORY22 = 0x18A, - TSFX_STORY23 = 0x18B, - TSFX_STORY24 = 0x18C, - TSFX_STORY25 = 0x18D, - TSFX_STORY26 = 0x18E, - TSFX_STORY27 = 0x18F, - TSFX_STORY28 = 0x190, - TSFX_STORY29 = 0x191, - TSFX_STORY30 = 0x192, - TSFX_STORY31 = 0x193, - TSFX_STORY32 = 0x194, - TSFX_STORY33 = 0x195, - TSFX_STORY34 = 0x196, - TSFX_STORY35 = 0x197, - TSFX_STORY36 = 0x198, - TSFX_STORY37 = 0x199, - TSFX_STORY38 = 0x19A, - TSFX_TAVERN0 = 0x19B, - TSFX_TAVERN1 = 0x19C, - TSFX_TAVERN2 = 0x19D, - TSFX_TAVERN3 = 0x19E, - TSFX_TAVERN4 = 0x19F, - TSFX_TAVERN5 = 0x1A0, - TSFX_TAVERN6 = 0x1A1, - TSFX_TAVERN7 = 0x1A2, - TSFX_TAVERN8 = 0x1A3, - TSFX_TAVERN9 = 0x1A4, - TSFX_TAVERN10 = 0x1A5, - TSFX_TAVERN11 = 0x1A6, - TSFX_TAVERN12 = 0x1A7, - TSFX_TAVERN13 = 0x1A8, - TSFX_TAVERN14 = 0x1A9, - TSFX_TAVERN15 = 0x1AA, - TSFX_TAVERN16 = 0x1AB, - TSFX_TAVERN17 = 0x1AC, - TSFX_TAVERN18 = 0x1AD, - TSFX_TAVERN19 = 0x1AE, - TSFX_TAVERN20 = 0x1AF, - TSFX_TAVERN21 = 0x1B0, - TSFX_TAVERN22 = 0x1B1, - TSFX_TAVERN23 = 0x1B2, - TSFX_TAVERN24 = 0x1B3, - TSFX_TAVERN25 = 0x1B4, - TSFX_TAVERN26 = 0x1B5, - TSFX_TAVERN27 = 0x1B6, - TSFX_TAVERN28 = 0x1B7, - TSFX_TAVERN29 = 0x1B8, - TSFX_TAVERN30 = 0x1B9, - TSFX_TAVERN31 = 0x1BA, - TSFX_TAVERN32 = 0x1BB, - TSFX_TAVERN33 = 0x1BC, - TSFX_TAVERN34 = 0x1BD, - TSFX_TAVERN35 = 0x1BE, - TSFX_TAVERN36 = 0x1BF, - TSFX_TAVERN37 = 0x1C0, - TSFX_TAVERN38 = 0x1C1, - TSFX_TAVERN39 = 0x1C2, - TSFX_TAVERN40 = 0x1C3, - TSFX_TAVERN41 = 0x1C4, - TSFX_TAVERN42 = 0x1C5, - TSFX_TAVERN43 = 0x1C6, - TSFX_TAVERN44 = 0x1C7, - TSFX_TAVERN45 = 0x1C8, - TSFX_WITCH1 = 0x1C9, - TSFX_WITCH2 = 0x1CA, - TSFX_WITCH3 = 0x1CB, - TSFX_WITCH4 = 0x1CC, - TSFX_WITCH5 = 0x1CD, - TSFX_WITCH6 = 0x1CE, - TSFX_WITCH7 = 0x1CF, - TSFX_WITCH8 = 0x1D0, - TSFX_WITCH9 = 0x1D1, - TSFX_WITCH10 = 0x1D2, - TSFX_WITCH11 = 0x1D3, - TSFX_WITCH12 = 0x1D4, - TSFX_WITCH13 = 0x1D5, - TSFX_WITCH14 = 0x1D6, - TSFX_WITCH15 = 0x1D7, - TSFX_WITCH16 = 0x1D8, - TSFX_WITCH17 = 0x1D9, - TSFX_WITCH18 = 0x1DA, - TSFX_WITCH19 = 0x1DB, - TSFX_WITCH20 = 0x1DC, - TSFX_WITCH21 = 0x1DD, - TSFX_WITCH22 = 0x1DE, - TSFX_WITCH23 = 0x1DF, - TSFX_WITCH24 = 0x1E0, - TSFX_WITCH25 = 0x1E1, - TSFX_WITCH26 = 0x1E2, - TSFX_WITCH27 = 0x1E3, - TSFX_WITCH28 = 0x1E4, - TSFX_WITCH29 = 0x1E5, - TSFX_WITCH30 = 0x1E6, - TSFX_WITCH31 = 0x1E7, - TSFX_WITCH32 = 0x1E8, - TSFX_WITCH33 = 0x1E9, - TSFX_WITCH34 = 0x1EA, - TSFX_WITCH35 = 0x1EB, - TSFX_WITCH36 = 0x1EC, - TSFX_WITCH37 = 0x1ED, - TSFX_WITCH38 = 0x1EE, - TSFX_WITCH39 = 0x1EF, - TSFX_WITCH40 = 0x1F0, - TSFX_WITCH41 = 0x1F1, - TSFX_WITCH42 = 0x1F2, - TSFX_WITCH43 = 0x1F3, - TSFX_WITCH44 = 0x1F4, - TSFX_WITCH45 = 0x1F5, - TSFX_WITCH46 = 0x1F6, - TSFX_WITCH47 = 0x1F7, - TSFX_WITCH48 = 0x1F8, - TSFX_WITCH49 = 0x1F9, - TSFX_WITCH50 = 0x1FA, - TSFX_WOUND = 0x1FB, - PS_MAGE1 = 0x1FC, - PS_MAGE2 = 0x1FD, - PS_MAGE3 = 0x1FE, - PS_MAGE4 = 0x1FF, - PS_MAGE5 = 0x200, - PS_MAGE6 = 0x201, - PS_MAGE7 = 0x202, - PS_MAGE8 = 0x203, - PS_MAGE9 = 0x204, - PS_MAGE10 = 0x205, - PS_MAGE11 = 0x206, - PS_MAGE12 = 0x207, - PS_MAGE13 = 0x208, - PS_MAGE14 = 0x209, - PS_MAGE15 = 0x20A, - PS_MAGE16 = 0x20B, - PS_MAGE17 = 0x20C, - PS_MAGE18 = 0x20D, - PS_MAGE19 = 0x20E, - PS_MAGE20 = 0x20F, - PS_MAGE21 = 0x210, - PS_MAGE22 = 0x211, - PS_MAGE23 = 0x212, - PS_MAGE24 = 0x213, - PS_MAGE25 = 0x214, - PS_MAGE26 = 0x215, - PS_MAGE27 = 0x216, - PS_MAGE28 = 0x217, - PS_MAGE29 = 0x218, - PS_MAGE30 = 0x219, - PS_MAGE31 = 0x21A, - PS_MAGE32 = 0x21B, - PS_MAGE33 = 0x21C, - PS_MAGE34 = 0x21D, - PS_MAGE35 = 0x21E, - PS_MAGE36 = 0x21F, - PS_MAGE37 = 0x220, - PS_MAGE38 = 0x221, - PS_MAGE39 = 0x222, - PS_MAGE40 = 0x223, - PS_MAGE41 = 0x224, - PS_MAGE42 = 0x225, - PS_MAGE43 = 0x226, - PS_MAGE44 = 0x227, - PS_MAGE45 = 0x228, - PS_MAGE46 = 0x229, - PS_MAGE47 = 0x22A, - PS_MAGE48 = 0x22B, - PS_MAGE49 = 0x22C, - PS_MAGE50 = 0x22D, - PS_MAGE51 = 0x22E, - PS_MAGE52 = 0x22F, - PS_MAGE53 = 0x230, - PS_MAGE54 = 0x231, - PS_MAGE55 = 0x232, - PS_MAGE56 = 0x233, - PS_MAGE57 = 0x234, - PS_MAGE58 = 0x235, - PS_MAGE59 = 0x236, - PS_MAGE60 = 0x237, - PS_MAGE61 = 0x238, - PS_MAGE62 = 0x239, - PS_MAGE63 = 0x23A, - PS_MAGE64 = 0x23B, - PS_MAGE65 = 0x23C, - PS_MAGE66 = 0x23D, - PS_MAGE67 = 0x23E, - PS_MAGE68 = 0x23F, - PS_MAGE69 = 0x240, - PS_MAGE69B = 0x241, - PS_MAGE70 = 0x242, - PS_MAGE71 = 0x243, - PS_MAGE72 = 0x244, - PS_MAGE73 = 0x245, - PS_MAGE74 = 0x246, - PS_MAGE75 = 0x247, - PS_MAGE76 = 0x248, - PS_MAGE77 = 0x249, - PS_MAGE78 = 0x24A, - PS_MAGE79 = 0x24B, - PS_MAGE80 = 0x24C, - PS_MAGE81 = 0x24D, - PS_MAGE82 = 0x24E, - PS_MAGE83 = 0x24F, - PS_MAGE84 = 0x250, - PS_MAGE85 = 0x251, - PS_MAGE86 = 0x252, - PS_MAGE87 = 0x253, - PS_MAGE88 = 0x254, - PS_MAGE89 = 0x255, - PS_MAGE90 = 0x256, - PS_MAGE91 = 0x257, - PS_MAGE92 = 0x258, - PS_MAGE93 = 0x259, - PS_MAGE94 = 0x25A, - PS_MAGE95 = 0x25B, - PS_MAGE96 = 0x25C, - PS_MAGE97 = 0x25D, - PS_MAGE98 = 0x25E, - PS_MAGE99 = 0x25F, - PS_MAGE100 = 0x260, - PS_MAGE101 = 0x261, - PS_MAGE102 = 0x262, - PS_ROGUE1 = 0x263, - PS_ROGUE2 = 0x264, - PS_ROGUE3 = 0x265, - PS_ROGUE4 = 0x266, - PS_ROGUE5 = 0x267, - PS_ROGUE6 = 0x268, - PS_ROGUE7 = 0x269, - PS_ROGUE8 = 0x26A, - PS_ROGUE9 = 0x26B, - PS_ROGUE10 = 0x26C, - PS_ROGUE11 = 0x26D, - PS_ROGUE12 = 0x26E, - PS_ROGUE13 = 0x26F, - PS_ROGUE14 = 0x270, - PS_ROGUE15 = 0x271, - PS_ROGUE16 = 0x272, - PS_ROGUE17 = 0x273, - PS_ROGUE18 = 0x274, - PS_ROGUE19 = 0x275, - PS_ROGUE20 = 0x276, - PS_ROGUE21 = 0x277, - PS_ROGUE22 = 0x278, - PS_ROGUE23 = 0x279, - PS_ROGUE24 = 0x27A, - PS_ROGUE25 = 0x27B, - PS_ROGUE26 = 0x27C, - PS_ROGUE27 = 0x27D, - PS_ROGUE28 = 0x27E, - PS_ROGUE29 = 0x27F, - PS_ROGUE30 = 0x280, - PS_ROGUE31 = 0x281, - PS_ROGUE32 = 0x282, - PS_ROGUE33 = 0x283, - PS_ROGUE34 = 0x284, - PS_ROGUE35 = 0x285, - PS_ROGUE36 = 0x286, - PS_ROGUE37 = 0x287, - PS_ROGUE38 = 0x288, - PS_ROGUE39 = 0x289, - PS_ROGUE40 = 0x28A, - PS_ROGUE41 = 0x28B, - PS_ROGUE42 = 0x28C, - PS_ROGUE43 = 0x28D, - PS_ROGUE44 = 0x28E, - PS_ROGUE45 = 0x28F, - PS_ROGUE46 = 0x290, - PS_ROGUE47 = 0x291, - PS_ROGUE48 = 0x292, - PS_ROGUE49 = 0x293, - PS_ROGUE50 = 0x294, - PS_ROGUE51 = 0x295, - PS_ROGUE52 = 0x296, - PS_ROGUE53 = 0x297, - PS_ROGUE54 = 0x298, - PS_ROGUE55 = 0x299, - PS_ROGUE56 = 0x29A, - PS_ROGUE57 = 0x29B, - PS_ROGUE58 = 0x29C, - PS_ROGUE59 = 0x29D, - PS_ROGUE60 = 0x29E, - PS_ROGUE61 = 0x29F, - PS_ROGUE62 = 0x2A0, - PS_ROGUE63 = 0x2A1, - PS_ROGUE64 = 0x2A2, - PS_ROGUE65 = 0x2A3, - PS_ROGUE66 = 0x2A4, - PS_ROGUE67 = 0x2A5, - PS_ROGUE68 = 0x2A6, - PS_ROGUE69 = 0x2A7, - PS_ROGUE69B = 0x2A8, - PS_ROGUE70 = 0x2A9, - PS_ROGUE71 = 0x2AA, - PS_ROGUE72 = 0x2AB, - PS_ROGUE73 = 0x2AC, - PS_ROGUE74 = 0x2AD, - PS_ROGUE75 = 0x2AE, - PS_ROGUE76 = 0x2AF, - PS_ROGUE77 = 0x2B0, - PS_ROGUE78 = 0x2B1, - PS_ROGUE79 = 0x2B2, - PS_ROGUE80 = 0x2B3, - PS_ROGUE81 = 0x2B4, - PS_ROGUE82 = 0x2B5, - PS_ROGUE83 = 0x2B6, - PS_ROGUE84 = 0x2B7, - PS_ROGUE85 = 0x2B8, - PS_ROGUE86 = 0x2B9, - PS_ROGUE87 = 0x2BA, - PS_ROGUE88 = 0x2BB, - PS_ROGUE89 = 0x2BC, - PS_ROGUE90 = 0x2BD, - PS_ROGUE91 = 0x2BE, - PS_ROGUE92 = 0x2BF, - PS_ROGUE93 = 0x2C0, - PS_ROGUE94 = 0x2C1, - PS_ROGUE95 = 0x2C2, - PS_ROGUE96 = 0x2C3, - PS_ROGUE97 = 0x2C4, - PS_ROGUE98 = 0x2C5, - PS_ROGUE99 = 0x2C6, - PS_ROGUE100 = 0x2C7, - PS_ROGUE101 = 0x2C8, - PS_ROGUE102 = 0x2C9, - PS_WARR1 = 0x2CA, - PS_WARR2 = 0x2CB, - PS_WARR3 = 0x2CC, - PS_WARR4 = 0x2CD, - PS_WARR5 = 0x2CE, - PS_WARR6 = 0x2CF, - PS_WARR7 = 0x2D0, - PS_WARR8 = 0x2D1, - PS_WARR9 = 0x2D2, - PS_WARR10 = 0x2D3, - PS_WARR11 = 0x2D4, - PS_WARR12 = 0x2D5, - PS_WARR13 = 0x2D6, - PS_WARR14 = 0x2D7, - PS_WARR14B = 0x2D8, - PS_WARR14C = 0x2D9, - PS_WARR15 = 0x2DA, - PS_WARR15B = 0x2DB, - PS_WARR15C = 0x2DC, - PS_WARR16 = 0x2DD, - PS_WARR16B = 0x2DE, - PS_WARR16C = 0x2DF, - PS_WARR17 = 0x2E0, - PS_WARR18 = 0x2E1, - PS_WARR19 = 0x2E2, - PS_WARR20 = 0x2E3, - PS_WARR21 = 0x2E4, - PS_WARR22 = 0x2E5, - PS_WARR23 = 0x2E6, - PS_WARR24 = 0x2E7, - PS_WARR25 = 0x2E8, - PS_WARR26 = 0x2E9, - PS_WARR27 = 0x2EA, - PS_WARR28 = 0x2EB, - PS_WARR29 = 0x2EC, - PS_WARR30 = 0x2ED, - PS_WARR31 = 0x2EE, - PS_WARR32 = 0x2EF, - PS_WARR33 = 0x2F0, - PS_WARR34 = 0x2F1, - PS_WARR35 = 0x2F2, - PS_WARR36 = 0x2F3, - PS_WARR37 = 0x2F4, - PS_WARR38 = 0x2F5, - PS_WARR39 = 0x2F6, - PS_WARR40 = 0x2F7, - PS_WARR41 = 0x2F8, - PS_WARR42 = 0x2F9, - PS_WARR43 = 0x2FA, - PS_WARR44 = 0x2FB, - PS_WARR45 = 0x2FC, - PS_WARR46 = 0x2FD, - PS_WARR47 = 0x2FE, - PS_WARR48 = 0x2FF, - PS_WARR49 = 0x300, - PS_WARR50 = 0x301, - PS_WARR51 = 0x302, - PS_WARR52 = 0x303, - PS_WARR53 = 0x304, - PS_WARR54 = 0x305, - PS_WARR55 = 0x306, - PS_WARR56 = 0x307, - PS_WARR57 = 0x308, - PS_WARR58 = 0x309, - PS_WARR59 = 0x30A, - PS_WARR60 = 0x30B, - PS_WARR61 = 0x30C, - PS_WARR62 = 0x30D, - PS_WARR63 = 0x30E, - PS_WARR64 = 0x30F, - PS_WARR65 = 0x310, - PS_WARR66 = 0x311, - PS_WARR67 = 0x312, - PS_WARR68 = 0x313, - PS_WARR69 = 0x314, - PS_WARR69B = 0x315, - PS_WARR70 = 0x316, - PS_WARR71 = 0x317, - PS_WARR72 = 0x318, - PS_WARR73 = 0x319, - PS_WARR74 = 0x31A, - PS_WARR75 = 0x31B, - PS_WARR76 = 0x31C, - PS_WARR77 = 0x31D, - PS_WARR78 = 0x31E, - PS_WARR79 = 0x31F, - PS_WARR80 = 0x320, - PS_WARR81 = 0x321, - PS_WARR82 = 0x322, - PS_WARR83 = 0x323, - PS_WARR84 = 0x324, - PS_WARR85 = 0x325, - PS_WARR86 = 0x326, - PS_WARR87 = 0x327, - PS_WARR88 = 0x328, - PS_WARR89 = 0x329, - PS_WARR90 = 0x32A, - PS_WARR91 = 0x32B, - PS_WARR92 = 0x32C, - PS_WARR93 = 0x32D, - PS_WARR94 = 0x32E, - PS_WARR95 = 0x32F, - PS_WARR95B = 0x330, - PS_WARR95C = 0x331, - PS_WARR95D = 0x332, - PS_WARR95E = 0x333, - PS_WARR95F = 0x334, - PS_WARR96B = 0x335, - PS_WARR97 = 0x336, - PS_WARR98 = 0x337, - PS_WARR99 = 0x338, - PS_WARR100 = 0x339, - PS_WARR101 = 0x33A, - PS_WARR102 = 0x33B, - PS_NAR1 = 0x33C, - PS_NAR2 = 0x33D, - PS_NAR3 = 0x33E, - PS_NAR4 = 0x33F, - PS_NAR5 = 0x340, - PS_NAR6 = 0x341, - PS_NAR7 = 0x342, - PS_NAR8 = 0x343, - PS_NAR9 = 0x344, - PS_DIABLVLINT = 0x345, - USFX_CLEAVER = 0x346, - USFX_GARBUD1 = 0x347, - USFX_GARBUD2 = 0x348, - USFX_GARBUD3 = 0x349, - USFX_GARBUD4 = 0x34A, - USFX_IZUAL1 = 0x34B, - USFX_LACH1 = 0x34C, - USFX_LACH2 = 0x34D, - USFX_LACH3 = 0x34E, - USFX_LAZ1 = 0x34F, - USFX_LAZ2 = 0x350, - USFX_SKING1 = 0x351, - USFX_SNOT1 = 0x352, - USFX_SNOT2 = 0x353, - USFX_SNOT3 = 0x354, - USFX_WARLRD1 = 0x355, - USFX_WLOCK1 = 0x356, - USFX_ZHAR1 = 0x357, - USFX_ZHAR2 = 0x358, - USFX_DIABLOD = 0x359, + PS_WALK1, + PS_WALK2, + PS_WALK3, + PS_WALK4, + PS_BFIRE, + PS_FMAG, + PS_TMAG, + PS_LGHIT, + PS_LGHIT1, + PS_SWING, + PS_SWING2, + PS_DEAD, + IS_QUESTDN, + IS_ARMRFKD, + IS_BARLFIRE, + IS_BARREL, + IS_BHIT, + IS_BHIT1, + IS_CHEST, + IS_DOORCLOS, + IS_DOOROPEN, + IS_FANVL, + IS_FAXE, + IS_FBLST, + IS_FBODY, + IS_FBOOK, + IS_FBOW, + IS_FCAP, + IS_FHARM, + IS_FLARM, + IS_FMAG, + IS_FMAG1, + IS_FMUSH, + IS_FPOT, + IS_FRING, + IS_FROCK, + IS_FSCRL, + IS_FSHLD, + IS_FSIGN, + IS_FSTAF, + IS_FSWOR, + IS_GOLD, + IS_HLMTFKD, + IS_IANVL, + IS_IAXE, + IS_IBLST, + IS_IBODY, + IS_IBOOK, + IS_IBOW, + IS_ICAP, + IS_IGRAB, + IS_IHARM, + IS_ILARM, + IS_IMUSH, + IS_IPOT, + IS_IRING, + IS_IROCK, + IS_ISCROL, + IS_ISHIEL, + IS_ISIGN, + IS_ISTAF, + IS_ISWORD, + IS_LEVER, + IS_MAGIC, + IS_MAGIC1, + IS_RBOOK, + IS_SARC, + IS_SHLDFKD, + IS_SWRDFKD, + IS_TITLEMOV, + IS_TITLSLCT, + SFX_SILENCE, + IS_TRAP, + IS_CAST1, + IS_CAST10, + IS_CAST12, + IS_CAST2, + IS_CAST3, + IS_CAST4, + IS_CAST5, + IS_CAST6, + IS_CAST7, + IS_CAST8, + IS_CAST9, + LS_HEALING, + IS_REPAIR, + LS_ACID, + LS_ACIDS, + LS_APOC, + LS_ARROWALL, + LS_BLODBOIL, + LS_BLODSTAR, + LS_BLSIMPT, + LS_BONESP, + LS_BSIMPCT, + LS_CALDRON, + LS_CBOLT, + LS_CHLTNING, + LS_DSERP, + LS_ELECIMP1, + LS_ELEMENTL, + LS_ETHEREAL, + LS_FBALL, + LS_FBOLT1, + LS_FBOLT2, + LS_FIRIMP1, + LS_FIRIMP2, + LS_FLAMWAVE, + LS_FLASH, + LS_FOUNTAIN, + LS_GOLUM, + LS_GOLUMDED, + LS_GSHRINE, + LS_GUARD, + LS_GUARDLAN, + LS_HOLYBOLT, + LS_HYPER, + LS_INFRAVIS, + LS_INVISIBL, + LS_INVPOT, + LS_LNING1, + LS_LTNING, + LS_MSHIELD, + LS_NOVA, + LS_PORTAL, + LS_PUDDLE, + LS_RESUR, + LS_SCURSE, + LS_SCURIMP, + LS_SENTINEL, + LS_SHATTER, + LS_SOULFIRE, + LS_SPOUTLOP, + LS_SPOUTSTR, + LS_STORM, + LS_TRAPDIS, + LS_TELEPORT, + LS_VTHEFT, + LS_WALLLOOP, + LS_WALLSTRT, +#ifndef SPAWN + TSFX_BMAID1, + TSFX_BMAID2, + TSFX_BMAID3, + TSFX_BMAID4, + TSFX_BMAID5, + TSFX_BMAID6, + TSFX_BMAID7, + TSFX_BMAID8, + TSFX_BMAID9, + TSFX_BMAID10, + TSFX_BMAID11, + TSFX_BMAID12, + TSFX_BMAID13, + TSFX_BMAID14, + TSFX_BMAID15, + TSFX_BMAID16, + TSFX_BMAID17, + TSFX_BMAID18, + TSFX_BMAID19, + TSFX_BMAID20, + TSFX_BMAID21, + TSFX_BMAID22, + TSFX_BMAID23, + TSFX_BMAID24, + TSFX_BMAID25, + TSFX_BMAID26, + TSFX_BMAID27, + TSFX_BMAID28, + TSFX_BMAID29, + TSFX_BMAID30, +#endif + TSFX_BMAID31, +#ifndef SPAWN + TSFX_BMAID32, + TSFX_BMAID33, + TSFX_BMAID34, + TSFX_BMAID35, + TSFX_BMAID36, + TSFX_BMAID37, + TSFX_BMAID38, + TSFX_BMAID39, + TSFX_BMAID40, + TSFX_SMITH1, + TSFX_SMITH2, + TSFX_SMITH3, + TSFX_SMITH4, + TSFX_SMITH5, + TSFX_SMITH6, + TSFX_SMITH7, + TSFX_SMITH8, + TSFX_SMITH9, + TSFX_SMITH10, + TSFX_SMITH11, + TSFX_SMITH12, + TSFX_SMITH13, + TSFX_SMITH14, + TSFX_SMITH15, + TSFX_SMITH16, + TSFX_SMITH17, + TSFX_SMITH18, + TSFX_SMITH19, + TSFX_SMITH20, + TSFX_SMITH21, + TSFX_SMITH22, + TSFX_SMITH23, + TSFX_SMITH24, + TSFX_SMITH25, + TSFX_SMITH26, + TSFX_SMITH27, + TSFX_SMITH28, + TSFX_SMITH29, + TSFX_SMITH30, + TSFX_SMITH31, + TSFX_SMITH32, + TSFX_SMITH33, + TSFX_SMITH34, + TSFX_SMITH35, + TSFX_SMITH36, + TSFX_SMITH37, + TSFX_SMITH38, + TSFX_SMITH39, + TSFX_SMITH40, + TSFX_SMITH41, + TSFX_SMITH42, + TSFX_SMITH43, +#endif + TSFX_SMITH44, +#ifndef SPAWN + TSFX_SMITH45, + TSFX_SMITH46, + TSFX_SMITH47, + TSFX_SMITH48, + TSFX_SMITH49, + TSFX_SMITH50, + TSFX_SMITH51, + TSFX_SMITH52, + TSFX_SMITH53, + TSFX_SMITH54, + TSFX_SMITH55, + TSFX_SMITH56, +#endif + TSFX_COW1, + TSFX_COW2, +#ifndef SPAWN + TSFX_DEADGUY, + TSFX_DRUNK1, + TSFX_DRUNK2, + TSFX_DRUNK3, + TSFX_DRUNK4, + TSFX_DRUNK5, + TSFX_DRUNK6, + TSFX_DRUNK7, + TSFX_DRUNK8, + TSFX_DRUNK9, + TSFX_DRUNK10, + TSFX_DRUNK11, + TSFX_DRUNK12, + TSFX_DRUNK13, + TSFX_DRUNK14, + TSFX_DRUNK15, + TSFX_DRUNK16, + TSFX_DRUNK17, + TSFX_DRUNK18, + TSFX_DRUNK19, + TSFX_DRUNK20, + TSFX_DRUNK21, + TSFX_DRUNK22, + TSFX_DRUNK23, + TSFX_DRUNK24, + TSFX_DRUNK25, + TSFX_DRUNK26, +#endif + TSFX_DRUNK27, +#ifndef SPAWN + TSFX_DRUNK28, + TSFX_DRUNK29, + TSFX_DRUNK30, + TSFX_DRUNK31, + TSFX_DRUNK32, + TSFX_DRUNK33, + TSFX_DRUNK34, + TSFX_DRUNK35, + TSFX_HEALER1, + TSFX_HEALER2, + TSFX_HEALER3, + TSFX_HEALER4, + TSFX_HEALER5, + TSFX_HEALER6, + TSFX_HEALER7, + TSFX_HEALER8, + TSFX_HEALER9, + TSFX_HEALER10, + TSFX_HEALER11, + TSFX_HEALER12, + TSFX_HEALER13, + TSFX_HEALER14, + TSFX_HEALER15, + TSFX_HEALER16, + TSFX_HEALER17, + TSFX_HEALER18, + TSFX_HEALER19, + TSFX_HEALER20, + TSFX_HEALER21, + TSFX_HEALER22, + TSFX_HEALER23, + TSFX_HEALER24, + TSFX_HEALER25, + TSFX_HEALER26, + TSFX_HEALER27, + TSFX_HEALER28, + TSFX_HEALER29, + TSFX_HEALER30, + TSFX_HEALER31, + TSFX_HEALER32, + TSFX_HEALER33, + TSFX_HEALER34, + TSFX_HEALER35, + TSFX_HEALER36, +#endif + TSFX_HEALER37, +#ifndef SPAWN + TSFX_HEALER38, + TSFX_HEALER39, + TSFX_HEALER40, + TSFX_HEALER41, + TSFX_HEALER42, + TSFX_HEALER43, + TSFX_HEALER44, + TSFX_HEALER45, + TSFX_HEALER46, + TSFX_HEALER47, + TSFX_PEGBOY1, + TSFX_PEGBOY2, + TSFX_PEGBOY3, + TSFX_PEGBOY4, + TSFX_PEGBOY5, + TSFX_PEGBOY6, + TSFX_PEGBOY7, + TSFX_PEGBOY8, + TSFX_PEGBOY9, + TSFX_PEGBOY10, + TSFX_PEGBOY11, + TSFX_PEGBOY12, + TSFX_PEGBOY13, + TSFX_PEGBOY14, + TSFX_PEGBOY15, + TSFX_PEGBOY16, + TSFX_PEGBOY17, + TSFX_PEGBOY18, + TSFX_PEGBOY19, + TSFX_PEGBOY20, + TSFX_PEGBOY21, + TSFX_PEGBOY22, + TSFX_PEGBOY23, + TSFX_PEGBOY24, + TSFX_PEGBOY25, + TSFX_PEGBOY26, + TSFX_PEGBOY27, + TSFX_PEGBOY28, + TSFX_PEGBOY29, + TSFX_PEGBOY30, + TSFX_PEGBOY31, +#endif + TSFX_PEGBOY32, +#ifndef SPAWN + TSFX_PEGBOY33, + TSFX_PEGBOY34, + TSFX_PEGBOY35, + TSFX_PEGBOY36, + TSFX_PEGBOY37, + TSFX_PEGBOY38, + TSFX_PEGBOY39, + TSFX_PEGBOY40, + TSFX_PEGBOY41, + TSFX_PEGBOY42, + TSFX_PEGBOY43, + TSFX_PRIEST0, + TSFX_PRIEST1, + TSFX_PRIEST2, + TSFX_PRIEST3, + TSFX_PRIEST4, + TSFX_PRIEST5, + TSFX_PRIEST6, + TSFX_PRIEST7, + TSFX_STORY0, + TSFX_STORY1, + TSFX_STORY2, + TSFX_STORY3, + TSFX_STORY4, + TSFX_STORY5, + TSFX_STORY6, + TSFX_STORY7, + TSFX_STORY8, + TSFX_STORY9, + TSFX_STORY10, + TSFX_STORY11, + TSFX_STORY12, + TSFX_STORY13, + TSFX_STORY14, + TSFX_STORY15, + TSFX_STORY16, + TSFX_STORY17, + TSFX_STORY18, + TSFX_STORY19, + TSFX_STORY20, + TSFX_STORY21, + TSFX_STORY22, + TSFX_STORY23, + TSFX_STORY24, +#endif + TSFX_STORY25, +#ifndef SPAWN + TSFX_STORY26, + TSFX_STORY27, + TSFX_STORY28, + TSFX_STORY29, + TSFX_STORY30, + TSFX_STORY31, + TSFX_STORY32, + TSFX_STORY33, + TSFX_STORY34, + TSFX_STORY35, + TSFX_STORY36, + TSFX_STORY37, + TSFX_STORY38, +#endif + TSFX_TAVERN0, +#ifndef SPAWN + TSFX_TAVERN1, + TSFX_TAVERN2, + TSFX_TAVERN3, + TSFX_TAVERN4, + TSFX_TAVERN5, + TSFX_TAVERN6, + TSFX_TAVERN7, + TSFX_TAVERN8, + TSFX_TAVERN9, + TSFX_TAVERN10, + TSFX_TAVERN11, + TSFX_TAVERN12, + TSFX_TAVERN13, + TSFX_TAVERN14, + TSFX_TAVERN15, + TSFX_TAVERN16, + TSFX_TAVERN17, + TSFX_TAVERN18, + TSFX_TAVERN19, + TSFX_TAVERN20, + TSFX_TAVERN21, + TSFX_TAVERN22, + TSFX_TAVERN23, + TSFX_TAVERN24, + TSFX_TAVERN25, + TSFX_TAVERN26, + TSFX_TAVERN27, + TSFX_TAVERN28, + TSFX_TAVERN29, + TSFX_TAVERN30, + TSFX_TAVERN31, + TSFX_TAVERN32, + TSFX_TAVERN33, + TSFX_TAVERN34, + TSFX_TAVERN35, +#endif + TSFX_TAVERN36, +#ifndef SPAWN + TSFX_TAVERN37, + TSFX_TAVERN38, + TSFX_TAVERN39, + TSFX_TAVERN40, + TSFX_TAVERN41, + TSFX_TAVERN42, + TSFX_TAVERN43, + TSFX_TAVERN44, + TSFX_TAVERN45, + TSFX_WITCH1, + TSFX_WITCH2, + TSFX_WITCH3, + TSFX_WITCH4, + TSFX_WITCH5, + TSFX_WITCH6, + TSFX_WITCH7, + TSFX_WITCH8, + TSFX_WITCH9, + TSFX_WITCH10, + TSFX_WITCH11, + TSFX_WITCH12, + TSFX_WITCH13, + TSFX_WITCH14, + TSFX_WITCH15, + TSFX_WITCH16, + TSFX_WITCH17, + TSFX_WITCH18, + TSFX_WITCH19, + TSFX_WITCH20, + TSFX_WITCH21, + TSFX_WITCH22, + TSFX_WITCH23, + TSFX_WITCH24, + TSFX_WITCH25, + TSFX_WITCH26, + TSFX_WITCH27, + TSFX_WITCH28, + TSFX_WITCH29, + TSFX_WITCH30, + TSFX_WITCH31, + TSFX_WITCH32, + TSFX_WITCH33, + TSFX_WITCH34, + TSFX_WITCH35, + TSFX_WITCH36, + TSFX_WITCH37, +#endif + TSFX_WITCH38, +#ifndef SPAWN + TSFX_WITCH39, + TSFX_WITCH40, + TSFX_WITCH41, + TSFX_WITCH42, + TSFX_WITCH43, + TSFX_WITCH44, + TSFX_WITCH45, + TSFX_WITCH46, + TSFX_WITCH47, + TSFX_WITCH48, + TSFX_WITCH49, + TSFX_WITCH50, + TSFX_WOUND, + PS_MAGE1, + PS_MAGE2, + PS_MAGE3, + PS_MAGE4, + PS_MAGE5, + PS_MAGE6, + PS_MAGE7, + PS_MAGE8, + PS_MAGE9, + PS_MAGE10, + PS_MAGE11, + PS_MAGE12, + PS_MAGE13, + PS_MAGE14, + PS_MAGE15, + PS_MAGE16, + PS_MAGE17, + PS_MAGE18, + PS_MAGE19, + PS_MAGE20, + PS_MAGE21, + PS_MAGE22, + PS_MAGE23, + PS_MAGE24, + PS_MAGE25, + PS_MAGE26, + PS_MAGE27, + PS_MAGE28, + PS_MAGE29, + PS_MAGE30, + PS_MAGE31, + PS_MAGE32, + PS_MAGE33, + PS_MAGE34, + PS_MAGE35, + PS_MAGE36, + PS_MAGE37, + PS_MAGE38, + PS_MAGE39, + PS_MAGE40, + PS_MAGE41, + PS_MAGE42, + PS_MAGE43, + PS_MAGE44, + PS_MAGE45, + PS_MAGE46, + PS_MAGE47, + PS_MAGE48, + PS_MAGE49, + PS_MAGE50, + PS_MAGE51, + PS_MAGE52, + PS_MAGE53, + PS_MAGE54, + PS_MAGE55, + PS_MAGE56, + PS_MAGE57, + PS_MAGE58, + PS_MAGE59, + PS_MAGE60, + PS_MAGE61, + PS_MAGE62, + PS_MAGE63, + PS_MAGE64, + PS_MAGE65, + PS_MAGE66, + PS_MAGE67, + PS_MAGE68, + PS_MAGE69, + PS_MAGE69B, + PS_MAGE70, + PS_MAGE71, + PS_MAGE72, + PS_MAGE73, + PS_MAGE74, + PS_MAGE75, + PS_MAGE76, + PS_MAGE77, + PS_MAGE78, + PS_MAGE79, + PS_MAGE80, + PS_MAGE81, + PS_MAGE82, + PS_MAGE83, + PS_MAGE84, + PS_MAGE85, + PS_MAGE86, + PS_MAGE87, + PS_MAGE88, + PS_MAGE89, + PS_MAGE90, + PS_MAGE91, + PS_MAGE92, + PS_MAGE93, + PS_MAGE94, + PS_MAGE95, + PS_MAGE96, + PS_MAGE97, + PS_MAGE98, + PS_MAGE99, + PS_MAGE100, + PS_MAGE101, + PS_MAGE102, + PS_ROGUE1, + PS_ROGUE2, + PS_ROGUE3, + PS_ROGUE4, + PS_ROGUE5, + PS_ROGUE6, + PS_ROGUE7, + PS_ROGUE8, + PS_ROGUE9, + PS_ROGUE10, + PS_ROGUE11, + PS_ROGUE12, + PS_ROGUE13, + PS_ROGUE14, + PS_ROGUE15, + PS_ROGUE16, + PS_ROGUE17, + PS_ROGUE18, + PS_ROGUE19, + PS_ROGUE20, + PS_ROGUE21, + PS_ROGUE22, + PS_ROGUE23, + PS_ROGUE24, + PS_ROGUE25, + PS_ROGUE26, + PS_ROGUE27, + PS_ROGUE28, + PS_ROGUE29, + PS_ROGUE30, + PS_ROGUE31, + PS_ROGUE32, + PS_ROGUE33, + PS_ROGUE34, + PS_ROGUE35, + PS_ROGUE36, + PS_ROGUE37, + PS_ROGUE38, + PS_ROGUE39, + PS_ROGUE40, + PS_ROGUE41, + PS_ROGUE42, + PS_ROGUE43, + PS_ROGUE44, + PS_ROGUE45, + PS_ROGUE46, + PS_ROGUE47, + PS_ROGUE48, + PS_ROGUE49, + PS_ROGUE50, + PS_ROGUE51, + PS_ROGUE52, + PS_ROGUE53, + PS_ROGUE54, + PS_ROGUE55, + PS_ROGUE56, + PS_ROGUE57, + PS_ROGUE58, + PS_ROGUE59, + PS_ROGUE60, + PS_ROGUE61, + PS_ROGUE62, + PS_ROGUE63, + PS_ROGUE64, + PS_ROGUE65, + PS_ROGUE66, + PS_ROGUE67, + PS_ROGUE68, + PS_ROGUE69, + PS_ROGUE69B, + PS_ROGUE70, + PS_ROGUE71, + PS_ROGUE72, + PS_ROGUE73, + PS_ROGUE74, + PS_ROGUE75, + PS_ROGUE76, + PS_ROGUE77, + PS_ROGUE78, + PS_ROGUE79, + PS_ROGUE80, + PS_ROGUE81, + PS_ROGUE82, + PS_ROGUE83, + PS_ROGUE84, + PS_ROGUE85, + PS_ROGUE86, + PS_ROGUE87, + PS_ROGUE88, + PS_ROGUE89, + PS_ROGUE90, + PS_ROGUE91, + PS_ROGUE92, + PS_ROGUE93, + PS_ROGUE94, + PS_ROGUE95, + PS_ROGUE96, + PS_ROGUE97, + PS_ROGUE98, + PS_ROGUE99, + PS_ROGUE100, + PS_ROGUE101, + PS_ROGUE102, + PS_WARR1, + PS_WARR2, + PS_WARR3, + PS_WARR4, + PS_WARR5, + PS_WARR6, + PS_WARR7, + PS_WARR8, + PS_WARR9, + PS_WARR10, + PS_WARR11, + PS_WARR12, +#endif + PS_WARR13, + PS_WARR14, + PS_WARR14B, + PS_WARR14C, + PS_WARR15, + PS_WARR15B, + PS_WARR15C, + PS_WARR16, + PS_WARR16B, + PS_WARR16C, + PS_WARR17, + PS_WARR18, + PS_WARR19, + PS_WARR20, + PS_WARR21, + PS_WARR22, + PS_WARR23, + PS_WARR24, + PS_WARR25, + PS_WARR26, + PS_WARR27, + PS_WARR28, + PS_WARR29, + PS_WARR30, + PS_WARR31, + PS_WARR32, + PS_WARR33, + PS_WARR34, + PS_WARR35, + PS_WARR36, + PS_WARR37, + PS_WARR38, + PS_WARR39, + PS_WARR40, + PS_WARR41, + PS_WARR42, + PS_WARR43, + PS_WARR44, + PS_WARR45, + PS_WARR46, + PS_WARR47, + PS_WARR48, + PS_WARR49, + PS_WARR50, + PS_WARR51, + PS_WARR52, + PS_WARR53, + PS_WARR54, + PS_WARR55, + PS_WARR56, + PS_WARR57, + PS_WARR58, + PS_WARR59, + PS_WARR60, + PS_WARR61, + PS_WARR62, + PS_WARR63, + PS_WARR64, + PS_WARR65, + PS_WARR66, + PS_WARR67, + PS_WARR68, + PS_WARR69, + PS_WARR69B, + PS_WARR70, + PS_WARR71, + PS_WARR72, + PS_WARR73, + PS_WARR74, + PS_WARR75, + PS_WARR76, + PS_WARR77, + PS_WARR78, + PS_WARR79, +#ifndef SPAWN + PS_WARR80, + PS_WARR81, + PS_WARR82, + PS_WARR83, + PS_WARR84, + PS_WARR85, + PS_WARR86, + PS_WARR87, + PS_WARR88, + PS_WARR89, + PS_WARR90, + PS_WARR91, + PS_WARR92, + PS_WARR93, + PS_WARR94, + PS_WARR95, + PS_WARR95B, + PS_WARR95C, + PS_WARR95D, + PS_WARR95E, + PS_WARR95F, +#endif + PS_WARR96B, + PS_WARR97, + PS_WARR98, + PS_WARR99, +#ifndef SPAWN + PS_WARR100, + PS_WARR101, + PS_WARR102, + PS_NAR1, + PS_NAR2, + PS_NAR3, + PS_NAR4, + PS_NAR5, + PS_NAR6, + PS_NAR7, + PS_NAR8, + PS_NAR9, + PS_DIABLVLINT, + USFX_CLEAVER, + USFX_GARBUD1, + USFX_GARBUD2, + USFX_GARBUD3, + USFX_GARBUD4, + USFX_IZUAL1, + USFX_LACH1, + USFX_LACH2, + USFX_LACH3, + USFX_LAZ1, + USFX_LAZ2, + USFX_SKING1, + USFX_SNOT1, + USFX_SNOT2, + USFX_SNOT3, + USFX_WARLRD1, + USFX_WLOCK1, + USFX_ZHAR1, + USFX_ZHAR2, + USFX_DIABLOD, +#endif } _sfx_id; typedef enum sfx_flag { @@ -2248,13 +2274,15 @@ typedef enum _talker_id { } _talker_id; typedef enum _music_id { - TMUSIC_TOWN = 0, - TMUSIC_L1 = 1, - TMUSIC_L2 = 2, - TMUSIC_L3 = 3, - TMUSIC_L4 = 4, - TMUSIC_INTRO = 5, - NUM_MUSIC = 6, + TMUSIC_TOWN, + TMUSIC_L1, +#ifndef SPAWN + TMUSIC_L2, + TMUSIC_L3, + TMUSIC_L4, +#endif + TMUSIC_INTRO, + NUM_MUSIC, } _music_id; typedef enum _mainmenu_selections { @@ -2268,9 +2296,9 @@ typedef enum _mainmenu_selections { typedef enum _selhero_selections { SELHERO_NEW_DUNGEON = 1, - SELHERO_CONTINUE = 2, - SELHERO_CONNECT = 3, - SELHERO_PREVIOUS = 4 + SELHERO_CONTINUE = 2, + SELHERO_CONNECT = 3, + SELHERO_PREVIOUS = 4 } _selhero_selections; typedef enum panel_button_id { @@ -2825,8 +2853,10 @@ typedef enum anim_weapon_id { typedef enum anim_armor_id { ANIM_ID_LIGHT_ARMOR = 0x00, +#ifndef SPAWN ANIM_ID_MEDIUM_ARMOR = 0x10, ANIM_ID_HEAVY_ARMOR = 0x20 +#endif } anim_armor_id; typedef enum shrine_type { @@ -2880,8 +2910,8 @@ typedef enum action_id { } action_id; typedef enum dlrg_flag { - DLRG_HDOOR = 0x01, - DLRG_VDOOR = 0x02, - DLRG_CHAMBER = 0x40, + DLRG_HDOOR = 0x01, + DLRG_VDOOR = 0x02, + DLRG_CHAMBER = 0x40, DLRG_PROTECTED = 0x80, } dlrg_flag; diff --git a/structs.h b/structs.h index b9b4f8a89..b375e0d3e 100644 --- a/structs.h +++ b/structs.h @@ -1232,7 +1232,7 @@ typedef struct _uiheroinfo { WORD vitality; int gold; int hassaved; - int spawned; + BOOL spawned; } _uiheroinfo; // TPDEF PTR FCN UCHAR ENUMHEROPROC diff --git a/types.h b/types.h index 1ba624d81..5b51454d8 100644 --- a/types.h +++ b/types.h @@ -48,7 +48,7 @@ #endif // If defined, use copy protection [Default -> Defined] -#ifndef _DEBUG +#if !defined(_DEBUG) && !defined(SPAWN) #define COPYPROT #endif