Fix a couple of video mode switching bugs

git-svn-id: https://svn.eduke32.com/eduke32@143 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2006-05-03 01:02:51 +00:00
parent 2f99dd111b
commit 297400098b
2 changed files with 9 additions and 2 deletions

View file

@ -2532,7 +2532,8 @@ void moveweapons(void)
} }
} }
else */ else */
if(thisprojectile[i].workslike & PROJECTILE_FLAG_SPIT) if(s->zvel < 6144) if(thisprojectile[i].workslike & PROJECTILE_FLAG_SPIT)
if(s->zvel < 6144)
s->zvel += gc-112; s->zvel += gc-112;
if(thisprojectile[i].workslike & PROJECTILE_FLAG_WATERBUBBLES && sector[s->sectnum].lotag == 2 && rnd(140)) if(thisprojectile[i].workslike & PROJECTILE_FLAG_WATERBUBBLES && sector[s->sectnum].lotag == 2 && rnd(140))

View file

@ -2508,7 +2508,11 @@ cheat_for_port_credits:
do { do {
newvidmode++; newvidmode++;
if (newvidmode == lastvidmode) break; // end of cycle if (newvidmode == lastvidmode) break; // end of cycle
if (newvidmode >= validmodecnt) newvidmode = 0; if (newvidmode >= validmodecnt) {
if(safevidmode != -1)
break;
newvidmode = 0;
}
if (validmode[newvidmode].bpp == (vidsets[newvidset]&0x0ffff) && if (validmode[newvidmode].bpp == (vidsets[newvidset]&0x0ffff) &&
validmode[newvidmode].fs == newfullscreen && validmode[newvidmode].fs == newfullscreen &&
validmode[newvidmode].xdim <= validmode[lastvidmode].xdim && validmode[newvidmode].xdim <= validmode[lastvidmode].xdim &&
@ -2607,6 +2611,8 @@ cheat_for_port_credits:
gameexit("Failed restoring old video mode."); gameexit("Failed restoring old video mode.");
} else onvideomodechange(pbpp > 8); } else onvideomodechange(pbpp > 8);
} else onvideomodechange(nbpp > 8); } else onvideomodechange(nbpp > 8);
restorepalette = 1;
vscrn(); vscrn();
setrendermode(nrend); setrendermode(nrend);