1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-25 17:40:36 +00:00

Merge pull request #52 from Quuxplusone/misc-portability

Further MSVC-related cleanups
This commit is contained in:
Zeno Rogue 2018-07-09 15:02:33 +02:00 committed by GitHub
commit 1362916329
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 7 deletions

View File

@ -1848,7 +1848,7 @@ void stunMonster(cell *c2) {
int newtime = (
c2->monst == moFatGuard ? 2 :
c2->monst == moSkeleton && c2->land != laPalace && c2->land != laHalloween ? 7 :
c2->monst == moTerraWarrior ? min(c2->stuntime + 8 - c2->hitpoints, 7) :
c2->monst == moTerraWarrior ? min(int(c2->stuntime + 8 - c2->hitpoints), 7) :
isMetalBeast(c2->monst) ? 7 :
c2->monst == moTortoise ? 7 :
c2->monst == moReptile ? 7 :
@ -6822,8 +6822,9 @@ bool collectItem(cell *c2, bool telekinesis) {
if(dopickup && c2->item) {
#ifdef HASLINEVIEW
// (eItem) to avoid the "cannot bind bitfield" problem in C++11
conformal::findhistory.push_back(make_pair(c2, (eItem) c2->item));
// temporary variable to avoid the "cannot bind bitfield" problem in C++11
eItem dummy = c2->item;
conformal::findhistory.emplace_back(c2, dummy);
#endif
c2->item = itNone;
}

View File

@ -1601,7 +1601,7 @@ namespace mapeditor {
mapeditor::paintwhat_str = "clear monster";
mapeditor::copysource.c = NULL;
mapeditor::undo.clear();
if(!cheater) patterns::displaycodes = 0;
if(!cheater) patterns::displaycodes = false;
if(!cheater) patterns::whichShape = 0;
modelcell.clear();
}) +

View File

@ -1263,7 +1263,7 @@ void drawRugScene() {
glBindTexture( GL_TEXTURE_2D, alternate_texture);
if(backcolor == 0)
glClearColor(0.05,0.05,0.05,1);
glClearColor(0.05f,0.05f,0.05f,1.0f);
else
glhr::colorClear(backcolor << 8 | 0xFF);
#ifdef GLES_ONLY

View File

@ -253,6 +253,7 @@
#if ISWINDOWS
#define hyper fake_hyper // avoid "hyper" typedef in <_mingw.h>
#define WIN32_LEAN_AND_MEAN // avoid "rad1" macro in <windows.h>
#define NOMINMAX // avoid "min" and "max" macros in <windows.h>
#endif
#include <stdio.h>

View File

@ -626,10 +626,10 @@ slide default_slides[] = {
[] (presmode mode) {
setCanvas(mode, 't');
if(mode == 1)
patterns::displaycodes = 2,
patterns::displaycodes = true,
patterns::whichPattern = 'z';
if(mode == 3)
patterns::displaycodes = 0,
patterns::displaycodes = false,
patterns::whichPattern = 0;
SHOWLAND ( l == laCanvas );
}