- [Psy-X] fix CD warnings

This commit is contained in:
Ilya Shurumov 2021-04-17 20:59:52 +06:00
parent 176b096a65
commit f787df5d5d
2 changed files with 21 additions and 7 deletions

View File

@ -1658,8 +1658,6 @@ void DrawGame(void)
return;
}
static int frame = 0;
if (NumPlayers == 1 || NoPlayerControl)
{
ObjectDrawnValue = FrameCnt;

View File

@ -140,6 +140,19 @@ void _eCdControlF_Pause();
//----------------------------------------------------------
int PsyX_CD_CheckImageAvailable()
{
if (g_UseCDImage)
{
if (g_imageFp == NULL)
eprintwarn("WARNING - CD subsystem is not initialized yet!\n");
else
return 1;
}
return 0;
}
CdlFILE* CdSearchFile(CdlFILE* fp, char* name)
{
char pathPart[16];
@ -152,11 +165,8 @@ CdlFILE* CdSearchFile(CdlFILE* fp, char* name)
memset(fp, 0, sizeof(CdlFILE));
if (g_imageFp == NULL)
{
eprintwarn("WARNING - CD subsystem is not initialized yet!\n");
if (!PsyX_CD_CheckImageAvailable())
return NULL;
}
assert(g_cdReadDoneFlag == true);
@ -276,7 +286,7 @@ int CdControl(u_char com, u_char * param, u_char * result)
g_CD_com = com;
if (g_imageFp == NULL)
if (!PsyX_CD_CheckImageAvailable())
return 0;
switch (com)
@ -312,6 +322,9 @@ int CdControlB(u_char com, u_char* param, u_char* result)
{
int ret;
if (!PsyX_CD_CheckImageAvailable())
return 0;
ret = 0;
switch (com)
@ -356,6 +369,9 @@ int CdControlF(u_char com, u_char * param)
g_CD_com = com;
if (!PsyX_CD_CheckImageAvailable())
return 0;
switch (com)
{
case CdlSetloc: