summaryrefslogtreecommitdiff
path: root/common/minifig.cpp
diff options
context:
space:
mode:
authorleo2002-04-12 21:44:12 +0000
committerleo2002-04-12 21:44:12 +0000
commit525807c7290c8979dcdca3b210a14218c4edd8f1 (patch)
treee979086453064de6ca5f6855a4a28a6e4a32f76e /common/minifig.cpp
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/minifig.cpp')
-rw-r--r--common/minifig.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/common/minifig.cpp b/common/minifig.cpp
index caaff6d..ff8337d 100644
--- a/common/minifig.cpp
+++ b/common/minifig.cpp
@@ -12,6 +12,7 @@
#include "project.h"
#include "system.h"
#include "matrix.h"
+#include "library.h"
// =============================================================================
// Static variables
@@ -168,7 +169,7 @@ MinifigWizard::MinifigWizard (GLWindow *share)
m_Colors[i] = colors[i];
m_Angles[i] = 0;
- m_Info[i] = project->FindPieceInfo (pieces[i]);
+ m_Info[i] = project->GetPiecesLibrary ()->FindPieceInfo (pieces[i]);
if (m_Info[i] != NULL)
m_Info[i]->AddRef();
}
@@ -612,7 +613,7 @@ void MinifigWizard::GetDescriptions (int type, char ***names, int *count)
{
PieceInfo* piece_info;
- piece_info = project->FindPieceInfo (mfw_pieceinfo[i].name);
+ piece_info = project->GetPiecesLibrary ()->FindPieceInfo (mfw_pieceinfo[i].name);
if (piece_info == NULL)
continue;
@@ -695,7 +696,7 @@ void MinifigWizard::ChangePiece (int type, const char *desc)
{
if (strcmp (desc, mfw_pieceinfo[j].description) == 0)
{
- piece_info = project->FindPieceInfo (mfw_pieceinfo[j].name);
+ piece_info = project->GetPiecesLibrary ()->FindPieceInfo (mfw_pieceinfo[j].name);
if (piece_info == NULL)
continue;
@@ -807,7 +808,7 @@ bool MinifigWizard::LoadMinifig (const char* name)
endptr = strchr (ptr, ' ');
*endptr = '\0';
- m_Info[j] = project->FindPieceInfo (ptr);
+ m_Info[j] = project->GetPiecesLibrary ()->FindPieceInfo (ptr);
*endptr = ' ';
ptr = endptr;