本文整理汇总了C++中FileSystem::clear方法的典型用法代码示例。如果您正苦于以下问题:C++ FileSystem::clear方法的具体用法?C++ FileSystem::clear怎么用?C++ FileSystem::clear使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FileSystem
的用法示例。
在下文中一共展示了FileSystem::clear方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main_loop
//.........这里部分代码省略.........
(*e)->update(50);
}
}
else if(event.key.keysym.sym == SDLK_h)
{
for(list<Entity*>::iterator e = entities.begin(); e != entities.end(); e++)
{
(*e)->update(100);
}
}
else if(event.key.keysym.sym == SDLK_p)
{
paused = !paused;
}
else if(event.key.keysym.sym == SDLK_BACKSPACE)
{
flipped = !flipped;
}
else if(event.key.keysym.sym == SDLK_o)
{
drawObjectPositions = !drawObjectPositions;
}
else if(event.key.keysym.sym == SDLK_b)
{
drawBones = !drawBones;
}
else if(event.key.keysym.sym == SDLK_RETURN)
{
// Destroy all of our data
for(list<Entity*>::iterator e = entities.begin(); e != entities.end(); e++)
{
delete (*e);
}
entities.clear();
fs.clear();
data.clear();
// Get next data file
data_file_index++;
if(data_file_index >= data_files.size())
data_file_index = 0;
// Load new data
data.load(data_files[data_file_index]);
data.log();
fs.load(&data);
printf("Loaded %zu images.\n", fs.images.size());
for(map<int, SCML::Data::Entity*>::iterator e = data.entities.begin(); e != data.entities.end(); e++)
{
Entity* entity = new Entity(&data, e->first);
entity->setFileSystem(&fs);
entity->setScreen(screen);
entities.push_back(entity);
}
printf("Loaded %zu entities.\n", entities.size());
}
}
}
if(keystates[SDLK_UP])
y -= 100*dt_ms/1000.0f;
else if(keystates[SDLK_DOWN])
y += 100*dt_ms/1000.0f;