mirror of
https://github.com/diasurgical/devilution.git
synced 2025-07-23 04:23:01 +02:00
Format source
This commit is contained in:
@@ -573,7 +573,7 @@ void center_window(HWND hDlg)
|
||||
}
|
||||
}
|
||||
|
||||
static BOOL CALLBACK FuncDlg(HWND hDlg, UINT uMsg,WPARAM wParam, LPARAM lParam)
|
||||
static BOOL CALLBACK FuncDlg(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (uMsg) {
|
||||
case WM_INITDIALOG:
|
||||
|
@@ -27,6 +27,7 @@ int pcurs;
|
||||
/* rdata */
|
||||
/** Maps from objcurs.cel frame number to frame width. */
|
||||
const int InvItemWidth[] = {
|
||||
// clang-format off
|
||||
// Cursors
|
||||
0, 33, 32, 32, 32, 32, 32, 32, 32, 32, 32, 23,
|
||||
// Items
|
||||
@@ -47,10 +48,12 @@ const int InvItemWidth[] = {
|
||||
2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28,
|
||||
2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28,
|
||||
2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28, 2 * 28,
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
/** Maps from objcurs.cel frame number to frame height. */
|
||||
const int InvItemHeight[] = {
|
||||
// clang-format off
|
||||
// Cursors
|
||||
0, 29, 32, 32, 32, 32, 32, 32, 32, 32, 32, 35,
|
||||
// Items
|
||||
@@ -71,11 +74,12 @@ const int InvItemHeight[] = {
|
||||
3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28,
|
||||
3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28,
|
||||
3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28, 3 * 28,
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
void InitCursor()
|
||||
{
|
||||
assert(! pCursCels);
|
||||
assert(!pCursCels);
|
||||
pCursCels = LoadFileInMem("Data\\Inv\\Objcurs.CEL", NULL);
|
||||
ClearCursor();
|
||||
}
|
||||
|
@@ -288,50 +288,50 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLi
|
||||
return 0;
|
||||
|
||||
#ifdef _DEBUG
|
||||
SFileEnableDirectAccess(TRUE);
|
||||
SFileEnableDirectAccess(TRUE);
|
||||
#endif
|
||||
diablo_init_screen();
|
||||
diablo_parse_flags(lpCmdLine);
|
||||
init_create_window(nCmdShow);
|
||||
ui_sound_init();
|
||||
UiInitialize();
|
||||
diablo_init_screen();
|
||||
diablo_parse_flags(lpCmdLine);
|
||||
init_create_window(nCmdShow);
|
||||
ui_sound_init();
|
||||
UiInitialize();
|
||||
#ifdef SPAWN
|
||||
UiSetSpawned(TRUE);
|
||||
UiSetSpawned(TRUE);
|
||||
#endif
|
||||
|
||||
#ifdef _DEBUG
|
||||
if (showintrodebug)
|
||||
if (showintrodebug)
|
||||
#endif
|
||||
play_movie("gendata\\logo.smk", TRUE);
|
||||
play_movie("gendata\\logo.smk", TRUE);
|
||||
|
||||
#ifndef SPAWN
|
||||
{
|
||||
char szValueName[] = "Intro";
|
||||
{
|
||||
char szValueName[] = "Intro";
|
||||
if (!SRegLoadValue(APP_NAME, szValueName, 0, &nData))
|
||||
nData = 1;
|
||||
if (nData)
|
||||
play_movie("gendata\\diablo1.smk", TRUE);
|
||||
nData = 1;
|
||||
if (nData)
|
||||
play_movie("gendata\\diablo1.smk", TRUE);
|
||||
SRegSaveValue(APP_NAME, szValueName, 0, 0);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef _DEBUG
|
||||
if (showintrodebug) {
|
||||
if (showintrodebug) {
|
||||
#endif
|
||||
UiTitleDialog(7);
|
||||
BlackPalette();
|
||||
UiTitleDialog(7);
|
||||
BlackPalette();
|
||||
#ifdef _DEBUG
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
mainmenu_loop();
|
||||
UiDestroy();
|
||||
SaveGamma();
|
||||
mainmenu_loop();
|
||||
UiDestroy();
|
||||
SaveGamma();
|
||||
|
||||
if (ghMainWnd) {
|
||||
Sleep(300);
|
||||
DestroyWindow(ghMainWnd);
|
||||
}
|
||||
if (ghMainWnd) {
|
||||
Sleep(300);
|
||||
DestroyWindow(ghMainWnd);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -365,33 +365,33 @@ void diablo_parse_flags(char *args)
|
||||
args += strlen(ds);
|
||||
continue;
|
||||
}
|
||||
c = tolower(*args);
|
||||
args++;
|
||||
c = tolower(*args);
|
||||
args++;
|
||||
#ifdef _DEBUG
|
||||
switch (c) {
|
||||
case '^':
|
||||
switch (c) {
|
||||
case '^':
|
||||
debug_mode_key_inverted_v = TRUE;
|
||||
break;
|
||||
case '$':
|
||||
break;
|
||||
case '$':
|
||||
debug_mode_dollar_sign = TRUE;
|
||||
break;
|
||||
case 'b':
|
||||
/*
|
||||
break;
|
||||
case 'b':
|
||||
/*
|
||||
debug_mode_key_b = TRUE;
|
||||
*/
|
||||
break;
|
||||
case 'd':
|
||||
break;
|
||||
case 'd':
|
||||
showintrodebug = FALSE;
|
||||
debug_mode_key_d = TRUE;
|
||||
break;
|
||||
case 'f':
|
||||
EnableFrameCount();
|
||||
break;
|
||||
case 'i':
|
||||
break;
|
||||
case 'f':
|
||||
EnableFrameCount();
|
||||
break;
|
||||
case 'i':
|
||||
debug_mode_key_i = TRUE;
|
||||
break;
|
||||
case 'j':
|
||||
/*
|
||||
break;
|
||||
case 'j':
|
||||
/*
|
||||
while(isspace(*args)) {
|
||||
args++;
|
||||
}
|
||||
@@ -402,96 +402,96 @@ void diablo_parse_flags(char *args)
|
||||
}
|
||||
debug_mode_key_J_trigger = i;
|
||||
*/
|
||||
break;
|
||||
case 'l':
|
||||
setlevel = FALSE;
|
||||
leveldebug = TRUE;
|
||||
while (isspace(*args)) {
|
||||
args++;
|
||||
}
|
||||
i = 0;
|
||||
while (isdigit(*args)) {
|
||||
i = *args + 10 * i - '0';
|
||||
args++;
|
||||
}
|
||||
leveltype = i;
|
||||
while (isspace(*args)) {
|
||||
args++;
|
||||
}
|
||||
i = 0;
|
||||
while (isdigit(*args)) {
|
||||
i = *args + 10 * i - '0';
|
||||
args++;
|
||||
}
|
||||
currlevel = i;
|
||||
plr[0].plrlevel = i;
|
||||
break;
|
||||
case 'm':
|
||||
monstdebug = TRUE;
|
||||
while (isspace(*args)) {
|
||||
args++;
|
||||
}
|
||||
i = 0;
|
||||
while (isdigit(*args)) {
|
||||
i = *args + 10 * i - '0';
|
||||
args++;
|
||||
}
|
||||
DebugMonsters[debugmonsttypes++] = i;
|
||||
break;
|
||||
case 'n':
|
||||
showintrodebug = FALSE;
|
||||
break;
|
||||
case 'q':
|
||||
while (isspace(*args)) {
|
||||
args++;
|
||||
}
|
||||
i = 0;
|
||||
while (isdigit(*args)) {
|
||||
i = *args + 10 * i - '0';
|
||||
args++;
|
||||
}
|
||||
questdebug = i;
|
||||
break;
|
||||
case 'r':
|
||||
while (isspace(*args)) {
|
||||
args++;
|
||||
}
|
||||
i = 0;
|
||||
while (isdigit(*args)) {
|
||||
i = *args + 10 * i - '0';
|
||||
args++;
|
||||
}
|
||||
setseed = i;
|
||||
break;
|
||||
case 's':
|
||||
debug_mode_key_s = TRUE;
|
||||
break;
|
||||
case 't':
|
||||
leveldebug = TRUE;
|
||||
setlevel = TRUE;
|
||||
while (isspace(*args)) {
|
||||
args++;
|
||||
}
|
||||
i = 0;
|
||||
while (isdigit(*args)) {
|
||||
i = *args + 10 * i - '0';
|
||||
args++;
|
||||
}
|
||||
setlvlnum = i;
|
||||
break;
|
||||
case 'v':
|
||||
visiondebug = TRUE;
|
||||
break;
|
||||
case 'w':
|
||||
debug_mode_key_w = TRUE;
|
||||
break;
|
||||
case 'x':
|
||||
fullscreen = FALSE;
|
||||
break;
|
||||
break;
|
||||
case 'l':
|
||||
setlevel = FALSE;
|
||||
leveldebug = TRUE;
|
||||
while (isspace(*args)) {
|
||||
args++;
|
||||
}
|
||||
#endif
|
||||
i = 0;
|
||||
while (isdigit(*args)) {
|
||||
i = *args + 10 * i - '0';
|
||||
args++;
|
||||
}
|
||||
leveltype = i;
|
||||
while (isspace(*args)) {
|
||||
args++;
|
||||
}
|
||||
i = 0;
|
||||
while (isdigit(*args)) {
|
||||
i = *args + 10 * i - '0';
|
||||
args++;
|
||||
}
|
||||
currlevel = i;
|
||||
plr[0].plrlevel = i;
|
||||
break;
|
||||
case 'm':
|
||||
monstdebug = TRUE;
|
||||
while (isspace(*args)) {
|
||||
args++;
|
||||
}
|
||||
i = 0;
|
||||
while (isdigit(*args)) {
|
||||
i = *args + 10 * i - '0';
|
||||
args++;
|
||||
}
|
||||
DebugMonsters[debugmonsttypes++] = i;
|
||||
break;
|
||||
case 'n':
|
||||
showintrodebug = FALSE;
|
||||
break;
|
||||
case 'q':
|
||||
while (isspace(*args)) {
|
||||
args++;
|
||||
}
|
||||
i = 0;
|
||||
while (isdigit(*args)) {
|
||||
i = *args + 10 * i - '0';
|
||||
args++;
|
||||
}
|
||||
questdebug = i;
|
||||
break;
|
||||
case 'r':
|
||||
while (isspace(*args)) {
|
||||
args++;
|
||||
}
|
||||
i = 0;
|
||||
while (isdigit(*args)) {
|
||||
i = *args + 10 * i - '0';
|
||||
args++;
|
||||
}
|
||||
setseed = i;
|
||||
break;
|
||||
case 's':
|
||||
debug_mode_key_s = TRUE;
|
||||
break;
|
||||
case 't':
|
||||
leveldebug = TRUE;
|
||||
setlevel = TRUE;
|
||||
while (isspace(*args)) {
|
||||
args++;
|
||||
}
|
||||
i = 0;
|
||||
while (isdigit(*args)) {
|
||||
i = *args + 10 * i - '0';
|
||||
args++;
|
||||
}
|
||||
setlvlnum = i;
|
||||
break;
|
||||
case 'v':
|
||||
visiondebug = TRUE;
|
||||
break;
|
||||
case 'w':
|
||||
debug_mode_key_w = TRUE;
|
||||
break;
|
||||
case 'x':
|
||||
fullscreen = FALSE;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
void diablo_init_screen()
|
||||
{
|
||||
@@ -1521,7 +1521,7 @@ void PressChar(int vkey)
|
||||
|
||||
void LoadLvlGFX()
|
||||
{
|
||||
assert(! pDungeonCels);
|
||||
assert(!pDungeonCels);
|
||||
|
||||
switch (leveltype) {
|
||||
case DTYPE_TOWN:
|
||||
@@ -1564,7 +1564,7 @@ void LoadLvlGFX()
|
||||
|
||||
void LoadAllGFX()
|
||||
{
|
||||
assert(! pSpeedCels);
|
||||
assert(!pSpeedCels);
|
||||
pSpeedCels = DiabloAllocPtr(0x100000);
|
||||
IncProgress();
|
||||
IncProgress();
|
||||
@@ -1756,7 +1756,7 @@ void LoadGameLevel(BOOL firstflag, int lvldir)
|
||||
ResyncMPQuests();
|
||||
#ifndef SPAWN
|
||||
} else {
|
||||
assert(! pSpeedCels);
|
||||
assert(!pSpeedCels);
|
||||
pSpeedCels = DiabloAllocPtr(0x100000);
|
||||
LoadSetMap();
|
||||
IncProgress();
|
||||
@@ -1931,11 +1931,11 @@ void diablo_color_cyc_logic()
|
||||
color_cycle_timer = tc;
|
||||
if (!palette_get_color_cycling())
|
||||
return;
|
||||
if (leveltype == DTYPE_HELL) {
|
||||
lighting_color_cycling();
|
||||
} else if (leveltype == DTYPE_CAVES) {
|
||||
if (fullscreen)
|
||||
palette_update_caves();
|
||||
}
|
||||
if (leveltype == DTYPE_HELL) {
|
||||
lighting_color_cycling();
|
||||
} else if (leveltype == DTYPE_CAVES) {
|
||||
if (fullscreen)
|
||||
palette_update_caves();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -99,9 +99,9 @@ void dx_init(HWND hWnd)
|
||||
BOOL bSuccess;
|
||||
GUID *lpGUID;
|
||||
|
||||
assert(! gpBuffer);
|
||||
assert(! sgdwLockCount);
|
||||
assert(! sgpBackBuf);
|
||||
assert(!gpBuffer);
|
||||
assert(!sgdwLockCount);
|
||||
assert(!sgpBackBuf);
|
||||
|
||||
SetFocus(hWnd);
|
||||
ShowWindow(hWnd, SW_SHOWNORMAL);
|
||||
|
@@ -7,37 +7,37 @@
|
||||
|
||||
/** Contains the game menu items of the single player menu. */
|
||||
TMenuItem sgSingleMenu[] = {
|
||||
// clang-format off
|
||||
// dwFlags, pszStr, fnMenu
|
||||
// clang-format off
|
||||
// dwFlags, pszStr, fnMenu
|
||||
{ GMENU_ENABLED, "Save Game", &gamemenu_save_game },
|
||||
{ GMENU_ENABLED, "Options", &gamemenu_options },
|
||||
{ GMENU_ENABLED, "New Game", &gamemenu_new_game },
|
||||
{ GMENU_ENABLED, "Load Game", &gamemenu_load_game },
|
||||
{ GMENU_ENABLED, "Quit Diablo", &gamemenu_quit_game },
|
||||
{ GMENU_ENABLED, NULL, NULL }
|
||||
// clang-format on
|
||||
// clang-format on
|
||||
};
|
||||
/** Contains the game menu items of the multi player menu. */
|
||||
TMenuItem sgMultiMenu[] = {
|
||||
// clang-format off
|
||||
// dwFlags, pszStr, fnMenu
|
||||
// clang-format off
|
||||
// dwFlags, pszStr, fnMenu
|
||||
{ GMENU_ENABLED, "Options", &gamemenu_options },
|
||||
{ GMENU_ENABLED, "New Game", &gamemenu_new_game },
|
||||
{ GMENU_ENABLED, "Restart In Town", &gamemenu_restart_town },
|
||||
{ GMENU_ENABLED, "Quit Diablo", &gamemenu_quit_game },
|
||||
{ GMENU_ENABLED, NULL, NULL },
|
||||
// clang-format on
|
||||
// clang-format on
|
||||
};
|
||||
TMenuItem sgOptionsMenu[] = {
|
||||
// clang-format off
|
||||
// dwFlags, pszStr, fnMenu
|
||||
// clang-format off
|
||||
// dwFlags, pszStr, fnMenu
|
||||
{ GMENU_ENABLED | GMENU_SLIDER, NULL, &gamemenu_music_volume },
|
||||
{ GMENU_ENABLED | GMENU_SLIDER, NULL, &gamemenu_sound_volume },
|
||||
{ GMENU_ENABLED | GMENU_SLIDER, "Gamma", &gamemenu_gamma },
|
||||
{ GMENU_ENABLED , NULL, &gamemenu_color_cycling },
|
||||
{ GMENU_ENABLED , "Previous Menu", &gamemenu_previous },
|
||||
{ GMENU_ENABLED , NULL, NULL },
|
||||
// clang-format on
|
||||
// clang-format on
|
||||
};
|
||||
/** Specifies the menu names for music enabled and disabled. */
|
||||
char *music_toggle_names[] = {
|
||||
@@ -223,25 +223,25 @@ void gamemenu_music_volume(BOOL bActivate)
|
||||
gbMusicOn = FALSE;
|
||||
music_stop();
|
||||
sound_get_or_set_music_volume(VOLUME_MIN);
|
||||
} else {
|
||||
gbMusicOn = TRUE;
|
||||
sound_get_or_set_music_volume(VOLUME_MAX);
|
||||
music_start(leveltype);
|
||||
}
|
||||
} else {
|
||||
volume = gamemenu_slider_music_sound(&sgOptionsMenu[0]);
|
||||
sound_get_or_set_music_volume(volume);
|
||||
} else {
|
||||
gbMusicOn = TRUE;
|
||||
sound_get_or_set_music_volume(VOLUME_MAX);
|
||||
music_start(leveltype);
|
||||
}
|
||||
} else {
|
||||
volume = gamemenu_slider_music_sound(&sgOptionsMenu[0]);
|
||||
sound_get_or_set_music_volume(volume);
|
||||
|
||||
if (volume == VOLUME_MIN) {
|
||||
if (gbMusicOn) {
|
||||
gbMusicOn = FALSE;
|
||||
music_stop();
|
||||
}
|
||||
} else if (!gbMusicOn) {
|
||||
gbMusicOn = TRUE;
|
||||
music_start(leveltype);
|
||||
}
|
||||
}
|
||||
if (volume == VOLUME_MIN) {
|
||||
if (gbMusicOn) {
|
||||
gbMusicOn = FALSE;
|
||||
music_stop();
|
||||
}
|
||||
} else if (!gbMusicOn) {
|
||||
gbMusicOn = TRUE;
|
||||
music_start(leveltype);
|
||||
}
|
||||
}
|
||||
gamemenu_get_music();
|
||||
}
|
||||
|
||||
|
@@ -971,13 +971,13 @@ void CheckMissileCol(int i, int mindam, int maxdam, BOOL shift, int mx, int my,
|
||||
if (dMonster[mx][my] < 0
|
||||
&& monster[-(dMonster[mx][my] + 1)]._mmode == MM_STONE
|
||||
&& MonsterMHit(
|
||||
missile[i]._misource,
|
||||
-(dMonster[mx][my] + 1),
|
||||
mindam,
|
||||
maxdam,
|
||||
missile[i]._midist,
|
||||
missile[i]._mitype,
|
||||
shift)) {
|
||||
missile[i]._misource,
|
||||
-(dMonster[mx][my] + 1),
|
||||
mindam,
|
||||
maxdam,
|
||||
missile[i]._midist,
|
||||
missile[i]._mitype,
|
||||
shift)) {
|
||||
if (!nodel)
|
||||
missile[i]._mirange = 0;
|
||||
missile[i]._miHitFlag = TRUE;
|
||||
@@ -986,13 +986,13 @@ void CheckMissileCol(int i, int mindam, int maxdam, BOOL shift, int mx, int my,
|
||||
if (dPlayer[mx][my] > 0
|
||||
&& dPlayer[mx][my] - 1 != missile[i]._misource
|
||||
&& Plr2PlrMHit(
|
||||
missile[i]._misource,
|
||||
dPlayer[mx][my] - 1,
|
||||
mindam,
|
||||
maxdam,
|
||||
missile[i]._midist,
|
||||
missile[i]._mitype,
|
||||
shift)) {
|
||||
missile[i]._misource,
|
||||
dPlayer[mx][my] - 1,
|
||||
mindam,
|
||||
maxdam,
|
||||
missile[i]._midist,
|
||||
missile[i]._mitype,
|
||||
shift)) {
|
||||
if (!nodel)
|
||||
missile[i]._mirange = 0;
|
||||
missile[i]._miHitFlag = TRUE;
|
||||
@@ -1008,14 +1008,14 @@ void CheckMissileCol(int i, int mindam, int maxdam, BOOL shift, int mx, int my,
|
||||
}
|
||||
if (dPlayer[mx][my] > 0
|
||||
&& PlayerMHit(
|
||||
dPlayer[mx][my] - 1,
|
||||
missile[i]._misource,
|
||||
missile[i]._midist,
|
||||
mindam,
|
||||
maxdam,
|
||||
missile[i]._mitype,
|
||||
shift,
|
||||
0)) {
|
||||
dPlayer[mx][my] - 1,
|
||||
missile[i]._misource,
|
||||
missile[i]._midist,
|
||||
mindam,
|
||||
maxdam,
|
||||
missile[i]._mitype,
|
||||
shift,
|
||||
0)) {
|
||||
if (!nodel)
|
||||
missile[i]._mirange = 0;
|
||||
missile[i]._miHitFlag = TRUE;
|
||||
@@ -2887,12 +2887,12 @@ void MI_Fireball(int i)
|
||||
}
|
||||
if (missile[i]._miyvel > 0
|
||||
&& (TransList[dTransVal[mx + 1][my]] && nSolidTable[dPiece[mx + 1][my]]
|
||||
|| TransList[dTransVal[mx - 1][my]] && nSolidTable[dPiece[mx - 1][my]])) {
|
||||
|| TransList[dTransVal[mx - 1][my]] && nSolidTable[dPiece[mx - 1][my]])) {
|
||||
missile[i]._miyoff -= 32;
|
||||
}
|
||||
if (missile[i]._mixvel > 0
|
||||
&& (TransList[dTransVal[mx][my + 1]] && nSolidTable[dPiece[mx][my + 1]]
|
||||
|| TransList[dTransVal[mx][my - 1]] && nSolidTable[dPiece[mx][my - 1]])) {
|
||||
|| TransList[dTransVal[mx][my - 1]] && nSolidTable[dPiece[mx][my - 1]])) {
|
||||
missile[i]._mixoff -= 32;
|
||||
}
|
||||
missile[i]._mimfnum = 0;
|
||||
|
@@ -257,7 +257,7 @@ BYTE MonstConvTbl[] = {
|
||||
MT_DARKMAGE,
|
||||
};
|
||||
|
||||
#define MAT_NEVER 0
|
||||
#define MAT_NEVER 0
|
||||
#define MAT_ALWAYS 1
|
||||
#define MAT_RETAIL 2
|
||||
/**
|
||||
|
@@ -700,8 +700,7 @@ void PlaceUniqueMonst(int uniqindex, int miniontype, int unpackfilesize)
|
||||
} else {
|
||||
Monst->_mgoal = MGOAL_NORMAL;
|
||||
}
|
||||
}
|
||||
else if (Monst->mtalkmsg)
|
||||
} else if (Monst->mtalkmsg)
|
||||
Monst->_mgoal = MGOAL_INQUIRING;
|
||||
|
||||
if (gnDifficulty == DIFF_NIGHTMARE) {
|
||||
@@ -1164,7 +1163,7 @@ void M_Enemy(int i)
|
||||
continue;
|
||||
if (!(Monst->_mFlags & MFLAG_GOLEM)
|
||||
&& ((abs(monster[mi]._mx - Monst->_mx) >= 2 || abs(monster[mi]._my - Monst->_my) >= 2) && !M_Ranged(i)
|
||||
|| (!(Monst->_mFlags & MFLAG_GOLEM) && !(monster[mi]._mFlags & MFLAG_GOLEM)))) {
|
||||
|| (!(Monst->_mFlags & MFLAG_GOLEM) && !(monster[mi]._mFlags & MFLAG_GOLEM)))) {
|
||||
continue;
|
||||
}
|
||||
sameroom = dTransVal[Monst->_mx][Monst->_my] == dTransVal[monster[mi]._mx][monster[mi]._my];
|
||||
@@ -3641,11 +3640,11 @@ void MAI_Scav(int i)
|
||||
continue;
|
||||
done = dDead[Monst->_mx + x][Monst->_my + y] != 0
|
||||
&& LineClearF(
|
||||
CheckNoSolid,
|
||||
Monst->_mx,
|
||||
Monst->_my,
|
||||
Monst->_mx + x,
|
||||
Monst->_my + y);
|
||||
CheckNoSolid,
|
||||
Monst->_mx,
|
||||
Monst->_my,
|
||||
Monst->_mx + x,
|
||||
Monst->_my + y);
|
||||
}
|
||||
}
|
||||
x--;
|
||||
@@ -3658,11 +3657,11 @@ void MAI_Scav(int i)
|
||||
continue;
|
||||
done = dDead[Monst->_mx + x][Monst->_my + y] != 0
|
||||
&& LineClearF(
|
||||
CheckNoSolid,
|
||||
Monst->_mx,
|
||||
Monst->_my,
|
||||
Monst->_mx + x,
|
||||
Monst->_my + y);
|
||||
CheckNoSolid,
|
||||
Monst->_mx,
|
||||
Monst->_my,
|
||||
Monst->_mx + x,
|
||||
Monst->_my + y);
|
||||
}
|
||||
}
|
||||
x++;
|
||||
@@ -4089,8 +4088,8 @@ void MAI_Rhino(int i)
|
||||
v = random_(134, 100);
|
||||
if (v >= 2 * Monst->_mint + 33
|
||||
&& (Monst->_mVar1 != MM_WALK && Monst->_mVar1 != MM_WALK2 && Monst->_mVar1 != MM_WALK3
|
||||
|| Monst->_mVar2
|
||||
|| v >= 2 * Monst->_mint + 83)) {
|
||||
|| Monst->_mVar2
|
||||
|| v >= 2 * Monst->_mint + 83)) {
|
||||
M_StartDelay(i, random_(135, 10) + 10);
|
||||
} else {
|
||||
M_CallWalk(i, md);
|
||||
@@ -5522,7 +5521,7 @@ BOOL CheckMonsterHit(int m, BOOL &ret)
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
int encode_enemy(int m)
|
||||
|
@@ -305,7 +305,7 @@ void AddBookLever(int lx1, int ly1, int lx2, int ly2, int x1, int y1, int x2, in
|
||||
if (!exit) {
|
||||
cnt++;
|
||||
if (cnt > 20000)
|
||||
return;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -633,9 +633,9 @@ void AddStoryBooks()
|
||||
}
|
||||
}
|
||||
if (!done) {
|
||||
cnt++;
|
||||
if (cnt > 20000)
|
||||
return;
|
||||
cnt++;
|
||||
if (cnt > 20000)
|
||||
return;
|
||||
}
|
||||
}
|
||||
AddObject(OBJ_STORYBOOK, xp, yp);
|
||||
@@ -722,13 +722,13 @@ void AddLazStand()
|
||||
}
|
||||
}
|
||||
if (!found) {
|
||||
cnt++;
|
||||
if (cnt > 10000) {
|
||||
InitRndLocObj(1, 1, OBJ_LAZSTAND);
|
||||
return;
|
||||
cnt++;
|
||||
if (cnt > 10000) {
|
||||
InitRndLocObj(1, 1, OBJ_LAZSTAND);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
AddObject(OBJ_LAZSTAND, xp, yp);
|
||||
AddObject(OBJ_TNUDEM2, xp, yp + 2);
|
||||
AddObject(OBJ_STORYCANDLE, xp + 1, yp + 2);
|
||||
@@ -1118,12 +1118,12 @@ void AddShrine(int i)
|
||||
slist[j] = 1;
|
||||
}
|
||||
if (gbMaxPlayers != 1 && shrineavail[j] == 1) {
|
||||
slist[j] = 0;
|
||||
}
|
||||
if (gbMaxPlayers == 1 && shrineavail[j] == 2) {
|
||||
slist[j] = 0;
|
||||
}
|
||||
slist[j] = 0;
|
||||
}
|
||||
if (gbMaxPlayers == 1 && shrineavail[j] == 2) {
|
||||
slist[j] = 0;
|
||||
}
|
||||
}
|
||||
do {
|
||||
val = random_(150, NUM_SHRINETYPE);
|
||||
} while (!slist[val]);
|
||||
@@ -2437,17 +2437,17 @@ void OperateBook(int pnum, int i)
|
||||
oi = objectactive[j];
|
||||
otype = object[oi]._otype;
|
||||
if (otype == OBJ_MCIRCLE2 && object[oi]._oVar6 == 1) {
|
||||
dx = 27;
|
||||
dy = 29;
|
||||
object[oi]._oVar6 = 4;
|
||||
do_add_missile = TRUE;
|
||||
}
|
||||
dx = 27;
|
||||
dy = 29;
|
||||
object[oi]._oVar6 = 4;
|
||||
do_add_missile = TRUE;
|
||||
}
|
||||
if (otype == OBJ_MCIRCLE2 && object[oi]._oVar6 == 2) {
|
||||
dx = 43;
|
||||
dy = 29;
|
||||
object[oi]._oVar6 = 4;
|
||||
do_add_missile = TRUE;
|
||||
}
|
||||
dx = 43;
|
||||
dy = 29;
|
||||
object[oi]._oVar6 = 4;
|
||||
do_add_missile = TRUE;
|
||||
}
|
||||
if (do_add_missile) {
|
||||
object[dObject[35][36] - 1]._oVar5++;
|
||||
AddMissile(plr[pnum]._px, plr[pnum]._py, dx, dy, plr[pnum]._pdir, MIS_RNDTELEPORT, 0, pnum, 0, 0);
|
||||
|
@@ -1829,8 +1829,7 @@ void DropHalfPlayersGold(int pnum)
|
||||
|
||||
hGold = plr[pnum]._pGold >> 1;
|
||||
for (i = 0; i < MAXBELTITEMS && hGold > 0; i++) {
|
||||
if (plr[pnum].SpdList[i]._itype == ITYPE_GOLD &&
|
||||
plr[pnum].SpdList[i]._ivalue != GOLD_MAX_LIMIT) {
|
||||
if (plr[pnum].SpdList[i]._itype == ITYPE_GOLD && plr[pnum].SpdList[i]._ivalue != GOLD_MAX_LIMIT) {
|
||||
if (hGold < plr[pnum].SpdList[i]._ivalue) {
|
||||
plr[pnum].SpdList[i]._ivalue -= hGold;
|
||||
SetSpdbarGoldCurs(pnum, i);
|
||||
|
@@ -379,7 +379,7 @@ void music_start(int nTrack)
|
||||
{
|
||||
BOOL success;
|
||||
|
||||
assert((DWORD) nTrack < NUM_MUSIC);
|
||||
assert((DWORD)nTrack < NUM_MUSIC);
|
||||
music_stop();
|
||||
if (sglpDS && gbMusicOn) {
|
||||
#ifdef _DEBUG
|
||||
|
@@ -38,7 +38,7 @@ void tmsg_add(BYTE *pbMsg, BYTE bLen)
|
||||
|
||||
void tmsg_start()
|
||||
{
|
||||
assert(! sgpTimedMsgHead);
|
||||
assert(!sgpTimedMsgHead);
|
||||
}
|
||||
|
||||
void tmsg_cleanup()
|
||||
|
@@ -92,7 +92,7 @@ int TownCowDir[3] = { 1, 3, 4 };
|
||||
int cowoffx[8] = { -1, 0, -1, -1, -1, 0, -1, -1 };
|
||||
int cowoffy[8] = { -1, -1, -1, 0, -1, -1, -1, 0 };
|
||||
QuestTalkData Qtalklist[] = {
|
||||
// clang-format off
|
||||
// clang-format off
|
||||
// _qinfra, _qblkm, _qgarb, _qzhar, _qveil, _qmod, _qbutch, _qbol, _qblind, _qblood, _qanvil, _qwarlrd, _qking, _qpw, _qbone, _qvb
|
||||
{ TEXT_INFRA6, TEXT_MUSH6, -1, -1, TEXT_VEIL5, -1, TEXT_BUTCH5, TEXT_BANNER6, TEXT_BLIND5, TEXT_BLOOD5, TEXT_ANVIL6, TEXT_WARLRD5, TEXT_KING7, TEXT_POISON7, TEXT_BONE5, TEXT_VILE9 },
|
||||
{ TEXT_INFRA3, -1, -1, -1, TEXT_VEIL3, -1, TEXT_BUTCH3, TEXT_BANNER4, TEXT_BLIND3, TEXT_BLOOD3, TEXT_ANVIL3, TEXT_WARLRD3, TEXT_KING5, TEXT_POISON4, TEXT_BONE3, TEXT_VILE7 },
|
||||
|
40
enums.h
40
enums.h
@@ -2546,23 +2546,23 @@ typedef enum _setlevels {
|
||||
} _setlevels;
|
||||
|
||||
typedef enum quest_id {
|
||||
Q_ROCK = 0x0,
|
||||
Q_MUSHROOM = 0x1,
|
||||
Q_GARBUD = 0x2,
|
||||
Q_ZHAR = 0x3,
|
||||
Q_VEIL = 0x4,
|
||||
Q_DIABLO = 0x5,
|
||||
Q_BUTCHER = 0x6,
|
||||
Q_LTBANNER = 0x7,
|
||||
Q_BLIND = 0x8,
|
||||
Q_BLOOD = 0x9,
|
||||
Q_ANVIL = 0xA,
|
||||
Q_WARLORD = 0xB,
|
||||
Q_SKELKING = 0xC,
|
||||
Q_PWATER = 0xD,
|
||||
Q_SCHAMB = 0xE,
|
||||
Q_BETRAYER = 0xF,
|
||||
Q_INVALID = -1,
|
||||
Q_ROCK = 0x0,
|
||||
Q_MUSHROOM = 0x1,
|
||||
Q_GARBUD = 0x2,
|
||||
Q_ZHAR = 0x3,
|
||||
Q_VEIL = 0x4,
|
||||
Q_DIABLO = 0x5,
|
||||
Q_BUTCHER = 0x6,
|
||||
Q_LTBANNER = 0x7,
|
||||
Q_BLIND = 0x8,
|
||||
Q_BLOOD = 0x9,
|
||||
Q_ANVIL = 0xA,
|
||||
Q_WARLORD = 0xB,
|
||||
Q_SKELKING = 0xC,
|
||||
Q_PWATER = 0xD,
|
||||
Q_SCHAMB = 0xE,
|
||||
Q_BETRAYER = 0xF,
|
||||
Q_INVALID = -1,
|
||||
} quest_id;
|
||||
|
||||
typedef enum quest_state {
|
||||
@@ -2712,9 +2712,9 @@ typedef enum plr_class {
|
||||
} plr_class;
|
||||
|
||||
typedef enum _ui_classes {
|
||||
UI_WARRIOR = 0x0,
|
||||
UI_ROGUE = 0x1,
|
||||
UI_SORCERER = 0x2,
|
||||
UI_WARRIOR = 0x0,
|
||||
UI_ROGUE = 0x1,
|
||||
UI_SORCERER = 0x2,
|
||||
UI_NUM_CLASSES,
|
||||
} _ui_classes;
|
||||
|
||||
|
24
resource.h
24
resource.h
@@ -5,18 +5,18 @@
|
||||
* Used by Diablo.rc
|
||||
*/
|
||||
|
||||
#define IDI_ICON1 101
|
||||
#define IDD_DIALOG1 104 // DX
|
||||
#define IDD_DIALOG2 105 // NOMEMORY
|
||||
#define IDD_DIALOG3 106 // NOFILE
|
||||
#define IDD_DIALOG4 107 // DDRAW
|
||||
#define IDD_DIALOG5 108 // DSOUND
|
||||
#define IDD_DIALOG6 109 // PENTIUM (deprecated in 1.00)
|
||||
#define IDD_DIALOG7 110 // DISKSPACE
|
||||
#define IDD_DIALOG8 111 // VIDEOMODE
|
||||
#define IDD_DIALOG9 112 // INSERTCD
|
||||
#define IDD_DIALOG10 113 // RESTRICTED
|
||||
#define IDD_DIALOG11 114 // READONLY
|
||||
#define IDI_ICON1 101
|
||||
#define IDD_DIALOG1 104 // DX
|
||||
#define IDD_DIALOG2 105 // NOMEMORY
|
||||
#define IDD_DIALOG3 106 // NOFILE
|
||||
#define IDD_DIALOG4 107 // DDRAW
|
||||
#define IDD_DIALOG5 108 // DSOUND
|
||||
#define IDD_DIALOG6 109 // PENTIUM (deprecated in 1.00)
|
||||
#define IDD_DIALOG7 110 // DISKSPACE
|
||||
#define IDD_DIALOG8 111 // VIDEOMODE
|
||||
#define IDD_DIALOG9 112 // INSERTCD
|
||||
#define IDD_DIALOG10 113 // RESTRICTED
|
||||
#define IDD_DIALOG11 114 // READONLY
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
|
Reference in New Issue
Block a user