- add 2nd player to tasedit
- fix bugs which broke movies with saveram which was added when 7zip was added - fix bugs in tasedit insert and delete
This commit is contained in:
parent
e8da728db3
commit
033ae55048
|
@ -1259,15 +1259,15 @@ BEGIN
|
|||
PUSHBUTTON "Metadata...",IDC_BUTTON_METADATA,239,71,50,14
|
||||
END
|
||||
|
||||
TASEDIT DIALOGEX 0, 0, 470, 349
|
||||
TASEDIT DIALOGEX 0, 0, 513, 356
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "TAS Editor"
|
||||
MENU TASEDITMENU
|
||||
FONT 8, "MS Shell Dlg", 400, 0, 0x1
|
||||
BEGIN
|
||||
CONTROL "",IDC_LIST1,"SysListView32",LVS_REPORT | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | LVS_OWNERDATA | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,7,7,273,296
|
||||
PUSHBUTTON "Hacky truncate after current frame",IDC_HACKY1,312,7,124,38
|
||||
LTEXT "I think this will prove useful enough for a hotkey at some point",IDC_STATIC,312,46,125,16
|
||||
CONTROL "",IDC_LIST1,"SysListView32",LVS_REPORT | LVS_SHOWSELALWAYS | LVS_ALIGNLEFT | LVS_OWNERDATA | LVS_NOSORTHEADER | WS_BORDER | WS_TABSTOP,7,7,302,342
|
||||
PUSHBUTTON "Hacky truncate after current frame",IDC_HACKY1,347,7,124,38
|
||||
LTEXT "I think this will prove useful enough for a hotkey at some point",IDC_STATIC,347,46,125,16
|
||||
END
|
||||
|
||||
ASSEMBLER DIALOGEX 0, 0, 202, 135
|
||||
|
@ -1444,9 +1444,9 @@ BEGIN
|
|||
"TASEDIT", DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 463
|
||||
RIGHTMARGIN, 506
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 342
|
||||
BOTTOMMARGIN, 349
|
||||
END
|
||||
|
||||
"ASSEMBLER", DIALOG
|
||||
|
|
|
@ -54,9 +54,19 @@ static void GetDispInfo(NMLVDISPINFO* nmlvDispInfo)
|
|||
case 6:
|
||||
case 7:
|
||||
case 8:
|
||||
case 9: {
|
||||
int bit = (item.iSubItem - 2);
|
||||
uint8 data = currMovieData.records[item.iItem].joysticks[0];
|
||||
case 9:
|
||||
case 10:
|
||||
case 11:
|
||||
case 12:
|
||||
case 13:
|
||||
case 14:
|
||||
case 15:
|
||||
case 16:
|
||||
case 17:
|
||||
{
|
||||
int joy = (item.iSubItem - 2)/8;
|
||||
int bit = (item.iSubItem - 2)%8;
|
||||
uint8 data = currMovieData.records[item.iItem].joysticks[joy];
|
||||
if(data & (1<<bit))
|
||||
{
|
||||
item.pszText[0] = MovieRecord::mnemonics[bit];
|
||||
|
@ -88,8 +98,13 @@ static LONG CustomDraw(NMLVCUSTOMDRAW* msg)
|
|||
return CDRF_NOTIFYSUBITEMDRAW;
|
||||
case CDDS_SUBITEMPREPAINT:
|
||||
SelectObject(msg->nmcd.hdc,debugSystem->hFixedFont);
|
||||
if((int)msg->nmcd.dwItemSpec < currMovieData.greenZoneCount)
|
||||
msg->clrTextBk = RGB(192,255,192);
|
||||
if((msg->iSubItem-2)/8==0)
|
||||
if((int)msg->nmcd.dwItemSpec < currMovieData.greenZoneCount)
|
||||
msg->clrTextBk = RGB(192,255,192);
|
||||
else {}
|
||||
else if((int)msg->nmcd.dwItemSpec < currMovieData.greenZoneCount)
|
||||
msg->clrTextBk = RGB(144,192,144);
|
||||
else msg->clrTextBk = RGB(192,192,192);
|
||||
return CDRF_DODEFAULT;
|
||||
default:
|
||||
return CDRF_DODEFAULT;
|
||||
|
@ -211,8 +226,9 @@ void DoubleClick(LPNMITEMACTIVATE info)
|
|||
else //if an input column was clicked:
|
||||
{
|
||||
//toggle the bit
|
||||
int bit = (info->iSubItem-2);
|
||||
currMovieData.records[index].toggleBit(0,bit);
|
||||
int joy = (info->iSubItem - 2)/8;
|
||||
int bit = (info->iSubItem - 2)%8;
|
||||
currMovieData.records[index].toggleBit(joy,bit);
|
||||
|
||||
//update the row
|
||||
ListView_Update(hwndList,index);
|
||||
|
@ -224,6 +240,23 @@ void DoubleClick(LPNMITEMACTIVATE info)
|
|||
}
|
||||
}
|
||||
|
||||
//removes all selections
|
||||
static void ClearSelection()
|
||||
{
|
||||
int frameCount = ListView_GetItemCount(hwndList);
|
||||
LVITEM lvi;
|
||||
lvi.mask = LVIF_STATE;
|
||||
lvi.state = 0;
|
||||
lvi.stateMask = LVIS_SELECTED;
|
||||
for(int i=0;i<frameCount;i++)
|
||||
{
|
||||
lvi.iItem = i;
|
||||
ListView_SetItem(hwndList,&lvi);
|
||||
}
|
||||
|
||||
selectionFrames.clear();
|
||||
}
|
||||
|
||||
//insert frames at the currently selected positions.
|
||||
static void InsertFrames()
|
||||
{
|
||||
|
@ -241,7 +274,6 @@ static void InsertFrames()
|
|||
}
|
||||
|
||||
InvalidateGreenZone(*selectionFrames.begin());
|
||||
|
||||
UpdateTasEdit();
|
||||
RedrawList();
|
||||
}
|
||||
|
@ -249,6 +281,13 @@ static void InsertFrames()
|
|||
//delete frames at the currently selected positions.
|
||||
static void DeleteFrames()
|
||||
{
|
||||
int frames = selectionFrames.size();
|
||||
|
||||
if(frames == currMovieData.records.size())
|
||||
{
|
||||
MessageBox(hwndTasEdit,"Please don't delete all of the frames in the movie. This violates an internal invariant we need to keep.","Error deleting",0);
|
||||
return;
|
||||
}
|
||||
//this is going to be _really_ slow.
|
||||
|
||||
//insert frames before each selection
|
||||
|
@ -263,7 +302,7 @@ static void DeleteFrames()
|
|||
//in the particular case of deletion, we need to make sure we reset currFrameCounter to something reasonable
|
||||
//why not the current green zone max?
|
||||
currFrameCounter = currMovieData.greenZoneCount-1;
|
||||
|
||||
ClearSelection();
|
||||
UpdateTasEdit();
|
||||
RedrawList();
|
||||
}
|
||||
|
@ -404,6 +443,22 @@ static void InitDialog()
|
|||
ListView_InsertColumn(hwndList, colidx++, &lvc);
|
||||
lvc.pszText = "R";
|
||||
ListView_InsertColumn(hwndList, colidx++, &lvc);
|
||||
lvc.pszText = "A";
|
||||
ListView_InsertColumn(hwndList, colidx++, &lvc);
|
||||
lvc.pszText = "B";
|
||||
ListView_InsertColumn(hwndList, colidx++, &lvc);
|
||||
lvc.pszText = "S";
|
||||
ListView_InsertColumn(hwndList, colidx++, &lvc);
|
||||
lvc.pszText = "T";
|
||||
ListView_InsertColumn(hwndList, colidx++, &lvc);
|
||||
lvc.pszText = "U";
|
||||
ListView_InsertColumn(hwndList, colidx++, &lvc);
|
||||
lvc.pszText = "D";
|
||||
ListView_InsertColumn(hwndList, colidx++, &lvc);
|
||||
lvc.pszText = "L";
|
||||
ListView_InsertColumn(hwndList, colidx++, &lvc);
|
||||
lvc.pszText = "R";
|
||||
ListView_InsertColumn(hwndList, colidx++, &lvc);
|
||||
//-----------------------------
|
||||
|
||||
//the initial update
|
||||
|
|
|
@ -302,7 +302,6 @@ int iNESLoad(const char *name, FCEUFILE *fp, int OverwriteVidMode);
|
|||
int FDSLoad(const char *name, FCEUFILE *fp);
|
||||
int NSFLoad(FCEUFILE *fp);
|
||||
|
||||
//mbg 6/25/08 - remove this one day
|
||||
//char lastLoadedGameName [2048] = {0,}; // hack for movie WRAM clearing on record from poweron
|
||||
|
||||
|
||||
|
@ -607,8 +606,11 @@ void hand(X6502 *X, int type, unsigned int A)
|
|||
}
|
||||
|
||||
int suppressAddPowerCommand=0; // hack... yeah, I know...
|
||||
void MapperInit();
|
||||
void PowerNES(void)
|
||||
{
|
||||
MapperInit();
|
||||
|
||||
if(!suppressAddPowerCommand)
|
||||
FCEUMOV_AddCommand(FCEUNPCMD_POWER);
|
||||
if(!GameInfo) return;
|
||||
|
@ -639,6 +641,8 @@ void PowerNES(void)
|
|||
if(GameInfo->type==GIT_VSUNI)
|
||||
FCEU_VSUniPower();
|
||||
|
||||
|
||||
|
||||
timestampbase=0;
|
||||
X6502_Power();
|
||||
FCEU_PowerCheats();
|
||||
|
|
|
@ -112,6 +112,7 @@ inline const char* ESIFC_Name(ESIFC esifc)
|
|||
typedef struct
|
||||
{
|
||||
uint8 *name; //Game name, UTF8 encoding
|
||||
int mappernum;
|
||||
|
||||
EGIT type;
|
||||
EGIV vidsys; //Current emulated video system;
|
||||
|
|
1748
src/ines.cpp
1748
src/ines.cpp
File diff suppressed because it is too large
Load Diff
|
@ -611,7 +611,10 @@ static void poweron(bool shouldDisableBatteryLoading)
|
|||
//"hack for movie WRAM clearing on record from poweron"
|
||||
//but W-T-F. are you telling me that there is some problem with the poweron sequence?
|
||||
//screw that. we're using the main poweron sequence, even if that breaks old movie compatibility (unlikely)
|
||||
extern int disableBatteryLoading;
|
||||
if(shouldDisableBatteryLoading) disableBatteryLoading=1;
|
||||
PowerNES();
|
||||
if(shouldDisableBatteryLoading) disableBatteryLoading=0;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue