Browse Source

Correct shareware ifdefs

pull/888/head
Anders Jenbo 6 years ago
parent
commit
3157885502
  1. 29
      Source/inv.cpp
  2. 48
      Source/missiles.cpp
  3. 4
      Source/objects.cpp
  4. 10
      Source/player.cpp
  5. 29
      Source/textdat.cpp
  6. 18
      Source/town.cpp
  7. 2
      Source/trigs.cpp

29
Source/inv.cpp

@ -126,7 +126,11 @@ void InitInv()
#endif
#ifdef HELLFIRE
} else if (plr[myplr]._pClass == PC_MONK) {
#ifndef SPAWN
pInvCels = LoadFileInMem("Data\\Inv\\Inv_Sor.CEL", NULL);
#else
pInvCels = LoadFileInMem("Data\\Inv\\Inv.CEL", NULL);
#endif
} else if (plr[myplr]._pClass == PC_BARD) {
pInvCels = LoadFileInMem("Data\\Inv\\Inv_rog.CEL", NULL);
} else if (plr[myplr]._pClass == PC_BARBARIAN) {
@ -1912,16 +1916,15 @@ void CheckQuestItem(int pnum)
sfxdnum = PS_ROGUE91;
} else if (plr[myplr]._pClass == PC_SORCERER) {
sfxdnum = PS_MAGE91;
}
#ifdef HELLFIRE
else if (plr[myplr]._pClass == PC_MONK) {
} else if (plr[myplr]._pClass == PC_MONK) {
sfxdnum = PS_MONK91;
} else if (plr[myplr]._pClass == PC_BARD) {
sfxdnum = PS_ROGUE91;
} else if (plr[myplr]._pClass == PC_BARBARIAN) {
sfxdnum = PS_WARR91;
}
#endif
}
#endif
}
#ifdef HELLFIRE
@ -1932,14 +1935,18 @@ void CheckQuestItem(int pnum)
sfxdelay = 10;
if (plr[myplr]._pClass == PC_WARRIOR) {
sfxdnum = PS_WARR79;
#ifndef SPAWN
} else if (plr[myplr]._pClass == PC_ROGUE) {
sfxdnum = PS_ROGUE79;
} else if (plr[myplr]._pClass == PC_SORCERER) {
sfxdnum = PS_MAGE79;
#endif
} else if (plr[myplr]._pClass == PC_MONK) {
sfxdnum = PS_MONK79;
#ifndef SPAWN
} else if (plr[myplr]._pClass == PC_BARD) {
sfxdnum = PS_ROGUE79;
#endif
} else if (plr[myplr]._pClass == PC_BARBARIAN) {
sfxdnum = PS_WARR79;
}
@ -1960,14 +1967,18 @@ void CheckQuestItem(int pnum)
sfxdelay = 10;
if (plr[myplr]._pClass == PC_WARRIOR) {
sfxdnum = PS_WARR46;
#ifndef SPAWN
} else if (plr[myplr]._pClass == PC_ROGUE) {
sfxdnum = PS_ROGUE46;
} else if (plr[myplr]._pClass == PC_SORCERER) {
sfxdnum = PS_MAGE46;
#endif
} else if (plr[myplr]._pClass == PC_MONK) {
sfxdnum = PS_MONK46;
#ifndef SPAWN
} else if (plr[myplr]._pClass == PC_BARD) {
sfxdnum = PS_ROGUE46;
#endif
} else if (plr[myplr]._pClass == PC_BARBARIAN) {
sfxdnum = PS_WARR46;
}
@ -2209,10 +2220,12 @@ void AutoGetItem(int pnum, int ii)
PlaySFX(random_(0, 3) + PS_MAGE14);
#endif
#ifdef HELLFIRE
} else if (plr[pnum]._pClass == PC_MONK)
} else if (plr[pnum]._pClass == PC_MONK) {
PlaySFX(random_(0, 3) + PS_MONK14);
else if (plr[pnum]._pClass == PC_BARD) {
#ifndef SPAWN
} else if (plr[pnum]._pClass == PC_BARD) {
PlaySFX(random_(0, 3) + PS_ROGUE14);
#endif
} else if (plr[pnum]._pClass == PC_BARBARIAN) {
PlaySFX(random_(0, 3) + PS_WARR14);
#endif
@ -2810,7 +2823,6 @@ BOOL UseInvItem(int pnum, int cii)
} else if (plr[pnum]._pClass == PC_SORCERER) {
sfxdnum = PS_MAGE95;
}
#endif
#ifdef HELLFIRE
else if (plr[pnum]._pClass == PC_MONK) {
sfxdnum = PS_MONK95;
@ -2819,6 +2831,7 @@ BOOL UseInvItem(int pnum, int cii)
} else if (plr[pnum]._pClass == PC_BARBARIAN) {
sfxdnum = PS_WARR95;
}
#endif
#endif
return TRUE;
case IDI_FUNGALTM:
@ -2835,8 +2848,10 @@ BOOL UseInvItem(int pnum, int cii)
#ifdef HELLFIRE
} else if (plr[pnum]._pClass == PC_MONK) {
sfxdnum = PS_MONK29;
#ifndef SPAWN
} else if (plr[pnum]._pClass == PC_BARD) {
sfxdnum = PS_ROGUE29;
#endif
} else if (plr[pnum]._pClass == PC_BARBARIAN) {
sfxdnum = PS_WARR29;
#endif
@ -2859,8 +2874,10 @@ BOOL UseInvItem(int pnum, int cii)
#ifdef HELLFIRE
} else if (plr[pnum]._pClass == PC_MONK) {
PlaySFX(PS_MONK13);
#ifndef SPAWN
} else if (plr[pnum]._pClass == PC_BARD) {
PlaySFX(PS_ROGUE13);
#endif
} else if (plr[pnum]._pClass == PC_BARBARIAN) {
PlaySFX(PS_WARR13);
#endif

48
Source/missiles.cpp

@ -3114,7 +3114,21 @@ void AddBlodboil(int mi, int sx, int sy, int dx, int dy, int midir, char mienemy
if (id == -1 || plr[id]._pSpellFlags & 6 || plr[id]._pHitPoints <= plr[id]._pLevel << 6) {
missile[mi]._miDelFlag = TRUE;
} else {
int blodboilSFX[NUM_CLASSES] = { PS_WARR70, PS_ROGUE70, PS_MAGE70, PS_MAGE70, PS_ROGUE70, PS_WARR70 }; // BUGFIX: change second PS_MAGE70 to PS_MONK70?
int blodboilSFX[NUM_CLASSES] = {
PS_WARR70,
#ifndef SPAWN
PS_ROGUE70,
PS_MAGE70,
PS_MAGE70, // BUGFIX: PS_MONK70?
PS_ROGUE70,
#else
0,
0,
0,
0,
#endif
PS_WARR70
};
UseMana(id, 22);
missile[mi]._miVar1 = id;
int tmp = 3 * plr[id]._pLevel;
@ -5316,7 +5330,21 @@ void MI_Blodboil(int i)
if (missile[i]._mirange == 0) {
id = missile[i]._miVar1;
if ((plr[id]._pSpellFlags & 2) == 2) {
int blodboilSFX[NUM_CLASSES] = { PS_WARR72, PS_ROGUE72, PS_MAGE72, PS_MAGE72, PS_ROGUE72, PS_WARR72 }; // BUGFIX: change second PS_MAGE72 to PS_MONK72?
int blodboilSFX[NUM_CLASSES] = {
PS_WARR72,
#ifndef SPAWN
PS_ROGUE72,
PS_MAGE72,
PS_MAGE72, // BUGFIX: should be PS_MONK72?
PS_ROGUE72,
#else
0,
0,
0,
0,
#endif
PS_WARR72
};
plr[id]._pSpellFlags &= ~0x2;
plr[id]._pSpellFlags |= 4;
if (2 * (id > 0))
@ -5332,7 +5360,21 @@ void MI_Blodboil(int i)
force_redraw = 255;
PlaySfxLoc(blodboilSFX[plr[id]._pClass], plr[id]._px, plr[id]._py);
} else {
int blodboilSFX[NUM_CLASSES] = { PS_WARR72, PS_ROGUE72, PS_MAGE72, PS_MAGE72, PS_ROGUE72, PS_WARR72 }; // BUGFIX: change second PS_MAGE72 to PS_MONK72?
int blodboilSFX[NUM_CLASSES] = {
PS_WARR72,
#ifndef SPAWN
PS_ROGUE72,
PS_MAGE72,
PS_MAGE72, // BUGFIX: should be PS_MONK72?
PS_ROGUE72,
#else
0,
0,
0,
0,
#endif
PS_WARR72
};
missile[i]._miDelFlag = TRUE;
plr[id]._pSpellFlags &= ~0x4;
hpdif = plr[id]._pMaxHP - plr[id]._pHitPoints;

4
Source/objects.cpp

@ -3310,12 +3310,16 @@ void OperateSlainHero(int pnum, int i, DIABOOL sendmsg)
} else if (plr[pnum]._pClass == PC_MONK) {
CreateMagicWeapon(object[i]._ox, object[i]._oy, ITYPE_STAFF, ICURS_WAR_STAFF, FALSE, TRUE);
PlaySfxLoc(PS_MONK9, plr[myplr]._px, plr[myplr]._py);
#ifndef SPAWN
} else if (plr[pnum]._pClass == PC_BARD) {
CreateMagicWeapon(object[i]._ox, object[i]._oy, ITYPE_SWORD, ICURS_BASTARD_SWORD, FALSE, TRUE);
PlaySfxLoc(PS_ROGUE9, plr[myplr]._px, plr[myplr]._py);
#endif
} else if (plr[pnum]._pClass == PC_BARBARIAN) {
CreateMagicWeapon(object[i]._ox, object[i]._oy, ITYPE_AXE, ICURS_BATTLE_AXE, FALSE, TRUE);
#ifndef SPAWN
PlaySfxLoc(PS_WARR9, plr[myplr]._px, plr[myplr]._py);
#endif
#endif
}
if (pnum == myplr)

10
Source/player.cpp

@ -4694,19 +4694,25 @@ void PlayDungMsgs()
plr[myplr].pDungMsgs2 |= 4;
} else if (currlevel == 21 && !plr[myplr]._pLvlVisited[21] && gbMaxPlayers == 1 && !(plr[myplr].pDungMsgs & 32)) {
sfxdelay = 30;
#ifndef SPAWN
if (plr[myplr]._pClass == PC_WARRIOR) {
sfxdnum = PS_WARR92;
} else if (plr[myplr]._pClass == PC_ROGUE) {
sfxdnum = PS_ROGUE92;
} else if (plr[myplr]._pClass == PC_SORCERER) {
sfxdnum = PS_MAGE92;
} else if (plr[myplr]._pClass == PC_MONK) {
} else
#endif
if (plr[myplr]._pClass == PC_MONK) {
sfxdnum = PS_MONK92;
} else if (plr[myplr]._pClass == PC_BARD) {
}
#ifndef SPAWN
else if (plr[myplr]._pClass == PC_BARD) {
sfxdnum = PS_ROGUE92;
} else if (plr[myplr]._pClass == PC_BARBARIAN) {
sfxdnum = PS_WARR92;
}
#endif
plr[myplr].pDungMsgs |= 32;
#endif
} else {

29
Source/textdat.cpp

@ -798,6 +798,22 @@ const TextDataStruct alltext[] = {
1, 5, PS_MONK11 },
{ "The armories of Hell are home to the Warlord of Blood. In his wake lay the mutilated bodies of thousands. Angels and man alike have been cut down to fulfill his endless sacrifices to the Dark ones who scream for one thing - blood. |",
1, 5, PS_MONK12 },
#ifdef SPAWN
{ "Nice try... ", 0, 0, TSFX_TAVERN36 },
{ "Nice try... ", 0, 0, TSFX_TAVERN36 },
{ "Nice try... ", 0, 0, TSFX_TAVERN36 },
{ "Nice try... ", 0, 0, TSFX_TAVERN36 },
{ "Nice try... ", 0, 0, TSFX_TAVERN36 },
{ "Nice try... ", 0, 0, TSFX_TAVERN36 },
{ "Nice try... ", 0, 0, TSFX_TAVERN36 },
{ "Nice try... ", 0, 0, TSFX_TAVERN36 },
{ "Nice try... ", 0, 0, TSFX_TAVERN36 },
{ "Nice try... ", 0, 0, TSFX_TAVERN36 },
{ "Nice try... ", 0, 0, TSFX_TAVERN36 },
{ "Nice try... ", 0, 0, TSFX_TAVERN36 },
{ "Nice try... ", 0, 0, TSFX_TAVERN36 },
{ "Nice try... ", 0, 0, TSFX_TAVERN36 },
#else
{ "Beyond the Hall of Heroes lies the Chamber of Bone. Eternal death awaits any who would seek to steal the treasures secured within this room. So speaks the Lord of Terror, and so it is written. |",
1, 5, PS_ROGUE1 },
{ "...and so, locked beyond the Gateway of Blood and past the Hall of Fire, Valor awaits for the Hero of Light to awaken... |",
@ -826,6 +842,7 @@ const TextDataStruct alltext[] = {
1, 5, TSFX_PEGBOY7 },
{ "The once proud Iswall is trapped deep beneath the surface of this world. His honor stripped and his visage altered. He is trapped in immortal torment. Charged to conceal the very thing that could free him.|",
1, 5, TSFX_WITCH9 },
#endif
{ "So, you're the hero everyone's been talking about. Perhaps you could help a poor, simple farmer out of a terrible mess? At the edge of my orchard, just south of here, there's a horrible thing swelling out of the ground! I can't get to my crops or my bales of hay, and my poor cows will starve. The witch gave this to me and said that it would blast that thing out of my field. If you could destroy it, I would be forever grateful. I'd do it myself, but someone has to stay here with the cows...|",
1, 3, TSFX_FARMER1 },
{ "I knew that it couldn't be as simple as that witch made it sound. It's a sad world when you can't even trust your neighbors.|",
@ -913,6 +930,17 @@ const TextDataStruct alltext[] = {
{ "In Spiritu Sanctum. |", 1, 5, PS_MONK54 },
{ "Praedictum Otium. |", 1, 5, PS_MONK55 },
{ "Efficio Obitus Ut Inimicus. |", 1, 5, PS_MONK56 },
#ifdef SPAWN
{ "Nice try... ", 0, 0, TSFX_TAVERN36 },
{ "Nice try... ", 0, 0, TSFX_TAVERN36 },
{ "Nice try... ", 0, 0, TSFX_TAVERN36 },
{ "Nice try... ", 0, 0, TSFX_TAVERN36 },
{ "Nice try... ", 0, 0, TSFX_TAVERN36 },
{ "Nice try... ", 0, 0, TSFX_TAVERN36 },
{ "Nice try... ", 0, 0, TSFX_TAVERN36 },
{ "Nice try... ", 0, 0, TSFX_TAVERN36 },
{ "Nice try... ", 0, 0, TSFX_TAVERN36 },
#else
{ "In Spiritu Sanctum. |", 1, 5, PS_MAGE54 },
{ "Praedictum Otium. |", 1, 5, PS_MAGE55 },
{ "Efficio Obitus Ut Inimicus. |", 1, 5, PS_MAGE56 },
@ -923,6 +951,7 @@ const TextDataStruct alltext[] = {
{ "Praedictum Otium. |", 1, 5, PS_ROGUE55 },
{ "Efficio Obitus Ut Inimicus. |", 1, 5, PS_ROGUE56 },
#endif
#endif
};
/** unused */
const DWORD gdwAllTextEntries = 259;

18
Source/town.cpp

@ -1737,6 +1737,7 @@ void T_Pass3()
#ifndef SPAWN
if (gbMaxPlayers == 1) {
#endif
#ifdef HELLFIRE
if(quests[Q_FARMER]._qactive == 3 || quests[Q_FARMER]._qactive == 10
|| quests[Q_JERSEY]._qactive == 3 || quests[Q_JERSEY]._qactive == 10)
@ -1752,25 +1753,28 @@ void T_Pass3()
else
town_47552C();
#endif
#ifndef SPAWN
#ifdef HELLFIRE
if (!(plr[myplr].pTownWarps & 1) && plr[myplr]._pLevel < 10) {
if (!(plr[myplr].pTownWarps & 1) && plr[myplr]._pLevel < 10)
#else
if (!(plr[myplr].pTownWarps & 1)) {
if (!(plr[myplr].pTownWarps & 1))
#endif
#endif
{
T_FillTile(P3Tiles, 48, 20, 320);
#ifndef SPAWN
}
#ifndef SPAWN
#ifdef HELLFIRE
if (!(plr[myplr].pTownWarps & 2) && plr[myplr]._pLevel < 15) {
if (!(plr[myplr].pTownWarps & 2) && plr[myplr]._pLevel < 15)
#else
if (!(plr[myplr].pTownWarps & 2)) {
if (!(plr[myplr].pTownWarps & 2))
#endif
#endif
{
T_FillTile(P3Tiles, 16, 68, 332);
T_FillTile(P3Tiles, 16, 70, 331);
#ifndef SPAWN
}
#ifndef SPAWN
#ifdef HELLFIRE
if (!(plr[myplr].pTownWarps & 4) && plr[myplr]._pLevel < 20) {
#else
@ -1783,7 +1787,6 @@ void T_Pass3()
#ifndef SPAWN
}
}
#endif
#ifdef HELLFIRE
else
{
@ -1801,6 +1804,7 @@ void T_Pass3()
else
town_47552C();
}
#endif
#endif
if (quests[Q_PWATER]._qactive != QUEST_DONE && quests[Q_PWATER]._qactive) {

2
Source/trigs.cpp

@ -978,8 +978,10 @@ void CheckTriggers()
#ifdef HELLFIRE
else if (plr[myplr]._pClass == PC_MONK) {
PlaySFX(PS_MONK43);
#ifndef SPAWN
} else if (plr[myplr]._pClass == PC_BARD) {
PlaySFX(PS_ROGUE43);
#endif
} else if (plr[myplr]._pClass == PC_BARBARIAN) {
PlaySFX(PS_WARR43);
}

Loading…
Cancel
Save