Beispiel #1
0
void ALoad(const char* filename)
{
	pcejin.romLoaded = true;
	pcejin.started = true;
	if(!MDFNI_LoadGame(filename))
	{
		pcejin.started = false;
		pcejin.romLoaded = false;
		GameName = "";
		SetWindowText(g_hWnd, pcejin.versionName.c_str());
	}
	
	if (AutoRWLoad)
	{
		//Open Ram Watch if its auto-load setting is checked
		OpenRWRecentFile(0);
		RamWatchHWnd = CreateDialog(winClass.hInstance, MAKEINTRESOURCE(IDD_RAMWATCH), g_hWnd, (DLGPROC) RamWatchProc);
	}
	RecentROMs.UpdateRecentItems(filename);
	std::string romname = noExtension(RemovePath(filename));
	GameName = romname;
	std::string temp = pcejin.versionName;
	temp.append(" ");
	temp.append(romname);		
	SetWindowText(g_hWnd, temp.c_str());
}
Beispiel #2
0
std::string LoadMCM(const char* path, bool load) {

	std::string mc2;
	mc2 = noExtension(std::string(path));
	mc2 += ".mc2";
	mcmdump(path, mc2);
	if(load)
		FCEUI_LoadMovie(mc2.c_str(), 1, 0, 0);

	return mc2;
}
Beispiel #3
0
std::string LoadMCM(const char* path, bool load) {

	std::string mc2;
	mc2 = noExtension(std::string(path));
	mc2 += ".mc2";
	mcmdump(path, mc2);
	if(load)
	{
		LoadMovie(mc2.c_str(), 1, 0, 0);
		RecentMovies.UpdateRecentItems(mc2);
	}

	return mc2;
}
Beispiel #4
0
void LoadGame(){

	char szChoice[MAX_PATH]={0};
	OPENFILENAME ofn;
	ZeroMemory(&ofn, sizeof(ofn));
	ofn.lStructSize = sizeof(ofn);
	ofn.hwndOwner = g_hWnd;
	ofn.lpstrFilter = "PC Engine Files (*.pce, *.cue, *.toc, *.sgx *.zip)\0*.pce;*.cue;*.toc;*.sgx;*.zip\0All files(*.*)\0*.*\0\0";
	ofn.lpstrFile = (LPSTR)szChoice;
	ofn.lpstrTitle = "Select a file to open";
	ofn.lpstrDefExt = "pce";
	ofn.nMaxFile = MAX_PATH;
	ofn.Flags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT;
	if(GetOpenFileName(&ofn)) {
		pcejin.romLoaded = true;
		pcejin.started = true;
		if(strlen(szChoice) > 4 && (!strcasecmp(szChoice + strlen(szChoice) - 4, ".cue") || !strcasecmp(szChoice + strlen(szChoice) - 4, ".toc"))) {
			char ret[MAX_PATH];
			GetPrivateProfileString("Main", "Bios", "pce.cdbios PATH NOT SET", ret, MAX_PATH, IniName);
			if(std::string(ret) == "pce.cdbios PATH NOT SET") {
				pcejin.started = false;
				pcejin.romLoaded = false;
				MDFN_DispMessage("specify your PCE CD bios");
				return;
			}
		}
		if(!MDFNI_LoadGame(szChoice)) {
			pcejin.started = false;
			pcejin.romLoaded = false;
			
		}
		if (AutoRWLoad)
		{
			//Open Ram Watch if its auto-load setting is checked
			OpenRWRecentFile(0);
			RamWatchHWnd = CreateDialog(winClass.hInstance, MAKEINTRESOURCE(IDD_RAMWATCH), g_hWnd, (DLGPROC) RamWatchProc);
		}
		StopMovie();
		ResetFrameCount();
		RecentROMs.UpdateRecentItems(szChoice);

		std::string romname = noExtension(RemovePath(szChoice));
		std::string temp = pcejin.versionName;
		GameName = romname;
		temp.append(" ");
		temp.append(romname);
		SetWindowText(g_hWnd, temp.c_str());
	}
}
Beispiel #5
0
void LoadGame(){

	char szChoice[MAX_PATH]={0};
	OPENFILENAME ofn;
	ZeroMemory(&ofn, sizeof(ofn));
	ofn.lStructSize = sizeof(ofn);
	ofn.hwndOwner = g_hWnd;
	ofn.lpstrFilter = "VB Files (*.vb, *.zip)\0*.vb;*.zip\0All files(*.*)\0*.*\0\0";
	ofn.lpstrFile = (LPSTR)szChoice;
	ofn.lpstrTitle = "Select a file to open";
	ofn.lpstrDefExt = "vb";
	ofn.nMaxFile = MAX_PATH;
	ofn.Flags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT;
	if(GetOpenFileName(&ofn)) {
		pcejin.romLoaded = true;
		pcejin.started = true;
	
		if(!MDFNI_LoadGame(NULL,szChoice)) {
			pcejin.started = false;
			pcejin.romLoaded = false;
			
		}
		if (AutoRWLoad)
		{
			//Open Ram Watch if its auto-load setting is checked
			OpenRWRecentFile(0);
			RamWatchHWnd = CreateDialog(winClass.hInstance, MAKEINTRESOURCE(IDD_RAMWATCH), g_hWnd, (DLGPROC) RamWatchProc);
		}
		FCEUI_StopMovie();
		UpdateRecentRoms(szChoice);
		ResetFrameCount();
		UpdateTitleWithFilename(szChoice);
		std::string romname = noExtension(RemovePath(szChoice));
		std::string temp = pcejin.versionName;
		temp.append(" ");
		temp.append(romname);
		
		SetWindowText(g_hWnd, temp.c_str());
	}
}
Beispiel #6
0
/* append filename extension if there isn't one already. */
void defaultExtension( struct pgpfileBones *filebPtr, char *filename,
        char *extension )
{
    if (noExtension( filebPtr, filename ))
        strcat(filename, extension);
} /* default_extension */
Beispiel #7
0
/* deletes trailing ".xxx" file extension after the period. */
void dropExtension(struct pgpfileBones *filebPtr, char *filename )
{
    if (!noExtension( filebPtr, filename ))
        *strrchr(filename, '.') = '\0';
} /* drop_extension */