reverted all src changes from rev95 commit (because all old work was just removed)
git-svn-id: https://clonekeenplus.svn.sourceforge.net/svnroot/clonekeenplus/cgenius/trunk@107 4df4b0f3-56ce-47cb-b001-ed939b7d65a6
This commit is contained in:
@@ -27,7 +27,6 @@
|
||||
|
||||
CGame::CGame() {
|
||||
m_Episode = 0;
|
||||
memset(m_DataDirectory,0,256);
|
||||
|
||||
TileLoader = NULL;
|
||||
EGAGraphics = NULL;
|
||||
@@ -218,15 +217,13 @@ short CGame::runCycle(stCloneKeenPlus *pCKP)
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool CGame::loadResources(unsigned short Episode, char *DataDirectory)
|
||||
bool CGame::loadResources(unsigned short Episode, const std::string& DataDirectory)
|
||||
{
|
||||
m_Episode = Episode;
|
||||
memcpy(m_DataDirectory, DataDirectory, 256);
|
||||
m_DataDirectory = DataDirectory;
|
||||
|
||||
int pos = strlen(DataDirectory)-1;
|
||||
if(pos == -1) pos =0;
|
||||
if( ( *(DataDirectory+pos) != '/' ) && strlen(DataDirectory) > 0)
|
||||
strcat(DataDirectory,"/");
|
||||
if( m_DataDirectory.size() > 0 && m_DataDirectory[m_DataDirectory.size()-1] != '/' )
|
||||
m_DataDirectory += "/";
|
||||
|
||||
// Decode the entire graphics for the game (EGALATCH, EGASPRIT)
|
||||
EGAGraphics = new CEGAGraphics(Episode, DataDirectory); // Path is relative to the data dir
|
||||
@@ -289,8 +286,6 @@ void CGame::preallocateCKP(stCloneKeenPlus *pCKP)
|
||||
pCKP->GameData = NULL;
|
||||
pCKP->GameData = new stGameData[1];
|
||||
|
||||
memset(pCKP->GameData, 0, sizeof(stGameData));
|
||||
|
||||
framebyframe = 0;
|
||||
|
||||
demomode = DEMO_NODEMO;
|
||||
|
||||
Reference in New Issue
Block a user