MIKMODAPI CHAR* Player_LoadTitleGeneric(MREADER *reader) { CHAR *result=NULL; if (reader) { MUTEX_LOCK(lists); result=Player_LoadTitle_internal(reader); MUTEX_UNLOCK(lists); } return result; }
MIKMODAPI CHAR* Player_LoadTitleFP(FILE *fp) { CHAR* result=NULL; MREADER* reader; if(fp && (reader=_mm_new_file_reader(fp))) { MUTEX_LOCK(lists); result=Player_LoadTitle_internal(reader); MUTEX_UNLOCK(lists); _mm_delete_file_reader(reader); } return result; }
MIKMODAPI CHAR* Player_LoadTitleMem(const char *buffer,int len) { CHAR *result=NULL; MREADER* reader; if ((reader=_mm_new_mem_reader(buffer,len))) { MUTEX_LOCK(lists); result=Player_LoadTitle_internal(reader); MUTEX_UNLOCK(lists); _mm_delete_mem_reader(reader); } return result; }
MIKMODAPI CHAR* Player_LoadTitle(CHAR* filename) { CHAR* result=NULL; FILE* fp; MREADER* reader; if((fp=_mm_fopen(filename,"rb"))) { if((reader=_mm_new_file_reader(fp))) { MUTEX_LOCK(lists); result=Player_LoadTitle_internal(reader); MUTEX_UNLOCK(lists); _mm_delete_file_reader(reader); } _mm_fclose(fp); } return result; }