- Timestamp:
- Dec 7, 2004, 8:10:18 PM (20 years ago)
- Location:
- orxonox/branches/images/importer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/images/importer/framework.cc
r3127 r3128 1 1 #include "framework.h" 2 2 3 int verbose = 4;3 int verbose = 1; 4 4 5 5 void DrawGLScene() -
orxonox/branches/images/importer/material.cc
r3127 r3128 288 288 void Material::setDiffuse (char* rgb) 289 289 { 290 char r[20],g[20],b[20];291 sscanf (rgb, "% s %s %s", r, g,b);292 setDiffuse ( atof(r), atof(g), atof(b));290 float r,g,b; 291 sscanf (rgb, "%f %f %f", &r, &g, &b); 292 setDiffuse (r, g, b); 293 293 } 294 294 … … 314 314 void Material::setAmbient (char* rgb) 315 315 { 316 char r[20],g[20],b[20];317 sscanf (rgb, "% s %s %s", r, g,b);318 setAmbient ( atof(r), atof(g), atof(b));316 float r,g,b; 317 sscanf (rgb, "%f %f %f", &r, &g, &b); 318 setAmbient (r, g, b); 319 319 } 320 320 … … 340 340 void Material::setSpecular (char* rgb) 341 341 { 342 char r[20],g[20],b[20];343 sscanf (rgb, "% s %s %s", r, g,b);344 setSpecular ( atof(r), atof(g), atof(b));342 float r,g,b; 343 sscanf (rgb, "%f %f %f", &r, &g, &b); 344 setSpecular (r, g, b); 345 345 } 346 346 … … 378 378 void Material::setTransparency (char* trans) 379 379 { 380 char tr[20]; 381 sscanf (trans, "%s", tr); 382 setTransparency (atof(tr)); 380 setTransparency (atof(trans)); 383 381 } 384 382
Note: See TracChangeset
for help on using the changeset viewer.