**
** \legal
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+** Copyright (c) 2010 Nikita Kitaev
+** Copyright (c) 2010 Carlos López
**
** This package is free software; you can redistribute it and/or
** modify it under the terms of the GNU General Public License as
while(!file.eof())
{
PaletteItem item;
+ String n;
+ float r, g, b, a;
getline(file,item.name);
- if(file.eof())break;
-
- getline(file,line);
- if(file.eof())break;
- item.color.set_r(atof(line.c_str()));
-
- getline(file,line);
- if(file.eof())break;
- item.color.set_g(atof(line.c_str()));
-
- getline(file,line);
- if(file.eof())break;
- item.color.set_b(atof(line.c_str()));
-
- getline(file,line);
- if(file.eof())break;
- item.color.set_a(atof(line.c_str()));
-
+ file>>r>>g>>b>>a;
+ item.color.set_r(r);
+ item.color.set_g(g);
+ item.color.set_b(b);
+ item.color.set_a(a);
+ if(file.eof()) break;
ret.push_back(item);
}