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

Holds the three colours the knit background is drawn with. More...

#include <KnitColorManager.h>

Inheritance diagram for KnitColorManager:
Collaboration diagram for KnitColorManager:

Instance Methods

(instancetype) - init
 Builds the manager.
(void) - setColorWithType:
 Selects a built-in palette by type.
(UIColor *) - makeColor:
 Builds a colour from one component group.
(void) - setColorWithArray:
 Replaces the palette from an array of colour components.
(int) - getColorType
 The current palette's type, derived from the three colours.
(UIColor *) - getBaseColor
 The current base colour.
(UIColor *) - getLineColor
 The current line colour.
(UIColor *) - getWaveColor
 The current wave colour.

Properties

KnitColorManager * sharedManager
 The shared instance.

Detailed Description

Holds the three colours the knit background is drawn with.

Method Documentation

◆ getBaseColor

- (UIColor *) getBaseColor

The current base colour.

Returns
The base colour.
Ghidra address:
0x166744
Ghidra address:
0x166744

◆ getColorType

- (int) getColorType

The current palette's type, derived from the three colours.

Returns 0 when the differ flag is clear, 1 when the colours match palette 1, 4 when they match palette 4, and 5 otherwise.

Ghidra address:
0x166528
Ghidra address:
0x166528

◆ getLineColor

- (UIColor *) getLineColor

The current line colour.

Returns
The line colour.
Ghidra address:
0x166754
Ghidra address:
0x166754

◆ getWaveColor

- (UIColor *) getWaveColor

The current wave colour.

Returns
The wave colour.
Ghidra address:
0x166764
Ghidra address:
0x166764

◆ init

- (instancetype) init

Builds the manager.

Returns
The initialised manager.
Ghidra address:
0x166060
Ghidra address:
0x166060

◆ makeColor:

- (UIColor *) makeColor: (const KnitColorComponents *) components

Builds a colour from one component group.

Divides red, green, and blue by 255 and uses alpha as given. The receiver is ignored — the method overwrites x0 with the UIColor class before doing anything — so it is effectively a free function that happens to be a method.

Ghidra address:
0x166098
Ghidra address:
0x166098

◆ setColorWithArray:

- (void) setColorWithArray: (NSArray *) colors

Replaces the palette from an array of colour components.

Expects nine integers: three triples for base, line, and wave. Each triple is divided by 255 and used with alpha 1.0. If the count is not nine, nothing happens and the differ flag is cleared.

Ghidra address:
0x1661c0
Ghidra address:
0x1661c0

◆ setColorWithType:

- (void) setColorWithType: (unsigned int) type

Selects a built-in palette by type.

Indexes a table of 0x30-byte entries at 0x353d78 by type and builds the three colours from the three 16-byte component groups inside the selected entry. The index is not range-checked, so an out-of-range type reads past the table.

Ghidra address:
0x1660d8
Ghidra address:
0x1660d8

Property Documentation

◆ sharedManager

- (KnitColorManager *) sharedManager
readnonatomicassign

The shared instance.

Ghidra address:
0x165fe0
Ghidra address:
0x166020

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