From 72938b640199d03d6092366224d3927d5d2a33b9 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 13 Jul 2014 13:49:25 +0300 Subject: Fix code style. --- src/resources/db/palettedb.cpp | 13 +++++++++++++ src/resources/map/maptype.h | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) (limited to 'src/resources') diff --git a/src/resources/db/palettedb.cpp b/src/resources/db/palettedb.cpp index 08c8ec85d..1e2f56632 100644 --- a/src/resources/db/palettedb.cpp +++ b/src/resources/db/palettedb.cpp @@ -82,6 +82,18 @@ void PaletteDB::loadPalette() if (line.empty() || line[0] == '#') continue; +#ifdef WIN32 + unsigned int r; + unsigned int g; + unsigned int b; + + if (sscanf(line.c_str(), "%10u %10u %10u\t%100s", + &r, &g, &b, name) == 4) + { + name[100] = 0; + mColors[name] = DyeColor(r, g, b); + } +#else unsigned char r; unsigned char g; unsigned char b; @@ -92,6 +104,7 @@ void PaletteDB::loadPalette() name[100] = 0; mColors[name] = DyeColor(r, g, b); } +#endif } } diff --git a/src/resources/map/maptype.h b/src/resources/map/maptype.h index 9894fe631..ccaf7c601 100644 --- a/src/resources/map/maptype.h +++ b/src/resources/map/maptype.h @@ -35,6 +35,6 @@ namespace MapType SPECIAL4 = 5, BLACKWHITE = 6 }; -} +} // namespace MapType #endif // RESOURCES_MAP_MAPTYPE_H -- cgit v1.2.3-60-g2f50