| 358 | return false; |
| 359 | } |
| 360 | bool EDITOR::handleInputColumnSetUsingPattern(int joy, int button) |
| 361 | { |
| 362 | if (joy < 0 || joy >= joysticksPerFrame[getInputType(currMovieData)]) return false; |
| 363 | |
| 364 | RowsSelection* current_selection = selection.getCopyOfCurrentRowsSelection(); |
| 365 | if (current_selection->size() == 0) return false; |
| 366 | RowsSelection::iterator current_selection_begin(current_selection->begin()); |
| 367 | RowsSelection::iterator current_selection_end(current_selection->end()); |
| 368 | int pattern_offset = 0, current_pattern = taseditorConfig.currentPattern; |
| 369 | |
| 370 | for(RowsSelection::iterator it(current_selection_begin); it != current_selection_end; it++) |
| 371 | { |
| 372 | // skip lag frames |
| 373 | if (taseditorConfig.autofirePatternSkipsLag && greenzone.lagLog.getLagInfoAtFrame(*it) == LAGGED_YES) |
| 374 | continue; |
| 375 | currMovieData.records[*it].setBitValue(joy, button, patterns[current_pattern][pattern_offset] != 0); |
| 376 | pattern_offset++; |
| 377 | if (pattern_offset >= (int)patterns[current_pattern].size()) |
| 378 | pattern_offset -= patterns[current_pattern].size(); |
| 379 | } |
| 380 | int first_changes = history.registerChanges(MODTYPE_PATTERN, *current_selection_begin, *current_selection->rbegin(), 0, patternsNames[current_pattern].c_str()); |
| 381 | if (first_changes >= 0) |
| 382 | { |
| 383 | greenzone.invalidateAndUpdatePlayback(first_changes); |
| 384 | return true; |
| 385 | } else |
| 386 | return false; |
| 387 | } |
| 388 | void EDITOR::setMarkers() |
| 389 | { |
| 390 | RowsSelection* current_selection = selection.getCopyOfCurrentRowsSelection(); |
no test coverage detected