summaryrefslogtreecommitdiff
path: root/src/resources/db/palettedb.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-07-13 13:49:25 +0300
committerAndrei Karas <akaras@inbox.ru>2014-07-14 02:14:18 +0300
commit72938b640199d03d6092366224d3927d5d2a33b9 (patch)
treec7e57d69da40085ba835d2e22d1a3d59ab201fe5 /src/resources/db/palettedb.cpp
parentc4cef10f92a8ff3fc668e0644d38744dccd06392 (diff)
downloadmanaverse-72938b640199d03d6092366224d3927d5d2a33b9.tar.gz
manaverse-72938b640199d03d6092366224d3927d5d2a33b9.tar.bz2
manaverse-72938b640199d03d6092366224d3927d5d2a33b9.tar.xz
manaverse-72938b640199d03d6092366224d3927d5d2a33b9.zip
Fix code style.
Diffstat (limited to 'src/resources/db/palettedb.cpp')
-rw-r--r--src/resources/db/palettedb.cpp13
1 files changed, 13 insertions, 0 deletions
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
}
}