Browse Source

Merge branch 'master' of github.com:diasurgical/devilution

pull/36/head
Anders Jenbo 7 years ago
parent
commit
3d0cd681df
  1. 2
      .travis.yml
  2. 2
      MakefileVC
  3. 1042
      Source/missiles.cpp
  4. 4
      Source/msg.cpp
  5. 2
      Source/pack.cpp
  6. 4
      Source/player.cpp
  7. 124
      Source/quests.cpp
  8. 16
      Source/scrollrt.cpp
  9. 4
      Source/scrollrt.h
  10. 21
      Source/sound.cpp
  11. 35
      Source/stores.cpp
  12. 2
      Source/stores.h
  13. 6
      Source/town.cpp
  14. 2
      Source/wave.cpp
  15. 2
      Source/wave.h
  16. 8
      structs.h

2
.travis.yml

@ -2,7 +2,7 @@ language: cpp
os: os:
- osx - osx
addons: addons:
homebrew: homebrew:
packages: packages:

2
MakefileVC

@ -36,7 +36,7 @@ else
VC6_LINK = wine $(VC6_BIN_DIR)/link.exe VC6_LINK = wine $(VC6_BIN_DIR)/link.exe
endif endif
CFLAGS=/nologo /c /TC /GX /W3 /O1 /I $(VC6_INC_DIR) /FD /MT /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fp"Diablo.pch" /YX /Gm /Zi CFLAGS=/nologo /c /TC /GX /W3 /O1 /I $(VC6_INC_DIR) /FD /MT /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /Fp"Diablo.pch" /YX /Gm /Zi /FA
LINKFLAGS=/nologo /subsystem:windows /machine:I386 /incremental:no LINKFLAGS=/nologo /subsystem:windows /machine:I386 /incremental:no
ifeq ($(MAKE_BUILD),pdb) ifeq ($(MAKE_BUILD),pdb)

1042
Source/missiles.cpp

File diff suppressed because it is too large Load Diff

4
Source/msg.cpp

@ -2480,7 +2480,7 @@ int __fastcall On_NOVA(TCmdLoc *pCmd, int pnum)
int __fastcall On_SETSHIELD(TCmd *pCmd, int pnum) int __fastcall On_SETSHIELD(TCmd *pCmd, int pnum)
{ {
if (gbBufferMsgs != 1) if (gbBufferMsgs != 1)
plr[pnum].pManaShield = 1; plr[pnum].pManaShield = TRUE;
return sizeof(*pCmd); return sizeof(*pCmd);
} }
@ -2488,7 +2488,7 @@ int __fastcall On_SETSHIELD(TCmd *pCmd, int pnum)
int __fastcall On_REMSHIELD(TCmd *pCmd, int pnum) int __fastcall On_REMSHIELD(TCmd *pCmd, int pnum)
{ {
if (gbBufferMsgs != 1) if (gbBufferMsgs != 1)
plr[pnum].pManaShield = 0; plr[pnum].pManaShield = FALSE;
return sizeof(*pCmd); return sizeof(*pCmd);
} }

2
Source/pack.cpp

@ -65,7 +65,7 @@ void __fastcall PackPlayer(PkPlayerStruct *pPack, int pnum, BOOL manashield)
if (gbMaxPlayers == 1 || manashield) if (gbMaxPlayers == 1 || manashield)
pPack->pManaShield = pPlayer->pManaShield; pPack->pManaShield = pPlayer->pManaShield;
else else
pPack->pManaShield = 0; pPack->pManaShield = FALSE;
} }
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;

4
Source/player.cpp

@ -665,7 +665,7 @@ void __fastcall CreatePlayer(int pnum, char c)
plr[pnum].pTownWarps = 0; plr[pnum].pTownWarps = 0;
plr[pnum].pLvlLoad = 0; plr[pnum].pLvlLoad = 0;
plr[pnum].pBattleNet = 0; plr[pnum].pBattleNet = 0;
plr[pnum].pManaShield = 0; plr[pnum].pManaShield = FALSE;
InitDungMsgs(pnum); InitDungMsgs(pnum);
CreatePlrItems(pnum); CreatePlrItems(pnum);
@ -841,7 +841,7 @@ void __fastcall InitPlayer(int pnum, BOOL FirstTime)
} else { } else {
plr[pnum]._pwtype = WT_MELEE; plr[pnum]._pwtype = WT_MELEE;
} }
plr[pnum].pManaShield = 0; plr[pnum].pManaShield = FALSE;
} }
if (plr[pnum].plrlevel == currlevel || leveldebug) { if (plr[pnum].plrlevel == currlevel || leveldebug) {

124
Source/quests.cpp

@ -53,96 +53,66 @@ int QuestGroup4[2] = { QTYPE_VEIL, QTYPE_WARLRD };
void __cdecl InitQuests() void __cdecl InitQuests()
{ {
char v0; // dl int initiatedQuests;
unsigned char *v1; // esi int i;
unsigned char *v2; // eax unsigned int z;
unsigned char *v3; // ecx
int *v4; // eax
int v5; // ebp
unsigned int v6; // edi
//int v7; // eax
unsigned char v8; // al
unsigned char v9; // al
char v10; // al
int v13; // eax
int v15; // eax
int v17; // eax
int v19; // eax
char v20; // [esp+8h] [ebp-4h]
v0 = gbMaxPlayers;
v1 = &quests[0]._qactive;
if (gbMaxPlayers == 1) { if (gbMaxPlayers == 1) {
v2 = &quests[0]._qactive; for (i = 0; i < MAXQUESTS; i++) {
do { quests[i]._qactive = 0;
*v2 = 0; }
v2 += 24;
} while ((signed int)v2 < (signed int)&quests[MAXQUESTS]._qactive);
} else { } else {
v3 = &quests[0]._qactive; for (i = 0; i < MAXQUESTS; i++) {
v4 = &questlist[0]._qflags; if (!(questlist[i]._qflags & 1)) {
do { quests[i]._qactive = 0;
if (!(*(_BYTE *)v4 & 1)) }
*v3 = 0; }
v4 += 5;
v3 += 24;
} while ((signed int)v4 < (signed int)&questlist[MAXQUESTS]._qflags);
} }
v5 = 0;
initiatedQuests = 0;
questlog = 0; questlog = 0;
ALLQUESTS = 1; ALLQUESTS = 1;
WaterDone = 0; WaterDone = 0;
v20 = 0;
v6 = 0; for (z = 0; z < MAXQUESTS; z++) {
do { if (gbMaxPlayers <= 1 || questlist[z]._qflags & 1) {
if ((unsigned char)v0 <= 1u || questlist[v6]._qflags & 1) { quests[z]._qtype = questlist[z]._qdtype;
*(v1 - 1) = questlist[v6]._qdtype; if (gbMaxPlayers > 1) {
if ((unsigned char)v0 <= 1u) { quests[z]._qlevel = questlist[z]._qdmultlvl;
v8 = questlist[v6]._qdlvl; if (!delta_quest_inited(initiatedQuests)) {
*v1 = 1; quests[z]._qactive = 1;
*(v1 - 2) = v8; quests[z]._qvar1 = 0;
v1[13] = 0; quests[z]._qlog = 0;
*(_DWORD *)(v1 + 18) = 0;
} else {
*(v1 - 2) = questlist[v6]._qdmultlvl;
//_LOBYTE(v7) = delta_quest_inited(v5);
if (!delta_quest_inited(v5)) {
*v1 = 1;
v1[13] = 0;
*(_DWORD *)(v1 + 18) = 0;
} }
v0 = gbMaxPlayers; ++initiatedQuests;
++v5; } else {
quests[z]._qactive = 1;
quests[z]._qlevel = questlist[z]._qdlvl;
quests[z]._qvar1 = 0;
quests[z]._qlog = 0;
} }
v9 = questlist[v6]._qslvl;
*(_DWORD *)(v1 + 2) = 0; quests[z]._qtx = 0;
v1[10] = v9; quests[z]._qslvl = questlist[z]._qslvl;
v1[11] = v20; quests[z]._qidx = z;
v1[1] = questlist[v6]._qlvlt; quests[z]._qlvltype = questlist[z]._qlvlt;
v10 = questlist[v6]._qdmsg; quests[z]._qty = 0;
*(_DWORD *)(v1 + 6) = 0; quests[z]._qvar2 = 0;
v1[14] = 0; quests[z]._qmsg = questlist[z]._qdmsg;
v1[12] = v10;
} }
++v20; }
++v6;
v1 += 24; if (gbMaxPlayers == 1) {
} while (v6 < MAXQUESTS);
if (v0 == 1) {
SetRndSeed(glSeedTbl[15]); SetRndSeed(glSeedTbl[15]);
if (random(0, 2)) if (random(0, 2))
quests[QTYPE_PW]._qactive = 0; quests[QTYPE_PW]._qactive = 0;
else else
quests[QTYPE_KING]._qactive = 0; quests[QTYPE_KING]._qactive = 0;
v13 = random(0, 3);
quests[QuestGroup1[v13]]._qactive = 0; quests[QuestGroup1[random(0, sizeof(QuestGroup1) / sizeof(int))]]._qactive = 0;
v15 = random(0, 3); quests[QuestGroup2[random(0, sizeof(QuestGroup2) / sizeof(int))]]._qactive = 0;
quests[QuestGroup2[v15]]._qactive = 0; quests[QuestGroup3[random(0, sizeof(QuestGroup3) / sizeof(int))]]._qactive = 0;
v17 = random(0, 3); quests[QuestGroup4[random(0, sizeof(QuestGroup4) / sizeof(int))]]._qactive = 0;
quests[QuestGroup3[v17]]._qactive = 0;
v19 = random(0, 2);
v0 = gbMaxPlayers;
quests[QuestGroup4[v19]]._qactive = 0;
} }
#ifdef _DEBUG #ifdef _DEBUG
if (questdebug != -1) if (questdebug != -1)
@ -153,7 +123,7 @@ void __cdecl InitQuests()
if (!quests[QTYPE_INFRA]._qactive) if (!quests[QTYPE_INFRA]._qactive)
quests[QTYPE_INFRA]._qvar2 = 2; quests[QTYPE_INFRA]._qvar2 = 2;
quests[QTYPE_BOL]._qvar1 = 1; quests[QTYPE_BOL]._qvar1 = 1;
if (v0 != 1) if (gbMaxPlayers != 1)
quests[QTYPE_VB]._qvar1 = 2; quests[QTYPE_VB]._qvar1 = 2;
} }
// 679660: using guessed type char gbMaxPlayers; // 679660: using guessed type char gbMaxPlayers;

16
Source/scrollrt.cpp

@ -67,7 +67,7 @@ void __cdecl ClearCursor() // CODE_FIX: this was supposed to be in cursor.cpp
sgdwCursWdtOld = 0; sgdwCursWdtOld = 0;
} }
void __fastcall DrawMissile(int x, int y, int sx, int sy, int a5, int a6, int del_flag) void __fastcall DrawMissile(int x, int y, int sx, int sy, int a5, int a6, BOOL del_flag)
{ {
int v7; // ebx int v7; // ebx
char v8; // al char v8; // al
@ -151,7 +151,7 @@ void __fastcall DrawMissile(int x, int y, int sx, int sy, int a5, int a6, int de
} }
} }
void __fastcall DrawClippedMissile(int x, int y, int sx, int sy, int a5, int a6, int a7) void __fastcall DrawClippedMissile(int x, int y, int sx, int sy, int a5, int a6, BOOL a7)
{ {
int v7; // ebx int v7; // ebx
char v8; // al char v8; // al
@ -880,7 +880,7 @@ void __fastcall scrollrt_draw_clipped_dungeon(char *a1, int sx, int sy, int a4,
if (visiondebug && v50 & DFLAG_LIT) if (visiondebug && v50 & DFLAG_LIT)
Cel2DecodeHdrOnly(dst_buf, (char *)pSquareCel, 1, 64, 0, 8); Cel2DecodeHdrOnly(dst_buf, (char *)pSquareCel, 1, 64, 0, 8);
if (MissilePreFlag && v50 & DFLAG_MISSILE) if (MissilePreFlag && v50 & DFLAG_MISSILE)
DrawClippedMissile(a1a, sy, a4, a5, 0, 8, 1); DrawClippedMissile(a1a, sy, a4, a5, 0, 8, TRUE);
if (light_table_index < lightmax) { if (light_table_index < lightmax) {
if (v7) { if (v7) {
v11 = &dead[(v7 & 0x1F) - 1]; v11 = &dead[(v7 & 0x1F) - 1];
@ -1010,7 +1010,7 @@ void __fastcall scrollrt_draw_clipped_dungeon(char *a1, int sx, int sy, int a4,
} }
} }
if (v50 & 1) if (v50 & 1)
DrawClippedMissile(a1a, sy, a4, a5, 0, 8, 0); DrawClippedMissile(a1a, sy, a4, a5, 0, 8, FALSE);
if (v47 && light_table_index < lightmax) if (v47 && light_table_index < lightmax)
DrawClippedObject(a1a, sy, a4, a5, 0, 0, 8); DrawClippedObject(a1a, sy, a4, a5, 0, 0, 8);
if (v49) { if (v49) {
@ -1476,7 +1476,7 @@ void __fastcall scrollrt_draw_clipped_dungeon_2(char *buffer, int x, int y, int
Cel2DecodeHdrOnly(dst_buf, (char *)pSquareCel, 1, 64, a5, 8); Cel2DecodeHdrOnly(dst_buf, (char *)pSquareCel, 1, 64, a5, 8);
if (MissilePreFlag && v53 & DFLAG_MISSILE) { if (MissilePreFlag && v53 & DFLAG_MISSILE) {
v13 = sx; v13 = sx;
DrawClippedMissile(a1, y, sx, sy, a5, 8, 1); DrawClippedMissile(a1, y, sx, sy, a5, 8, TRUE);
} else { } else {
v13 = sx; v13 = sx;
} }
@ -1611,7 +1611,7 @@ void __fastcall scrollrt_draw_clipped_dungeon_2(char *buffer, int x, int y, int
} }
} }
if (v53 & DFLAG_MISSILE) if (v53 & DFLAG_MISSILE)
DrawClippedMissile(a1, y, v13, sy, a5, 8, 0); DrawClippedMissile(a1, y, v13, sy, a5, 8, FALSE);
if (v50 && light_table_index < lightmax) if (v50 && light_table_index < lightmax)
DrawClippedObject(a1, y, v13, sy, 0, a5, 8); DrawClippedObject(a1, y, v13, sy, 0, a5, 8);
if (v52) { if (v52) {
@ -2019,7 +2019,7 @@ void __fastcall scrollrt_draw_dungeon(char *buffer, int x, int y, int a4, int a5
if (visiondebug && v52 & DFLAG_LIT) if (visiondebug && v52 & DFLAG_LIT)
CelDecodeHdrOnly(dst_buf, (char *)pSquareCel, 1, 64, 0, a5); CelDecodeHdrOnly(dst_buf, (char *)pSquareCel, 1, 64, 0, a5);
if (MissilePreFlag && v52 & DFLAG_MISSILE) if (MissilePreFlag && v52 & DFLAG_MISSILE)
DrawMissile(xa, y, sx, sy, 0, a5, 1); DrawMissile(xa, y, sx, sy, 0, a5, TRUE);
if (light_table_index < lightmax) { if (light_table_index < lightmax) {
if (v9) { if (v9) {
v13 = &dead[(v9 & 0x1F) - 1]; v13 = &dead[(v9 & 0x1F) - 1];
@ -2149,7 +2149,7 @@ void __fastcall scrollrt_draw_dungeon(char *buffer, int x, int y, int a4, int a5
} }
} }
if (v52 & DFLAG_MISSILE) if (v52 & DFLAG_MISSILE)
DrawMissile(xa, y, sx, sy, 0, a5, 0); DrawMissile(xa, y, sx, sy, 0, a5, FALSE);
if (v49 && light_table_index < lightmax) if (v49 && light_table_index < lightmax)
DrawObject(xa, y, sx, sy, 0, 0, a5); DrawObject(xa, y, sx, sy, 0, 0, a5);
if (v51) { if (v51) {

4
Source/scrollrt.h

@ -14,8 +14,8 @@ extern int(__fastcall *DrawPlrProc)(int player_num, int x, int y, int screen_x,
extern int draw_monster_num; // weak extern int draw_monster_num; // weak
void __cdecl ClearCursor(); void __cdecl ClearCursor();
void __fastcall DrawMissile(int x, int y, int sx, int sy, int a5, int a6, int del_flag); void __fastcall DrawMissile(int x, int y, int sx, int sy, int a5, int a6, BOOL del_flag);
void __fastcall DrawClippedMissile(int x, int y, int sx, int sy, int a5, int a6, int a7); void __fastcall DrawClippedMissile(int x, int y, int sx, int sy, int a5, int a6, BOOL a7);
void __fastcall DrawDeadPlayer(int x, int y, int sx, int sy, int a5, int a6, BOOLEAN clipped); void __fastcall DrawDeadPlayer(int x, int y, int sx, int sy, int a5, int a6, BOOLEAN clipped);
void __fastcall DrawPlayer(int pnum, int x, int y, int px, int py, unsigned char *animdata, int animframe, int animwidth, int a9, int a10); void __fastcall DrawPlayer(int pnum, int x, int y, int px, int py, unsigned char *animdata, int animframe, int animwidth, int a9, int a10);
void __fastcall DrawClippedPlayer(int pnum, int x, int y, int px, int py, unsigned char *animdata, int animframe, int animwidth, int a9, int a10); void __fastcall DrawClippedPlayer(int pnum, int x, int y, int px, int py, unsigned char *animdata, int animframe, int animwidth, int a9, int a10);

21
Source/sound.cpp

@ -189,8 +189,8 @@ BOOL __fastcall sound_file_reload(TSnd *sound_file, LPDIRECTSOUNDBUFFER DSB)
rv = FALSE; rv = FALSE;
WOpenFile(sound_file->sound_path, &file, 0); WOpenFile(sound_file->sound_path, &file, FALSE);
WSetFilePointer(file, sound_file->chunk.dwOffset, 0, 0); WSetFilePointer(file, sound_file->chunk.dwOffset, NULL, 0);
#ifdef __cplusplus #ifdef __cplusplus
if (DSB->Lock(0, sound_file->chunk.dwSize, &buf1, &size1, &buf2, &size2, 0) == DS_OK) { if (DSB->Lock(0, sound_file->chunk.dwSize, &buf1, &size1, &buf2, &size2, 0) == DS_OK) {
@ -213,7 +213,8 @@ BOOL __fastcall sound_file_reload(TSnd *sound_file, LPDIRECTSOUNDBUFFER DSB)
TSnd *__fastcall sound_file_load(char *path) TSnd *__fastcall sound_file_load(char *path)
{ {
void *file, *wave_file; HANDLE file;
BYTE *wave_file;
TSnd *pSnd; TSnd *pSnd;
LPVOID buf1, buf2; LPVOID buf1, buf2;
DWORD size1, size2; DWORD size1, size2;
@ -222,8 +223,8 @@ TSnd *__fastcall sound_file_load(char *path)
if (!sglpDS) if (!sglpDS)
return NULL; return NULL;
WOpenFile(path, &file, 0); WOpenFile(path, &file, FALSE);
pSnd = (TSnd *)DiabloAllocPtr(40); pSnd = (TSnd *)DiabloAllocPtr(sizeof(TSnd));
memset(pSnd, 0, sizeof(TSnd)); memset(pSnd, 0, sizeof(TSnd));
pSnd->sound_path = path; pSnd->sound_path = path;
pSnd->start_tc = GetTickCount() - 81; pSnd->start_tc = GetTickCount() - 81;
@ -242,7 +243,7 @@ TSnd *__fastcall sound_file_load(char *path)
if (error_code != DS_OK) if (error_code != DS_OK)
DSErrMsg(error_code, 318, "C:\\Src\\Diablo\\Source\\SOUND.CPP"); DSErrMsg(error_code, 318, "C:\\Src\\Diablo\\Source\\SOUND.CPP");
memcpy(buf1, (char *)wave_file + pSnd->chunk.dwOffset, size1); memcpy(buf1, wave_file + pSnd->chunk.dwOffset, size1);
#ifdef __cplusplus #ifdef __cplusplus
error_code = pSnd->DSB->Unlock(buf1, size1, buf2, size2); error_code = pSnd->DSB->Unlock(buf1, size1, buf2, size2);
@ -252,7 +253,7 @@ TSnd *__fastcall sound_file_load(char *path)
if (error_code != DS_OK) if (error_code != DS_OK)
DSErrMsg(error_code, 325, "C:\\Src\\Diablo\\Source\\SOUND.CPP"); DSErrMsg(error_code, 325, "C:\\Src\\Diablo\\Source\\SOUND.CPP");
mem_free_dbg(wave_file); mem_free_dbg((void *)wave_file);
WCloseFile(file); WCloseFile(file);
return pSnd; return pSnd;
@ -313,7 +314,7 @@ void __fastcall snd_init(HWND hWnd)
#else #else
if (sglpDS && sglpDS->lpVtbl->SetCooperativeLevel(sglpDS, hWnd, DSSCL_EXCLUSIVE) == DS_OK) if (sglpDS && sglpDS->lpVtbl->SetCooperativeLevel(sglpDS, hWnd, DSSCL_EXCLUSIVE) == DS_OK)
#endif #endif
sound_create_primary_buffer(0); sound_create_primary_buffer(NULL);
SVidInitialize(sglpDS); SVidInitialize(sglpDS);
SFileDdaInitialize(sglpDS); SFileDdaInitialize(sglpDS);
@ -441,7 +442,7 @@ void __cdecl music_stop()
if (sgpMusicTrack) { if (sgpMusicTrack) {
SFileDdaEnd(sgpMusicTrack); SFileDdaEnd(sgpMusicTrack);
SFileCloseFile(sgpMusicTrack); SFileCloseFile(sgpMusicTrack);
sgpMusicTrack = 0; sgpMusicTrack = NULL;
sgnMusicTrack = 6; sgnMusicTrack = 6;
} }
} }
@ -462,7 +463,7 @@ void __fastcall music_start(int nTrack)
#endif #endif
sound_create_primary_buffer(sgpMusicTrack); sound_create_primary_buffer(sgpMusicTrack);
if (!success) { if (!success) {
sgpMusicTrack = 0; sgpMusicTrack = NULL;
} else { } else {
SFileDdaBeginEx(sgpMusicTrack, 0x40000, 0x40000, 0, sglMusicVolume, 0, 0); SFileDdaBeginEx(sgpMusicTrack, 0x40000, 0x40000, 0, sglMusicVolume, 0, 0);
sgnMusicTrack = nTrack; sgnMusicTrack = nTrack;

35
Source/stores.cpp

@ -387,7 +387,7 @@ void __fastcall OffsetSTextY(int y, int yo)
stext[y]._syoff = yo; stext[y]._syoff = yo;
} }
void __fastcall AddSText(int x, int y, int j, char *str, int clr, int sel) void __fastcall AddSText(int x, int y, int j, char *str, char clr, int sel)
{ {
stext[y]._sx = x; stext[y]._sx = x;
stext[y]._syoff = 0; stext[y]._syoff = 0;
@ -1532,29 +1532,24 @@ void __cdecl S_StartHealer()
void __fastcall S_ScrollHBuy(int idx) void __fastcall S_ScrollHBuy(int idx)
{ {
int v1; // esi int i;
int v2; // edi char iclr;
int *v3; // esi
int iclr; // [esp+8h] [ebp-4h]
v1 = idx;
v2 = 5;
ClearSText(5, 21); ClearSText(5, 21);
stextup = 5; stextup = 5;
v3 = &healitem[v1]._iStatFlag; for (i = 5; i < 20; i += 4) {
do { if (healitem[idx]._itype != -1) {
if (*(v3 - 87) != -1) { iclr = COL_WHITE;
_LOBYTE(iclr) = COL_WHITE; if (!healitem[idx]._iStatFlag)
if (!*v3) iclr = COL_RED;
_LOBYTE(iclr) = COL_RED; AddSText(20, i, 0, healitem[idx]._iName, iclr, 1);
AddSText(20, v2, 0, (char *)v3 - 295, iclr, 1); AddSTextVal(i, healitem[idx]._iIvalue);
AddSTextVal(v2, *(v3 - 39)); PrintStoreItem(&healitem[idx], i + 1, iclr);
PrintStoreItem((ItemStruct *)(v3 - 89), v2 + 1, iclr); stextdown = i;
stextdown = v2; idx++;
v3 += 92;
} }
v2 += 4; }
} while (v2 < 20);
if (!stext[stextsel]._ssel && stextsel != 22) if (!stext[stextsel]._ssel && stextsel != 22)
stextsel = stextdown; stextsel = stextdown;
} }

2
Source/stores.h

@ -48,7 +48,7 @@ void __fastcall ClearSText(int s, int e);
void __fastcall AddSLine(int y); void __fastcall AddSLine(int y);
void __fastcall AddSTextVal(int y, int val); void __fastcall AddSTextVal(int y, int val);
void __fastcall OffsetSTextY(int y, int yo); void __fastcall OffsetSTextY(int y, int yo);
void __fastcall AddSText(int x, int y, int j, char *str, int clr, int sel); void __fastcall AddSText(int x, int y, int j, char *str, char clr, int sel);
void __cdecl StoreAutoPlace(); void __cdecl StoreAutoPlace();
void __cdecl S_StartSmith(); void __cdecl S_StartSmith();
void __fastcall S_ScrollSBuy(int idx); void __fastcall S_ScrollSBuy(int idx);

6
Source/town.cpp

@ -213,7 +213,7 @@ void __fastcall town_draw_clipped_town(BYTE *buffer, int x, int y, int sx, int s
v7 = v29; v7 = v29;
} }
if (dFlags[0][v7] & DFLAG_MISSILE) if (dFlags[0][v7] & DFLAG_MISSILE)
DrawClippedMissile(xa, y, sx, sy, 0, 8, 0); DrawClippedMissile(xa, y, sx, sy, 0, 8, FALSE);
} }
// 4B8CC0: using guessed type char pcursitem; // 4B8CC0: using guessed type char pcursitem;
// 4B8CC2: using guessed type char pcursplr; // 4B8CC2: using guessed type char pcursplr;
@ -473,7 +473,7 @@ void __fastcall town_draw_clipped_town_2(int x, int y, int a3, int a4, int a5, i
v9 = v31; v9 = v31;
} }
if (dFlags[0][v9] & DFLAG_MISSILE) if (dFlags[0][v9] & DFLAG_MISSILE)
DrawClippedMissile(xa, a3, sx, sy, a5, 8, 0); DrawClippedMissile(xa, a3, sx, sy, a5, 8, FALSE);
} }
// 4B8CC0: using guessed type char pcursitem; // 4B8CC0: using guessed type char pcursitem;
// 4B8CC2: using guessed type char pcursplr; // 4B8CC2: using guessed type char pcursplr;
@ -693,7 +693,7 @@ void __fastcall town_draw_town_all(BYTE *buffer, int x, int y, int a4, int dir,
town_draw_e_flag(buffer - 64, x - 1, y + 1, a4, dir, sx - 64, sy); town_draw_e_flag(buffer - 64, x - 1, y + 1, a4, dir, sx - 64, sy);
} }
if (dFlags[x][y] & DFLAG_MISSILE) if (dFlags[x][y] & DFLAG_MISSILE)
DrawMissile(x, y, sx, sy, 0, dir, 0); DrawMissile(x, y, sx, sy, 0, dir, FALSE);
} }
// 4B8CC0: using guessed type char pcursitem; // 4B8CC0: using guessed type char pcursitem;
// 4B8CC2: using guessed type char pcursplr; // 4B8CC2: using guessed type char pcursplr;

2
Source/wave.cpp

@ -202,7 +202,7 @@ BOOL __fastcall ReadWaveSection(MEMFILE *pMemFile, DWORD id, CKINFO *chunk)
return chunk->dwOffset != (DWORD)-1; return chunk->dwOffset != (DWORD)-1;
} }
void *__fastcall LoadWaveFile(HANDLE hsFile, WAVEFORMATEX *pwfx, CKINFO *chunk) BYTE *__fastcall LoadWaveFile(HANDLE hsFile, WAVEFORMATEX *pwfx, CKINFO *chunk)
{ {
MEMFILE wave_file; MEMFILE wave_file;

2
Source/wave.h

@ -16,6 +16,6 @@ BOOL __fastcall ReadMemFile(MEMFILE *pMemFile, void *lpBuf, size_t length);
void __fastcall FillMemFile(MEMFILE *pMemFile); void __fastcall FillMemFile(MEMFILE *pMemFile);
int __fastcall SeekMemFile(MEMFILE *pMemFile, LONG lDist, DWORD dwMethod); int __fastcall SeekMemFile(MEMFILE *pMemFile, LONG lDist, DWORD dwMethod);
BOOL __fastcall ReadWaveSection(MEMFILE *pMemFile, DWORD id, CKINFO *chunk); BOOL __fastcall ReadWaveSection(MEMFILE *pMemFile, DWORD id, CKINFO *chunk);
void *__fastcall LoadWaveFile(HANDLE hsFile, WAVEFORMATEX *pwfx, CKINFO *chunk); BYTE *__fastcall LoadWaveFile(HANDLE hsFile, WAVEFORMATEX *pwfx, CKINFO *chunk);
#endif /* __WAVE_H__ */ #endif /* __WAVE_H__ */

8
structs.h

@ -322,7 +322,7 @@ typedef struct PlayerStruct {
unsigned char pDungMsgs; unsigned char pDungMsgs;
unsigned char pLvlLoad; unsigned char pLvlLoad;
unsigned char pBattleNet; unsigned char pBattleNet;
unsigned char pManaShield; BOOLEAN pManaShield;
char bReserved[3]; char bReserved[3];
short wReserved[8]; short wReserved[8];
DWORD pDiabloKillLevel; DWORD pDiabloKillLevel;
@ -414,13 +414,13 @@ typedef struct MissileStruct {
int _miAnimFrame; int _miAnimFrame;
BOOL _miDrawFlag; BOOL _miDrawFlag;
int _miLightFlag; int _miLightFlag;
int _miPreFlag; BOOL _miPreFlag;
int _miUniqTrans; int _miUniqTrans;
int _mirange; int _mirange;
int _misource; int _misource;
int _micaster; int _micaster;
int _midam; int _midam;
int _miHitFlag; BOOL _miHitFlag;
int _midist; int _midist;
int _mlid; int _mlid;
int _mirnd; int _mirnd;
@ -1409,7 +1409,7 @@ typedef struct PkPlayerStruct {
char pDungMsgs; char pDungMsgs;
char pLvlLoad; char pLvlLoad;
char pBattleNet; char pBattleNet;
char pManaShield; BOOLEAN pManaShield;
char bReserved[3]; char bReserved[3];
short wReserved[8]; short wReserved[8];
int pDiabloKillLevel; int pDiabloKillLevel;

Loading…
Cancel
Save