Peoplemon  0.1.0
Peoplemon 3 game source documentation
main.cpp
Go to the documentation of this file.
1 #include <Core/Items/Item.hpp>
4 #include <Core/Properties.hpp>
5 #include <Core/Resources.hpp>
6 #include <iostream>
7 
8 int main() {
9  bl::logging::Config::rollLogs("logs", "bundle", 3);
10  bl::logging::Config::configureOutput(std::cout, bl::logging::Config::Debug);
11  bl::logging::Config::addFileOutput("logs/bundle.log", bl::logging::Config::Debug);
14 
15  BL_LOG_INFO << "Loading game metadata";
16  BL_LOG_INFO << "Loading items";
17  core::file::ItemDB itemdb;
18  if (!itemdb.load()) {
19  BL_LOG_ERROR << "Failed to load item database";
20  return 1;
21  }
23  BL_LOG_INFO << "Loading moves";
24  core::file::MoveDB movedb;
25  if (!movedb.load()) {
26  BL_LOG_ERROR << "Failed to load move database";
27  return 1;
28  }
30  BL_LOG_INFO << "Loading Peoplemon";
32  if (!ppldb.load()) {
33  BL_LOG_ERROR << "Failed to load peoplemon database";
34  return 1;
35  }
37  BL_LOG_INFO << "Game metadata loaded";
38 
39  BL_LOG_INFO << "Beginning bundle creation";
40  if (core::res::createBundles()) { BL_LOG_INFO << "Finished bundle creation"; }
41  else {
42  BL_LOG_ERROR << "Bundle creation failed";
43  return 1;
44  }
45 
46  return 0;
47 }
bool createBundles()
Creates the resource bundles.
Definition: Resources.cpp:47
void installDevLoaders()
Sets up the BLIB resource managers in dev mode.
Definition: Resources.cpp:16
Loads and stores metadata surrounding items in the game.
Definition: ItemDB.hpp:24
bool load()
Loads the item metadata from the data file.
Definition: ItemDB.cpp:11
Stores the metadata of all peoplemon moves.
Definition: MoveDB.hpp:22
bool load()
Loads the moves from the data file.
Definition: MoveDB.cpp:12
Data structure that holds the underlaying data for all the peoplemon.
Definition: PeoplemonDB.hpp:26
bool load()
Loads the database data from the save file.
Definition: PeoplemonDB.cpp:12
static void setDataSource(file::ItemDB &source)
Set the data source for the item methods.
Definition: Item.cpp:41
static void setDataSource(file::MoveDB &source)
Set the data source for each method.
Definition: Move.cpp:46
static void setDataSource(file::PeoplemonDB &data)
Sets the data source for all peoplemon. Must remain in scope.
Definition: Peoplemon.cpp:94
static bool load(bool inEditor)
Loads from the config file and sets defaults. Must be called before using any properties.
Definition: Properties.cpp:119
int main()
Definition: main.cpp:8