diff --git a/doomsday/client/data/defaultstyle.pack/Info b/doomsday/client/data/defaultstyle.pack/Info index f5b87897a1..bcca6df581 100644 --- a/doomsday/client/data/defaultstyle.pack/Info +++ b/doomsday/client/data/defaultstyle.pack/Info @@ -1,4 +1,6 @@ # Default UI style for Doomsday. -name: Doomsday Default UI Style -labels: style +title: Doomsday Default UI Style +version: 1.15.0 +license: GPL 3+ +tags: ui style diff --git a/doomsday/client/data/lensflares.pack/Info b/doomsday/client/data/lensflares.pack/Info index 459ec7d236..ff11af4e0a 100644 --- a/doomsday/client/data/lensflares.pack/Info +++ b/doomsday/client/data/lensflares.pack/Info @@ -1,3 +1,4 @@ -# Lens flares -name: Lens Flares -labels: core fx +title: Doomsday Default Lens Flares +version: 1.15.0 +license: GPL 3+ +tags: core fx diff --git a/doomsday/client/data/renderer.pack/Info b/doomsday/client/data/renderer.pack/Info index c06d23fbac..4ff2a2f245 100644 --- a/doomsday/client/data/renderer.pack/Info +++ b/doomsday/client/data/renderer.pack/Info @@ -1,5 +1,6 @@ # General resources for the renderer -name: Doomsday Renderer -labels: core - +title: Doomsday Renderer +version: 1.15.0 +license: GPL 3+ +tags: core diff --git a/doomsday/client/src/render/fx/lensflares.cpp b/doomsday/client/src/render/fx/lensflares.cpp index 82548cf07d..29a0d21a65 100644 --- a/doomsday/client/src/render/fx/lensflares.cpp +++ b/doomsday/client/src/render/fx/lensflares.cpp @@ -24,6 +24,7 @@ #include "clientapp.h" #include +#include #include #include #include @@ -71,7 +72,7 @@ struct FlareData DENG_ASSERT_IN_MAIN_THREAD(); DENG_ASSERT_GL_CONTEXT_ACTIVE(); - Folder const &pack = App::fileSystem().find("lensflares.pack"); + Folder const &pack = App::rootFolder().locate("/packs/lensflares/."); images.addFromInfo(pack.locate("images.dei")); atlas.setAllocator(new KdTreeAtlasAllocator); diff --git a/doomsday/client/src/render/rendersystem.cpp b/doomsday/client/src/render/rendersystem.cpp index 6310aa5f96..5e45454296 100644 --- a/doomsday/client/src/render/rendersystem.cpp +++ b/doomsday/client/src/render/rendersystem.cpp @@ -97,6 +97,10 @@ DENG2_PIMPL(RenderSystem) { LOG_AS("RenderSystem"); + // Load the required packages. + App::packageLoader().load("renderer"); + App::packageLoader().load("lensflares"); + loadAllShaders(); loadImages(); diff --git a/doomsday/client/src/ui/clientwindowsystem.cpp b/doomsday/client/src/ui/clientwindowsystem.cpp index 687cb98a00..66779fcf8c 100644 --- a/doomsday/client/src/ui/clientwindowsystem.cpp +++ b/doomsday/client/src/ui/clientwindowsystem.cpp @@ -38,7 +38,7 @@ DENG2_PIMPL(ClientWindowSystem) : Base(i) { self.setStyle(new ClientStyle); - self.style().load(App::fileSystem().find("defaultstyle.pack").path()); + self.style().load(App::packageLoader().load("defaultstyle")); settings.define(SettingsRegister::ConfigVariable, "window.main.showFps") .define(SettingsRegister::IntCVar, "vid-fsaa", 1) diff --git a/doomsday/libappfw/include/de/framework/style.h b/doomsday/libappfw/include/de/framework/style.h index 4208ceceb0..967f84b0c0 100644 --- a/doomsday/libappfw/include/de/framework/style.h +++ b/doomsday/libappfw/include/de/framework/style.h @@ -27,6 +27,8 @@ namespace de { +class Package; + /** * User interface style. */ @@ -39,9 +41,9 @@ class LIBAPPFW_PUBLIC Style /** * Loads a style from a resource pack. * - * @param pack Absolute path of a resource pack containing the style. + * @param pack Package containing the style. */ - void load(String const &pack); + void load(Package const &pack); RuleBank const &rules() const; FontBank const &fonts() const; diff --git a/doomsday/libappfw/src/baseguiapp.cpp b/doomsday/libappfw/src/baseguiapp.cpp index 08e16a2689..ac7e654578 100644 --- a/doomsday/libappfw/src/baseguiapp.cpp +++ b/doomsday/libappfw/src/baseguiapp.cpp @@ -32,7 +32,7 @@ static Value *Function_App_LoadFont(Context &, Function::ArgumentValues const &a try { // Try to load the specific font. - Block data(App::fileSystem().root().locate(args.at(0)->asText())); + Block data(App::rootFolder().locate(args.at(0)->asText())); int id; id = QFontDatabase::addApplicationFontFromData(data); if(id < 0) diff --git a/doomsday/libappfw/src/style.cpp b/doomsday/libappfw/src/style.cpp index c72a2a84ae..0d425e3c0e 100644 --- a/doomsday/libappfw/src/style.cpp +++ b/doomsday/libappfw/src/style.cpp @@ -23,6 +23,7 @@ #include #include #include +#include namespace de { @@ -50,19 +51,17 @@ DENG2_PIMPL(Style) module.clear(); } - void load(String const &path) + void load(Package const &pack) { - Folder const &pack = App::rootFolder().locate(path); - if(CommandLine::ArgWithParams arg = App::commandLine().check("-fontsize", 1)) { fonts.setFontSizeFactor(arg.params.at(0).toFloat()); } - rules.addFromInfo(pack.locate("rules.dei")); - fonts.addFromInfo(pack.locate("fonts.dei")); - colors.addFromInfo(pack.locate("colors.dei")); - images.addFromInfo(pack.locate("images.dei")); + rules .addFromInfo(pack.root().locate("rules.dei")); + fonts .addFromInfo(pack.root().locate("fonts.dei")); + colors.addFromInfo(pack.root().locate("colors.dei")); + images.addFromInfo(pack.root().locate("images.dei")); // Update the subrecords of the native module. module.add(new Variable("rules", new RecordValue(rules.names()), Variable::AllowRecord)); @@ -78,7 +77,7 @@ Style::Style() : d(new Instance(this)) Style::~Style() {} -void Style::load(String const &pack) +void Style::load(Package const &pack) { d->clear(); d->load(pack);