Browse Source

StartQuestlog bin exact. Also, fix type of questlog

pull/88/head
Robin Eklind 7 years ago committed by Anders Jenbo
parent
commit
6d49faba3e
  1. 1
      Source/automap.cpp
  2. 6
      Source/control.cpp
  3. 1
      Source/cursor.cpp
  4. 11
      Source/diablo.cpp
  5. 1
      Source/items.cpp
  6. 3
      Source/minitext.cpp
  7. 45
      Source/quests.cpp
  8. 2
      Source/quests.h
  9. 3
      Source/scrollrt.cpp
  10. 3
      Source/stores.cpp
  11. 3
      Source/town.cpp

1
Source/automap.cpp

@ -248,7 +248,6 @@ void DrawAutomap()
DrawAutomapGame(); DrawAutomapGame();
} }
// 4B8968: using guessed type int sbookflag; // 4B8968: using guessed type int sbookflag;
// 69BD04: using guessed type int questlog;
// 69CF0C: using guessed type int gpBufEnd; // 69CF0C: using guessed type int gpBufEnd;
void DrawAutomapType(int sx, int sy, WORD automap_type) void DrawAutomapType(int sx, int sy, WORD automap_type)

6
Source/control.cpp

@ -1559,7 +1559,7 @@ void CheckBtnUp()
if (MouseY >= PanBtnPos[i][1] && MouseY <= PanBtnPos[i][1] + PanBtnPos[i][3]) { if (MouseY >= PanBtnPos[i][1] && MouseY <= PanBtnPos[i][1] + PanBtnPos[i][3]) {
switch (i) { switch (i) {
case PANBTN_CHARINFO: case PANBTN_CHARINFO:
questlog = 0; questlog = FALSE;
chrflag = chrflag == 0; chrflag = chrflag == 0;
break; break;
case PANBTN_QLOG: case PANBTN_QLOG:
@ -1567,7 +1567,7 @@ void CheckBtnUp()
if (!questlog) if (!questlog)
StartQuestlog(); StartQuestlog();
else else
questlog = 0; questlog = FALSE;
break; break;
case PANBTN_AUTOMAP: case PANBTN_AUTOMAP:
DoAutoMap(); DoAutoMap();
@ -1618,7 +1618,6 @@ void CheckBtnUp()
// 4B8968: using guessed type int sbookflag; // 4B8968: using guessed type int sbookflag;
// 4B8C90: using guessed type int panbtndown; // 4B8C90: using guessed type int panbtndown;
// 646D00: using guessed type char qtextflag; // 646D00: using guessed type char qtextflag;
// 69BD04: using guessed type int questlog;
void FreeControlPan() void FreeControlPan()
{ {
@ -2316,7 +2315,6 @@ void DrawDurIcon()
} }
} }
// 4B8968: using guessed type int sbookflag; // 4B8968: using guessed type int sbookflag;
// 69BD04: using guessed type int questlog;
int DrawDurIcon4Item(ItemStruct *pItem, int x, int c) int DrawDurIcon4Item(ItemStruct *pItem, int x, int c)
{ {

1
Source/cursor.cpp

@ -691,4 +691,3 @@ void CheckCursMove()
// 4B8CCC: using guessed type int dword_4B8CCC; // 4B8CCC: using guessed type int dword_4B8CCC;
// 52569C: using guessed type int zoomflag; // 52569C: using guessed type int zoomflag;
// 52575C: using guessed type int doomflag; // 52575C: using guessed type int doomflag;
// 69BD04: using guessed type int questlog;

11
Source/diablo.cpp

@ -822,7 +822,6 @@ BOOL LeftMouseDown(int wParam)
// 525740: using guessed type int PauseMode; // 525740: using guessed type int PauseMode;
// 52575C: using guessed type int doomflag; // 52575C: using guessed type int doomflag;
// 646D00: using guessed type char qtextflag; // 646D00: using guessed type char qtextflag;
// 69BD04: using guessed type int questlog;
// 6AA705: using guessed type char stextflag; // 6AA705: using guessed type char stextflag;
BOOL LeftMouseCmd(BOOL bShift) BOOL LeftMouseCmd(BOOL bShift)
@ -1085,7 +1084,7 @@ void PressKey(int vkey)
qtextflag = 0; qtextflag = 0;
sfx_stop(); sfx_stop();
} }
questlog = 0; questlog = FALSE;
automapflag = 0; automapflag = 0;
msgdelay = 0; msgdelay = 0;
gamemenu_off(); gamemenu_off();
@ -1203,7 +1202,7 @@ void PressKey(int vkey)
qtextflag = 0; qtextflag = 0;
sfx_stop(); sfx_stop();
} }
questlog = 0; questlog = FALSE;
automapflag = 0; automapflag = 0;
msgdelay = 0; msgdelay = 0;
gamemenu_off(); gamemenu_off();
@ -1216,7 +1215,6 @@ void PressKey(int vkey)
// 525740: using guessed type int PauseMode; // 525740: using guessed type int PauseMode;
// 52B9F0: using guessed type char msgdelay; // 52B9F0: using guessed type char msgdelay;
// 646D00: using guessed type char qtextflag; // 646D00: using guessed type char qtextflag;
// 69BD04: using guessed type int questlog;
// 6AA705: using guessed type char stextflag; // 6AA705: using guessed type char stextflag;
void diablo_pause_game() void diablo_pause_game()
@ -1285,7 +1283,7 @@ void PressChar(int vkey)
case 'C': case 'C':
case 'c': case 'c':
if(!stextflag) { if(!stextflag) {
questlog = 0; questlog = FALSE;
chrflag = chrflag == 0; chrflag = chrflag == 0;
if(!chrflag || invflag) { if(!chrflag || invflag) {
if(MouseX > 160 && MouseY < 352) { if(MouseX > 160 && MouseY < 352) {
@ -1305,7 +1303,7 @@ void PressChar(int vkey)
if(!questlog) { if(!questlog) {
StartQuestlog(); StartQuestlog();
} else { } else {
questlog = 0; questlog = FALSE;
} }
} }
break; break;
@ -1505,7 +1503,6 @@ void PressChar(int vkey)
// 52569C: using guessed type int zoomflag; // 52569C: using guessed type int zoomflag;
// 525740: using guessed type int PauseMode; // 525740: using guessed type int PauseMode;
// 52575C: using guessed type int doomflag; // 52575C: using guessed type int doomflag;
// 69BD04: using guessed type int questlog;
// 6AA705: using guessed type char stextflag; // 6AA705: using guessed type char stextflag;
void LoadLvlGFX() void LoadLvlGFX()

1
Source/items.cpp

@ -3777,7 +3777,6 @@ void DrawUniqueInfo()
} }
} }
} }
// 69BD04: using guessed type int questlog;
void PrintItemMisc(ItemStruct *x) void PrintItemMisc(ItemStruct *x)
{ {

3
Source/minitext.cpp

@ -65,7 +65,7 @@ void InitQuestText()
void InitQTextMsg(int m) void InitQTextMsg(int m)
{ {
if (alltext[m].scrlltxt) { if (alltext[m].scrlltxt) {
questlog = 0; questlog = FALSE;
qtextptr = alltext[m].txtstr; qtextptr = alltext[m].txtstr;
qtextflag = TRUE; qtextflag = TRUE;
qtexty = 500; qtexty = 500;
@ -80,7 +80,6 @@ void InitQTextMsg(int m)
// 646D00: using guessed type char qtextflag; // 646D00: using guessed type char qtextflag;
// 646D04: using guessed type int scrolltexty; // 646D04: using guessed type int scrolltexty;
// 646D08: using guessed type int sgLastScroll; // 646D08: using guessed type int sgLastScroll;
// 69BD04: using guessed type int questlog;
void DrawQTextBack() void DrawQTextBack()
{ {

45
Source/quests.cpp

@ -3,7 +3,7 @@
#include "../types.h" #include "../types.h"
int qtopline; // idb int qtopline; // idb
int questlog; // weak BOOL questlog;
void *pQLogCel; void *pQLogCel;
QuestStruct quests[MAXQUESTS]; QuestStruct quests[MAXQUESTS];
int qline; // weak int qline; // weak
@ -70,7 +70,7 @@ void InitQuests()
} }
initiatedQuests = 0; initiatedQuests = 0;
questlog = 0; questlog = FALSE;
ALLQUESTS = 1; ALLQUESTS = 1;
WaterDone = 0; WaterDone = 0;
@ -127,7 +127,6 @@ void InitQuests()
quests[QTYPE_VB]._qvar1 = 2; quests[QTYPE_VB]._qvar1 = 2;
} }
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;
// 69BD04: using guessed type int questlog;
// 69BE90: using guessed type int qline; // 69BE90: using guessed type int qline;
void CheckQuests() void CheckQuests()
@ -860,34 +859,25 @@ void DrawQuestLog()
void StartQuestlog() void StartQuestlog()
{ {
signed int v0; // eax unsigned int i;
int v1; // edx
unsigned int v2; // ecx
int v3; // ecx
v0 = 0;
v1 = 0;
numqlines = 0; numqlines = 0;
v2 = 0; for (i = 0; i < MAXQUESTS; i++) {
do { if (quests[i]._qactive == 2 && quests[i]._qlog) {
if (quests[v2]._qactive == 2 && quests[v2]._qlog) qlist[numqlines++] = i;
qlist[v0++] = v1; }
++v2; }
++v1; if (numqlines > 5) {
} while (v2 < MAXQUESTS); qtopline = 5 - (numqlines >> 1);
numqlines = v0; } else {
if (v0 <= 5) qtopline = 8;
v3 = 8; }
else
v3 = 5 - (v0 >> 1);
qtopline = v3;
qline = 22; qline = 22;
if (v0) if (numqlines != 0)
qline = v3; qline = qtopline;
questlog = 1; questlog = TRUE;
ALLQUESTS = 1; ALLQUESTS = 1;
} }
// 69BD04: using guessed type int questlog;
// 69BE90: using guessed type int qline; // 69BE90: using guessed type int qline;
// 69BED4: using guessed type int numqlines; // 69BED4: using guessed type int numqlines;
@ -928,9 +918,8 @@ void QuestlogEnter()
PlaySFX(IS_TITLSLCT); PlaySFX(IS_TITLSLCT);
if (numqlines && qline != 22) if (numqlines && qline != 22)
InitQTextMsg((unsigned char)quests[qlist[(qline - qtopline) >> 1]]._qmsg); InitQTextMsg((unsigned char)quests[qlist[(qline - qtopline) >> 1]]._qmsg);
questlog = 0; questlog = FALSE;
} }
// 69BD04: using guessed type int questlog;
// 69BE90: using guessed type int qline; // 69BE90: using guessed type int qline;
// 69BED4: using guessed type int numqlines; // 69BED4: using guessed type int numqlines;

2
Source/quests.h

@ -3,7 +3,7 @@
#define __QUESTS_H__ #define __QUESTS_H__
extern int qtopline; // idb extern int qtopline; // idb
extern int questlog; // weak extern BOOL questlog;
extern void *pQLogCel; extern void *pQLogCel;
extern QuestStruct quests[MAXQUESTS]; extern QuestStruct quests[MAXQUESTS];
extern int qline; // weak extern int qline; // weak

3
Source/scrollrt.cpp

@ -431,7 +431,6 @@ void DrawView(int StartX, int StartY)
// 525740: using guessed type int PauseMode; // 525740: using guessed type int PauseMode;
// 52B9F1: using guessed type char msgflag; // 52B9F1: using guessed type char msgflag;
// 646D00: using guessed type char qtextflag; // 646D00: using guessed type char qtextflag;
// 69BD04: using guessed type int questlog;
void DrawGame(int x, int y) void DrawGame(int x, int y)
{ {
@ -539,7 +538,6 @@ void DrawGame(int x, int y)
// 5C2FFC: using guessed type int dword_5C2FFC; // 5C2FFC: using guessed type int dword_5C2FFC;
// 5C3000: using guessed type int scr_pix_width; // 5C3000: using guessed type int scr_pix_width;
// 5C3004: using guessed type int scr_pix_height; // 5C3004: using guessed type int scr_pix_height;
// 69BD04: using guessed type int questlog;
// 69CF0C: using guessed type int gpBufEnd; // 69CF0C: using guessed type int gpBufEnd;
// 69CF20: using guessed type char arch_draw_type; // 69CF20: using guessed type char arch_draw_type;
@ -2192,7 +2190,6 @@ void DrawZoom(int x, int y)
// 5C2FFC: using guessed type int dword_5C2FFC; // 5C2FFC: using guessed type int dword_5C2FFC;
// 5C3000: using guessed type int scr_pix_width; // 5C3000: using guessed type int scr_pix_width;
// 5C3004: using guessed type int scr_pix_height; // 5C3004: using guessed type int scr_pix_height;
// 69BD04: using guessed type int questlog;
// 69CF0C: using guessed type int gpBufEnd; // 69CF0C: using guessed type int gpBufEnd;
// 69CF20: using guessed type char arch_draw_type; // 69CF20: using guessed type char arch_draw_type;

3
Source/stores.cpp

@ -1784,7 +1784,7 @@ void StartStore(char s)
sbookflag = 0; sbookflag = 0;
invflag = 0; invflag = 0;
chrflag = 0; chrflag = 0;
questlog = 0; questlog = FALSE;
dropGoldFlag = FALSE; dropGoldFlag = FALSE;
ClearSText(0, 24); ClearSText(0, 24);
ReleaseStoreBtn(); ReleaseStoreBtn();
@ -1876,7 +1876,6 @@ void StartStore(char s)
} }
} }
// 4B8968: using guessed type int sbookflag; // 4B8968: using guessed type int sbookflag;
// 69BD04: using guessed type int questlog;
// 69F10C: using guessed type int storenumh; // 69F10C: using guessed type int storenumh;
// 6A8A28: using guessed type int stextsel; // 6A8A28: using guessed type int stextsel;
// 6AA705: using guessed type char stextflag; // 6AA705: using guessed type char stextflag;

3
Source/town.cpp

@ -826,7 +826,6 @@ void T_DrawGame(int x, int y)
// 5C2FFC: using guessed type int dword_5C2FFC; // 5C2FFC: using guessed type int dword_5C2FFC;
// 5C3000: using guessed type int scr_pix_width; // 5C3000: using guessed type int scr_pix_width;
// 5C3004: using guessed type int scr_pix_height; // 5C3004: using guessed type int scr_pix_height;
// 69BD04: using guessed type int questlog;
// 69CF0C: using guessed type int gpBufEnd; // 69CF0C: using guessed type int gpBufEnd;
void T_DrawZoom(int x, int y) void T_DrawZoom(int x, int y)
@ -1001,7 +1000,6 @@ void T_DrawZoom(int x, int y)
// 5C2FFC: using guessed type int dword_5C2FFC; // 5C2FFC: using guessed type int dword_5C2FFC;
// 5C3000: using guessed type int scr_pix_width; // 5C3000: using guessed type int scr_pix_width;
// 5C3004: using guessed type int scr_pix_height; // 5C3004: using guessed type int scr_pix_height;
// 69BD04: using guessed type int questlog;
// 69CF0C: using guessed type int gpBufEnd; // 69CF0C: using guessed type int gpBufEnd;
void T_DrawView(int StartX, int StartY) void T_DrawView(int StartX, int StartY)
@ -1056,7 +1054,6 @@ void T_DrawView(int StartX, int StartY)
// 525740: using guessed type int PauseMode; // 525740: using guessed type int PauseMode;
// 52B9F1: using guessed type char msgflag; // 52B9F1: using guessed type char msgflag;
// 646D00: using guessed type char qtextflag; // 646D00: using guessed type char qtextflag;
// 69BD04: using guessed type int questlog;
// 69BEF8: using guessed type int light_table_index; // 69BEF8: using guessed type int light_table_index;
// 69CF94: using guessed type int cel_transparency_active; // 69CF94: using guessed type int cel_transparency_active;
// 6AA705: using guessed type char stextflag; // 6AA705: using guessed type char stextflag;

Loading…
Cancel
Save