This commit is contained in:
parent
610a809b29
commit
4c6762ef52
|
@ -12,6 +12,7 @@
|
|||
#include "keyboard.h"
|
||||
#include "joystick.h"
|
||||
#include "help.h"
|
||||
#include "main.h" //So we can use the GetRomName() function!
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
@ -36,6 +37,37 @@ static TSelectionFrames selectionFrames;
|
|||
//add a new fceud_ function?? blehhh maybe
|
||||
extern EMOVIEMODE movieMode;
|
||||
|
||||
//The project file struct
|
||||
struct TASEDIT_PROJECT
|
||||
{
|
||||
std::string mainFilename; //The main fm2's file name and location
|
||||
std::string getFilename();
|
||||
std::string setFilename();
|
||||
std::string projectFilename; //Name of the actual project's file
|
||||
};
|
||||
|
||||
TASEDIT_PROJECT project; //Create an instance of the project
|
||||
|
||||
std::string getFilename() //Get fm2 file name
|
||||
{
|
||||
return project.mainFilename; //Speaks for itself really!
|
||||
}
|
||||
|
||||
void setFilename(std::string e) //Guess what? Sets the project's fm2 file name!
|
||||
{
|
||||
project.mainFilename = e; //Yep
|
||||
}
|
||||
|
||||
std::string getProjectname() //Get TASEedit project's name
|
||||
{
|
||||
return project.projectFilename; //Speaks for itself really!
|
||||
}
|
||||
|
||||
void setProjectname(std::string e) //Guess what? Sets the project's name!
|
||||
{
|
||||
project.projectFilename = e; //Yep
|
||||
}
|
||||
|
||||
static void GetDispInfo(NMLVDISPINFO* nmlvDispInfo)
|
||||
{
|
||||
LVITEM& item = nmlvDispInfo->item;
|
||||
|
@ -528,6 +560,28 @@ static void NewProject()
|
|||
//if so, ask to save changes
|
||||
//close current project
|
||||
//create new project
|
||||
const char TPfilter[]="TASEdit Project (*.tas)\0*.tas\0";
|
||||
|
||||
OPENFILENAME ofn;
|
||||
memset(&ofn,0,sizeof(ofn));
|
||||
ofn.lStructSize=sizeof(ofn);
|
||||
ofn.hInstance=fceu_hInstance;
|
||||
ofn.lpstrTitle="Save TASEdit Project As...";
|
||||
ofn.lpstrFilter=TPfilter;
|
||||
|
||||
char nameo[2048];
|
||||
strcpy(nameo, GetRomName());
|
||||
|
||||
ofn.lpstrFile=nameo;
|
||||
ofn.nMaxFile=256;
|
||||
ofn.Flags=OFN_EXPLORER|OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT;
|
||||
string initdir = FCEU_GetPath(FCEUMKF_MOVIE);
|
||||
ofn.lpstrInitialDir=initdir.c_str();
|
||||
|
||||
if(GetSaveFileName(&ofn))
|
||||
{
|
||||
//TODO: Save project and reinitialise TASEdit
|
||||
}
|
||||
}
|
||||
|
||||
//Opens a new Project file
|
||||
|
|
Loading…
Reference in New Issue