From 4106625ad32653e16292bc3881447671526eab88 Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Sun, 8 Feb 2004 09:04:23 +0000 Subject: [PATCH] split Model into ModelGeometry and materials+animations single-instance Model geometry --- stepmania/src/Makefile.am | 4 +- stepmania/src/Model.cpp | 178 +++++-------------------- stepmania/src/Model.h | 8 +- stepmania/src/ModelManager.cpp | 82 ++++++++++++ stepmania/src/ModelManager.h | 35 +++++ stepmania/src/RageModelGeometry.cpp | 198 ++++++++++++++++++++++++++++ stepmania/src/RageModelGeometry.h | 41 ++++++ stepmania/src/StepMania.cpp | 3 + stepmania/src/StepMania.dsp | 50 ++++++- stepmania/src/StepMania.vcproj | 28 ++-- 10 files changed, 462 insertions(+), 165 deletions(-) create mode 100644 stepmania/src/ModelManager.cpp create mode 100644 stepmania/src/ModelManager.h create mode 100644 stepmania/src/RageModelGeometry.cpp create mode 100644 stepmania/src/RageModelGeometry.h diff --git a/stepmania/src/Makefile.am b/stepmania/src/Makefile.am index 52e6679edb..b265a96624 100644 --- a/stepmania/src/Makefile.am +++ b/stepmania/src/Makefile.am @@ -185,7 +185,7 @@ RageFileDriverZip.cpp RageFileDriverZip.h Rage = $(Helpers) $(PCRE)\ RageBitmapTexture.cpp RageBitmapTexture.h RageDisplay.cpp RageDisplay.h RageDisplay_OGL.cpp RageDisplay_OGL.h \ RageException.cpp RageException.h RageInput.cpp RageInput.h \ -RageInputDevice.cpp RageInputDevice.h RageLog.cpp RageLog.h RageMath.cpp RageMath.h RageSound.cpp RageSound.h \ +RageInputDevice.cpp RageInputDevice.h RageLog.cpp RageLog.h RageMath.cpp RageMath.h RageModelGeometry.cpp RageModelGeometry.h RageSound.cpp RageSound.h \ RageSoundManager.cpp RageSoundManager.h RageSoundReader.h RageSoundReader_FileReader.cpp RageSoundReader_FileReader.h \ RageSoundReader_Preload.cpp RageSoundReader_Preload.h RageSoundReader_Resample.cpp RageSoundReader_Resample.h \ RageSoundReader_Resample_Fast.cpp RageSoundReader_Resample_Fast.h RageSoundReader_Resample_Good.cpp RageSoundReader_Resample_Good.h \ @@ -198,7 +198,7 @@ $(RageFile) Actors = \ Actor.cpp Actor.h ActorCollision.h ActorCommands.cpp ActorCommands.h ActorFrame.cpp ActorFrame.h ActorScroller.cpp ActorScroller.h \ -ActorUtil.cpp ActorUtil.h BitmapText.cpp BitmapText.h Milkshape.h Model.cpp Model.h ModelTypes.cpp ModelTypes.h \ +ActorUtil.cpp ActorUtil.h BitmapText.cpp BitmapText.h Milkshape.h Model.cpp Model.h ModelManager.cpp ModelManager.h ModelTypes.cpp ModelTypes.h \ Quad.h Sprite.cpp Sprite.h GlobalSingletons = \ diff --git a/stepmania/src/Model.cpp b/stepmania/src/Model.cpp index 62a7ed7379..86eb0efd5e 100644 --- a/stepmania/src/Model.cpp +++ b/stepmania/src/Model.cpp @@ -20,6 +20,7 @@ #include "RageLog.h" #include "ActorUtil.h" #include +#include "ModelManager.h" const float FRAMES_PER_SECOND = 30; const CString DEFAULT_ANIMATION_NAME = "default"; @@ -28,10 +29,12 @@ Model::Model () { m_bTextureWrapping = true; SetUseZBuffer( true ); + m_pGeometry = NULL; m_pCurAnimation = NULL; m_bRevertToDefaultAnimation = false; m_fDefaultAnimationRate = 1; m_fCurAnimationRate = 1; + m_iRefCount = 1; } Model::~Model () @@ -41,8 +44,12 @@ Model::~Model () void Model::Clear () { + if( m_pGeometry ) + { + MODELMAN->UnloadModel( m_pGeometry ); + m_pGeometry = NULL; + } m_vpBones.clear(); - m_Meshes.clear(); m_Materials.clear(); m_mapNameToAnimation.clear(); m_pCurAnimation = NULL; @@ -63,10 +70,10 @@ bool Model::LoadMilkshapeAscii( CString sPath ) CString sLine; int iLineNum = 0; - char szName[MS_MAX_NAME]; - int nFlags, nIndex, i, j; + int i; - RageVec3ClearBounds( m_vMins, m_vMaxs ); + ASSERT( m_pGeometry == NULL ); + m_pGeometry = MODELMAN->LoadMilkshapeAscii( sPath ); while( f.GetLine( sLine ) > 0 ) { @@ -87,136 +94,6 @@ bool Model::LoadMilkshapeAscii( CString sPath ) // m_pModel->nFrame = nFrame; } - int nNumMeshes = 0; - if (sscanf (sLine, "Meshes: %d", &nNumMeshes) == 1) - { - m_Meshes.resize( nNumMeshes ); - - for (i = 0; i < nNumMeshes; i++) - { - msMesh& mesh = m_Meshes[i]; - - if( f.GetLine( sLine ) <= 0 ) - THROW - - // mesh: name, flags, material index - if (sscanf (sLine, "\"%[^\"]\" %d %d",szName, &nFlags, &nIndex) != 3) - THROW - - strcpy( mesh.szName, szName ); -// mesh.nFlags = nFlags; - mesh.nMaterialIndex = (byte)nIndex; - - // - // vertices - // - if( f.GetLine( sLine ) <= 0 ) - THROW - - int nNumVertices = 0; - if (sscanf (sLine, "%d", &nNumVertices) != 1) - THROW - - mesh.Vertices.resize( nNumVertices ); - - for (j = 0; j < nNumVertices; j++) - { - if( f.GetLine( sLine ) <= 0 ) - THROW - - RageVector3 Vertex; - RageVector2 uv; - if (sscanf (sLine, "%d %f %f %f %f %f %d", - &nFlags, - &Vertex[0], &Vertex[1], &Vertex[2], - &uv[0], &uv[1], - &nIndex - ) != 7) - { - THROW - } - - RageModelVertex& vertex = mesh.Vertices[j]; -// vertex.nFlags = nFlags; - memcpy( vertex.p, Vertex, sizeof(vertex.p) ); - memcpy( vertex.t, uv, sizeof(vertex.t) ); - vertex.boneIndex = (byte)nIndex; - RageVec3AddToBounds( RageVector3(Vertex), m_vMins, m_vMaxs ); - } - - - - // - // normals - // - if( f.GetLine( sLine ) <= 0 ) - THROW - - int nNumNormals = 0; - if (sscanf (sLine, "%d", &nNumNormals) != 1) - THROW - - vector Normals; - Normals.resize( nNumNormals ); - for (j = 0; j < nNumNormals; j++) - { - if( f.GetLine( sLine ) <= 0 ) - THROW - - RageVector3 Normal; - if (sscanf (sLine, "%f %f %f", &Normal[0], &Normal[1], &Normal[2]) != 3) - THROW - - RageVec3Normalize( (RageVector3*)&Normal, (RageVector3*)&Normal ); - Normals[j] = Normal; - } - - - - // - // triangles - // - if( f.GetLine( sLine ) <= 0 ) - THROW - - int nNumTriangles = 0; - if (sscanf (sLine, "%d", &nNumTriangles) != 1) - THROW - - mesh.Triangles.resize( nNumTriangles ); - - for (j = 0; j < nNumTriangles; j++) - { - if( f.GetLine( sLine ) <= 0 ) - THROW - - word nIndices[3]; - word nNormalIndices[3]; - if (sscanf (sLine, "%d %hd %hd %hd %hd %hd %hd %d", - &nFlags, - &nIndices[0], &nIndices[1], &nIndices[2], - &nNormalIndices[0], &nNormalIndices[1], &nNormalIndices[2], - &nIndex - ) != 8) - { - THROW - } - - // deflate the normals into vertices - for( int k=0; k<3; k++ ) - { - RageModelVertex& vertex = mesh.Vertices[ nIndices[k] ]; - RageVector3& normal = Normals[ nNormalIndices[k] ]; - vertex.n = normal; - } - - msTriangle& Triangle = mesh.Triangles[j]; -// Triangle.nFlags = nFlags; - memcpy( &Triangle.nVertexIndices, nIndices, sizeof(Triangle.nVertexIndices) ); -// Triangle.nSmoothingGroup = nIndex; - } - } - } // // materials @@ -343,10 +220,10 @@ bool Model::LoadMilkshapeAscii( CString sPath ) bUseTempVertices = m_mapNameToAnimation[DEFAULT_ANIMATION_NAME].Bones.size() > 0; // if there are no bones, then there's no reason to use temp vertices if( bUseTempVertices ) { - m_vTempVerticesByMesh.resize( m_Meshes.size() ); - for (i = 0; i < (int)m_Meshes.size(); i++) + m_vTempVerticesByMesh.resize( m_pGeometry->m_Meshes.size() ); + for (i = 0; i < (int)m_pGeometry->m_Meshes.size(); i++) { - msMesh& Mesh = m_Meshes[i]; + msMesh& Mesh = m_pGeometry->m_Meshes[i]; m_vTempVerticesByMesh[i].resize( Mesh.Vertices.size() ); } } @@ -496,8 +373,11 @@ bool Model::LoadMilkshapeAsciiBones( CString sAniName, CString sPath ) void Model::DrawPrimitives() { - if(m_Meshes.empty()) + if( m_pGeometry == NULL || + m_pGeometry->m_Meshes.empty() ) + { return; // bail early + } /* Don't if we're fully transparent */ if( m_pTempState->diffuse[0].a < 0.001f && m_pTempState->glow.a < 0.001f ) @@ -512,9 +392,9 @@ void Model::DrawPrimitives() // if( bUseTempVertices ) { - for (int i = 0; i < (int)m_Meshes.size(); i++) + for (int i = 0; i < (int)m_pGeometry->m_Meshes.size(); i++) { - msMesh *pMesh = &m_Meshes[i]; + msMesh *pMesh = &m_pGeometry->m_Meshes[i]; RageModelVertexVector& TempVertices = m_vTempVerticesByMesh[i]; for (int j = 0; j < (int)pMesh->Vertices.size(); j++) { @@ -545,9 +425,9 @@ void Model::DrawPrimitives() { DISPLAY->SetTextureModeModulate(); - for (int i = 0; i < (int)m_Meshes.size(); i++) + for (int i = 0; i < (int)m_pGeometry->m_Meshes.size(); i++) { - msMesh *pMesh = &m_Meshes[i]; + msMesh *pMesh = &m_pGeometry->m_Meshes[i]; RageModelVertexVector& TempVertices = bUseTempVertices ? m_vTempVerticesByMesh[i] : pMesh->Vertices; if( pMesh->nMaterialIndex != -1 ) // has a material @@ -615,9 +495,9 @@ void Model::DrawPrimitives() { DISPLAY->SetTextureModeGlow(); - for (int i = 0; i < (int)m_Meshes.size(); i++) + for (int i = 0; i < (int)m_pGeometry->m_Meshes.size(); i++) { - msMesh *pMesh = &m_Meshes[i]; + msMesh *pMesh = &m_pGeometry->m_Meshes[i]; RageModelVertexVector& TempVertices = m_vTempVerticesByMesh[i]; // apply material @@ -719,9 +599,9 @@ void Model::PlayAnimation( CString sAniName, float fPlayRate ) } } - for (i = 0; i < (int)m_Meshes.size(); i++) + for (i = 0; i < (int)m_pGeometry->m_Meshes.size(); i++) { - msMesh *pMesh = &m_Meshes[i]; + msMesh *pMesh = &m_pGeometry->m_Meshes[i]; for (j = 0; j < (int)pMesh->Vertices.size(); j++) { RageModelVertex *pVertex = &pMesh->Vertices[j]; @@ -752,8 +632,12 @@ void Model::SetFrame( float fNewFrame ) void Model::AdvanceFrame (float dt) { - if( m_Meshes.empty() || !m_pCurAnimation ) + if( m_pGeometry == NULL || + m_pGeometry->m_Meshes.empty() || + !m_pCurAnimation ) + { return; // bail early + } m_fCurrFrame += FRAMES_PER_SECOND * dt * m_fCurAnimationRate; if (m_fCurrFrame >= (float)m_pCurAnimation->nTotalFrames) diff --git a/stepmania/src/Model.h b/stepmania/src/Model.h index 346d0a9510..1623a6afe3 100644 --- a/stepmania/src/Model.h +++ b/stepmania/src/Model.h @@ -16,6 +16,7 @@ #include "ModelTypes.h" #include #include +#include "RageModelGeometry.h" struct msModel; @@ -53,13 +54,15 @@ public: virtual void HandleCommand( const ParsedCommand &command ); + int m_iRefCount; + private: - vector m_Meshes; + RageModelGeometry *m_pGeometry; + vector m_Materials; map m_mapNameToAnimation; msAnimation* m_pCurAnimation; - RageVector3 m_vMins, m_vMaxs; vector m_vpBones; // true if any vertex has a bone weight. @@ -74,6 +77,7 @@ private: CString m_sDefaultAnimation; float m_fDefaultAnimationRate; float m_fCurAnimationRate; + }; diff --git a/stepmania/src/ModelManager.cpp b/stepmania/src/ModelManager.cpp new file mode 100644 index 0000000000..c0ad927f70 --- /dev/null +++ b/stepmania/src/ModelManager.cpp @@ -0,0 +1,82 @@ +#include "global.h" +/* +----------------------------------------------------------------------------- + Class: ModelManager + + Desc: See header. + + Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved. + Chris Danford +----------------------------------------------------------------------------- +*/ + + +#include "ModelManager.h" +#include "RageBitmapTexture.h" +#include "arch/MovieTexture/MovieTexture.h" +#include "RageUtil.h" +#include "RageLog.h" +#include "RageException.h" +#include "RageDisplay.h" + +ModelManager* MODELMAN = NULL; + +ModelManager::ModelManager() +{ + +} + +ModelManager::~ModelManager() +{ + for( std::map::iterator i = m_mapFileToModel.begin(); + i != m_mapFileToModel.end(); + ++i ) + { + RageModelGeometry* pModel = i->second; + if( pModel->m_iRefCount ) + LOG->Trace( "TEXTUREMAN LEAK: '%s', RefCount = %d.", i->first.c_str(), pModel->m_iRefCount ); + SAFE_DELETE( pModel ); + } +} + +RageModelGeometry* ModelManager::LoadMilkshapeAscii( CString sFile ) +{ + std::map::iterator p = m_mapFileToModel.find(sFile); + if(p != m_mapFileToModel.end()) + { + /* Found the texture. Just increase the refcount and return it. */ + RageModelGeometry* pModel = p->second; + pModel->m_iRefCount++; + return pModel; + } + + RageModelGeometry* pModel = new RageModelGeometry; + pModel->LoadMilkshapeAscii( sFile ); + + m_mapFileToModel[sFile] = pModel; + return pModel; +} + +void ModelManager::UnloadModel( RageModelGeometry *m ) +{ + m->m_iRefCount--; + ASSERT( m->m_iRefCount >= 0 ); + + if( m->m_iRefCount ) + return; /* Can't unload textures that are still referenced. */ + + for( std::map::iterator i = m_mapFileToModel.begin(); + i != m_mapFileToModel.end(); + i++ ) + { + if( i->second == m ) + { + m_mapFileToModel.erase( i ); // remove map entry + SAFE_DELETE( m ); // free the texture + return; + } + } + + ASSERT(0); // we tried to delete a texture that wasn't loaded. +} + diff --git a/stepmania/src/ModelManager.h b/stepmania/src/ModelManager.h new file mode 100644 index 0000000000..9e55bf7b2d --- /dev/null +++ b/stepmania/src/ModelManager.h @@ -0,0 +1,35 @@ +#ifndef ModelManager_H +#define ModelManager_H + +/* +----------------------------------------------------------------------------- + Class: ModelManager + + Desc: Interface for loading and releasing textures. + + Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved. + Chris Danford +----------------------------------------------------------------------------- +*/ +#include "Model.h" + +#include + +class ModelManager +{ +public: + ModelManager(); + ~ModelManager(); + + RageModelGeometry* LoadMilkshapeAscii( CString sFile ); + void UnloadModel( RageModelGeometry *m ); +// void ReloadAll(); + +protected: + + std::map m_mapFileToModel; +}; + +extern ModelManager* MODELMAN; // global and accessable from anywhere in our program + +#endif diff --git a/stepmania/src/RageModelGeometry.cpp b/stepmania/src/RageModelGeometry.cpp new file mode 100644 index 0000000000..fa47505b0a --- /dev/null +++ b/stepmania/src/RageModelGeometry.cpp @@ -0,0 +1,198 @@ +#include "global.h" +/* +----------------------------------------------------------------------------- + Class: RageModelGeometry + + Desc: Types defined in msLib.h. + + Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved. + Chris Danford +----------------------------------------------------------------------------- +*/ +#include "RageModelGeometry.h" +#include "RageUtil.h" +#include "RageFile.h" +#include "RageMath.h" + + +RageModelGeometry::RageModelGeometry () +{ + m_iRefCount = 1; +} + +RageModelGeometry::~RageModelGeometry () +{ +} + +#define THROW RageException::Throw( "Parse at line %d: '%s'", sLine.c_str() ); + +void RageModelGeometry::LoadMilkshapeAscii( CString sPath ) +{ + FixSlashesInPlace(sPath); + const CString sDir = Dirname( sPath ); + + RageFile f; + if( !f.Open( sPath ) ) + RageException::Throw( "RageModelGeometry::LoadMilkshapeAscii Could not open \"%s\": %s", sPath.c_str(), f.GetError().c_str() ); + + CString sLine; + int iLineNum = 0; + char szName[MS_MAX_NAME]; + int nFlags, nIndex, i, j; + + RageVec3ClearBounds( m_vMins, m_vMaxs ); + + while( f.GetLine( sLine ) > 0 ) + { + iLineNum++; + + if (!strncmp (sLine, "//", 2)) + continue; + + int nFrame; + if (sscanf (sLine, "Frames: %d", &nFrame) == 1) + { + // ignore + // m_pRageModelGeometry->nTotalFrames = nFrame; + } + if (sscanf (sLine, "Frame: %d", &nFrame) == 1) + { + // ignore + // m_pRageModelGeometry->nFrame = nFrame; + } + + int nNumMeshes = 0; + if (sscanf (sLine, "Meshes: %d", &nNumMeshes) == 1) + { + m_Meshes.resize( nNumMeshes ); + + for (i = 0; i < nNumMeshes; i++) + { + msMesh& mesh = m_Meshes[i]; + + if( f.GetLine( sLine ) <= 0 ) + THROW + + // mesh: name, flags, material index + if (sscanf (sLine, "\"%[^\"]\" %d %d",szName, &nFlags, &nIndex) != 3) + THROW + + strcpy( mesh.szName, szName ); +// mesh.nFlags = nFlags; + mesh.nMaterialIndex = (byte)nIndex; + + // + // vertices + // + if( f.GetLine( sLine ) <= 0 ) + THROW + + int nNumVertices = 0; + if (sscanf (sLine, "%d", &nNumVertices) != 1) + THROW + + mesh.Vertices.resize( nNumVertices ); + + for (j = 0; j < nNumVertices; j++) + { + if( f.GetLine( sLine ) <= 0 ) + THROW + + RageVector3 Vertex; + RageVector2 uv; + if (sscanf (sLine, "%d %f %f %f %f %f %d", + &nFlags, + &Vertex[0], &Vertex[1], &Vertex[2], + &uv[0], &uv[1], + &nIndex + ) != 7) + { + THROW + } + + RageModelVertex& vertex = mesh.Vertices[j]; +// vertex.nFlags = nFlags; + memcpy( vertex.p, Vertex, sizeof(vertex.p) ); + memcpy( vertex.t, uv, sizeof(vertex.t) ); + vertex.boneIndex = (byte)nIndex; + RageVec3AddToBounds( RageVector3(Vertex), m_vMins, m_vMaxs ); + } + + + + // + // normals + // + if( f.GetLine( sLine ) <= 0 ) + THROW + + int nNumNormals = 0; + if (sscanf (sLine, "%d", &nNumNormals) != 1) + THROW + + vector Normals; + Normals.resize( nNumNormals ); + for (j = 0; j < nNumNormals; j++) + { + if( f.GetLine( sLine ) <= 0 ) + THROW + + RageVector3 Normal; + if (sscanf (sLine, "%f %f %f", &Normal[0], &Normal[1], &Normal[2]) != 3) + THROW + + RageVec3Normalize( (RageVector3*)&Normal, (RageVector3*)&Normal ); + Normals[j] = Normal; + } + + + + // + // triangles + // + if( f.GetLine( sLine ) <= 0 ) + THROW + + int nNumTriangles = 0; + if (sscanf (sLine, "%d", &nNumTriangles) != 1) + THROW + + mesh.Triangles.resize( nNumTriangles ); + + for (j = 0; j < nNumTriangles; j++) + { + if( f.GetLine( sLine ) <= 0 ) + THROW + + word nIndices[3]; + word nNormalIndices[3]; + if (sscanf (sLine, "%d %hd %hd %hd %hd %hd %hd %d", + &nFlags, + &nIndices[0], &nIndices[1], &nIndices[2], + &nNormalIndices[0], &nNormalIndices[1], &nNormalIndices[2], + &nIndex + ) != 8) + { + THROW + } + + // deflate the normals into vertices + for( int k=0; k<3; k++ ) + { + RageModelVertex& vertex = mesh.Vertices[ nIndices[k] ]; + RageVector3& normal = Normals[ nNormalIndices[k] ]; + vertex.n = normal; + } + + msTriangle& Triangle = mesh.Triangles[j]; +// Triangle.nFlags = nFlags; + memcpy( &Triangle.nVertexIndices, nIndices, sizeof(Triangle.nVertexIndices) ); +// Triangle.nSmoothingGroup = nIndex; + } + } + } + } + + f.Close(); +} + diff --git a/stepmania/src/RageModelGeometry.h b/stepmania/src/RageModelGeometry.h new file mode 100644 index 0000000000..75b22f0e7a --- /dev/null +++ b/stepmania/src/RageModelGeometry.h @@ -0,0 +1,41 @@ +#ifndef RageModelGeometry_H +#define RageModelGeometry_H +/* +----------------------------------------------------------------------------- + Class: RageModelGeometry + + Desc: A 3D RageModelGeometry. + + Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved. + Chris Danford +----------------------------------------------------------------------------- +*/ + +#include "Actor.h" +#include "RageTypes.h" +#include "ModelTypes.h" +#include +#include + +struct msRageModelGeometry; + + +class RageModelGeometry +{ +public: + RageModelGeometry (); + virtual ~RageModelGeometry (); + +public: + void LoadMilkshapeAscii( CString sMilkshapeAsciiFile ); + + int m_iRefCount; + + vector m_Meshes; + + RageVector3 m_vMins, m_vMaxs; +}; + + + +#endif diff --git a/stepmania/src/StepMania.cpp b/stepmania/src/StepMania.cpp index d675b974f6..ea773eb727 100644 --- a/stepmania/src/StepMania.cpp +++ b/stepmania/src/StepMania.cpp @@ -55,6 +55,7 @@ #include "RageFileManager.h" #include "Bookkeeper.h" #include "LightsManager.h" +#include "ModelManager.h" #if defined(_XBOX) @@ -951,6 +952,7 @@ int main(int argc, char* argv[]) MEMCARDMAN = new MemoryCardManager; PROFILEMAN = new ProfileManager; // must load after SONGMAN UNLOCKSYS = new UnlockSystem; + MODELMAN = new ModelManager; delete loading_window; // destroy this before init'ing Display DISPLAY = CreateDisplay(); @@ -1027,6 +1029,7 @@ int main(int argc, char* argv[]) SAFE_DELETE( INPUTMAPPER ); SAFE_DELETE( INPUTFILTER ); SAFE_DELETE( UNLOCKSYS ); + SAFE_DELETE( MODELMAN ); SAFE_DELETE( PROFILEMAN ); // PROFILEMAN needs the songs still loaded SAFE_DELETE( MEMCARDMAN ); SAFE_DELETE( SONGMAN ); diff --git a/stepmania/src/StepMania.dsp b/stepmania/src/StepMania.dsp index 5b0de2ef33..8cd2792558 100644 --- a/stepmania/src/StepMania.dsp +++ b/stepmania/src/StepMania.dsp @@ -65,7 +65,7 @@ IntDir=.\../Debug6 TargetDir=\stepmania\stepmania\Program TargetName=StepMania-debug SOURCE="$(InputPath)" -PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\ +PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\ PostBuild_Cmds=disasm\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania.vdi # End Special Build Tool @@ -103,8 +103,8 @@ IntDir=.\../Debug_Xbox TargetDir=\stepmania\stepmania TargetName=default SOURCE="$(InputPath)" -PreLink_Cmds=disasm\verinc cl /Zl /nologo /c \ - verstub.cpp /Fo$(IntDir)\ +PreLink_Cmds=disasm\verinc cl /Zl /nologo /c \ + verstub.cpp /Fo$(IntDir)\ PostBuild_Cmds=disasm\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania.vdi ia32.vdi # End Special Build Tool @@ -144,7 +144,7 @@ IntDir=.\../Release6 TargetDir=\stepmania\stepmania\Program TargetName=StepMania SOURCE="$(InputPath)" -PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\ +PreLink_Cmds=disasm\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\ PostBuild_Cmds=disasm\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania.vdi # End Special Build Tool @@ -184,8 +184,8 @@ IntDir=.\../Release_Xbox TargetDir=\stepmania\stepmania TargetName=default SOURCE="$(InputPath)" -PreLink_Cmds=disasm\verinc cl /Zl /nologo /c \ - verstub.cpp /Fo$(IntDir)\ +PreLink_Cmds=disasm\verinc cl /Zl /nologo /c \ + verstub.cpp /Fo$(IntDir)\ PostBuild_Cmds=disasm\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania.vdi ia32.vdi # End Special Build Tool @@ -629,6 +629,25 @@ SOURCE=.\RageMath.h # End Source File # Begin Source File +SOURCE=.\RageModelGeometry.cpp + +!IF "$(CFG)" == "StepMania - Win32 Debug" + +!ELSEIF "$(CFG)" == "StepMania - Xbox Debug" + +!ELSEIF "$(CFG)" == "StepMania - Win32 Release" + +!ELSEIF "$(CFG)" == "StepMania - Xbox Release" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\RageModelGeometry.h +# End Source File +# Begin Source File + SOURCE=.\RageSound.cpp !IF "$(CFG)" == "StepMania - Win32 Debug" @@ -2955,6 +2974,25 @@ SOURCE=.\Model.h # End Source File # Begin Source File +SOURCE=.\ModelManager.cpp + +!IF "$(CFG)" == "StepMania - Win32 Debug" + +!ELSEIF "$(CFG)" == "StepMania - Xbox Debug" + +!ELSEIF "$(CFG)" == "StepMania - Win32 Release" + +!ELSEIF "$(CFG)" == "StepMania - Xbox Release" + +!ENDIF + +# End Source File +# Begin Source File + +SOURCE=.\ModelManager.h +# End Source File +# Begin Source File + SOURCE=.\ModelTypes.cpp !IF "$(CFG)" == "StepMania - Win32 Debug" diff --git a/stepmania/src/StepMania.vcproj b/stepmania/src/StepMania.vcproj index 5751c1d4ff..5a264a3669 100644 --- a/stepmania/src/StepMania.vcproj +++ b/stepmania/src/StepMania.vcproj @@ -43,7 +43,7 @@ - - - - + + + + @@ -1665,6 +1665,12 @@ cl /Zl /nologo /c verstub.cpp /Fo"$(IntDir)"\ + + + + @@ -1890,6 +1896,12 @@ cl /Zl /nologo /c verstub.cpp /Fo"$(IntDir)"\ + + + +