本文整理汇总了C++中graphicsLib::preload方法的典型用法代码示例。如果您正苦于以下问题:C++ graphicsLib::preload方法的具体用法?C++ graphicsLib::preload怎么用?C++ graphicsLib::preload使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类graphicsLib
的用法示例。
在下文中一共展示了graphicsLib::preload方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
}
// define SAVEPATH
#ifdef PLAYSTATION2
PS2_load_MC();
SAVEPATH = "mc0:Rockbot/";
if (fioMkdir(SAVEPATH.c_str()) < 0) {
std::cout << "main - warning: could not create '" << SAVEPATH << "' folder" << std::endl; std::fflush(stdout);
/// @TODO - check if directory exists
} else {
std::cout << "Folder '" << SAVEPATH << "' created" << std::endl; std::fflush(stdout);
}
#endif
have_save = fio.save_exists();
#ifndef DEBUG_OUTPUT // redirect output to null
std::string cout_file = "/dev/null";
std::ofstream out(cout_file.c_str());
std::cout.rdbuf(out.rdbuf());
#else
// --- REDIRECT STDOUT TO A FILE --- //
#if defined(PSP) || defined(WII) || defined(ANDROID) || defined(DINGUX) || defined(PLAYSTATION2)
//std::string cout_file = SAVEPATH + "/stdout.txt";
std::string cout_file = FILEPATH + "/stdout.txt";
std::streambuf *coutbuf = std::cout.rdbuf();
std::ofstream out(cout_file.c_str());
std::cout.rdbuf(out.rdbuf()); //redirect std::cout to out.txt!
#endif
#endif
graphLib.preload();
#ifdef PLAYSTATION2
fio.load_config(game_config);
PS2_create_save_icons();
#endif
draw_lib.preload();
gameControl.currentStage = APEBOT;
// INIT GAME
if (GAME_FLAGS[FLAG_QUICKLOAD] == false) {
if (gameControl.showIntro() == false) {
std::cout << "ERROR SHOWING INTRO" << std::endl;
return 0;
}
} else {
gameControl.quick_load_game();
//ending end_obj;
//end_obj.start();
//return 1;
}
input.clean();
input.p1_input[BTN_START] = 0;
input.waitTime(200);
input.clean();
bool run_game = true;