summaryrefslogtreecommitdiff
path: root/common/library.h
diff options
context:
space:
mode:
authorleo2002-04-12 21:44:12 +0000
committerleo2002-04-12 21:44:12 +0000
commit525807c7290c8979dcdca3b210a14218c4edd8f1 (patch)
treee979086453064de6ca5f6855a4a28a6e4a32f76e /common/library.h
parentd3b46f0412d25ffd7ab1407b7bc892aa5eea4147 (diff)
Moved Pieces Library functions to a new class.
git-svn-id: http://svn.leocad.org/trunk@290 c7d43263-9d01-0410-8a33-9dba5d9f93d6
Diffstat (limited to 'common/library.h')
-rwxr-xr-xcommon/library.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/common/library.h b/common/library.h
index e58a3dd..bf550de 100755
--- a/common/library.h
+++ b/common/library.h
@@ -1,6 +1,41 @@
#ifndef _LIBRARY_H_
#define _LIBRARY_H_
+#include "defines.h"
+
+class Texture;
+class PieceInfo;
+
+class PiecesLibrary
+{
+public:
+ PiecesLibrary ();
+ ~PiecesLibrary ();
+
+ const char* GetLibraryPath() const
+ { return m_LibraryPath; }
+ int GetPieceCount () const
+ { return m_nPieceCount; }
+
+ bool Load (const char* libpath);
+ void Unload ();
+
+ PieceInfo* FindPieceInfo (const char* name) const;
+ PieceInfo* GetPieceInfo (int index) const;
+ int GetPieceIndex (PieceInfo *pInfo) const;
+ Texture* FindTexture (const char* name) const;
+
+protected:
+ char m_LibraryPath[LC_MAXPATH]; // path to the library files
+
+ int m_nMovedCount; // number of moved pieces
+ char* m_pMovedReference; // moved pieces list
+ int m_nPieceCount; // number of pieces
+ PieceInfo* m_pPieceIdx; // pieces array
+ int m_nTextureCount; // number of textures
+ Texture* m_pTextures; // textures array
+};
+
#include "basewnd.h"
typedef enum {