From de8926ac5d2e8be628a1dd99a6954ee441ffe1ea Mon Sep 17 00:00:00 2001 From: Arthur O'Dwyer Date: Wed, 27 Jun 2018 17:49:26 -0700 Subject: [PATCH] Fix some truncation warnings for the benefit of MSVC. rug.cpp(1266): warning C4305: 'argument': truncation from 'double' to 'GLclampf' tour.cpp(629): warning C4305: '=': truncation from 'int' to 'bool' --- mapeditor.cpp | 2 +- rug.cpp | 2 +- tour.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mapeditor.cpp b/mapeditor.cpp index c5642248..6ccfc5fd 100644 --- a/mapeditor.cpp +++ b/mapeditor.cpp @@ -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(); }) + diff --git a/rug.cpp b/rug.cpp index 34d86070..2a673e26 100644 --- a/rug.cpp +++ b/rug.cpp @@ -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 diff --git a/tour.cpp b/tour.cpp index e2f79472..16326493 100644 --- a/tour.cpp +++ b/tour.cpp @@ -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 ); }