1 | /* |
---|
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. |
---|
10 | |
---|
11 | ### File Specific: |
---|
12 | main-programmer: Benjamin Grauer |
---|
13 | co-programmer: Patrick Boenzli |
---|
14 | */ |
---|
15 | |
---|
16 | #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_LOAD |
---|
17 | |
---|
18 | #include "new_resource_manager.h" |
---|
19 | #include "debug.h" |
---|
20 | |
---|
21 | #include <algorithm> |
---|
22 | #include <assert.h> |
---|
23 | |
---|
24 | ObjectListDefinition(NewResourceManager); |
---|
25 | |
---|
26 | /** |
---|
27 | * @brief standard constructor |
---|
28 | */ |
---|
29 | NewResourceManager::NewResourceManager () |
---|
30 | { |
---|
31 | this->registerObject(this, NewResourceManager::_objectList); |
---|
32 | this->setName("NewResourceManager"); |
---|
33 | |
---|
34 | //this->dataDir = "./"; |
---|
35 | this->tryDataDir("./data"); |
---|
36 | } |
---|
37 | |
---|
38 | //! Singleton Reference to the NewResourceManager |
---|
39 | NewResourceManager* NewResourceManager::singletonRef = NULL; |
---|
40 | |
---|
41 | /** |
---|
42 | * @brief standard destructor |
---|
43 | */ |
---|
44 | NewResourceManager::~NewResourceManager () |
---|
45 | { |
---|
46 | // deleting the Resources-List |
---|
47 | //this->unloadAllByPriority(RP_GAME); |
---|
48 | |
---|
49 | // if (!this->resourceList.empty()) |
---|
50 | // PRINTF(1)("Not removed all Resources, since there are still %d resources registered\n", this->resourceList.size()); |
---|
51 | |
---|
52 | NewResourceManager::singletonRef = NULL; |
---|
53 | } |
---|
54 | |
---|
55 | |
---|
56 | |
---|
57 | /** |
---|
58 | * @brief outputs debug information about the NewResourceManager |
---|
59 | */ |
---|
60 | void NewResourceManager::debug() const |
---|
61 | { |
---|
62 | PRINT(0)("=RM===================================\n"); |
---|
63 | PRINT(0)("= RESOURCE-MANAGER DEBUG INFORMATION =\n"); |
---|
64 | PRINT(0)("======================================\n"); |
---|
65 | |
---|
66 | PRINT(0)("==================================RM==\n"); |
---|
67 | } |
---|