From 72ae2cbaca6cf67ed4484043e782570d77fcedf6 Mon Sep 17 00:00:00 2001 From: danij Date: Sat, 9 Nov 2013 03:09:08 +0000 Subject: [PATCH] Added: ResourceSystem (stub) --- doomsday/client/client.pro | 2 + .../client/include/resource/resourcesystem.h | 39 +++++++++++++++++++ .../client/src/resource/resourcesystem.cpp | 35 +++++++++++++++++ doomsday/server/server.pro | 2 + 4 files changed, 78 insertions(+) create mode 100644 doomsday/client/include/resource/resourcesystem.h create mode 100644 doomsday/client/src/resource/resourcesystem.cpp diff --git a/doomsday/client/client.pro b/doomsday/client/client.pro index bff484ea2d..87fb5ca479 100644 --- a/doomsday/client/client.pro +++ b/doomsday/client/client.pro @@ -347,6 +347,7 @@ DENG_HEADERS += \ include/resource/pcx.h \ include/resource/r_data.h \ include/resource/rawtexture.h \ + include/resource/resourcesystem.h \ include/resource/sprites.h \ include/resource/texture.h \ include/resource/texturemanifest.h \ @@ -702,6 +703,7 @@ SOURCES += \ src/resource/pcx.cpp \ src/resource/r_data.cpp \ src/resource/rawtexture.cpp \ + src/resource/resourcesystem.cpp \ src/resource/sprites.cpp \ src/resource/texture.cpp \ src/resource/texturemanifest.cpp \ diff --git a/doomsday/client/include/resource/resourcesystem.h b/doomsday/client/include/resource/resourcesystem.h new file mode 100644 index 0000000000..85aa46b532 --- /dev/null +++ b/doomsday/client/include/resource/resourcesystem.h @@ -0,0 +1,39 @@ +/** @file resourcesystem.h Resource subsystem. + * + * @authors Copyright © 2013 Daniel Swanson + * + * @par License + * GPL: http://www.gnu.org/licenses/gpl.html + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. This program is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General + * Public License for more details. You should have received a copy of the GNU + * General Public License along with this program; if not, see: + * http://www.gnu.org/licenses + */ + +#ifndef DENG_RESOURCESYSTEM_H +#define DENG_RESOURCESYSTEM_H + +#include + +/** + * Logical resources; materials, packages, textures, etc... @ingroup resource + */ +class ResourceSystem : public de::System +{ +public: + ResourceSystem(); + + // System. + void timeChanged(de::Clock const &); + +private: + DENG2_PRIVATE(d) +}; + +#endif // DENG_RESOURCESYSTEM_H diff --git a/doomsday/client/src/resource/resourcesystem.cpp b/doomsday/client/src/resource/resourcesystem.cpp new file mode 100644 index 0000000000..8c0ba4e37b --- /dev/null +++ b/doomsday/client/src/resource/resourcesystem.cpp @@ -0,0 +1,35 @@ +/** @file resourcesystem.cpp Resource subsystem. + * + * @authors Copyright © 2013 Daniel Swanson + * + * @par License + * GPL: http://www.gnu.org/licenses/gpl.html + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. This program is distributed in the hope that it + * will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General + * Public License for more details. You should have received a copy of the GNU + * General Public License along with this program; if not, see: + * http://www.gnu.org/licenses + */ + +#include "resource/resourcesystem.h" + +using namespace de; + +DENG2_PIMPL(ResourceSystem) +{ + Instance(Public *i) : Base(i) + {} +}; + +ResourceSystem::ResourceSystem() : d(new Instance(this)) +{} + +void ResourceSystem::timeChanged(Clock const &) +{ + // Nothing to do. +} diff --git a/doomsday/server/server.pro b/doomsday/server/server.pro index 804b94a976..b4561e7b03 100644 --- a/doomsday/server/server.pro +++ b/doomsday/server/server.pro @@ -211,6 +211,7 @@ DENG_HEADERS += \ $$SRC/include/resource/patchname.h \ $$SRC/include/resource/r_data.h \ $$SRC/include/resource/rawtexture.h \ + $$SRC/include/resource/resourcesystem.h \ $$SRC/include/resource/sprites.h \ $$SRC/include/resource/texture.h \ $$SRC/include/resource/texturemanifest.h \ @@ -383,6 +384,7 @@ SOURCES += \ $$SRC/src/resource/pcx.cpp \ $$SRC/src/resource/r_data.cpp \ $$SRC/src/resource/rawtexture.cpp \ + $$SRC/src/resource/resourcesystem.cpp \ $$SRC/src/resource/sprites.cpp \ $$SRC/src/resource/texture.cpp \ $$SRC/src/resource/texturemanifest.cpp \