|
resonance 1.0.1
|
Disc exchange that MetExpansionPakScreen runs to swap the game disc for the expansion disc. More...
#include <discswap.h>
Public Types | |
| enum | Step { kStepEjecting = 2 , kStepEjectFailed = 3 , kStepTrayOpen = 4 , kStepClosing = 5 , kStepCloseFailed = 6 , kStepDiscReady = 7 , kStepNotReady = 9 , kStepMounted = 10 , kStepBadDisc = 11 , kStepNoDisc = 12 } |
| A screen state that a polling routine returns. More... | |
Public Member Functions | |
| void | Reset () |
| Prepare a new exchange. | |
| int | ReleaseDisc () |
| Let go of the current disc once the asynchronous reader is idle. | |
| void | BeginEject () |
| Restart the eject sequence. | |
| int | PollEject () |
| Advance the eject sequence by one poll. | |
| void | BeginInsert () |
| Restart the insert sequence. | |
| int | PollInsert () |
| Advance the insert sequence by one poll. | |
| int | CheckDisc () |
| Classify the disc once the drive is ready, without moving the tray. | |
| int | MountDisc () |
| Mount the archives from the new disc and run script template 205. | |
Disc exchange that MetExpansionPakScreen runs to swap the game disc for the expansion disc.
The record is 0x18 bytes, embedded in the screen at +0x90. It has no vtable, no RTTI, and no literal of its own, so the title is inferred from what the routines do. They stop the drive and open the tray, close the tray and wait for the drive, classify the inserted disc, and remount the archives.
Each polling routine returns the screen's next state, a Step value, and the screen stores the result as its state without translating it. When the game is not reading from the disc alone, the polling routines report their final step without touching the drive.
| enum DiscSwap::Step |
A screen state that a polling routine returns.
The names are inferred.
| void DiscSwap::Reset | ( | ) |
Prepare a new exchange.
Clears the poll count, sets the poll limit to 1800, records whether the game reads from the disc alone, clears the no-disc flag, and caches configuration value 0x514.
| int DiscSwap::ReleaseDisc | ( | ) |
Let go of the current disc once the asynchronous reader is idle.
While requests are still queued this pumps the finished ones and reports zero. Otherwise it unmounts the session archives through CloseArk(). A call that unmounts them reports zero, so the screen calls again on the next frame, and that call finds nothing mounted and reports one. The record itself is not read.
| void DiscSwap::BeginEject | ( | ) |
Restart the eject sequence.
| int DiscSwap::PollEject | ( | ) |
Advance the eject sequence by one poll.
An empty drive skips the stop. Otherwise the drive is stopped, then the routine waits for the drive to go idle and requests the tray open.
| void DiscSwap::BeginInsert | ( | ) |
Restart the insert sequence.
The body is identical to BeginEject(), but the two are separate routines in the image.
| int DiscSwap::PollInsert | ( | ) |
Advance the insert sequence by one poll.
Waits for the drive to go idle, requests the tray closed, and then waits for the drive to report ready. After the poll limit passes, the disc is classified anyway.
| int DiscSwap::CheckDisc | ( | ) |
Classify the disc once the drive is ready, without moving the tray.
| int DiscSwap::MountDisc | ( | ) |
Mount the archives from the new disc and run script template 205.