Commit Graph

759 Commits

Author SHA1 Message Date
Steve Checkoway 3637f83f69 Unused. 2006-12-01 18:22:22 +00:00
John Bauer aedcc9f208 Factor out a call to GameState::ResetOptions. Also, move the state that
keeps track of whether NoteSkin was changed or not into GameState.
2006-11-30 19:29:15 +00:00
Glenn Maynard c241a4aaf8 m_fRate -> m_fSpeed 2006-11-30 07:32:38 +00:00
Glenn Maynard bf1c726c80 set m_fRate directly 2006-11-30 06:42:51 +00:00
John Bauer 0d7f657453 Restore the EditorNoteSkinP[1,2] options, although I'm still not convinced
they're actually used anywhere.
2006-11-28 20:04:11 +00:00
John Bauer f5adc9686d Reorder some includes. 2006-11-28 19:08:27 +00:00
John Bauer be09ae8e81 Make it so that the default NoteSkin when playing in EditMode is "note",
not "default".  Earlier it was set so that it would be that way if the user
didn't pick any options, but after the user changed options, ScreenEdit
would use the "default" NoteSkin.  This involved adding a bit of static
state to ScreenEdit so that between calls to GAMESTATE::Reset,
new incarnations of ScreenEdits would keep the user's settings.
2006-11-28 18:55:20 +00:00
Glenn Maynard f0dab15f30 move AutoPlay 2006-11-21 05:02:55 +00:00
Glenn Maynard 0db4a096e5 ScreenWithMenuElements::BeginScreen calls SortByDrawOrder 2006-11-21 04:32:59 +00:00
Glenn Maynard a5f5fa0b78 HandleMessage( Message ) 2006-11-13 23:11:25 +00:00
John Bauer e15285ab55 Fix SongManager::Invalidate. Call it from places it is needed:
ScreenEdit::RevertFromDisk, ScreenEdit's Save routine, and
ScreenEditMenu's Delete Steps routine.  This fixes the bug where
deleting a step chart sometimes causes interesting behavior
but usually just causes a CTD next time you run Oni mode.  It also makes
sure data precalculated from the songs is correctly recalculated when
ScreenEdit changes a song.
2006-11-13 17:07:42 +00:00
John Bauer cca2d60509 Fix RevertFromDisk using a method that preserves as many of the original
Steps* pointers as possible.  It is pointless to get rid of RevertFromDisk
entirely because all of the unpleasant side effects it can have are possible
using other tools in the editor.
2006-11-12 16:49:00 +00:00
John Bauer 4b21ed256c Alternate fix for some of the bugs that exist when choose a different
stepchart in edit mode.
2006-11-12 06:30:14 +00:00
Glenn Maynard 3470b7b41f fix changing steps in the editor doesn't update last saved, causing
steps to be reverted incorrectly
2006-11-12 03:52:48 +00:00
Glenn Maynard 3961ea4c2d partial fix: don't load into an already-loaded song 2006-11-12 03:38:57 +00:00
Glenn Maynard c6e62ae92d revert. Need a better approach. 2006-11-12 03:26:25 +00:00
John Bauer c3e39e12a3 Fix several annoying edit mode bugs, mostly by fixing the Song copy
operator and the various uses of it.

- revert file from disk: keeps old BPM.  The BPMS on disk are added to
  the existing BPM information!
- edit mode turns X stepcharts into 2X when reverting
- sometimes edit mode loses an entire stepchart: open a stepchart,
  change to a new stepchart, exit without going back, original chart gone
- edit a chart, make a change in a different chart, exit from the first chart:
  change made in different chart doesn't revert
- normally, when you create a stepchart and don't save it after editting it,
  it is deleted.  however, if you create a stepchart, don't save it, and exit
  edit mode while looking at a different chart, the chart isn't deleted.

Some existing bugs are not fixed, though:
- delete the last stepchart for a step type.  CTD.
- Edit one of the fake doubles stepcharts for a song that doesn't have
  real doubles stepcharts.  Exit without doing anything.  CTD.  This is
  probably the same problem as the previous bug.
- delete a song or a steps that happens to be part of a trail.  Trail is now
  broken.  Some other edits should affect a trail as well, but don't.
2006-11-10 07:02:27 +00:00
Glenn Maynard 28724eb156 SongChanged -> SongModified (confusing with CurrentSongChanged) 2006-11-09 04:32:23 +00:00
Steve Checkoway 0ed39a2f5e No persistent data so make it a namespace. 2006-11-04 23:28:33 +00:00
John Bauer 592c27996d Originally, the AdjustSync class always saved to disk, even in edit mode.
In edit mode, though, AdjustSync should only save to memory, giving the
user a chance to save later.  This change adds a SongChanged message
to the MessageManager.  Making the ScreenEdit class listen to this
message allows the AdjustSync class to mark a song as dirty rather than
saving it to disk when in edit mode.

R=steve chekoway
2006-11-02 05:30:02 +00:00
John Bauer db38f88c39 In ScreenEdit, figure out whether a song is dirty or not by keeping track
of a m_bDirty bit, not by reusing the m_bHasUndo bit.  This fixes two bugs:
1) Save & revert wouldn't clear the dirty bit before
2) Some operations such as tempo and stop changes wouldn't make
the song dirty

R=Steve Chekoway
2006-11-02 04:57:17 +00:00
John Bauer 37f9178f61 Add an "Autosync Tempo" feature. This uses a linear Least Squares
Regression to figure out a line through the user's step errors to minimize
that error.  It then uses the slope of that line to fix the tempo and the
intercept to fix the offset.  Stops are adjusted as if they were originally
calculated as a number of beats, ie the slope is also used to change
the stops.

Also fixed is a bug where the user doesn't get a chance to keep or
reject the sync changes when ESCing (ZZing) from a song.

R=glenn
2006-10-26 22:41:40 +00:00
Steve Checkoway e87789da7c Rename XToString2 to XToString. 2006-10-15 00:09:18 +00:00
Steve Checkoway 04bff6bc1d Use XToString2. 2006-10-15 00:00:22 +00:00
Glenn Maynard 2ce839e4eb Invalid 2006-10-07 04:25:28 +00:00
Steve Checkoway 2ead045397 Something is already pulling this in in ScreenEdit.h. 2006-10-02 00:40:22 +00:00
Glenn Maynard a8dd0c5fdc GetCurrentStyle() 2006-09-30 22:13:20 +00:00
Glenn Maynard 24a6df7b9d simplify 2006-09-30 05:33:47 +00:00
Glenn Maynard 6b03924681 NUM_EditButton, EditButton_Invalid 2006-09-27 04:37:01 +00:00
Glenn Maynard b9a189711e cleanups 2006-09-26 20:41:53 +00:00
Glenn Maynard 2fbe882366 ThemeMetric<EditMode> 2006-09-26 03:19:37 +00:00
Steve Checkoway a4aa69b148 Remove ThemeMetricEnum. Since all metrics are evaluated as lua, use lua integer constants. 2006-09-23 07:21:26 +00:00
Glenn Maynard 3f40f6c796 unneeded 2006-09-15 06:06:36 +00:00
Glenn Maynard e7fdfa2132 prefer GAMESTATE->JoinPlayer to setting GAMESTATE->m_bSideIsJoined manually 2006-09-15 05:56:43 +00:00
Glenn Maynard ab45febba3 simplify 2006-09-14 21:02:14 +00:00
Glenn Maynard 13fb874cc6 MenuInputToEditButton -> MenuButtonToEditButton 2006-09-14 20:58:05 +00:00
Glenn Maynard c7dfb9f2ec MenuInput -> MenuButton 2006-09-14 20:52:34 +00:00
Glenn Maynard dd2f259a2f MenuInput -> MenuButton 2006-09-14 20:45:51 +00:00
Glenn Maynard f1cd95828e remove MenuInput.IsValid(); if invalid, the button is simply MenuButton_INVALID 2006-09-14 20:31:46 +00:00
Glenn Maynard c9c88f26c2 input.MenuI.player -> input.pn 2006-09-14 03:18:16 +00:00
Glenn Maynard 3183dcf60b GameInputToStyleInput -> GameInputToColumn 2006-09-13 09:22:24 +00:00
Glenn Maynard e206261b80 ARRAYSIZE -> ARRAYLEN 2006-09-13 03:11:38 +00:00
Glenn Maynard c71d8f7425 IET_SLOW_REPEAT -> IET_REPEAT 2006-09-13 02:59:05 +00:00
Glenn Maynard d03db0c4f9 remove IET_FAST_REPEAT 2006-09-13 02:55:19 +00:00
Glenn Maynard e04a48128d IET_FAST_REPEAT is the same as IET_SLOW_REPEAT, sent instead
after the button has been held a while.  It hasn't actually been a different
repeat rate for a very long time, and was partially phased out a while ago.
Now it's just used to see if the button has been held a while.  Do that with
GetSecsHeld instead.
2006-09-13 02:44:03 +00:00
Glenn Maynard d7e4bf7817 remove InputMapper::StyleToGame(StyleI) 2006-09-13 01:54:16 +00:00
Glenn Maynard d6ad18f73e remove InputMapper::IsBeingPressed(StyleI) 2006-09-13 01:45:10 +00:00
Glenn Maynard 9f54f1b248 remove InputMapper::GetSecsHeld(StyleI) 2006-09-13 01:38:10 +00:00
Glenn Maynard e4d0b41da1 Stop using Input.StyleI. Just convert it when needed; the vast majority
of screens don't.
2006-09-13 01:29:33 +00:00
Glenn Maynard 1ca5c9a4b7 reduce StyleInput to an int 2006-09-13 00:46:21 +00:00