# Tidied up some code.

- Made some classes not be singletons, since there's no reason why they
should be.
 - Made them non-global too (because globals have unclear lifetimes, and
make it harder to test things, etc). They're now owned by CGameView and
CWorld, and mostly accessed via g_Game or arguments (vaguely trying to
avoid the graphics code calling into the game code).
 - Moved CGameView implementation into pimpl, so the header file isn't
so heavy.
 - Changed a few pointers into references, to indicate that they're
never NULL.

This was SVN commit r4756.
This commit is contained in:
Ykkrosh
2007-01-08 01:56:46 +00:00
parent 8094125b18
commit ec69bccb2c
38 changed files with 519 additions and 443 deletions
+5 -1
View File
@@ -3,6 +3,7 @@
class CModel;
class CSkeletonAnim;
class CObjectManager;
#include <vector>
#include <set>
@@ -58,7 +59,7 @@ public:
std::multimap<CStr, CObjectBase::Anim> anims;
};
CObjectBase();
CObjectBase(CObjectManager& objectManager);
// Get the variation key (indices of chosen variants from each group)
// based on the selection strings
@@ -99,6 +100,9 @@ public:
private:
std::vector< std::vector<Variant> > m_VariantGroups;
CObjectManager& m_ObjectManager;
NO_COPY_CTOR(CObjectBase);
};