JubeatPlus 3.9.11
Loading...
Searching...
No Matches
ImageLoading.h File Reference

The application's own scaled-image loader. More...

import <Foundation/Foundation.h>
import <UIKit/UIKit.h>
Include dependency graph for ImageLoading.h:

Go to the source code of this file.

Functions

NS_ASSUME_NONNULL_BEGIN UIImage *_Nullable LoadScaledPngImage (NSString *pszBaseName)
 Loads a PNG from the bundle at the right Retina variant and tags it with the right scale.
UIImage *_Nullable CreateReflectedImage (UIImage *_Nullable image, int height)
 Builds a vertically-flipped, gradient-faded reflection of an image.
UIImage *_Nullable LoadScaledEncryptedTexImage (NSString *pszBaseName)
 The same job as LoadScaledPngImage, for the encrypted .tex assets.
NSString *_Nullable GetScaledResourcePath (NSString *pszBaseName, BOOL *pfScaled, float *pflScale, NSString *pszExtension)
 Resolves a resource name to the bundle path of the variant this device should use.
NSData *_Nullable CreateResourceDataCipherKey (void)
 The Blowfish key downloaded resource data is enciphered with.

Detailed Description

The application's own scaled-image loader.

Reconstructed from Ghidra program Jubeat (image base 0x100000000). All

Ghidra address:
values are offsets relative to that image base.

These are genuine free functions: neither takes a receiver argument and neither belongs to a class, so the reconstruction rules' search for an owning class is exhausted. The file's name is this tree's own, not the binary's — no embedded __FILE__ has been located for either routine, so it is recorded in TYPES_PENDING.md as unproven.

Function Documentation

◆ CreateReflectedImage()

UIImage *_Nullable CreateReflectedImage ( UIImage *_Nullable image,
int height )

Builds a vertically-flipped, gradient-faded reflection of an image.

The well-known iOS reflection idiom: the top height rows of image are drawn upside-down into an offscreen context and masked with a black-to-white vertical ramp so the copy fades out. Everything is worked in pixels — the source's own scale is folded in when it is not already 1.0 — and the result is re-wrapped at that scale so a Retina source is not doubled in size.

Parameters
imageThe source image. A nil image yields nil .
heightThe reflection height in points; a zero height yields nil . Used internally as an unsigned count.
Returns
The autoreleased reflection, or nil .
Ghidra address:
0x7ecdc

◆ CreateResourceDataCipherKey()

NSData *_Nullable CreateResourceDataCipherKey ( void )

The Blowfish key downloaded resource data is enciphered with.

DECLARED ONLY — the body has not been reconstructed yet. Handed to -[BFCodec cipherInit:] before a downloaded campaign image is written to disk, so the cached copy on disk is enciphered rather than a plain PNG.

Returns
The key material.
Ghidra address:
0x7fa54

The Blowfish key downloaded resource data is enciphered with.

Returns
The key material, to be handed to -[BFCodec cipherInit:] .
Ghidra address:
0x7fa54

◆ GetScaledResourcePath()

NSString *_Nullable GetScaledResourcePath ( NSString * pszBaseName,
BOOL * pfScaled,
float * pflScale,
NSString * pszExtension )

Resolves a resource name to the bundle path of the variant this device should use.

Chooses between the plain, _pn2 and _pn3 variants from the interface idiom and the main screen's scale, and reports back both whether a scaled variant was chosen and what scale it carries — neither of which the returned path conveys on its own.

DECLARED ONLY — the body has not been reconstructed yet, though the signature is proven from the call in LoadScaledPngImage. See TYPES_PENDING.md.

Parameters
pszBaseNameThe resource name, with no scale suffix and no extension.
pfScaledSet to YES when a scaled variant was chosen. Seeded NO by the caller.
pflScaleSet to the chosen variant's scale. Seeded 2.0 by the caller.
pszExtensionThe file extension to look for, without the dot.
Returns
The full path, or nil when no variant exists.
Ghidra address:
0x7e37c

◆ LoadScaledEncryptedTexImage()

UIImage *_Nullable LoadScaledEncryptedTexImage ( NSString * pszBaseName)

The same job as LoadScaledPngImage, for the encrypted .tex assets.

Resolves the variant through the same GetScaledResourcePath, reads the file, decrypts it through BFCodec with a key derived by MD5, and re-wraps the result at the right scale for the same reason its PNG companion does.

DECLARED ONLY — the body has not been reconstructed yet. See TYPES_PENDING.md.

Parameters
pszBaseNameThe resource name, with no scale suffix and no extension.
Returns
The decrypted image at its correct scale, or nil when the file is missing.
Ghidra address:
0x7e9dc

◆ LoadScaledPngImage()

NS_ASSUME_NONNULL_BEGIN UIImage *_Nullable LoadScaledPngImage ( NSString * pszBaseName)

Loads a PNG from the bundle at the right Retina variant and tags it with the right scale.

The application's replacement for +[UIImage imageNamed:], with 479 call sites and no caching. The variant is chosen by GetScaledResourcePath, which uses _pn2 / _pn3 suffixes rather than Apple's @2x convention — so -initWithContentsOfFile: cannot infer the scale and the image has to be re-wrapped through +imageWithCGImage:scale:orientation: to carry it.

Parameters
pszBaseNameThe resource name, with no scale suffix and no .png extension.
Returns
The image at its correct scale, or nil when the file is missing.
Ghidra address:
0x7ebe8