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

Hosts the game's screens and owns the music-select controller it presents. More...

#include <RootViewController.h>

Inheritance diagram for RootViewController:
Collaboration diagram for RootViewController:

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.

Detailed Description

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.

Method Documentation

◆ appDidBecomeActive:

- (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.

Parameters
notificationThe activation notification. Never read.
Ghidra address:
0x1aacc8

◆ appWillResignActive:

- (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.

Parameters
notificationThe deactivation notification. Never read.
Ghidra address:
0x1aab40

◆ appWillTerminate:

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

Flushes user defaults and terminates the game and edit screens as the app quits.

Parameters
notificationThe termination notification. Never read.
Ghidra address:
0x1aae84

◆ autoMoveChallenge

- (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.

Ghidra address:
0x1aa60c
Ghidra address:
0x1aa60c

◆ autoMovePackDownload

- (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.

Ghidra address:
0x1aa71c
Ghidra address:
0x1aa71c

◆ changeThemeAndGoTitle

- (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.

Ghidra address:
0x1a8a68
Ghidra address:
0x1a8a68
Ghidra address:
0x1a8b80

◆ changeTitleTheme

- (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.

Ghidra address:
0x1a8bb4
Ghidra address:
0x1a8bb4

◆ createKnitTitleViewController

- (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.

Ghidra address:
0x1a743c
Ghidra address:
0x1a743c

◆ downloadCustomSequence

- (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 .

Ghidra address:
0x1aa4a4
Ghidra address:
0x1aa4a4

◆ endLogo

- (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.

Ghidra address:
0x1a7ad8
Ghidra address:
0x1a7ad8

◆ endStore

- (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.

Ghidra address:
0x1a8430
Ghidra address:
0x1a8430

◆ endStoreAnimStop:finished:context:

- (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.

Parameters
animationIDNever read.
finishedNever read.
contextNever read.
Ghidra address:
0x1a8d7c

◆ endTitle

- (void) endTitle

Fades from the title screen into the music-select screen.

A single -fade:durationIn:durationOut: with "AnimSelect", 1.5, and 0.5.

Ghidra address:
0x1a7b3c
Ghidra address:
0x1a7b3c

◆ fade:durationIn:durationOut:

- (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.

Parameters
animationNameThe transition to run once the screen is black.
inDurationHow long the fade to black takes.
outDurationHow long the fade back takes. Not used here — it is stored for the second half.
Ghidra address:
0x1a7770
Ghidra address:
0x1a7770

◆ fadeinAnimStop:finished:context:

- (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.

Parameters
animationIDThe transition that has just finished fading back in.
finishedNever read.
contextNever read.
Ghidra address:
0x1a9fec

◆ fadeoutAnimStop:finished:context:

- (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.

Parameters
animationIDThe transition name -fade:durationIn:durationOut: was given.
finishedNever read.
contextNever read.
Ghidra address:
0x1a9420

◆ init

- (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.

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

◆ messageClose

- (void) messageClose

Removes the achievement-message overlay.

Resets the overlay's transform and removes it from its superview.

Ghidra address:
0x1ab094
Ghidra address:
0x1ab094

◆ musicReplay

- (void) musicReplay

Replays the current tune, keeping its audio and textures.

A single -fade:durationIn:durationOut: with "AnimGameReplay", 1.0, and 0.5.

Ghidra address:
0x1a9278
Ghidra address:
0x1a9278

◆ musicRestart

- (void) musicRestart

Restarts the current tune, keeping its audio and textures.

A single -fade:durationIn:durationOut: with "AnimGameRestart", 1.0, and 0.5.

Ghidra address:
0x1a925c
Ghidra address:
0x1a925c

◆ openAchiveMessage:

- (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.

Parameters
titleThe achievement title to display.
Ghidra address:
0x1ab008

◆ openStore:

- (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.

Parameters
startupParametersThe parameters the store screen is opened with.
Ghidra address:
0x1a7b58

◆ openStoreAnimStop:finished:context:

- (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.

Parameters
animationIDNever read.
finishedNever read.
contextNever read.
Ghidra address:
0x1a81b4

◆ pushNotificate

- (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.

Ghidra address:
0x1aaaa4
Ghidra address:
0x1aaaa4

◆ reloadMarkers

- (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.

Ghidra address:
0x1a8d64
Ghidra address:
0x1a8d64

◆ responseRemoteNotification:pushInfo:

- (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.

Parameters
launchedFromNotificationWhether 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.
pushInfoThe notification payload, used only for its "id" entry.
Ghidra address:
0x1ab0d4
Ghidra address:
0x1ab0d4

◆ returnFromEdit

- (void) returnFromEdit

Returns from the note editor to the music-select screen.

A single -fade:durationIn:durationOut: with "AnimEndEdit", 1.0, and 0.5.

Ghidra address:
0x1a9404
Ghidra address:
0x1a9404

◆ returnToMusicSelect

- (void) returnToMusicSelect

Returns from the game to the music-select screen.

A single -fade:durationIn:durationOut: with "AnimReturnMusicSelect", 1.0, and 0.5.

Ghidra address:
0x1a9294
Ghidra address:
0x1a9294

◆ startEditNote:musicData:jcfName:

- (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".

Parameters
tuneThe tune to edit.
musicDataThe music data, or nil.
jcfNameThe custom-sequence name. Never read.
Ghidra address:
0x1a92b0

◆ startLogo

- (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".

Ghidra address:
0x1a79d4
Ghidra address:
0x1a79d4

◆ startMainGame:shareManager:musicData:

- (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".

Parameters
tuneThe tune to play.
shareManagerThe score-share manager, or nil.
musicDataThe music data, or nil.
Ghidra address:
0x1a90bc

◆ titleSwitch

- (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.

Ghidra address:
0x1a8bd0
Ghidra address:
0x1a8bd0

Property Documentation

◆ active

- (BOOL) active
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.

Ghidra address:
0x1ab3f8

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