本文整理汇总了C++中LoadDatabase函数的典型用法代码示例。如果您正苦于以下问题:C++ LoadDatabase函数的具体用法?C++ LoadDatabase怎么用?C++ LoadDatabase使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了LoadDatabase函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LoadDatabase
void Scene_Title::Start() {
LoadDatabase();
static bool init = false;
if (!init) {
if (Data::system.ldb_id == 2003) {
Output::Debug("Switching to Rpg2003 Interpreter");
Player::engine = Player::EngineRpg2k3;
}
FileFinder::InitRtpPaths();
}
init = true;
Main_Data::game_data.Setup();
// Create Game System
Game_System::Init();
if (!Player::battle_test_flag) {
CreateTitleGraphic();
PlayTitleMusic();
}
CreateCommandWindow();
}
示例2: outstring_log
void ScriptMgr::ScriptsInit()
{
//Trinity Script startup
outstring_log(" _____ _ _ _ ____ _ _");
outstring_log("|_ _| __(_)_ __ (_) |_ _ _/ ___| ___ _ __(_)_ __ | |_ ");
outstring_log(" | || '__| | '_ \\| | __| | | \\___ \\ / __| \'__| | \'_ \\| __|");
outstring_log(" | || | | | | | | | |_| |_| |___) | (__| | | | |_) | |_ ");
outstring_log(" |_||_| |_|_| |_|_|\\__|\\__, |____/ \\___|_| |_| .__/ \\__|");
outstring_log(" |___/ |_| ");
outstring_log("");
outstring_log("");
//Load database (must be called after SD2Config.SetSource).
LoadDatabase();
outstring_log("TSCR: Loading C++ scripts");
barGoLink bar(1);
bar.step();
outstring_log("");
for (uint16 i =0; i<MAX_SCRIPTS; ++i)
m_scripts[i]=NULL;
FillSpellSummary();
AddScripts();
outstring_log(">> Loaded %i C++ Scripts.", num_sc_scripts);
outstring_log(">> Load Overriden SQL Data.");
LoadOverridenSQLData();
}
示例3: __
void ScriptMgr::ScriptsInit()
{
//Trinity Script startup
/*sLog.outString(" _____ _ _ _ ____ _ _");
sLog.outString("|_ _| __(_)_ __ (_) |_ _ _/ ___| ___ _ __(_)_ __ | |_ ");
sLog.outString(" | || '__| | '_ \\| | __| | | \\___ \\ / __| \'__| | \'_ \\| __|");
sLog.outString(" | || | | | | | | | |_| |_| |___) | (__| | | | |_) | |_ ");
sLog.outString(" |_||_| |_|_| |_|_|\\__|\\__, |____/ \\___|_| |_| .__/ \\__|");
sLog.outString(" |___/ |_| ");
sLog.outString("");
sLog.outString("");*/
/* Beginning Of PDS-4TC Badge*/ /* Added by Pryd inspired by Lorac */
sLog.outString(" . . . ");
sLog.outString(" . . ");
sLog.outString(" ____ . \\ / . ");
sLog.outString(" /\\ / \\ . - ^ - ");
sLog.outString(" \\ \\_ / . / | \\ . . ");
sLog.outString(" \\ \\\\ _ . ");
sLog.outString(" \\ \\\\ \\// _ _ /\\ __ ");
sLog.outString(" \\ \\\\ \\\\ \\\\ // /`'\\ \\__ \\ / ");
sLog.outString(" \\//__\\\\ \\\\// /____\\ \\__ \\/ ");
sLog.outString(" _____// ```````` ");
sLog.outString(" /\\ ___\\ PDS-4TC-2011 ");
sLog.outString(" \\ \\ \\__/ ______ _ __ _____ ");
sLog.outString(" \\ \\ \\ /\\ __ \\/\\`'__\\/\\ __\\ ");
sLog.outString(" ,, \\ \\ \\___\\ \\ \\_\\ \\ \\ \\_/\\ \\ \\//_ ");
sLog.outString("_/\\_|_____\\ \\_____\\ \\_____\\ \\_\\ \\ \\____\\ ");
sLog.outString(" ` ` ` ` ` \\______/\\/_____/\\/_/ \\/____/ ");
sLog.outString(" ");
sLog.outString( "PryDevCore based on TrinityCore");
sLog.outString( "Project Resource Locations");
sLog.outString( "Main Site: Http://prydevserver.com");
sLog.outString( "Support Forum: Http://prydevserver.com/forum/");
sLog.outString( " ");
sLog.outString( "PryDevServer.com Development For the Community");
/* End Of PDS-4TC Badge*/ /* Added by Pryd inspired by Lorac */
//Load database (must be called after SD2Config.SetSource).
LoadDatabase();
sLog.outString("Loading C++ scripts");
barGoLink bar(1);
bar.step();
sLog.outString("");
for (uint16 i =0; i<MAX_SCRIPTS; ++i)
m_scripts[i]=NULL;
FillSpellSummary();
AddScripts();
sLog.outString(">> Loaded %i C++ Scripts.", num_sc_scripts);
sLog.outString(">> Load Overriden SQL Data.");
LoadOverridenSQLData();
}
示例4: Prioritize
void Prioritize()
{
// XXX: Load the DB here because the order in which modules are init()ed at boot is
// alphabetical, this means we must wait until all modules have done their init()
// to be able to set the modes they provide (e.g.: m_stripcolor is inited after us)
// Prioritize() is called after all module initialization is complete, consequently
// all modes are available now
static bool loaded = false;
if (loaded)
return;
loaded = true;
// Load only when there are no linked servers - we set the TS of the channels we
// create to the current time, this can lead to desync because spanningtree has
// no way of knowing what we do
ProtocolInterface::ServerList serverlist;
ServerInstance->PI->GetServerList(serverlist);
if (serverlist.size() < 2)
{
try
{
LoadDatabase();
}
catch (CoreException& e)
{
ServerInstance->Logs->Log(MODNAME, LOG_DEFAULT, "Error loading permchannels database: " + std::string(e.GetReason()));
}
}
}
示例5: DoQuery
void DoQuery(char* fileName, char *query)
{
char **result;
WordSet *set;
/*load database into the set*/
set = LoadDatabase(set, fileName);
if (!set)
return;
/*allocate memory for the result*/
result = AllocResult(fileName, result);
if (result == NULL)
return;
/*if null parameter is passed, go to Interactive mode*/
if (query == NULL){
printf("Interactive Mode:\n");
InteractiveMode(set, result);
} else {
printf("Query Mode:\n");
QueryMode(set, result, query);
}
/*free memory*/
free(result);
FreeSet(set);
}
示例6: LoadDatabase
void ScriptMgr::InitScriptLibrary()
{
LoadDatabase();
outstring_log("StrawberryScripts: Loading C++ scripts");
BarGoLink bar(1);
bar.step();
outstring_log("");
// Resize script ids to needed ammount of assigned ScriptNames (from core)
m_scripts.resize(GetScriptIdsCount(), NULL);
FillSpellSummary();
AddScripts();
// Check existance scripts for all registered by core script names
for (uint32 i = 1; i < GetScriptIdsCount(); ++i)
{
if (!m_scripts[i])
error_log("SSC: No script found for ScriptName '%s'.", GetScriptName(i));
}
outstring_log(">> Loaded %i C++ Scripts.", num_sc_scripts);
}
示例7: outstring_log
void ScriptMgr::ScriptsInit()
{
outstring_log(" ____ _____ _ _ ");
outstring_log(" / __ \\ / ____| (_) | | ");
outstring_log(" | | | |_ __ ___ __ _ ___ _ __ | (___ ___ _ __ _ _ __ | |_ ");
outstring_log(" | | | | '__/ _ \\/ _` |/ _ \\| '_ \\ \\___ \\ / __| '__| | '_ \\| __|");
outstring_log(" | |__| | | | __/ (_| | (_) | | | |____) | (__| | | | |_) | |_ ");
outstring_log(" \\____/|_| \\___|\\__, |\\___/|_| |_|_____/ \\___|_| |_| .__/ \\__|");
outstring_log(" __/ | | | ");
outstring_log(" |___/ |_| \n");
//Load database (must be called after SD2Config.SetSource).
LoadDatabase();
for (uint16 i = 0; i < MAX_SCRIPTS; ++i)
m_scripts[i] = NULL;
FillSpellSummary();
AddScripts();
outstring_log(">> Loaded %i C++ Scripts.", num_sc_scripts);
outstring_log(">> Load Overriden SQL Data.");
LoadOverridenSQLData();
}
示例8: InitScriptLibrary
MANGOS_DLL_EXPORT
void InitScriptLibrary()
{
// ScriptDev2 startup
outstring_log("");
outstring_log(" MMM MMM MM");
outstring_log("M MM M M M M");
outstring_log("MM M M M");
outstring_log(" MMM M M M");
outstring_log(" MM M M MMMM");
outstring_log("MM M M M ");
outstring_log(" MMM MMM http://www.scriptdev2.com");
outstring_log("");
// Get configuration file
bool configFailure = false;
if (!SD2Config.SetSource(_MANGOSD_CONFIG))
configFailure = true;
else
outstring_log("SD2: Using configuration file %s", _MANGOSD_CONFIG);
// Set SD2 Error Log File
std::string sd2LogFile = SD2Config.GetStringDefault("SD2ErrorLogFile", "SD2Errors.log");
setScriptLibraryErrorFile(sd2LogFile.c_str(), "SD2");
if (configFailure)
script_error_log("Unable to open configuration file. Database will be unaccessible. Configuration values will use default.");
// Check config file version
if (SD2Config.GetIntDefault("ConfVersion", 0) != _MANGOSDCONFVERSION)
script_error_log("Configuration file version doesn't match expected version. Some config variables may be wrong or missing.");
outstring_log("");
// Load database (must be called after SD2Config.SetSource).
LoadDatabase();
outstring_log("SD2: Loading C++ scripts");
BarGoLink bar(1);
bar.step();
outstring_log("");
// Resize script ids to needed ammount of assigned ScriptNames (from core)
m_scripts.resize(GetScriptIdsCount(), NULL);
FillSpellSummary();
AddScripts();
// Check existance scripts for all registered by core script names
for (uint32 i = 1; i < GetScriptIdsCount(); ++i)
{
if (!m_scripts[i])
script_error_log("No script found for ScriptName '%s'.", GetScriptName(i));
}
outstring_log(">> Loaded %i C++ Scripts.", num_sc_scripts);
}
示例9: InitScriptLibrary
MANGOS_DLL_EXPORT
void InitScriptLibrary()
{
// ScriptDev2 startup
outstring_log("");
outstring_log(" MMM MMM MM");
outstring_log("M MM M M M M");
outstring_log("MM M M M");
outstring_log(" MMM M M M");
outstring_log(" MM M M MMMM");
outstring_log("MM M M M ");
outstring_log(" MMM MMM http://www.scriptdev2.com");
outstring_log("R2 modifications included (https://github.com/mangosR2/scriptdev2)");
outstring_log(_VERSION);
// Get configuration file
if (!SD2Config.SetSource(_SCRIPTDEV2_CONFIG))
error_log("SD2: Unable to open configuration file. Database will be unaccessible. Configuration values will use default.");
else
outstring_log("SD2: Using configuration file %s",_SCRIPTDEV2_CONFIG);
// Check config file version
if (SD2Config.GetIntDefault("ConfVersion", 0) != SD2_CONF_VERSION)
error_log("SD2: Configuration file version doesn't match expected version. Some config variables may be wrong or missing.");
outstring_log("");
// Load database (must be called after SD2Config.SetSource).
LoadDatabase();
outstring_log("SD2: Loading C++ scripts");
BarGoLink bar(1);
bar.step();
outstring_log("");
// Resize script ids to needed ammount of assigned ScriptNames (from core)
m_scripts.resize(GetScriptIdsCount(), NULL);
m_scriptStorage.clear();
FillSpellSummary();
AddScripts();
// Check existance scripts for all registered by core script names
for (uint32 i = 1; i < GetScriptIdsCount(); ++i)
{
if (!m_scripts[i])
error_log("SD2: No script found for ScriptName '%s'.", GetScriptName(i));
}
outstring_log(">> Loaded %i C++ Scripts.", num_sc_scripts);
}
示例10: root_node_
ParallelPlaneManager::ParallelPlaneManager(osg::ref_ptr<osg::Node> root_node):
root_node_(root_node),
data_mutex_(QMutex::Recursive)
{
QSettings settings("massheatmap.ini",QSettings::IniFormat);
QString pcaFileName = settings.value("data_file","pca.csv").toString();
QString covFileName = settings.value("coverage_file","./coverage_data/pack_test.csv").toString();
use_cached_database_ = settings.value("use_cached_database","true").toBool();
LoadDatabase(pcaFileName,covFileName);
InitializeSceneGraph();
}
示例11: getMSTime
void ScriptMgr::Initialize()
{
uint32 oldMSTime = getMSTime();
LoadDatabase();
sLog->outInfo(LOG_FILTER_SERVER_LOADING, "Loading C++ scripts");
FillSpellSummary();
AddScripts();
sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u C++ scripts in %u ms", GetScriptCount(), GetMSTimeDiffToNow(oldMSTime));
}
示例12: getMSTime
void ScriptMgr::Initialize()
{
uint32 oldMSTime = getMSTime();
LoadDatabase();
TC_LOG_INFO("server.loading", "Loading C++ scripts");
FillSpellSummary();
AddScripts();
TC_LOG_INFO("server.loading", ">> Loaded %u C++ scripts in %u ms", GetScriptCount(), GetMSTimeDiffToNow(oldMSTime));
}
示例13: DisplayMode
void DisplayMode(char *mode, char *fileName)
{
WordSet *set;
printf("Display Mode\n");
set = LoadDatabase(set, fileName);
if (set == NULL)
return;
if (strcmp(mode, "preorder")==0)
DisplayPreOrder(set);
else if (strcmp(mode, "postorder")==0)
DisplayPostOrder(set);
else
DisplayInOrder(set);
}
示例14: getMSTime
void ScriptMgr::Initialize()
{
uint32 oldMSTime = getMSTime();
LoadDatabase();
sLog->outString("Loading C++ scripts");
FillSpellSummary();
AddScripts();
sLog->outString(">> Loaded %u C++ scripts in %u ms", GetScriptCount(), GetMSTimeDiffToNow(oldMSTime));
sLog->outString();
}
示例15: getMSTime
void ScriptMgr::Initialize()
{
uint32 oldMSTime = getMSTime();
LoadDatabase();
// Load TeleNPC2 - maybe not the best place to load it ...
LoadNpcTele();
TC_LOG_INFO("server.loading", "Loading C++ scripts");
FillSpellSummary();
AddScripts();
TC_LOG_INFO("server.loading", ">> Loaded %u C++ scripts in %u ms", GetScriptCount(), GetMSTimeDiffToNow(oldMSTime));
}