1
0
mirror of https://github.com/blupi-games/planetblupi synced 2024-12-30 10:15:36 +01:00

Remove useless cdrom stuff

This commit is contained in:
Mathieu Schroeter 2017-01-31 17:58:25 +01:00
parent 223ec0c5bc
commit 2956051dbf
5 changed files with 0 additions and 115 deletions

View File

@ -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 )
{

View File

@ -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");

View File

@ -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 )
{

View File

@ -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

1
misc.h
View File

@ -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);