diff --git a/stepmania/src/smpackage/smpackage-net2003.sln b/stepmania/src/smpackage-net2003.sln
similarity index 68%
rename from stepmania/src/smpackage/smpackage-net2003.sln
rename to stepmania/src/smpackage-net2003.sln
index 996c03e31d..978a5a3529 100644
--- a/stepmania/src/smpackage/smpackage-net2003.sln
+++ b/stepmania/src/smpackage-net2003.sln
@@ -1,11 +1,10 @@
Microsoft Visual Studio Solution File, Format Version 8.00
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZipArchive", "ZipArchive\ZipArchive-net2003.vcproj", "{A72BC5D6-08F5-453F-B8D2-1278A6DF60A1}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "smpackage", "smpackage-net2003.vcproj", "{6B369A92-8DDF-487C-A589-614987544197}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "smpackage", "smpackage-net2003.vcproj", "{6B369A92-8DDF-487C-A589-614987544197}"
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZipArchive", "smpackage\ZipArchive\ZipArchive-net2003.vcproj", "{F8FE2773-87CB-402F-8DC8-A80837C3E24C}"
ProjectSection(ProjectDependencies) = postProject
- {A72BC5D6-08F5-453F-B8D2-1278A6DF60A1} = {A72BC5D6-08F5-453F-B8D2-1278A6DF60A1}
EndProjectSection
EndProject
Global
@@ -19,20 +18,6 @@ Global
Unicode Static Release = Unicode Static Release
EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution
- {A72BC5D6-08F5-453F-B8D2-1278A6DF60A1}.Debug.ActiveCfg = Debug|Win32
- {A72BC5D6-08F5-453F-B8D2-1278A6DF60A1}.Debug.Build.0 = Debug|Win32
- {A72BC5D6-08F5-453F-B8D2-1278A6DF60A1}.Release.ActiveCfg = Release|Win32
- {A72BC5D6-08F5-453F-B8D2-1278A6DF60A1}.Release.Build.0 = Release|Win32
- {A72BC5D6-08F5-453F-B8D2-1278A6DF60A1}.Static Debug.ActiveCfg = Static Debug|Win32
- {A72BC5D6-08F5-453F-B8D2-1278A6DF60A1}.Static Debug.Build.0 = Static Debug|Win32
- {A72BC5D6-08F5-453F-B8D2-1278A6DF60A1}.Static Release.ActiveCfg = Static Release|Win32
- {A72BC5D6-08F5-453F-B8D2-1278A6DF60A1}.Static Release.Build.0 = Static Release|Win32
- {A72BC5D6-08F5-453F-B8D2-1278A6DF60A1}.Unicode Debug.ActiveCfg = Unicode Debug|Win32
- {A72BC5D6-08F5-453F-B8D2-1278A6DF60A1}.Unicode Debug.Build.0 = Unicode Debug|Win32
- {A72BC5D6-08F5-453F-B8D2-1278A6DF60A1}.Unicode Release.ActiveCfg = Unicode Release|Win32
- {A72BC5D6-08F5-453F-B8D2-1278A6DF60A1}.Unicode Release.Build.0 = Unicode Release|Win32
- {A72BC5D6-08F5-453F-B8D2-1278A6DF60A1}.Unicode Static Release.ActiveCfg = Unicode Static Release|Win32
- {A72BC5D6-08F5-453F-B8D2-1278A6DF60A1}.Unicode Static Release.Build.0 = Unicode Static Release|Win32
{6B369A92-8DDF-487C-A589-614987544197}.Debug.ActiveCfg = Debug|Win32
{6B369A92-8DDF-487C-A589-614987544197}.Debug.Build.0 = Debug|Win32
{6B369A92-8DDF-487C-A589-614987544197}.Release.ActiveCfg = Release|Win32
@@ -47,6 +32,20 @@ Global
{6B369A92-8DDF-487C-A589-614987544197}.Unicode Release.Build.0 = Release|Win32
{6B369A92-8DDF-487C-A589-614987544197}.Unicode Static Release.ActiveCfg = Release|Win32
{6B369A92-8DDF-487C-A589-614987544197}.Unicode Static Release.Build.0 = Release|Win32
+ {F8FE2773-87CB-402F-8DC8-A80837C3E24C}.Debug.ActiveCfg = Debug|Win32
+ {F8FE2773-87CB-402F-8DC8-A80837C3E24C}.Debug.Build.0 = Debug|Win32
+ {F8FE2773-87CB-402F-8DC8-A80837C3E24C}.Release.ActiveCfg = Release|Win32
+ {F8FE2773-87CB-402F-8DC8-A80837C3E24C}.Release.Build.0 = Release|Win32
+ {F8FE2773-87CB-402F-8DC8-A80837C3E24C}.Static Debug.ActiveCfg = Static Debug|Win32
+ {F8FE2773-87CB-402F-8DC8-A80837C3E24C}.Static Debug.Build.0 = Static Debug|Win32
+ {F8FE2773-87CB-402F-8DC8-A80837C3E24C}.Static Release.ActiveCfg = Static Release|Win32
+ {F8FE2773-87CB-402F-8DC8-A80837C3E24C}.Static Release.Build.0 = Static Release|Win32
+ {F8FE2773-87CB-402F-8DC8-A80837C3E24C}.Unicode Debug.ActiveCfg = Unicode Debug|Win32
+ {F8FE2773-87CB-402F-8DC8-A80837C3E24C}.Unicode Debug.Build.0 = Unicode Debug|Win32
+ {F8FE2773-87CB-402F-8DC8-A80837C3E24C}.Unicode Release.ActiveCfg = Unicode Release|Win32
+ {F8FE2773-87CB-402F-8DC8-A80837C3E24C}.Unicode Release.Build.0 = Unicode Release|Win32
+ {F8FE2773-87CB-402F-8DC8-A80837C3E24C}.Unicode Static Release.ActiveCfg = Unicode Static Release|Win32
+ {F8FE2773-87CB-402F-8DC8-A80837C3E24C}.Unicode Static Release.Build.0 = Unicode Static Release|Win32
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection
diff --git a/stepmania/src/smpackage-net2003.vcproj b/stepmania/src/smpackage-net2003.vcproj
new file mode 100644
index 0000000000..3baf0e74f6
--- /dev/null
+++ b/stepmania/src/smpackage-net2003.vcproj
@@ -0,0 +1,328 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/stepmania/src/smpackage/IniFile.cpp b/stepmania/src/smpackage/IniFile.cpp
deleted file mode 100644
index 2b1b8040fe..0000000000
--- a/stepmania/src/smpackage/IniFile.cpp
+++ /dev/null
@@ -1,319 +0,0 @@
-/*
------------------------------------------------------------------------------
- File: IniFile.h
-
- Desc: Wrapper for reading and writing an .ini file.
-
- Copyright (c) 2001-2002 by the persons listed below. All rights reserved.
------------------------------------------------------------------------------
-*/
-
-#include "stdafx.h"
-#include "IniFile.h"
-#include "RageUtil.h"
-
-
-//constructor, can specify pathname here instead of using SetPath later
-IniFile::IniFile(CString inipath)
-{
- path = inipath;
-}
-
-//default destructor
-IniFile::~IniFile()
-{
-
-}
-
-// sets path of ini file to read and write from
-void IniFile::SetPath(CString newpath)
-{
- path = newpath;
-}
-
-
-void IniFile::ReadBuf( const CString &buf )
-{
- CString keyname;
- CStringArray lines;
- split(buf, "\n", lines, true);
- for( unsigned i = 0; i < lines.size(); ++i )
- {
- CString line = lines[i];
-
- if(line.GetLength() >= 3 &&
- line[0] == '\xef' &&
- line[1] == '\xbb' &&
- line[2] == '\xbf'
- )
- {
- /* Obnoxious NT marker for UTF-8. Remove it. */
- line.Delete(0, 3);
- }
-
- StripCrnl(line);
-
- if( line.IsEmpty() )
- continue;
- if ((line.GetLength() >= 2 && line[0] == '/' && line[1] == '/') )
- continue; /* comment */
- if( line[0] == '#')
- continue; /* comment */
-
- if (line[0] == '[' && line[line.GetLength()-1] == ']') //if a section heading
- {
- keyname = line;
- keyname.Delete(0);
- keyname.Delete(keyname.GetLength()-1);
- }
- else //if a value
- {
- int iEqualIndex = line.Find("=");
- if( iEqualIndex != -1 )
- {
- CString valuename = line.Left(iEqualIndex);
- CString value = line.Right(line.GetLength()-valuename.GetLength()-1);
- SetValue(keyname,valuename,value);
- }
- }
- }
-}
-
-void IniFile::WriteBuf( CString &buf ) const
-{
- buf = "";
- for (keymap::const_iterator k = keys.begin(); k != keys.end(); ++k)
- {
- if (k->second.empty())
- continue;
-
- buf += ssprintf( "[%s]\r\n", (const char *) k->first );
-
- for (key::const_iterator i = k->second.begin(); i != k->second.end(); ++i)
- buf += ssprintf( "%s=%s\r\n", (const char *)i->first, (const char *)i->second );
-
- buf += ssprintf( "\r\n" );
- }
-}
-
-
-// reads ini file specified using IniFile::SetPath()
-// returns true if successful, false otherwise
-bool IniFile::ReadFile()
-{
- FILE *f = fopen(path, "rb");
-
- if (f == NULL)
- {
- error = ssprintf("Unable to open ini file: %s", strerror(errno));
- return 0;
- }
-
- int size = GetFileSizeInBytes(path);
- char *buf = new char[size+1];
- int ret = fread(buf, 1, size, f);
- if ( ret != size )
- {
- if( ferror(f) )
- error = ssprintf("Unable to read ini file: %s", strerror(errno));
- else
- error = ssprintf("Unexpected eof in INI");
- delete[] buf;
- fclose(f);
-
- return false;
- }
-
- ReadBuf(buf);
-
- delete[] buf;
- fclose(f);
- return true;
-}
-
-// writes data stored in class to ini file
-void IniFile::WriteFile()
-{
- CString buf;
- WriteBuf( buf );
- FILE* fp = fopen( path, "wb" );
-
- if( fp == NULL )
- return;
-
- fwrite(buf.GetBuffer(0), buf.GetLength(), 1, fp);
- fclose( fp );
-}
-
-// deletes all stored ini data
-void IniFile::Reset()
-{
- keys.clear();
-}
-
-// returns number of keys currently in the ini
-int IniFile::GetNumKeys() const
-{
- return keys.size();
-}
-
-// returns number of values stored for specified key, or -1 if key not found
-int IniFile::GetNumValues(const CString &keyname) const
-{
- keymap::const_iterator k = keys.find(keyname);
- if (k == keys.end())
- return -1;
-
- return k->second.size();
-}
-
-// gets value of [keyname] valuename =
-bool IniFile::GetValue(const CString &keyname, const CString &valuename, CString& value) const
-{
- keymap::const_iterator k = keys.find(keyname);
- if (k == keys.end())
- {
- error = "Unable to locate specified key.";
- return false;
- }
-
- key::const_iterator i = k->second.find(valuename);
-
- if (i == k->second.end())
- {
- error = "Unable to locate specified value.";
- return false;
- }
-
- value = i->second;
- return true;
-}
-
-// gets value of [keyname] valuename =
-bool IniFile::GetValueI(const CString &keyname, const CString &valuename, int& value) const
-{
- CString sValue;
- if( !GetValue(keyname,valuename,sValue) )
- return false;
- sscanf( sValue, "%d", &value );
- return true;
-}
-
-bool IniFile::GetValueU(const CString &keyname, const CString &valuename, unsigned &value) const
-{
- CString sValue;
- if( !GetValue(keyname,valuename,sValue) )
- return false;
- sscanf( sValue, "%u", &value );
- return true;
-}
-
-// gets value of [keyname] valuename =
-bool IniFile::GetValueF(const CString &keyname, const CString &valuename, float& value) const
-{
- CString sValue;
- if( !GetValue(keyname,valuename,sValue) )
- return false;
- sscanf( sValue, "%f", &value );
- return true;
-}
-
-// gets value of [keyname] valuename =
-bool IniFile::GetValueB(const CString &keyname, const CString &valuename, bool& value) const
-{
- CString sValue;
- if( !GetValue(keyname,valuename,sValue) )
- return false;
- value = atoi(sValue) != 0;
- return true;
-}
-
-// sets value of [keyname] valuename =.
-// specify the optional paramter as false (0) if you do not want it to create
-// the key if it doesn't exist. Returns true if data entered, false otherwise
-bool IniFile::SetValue(const CString &keyname, const CString &valuename, const CString &value, bool create)
-{
- if (!create && keys.find(keyname) == keys.end()) //if key doesn't exist
- return false; // stop entering this key
-
- // find value
- if (!create && keys[keyname].find(valuename) == keys[keyname].end())
- return false;
-
- keys[keyname][valuename] = value;
- return true;
-}
-
-// sets value of [keyname] valuename =.
-// specify the optional paramter as false (0) if you do not want it to create
-// the key if it doesn't exist. Returns true if data entered, false otherwise
-bool IniFile::SetValueI(const CString &keyname, const CString &valuename, int value, bool create)
-{
- return SetValue(keyname, valuename, ssprintf("%d",value), create);
-}
-
-bool IniFile::SetValueU(const CString &keyname, const CString &valuename, unsigned value, bool create)
-{
- return SetValue(keyname, valuename, ssprintf("%u",value), create);
-}
-
-bool IniFile::SetValueF(const CString &keyname, const CString &valuename, float value, bool create)
-{
- return SetValue(keyname, valuename, ssprintf("%f",value), create);
-}
-
-bool IniFile::SetValueB(const CString &keyname, const CString &valuename, bool value, bool create)
-{
- return SetValue(keyname, valuename, ssprintf("%d",value), create);
-}
-
-// deletes specified value
-// returns true if value existed and deleted, false otherwise
-bool IniFile::DeleteValue(const CString &keyname, const CString &valuename)
-{
- keymap::iterator k = keys.find(keyname);
- if (k == keys.end())
- return false;
-
- key::iterator i = k->second.find(valuename);
- if(i == k->second.end())
- return false;
-
- k->second.erase(i);
- return true;
-}
-
-// deletes specified key and all values contained within
-// returns true if key existed and deleted, false otherwise
-bool IniFile::DeleteKey(const CString &keyname)
-{
- keymap::iterator k = keys.find(keyname);
- if (k == keys.end())
- return false;
-
- keys.erase(k);
- return true;
-}
-
-const IniFile::key *IniFile::GetKey(const CString &keyname) const
-{
- keymap::const_iterator i = keys.find(keyname);
- if(i == keys.end()) return NULL;
- return &i->second;
-}
-
-void IniFile::SetValue(const CString &keyname, const key &key)
-{
- keys[keyname]=key;
-}
-
-void IniFile::RenameKey(const CString &from, const CString &to)
-{
- if(keys.find(from) == keys.end())
- return;
- if(keys.find(to) != keys.end())
- return;
-
- keys[to] = keys[from];
- keys.erase(from);
-}
diff --git a/stepmania/src/smpackage/IniFile.h b/stepmania/src/smpackage/IniFile.h
deleted file mode 100644
index d6c9e39ae4..0000000000
--- a/stepmania/src/smpackage/IniFile.h
+++ /dev/null
@@ -1,111 +0,0 @@
-#ifndef INIFILE_H
-#define INIFILE_H
-/*
------------------------------------------------------------------------------
- Class: IniFile
-
- Desc: Wrapper for reading and writing an .ini file.
-
- Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
- Adam Clauss
- Chris Danford
------------------------------------------------------------------------------
-*/
-
-#include