mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-26 01:50:36 +00:00
Merge pull request #52 from Quuxplusone/misc-portability
Further MSVC-related cleanups
This commit is contained in:
commit
1362916329
7
game.cpp
7
game.cpp
@ -1848,7 +1848,7 @@ void stunMonster(cell *c2) {
|
|||||||
int newtime = (
|
int newtime = (
|
||||||
c2->monst == moFatGuard ? 2 :
|
c2->monst == moFatGuard ? 2 :
|
||||||
c2->monst == moSkeleton && c2->land != laPalace && c2->land != laHalloween ? 7 :
|
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 :
|
isMetalBeast(c2->monst) ? 7 :
|
||||||
c2->monst == moTortoise ? 7 :
|
c2->monst == moTortoise ? 7 :
|
||||||
c2->monst == moReptile ? 7 :
|
c2->monst == moReptile ? 7 :
|
||||||
@ -6822,8 +6822,9 @@ bool collectItem(cell *c2, bool telekinesis) {
|
|||||||
|
|
||||||
if(dopickup && c2->item) {
|
if(dopickup && c2->item) {
|
||||||
#ifdef HASLINEVIEW
|
#ifdef HASLINEVIEW
|
||||||
// (eItem) to avoid the "cannot bind bitfield" problem in C++11
|
// temporary variable to avoid the "cannot bind bitfield" problem in C++11
|
||||||
conformal::findhistory.push_back(make_pair(c2, (eItem) c2->item));
|
eItem dummy = c2->item;
|
||||||
|
conformal::findhistory.emplace_back(c2, dummy);
|
||||||
#endif
|
#endif
|
||||||
c2->item = itNone;
|
c2->item = itNone;
|
||||||
}
|
}
|
||||||
|
@ -1601,7 +1601,7 @@ namespace mapeditor {
|
|||||||
mapeditor::paintwhat_str = "clear monster";
|
mapeditor::paintwhat_str = "clear monster";
|
||||||
mapeditor::copysource.c = NULL;
|
mapeditor::copysource.c = NULL;
|
||||||
mapeditor::undo.clear();
|
mapeditor::undo.clear();
|
||||||
if(!cheater) patterns::displaycodes = 0;
|
if(!cheater) patterns::displaycodes = false;
|
||||||
if(!cheater) patterns::whichShape = 0;
|
if(!cheater) patterns::whichShape = 0;
|
||||||
modelcell.clear();
|
modelcell.clear();
|
||||||
}) +
|
}) +
|
||||||
|
2
rug.cpp
2
rug.cpp
@ -1263,7 +1263,7 @@ void drawRugScene() {
|
|||||||
glBindTexture( GL_TEXTURE_2D, alternate_texture);
|
glBindTexture( GL_TEXTURE_2D, alternate_texture);
|
||||||
|
|
||||||
if(backcolor == 0)
|
if(backcolor == 0)
|
||||||
glClearColor(0.05,0.05,0.05,1);
|
glClearColor(0.05f,0.05f,0.05f,1.0f);
|
||||||
else
|
else
|
||||||
glhr::colorClear(backcolor << 8 | 0xFF);
|
glhr::colorClear(backcolor << 8 | 0xFF);
|
||||||
#ifdef GLES_ONLY
|
#ifdef GLES_ONLY
|
||||||
|
@ -253,6 +253,7 @@
|
|||||||
#if ISWINDOWS
|
#if ISWINDOWS
|
||||||
#define hyper fake_hyper // avoid "hyper" typedef in <_mingw.h>
|
#define hyper fake_hyper // avoid "hyper" typedef in <_mingw.h>
|
||||||
#define WIN32_LEAN_AND_MEAN // avoid "rad1" macro in <windows.h>
|
#define WIN32_LEAN_AND_MEAN // avoid "rad1" macro in <windows.h>
|
||||||
|
#define NOMINMAX // avoid "min" and "max" macros in <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
4
tour.cpp
4
tour.cpp
@ -626,10 +626,10 @@ slide default_slides[] = {
|
|||||||
[] (presmode mode) {
|
[] (presmode mode) {
|
||||||
setCanvas(mode, 't');
|
setCanvas(mode, 't');
|
||||||
if(mode == 1)
|
if(mode == 1)
|
||||||
patterns::displaycodes = 2,
|
patterns::displaycodes = true,
|
||||||
patterns::whichPattern = 'z';
|
patterns::whichPattern = 'z';
|
||||||
if(mode == 3)
|
if(mode == 3)
|
||||||
patterns::displaycodes = 0,
|
patterns::displaycodes = false,
|
||||||
patterns::whichPattern = 0;
|
patterns::whichPattern = 0;
|
||||||
SHOWLAND ( l == laCanvas );
|
SHOWLAND ( l == laCanvas );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user