|
JubeatPlus 3.9.11
|
Hosts the game's screens and owns the music-select controller it presents. More...
#include <RootViewController.h>


Instance Methods | |
| (instancetype) | - init |
| Builds the controller and its two persistent child screens. | |
| (void) | - fade:durationIn:durationOut: |
| Runs a named cross-fade and hands the name to the transition dispatcher. | |
| (void) | - fadeoutAnimStop:finished:context: |
| Swaps the screens for the transition just faded out, then fades back in. | |
| (void) | - fadeinAnimStop:finished:context: |
| Finishes a transition once the screen has faded back in. | |
| (void) | - createKnitTitleViewController |
Builds the knit-theme title screen into titleViewCtrl. | |
| (void) | - titleSwitch |
| Re-runs the title screen's own switch animation. | |
| (void) | - openStoreAnimStop:finished:context: |
| Finishes the slide into the store screen. | |
| (void) | - endStoreAnimStop:finished:context: |
| Finishes the slide back out of the store screen. | |
| (void) | - openStore: |
| Slides the store screen in over music select with a 3-D cube-flip. | |
| (void) | - endStore |
| Slides the store screen back out, flipping a fresh music-select screen in. | |
| (void) | - changeThemeAndGoTitle |
| Dismisses the music-select screen and returns to the title under the new theme. | |
| (void) | - changeTitleTheme |
| Refreshes the title screen for the current theme or event. | |
| (void) | - reloadMarkers |
| Rebuilds the marker list. | |
| (void) | - pushNotificate |
| Presents the notification the delegate has just queued, if the select screen is up. | |
| (void) | - startLogo |
| Installs the logo screen as a child and starts it. | |
| (void) | - endLogo |
| Takes the logo screen back down and starts the Game Center login. | |
| (void) | - endTitle |
| Fades from the title screen into the music-select screen. | |
| (void) | - musicRestart |
| Restarts the current tune, keeping its audio and textures. | |
| (void) | - musicReplay |
| Replays the current tune, keeping its audio and textures. | |
| (void) | - returnToMusicSelect |
| Returns from the game to the music-select screen. | |
| (void) | - startMainGame:shareManager:musicData: |
| Starts a tune on the game screen and fades into it. | |
| (void) | - startEditNote:musicData:jcfName: |
| Starts editing a tune on the note editor and fades into it. | |
| (void) | - openAchiveMessage: |
| Shows the achievement-message overlay with the given title. | |
| (void) | - messageClose |
| Removes the achievement-message overlay. | |
| (void) | - responseRemoteNotification:pushInfo: |
| Reports a remote notification back to the server. | |
| (void) | - appWillResignActive: |
| Dismisses any alert and suspends the visible game or edit screen as the app deactivates. | |
| (void) | - appDidBecomeActive: |
| Resumes activity: runs any parked transition, then the three auto-move checks. | |
| (void) | - appWillTerminate: |
| Flushes user defaults and terminates the game and edit screens as the app quits. | |
| (void) | - returnFromEdit |
| Returns from the note editor to the music-select screen. | |
| (void) | - downloadCustomSequence |
| Acts on a pending custom-sequence download for whichever screen is up. | |
| (void) | - autoMoveChallenge |
| Consumes a queued challenge-open request for whichever screen is up. | |
| (void) | - autoMovePackDownload |
| Acts on a queued store pack, campaign, or genre for whichever screen is up. | |
Properties | |
| BOOL | active |
Whether a scene is up and transitions run immediately; when clear, a transition parks its name in suspendedAnimID instead. | |
Hosts the game's screens and owns the music-select controller it presents.
The eight ivars reached so far sit at offset globals 0x34b770 to 0x34b794. Not one of them has an accessor pair anywhere in the binary, so they are all declared in a class extension rather than exposed here.
| - (void) appDidBecomeActive: | (nullable NSNotification *) | notification |
Resumes activity: runs any parked transition, then the three auto-move checks.
Sets _isActive , runs the transition parked in suspendedAnimID (clearing it first), kicks off the custom-sequence download and the challenge and pack auto-moves, and resumes the visible game or edit screen.
| notification | The activation notification. Never read. |
| - (void) appWillResignActive: | (nullable NSNotification *) | notification |
Dismisses any alert and suspends the visible game or edit screen as the app deactivates.
Closes the shared alert, clears _isActive so a transition arriving now parks its name rather than running, and sends -suspend to the game and edit controllers only while their view is a direct subview of the root view.
| notification | The deactivation notification. Never read. |
| - (void) appWillTerminate: | (nullable NSNotification *) | notification |
Flushes user defaults and terminates the game and edit screens as the app quits.
| notification | The termination notification. Never read. |
| - (void) autoMoveChallenge |
Consumes a queued challenge-open request for whichever screen is up.
Returns immediately unless the delegate's bChallengeOpen is set. The store screen backs out through -endStore ; the select and edit screens drop the flag; every other screen leaves it set.
| - (void) autoMovePackDownload |
Acts on a queued store pack, campaign, or genre for whichever screen is up.
Returns immediately when the delegate has no queued store identifier. The logo and title screens ignore it; the select screen forwards to the store through -schemeMoveStore ; the game and edit screens are sent -end ; the store screen opens the queued item directly, preferring a pack over a campaign over a genre, and clears whichever it used.
| - (void) changeThemeAndGoTitle |
Dismisses the music-select screen and returns to the title under the new theme.
Branches on JubeatAppDelegate.appDelegate.isPad, and the two arms differ in ordering rather than in effect: the iPad arm dismisses with a nil completion and then runs the fade itself, while the other arm passes a completion block that runs the identical fade. Both end up calling -fade:durationIn:durationOut: with "AnimChangeTheme", 0.6, and 1.0.
The 0.6 is a float widened to double — the pool holds 0x3FE3333340000000, which is 0.6f promoted, not the closest double to 0.6.
| - (void) changeTitleTheme |
Refreshes the title screen for the current theme or event.
A single tail call to -fade:durationIn:durationOut: with "AnimTitleSwitch" and 1.5 for both durations. Nothing is dismissed.
| - (void) createKnitTitleViewController |
Builds the knit-theme title screen into titleViewCtrl.
Unlike the other two themes, which allocate their controller inline, the knit theme is delegated to this factory because it picks between two classes: TitleViewControllerNte when the delegate reports isNagaCoraMode, and TitleViewControllerKnt otherwise. isHinabitaMode is tested first and short circuits to the knit screen, so the hinabita collaboration wins when both flags are set.
| - (void) downloadCustomSequence |
Acts on a pending custom-sequence download for whichever screen is up.
Returns immediately when the delegate has no jcfDownloadID . The logo and title screens ignore it; the select screen resumes the download itself; the game and edit screens are sent -end ; the store screen backs out through -endStore .
| - (void) endLogo |
Takes the logo screen back down and starts the Game Center login.
Fades the logo out over 0.5 and back in over 1.0 through -fade:durationIn:durationOut: with "AnimTitle", then sends -loginGameCenter to the delegate. Called by -[LogoViewController end:] once the splash animation has finished or been skipped.
| - (void) endStore |
Slides the store screen back out, flipping a fresh music-select screen in.
The mirror of -openStore: : it does not set the scene identifier, stops the BGM outright rather than fading it, and asks the store to close before the flip. -endStoreAnimStop:finished:context: finishes it.
| - (void) endStoreAnimStop: | (NSString *) | animationID | |
| finished: | (nullable NSNumber *) | finished | |
| context: | (nullable void *) | context |
Finishes the slide back out of the store screen.
The mirror of -openStoreAnimStop:finished:context:, with two differences worth knowing: input is released first here rather than last, and on the way back only a pending chart download is acted on — the store and notification cases the fade-in dispatcher handles are absent.
| animationID | Never read. |
| finished | Never read. |
| context | Never read. |
| - (void) endTitle |
Fades from the title screen into the music-select screen.
A single -fade:durationIn:durationOut: with "AnimSelect", 1.5, and 0.5.
| - (void) fade: | (NSString *) | animationName | |
| durationIn: | (double) | inDuration | |
| durationOut: | (double) | outDuration |
Runs a named cross-fade and hands the name to the transition dispatcher.
Blocks input, parks both durations in ivars, builds a fresh full-screen black cover, and fades it in over durationIn. The name is passed to +[UIView beginAnimations:context:] and comes back to -fadeoutAnimStop:finished:context:, which is what decides which screens to tear down and build; this method is only the visual half.
| animationName | The transition to run once the screen is black. |
| inDuration | How long the fade to black takes. |
| outDuration | How long the fade back takes. Not used here — it is stored for the second half. |
| - (void) fadeinAnimStop: | (NSString *) | animationID | |
| finished: | (nullable NSNumber *) | finished | |
| context: | (nullable void *) | context |
Finishes a transition once the screen has faded back in.
Records which scene is now up, wakes the screen just revealed, tears the black cover down, runs whatever the delegate parked while another screen was in front, and finally lifts the input block that -fade:durationIn:durationOut: put in place. That last step is reached on every path, including an unrecognised animation name, so input cannot be left disabled.
| animationID | The transition that has just finished fading back in. |
| finished | Never read. |
| context | Never read. |
| - (void) fadeoutAnimStop: | (NSString *) | animationID | |
| finished: | (nullable NSNumber *) | finished | |
| context: | (nullable void *) | context |
Swaps the screens for the transition just faded out, then fades back in.
The transition dispatcher, and the largest method in the class at roughly 1.5 KB. It branches on the animation name across nine transitions, tears down the outgoing screen, builds the incoming one, and then starts the fade back in over durationOut. When _isActive is clear it does none of that and parks the name in suspendedAnimID instead.
Two things about it are worth knowing before reading the body. A game restart or replay keeps its audio and textures where every other transition drops both, which is what makes those two cheap. And an animation name matching none of the nine still runs the fade back in, so an unknown transition leaves the screen unchanged rather than stuck black.
| animationID | The transition name -fade:durationIn:durationOut: was given. |
| finished | Never read. |
| context | Never read. |
| - (instancetype) init |
Builds the controller and its two persistent child screens.
Allocates the game and edit view controllers once and keeps them as children for the whole lifetime, registers the three application-state observers, and builds the achievement-message overlay with this controller as its delegate.
| - (void) messageClose |
Removes the achievement-message overlay.
Resets the overlay's transform and removes it from its superview.
| - (void) musicReplay |
Replays the current tune, keeping its audio and textures.
A single -fade:durationIn:durationOut: with "AnimGameReplay", 1.0, and 0.5.
| - (void) musicRestart |
Restarts the current tune, keeping its audio and textures.
A single -fade:durationIn:durationOut: with "AnimGameRestart", 1.0, and 0.5.
| - (void) openAchiveMessage: | (nullable id) | title |
Shows the achievement-message overlay with the given title.
Forwards title to the overlay's -setAchieveTitle: , resets its transform, starts its enter animation, and adds it to the root view.
| title | The achievement title to display. |
| - (void) openStore: | (nullable id) | startupParameters |
Slides the store screen in over music select with a 3-D cube-flip.
Blocks input, marks the scene SceneStore , clears the image cache, fades out the BGM, and then flips the store in about the Y axis while music select rotates out the far side. The rotation is driven by the pre-iOS-4 begin/commit animation API; -openStoreAnimStop:finished:context: is what finishes it.
| startupParameters | The parameters the store screen is opened with. |
| - (void) openStoreAnimStop: | (NSString *) | animationID | |
| finished: | (nullable NSNumber *) | finished | |
| context: | (nullable void *) | context |
Finishes the slide into the store screen.
The store transition does not go through -fade:durationIn:durationOut: at all. It rotates the root view's sublayer transform in 3-D and rasterises both layers for the duration, so this callback restores CATransform3DIdentity, clears both shouldRasterize flags, drops the music-select screen, and asks the store to load.
| animationID | Never read. |
| finished | Never read. |
| context | Never read. |
| - (void) pushNotificate |
Presents the notification the delegate has just queued, if the select screen is up.
Forwards to the identically named selector on musicSelectViewCtrl, but only when currentSceneID is "SceneSelect" and that controller is non-nil. A notification arriving on any other screen is therefore queued by the delegate and never shown by this path.
| - (void) reloadMarkers |
Rebuilds the marker list.
A single tail call forwarding to -reloadMarkerSelectView on musicSelectViewCtrl. Nothing guards against that being nil; a nil receiver simply makes the call a no-op.
| - (void) responseRemoteNotification: | (BOOL) | launchedFromNotification | |
| pushInfo: | (NSDictionary *) | pushInfo |
Reports a remote notification back to the server.
POSTs a three-entry JSON dictionary — "user_id" from +[EditorIDManager getEditorIDKey], "push_id" from the payload's "id" entry, and "status" — to +[ScratchUtil pushNotificationResponseURL] through Downloader.
| launchedFromNotification | Whether the notification started the application rather than arriving at a running one. The tbz at 0x1ab1e8 tests bit 0 and turns it into the "status" value: 1 when set, 2 when clear. |
| pushInfo | The notification payload, used only for its "id" entry. |
| - (void) returnFromEdit |
Returns from the note editor to the music-select screen.
A single -fade:durationIn:durationOut: with "AnimEndEdit", 1.0, and 0.5.
| - (void) returnToMusicSelect |
Returns from the game to the music-select screen.
A single -fade:durationIn:durationOut: with "AnimReturnMusicSelect", 1.0, and 0.5.
| - (void) startEditNote: | (nullable id) | tune | |
| musicData: | (nullable id) | musicData | |
| jcfName: | (nullable id) | jcfName |
Starts editing a tune on the note editor and fades into it.
The mirror of -startMainGame:shareManager:musicData: without a share manager. It takes a jcfName but never reads it, then fades in with "AnimStartEdit".
| tune | The tune to edit. |
| musicData | The music data, or nil. |
| jcfName | The custom-sequence name. Never read. |
| - (void) startLogo |
Installs the logo screen as a child and starts it.
The last thing -[JubeatAppDelegate application:didFinishLaunchingWithOptions:] does to the UI. Builds a LogoViewController, adds it as a child, adds its view, sends it -start, and then sets currentSceneID to "SceneLogo".
| - (void) startMainGame: | (nullable id) | tune | |
| shareManager: | (nullable id) | shareManager | |
| musicData: | (nullable id) | musicData |
Starts a tune on the game screen and fades into it.
Flushes user defaults, pushes the tune, the current difficulty (PrefDifficulty ), and the current marker (PrefCurrentMarkerID ) into the game screen, wires up the share manager when one is supplied, sets the music data when supplied, then fades in with "AnimStartGame".
| tune | The tune to play. |
| shareManager | The score-share manager, or nil. |
| musicData | The music data, or nil. |
| - (void) titleSwitch |
Re-runs the title screen's own switch animation.
Replaces whatever title screen is up with a TitleViewControllerKnt. The outgoing screen is sent -stopAnimation only when it is a TitleViewControllerNte, which makes this a class test rather than a nil guard, and the incoming one is always the knit screen — this transition only ever switches towards it, never away.
|
readnonatomicassign |
Whether a scene is up and transitions run immediately; when clear, a transition parks its name in suspendedAnimID instead.
Backed by the _isActive ivar.