round() is not available in old MSVC++ versions

This commit is contained in:
Thomas Bernard
2018-11-27 16:41:06 +01:00
parent d45eb9117e
commit 878568c7f5
2 changed files with 10 additions and 0 deletions

View File

@@ -38,6 +38,13 @@
#include "windows.h"
#include "layers.h"
// I don't have round() in MSVC++ 2010 (_MSC_VER=1600)
#if defined(_MSC_VER)
#if _MSC_VER < 1900
#define round(x) floor(x+0.5)
#endif
#endif
static void Set_Pixel_in_layer(word x,word y, byte layer, byte color)
{
*((y)*Main.image_width+(x)+Main.backups->Pages->Image[layer].Pixels)=color;