tasedit bug fixes and enable turbo hotkey during tasedit

This commit is contained in:
zeromus 2008-06-28 23:39:35 +00:00
parent 033ae55048
commit b3469ceb85
2 changed files with 9 additions and 5 deletions

View File

@ -310,13 +310,14 @@ static void DeleteFrames()
//the column set operation, for setting a button for a span of selected values
static void ColumnSet(int column)
{
int button = column-2;
int joy = (column-2)/8;
int button = (column-2)%8;
//inspect the selected frames. count the set and unset rows
int set=0, unset=0;
for(TSelectionFrames::iterator it(selectionFrames.begin()); it != selectionFrames.end(); it++)
{
if(currMovieData.records[*it].checkBit(0,button))
if(currMovieData.records[*it].checkBit(joy,button))
set++;
else unset++;
}
@ -343,7 +344,7 @@ static void ColumnSet(int column)
//operate on the data and update the listview
for(TSelectionFrames::iterator it(selectionFrames.begin()); it != selectionFrames.end(); it++)
{
currMovieData.records[*it].setBitValue(0,button,newValue);
currMovieData.records[*it].setBitValue(joy,button,newValue);
//we would do this if we wanted to update the affected record. but that results in big operations
//redrawing once per item set, which causes it to flicker and take forever.
//so now we rely on the update at the end.
@ -633,6 +634,9 @@ BOOL CALLBACK WndprocTasEdit(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
void DoTasEdit()
{
if(!FCEU_IsValidUI(FCEUI_TASEDIT))
return;
if(!hmenu)
{
hmenu = LoadMenu(fceu_hInstance,"TASEDITMENU");

View File

@ -632,8 +632,8 @@ struct EMUCMDTABLE FCEUI_CommandTable[]=
{ EMUCMD_SPEED_NORMAL, EMUCMDTYPE_SPEED, CommandEmulationSpeed, 0, 0, "Normal Speed", 0 },
{ EMUCMD_SPEED_FASTER, EMUCMDTYPE_SPEED, CommandEmulationSpeed, 0, 0, "Speed Up", 0 },
{ EMUCMD_SPEED_FASTEST, EMUCMDTYPE_SPEED, CommandEmulationSpeed, 0, 0, "Fastest Speed", 0 },
{ EMUCMD_SPEED_TURBO, EMUCMDTYPE_SPEED, FCEUD_TurboOn, FCEUD_TurboOff, 0, "Turbo", 0 },
{ EMUCMD_SPEED_TURBO_TOGGLE, EMUCMDTYPE_SPEED, FCEUD_TurboToggle, 0, 0, "Turbo Toggle", 0 },
{ EMUCMD_SPEED_TURBO, EMUCMDTYPE_SPEED, FCEUD_TurboOn, FCEUD_TurboOff, 0, "Turbo", EMUCMDFLAG_TASEDIT },
{ EMUCMD_SPEED_TURBO_TOGGLE, EMUCMDTYPE_SPEED, FCEUD_TurboToggle, 0, 0, "Turbo Toggle", EMUCMDFLAG_TASEDIT },
{ EMUCMD_SAVE_SLOT_0, EMUCMDTYPE_STATE, CommandSelectSaveSlot, 0, 0, "Savestate Slot 0", 0 },
{ EMUCMD_SAVE_SLOT_1, EMUCMDTYPE_STATE, CommandSelectSaveSlot, 0, 0, "Savestate Slot 1", 0 },