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

This commit is contained in:
Anders Jenbo 2020-04-06 06:01:51 +02:00
commit cc0f92d45b
37 changed files with 358 additions and 654 deletions

View file

@ -9,9 +9,10 @@
BOOL update_seed_check = FALSE;
#endif
#define DEBUGSEEDS 4096
int seed_index;
int level_seeds[NUMLEVELS];
int seed_table[4096];
int level_seeds[NUMLEVELS + 1];
int seed_table[DEBUGSEEDS];
BYTE *pSquareCel;
char dMonsDbg[NUMLEVELS][MAXDUNX][MAXDUNY];
@ -33,7 +34,7 @@ void init_seed_desync()
{
int i;
for (i = 0; i < 4096; i++) {
for (i = 0; i < DEBUGSEEDS; i++) {
seed_table[i] = -1;
}
@ -66,7 +67,7 @@ void seed_desync_index_set()
void seed_desync_check(int seed)
{
if (!update_seed_check || seed_index == 4096 || currlevel == 0) {
if (!update_seed_check || seed_index == DEBUGSEEDS || currlevel == 0) {
return;
}
@ -86,9 +87,9 @@ void CheckDungeonClear()
for (j = 0; j < MAXDUNY; j++) {
for (i = 0; i < MAXDUNX; i++) {
if (dMonster[i][j])
if (dMonster[i][j] != 0)
app_fatal("Monsters not cleared");
if (dPlayer[i][j])
if (dPlayer[i][j] != 0)
app_fatal("Players not cleared");
dMonsDbg[currlevel][i][j] = dFlags[i][j] & BFLAG_VISIBLE;
@ -266,7 +267,7 @@ void GetDebugMonster()
mi1 = pcursmonst;
if (mi1 == -1) {
mi2 = dMonster[cursmx][cursmy];
if (mi2) {
if (mi2 != 0) {
mi1 = mi2 - 1;
if (mi2 <= 0)
mi1 = -1 - mi2;
@ -281,7 +282,8 @@ void NextDebugMonster()
{
char dstr[128];
if (dbgmon++ == MAXMONSTERS)
dbgmon++;
if (dbgmon == MAXMONSTERS)
dbgmon = 0;
sprintf(dstr, "Current debug monster = %i", dbgmon);