Commit Graph

783 Commits

Author SHA1 Message Date
Chris Danford 366bc7cd13 add ScreenEdit::EditModifiers
add AutoKeysounds support to ScreenEdit
TODO: The gameplay portion of the editor should push a ScreenGameplay onto the Screen stack.  There's a lot of unnecessary duplication in ScreenEdit.
2007-04-24 05:42:44 +00:00
Glenn Maynard 1067755333 allow alternate loop music for music wheel 2007-04-06 18:34:43 +00:00
Steve Checkoway 31b6d174a0 These note skins don't exist any more. Replace with default for now. 2007-04-02 08:42:23 +00:00
Glenn Maynard c0a6373693 fix rate in editor 2007-03-17 03:24:00 +00:00
Glenn Maynard bd30e42c23 don't join p2; causes both players to show in options 2007-03-17 03:17:39 +00:00
Glenn Maynard 9426495b82 noisy 2007-03-17 03:14:11 +00:00
Glenn Maynard d74382fe07 fix rendering 2007-03-17 00:24:25 +00:00
Chris Danford 0160e23705 style cleanup: use FOREACH_ENUM( X, x ) everywhere instead of FOREACH_X( x ) for consistency
The FOREACH_X defines are not very useful, and they were created back before FOREACH_ENUM was convenient.
2007-02-23 22:29:42 +00:00
Chris Danford f77647b5ad enum name cleanup: DIFFICULTY_* -> Difficulty_* 2007-02-22 07:18:05 +00:00
Chris Danford 491ab6eaf5 StyleType enum name cleanup 2007-02-22 06:56:17 +00:00
Chris Danford 599db61b62 Always call LoadAllCommands explicitly.
The hack to LoadAllCommands when playing a command was leading to weird interactions: If a theme element contained an OnCommand, it would cause the rest of the commands defined in metrics to not be loaded.
2007-02-19 09:30:07 +00:00
Chris Danford f7fc9ceaa5 remove Set/GetHidden, leave *Visible
remove hidden from ActorCommands eventually
2007-02-13 06:32:26 +00:00
Glenn Maynard 745237c812 fix:
"// FIXME: This logic fails if the user starts a new steps, changes to
// a different stepchart, and then exits without saving"
2007-02-03 02:14:25 +00:00
Glenn Maynard a41f0c0dec SetSavedToDisk in Save(), not in SM_SaveSuccessful. When we save the
whole file, all steps are saved to disk; we were only marking the
active steps.  This sequence would cause steps to be wrongly deleted:
 1: create easy and medium steps for one steps type; save
 2: on another steps type, edit easy steps which were autogenned from the above
        change the steps
 3: f6 to change to medium steps steps which were autogenned from the above
 4: menu -> save
        This will save all data, but only medium will be marked saved to disk.
 5: f5 to change back to easy steps
 6: menu -> exit
        This will delete the easy steps, because they were not marked saved to disk.
2007-02-03 00:55:52 +00:00
Glenn Maynard 9e6aab166c fix base calls 2007-02-02 08:01:29 +00:00
Glenn Maynard 2ba3523f0e only ScreenEdit::CheckNumberOfNotesAndUndo in EditMode_Home 2007-02-02 06:49:49 +00:00
Chris Danford 12b49d0b26 remove EditButtons for autoplay and tick. They can be toggled with ScreenDebugOverlay. 2007-01-25 11:14:10 +00:00
Chris Danford 179f1b6480 add metronome
rename tick -> clap because "tick" implies a regular interval
2007-01-25 11:03:41 +00:00
Chris Danford 253461000c move common PlayTicks code into GameplayAssist 2007-01-25 00:50:57 +00:00
Glenn Maynard 008ea63793 SOUND->GetPlayLatency -> SOUNDMAN->GetPlayLatency 2007-01-18 09:12:50 +00:00
Chris Danford 4e5219cedd SubType_INVALID -> SubType_Invalid 2007-01-15 23:47:55 +00:00
Chris Danford 46a774b5f4 SubType_invalid -> SubType_INVALID 2007-01-15 23:09:23 +00:00
Glenn Maynard 58065fa455 MenuButton -> GameButton 2007-01-13 03:47:36 +00:00
Glenn Maynard 7385c1f4c1 merge SetPosition_Accurate and SetPosition_Fast. Use a property
instead.
2006-12-10 08:59:13 +00:00
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