Commit 282d47c9 authored by Florian Oetke's avatar Florian Oetke
Browse files

changed root namespace from placeholder

parent 075fe798
......@@ -13,7 +13,7 @@
#include <mirrage/renderer/pass/tone_mapping_pass.hpp>
namespace lux {
namespace mirrage {
Game_engine::Game_engine(const std::string& title, std::uint32_t version_major,
std::uint32_t version_minor, bool debug,
......
......@@ -14,7 +14,7 @@
#include <mirrage/utils/maybe.hpp>
namespace lux {
namespace mirrage {
namespace renderer {class Deferred_renderer_factory;}
class Game_engine : public Engine {
......
......@@ -20,7 +20,7 @@
#include <iostream>
#include <exception>
using namespace lux; // import game namespace
using namespace mirrage; // import game namespace
using namespace std::string_literals;
......@@ -79,7 +79,7 @@ namespace {
try {
util::init_stacktrace(argv[0]);
lux::asset::setup_storage();
mirrage::asset::setup_storage();
} catch (const util::Error& ex) {
CRASH_REPORT("Exception in init: "<<ex.what());
......
......@@ -5,7 +5,7 @@
#include <mirrage/renderer/loading_system.hpp>
namespace lux {
namespace mirrage {
Meta_system::Meta_system(Game_engine& engine)
: _entities(engine.assets(), this)
......
......@@ -5,7 +5,7 @@
#include <mirrage/ecs/ecs.hpp>
namespace lux {
namespace mirrage {
namespace renderer {class Deferred_renderer;}
namespace renderer {class Loading_system;}
......
......@@ -22,7 +22,7 @@
#include <sstream>
namespace lux {
namespace mirrage {
using namespace ecs::components;
using namespace util::unit_literals;
using namespace graphic;
......
......@@ -15,7 +15,7 @@
#include <mirrage/utils/maybe.hpp>
namespace lux {
namespace mirrage {
class Test_screen : public Screen {
public:
......
......@@ -11,7 +11,7 @@
#endif
namespace lux {
namespace mirrage {
void create_directory(const std::string& dir) {
#ifdef WIN
......
......@@ -3,7 +3,7 @@
#include <string>
namespace lux {
namespace mirrage {
extern void create_directory(const std::string& name);
......
......@@ -12,14 +12,14 @@
#include <string>
#include <tuple>
using namespace lux;
using namespace mirrage;
auto extract_arg(std::vector<std::string>& args, const std::string& key) -> util::maybe<std::string>;
// ./mesh_converter sponza.obj
// ./mesh_converter --output=/foo/bar sponza.obj
int main(int argc, char** argv) {
lux::util::init_stacktrace(argv[0]);
mirrage::util::init_stacktrace(argv[0]);
if(argc<1) {
std::cerr << "Too few arguments!\n"
......@@ -47,7 +47,7 @@ auto extract_arg(std::vector<std::string>& args, const std::string& key) -> util
});
if(found == args.end())
return lux::util::nothing;
return mirrage::util::nothing;
// found contains the key and the value
if(util::contains(*found, '=') && found->back()!='=') {
......
......@@ -14,7 +14,7 @@
#include <stb_image.h>
namespace lux {
namespace mirrage {
namespace {
constexpr auto albedo_texture_type = aiTextureType_DIFFUSE;
......
......@@ -4,7 +4,7 @@
#include <string>
namespace lux {
namespace mirrage {
extern bool convert_material(const std::string& name, const aiMaterial& material,
const std::string& base_dir, const std::string& output);
......
......@@ -17,7 +17,7 @@
#include <iostream>
namespace lux {
namespace mirrage {
namespace {
struct Sub_mesh_data {
......
......@@ -2,7 +2,7 @@
#include <string>
namespace lux {
namespace mirrage {
extern void convert_model(const std::string& path, const std::string& output);
......
......@@ -12,7 +12,7 @@
#include <string>
#include <memory>
namespace lux {
namespace mirrage {
namespace asset {
using Asset_type = util::Str_id;
......@@ -43,14 +43,14 @@ namespace asset {
}
}
inline lux::asset::AID operator "" _aid(const char* str, std::size_t) {
return lux::asset::AID(str);
inline mirrage::asset::AID operator "" _aid(const char* str, std::size_t) {
return mirrage::asset::AID(str);
}
namespace std {
template <> struct hash<lux::asset::AID> {
size_t operator()(const lux::asset::AID& aid)const noexcept {
return 71*hash<lux::asset::Asset_type>()(aid.type())
template <> struct hash<mirrage::asset::AID> {
size_t operator()(const mirrage::asset::AID& aid)const noexcept {
return 71*hash<mirrage::asset::Asset_type>()(aid.type())
+ hash<string>()(aid.name());
}
};
......
......@@ -27,7 +27,7 @@
* asset::Ptr<Texture> itemTex = assetMgr.load<Texture>("tex:items/health/small"_aid);
* }
*/
namespace lux {
namespace mirrage {
namespace asset {
class Asset_manager;
......
......@@ -5,7 +5,7 @@
#endif
namespace lux {
namespace mirrage {
namespace asset {
template<class T>
......
......@@ -19,7 +19,7 @@
#include <vector>
namespace lux {
namespace mirrage {
namespace asset {
struct File_handle;
class Asset_manager;
......@@ -81,7 +81,7 @@ namespace asset {
#ifdef ENABLE_SF2_ASSETS
#include <sf2/sf2.hpp>
namespace lux {
namespace mirrage {
namespace asset {
/**
* Specialize this template for each asset-type
......@@ -118,7 +118,7 @@ namespace asset {
}
#else
namespace lux {
namespace mirrage {
namespace asset {
/**
* Specialize this template for each asset-type
......
......@@ -3,7 +3,7 @@
#include <mirrage/utils/string_utils.hpp>
#include <mirrage/utils/log.hpp>
namespace lux {
namespace mirrage {
namespace asset {
AID::AID(Asset_type t, std::string n)
......
......@@ -20,7 +20,7 @@
#include <emscripten.h>
#endif
using namespace lux::util;
using namespace mirrage::util;
namespace {
......@@ -40,7 +40,7 @@ namespace {
auto last_of(const std::string& str, char c) {
auto idx = str.find_last_of(c);
return idx!=std::string::npos ? lux::util::just(idx+1) : lux::util::nothing;
return idx!=std::string::npos ? mirrage::util::just(idx+1) : mirrage::util::nothing;
}
auto split_path(const std::string& path) {
......@@ -116,7 +116,7 @@ namespace {
constexpr auto default_source = {std::make_tuple("assets", false), std::make_tuple("assets.zip", true)};
}
namespace lux {
namespace mirrage {
namespace asset {
std::string pwd() {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment