summaryrefslogtreecommitdiff
path: root/src/resources/db/palettedb.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/db/palettedb.cpp')
-rw-r--r--src/resources/db/palettedb.cpp17
1 files changed, 3 insertions, 14 deletions
diff --git a/src/resources/db/palettedb.cpp b/src/resources/db/palettedb.cpp
index 88f90a1fc..4a233d67b 100644
--- a/src/resources/db/palettedb.cpp
+++ b/src/resources/db/palettedb.cpp
@@ -82,18 +82,6 @@ void PaletteDB::loadPalette()
if (line.empty() || line[0] == '#')
continue;
-#ifdef ADVGCC
- unsigned char r;
- unsigned char g;
- unsigned char b;
-
- if (sscanf(line.c_str(), "%10hhu %10hhu %10hhu\t%100s",
- &r, &g, &b, name) == 4)
- {
- name[100] = 0;
- mColors[name] = DyeColor(r, g, b);
- }
-#else
unsigned int r;
unsigned int g;
unsigned int b;
@@ -102,9 +90,10 @@ void PaletteDB::loadPalette()
&r, &g, &b, name) == 4)
{
name[100] = 0;
- mColors[name] = DyeColor(r, g, b);
+ mColors[name] = DyeColor(CAST_U8(r),
+ CAST_U8(g),
+ CAST_U8(b));
}
-#endif
}
}