|
JubeatPlus 3.9.11
|
The in-game play view controller. More...
#include <GameViewController.h>


Instance Methods | |
| (instancetype) | - init |
Initialises the controller: reads the saved adjust-sector offset, resolves the device idiom, builds the screen-sized EAGLView , and clears the per-session flags. | |
| (double) | - getMusicTime |
| The current BGM playback position, less the adjust-time offset, clamped to zero. | |
| (nullable NSString *) | - soundName: |
| Builds a theme-prefixed sound-effect resource name. | |
| (void) | - loadView |
| Installs the OpenGL view, the pause button, and the replay / replay-pause buttons. | |
| (void) | - loadResources |
Builds the renderer for the current idiom and theme, decrypts the chart archive into a Sequence and its textures, lays out the pause and replay buttons, and prepares the pause overlay, item-chance renderer, gesture surface, and best-score baseline. | |
| (void) | - releaseResources |
| Tears down the renderer, sequence, framebuffer, audio, overlays, and pending network requests. | |
| (void) | - saveScore |
| Persists the play result to the score records and saves the managed object context. | |
| (void) | - startAnimation |
Starts the per-frame display link that drives loop: . | |
| (void) | - stopAnimation |
| Stops and releases the per-frame display link. | |
| (void) | - finishMusic: |
| BGM-finished notification: clears the playing flag and drops the observer. | |
| (void) | - loop: |
| The display-link callback: reads touches, advances the sequence, drives the state machine, records or replays ghosts, and draws a frame. | |
| (void) | - startGame |
| Begins a fresh play: resets the adjust offset, sequence, ghost recording, renderer state, and button-touch width. | |
| (void) | - replayGame |
| Begins a replay of the just-finished play against the recorded ghost. | |
| (void) | - restartGame |
| Restarts the play from the top, or replays when already replaying. | |
| (void) | - pushBtnReplay: |
| Replay button: saves the score (and reports it to Game Center or the editor), then asks the root controller to replay the tune. | |
| (void) | - pushBtnReplayPause: |
| Replay-mode pause button: plays the menu SE, stops animation and BGM, and shows the pause overlay. | |
| (void) | - pushBtnPause: |
| Pause button: plays the menu SE, stops animation and BGM, and shows the pause overlay. | |
| (void) | - restartInPauseView |
| Pause-overlay restart callback: asks the root controller to restart the tune. | |
| (void) | - resumeInPauseView |
| Pause-overlay resume callback: resumes animation and BGM when still active. | |
| (void) | - endInPauseView |
| Pause-overlay end callback: confirms in challenge mode, otherwise returns to music select. | |
| (void) | - end |
| Dismisses the controller, drops the BGM observer, and returns to music select. | |
| (void) | - sessionDisconnect: |
| Ends the local-multiplayer session, optionally showing a disconnect notice. | |
| (void) | - removeEvaluate |
| Removes the evaluation overlay and its cover view immediately. | |
| (void) | - closeEvaluate: |
| Fades out the evaluation overlay and its cover, removing them when the fade completes. | |
| (void) | - sharePlayManagerDisconnect: |
SharePlayManager disconnect notice: ends the session with an alert. | |
| (void) | - sharePlayManager:disconnectClient: |
SharePlayManager client-disconnect notice: ends the session with an alert. | |
| (void) | - sharePlayManagerFailWithError: |
SharePlayManager failure notice: ends the session with an alert. | |
| (void) | - sharePlayManagerAllClientLoaded: |
SharePlayManager all-clients-loaded notice: starts the synchronised play. | |
| (void) | - sharePlayManager:startMusicTime: |
SharePlayManager play-start notice: schedules the renderer to enter the playing state at the agreed music time. | |
| (void) | - sharePlayManagerMusicStartTimeOut: |
SharePlayManager music-start-timeout notice. | |
| (void) | - sharePlayManager:receiveScore: |
SharePlayManager partner-score update. | |
| (void) | - sharePlayManager:receiveFinalScore:bonus:fullCombo: |
SharePlayManager partner-final-result: applies the partner's final score and ends. | |
| (void) | - suspend |
| Suspends the play when backgrounded, stopping animation, BGM, and the session per state. | |
| (void) | - resume |
| Resumes the play when foregrounded, restarting animation or showing the pause overlay per state. | |
| (void) | - terminate |
| Fully stops the play: stops BGM and animation, clears the framebuffer, and resets the renderer. | |
| (void) | - didReceiveMemoryWarning |
Forwards the memory warning to super . | |
| (void) | - viewDidUnload |
| Tears down the OpenGL view and the buttons on view unload. | |
| (void) | - viewWillAppear: |
Forwards to super . | |
| (void) | - viewDidAppear: |
Forwards to super . | |
| (void) | - viewWillDisappear: |
Forwards to super . | |
| (void) | - viewDidDisappear: |
Forwards to super . | |
| (BOOL) | - shouldAutorotateToInterfaceOrientation: |
| Whether the given interface orientation is a portrait one. | |
| (UIInterfaceOrientationMask) | - supportedInterfaceOrientations |
| The supported interface orientations (portrait only). | |
| (BOOL) | - shouldAutorotate |
| Whether the controller may autorotate. | |
| (void) | - requestAddPlayCount |
| Reports a downloaded custom chart's play to the jubeat-lab play-count API. | |
| (void) | - jubeatLabAccessError: |
| jubeat-lab access failure: clears the matching access reference. | |
| (void) | - jubeatLabAccessFinished: |
| jubeat-lab access completion: clears the matching access reference and, for the good-job commit, records the send and re-saves the chart. | |
| (void) | - dealloc |
| Stops animation, drops observers, disconnects the session, and tears down the overlays. | |
| (void) | - createGoodJobBtn |
| Builds the good-job button and its label. | |
| (void) | - pushBtnGoodJob |
| Good-job button tap: records the good-job vote and commits it through the jubeat-lab API. | |
| (void) | - createTwitterBtn |
| Builds the Twitter share button. | |
| (void) | - sendTwitter:mesStr: |
| Presents the Twitter share composer with a result image and message. | |
| (void) | - createSearchBtn |
| Builds the store-move search button and the pack-ID search overlay. | |
| (void) | - packIDSearchEnd: |
| Pack-ID search completion: downloads the matching pack. | |
| (void) | - packIDSearchCancel: |
| Pack-ID search cancellation: tears down the search overlay. | |
| (void) | - errorIDDownload:msgStr: |
| Pack-ID download error callback: clears the ID manager. | |
| (void) | - successIDDownload: |
| Pack-ID download success callback: clears the ID manager. | |
| (void) | - downloaderFinished: |
Downloader completion: handles the challenge-score upload response, applying the item-chance award for tag 2 and otherwise raising the update or server-error alert. | |
| (void) | - downloaderError: |
Downloader failure: presents a network-error alert. | |
| (void) | - releaseSearchPackView |
| Removes the pack-ID search overlay and its cover view. | |
| (void) | - makeTouchesData |
| Builds the per-panel touch-recording tables from the debug touch and press tables. | |
| (nullable NSArray *) | - getTouches |
| Reads the current frame's touches into the button-state bitmasks and returns the touch list. | |
| (void) | - tapGesture: |
| Double-tap gesture: toggles auto-play. | |
| (int) | - getDelaySector |
| The replay delay in sectors between the recorded ghost and live play. | |
| (void) | - addGhostTouches |
| Appends the current frame's ghost touches into the recording table. | |
| (nullable NSString *) | - getGhostDirectoryPath |
| Resolves the on-disk directory for the current tune's ghost recordings. | |
| (void) | - setReplayData |
| Serialises the recorded ghost touches for the just-finished play. | |
| (nullable NSArray *) | - getGhostTouches |
| Reads the current frame's ghost touches back for replay. | |
| (void) | - sendChallengeScore |
| Uploads the challenge-mode score. | |
| (void) | - alertSelect: |
| Alert button callback: on confirm, ends the play (tag 2) or uploads the challenge score (tag 1); on cancel of the challenge alert, clears the item-chance state. | |
| (void) | - panelChanceClose |
| Panel-chance close: fades out BGM, returns to music select, and ends the result. | |
| Instance Methods inherited from <SharePlayManagerDelegate> | |
| (void) | - sharePlayManager:receiveProgress: |
Reports the progress of the incoming music-data stream as a fraction in 0..1. | |
| (void) | - sharePlayManager:findHostID: |
| A candidate host was discovered while browsing. | |
| (void) | - sharePlayManager:lostHostID: |
| A previously discovered host is no longer reachable. | |
| (void) | - sharePlayManagerConnectHost: |
| The client established a connection to the host. | |
| (void) | - sharePlayManagerDisconnect: |
| The client accepted a role change back to the ready-to-invite state after a drop. | |
| (void) | - sharePlayManager:disconnectClient: |
| The host lost its client, or gave up clock synchronisation. | |
| (void) | - sharePlayManager:receiveExistMusicData: |
| The host learned whether the client already has the music data. | |
| (void) | - sharePlayManagerSuccessSendMusicData: |
| The music data was delivered to the client successfully. | |
| (void) | - sharePlayManagerHostSelectStart: |
| The host chose the song and requested the shared play to begin. | |
| (void) | - sharePlayManager:startMusicTime: |
| Requests that play begin after the given number of seconds, clock-corrected per side. | |
| (BOOL) | - sharePlayManager:receiveMusicInfo: |
| The client received the song's metadata and is asked whether it accepts it. | |
| (BOOL) | - sharePlayManager:musicDataReceived: |
| The client received the music data payload. | |
| (void) | - sharePlayManagerAllClientReady: |
| Both sides signalled they are ready to load the chart. | |
| (void) | - sharePlayManagerAllClientLoaded: |
| Both sides finished loading the chart. | |
| (void) | - sharePlayManagerConnectClient: |
| The clock handshake settled and the client connection is confirmed on the host. | |
| (void) | - sharePlayManager:receiveScore: |
| A mid-play score update arrived from the peer. | |
| (void) | - sharePlayManager:receiveFinalScore:bonus:fullCombo: |
| The peer's end-of-play result arrived. | |
Properties | |
| TuneInfo * | currentTune |
| The tune being played. | |
| unsigned int | currentDiff |
| The current difficulty. | |
| NSString * | currentMarker |
| The current marker resource name. Held without ownership, matching the binary. | |
| SharePlayManager * | shareManager |
| The local-multiplayer session manager. | |
| NSData * | musicData |
| The compressed music data for the current chart. | |
| EAGLView * | glView |
| The OpenGL view. | |
| MainGameRenderer * | mainGameRenderer |
| The gameplay renderer for the current idiom and theme. | |
| CADisplayLink * | displayLink |
The per-frame display link driving loop: . | |
| Sequence * | sequence |
| The note-judgement sequence. | |
| UIButton * | btnPause |
| The pause / play button. | |
| UIImageView * | btnStoreMove |
| The store-move (pack search) button. | |
| UIImageView * | btnGoodJob |
| The good-job vote button. | |
| UIImageView * | goodJobTxt |
| The good-job button's caption image. | |
| UIImageView * | twitterBtn |
| The Twitter share button. | |
| GamePauseView * | pauseView |
| The pause overlay. | |
The in-game play view controller.
| - (void) addGhostTouches |
Appends the current frame's ghost touches into the recording table.
| - (void) alertSelect: | (nullable NSDictionary *) | info |
Alert button callback: on confirm, ends the play (tag 2) or uploads the challenge score (tag 1); on cancel of the challenge alert, clears the item-chance state.
| info | The alert result dictionary carrying "btnMessage" and "Tag". |
| - (void) closeEvaluate: | (nullable id) | sender |
Fades out the evaluation overlay and its cover, removing them when the fade completes.
| sender | The dismiss trigger. |
| - (void) createGoodJobBtn |
Builds the good-job button and its label.
| - (void) createSearchBtn |
Builds the store-move search button and the pack-ID search overlay.
| - (void) createTwitterBtn |
Builds the Twitter share button.
| - (void) dealloc |
Stops animation, drops observers, disconnects the session, and tears down the overlays.
| - (void) didReceiveMemoryWarning |
Forwards the memory warning to super .
| - (void) downloaderError: | (nullable id) | downloader |
Downloader failure: presents a network-error alert.
| downloader | The failed request. |
| - (void) downloaderFinished: | (nullable id) | downloader |
Downloader completion: handles the challenge-score upload response, applying the item-chance award for tag 2 and otherwise raising the update or server-error alert.
| downloader | The finished request. |
| - (void) end |
Dismisses the controller, drops the BGM observer, and returns to music select.
| - (void) endInPauseView |
Pause-overlay end callback: confirms in challenge mode, otherwise returns to music select.
Reimplemented from <GamePauseViewDelegate>.
| - (void) errorIDDownload: | (nullable id) | error | |
| msgStr: | (nullable id) | msgStr |
Pack-ID download error callback: clears the ID manager.
| error | The error. |
| msgStr | The error message. |
| - (void) finishMusic: | (nullable NSNotification *) | notification |
BGM-finished notification: clears the playing flag and drops the observer.
| notification | The finish notification. |
| - (int) getDelaySector |
The replay delay in sectors between the recorded ghost and live play.
| - (NSString *) getGhostDirectoryPath |
Resolves the on-disk directory for the current tune's ghost recordings.
| - (NSArray *) getGhostTouches |
Reads the current frame's ghost touches back for replay.
| - (double) getMusicTime |
The current BGM playback position, less the adjust-time offset, clamped to zero.
| - (NSArray *) getTouches |
Reads the current frame's touches into the button-state bitmasks and returns the touch list.
| - (instancetype) init |
Initialises the controller: reads the saved adjust-sector offset, resolves the device idiom, builds the screen-sized EAGLView , and clears the per-session flags.
| - (void) jubeatLabAccessError: | (nullable id) | access |
jubeat-lab access failure: clears the matching access reference.
| access | The failed access. |
| - (void) jubeatLabAccessFinished: | (nullable id) | access |
jubeat-lab access completion: clears the matching access reference and, for the good-job commit, records the send and re-saves the chart.
| access | The finished access. |
| - (void) loadResources |
Builds the renderer for the current idiom and theme, decrypts the chart archive into a Sequence and its textures, lays out the pause and replay buttons, and prepares the pause overlay, item-chance renderer, gesture surface, and best-score baseline.
| - (void) loadView |
Installs the OpenGL view, the pause button, and the replay / replay-pause buttons.
| - (void) loop: | (nullable CADisplayLink *) | displayLink |
The display-link callback: reads touches, advances the sequence, drives the state machine, records or replays ghosts, and draws a frame.
| displayLink | The display link that fired. |
| - (void) makeTouchesData |
Builds the per-panel touch-recording tables from the debug touch and press tables.
| - (void) packIDSearchCancel: | (nullable id) | sender |
Pack-ID search cancellation: tears down the search overlay.
| sender | The cancel trigger. |
| - (void) packIDSearchEnd: | (nullable id) | packID |
Pack-ID search completion: downloads the matching pack.
| packID | The resolved pack identifier. |
| - (void) panelChanceClose |
Panel-chance close: fades out BGM, returns to music select, and ends the result.
| - (void) pushBtnGoodJob |
Good-job button tap: records the good-job vote and commits it through the jubeat-lab API.
| - (void) pushBtnPause: | (nullable id) | sender |
Pause button: plays the menu SE, stops animation and BGM, and shows the pause overlay.
| sender | The pause button. |
| - (void) pushBtnReplay: | (nullable id) | sender |
Replay button: saves the score (and reports it to Game Center or the editor), then asks the root controller to replay the tune.
| sender | The replay button. |
| - (void) pushBtnReplayPause: | (nullable id) | sender |
Replay-mode pause button: plays the menu SE, stops animation and BGM, and shows the pause overlay.
| sender | The replay-pause button. |
| - (void) releaseResources |
Tears down the renderer, sequence, framebuffer, audio, overlays, and pending network requests.
| - (void) releaseSearchPackView |
Removes the pack-ID search overlay and its cover view.
| - (void) removeEvaluate |
Removes the evaluation overlay and its cover view immediately.
| - (void) replayGame |
Begins a replay of the just-finished play against the recorded ghost.
| - (void) requestAddPlayCount |
Reports a downloaded custom chart's play to the jubeat-lab play-count API.
| - (void) restartGame |
Restarts the play from the top, or replays when already replaying.
| - (void) restartInPauseView |
Pause-overlay restart callback: asks the root controller to restart the tune.
Reimplemented from <GamePauseViewDelegate>.
| - (void) resume |
Resumes the play when foregrounded, restarting animation or showing the pause overlay per state.
| - (void) resumeInPauseView |
Pause-overlay resume callback: resumes animation and BGM when still active.
Reimplemented from <GamePauseViewDelegate>.
| - (void) saveScore |
Persists the play result to the score records and saves the managed object context.
| - (void) sendChallengeScore |
Uploads the challenge-mode score.
| - (void) sendTwitter: | (nullable UIImage *) | image | |
| mesStr: | (nullable NSString *) | mesStr |
Presents the Twitter share composer with a result image and message.
| image | The result image to attach. |
| mesStr | The initial tweet text. |
| - (void) sessionDisconnect: | (BOOL) | showAlert |
Ends the local-multiplayer session, optionally showing a disconnect notice.
| showAlert | Whether to show the disconnect alert. |
| - (void) setReplayData |
Serialises the recorded ghost touches for the just-finished play.
| - (void) sharePlayManager: | (nullable SharePlayManager *) | manager | |
| disconnectClient: | (nullable id) | client |
SharePlayManager client-disconnect notice: ends the session with an alert.
| manager | The reporting manager. |
| client | The disconnected client. |
| - (void) sharePlayManager: | (nullable SharePlayManager *) | manager | |
| receiveFinalScore: | (int) | score | |
| bonus: | (int) | bonus | |
| fullCombo: | (BOOL) | fullCombo |
SharePlayManager partner-final-result: applies the partner's final score and ends.
| manager | The reporting manager. |
| score | The partner's final score. |
| bonus | The partner's final bonus. |
| fullCombo | Whether the partner achieved a full combo. |
| - (void) sharePlayManager: | (nullable SharePlayManager *) | manager | |
| receiveScore: | (int) | score |
SharePlayManager partner-score update.
| manager | The reporting manager. |
| score | The partner's current score. |
| - (void) sharePlayManager: | (nullable SharePlayManager *) | manager | |
| startMusicTime: | (float) | musicTime |
SharePlayManager play-start notice: schedules the renderer to enter the playing state at the agreed music time.
| manager | The reporting manager. |
| musicTime | The agreed music start time. |
| - (void) sharePlayManagerAllClientLoaded: | (nullable SharePlayManager *) | manager |
SharePlayManager all-clients-loaded notice: starts the synchronised play.
| manager | The reporting manager. |
| - (void) sharePlayManagerDisconnect: | (nullable SharePlayManager *) | manager |
SharePlayManager disconnect notice: ends the session with an alert.
| manager | The reporting manager. |
| - (void) sharePlayManagerFailWithError: | (nullable SharePlayManager *) | manager |
SharePlayManager failure notice: ends the session with an alert.
| manager | The reporting manager. |
| - (void) sharePlayManagerMusicStartTimeOut: | (nullable SharePlayManager *) | manager |
SharePlayManager music-start-timeout notice.
The shipped body is empty.
| manager | The reporting manager. |
| - (BOOL) shouldAutorotate |
Whether the controller may autorotate.
YES . | - (BOOL) shouldAutorotateToInterfaceOrientation: | (UIInterfaceOrientation) | interfaceOrientation |
Whether the given interface orientation is a portrait one.
| interfaceOrientation | The candidate orientation. |
YES for the two portrait orientations. | - (nullable NSString *) soundName: | (nullable NSString *) | name |
Builds a theme-prefixed sound-effect resource name.
| name | The sound-effect base name. |
| - (void) startAnimation |
Starts the per-frame display link that drives loop: .
| - (void) startGame |
Begins a fresh play: resets the adjust offset, sequence, ghost recording, renderer state, and button-touch width.
| - (void) stopAnimation |
Stops and releases the per-frame display link.
| - (void) successIDDownload: | (nullable id) | sender |
Pack-ID download success callback: clears the ID manager.
| sender | The success trigger. |
| - (UIInterfaceOrientationMask) supportedInterfaceOrientations |
The supported interface orientations (portrait only).
UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskPortraitUpsideDown . | - (void) suspend |
Suspends the play when backgrounded, stopping animation, BGM, and the session per state.
| - (void) tapGesture: | (nullable UITapGestureRecognizer *) | gesture |
Double-tap gesture: toggles auto-play.
| gesture | The tap recogniser. |
| - (void) terminate |
Fully stops the play: stops BGM and animation, clears the framebuffer, and resets the renderer.
| - (void) viewDidAppear: | (BOOL) | animated |
Forwards to super .
| animated | Whether the appearance is animated. |
| - (void) viewDidDisappear: | (BOOL) | animated |
Forwards to super .
| animated | Whether the disappearance is animated. |
| - (void) viewDidUnload |
Tears down the OpenGL view and the buttons on view unload.
| - (void) viewWillAppear: | (BOOL) | animated |
Forwards to super .
| animated | Whether the appearance is animated. |
| - (void) viewWillDisappear: | (BOOL) | animated |
Forwards to super .
| animated | Whether the disappearance is animated. |