Browse Source

Merge pull request #1130 from AJenbo/control.cpp

Control.cpp
pull/109/head
Robin Eklind 7 years ago committed by GitHub
parent
commit
211c2bde27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      Source/automap.cpp
  2. 383
      Source/control.cpp
  3. 2
      Source/control.h
  4. 6
      Source/cursor.cpp
  5. 1
      Source/list.h
  6. 18
      Source/stores.cpp
  7. 4
      Source/trigs.cpp

1
Source/automap.cpp

@ -499,6 +499,7 @@ void DrawAutomapPlr()
DrawLine(x, y, x - AutoMapYPos, y - AMPlayerX, COLOR_PLAYER); DrawLine(x, y, x - AutoMapYPos, y - AMPlayerX, COLOR_PLAYER);
DrawLine(x - AutoMapYPos, y - AMPlayerX, x - AMPlayerX, y - AMPlayerX, COLOR_PLAYER); DrawLine(x - AutoMapYPos, y - AMPlayerX, x - AMPlayerX, y - AMPlayerX, COLOR_PLAYER);
DrawLine(x - AutoMapYPos, y - AMPlayerX, x - AMPlayerY - AMPlayerX, y, COLOR_PLAYER); DrawLine(x - AutoMapYPos, y - AMPlayerX, x - AMPlayerY - AMPlayerX, y, COLOR_PLAYER);
break;
} }
} }

383
Source/control.cpp

@ -573,10 +573,6 @@ void SetSpell()
plr[myplr]._pRSplType = pSplType; plr[myplr]._pRSplType = pSplType;
} }
} }
// 4B8834: using guessed type int pSpell;
// 4B8954: using guessed type int pSplType;
// 4B8C98: using guessed type int spselflag;
// 52571C: using guessed type int drawpanflag;
void SetSpeedSpell(int slot) void SetSpeedSpell(int slot)
{ {
@ -621,7 +617,6 @@ void ToggleSpell(int slot)
drawpanflag = 255; drawpanflag = 255;
} }
} }
// 52571C: using guessed type int drawpanflag;
void CPrintString(int nOffset, int nCel, char col) void CPrintString(int nOffset, int nCel, char col)
{ {
@ -1261,7 +1256,6 @@ void ClearCtrlPan()
DrawPanelBox(0, sgbPlrTalkTbl + 16, 640, 128, 64, 512); DrawPanelBox(0, sgbPlrTalkTbl + 16, 640, 128, 64, 512);
DrawInfoBox(); DrawInfoBox();
} }
// 4B8840: using guessed type int sgbPlrTalkTbl;
void DrawCtrlPan() void DrawCtrlPan()
{ {
@ -1334,7 +1328,6 @@ void DoSpeedBook()
SetCursorPos(X, Y); SetCursorPos(X, Y);
} }
// 4B8C98: using guessed type int spselflag;
void DoPanBtn() void DoPanBtn()
{ {
@ -1364,21 +1357,16 @@ void control_set_button_down(int btn_id)
void control_check_btn_press() void control_check_btn_press()
{ {
int v0; // edx
int v1; // esi
v0 = MouseX;
v1 = MouseY;
if (MouseX >= PanBtnPos[3][0] if (MouseX >= PanBtnPos[3][0]
&& MouseX <= PanBtnPos[3][0] + PanBtnPos[3][2] && MouseX <= PanBtnPos[3][0] + PanBtnPos[3][2]
&& MouseY >= PanBtnPos[3][1] && MouseY >= PanBtnPos[3][1]
&& MouseY <= PanBtnPos[3][1] + PanBtnPos[3][3]) { && MouseY <= PanBtnPos[3][1] + PanBtnPos[3][3]) {
control_set_button_down(3); control_set_button_down(3);
} }
if (v0 >= PanBtnPos[6][0] if (MouseX >= PanBtnPos[6][0]
&& v0 <= PanBtnPos[6][0] + PanBtnPos[6][2] && MouseX <= PanBtnPos[6][0] + PanBtnPos[6][2]
&& v1 >= PanBtnPos[6][1] && MouseY >= PanBtnPos[6][1]
&& v1 <= PanBtnPos[6][1] + PanBtnPos[6][3]) { && MouseY <= PanBtnPos[6][1] + PanBtnPos[6][3]) {
control_set_button_down(6); control_set_button_down(6);
} }
} }
@ -1394,53 +1382,34 @@ void DoAutoMap()
InitDiabloMsg(EMSG_NO_AUTOMAP_IN_TOWN); InitDiabloMsg(EMSG_NO_AUTOMAP_IN_TOWN);
} }
} }
// 679660: using guessed type char gbMaxPlayers;
void CheckPanelInfo() void CheckPanelInfo()
{ {
int v0; // edi int i, c, v, s;
int v1; // eax
int v2; // ecx
int v3; // ecx
int v4; // edi
int v5; // eax
int *v6; // edx
int v7; // ebx
int v8; // ebx
int *v9; // eax
signed int v10; // edx
int v11; // ecx
int v12; // [esp+10h] [ebp-4h]
v0 = 0;
panelflag = 0; panelflag = 0;
ClearPanel(); ClearPanel();
if (numpanbtns > 0) { for (i = 0; i < numpanbtns; i++) {
do { if (MouseX >= PanBtnPos[i][0]
v1 = v0; && MouseX <= PanBtnPos[i][0] + PanBtnPos[i][2]
v2 = PanBtnPos[v0][0]; && MouseY >= PanBtnPos[i][1]
if (MouseX >= v2 && MouseX <= v2 + PanBtnPos[v1][2]) { && MouseY <= PanBtnPos[i][1] + PanBtnPos[i][3]) {
v3 = PanBtnPos[v1][1]; if (i != 7) {
if (MouseY >= v3 && MouseY <= v3 + PanBtnPos[v1][3]) { strcpy(infostr, PanBtnStr[i]);
if (v0 == 7) { } else {
if (FriendlyMode) if (FriendlyMode)
strcpy(infostr, "Player friendly"); strcpy(infostr, "Player friendly");
else else
strcpy(infostr, "Player attack"); strcpy(infostr, "Player attack");
} else {
strcpy(infostr, PanBtnStr[v0]);
}
if (PanBtnHotKey[v0]) {
sprintf(tempstr, "Hotkey : %s", PanBtnHotKey[v0]);
AddPanelString(tempstr, 1);
}
infoclr = COL_WHITE;
panelflag = 1;
pinfoflag = TRUE;
}
} }
++v0; if (PanBtnHotKey[i]) {
} while (v0 < numpanbtns); sprintf(tempstr, "Hotkey : %s", PanBtnHotKey[i]);
AddPanelString(tempstr, 1);
}
infoclr = COL_WHITE;
panelflag = 1;
pinfoflag = TRUE;
}
} }
if (!spselflag && MouseX >= 565 && MouseX < 621 && MouseY >= 416 && MouseY < 472) { if (!spselflag && MouseX >= 565 && MouseX < 621 && MouseY >= 416 && MouseY < 472) {
strcpy(infostr, "Select current spell button"); strcpy(infostr, "Select current spell button");
@ -1449,62 +1418,58 @@ void CheckPanelInfo()
pinfoflag = TRUE; pinfoflag = TRUE;
strcpy(tempstr, "Hotkey : 's'"); strcpy(tempstr, "Hotkey : 's'");
AddPanelString(tempstr, 1); AddPanelString(tempstr, 1);
v4 = plr[myplr]._pRSpell; v = plr[myplr]._pRSpell;
if (v4 != -1) { if (v != -1) {
switch (_LOBYTE(plr[myplr]._pRSplType)) { switch (plr[myplr]._pRSplType) {
case RSPLTYPE_SKILL: case RSPLTYPE_SKILL:
sprintf(tempstr, "%s Skill", spelldata[v4].sSkillText); sprintf(tempstr, "%s Skill", spelldata[v].sSkillText);
LABEL_54:
AddPanelString(tempstr, 1); AddPanelString(tempstr, 1);
break; break;
case RSPLTYPE_SPELL: case RSPLTYPE_SPELL:
sprintf(tempstr, "%s Spell", spelldata[v4].sNameText); sprintf(tempstr, "%s Spell", spelldata[v].sNameText);
AddPanelString(tempstr, 1); AddPanelString(tempstr, 1);
v11 = plr[myplr]._pISplLvlAdd + plr[myplr]._pSplLvl[v4]; c = plr[myplr]._pISplLvlAdd + plr[myplr]._pSplLvl[v];
if (v11 < 0) if (c < 0)
v11 = 0; c = 0;
if (v11) if (!c)
sprintf(tempstr, "Spell Level %i", v11);
else
sprintf(tempstr, "Spell Level 0 - Unusable"); sprintf(tempstr, "Spell Level 0 - Unusable");
goto LABEL_54; else
sprintf(tempstr, "Spell Level %i", c);
AddPanelString(tempstr, 1);
break;
case RSPLTYPE_SCROLL: case RSPLTYPE_SCROLL:
sprintf(tempstr, "Scroll of %s", spelldata[v4].sNameText); sprintf(tempstr, "Scroll of %s", spelldata[v].sNameText);
AddPanelString(tempstr, 1); AddPanelString(tempstr, 1);
v12 = 0; s = 0;
v5 = myplr; for (i = 0; i < plr[myplr]._pNumInv; i++) {
if (plr[myplr]._pNumInv > 0) { if (plr[myplr].InvList[i]._itype != -1
v6 = &plr[v5].InvList[0]._iMiscId; && (plr[myplr].InvList[i]._iMiscId == IMISC_SCROLL || plr[myplr].InvList[i]._iMiscId == IMISC_SCROLLT)
v7 = plr[myplr]._pNumInv; && plr[myplr].InvList[i]._iSpell == v) {
do { s++;
if (*(v6 - 53) != -1 && (*v6 == IMISC_SCROLL || *v6 == IMISC_SCROLLT) && v6[1] == v4) }
++v12;
v6 += 92;
--v7;
} while (v7);
} }
v8 = v12; for (i = 0; i < MAXBELTITEMS; i++) {
v9 = &plr[v5].SpdList[0]._iMiscId; if (plr[myplr].SpdList[i]._itype != -1
v10 = MAXBELTITEMS; && (plr[myplr].SpdList[i]._iMiscId == IMISC_SCROLL || plr[myplr].SpdList[i]._iMiscId == IMISC_SCROLLT)
do { && plr[myplr].SpdList[i]._iSpell == v) {
if (*(v9 - 53) != -1 && (*v9 == IMISC_SCROLL || *v9 == IMISC_SCROLLT) && v9[1] == v4) s++;
++v8; }
v9 += 92; }
--v10; if (s == 1)
} while (v10);
if (v8 == 1)
strcpy(tempstr, "1 Scroll"); strcpy(tempstr, "1 Scroll");
else else
sprintf(tempstr, "%i Scrolls", v8); sprintf(tempstr, "%i Scrolls", s);
goto LABEL_54; AddPanelString(tempstr, 1);
break;
case RSPLTYPE_CHARGES: case RSPLTYPE_CHARGES:
sprintf(tempstr, "Staff of %s", spelldata[v4].sNameText); sprintf(tempstr, "Staff of %s", spelldata[v].sNameText);
AddPanelString(tempstr, 1); AddPanelString(tempstr, 1);
if (plr[myplr].InvBody[INVLOC_HAND_LEFT]._iCharges == 1) if (plr[myplr].InvBody[INVLOC_HAND_LEFT]._iCharges == 1)
strcpy(tempstr, "1 Charge"); strcpy(tempstr, "1 Charge");
else else
sprintf(tempstr, "%i Charges", plr[myplr].InvBody[INVLOC_HAND_LEFT]._iCharges); sprintf(tempstr, "%i Charges", plr[myplr].InvBody[INVLOC_HAND_LEFT]._iCharges);
goto LABEL_54; AddPanelString(tempstr, 1);
break;
} }
} }
} }
@ -1592,10 +1557,6 @@ void CheckBtnUp()
if (gamemenuOff) if (gamemenuOff)
gamemenu_off(); gamemenu_off();
} }
// 484368: using guessed type int FriendlyMode;
// 4B8960: using guessed type int talkflag;
// 4B8968: using guessed type int sbookflag;
// 646D00: using guessed type char qtextflag;
void FreeControlPan() void FreeControlPan()
{ {
@ -1742,55 +1703,37 @@ LABEL_33:
// 4B8CC1: using guessed type char pcursobj; // 4B8CC1: using guessed type char pcursobj;
// 4B8CC2: using guessed type char pcursplr; // 4B8CC2: using guessed type char pcursplr;
void control_print_info_str(int y, char *str, BOOLEAN center, int lines) void control_print_info_str(int y, char *str, BOOL center, int lines)
{ {
int v4; // edi BYTE c;
char *v5; // ebx char *tmp;
unsigned char v6; // cl int screen_x, line, nOffset;
signed int v7; // eax
char *v8; // esi line = 0;
int v9; // eax nOffset = lineoffset[y + 4 * lines + lines];
unsigned char v10; // esi
unsigned char v11; // al
int width; // [esp+18h] [ebp+Ch]
v4 = 0;
v5 = str;
width = lineoffset[y + 4 * lines + lines];
if (center == 1) { if (center == 1) {
v6 = *str; screen_x = 0;
v7 = 0; tmp = str;
v8 = str; while (*tmp) {
if (!*str) c = gbFontTransTbl[(BYTE)*tmp++];
goto LABEL_14; screen_x += fontkern[fontframe[c]] + 1;
do { }
++v8; if (screen_x < 288)
v7 += fontkern[fontframe[gbFontTransTbl[v6]]] + 2; line = (288 - screen_x) >> 1;
v6 = *v8; nOffset += line;
} while (*v8);
if (v7 < 288)
LABEL_14:
v4 = (288 - v7) >> 1;
width += v4;
} }
while (1) { while (*str) {
v11 = *v5; c = gbFontTransTbl[(BYTE)*str++];
if (!*v5) c = fontframe[c];
break; line += fontkern[c] + 2;
++v5; if (c) {
v9 = gbFontTransTbl[v11]; if (line < 288) {
_LOBYTE(v9) = fontframe[v9]; CPrintString(nOffset, c, infoclr);
v10 = (unsigned char)v9;
v4 += fontkern[(unsigned char)v9] + 2;
if ((_BYTE)v9) {
if (v4 < 288) {
CPrintString(width, v10, infoclr);
} }
} }
width += fontkern[v10] + 2; nOffset += fontkern[c] + 2;
} }
} }
// 4B883C: using guessed type int infoclr;
void PrintGameStr(int x, int y, char *str, int color) void PrintGameStr(int x, int y, char *str, int color)
{ {
@ -1798,8 +1741,7 @@ void PrintGameStr(int x, int y, char *str, int color)
int off; int off;
off = PitchTbl[y + 160] + x + 64; off = PitchTbl[y + 160] + x + 64;
while (*str) { while (*str) {
c = gbFontTransTbl[(BYTE)*str]; c = gbFontTransTbl[(BYTE)*str++];
str++;
c = fontframe[c]; c = fontframe[c];
if (c) if (c)
CPrintString(off, c, color); CPrintString(off, c, color);
@ -2032,95 +1974,66 @@ void DrawChr()
ADD_PlrStringXY(143, 332, 174, a4, a5[0]); ADD_PlrStringXY(143, 332, 174, a4, a5[0]);
} }
/**
* @brief Identical to MY_PlrStringXY(x, y, width, pszStr, col, 1)
*/
void ADD_PlrStringXY(int x, int y, int width, char *pszStr, char col) void ADD_PlrStringXY(int x, int y, int width, char *pszStr, char col)
{ {
int v5; // eax BYTE c;
char *v6; // edx char *tmp;
unsigned char v7; // al int nOffset, screen_x, line, widthOffset;
int v8; // esi
int v9; // edi nOffset = x + PitchTbl[y + 160] + 64;
int v10; // ecx widthOffset = width - x + 1;
unsigned char v11; // bl line = 0;
unsigned char v12; // al screen_x = 0;
int v13; // ebx tmp = pszStr;
int widtha; // [esp+Ch] [ebp-4h] while (*tmp) {
int widthb; // [esp+Ch] [ebp-4h] c = gbFontTransTbl[(BYTE)*tmp++];
screen_x += fontkern[fontframe[c]] + 1;
v5 = PitchTbl[y + 160]; }
v6 = pszStr; if (screen_x < widthOffset)
widtha = v5 + x + 64; line = (widthOffset - screen_x) >> 1;
v7 = *pszStr; nOffset += line;
v8 = width - x + 1; while (*pszStr) {
v9 = 0; c = gbFontTransTbl[(BYTE)*pszStr++];
v10 = 0; c = fontframe[c];
if (*pszStr) { line += fontkern[c] + 1;
v11 = *pszStr; if (c) {
do { if (line < widthOffset)
++v6; CPrintString(nOffset, c, col);
v10 += fontkern[fontframe[gbFontTransTbl[v11]]] + 1;
v11 = *v6;
} while (*v6);
}
if (v10 < v8)
v9 = (v8 - v10) >> 1;
widthb = v9 + widtha;
while (v7) {
++pszStr;
v12 = fontframe[gbFontTransTbl[v7]];
v13 = v12;
v9 += fontkern[v12] + 1;
if (v12) {
if (v9 < v8)
CPrintString(widthb, v12, col);
} }
widthb += fontkern[v13] + 1; nOffset += fontkern[c] + 1;
v7 = *pszStr;
} }
} }
void MY_PlrStringXY(int x, int y, int width, char *pszStr, char col, int base) void MY_PlrStringXY(int x, int y, int width, char *pszStr, char col, int base)
{ {
char *v6; // ebx BYTE c;
unsigned char v7; // al char *tmp;
int v8; // edx int nOffset, screen_x, line, widthOffset;
int v9; // esi
char *v10; // edi nOffset = x + PitchTbl[y + 160] + 64;
unsigned char v11; // cl widthOffset = width - x + 1;
unsigned char v12; // al line = 0;
int v13; // edi screen_x = 0;
int widtha; // [esp+Ch] [ebp-4h] tmp = pszStr;
int widthb; // [esp+Ch] [ebp-4h] while (*tmp) {
int v16; // [esp+18h] [ebp+8h] c = gbFontTransTbl[(BYTE)*tmp++];
screen_x += fontkern[fontframe[c]] + base;
v6 = pszStr; }
widtha = PitchTbl[y + 160] + x + 64; if (screen_x < widthOffset)
v7 = *pszStr; line = (widthOffset - screen_x) >> 1;
v8 = 0; nOffset += line;
v9 = width - x + 1; while (*pszStr) {
v16 = 0; c = gbFontTransTbl[(BYTE)*pszStr++];
v10 = pszStr; c = fontframe[c];
if (*pszStr) { line += fontkern[c] + base;
v11 = *pszStr; if (c) {
do { if (line < widthOffset)
++v10; CPrintString(nOffset, c, col);
v8 += base + fontkern[fontframe[gbFontTransTbl[v11]]];
v11 = *v10;
} while (*v10);
}
if (v8 < v9)
v16 = (v9 - v8) >> 1;
widthb = v16 + widtha;
while (v7) {
++v6;
v12 = fontframe[gbFontTransTbl[v7]];
v13 = v12;
v16 += base + fontkern[v12];
if (v12) {
if (v16 < v9)
CPrintString(widthb, v12, col);
} }
widthb += base + fontkern[v13]; nOffset += fontkern[c] + base;
v7 = *v6;
} }
} }
@ -2262,8 +2175,6 @@ int DrawDurIcon4Item(ItemStruct *item, int x, int frame)
case ITYPE_STAFF: case ITYPE_STAFF:
frame = 8; frame = 8;
break; break;
default:
break;
} }
} else { } else {
frame = 1; frame = 1;
@ -2438,7 +2349,7 @@ void DrawSpellBook()
void PrintSBookStr(int x, int y, BOOL cjustflag, char *pszStr, char col) void PrintSBookStr(int x, int y, BOOL cjustflag, char *pszStr, char col)
{ {
BYTE nCel; BYTE c;
char *tmp; char *tmp;
int screen_x, line, width; int screen_x, line, width;
@ -2448,24 +2359,22 @@ void PrintSBookStr(int x, int y, BOOL cjustflag, char *pszStr, char col)
screen_x = 0; screen_x = 0;
tmp = pszStr; tmp = pszStr;
while (*tmp) { while (*tmp) {
nCel = gbFontTransTbl[(BYTE)*tmp]; c = gbFontTransTbl[(BYTE)*tmp++];
tmp++; screen_x += fontkern[fontframe[c]] + 1;
screen_x += fontkern[fontframe[nCel]] + 1;
} }
if (screen_x < 222) if (screen_x < 222)
line = (222 - screen_x) >> 1; line = (222 - screen_x) >> 1;
width += line; width += line;
} }
while (*pszStr) { while (*pszStr) {
nCel = gbFontTransTbl[(BYTE)*pszStr]; c = gbFontTransTbl[(BYTE)*pszStr++];
pszStr++; c = fontframe[c];
nCel = fontframe[nCel]; line += fontkern[c] + 1;
line += fontkern[nCel] + 1; if (c) {
if (nCel) {
if (line <= 222) if (line <= 222)
CPrintString(width, nCel, col); CPrintString(width, c, col);
} }
width += fontkern[nCel] + 1; width += fontkern[c] + 1;
} }
} }

2
Source/control.h

@ -85,7 +85,7 @@ void CheckBtnUp();
void FreeControlPan(); void FreeControlPan();
BOOL control_WriteStringToBuffer(BYTE *str); BOOL control_WriteStringToBuffer(BYTE *str);
void DrawInfoBox(); void DrawInfoBox();
void control_print_info_str(int y, char *str, BOOLEAN center, int lines); void control_print_info_str(int y, char *str, BOOL center, int lines);
void PrintGameStr(int x, int y, char *str, int color); void PrintGameStr(int x, int y, char *str, int color);
void DrawChr(); void DrawChr();
void ADD_PlrStringXY(int x, int y, int width, char *pszStr, char col); void ADD_PlrStringXY(int x, int y, int width, char *pszStr, char col);

6
Source/cursor.cpp

@ -127,7 +127,7 @@ void CheckTown()
|| cursmx == missile[mx]._mix - 2 && cursmy == missile[mx]._miy - 2 || cursmx == missile[mx]._mix - 2 && cursmy == missile[mx]._miy - 2
|| cursmx == missile[mx]._mix - 1 && cursmy == missile[mx]._miy - 2 || cursmx == missile[mx]._mix - 1 && cursmy == missile[mx]._miy - 2
|| cursmx == missile[mx]._mix && cursmy == missile[mx]._miy) { || cursmx == missile[mx]._mix && cursmy == missile[mx]._miy) {
trigflag = 1; trigflag = TRUE;
ClearPanel(); ClearPanel();
strcpy(infostr, "Town Portal"); strcpy(infostr, "Town Portal");
sprintf(tempstr, "from %s", plr[missile[mx]._misource]._pName); sprintf(tempstr, "from %s", plr[missile[mx]._misource]._pName);
@ -153,7 +153,7 @@ void CheckRportal()
|| cursmx == missile[mx]._mix - 2 && cursmy == missile[mx]._miy - 2 || cursmx == missile[mx]._mix - 2 && cursmy == missile[mx]._miy - 2
|| cursmx == missile[mx]._mix - 1 && cursmy == missile[mx]._miy - 2 || cursmx == missile[mx]._mix - 1 && cursmy == missile[mx]._miy - 2
|| cursmx == missile[mx]._mix && cursmy == missile[mx]._miy) { || cursmx == missile[mx]._mix && cursmy == missile[mx]._miy) {
trigflag = 1; trigflag = TRUE;
ClearPanel(); ClearPanel();
strcpy(infostr, "Portal to"); strcpy(infostr, "Portal to");
if (!setlevel) if (!setlevel)
@ -261,7 +261,7 @@ void CheckCursMove()
pcursplr = -1; pcursplr = -1;
uitemflag = 0; uitemflag = 0;
panelflag = 0; panelflag = 0;
trigflag = 0; trigflag = FALSE;
if(plr[myplr]._pInvincible) { if(plr[myplr]._pInvincible) {
return; return;

1
Source/list.h

@ -151,6 +151,7 @@ void TList<T>::Insert(T *node, InsertPos pos, T *ref)
break; break;
case BEFORE: case BEFORE:
i->InsertBefore(node, reflink); i->InsertBefore(node, reflink);
break;
} }
} }

18
Source/stores.cpp

@ -1818,19 +1818,19 @@ void S_SmithEnter()
gossipstart = QUEST_GRISWOLD2; gossipstart = QUEST_GRISWOLD2;
gossipend = QUEST_GRISWOLD13; gossipend = QUEST_GRISWOLD13;
StartStore(STORE_GOSSIP); StartStore(STORE_GOSSIP);
return; break;
case 12: case 12:
StartStore(STORE_SBUY); StartStore(STORE_SBUY);
return; break;
case 14: case 14:
StartStore(STORE_SPBUY); StartStore(STORE_SPBUY);
return; break;
case 16: case 16:
StartStore(STORE_SSELL); StartStore(STORE_SSELL);
return; break;
case 18: case 18:
StartStore(STORE_SREPAIR); StartStore(STORE_SREPAIR);
return; break;
case 20: case 20:
stextflag = STORE_NONE; stextflag = STORE_NONE;
break; break;
@ -2536,20 +2536,20 @@ void S_HealerEnter()
gossipstart = QUEST_PEPIN2; gossipstart = QUEST_PEPIN2;
gossipend = QUEST_PEPIN11; gossipend = QUEST_PEPIN11;
StartStore(STORE_GOSSIP); StartStore(STORE_GOSSIP);
return; break;
case 14: case 14:
if (plr[myplr]._pHitPoints != plr[myplr]._pMaxHP) if (plr[myplr]._pHitPoints != plr[myplr]._pMaxHP)
PlaySFX(IS_CAST8); PlaySFX(IS_CAST8);
drawhpflag = TRUE; drawhpflag = TRUE;
plr[myplr]._pHitPoints = plr[myplr]._pMaxHP; plr[myplr]._pHitPoints = plr[myplr]._pMaxHP;
plr[myplr]._pHPBase = plr[myplr]._pMaxHPBase; plr[myplr]._pHPBase = plr[myplr]._pMaxHPBase;
return; break;
case 16: case 16:
StartStore(STORE_HBUY); StartStore(STORE_HBUY);
return; break;
case 18: case 18:
stextflag = STORE_NONE; stextflag = STORE_NONE;
return; break;
} }
} }

4
Source/trigs.cpp

@ -101,8 +101,8 @@ void InitTownTriggers()
numtrigs = 1; numtrigs = 1;
if(gbMaxPlayers == 4) { if(gbMaxPlayers == MAX_PLRS) {
for(i = 0; i < 3; i++) { for(i = 0; i < sizeof(townwarps) / sizeof(townwarps[0]); i++) {
townwarps[i] = TRUE; townwarps[i] = TRUE;
} }
trigs[1]._tx = 49; trigs[1]._tx = 49;

Loading…
Cancel
Save