JubeatPlus 3.9.11
Loading...
Searching...
No Matches
EditViewController Class Reference

The chart-editor top-level view controller. More...

#include <EditViewController.h>

Inheritance diagram for EditViewController:
Collaboration diagram for EditViewController:

Instance Methods

(instancetype) - init
 Initialises the editor: reads the saved adjust-sector offset, resolves the device idiom, builds the EAGLView sized to the screen, and resets the editing state.
(nullable NSString *) - getDirectoryPath:
 Resolves (creating if needed) the on-disk directory for a tune's edit charts.
(void) - loadNotesData
 Loads the note data for the current tune from EditDataManager into the editor state.
(void) - importNotesData:
 Imports a downloaded chart file into the editor, merging its metadata over the current editor info.
(void) - autoSave:
 Bumps the auto-save counter and saves the chart when it overflows or when forced.
(void) - saveNotesData
 Persists the current chart, its editor info, and its summary data to disk.
(void) - resetEditMember
 Resets the editor's per-session state to its defaults.
(void) - setGridButton:type:pos:
 Sets a grid button's image and frame from a division type and origin.
(void) - loadView
 Builds and lays out the editor's OpenGL view and button bar.
(void) - loadResources
 Loads the button images, renderer, sequence, audio, and artwork for the current chart.
(void) - releaseResources
 Tears down the renderer, sequence, framebuffer, and audio resources.
(void) - saveScore
 Discarded persistence stub kept for the interface.
(void) - startAnimation
 Starts the per-frame display link that drives loop: .
(void) - stopAnimation
 Stops the per-frame display link.
(void) - finishMusic:
 Handles the BGM-finished notification by clearing the playing flag.
(void) - addNote:
 Adds notes to the sequence at every held panel, warning when the marker limit is hit.
(void) - deleteNote
 Deletes notes from the sequence at every held panel.
(void) - stopMusic
 Stops BGM playback and restores the play button image.
(void) - controllMusic
 Clamps playback to the sequence duration and stops music when it runs past the end.
(void) - loop:
 The display-link callback: reads touches, updates the sequence, and draws a frame.
(void) - exeClap
 Plays the clap sound effect when the sequence passes a clap point.
(void) - startGame
 Starts play mode: re-reads the adjust offset, resets the sequence, and applies prefs.
(void) - pushBtnPause:
 Toggles BGM playback from the pause button.
(void) - deletePasteBtn
 Hides the paste button.
(void) - changeModeImage:
 Sets the mode button's background image from an image resource name.
(void) - pushBtnAdd:
 Switches to add mode.
(void) - pushBtnDelete:
 Switches to delete mode.
(void) - pushBtnMode:
 Toggles between the two edit modes.
(void) - longPressBtnMode:
 Presents the add/delete mode popover on a long press of the mode button.
(void) - pinchGesture:
 Applies the pinch gesture's scale to the renderer.
(void) - pushBtnUndo:
 Applies an undo and auto-saves.
(void) - pushBtnRedo:
 Applies a redo and auto-saves.
(void) - pushbtnSysMenu:
 Presents the system-menu popover from the system-menu button.
(void) - pushBtnGridChange:
 Presents the grid-division popover from the grid button.
(void) - selectGridType:
 Applies a grid-division type, updating the button image and the renderer.
(void) - longPressEnable:
 Enables or disables the editor buttons and renderer panel during a long press.
(void) - ReleaseSelectArea
 Clears the current area selection.
(void) - pushAreaCopy:
 Copies the selected area into the paste buffer.
(void) - pushAreaDelete:
 Deletes the selected area.
(void) - pushAreaPaste:
 Pastes the paste buffer at the paste sector, warning on conflict.
(void) - pushAreaPaste2:
 Pastes the paste buffer at the current sector.
(void) - pushClap:
 Toggles the clap sound effect on or off.
(void) - pushHelp:
 Presents the how-to help popover.
(void) - pushRewind:
 Rewinds playback to the current measure start.
(void) - createTimeLineView
 Builds the timeline scrubbing view and its gesture recognisers.
(void) - handleSwipe:
 Reads the swipe direction (result discarded).
(void) - resetPaste
 Resets the paste selection.
(void) - resetLongPress
 Resets the long-press area selection.
(void) - resetGesture
 Resets both the paste and long-press selections.
(void) - longPressGesture:
 Begins an area selection on a long press of the timeline.
(void) - tapGesture:
 Resets the current selection on a single tap of the timeline.
(void) - dpGesture:
 Positions the paste button at the double-tapped sector.
(void) - resumeInPauseView
 Resumes animation and BGM when returning from a paused popover.
(void) - endInPauseView
 Ends the edit session and returns to the root controller from a paused popover.
(void) - end
 Dismisses the editor and ends the session.
(void) - suspend
 Suspends the editor when backgrounded, saving if playing.
(void) - resume
 Resumes the editor's animation.
(void) - terminate
 Fully resets the editor to a clean state, releasing per-chart resources.
(void) - templateRelease
 Releases the system-menu popover reference.
(void) - selectLoadSlot:
 The system-menu load-slot selection callback.
(void) - selectExit
 The system-menu exit selection callback.
(void) - selectSave
 Presents the save-confirmation alert, warning about conflicting markers.
(void) - editFileListViewCancel
 The file-list cancel callback (no-op).
(void) - editFileListViewDecideItem:
 The file-list decide callback (no-op).
(void) - popoverPresentationControllerDidDismissPopover:
 Clears the ignore-press flag when a popover is dismissed.
(void) - editBtnSelect:tag:
 The editor-button popover selection callback.
(void) - alertSelect:
 The confirmation-alert button callback: routes save, load, and exit confirmations.
(void) - editModalViewClose:
 Dismisses the metadata modal.
(void) - editModalViewDelegateSaveEditFile
 Saves the edited metadata after the modal reports a save.
(float) - adjustTime:
 Applies the adjust-time offset, clamped to zero.
(float) - reverseAdjustTime:
 Removes the adjust-time offset, clamped to zero.
Instance Methods inherited from <AlertViewManagerDelegate>
(void) - alertSelect:
 Sent when the user taps a button in an alert built with makeAlert:.
(void) - alertClose:
 Sent when a UIAlertController -based alert finishes dismissing.
Instance Methods inherited from <EditButtonViewControllerDelegate>
(void) - editBtnSelect:tag:
 Sent when one of the buttons is tapped.
Instance Methods inherited from <EditModalViewDelegate>
(void) - editModalViewClose:
 Sent when the modal is dismissed.
(void) - selectUpdate:
 Sent when the edited entry should be re-selected after saving.
Instance Methods inherited from <EditFileListViewDelegate>
(void) - editFileListViewSelectItem:
 Sent when a chart is chosen.

Properties

TuneInfo * currentTune
 The tune being edited.
NSString * jcfName
 The saved chart file name.
unsigned int currentDiff
 The current difficulty.
NSString * currentMarker
 The current marker resource name.
NSData * musicData
 The compressed music data for the current chart.
EAGLView * glView
 The OpenGL view.
EditNoteRenderer * mainGameRenderer
 The edit-mode note renderer.
CADisplayLink * displayLink
 The per-frame display link driving loop: .
EditSequence * sequence
 The editable note sequence.
UIButton * btnPause
 The pause / play button.
UIButton * btnMode
 The add/delete mode button.
UIButton * btnSysMenu
 The system-menu button.
UIButton * btnClap
 The clap-toggle button.
UIImageView * clapBtnView
 The clap button's decorative image view.
UIButton * btnRewind
 The rewind button.
UIButton * btnHelp
 The help button.
UIButton * btnSelGrid
 The grid-division button.
UIButton * btnAreaCpy
 The area-copy button.
UIButton * btnAreaDel
 The area-delete button.
UIButton * btnAreaPst
 The area-paste button.
UIButton * btnUndo
 The undo button.
UIButton * btnRedo
 The redo button.
NSArray * editData
 The loaded sequence table for the current chart.
NSMutableDictionary * editorInfo
 The editor metadata dictionary.
NSMutableDictionary * editSimpleData
 The summary metadata dictionary.
UIView * timeLineView
 The timeline scrubbing view.

Detailed Description

The chart-editor top-level view controller.

Method Documentation

◆ addNote:

- (void) addNote: (BOOL) isSwitch

Adds notes to the sequence at every held panel, warning when the marker limit is hit.

Parameters
isSwitchWhether the add is a mode-switch add.
Ghidra address:
0x21d750
Ghidra address:
0x21d750

◆ adjustTime:

- (float) adjustTime: (float) time

Applies the adjust-time offset, clamped to zero.

Parameters
timeThe raw time.
Returns
The adjusted time.
Ghidra address:
0x223484
Ghidra address:
0x223484

◆ alertSelect:

- (void) alertSelect: (nullable NSDictionary *) info

The confirmation-alert button callback: routes save, load, and exit confirmations.

Parameters
infoThe alert result dictionary.
Ghidra address:
0x223144

◆ autoSave:

- (void) autoSave: (BOOL) force

Bumps the auto-save counter and saves the chart when it overflows or when forced.

Parameters
forceWhether to save immediately regardless of the counter.
Ghidra address:
0x21a1a4
Ghidra address:
0x21a1a4

◆ changeModeImage:

- (void) changeModeImage: (nullable NSString *) imageName

Sets the mode button's background image from an image resource name.

Parameters
imageNameThe image resource name.
Ghidra address:
0x21ff8c

◆ controllMusic

- (void) controllMusic

Clamps playback to the sequence duration and stops music when it runs past the end.

Ghidra address:
0x21daac

◆ createTimeLineView

- (void) createTimeLineView

Builds the timeline scrubbing view and its gesture recognisers.

Ghidra address:
0x221840

◆ deleteNote

- (void) deleteNote

Deletes notes from the sequence at every held panel.

Ghidra address:
0x21d92c

◆ deletePasteBtn

- (void) deletePasteBtn

Hides the paste button.

Ghidra address:
0x21ff3c

◆ dpGesture:

- (void) dpGesture: (nullable UITapGestureRecognizer *) gesture

Positions the paste button at the double-tapped sector.

Parameters
gestureThe double-tap recogniser.
Ghidra address:
0x221ffc

◆ editBtnSelect:tag:

- (void) editBtnSelect: (nullable EditButtonViewController *) controller
tag: (nullable NSDictionary *) info 

The editor-button popover selection callback.

Parameters
controllerThe button popover.
infoThe selection info dictionary.
Ghidra address:
0x222fec

◆ editFileListViewCancel

- (void) editFileListViewCancel

The file-list cancel callback (no-op).

Ghidra address:
0x222fd4

◆ editFileListViewDecideItem:

- (void) editFileListViewDecideItem: (int) index

The file-list decide callback (no-op).

Parameters
indexThe chosen row.
Ghidra address:
0x222fd8
Ghidra address:
0x222fd8

◆ editModalViewClose:

- (void) editModalViewClose: (nullable EditModalView *) view

Dismisses the metadata modal.

Parameters
viewThe modal being closed.
Ghidra address:
0x2233e0

◆ editModalViewDelegateSaveEditFile

- (void) editModalViewDelegateSaveEditFile

Saves the edited metadata after the modal reports a save.

Ghidra address:
0x2233f4

Reimplemented from <EditModalViewDelegate>.

◆ end

- (void) end

Dismisses the editor and ends the session.

Ghidra address:
0x222474

◆ endInPauseView

- (void) endInPauseView

Ends the edit session and returns to the root controller from a paused popover.

Ghidra address:
0x222380

◆ exeClap

- (void) exeClap

Plays the clap sound effect when the sequence passes a clap point.

Ghidra address:
0x21fab0

◆ finishMusic:

- (void) finishMusic: (nullable NSNotification *) notification

Handles the BGM-finished notification by clearing the playing flag.

Parameters
notificationThe finish notification.
Ghidra address:
0x21d6e8

◆ getDirectoryPath:

- (NSString *) getDirectoryPath: (unsigned int) tuneID

Resolves (creating if needed) the on-disk directory for a tune's edit charts.

Parameters
tuneIDThe tune identifier.
Returns
The chart directory path.
Ghidra address:
0x219860
Ghidra address:
0x219860

◆ handleSwipe:

- (void) handleSwipe: (nullable UISwipeGestureRecognizer *) gesture

Reads the swipe direction (result discarded).

Parameters
gestureThe swipe recogniser.
Ghidra address:
0x221af4

◆ importNotesData:

- (void) importNotesData: (nullable NSString *) fileName

Imports a downloaded chart file into the editor, merging its metadata over the current editor info.

Parameters
fileNameThe chart file to import.
Ghidra address:
0x219cac

◆ init

- (instancetype) init

Initialises the editor: reads the saved adjust-sector offset, resolves the device idiom, builds the EAGLView sized to the screen, and resets the editing state.

Returns
The initialised controller.
Ghidra address:
0x21aa54
Ghidra address:
0x21aa54

◆ loadNotesData

- (void) loadNotesData

Loads the note data for the current tune from EditDataManager into the editor state.

Ghidra address:
0x219a14

◆ loadResources

- (void) loadResources

Loads the button images, renderer, sequence, audio, and artwork for the current chart.

Ghidra address:
0x21bb44

◆ loadView

- (void) loadView

Builds and lays out the editor's OpenGL view and button bar.

Ghidra address:
0x21ae3c

◆ longPressBtnMode:

- (void) longPressBtnMode: (nullable UILongPressGestureRecognizer *) gesture

Presents the add/delete mode popover on a long press of the mode button.

Parameters
gestureThe long-press recogniser.
Ghidra address:
0x220128

◆ longPressEnable:

- (void) longPressEnable: (BOOL) enable

Enables or disables the editor buttons and renderer panel during a long press.

Parameters
enableWhether the controls are enabled.
Ghidra address:
0x220ce0
Ghidra address:
0x220ce0

◆ longPressGesture:

- (void) longPressGesture: (nullable UILongPressGestureRecognizer *) gesture

Begins an area selection on a long press of the timeline.

Parameters
gestureThe long-press recogniser.
Ghidra address:
0x221c7c

◆ loop:

- (void) loop: (nullable CADisplayLink *) displayLink

The display-link callback: reads touches, updates the sequence, and draws a frame.

Parameters
displayLinkThe display link that fired.
Ghidra address:
0x21dba8

◆ pinchGesture:

- (void) pinchGesture: (nullable UIPinchGestureRecognizer *) gesture

Applies the pinch gesture's scale to the renderer.

Parameters
gestureThe pinch recogniser.
Ghidra address:
0x220364

◆ popoverPresentationControllerDidDismissPopover:

- (void) popoverPresentationControllerDidDismissPopover: (nullable UIPopoverPresentationController *) popoverPresentationController

Clears the ignore-press flag when a popover is dismissed.

Parameters
popoverPresentationControllerThe dismissed popover controller.
Ghidra address:
0x222fdc

◆ pushAreaCopy:

- (void) pushAreaCopy: (nullable id) sender

Copies the selected area into the paste buffer.

Parameters
senderThe copy button.
Ghidra address:
0x220fe4

◆ pushAreaDelete:

- (void) pushAreaDelete: (nullable id) sender

Deletes the selected area.

Parameters
senderThe delete button.
Ghidra address:
0x2210a0

◆ pushAreaPaste2:

- (void) pushAreaPaste2: (nullable id) sender

Pastes the paste buffer at the current sector.

Parameters
senderThe paste button.
Ghidra address:
0x221408

◆ pushAreaPaste:

- (void) pushAreaPaste: (nullable id) sender

Pastes the paste buffer at the paste sector, warning on conflict.

Parameters
senderThe paste button.
Ghidra address:
0x221154

◆ pushBtnAdd:

- (void) pushBtnAdd: (nullable id) sender

Switches to add mode.

Parameters
senderThe add button.
Ghidra address:
0x21fff8

◆ pushBtnDelete:

- (void) pushBtnDelete: (nullable id) sender

Switches to delete mode.

Parameters
senderThe delete button.
Ghidra address:
0x220040

◆ pushBtnGridChange:

- (void) pushBtnGridChange: (nullable id) sender

Presents the grid-division popover from the grid button.

Parameters
senderThe grid button.
Ghidra address:
0x22087c

◆ pushBtnMode:

- (void) pushBtnMode: (nullable id) sender

Toggles between the two edit modes.

Parameters
senderThe mode button.
Ghidra address:
0x220088

◆ pushBtnPause:

- (void) pushBtnPause: (nullable id) sender

Toggles BGM playback from the pause button.

Parameters
senderThe pause button.
Ghidra address:
0x21fdc4

◆ pushBtnRedo:

- (void) pushBtnRedo: (nullable id) sender

Applies a redo and auto-saves.

Parameters
senderThe redo button.
Ghidra address:
0x2204f8

◆ pushbtnSysMenu:

- (void) pushbtnSysMenu: (nullable id) sender

Presents the system-menu popover from the system-menu button.

Parameters
senderThe system-menu button.
Ghidra address:
0x2205a4

◆ pushBtnUndo:

- (void) pushBtnUndo: (nullable id) sender

Applies an undo and auto-saves.

Parameters
senderThe undo button.
Ghidra address:
0x22044c

◆ pushClap:

- (void) pushClap: (nullable id) sender

Toggles the clap sound effect on or off.

Parameters
senderThe clap button.
Ghidra address:
0x2214b0

◆ pushHelp:

- (void) pushHelp: (nullable id) sender

Presents the how-to help popover.

Parameters
senderThe help button.
Ghidra address:
0x2215c8

◆ pushRewind:

- (void) pushRewind: (nullable id) sender

Rewinds playback to the current measure start.

Parameters
senderThe rewind button.
Ghidra address:
0x221740

◆ releaseResources

- (void) releaseResources

Tears down the renderer, sequence, framebuffer, and audio resources.

Ghidra address:
0x21d38c

◆ ReleaseSelectArea

- (void) ReleaseSelectArea

Clears the current area selection.

Ghidra address:
0x220f30

◆ resetEditMember

- (void) resetEditMember

Resets the editor's per-session state to its defaults.

Ghidra address:
0x21a94c

◆ resetGesture

- (void) resetGesture

Resets both the paste and long-press selections.

Ghidra address:
0x221c48

◆ resetLongPress

- (void) resetLongPress

Resets the long-press area selection.

Ghidra address:
0x221b9c

◆ resetPaste

- (void) resetPaste

Resets the paste selection.

Ghidra address:
0x221b04

◆ resume

- (void) resume

Resumes the editor's animation.

Ghidra address:
0x222594

◆ resumeInPauseView

- (void) resumeInPauseView

Resumes animation and BGM when returning from a paused popover.

Ghidra address:
0x222298

◆ reverseAdjustTime:

- (float) reverseAdjustTime: (float) time

Removes the adjust-time offset, clamped to zero.

Parameters
timeThe adjusted time.
Returns
The raw time.
Ghidra address:
0x2234a0
Ghidra address:
0x2234a0

◆ saveNotesData

- (void) saveNotesData

Persists the current chart, its editor info, and its summary data to disk.

Ghidra address:
0x21a1d8

◆ saveScore

- (void) saveScore

Discarded persistence stub kept for the interface.

Ghidra address:
0x21d4d0

◆ selectExit

- (void) selectExit

The system-menu exit selection callback.

Ghidra address:
0x222d78

◆ selectGridType:

- (void) selectGridType: (int) type

Applies a grid-division type, updating the button image and the renderer.

Parameters
typeThe grid-division type.
Ghidra address:
0x220b50
Ghidra address:
0x220b50

◆ selectLoadSlot:

- (void) selectLoadSlot: (nullable NSNumber *) slot

The system-menu load-slot selection callback.

Parameters
slotThe chosen slot number.
Ghidra address:
0x222b8c

◆ selectSave

- (void) selectSave

Presents the save-confirmation alert, warning about conflicting markers.

Ghidra address:
0x222db4

◆ setGridButton:type:pos:

- (void) setGridButton: (nullable UIButton *) button
type: (int) type
pos: (CGPoint) pos 

Sets a grid button's image and frame from a division type and origin.

Parameters
buttonThe grid button to configure.
typeThe grid-division type.
posThe button's origin.
Ghidra address:
0x21ad04

◆ startAnimation

- (void) startAnimation

Starts the per-frame display link that drives loop: .

Ghidra address:
0x21d4d4

◆ startGame

- (void) startGame

Starts play mode: re-reads the adjust offset, resets the sequence, and applies prefs.

Ghidra address:
0x21fbd8

◆ stopAnimation

- (void) stopAnimation

Stops the per-frame display link.

Ghidra address:
0x21d654

◆ stopMusic

- (void) stopMusic

Stops BGM playback and restores the play button image.

Ghidra address:
0x21d9e0

◆ suspend

- (void) suspend

Suspends the editor when backgrounded, saving if playing.

Ghidra address:
0x2224b0

◆ tapGesture:

- (void) tapGesture: (nullable UITapGestureRecognizer *) gesture

Resets the current selection on a single tap of the timeline.

Parameters
gestureThe tap recogniser.
Ghidra address:
0x221f58

◆ templateRelease

- (void) templateRelease

Releases the system-menu popover reference.

Ghidra address:
0x222b4c

◆ terminate

- (void) terminate

Fully resets the editor to a clean state, releasing per-chart resources.

Ghidra address:
0x2225a0

The documentation for this class was generated from the following files: