Posted by s Sat 24th Feb 2007 18:48 - Syntax is None/text - 17 views
Download | New Post | Modify | Hide line numbers
  1. typedef boost::tuple FileAndOffsetType;
  2. typedef std::map SpriteFilemapType;
  3.  
  4.  
  5. xml.cpp:loadObject(...)
  6.  
  7. obj->setVisualLocation( spriteFilesMap[sprite_gid].get<0>() );
  8. RenderableLocation renderable_location(RenderAble::RT_IMAGE, spriteFilesMap[sprite_gid].get<0>() );
  9. renderable_location.addExtension(RenderableLocation::X, spriteFilesMap[sprite_gid].get<1>() );
  10. renderable_location.addExtension(RenderableLocation::Y, spriteFilesMap[sprite_gid].get<2>() );
  11. Log("FOO") << sprite_gid << "= " << spriteFilesMap[sprite_gid].get<0>() << ": " << renderable_location.getExtension(RenderableLocation::X);
  12.  
  13. obj->setVisualId( ImageCache::instance()->addImageFromLocation(renderable_location) );
  14.  

PermaLink to this entry https://pastebin.co.uk/10885
Posted by s Sat 24th Feb 2007 18:48 - Syntax is None/text - 17 views
Download | New Post | Modify | Hide line numbers

 

Comments: 0