Exemplo n.º 1
0
/* Load an audio file */
static bool dataAudioCfgLoad(const char* fileName, void **ppData)
{
	bool success;
	PHYSFS_file* fileHandle;

	*ppData = NULL;

	if (audio_Disabled())
	{
		return true;
	}
	debug(LOG_WZ, "Reading...[directory: %s] %s", PHYSFS_getRealDir(fileName), fileName);
	fileHandle = PHYSFS_openRead(fileName);

	if (fileHandle == NULL)
	{
		return false;
	}

	success = ParseResourceFile(fileHandle);

	PHYSFS_close(fileHandle);

	return success;
}
Exemplo n.º 2
0
BASEANIM *anim_LoadFromFile(PHYSFS_file *fileHandle)
{
    if (ParseResourceFile(fileHandle) == false)
    {
        ASSERT(false, "Couldn't parse file");
        return NULL;
    }

    /* loaded anim is at head of list */
    return g_animGlobals.psAnimList.front();
}
Exemplo n.º 3
0
BASEANIM *
anim_LoadFromBuffer( UBYTE *pBuffer, UDWORD size )
{
	if ( ParseResourceFile( pBuffer, size ) == FALSE )
	{
		DBERROR( ("anim_LoadFromBuffer: couldn't parse file\n") );
		return NULL;
	}

	/* loaded anim is at head of list */
	return g_animGlobals.psAnimList;
}