Files
itgmania212121/stepmania/src/ScreenEdit.h
T

169 lines
4.0 KiB
C++
Raw Normal View History

/*
2002-05-20 08:59:37 +00:00
-----------------------------------------------------------------------------
2002-06-29 11:59:09 +00:00
Class: ScreenEdit
2002-05-20 08:59:37 +00:00
2002-06-29 11:59:09 +00:00
Desc: Edit, record, playback, or synchronize notes.
2002-05-20 08:59:37 +00:00
Copyright (c) 2001-2002 by the person(s) listed below. All rights reserved.
2002-06-29 11:59:09 +00:00
Chris Danford
2002-05-20 08:59:37 +00:00
-----------------------------------------------------------------------------
*/
#include "Screen.h"
#include "Sprite.h"
#include "TransitionFade.h"
#include "BitmapText.h"
#include "Player.h"
#include "RandomSample.h"
#include "FocusingSprite.h"
2003-01-02 07:54:28 +00:00
#include "RageSoundManager.h"
#include "RageSound.h"
2002-05-20 08:59:37 +00:00
#include "MotionBlurSprite.h"
2002-10-08 00:39:31 +00:00
#include "BGAnimation.h"
#include "SnapDisplay.h"
2002-05-20 08:59:37 +00:00
const int NUM_ACTION_MENU_ITEMS = 23;
const int NUM_NAMING_MENU_ITEMS = 6;
2002-08-17 06:44:04 +00:00
2002-05-20 08:59:37 +00:00
class ScreenEdit : public Screen
{
public:
ScreenEdit();
virtual ~ScreenEdit();
virtual void Update( float fDeltaTime );
virtual void DrawPrimitives();
virtual void Input( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI );
void InputEdit( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI );
void InputRecord( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI );
void InputPlay( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI );
virtual void HandleScreenMessage( const ScreenMessage SM );
protected:
void TransitionFromRecordToEdit();
void TransitionToEdit();
bool PlayTicks() const;
2002-05-20 08:59:37 +00:00
void OnSnapModeChange();
void MenuItemGainFocus( BitmapText* menuitem );
void MenuItemLoseFocus( BitmapText* menuitem );
2002-05-20 08:59:37 +00:00
2003-02-18 23:15:38 +00:00
enum EditMode { MODE_EDITING, MODE_RECORDING, MODE_PLAYING };
2002-07-28 20:28:37 +00:00
EditMode m_EditMode;
2002-05-20 08:59:37 +00:00
Song* m_pSong;
2002-07-02 00:27:58 +00:00
Notes* m_pNotes;
2002-05-20 08:59:37 +00:00
2002-10-08 00:39:31 +00:00
BGAnimation m_BGAnimation;
2002-05-20 08:59:37 +00:00
2002-10-08 00:39:31 +00:00
NoteField m_NoteFieldEdit;
SnapDisplay m_SnapDisplay;
GrayArrowRow m_GrayArrowRowEdit;
2002-05-20 08:59:37 +00:00
2003-02-18 23:15:38 +00:00
Sprite m_sprHelp;
2002-10-08 00:39:31 +00:00
BitmapText m_textHelp;
2003-02-18 23:15:38 +00:00
Sprite m_sprInfo;
BitmapText m_textInfo; // status information that changes
2002-05-20 08:59:37 +00:00
// keep track of where we are and what we're doing
float m_fTrailingBeat; // this approaches GAMESTATE->m_fSongBeat, which is the actual beat
/* The location we were at when shift was pressed, or
* -1 when shift isn't pressed: */
float shiftAnchor;
2002-05-20 08:59:37 +00:00
2003-02-18 23:15:38 +00:00
float m_fDestinationScrollSpeed;
2002-06-29 11:59:09 +00:00
NoteData m_Clipboard;
2002-05-20 08:59:37 +00:00
2003-01-02 08:13:34 +00:00
RageSound m_soundChangeLine;
RageSound m_soundChangeSnap;
RageSound m_soundMarker;
RageSound m_soundInvalid;
2002-05-20 08:59:37 +00:00
2002-06-29 11:59:09 +00:00
TransitionFade m_Fade;
2002-05-20 08:59:37 +00:00
// for MODE_RECORD
2002-06-29 11:59:09 +00:00
NoteField m_NoteFieldRecord;
GrayArrowRow m_GrayArrowRowRecord;
2002-05-20 08:59:37 +00:00
// for MODE_PLAY
Player m_Player;
2002-05-20 08:59:37 +00:00
// for MODE_RECORD and MODE_PLAY
2002-08-17 06:44:04 +00:00
Quad m_rectRecordBack;
RageSound m_soundMusic;
2002-08-17 06:44:04 +00:00
int m_iRowLastCrossed;
2003-01-02 08:13:34 +00:00
RageSound m_soundAssistTick;
2003-02-18 23:15:38 +00:00
public:
enum MainMenuChoice {
edit_notes_statistics,
play_whole_song,
save,
player_options,
song_options,
edit_song_info,
edit_bpm,
edit_stop,
edit_bg_change,
play_preview_music,
exit,
NUM_MAIN_MENU_CHOICES
};
void HandleMainMenuChoice( MainMenuChoice c, int* iAnswers );
enum AreaMenuChoice {
cut,
copy,
paste,
clear,
quantize,
transform,
play,
record,
insert_and_shift,
delete_and_shift,
NUM_AREA_MENU_CHOICES
};
void HandleAreaMenuChoice( AreaMenuChoice c, int* iAnswers );
2003-02-20 00:57:52 +00:00
enum TransformType { little, wide, big, quick, left, right, mirror, shuffle, super_shuffle, backwards, swap_sides, NUM_TRANSFORM_TYPES };
2003-02-18 23:15:38 +00:00
enum EditNotesStatisticsChoice {
difficulty,
meter,
description,
tap_notes,
hold_notes,
stream,
voltage,
air,
freeze,
chaos,
NUM_EDIT_NOTES_STATISTICS_CHOICES
};
void HandleEditNotesStatisticsChoice( EditNotesStatisticsChoice c, int* iAnswers );
enum EditSongInfoChoice {
main_title,
sub_title,
artist,
main_title_transliteration,
sub_title_transliteration,
artist_transliteration,
NUM_EDIT_SONG_INFO_CHOICES
};
void HandleEditSongInfoChoice( EditSongInfoChoice c, int* iAnswers );
2002-05-20 08:59:37 +00:00
};