Expand description
check --target <id>: whether the game fits a target (ADR-0008 §1),
by the target’s profile and the game’s setting for it in shuyi.ron
(TargetSetting). Five checks for now:
- Fits. The frame times its scale fits the display inside its safe area.
- Text. The smallest text (the font’s cell height × the scale) is
at least the profile’s
min_text_px(an error) and itsgood_text_px(a warning). - Controls. On every screen of the game, the required actions it
declares bind to distinct inputs of the target, in the keymap file’s
table named after it (
shuyi_ui::input::fit;controls). It needs the game’s tools (GameTools::controls). - One bit. On a target whose display is black and white, every
role of the skin’s palette has patterns, the roles that tell things
apart stay distinct, and text is black on white or the inverse
(ADR-0008 §4;
shuyi_assets::onebit::check;one_bit). It needs the game’s tools (GameTools::one_bit). - App. Who the game is,
shuyi.ron’sapppart: its name, id, version, build and storage’s name, and whether the Rust fileapp-infowrites is up to date (crate::app_info;app). The same on every target.
The engine’s profiles are the files of targets/ at the repository’s
root, embedded; a game’s own (shuyi.ron’s target_profiles) add to
them, or replace one by its id.
Structs§
- Factor
- The scale a frame is shown at, as a fraction:
num / den. - Profile
- A target profile and the file it came from.
- Target
Problem - A problem of the game on one target.
- Target
Report - What
check --targetfound on one target.
Enums§
- Level
- How bad a target problem is.
- Target
Check - Which check found a target problem.
Constants§
- ALL
- What
--target allasks for: every target in the game’sshuyi.ron.
Functions§
- app
- The problems of the game’s
apppart (crate::app_info::problems), as target problems about its fields (app.id). - asked
- The targets
targetasks for inconfig: itself, or every one withALL; an error ifshuyi.rondoesn’t list it. - check_
target - The game’s
settingfor targetidchecked againstprofile: every problem, display size by display size. A display of any size (a window) shows the frame at scale 1. - controls
- What the controls’ check found on target
id(FitProblems), as target problems: errors, but for a screen that doesn’t declare its actions, a warning. - engine_
profiles - The engine’s profiles, by id.
- one_bit
- What the one-bit check finds of
skin(shuyi_assets::onebit::check), as target problems about its pattern map: errors, but for text that isn’t black and white, a warning. - profile
- The profile (with its file) of target
id(the engine’s or the game’s ofconfig, fromroot), or the code and what is wrong: the profiles don’t load, or none has that id. Both arecodes::TARGET. - profiles
- The engine’s profiles, with the game’s of
config(fromroot) added or in place of the engine’s of the same id. - scale_
on - The scale
scalegives frame(width, height)onspace(the display inside its safe area): forScale::Integer, the largest whole number that fits, which is 0 when even 1 doesn’t; forScale::Fit, the largest factor that fits.