diff --git a/blupi.cpp b/blupi.cpp index 6cbbf82..6658b84 100644 --- a/blupi.cpp +++ b/blupi.cpp @@ -42,7 +42,6 @@ CPixmap* g_pPixmap = NULL; // pixmap principal CSound* g_pSound = NULL; // sound principal CMovie* g_pMovie = NULL; // movie principal CDecor* g_pDecor = NULL; -char g_CDPath[MAX_PATH]; // chemin d'accès au CD-Rom bool g_bFullScreen = false; // false si mode de test int g_speedRate = 1; int g_timerInterval = 50; // inverval = 50ms @@ -86,53 +85,6 @@ bool ReadConfig(LPSTR lpCmdLine) buffer[nb] = 0; fclose(file); -#if 0 - pText = strstr(buffer, "CD-Rom="); - if ( pText == NULL ) - { -#if _DEMO - GetCurrentDirectory(MAX_PATH, g_CDPath); - i = strlen(g_CDPath); - if ( i > 0 && g_CDPath[i-1] != '\\' ) - { - g_CDPath[i++] = '\\'; - g_CDPath[i] = 0; // met le terminateur - } -#else - return false; -#endif - } - else - { - pText += 7; - i = 0; - while ( pText[i] != 0 && pText[i] != '\n' && pText[i] != '\r' ) - { - g_CDPath[i] = pText[i]; - i ++; - } - if ( i > 0 && g_CDPath[i-1] != '\\' ) - { - g_CDPath[i++] = '\\'; - } - g_CDPath[i] = 0; // met le terminateur - } - -#if !_DEMO & !_EGAMES - if ( strstr(lpCmdLine, "-nocd") == NULL ) - { - char drive[10]; - - drive[0] = g_CDPath[0]; - drive[1] = ':'; - drive[2] = '\\'; - drive[3] = 0; - nb = GetDriveType(drive); - if ( nb != DRIVE_CDROM ) return false; - } -#endif -#endif - pText = strstr(buffer, "SpeedRate="); if ( pText != NULL ) { diff --git a/decio.cpp b/decio.cpp index 0304261..190f957 100644 --- a/decio.cpp +++ b/decio.cpp @@ -109,10 +109,6 @@ bool CDecor::Write(int rank, bool bUser, int world, int time, int total) else { sprintf(filename, "data\\world%.3d.blp", rank); - if ( rank < 200 ) - { - AddCDPath(filename); // ajoute l'accès au CD-Rom - } } file = fopen(filename, "wb"); @@ -196,10 +192,6 @@ bool CDecor::Read(int rank, bool bUser, int &world, int &time, int &total) else { sprintf(filename, "data\\world%.3d.blp", rank); - if ( rank < 200 ) - { - AddCDPath(filename); // ajoute l'accès au CD-Rom - } } file = fopen(filename, "rb"); @@ -337,10 +329,6 @@ bool CDecor::FileExist(int rank, bool bUser, int &world, int &time, int &total) else { sprintf(filename, "data\\world%.3d.blp", rank); - if ( rank < 200 ) - { - AddCDPath(filename); // ajoute l'accès au CD-Rom - } } file = fopen(filename, "rb"); diff --git a/event.cpp b/event.cpp index 8000a47..e9eb61f 100644 --- a/event.cpp +++ b/event.cpp @@ -2849,10 +2849,6 @@ bool CEvent::ChangePhase(UINT phase) { sprintf(filename, table[m_index].backName, GetImageWorld()); } - if ( table[m_index].bCDrom ) // sur le CD-rom ? - { - AddCDPath(filename); - } totalDim.x = LXIMAGE; totalDim.y = LYIMAGE; iconDim.x = 0; @@ -3133,35 +3129,30 @@ bool CEvent::ChangePhase(UINT phase) if ( phase == WM_PHASE_H0MOVIE ) { strcpy(m_movieToStart, "movie\\history0.avi"); - AddCDPath(m_movieToStart); m_phaseAfterMovie = WM_PHASE_HISTORY0; } if ( phase == WM_PHASE_H1MOVIE ) { strcpy(m_movieToStart, "movie\\history1.avi"); - AddCDPath(m_movieToStart); m_phaseAfterMovie = WM_PHASE_HISTORY1; } if ( phase == WM_PHASE_H2MOVIE ) { strcpy(m_movieToStart, "movie\\history2.avi"); - AddCDPath(m_movieToStart); m_phaseAfterMovie = WM_PHASE_INFO; } if ( phase == WM_PHASE_PLAYMOVIE ) { sprintf(m_movieToStart, "movie\\play%.3d.avi", GetPhysicalWorld()); - AddCDPath(m_movieToStart); m_phaseAfterMovie = WM_PHASE_PLAY; } if ( phase == WM_PHASE_WINMOVIE ) { sprintf(m_movieToStart, "movie\\win%.3d.avi", GetPhysicalWorld()); - AddCDPath(m_movieToStart); m_phaseAfterMovie = WM_PHASE_WIN; if ( !m_bPrivate && @@ -4423,7 +4414,6 @@ bool CEvent::DemoPlayStart() memset(m_pDemoBuffer, 0, MAXDEMO*sizeof(DemoEvent)); sprintf(filename, "data\\demo%.3d.blp", m_demoNumber); - AddCDPath(filename); // ajoute l'accès au CD-Rom file = fopen(filename, "rb"); if ( file == NULL ) { diff --git a/misc.cpp b/misc.cpp index 016b61f..30c0875 100644 --- a/misc.cpp +++ b/misc.cpp @@ -14,8 +14,6 @@ HINSTANCE g_hInstance; extern bool g_bFullScreen; // false si mode de test extern int g_mouseType; -extern char g_CDPath[MAX_PATH]; - // Initialise HInstance. @@ -115,46 +113,6 @@ void GetCurrentDir(char *pName, size_t lg) } } - -// Ajoute le chemin permettant de lire un fichier -// sur le CD-Rom. - -void AddCDPath(char *pFilename) -{ - char temp[MAX_PATH]; - size_t lg; - bool bDaniel = false; - - if ( g_CDPath[0] == 0 ) return; - - lg = strlen(g_CDPath); - if ( lg > 14 && strstr(g_CDPath+lg-14, "\\daniel\\blupi\\") ) - { - bDaniel = true; - } - -#if _DEMO - strcpy(temp, g_CDPath); - strcat(temp, pFilename); -#else - if ( !bDaniel && - (strstr(pFilename, "image\\") == pFilename || - strstr(pFilename, "movie\\") == pFilename) ) - { - strcpy(temp, g_CDPath); - strcat(temp, "..\\"); - strcat(temp, pFilename); - } - else - { - strcpy(temp, g_CDPath); - strcat(temp, pFilename); - } -#endif - - strcpy(pFilename, temp); -} - // Ajoute le chemin permettant de lire un fichier // utilisateur. @@ -166,8 +124,6 @@ void AddUserPath(char *pFilename) char last; SECURITY_ATTRIBUTES att; - if ( g_CDPath[0] != 0 ) return; - #if _EGAMES strcpy(temp, "c:\\Planet Blupi Full\\"); #if _DEMO diff --git a/misc.h b/misc.h index 83451f0..ad07aa4 100644 --- a/misc.h +++ b/misc.h @@ -13,7 +13,6 @@ extern void InitRandom(); extern int Random(int min, int max); extern void GetCurrentDir(char *pName, size_t lg); -extern void AddCDPath(char *pFilename); extern void AddUserPath(char *pFilename); extern void TraceErrorDD(HRESULT hErr, char *sFile, int nLine);