| 702 | } |
| 703 | |
| 704 | void AutoFire(void) |
| 705 | { |
| 706 | static int counter = 0; |
| 707 | if (justLagged == false) |
| 708 | { |
| 709 | //counter = (counter + 1) % (8 * 7 * 5 * 3); |
| 710 | counter = (counter + 1) % AutoFirePatternLength; |
| 711 | } |
| 712 | //If recording a movie, use the frame # for the autofire so the offset |
| 713 | //doesn't get screwed up when loading. |
| 714 | if (FCEUMOV_Mode(MOVIEMODE_RECORD | MOVIEMODE_PLAY)) |
| 715 | { |
| 716 | //rapidAlternator = AutoFirePattern[(AutoFireOffset + FCEUMOV_GetFrame()) % AutoFirePatternLength]; //adelikat: TODO: Think through this, MOVIEMODE_FINISHED should not use movie data for auto-fire? |
| 717 | //adelikat: TODO: Think through this, MOVIEMODE_FINISHED should not use movie data for auto-fire? |
| 718 | rapidAlternator = ( (AutoFireOffset + FCEUMOV_GetFrame()) % AutoFirePatternLength ) < AFon; |
| 719 | } |
| 720 | else |
| 721 | { |
| 722 | //rapidAlternator = AutoFirePattern[(AutoFireOffset + counter) % AutoFirePatternLength]; |
| 723 | rapidAlternator = ( (AutoFireOffset + counter) % AutoFirePatternLength ) < AFon; |
| 724 | } |
| 725 | } |
| 726 | |
| 727 | void UpdateAutosave(void); |
| 728 |
no test coverage detected