Changeset 149 for cafu/trunk/Libs/MaterialSystem/MaterialManagerImpl.cpp
- Timestamp:
- 09/03/10 00:25:58 (21 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
cafu/trunk/Libs/MaterialSystem/MaterialManagerImpl.cpp
r36 r149 46 46 #include "Expression.hpp" 47 47 #include "Material.hpp" 48 #include "ConsoleCommands/Console.hpp" 48 49 #include "TextParser/TextParser.hpp" 49 50 … … 202 203 if (!T) 203 204 { 204 printf("Error parsing %s near %s at input byte %lu.\n", FileName.c_str(), Token.c_str(), TextParser.GetReadPosByte());205 Console->Print("Error parsing "+FileName+" near "+Token+cf::va(" at input byte %lu.\n", TextParser.GetReadPosByte())); 205 206 break; 206 207 } … … 226 227 else 227 228 { 228 printf("File %s, material \"%s\": duplicate definition (ignored).\n", FileName.c_str(), NewMat->Name.c_str());229 Console->Print("File " + FileName + ", material \"" + NewMat->Name + "\": duplicate definition (ignored).\n"); 229 230 delete NewMat; 230 231 } … … 234 235 catch (const TextParserT::ParseError&) 235 236 { 236 printf("Error parsing %s at input byte %lu.\n", FileName.c_str(), TextParser.GetReadPosByte());237 Console->Print("Error parsing "+FileName+cf::va(" at input byte %lu.\n", TextParser.GetReadPosByte())); 237 238 } 238 239 … … 339 340 MaterialT* MaterialManagerImplT::GetMaterial(const std::string& MaterialName) 340 341 { 341 // Note that I'm*not* just writing return Materials[MaterialName] here, because that342 // Note that we are *not* just writing return Materials[MaterialName] here, because that 342 343 // would implicitly create a NULL entry for every MaterialName that does not actually exist. 343 344 std::map<std::string, MaterialT*>::const_iterator It=Materials.find(MaterialName); … … 345 346 if (It!=Materials.end()) return It->second; 346 347 347 printf("%s (%u): GetMaterial(\"%s\") returns NULL.\n", __FILE__, __LINE__, MaterialName.c_str());348 Console->Print(cf::va("%s (%u): ", __FILE__, __LINE__)+"GetMaterial(\""+MaterialName+"\") returns NULL.\n"); 348 349 return NULL; 349 350 }
