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

A one-shot loader for a single tune's artwork. More...

#include <ArtworkLoader.h>

Inheritance diagram for ArtworkLoader:
Collaboration diagram for ArtworkLoader:

Instance Methods

(instancetype) - initWithPath:tuneID:indexRow:size:bigArtwork:
 Builds a loader that remembers which row asked.
(instancetype) - initWithPath:tuneID:size:bigArtwork:
 Builds a loader with no row.
(nullable UIImage *) - shrinkImage:
 Redraws an image at this loader's size.
(void) - loadArtwork
 Unzips, deciphers and decodes the artwork, then tells the delegate.

Properties

UIImage * image
 The decoded artwork, once -loadArtwork has run.
id< ArtworkLoaderDelegate > delegate
 The object told when the artwork is ready.
unsigned int tuneID
 Which tune this artwork belongs to.
int indexRow
 Which row asked for it.

Detailed Description

A one-shot loader for a single tune's artwork.

Method Documentation

◆ initWithPath:tuneID:indexRow:size:bigArtwork:

- (instancetype) initWithPath: (nullable NSString *) path
tuneID: (unsigned int) tuneID
indexRow: (int) indexRow
size: (CGSize) size
bigArtwork: (BOOL) bigArtwork 

Builds a loader that remembers which row asked.

Parameters
pathThe archive's path.
tuneIDThe tune.
indexRowThe requesting row.
sizeThe largest size the caller wants. Anything wider is shrunk.
bigArtworkWhether to read the large entry rather than the small one.
Returns
The initialised loader.
Ghidra address:
0x934f8

◆ initWithPath:tuneID:size:bigArtwork:

- (instancetype) initWithPath: (nullable NSString *) path
tuneID: (unsigned int) tuneID
size: (CGSize) size
bigArtwork: (BOOL) bigArtwork 

Builds a loader with no row.

Identical to the longer initialiser but for the row, which it does not set at all — so indexRow reads as zero rather than as anything meaningful.

Parameters
pathThe archive's path.
tuneIDThe tune.
sizeThe largest size the caller wants.
bigArtworkWhether to read the large entry rather than the small one.
Returns
The initialised loader.
Ghidra address:
0x935d8

◆ loadArtwork

- (void) loadArtwork

Unzips, deciphers and decodes the artwork, then tells the delegate.

Synchronous, and wrapped in its own autorelease pool — the whole body sits between objc_autoreleasePoolPush and …Pop , which is what a caller running it off the main thread would need.

Ghidra address:
0x937d8
Ghidra address:
0x937d8

◆ shrinkImage:

- (nullable UIImage *) shrinkImage: (nullable UIImage *) image

Redraws an image at this loader's size.

The new context copies the source's bit depth, row stride, colour space and bitmap info, so only the dimensions change.

Parameters
imageThe image to shrink.
Returns
The redrawn image.
Ghidra address:
0x936a8

Property Documentation

◆ image

- (UIImage*) image
readwritenonatomicstrong

The decoded artwork, once -loadArtwork has run.

Ghidra address:
0x93aa0 (getter)

◆ indexRow

- (int) indexRow
readnonatomicassign

Which row asked for it.

Carried for the delegate to read back.

Ghidra address:
0x93ad4 (getter)

◆ tuneID

- (unsigned int) tuneID
readnonatomicassign

Which tune this artwork belongs to.

Carried for the delegate to read back.

Ghidra address:
0x93ac4 (getter)

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