[4597] | 1 | /* |
---|
[1853] | 2 | orxonox - the future of 3D-vertical-scrollers |
---|
| 3 | |
---|
| 4 | Copyright (C) 2004 orx |
---|
| 5 | |
---|
| 6 | This program is free software; you can redistribute it and/or modify |
---|
| 7 | it under the terms of the GNU General Public License as published by |
---|
| 8 | the Free Software Foundation; either version 2, or (at your option) |
---|
| 9 | any later version. |
---|
[1855] | 10 | |
---|
| 11 | ### File Specific: |
---|
[3655] | 12 | main-programmer: Benjamin Grauer |
---|
[3672] | 13 | co-programmer: Patrick Boenzli |
---|
[1853] | 14 | */ |
---|
| 15 | |
---|
[3655] | 16 | #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_LOAD |
---|
[1853] | 17 | |
---|
[9790] | 18 | #include "new_resource_manager.h" |
---|
[4642] | 19 | #include "debug.h" |
---|
| 20 | |
---|
[6222] | 21 | #include <algorithm> |
---|
[6655] | 22 | #include <assert.h> |
---|
[6222] | 23 | |
---|
[9790] | 24 | ObjectListDefinition(NewResourceManager); |
---|
[1853] | 25 | |
---|
[3245] | 26 | /** |
---|
[6647] | 27 | * @brief standard constructor |
---|
[3245] | 28 | */ |
---|
[9790] | 29 | NewResourceManager::NewResourceManager () |
---|
[3365] | 30 | { |
---|
[9790] | 31 | this->registerObject(this, NewResourceManager::_objectList); |
---|
| 32 | this->setName("NewResourceManager"); |
---|
[4597] | 33 | |
---|
[9790] | 34 | //this->dataDir = "./"; |
---|
[5480] | 35 | this->tryDataDir("./data"); |
---|
[3365] | 36 | } |
---|
[1853] | 37 | |
---|
[9790] | 38 | //! Singleton Reference to the NewResourceManager |
---|
| 39 | NewResourceManager* NewResourceManager::singletonRef = NULL; |
---|
[3655] | 40 | |
---|
[3245] | 41 | /** |
---|
[6647] | 42 | * @brief standard destructor |
---|
[3655] | 43 | */ |
---|
[9790] | 44 | NewResourceManager::~NewResourceManager () |
---|
[3655] | 45 | { |
---|
[3660] | 46 | // deleting the Resources-List |
---|
[9790] | 47 | //this->unloadAllByPriority(RP_GAME); |
---|
[5303] | 48 | |
---|
[9790] | 49 | // if (!this->resourceList.empty()) |
---|
| 50 | // PRINTF(1)("Not removed all Resources, since there are still %d resources registered\n", this->resourceList.size()); |
---|
[5303] | 51 | |
---|
[9790] | 52 | NewResourceManager::singletonRef = NULL; |
---|
[3655] | 53 | } |
---|
[1853] | 54 | |
---|
[7661] | 55 | |
---|
[5480] | 56 | |
---|
| 57 | /** |
---|
[9790] | 58 | * @brief outputs debug information about the NewResourceManager |
---|
[5480] | 59 | */ |
---|
[9790] | 60 | void NewResourceManager::debug() const |
---|
[5480] | 61 | { |
---|
[3676] | 62 | PRINT(0)("=RM===================================\n"); |
---|
| 63 | PRINT(0)("= RESOURCE-MANAGER DEBUG INFORMATION =\n"); |
---|
| 64 | PRINT(0)("======================================\n"); |
---|
| 65 | |
---|
| 66 | PRINT(0)("==================================RM==\n"); |
---|
| 67 | } |
---|