coastline 0.0.4
Loading...
Searching...
No Matches
coastline::PaintShop Class Reference

The paint shop of the console. More...

#include <paintshop.h>

Public Member Functions

 ~PaintShop ()
 Release paint previews and editing resources before the menu screen and GPU device.
 PaintShop (const PaintShop &)=delete
 Prevent copying active editing and preview resources.
PaintShop & operator= (const PaintShop &)=delete
 Prevent assignment of active editing and preview resources.
void SetCar (int car, const std::filesystem::path &directory)
 Choose the car the paint shop opens with, as the car select screen exits to it.
bool Frame (SceneRenderer &renderer, float seconds, const PaintShopInput &input)
 Run a frame of the paint shop and draw it.
bool TakesText () const
std::optional< bool > LoadDecalsFrame (SceneRenderer &renderer, float seconds, const PaintShopInput &input, DecalCar &car)
 Run a frame of the dialog that loads the decals on the car select screen, as the car select screen of the console runs ProcessDecalSaveLoad() and DrawPakErrorMessage().
bool LoadDecalsQuietly (DecalCar &car)
 Load the decals of the Controller Pak into a car at once, without the dialog, for the custom decals a player chose before.

Static Public Member Functions

static std::unique_ptr< PaintShop > Load (SceneRenderer &renderer, const std::filesystem::path &release, MenuScreen &screen, std::optional< std::array< int, 6 > > &textColors, ControllerPak pak)
 Read the pictures and the tables of the paint shop from the import of a release.

Friends

class Menus

Detailed Description

The paint shop of the console.

Constructor & Destructor Documentation

◆ ~PaintShop()

coastline::PaintShop::~PaintShop ( )

Release paint previews and editing resources before the menu screen and GPU device.

◆ PaintShop()

coastline::PaintShop::PaintShop ( const PaintShop & )
delete

Prevent copying active editing and preview resources.

Member Function Documentation

◆ Load()

std::unique_ptr< PaintShop > coastline::PaintShop::Load ( SceneRenderer & renderer,
const std::filesystem::path & release,
MenuScreen & screen,
std::optional< std::array< int, 6 > > & textColors,
ControllerPak pak )
static

Read the pictures and the tables of the paint shop from the import of a release.

Parameters
rendererThe renderer that draws the paint shop.
releaseThe selected cartridge directory, n64/base of the prepared assets.
screenThe menu screens, whose fades and fonts the paint shop shares.
textColorsThe custom colours of the text of the menus, set by the paint shop.
pakThe Controller Pak the decals are saved on.
Returns
The paint shop, or nothing with the reason logged.

◆ operator=()

PaintShop & coastline::PaintShop::operator= ( const PaintShop & )
delete

Prevent assignment of active editing and preview resources.

◆ SetCar()

void coastline::PaintShop::SetCar ( int car,
const std::filesystem::path & directory )

Choose the car the paint shop opens with, as the car select screen exits to it.

Parameters
carThe car, an index of the cars of the menus.
directoryThe directory of the car in the import.

◆ Frame()

bool coastline::PaintShop::Frame ( SceneRenderer & renderer,
float seconds,
const PaintShopInput & input )

Run a frame of the paint shop and draw it.

Parameters
rendererThe renderer of the frame, between Begin() and End().
secondsThe time of the frame.
inputThe input of the player.
Returns
Whether the paint shop has closed for car select.

◆ TakesText()

bool coastline::PaintShop::TakesText ( ) const
Returns
Whether the keyboard of the text tool shows and reads PaintShopInput::text.

◆ LoadDecalsFrame()

std::optional< bool > coastline::PaintShop::LoadDecalsFrame ( SceneRenderer & renderer,
float seconds,
const PaintShopInput & input,
DecalCar & car )

Run a frame of the dialog that loads the decals on the car select screen, as the car select screen of the console runs ProcessDecalSaveLoad() and DrawPakErrorMessage().

Parameters
rendererThe renderer of the frame, between Begin() and End().
secondsThe time of the frame.
inputThe input of the player.
carThe car the decals load into.
Returns
Whether the dialog has closed, and with it whether the decals loaded.

◆ LoadDecalsQuietly()

bool coastline::PaintShop::LoadDecalsQuietly ( DecalCar & car)

Load the decals of the Controller Pak into a car at once, without the dialog, for the custom decals a player chose before.

Parameters
carThe car the decals load into.
Returns
Whether the decals loaded.

◆ Menus

friend class Menus
friend

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