<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.wowcube.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=WowBot</id>
	<title>WowWiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.wowcube.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=WowBot"/>
	<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/wiki/Special:Contributions/WowBot"/>
	<updated>2026-07-26T22:37:11Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.33.0</generator>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=SDK_6.3/Rust&amp;diff=16981</id>
		<title>SDK 6.3/Rust</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=SDK_6.3/Rust&amp;diff=16981"/>
		<updated>2026-07-26T10:45:18Z</updated>

		<summary type="html">&lt;p&gt;WowBot: Link full API reference subpages (WowBot)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{notice|'''Official WOWCube SDK documentation.''' SDK 6.3, Rust API — '''EXPERIMENTAL.''' Rust support is an experimental, supported track: APIs may change between releases. The C++ (WebAssembly) API remains the primary development track.}}&lt;br /&gt;
&lt;br /&gt;
{{SDK 6.3 nav}}&lt;br /&gt;
&lt;br /&gt;
''← [[SDK 6.3]] · Rust''&lt;br /&gt;
&lt;br /&gt;
Rust cubeapps compile to WebAssembly (&amp;lt;code&amp;gt;wasm32-unknown-unknown&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;no_std&amp;lt;/code&amp;gt;) and use the same engine ABI as the [[SDK 6.3/C++/Native API|C++ native API]] — with '''1:1 feature parity''' with C++ SDK 6.3 (all graphics, topology, communication, motion, sound, leaderboard, 140+ named colors, math). One WASM module runs on all eight cube modules; each instance drives the module's three 240×240 screens.&lt;br /&gt;
&lt;br /&gt;
== The CubiOS Rust SDK ==&lt;br /&gt;
&lt;br /&gt;
The SDK is a two-crate Cargo workspace — '''[https://github.com/wowcube/CubiOS_Rust_SDK CubiOS_Rust_SDK]''' on GitHub:&lt;br /&gt;
&lt;br /&gt;
* '''&amp;lt;code&amp;gt;cubios-sys&amp;lt;/code&amp;gt; — raw layer.''' FFI bindings to the CubiOS engine ABI plus thin safe wrappers and the application event loop. Modules: &amp;lt;code&amp;gt;application&amp;lt;/code&amp;gt; (the &amp;lt;code&amp;gt;Application&amp;lt;/code&amp;gt; trait, timers, event loop), &amp;lt;code&amp;gt;comm&amp;lt;/code&amp;gt; (packets, BLE, time, saves, RNG, logging), &amp;lt;code&amp;gt;gfx&amp;lt;/code&amp;gt; (immediate-mode drawing), &amp;lt;code&amp;gt;topology&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;sound&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;motion&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;leaderboard&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;event&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;network_message&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;save_message&amp;lt;/code&amp;gt; (bit-packed serializers), &amp;lt;code&amp;gt;screen&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;math&amp;lt;/code&amp;gt; (Vec2, Color, Transform, Rect2), &amp;lt;code&amp;gt;types&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;constants&amp;lt;/code&amp;gt;.&lt;br /&gt;
* '''&amp;lt;code&amp;gt;cubios&amp;lt;/code&amp;gt; — safe / high-level layer.''' A Rust port of the C++ &amp;lt;code&amp;gt;Cubios::&amp;lt;/code&amp;gt; classes: retained per-screen rendering (&amp;lt;code&amp;gt;begin → add → end&amp;lt;/code&amp;gt;), &amp;lt;code&amp;gt;Scene&amp;lt;/code&amp;gt; registry, &amp;lt;code&amp;gt;Sprite&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;AnimatedSprite&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;SpriteAtlas&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;Background&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;Text&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;QRCode&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;OffscreenRenderTarget&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Sound&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;SoundCollection&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Scramble&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Splashscreen&amp;lt;/code&amp;gt;, and 142 named colors (&amp;lt;code&amp;gt;Colors::*&amp;lt;/code&amp;gt;). Builders are chainable; storage is &amp;lt;code&amp;gt;heapless&amp;lt;/code&amp;gt; (no allocator).&lt;br /&gt;
&lt;br /&gt;
Public API surface: '''533 functions across 27 modules'''. Everything is &amp;lt;code&amp;gt;no_std&amp;lt;/code&amp;gt;; the bundled minimal example builds to a ~3 KB &amp;lt;code&amp;gt;.wasm&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Application trait ==&lt;br /&gt;
&lt;br /&gt;
A cubeapp implements &amp;lt;code&amp;gt;Application&amp;lt;/code&amp;gt; (from &amp;lt;code&amp;gt;cubios_sys::ffi::application&amp;lt;/code&amp;gt;) and exports two entry points the runtime calls: &amp;lt;code&amp;gt;on_init(cid)&amp;lt;/code&amp;gt; (module index 0–7) and &amp;lt;code&amp;gt;run&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Callback !! When&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;on_init()&amp;lt;/code&amp;gt; || once, after construction&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;on_tick(cur_time, delta_time)&amp;lt;/code&amp;gt; || every frame (ms)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;on_render(&amp;amp;mut [Screen; 3])&amp;lt;/code&amp;gt; || module is about to draw&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;on_phys_tick(&amp;amp;[Screen; 3])&amp;lt;/code&amp;gt; || fixed-cadence physics tick&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;on_twist(&amp;amp;TopologyTwistInfo)&amp;lt;/code&amp;gt; || cube twisted&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;on_tap(count)&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;on_pat(count)&amp;lt;/code&amp;gt; || tap on a screen / opposite side&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;on_message(msg_type, data)&amp;lt;/code&amp;gt; || packet from another module&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;on_external_message(data)&amp;lt;/code&amp;gt; || BLE data from the companion app&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;on_timer(timer_id)&amp;lt;/code&amp;gt; || programmable timer fired&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;on_close()&amp;lt;/code&amp;gt; || app is closing&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Timer helpers (&amp;lt;code&amp;gt;set_timer / start_timer / stop_timer / kill_timer&amp;lt;/code&amp;gt;) come with the trait via &amp;lt;code&amp;gt;ApplicationContext&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Quick start ==&lt;br /&gt;
&lt;br /&gt;
 #![no_std]&lt;br /&gt;
 use cubios::high_level::gfx::{Background, Text};&lt;br /&gt;
 use cubios::high_level::scene::SceneObjectEnum;&lt;br /&gt;
 use cubios::high_level::screen::Screen;&lt;br /&gt;
 use cubios::sys::ffi::application::{application_init, application_run,&lt;br /&gt;
                                     AppErr, Application, ApplicationContext};&lt;br /&gt;
 use cubios::sys::ffi::screen::Screen as SysScreen;&lt;br /&gt;
 use cubios::sys::ffi::types::{TopologyOrientation, TopologyTwistInfo};&lt;br /&gt;
 &lt;br /&gt;
 struct HelloCube { ctx: ApplicationContext }&lt;br /&gt;
 &lt;br /&gt;
 impl Application for HelloCube {&lt;br /&gt;
     fn app_context_mut(&amp;amp;mut self) -&amp;gt; &amp;amp;mut ApplicationContext { &amp;amp;mut self.ctx }&lt;br /&gt;
     fn on_init(&amp;amp;mut self) -&amp;gt; Result&amp;lt;(), AppErr&amp;gt; { Ok(()) }&lt;br /&gt;
     fn on_tick(&amp;amp;mut self, _t: u32, _dt: u32) -&amp;gt; Result&amp;lt;(), AppErr&amp;gt; { Ok(()) }&lt;br /&gt;
 &lt;br /&gt;
     fn on_render(&amp;amp;mut self, screens: &amp;amp;mut [SysScreen; 3]) -&amp;gt; Result&amp;lt;(), AppErr&amp;gt; {&lt;br /&gt;
         for s in screens.iter() {&lt;br /&gt;
             let mut screen: Screen = Screen::new(s.id());&lt;br /&gt;
             screen.begin(TopologyOrientation::Menu, false);&lt;br /&gt;
             screen.add(SceneObjectEnum::Background(Background::from_rgb(0, 0, 0)));&lt;br /&gt;
             screen.add(SceneObjectEnum::Text(Text::at(&amp;quot;HELLO&amp;quot;, 120.0, 100.0).with_font_size(24)));&lt;br /&gt;
             screen.add(SceneObjectEnum::Text(Text::at(&amp;quot;WOWCUBE&amp;quot;, 120.0, 140.0).with_font_size(24)));&lt;br /&gt;
             screen.end();&lt;br /&gt;
         }&lt;br /&gt;
         Ok(())&lt;br /&gt;
     }&lt;br /&gt;
     // ... remaining callbacks return Ok(())&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 static mut APPLICATION: Option&amp;lt;HelloCube&amp;gt; = None;&lt;br /&gt;
 &lt;br /&gt;
 #[no_mangle]&lt;br /&gt;
 pub extern &amp;quot;C&amp;quot; fn on_init(cid: u32) {&lt;br /&gt;
     let mut app = HelloCube { ctx: ApplicationContext::new() };&lt;br /&gt;
     application_init(&amp;amp;mut app, cid);&lt;br /&gt;
     unsafe { *core::ptr::addr_of_mut!(APPLICATION) = Some(app) }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 #[no_mangle]&lt;br /&gt;
 pub extern &amp;quot;C&amp;quot; fn run() {&lt;br /&gt;
     let app = unsafe { (*core::ptr::addr_of_mut!(APPLICATION)).as_mut().unwrap() };&lt;br /&gt;
     application_run(app);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Build: &amp;lt;code&amp;gt;cargo build --release --target wasm32-unknown-unknown&amp;lt;/code&amp;gt; (the workspace config adds &amp;lt;code&amp;gt;--allow-undefined&amp;lt;/code&amp;gt; so engine functions become WASM imports). Package and install like a C++ cubeapp via the [https://marketplace.visualstudio.com/items?itemName=cubios-inc.WOWCubeSDK WOWCube SDK extension for VS Code].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Full API reference ==&lt;br /&gt;
Complete, generated from the repository sources:&lt;br /&gt;
* [[SDK 6.3/Rust/cubios-sys]] — raw layer: every FFI binding and safe wrapper (14 modules)&lt;br /&gt;
* [[SDK 6.3/Rust/cubios]] — high-level layer: every type and method (scene, screens, sprites, text, sound, splash, 142 colors)&lt;br /&gt;
&lt;br /&gt;
== Conventions ==&lt;br /&gt;
&lt;br /&gt;
Identical to the C++ SDK: colors &amp;lt;code&amp;gt;0xAARRGGBB&amp;lt;/code&amp;gt; (142 named &amp;lt;code&amp;gt;Colors::*&amp;lt;/code&amp;gt;); rotation in degrees; scale in percent (100 = 1:1); inter-module packets bit-packed via &amp;lt;code&amp;gt;NetworkMessage&amp;lt;/code&amp;gt; (≤ &amp;lt;code&amp;gt;MESSAGE_SIZE_MAX&amp;lt;/code&amp;gt; bytes); persistent state via &amp;lt;code&amp;gt;SaveMessage&amp;lt;/code&amp;gt; (≤ &amp;lt;code&amp;gt;GAME_SAVE_SIZE&amp;lt;/code&amp;gt; bytes); &amp;lt;code&amp;gt;NET_BROADCAST&amp;lt;/code&amp;gt; = 0xFF; the module index is &amp;lt;code&amp;gt;CUBE_N&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Availability ==&lt;br /&gt;
&lt;br /&gt;
* '''Experimental status:''' Rust support is supported but experimental — API may change; the C++ track is primary.&lt;br /&gt;
* The '''Development Kit''' currently ships a thin bindings crate (&amp;lt;code&amp;gt;wowcube_sdk&amp;lt;/code&amp;gt; v0.1.0) with buildable examples (''Basics 1–3'').&lt;br /&gt;
* The full two-crate '''CubiOS Rust SDK''' is public: [https://github.com/wowcube/CubiOS_Rust_SDK github.com/wowcube/CubiOS_Rust_SDK] (source-available, © Cubios Inc.) — clone and build with stable Rust + &amp;lt;code&amp;gt;wasm32-unknown-unknown&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For per-function semantics see the [[SDK 6.3/C++/Native API|C++ native reference]] — names map 1:1 (&amp;lt;code&amp;gt;gfx::draw_text&amp;lt;/code&amp;gt; → &amp;lt;code&amp;gt;GFX_drawText&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
[[Category:SDK 6.3]]&lt;br /&gt;
[[Category:Rust API]]&lt;/div&gt;</summary>
		<author><name>WowBot</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=SDK_6.3/Rust/cubios-sys&amp;diff=16980</id>
		<title>SDK 6.3/Rust/cubios-sys</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=SDK_6.3/Rust/cubios-sys&amp;diff=16980"/>
		<updated>2026-07-26T10:45:16Z</updated>

		<summary type="html">&lt;p&gt;WowBot: Fix array-type signatures (WowBot)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{notice|'''Official WOWCube SDK documentation.''' SDK 6.3, Rust API — '''EXPERIMENTAL''' (supported; APIs may change). Generated from the [https://github.com/wowcube/CubiOS_Rust_SDK CubiOS_Rust_SDK] sources — the repository is authoritative; do not edit by hand.}}&lt;br /&gt;
&lt;br /&gt;
{{SDK 6.3 nav}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''← [[SDK 6.3]] · [[SDK 6.3/Rust|Rust]] / cubios-sys (raw layer)''&lt;br /&gt;
&lt;br /&gt;
Complete reference of the '''raw layer''' crate [https://github.com/wowcube/CubiOS_Rust_SDK/tree/main/crates/cubios-sys &amp;lt;code&amp;gt;cubios-sys&amp;lt;/code&amp;gt;]: FFI bindings to the CubiOS engine ABI, thin safe wrappers and the application event loop. Signatures and descriptions are extracted from the crate sources. Engine-function semantics match the [[SDK 6.3/C++/Native API|C++ native API]] one-to-one.&lt;br /&gt;
&lt;br /&gt;
== ffi::application ==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;Application&amp;lt;/code&amp;gt; trait (11 callbacks), &amp;lt;code&amp;gt;ApplicationContext&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;TimerController&amp;lt;/code&amp;gt;, the event loop (&amp;lt;code&amp;gt;application_init&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;application_run&amp;lt;/code&amp;gt;), &amp;lt;code&amp;gt;Anim&amp;amp;lt;T&amp;amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;AppErr&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Types:''' &amp;lt;code&amp;gt;enum AppErr&amp;lt;/code&amp;gt; · &amp;lt;code&amp;gt;enum AppPkt&amp;lt;/code&amp;gt; · &amp;lt;code&amp;gt;enum RotationDir&amp;lt;/code&amp;gt; · &amp;lt;code&amp;gt;struct Anim&amp;lt;/code&amp;gt; · &amp;lt;code&amp;gt;struct Timer&amp;lt;/code&amp;gt; · &amp;lt;code&amp;gt;trait Application&amp;lt;/code&amp;gt; · &amp;lt;code&amp;gt;trait Assetable&amp;lt;/code&amp;gt; · &amp;lt;code&amp;gt;trait Mappable&amp;lt;/code&amp;gt; · &amp;lt;code&amp;gt;trait Packable&amp;lt;/code&amp;gt; · &amp;lt;code&amp;gt;struct MapBase&amp;lt;/code&amp;gt; · &amp;lt;code&amp;gt;struct SceneSwitch&amp;lt;/code&amp;gt; · &amp;lt;code&amp;gt;trait Broadcastable&amp;lt;/code&amp;gt; · &amp;lt;code&amp;gt;trait Shuffable&amp;lt;/code&amp;gt; · &amp;lt;code&amp;gt;struct TimerController&amp;lt;/code&amp;gt; · &amp;lt;code&amp;gt;struct ApplicationContext&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''49 public functions:'''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Application::fn app_context_mut(&amp;amp;mut self) -&amp;amp;gt; &amp;amp;mut ApplicationContext&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Application::fn set_timer(&amp;amp;mut self, id: u8, delay: u32, suspended: bool) -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Application::fn start_timer(&amp;amp;mut self, id: u8) -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Application::fn stop_timer(&amp;amp;mut self, id: u8) -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Application::fn kill_timer(&amp;amp;mut self, id: u8)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Application::fn on_init(&amp;amp;mut self) -&amp;amp;gt; Result&amp;amp;lt;(), AppErr&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Called once when the application initializes.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Application::fn on_tick(&amp;amp;mut self, cur_time: u32, delta_time: u32) -&amp;amp;gt; Result&amp;amp;lt;(), AppErr&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Called every frame. `cur_time` is current time in ms, `delta_time` is ms since last tick.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Application::fn on_render(&amp;amp;mut self, screens: &amp;amp;mut [Screen; 3]) -&amp;amp;gt; Result&amp;amp;lt;(), AppErr&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Called to render the current frame. `screens` contains the 3 screens for this module.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Application::fn on_phys_tick(&amp;amp;mut self, screens: &amp;amp;[Screen; 3]) -&amp;amp;gt; Result&amp;amp;lt;(), AppErr&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Called on physics tick. `screens` contains the 3 screens for this module.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Application::fn on_twist(&amp;amp;mut self, twist: &amp;amp;TopologyTwistInfo) -&amp;amp;gt; Result&amp;amp;lt;(), AppErr&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Called when a twist event occurs.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Application::fn on_tap(&amp;amp;mut self, count: u32) -&amp;amp;gt; Result&amp;amp;lt;(), AppErr&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Called when a tap event occurs. `count` is the number of taps.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Application::fn on_pat(&amp;amp;mut self, count: u32) -&amp;amp;gt; Result&amp;amp;lt;(), AppErr&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Called when a pat event occurs. `count` is the number of pats.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Application::fn on_message(&amp;amp;mut self, msg_type: u32, data: &amp;amp;[u8]) -&amp;amp;gt; Result&amp;amp;lt;(), AppErr&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Called when a network message is received from another module.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Application::fn on_external_message(&amp;amp;mut self, data: &amp;amp;[u8]) -&amp;amp;gt; Result&amp;amp;lt;(), AppErr&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Called when an external message is received via BLE.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Application::fn on_timer(&amp;amp;mut self, timer_id: u8) -&amp;amp;gt; Result&amp;amp;lt;(), AppErr&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Called when a timer fires.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Application::fn on_close(&amp;amp;mut self) -&amp;amp;gt; Result&amp;amp;lt;(), AppErr&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Called when the application is closing.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Application::fn get_time(&amp;amp;self) -&amp;amp;gt; u32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Returns current time in milliseconds.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Application::fn get_time_seconds(&amp;amp;self) -&amp;amp;gt; u32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Returns current time in seconds.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Application::fn is_master_module(&amp;amp;self) -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
: Returns true if this module is the master (module 0).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Application::fn send_network_message(&amp;amp;self, msg_type: u32, data: &amp;amp;[u8])&amp;lt;/code&amp;gt;&lt;br /&gt;
: Sends a network message to other modules.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Application::fn save_state(&amp;amp;self, data: &amp;amp;[u8])&amp;lt;/code&amp;gt;&lt;br /&gt;
: Saves game state to persistent storage.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Application::fn load_state(&amp;amp;self, id: &amp;amp;mut u32, data: &amp;amp;mut [u8]) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Loads game state from persistent storage. Returns the number of bytes read, or negative on error.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Application::fn send_external_message(&amp;amp;self, msg_type: u32, data: &amp;amp;mut [u8])&amp;lt;/code&amp;gt;&lt;br /&gt;
: Sends an external message via BLE.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Application::fn show_fps_counter(&amp;amp;self, show: bool)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Shows or hides the FPS counter overlay.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Application::fn get_image_assets_count(&amp;amp;self) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Returns the number of image assets available.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Application::fn get_sound_assets_count(&amp;amp;self) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Returns the number of sound assets available.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Assetable::fn get_asset_id(asset: &amp;amp;'static str) -&amp;amp;gt; Result&amp;amp;lt;u32, AppErr&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Mappable::fn get_place( &amp;amp;self, module: u32, screen: u32, orientation: TopologyOrientation, ) -&amp;amp;gt; Result&amp;amp;lt;(u32, u32), AppErr&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Packable::fn to_pkt(&amp;amp;self, module: u8, screen: u8) -&amp;amp;gt; [u8; 4]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Packable::fn from_pkt(pkt: [u8; 4]) -&amp;amp;gt; (Self, u8, u8)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn new(val: T) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Broadcastable::fn broadcast_part(&amp;amp;mut self, _module: u8, _screen: u8, _delay: usize) -&amp;amp;gt; Result&amp;amp;lt;(), AppErr&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Broadcastable::fn broadcast(&amp;amp;mut self, delay: usize) -&amp;amp;gt; Result&amp;amp;lt;(), AppErr&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Broadcastable::fn recv(&amp;amp;mut self, pkt: [u8; 4]) -&amp;amp;gt; Result&amp;amp;lt;(), AppErr&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Shuffable::fn rotate(&amp;amp;mut self, dir: &amp;amp;RotationDir) -&amp;amp;gt; Result&amp;amp;lt;(), AppErr&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Shuffable::fn shuffle(&amp;amp;mut self, algo: &amp;amp;[RotationDir]) -&amp;amp;gt; Result&amp;amp;lt;(), AppErr&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn new(scenes: &amp;amp;'static [usize], start_time: usize) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn next_scene(&amp;amp;mut self)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn set_scene(&amp;amp;mut self, id: u8) -&amp;amp;gt; Result&amp;amp;lt;(), AppErr&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn animate(&amp;amp;mut self)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn new() -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Create a new TimerController with no active timers.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn set_timer(&amp;amp;mut self, id: u8, delay: u32, suspended: bool) -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn start_timer(&amp;amp;mut self, id: u8) -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn stop_timer(&amp;amp;mut self, id: u8) -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn kill_timer(&amp;amp;mut self, id: u8)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn delta_time(&amp;amp;self) -&amp;amp;gt; u32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn new() -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Create a new ApplicationContext.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn application_init&amp;amp;lt;T: Application&amp;amp;gt;(app: &amp;amp;mut T, cid: u32)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn application_run&amp;amp;lt;T: Application&amp;amp;gt;(app: &amp;amp;mut T)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== ffi::comm ==&lt;br /&gt;
&lt;br /&gt;
Inter-module packets and UART lines, BLE external data, time, user name, state save/load, RNG, logging (&amp;lt;code&amp;gt;log_a&amp;lt;/code&amp;gt;…&amp;lt;code&amp;gt;log_v&amp;lt;/code&amp;gt;), tap.&lt;br /&gt;
&lt;br /&gt;
'''22 public functions:'''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn send_message(line: u32, pkt: *const u8, size: u32) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn send_message_to(line: u32, dest: u32, pkt: *const u8, size: u32) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn recv_message( line: u32, size: u32, pkt_info: *mut u32, pkt: *mut u8, rx_size: *mut u32, ) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn send_packet(packet_type: u32, pkt: &amp;amp;[u8]) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Send a packet (new API in SDK 6.3)&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn recv_packet(size: u32, packet_type: *mut u32, pkt: *mut u8) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Receive a packet (new API in SDK 6.3)  Returns the number of bytes received, or negative on error. The packet type is written to `packet_type`.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_time() -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_user_name(buffer: &amp;amp;mut [u8]) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn toggle_debug_info() -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn save_state(data: &amp;amp;[u8]) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn load_state(id: &amp;amp;mut u32, data: &amp;amp;mut [u8]) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Load saved state  Returns the number of bytes loaded, or negative on error. The save ID is written to `id`.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn load_state_legacy(data: &amp;amp;mut [u8]) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Load saved state (legacy API without ID)  Note: This ignores the save ID. Use `load_state` for full functionality.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn random_range(min: u32, max: u32) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_app_version() -&amp;amp;gt; AppVersion&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get the application version&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn log_a(text: &amp;amp;str) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn log_e(text: &amp;amp;str) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn log_w(text: &amp;amp;str) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn log_i(text: &amp;amp;str) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn log_d(text: &amp;amp;str) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn log_v(text: &amp;amp;str) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_tap() -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn send_ble_data(data_type: u32, pkt: &amp;amp;mut [u8]) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Send BLE data&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn recv_ble_data(pkt: &amp;amp;mut [u8]) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Receive BLE data&lt;br /&gt;
&lt;br /&gt;
== ffi::gfx ==&lt;br /&gt;
&lt;br /&gt;
Immediate-mode drawing: clear, primitives, text, images, baked images, sub-images, shaders, QR, render target, cache.&lt;br /&gt;
&lt;br /&gt;
'''26 public functions:'''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_asset_id(sprite_name: &amp;amp;str) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn clear(color: u32) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn draw_text( x: i32, y: i32, scale: u32, angle: u32, align: TextAlign, color: u32, text: &amp;amp;str, ) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn draw_point(x: i32, y: i32, color: u32) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn draw_circle(x: u32, y: u32, radius: u32, width: u32, color: u32) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn draw_solid_circle(x: u32, y: u32, radius: u32, color: u32) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Deprecated: use `set_fill_shader` + `draw_circle` instead&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn draw_arc( x: i32, y: i32, radius: u32, width: u32, angle0: u32, angle1: u32, color: u32, ) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn draw_sector(x: i32, y: i32, radius: u32, angle0: u32, angle1: u32, color: u32) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn draw_line(x0: i32, y0: i32, x1: i32, y1: i32, thickness: u32, color: u32) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn draw_rectangle(x: i32, y: i32, w: i32, h: i32, color: u32) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn bake_image( id: SpriteId, width: u32, height: u32, format: GfxPixelFormat, overwrite: bool, ) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Bake an image to an offscreen buffer  # Arguments * `id` - Sprite ID to bake * `width` - Width of the baked image * `height` - Height of the baked image * `format` - Pixel format for the baked image * `overwrite` - Whether to overwrite existing baked image&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn remove_baked_image(id: SpriteId) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Remove a previously baked image&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn set_render_target(display: u8) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn draw_image( id: SpriteId, x: i32, y: i32, opacity: u32, color_key: u32, scale_x: u32, scale_y: u32, angle: u32, mirror: GfxMirror, ) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn draw_baked_image( x: i32, y: i32, opacity: u32, color_key: u32, scale_x: u32, scale_y: u32, angle: u32, mirror: GfxMirror, id: SpriteId, ) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn draw_sub_image( id: SpriteId, x: i32, y: i32, rect_x: u32, rect_y: u32, rect_w: u32, rect_h: u32, opacity: u32, color_key: u32, scale_x: u32, scale_y: u32, angle: u32, mirror: GfxMirror, ) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Draw a sub-region of a sprite (for sprite atlases)&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn draw_qr_code( x: i32, y: i32, size: u32, color0: u32, color1: u32, angle: u32, id: u32, text: &amp;amp;str, ) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Draw a QR code&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn render() -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn clear_cache() -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn cache_images(sprite_ids: &amp;amp;[SpriteId]) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_assets_count() -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get the total number of image assets&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn set_fps_window(size: u32) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set the FPS counter window size&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn set_fill_shader(color: u32) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set a solid fill shader  When active, drawing operations will use this color to fill shapes.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn set_linear_gradient_shader( x0: u32, y0: u32, x1: u32, y1: u32, color0: u32, color1: u32, ) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set a linear gradient shader  # Arguments * `x0`, `y0` - Start point of the gradient * `x1`, `y1` - End point of the gradient * `color0` - Start color * `color1` - End color&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn set_radial_gradient_shader(x0: u32, y0: u32, radius: u32, color0: u32, color1: u32) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set a radial gradient shader  # Arguments * `x0`, `y0` - Center point of the gradient * `radius` - Radius of the gradient * `color0` - Center color * `color1` - Edge color&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn remove_shader() -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Remove the active shader&lt;br /&gt;
&lt;br /&gt;
== ffi::topology ==&lt;br /&gt;
&lt;br /&gt;
Facelets, faces, places, orientation, twists, assembly check.&lt;br /&gt;
&lt;br /&gt;
'''15 public functions:'''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_cuben() -&amp;amp;gt; u32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_adjacent_facelet( module: u32, screen: u32, direction: TopologyNeighbour, result: *mut TopologyFaceletInfo, ) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_reversed_face(face: u32) -&amp;amp;gt; Option&amp;amp;lt;u32&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_facelet( face: u32, position: u32, mode: TopologyOrientation, result: *mut TopologyFaceletInfo, ) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_place( module: u32, screen: u32, mode: TopologyOrientation, result: *mut TopologyPlace, ) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_opposite_facelet(module: u32, screen: u32, result: *mut TopologyFaceletInfo) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_angle(module: u32, screen: u32, mode: TopologyOrientation) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_facelet_orientation(module: u32, screen: u32) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_place_orientation(face: u32, position: u32) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_face(orientation: u32) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn is_assembled() -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_twist(twist: *mut TopologyTwistInfo) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn debug_get_face(module: u32, screen: u32) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn debug_get_position(module: u32, screen: u32) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn debug_get_horizontal() -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== ffi::sound ==&lt;br /&gt;
&lt;br /&gt;
Sound asset id, play, cache, stop, status.&lt;br /&gt;
&lt;br /&gt;
'''6 public functions:'''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_asset_id(sound_name: &amp;amp;str) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn play(sound_id: SoundId, volume: u32) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn cache_sounds(sound_ids: &amp;amp;[SoundId]) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn is_playing() -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
: Check if a sound is currently playing&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn stop() -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Stop the currently playing sound&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_assets_count() -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get the total number of sound assets&lt;br /&gt;
&lt;br /&gt;
== ffi::motion ==&lt;br /&gt;
&lt;br /&gt;
Per-display accelerometer and gyroscope.&lt;br /&gt;
&lt;br /&gt;
'''8 public functions:'''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_face_accel_x(display: u32) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get raw accelerometer value along the screen-local X-axis (horizontal right).  At rest, this reads the X-component of gravity in the screen's coordinate frame. During motion, reads gravity + linear acceleration.  # Parameters - `display`: Screen index (0–23). All 3 screens on a module return the same physical measurement, transformed to screen-local coordinates.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_face_accel_y(display: u32) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get raw accelerometer value along the screen-local Y-axis (vertical up).  See [`get_face_accel_x`] for details on data format and coordinate frame.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_face_accel_z(display: u32) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get raw accelerometer value along the screen-local Z-axis (toward cube center).  When this screen faces up, Z reads approximately -1g (gravity pulls toward center). When this screen faces down, Z reads approximately +1g.  See [`get_face_accel_x`] for details on data format and coordinate frame.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_face_gyro_x(display: u32) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get raw gyroscope value for rotation around the screen-local X-axis.  Measures angular velocity of the screen pitching up/down. At rest, reads approximately zero. Sign convention: positive = clockwise when looking along the positive X-axis direction (per SDK docs, unverified).  # Parameters - `display`: Screen index (0–23). Same sensor sharing as accelerometer.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_face_gyro_y(display: u32) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get raw gyroscope value for rotation around the screen-local Y-axis.  Measures angular velocity of the screen yawing left/right. See [`get_face_gyro_x`] for details.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_face_gyro_z(display: u32) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get raw gyroscope value for rotation around the screen-local Z-axis.  Measures angular velocity of the screen spinning in-plane (like a wheel). See [`get_face_gyro_x`] for details.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_face_accel(display: u32) -&amp;amp;gt; (i32, i32, i32)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get all 3 accelerometer axes for a screen in one call.  Returns `(x, y, z)` in screen-local coordinates. Equivalent to calling [`get_face_accel_x`], [`get_face_accel_y`], and [`get_face_accel_z`] separately.  # Parameters - `display`: Screen index (0–23).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_face_gyro(display: u32) -&amp;amp;gt; (i32, i32, i32)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get all 3 gyroscope axes for a screen in one call.  Returns `(x, y, z)` angular velocities in screen-local coordinates. Equivalent to calling [`get_face_gyro_x`], [`get_face_gyro_y`], and [`get_face_gyro_z`] separately.  # Parameters - `display`: Screen index (0–23).&lt;br /&gt;
&lt;br /&gt;
== ffi::leaderboard ==&lt;br /&gt;
&lt;br /&gt;
Leaderboard info and score table.&lt;br /&gt;
&lt;br /&gt;
'''3 public functions:'''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_info(info: *mut LbInfo) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_info_safe() -&amp;amp;gt; LbInfo&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get leaderboard info with safe interface&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_score(lead_table_bin: &amp;amp;mut [u8]) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== ffi::event ==&lt;br /&gt;
&lt;br /&gt;
Pending-event mask (&amp;lt;code&amp;gt;Event&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;get_list&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
'''Types:''' &amp;lt;code&amp;gt;enum Event&amp;lt;/code&amp;gt; — Event flags returned by `get_list()`&lt;br /&gt;
&lt;br /&gt;
'''2 public functions:'''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_list() -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn has_event(event_list: i32, event: Event) -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
: Check if a specific event is set in the event list&lt;br /&gt;
&lt;br /&gt;
== ffi::network_message ==&lt;br /&gt;
&lt;br /&gt;
Bit-packed serializer for inter-module messages.&lt;br /&gt;
&lt;br /&gt;
'''Types:''' &amp;lt;code&amp;gt;struct NetworkMessage&amp;lt;/code&amp;gt; — Bit-packed network message for inter-module communication.  Allows packing multiple values into a compact byte buffer using variable bit widths for efficient network transmission.&lt;br /&gt;
&lt;br /&gt;
'''17 public functions:'''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn new() -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Create a new empty network message.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn from_data(data: &amp;amp;[u8]) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Create a network message from existing data.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn reset(&amp;amp;mut self, zero: bool)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Reset the message position. If `zero` is true, also clear the buffer.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_data(&amp;amp;self) -&amp;amp;gt; &amp;amp;[u8]&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get the underlying data buffer and used length.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn can_read(&amp;amp;self, bits: usize) -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
: Returns true if at least `bits` more bits can be read from the current position.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn write_int(&amp;amp;mut self, value: u32, bits: u8)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Write an unsigned integer with specified bit width (1-32 bits).  This writes raw bits without sign handling. For signed values that need sign extension when read back, use [`write_signed_int`](Self::write_signed_int).  # Arguments * `value` - The unsigned value to write (only the lower `bits` bits are used) * `bits` - Number of bits to write (1-32, clamped if larger)  # Note on C++ SDK difference The C++ `WriteInt` uses `int` (signed), but performs unsigned bit operations. This Rust version uses `u32` to make the unsigned semantics explicit.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn write_byte(&amp;amp;mut self, value: u8)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Write a single byte (8 bits).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn write_signed_int(&amp;amp;mut self, value: i32, bits: u8)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Write a signed integer with specified bit width.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn write_bool(&amp;amp;mut self, value: bool)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Write a boolean (1 bit).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn write_float(&amp;amp;mut self, value: f32)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Write a 32-bit float.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn read_int(&amp;amp;mut self, bits: u8) -&amp;amp;gt; u32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Read an unsigned integer with specified bit width.  This reads raw bits without sign extension. For signed values that were written with [`write_signed_int`](Self::write_signed_int), use [`read_signed_int`](Self::read_signed_int) to properly sign-extend.  # Arguments * `bits` - Number of bits to read (1-32, clamped if larger)  # Returns The unsigned value read from the message buffer.  # Note on C++ SDK difference The C++ `ReadInt` returns `int` (signed), but performs unsigned bit operations. This Rust version returns `u32` to make the unsigned semantics explicit.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn read_byte(&amp;amp;mut self) -&amp;amp;gt; u8&amp;lt;/code&amp;gt;&lt;br /&gt;
: Read a single byte.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn read_signed_int(&amp;amp;mut self, bits: u8) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Read a signed integer with specified bit width.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn read_bool(&amp;amp;mut self) -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
: Read a boolean.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn read_float(&amp;amp;mut self) -&amp;amp;gt; f32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Read a 32-bit float.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn position(&amp;amp;self) -&amp;amp;gt; usize&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get current bit position.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn can_write(&amp;amp;self, bits: usize) -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
: Check if there's enough space to write `bits` more bits.&lt;br /&gt;
&lt;br /&gt;
== ffi::save_message ==&lt;br /&gt;
&lt;br /&gt;
Bit-packed serializer for the persistent save buffer.&lt;br /&gt;
&lt;br /&gt;
'''Types:''' &amp;lt;code&amp;gt;struct SaveMessage&amp;lt;/code&amp;gt; — Bit-packed save message for game state persistence.  Allows packing multiple values into a compact byte buffer using variable bit widths for efficient save data storage.&lt;br /&gt;
&lt;br /&gt;
'''18 public functions:'''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn new() -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Create a new empty save message.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn from_data(data: &amp;amp;[u8]) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Create a save message from existing data.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn reset(&amp;amp;mut self, zero: bool)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Reset the message position. If `zero` is true, also clear the buffer.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_data(&amp;amp;self) -&amp;amp;gt; &amp;amp;[u8]&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get the underlying data buffer (only the used portion).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_buffer_mut(&amp;amp;mut self) -&amp;amp;gt; &amp;amp;mut [u8]&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get the full buffer for loading saved data.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn write_int(&amp;amp;mut self, value: u32, bits: u8)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Write an unsigned integer with specified bit width (1-32 bits).  This writes raw bits without sign handling. For signed values that need sign extension when read back, use [`write_signed_int`](Self::write_signed_int).  # Arguments * `value` - The unsigned value to write (only the lower `bits` bits are used) * `bits` - Number of bits to write (1-32, clamped if larger)  # Note on C++ SDK difference The C++ `WriteInt` uses `int` (signed), but performs unsigned bit operations. This Rust version uses `u32` to make the unsigned semantics explicit.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn write_byte(&amp;amp;mut self, value: u8)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Write a single byte (8 bits).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn write_signed_int(&amp;amp;mut self, value: i32, bits: u8)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Write a signed integer with specified bit width.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn write_bool(&amp;amp;mut self, value: bool)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Write a boolean (1 bit).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn write_float(&amp;amp;mut self, value: f32)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Write a 32-bit float.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn read_int(&amp;amp;mut self, bits: u8) -&amp;amp;gt; u32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Read an unsigned integer with specified bit width.  This reads raw bits without sign extension. For signed values that were written with [`write_signed_int`](Self::write_signed_int), use [`read_signed_int`](Self::read_signed_int) to properly sign-extend.  # Arguments * `bits` - Number of bits to read (1-32, clamped if larger)  # Returns The unsigned value read from the save buffer.  # Note on C++ SDK difference The C++ `ReadInt` returns `int` (signed), but performs unsigned bit operations. This Rust version returns `u32` to make the unsigned semantics explicit.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn read_byte(&amp;amp;mut self) -&amp;amp;gt; u8&amp;lt;/code&amp;gt;&lt;br /&gt;
: Read a single byte.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn read_signed_int(&amp;amp;mut self, bits: u8) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Read a signed integer with specified bit width.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn read_bool(&amp;amp;mut self) -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
: Read a boolean.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn read_float(&amp;amp;mut self) -&amp;amp;gt; f32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Read a 32-bit float.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn position(&amp;amp;self) -&amp;amp;gt; usize&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get current bit position.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn can_write(&amp;amp;self, bits: usize) -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
: Check if there's enough space to write `bits` more bits.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn set_used_bits(&amp;amp;mut self, bits: usize)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set the number of used bits (for after loading data).&lt;br /&gt;
&lt;br /&gt;
== ffi::screen ==&lt;br /&gt;
&lt;br /&gt;
Low-level screen descriptor (id, angle, face, position) + &amp;lt;code&amp;gt;create_screens()&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Types:''' &amp;lt;code&amp;gt;struct Screen&amp;lt;/code&amp;gt; — Represents a screen on a WOWCube module.  Each module has 3 screens. This struct provides access to screen properties like position, orientation, and display ID for rendering purposes.&lt;br /&gt;
&lt;br /&gt;
'''7 public functions:'''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn new(display_id: u8) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Creates a new Screen for the given display ID on this module.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn id(&amp;amp;self) -&amp;amp;gt; u8&amp;lt;/code&amp;gt;&lt;br /&gt;
: Returns the display ID (0-2).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn angle(&amp;amp;self) -&amp;amp;gt; u32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Returns the current rotation angle.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn position(&amp;amp;self) -&amp;amp;gt; u32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Returns the position in the topology.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn face(&amp;amp;self) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Returns the face this screen is on.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn update_from_topology(&amp;amp;mut self, module: u32, orientation: TopologyOrientation)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Updates screen topology information from the system.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn create_screens() -&amp;amp;gt; [Screen; 3]&amp;lt;/code&amp;gt;&lt;br /&gt;
: Creates an array of 3 screens for a module, initialized with display IDs 0, 1, 2.&lt;br /&gt;
&lt;br /&gt;
== ffi::math ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Vec2&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;Vec2i&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Color&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Transform&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Rect2&amp;lt;/code&amp;gt;, trigonometry and fixed-point helpers (no_std, libm).&lt;br /&gt;
&lt;br /&gt;
'''Types:''' &amp;lt;code&amp;gt;struct Vec2&amp;lt;/code&amp;gt; — 2D vector with floating-point components. · &amp;lt;code&amp;gt;struct Vec2i&amp;lt;/code&amp;gt; — 2D vector with integer components. · &amp;lt;code&amp;gt;struct Color&amp;lt;/code&amp;gt; — ARGB color with 8-bit components.  Stored as a packed u32 in ARGB format: 0xAARRGGBB · &amp;lt;code&amp;gt;struct Transform&amp;lt;/code&amp;gt; — Transform with position, rotation, scale, and mirroring. · &amp;lt;code&amp;gt;struct Rect2&amp;lt;/code&amp;gt; — 2D rectangle defined by top-left and dimensions.&lt;br /&gt;
&lt;br /&gt;
'''57 public functions:'''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn log2(f: f32) -&amp;amp;gt; f32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Log base 2.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn iclamp(val: i32, min_val: i32, max_val: i32) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Clamp an integer value between min and max.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn acos(x: f32) -&amp;amp;gt; f32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Arc cosine with value clamping to [-1, 1].&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn asin(x: f32) -&amp;amp;gt; f32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Arc sine with value clamping to [-1, 1].&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn sqrt(x: f32) -&amp;amp;gt; f32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Safe square root (negative values return 0).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn fequal(f0: f32, f1: f32, tol: f32) -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
: Fuzzy floating point equality check.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn fless(f0: f32, f1: f32, tol: f32) -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
: Fuzzy floating point less-than check.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn fgreater(f0: f32, f1: f32, tol: f32) -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
: Fuzzy floating point greater-than check.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn ftol(val: f32) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Fast float to int conversion (truncates).  Note: This is a portable implementation that matches the C++ SDK behavior.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn smooth(new_val: f32, cur_val: f32, max_change: f32) -&amp;amp;gt; f32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Smooth a value towards a target using max change per step.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn clamp(val: f32, lower: f32, upper: f32) -&amp;amp;gt; f32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Clamp a float value between lower and upper bounds.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn saturate(val: f32) -&amp;amp;gt; f32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Saturate a value (clamp between 0.0 and 1.0).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn deg2rad(d: f32) -&amp;amp;gt; f32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Convert degrees to radians.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn rad2deg(r: f32) -&amp;amp;gt; f32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Convert radians to degrees.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn n_abs(a: f32) -&amp;amp;gt; f32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get the absolute value.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn n_sgn(a: f32) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get the sign of a value (-1 or 1).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn n_max&amp;amp;lt;T: PartialOrd&amp;amp;gt;(a: T, b: T) -&amp;amp;gt; T&amp;lt;/code&amp;gt;&lt;br /&gt;
: Return the maximum of two values.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn n_min&amp;amp;lt;T: PartialOrd&amp;amp;gt;(a: T, b: T) -&amp;amp;gt; T&amp;lt;/code&amp;gt;&lt;br /&gt;
: Return the minimum of two values.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn lerp(x: f32, y: f32, l: f32) -&amp;amp;gt; f32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Linearly interpolate between two values.  Returns `x + l * (y - x)`.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn rand_get_seed() -&amp;amp;gt; u32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get the current random seed.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn rand_set_seed(s: u32)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set the random seed.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn rand() -&amp;amp;gt; u32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Generate a random u32 using LCG algorithm.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn rand2() -&amp;amp;gt; f32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Return a pseudo random number between 0.0 and 1.0.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn rand_int(n: i32) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Return a random integer in range [0, n].&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn rand_real() -&amp;amp;gt; f32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Return a random float in [0.0, 1.0].&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn new(x: f32, y: f32) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Create a new vector.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn zero() -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Zero vector.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn set(&amp;amp;mut self, x: f32, y: f32)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set components.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn len(&amp;amp;self) -&amp;amp;gt; f32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Calculate length.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn normalize(&amp;amp;mut self)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Normalize in place.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn normalized(&amp;amp;self) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Return normalized copy.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn dot(&amp;amp;self, other: &amp;amp;Self) -&amp;amp;gt; f32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Dot product.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn new(x: i16, y: i16) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Create a new vector.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn zero() -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Zero vector.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn rgb(r: u8, g: u8, b: u8) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Create from RGB (alpha = 255).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn rgba(r: u8, g: u8, b: u8, a: u8) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Create from RGBA.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn from_u32(value: u32) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Create from packed u32 value (0xAARRGGBB format).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn value(&amp;amp;self) -&amp;amp;gt; u32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get the packed u32 value.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn r(&amp;amp;self) -&amp;amp;gt; u8&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get red component.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn g(&amp;amp;self) -&amp;amp;gt; u8&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get green component.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn b(&amp;amp;self) -&amp;amp;gt; u8&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get blue component.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn a(&amp;amp;self) -&amp;amp;gt; u8&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get alpha component.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn a_f32(&amp;amp;self) -&amp;amp;gt; f32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get alpha as float (0.0 - 1.0).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn set_r(&amp;amp;mut self, r: u8)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set red component.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn set_g(&amp;amp;mut self, g: u8)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set green component.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn set_b(&amp;amp;mut self, b: u8)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set blue component.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn set_a(&amp;amp;mut self, a: u8)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set alpha component.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn set_a_f32(&amp;amp;mut self, a: f32)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set alpha from float (0.0 - 1.0).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn new(x: f32, y: f32) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Create a new transform at position.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn with_rotation(x: f32, y: f32, rotation: i32) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Create with position and rotation.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn with_scale(x: f32, y: f32, rotation: i32, scale: u32) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Create with position, rotation, and uniform scale.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn safe_rotation(&amp;amp;self) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get rotation normalized to 0-359.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn set_scale(&amp;amp;mut self, scale: u32)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set uniform scale.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn new(x: i16, y: i16, w: i16, h: i16) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Create a new rectangle.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn contains(&amp;amp;self, px: i16, py: i16) -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
: Check if a point is inside the rectangle.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn contains_point(&amp;amp;self, p: Vec2i) -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
: Check if point (as Vec2i) is inside.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn center(&amp;amp;self) -&amp;amp;gt; Vec2i&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get the center point.&lt;br /&gt;
&lt;br /&gt;
== ffi::types ==&lt;br /&gt;
&lt;br /&gt;
ABI enums and structs (&amp;lt;code&amp;gt;TopologyFaceletInfo&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;TopologyTwistInfo&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;TextAlign&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;GfxMirror&amp;lt;/code&amp;gt;, …).&lt;br /&gt;
&lt;br /&gt;
'''Types:''' &amp;lt;code&amp;gt;enum UartId&amp;lt;/code&amp;gt; — UART line identifiers · &amp;lt;code&amp;gt;enum GfxPixelFormat&amp;lt;/code&amp;gt; — Pixel format for baked images · &amp;lt;code&amp;gt;enum GfxMirror&amp;lt;/code&amp;gt; — Mirror mode for sprites · &amp;lt;code&amp;gt;enum TopologyNeighbour&amp;lt;/code&amp;gt; — Topology neighbor direction · &amp;lt;code&amp;gt;enum TopologyOrientation&amp;lt;/code&amp;gt; — Topology orientation mode · &amp;lt;code&amp;gt;enum TopologyTwist&amp;lt;/code&amp;gt; — Twist direction for cube rotations · &amp;lt;code&amp;gt;enum TextAlign&amp;lt;/code&amp;gt; — Text alignment options · &amp;lt;code&amp;gt;enum TopologyLocation&amp;lt;/code&amp;gt; — Topology face location · &amp;lt;code&amp;gt;enum LogLevel&amp;lt;/code&amp;gt; — Log level for debug output · &amp;lt;code&amp;gt;struct TopologyFaceletInfo&amp;lt;/code&amp;gt; — Information about a facelet in the topology · &amp;lt;code&amp;gt;struct TopologyPlace&amp;lt;/code&amp;gt; — Place information (face and position) · &amp;lt;code&amp;gt;struct TopologyTwistInfo&amp;lt;/code&amp;gt; — Twist event information · &amp;lt;code&amp;gt;struct LbInfo&amp;lt;/code&amp;gt; — Leaderboard information · &amp;lt;code&amp;gt;struct GfxParticle&amp;lt;/code&amp;gt; — Particle effect parameters · &amp;lt;code&amp;gt;struct AppVersion&amp;lt;/code&amp;gt; — Application version (packed bitfield in C++)&lt;br /&gt;
&lt;br /&gt;
'''4 public functions:'''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn from_u32(value: u32) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Converts a u32 value to a GfxMirror variant.  Returns `GfxMirror::None` for invalid values.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn patch(&amp;amp;self) -&amp;amp;gt; u16&amp;lt;/code&amp;gt;&lt;br /&gt;
: Extract patch version (bits 0-15)&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn minor(&amp;amp;self) -&amp;amp;gt; u8&amp;lt;/code&amp;gt;&lt;br /&gt;
: Extract minor version (bits 16-19)&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn major(&amp;amp;self) -&amp;amp;gt; u8&amp;lt;/code&amp;gt;&lt;br /&gt;
: Extract major version (bits 20-23)&lt;br /&gt;
&lt;br /&gt;
== ffi::constants ==&lt;br /&gt;
&lt;br /&gt;
Platform constants (screen size, module counts, buffer limits, &amp;lt;code&amp;gt;CUBE_N&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
[[Category:SDK 6.3]]&lt;br /&gt;
[[Category:Rust API]]&lt;/div&gt;</summary>
		<author><name>WowBot</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=SDK_6.3/Rust/cubios&amp;diff=16979</id>
		<title>SDK 6.3/Rust/cubios</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=SDK_6.3/Rust/cubios&amp;diff=16979"/>
		<updated>2026-07-26T10:44:43Z</updated>

		<summary type="html">&lt;p&gt;WowBot: Full Rust API reference: cubios-sys + cubios, every pub fn with docs (WowBot)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{notice|'''Official WOWCube SDK documentation.''' SDK 6.3, Rust API — '''EXPERIMENTAL''' (supported; APIs may change). Generated from the [https://github.com/wowcube/CubiOS_Rust_SDK CubiOS_Rust_SDK] sources — the repository is authoritative; do not edit by hand.}}&lt;br /&gt;
&lt;br /&gt;
{{SDK 6.3 nav}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''← [[SDK 6.3]] · [[SDK 6.3/Rust|Rust]] / cubios (safe high-level layer)''&lt;br /&gt;
&lt;br /&gt;
Complete reference of the '''high-level layer''' crate [https://github.com/wowcube/CubiOS_Rust_SDK/tree/main/crates/cubios &amp;lt;code&amp;gt;cubios&amp;lt;/code&amp;gt;]: a Rust port of the C++ &amp;lt;code&amp;gt;Cubios::&amp;lt;/code&amp;gt; classes — scene graph, screens, sprites, text, sound, scramble and splash screen. Builders are chainable; storage is &amp;lt;code&amp;gt;heapless&amp;lt;/code&amp;gt;; everything is &amp;lt;code&amp;gt;no_std&amp;lt;/code&amp;gt;. The crate re-exports the raw layer as &amp;lt;code&amp;gt;cubios::sys&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== high_level::screen ==&lt;br /&gt;
&lt;br /&gt;
Retained per-frame screen: &amp;lt;code&amp;gt;begin(orientation, auto_rotation)&amp;lt;/code&amp;gt; → &amp;lt;code&amp;gt;add(object)&amp;lt;/code&amp;gt; → &amp;lt;code&amp;gt;end()&amp;lt;/code&amp;gt;; topology accessors.&lt;br /&gt;
&lt;br /&gt;
'''Types:''' &amp;lt;code&amp;gt;struct Screen&amp;lt;/code&amp;gt; — Per-screen rendering context.  Manages rendering to a specific display, handling orientation and providing a queue for scene objects.  # Type Parameters * `MAX_OBJECTS` - Maximum number of objects in the render queue (default: 16).&lt;br /&gt;
&lt;br /&gt;
'''22 public functions:'''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn new(display_id: u8) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Creates a new screen context for the specified display.  # Arguments * `display_id` - Display ID (0-23, corresponding to the 24 screens).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn display_id(&amp;amp;self) -&amp;amp;gt; u8&amp;lt;/code&amp;gt;&lt;br /&gt;
: Returns the display ID.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn module(&amp;amp;self) -&amp;amp;gt; u8&amp;lt;/code&amp;gt;&lt;br /&gt;
: Returns the module ID.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn screen_in_module(&amp;amp;self) -&amp;amp;gt; u8&amp;lt;/code&amp;gt;&lt;br /&gt;
: Returns the screen index within the module.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn angle(&amp;amp;self) -&amp;amp;gt; u32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Returns the current screen angle.  This angle should be passed to `SceneObject::render()` for proper orientation handling.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn orientation_mode(&amp;amp;self) -&amp;amp;gt; TopologyOrientation&amp;lt;/code&amp;gt;&lt;br /&gt;
: Returns the current orientation mode.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn auto_rotation(&amp;amp;self) -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
: Returns whether auto-rotation is enabled.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn is_in_begin(&amp;amp;self) -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
: Returns whether we're currently between begin() and end().&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn object_count(&amp;amp;self) -&amp;amp;gt; usize&amp;lt;/code&amp;gt;&lt;br /&gt;
: Returns the number of objects in the render queue.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn begin(&amp;amp;mut self, mode: TopologyOrientation, auto_rotation: bool)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Begins rendering to this screen.  Sets the render target and computes the screen angle based on the current topology.  # Arguments * `mode` - Orientation mode for angle computation. * `auto_rotation` - Whether to auto-rotate based on topology.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn end(&amp;amp;mut self)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Ends rendering to this screen.  Renders all queued objects and calls `gfx::render()` to present.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn add(&amp;amp;mut self, object: SceneObjectEnum) -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
: Adds an object to the render queue.  Returns `true` if successful, `false` if the queue is full.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn remove(&amp;amp;mut self, index: usize) -&amp;amp;gt; Option&amp;amp;lt;SceneObjectEnum&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Removes an object from the render queue by index.  Returns the removed object if found.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn clear(&amp;amp;mut self)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Clears all objects from the render queue.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get(&amp;amp;self, index: usize) -&amp;amp;gt; Option&amp;amp;lt;&amp;amp;SceneObjectEnum&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Gets an object from the queue by index.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_mut(&amp;amp;mut self, index: usize) -&amp;amp;gt; Option&amp;amp;lt;&amp;amp;mut SceneObjectEnum&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Gets a mutable reference to an object by index.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn iter(&amp;amp;self) -&amp;amp;gt; impl Iterator&amp;amp;lt;Item = &amp;amp;SceneObjectEnum&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Iterates over all objects in the queue.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn iter_mut(&amp;amp;mut self) -&amp;amp;gt; impl Iterator&amp;amp;lt;Item = &amp;amp;mut SceneObjectEnum&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Iterates mutably over all objects in the queue.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn render_immediate(&amp;amp;self, object: &amp;amp;impl SceneObject)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Renders an object immediately without adding to queue.  The object is rendered using the current screen angle. Call this between `begin()` and `end()`.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn present(&amp;amp;mut self)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Renders the screen without the queue (manual mode).  Use this when you want to render objects directly without using the object queue. Call `begin()`, render your objects with the screen's angle, then call `present()`.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn for_each_screen&amp;amp;lt;F&amp;amp;gt;(mode: TopologyOrientation, auto_rotation: bool, mut render_fn: F) where F: FnMut(&amp;amp;Screen&amp;amp;lt;1&amp;amp;gt;),&amp;lt;/code&amp;gt;&lt;br /&gt;
: Helper to render to all screens in a loop.  This is a common pattern for WOWCube apps that render the same content to all 24 screens.  # Example ```no_run use wowcube_sys::high_level::screen::for_each_screen; use wowcube_sys::high_level::gfx::Background; use wowcube_sys::high_level::scene::SceneObject; use wowcube_sys::high_level::Color; use wowcube_sys::ffi::types::TopologyOrientation;  let background = Background::new(Color::rgb(0, 0, 128)); for_each_screen(TopologyOrientation::Menu, true, |screen| { background.render(screen.angle()); }); ```&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn for_face_screens&amp;amp;lt;F&amp;amp;gt;( face: u8, mode: TopologyOrientation, auto_rotation: bool, mut render_fn: F, ) where F: FnMut(&amp;amp;Screen&amp;amp;lt;1&amp;amp;gt;, u8), // screen, position on face (0-3)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Helper to render to screens on specific faces.  Renders to the 4 screens on the specified face.  # Arguments * `face` - Face index (0-5). * `mode` - Orientation mode. * `auto_rotation` - Whether to auto-rotate. * `render_fn` - Function to call for each screen.&lt;br /&gt;
&lt;br /&gt;
== high_level::scene ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Scene&amp;amp;lt;MAX_OBJECTS, MAX_SOUNDS&amp;amp;gt;&amp;lt;/code&amp;gt; object registry, &amp;lt;code&amp;gt;SceneObjectEnum&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SceneObjectBase&amp;lt;/code&amp;gt; builder.&lt;br /&gt;
&lt;br /&gt;
'''Types:''' &amp;lt;code&amp;gt;trait SceneObject&amp;lt;/code&amp;gt; — Base trait for all renderable scene objects.  Matches C++ SDK's `Cubios::SceneObject` virtual class pattern. All scene objects must implement this trait to be rendered. · &amp;lt;code&amp;gt;struct SceneObjectBase&amp;lt;/code&amp;gt; — Common fields for scene objects, use via composition.  This struct provides the base fields that all scene objects need. Use it via composition in your custom scene objects. · &amp;lt;code&amp;gt;enum SceneObjectEnum&amp;lt;/code&amp;gt; — Enum wrapper for heterogeneous scene object storage (no_std compatible).  Instead of using `Box&amp;amp;lt;dyn SceneObject&amp;amp;gt;`, this enum allows storing different scene object types in fixed-size arrays without heap allocation. · &amp;lt;code&amp;gt;struct Scene&amp;lt;/code&amp;gt; — Scene container managing objects by ID.  Matches C++ SDK's `Cubios::Scene` class. Uses fixed-size arrays for no_std compatibility.  # Type Parameters  - `MAX_OBJECTS`: Maximum number of scene objects (default: 32) - `MAX_SOUNDS`: Maximum number of sounds (default: 16)&lt;br /&gt;
&lt;br /&gt;
'''28 public functions:'''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;SceneObject::fn render(&amp;amp;self, screen_angle: u32)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Render this object to the current render target.  Called within Screen::begin/end block. `screen_angle` is the rotation angle for auto-rotation support.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;SceneObject::fn transform_mut(&amp;amp;mut self) -&amp;amp;gt; &amp;amp;mut Transform&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get mutable reference to transform&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;SceneObject::fn transform(&amp;amp;self) -&amp;amp;gt; &amp;amp;Transform&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get reference to transform&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;SceneObject::fn color_mut(&amp;amp;mut self) -&amp;amp;gt; &amp;amp;mut Color&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get mutable reference to color&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;SceneObject::fn color(&amp;amp;self) -&amp;amp;gt; &amp;amp;Color&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get reference to color&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;SceneObject::fn is_visible(&amp;amp;self) -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
: Visibility flag&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;SceneObject::fn set_visible(&amp;amp;mut self, visible: bool)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set visibility&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn at(x: f32, y: f32) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Create with position&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn with_position(mut self, x: f32, y: f32) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set position (builder pattern)&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn with_rotation(mut self, degrees: i32) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set rotation (builder pattern)&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn with_scale(mut self, scale: u32) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set uniform scale (builder pattern)&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn with_color(mut self, color: Color) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set color (builder pattern)&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn with_alpha(mut self, alpha: u8) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set alpha (builder pattern)&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn new() -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Create a new empty scene&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn create_object(&amp;amp;mut self, obj: SceneObjectEnum) -&amp;amp;gt; Option&amp;amp;lt;ObjectId&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Create object with auto-assigned ID.  Returns the assigned ID, or None if the scene is full.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn create_object_with_id(&amp;amp;mut self, id: ObjectId, obj: SceneObjectEnum) -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
: Create object with specific ID.  Returns false if the ID is already in use or scene is full.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get(&amp;amp;self, id: ObjectId) -&amp;amp;gt; Option&amp;amp;lt;&amp;amp;SceneObjectEnum&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get object by ID&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_mut(&amp;amp;mut self, id: ObjectId) -&amp;amp;gt; Option&amp;amp;lt;&amp;amp;mut SceneObjectEnum&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get mutable object by ID&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn dispose(&amp;amp;mut self, id: ObjectId) -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
: Remove object by ID&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn dispose_all(&amp;amp;mut self)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Remove all objects&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn object_count(&amp;amp;self) -&amp;amp;gt; usize&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get the number of objects in the scene&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn create_sound(&amp;amp;mut self, sound: super::sound::Sound) -&amp;amp;gt; Option&amp;amp;lt;u32&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Create sound with auto-assigned ID&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn create_sound_with_id(&amp;amp;mut self, id: u32, sound: super::sound::Sound) -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
: Create sound with specific ID&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn play(&amp;amp;self, id: u32, volume: u32)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Play sound by ID&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn dispose_sound(&amp;amp;mut self, id: u32) -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
: Remove sound by ID&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn iter(&amp;amp;self) -&amp;amp;gt; impl Iterator&amp;amp;lt;Item = (ObjectId, &amp;amp;SceneObjectEnum)&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Iterate over all objects&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn iter_mut(&amp;amp;mut self) -&amp;amp;gt; impl Iterator&amp;amp;lt;Item = (ObjectId, &amp;amp;mut SceneObjectEnum)&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Iterate over all objects mutably&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn compute_screen_position(pos: &amp;amp;Vec2, screen_angle: u32) -&amp;amp;gt; Vec2&amp;lt;/code&amp;gt;&lt;br /&gt;
: Compute screen-space position accounting for screen rotation.  Used by render implementations to adjust positions based on screen orientation.&lt;br /&gt;
&lt;br /&gt;
== high_level::gfx::background ==&lt;br /&gt;
&lt;br /&gt;
Full-screen fill.&lt;br /&gt;
&lt;br /&gt;
'''Types:''' &amp;lt;code&amp;gt;struct Background&amp;lt;/code&amp;gt; — Fills entire screen with solid color.  This is the simplest scene object - it just clears the screen with a solid color when rendered.  # Example  ```no_run use wowcube_sys::high_level::gfx::Background; use wowcube_sys::high_level::Color;  let bg = Background::new(Color::rgb(0, 0, 128)); // Dark blue ```&lt;br /&gt;
&lt;br /&gt;
'''6 public functions:'''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn new(color: Color) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Create a new background with the specified color.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn from_rgb(r: u8, g: u8, b: u8) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Create a background from RGB values.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn from_rgba(r: u8, g: u8, b: u8, a: u8) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Create a background from RGBA values.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn black() -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Create a black background.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn white() -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Create a white background.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn with_color(mut self, color: Color) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set color (builder pattern)&lt;br /&gt;
&lt;br /&gt;
== high_level::gfx::sprite ==&lt;br /&gt;
&lt;br /&gt;
Static sprite bound to an image asset.&lt;br /&gt;
&lt;br /&gt;
'''Types:''' &amp;lt;code&amp;gt;struct Sprite&amp;lt;/code&amp;gt; — Static image sprite.  Wraps a sprite resource ID and renders it with transform and color.  # Example  ```no_run use wowcube_sys::high_level::gfx::Sprite;  let sprite = Sprite::from_name(&amp;quot;player&amp;quot;) .with_position(120.0, 120.0) .with_scale(200);  // 2x scale ```&lt;br /&gt;
&lt;br /&gt;
'''12 public functions:'''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn from_name(name: &amp;amp;str) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Create from asset name (looks up ID via GFX_getAssetId).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn from_name_at(name: &amp;amp;str, x: f32, y: f32) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Create from asset name with position.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn from_id(resource_id: SpriteId) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Create from pre-resolved resource ID.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn from_id_at(resource_id: SpriteId, x: f32, y: f32) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Create from ID with position.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn resource_id(&amp;amp;self) -&amp;amp;gt; SpriteId&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get the resource ID.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn with_position(mut self, x: f32, y: f32) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set position (builder pattern)&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn with_rotation(mut self, degrees: i32) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set rotation in degrees (builder pattern)&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn with_scale(mut self, scale: u32) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set uniform scale as percentage (builder pattern)&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn with_scale_xy(mut self, scale_x: u32, scale_y: u32) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set non-uniform scale (builder pattern)&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn with_mirror(mut self, mirror: GfxMirror) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set mirroring (builder pattern)&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn with_color(mut self, color: Color) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set color/tint (builder pattern)&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn with_alpha(mut self, alpha: u8) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set alpha/opacity (builder pattern)&lt;br /&gt;
&lt;br /&gt;
== high_level::gfx::animated_sprite ==&lt;br /&gt;
&lt;br /&gt;
Frame animation: name list / name+range / atlas source; &amp;lt;code&amp;gt;tick(dt)&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PlaybackMode&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Types:''' &amp;lt;code&amp;gt;enum PlaybackMode&amp;lt;/code&amp;gt; — Animation playback mode. · &amp;lt;code&amp;gt;struct AnimatedSprite&amp;lt;/code&amp;gt; — Animated sprite with multiple frames.  Supports Loop, Bounce, and Set (manual) playback modes.  # Example  ```no_run use wowcube_sys::high_level::gfx::AnimatedSprite; use wowcube_sys::high_level::scene::SceneObject;  let mut anim = AnimatedSprite::from_names(&amp;amp;[&amp;quot;run_1&amp;quot;, &amp;quot;run_2&amp;quot;, &amp;quot;run_3&amp;quot;, &amp;quot;run_4&amp;quot;]) .with_position(120.0, 120.0) .with_playback_speed(12);  // 12 FPS  // In game loop: let delta_time_ms = 16; let screen_angle = 0; anim.tick(delta_time_ms); anim.render(screen_angle); ```&lt;br /&gt;
&lt;br /&gt;
'''20 public functions:'''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn from_names(names: &amp;amp;[&amp;amp;str]) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Create from array of asset names.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn from_pattern(prefix: &amp;amp;str, extension: &amp;amp;str, first: i16, last: i16) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Create from naming pattern.  E.g., `from_pattern(&amp;quot;run_&amp;quot;, &amp;quot;.png&amp;quot;, 1, 4)` loads &amp;quot;run_1.png&amp;quot; through &amp;quot;run_4.png&amp;quot;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn from_ids(ids: &amp;amp;[SpriteId]) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Create from array of pre-resolved resource IDs.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn tick(&amp;amp;mut self, dt: u32) -&amp;amp;gt; i16&amp;lt;/code&amp;gt;&lt;br /&gt;
: Advance animation by delta time (milliseconds).  Returns the current frame index after update.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn set_frame(&amp;amp;mut self, frame: i16) -&amp;amp;gt; &amp;amp;mut Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set current frame directly.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn set_playback_speed(&amp;amp;mut self, fps: i16) -&amp;amp;gt; &amp;amp;mut Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set playback speed in frames per second.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn set_playback_mode(&amp;amp;mut self, mode: PlaybackMode) -&amp;amp;gt; &amp;amp;mut Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set playback mode.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn next_frame(&amp;amp;mut self) -&amp;amp;gt; i16&amp;lt;/code&amp;gt;&lt;br /&gt;
: Advance to next frame manually.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn prev_frame(&amp;amp;mut self) -&amp;amp;gt; i16&amp;lt;/code&amp;gt;&lt;br /&gt;
: Go to previous frame manually.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn current_frame(&amp;amp;self) -&amp;amp;gt; i16&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get current frame index.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn frame_count(&amp;amp;self) -&amp;amp;gt; u16&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get total frame count.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn playback_speed(&amp;amp;self) -&amp;amp;gt; i16&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get playback speed.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn playback_mode(&amp;amp;self) -&amp;amp;gt; PlaybackMode&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get playback mode.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn current_resource_id(&amp;amp;self) -&amp;amp;gt; Option&amp;amp;lt;SpriteId&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get the resource ID of the current frame.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn with_position(mut self, x: f32, y: f32) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set position (builder pattern)&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn with_rotation(mut self, degrees: i32) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set rotation (builder pattern)&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn with_scale(mut self, scale: u32) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set scale (builder pattern)&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn with_playback_speed(mut self, fps: i16) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set playback speed (builder pattern)&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn with_playback_mode(mut self, mode: PlaybackMode) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set playback mode (builder pattern)&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn with_color(mut self, color: Color) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set color (builder pattern)&lt;br /&gt;
&lt;br /&gt;
== high_level::gfx::sprite_atlas ==&lt;br /&gt;
&lt;br /&gt;
Sprite sheet + &amp;lt;code&amp;gt;SpriteAtlasElement&amp;lt;/code&amp;gt; (sub-rect sprites).&lt;br /&gt;
&lt;br /&gt;
'''Types:''' &amp;lt;code&amp;gt;struct SpriteAtlasElement&amp;lt;/code&amp;gt; — A single element within a sprite atlas.  Each element references a rectangular region of the parent atlas texture and can be rendered independently with its own transform and color. · &amp;lt;code&amp;gt;struct SpriteAtlas&amp;lt;/code&amp;gt; — A sprite atlas containing multiple sprite elements from a single texture.  The atlas manages a collection of elements, each defined by a rectangular region within the atlas texture. This is more efficient than loading multiple separate textures.  # Type Parameters * `MAX_ELEMENTS` - Maximum number of elements the atlas can hold (default: 64).&lt;br /&gt;
&lt;br /&gt;
'''26 public functions:'''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn new(atlas_id: SpriteId, region: Rect2) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Creates a new atlas element with the given region.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn atlas_id(&amp;amp;self) -&amp;amp;gt; SpriteId&amp;lt;/code&amp;gt;&lt;br /&gt;
: Returns the atlas texture ID.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn region(&amp;amp;self) -&amp;amp;gt; Rect2&amp;lt;/code&amp;gt;&lt;br /&gt;
: Returns the region within the atlas.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn set_region(&amp;amp;mut self, region: Rect2)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Sets the region within the atlas.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn with_position(mut self, x: f32, y: f32) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Builder: set position.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn with_rotation(mut self, degrees: i32) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Builder: set rotation in degrees.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn with_scale(mut self, scale: u32) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Builder: set uniform scale.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn with_scale_xy(mut self, scale_x: u32, scale_y: u32) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Builder: set non-uniform scale.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn with_mirror(mut self, mirror: GfxMirror) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Builder: set mirroring.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn with_color(mut self, color: Color) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Builder: set color (affects tinting).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn with_alpha(mut self, alpha: u8) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Builder: set alpha (opacity).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn from_name(name: &amp;amp;str) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Creates a new sprite atlas from an asset name.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn from_id(texture_id: SpriteId) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Creates a new sprite atlas from an existing sprite ID.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn texture_id(&amp;amp;self) -&amp;amp;gt; SpriteId&amp;lt;/code&amp;gt;&lt;br /&gt;
: Returns the atlas texture ID.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn len(&amp;amp;self) -&amp;amp;gt; usize&amp;lt;/code&amp;gt;&lt;br /&gt;
: Returns the number of elements in the atlas.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn is_empty(&amp;amp;self) -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
: Returns true if the atlas has no elements.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn add_element(&amp;amp;mut self, id: u32, region: Rect2) -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
: Adds an element to the atlas with the given ID and region.  Returns `true` if successful, `false` if the atlas is full or an element with that ID already exists.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn add_element_with(&amp;amp;mut self, id: u32, mut element: SpriteAtlasElement) -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
: Adds an element with a pre-configured SpriteAtlasElement.  The element's atlas_id will be overwritten with this atlas's texture_id.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get(&amp;amp;self, id: u32) -&amp;amp;gt; Option&amp;amp;lt;&amp;amp;SpriteAtlasElement&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Gets an element by ID.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_mut(&amp;amp;mut self, id: u32) -&amp;amp;gt; Option&amp;amp;lt;&amp;amp;mut SpriteAtlasElement&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Gets a mutable reference to an element by ID.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn remove(&amp;amp;mut self, id: u32) -&amp;amp;gt; Option&amp;amp;lt;SpriteAtlasElement&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Removes an element by ID.  Returns the removed element if found.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn clear(&amp;amp;mut self)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Removes all elements from the atlas.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn render_all(&amp;amp;self, screen_angle: u32)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Renders all visible elements in the atlas.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn iter(&amp;amp;self) -&amp;amp;gt; impl Iterator&amp;amp;lt;Item = (u32, &amp;amp;SpriteAtlasElement)&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Iterates over all elements in the atlas.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn iter_mut(&amp;amp;mut self) -&amp;amp;gt; impl Iterator&amp;amp;lt;Item = (u32, &amp;amp;mut SpriteAtlasElement)&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Iterates mutably over all elements in the atlas.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn add_grid( &amp;amp;mut self, start_id: u32, cols: u16, rows: u16, cell_width: i16, cell_height: i16, offset_x: i16, offset_y: i16, ) -&amp;amp;gt; usize&amp;lt;/code&amp;gt;&lt;br /&gt;
: Adds elements from a regular grid layout.  # Arguments * `start_id` - Starting ID for the first element * `cols` - Number of columns in the grid * `rows` - Number of rows in the grid * `cell_width` - Width of each cell * `cell_height` - Height of each cell * `offset_x` - X offset from the top-left of the texture * `offset_y` - Y offset from the top-left of the texture  # Returns Number of elements successfully added.&lt;br /&gt;
&lt;br /&gt;
== high_level::gfx::text ==&lt;br /&gt;
&lt;br /&gt;
Text label (content, font size, alignment, color).&lt;br /&gt;
&lt;br /&gt;
'''Types:''' &amp;lt;code&amp;gt;struct Text&amp;lt;/code&amp;gt; — Text label with font size and alignment.  Uses `heapless::String` for no_std compatibility.  # Example  ```no_run use wowcube_sys::high_level::gfx::Text; use wowcube_sys::ffi::types::TextAlign;  let text = Text::new(&amp;quot;Score: 100&amp;quot;) .with_position(120.0, 120.0) .with_font_size(12) .with_alignment(TextAlign::Center); ```&lt;br /&gt;
&lt;br /&gt;
'''14 public functions:'''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn new(content: &amp;amp;str) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Create new text with content.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn at(content: &amp;amp;str, x: f32, y: f32) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Create text at position.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn set_content(&amp;amp;mut self, content: &amp;amp;str)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set content (replaces existing).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn content(&amp;amp;self) -&amp;amp;gt; &amp;amp;str&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get current content.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn with_font_size(mut self, size: u32) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set font size (builder pattern)&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn with_alignment(mut self, align: TextAlign) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set alignment (builder pattern)&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn with_position(mut self, x: f32, y: f32) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set position (builder pattern)&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn with_rotation(mut self, degrees: i32) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set rotation (builder pattern)&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn with_color(mut self, color: Color) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set color (builder pattern)&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn font_size(&amp;amp;self) -&amp;amp;gt; u32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get font size.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn set_font_size(&amp;amp;mut self, size: u32)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set font size.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn alignment(&amp;amp;self) -&amp;amp;gt; TextAlign&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get alignment.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn set_alignment(&amp;amp;mut self, align: TextAlign)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set alignment.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn format(&amp;amp;mut self, args: core::fmt::Arguments&amp;amp;lt;'_&amp;amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Format content using core::fmt.  Note: This clears existing content and writes new formatted text.&lt;br /&gt;
&lt;br /&gt;
== high_level::gfx::qrcode ==&lt;br /&gt;
&lt;br /&gt;
QR-code object (data, size, colors).&lt;br /&gt;
&lt;br /&gt;
'''Types:''' &amp;lt;code&amp;gt;struct QRCode&amp;lt;/code&amp;gt; — QR code scene object.  Renders a QR code with customizable colors and size.  # Example  ```no_run use wowcube_sys::high_level::gfx::QRCode; use wowcube_sys::ffi::math::Color;  let qr = QRCode::new(&amp;quot;https://wowcube.com&amp;quot;) .with_position(120.0, 120.0) .with_size(100) .with_colors(Color::from_u32(0xFF000000), Color::from_u32(0xFFFFFFFF)); ```&lt;br /&gt;
&lt;br /&gt;
'''14 public functions:'''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn new(data: &amp;amp;str) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Create a new QR code with the given data.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn at(data: &amp;amp;str, x: f32, y: f32) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Create at a specific position.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn with_size(mut self, size: u32) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set the QR code size (builder pattern).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn with_colors(mut self, zeros: Color, ones: Color) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set the colors (builder pattern).  - `zeros`: Background color (usually white) - `ones`: Foreground/data color (usually black)&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn with_background_color(mut self, color: Color) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set the background color (zeros).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn with_foreground_color(mut self, color: Color) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set the foreground/data color (ones).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn with_position(mut self, x: f32, y: f32) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set position (builder pattern).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn with_rotation(mut self, degrees: i32) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set rotation in degrees (builder pattern).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn data(&amp;amp;self) -&amp;amp;gt; &amp;amp;str&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get the QR code data.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn set_data(&amp;amp;mut self, data: &amp;amp;str)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set new QR code data.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn size(&amp;amp;self) -&amp;amp;gt; u32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get the size.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn set_size(&amp;amp;mut self, size: u32)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set the size.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn color_zeros(&amp;amp;self) -&amp;amp;gt; Color&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get the background color.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn color_ones(&amp;amp;self) -&amp;amp;gt; Color&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get the foreground color.&lt;br /&gt;
&lt;br /&gt;
== high_level::gfx::offscreen ==&lt;br /&gt;
&lt;br /&gt;
Offscreen render target (bake once, draw as an object).&lt;br /&gt;
&lt;br /&gt;
'''Types:''' &amp;lt;code&amp;gt;struct OffscreenRenderTarget&amp;lt;/code&amp;gt; — Offscreen render target for render-to-texture operations.  The render target creates a texture buffer that can be drawn to and then rendered as a regular sprite. This is managed automatically: - The buffer is created when `begin()` is first called - The buffer is cleaned up when the target is dropped  # Render Layer Order The C++ SDK has `RenderLayer(order)` for before/after queue rendering. In this simplified Rust version, manual control of render order is achieved by calling `draw()` at the appropriate time.&lt;br /&gt;
&lt;br /&gt;
'''15 public functions:'''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn new(width: u32, height: u32) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Creates a new offscreen render target with the specified dimensions.  Uses ARGB8888 format by default for full alpha support.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn with_format(width: u32, height: u32, format: GfxPixelFormat) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Creates a new offscreen render target with a specific pixel format.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn id(&amp;amp;self) -&amp;amp;gt; SpriteId&amp;lt;/code&amp;gt;&lt;br /&gt;
: Returns the render target's unique ID.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn width(&amp;amp;self) -&amp;amp;gt; u32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Returns the width of the render target.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn height(&amp;amp;self) -&amp;amp;gt; u32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Returns the height of the render target.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn is_created(&amp;amp;self) -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
: Returns whether the render target has been created.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn is_in_render(&amp;amp;self) -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
: Returns whether we're currently rendering to this target.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn begin(&amp;amp;mut self, overwrite: bool) -&amp;amp;gt; Result&amp;amp;lt;(), i32&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Begins rendering to this offscreen target.  All subsequent draw calls will render to this buffer until `end()` is called.  # Arguments * `overwrite` - If true, clears the buffer. If false, preserves existing content.  # Returns `Ok(())` on success, `Err(i32)` with the error code on failure.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn end(&amp;amp;mut self)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Ends rendering to this offscreen target.  After calling this, the buffer contains the rendered content and can be drawn using `draw()` or the `SceneObject` trait.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn draw(&amp;amp;self, x: i32, y: i32, screen_angle: u32)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Draws the offscreen buffer to the screen at the specified position.  # Arguments * `x` - X position on screen * `y` - Y position on screen * `screen_angle` - Current screen orientation angle&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn with_position(mut self, x: f32, y: f32) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Builder: set position.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn with_rotation(mut self, degrees: i32) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Builder: set rotation in degrees.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn with_scale(mut self, scale: u32) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Builder: set uniform scale.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn with_scale_xy(mut self, scale_x: u32, scale_y: u32) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Builder: set non-uniform scale.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn with_alpha(mut self, alpha: u8) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Builder: set alpha (opacity).&lt;br /&gt;
&lt;br /&gt;
== high_level::gfx::colors ==&lt;br /&gt;
&lt;br /&gt;
142 named colors as &amp;lt;code&amp;gt;u32&amp;lt;/code&amp;gt; ARGB constants + &amp;lt;code&amp;gt;Color&amp;lt;/code&amp;gt; helpers.&lt;br /&gt;
&lt;br /&gt;
'''Types:''' &amp;lt;code&amp;gt;struct Colors&amp;lt;/code&amp;gt; — Named color constants matching the C++ SDK's `Cubios::Gfx::Colors` enum.  All colors are fully opaque (alpha = 0xFF) unless otherwise noted.  # Example  ```no_run use wowcube_sys::high_level::gfx::Colors; use wowcube_sys::ffi::math::Color;  let red = Colors::RED; let custom = Colors::from_u32(Colors::BLUE); ```&lt;br /&gt;
&lt;br /&gt;
'''142 named colors''' (&amp;lt;code&amp;gt;Colors::NAME&amp;lt;/code&amp;gt;, ARGB &amp;lt;code&amp;gt;u32&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;column-count:4; font-size:85%;&amp;quot;&amp;gt;&amp;lt;code&amp;gt;ALICE_BLUE&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;ANTIQUE_WHITE&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;AQUA&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;AQUAMARINE&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;AZURE&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;BEIGE&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;BISQUE&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;BLACK&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;BLANCHED_ALMOND&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;BLUE&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;BLUE_VIOLET&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;BROWN&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;BURLY_WOOD&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;CADET_BLUE&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;CHARTREUSE&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;CHOCOLATE&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;CORAL&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;CORNFLOWER_BLUE&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;CORNSILK&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;CRIMSON&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;CYAN&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;DARK_BLUE&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;DARK_CYAN&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;DARK_GOLDENROD&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;DARK_GRAY&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;DARK_GREEN&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;DARK_KHAKI&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;DARK_MAGENTA&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;DARK_OLIVE_GREEN&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;DARK_ORANGE&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;DARK_ORCHID&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;DARK_RED&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;DARK_SALMON&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;DARK_SEA_GREEN&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;DARK_SLATE_BLUE&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;DARK_SLATE_GRAY&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;DARK_TURQUOISE&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;DARK_VIOLET&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;DEEP_PINK&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;DEEP_SKY_BLUE&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;DIM_GRAY&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;DODGER_BLUE&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;FIREBRICK&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;FLORAL_WHITE&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;FOREST_GREEN&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;FUCHSIA&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;GAINSBORO&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;GHOST_WHITE&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;GOLD&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;GOLDENROD&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;GRAY&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;GREEN&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;GREEN_YELLOW&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;GREY&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;HONEYDEW&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;HOT_PINK&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;INDIAN_RED&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;INDIGO&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;IVORY&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;KHAKI&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;LAVENDER&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;LAVENDER_BLUSH&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;LAWN_GREEN&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;LEMON_CHIFFON&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;LIGHT_BLUE&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;LIGHT_CORAL&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;LIGHT_CYAN&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;LIGHT_GOLDENROD_YELLOW&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;LIGHT_GRAY&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;LIGHT_GREEN&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;LIGHT_PINK&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;LIGHT_SALMON&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;LIGHT_SEA_GREEN&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;LIGHT_SKY_BLUE&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;LIGHT_SLATE_GRAY&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;LIGHT_STEEL_BLUE&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;LIGHT_YELLOW&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;LIME&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;LIME_GREEN&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;LINEN&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;MAGENTA&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;MAROON&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;MEDIUM_AQUAMARINE&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;MEDIUM_BLUE&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;MEDIUM_ORCHID&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;MEDIUM_PURPLE&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;MEDIUM_SEA_GREEN&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;MEDIUM_SLATE_BLUE&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;MEDIUM_SPRING_GREEN&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;MEDIUM_TURQUOISE&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;MEDIUM_VIOLET_RED&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;MIDNIGHT_BLUE&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;MINT_CREAM&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;MISTY_ROSE&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;MOCCASIN&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;NAVAJO_WHITE&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;NAVY&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;OLD_LACE&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;OLIVE&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;OLIVE_DRAB&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;ORANGE&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;ORANGE_RED&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;ORCHID&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;PALE_GOLDENROD&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;PALE_GREEN&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;PALE_TURQUOISE&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;PALE_VIOLET_RED&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;PAPAYA_WHIP&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;PEACH_PUFF&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;PERU&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;PINK&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;PLUM&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;POWDER_BLUE&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;PURPLE&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;RED&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;ROSY_BROWN&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;ROYAL_BLUE&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;SADDLE_BROWN&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;SALMON&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;SANDY_BROWN&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;SEA_GREEN&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;SEA_SHELL&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;SIENNA&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;SILVER&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;SKY_BLUE&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;SLATE_BLUE&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;SLATE_GRAY&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;SNOW&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;SPRING_GREEN&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;STEEL_BLUE&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;TAN&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;TEAL&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;THISTLE&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;TOMATO&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;TRANSPARENT&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;TURQUOISE&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;VIOLET&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;WHEAT&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;WHITE&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;WHITE_SMOKE&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;YELLOW&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;YELLOW_GREEN&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== high_level::sound ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Sound&amp;lt;/code&amp;gt; + &amp;lt;code&amp;gt;SoundCollection&amp;lt;/code&amp;gt; (random playback, repeat with random delays).&lt;br /&gt;
&lt;br /&gt;
'''Types:''' &amp;lt;code&amp;gt;struct Sound&amp;lt;/code&amp;gt; — A single sound asset.  Wraps a sound ID and provides convenient playback methods. · &amp;lt;code&amp;gt;struct SoundCollection&amp;lt;/code&amp;gt; — A collection of sounds with random playback support.  Useful for sound effects that should vary (footsteps, hits, etc.).&lt;br /&gt;
&lt;br /&gt;
'''21 public functions:'''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn from_name(name: &amp;amp;str) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Creates a sound from an asset name.  Looks up the asset ID at creation time.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn from_id(id: SoundId) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Creates a sound from an existing sound ID.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn id(&amp;amp;self) -&amp;amp;gt; SoundId&amp;lt;/code&amp;gt;&lt;br /&gt;
: Returns the sound's asset ID.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn play(&amp;amp;self, volume: u32) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Plays the sound at the specified volume.  # Arguments * `volume` - Volume level (0-100).  # Returns The result code from the sound system.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn play_full(&amp;amp;self) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Plays the sound at full volume (100).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn stop_all() -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Stops all currently playing sounds.  Note: This stops ALL sounds, not just this one.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn is_any_playing() -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
: Returns whether any sound is currently playing.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn new() -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Creates an empty sound collection.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn from_names(names: &amp;amp;[&amp;amp;str]) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Creates a sound collection from an array of asset names.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn from_ids(ids: &amp;amp;[SoundId]) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Creates a sound collection from an array of sound IDs.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn len(&amp;amp;self) -&amp;amp;gt; usize&amp;lt;/code&amp;gt;&lt;br /&gt;
: Returns the number of sounds in the collection.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn is_empty(&amp;amp;self) -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
: Returns whether the collection is empty.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn add(&amp;amp;mut self, sound: Sound) -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
: Adds a sound to the collection.  Returns `true` if successful, `false` if the collection is full.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get(&amp;amp;self, index: usize) -&amp;amp;gt; Option&amp;amp;lt;&amp;amp;Sound&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Gets a sound by index.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn remove(&amp;amp;mut self, index: usize) -&amp;amp;gt; Option&amp;amp;lt;Sound&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Removes a sound by index.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn clear(&amp;amp;mut self)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Clears all sounds from the collection.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn play_random(&amp;amp;mut self, volume: u32) -&amp;amp;gt; Option&amp;amp;lt;usize&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Plays a random sound from the collection.  Tries to avoid playing the same sound twice in a row.  # Arguments * `volume` - Volume level (0-100).  # Returns The index of the played sound, or `None` if collection is empty.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn play_random_full(&amp;amp;mut self) -&amp;amp;gt; Option&amp;amp;lt;usize&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Plays a random sound at full volume.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn repeat_random( &amp;amp;mut self, min_delay: i32, max_delay: i32, volume: u32, dt: i32, ) -&amp;amp;gt; Option&amp;amp;lt;usize&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Repeats random sounds at intervals.  Call this every frame with the delta time. When the delay expires, a random sound is played and a new delay is set.  # Arguments * `min_delay` - Minimum delay in milliseconds between sounds. * `max_delay` - Maximum delay in milliseconds between sounds. * `volume` - Volume level (0-100). * `dt` - Delta time in milliseconds since last call.  # Returns The index of the played sound if one was played this frame.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn reset_delay(&amp;amp;mut self)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Resets the repeat delay counter.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn cache_all(&amp;amp;self)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Caches all sounds in the collection for faster playback.&lt;br /&gt;
&lt;br /&gt;
== high_level::scramble ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Scramble&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;SimpleScramble&amp;lt;/code&amp;gt; cube-scramble helpers with mapping callbacks.&lt;br /&gt;
&lt;br /&gt;
'''Types:''' &amp;lt;code&amp;gt;trait ScrambleObserver&amp;lt;/code&amp;gt; — Observer trait for scramble events.  Implement this trait to receive callbacks when the cube topology changes. · &amp;lt;code&amp;gt;struct FaceletPosition&amp;lt;/code&amp;gt; — Facelet position tracking for a single facelet. · &amp;lt;code&amp;gt;struct Scramble&amp;lt;/code&amp;gt; — Tracks facelet positions across cube twists.  This struct maintains a mapping of where each facelet has moved to as the cube is twisted. It can be used to implement scramble-based puzzles or effects that follow facelets as they move. · &amp;lt;code&amp;gt;struct SimpleScramble&amp;lt;/code&amp;gt; — Simple scramble tracker without observer callbacks.  A lighter-weight version of `Scramble` for when you don't need the observer pattern.&lt;br /&gt;
&lt;br /&gt;
'''23 public functions:'''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;ScrambleObserver::fn on_before_twist(&amp;amp;mut self)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Called before a twist is about to occur.  Use this to save state that might be affected by the twist.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;ScrambleObserver::fn on_mapping_changed( &amp;amp;mut self, _to_module: u8, _to_screen: u8, _from_module: u8, _from_screen: u8, )&amp;lt;/code&amp;gt;&lt;br /&gt;
: Called when a facelet mapping changes during a twist.  # Arguments * `to_module` - Destination module ID. * `to_screen` - Destination screen ID within module. * `from_module` - Source module ID. * `from_screen` - Source screen ID within module.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn new(module: u8, screen: u8) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Creates a new facelet position.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn to_display_id(&amp;amp;self) -&amp;amp;gt; u8&amp;lt;/code&amp;gt;&lt;br /&gt;
: Converts to a linear display ID (0-23).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn from_display_id(display_id: u8) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Creates from a linear display ID.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn new() -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Creates a new scramble tracker with identity mapping.  Initially, each facelet is at its &amp;quot;home&amp;quot; position.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn reset(&amp;amp;mut self)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Resets all positions to identity (home positions).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn is_assembled(&amp;amp;self) -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
: Returns whether the cube is currently assembled.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_position(&amp;amp;self, original_display_id: u8) -&amp;amp;gt; Option&amp;amp;lt;FaceletPosition&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Returns the current position of a facelet by its original display ID.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_previous_position(&amp;amp;self, original_display_id: u8) -&amp;amp;gt; Option&amp;amp;lt;FaceletPosition&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Returns the previous position of a facelet (before last twist).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn last_twist(&amp;amp;self) -&amp;amp;gt; Option&amp;amp;lt;&amp;amp;TopologyTwistInfo&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Returns the last recorded twist info.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn is_solved(&amp;amp;self) -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
: Checks if all facelets are in their home positions.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn count_home(&amp;amp;self) -&amp;amp;gt; usize&amp;lt;/code&amp;gt;&lt;br /&gt;
: Counts how many facelets are in their home positions.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn update&amp;amp;lt;O: ScrambleObserver&amp;amp;gt;(&amp;amp;mut self, mut observer: Option&amp;amp;lt;&amp;amp;mut O&amp;amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Updates the scramble state based on current topology.  Call this each frame or after twist events to keep tracking current.  # Arguments * `observer` - Optional observer to receive callbacks.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn positions(&amp;amp;self) -&amp;amp;gt; &amp;amp;[FaceletPosition; 24]&amp;lt;/code&amp;gt;&lt;br /&gt;
: Gets all positions as a slice.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn previous_positions(&amp;amp;self) -&amp;amp;gt; &amp;amp;[FaceletPosition; 24]&amp;lt;/code&amp;gt;&lt;br /&gt;
: Gets previous positions as a slice.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn new() -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Creates a new simple scramble tracker.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn reset(&amp;amp;mut self)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Resets to identity positions.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn update(&amp;amp;mut self)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Updates based on current topology (no callbacks).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn is_assembled(&amp;amp;self) -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
: Returns whether the cube is assembled.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn is_solved(&amp;amp;self) -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
: Returns whether all facelets are home.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_position(&amp;amp;self, original_display_id: u8) -&amp;amp;gt; Option&amp;amp;lt;FaceletPosition&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Gets the current position of a facelet.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn last_twist(&amp;amp;self) -&amp;amp;gt; Option&amp;amp;lt;&amp;amp;TopologyTwistInfo&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Gets the last twist info.&lt;br /&gt;
&lt;br /&gt;
== high_level::splashscreen ==&lt;br /&gt;
&lt;br /&gt;
Standard splash screen with leaderboard table, records, QR link.&lt;br /&gt;
&lt;br /&gt;
'''Types:''' &amp;lt;code&amp;gt;enum LeadersDataType&amp;lt;/code&amp;gt; — Data type for leaderboard values. · &amp;lt;code&amp;gt;enum ScreenType&amp;lt;/code&amp;gt; — Screen type for each position on the splashscreen. · &amp;lt;code&amp;gt;enum LeaderboardType&amp;lt;/code&amp;gt; — Preset leaderboard table layouts. · &amp;lt;code&amp;gt;struct LeaderData&amp;lt;/code&amp;gt; — Data for a single leader entry. · &amp;lt;code&amp;gt;struct ResultData&amp;lt;/code&amp;gt; — Data for a result parameter display. · &amp;lt;code&amp;gt;struct RecordData&amp;lt;/code&amp;gt; — Data for the record/best score display. · &amp;lt;code&amp;gt;struct SplashSprites&amp;lt;/code&amp;gt; — Sprite IDs for splashscreen graphics. · &amp;lt;code&amp;gt;struct Splashscreen&amp;lt;/code&amp;gt; — Splashscreen display manager.  Manages the layout and rendering of leaderboard and splash content across the cube's faces.&lt;br /&gt;
&lt;br /&gt;
'''17 public functions:'''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn new(name: &amp;amp;str, value: i32) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Creates a new leader entry.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn empty() -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Creates an empty/invalid entry.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn new(name: &amp;amp;str, value: i32) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Creates a new result parameter.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn new(value: i32, is_new: bool) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Creates new record data.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn from_names( background: Option&amp;amp;lt;&amp;amp;str&amp;amp;gt;, game_icon: Option&amp;amp;lt;&amp;amp;str&amp;amp;gt;, trophy: Option&amp;amp;lt;&amp;amp;str&amp;amp;gt;, ) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Creates sprites from asset names.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn set_animated_icon(&amp;amp;mut self, index: usize, name: &amp;amp;str)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Sets an animated icon sprite.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn new() -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Creates a new splashscreen with default settings.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn set_data_type(&amp;amp;mut self, data_type: LeadersDataType)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Sets the data type for value formatting.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn set_leader(&amp;amp;mut self, index: usize, name: &amp;amp;str, value: i32)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Sets a leader entry.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn clear_leaders(&amp;amp;mut self)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Clears all leader entries.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn set_record(&amp;amp;mut self, value: i32, is_new: bool)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Sets the record value.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn set_param(&amp;amp;mut self, index: usize, name: &amp;amp;str, value: i32)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Sets a result parameter.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn set_qr_text(&amp;amp;mut self, text: &amp;amp;str)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Sets the QR code text.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn set_leaderboard_table(&amp;amp;mut self, table: [[ScreenType; 4]; 6])&amp;lt;/code&amp;gt;&lt;br /&gt;
: Sets the leaderboard table layout.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn apply_preset(&amp;amp;mut self, preset: LeaderboardType)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Applies a preset leaderboard layout.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn tick(&amp;amp;mut self, dt: f32)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Updates animation state.  # Arguments * `dt` - Delta time in seconds.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn render_screen_type(&amp;amp;self, screen_type: ScreenType, screen_angle: u32, x: i32, y: i32)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Renders a specific screen type.  # Arguments * `screen_type` - The type of content to render. * `screen_angle` - Screen orientation angle. * `x` - X position. * `y` - Y position.&lt;br /&gt;
&lt;br /&gt;
[[Category:SDK 6.3]]&lt;br /&gt;
[[Category:Rust API]]&lt;/div&gt;</summary>
		<author><name>WowBot</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=SDK_6.3/Rust/cubios-sys&amp;diff=16978</id>
		<title>SDK 6.3/Rust/cubios-sys</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=SDK_6.3/Rust/cubios-sys&amp;diff=16978"/>
		<updated>2026-07-26T10:44:42Z</updated>

		<summary type="html">&lt;p&gt;WowBot: Full Rust API reference: cubios-sys + cubios, every pub fn with docs (WowBot)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{notice|'''Official WOWCube SDK documentation.''' SDK 6.3, Rust API — '''EXPERIMENTAL''' (supported; APIs may change). Generated from the [https://github.com/wowcube/CubiOS_Rust_SDK CubiOS_Rust_SDK] sources — the repository is authoritative; do not edit by hand.}}&lt;br /&gt;
&lt;br /&gt;
{{SDK 6.3 nav}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''← [[SDK 6.3]] · [[SDK 6.3/Rust|Rust]] / cubios-sys (raw layer)''&lt;br /&gt;
&lt;br /&gt;
Complete reference of the '''raw layer''' crate [https://github.com/wowcube/CubiOS_Rust_SDK/tree/main/crates/cubios-sys &amp;lt;code&amp;gt;cubios-sys&amp;lt;/code&amp;gt;]: FFI bindings to the CubiOS engine ABI, thin safe wrappers and the application event loop. Signatures and descriptions are extracted from the crate sources. Engine-function semantics match the [[SDK 6.3/C++/Native API|C++ native API]] one-to-one.&lt;br /&gt;
&lt;br /&gt;
== ffi::application ==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;Application&amp;lt;/code&amp;gt; trait (11 callbacks), &amp;lt;code&amp;gt;ApplicationContext&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;TimerController&amp;lt;/code&amp;gt;, the event loop (&amp;lt;code&amp;gt;application_init&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;application_run&amp;lt;/code&amp;gt;), &amp;lt;code&amp;gt;Anim&amp;amp;lt;T&amp;amp;gt;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;AppErr&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Types:''' &amp;lt;code&amp;gt;enum AppErr&amp;lt;/code&amp;gt; · &amp;lt;code&amp;gt;enum AppPkt&amp;lt;/code&amp;gt; · &amp;lt;code&amp;gt;enum RotationDir&amp;lt;/code&amp;gt; · &amp;lt;code&amp;gt;struct Anim&amp;lt;/code&amp;gt; · &amp;lt;code&amp;gt;struct Timer&amp;lt;/code&amp;gt; · &amp;lt;code&amp;gt;trait Application&amp;lt;/code&amp;gt; · &amp;lt;code&amp;gt;trait Assetable&amp;lt;/code&amp;gt; · &amp;lt;code&amp;gt;trait Mappable&amp;lt;/code&amp;gt; · &amp;lt;code&amp;gt;trait Packable&amp;lt;/code&amp;gt; · &amp;lt;code&amp;gt;struct MapBase&amp;lt;/code&amp;gt; · &amp;lt;code&amp;gt;struct SceneSwitch&amp;lt;/code&amp;gt; · &amp;lt;code&amp;gt;trait Broadcastable&amp;lt;/code&amp;gt; · &amp;lt;code&amp;gt;trait Shuffable&amp;lt;/code&amp;gt; · &amp;lt;code&amp;gt;struct TimerController&amp;lt;/code&amp;gt; · &amp;lt;code&amp;gt;struct ApplicationContext&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''49 public functions:'''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Application::fn app_context_mut(&amp;amp;mut self) -&amp;amp;gt; &amp;amp;mut ApplicationContext&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Application::fn set_timer(&amp;amp;mut self, id: u8, delay: u32, suspended: bool) -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Application::fn start_timer(&amp;amp;mut self, id: u8) -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Application::fn stop_timer(&amp;amp;mut self, id: u8) -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Application::fn kill_timer(&amp;amp;mut self, id: u8)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Application::fn on_init(&amp;amp;mut self) -&amp;amp;gt; Result&amp;amp;lt;(), AppErr&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Called once when the application initializes.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Application::fn on_tick(&amp;amp;mut self, cur_time: u32, delta_time: u32) -&amp;amp;gt; Result&amp;amp;lt;(), AppErr&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Called every frame. `cur_time` is current time in ms, `delta_time` is ms since last tick.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Application::fn on_render(&amp;amp;mut self, screens: &amp;amp;mut [Screen&amp;lt;/code&amp;gt;&lt;br /&gt;
: Called to render the current frame. `screens` contains the 3 screens for this module.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Application::fn on_phys_tick(&amp;amp;mut self, screens: &amp;amp;[Screen&amp;lt;/code&amp;gt;&lt;br /&gt;
: Called on physics tick. `screens` contains the 3 screens for this module.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Application::fn on_twist(&amp;amp;mut self, twist: &amp;amp;TopologyTwistInfo) -&amp;amp;gt; Result&amp;amp;lt;(), AppErr&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Called when a twist event occurs.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Application::fn on_tap(&amp;amp;mut self, count: u32) -&amp;amp;gt; Result&amp;amp;lt;(), AppErr&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Called when a tap event occurs. `count` is the number of taps.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Application::fn on_pat(&amp;amp;mut self, count: u32) -&amp;amp;gt; Result&amp;amp;lt;(), AppErr&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Called when a pat event occurs. `count` is the number of pats.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Application::fn on_message(&amp;amp;mut self, msg_type: u32, data: &amp;amp;[u8]) -&amp;amp;gt; Result&amp;amp;lt;(), AppErr&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Called when a network message is received from another module.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Application::fn on_external_message(&amp;amp;mut self, data: &amp;amp;[u8]) -&amp;amp;gt; Result&amp;amp;lt;(), AppErr&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Called when an external message is received via BLE.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Application::fn on_timer(&amp;amp;mut self, timer_id: u8) -&amp;amp;gt; Result&amp;amp;lt;(), AppErr&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Called when a timer fires.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Application::fn on_close(&amp;amp;mut self) -&amp;amp;gt; Result&amp;amp;lt;(), AppErr&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Called when the application is closing.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Application::fn get_time(&amp;amp;self) -&amp;amp;gt; u32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Returns current time in milliseconds.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Application::fn get_time_seconds(&amp;amp;self) -&amp;amp;gt; u32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Returns current time in seconds.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Application::fn is_master_module(&amp;amp;self) -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
: Returns true if this module is the master (module 0).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Application::fn send_network_message(&amp;amp;self, msg_type: u32, data: &amp;amp;[u8])&amp;lt;/code&amp;gt;&lt;br /&gt;
: Sends a network message to other modules.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Application::fn save_state(&amp;amp;self, data: &amp;amp;[u8])&amp;lt;/code&amp;gt;&lt;br /&gt;
: Saves game state to persistent storage.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Application::fn load_state(&amp;amp;self, id: &amp;amp;mut u32, data: &amp;amp;mut [u8]) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Loads game state from persistent storage. Returns the number of bytes read, or negative on error.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Application::fn send_external_message(&amp;amp;self, msg_type: u32, data: &amp;amp;mut [u8])&amp;lt;/code&amp;gt;&lt;br /&gt;
: Sends an external message via BLE.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Application::fn show_fps_counter(&amp;amp;self, show: bool)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Shows or hides the FPS counter overlay.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Application::fn get_image_assets_count(&amp;amp;self) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Returns the number of image assets available.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Application::fn get_sound_assets_count(&amp;amp;self) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Returns the number of sound assets available.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Assetable::fn get_asset_id(asset: &amp;amp;'static str) -&amp;amp;gt; Result&amp;amp;lt;u32, AppErr&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Mappable::fn get_place( &amp;amp;self, module: u32, screen: u32, orientation: TopologyOrientation, ) -&amp;amp;gt; Result&amp;amp;lt;(u32, u32), AppErr&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Packable::fn to_pkt(&amp;amp;self, module: u8, screen: u8) -&amp;amp;gt; [u8&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Packable::fn from_pkt(pkt: [u8&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn new(val: T) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Broadcastable::fn broadcast_part(&amp;amp;mut self, _module: u8, _screen: u8, _delay: usize) -&amp;amp;gt; Result&amp;amp;lt;(), AppErr&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Broadcastable::fn broadcast(&amp;amp;mut self, delay: usize) -&amp;amp;gt; Result&amp;amp;lt;(), AppErr&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Broadcastable::fn recv(&amp;amp;mut self, pkt: [u8&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Shuffable::fn rotate(&amp;amp;mut self, dir: &amp;amp;RotationDir) -&amp;amp;gt; Result&amp;amp;lt;(), AppErr&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Shuffable::fn shuffle(&amp;amp;mut self, algo: &amp;amp;[RotationDir]) -&amp;amp;gt; Result&amp;amp;lt;(), AppErr&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn new(scenes: &amp;amp;'static [usize], start_time: usize) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn next_scene(&amp;amp;mut self)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn set_scene(&amp;amp;mut self, id: u8) -&amp;amp;gt; Result&amp;amp;lt;(), AppErr&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn animate(&amp;amp;mut self)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn new() -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Create a new TimerController with no active timers.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn set_timer(&amp;amp;mut self, id: u8, delay: u32, suspended: bool) -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn start_timer(&amp;amp;mut self, id: u8) -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn stop_timer(&amp;amp;mut self, id: u8) -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn kill_timer(&amp;amp;mut self, id: u8)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn delta_time(&amp;amp;self) -&amp;amp;gt; u32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn new() -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Create a new ApplicationContext.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn application_init&amp;amp;lt;T: Application&amp;amp;gt;(app: &amp;amp;mut T, cid: u32)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn application_run&amp;amp;lt;T: Application&amp;amp;gt;(app: &amp;amp;mut T)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== ffi::comm ==&lt;br /&gt;
&lt;br /&gt;
Inter-module packets and UART lines, BLE external data, time, user name, state save/load, RNG, logging (&amp;lt;code&amp;gt;log_a&amp;lt;/code&amp;gt;…&amp;lt;code&amp;gt;log_v&amp;lt;/code&amp;gt;), tap.&lt;br /&gt;
&lt;br /&gt;
'''22 public functions:'''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn send_message(line: u32, pkt: *const u8, size: u32) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn send_message_to(line: u32, dest: u32, pkt: *const u8, size: u32) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn recv_message( line: u32, size: u32, pkt_info: *mut u32, pkt: *mut u8, rx_size: *mut u32, ) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn send_packet(packet_type: u32, pkt: &amp;amp;[u8]) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Send a packet (new API in SDK 6.3)&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn recv_packet(size: u32, packet_type: *mut u32, pkt: *mut u8) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Receive a packet (new API in SDK 6.3)  Returns the number of bytes received, or negative on error. The packet type is written to `packet_type`.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_time() -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_user_name(buffer: &amp;amp;mut [u8]) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn toggle_debug_info() -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn save_state(data: &amp;amp;[u8]) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn load_state(id: &amp;amp;mut u32, data: &amp;amp;mut [u8]) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Load saved state  Returns the number of bytes loaded, or negative on error. The save ID is written to `id`.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn load_state_legacy(data: &amp;amp;mut [u8]) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Load saved state (legacy API without ID)  Note: This ignores the save ID. Use `load_state` for full functionality.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn random_range(min: u32, max: u32) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_app_version() -&amp;amp;gt; AppVersion&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get the application version&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn log_a(text: &amp;amp;str) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn log_e(text: &amp;amp;str) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn log_w(text: &amp;amp;str) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn log_i(text: &amp;amp;str) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn log_d(text: &amp;amp;str) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn log_v(text: &amp;amp;str) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_tap() -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn send_ble_data(data_type: u32, pkt: &amp;amp;mut [u8]) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Send BLE data&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn recv_ble_data(pkt: &amp;amp;mut [u8]) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Receive BLE data&lt;br /&gt;
&lt;br /&gt;
== ffi::gfx ==&lt;br /&gt;
&lt;br /&gt;
Immediate-mode drawing: clear, primitives, text, images, baked images, sub-images, shaders, QR, render target, cache.&lt;br /&gt;
&lt;br /&gt;
'''26 public functions:'''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_asset_id(sprite_name: &amp;amp;str) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn clear(color: u32) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn draw_text( x: i32, y: i32, scale: u32, angle: u32, align: TextAlign, color: u32, text: &amp;amp;str, ) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn draw_point(x: i32, y: i32, color: u32) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn draw_circle(x: u32, y: u32, radius: u32, width: u32, color: u32) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn draw_solid_circle(x: u32, y: u32, radius: u32, color: u32) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Deprecated: use `set_fill_shader` + `draw_circle` instead&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn draw_arc( x: i32, y: i32, radius: u32, width: u32, angle0: u32, angle1: u32, color: u32, ) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn draw_sector(x: i32, y: i32, radius: u32, angle0: u32, angle1: u32, color: u32) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn draw_line(x0: i32, y0: i32, x1: i32, y1: i32, thickness: u32, color: u32) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn draw_rectangle(x: i32, y: i32, w: i32, h: i32, color: u32) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn bake_image( id: SpriteId, width: u32, height: u32, format: GfxPixelFormat, overwrite: bool, ) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Bake an image to an offscreen buffer  # Arguments * `id` - Sprite ID to bake * `width` - Width of the baked image * `height` - Height of the baked image * `format` - Pixel format for the baked image * `overwrite` - Whether to overwrite existing baked image&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn remove_baked_image(id: SpriteId) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Remove a previously baked image&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn set_render_target(display: u8) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn draw_image( id: SpriteId, x: i32, y: i32, opacity: u32, color_key: u32, scale_x: u32, scale_y: u32, angle: u32, mirror: GfxMirror, ) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn draw_baked_image( x: i32, y: i32, opacity: u32, color_key: u32, scale_x: u32, scale_y: u32, angle: u32, mirror: GfxMirror, id: SpriteId, ) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn draw_sub_image( id: SpriteId, x: i32, y: i32, rect_x: u32, rect_y: u32, rect_w: u32, rect_h: u32, opacity: u32, color_key: u32, scale_x: u32, scale_y: u32, angle: u32, mirror: GfxMirror, ) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Draw a sub-region of a sprite (for sprite atlases)&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn draw_qr_code( x: i32, y: i32, size: u32, color0: u32, color1: u32, angle: u32, id: u32, text: &amp;amp;str, ) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Draw a QR code&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn render() -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn clear_cache() -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn cache_images(sprite_ids: &amp;amp;[SpriteId]) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_assets_count() -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get the total number of image assets&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn set_fps_window(size: u32) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set the FPS counter window size&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn set_fill_shader(color: u32) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set a solid fill shader  When active, drawing operations will use this color to fill shapes.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn set_linear_gradient_shader( x0: u32, y0: u32, x1: u32, y1: u32, color0: u32, color1: u32, ) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set a linear gradient shader  # Arguments * `x0`, `y0` - Start point of the gradient * `x1`, `y1` - End point of the gradient * `color0` - Start color * `color1` - End color&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn set_radial_gradient_shader(x0: u32, y0: u32, radius: u32, color0: u32, color1: u32) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set a radial gradient shader  # Arguments * `x0`, `y0` - Center point of the gradient * `radius` - Radius of the gradient * `color0` - Center color * `color1` - Edge color&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn remove_shader() -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Remove the active shader&lt;br /&gt;
&lt;br /&gt;
== ffi::topology ==&lt;br /&gt;
&lt;br /&gt;
Facelets, faces, places, orientation, twists, assembly check.&lt;br /&gt;
&lt;br /&gt;
'''15 public functions:'''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_cuben() -&amp;amp;gt; u32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_adjacent_facelet( module: u32, screen: u32, direction: TopologyNeighbour, result: *mut TopologyFaceletInfo, ) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_reversed_face(face: u32) -&amp;amp;gt; Option&amp;amp;lt;u32&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_facelet( face: u32, position: u32, mode: TopologyOrientation, result: *mut TopologyFaceletInfo, ) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_place( module: u32, screen: u32, mode: TopologyOrientation, result: *mut TopologyPlace, ) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_opposite_facelet(module: u32, screen: u32, result: *mut TopologyFaceletInfo) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_angle(module: u32, screen: u32, mode: TopologyOrientation) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_facelet_orientation(module: u32, screen: u32) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_place_orientation(face: u32, position: u32) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_face(orientation: u32) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn is_assembled() -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_twist(twist: *mut TopologyTwistInfo) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn debug_get_face(module: u32, screen: u32) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn debug_get_position(module: u32, screen: u32) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn debug_get_horizontal() -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== ffi::sound ==&lt;br /&gt;
&lt;br /&gt;
Sound asset id, play, cache, stop, status.&lt;br /&gt;
&lt;br /&gt;
'''6 public functions:'''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_asset_id(sound_name: &amp;amp;str) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn play(sound_id: SoundId, volume: u32) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn cache_sounds(sound_ids: &amp;amp;[SoundId]) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn is_playing() -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
: Check if a sound is currently playing&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn stop() -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Stop the currently playing sound&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_assets_count() -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get the total number of sound assets&lt;br /&gt;
&lt;br /&gt;
== ffi::motion ==&lt;br /&gt;
&lt;br /&gt;
Per-display accelerometer and gyroscope.&lt;br /&gt;
&lt;br /&gt;
'''8 public functions:'''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_face_accel_x(display: u32) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get raw accelerometer value along the screen-local X-axis (horizontal right).  At rest, this reads the X-component of gravity in the screen's coordinate frame. During motion, reads gravity + linear acceleration.  # Parameters - `display`: Screen index (0–23). All 3 screens on a module return the same physical measurement, transformed to screen-local coordinates.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_face_accel_y(display: u32) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get raw accelerometer value along the screen-local Y-axis (vertical up).  See [`get_face_accel_x`] for details on data format and coordinate frame.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_face_accel_z(display: u32) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get raw accelerometer value along the screen-local Z-axis (toward cube center).  When this screen faces up, Z reads approximately -1g (gravity pulls toward center). When this screen faces down, Z reads approximately +1g.  See [`get_face_accel_x`] for details on data format and coordinate frame.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_face_gyro_x(display: u32) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get raw gyroscope value for rotation around the screen-local X-axis.  Measures angular velocity of the screen pitching up/down. At rest, reads approximately zero. Sign convention: positive = clockwise when looking along the positive X-axis direction (per SDK docs, unverified).  # Parameters - `display`: Screen index (0–23). Same sensor sharing as accelerometer.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_face_gyro_y(display: u32) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get raw gyroscope value for rotation around the screen-local Y-axis.  Measures angular velocity of the screen yawing left/right. See [`get_face_gyro_x`] for details.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_face_gyro_z(display: u32) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get raw gyroscope value for rotation around the screen-local Z-axis.  Measures angular velocity of the screen spinning in-plane (like a wheel). See [`get_face_gyro_x`] for details.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_face_accel(display: u32) -&amp;amp;gt; (i32, i32, i32)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get all 3 accelerometer axes for a screen in one call.  Returns `(x, y, z)` in screen-local coordinates. Equivalent to calling [`get_face_accel_x`], [`get_face_accel_y`], and [`get_face_accel_z`] separately.  # Parameters - `display`: Screen index (0–23).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_face_gyro(display: u32) -&amp;amp;gt; (i32, i32, i32)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get all 3 gyroscope axes for a screen in one call.  Returns `(x, y, z)` angular velocities in screen-local coordinates. Equivalent to calling [`get_face_gyro_x`], [`get_face_gyro_y`], and [`get_face_gyro_z`] separately.  # Parameters - `display`: Screen index (0–23).&lt;br /&gt;
&lt;br /&gt;
== ffi::leaderboard ==&lt;br /&gt;
&lt;br /&gt;
Leaderboard info and score table.&lt;br /&gt;
&lt;br /&gt;
'''3 public functions:'''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_info(info: *mut LbInfo) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_info_safe() -&amp;amp;gt; LbInfo&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get leaderboard info with safe interface&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_score(lead_table_bin: &amp;amp;mut [u8]) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== ffi::event ==&lt;br /&gt;
&lt;br /&gt;
Pending-event mask (&amp;lt;code&amp;gt;Event&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;get_list&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
'''Types:''' &amp;lt;code&amp;gt;enum Event&amp;lt;/code&amp;gt; — Event flags returned by `get_list()`&lt;br /&gt;
&lt;br /&gt;
'''2 public functions:'''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_list() -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn has_event(event_list: i32, event: Event) -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
: Check if a specific event is set in the event list&lt;br /&gt;
&lt;br /&gt;
== ffi::network_message ==&lt;br /&gt;
&lt;br /&gt;
Bit-packed serializer for inter-module messages.&lt;br /&gt;
&lt;br /&gt;
'''Types:''' &amp;lt;code&amp;gt;struct NetworkMessage&amp;lt;/code&amp;gt; — Bit-packed network message for inter-module communication.  Allows packing multiple values into a compact byte buffer using variable bit widths for efficient network transmission.&lt;br /&gt;
&lt;br /&gt;
'''17 public functions:'''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn new() -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Create a new empty network message.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn from_data(data: &amp;amp;[u8]) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Create a network message from existing data.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn reset(&amp;amp;mut self, zero: bool)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Reset the message position. If `zero` is true, also clear the buffer.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_data(&amp;amp;self) -&amp;amp;gt; &amp;amp;[u8]&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get the underlying data buffer and used length.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn can_read(&amp;amp;self, bits: usize) -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
: Returns true if at least `bits` more bits can be read from the current position.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn write_int(&amp;amp;mut self, value: u32, bits: u8)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Write an unsigned integer with specified bit width (1-32 bits).  This writes raw bits without sign handling. For signed values that need sign extension when read back, use [`write_signed_int`](Self::write_signed_int).  # Arguments * `value` - The unsigned value to write (only the lower `bits` bits are used) * `bits` - Number of bits to write (1-32, clamped if larger)  # Note on C++ SDK difference The C++ `WriteInt` uses `int` (signed), but performs unsigned bit operations. This Rust version uses `u32` to make the unsigned semantics explicit.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn write_byte(&amp;amp;mut self, value: u8)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Write a single byte (8 bits).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn write_signed_int(&amp;amp;mut self, value: i32, bits: u8)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Write a signed integer with specified bit width.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn write_bool(&amp;amp;mut self, value: bool)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Write a boolean (1 bit).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn write_float(&amp;amp;mut self, value: f32)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Write a 32-bit float.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn read_int(&amp;amp;mut self, bits: u8) -&amp;amp;gt; u32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Read an unsigned integer with specified bit width.  This reads raw bits without sign extension. For signed values that were written with [`write_signed_int`](Self::write_signed_int), use [`read_signed_int`](Self::read_signed_int) to properly sign-extend.  # Arguments * `bits` - Number of bits to read (1-32, clamped if larger)  # Returns The unsigned value read from the message buffer.  # Note on C++ SDK difference The C++ `ReadInt` returns `int` (signed), but performs unsigned bit operations. This Rust version returns `u32` to make the unsigned semantics explicit.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn read_byte(&amp;amp;mut self) -&amp;amp;gt; u8&amp;lt;/code&amp;gt;&lt;br /&gt;
: Read a single byte.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn read_signed_int(&amp;amp;mut self, bits: u8) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Read a signed integer with specified bit width.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn read_bool(&amp;amp;mut self) -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
: Read a boolean.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn read_float(&amp;amp;mut self) -&amp;amp;gt; f32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Read a 32-bit float.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn position(&amp;amp;self) -&amp;amp;gt; usize&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get current bit position.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn can_write(&amp;amp;self, bits: usize) -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
: Check if there's enough space to write `bits` more bits.&lt;br /&gt;
&lt;br /&gt;
== ffi::save_message ==&lt;br /&gt;
&lt;br /&gt;
Bit-packed serializer for the persistent save buffer.&lt;br /&gt;
&lt;br /&gt;
'''Types:''' &amp;lt;code&amp;gt;struct SaveMessage&amp;lt;/code&amp;gt; — Bit-packed save message for game state persistence.  Allows packing multiple values into a compact byte buffer using variable bit widths for efficient save data storage.&lt;br /&gt;
&lt;br /&gt;
'''18 public functions:'''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn new() -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Create a new empty save message.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn from_data(data: &amp;amp;[u8]) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Create a save message from existing data.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn reset(&amp;amp;mut self, zero: bool)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Reset the message position. If `zero` is true, also clear the buffer.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_data(&amp;amp;self) -&amp;amp;gt; &amp;amp;[u8]&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get the underlying data buffer (only the used portion).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn get_buffer_mut(&amp;amp;mut self) -&amp;amp;gt; &amp;amp;mut [u8]&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get the full buffer for loading saved data.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn write_int(&amp;amp;mut self, value: u32, bits: u8)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Write an unsigned integer with specified bit width (1-32 bits).  This writes raw bits without sign handling. For signed values that need sign extension when read back, use [`write_signed_int`](Self::write_signed_int).  # Arguments * `value` - The unsigned value to write (only the lower `bits` bits are used) * `bits` - Number of bits to write (1-32, clamped if larger)  # Note on C++ SDK difference The C++ `WriteInt` uses `int` (signed), but performs unsigned bit operations. This Rust version uses `u32` to make the unsigned semantics explicit.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn write_byte(&amp;amp;mut self, value: u8)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Write a single byte (8 bits).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn write_signed_int(&amp;amp;mut self, value: i32, bits: u8)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Write a signed integer with specified bit width.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn write_bool(&amp;amp;mut self, value: bool)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Write a boolean (1 bit).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn write_float(&amp;amp;mut self, value: f32)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Write a 32-bit float.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn read_int(&amp;amp;mut self, bits: u8) -&amp;amp;gt; u32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Read an unsigned integer with specified bit width.  This reads raw bits without sign extension. For signed values that were written with [`write_signed_int`](Self::write_signed_int), use [`read_signed_int`](Self::read_signed_int) to properly sign-extend.  # Arguments * `bits` - Number of bits to read (1-32, clamped if larger)  # Returns The unsigned value read from the save buffer.  # Note on C++ SDK difference The C++ `ReadInt` returns `int` (signed), but performs unsigned bit operations. This Rust version returns `u32` to make the unsigned semantics explicit.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn read_byte(&amp;amp;mut self) -&amp;amp;gt; u8&amp;lt;/code&amp;gt;&lt;br /&gt;
: Read a single byte.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn read_signed_int(&amp;amp;mut self, bits: u8) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Read a signed integer with specified bit width.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn read_bool(&amp;amp;mut self) -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
: Read a boolean.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn read_float(&amp;amp;mut self) -&amp;amp;gt; f32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Read a 32-bit float.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn position(&amp;amp;self) -&amp;amp;gt; usize&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get current bit position.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn can_write(&amp;amp;self, bits: usize) -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
: Check if there's enough space to write `bits` more bits.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn set_used_bits(&amp;amp;mut self, bits: usize)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set the number of used bits (for after loading data).&lt;br /&gt;
&lt;br /&gt;
== ffi::screen ==&lt;br /&gt;
&lt;br /&gt;
Low-level screen descriptor (id, angle, face, position) + &amp;lt;code&amp;gt;create_screens()&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
'''Types:''' &amp;lt;code&amp;gt;struct Screen&amp;lt;/code&amp;gt; — Represents a screen on a WOWCube module.  Each module has 3 screens. This struct provides access to screen properties like position, orientation, and display ID for rendering purposes.&lt;br /&gt;
&lt;br /&gt;
'''7 public functions:'''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn new(display_id: u8) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Creates a new Screen for the given display ID on this module.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn id(&amp;amp;self) -&amp;amp;gt; u8&amp;lt;/code&amp;gt;&lt;br /&gt;
: Returns the display ID (0-2).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn angle(&amp;amp;self) -&amp;amp;gt; u32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Returns the current rotation angle.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn position(&amp;amp;self) -&amp;amp;gt; u32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Returns the position in the topology.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn face(&amp;amp;self) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Returns the face this screen is on.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn update_from_topology(&amp;amp;mut self, module: u32, orientation: TopologyOrientation)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Updates screen topology information from the system.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn create_screens() -&amp;amp;gt; [Screen; 3]&amp;lt;/code&amp;gt;&lt;br /&gt;
: Creates an array of 3 screens for a module, initialized with display IDs 0, 1, 2.&lt;br /&gt;
&lt;br /&gt;
== ffi::math ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;Vec2&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;Vec2i&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Color&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Transform&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Rect2&amp;lt;/code&amp;gt;, trigonometry and fixed-point helpers (no_std, libm).&lt;br /&gt;
&lt;br /&gt;
'''Types:''' &amp;lt;code&amp;gt;struct Vec2&amp;lt;/code&amp;gt; — 2D vector with floating-point components. · &amp;lt;code&amp;gt;struct Vec2i&amp;lt;/code&amp;gt; — 2D vector with integer components. · &amp;lt;code&amp;gt;struct Color&amp;lt;/code&amp;gt; — ARGB color with 8-bit components.  Stored as a packed u32 in ARGB format: 0xAARRGGBB · &amp;lt;code&amp;gt;struct Transform&amp;lt;/code&amp;gt; — Transform with position, rotation, scale, and mirroring. · &amp;lt;code&amp;gt;struct Rect2&amp;lt;/code&amp;gt; — 2D rectangle defined by top-left and dimensions.&lt;br /&gt;
&lt;br /&gt;
'''57 public functions:'''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn log2(f: f32) -&amp;amp;gt; f32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Log base 2.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn iclamp(val: i32, min_val: i32, max_val: i32) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Clamp an integer value between min and max.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn acos(x: f32) -&amp;amp;gt; f32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Arc cosine with value clamping to [-1, 1].&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn asin(x: f32) -&amp;amp;gt; f32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Arc sine with value clamping to [-1, 1].&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn sqrt(x: f32) -&amp;amp;gt; f32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Safe square root (negative values return 0).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn fequal(f0: f32, f1: f32, tol: f32) -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
: Fuzzy floating point equality check.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn fless(f0: f32, f1: f32, tol: f32) -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
: Fuzzy floating point less-than check.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn fgreater(f0: f32, f1: f32, tol: f32) -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
: Fuzzy floating point greater-than check.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn ftol(val: f32) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Fast float to int conversion (truncates).  Note: This is a portable implementation that matches the C++ SDK behavior.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn smooth(new_val: f32, cur_val: f32, max_change: f32) -&amp;amp;gt; f32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Smooth a value towards a target using max change per step.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn clamp(val: f32, lower: f32, upper: f32) -&amp;amp;gt; f32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Clamp a float value between lower and upper bounds.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn saturate(val: f32) -&amp;amp;gt; f32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Saturate a value (clamp between 0.0 and 1.0).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn deg2rad(d: f32) -&amp;amp;gt; f32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Convert degrees to radians.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn rad2deg(r: f32) -&amp;amp;gt; f32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Convert radians to degrees.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn n_abs(a: f32) -&amp;amp;gt; f32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get the absolute value.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn n_sgn(a: f32) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get the sign of a value (-1 or 1).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn n_max&amp;amp;lt;T: PartialOrd&amp;amp;gt;(a: T, b: T) -&amp;amp;gt; T&amp;lt;/code&amp;gt;&lt;br /&gt;
: Return the maximum of two values.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn n_min&amp;amp;lt;T: PartialOrd&amp;amp;gt;(a: T, b: T) -&amp;amp;gt; T&amp;lt;/code&amp;gt;&lt;br /&gt;
: Return the minimum of two values.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn lerp(x: f32, y: f32, l: f32) -&amp;amp;gt; f32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Linearly interpolate between two values.  Returns `x + l * (y - x)`.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn rand_get_seed() -&amp;amp;gt; u32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get the current random seed.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn rand_set_seed(s: u32)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set the random seed.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn rand() -&amp;amp;gt; u32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Generate a random u32 using LCG algorithm.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn rand2() -&amp;amp;gt; f32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Return a pseudo random number between 0.0 and 1.0.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn rand_int(n: i32) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Return a random integer in range [0, n].&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn rand_real() -&amp;amp;gt; f32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Return a random float in [0.0, 1.0].&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn new(x: f32, y: f32) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Create a new vector.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn zero() -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Zero vector.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn set(&amp;amp;mut self, x: f32, y: f32)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set components.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn len(&amp;amp;self) -&amp;amp;gt; f32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Calculate length.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn normalize(&amp;amp;mut self)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Normalize in place.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn normalized(&amp;amp;self) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Return normalized copy.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn dot(&amp;amp;self, other: &amp;amp;Self) -&amp;amp;gt; f32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Dot product.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn new(x: i16, y: i16) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Create a new vector.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn zero() -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Zero vector.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn rgb(r: u8, g: u8, b: u8) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Create from RGB (alpha = 255).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn rgba(r: u8, g: u8, b: u8, a: u8) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Create from RGBA.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn from_u32(value: u32) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Create from packed u32 value (0xAARRGGBB format).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn value(&amp;amp;self) -&amp;amp;gt; u32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get the packed u32 value.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn r(&amp;amp;self) -&amp;amp;gt; u8&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get red component.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn g(&amp;amp;self) -&amp;amp;gt; u8&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get green component.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn b(&amp;amp;self) -&amp;amp;gt; u8&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get blue component.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn a(&amp;amp;self) -&amp;amp;gt; u8&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get alpha component.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn a_f32(&amp;amp;self) -&amp;amp;gt; f32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get alpha as float (0.0 - 1.0).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn set_r(&amp;amp;mut self, r: u8)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set red component.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn set_g(&amp;amp;mut self, g: u8)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set green component.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn set_b(&amp;amp;mut self, b: u8)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set blue component.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn set_a(&amp;amp;mut self, a: u8)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set alpha component.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn set_a_f32(&amp;amp;mut self, a: f32)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set alpha from float (0.0 - 1.0).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn new(x: f32, y: f32) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Create a new transform at position.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn with_rotation(x: f32, y: f32, rotation: i32) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Create with position and rotation.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn with_scale(x: f32, y: f32, rotation: i32, scale: u32) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Create with position, rotation, and uniform scale.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn safe_rotation(&amp;amp;self) -&amp;amp;gt; i32&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get rotation normalized to 0-359.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn set_scale(&amp;amp;mut self, scale: u32)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Set uniform scale.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn new(x: i16, y: i16, w: i16, h: i16) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Create a new rectangle.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn contains(&amp;amp;self, px: i16, py: i16) -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
: Check if a point is inside the rectangle.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn contains_point(&amp;amp;self, p: Vec2i) -&amp;amp;gt; bool&amp;lt;/code&amp;gt;&lt;br /&gt;
: Check if point (as Vec2i) is inside.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn center(&amp;amp;self) -&amp;amp;gt; Vec2i&amp;lt;/code&amp;gt;&lt;br /&gt;
: Get the center point.&lt;br /&gt;
&lt;br /&gt;
== ffi::types ==&lt;br /&gt;
&lt;br /&gt;
ABI enums and structs (&amp;lt;code&amp;gt;TopologyFaceletInfo&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;TopologyTwistInfo&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;TextAlign&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;GfxMirror&amp;lt;/code&amp;gt;, …).&lt;br /&gt;
&lt;br /&gt;
'''Types:''' &amp;lt;code&amp;gt;enum UartId&amp;lt;/code&amp;gt; — UART line identifiers · &amp;lt;code&amp;gt;enum GfxPixelFormat&amp;lt;/code&amp;gt; — Pixel format for baked images · &amp;lt;code&amp;gt;enum GfxMirror&amp;lt;/code&amp;gt; — Mirror mode for sprites · &amp;lt;code&amp;gt;enum TopologyNeighbour&amp;lt;/code&amp;gt; — Topology neighbor direction · &amp;lt;code&amp;gt;enum TopologyOrientation&amp;lt;/code&amp;gt; — Topology orientation mode · &amp;lt;code&amp;gt;enum TopologyTwist&amp;lt;/code&amp;gt; — Twist direction for cube rotations · &amp;lt;code&amp;gt;enum TextAlign&amp;lt;/code&amp;gt; — Text alignment options · &amp;lt;code&amp;gt;enum TopologyLocation&amp;lt;/code&amp;gt; — Topology face location · &amp;lt;code&amp;gt;enum LogLevel&amp;lt;/code&amp;gt; — Log level for debug output · &amp;lt;code&amp;gt;struct TopologyFaceletInfo&amp;lt;/code&amp;gt; — Information about a facelet in the topology · &amp;lt;code&amp;gt;struct TopologyPlace&amp;lt;/code&amp;gt; — Place information (face and position) · &amp;lt;code&amp;gt;struct TopologyTwistInfo&amp;lt;/code&amp;gt; — Twist event information · &amp;lt;code&amp;gt;struct LbInfo&amp;lt;/code&amp;gt; — Leaderboard information · &amp;lt;code&amp;gt;struct GfxParticle&amp;lt;/code&amp;gt; — Particle effect parameters · &amp;lt;code&amp;gt;struct AppVersion&amp;lt;/code&amp;gt; — Application version (packed bitfield in C++)&lt;br /&gt;
&lt;br /&gt;
'''4 public functions:'''&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn from_u32(value: u32) -&amp;amp;gt; Self&amp;lt;/code&amp;gt;&lt;br /&gt;
: Converts a u32 value to a GfxMirror variant.  Returns `GfxMirror::None` for invalid values.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn patch(&amp;amp;self) -&amp;amp;gt; u16&amp;lt;/code&amp;gt;&lt;br /&gt;
: Extract patch version (bits 0-15)&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn minor(&amp;amp;self) -&amp;amp;gt; u8&amp;lt;/code&amp;gt;&lt;br /&gt;
: Extract minor version (bits 16-19)&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;fn major(&amp;amp;self) -&amp;amp;gt; u8&amp;lt;/code&amp;gt;&lt;br /&gt;
: Extract major version (bits 20-23)&lt;br /&gt;
&lt;br /&gt;
== ffi::constants ==&lt;br /&gt;
&lt;br /&gt;
Platform constants (screen size, module counts, buffer limits, &amp;lt;code&amp;gt;CUBE_N&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
[[Category:SDK 6.3]]&lt;br /&gt;
[[Category:Rust API]]&lt;/div&gt;</summary>
		<author><name>WowBot</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=SDK_6.3&amp;diff=16976</id>
		<title>SDK 6.3</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=SDK_6.3&amp;diff=16976"/>
		<updated>2026-07-26T10:41:06Z</updated>

		<summary type="html">&lt;p&gt;WowBot: Link public CubiOS Rust SDK repo (WowBot)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{notice|'''Official WOWCube SDK 6.3 documentation.''' Canonical API reference, generated from the SDK headers.}}&lt;br /&gt;
&lt;br /&gt;
The current WOWCube SDK. Applications can be written in '''PAWN''', '''C++''', or '''Rust'''.&lt;br /&gt;
&lt;br /&gt;
== PAWN API ==&lt;br /&gt;
'''Legacy:''' supported, but no longer actively developed (last PAWN additions — SDK 6.2; 6.3 only removed deprecated calls). For new projects use the [[#C++ API|C++ API]].&lt;br /&gt;
One page per module:&lt;br /&gt;
* [[SDK 6.3/PAWN/Core]] — application lifecycle, state, time, RNG, packets&lt;br /&gt;
* [[SDK 6.3/PAWN/Graphics]] — drawing, images, text, shaders (GFX)&lt;br /&gt;
* [[SDK 6.3/PAWN/Topology]] — cube geometry, facelets, twists&lt;br /&gt;
* [[SDK 6.3/PAWN/Sound]] — sound playback&lt;br /&gt;
* [[SDK 6.3/PAWN/Motion Sensor]] — accelerometer / gyroscope, taps&lt;br /&gt;
* [[SDK 6.3/PAWN/Leaderboard]] — scores and achievements&lt;br /&gt;
* [[SDK 6.3/PAWN/Splash Screen]] — splash screens&lt;br /&gt;
* [[SDK 6.3/PAWN/Physics]] — 2D physics helpers&lt;br /&gt;
* [[SDK 6.3/PAWN/Network]] — inter-module messaging&lt;br /&gt;
* [[SDK 6.3/PAWN/Save]] — persistence&lt;br /&gt;
* [[SDK 6.3/PAWN/Scramble]] — cube scramble&lt;br /&gt;
* [[SDK 6.3/PAWN/Logging]] — debug logging&lt;br /&gt;
&lt;br /&gt;
* [[SDK 6.3/Changelog|SDK changelog]] — what changed in 5.1 / 6.0 / 6.2 / 6.3&lt;br /&gt;
&lt;br /&gt;
== C++ API ==&lt;br /&gt;
C/C++ cubeapps run via WebAssembly: the same engine functions as PAWN, plus an object-oriented framework and a retained scene graph. '''This is the primary development track.'''&lt;br /&gt;
&lt;br /&gt;
'''Native engine ABI''' — [[SDK 6.3/C++/Native API]] (all 64 functions with full descriptions):&lt;br /&gt;
* [[SDK 6.3/C++/Core|Core]] — time, RNG, packets, BLE, saves, user, version, logging&lt;br /&gt;
* [[SDK 6.3/C++/Graphics|Graphics]] — drawing, images, text, shaders, QR, render targets&lt;br /&gt;
* [[SDK 6.3/C++/Topology|Topology]] — facelets, faces, twists, orientation&lt;br /&gt;
* [[SDK 6.3/C++/Sound|Sound]] — playback and caching&lt;br /&gt;
* [[SDK 6.3/C++/Motion Sensors|Motion Sensors]] — accelerometer / gyroscope per display&lt;br /&gt;
* [[SDK 6.3/C++/Leaderboard|Leaderboard]] — scores and rankings&lt;br /&gt;
* [[SDK 6.3/C++/Native API#Types and data structures|Types &amp;amp; data structures]] — structs, enums, constants&lt;br /&gt;
&lt;br /&gt;
'''Application framework''' — [[SDK 6.3/C++/Application]]:&lt;br /&gt;
* [[SDK 6.3/C++/Application#Entry point|Entry point]] · [[SDK 6.3/C++/Application#class Cubios::Application|callbacks (on_Tick, on_Render, on_Twist, …)]] · timers, networking, saves, [[SDK 6.3/C++/Application#class Cubios::AppManager|AppManager]]&lt;br /&gt;
&lt;br /&gt;
'''GFX Engine (scene graph)''' — [[SDK 6.3/C++/GFX Engine]] (56 documented methods + official-sample code):&lt;br /&gt;
* [[SDK 6.3/C++/GFX Engine#The canonical pattern|The canonical pattern]] — how real games are structured&lt;br /&gt;
* [[SDK 6.3/C++/GFX Engine#Scene|Scene]] · [[SDK 6.3/C++/GFX Engine#SceneObject|SceneObject]] · [[SDK 6.3/C++/GFX Engine#Screen|Screen]]&lt;br /&gt;
* [[SDK 6.3/C++/GFX Engine#Gfx::Sprite|Sprite]] · [[SDK 6.3/C++/GFX Engine#Gfx::AnimatedSprite|AnimatedSprite]] · [[SDK 6.3/C++/GFX Engine#Gfx::SpriteAtlas|SpriteAtlas]] · [[SDK 6.3/C++/GFX Engine#Gfx::Background|Background]] · [[SDK 6.3/C++/GFX Engine#Gfx::Text|Text]] · [[SDK 6.3/C++/GFX Engine#Gfx::QRCode|QRCode]] · [[SDK 6.3/C++/GFX Engine#Gfx::OffscreenRenderTarget|OffscreenRenderTarget]]&lt;br /&gt;
* [[SDK 6.3/C++/GFX Engine#Sound and SoundCollection|Sound / SoundCollection]] · [[SDK 6.3/C++/GFX Engine#NetworkMessage and SaveMessage|NetworkMessage / SaveMessage]] · [[SDK 6.3/C++/GFX Engine#Scramble|Scramble]] · [[SDK 6.3/C++/GFX Engine#Splashscreen|Splashscreen]] · [[SDK 6.3/C++/GFX Engine#Math|Math]]&lt;br /&gt;
&lt;br /&gt;
== Rust API ==&lt;br /&gt;
'''EXPERIMENTAL, supported track''' — APIs may change; the primary track is C++. Two-crate '''[https://github.com/wowcube/CubiOS_Rust_SDK CubiOS Rust SDK]''' (public GitHub) (&amp;lt;code&amp;gt;cubios-sys&amp;lt;/code&amp;gt; raw + &amp;lt;code&amp;gt;cubios&amp;lt;/code&amp;gt; high-level), 1:1 parity with C++ 6.3, 533 public functions.&lt;br /&gt;
* [[SDK 6.3/Rust#Crate layout|Crate layout]] — modules &amp;lt;code&amp;gt;application&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;cubios&amp;lt;/code&amp;gt;&lt;br /&gt;
* [[SDK 6.3/Rust#Application trait|Application trait]] — &amp;lt;code&amp;gt;on_init / on_tick / on_render / on_timer&amp;lt;/code&amp;gt;, timers&lt;br /&gt;
* [[SDK 6.3/Rust#Entry points|Entry points]] — &amp;lt;code&amp;gt;on_init(cid)&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;run()&amp;lt;/code&amp;gt;&lt;br /&gt;
* [[SDK 6.3/Rust#FFI types|FFI types]] — topology, leaderboard, particles, enums&lt;br /&gt;
* [[SDK 6.3/Rust#Examples|Examples]] — three buildable projects in the DevKit&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
See also: [[:Category:SDK 6.3|all SDK 6.3 pages]].&lt;br /&gt;
[[Category:SDK 6.3]]&lt;/div&gt;</summary>
		<author><name>WowBot</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=Development&amp;diff=16977</id>
		<title>Development</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=Development&amp;diff=16977"/>
		<updated>2026-07-26T10:41:06Z</updated>

		<summary type="html">&lt;p&gt;WowBot: Link CubiOS Rust SDK repo (WowBot)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Developing WOWCube-specific applications&lt;br /&gt;
&lt;br /&gt;
 If you have a coding question, consider visiting '''#how-to''' in our Discord's Code Desk (https://discord.gg/kCay3Rdbst) for getting help from fellow developers and official support both.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{notice|'''Official API reference: [[SDK 6.3]].''' The current SDK 6.3 API — one page per module (PAWN now; C++ and Rust coming). '''Start here → [[SDK 6.3]].'''}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
WOWCube offers several programming paradigms.&lt;br /&gt;
{{APIBox&lt;br /&gt;
|name=WOWCube runtime API&lt;br /&gt;
|runtime=PAWN (SDK 6.3)&lt;br /&gt;
|purpose=Cube-specific drawing, topology, input, sound and storage functions.&lt;br /&gt;
|constraints=See the per-module pages under [[SDK 6.3]].&lt;br /&gt;
}}&lt;br /&gt;
 Development of specialized applications (cubelets) can be carried out:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===in PAWN. Pawn language is a derivative of “Small C”===&lt;br /&gt;
 (See [https://github.com/compuphase/pawn/blob/master/doc/Pawn_Language_Guide.pdf Pawn_Language_Guide.pdf], and [https://wiki.alliedmods.net/Pawn_Tutorial Pawn Tutorial])&lt;br /&gt;
:: [[SDK 6.3|'''SDK 6.3 PAWN API''' — current, official]]&lt;br /&gt;
:: [[API|WOWCube PAWN API (Cube-specific Pawn functions)]]&lt;br /&gt;
:: [[PawnProgrammingNotes|(New) &amp;quot;How To's&amp;quot; of Pawn Programming]]&lt;br /&gt;
&lt;br /&gt;
===C/C++/Rust using [https://webassembly.org/ WebAssembly] ( based on wasm3 )=== &lt;br /&gt;
:: [[WASM|WOWCube WASM API (Cube-specific Wasm functions)]]&lt;br /&gt;
:: [https://github.com/wowcube/CubiOS_Rust_SDK CubiOS Rust SDK on GitHub] ''(experimental)''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===also with our DevKit=== &lt;br /&gt;
&lt;br /&gt;
:: [[SDK|WOWCube DevKit Guide]]&lt;br /&gt;
&lt;br /&gt;
:WOWCube DevKit is the multi-platform software bundle that allows developers to streamline the programming workflow for WOWCube device using only Mac/PC or a laptop, before testing games/apps on a physical cube. &lt;br /&gt;
:Utilizing the VSC plugin included in the DevKit, apps can be transferred to a cube via BT 4.2 as well.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===[[Errors description|WOWCube Errors description]]===&lt;br /&gt;
===[[Application memory description|Application memory description]]===&lt;/div&gt;</summary>
		<author><name>WowBot</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=SDK_6.3/Rust&amp;diff=16975</id>
		<title>SDK 6.3/Rust</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=SDK_6.3/Rust&amp;diff=16975"/>
		<updated>2026-07-26T10:41:05Z</updated>

		<summary type="html">&lt;p&gt;WowBot: CubiOS Rust SDK is now public on GitHub (WowBot)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{notice|'''Official WOWCube SDK documentation.''' SDK 6.3, Rust API — '''EXPERIMENTAL.''' Rust support is an experimental, supported track: APIs may change between releases. The C++ (WebAssembly) API remains the primary development track.}}&lt;br /&gt;
&lt;br /&gt;
{{SDK 6.3 nav}}&lt;br /&gt;
&lt;br /&gt;
''← [[SDK 6.3]] · Rust''&lt;br /&gt;
&lt;br /&gt;
Rust cubeapps compile to WebAssembly (&amp;lt;code&amp;gt;wasm32-unknown-unknown&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;no_std&amp;lt;/code&amp;gt;) and use the same engine ABI as the [[SDK 6.3/C++/Native API|C++ native API]] — with '''1:1 feature parity''' with C++ SDK 6.3 (all graphics, topology, communication, motion, sound, leaderboard, 140+ named colors, math). One WASM module runs on all eight cube modules; each instance drives the module's three 240×240 screens.&lt;br /&gt;
&lt;br /&gt;
== The CubiOS Rust SDK ==&lt;br /&gt;
&lt;br /&gt;
The SDK is a two-crate Cargo workspace — '''[https://github.com/wowcube/CubiOS_Rust_SDK CubiOS_Rust_SDK]''' on GitHub:&lt;br /&gt;
&lt;br /&gt;
* '''&amp;lt;code&amp;gt;cubios-sys&amp;lt;/code&amp;gt; — raw layer.''' FFI bindings to the CubiOS engine ABI plus thin safe wrappers and the application event loop. Modules: &amp;lt;code&amp;gt;application&amp;lt;/code&amp;gt; (the &amp;lt;code&amp;gt;Application&amp;lt;/code&amp;gt; trait, timers, event loop), &amp;lt;code&amp;gt;comm&amp;lt;/code&amp;gt; (packets, BLE, time, saves, RNG, logging), &amp;lt;code&amp;gt;gfx&amp;lt;/code&amp;gt; (immediate-mode drawing), &amp;lt;code&amp;gt;topology&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;sound&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;motion&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;leaderboard&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;event&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;network_message&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;save_message&amp;lt;/code&amp;gt; (bit-packed serializers), &amp;lt;code&amp;gt;screen&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;math&amp;lt;/code&amp;gt; (Vec2, Color, Transform, Rect2), &amp;lt;code&amp;gt;types&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;constants&amp;lt;/code&amp;gt;.&lt;br /&gt;
* '''&amp;lt;code&amp;gt;cubios&amp;lt;/code&amp;gt; — safe / high-level layer.''' A Rust port of the C++ &amp;lt;code&amp;gt;Cubios::&amp;lt;/code&amp;gt; classes: retained per-screen rendering (&amp;lt;code&amp;gt;begin → add → end&amp;lt;/code&amp;gt;), &amp;lt;code&amp;gt;Scene&amp;lt;/code&amp;gt; registry, &amp;lt;code&amp;gt;Sprite&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;AnimatedSprite&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;SpriteAtlas&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;Background&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;Text&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;QRCode&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;OffscreenRenderTarget&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Sound&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;SoundCollection&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Scramble&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Splashscreen&amp;lt;/code&amp;gt;, and 142 named colors (&amp;lt;code&amp;gt;Colors::*&amp;lt;/code&amp;gt;). Builders are chainable; storage is &amp;lt;code&amp;gt;heapless&amp;lt;/code&amp;gt; (no allocator).&lt;br /&gt;
&lt;br /&gt;
Public API surface: '''533 functions across 27 modules'''. Everything is &amp;lt;code&amp;gt;no_std&amp;lt;/code&amp;gt;; the bundled minimal example builds to a ~3 KB &amp;lt;code&amp;gt;.wasm&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Application trait ==&lt;br /&gt;
&lt;br /&gt;
A cubeapp implements &amp;lt;code&amp;gt;Application&amp;lt;/code&amp;gt; (from &amp;lt;code&amp;gt;cubios_sys::ffi::application&amp;lt;/code&amp;gt;) and exports two entry points the runtime calls: &amp;lt;code&amp;gt;on_init(cid)&amp;lt;/code&amp;gt; (module index 0–7) and &amp;lt;code&amp;gt;run&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Callback !! When&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;on_init()&amp;lt;/code&amp;gt; || once, after construction&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;on_tick(cur_time, delta_time)&amp;lt;/code&amp;gt; || every frame (ms)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;on_render(&amp;amp;mut [Screen; 3])&amp;lt;/code&amp;gt; || module is about to draw&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;on_phys_tick(&amp;amp;[Screen; 3])&amp;lt;/code&amp;gt; || fixed-cadence physics tick&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;on_twist(&amp;amp;TopologyTwistInfo)&amp;lt;/code&amp;gt; || cube twisted&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;on_tap(count)&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;on_pat(count)&amp;lt;/code&amp;gt; || tap on a screen / opposite side&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;on_message(msg_type, data)&amp;lt;/code&amp;gt; || packet from another module&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;on_external_message(data)&amp;lt;/code&amp;gt; || BLE data from the companion app&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;on_timer(timer_id)&amp;lt;/code&amp;gt; || programmable timer fired&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;on_close()&amp;lt;/code&amp;gt; || app is closing&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Timer helpers (&amp;lt;code&amp;gt;set_timer / start_timer / stop_timer / kill_timer&amp;lt;/code&amp;gt;) come with the trait via &amp;lt;code&amp;gt;ApplicationContext&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Quick start ==&lt;br /&gt;
&lt;br /&gt;
 #![no_std]&lt;br /&gt;
 use cubios::high_level::gfx::{Background, Text};&lt;br /&gt;
 use cubios::high_level::scene::SceneObjectEnum;&lt;br /&gt;
 use cubios::high_level::screen::Screen;&lt;br /&gt;
 use cubios::sys::ffi::application::{application_init, application_run,&lt;br /&gt;
                                     AppErr, Application, ApplicationContext};&lt;br /&gt;
 use cubios::sys::ffi::screen::Screen as SysScreen;&lt;br /&gt;
 use cubios::sys::ffi::types::{TopologyOrientation, TopologyTwistInfo};&lt;br /&gt;
 &lt;br /&gt;
 struct HelloCube { ctx: ApplicationContext }&lt;br /&gt;
 &lt;br /&gt;
 impl Application for HelloCube {&lt;br /&gt;
     fn app_context_mut(&amp;amp;mut self) -&amp;gt; &amp;amp;mut ApplicationContext { &amp;amp;mut self.ctx }&lt;br /&gt;
     fn on_init(&amp;amp;mut self) -&amp;gt; Result&amp;lt;(), AppErr&amp;gt; { Ok(()) }&lt;br /&gt;
     fn on_tick(&amp;amp;mut self, _t: u32, _dt: u32) -&amp;gt; Result&amp;lt;(), AppErr&amp;gt; { Ok(()) }&lt;br /&gt;
 &lt;br /&gt;
     fn on_render(&amp;amp;mut self, screens: &amp;amp;mut [SysScreen; 3]) -&amp;gt; Result&amp;lt;(), AppErr&amp;gt; {&lt;br /&gt;
         for s in screens.iter() {&lt;br /&gt;
             let mut screen: Screen = Screen::new(s.id());&lt;br /&gt;
             screen.begin(TopologyOrientation::Menu, false);&lt;br /&gt;
             screen.add(SceneObjectEnum::Background(Background::from_rgb(0, 0, 0)));&lt;br /&gt;
             screen.add(SceneObjectEnum::Text(Text::at(&amp;quot;HELLO&amp;quot;, 120.0, 100.0).with_font_size(24)));&lt;br /&gt;
             screen.add(SceneObjectEnum::Text(Text::at(&amp;quot;WOWCUBE&amp;quot;, 120.0, 140.0).with_font_size(24)));&lt;br /&gt;
             screen.end();&lt;br /&gt;
         }&lt;br /&gt;
         Ok(())&lt;br /&gt;
     }&lt;br /&gt;
     // ... remaining callbacks return Ok(())&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 static mut APPLICATION: Option&amp;lt;HelloCube&amp;gt; = None;&lt;br /&gt;
 &lt;br /&gt;
 #[no_mangle]&lt;br /&gt;
 pub extern &amp;quot;C&amp;quot; fn on_init(cid: u32) {&lt;br /&gt;
     let mut app = HelloCube { ctx: ApplicationContext::new() };&lt;br /&gt;
     application_init(&amp;amp;mut app, cid);&lt;br /&gt;
     unsafe { *core::ptr::addr_of_mut!(APPLICATION) = Some(app) }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 #[no_mangle]&lt;br /&gt;
 pub extern &amp;quot;C&amp;quot; fn run() {&lt;br /&gt;
     let app = unsafe { (*core::ptr::addr_of_mut!(APPLICATION)).as_mut().unwrap() };&lt;br /&gt;
     application_run(app);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Build: &amp;lt;code&amp;gt;cargo build --release --target wasm32-unknown-unknown&amp;lt;/code&amp;gt; (the workspace config adds &amp;lt;code&amp;gt;--allow-undefined&amp;lt;/code&amp;gt; so engine functions become WASM imports). Package and install like a C++ cubeapp via the [https://marketplace.visualstudio.com/items?itemName=cubios-inc.WOWCubeSDK WOWCube SDK extension for VS Code].&lt;br /&gt;
&lt;br /&gt;
== Conventions ==&lt;br /&gt;
&lt;br /&gt;
Identical to the C++ SDK: colors &amp;lt;code&amp;gt;0xAARRGGBB&amp;lt;/code&amp;gt; (142 named &amp;lt;code&amp;gt;Colors::*&amp;lt;/code&amp;gt;); rotation in degrees; scale in percent (100 = 1:1); inter-module packets bit-packed via &amp;lt;code&amp;gt;NetworkMessage&amp;lt;/code&amp;gt; (≤ &amp;lt;code&amp;gt;MESSAGE_SIZE_MAX&amp;lt;/code&amp;gt; bytes); persistent state via &amp;lt;code&amp;gt;SaveMessage&amp;lt;/code&amp;gt; (≤ &amp;lt;code&amp;gt;GAME_SAVE_SIZE&amp;lt;/code&amp;gt; bytes); &amp;lt;code&amp;gt;NET_BROADCAST&amp;lt;/code&amp;gt; = 0xFF; the module index is &amp;lt;code&amp;gt;CUBE_N&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Availability ==&lt;br /&gt;
&lt;br /&gt;
* '''Experimental status:''' Rust support is supported but experimental — API may change; the C++ track is primary.&lt;br /&gt;
* The '''Development Kit''' currently ships a thin bindings crate (&amp;lt;code&amp;gt;wowcube_sdk&amp;lt;/code&amp;gt; v0.1.0) with buildable examples (''Basics 1–3'').&lt;br /&gt;
* The full two-crate '''CubiOS Rust SDK''' is public: [https://github.com/wowcube/CubiOS_Rust_SDK github.com/wowcube/CubiOS_Rust_SDK] (source-available, © Cubios Inc.) — clone and build with stable Rust + &amp;lt;code&amp;gt;wasm32-unknown-unknown&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For per-function semantics see the [[SDK 6.3/C++/Native API|C++ native reference]] — names map 1:1 (&amp;lt;code&amp;gt;gfx::draw_text&amp;lt;/code&amp;gt; → &amp;lt;code&amp;gt;GFX_drawText&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
[[Category:SDK 6.3]]&lt;br /&gt;
[[Category:Rust API]]&lt;/div&gt;</summary>
		<author><name>WowBot</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=Template:SDK_6.3_nav&amp;diff=16974</id>
		<title>Template:SDK 6.3 nav</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=Template:SDK_6.3_nav&amp;diff=16974"/>
		<updated>2026-07-26T10:33:33Z</updated>

		<summary type="html">&lt;p&gt;WowBot: Nav: mark Rust as experimental (WowBot)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;border:1px solid #c8ccd1; background:#f8f9fa; padding:6px 10px; margin:6px 0; font-size:90%;&amp;quot;&amp;gt;&lt;br /&gt;
'''[[SDK 6.3]] · PAWN API:''' [[SDK 6.3/PAWN/Core|Core]] ·&lt;br /&gt;
[[SDK 6.3/PAWN/Graphics|Graphics]] ·&lt;br /&gt;
[[SDK 6.3/PAWN/Topology|Topology]] ·&lt;br /&gt;
[[SDK 6.3/PAWN/Sound|Sound]] ·&lt;br /&gt;
[[SDK 6.3/PAWN/Motion Sensor|Motion Sensor]] ·&lt;br /&gt;
[[SDK 6.3/PAWN/Leaderboard|Leaderboard]] ·&lt;br /&gt;
[[SDK 6.3/PAWN/Splash Screen|Splash Screen]] ·&lt;br /&gt;
[[SDK 6.3/PAWN/Physics|Physics]] ·&lt;br /&gt;
[[SDK 6.3/PAWN/Network|Network]] ·&lt;br /&gt;
[[SDK 6.3/PAWN/Save|Save]] ·&lt;br /&gt;
[[SDK 6.3/PAWN/Scramble|Scramble]] ·&lt;br /&gt;
[[SDK 6.3/PAWN/Logging|Logging]]&amp;lt;br&amp;gt;'''C++:''' [[SDK 6.3/C++/Native API|Native API]] · [[SDK 6.3/C++/Application|Application]] · [[SDK 6.3/C++/GFX Engine|GFX Engine]] &amp;amp;nbsp;·&amp;amp;nbsp; '''Rust:''' [[SDK 6.3/Rust|Rust API ''(experimental)'']] &amp;amp;nbsp;·&amp;amp;nbsp; [[SDK 6.3/Changelog|Changelog]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;noinclude&amp;gt;Navigation strip for the SDK 6.3 reference. [[Category:Templates]]&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>WowBot</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=SDK_6.3&amp;diff=16973</id>
		<title>SDK 6.3</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=SDK_6.3&amp;diff=16973"/>
		<updated>2026-07-26T10:33:04Z</updated>

		<summary type="html">&lt;p&gt;WowBot: Rust section: CubiOS Rust SDK + EXPERIMENTAL (WowBot)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{notice|'''Official WOWCube SDK 6.3 documentation.''' Canonical API reference, generated from the SDK headers.}}&lt;br /&gt;
&lt;br /&gt;
The current WOWCube SDK. Applications can be written in '''PAWN''', '''C++''', or '''Rust'''.&lt;br /&gt;
&lt;br /&gt;
== PAWN API ==&lt;br /&gt;
'''Legacy:''' supported, but no longer actively developed (last PAWN additions — SDK 6.2; 6.3 only removed deprecated calls). For new projects use the [[#C++ API|C++ API]].&lt;br /&gt;
One page per module:&lt;br /&gt;
* [[SDK 6.3/PAWN/Core]] — application lifecycle, state, time, RNG, packets&lt;br /&gt;
* [[SDK 6.3/PAWN/Graphics]] — drawing, images, text, shaders (GFX)&lt;br /&gt;
* [[SDK 6.3/PAWN/Topology]] — cube geometry, facelets, twists&lt;br /&gt;
* [[SDK 6.3/PAWN/Sound]] — sound playback&lt;br /&gt;
* [[SDK 6.3/PAWN/Motion Sensor]] — accelerometer / gyroscope, taps&lt;br /&gt;
* [[SDK 6.3/PAWN/Leaderboard]] — scores and achievements&lt;br /&gt;
* [[SDK 6.3/PAWN/Splash Screen]] — splash screens&lt;br /&gt;
* [[SDK 6.3/PAWN/Physics]] — 2D physics helpers&lt;br /&gt;
* [[SDK 6.3/PAWN/Network]] — inter-module messaging&lt;br /&gt;
* [[SDK 6.3/PAWN/Save]] — persistence&lt;br /&gt;
* [[SDK 6.3/PAWN/Scramble]] — cube scramble&lt;br /&gt;
* [[SDK 6.3/PAWN/Logging]] — debug logging&lt;br /&gt;
&lt;br /&gt;
* [[SDK 6.3/Changelog|SDK changelog]] — what changed in 5.1 / 6.0 / 6.2 / 6.3&lt;br /&gt;
&lt;br /&gt;
== C++ API ==&lt;br /&gt;
C/C++ cubeapps run via WebAssembly: the same engine functions as PAWN, plus an object-oriented framework and a retained scene graph. '''This is the primary development track.'''&lt;br /&gt;
&lt;br /&gt;
'''Native engine ABI''' — [[SDK 6.3/C++/Native API]] (all 64 functions with full descriptions):&lt;br /&gt;
* [[SDK 6.3/C++/Core|Core]] — time, RNG, packets, BLE, saves, user, version, logging&lt;br /&gt;
* [[SDK 6.3/C++/Graphics|Graphics]] — drawing, images, text, shaders, QR, render targets&lt;br /&gt;
* [[SDK 6.3/C++/Topology|Topology]] — facelets, faces, twists, orientation&lt;br /&gt;
* [[SDK 6.3/C++/Sound|Sound]] — playback and caching&lt;br /&gt;
* [[SDK 6.3/C++/Motion Sensors|Motion Sensors]] — accelerometer / gyroscope per display&lt;br /&gt;
* [[SDK 6.3/C++/Leaderboard|Leaderboard]] — scores and rankings&lt;br /&gt;
* [[SDK 6.3/C++/Native API#Types and data structures|Types &amp;amp; data structures]] — structs, enums, constants&lt;br /&gt;
&lt;br /&gt;
'''Application framework''' — [[SDK 6.3/C++/Application]]:&lt;br /&gt;
* [[SDK 6.3/C++/Application#Entry point|Entry point]] · [[SDK 6.3/C++/Application#class Cubios::Application|callbacks (on_Tick, on_Render, on_Twist, …)]] · timers, networking, saves, [[SDK 6.3/C++/Application#class Cubios::AppManager|AppManager]]&lt;br /&gt;
&lt;br /&gt;
'''GFX Engine (scene graph)''' — [[SDK 6.3/C++/GFX Engine]] (56 documented methods + official-sample code):&lt;br /&gt;
* [[SDK 6.3/C++/GFX Engine#The canonical pattern|The canonical pattern]] — how real games are structured&lt;br /&gt;
* [[SDK 6.3/C++/GFX Engine#Scene|Scene]] · [[SDK 6.3/C++/GFX Engine#SceneObject|SceneObject]] · [[SDK 6.3/C++/GFX Engine#Screen|Screen]]&lt;br /&gt;
* [[SDK 6.3/C++/GFX Engine#Gfx::Sprite|Sprite]] · [[SDK 6.3/C++/GFX Engine#Gfx::AnimatedSprite|AnimatedSprite]] · [[SDK 6.3/C++/GFX Engine#Gfx::SpriteAtlas|SpriteAtlas]] · [[SDK 6.3/C++/GFX Engine#Gfx::Background|Background]] · [[SDK 6.3/C++/GFX Engine#Gfx::Text|Text]] · [[SDK 6.3/C++/GFX Engine#Gfx::QRCode|QRCode]] · [[SDK 6.3/C++/GFX Engine#Gfx::OffscreenRenderTarget|OffscreenRenderTarget]]&lt;br /&gt;
* [[SDK 6.3/C++/GFX Engine#Sound and SoundCollection|Sound / SoundCollection]] · [[SDK 6.3/C++/GFX Engine#NetworkMessage and SaveMessage|NetworkMessage / SaveMessage]] · [[SDK 6.3/C++/GFX Engine#Scramble|Scramble]] · [[SDK 6.3/C++/GFX Engine#Splashscreen|Splashscreen]] · [[SDK 6.3/C++/GFX Engine#Math|Math]]&lt;br /&gt;
&lt;br /&gt;
== Rust API ==&lt;br /&gt;
'''EXPERIMENTAL, supported track''' — APIs may change; the primary track is C++. Two-crate '''CubiOS Rust SDK''' (&amp;lt;code&amp;gt;cubios-sys&amp;lt;/code&amp;gt; raw + &amp;lt;code&amp;gt;cubios&amp;lt;/code&amp;gt; high-level), 1:1 parity with C++ 6.3, 533 public functions.&lt;br /&gt;
* [[SDK 6.3/Rust#Crate layout|Crate layout]] — modules &amp;lt;code&amp;gt;application&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;cubios&amp;lt;/code&amp;gt;&lt;br /&gt;
* [[SDK 6.3/Rust#Application trait|Application trait]] — &amp;lt;code&amp;gt;on_init / on_tick / on_render / on_timer&amp;lt;/code&amp;gt;, timers&lt;br /&gt;
* [[SDK 6.3/Rust#Entry points|Entry points]] — &amp;lt;code&amp;gt;on_init(cid)&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;run()&amp;lt;/code&amp;gt;&lt;br /&gt;
* [[SDK 6.3/Rust#FFI types|FFI types]] — topology, leaderboard, particles, enums&lt;br /&gt;
* [[SDK 6.3/Rust#Examples|Examples]] — three buildable projects in the DevKit&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
See also: [[:Category:SDK 6.3|all SDK 6.3 pages]].&lt;br /&gt;
[[Category:SDK 6.3]]&lt;/div&gt;</summary>
		<author><name>WowBot</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=SDK_6.3/Rust&amp;diff=16972</id>
		<title>SDK 6.3/Rust</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=SDK_6.3/Rust&amp;diff=16972"/>
		<updated>2026-07-26T10:33:03Z</updated>

		<summary type="html">&lt;p&gt;WowBot: Rust API rewritten for CubiOS Rust SDK; EXPERIMENTAL marked everywhere (WowBot)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{notice|'''Official WOWCube SDK documentation.''' SDK 6.3, Rust API — '''EXPERIMENTAL.''' Rust support is an experimental, supported track: APIs may change between releases. The C++ (WebAssembly) API remains the primary development track.}}&lt;br /&gt;
&lt;br /&gt;
{{SDK 6.3 nav}}&lt;br /&gt;
&lt;br /&gt;
''← [[SDK 6.3]] · Rust''&lt;br /&gt;
&lt;br /&gt;
Rust cubeapps compile to WebAssembly (&amp;lt;code&amp;gt;wasm32-unknown-unknown&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;no_std&amp;lt;/code&amp;gt;) and use the same engine ABI as the [[SDK 6.3/C++/Native API|C++ native API]] — with '''1:1 feature parity''' with C++ SDK 6.3 (all graphics, topology, communication, motion, sound, leaderboard, 140+ named colors, math). One WASM module runs on all eight cube modules; each instance drives the module's three 240×240 screens.&lt;br /&gt;
&lt;br /&gt;
== The CubiOS Rust SDK ==&lt;br /&gt;
&lt;br /&gt;
The SDK is a two-crate Cargo workspace ('''CubiOS_Rust_SDK''' on the corporate GitHub, &amp;lt;code&amp;gt;github.com/wowcube/CubiOS_Rust_SDK&amp;lt;/code&amp;gt;; currently private — publication pending):&lt;br /&gt;
&lt;br /&gt;
* '''&amp;lt;code&amp;gt;cubios-sys&amp;lt;/code&amp;gt; — raw layer.''' FFI bindings to the CubiOS engine ABI plus thin safe wrappers and the application event loop. Modules: &amp;lt;code&amp;gt;application&amp;lt;/code&amp;gt; (the &amp;lt;code&amp;gt;Application&amp;lt;/code&amp;gt; trait, timers, event loop), &amp;lt;code&amp;gt;comm&amp;lt;/code&amp;gt; (packets, BLE, time, saves, RNG, logging), &amp;lt;code&amp;gt;gfx&amp;lt;/code&amp;gt; (immediate-mode drawing), &amp;lt;code&amp;gt;topology&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;sound&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;motion&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;leaderboard&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;event&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;network_message&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;save_message&amp;lt;/code&amp;gt; (bit-packed serializers), &amp;lt;code&amp;gt;screen&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;math&amp;lt;/code&amp;gt; (Vec2, Color, Transform, Rect2), &amp;lt;code&amp;gt;types&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;constants&amp;lt;/code&amp;gt;.&lt;br /&gt;
* '''&amp;lt;code&amp;gt;cubios&amp;lt;/code&amp;gt; — safe / high-level layer.''' A Rust port of the C++ &amp;lt;code&amp;gt;Cubios::&amp;lt;/code&amp;gt; classes: retained per-screen rendering (&amp;lt;code&amp;gt;begin → add → end&amp;lt;/code&amp;gt;), &amp;lt;code&amp;gt;Scene&amp;lt;/code&amp;gt; registry, &amp;lt;code&amp;gt;Sprite&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;AnimatedSprite&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;SpriteAtlas&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;Background&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;Text&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;QRCode&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;OffscreenRenderTarget&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Sound&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;SoundCollection&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Scramble&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Splashscreen&amp;lt;/code&amp;gt;, and 142 named colors (&amp;lt;code&amp;gt;Colors::*&amp;lt;/code&amp;gt;). Builders are chainable; storage is &amp;lt;code&amp;gt;heapless&amp;lt;/code&amp;gt; (no allocator).&lt;br /&gt;
&lt;br /&gt;
Public API surface: '''533 functions across 27 modules'''. Everything is &amp;lt;code&amp;gt;no_std&amp;lt;/code&amp;gt;; the bundled minimal example builds to a ~3 KB &amp;lt;code&amp;gt;.wasm&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Application trait ==&lt;br /&gt;
&lt;br /&gt;
A cubeapp implements &amp;lt;code&amp;gt;Application&amp;lt;/code&amp;gt; (from &amp;lt;code&amp;gt;cubios_sys::ffi::application&amp;lt;/code&amp;gt;) and exports two entry points the runtime calls: &amp;lt;code&amp;gt;on_init(cid)&amp;lt;/code&amp;gt; (module index 0–7) and &amp;lt;code&amp;gt;run&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Callback !! When&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;on_init()&amp;lt;/code&amp;gt; || once, after construction&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;on_tick(cur_time, delta_time)&amp;lt;/code&amp;gt; || every frame (ms)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;on_render(&amp;amp;mut [Screen; 3])&amp;lt;/code&amp;gt; || module is about to draw&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;on_phys_tick(&amp;amp;[Screen; 3])&amp;lt;/code&amp;gt; || fixed-cadence physics tick&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;on_twist(&amp;amp;TopologyTwistInfo)&amp;lt;/code&amp;gt; || cube twisted&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;on_tap(count)&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;on_pat(count)&amp;lt;/code&amp;gt; || tap on a screen / opposite side&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;on_message(msg_type, data)&amp;lt;/code&amp;gt; || packet from another module&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;on_external_message(data)&amp;lt;/code&amp;gt; || BLE data from the companion app&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;on_timer(timer_id)&amp;lt;/code&amp;gt; || programmable timer fired&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;on_close()&amp;lt;/code&amp;gt; || app is closing&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Timer helpers (&amp;lt;code&amp;gt;set_timer / start_timer / stop_timer / kill_timer&amp;lt;/code&amp;gt;) come with the trait via &amp;lt;code&amp;gt;ApplicationContext&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Quick start ==&lt;br /&gt;
&lt;br /&gt;
 #![no_std]&lt;br /&gt;
 use cubios::high_level::gfx::{Background, Text};&lt;br /&gt;
 use cubios::high_level::scene::SceneObjectEnum;&lt;br /&gt;
 use cubios::high_level::screen::Screen;&lt;br /&gt;
 use cubios::sys::ffi::application::{application_init, application_run,&lt;br /&gt;
                                     AppErr, Application, ApplicationContext};&lt;br /&gt;
 use cubios::sys::ffi::screen::Screen as SysScreen;&lt;br /&gt;
 use cubios::sys::ffi::types::{TopologyOrientation, TopologyTwistInfo};&lt;br /&gt;
 &lt;br /&gt;
 struct HelloCube { ctx: ApplicationContext }&lt;br /&gt;
 &lt;br /&gt;
 impl Application for HelloCube {&lt;br /&gt;
     fn app_context_mut(&amp;amp;mut self) -&amp;gt; &amp;amp;mut ApplicationContext { &amp;amp;mut self.ctx }&lt;br /&gt;
     fn on_init(&amp;amp;mut self) -&amp;gt; Result&amp;lt;(), AppErr&amp;gt; { Ok(()) }&lt;br /&gt;
     fn on_tick(&amp;amp;mut self, _t: u32, _dt: u32) -&amp;gt; Result&amp;lt;(), AppErr&amp;gt; { Ok(()) }&lt;br /&gt;
 &lt;br /&gt;
     fn on_render(&amp;amp;mut self, screens: &amp;amp;mut [SysScreen; 3]) -&amp;gt; Result&amp;lt;(), AppErr&amp;gt; {&lt;br /&gt;
         for s in screens.iter() {&lt;br /&gt;
             let mut screen: Screen = Screen::new(s.id());&lt;br /&gt;
             screen.begin(TopologyOrientation::Menu, false);&lt;br /&gt;
             screen.add(SceneObjectEnum::Background(Background::from_rgb(0, 0, 0)));&lt;br /&gt;
             screen.add(SceneObjectEnum::Text(Text::at(&amp;quot;HELLO&amp;quot;, 120.0, 100.0).with_font_size(24)));&lt;br /&gt;
             screen.add(SceneObjectEnum::Text(Text::at(&amp;quot;WOWCUBE&amp;quot;, 120.0, 140.0).with_font_size(24)));&lt;br /&gt;
             screen.end();&lt;br /&gt;
         }&lt;br /&gt;
         Ok(())&lt;br /&gt;
     }&lt;br /&gt;
     // ... remaining callbacks return Ok(())&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 static mut APPLICATION: Option&amp;lt;HelloCube&amp;gt; = None;&lt;br /&gt;
 &lt;br /&gt;
 #[no_mangle]&lt;br /&gt;
 pub extern &amp;quot;C&amp;quot; fn on_init(cid: u32) {&lt;br /&gt;
     let mut app = HelloCube { ctx: ApplicationContext::new() };&lt;br /&gt;
     application_init(&amp;amp;mut app, cid);&lt;br /&gt;
     unsafe { *core::ptr::addr_of_mut!(APPLICATION) = Some(app) }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 #[no_mangle]&lt;br /&gt;
 pub extern &amp;quot;C&amp;quot; fn run() {&lt;br /&gt;
     let app = unsafe { (*core::ptr::addr_of_mut!(APPLICATION)).as_mut().unwrap() };&lt;br /&gt;
     application_run(app);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Build: &amp;lt;code&amp;gt;cargo build --release --target wasm32-unknown-unknown&amp;lt;/code&amp;gt; (the workspace config adds &amp;lt;code&amp;gt;--allow-undefined&amp;lt;/code&amp;gt; so engine functions become WASM imports). Package and install like a C++ cubeapp via the [https://marketplace.visualstudio.com/items?itemName=cubios-inc.WOWCubeSDK WOWCube SDK extension for VS Code].&lt;br /&gt;
&lt;br /&gt;
== Conventions ==&lt;br /&gt;
&lt;br /&gt;
Identical to the C++ SDK: colors &amp;lt;code&amp;gt;0xAARRGGBB&amp;lt;/code&amp;gt; (142 named &amp;lt;code&amp;gt;Colors::*&amp;lt;/code&amp;gt;); rotation in degrees; scale in percent (100 = 1:1); inter-module packets bit-packed via &amp;lt;code&amp;gt;NetworkMessage&amp;lt;/code&amp;gt; (≤ &amp;lt;code&amp;gt;MESSAGE_SIZE_MAX&amp;lt;/code&amp;gt; bytes); persistent state via &amp;lt;code&amp;gt;SaveMessage&amp;lt;/code&amp;gt; (≤ &amp;lt;code&amp;gt;GAME_SAVE_SIZE&amp;lt;/code&amp;gt; bytes); &amp;lt;code&amp;gt;NET_BROADCAST&amp;lt;/code&amp;gt; = 0xFF; the module index is &amp;lt;code&amp;gt;CUBE_N&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Availability ==&lt;br /&gt;
&lt;br /&gt;
* '''Experimental status:''' Rust support is supported but experimental — API may change; the C++ track is primary.&lt;br /&gt;
* The '''Development Kit''' currently ships a thin bindings crate (&amp;lt;code&amp;gt;wowcube_sdk&amp;lt;/code&amp;gt; v0.1.0) with buildable examples (''Basics 1–3'').&lt;br /&gt;
* The full two-crate '''CubiOS Rust SDK''' described above lives on the corporate GitHub (&amp;lt;code&amp;gt;wowcube/CubiOS_Rust_SDK&amp;lt;/code&amp;gt;) and is being prepared for publication.&lt;br /&gt;
&lt;br /&gt;
For per-function semantics see the [[SDK 6.3/C++/Native API|C++ native reference]] — names map 1:1 (&amp;lt;code&amp;gt;gfx::draw_text&amp;lt;/code&amp;gt; → &amp;lt;code&amp;gt;GFX_drawText&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
[[Category:SDK 6.3]]&lt;br /&gt;
[[Category:Rust API]]&lt;/div&gt;</summary>
		<author><name>WowBot</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=SDK_6.3/Rust&amp;diff=16971</id>
		<title>SDK 6.3/Rust</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=SDK_6.3/Rust&amp;diff=16971"/>
		<updated>2026-07-26T09:49:53Z</updated>

		<summary type="html">&lt;p&gt;WowBot: Full Rust spec: module wrappers + application layer + source availability (WowBot)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{notice|'''Official WOWCube SDK documentation.''' SDK 6.3, Rust API — '''experimental, supported track.''' Based on the &amp;lt;code&amp;gt;wowcube_sdk&amp;lt;/code&amp;gt; crate shipped with the WOWCube Development Kit; the crate sources remain authoritative.}}&lt;br /&gt;
&lt;br /&gt;
{{SDK 6.3 nav}}&lt;br /&gt;
&lt;br /&gt;
''← [[SDK 6.3]] · Rust''&lt;br /&gt;
&lt;br /&gt;
Rust cubeapps are built to WebAssembly and use the same engine ABI as the [[SDK 6.3/C++/Native API|C++ native API]]. The Development Kit ships the '''&amp;lt;code&amp;gt;wowcube_sdk&amp;lt;/code&amp;gt;''' crate (v0.1.0) together with buildable Rust example projects (''Basics 1–3'', with assets). Projects are created and built with the [https://marketplace.visualstudio.com/items?itemName=cubios-inc.WOWCubeSDK WOWCube SDK extension for VS Code].&lt;br /&gt;
&lt;br /&gt;
== Crate layout ==&lt;br /&gt;
&lt;br /&gt;
 [package]&lt;br /&gt;
 name = &amp;quot;wowcube_sdk&amp;quot;&lt;br /&gt;
 version = &amp;quot;0.1.0&amp;quot;&lt;br /&gt;
 edition = &amp;quot;2021&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 [dependencies]&lt;br /&gt;
 cty = &amp;quot;0.2.2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;wowcube_sdk::application&amp;lt;/code&amp;gt; — the &amp;lt;code&amp;gt;Application&amp;lt;/code&amp;gt; trait, &amp;lt;code&amp;gt;ApplicationContext&amp;lt;/code&amp;gt;, timers, animation helper (&amp;lt;code&amp;gt;Anim&amp;lt;/code&amp;gt;), error type &amp;lt;code&amp;gt;AppErr&amp;lt;/code&amp;gt;, and the entry helpers &amp;lt;code&amp;gt;application_init()&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;application_run()&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;wowcube_sdk::cubios&amp;lt;/code&amp;gt; — FFI bindings to the engine ABI and the typed submodules &amp;lt;code&amp;gt;comm&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;gfx&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;topology&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Application trait ==&lt;br /&gt;
&lt;br /&gt;
A cubeapp implements the &amp;lt;code&amp;gt;Application&amp;lt;/code&amp;gt; trait; all callbacks have default no-op implementations, so you override only what you need:&lt;br /&gt;
&lt;br /&gt;
 pub trait Application {&lt;br /&gt;
     fn app_context_mut(&amp;amp;mut self) -&amp;gt; &amp;amp;mut ApplicationContext;&lt;br /&gt;
&lt;br /&gt;
     fn on_init(&amp;amp;mut self)  -&amp;gt; Result&amp;lt;(), AppErr&amp;gt; { Ok(()) }&lt;br /&gt;
     fn on_tick(&amp;amp;mut self)  -&amp;gt; Result&amp;lt;(), AppErr&amp;gt; { Ok(()) }&lt;br /&gt;
     fn on_render(&amp;amp;self)    -&amp;gt; Result&amp;lt;(), AppErr&amp;gt; { Ok(()) }&lt;br /&gt;
     fn on_timer(&amp;amp;mut self, _timer_id: u8) -&amp;gt; Result&amp;lt;(), AppErr&amp;gt; { Ok(()) }&lt;br /&gt;
&lt;br /&gt;
     fn set_timer(&amp;amp;mut self, id: u8, delay: u32, suspended: bool) -&amp;gt; bool { … }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Errors are reported through the &amp;lt;code&amp;gt;AppErr&amp;lt;/code&amp;gt; enum (&amp;lt;code&amp;gt;AssetNotFound&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;InvalidModule&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;InvalidTwist&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SceneNotFound&amp;lt;/code&amp;gt;, …).&lt;br /&gt;
&lt;br /&gt;
== Entry points ==&lt;br /&gt;
&lt;br /&gt;
The module exports two &amp;lt;code&amp;gt;extern &amp;quot;C&amp;quot;&amp;lt;/code&amp;gt; functions which the runtime calls (from the shipped ''HelloWOWCube'' example):&lt;br /&gt;
&lt;br /&gt;
 #![no_main]&lt;br /&gt;
 mod cubeapp;&lt;br /&gt;
 use wowcube_sdk;&lt;br /&gt;
&lt;br /&gt;
 static mut APPLICATION: Option&amp;lt;cubeapp::HelloWOWCube&amp;gt; = None;&lt;br /&gt;
&lt;br /&gt;
 #[no_mangle]&lt;br /&gt;
 pub extern &amp;quot;C&amp;quot; fn on_init(cid: u32) {&lt;br /&gt;
     let mut application = cubeapp::HelloWOWCube::new();&lt;br /&gt;
     wowcube_sdk::application::application_init(&amp;amp;mut application, cid);&lt;br /&gt;
     unsafe { APPLICATION = Some(application); }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 #[no_mangle]&lt;br /&gt;
 pub extern &amp;quot;C&amp;quot; fn run() {&lt;br /&gt;
     let application = unsafe { APPLICATION.as_mut().unwrap() };&lt;br /&gt;
     wowcube_sdk::application::application_run(application);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;cid&amp;lt;/code&amp;gt; is the index of the module (0–7) the instance runs on — the same value as &amp;lt;code&amp;gt;cubeN&amp;lt;/code&amp;gt; in C++ and &amp;lt;code&amp;gt;SELF_ID&amp;lt;/code&amp;gt; in PAWN; it is also available as &amp;lt;code&amp;gt;cubios::CUBE_N&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== FFI types ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;wowcube_sdk::cubios&amp;lt;/code&amp;gt; mirrors the [[SDK 6.3/C++/Native API#Types and data structures|native types]] with Rust naming:&lt;br /&gt;
&lt;br /&gt;
 pub struct TopologyFaceletInfo { pub module: i32, pub screen: i32, pub connected: i32 }&lt;br /&gt;
 pub struct TopologyPlace       { pub face: i32, pub position: i32 }&lt;br /&gt;
 pub struct TopologyTwistInfo   { pub screen: i32, pub count: i32, pub direction: i32 }&lt;br /&gt;
 pub struct LbInfo              { pub board_count: i32, pub self_position: i32,&lt;br /&gt;
                                  pub self_achivement: i32, pub whole_user_list_count: i32 }&lt;br /&gt;
 pub struct GfxParticle         { ttl, vx, vy, ax, ay, explosion, velocity,&lt;br /&gt;
                                  duration, frequency, max, loop, time }&lt;br /&gt;
&lt;br /&gt;
Enumerations: &amp;lt;code&amp;gt;TopologyNeighbour&amp;lt;/code&amp;gt; (None/Left/Diagonal/Top/Right/Bottom), &amp;lt;code&amp;gt;TopologyOrientation&amp;lt;/code&amp;gt; (Menu/Gravity/Splash), &amp;lt;code&amp;gt;TopologyLocation&amp;lt;/code&amp;gt; (Up/Down/Front/Back/Left/Right), &amp;lt;code&amp;gt;TextAlign&amp;lt;/code&amp;gt; (9 values), &amp;lt;code&amp;gt;LogLevel&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;UartId&amp;lt;/code&amp;gt;; constant &amp;lt;code&amp;gt;NET_BROADCAST = 0xFF&amp;lt;/code&amp;gt;; type aliases &amp;lt;code&amp;gt;SoundId&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SpriteId&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For the semantics of the underlying engine functions (graphics, sound, topology, sensors, leaderboard) see the [[SDK 6.3/C++/Native API|native API reference]] — names and behavior match one-to-one.&lt;br /&gt;
&lt;br /&gt;
== Module wrappers (cubios) ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Safe snake_case wrappers over the engine ABI, one Rust module per subsystem. '''Semantics are identical to the C ABI''' — follow the links for full per-function descriptions.&lt;br /&gt;
&lt;br /&gt;
=== cubios::gfx ===&lt;br /&gt;
&lt;br /&gt;
Semantics: see [[SDK 6.3/C++/Graphics]].&lt;br /&gt;
&lt;br /&gt;
 pub fn get_asset_id(sprite_name: &amp;amp;str) -&amp;gt; i32   // -&amp;gt; GFX_getAssetId&lt;br /&gt;
 pub fn clear(color: u32) -&amp;gt; i32   // -&amp;gt; GFX_Clear&lt;br /&gt;
 pub fn draw_text(x: u32, y: u32, scale: u32, angle: u32, align: super::TextAlign, color: u32, text: &amp;amp;str) -&amp;gt; i32   // -&amp;gt; GFX_DrawText&lt;br /&gt;
 pub fn draw_point(x: i32, y: i32, color: u32) -&amp;gt; i32   // -&amp;gt; GFX_DrawPoint&lt;br /&gt;
 pub fn draw_circle(x: i32, y: i32, radius: u32, width: u32, color: u32) -&amp;gt; i32   // -&amp;gt; GFX_DrawCircle&lt;br /&gt;
 pub fn draw_solid_circle(x: i32, y: i32, radius: u32, color: u32) -&amp;gt; i32   // -&amp;gt; GFX_DrawSolidCircle&lt;br /&gt;
 pub fn draw_arc(x: i32, y: i32, radius: u32, width: u32, angle0: u32, angle1: u32, color: u32) -&amp;gt; i32   // -&amp;gt; GFX_DrawArc&lt;br /&gt;
 pub fn draw_sector(x: i32, y: i32, radius: u32, angle0: u32, angle1: u32, color: u32) -&amp;gt; i32   // -&amp;gt; GFX_DrawSector&lt;br /&gt;
 pub fn draw_line(x0: i32, y0: i32, x1: i32, y1: i32, thickness: u32, color: u32) -&amp;gt; i32   // -&amp;gt; GFX_DrawLine&lt;br /&gt;
 pub fn draw_rectangle(x: i32, y: i32, w: i32, h: i32, color: u32) -&amp;gt; i32   // -&amp;gt; GFX_DrawRectangle&lt;br /&gt;
 pub fn bake_image(id: super::SpriteId, width: u32 , height: u32, replace: u32, overwrite: u32) -&amp;gt; i32   // -&amp;gt; GFX_BakeImage&lt;br /&gt;
 pub fn set_render_target(display: u8) -&amp;gt; i32   // -&amp;gt; GFX_SetRenderTarget&lt;br /&gt;
 pub fn draw_image(id: super::SpriteId, x: i32, y: i32, color: u32, alpha: u32, scale_x: u32, scale_y: u32, angle: u32, mirror: u32) -&amp;gt; i32   // -&amp;gt; GFX_DrawImage&lt;br /&gt;
 pub fn draw_baked_image(x: i32, y: i32, color: u32, alpha: u32, scale_x: u32, scale_y: u32, angle: u32, mirror: u32, id: super::SpriteId) -&amp;gt; i32   // -&amp;gt; GFX_DrawBakedImage&lt;br /&gt;
 pub fn render() -&amp;gt; i32   // -&amp;gt; GFX_Render&lt;br /&gt;
 pub fn clear_cache() -&amp;gt; i32   // -&amp;gt; GFX_ClearCache&lt;br /&gt;
 pub fn cache_images(sprite_ids: &amp;amp;[super::SpriteId]) -&amp;gt; i32   // -&amp;gt; GFX_CacheImages&lt;br /&gt;
&lt;br /&gt;
=== cubios::topology ===&lt;br /&gt;
&lt;br /&gt;
Semantics: see [[SDK 6.3/C++/Topology]].&lt;br /&gt;
&lt;br /&gt;
 pub fn get_cuben() -&amp;gt; u32 // Rust-only helper&lt;br /&gt;
 pub fn get_adjacent_facelet(module: u32, screen: u32, direction: super::TopologyNeighbour, result: *mut super::TopologyFaceletInfo) -&amp;gt; i32   // -&amp;gt; TOPOLOGY_GetAdjacentFacelet&lt;br /&gt;
 pub fn get_reversed_face(face: u32) -&amp;gt; Option&amp;lt;u32&amp;gt; // Rust-only helper&lt;br /&gt;
 pub fn get_facelet(face: u32, position: u32, mode: super::TopologyOrientation, result: *mut super::TopologyFaceletInfo) -&amp;gt; i32   // -&amp;gt; TOPOLOGY_GetFacelet&lt;br /&gt;
 pub fn get_place(module: u32, screen: u32, mode: super::TopologyOrientation, result: *mut super::TopologyPlace) -&amp;gt; i32   // -&amp;gt; TOPOLOGY_GetPlace&lt;br /&gt;
 pub fn get_opposite_facelet(module: u32, screen: u32, result: *mut super::TopologyFaceletInfo) -&amp;gt; i32   // -&amp;gt; TOPOLOGY_GetOppositeFacelet&lt;br /&gt;
 pub fn get_angle(module: u32, screen: u32, mode: super::TopologyOrientation) -&amp;gt; i32   // -&amp;gt; TOPOLOGY_GetAngle&lt;br /&gt;
 pub fn get_facelet_orientation(module: u32, screen: u32) -&amp;gt; i32   // -&amp;gt; TOPOLOGY_GetFaceletOrientation&lt;br /&gt;
 pub fn get_place_orientation(face: u32, position: u32) -&amp;gt; i32   // -&amp;gt; TOPOLOGY_GetPlaceOrientation&lt;br /&gt;
 pub fn get_face(orientation: u32) -&amp;gt; i32   // -&amp;gt; TOPOLOGY_GetFace&lt;br /&gt;
 pub fn is_assembled() -&amp;gt; i32   // -&amp;gt; TOPOLOGY_IsAssembled&lt;br /&gt;
 pub fn get_twist(twist: *mut super::TopologyTwistInfo) -&amp;gt; i32   // -&amp;gt; TOPOLOGY_GetTwist&lt;br /&gt;
 pub fn debug_get_face(module: u32, screen: u32) -&amp;gt; i32 // Rust-only helper&lt;br /&gt;
 pub fn debug_get_position(module: u32, screen: u32) -&amp;gt; i32 // Rust-only helper&lt;br /&gt;
&lt;br /&gt;
=== cubios::comm ===&lt;br /&gt;
&lt;br /&gt;
Semantics: see [[SDK 6.3/C++/Core]].&lt;br /&gt;
&lt;br /&gt;
 pub fn send_message(line: u32, pkt: *const u8, size: u32) -&amp;gt; i32   // -&amp;gt; sendPacket&lt;br /&gt;
 pub fn recv_message(line: u32, size: u32, pkt_info: *mut u32, pkt: *mut u8, rx_size: *mut u32) -&amp;gt; i32   // -&amp;gt; recvPacket&lt;br /&gt;
 pub fn get_time() -&amp;gt; i32   // -&amp;gt; getTime&lt;br /&gt;
 pub fn get_user_name(buffer: &amp;amp;mut [u8]) -&amp;gt; i32   // -&amp;gt; getUserName&lt;br /&gt;
 pub fn toggle_debug_info() -&amp;gt; i32   // -&amp;gt; toggleDebugInfo&lt;br /&gt;
 pub fn save_state(data: &amp;amp;[u8]) -&amp;gt; i32   // -&amp;gt; saveState&lt;br /&gt;
 pub fn load_state(data: &amp;amp;mut [u8]) -&amp;gt; i32   // -&amp;gt; loadState&lt;br /&gt;
 pub fn random(min: u32, max: u32) -&amp;gt; i32   // -&amp;gt; random&lt;br /&gt;
 pub fn log_a(text: &amp;amp;str) -&amp;gt; i32   // -&amp;gt; log_a&lt;br /&gt;
 pub fn log_e(text: &amp;amp;str) -&amp;gt; i32   // -&amp;gt; log_e&lt;br /&gt;
 pub fn log_w(text: &amp;amp;str) -&amp;gt; i32   // -&amp;gt; log_w&lt;br /&gt;
 pub fn log_i(text: &amp;amp;str) -&amp;gt; i32   // -&amp;gt; log_i&lt;br /&gt;
 pub fn log_d(text: &amp;amp;str) -&amp;gt; i32   // -&amp;gt; log_d&lt;br /&gt;
 pub fn log_v(text: &amp;amp;str) -&amp;gt; i32   // -&amp;gt; log_v&lt;br /&gt;
 pub fn get_tap() -&amp;gt; i32   // -&amp;gt; getTap&lt;br /&gt;
&lt;br /&gt;
=== cubios::snd ===&lt;br /&gt;
&lt;br /&gt;
Semantics: see [[SDK 6.3/C++/Sound]].&lt;br /&gt;
&lt;br /&gt;
 pub fn get_asset_id(sound_name: &amp;amp;str) -&amp;gt; i32   // -&amp;gt; SND_getAssetId&lt;br /&gt;
 pub fn play(sound_id: super::SoundId, volume: u32) -&amp;gt; i32   // -&amp;gt; SND_Play&lt;br /&gt;
 pub fn cache_sounds(sound_ids: &amp;amp;[super::SoundId]) -&amp;gt; i32   // -&amp;gt; SND_CacheSounds&lt;br /&gt;
&lt;br /&gt;
=== cubios::ms ===&lt;br /&gt;
&lt;br /&gt;
Semantics: see [[SDK 6.3/C++/Motion Sensors]].&lt;br /&gt;
&lt;br /&gt;
 pub fn get_face_accel_x(display: u32) -&amp;gt; i32   // -&amp;gt; MS_GetFaceAccelX&lt;br /&gt;
 pub fn get_face_accel_y(display: u32) -&amp;gt; i32   // -&amp;gt; MS_GetFaceAccelY&lt;br /&gt;
 pub fn get_face_accel_z(display: u32) -&amp;gt; i32   // -&amp;gt; MS_GetFaceAccelZ&lt;br /&gt;
 pub fn get_face_gyro_x(display: u32) -&amp;gt; i32   // -&amp;gt; MS_GetFaceGyroX&lt;br /&gt;
 pub fn get_face_gyro_y(display: u32) -&amp;gt; i32   // -&amp;gt; MS_GetFaceGyroY&lt;br /&gt;
 pub fn get_face_gyro_z(display: u32) -&amp;gt; i32   // -&amp;gt; MS_GetFaceGyroZ&lt;br /&gt;
&lt;br /&gt;
=== cubios::lb ===&lt;br /&gt;
&lt;br /&gt;
Semantics: see [[SDK 6.3/C++/Leaderboard]].&lt;br /&gt;
&lt;br /&gt;
 pub fn get_info(info: *mut super::LbInfo) -&amp;gt; i32   // -&amp;gt; LB_GetInfo&lt;br /&gt;
 pub fn get_score(lead_table_bin: &amp;amp;mut [u8]) -&amp;gt; i32   // -&amp;gt; LB_GetScore&lt;br /&gt;
&lt;br /&gt;
=== cubios::event ===&lt;br /&gt;
&lt;br /&gt;
Semantics: see [[SDK 6.3/C++/Core]].&lt;br /&gt;
&lt;br /&gt;
 pub fn get_list() -&amp;gt; cty::int32_t   // -&amp;gt; EVENT_getList&lt;br /&gt;
&lt;br /&gt;
''Rust-only helpers'' (&amp;lt;code&amp;gt;get_cuben&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;get_reversed_face&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;debug_get_face&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;debug_get_position&amp;lt;/code&amp;gt;) have no direct C counterpart.&lt;br /&gt;
&lt;br /&gt;
== Application layer (application) ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Beyond the plain &amp;lt;code&amp;gt;Application&amp;lt;/code&amp;gt; trait, the crate ships a small game framework:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;trait Assetable&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;trait Mappable&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;trait Packable&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;trait Broadcastable&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;trait Shuffable&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: Composable capabilities: asset lookup, facelet mapping, bit-packing game state into packets, broadcasting it between modules, and shuffling.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;struct MapBase&amp;amp;lt;T: Packable&amp;amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: Base container for a distributed game map synchronized across modules.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;struct SceneSwitch&amp;lt;/code&amp;gt; — &amp;lt;code&amp;gt;new(scenes, start_time)&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;next_scene()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;set_scene(id)&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;animate()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: Scene/screen switching with animation.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;struct TimerController&amp;lt;/code&amp;gt; — &amp;lt;code&amp;gt;set_timer(id, delay, suspended)&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;delta_time()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: Programmable timers driving &amp;lt;code&amp;gt;on_timer&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;struct ApplicationContext&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: Holds the timer controller and per-app state; returned by &amp;lt;code&amp;gt;app_context_mut()&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;struct Anim&amp;amp;lt;T&amp;amp;gt;&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;enum RotationDir&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;enum AppPkt&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;enum AppErr&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: Animation value helper, rotation directions, standard packet kinds, error type.&lt;br /&gt;
&lt;br /&gt;
== Source availability ==&lt;br /&gt;
&lt;br /&gt;
The crate ships '''inside the WOWCube Development Kit''' (&amp;lt;code&amp;gt;sdk/…/rust/&amp;lt;/code&amp;gt;); there is currently no official standalone GitHub repository for it. (A third-party ''wowcube-sdk-unofficial'' exists on GitHub but is not maintained by Cubios.)&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
The Development Kit ships three buildable Rust projects under &amp;lt;code&amp;gt;examples/…/rust/Basics&amp;lt;/code&amp;gt;, each with a &amp;lt;code&amp;gt;project/src/main.rs&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;cubeapp.rs&amp;lt;/code&amp;gt;, an &amp;lt;code&amp;gt;assets/&amp;lt;/code&amp;gt; folder and a &amp;lt;code&amp;gt;wowcubeapp-build.json&amp;lt;/code&amp;gt; build manifest.&lt;br /&gt;
&lt;br /&gt;
[[Category:SDK 6.3]]&lt;br /&gt;
[[Category:Rust API]]&lt;/div&gt;</summary>
		<author><name>WowBot</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=SDK_6.3&amp;diff=16970</id>
		<title>SDK 6.3</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=SDK_6.3&amp;diff=16970"/>
		<updated>2026-07-26T09:48:08Z</updated>

		<summary type="html">&lt;p&gt;WowBot: C++ module links -&amp;gt; direct pages (WowBot)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{notice|'''Official WOWCube SDK 6.3 documentation.''' Canonical API reference, generated from the SDK headers.}}&lt;br /&gt;
&lt;br /&gt;
The current WOWCube SDK. Applications can be written in '''PAWN''', '''C++''', or '''Rust'''.&lt;br /&gt;
&lt;br /&gt;
== PAWN API ==&lt;br /&gt;
'''Legacy:''' supported, but no longer actively developed (last PAWN additions — SDK 6.2; 6.3 only removed deprecated calls). For new projects use the [[#C++ API|C++ API]].&lt;br /&gt;
One page per module:&lt;br /&gt;
* [[SDK 6.3/PAWN/Core]] — application lifecycle, state, time, RNG, packets&lt;br /&gt;
* [[SDK 6.3/PAWN/Graphics]] — drawing, images, text, shaders (GFX)&lt;br /&gt;
* [[SDK 6.3/PAWN/Topology]] — cube geometry, facelets, twists&lt;br /&gt;
* [[SDK 6.3/PAWN/Sound]] — sound playback&lt;br /&gt;
* [[SDK 6.3/PAWN/Motion Sensor]] — accelerometer / gyroscope, taps&lt;br /&gt;
* [[SDK 6.3/PAWN/Leaderboard]] — scores and achievements&lt;br /&gt;
* [[SDK 6.3/PAWN/Splash Screen]] — splash screens&lt;br /&gt;
* [[SDK 6.3/PAWN/Physics]] — 2D physics helpers&lt;br /&gt;
* [[SDK 6.3/PAWN/Network]] — inter-module messaging&lt;br /&gt;
* [[SDK 6.3/PAWN/Save]] — persistence&lt;br /&gt;
* [[SDK 6.3/PAWN/Scramble]] — cube scramble&lt;br /&gt;
* [[SDK 6.3/PAWN/Logging]] — debug logging&lt;br /&gt;
&lt;br /&gt;
* [[SDK 6.3/Changelog|SDK changelog]] — what changed in 5.1 / 6.0 / 6.2 / 6.3&lt;br /&gt;
&lt;br /&gt;
== C++ API ==&lt;br /&gt;
C/C++ cubeapps run via WebAssembly: the same engine functions as PAWN, plus an object-oriented framework and a retained scene graph. '''This is the primary development track.'''&lt;br /&gt;
&lt;br /&gt;
'''Native engine ABI''' — [[SDK 6.3/C++/Native API]] (all 64 functions with full descriptions):&lt;br /&gt;
* [[SDK 6.3/C++/Core|Core]] — time, RNG, packets, BLE, saves, user, version, logging&lt;br /&gt;
* [[SDK 6.3/C++/Graphics|Graphics]] — drawing, images, text, shaders, QR, render targets&lt;br /&gt;
* [[SDK 6.3/C++/Topology|Topology]] — facelets, faces, twists, orientation&lt;br /&gt;
* [[SDK 6.3/C++/Sound|Sound]] — playback and caching&lt;br /&gt;
* [[SDK 6.3/C++/Motion Sensors|Motion Sensors]] — accelerometer / gyroscope per display&lt;br /&gt;
* [[SDK 6.3/C++/Leaderboard|Leaderboard]] — scores and rankings&lt;br /&gt;
* [[SDK 6.3/C++/Native API#Types and data structures|Types &amp;amp; data structures]] — structs, enums, constants&lt;br /&gt;
&lt;br /&gt;
'''Application framework''' — [[SDK 6.3/C++/Application]]:&lt;br /&gt;
* [[SDK 6.3/C++/Application#Entry point|Entry point]] · [[SDK 6.3/C++/Application#class Cubios::Application|callbacks (on_Tick, on_Render, on_Twist, …)]] · timers, networking, saves, [[SDK 6.3/C++/Application#class Cubios::AppManager|AppManager]]&lt;br /&gt;
&lt;br /&gt;
'''GFX Engine (scene graph)''' — [[SDK 6.3/C++/GFX Engine]] (56 documented methods + official-sample code):&lt;br /&gt;
* [[SDK 6.3/C++/GFX Engine#The canonical pattern|The canonical pattern]] — how real games are structured&lt;br /&gt;
* [[SDK 6.3/C++/GFX Engine#Scene|Scene]] · [[SDK 6.3/C++/GFX Engine#SceneObject|SceneObject]] · [[SDK 6.3/C++/GFX Engine#Screen|Screen]]&lt;br /&gt;
* [[SDK 6.3/C++/GFX Engine#Gfx::Sprite|Sprite]] · [[SDK 6.3/C++/GFX Engine#Gfx::AnimatedSprite|AnimatedSprite]] · [[SDK 6.3/C++/GFX Engine#Gfx::SpriteAtlas|SpriteAtlas]] · [[SDK 6.3/C++/GFX Engine#Gfx::Background|Background]] · [[SDK 6.3/C++/GFX Engine#Gfx::Text|Text]] · [[SDK 6.3/C++/GFX Engine#Gfx::QRCode|QRCode]] · [[SDK 6.3/C++/GFX Engine#Gfx::OffscreenRenderTarget|OffscreenRenderTarget]]&lt;br /&gt;
* [[SDK 6.3/C++/GFX Engine#Sound and SoundCollection|Sound / SoundCollection]] · [[SDK 6.3/C++/GFX Engine#NetworkMessage and SaveMessage|NetworkMessage / SaveMessage]] · [[SDK 6.3/C++/GFX Engine#Scramble|Scramble]] · [[SDK 6.3/C++/GFX Engine#Splashscreen|Splashscreen]] · [[SDK 6.3/C++/GFX Engine#Math|Math]]&lt;br /&gt;
&lt;br /&gt;
== Rust API ==&lt;br /&gt;
'''Experimental / advanced track''' (crate &amp;lt;code&amp;gt;wowcube_sdk&amp;lt;/code&amp;gt; v0.1.0): actively shipped with SDK 6.3, builds to the same WebAssembly ABI as C++.&lt;br /&gt;
* [[SDK 6.3/Rust#Crate layout|Crate layout]] — modules &amp;lt;code&amp;gt;application&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;cubios&amp;lt;/code&amp;gt;&lt;br /&gt;
* [[SDK 6.3/Rust#Application trait|Application trait]] — &amp;lt;code&amp;gt;on_init / on_tick / on_render / on_timer&amp;lt;/code&amp;gt;, timers&lt;br /&gt;
* [[SDK 6.3/Rust#Entry points|Entry points]] — &amp;lt;code&amp;gt;on_init(cid)&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;run()&amp;lt;/code&amp;gt;&lt;br /&gt;
* [[SDK 6.3/Rust#FFI types|FFI types]] — topology, leaderboard, particles, enums&lt;br /&gt;
* [[SDK 6.3/Rust#Examples|Examples]] — three buildable projects in the DevKit&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
See also: [[:Category:SDK 6.3|all SDK 6.3 pages]].&lt;br /&gt;
[[Category:SDK 6.3]]&lt;/div&gt;</summary>
		<author><name>WowBot</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=SDK_6.3/C%2B%2B/Sound&amp;diff=16968</id>
		<title>SDK 6.3/C++/Sound</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=SDK_6.3/C%2B%2B/Sound&amp;diff=16968"/>
		<updated>2026-07-26T09:47:46Z</updated>

		<summary type="html">&lt;p&gt;WowBot: Split C++ Native API into per-module pages with minimal examples (WowBot)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{notice|'''Official WOWCube SDK documentation.''' SDK 6.3, C++ (WebAssembly) API. Signatures are extracted from the canonical SDK headers shipped with the WOWCube Development Kit; the headers remain authoritative.}}&lt;br /&gt;
&lt;br /&gt;
{{SDK 6.3 nav}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''← [[SDK 6.3]] · [[SDK 6.3/C++/Native API|C++ Native API]] / Sound''&lt;br /&gt;
&lt;br /&gt;
Sound asset playback and caching.&lt;br /&gt;
&lt;br /&gt;
Shared types, enums and constants are listed on the [[SDK 6.3/C++/Native API#Types and data structures|Native API overview]].&lt;br /&gt;
&lt;br /&gt;
== Minimal example ==&lt;br /&gt;
&lt;br /&gt;
Play a packed sound asset:&lt;br /&gt;
&lt;br /&gt;
 soundID_t sfx = SND_getAssetId(&amp;quot;hit.wav&amp;quot;);&lt;br /&gt;
 SND_play(sfx, 100);&lt;br /&gt;
&lt;br /&gt;
== Functions ==&lt;br /&gt;
&lt;br /&gt;
===SND_getAssetId===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t SND_getAssetId(const char* soundName)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get a sound ID by the filename.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: The ID of sound with a given filename or -1 in case of error.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - renamed from SND_getId() to SND_getAssetId()&lt;br /&gt;
: v6.0 - truncate asset name in WASM API&lt;br /&gt;
&lt;br /&gt;
===SND_play===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t SND_play(soundID_t soundID, u32_t volume)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Play sound by ID.&lt;br /&gt;
: Play any sound by its ID. Platform does not support audio mixing, so&lt;br /&gt;
: previously playing sound will be stopped if it has not yet finished.&lt;br /&gt;
: Supported audio formats:&lt;br /&gt;
:* WAV&lt;br /&gt;
:* MP3&lt;br /&gt;
:* MIDI&lt;br /&gt;
&lt;br /&gt;
===SND_cacheSounds===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t SND_cacheSounds(soundID_t* soundIDs, u32_t count)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Force platform to cache application sounds.&lt;br /&gt;
: Platform automatically reads and caches sounds from flash when the&lt;br /&gt;
: application plays a sound. Flash operations are synchronous and may cause&lt;br /&gt;
: delays especially when reading large portions of data. To prevent the&lt;br /&gt;
: application from lags it is possible to cache sound data in advance.&lt;br /&gt;
: However if application requests to play a non-cached sound and there is not&lt;br /&gt;
: enough memory then oldest accessed sounds will be removed from cache. Also&lt;br /&gt;
: there is a limit of 256 for a total number of cached sounds.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Number of cached sounds or negative value if an error happened. Error&lt;br /&gt;
: codes:&lt;br /&gt;
: * -1 invalid function arguments count&lt;br /&gt;
: * -2 invalid soundList array&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - moved from appCtrl module to sound&lt;br /&gt;
&lt;br /&gt;
===SND_isPlaying===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t SND_isPlaying()&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Check if audio is playing.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: True if audio is playing, false otherwise.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.0 - added&lt;br /&gt;
&lt;br /&gt;
===SND_stop===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t SND_stop()&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Stop playing sound if any.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.0 - added&lt;br /&gt;
&lt;br /&gt;
===SND_getAssetsCount===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t SND_getAssetsCount()&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get the total count of sound assets.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Number of sound assets.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.0 - added&lt;br /&gt;
&lt;br /&gt;
[[Category:SDK 6.3]]&lt;br /&gt;
[[Category:C++ API]]&lt;/div&gt;</summary>
		<author><name>WowBot</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=SDK_6.3/C%2B%2B/Native_API&amp;diff=16969</id>
		<title>SDK 6.3/C++/Native API</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=SDK_6.3/C%2B%2B/Native_API&amp;diff=16969"/>
		<updated>2026-07-26T09:47:46Z</updated>

		<summary type="html">&lt;p&gt;WowBot: Split C++ Native API into per-module pages with minimal examples (WowBot)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{notice|'''Official WOWCube SDK documentation.''' SDK 6.3, C++ (WebAssembly) API. Signatures are extracted from the canonical SDK headers shipped with the WOWCube Development Kit; the headers remain authoritative.}}&lt;br /&gt;
&lt;br /&gt;
{{SDK 6.3 nav}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''← [[SDK 6.3]] · C++ / Native API''&lt;br /&gt;
&lt;br /&gt;
The low-level C ABI available to C/C++ (and Rust) cubeapps, declared in &amp;lt;code&amp;gt;native.h&amp;lt;/code&amp;gt;. These are the same engine functions as the [[SDK 6.3/PAWN/Core|PAWN API]] — descriptions of shared functions below are taken from the official SDK reference. On top of this layer the SDK provides the object-oriented [[SDK 6.3/C++/Application|Application framework]] and the [[SDK 6.3/C++/GFX Engine|GFX Engine]].&lt;br /&gt;
&lt;br /&gt;
== Types and data structures ==&lt;br /&gt;
&lt;br /&gt;
Defined in &amp;lt;code&amp;gt;native.h&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;native_defines.h&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 typedef uint32_t u32_t;   typedef int32_t i32_t;&lt;br /&gt;
 typedef int32_t soundID_t; typedef int32_t spriteID_t;&lt;br /&gt;
 union AppVersion_t { uint32_t full; struct { uint16_t patch:16; uint8_t minor:4; uint8_t major:4; uint8_t reserved:8; }; };&lt;br /&gt;
 struct TOPOLOGY_faceletInfo_t { int32_t module; int32_t screen; int32_t connected; };&lt;br /&gt;
 struct TOPOLOGY_place_t      { int32_t face; int32_t position; };&lt;br /&gt;
 struct TOPOLOGY_twistInfo_t  { int32_t screen; int32_t count; int32_t direction; };&lt;br /&gt;
 struct LB_info_t   { int32_t boardCount; int32_t selfPosition; int32_t selfScore; int32_t wholeUserListCount; };&lt;br /&gt;
 struct GFX_Particle_t { ttl, vx, vy, ax, ay, explosion, velocity, duration, frequency, max, loop, time };&lt;br /&gt;
&lt;br /&gt;
Enumerations: &amp;lt;code&amp;gt;TOPOLOGY_twist_t&amp;lt;/code&amp;gt; (LEFT/RIGHT/DOUBLE), &amp;lt;code&amp;gt;TOPOLOGY_orientation_mode_t&amp;lt;/code&amp;gt; (MENU/GRAVITY/SPLASH), &amp;lt;code&amp;gt;TOPOLOGY_orientation_t&amp;lt;/code&amp;gt; (UP/DOWN/FRONT/BACK/LEFT/RIGHT), &amp;lt;code&amp;gt;TOPOLOGY_neighbor_t&amp;lt;/code&amp;gt; (SELF/LEFT/DIAGONAL/TOP/RIGHT/BOTTOM), &amp;lt;code&amp;gt;text_align_t&amp;lt;/code&amp;gt; (9 values), &amp;lt;code&amp;gt;GFX_mirror_t&amp;lt;/code&amp;gt; (BLANK/X/Y/XY), &amp;lt;code&amp;gt;GFX_PixelFormat_t&amp;lt;/code&amp;gt; (RGB565/ARGB6666/ARGB8888), &amp;lt;code&amp;gt;eventMask_t&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LogLevel_t&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uartID_t&amp;lt;/code&amp;gt;. Constant: &amp;lt;code&amp;gt;NET_BROADCAST = 0xFF&amp;lt;/code&amp;gt;; global &amp;lt;code&amp;gt;cubeN&amp;lt;/code&amp;gt; — the index of the module the code is running on.&lt;br /&gt;
&lt;br /&gt;
== Modules ==&lt;br /&gt;
&lt;br /&gt;
* [[SDK 6.3/C++/Core|Core]] — 14 functions. Application-level services: time, RNG, inter-module packets, BLE data, persistent state, user info, versioning and logging.&lt;br /&gt;
&lt;br /&gt;
* [[SDK 6.3/C++/Topology|Topology]] — 10 functions. Cube geometry: facelets, faces, places, orientation and twist events.&lt;br /&gt;
&lt;br /&gt;
* [[SDK 6.3/C++/Leaderboard|Leaderboard]] — 2 functions. Scores and rankings synced via the companion app.&lt;br /&gt;
&lt;br /&gt;
* [[SDK 6.3/C++/Motion Sensors|Motion Sensors]] — 6 functions. Per-display accelerometer and gyroscope readings.&lt;br /&gt;
&lt;br /&gt;
* [[SDK 6.3/C++/Graphics|Graphics]] — 26 functions. Immediate-mode drawing on the module's displays: primitives, images, text, shaders, QR codes and render targets. (The retained alternative is the [[SDK 6.3/C++/GFX Engine|GFX Engine]].)&lt;br /&gt;
&lt;br /&gt;
* [[SDK 6.3/C++/Sound|Sound]] — 6 functions. Sound asset playback and caching.&lt;br /&gt;
&lt;br /&gt;
[[Category:SDK 6.3]]&lt;br /&gt;
[[Category:C++ API]]&lt;/div&gt;</summary>
		<author><name>WowBot</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=SDK_6.3/C%2B%2B/Motion_Sensors&amp;diff=16966</id>
		<title>SDK 6.3/C++/Motion Sensors</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=SDK_6.3/C%2B%2B/Motion_Sensors&amp;diff=16966"/>
		<updated>2026-07-26T09:47:45Z</updated>

		<summary type="html">&lt;p&gt;WowBot: Split C++ Native API into per-module pages with minimal examples (WowBot)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{notice|'''Official WOWCube SDK documentation.''' SDK 6.3, C++ (WebAssembly) API. Signatures are extracted from the canonical SDK headers shipped with the WOWCube Development Kit; the headers remain authoritative.}}&lt;br /&gt;
&lt;br /&gt;
{{SDK 6.3 nav}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''← [[SDK 6.3]] · [[SDK 6.3/C++/Native API|C++ Native API]] / Motion Sensors''&lt;br /&gt;
&lt;br /&gt;
Per-display accelerometer and gyroscope readings.&lt;br /&gt;
&lt;br /&gt;
Shared types, enums and constants are listed on the [[SDK 6.3/C++/Native API#Types and data structures|Native API overview]].&lt;br /&gt;
&lt;br /&gt;
== Minimal example ==&lt;br /&gt;
&lt;br /&gt;
Reading tilt for the screen currently being rendered:&lt;br /&gt;
&lt;br /&gt;
 i32_t ax = MS_getFaceAccelX(screen.ID());&lt;br /&gt;
 i32_t ay = MS_getFaceAccelY(screen.ID());&lt;br /&gt;
 // move the ball by the tilt of this display&lt;br /&gt;
 pos.X += ax / 64.0f;  pos.Y += ay / 64.0f;&lt;br /&gt;
&lt;br /&gt;
== Functions ==&lt;br /&gt;
&lt;br /&gt;
===MS_getFaceAccelX===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t MS_getFaceAccelX(u32_t display)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get accelerometer value along X axis of some display.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Accelerometer value along X axis.&lt;br /&gt;
&lt;br /&gt;
===MS_getFaceAccelY===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t MS_getFaceAccelY(u32_t display)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get accelerometer value along Y axis of some display.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Accelerometer value along Y axis.&lt;br /&gt;
&lt;br /&gt;
===MS_getFaceAccelZ===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t MS_getFaceAccelZ(u32_t display)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get accelerometer value along Z axis of some display.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Accelerometer value along Z axis.&lt;br /&gt;
&lt;br /&gt;
===MS_getFaceGyroX===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t MS_getFaceGyroX(u32_t display)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get gyroscope value around X axis of some display.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Gyroscope value around X axis.&lt;br /&gt;
&lt;br /&gt;
===MS_getFaceGyroY===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t MS_getFaceGyroY(u32_t display)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get gyroscope value around Y axis of some display.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Gyroscope value around Y axis.&lt;br /&gt;
&lt;br /&gt;
===MS_getFaceGyroZ===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t MS_getFaceGyroZ(u32_t display)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get gyroscope value around Z axis of some display.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Gyroscope value around Z axis.&lt;br /&gt;
&lt;br /&gt;
[[Category:SDK 6.3]]&lt;br /&gt;
[[Category:C++ API]]&lt;/div&gt;</summary>
		<author><name>WowBot</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=SDK_6.3/C%2B%2B/Graphics&amp;diff=16967</id>
		<title>SDK 6.3/C++/Graphics</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=SDK_6.3/C%2B%2B/Graphics&amp;diff=16967"/>
		<updated>2026-07-26T09:47:45Z</updated>

		<summary type="html">&lt;p&gt;WowBot: Split C++ Native API into per-module pages with minimal examples (WowBot)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{notice|'''Official WOWCube SDK documentation.''' SDK 6.3, C++ (WebAssembly) API. Signatures are extracted from the canonical SDK headers shipped with the WOWCube Development Kit; the headers remain authoritative.}}&lt;br /&gt;
&lt;br /&gt;
{{SDK 6.3 nav}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''← [[SDK 6.3]] · [[SDK 6.3/C++/Native API|C++ Native API]] / Graphics''&lt;br /&gt;
&lt;br /&gt;
Immediate-mode drawing on the module's displays: primitives, images, text, shaders, QR codes and render targets. (The retained alternative is the [[SDK 6.3/C++/GFX Engine|GFX Engine]].)&lt;br /&gt;
&lt;br /&gt;
Shared types, enums and constants are listed on the [[SDK 6.3/C++/Native API#Types and data structures|Native API overview]].&lt;br /&gt;
&lt;br /&gt;
== Minimal example ==&lt;br /&gt;
&lt;br /&gt;
From the official ''HelloWOWCube'' project — direct drawing in &amp;lt;code&amp;gt;on_Render&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 for(auto it = screens.begin(); it != screens.end(); ++it)&lt;br /&gt;
 {&lt;br /&gt;
     GFX_setRenderTarget(it-&amp;gt;ID());&lt;br /&gt;
     GFX_clear(Colors::black);&lt;br /&gt;
     GFX_drawText(120, 100, TEXT_SIZE, 0, text_align_t::TEXT_ALIGN_CENTER, Colors::white, &amp;quot;HELLO&amp;quot;);&lt;br /&gt;
     GFX_render();&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== Functions ==&lt;br /&gt;
&lt;br /&gt;
===GFX_getAssetId===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_getAssetId(const char* spriteName)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get an image ID by the filename.&lt;br /&gt;
: Usually an application uses image IDs to draw sprites and backgrounds. But&lt;br /&gt;
: sometimes IDs are unknown, e.g. in common libraries, or they change rapidly&lt;br /&gt;
: during development. This interface can be used to get an ID of the image by&lt;br /&gt;
: its filename in the runtime. Maximum asset name length is 15 characters,&lt;br /&gt;
: remaining symbols are truncated during lookup.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: The ID of image with a given filename or -1 in case of error.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - renamed from GFX_getId() to GFX_getAssetId()&lt;br /&gt;
: v6.0 - truncate asset name in WASM API&lt;br /&gt;
&lt;br /&gt;
===GFX_clear===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_clear(u32_t color)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Clear a layer with a given color.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.0 - changed color format&lt;br /&gt;
&lt;br /&gt;
===GFX_drawText===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_drawText(i32_t x, i32_t y, u32_t scale, u32_t angle, u32_t align, u32_t color, const char* text)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Draw a formatted text by the specified coordinates with a given color,&lt;br /&gt;
: scale, text align and a rotation angle.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - clarified documentation, added GFX_drawTextXY() alias&lt;br /&gt;
&lt;br /&gt;
===GFX_drawPoint===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_drawPoint(i32_t x, i32_t y, u32_t color)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Draw a point specified by its coordinates with a given color.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - added GFX_drawPointXY() alias&lt;br /&gt;
&lt;br /&gt;
===GFX_drawCircle===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_drawCircle(u32_t x, u32_t y, u32_t radius, u32_t width, u32_t color)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Draw a circle at the given point with given radius, color and line width.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - added GFX_drawCircleXY() alias&lt;br /&gt;
&lt;br /&gt;
===GFX_drawSolidCircle===&lt;br /&gt;
:'''Deprecated.''' use fill shader intead&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_drawSolidCircle(u32_t x, u32_t y, u32_t radius, u32_t color)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Draw a solid circle at the given point with given radius and color.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - added GFX_drawSolidCircleXY() alias&lt;br /&gt;
: v6.0 - DEPRECATED, use GFX_setFillShader() instead&lt;br /&gt;
&lt;br /&gt;
===GFX_drawArc===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_drawArc(i32_t x, i32_t y, u32_t radius, u32_t width, u32_t angle0, u32_t angle1, u32_t color)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Draw an arc at the given point with given radius, line width, color and&lt;br /&gt;
: angles.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - added GFX_drawArcXY() alias&lt;br /&gt;
&lt;br /&gt;
===GFX_drawSector===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_drawSector(i32_t x, i32_t y, u32_t radius, u32_t angle0, u32_t angle1, u32_t color)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Draw a filled circular sector, connecting the arc to the circle's center&lt;br /&gt;
: like a piece of pie.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.1 - created&lt;br /&gt;
&lt;br /&gt;
===GFX_drawLine===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_drawLine(i32_t x0, i32_t y0, i32_t x1, i32_t y1, u32_t thickness, u32_t color)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Draw a line with from a given point to another one and given width and&lt;br /&gt;
: color.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - added GFX_drawLineXY() alias&lt;br /&gt;
&lt;br /&gt;
===GFX_drawRectangle===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_drawRectangle(i32_t x, i32_t y, i32_t w, i32_t h, u32_t color)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Draw a solid rectangle at a given position with specified dimensions and a&lt;br /&gt;
: color.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - added GFX_drawRectangleXY() alias&lt;br /&gt;
&lt;br /&gt;
===GFX_bakeImage===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_bakeImage(spriteID_t id, u32_t width, u32_t height, GFX_PixelFormat_t format, u32_t overwrite)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Set an ID of a memory buffer to save next rendering result.&lt;br /&gt;
: Specifies the image that will be created by combining the group of&lt;br /&gt;
: graphical primitives used between GFX_bakeImage() and GFS_render()&lt;br /&gt;
: according their order and taking into account alpha channel in images. HW&lt;br /&gt;
: has a limitation and can combine no more than 4 layers simultaneously, so&lt;br /&gt;
: if there are more primitives then they will be combined in a cascade.&lt;br /&gt;
: Useful for creating complex images like backgrounds for later usage.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.0 - added overwrite parameter&lt;br /&gt;
&lt;br /&gt;
===GFX_setRenderTarget===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_setRenderTarget(u32_t display)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Set a screen which will be used to display next rendering result.&lt;br /&gt;
: Cube module is a special device which has 3 independent screens to display&lt;br /&gt;
: graphics. GFX_setRenderTarget() specifies a screen number which will be&lt;br /&gt;
: used to display a next rendering result. Graphics primitives used in&lt;br /&gt;
: between GFX_setRenderTarget() and GFX_render() calls will be combined&lt;br /&gt;
: together according their order and taking into account alpha channel in&lt;br /&gt;
: images. Resulting image will be immediately flushed onto the given screen.&lt;br /&gt;
: HW has a limitation and can combine no more than 4 layers simultaneously,&lt;br /&gt;
: so if there are more primitives then they will be combined in a cascade. To&lt;br /&gt;
: display anything on the screen GFX_setRenderTarget() has to be always&lt;br /&gt;
: called.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - renamed from GFX_updateDisplay() to GFX_setRenderTarget()&lt;br /&gt;
&lt;br /&gt;
===GFX_drawImage===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_drawImage(spriteID_t id, i32_t x, i32_t y, u32_t opacity, u32_t colorKey, u32_t scale_x, u32_t scale_y, u32_t angle, u32_t mirror)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Draw an image from application assets at a specified position and with&lt;br /&gt;
: given transformations.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - added GFX_drawImageXY() alias, color argument clarified&lt;br /&gt;
: v6.0 - added scale parameters&lt;br /&gt;
&lt;br /&gt;
===GFX_drawBakedImage===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_drawBakedImage(i32_t x, i32_t y, u32_t opacity, u32_t colorKey, u32_t scale_x, u32_t scale_y, u32_t angle, u32_t mirror, spriteID_t id)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Draw a previously baked image at a specified position and with given&lt;br /&gt;
: transformations.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - added GFX_drawBakedImageXY() alias, color argument clarified&lt;br /&gt;
: v6.0 - added scale parameters&lt;br /&gt;
&lt;br /&gt;
===GFX_drawQrCode===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_drawQRCode(i32_t x, i32_t y, u32_t size, u32_t color0, u32_t color1, u32_t angle, u32_t id, const char *text)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Generate and draw QR-code for a given text string.&lt;br /&gt;
: Supported version 2 which is limited by 32 characters of input.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.0 - added&lt;br /&gt;
&lt;br /&gt;
===GFX_render===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_render()&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Start rendering process.&lt;br /&gt;
&lt;br /&gt;
===GFX_clearCache===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_clearCache()&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Clear all cached images.&lt;br /&gt;
: Oldest accessed image cache will be automatically freed if there is not&lt;br /&gt;
: enough memory to cache a new image. This function forces this process, e.g.&lt;br /&gt;
: when switch game levels.&lt;br /&gt;
&lt;br /&gt;
===GFX_removeBakedImage===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_removeBakedImage(spriteID_t id)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Remove specified baked image from cache.&lt;br /&gt;
: Baked images do not automatically invalidate. This function allows to&lt;br /&gt;
: remove any baked image from cache to save some space.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.0 - added&lt;br /&gt;
&lt;br /&gt;
===GFX_cacheImages===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_cacheImages(spriteID_t* spriteIDs, u32_t count)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Force platform to cache application images.&lt;br /&gt;
: Platform automatically reads and caches images from flash when the&lt;br /&gt;
: application draws an image. Flash operations are synchronous and may cause&lt;br /&gt;
: delays especially when reading large portions of data. To prevent the&lt;br /&gt;
: application from lags it is possible to cache image data in advance.&lt;br /&gt;
: However if application requests to draw a non-cached image and there is not&lt;br /&gt;
: enough memory then oldest accessed images will be removed from cache. Also&lt;br /&gt;
: there is a limit of 256 for a total number of cached images.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Number of cached images or negative value if an error happened. Error&lt;br /&gt;
: codes:&lt;br /&gt;
: * -1 invalid function arguments count&lt;br /&gt;
: * -2 invalid imageList array&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - moved from appCtrl module to graphics&lt;br /&gt;
&lt;br /&gt;
===GFX_setFpsWindow===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_setFpsWindow(u32_t size)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Set the averaging window (in frames) used by the on-screen FPS counter (see &amp;lt;code&amp;gt;Application::ShowFPSCounter()&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
===GFX_getAssetsCount===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_getAssetsCount()&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get the total count of graphic assets.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Number of graphic assets.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.0 - added&lt;br /&gt;
&lt;br /&gt;
===GFX_setFillShader===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_setFillShader(u32_t color)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Fill next primitives with specified color.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.0 - added primitives shading&lt;br /&gt;
&lt;br /&gt;
===GFX_setLinearGradientShader===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_setLinearGradientShader(u32_t x0, u32_t y0, u32_t x1, u32_t y1, u32_t color0, u32_t color1)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Fill next primitives with linear gradient from a given point / color to&lt;br /&gt;
: another one.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.0 - added primitives shading&lt;br /&gt;
&lt;br /&gt;
===GFX_setRadialGradientShader===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_setRadialGradientShader(u32_t x0, u32_t y0, u32_t radius, u32_t color0, u32_t color1)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Fill next primitives with radial gradient from a given point with radius&lt;br /&gt;
: and from a given color to another one.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.0 - added primitives shading&lt;br /&gt;
&lt;br /&gt;
===GFX_removeShader===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_removeShader()&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Do not use shading in next primitives.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.0 - added primitives shading&lt;br /&gt;
&lt;br /&gt;
===GFX_drawSubImage===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_drawSubImage(spriteID_t id,i32_t x,i32_t y,u32_t rect_x,u32_t rect_y,u32_t rect_w,u32_t rect_h,u32_t opacity,u32_t colorKey,u32_t scale_x, u32_t scale_y,u32_t angle, u32_t mirror)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Draw a sub window of an image from application assets at a specified&lt;br /&gt;
: position and with given transformations.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.2 - added&lt;br /&gt;
&lt;br /&gt;
[[Category:SDK 6.3]]&lt;br /&gt;
[[Category:C++ API]]&lt;/div&gt;</summary>
		<author><name>WowBot</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=SDK_6.3/C%2B%2B/Topology&amp;diff=16964</id>
		<title>SDK 6.3/C++/Topology</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=SDK_6.3/C%2B%2B/Topology&amp;diff=16964"/>
		<updated>2026-07-26T09:47:44Z</updated>

		<summary type="html">&lt;p&gt;WowBot: Split C++ Native API into per-module pages with minimal examples (WowBot)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{notice|'''Official WOWCube SDK documentation.''' SDK 6.3, C++ (WebAssembly) API. Signatures are extracted from the canonical SDK headers shipped with the WOWCube Development Kit; the headers remain authoritative.}}&lt;br /&gt;
&lt;br /&gt;
{{SDK 6.3 nav}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''← [[SDK 6.3]] · [[SDK 6.3/C++/Native API|C++ Native API]] / Topology''&lt;br /&gt;
&lt;br /&gt;
Cube geometry: facelets, faces, places, orientation and twist events.&lt;br /&gt;
&lt;br /&gt;
Shared types, enums and constants are listed on the [[SDK 6.3/C++/Native API#Types and data structures|Native API overview]].&lt;br /&gt;
&lt;br /&gt;
== Minimal example ==&lt;br /&gt;
&lt;br /&gt;
The assembled-check used by the official ''Twinkle'' sample before cross-screen drawing:&lt;br /&gt;
&lt;br /&gt;
 if(TOPOLOGY_isAssembled() == 1)&lt;br /&gt;
 {&lt;br /&gt;
     // safe to place objects across the whole face&lt;br /&gt;
 }&lt;br /&gt;
 Cubios::TOPOLOGY_faceletInfo_t nb;&lt;br /&gt;
 TOPOLOGY_getAdjacentFacelet(cubeN, screen.ID(), Cubios::NEIGHBOR_TOP, &amp;amp;nb);&lt;br /&gt;
&lt;br /&gt;
== Functions ==&lt;br /&gt;
&lt;br /&gt;
===TOPOLOGY_getAdjacentFacelet===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t TOPOLOGY_getAdjacentFacelet(u32_t module, u32_t screen, u32_t direction, Cubios::TOPOLOGY_faceletInfo_t* result)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get a facelet neighbor in the given direction.&lt;br /&gt;
: Facelet can have neighbors on the same cube face or neighbors by module.&lt;br /&gt;
: This function provide a neighbor of the given facelet in the given&lt;br /&gt;
: direction. Connection status indicates if there is a connection between&lt;br /&gt;
: modules on which given facelet and its neighbor are located.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Neighbor facelet in a given direction with its connection status. The&lt;br /&gt;
: module ID will be MODULES_MAX and the screen number will be SCREENS_MAX in&lt;br /&gt;
: case of an error (e.g. incorrect arguments or the topology malfunction).&lt;br /&gt;
&lt;br /&gt;
===TOPOLOGY_getFacelet===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t TOPOLOGY_getFacelet(u32_t face, u32_t position, Cubios::TOPOLOGY_orientation_mode_t mode, Cubios::TOPOLOGY_faceletInfo_t* result)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get a facelet located in the given place.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Facelet located in the given place, connection status indicates if there&lt;br /&gt;
: any connection to the module on which this facelet resides. The module ID&lt;br /&gt;
: will be MODULES_MAX and the screen screen will be SCREENS_MAX in case of an&lt;br /&gt;
: error (e.g. incorrect arguments or the topology malfunction).&lt;br /&gt;
&lt;br /&gt;
===TOPOLOGY_getPlace===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t TOPOLOGY_getPlace(u32_t module, u32_t screen, Cubios::TOPOLOGY_orientation_mode_t mode, Cubios::TOPOLOGY_place_t* result)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get a place of the facelet.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Place on cube surface where the given facelet located. Face will be&lt;br /&gt;
: TOPOLOGY_FACES_MAX and position will be TOPOLOGY_POSITIONS_MAX in case of&lt;br /&gt;
: an error (e.g. incorrect arguments or topology malfunction)&lt;br /&gt;
&lt;br /&gt;
===TOPOLOGY_getOppositeFacelet===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t TOPOLOGY_getOppositeFacelet(u32_t module, u32_t screen, Cubios::TOPOLOGY_faceletInfo_t* result)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get an opposite facelet located on a diagonal counterpart module.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Diagonal opposite counterpart facelet. Connection status indicates if there&lt;br /&gt;
: any connection to the module on which that facelet resides. The module ID&lt;br /&gt;
: will be MODULES_MAX and the screen number will be SCREENS_MAX in case of an&lt;br /&gt;
: error (e.g. incorrect arguments or topology malfunction).&lt;br /&gt;
&lt;br /&gt;
===TOPOLOGY_getAngle===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t TOPOLOGY_getAngle(u32_t module, u32_t screen, Cubios::TOPOLOGY_orientation_mode_t mode)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get an angle to align images on a face according to the orientation mode.&lt;br /&gt;
: Display coordinates system is persistent on a module screen. Different&lt;br /&gt;
: angles are needed to align images on all modules with screens on the same&lt;br /&gt;
: face. This function returns the angle for the screen specified by the&lt;br /&gt;
: facelet. The angle is relative to the position 0 on the same face where the&lt;br /&gt;
: facelet is located in the given orientation mode.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Angle to align images on the same face according to the orientation mode, 0&lt;br /&gt;
: in case of an error (e.g. incorrect arguments or the topology malfunction).&lt;br /&gt;
&lt;br /&gt;
===TOPOLOGY_getFaceletOrientation===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t TOPOLOGY_getFaceletOrientation(u32_t module, u32_t screen)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get a face orientation on which the given facelet resides.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Face orientation on which the given facelet resides, ORIENTATION_MAX in&lt;br /&gt;
: case of an error (e.g. incorrect arguments or the topology malfunction).&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - renamed from TOPOLOGY_getFaceletLocation() to the&lt;br /&gt;
: TOPOLOGY_getFaceletOrientation()&lt;br /&gt;
&lt;br /&gt;
===TOPOLOGY_getPlaceOrientation===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t TOPOLOGY_getPlaceOrientation(u32_t face, u32_t position)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get a face orientation on which the given place resides.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Face orientation on which the given place resides, ORIENTATION_MAX in case&lt;br /&gt;
: of an error (e.g. incorrect arguments or the topology malfunction).&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - renamed from TOPOLOGY_getPlaceLocation() to the&lt;br /&gt;
: TOPOLOGY_getPlaceOrientation()&lt;br /&gt;
&lt;br /&gt;
===TOPOLOGY_getFace===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t TOPOLOGY_getFace(u32_t orientation)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get a face number which has the given orientation.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Face number which has the given orientation, TOPOLOGY_FACES_MAX in case of&lt;br /&gt;
: an error (e.g. incorrect arguments or the topology malfunction).&lt;br /&gt;
&lt;br /&gt;
===TOPOLOGY_isAssembled===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t TOPOLOGY_isAssembled()&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Check that all modules in a system are connected to each other.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: True if all modules in a system are connected to each other, false&lt;br /&gt;
: otherwise.&lt;br /&gt;
&lt;br /&gt;
===TOPOLOGY_getTwist===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t TOPOLOGY_getTwist(Cubios::TOPOLOGY_twistInfo_t* twist)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Read the pending twist event into a &amp;lt;code&amp;gt;TOPOLOGY_twistInfo_t&amp;lt;/code&amp;gt;. Normally consumed by &amp;lt;code&amp;gt;AppManager&amp;lt;/code&amp;gt;, which calls &amp;lt;code&amp;gt;Application::on_Twist()&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[Category:SDK 6.3]]&lt;br /&gt;
[[Category:C++ API]]&lt;/div&gt;</summary>
		<author><name>WowBot</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=SDK_6.3/C%2B%2B/Leaderboard&amp;diff=16965</id>
		<title>SDK 6.3/C++/Leaderboard</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=SDK_6.3/C%2B%2B/Leaderboard&amp;diff=16965"/>
		<updated>2026-07-26T09:47:44Z</updated>

		<summary type="html">&lt;p&gt;WowBot: Split C++ Native API into per-module pages with minimal examples (WowBot)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{notice|'''Official WOWCube SDK documentation.''' SDK 6.3, C++ (WebAssembly) API. Signatures are extracted from the canonical SDK headers shipped with the WOWCube Development Kit; the headers remain authoritative.}}&lt;br /&gt;
&lt;br /&gt;
{{SDK 6.3 nav}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''← [[SDK 6.3]] · [[SDK 6.3/C++/Native API|C++ Native API]] / Leaderboard''&lt;br /&gt;
&lt;br /&gt;
Scores and rankings synced via the companion app.&lt;br /&gt;
&lt;br /&gt;
Shared types, enums and constants are listed on the [[SDK 6.3/C++/Native API#Types and data structures|Native API overview]].&lt;br /&gt;
&lt;br /&gt;
== Minimal example ==&lt;br /&gt;
&lt;br /&gt;
Query the synced points table:&lt;br /&gt;
&lt;br /&gt;
 Cubios::LB_info_t info;&lt;br /&gt;
 LB_getInfo(&amp;amp;info);&lt;br /&gt;
 LOG_i(&amp;quot;my place: %d of %d\n&amp;quot;, info.selfPosition, info.wholeUserListCount);&lt;br /&gt;
&lt;br /&gt;
== Functions ==&lt;br /&gt;
&lt;br /&gt;
===LB_getInfo===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t LB_getInfo(Cubios::LB_info_t* info)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get leaderboard description.&lt;br /&gt;
: Players score and achievements can be saved and shared via mobile&lt;br /&gt;
: application and WOWCube Entertainment System servers. This function&lt;br /&gt;
: provides synced information necessary to display points table.&lt;br /&gt;
: Outputs&lt;br /&gt;
:* info - structure describing leaderboard&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Error code:&lt;br /&gt;
: * 0 - success&lt;br /&gt;
: * -1 - incorrect arguments count&lt;br /&gt;
: * -2 - leaderboard is not synced&lt;br /&gt;
: * -3 - fail to fill output structure&lt;br /&gt;
&lt;br /&gt;
===LB_getScore===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t LB_getScore(uint8_t* leadTableBin, u32_t bufSize)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get best results data data.&lt;br /&gt;
: Players score and achievements can be saved and shared via mobile&lt;br /&gt;
: application and WOWCube Entertainment System servers. This function&lt;br /&gt;
: provides best results table data.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Error code:&lt;br /&gt;
: * 0 - success&lt;br /&gt;
: * -1 - incorrect arguments count&lt;br /&gt;
: * -2 - leaderboard is not synced&lt;br /&gt;
: * -3 - fail to fill output structure&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - align error codes with LB_getInfo.&lt;br /&gt;
&lt;br /&gt;
[[Category:SDK 6.3]]&lt;br /&gt;
[[Category:C++ API]]&lt;/div&gt;</summary>
		<author><name>WowBot</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=SDK_6.3/C%2B%2B/Core&amp;diff=16963</id>
		<title>SDK 6.3/C++/Core</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=SDK_6.3/C%2B%2B/Core&amp;diff=16963"/>
		<updated>2026-07-26T09:47:43Z</updated>

		<summary type="html">&lt;p&gt;WowBot: Split C++ Native API into per-module pages with minimal examples (WowBot)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{notice|'''Official WOWCube SDK documentation.''' SDK 6.3, C++ (WebAssembly) API. Signatures are extracted from the canonical SDK headers shipped with the WOWCube Development Kit; the headers remain authoritative.}}&lt;br /&gt;
&lt;br /&gt;
{{SDK 6.3 nav}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''← [[SDK 6.3]] · [[SDK 6.3/C++/Native API|C++ Native API]] / Core''&lt;br /&gt;
&lt;br /&gt;
Application-level services: time, RNG, inter-module packets, BLE data, persistent state, user info, versioning and logging.&lt;br /&gt;
&lt;br /&gt;
Shared types, enums and constants are listed on the [[SDK 6.3/C++/Native API#Types and data structures|Native API overview]].&lt;br /&gt;
&lt;br /&gt;
== Minimal example ==&lt;br /&gt;
&lt;br /&gt;
Typical service calls:&lt;br /&gt;
&lt;br /&gt;
 uint32_t now = getTime();          // ms since app start&lt;br /&gt;
 i32_t r = random(0, 100);          // engine RNG&lt;br /&gt;
 saveState(&amp;amp;state, sizeof(state));  // persist between runs&lt;br /&gt;
&lt;br /&gt;
== Functions ==&lt;br /&gt;
&lt;br /&gt;
===sendPacket===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t sendPacket(u32_t type, uint8_t* pkt, u32_t size)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Send a packet to another module. Use &amp;lt;code&amp;gt;NET_BROADCAST&amp;lt;/code&amp;gt; (0xFF) as the destination to reach all modules. Low-level counterpart of the PAWN &amp;lt;code&amp;gt;broadcastPacket()&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===recvPacket===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t recvPacket(u32_t size, uint32_t* type, uint8_t* pkt)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Read a pending inter-module packet into a buffer. Normally consumed by the &amp;lt;code&amp;gt;AppManager&amp;lt;/code&amp;gt; event loop, which dispatches it to &amp;lt;code&amp;gt;Application::on_Message()&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===getTime===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t getTime()&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get time in milliseconds since the module start.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Time in milliseconds since the module start.&lt;br /&gt;
&lt;br /&gt;
===getUserName===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t getUserName(uint8_t* buffer, u32_t bufSize)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get the name of a user who is logined on the cube.&lt;br /&gt;
: Get the user name configured in the WOWCube mobile application to save&lt;br /&gt;
: results for.&lt;br /&gt;
&lt;br /&gt;
===toggleDebugInfo===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t toggleDebugInfo()&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Toggle overlay with debug information. TBD - move to GFX&lt;br /&gt;
&lt;br /&gt;
===saveState===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t saveState(void* data, u32_t size)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Request to save an application data&lt;br /&gt;
: Save user settings and/or progress on the flash to restore next time. Each&lt;br /&gt;
: save data has an incremental ID.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: True if save was successful.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - fixed a bug in which only part of a data saved on the flash&lt;br /&gt;
&lt;br /&gt;
===loadState===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t loadState(u32_t* id, void* data, u32_t size)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Request to load an application save data from the flash.&lt;br /&gt;
: Trigger state load event. It is asynchronous so access to flash memory will&lt;br /&gt;
: not affect an application performance.&lt;br /&gt;
&lt;br /&gt;
===random===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t random(u32_t min, u32_t max)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Generate random number in half-open range.&lt;br /&gt;
: Random number generator is initialized before each application start. Seed&lt;br /&gt;
: for initialization is generated by TRNG (True Random Number Generator).&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Pseudo random value from requested range.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - fixed a bug in which random does not generate numbers in a given&lt;br /&gt;
: range.&lt;br /&gt;
&lt;br /&gt;
===getAppVersion===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t getAppVersion(Cubios::AppVersion_t *version)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get application version.&lt;br /&gt;
: WOWCube applications follow semantic versioning scheme (see&lt;br /&gt;
: https://semver.org). This interface allows to get version parts stored in&lt;br /&gt;
: the cube application descriptor.&lt;br /&gt;
: Outputs&lt;br /&gt;
:* version - structure describing application version&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.0 - added&lt;br /&gt;
&lt;br /&gt;
===LOG===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t LOG(uint8_t level, const char* text)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Write a log line with the given level. Prefer the &amp;lt;code&amp;gt;LOG_a/e/w/i/d/v&amp;lt;/code&amp;gt; printf-style macros (see &amp;lt;code&amp;gt;LogLevel_t&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
===getTap===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t getTap()&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get the pending tap event, if any. Normally consumed by the &amp;lt;code&amp;gt;AppManager&amp;lt;/code&amp;gt; event loop (&amp;lt;code&amp;gt;Application::on_Tap()&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;on_Pat()&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
===sendBleData===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t sendBleData(u32_t type, uint8_t* pkt, u32_t size)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Send external data over BLE to the connected companion (WOWCube Connect) application.&lt;br /&gt;
&lt;br /&gt;
===recvBleData===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t recvBleData(uint8_t* pkt, u32_t size)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Receive pending external BLE data; dispatched by &amp;lt;code&amp;gt;AppManager&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;Application::on_ExternalMessage()&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===EVENT_getList===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t EVENT_getList()&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get the pending event mask for this module (see &amp;lt;code&amp;gt;eventMask_t&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
[[Category:SDK 6.3]]&lt;br /&gt;
[[Category:C++ API]]&lt;/div&gt;</summary>
		<author><name>WowBot</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=SDK_6.3&amp;diff=16962</id>
		<title>SDK 6.3</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=SDK_6.3&amp;diff=16962"/>
		<updated>2026-07-26T09:46:20Z</updated>

		<summary type="html">&lt;p&gt;WowBot: Rust section: status + topic links (WowBot)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{notice|'''Official WOWCube SDK 6.3 documentation.''' Canonical API reference, generated from the SDK headers.}}&lt;br /&gt;
&lt;br /&gt;
The current WOWCube SDK. Applications can be written in '''PAWN''', '''C++''', or '''Rust'''.&lt;br /&gt;
&lt;br /&gt;
== PAWN API ==&lt;br /&gt;
'''Legacy:''' supported, but no longer actively developed (last PAWN additions — SDK 6.2; 6.3 only removed deprecated calls). For new projects use the [[#C++ API|C++ API]].&lt;br /&gt;
One page per module:&lt;br /&gt;
* [[SDK 6.3/PAWN/Core]] — application lifecycle, state, time, RNG, packets&lt;br /&gt;
* [[SDK 6.3/PAWN/Graphics]] — drawing, images, text, shaders (GFX)&lt;br /&gt;
* [[SDK 6.3/PAWN/Topology]] — cube geometry, facelets, twists&lt;br /&gt;
* [[SDK 6.3/PAWN/Sound]] — sound playback&lt;br /&gt;
* [[SDK 6.3/PAWN/Motion Sensor]] — accelerometer / gyroscope, taps&lt;br /&gt;
* [[SDK 6.3/PAWN/Leaderboard]] — scores and achievements&lt;br /&gt;
* [[SDK 6.3/PAWN/Splash Screen]] — splash screens&lt;br /&gt;
* [[SDK 6.3/PAWN/Physics]] — 2D physics helpers&lt;br /&gt;
* [[SDK 6.3/PAWN/Network]] — inter-module messaging&lt;br /&gt;
* [[SDK 6.3/PAWN/Save]] — persistence&lt;br /&gt;
* [[SDK 6.3/PAWN/Scramble]] — cube scramble&lt;br /&gt;
* [[SDK 6.3/PAWN/Logging]] — debug logging&lt;br /&gt;
&lt;br /&gt;
* [[SDK 6.3/Changelog|SDK changelog]] — what changed in 5.1 / 6.0 / 6.2 / 6.3&lt;br /&gt;
&lt;br /&gt;
== C++ API ==&lt;br /&gt;
C/C++ cubeapps run via WebAssembly: the same engine functions as PAWN, plus an object-oriented framework and a retained scene graph. '''This is the primary development track.'''&lt;br /&gt;
&lt;br /&gt;
'''Native engine ABI''' — [[SDK 6.3/C++/Native API]] (all 64 functions with full descriptions):&lt;br /&gt;
* [[SDK 6.3/C++/Native API#Core|Core]] — time, RNG, packets, BLE, saves, user, version, logging&lt;br /&gt;
* [[SDK 6.3/C++/Native API#Graphics|Graphics]] — drawing, images, text, shaders, QR, render targets&lt;br /&gt;
* [[SDK 6.3/C++/Native API#Topology|Topology]] — facelets, faces, twists, orientation&lt;br /&gt;
* [[SDK 6.3/C++/Native API#Sound|Sound]] — playback and caching&lt;br /&gt;
* [[SDK 6.3/C++/Native API#Motion Sensors|Motion Sensors]] — accelerometer / gyroscope per display&lt;br /&gt;
* [[SDK 6.3/C++/Native API#Leaderboard|Leaderboard]] — scores and rankings&lt;br /&gt;
* [[SDK 6.3/C++/Native API#Types and data structures|Types &amp;amp; data structures]] — structs, enums, constants&lt;br /&gt;
&lt;br /&gt;
'''Application framework''' — [[SDK 6.3/C++/Application]]:&lt;br /&gt;
* [[SDK 6.3/C++/Application#Entry point|Entry point]] · [[SDK 6.3/C++/Application#class Cubios::Application|callbacks (on_Tick, on_Render, on_Twist, …)]] · timers, networking, saves, [[SDK 6.3/C++/Application#class Cubios::AppManager|AppManager]]&lt;br /&gt;
&lt;br /&gt;
'''GFX Engine (scene graph)''' — [[SDK 6.3/C++/GFX Engine]] (56 documented methods + official-sample code):&lt;br /&gt;
* [[SDK 6.3/C++/GFX Engine#The canonical pattern|The canonical pattern]] — how real games are structured&lt;br /&gt;
* [[SDK 6.3/C++/GFX Engine#Scene|Scene]] · [[SDK 6.3/C++/GFX Engine#SceneObject|SceneObject]] · [[SDK 6.3/C++/GFX Engine#Screen|Screen]]&lt;br /&gt;
* [[SDK 6.3/C++/GFX Engine#Gfx::Sprite|Sprite]] · [[SDK 6.3/C++/GFX Engine#Gfx::AnimatedSprite|AnimatedSprite]] · [[SDK 6.3/C++/GFX Engine#Gfx::SpriteAtlas|SpriteAtlas]] · [[SDK 6.3/C++/GFX Engine#Gfx::Background|Background]] · [[SDK 6.3/C++/GFX Engine#Gfx::Text|Text]] · [[SDK 6.3/C++/GFX Engine#Gfx::QRCode|QRCode]] · [[SDK 6.3/C++/GFX Engine#Gfx::OffscreenRenderTarget|OffscreenRenderTarget]]&lt;br /&gt;
* [[SDK 6.3/C++/GFX Engine#Sound and SoundCollection|Sound / SoundCollection]] · [[SDK 6.3/C++/GFX Engine#NetworkMessage and SaveMessage|NetworkMessage / SaveMessage]] · [[SDK 6.3/C++/GFX Engine#Scramble|Scramble]] · [[SDK 6.3/C++/GFX Engine#Splashscreen|Splashscreen]] · [[SDK 6.3/C++/GFX Engine#Math|Math]]&lt;br /&gt;
&lt;br /&gt;
== Rust API ==&lt;br /&gt;
'''Experimental / advanced track''' (crate &amp;lt;code&amp;gt;wowcube_sdk&amp;lt;/code&amp;gt; v0.1.0): actively shipped with SDK 6.3, builds to the same WebAssembly ABI as C++.&lt;br /&gt;
* [[SDK 6.3/Rust#Crate layout|Crate layout]] — modules &amp;lt;code&amp;gt;application&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;cubios&amp;lt;/code&amp;gt;&lt;br /&gt;
* [[SDK 6.3/Rust#Application trait|Application trait]] — &amp;lt;code&amp;gt;on_init / on_tick / on_render / on_timer&amp;lt;/code&amp;gt;, timers&lt;br /&gt;
* [[SDK 6.3/Rust#Entry points|Entry points]] — &amp;lt;code&amp;gt;on_init(cid)&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;run()&amp;lt;/code&amp;gt;&lt;br /&gt;
* [[SDK 6.3/Rust#FFI types|FFI types]] — topology, leaderboard, particles, enums&lt;br /&gt;
* [[SDK 6.3/Rust#Examples|Examples]] — three buildable projects in the DevKit&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
See also: [[:Category:SDK 6.3|all SDK 6.3 pages]].&lt;br /&gt;
[[Category:SDK 6.3]]&lt;/div&gt;</summary>
		<author><name>WowBot</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=SDK_6.3/PAWN/Scramble&amp;diff=16960</id>
		<title>SDK 6.3/PAWN/Scramble</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=SDK_6.3/PAWN/Scramble&amp;diff=16960"/>
		<updated>2026-07-26T09:45:55Z</updated>

		<summary type="html">&lt;p&gt;WowBot: Mark PAWN API as legacy (supported, not developed) (WowBot)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{notice|'''Official WOWCube SDK documentation.''' SDK 6.3, PAWN API. Generated from the canonical SDK headers — do not edit by hand; regenerate from source.}}&lt;br /&gt;
{{notice|'''Legacy track.''' The PAWN API is supported but no longer actively developed — the last PAWN additions shipped in SDK 6.2. New development uses the [[SDK 6.3/C++/Native API|C++ (WebAssembly) API]].}}&lt;br /&gt;
&lt;br /&gt;
{{SDK 6.3 nav}}&lt;br /&gt;
&lt;br /&gt;
''← [[SDK 6.3]] · PAWN / Scramble''&lt;br /&gt;
&lt;br /&gt;
==Functions==&lt;br /&gt;
&lt;br /&gt;
===Scramble===&lt;br /&gt;
Syntax:&lt;br /&gt;
 Scramble(twistsCount)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Scramble the cube randomly the specified number of times.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''twistsCount''&lt;br /&gt;
:: how many times to twist the cube for scramble&lt;br /&gt;
&lt;br /&gt;
===ScrambleRotate===&lt;br /&gt;
Syntax:&lt;br /&gt;
 ScrambleRotate(scr, dir)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Twist the cube around some screen in a specified direction.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''scr''&lt;br /&gt;
:: a screen to twist around&lt;br /&gt;
: ''dir''&lt;br /&gt;
:: a direction of the twist&lt;br /&gt;
&lt;br /&gt;
[[Category:SDK 6.3]]&lt;br /&gt;
[[Category:PAWN API]]&lt;/div&gt;</summary>
		<author><name>WowBot</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=SDK_6.3/PAWN/Logging&amp;diff=16961</id>
		<title>SDK 6.3/PAWN/Logging</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=SDK_6.3/PAWN/Logging&amp;diff=16961"/>
		<updated>2026-07-26T09:45:55Z</updated>

		<summary type="html">&lt;p&gt;WowBot: Mark PAWN API as legacy (supported, not developed) (WowBot)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{notice|'''Official WOWCube SDK documentation.''' SDK 6.3, PAWN API. Generated from the canonical SDK headers — do not edit by hand; regenerate from source.}}&lt;br /&gt;
{{notice|'''Legacy track.''' The PAWN API is supported but no longer actively developed — the last PAWN additions shipped in SDK 6.2. New development uses the [[SDK 6.3/C++/Native API|C++ (WebAssembly) API]].}}&lt;br /&gt;
&lt;br /&gt;
{{SDK 6.3 nav}}&lt;br /&gt;
&lt;br /&gt;
''← [[SDK 6.3]] · PAWN / Logging''&lt;br /&gt;
&lt;br /&gt;
==Functions==&lt;br /&gt;
&lt;br /&gt;
===LOG_a===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native LOG_a(const format[], {Float,Fixed,_}:...);&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Print an assert log message and stop application execution.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''format''&lt;br /&gt;
:: format string&lt;br /&gt;
: ''...''&lt;br /&gt;
:: variable values to insert in the resulting string&lt;br /&gt;
&lt;br /&gt;
===LOG_e===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native LOG_e(const format[], {Float,Fixed,_}:...);&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Print an error log message.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''format''&lt;br /&gt;
:: format string&lt;br /&gt;
: ''...''&lt;br /&gt;
:: variable values to insert in the resulting string&lt;br /&gt;
&lt;br /&gt;
===LOG_w===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native LOG_w(const format[], {Float,Fixed,_}:...);&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Print a warning log message.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''format''&lt;br /&gt;
:: format string&lt;br /&gt;
: ''...''&lt;br /&gt;
:: variable values to insert in the resulting string&lt;br /&gt;
&lt;br /&gt;
===LOG_i===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native LOG_i(const format[], {Float,Fixed,_}:...);&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Print an information log message.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''format''&lt;br /&gt;
:: format string&lt;br /&gt;
: ''...''&lt;br /&gt;
:: variable values to insert in the resulting string&lt;br /&gt;
&lt;br /&gt;
===LOG_d===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native LOG_d(const format[], {Float,Fixed,_}:...);&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Print a debug log message.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''format''&lt;br /&gt;
:: format string&lt;br /&gt;
: ''...''&lt;br /&gt;
:: variable values to insert in the resulting string&lt;br /&gt;
&lt;br /&gt;
===LOG_v===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native LOG_v(const format[], {Float,Fixed,_}:...);&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Print a verbose log message.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''format''&lt;br /&gt;
:: format string&lt;br /&gt;
: ''...''&lt;br /&gt;
:: variable values to insert in the resulting string&lt;br /&gt;
&lt;br /&gt;
[[Category:SDK 6.3]]&lt;br /&gt;
[[Category:PAWN API]]&lt;/div&gt;</summary>
		<author><name>WowBot</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=SDK_6.3/PAWN/Save&amp;diff=16959</id>
		<title>SDK 6.3/PAWN/Save</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=SDK_6.3/PAWN/Save&amp;diff=16959"/>
		<updated>2026-07-26T09:45:54Z</updated>

		<summary type="html">&lt;p&gt;WowBot: Mark PAWN API as legacy (supported, not developed) (WowBot)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{notice|'''Official WOWCube SDK documentation.''' SDK 6.3, PAWN API. Generated from the canonical SDK headers — do not edit by hand; regenerate from source.}}&lt;br /&gt;
{{notice|'''Legacy track.''' The PAWN API is supported but no longer actively developed — the last PAWN additions shipped in SDK 6.2. New development uses the [[SDK 6.3/C++/Native API|C++ (WebAssembly) API]].}}&lt;br /&gt;
&lt;br /&gt;
{{SDK 6.3 nav}}&lt;br /&gt;
&lt;br /&gt;
''← [[SDK 6.3]] · PAWN / Save''&lt;br /&gt;
&lt;br /&gt;
Pawn works with cells which has a size of 4 bytes. Native interfaces&lt;br /&gt;
handling generic data like application state have size limits for that&lt;br /&gt;
data.  If application does not need to work with a large numbers, several&lt;br /&gt;
values can be packed into a single cell. This library provides some&lt;br /&gt;
convenient functions to pack and unpack such values from array of cells&lt;br /&gt;
which can be saved or loaded on/from flash.&lt;br /&gt;
&lt;br /&gt;
==Functions==&lt;br /&gt;
&lt;br /&gt;
===SaveReset===&lt;br /&gt;
Syntax:&lt;br /&gt;
 SaveReset()&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Reset state before storing new data to pack.&lt;br /&gt;
&lt;br /&gt;
===SaveWriteValue===&lt;br /&gt;
Syntax:&lt;br /&gt;
 SaveWriteValue(value, bits)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Store specified number of bits from some unsigned value.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''value''&lt;br /&gt;
:: a value to store data from&lt;br /&gt;
: ''bits''&lt;br /&gt;
:: a number of bits to store&lt;br /&gt;
&lt;br /&gt;
===SaveWriteSignedValue===&lt;br /&gt;
Syntax:&lt;br /&gt;
 SaveWriteSignedValue(value, bits)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Store specified number of bits from some signed value.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''value''&lt;br /&gt;
:: a value to store data from&lt;br /&gt;
: ''bits''&lt;br /&gt;
:: a number of bits to store&lt;br /&gt;
&lt;br /&gt;
===SaveReadValue===&lt;br /&gt;
Syntax:&lt;br /&gt;
 SaveReadValue(bits)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Read specified number of bits of packed unsigned value.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''bits''&lt;br /&gt;
:: a number of bits to get&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Unpacked unsigned value.&lt;br /&gt;
&lt;br /&gt;
===SaveReadSignedValue===&lt;br /&gt;
Syntax:&lt;br /&gt;
 SaveReadSignedValue(bits)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Read specified number of bits of packed signed value.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''bits''&lt;br /&gt;
:: a number of bits to get&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Unpacked signed value.&lt;br /&gt;
&lt;br /&gt;
===SaveSetData===&lt;br /&gt;
Syntax:&lt;br /&gt;
 SaveSetData(const pkt[], size)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Populate state with a new data to unpack.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''pkt''&lt;br /&gt;
:: application state data to unpack&lt;br /&gt;
&lt;br /&gt;
See also: [[SDK 6.3/PAWN/Core#ON_Init|ON_Init()]], [[SDK 6.3/PAWN/Core#ON_Load|ON_Load()]]&lt;br /&gt;
&lt;br /&gt;
===SaveGetData===&lt;br /&gt;
Syntax:&lt;br /&gt;
 SaveGetData()&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get packed data to store on flash.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Packed data to store.&lt;br /&gt;
&lt;br /&gt;
See also: [[SDK 6.3/PAWN/Core#saveState|saveState()]]&lt;br /&gt;
&lt;br /&gt;
[[Category:SDK 6.3]]&lt;br /&gt;
[[Category:PAWN API]]&lt;/div&gt;</summary>
		<author><name>WowBot</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=SDK_6.3/PAWN/Physics&amp;diff=16957</id>
		<title>SDK 6.3/PAWN/Physics</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=SDK_6.3/PAWN/Physics&amp;diff=16957"/>
		<updated>2026-07-26T09:45:53Z</updated>

		<summary type="html">&lt;p&gt;WowBot: Mark PAWN API as legacy (supported, not developed) (WowBot)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{notice|'''Official WOWCube SDK documentation.''' SDK 6.3, PAWN API. Generated from the canonical SDK headers — do not edit by hand; regenerate from source.}}&lt;br /&gt;
{{notice|'''Legacy track.''' The PAWN API is supported but no longer actively developed — the last PAWN additions shipped in SDK 6.2. New development uses the [[SDK 6.3/C++/Native API|C++ (WebAssembly) API]].}}&lt;br /&gt;
&lt;br /&gt;
{{SDK 6.3 nav}}&lt;br /&gt;
&lt;br /&gt;
''← [[SDK 6.3]] · PAWN / Physics''&lt;br /&gt;
&lt;br /&gt;
==Data structures==&lt;br /&gt;
&lt;br /&gt;
===PHYSICS_CIRCLE_DATA===&lt;br /&gt;
Syntax:&lt;br /&gt;
 #define PHYSICS_CIRCLE_DATA .posX, .posY, .simplePosX, .simplePosY, .spdX, .spdY, .mass, .radius, .CoR, .module, .screen, .moduleT, .screenT,&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Array with named fields which represents a round object.&lt;br /&gt;
: Fields:&lt;br /&gt;
:* posX - circle position on X axis (fixed point)&lt;br /&gt;
:* posY - circle position on Y axis (fixed point)&lt;br /&gt;
:* simplePosX - circle position on X axis&lt;br /&gt;
:* simplePosY - circle position on Y axis&lt;br /&gt;
:* spdX - circle X speed&lt;br /&gt;
:* spdY - circle Y speed&lt;br /&gt;
:* mass - circle mass (fixed point)&lt;br /&gt;
:* radius - circle radius&lt;br /&gt;
:* CoR - Coefficient of restitution (fixed point)&lt;br /&gt;
:* module - module owner of this circle&lt;br /&gt;
:* screen - screen owner of this circle&lt;br /&gt;
:* moduleT - module transfer, last module owner. Can be used for resending messages&lt;br /&gt;
:* screenT - screen transfer, last screen owner. Can be used for resending messages&lt;br /&gt;
&lt;br /&gt;
==Functions==&lt;br /&gt;
&lt;br /&gt;
===Physics_Overlap===&lt;br /&gt;
Syntax:&lt;br /&gt;
 stock Physics_Overlap(overlap, positionDifference, distance)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: TBD: inner function&lt;br /&gt;
&lt;br /&gt;
===Physics_Circle_Vs_Circle_obj===&lt;br /&gt;
Syntax:&lt;br /&gt;
 stock Physics_Circle_Vs_Circle_obj(circle1[PHYSICS_CIRCLE_DATA], circle2[PHYSICS_CIRCLE_DATA])&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Check if there is a collision between two round objects.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''circle1, circle2''&lt;br /&gt;
:: objects for whom collision is checked&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: True if collision happens, false otherwise.&lt;br /&gt;
&lt;br /&gt;
See also: [[#Physics_Res_CvC_Coll_Mass|Physics_Res_CvC_Coll_Mass()]], [[#Physics_Res_CvC_Coll_Massless|Physics_Res_CvC_Coll_Massless()]]&lt;br /&gt;
&lt;br /&gt;
===Physics_Circle_vs_AABB_obj===&lt;br /&gt;
Syntax:&lt;br /&gt;
 stock Physics_Circle_vs_AABB_obj(circle[PHYSICS_CIRCLE_DATA], rectX, rectY, rectWidth, rectHeight, fakeCircle[PHYSICS_CIRCLE_DATA] = 0)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Check if there is a collision between round object and the axis-aligned&lt;br /&gt;
: bounding box.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''circle''&lt;br /&gt;
:: an object for whom collision is checked&lt;br /&gt;
: ''rectX, rectY,''&lt;br /&gt;
:: coordinates of the AABB object&lt;br /&gt;
: ''rectWidth, rectHeight''&lt;br /&gt;
:: dimensions of the AABB object&lt;br /&gt;
: Outputs&lt;br /&gt;
: ''fakeCircle''&lt;br /&gt;
:: collision point, can be used for resolving collision&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: True if collision happens, false otherwise.&lt;br /&gt;
&lt;br /&gt;
See also: [[#Physics_Res_CvC_Coll_Mass|Physics_Res_CvC_Coll_Mass()]], [[#Physics_Res_CvC_Coll_Massless|Physics_Res_CvC_Coll_Massless()]]&lt;br /&gt;
&lt;br /&gt;
===Physics_Circle_Vs_LineSegment===&lt;br /&gt;
Syntax:&lt;br /&gt;
 stock Physics_Circle_Vs_LineSegment(circle[PHYSICS_CIRCLE_DATA], lineSX, lineSY, lineEX, lineEY, fakeCircle[PHYSICS_CIRCLE_DATA] = 0)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Check if there is a collision between round object and the line.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''circle''&lt;br /&gt;
:: an object for whom collision is checked&lt;br /&gt;
: ''lineSX, lineSY, lineEX, lineEY''&lt;br /&gt;
:: the line start and end coordinates&lt;br /&gt;
: Outputs&lt;br /&gt;
: ''fakeCircle''&lt;br /&gt;
:: collision point, can be used for resolving collision&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: True if collision happens, false otherwise.&lt;br /&gt;
&lt;br /&gt;
See also: [[#Physics_Res_CvC_Coll_Mass|Physics_Res_CvC_Coll_Mass()]], [[#Physics_Res_CvC_Coll_Massless|Physics_Res_CvC_Coll_Massless()]]&lt;br /&gt;
&lt;br /&gt;
===Physics_Res_CvC_Coll_Massless===&lt;br /&gt;
Syntax:&lt;br /&gt;
 stock Physics_Res_CvC_Coll_Massless(circle1[PHYSICS_CIRCLE_DATA], circle2[PHYSICS_CIRCLE_DATA])&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Resolve collision without mass.&lt;br /&gt;
&lt;br /&gt;
See also: [[#Physics_Res_CvC_Coll_Mass|Physics_Res_CvC_Coll_Mass()]]&lt;br /&gt;
&lt;br /&gt;
===Physics_Res_CvC_Coll_Mass===&lt;br /&gt;
Syntax:&lt;br /&gt;
 stock Physics_Res_CvC_Coll_Mass(circle1[PHYSICS_CIRCLE_DATA], circle2[PHYSICS_CIRCLE_DATA])&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Resolve collision with mass&lt;br /&gt;
&lt;br /&gt;
See also: [[#Physics_Res_CvC_Coll_Massless|Physics_Res_CvC_Coll_Massless()]]&lt;br /&gt;
&lt;br /&gt;
===Physics_DeserializeCircle===&lt;br /&gt;
Syntax:&lt;br /&gt;
 stock Physics_DeserializeCircle(serializedData_1, serializedData_2, circle[PHYSICS_CIRCLE_DATA])&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Deserialize circle object data received from network.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''serializedData_1, serializedData_2''&lt;br /&gt;
:: data to deserialize&lt;br /&gt;
: Outputs&lt;br /&gt;
: ''circle''&lt;br /&gt;
:: deserialized data&lt;br /&gt;
&lt;br /&gt;
See also: [[#Physics_SerializeCircle|Physics_SerializeCircle()]], ON_Message()&lt;br /&gt;
&lt;br /&gt;
===Physics_SerializeCircle===&lt;br /&gt;
Syntax:&lt;br /&gt;
 stock Physics_SerializeCircle(obj[PHYSICS_CIRCLE_DATA], &amp;amp;serializedData_1, &amp;amp;serializedData_2)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Serialize circle object data to send it over network.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''obj''&lt;br /&gt;
:: an object to serialize&lt;br /&gt;
: Outputs&lt;br /&gt;
: ''serializedData_1, serializedData_2''&lt;br /&gt;
:: serialized data&lt;br /&gt;
&lt;br /&gt;
See also: [[#Physics_DeserializeCircle|Physics_DeserializeCircle()]], broadcastMessage()&lt;br /&gt;
&lt;br /&gt;
[[Category:SDK 6.3]]&lt;br /&gt;
[[Category:PAWN API]]&lt;/div&gt;</summary>
		<author><name>WowBot</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=SDK_6.3/PAWN/Network&amp;diff=16958</id>
		<title>SDK 6.3/PAWN/Network</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=SDK_6.3/PAWN/Network&amp;diff=16958"/>
		<updated>2026-07-26T09:45:53Z</updated>

		<summary type="html">&lt;p&gt;WowBot: Mark PAWN API as legacy (supported, not developed) (WowBot)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{notice|'''Official WOWCube SDK documentation.''' SDK 6.3, PAWN API. Generated from the canonical SDK headers — do not edit by hand; regenerate from source.}}&lt;br /&gt;
{{notice|'''Legacy track.''' The PAWN API is supported but no longer actively developed — the last PAWN additions shipped in SDK 6.2. New development uses the [[SDK 6.3/C++/Native API|C++ (WebAssembly) API]].}}&lt;br /&gt;
&lt;br /&gt;
{{SDK 6.3 nav}}&lt;br /&gt;
&lt;br /&gt;
''← [[SDK 6.3]] · PAWN / Network''&lt;br /&gt;
&lt;br /&gt;
Pawn works with cells which has a size of 4 bytes. Native interfaces&lt;br /&gt;
handling generic data like network messages have size limits for that data.&lt;br /&gt;
If application does not need to work with a large numbers, several values&lt;br /&gt;
can be packed into a single cell. This library provides some convenient&lt;br /&gt;
functions to pack and unpack such values from array of cells which can be&lt;br /&gt;
broadcasted over network by core functions.&lt;br /&gt;
&lt;br /&gt;
==Functions==&lt;br /&gt;
&lt;br /&gt;
===NetWorkReset===&lt;br /&gt;
Syntax:&lt;br /&gt;
 NetWorkReset()&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Reset state before storing new data to pack.&lt;br /&gt;
&lt;br /&gt;
===NetWorkWriteValue===&lt;br /&gt;
Syntax:&lt;br /&gt;
 NetWorkWriteValue(value, bits)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Store specified number of bits from some unsigned value.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''value''&lt;br /&gt;
:: a value to store data from&lt;br /&gt;
: ''bits''&lt;br /&gt;
:: a number of bits to store&lt;br /&gt;
&lt;br /&gt;
===NetWorkWriteSignedValue===&lt;br /&gt;
Syntax:&lt;br /&gt;
 NetWorkWriteSignedValue(value, bits)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Store specified number of bits from some signed value.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''value''&lt;br /&gt;
:: a value to store data from&lt;br /&gt;
: ''bits''&lt;br /&gt;
:: a number of bits to store&lt;br /&gt;
&lt;br /&gt;
===NetWorkReadValue===&lt;br /&gt;
Syntax:&lt;br /&gt;
 NetWorkReadValue(bits)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Read specified number of bits of packed unsigned value.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''bits''&lt;br /&gt;
:: a number of bits to get&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Unpacked unsigned value.&lt;br /&gt;
&lt;br /&gt;
===NetWorkReadSignedValue===&lt;br /&gt;
Syntax:&lt;br /&gt;
 NetWorkReadSignedValue(bits)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Read specified number of bits of packed signed value.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''bits''&lt;br /&gt;
:: a number of bits to get&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Unpacked signed value.&lt;br /&gt;
&lt;br /&gt;
===NetWorkSetData===&lt;br /&gt;
Syntax:&lt;br /&gt;
 NetWorkSetData(const pkt[], size)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Populate state with a new data to unpack.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''pkt''&lt;br /&gt;
:: packet data to unpack&lt;br /&gt;
&lt;br /&gt;
See also: [[SDK 6.3/PAWN/Core#ON_Packet|ON_Packet()]]&lt;br /&gt;
&lt;br /&gt;
===NetWorkGetData===&lt;br /&gt;
Syntax:&lt;br /&gt;
 NetWorkGetData()&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get packed data to broadcast.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Packed data to broadcast.&lt;br /&gt;
&lt;br /&gt;
See also: [[SDK 6.3/PAWN/Core#broadcastPacket|broadcastPacket()]]&lt;br /&gt;
&lt;br /&gt;
===NetWorkGetDataSize===&lt;br /&gt;
Syntax:&lt;br /&gt;
 NetWorkGetDataSize()&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get packed data to broadcast.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Packed size to broadcast.&lt;br /&gt;
&lt;br /&gt;
See also: [[SDK 6.3/PAWN/Core#broadcastPacket|broadcastPacket()]]&lt;br /&gt;
&lt;br /&gt;
[[Category:SDK 6.3]]&lt;br /&gt;
[[Category:PAWN API]]&lt;/div&gt;</summary>
		<author><name>WowBot</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=SDK_6.3/PAWN/Leaderboard&amp;diff=16955</id>
		<title>SDK 6.3/PAWN/Leaderboard</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=SDK_6.3/PAWN/Leaderboard&amp;diff=16955"/>
		<updated>2026-07-26T09:45:52Z</updated>

		<summary type="html">&lt;p&gt;WowBot: Mark PAWN API as legacy (supported, not developed) (WowBot)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{notice|'''Official WOWCube SDK documentation.''' SDK 6.3, PAWN API. Generated from the canonical SDK headers — do not edit by hand; regenerate from source.}}&lt;br /&gt;
{{notice|'''Legacy track.''' The PAWN API is supported but no longer actively developed — the last PAWN additions shipped in SDK 6.2. New development uses the [[SDK 6.3/C++/Native API|C++ (WebAssembly) API]].}}&lt;br /&gt;
&lt;br /&gt;
{{SDK 6.3 nav}}&lt;br /&gt;
&lt;br /&gt;
''← [[SDK 6.3]] · PAWN / Leaderboard''&lt;br /&gt;
&lt;br /&gt;
==Data structures==&lt;br /&gt;
&lt;br /&gt;
===LB_INFO===&lt;br /&gt;
Syntax:&lt;br /&gt;
 #define LB_INFO [.leadCount, .selfPosition, .selfScore, .wholeUserListCount]&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Array with named fields with various leaderboard information.&lt;br /&gt;
: Fields:&lt;br /&gt;
:* leadCount - how many best results there are available to display&lt;br /&gt;
:* selfPosition - place which current user takes&lt;br /&gt;
:* selfScore - current users score&lt;br /&gt;
:* wholeUserListCount - total users count&lt;br /&gt;
&lt;br /&gt;
See also: [[#LB_getInfo|LB_getInfo()]]&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - added&lt;br /&gt;
&lt;br /&gt;
==Functions==&lt;br /&gt;
&lt;br /&gt;
===LB_getInfo===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native LB_getInfo(info[LB_INFO]);&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get leaderboard description.&lt;br /&gt;
: Players score and achievements can be saved and shared via mobile&lt;br /&gt;
: application and WOWCube Entertainment System servers. This function&lt;br /&gt;
: provides synced information necessary to display points table.&lt;br /&gt;
: Outputs&lt;br /&gt;
:* info - structure describing leaderboard&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Error code:&lt;br /&gt;
: * 0 - success&lt;br /&gt;
: * -1 - incorrect arguments count&lt;br /&gt;
: * -2 - leaderboard is not synced&lt;br /&gt;
: * -3 - fail to fill output structure&lt;br /&gt;
&lt;br /&gt;
See also: [[#LB_INFO|LB_INFO]], [[#LB_getScore|LB_getScore()]]&lt;br /&gt;
&lt;br /&gt;
===LB_getScore===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native LB_getScore(leadTableBin[], size = sizeof(leadTableBin));&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get best results data data.&lt;br /&gt;
: Players score and achievements can be saved and shared via mobile&lt;br /&gt;
: application and WOWCube Entertainment System servers. This function&lt;br /&gt;
: provides best results table data.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''size''&lt;br /&gt;
:: how many results to get&lt;br /&gt;
: Outputs&lt;br /&gt;
: ''leadTableBin''&lt;br /&gt;
:: TBD, should be structure with name and score&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Error code:&lt;br /&gt;
: * 0 - success&lt;br /&gt;
: * -1 - incorrect arguments count&lt;br /&gt;
: * -2 - leaderboard is not synced&lt;br /&gt;
: * -3 - fail to fill output structure&lt;br /&gt;
&lt;br /&gt;
See also: [[#LB_getInfo|LB_getInfo()]]&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - align error codes with LB_getInfo.&lt;br /&gt;
&lt;br /&gt;
[[Category:SDK 6.3]]&lt;br /&gt;
[[Category:PAWN API]]&lt;/div&gt;</summary>
		<author><name>WowBot</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=SDK_6.3/PAWN/Splash_Screen&amp;diff=16956</id>
		<title>SDK 6.3/PAWN/Splash Screen</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=SDK_6.3/PAWN/Splash_Screen&amp;diff=16956"/>
		<updated>2026-07-26T09:45:52Z</updated>

		<summary type="html">&lt;p&gt;WowBot: Mark PAWN API as legacy (supported, not developed) (WowBot)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{notice|'''Official WOWCube SDK documentation.''' SDK 6.3, PAWN API. Generated from the canonical SDK headers — do not edit by hand; regenerate from source.}}&lt;br /&gt;
{{notice|'''Legacy track.''' The PAWN API is supported but no longer actively developed — the last PAWN additions shipped in SDK 6.2. New development uses the [[SDK 6.3/C++/Native API|C++ (WebAssembly) API]].}}&lt;br /&gt;
&lt;br /&gt;
{{SDK 6.3 nav}}&lt;br /&gt;
&lt;br /&gt;
''← [[SDK 6.3]] · PAWN / Splash Screen''&lt;br /&gt;
&lt;br /&gt;
==Enumerations==&lt;br /&gt;
&lt;br /&gt;
===e_ssLeadersDataType===&lt;br /&gt;
Syntax:&lt;br /&gt;
 const e_ssLeadersDataType:  {&lt;br /&gt;
     ssTypeNumber = 1,&lt;br /&gt;
         ssTypeTime = 2,&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Enumeration of results type in the leader board.&lt;br /&gt;
:* ssTypeNumber - display scores in the leader board&lt;br /&gt;
:* ssTypeTime - display time in the leader board&lt;br /&gt;
&lt;br /&gt;
===e_ssLeaderBoardType===&lt;br /&gt;
Syntax:&lt;br /&gt;
 const e_ssLeaderBoardType:  {&lt;br /&gt;
     ssWithoutSaves = 0,&lt;br /&gt;
         ssWithSaves = 1,&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Enumeration of the leader board types.&lt;br /&gt;
:* ssWithoutSaves - first run of the application and it does not have saves and&lt;br /&gt;
: previous results&lt;br /&gt;
:* ssWithSaves - application has a save to continue from&lt;br /&gt;
&lt;br /&gt;
==Constants and defines==&lt;br /&gt;
&lt;br /&gt;
===e_ssScreensType===&lt;br /&gt;
Syntax:&lt;br /&gt;
 const e_ssScreensType:  {&lt;br /&gt;
     ssEmpty = 0,&lt;br /&gt;
         ssFirstLeaderGroup,&lt;br /&gt;
         ssSecondLeaderGroup,&lt;br /&gt;
         ssHighScore,&lt;br /&gt;
         ssLeaderboardSprite,&lt;br /&gt;
         ssAppName,&lt;br /&gt;
         ssMainImage,&lt;br /&gt;
         ssLastResultsSprite,&lt;br /&gt;
         ssLastParameter1,&lt;br /&gt;
         ssLastParameter2,&lt;br /&gt;
         ssLastParameter3,&lt;br /&gt;
         ssTwistIcon,&lt;br /&gt;
         ssTwistLabelWithIcon,&lt;br /&gt;
         ssTwistLabelWithoutIcon,&lt;br /&gt;
         ssPatIcon,&lt;br /&gt;
         ssPatLabelWithIcon,&lt;br /&gt;
         ssPatLabelWithoutIcon,&lt;br /&gt;
         ssQRCode,&lt;br /&gt;
         ssTypeMax,&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Enum  the main preset types of screens.&lt;br /&gt;
:* ssEmpty - A blank screen, only the background is displayed&lt;br /&gt;
:* ssFirstLeaderGroup - Leaderboard screen with 1-5 positions&lt;br /&gt;
:* ssSecondLeaderGroup - Leaderboard screen with 6-10 positions&lt;br /&gt;
:* ssHighScore - The display screen of the personal best or&lt;br /&gt;
: the top score of the leaderboard&lt;br /&gt;
:* ssLeaderboardSprite - Leaderboard sprite screen&lt;br /&gt;
:* ssAppName - App title screen&lt;br /&gt;
:* ssMainImage - App logo screen&lt;br /&gt;
:* ssLastResultsSprite - Last results sprite screen&lt;br /&gt;
:* ssLastParameter1 - Parameter1 screen&lt;br /&gt;
:* ssLastParameter2 - Parameter2 screen&lt;br /&gt;
:* ssLastParameter3 - Parameter3 screen&lt;br /&gt;
:* ssTwistIcon - Twist icon screen without label&lt;br /&gt;
:* ssTwistLabelWithIcon - Twist label screen with icon&lt;br /&gt;
:* ssTwistLabelWithoutIcon - Twist label screen without label&lt;br /&gt;
:* ssPatIcon - Pat icon screen without label&lt;br /&gt;
:* ssPatLabelWithIcon - Pat label screen with icon&lt;br /&gt;
:* ssPatLabelWithoutIcon - Pat label screen without label&lt;br /&gt;
:* ssQRCode - QR code screen&lt;br /&gt;
:* ssTypeMax - The maximum value of the types is used as the&lt;br /&gt;
: first value of the user-defined types&lt;br /&gt;
&lt;br /&gt;
===SPLASH_SCREEN_MAX_LEADERS===&lt;br /&gt;
Syntax:&lt;br /&gt;
 #define SPLASH_SCREEN_MAX_LEADERS 10&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: How many leaders can be displayed on the splash screen.&lt;br /&gt;
&lt;br /&gt;
===SPLASH_SCREEN_MAX_PARAMETERS===&lt;br /&gt;
Syntax:&lt;br /&gt;
 #define SPLASH_SCREEN_MAX_PARAMETERS 3&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: How many different detailed parametr types exist.&lt;br /&gt;
&lt;br /&gt;
===LEADERBOARD_SIZE===&lt;br /&gt;
Syntax:&lt;br /&gt;
 #define LEADERBOARD_SIZE 30&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: The size of the leaderboard array obtained in LB_getScore.&lt;br /&gt;
&lt;br /&gt;
===STRING_VALUE_SIZE===&lt;br /&gt;
Syntax:&lt;br /&gt;
 #define STRING_VALUE_SIZE 15&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: The maximum length of a string to output a value.&lt;br /&gt;
&lt;br /&gt;
==Data structures==&lt;br /&gt;
&lt;br /&gt;
===LEADER_DATA===&lt;br /&gt;
Syntax:&lt;br /&gt;
 #define LEADER_DATA .name{16}, .value{STRING_VALUE_SIZE}&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Array with named fields which represents a line in score table.&lt;br /&gt;
: Fields:&lt;br /&gt;
:* name - user name&lt;br /&gt;
:* value - user score&lt;br /&gt;
&lt;br /&gt;
===LEADER_DATA===&lt;br /&gt;
Syntax:&lt;br /&gt;
 #define PARAMETRS_DATA .name{10}, .value{STRING_VALUE_SIZE}, .fontSize&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: An array with named fields, which represents the values on&lt;br /&gt;
: the parameters screen.&lt;br /&gt;
: Fields:&lt;br /&gt;
:* name - user name&lt;br /&gt;
:* value - user score&lt;br /&gt;
:* fontSize - font size&lt;br /&gt;
&lt;br /&gt;
===LEADER_DATA===&lt;br /&gt;
Syntax:&lt;br /&gt;
 #define RECORD_DATA .value{STRING_VALUE_SIZE}, .fontSize&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: An array with named fields, which represents the values on&lt;br /&gt;
: the record screen.&lt;br /&gt;
: Fields:&lt;br /&gt;
:* name - user name&lt;br /&gt;
:* value - user score&lt;br /&gt;
:* fontSize - font size&lt;br /&gt;
&lt;br /&gt;
==Functions==&lt;br /&gt;
&lt;br /&gt;
===ssON_Render===&lt;br /&gt;
Syntax:&lt;br /&gt;
 stock ssON_Render()&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Splash screen ON_Render&lt;br /&gt;
: Splash screen rendering&lt;br /&gt;
&lt;br /&gt;
===ssON_Tick===&lt;br /&gt;
Syntax:&lt;br /&gt;
 stock ssON_Tick(dt)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Splash screen ON_Tick&lt;br /&gt;
: Splash screen rendering&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''dt''&lt;br /&gt;
:: Delta time between ticks&lt;br /&gt;
&lt;br /&gt;
===ssSetPlaces===&lt;br /&gt;
Syntax:&lt;br /&gt;
 stock ssSetPlaces(place0[TOPOLOGY_PLACE], place1[TOPOLOGY_PLACE], place2[TOPOLOGY_PLACE])&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Customize topology&lt;br /&gt;
: Set user-defined topology&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''place0''&lt;br /&gt;
:: the place for the 0 screen&lt;br /&gt;
: ''place1''&lt;br /&gt;
:: the place for the 1 screen&lt;br /&gt;
: ''place2''&lt;br /&gt;
:: the place for the 2 screen&lt;br /&gt;
&lt;br /&gt;
===ssSetPlaces===&lt;br /&gt;
Syntax:&lt;br /&gt;
 stock ssGetPlace(screen)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get topology for customize&lt;br /&gt;
: Get topology for customize screens&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''screen''&lt;br /&gt;
:: The ID of the screen&lt;br /&gt;
&lt;br /&gt;
===ssSetSplashScreenNamedValue===&lt;br /&gt;
Syntax:&lt;br /&gt;
 stock ssSetSplashScreenNamedValue(name { 10 }, value, e_ssLeadersDataType:valueType = e_ssLeadersDataType:ssTypeNumber)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Set named value, for example: 'time', 'level' etc&lt;br /&gt;
: Set named value, for example: 'time', 'level' etc&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''name''&lt;br /&gt;
:: name of the parameter&lt;br /&gt;
: ''value''&lt;br /&gt;
:: value of the parameter&lt;br /&gt;
: ''valueType''&lt;br /&gt;
:: type of the parameter value&lt;br /&gt;
&lt;br /&gt;
===ssSetSplashScreenRecord===&lt;br /&gt;
Syntax:&lt;br /&gt;
 stock ssSetSplashScreenRecord(value, e_ssLeadersDataType:valueType = e_ssLeadersDataType:ssTypeNumber)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Customize record&lt;br /&gt;
: Set user-defined record&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''value''&lt;br /&gt;
:: value of the record&lt;br /&gt;
: ''valueType''&lt;br /&gt;
:: type of the record value&lt;br /&gt;
&lt;br /&gt;
===SetSeparator===&lt;br /&gt;
Syntax:&lt;br /&gt;
 stock ssSetSeparator(l_separator)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Customize twist and Pat labels&lt;br /&gt;
: Set user-defined separator&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''l_separator''&lt;br /&gt;
:: text separator for splitting into 2 lines&lt;br /&gt;
&lt;br /&gt;
===ssSetTexts===&lt;br /&gt;
Syntax:&lt;br /&gt;
 stock ssSetTexts(patWI[] = &amp;quot;&amp;quot;, patWoI[] = &amp;quot;&amp;quot;, twistWI[] = &amp;quot;&amp;quot;, twistWoI[] = &amp;quot;&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Customize twist and Pat labels&lt;br /&gt;
: Set user-defined twist and Pat labels&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''patWI''&lt;br /&gt;
:: the text for pat screen with icon&lt;br /&gt;
: ''patWoI''&lt;br /&gt;
:: the text for pat screen without icon&lt;br /&gt;
: ''twistWI''&lt;br /&gt;
:: the text for twist screen with icon&lt;br /&gt;
: ''twistWoI''&lt;br /&gt;
:: the text for twist screen without icon&lt;br /&gt;
&lt;br /&gt;
===ssSetApplicationNameText===&lt;br /&gt;
Syntax:&lt;br /&gt;
 stock ssSetApplicationNameText(title { 64 })&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Customize text of the application name&lt;br /&gt;
: Set user-defined text of the application name. Used if the s&lt;br /&gt;
: prite of the application title is missing&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''title''&lt;br /&gt;
:: name of application&lt;br /&gt;
&lt;br /&gt;
===ssSetLeaderBoardTablePreset===&lt;br /&gt;
Syntax:&lt;br /&gt;
 stock ssSetLeaderBoardTablePreset(e_ssLeaderBoardType:type)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Customize leaderboard table from preset&lt;br /&gt;
: Set leaderBoardMapping from preset by type&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''type''&lt;br /&gt;
:: The type of the preset table&lt;br /&gt;
&lt;br /&gt;
See also: [[#e_ssLeaderBoardType|e_ssLeaderBoardType]], [[#e_ssLeadersDataType|e_ssLeadersDataType]]&lt;br /&gt;
&lt;br /&gt;
===ssSetLeaderBoardTable===&lt;br /&gt;
Syntax:&lt;br /&gt;
 stock ssSetLeaderBoardTable(e_ssLeaderBoardType:leaderBoardTable[TOPOLOGY_FACES_MAX] { TOPOLOGY_POSITIONS_MAX })&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Customize leaderboard table from user-defined table&lt;br /&gt;
: Customize playback speed for animated icons&lt;br /&gt;
: Set leaderBoardMapping from user-defined table&lt;br /&gt;
: Set playback speed for animated icons&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''leaderBoardTable''&lt;br /&gt;
:: user-defined table&lt;br /&gt;
: ''pat''&lt;br /&gt;
:: playback speed for pat icon&lt;br /&gt;
: ''twist''&lt;br /&gt;
:: playback speed for twist icon&lt;br /&gt;
&lt;br /&gt;
See also: [[#e_ssLeaderBoardType|e_ssLeaderBoardType]], [[#e_ssLeadersDataType|e_ssLeadersDataType]]&lt;br /&gt;
&lt;br /&gt;
===ssSetQRCodeLink===&lt;br /&gt;
Syntax:&lt;br /&gt;
 stock ssSetQRCodeLink(qrCodeLink { 32 })&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Customize link for a QR Code&lt;br /&gt;
: Set link for a QR Code. If not specified, the QR code sprite will be displayed&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''qrCodeLink''&lt;br /&gt;
:: qrCodeLink&lt;br /&gt;
&lt;br /&gt;
===InitSplashScreenSprites===&lt;br /&gt;
Syntax:&lt;br /&gt;
 stock InitSplashScreenSprites(backgroundSprite = -1,&lt;br /&gt;
     mainImageSprite = -1,&lt;br /&gt;
     gameNameSprite = -1,&lt;br /&gt;
     QRcodeSprite = -1,&lt;br /&gt;
     leaderboardIcon = -1,&lt;br /&gt;
     resultsIcon = -1,&lt;br /&gt;
     twistIcon_1 = -1,&lt;br /&gt;
     twistIcon_2 = -1,&lt;br /&gt;
     patIcon_1 = -1,&lt;br /&gt;
     patIcon_2 = -1,&lt;br /&gt;
     borderYou = -1)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Customize splash screen.&lt;br /&gt;
: Set IDs of sprite used to draw different elements of the splash screen.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''backgroundSprite''&lt;br /&gt;
:: ID of a background image. If ID=-1, then a user defined render will be called&lt;br /&gt;
: ''mainImageSprite''&lt;br /&gt;
:: ID of an application logo, may differ from a menu&lt;br /&gt;
: icon&lt;br /&gt;
: ''gameNameSprite''&lt;br /&gt;
:: ID of an image with application name, to display it with&lt;br /&gt;
: some custom font&lt;br /&gt;
: ''QRcodeSprite''&lt;br /&gt;
:: ID of a QR code&lt;br /&gt;
: ''leaderboardIcon''&lt;br /&gt;
:: ID of a leader board icon&lt;br /&gt;
: ''resultsIcon''&lt;br /&gt;
:: ID of a result icon&lt;br /&gt;
: ''twistIcon_1, twistIcon_2''&lt;br /&gt;
:: IDs of twist animation images&lt;br /&gt;
: ''patIcon_1, patIcon_2''&lt;br /&gt;
:: IDs of Pat animation images&lt;br /&gt;
: ''borderYou''&lt;br /&gt;
:: a border that highlights you in the leaderboard&lt;br /&gt;
&lt;br /&gt;
===InitSplashScreenBasics===&lt;br /&gt;
Syntax:&lt;br /&gt;
 stock InitSplashScreenBasics(base = 0xFFFFFFFF, key = 0xFFFFFFFF,&lt;br /&gt;
     e_ssLeadersDataType:dataType = ssTypeNumber)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Set how splash screen should be displayed.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''base''&lt;br /&gt;
:: base color for all text labels in ARGB8888 format&lt;br /&gt;
: ''key''&lt;br /&gt;
:: accent color for text labels in ARGB8888 format&lt;br /&gt;
: ''leaderBoardType''&lt;br /&gt;
:: type of splash screen&lt;br /&gt;
: ''dataType''&lt;br /&gt;
:: type of results in the leader board&lt;br /&gt;
&lt;br /&gt;
See also: [[#e_ssLeaderBoardType|e_ssLeaderBoardType]], [[#e_ssLeadersDataType|e_ssLeadersDataType]]&lt;br /&gt;
&lt;br /&gt;
===InitSplashScreenBasics===&lt;br /&gt;
Syntax:&lt;br /&gt;
 stock ssSetPosition(screen, x = 120, y = 120, angle = 0)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Calculation of coordinates and rotation angle relative to screen&lt;br /&gt;
: rotation in topology&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''screen''&lt;br /&gt;
:: The ID of the screen relative to which the coordinates&lt;br /&gt;
: and rotation angle will be transformed&lt;br /&gt;
: ''x''&lt;br /&gt;
:: X coordinate&lt;br /&gt;
: ''y''&lt;br /&gt;
:: Y coordinate&lt;br /&gt;
: ''angle''&lt;br /&gt;
:: angle of rotation of sprite or text&lt;br /&gt;
&lt;br /&gt;
===InitSplashScreenBasics===&lt;br /&gt;
Syntax:&lt;br /&gt;
 stock ssRenderImage(id)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Rendering image&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''id''&lt;br /&gt;
:: Image ID&lt;br /&gt;
&lt;br /&gt;
===InitSplashScreenBasics===&lt;br /&gt;
Syntax:&lt;br /&gt;
 stock ssRenderText(text[], size, color, align = TEXT_ALIGN_CENTER)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Rendering text&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''text''&lt;br /&gt;
:: text to display&lt;br /&gt;
: ''size''&lt;br /&gt;
:: text size&lt;br /&gt;
: ''color''&lt;br /&gt;
:: text color&lt;br /&gt;
: ''align''&lt;br /&gt;
:: text align&lt;br /&gt;
&lt;br /&gt;
[[Category:SDK 6.3]]&lt;br /&gt;
[[Category:PAWN API]]&lt;/div&gt;</summary>
		<author><name>WowBot</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=SDK_6.3/PAWN/Sound&amp;diff=16953</id>
		<title>SDK 6.3/PAWN/Sound</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=SDK_6.3/PAWN/Sound&amp;diff=16953"/>
		<updated>2026-07-26T09:45:51Z</updated>

		<summary type="html">&lt;p&gt;WowBot: Mark PAWN API as legacy (supported, not developed) (WowBot)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{notice|'''Official WOWCube SDK documentation.''' SDK 6.3, PAWN API. Generated from the canonical SDK headers — do not edit by hand; regenerate from source.}}&lt;br /&gt;
{{notice|'''Legacy track.''' The PAWN API is supported but no longer actively developed — the last PAWN additions shipped in SDK 6.2. New development uses the [[SDK 6.3/C++/Native API|C++ (WebAssembly) API]].}}&lt;br /&gt;
&lt;br /&gt;
{{SDK 6.3 nav}}&lt;br /&gt;
&lt;br /&gt;
''← [[SDK 6.3]] · PAWN / Sound''&lt;br /&gt;
&lt;br /&gt;
==Functions==&lt;br /&gt;
&lt;br /&gt;
===SND_getAssetId===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native SND_getAssetId(const name[]);&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get a sound ID by the filename.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''name''&lt;br /&gt;
:: sound filename for which ID is requested&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: The ID of sound with a given filename or -1 in case of error.&lt;br /&gt;
&lt;br /&gt;
See also: [[#SND_play|SND_play()]], [[SDK 6.3/PAWN/Core#ON_Init|ON_Init()]]&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - renamed from SND_getId() to SND_getAssetId()&lt;br /&gt;
: v6.0 - truncate asset name in WASM API&lt;br /&gt;
&lt;br /&gt;
===SND_play===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native SND_play(const id, const volume);&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Play sound by ID.&lt;br /&gt;
: Play any sound by its ID. Platform does not support audio mixing, so&lt;br /&gt;
: previously playing sound will be stopped if it has not yet finished.&lt;br /&gt;
: Supported audio formats:&lt;br /&gt;
:* WAV&lt;br /&gt;
:* MP3&lt;br /&gt;
:* MIDI&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''id''&lt;br /&gt;
:: an ID of sound to play&lt;br /&gt;
: ''volume''&lt;br /&gt;
:: volume of sound in percents to play, range 0..100&lt;br /&gt;
&lt;br /&gt;
See also: [[#SND_getAssetId|SND_getAssetId()]]&lt;br /&gt;
&lt;br /&gt;
===SND_cacheSounds===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native SND_cacheSounds(soundList[], size = sizeof(soundList));&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Force platform to cache application sounds.&lt;br /&gt;
: Platform automatically reads and caches sounds from flash when the&lt;br /&gt;
: application plays a sound. Flash operations are synchronous and may cause&lt;br /&gt;
: delays especially when reading large portions of data. To prevent the&lt;br /&gt;
: application from lags it is possible to cache sound data in advance.&lt;br /&gt;
: However if application requests to play a non-cached sound and there is not&lt;br /&gt;
: enough memory then oldest accessed sounds will be removed from cache. Also&lt;br /&gt;
: there is a limit of 256 for a total number of cached sounds.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''soundList''&lt;br /&gt;
:: array with IDs of sounds to cache&lt;br /&gt;
: ''size''&lt;br /&gt;
:: size of soundList array&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Number of cached sounds or negative value if an error happened. Error&lt;br /&gt;
: codes:&lt;br /&gt;
: * -1 invalid function arguments count&lt;br /&gt;
: * -2 invalid soundList array&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - moved from appCtrl module to sound&lt;br /&gt;
&lt;br /&gt;
===SND_isPlaying===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native bool:SND_isPlaying();&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Check if audio is playing.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: True if audio is playing, false otherwise.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.0 - added&lt;br /&gt;
&lt;br /&gt;
===SND_stop===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native SND_stop();&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Stop playing sound if any.&lt;br /&gt;
&lt;br /&gt;
See also: [[#SND_play|SND_play()]]&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.0 - added&lt;br /&gt;
&lt;br /&gt;
===SND_getAssetsCount===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native SND_getAssetsCount();&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get the total count of sound assets.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Number of sound assets.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.0 - added&lt;br /&gt;
&lt;br /&gt;
===PlayRandomSound===&lt;br /&gt;
Syntax:&lt;br /&gt;
 stock bool:PlayRandomSound(const snd[], const volume, const bool: stopPlaying = true, size = sizeof(snd))&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Play random sound from an array.&lt;br /&gt;
: Play random sound from an array.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''snd''&lt;br /&gt;
:: the array of sounds from which the sound will be selected&lt;br /&gt;
: ''volume''&lt;br /&gt;
:: sound volume&lt;br /&gt;
: ''stopPlaying''&lt;br /&gt;
:: stop sound playback if it is being played&lt;br /&gt;
: ''size''&lt;br /&gt;
:: size of the array snd&lt;br /&gt;
&lt;br /&gt;
See also: [[#PlayLoopRandomSound|PlayLoopRandomSound()]]&lt;br /&gt;
&lt;br /&gt;
===PlayLoopRandomSound===&lt;br /&gt;
Syntax:&lt;br /&gt;
 stock PlayLoopRandomSound(const snd[], const volume, const delayMin, const delayMax, dt, size = sizeof(snd))&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Play random sound from an array in a loop with a specified delay range.&lt;br /&gt;
: Play random sound from an array in a loop with a specified delay range.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''snd''&lt;br /&gt;
:: the array of sounds from which the sound will be selected&lt;br /&gt;
: ''volume''&lt;br /&gt;
:: sound volume&lt;br /&gt;
: ''delayMin''&lt;br /&gt;
:: minimum delay&lt;br /&gt;
: ''delayMax''&lt;br /&gt;
:: maximum delay&lt;br /&gt;
: ''dt''&lt;br /&gt;
:: delta time&lt;br /&gt;
: ''size''&lt;br /&gt;
:: size of the array snd&lt;br /&gt;
&lt;br /&gt;
See also: [[#PlayRandomSound|PlayRandomSound()]]&lt;br /&gt;
&lt;br /&gt;
[[Category:SDK 6.3]]&lt;br /&gt;
[[Category:PAWN API]]&lt;/div&gt;</summary>
		<author><name>WowBot</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=SDK_6.3/PAWN/Motion_Sensor&amp;diff=16954</id>
		<title>SDK 6.3/PAWN/Motion Sensor</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=SDK_6.3/PAWN/Motion_Sensor&amp;diff=16954"/>
		<updated>2026-07-26T09:45:51Z</updated>

		<summary type="html">&lt;p&gt;WowBot: Mark PAWN API as legacy (supported, not developed) (WowBot)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{notice|'''Official WOWCube SDK documentation.''' SDK 6.3, PAWN API. Generated from the canonical SDK headers — do not edit by hand; regenerate from source.}}&lt;br /&gt;
{{notice|'''Legacy track.''' The PAWN API is supported but no longer actively developed — the last PAWN additions shipped in SDK 6.2. New development uses the [[SDK 6.3/C++/Native API|C++ (WebAssembly) API]].}}&lt;br /&gt;
&lt;br /&gt;
{{SDK 6.3 nav}}&lt;br /&gt;
&lt;br /&gt;
''← [[SDK 6.3]] · PAWN / Motion Sensor''&lt;br /&gt;
&lt;br /&gt;
==Event handlers==&lt;br /&gt;
&lt;br /&gt;
===ON_Pat===&lt;br /&gt;
Syntax:&lt;br /&gt;
 forward ON_Tap(const count, const display, const bool:opposite);&lt;br /&gt;
 forward ON_Pat(const count, const display, const bool:opposite);&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Pats handler.&lt;br /&gt;
: Public function with such signature will be called when the pats sequence&lt;br /&gt;
: is detected.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''count''&lt;br /&gt;
:: how many pats there are in the pats sequence&lt;br /&gt;
: ''display''&lt;br /&gt;
:: TBD: currently most recent pats axis&lt;br /&gt;
: ''opposite''&lt;br /&gt;
:: true, if most recent pat was detected from the opposite side&lt;br /&gt;
: of cube&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.2 - ON_Tap is deprecated, added ON_Pat alias&lt;br /&gt;
&lt;br /&gt;
==Functions==&lt;br /&gt;
&lt;br /&gt;
===MS_getFaceAccelX===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native MS_getFaceAccelX(const display);&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get accelerometer value along X axis of some display.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''display''&lt;br /&gt;
:: for which accelerometer value will be returned&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Accelerometer value along X axis.&lt;br /&gt;
&lt;br /&gt;
===MS_getFaceAccelY===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native MS_getFaceAccelY(const display);&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get accelerometer value along Y axis of some display.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''display''&lt;br /&gt;
:: for which accelerometer value will be returned&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Accelerometer value along Y axis.&lt;br /&gt;
&lt;br /&gt;
===MS_getFaceAccelZ===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native MS_getFaceAccelZ(const display);&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get accelerometer value along Z axis of some display.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''display''&lt;br /&gt;
:: for which accelerometer value will be returned&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Accelerometer value along Z axis.&lt;br /&gt;
&lt;br /&gt;
===MS_getFaceGyroX===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native MS_getFaceGyroX(const display);&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get gyroscope value around X axis of some display.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''display''&lt;br /&gt;
:: for which gyroscope value will be returned&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Gyroscope value around X axis.&lt;br /&gt;
&lt;br /&gt;
===MS_getFaceGyroY===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native MS_getFaceGyroY(const display);&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get gyroscope value around Y axis of some display.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''display''&lt;br /&gt;
:: for which gyroscope value will be returned&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Gyroscope value around Y axis.&lt;br /&gt;
&lt;br /&gt;
===MS_getFaceGyroZ===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native MS_getFaceGyroZ(const display);&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get gyroscope value around Z axis of some display.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''display''&lt;br /&gt;
:: for which gyroscope value will be returned&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Gyroscope value around Z axis.&lt;br /&gt;
&lt;br /&gt;
[[Category:SDK 6.3]]&lt;br /&gt;
[[Category:PAWN API]]&lt;/div&gt;</summary>
		<author><name>WowBot</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=SDK_6.3/PAWN/Topology&amp;diff=16952</id>
		<title>SDK 6.3/PAWN/Topology</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=SDK_6.3/PAWN/Topology&amp;diff=16952"/>
		<updated>2026-07-26T09:45:50Z</updated>

		<summary type="html">&lt;p&gt;WowBot: Mark PAWN API as legacy (supported, not developed) (WowBot)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{notice|'''Official WOWCube SDK documentation.''' SDK 6.3, PAWN API. Generated from the canonical SDK headers — do not edit by hand; regenerate from source.}}&lt;br /&gt;
{{notice|'''Legacy track.''' The PAWN API is supported but no longer actively developed — the last PAWN additions shipped in SDK 6.2. New development uses the [[SDK 6.3/C++/Native API|C++ (WebAssembly) API]].}}&lt;br /&gt;
&lt;br /&gt;
{{SDK 6.3 nav}}&lt;br /&gt;
&lt;br /&gt;
''← [[SDK 6.3]] · PAWN / Topology''&lt;br /&gt;
&lt;br /&gt;
==Enumerations==&lt;br /&gt;
&lt;br /&gt;
===TOPOLOGY_neighbor===&lt;br /&gt;
Syntax:&lt;br /&gt;
 const TOPOLOGY_neighbor: {&lt;br /&gt;
   NEIGHBOR_SELF = 0,&lt;br /&gt;
   NEIGHBOR_LEFT,&lt;br /&gt;
   NEIGHBOR_DIAGONAL,&lt;br /&gt;
   NEIGHBOR_TOP,&lt;br /&gt;
   NEIGHBOR_RIGHT,&lt;br /&gt;
   NEIGHBOR_BOTTOM,&lt;br /&gt;
   NEIGHBOR_MAX,&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Enumeration of a facelet neighbor directions.&lt;br /&gt;
&lt;br /&gt;
===TOPOLOGY_orientation===&lt;br /&gt;
Syntax:&lt;br /&gt;
 const TOPOLOGY_orientation: {&lt;br /&gt;
   ORIENTATION_UP = 0,&lt;br /&gt;
   ORIENTATION_DOWN,&lt;br /&gt;
   ORIENTATION_FRONT,&lt;br /&gt;
   ORIENTATION_BACK,&lt;br /&gt;
   ORIENTATION_LEFT,&lt;br /&gt;
   ORIENTATION_RIGHT,&lt;br /&gt;
   ORIENTATION_MAX,&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Enumeration of a face orientations.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - renamed from TOPOLOGY_location to the TOPOLOGY_orientation&lt;br /&gt;
&lt;br /&gt;
===TOPOLOGY_orientation_mode===&lt;br /&gt;
Syntax:&lt;br /&gt;
 const TOPOLOGY_orientation_mode: {&lt;br /&gt;
   ORIENTATION_MODE_MENU = 0,&lt;br /&gt;
   ORIENTATION_MODE_GRAVITY,&lt;br /&gt;
   ORIENTATION_MODE_SPLASH,&lt;br /&gt;
   ORIENTATION_MODE_MAX,&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Enumeration of an orientation modes.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - renamed from TOPOLOGY_orientation to TOPOLOGY_orientation_mode&lt;br /&gt;
&lt;br /&gt;
===TOPOLOGY_twist===&lt;br /&gt;
Syntax:&lt;br /&gt;
 const TOPOLOGY_twist: {&lt;br /&gt;
   TWIST_UNINDENTIFIED = 0,&lt;br /&gt;
   TWIST_LEFT,&lt;br /&gt;
   TWIST_RIGHT,&lt;br /&gt;
   TWIST_DOUBLE,&lt;br /&gt;
   TWIST_MAX,&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Enumeration of twist directions.&lt;br /&gt;
&lt;br /&gt;
===TOPOLOGY_reverseFaces===&lt;br /&gt;
Syntax:&lt;br /&gt;
 stock const TOPOLOGY_reverseFaces { TOPOLOGY_FACES_MAX } = { 3, 5, 4, 0, 2, 1 };&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Array with opposite cube faces.&lt;br /&gt;
: Value at a face position corresponds its opposite face, e.g. face opposite&lt;br /&gt;
: to 0 is 3 and vice versa.&lt;br /&gt;
&lt;br /&gt;
==Constants and defines==&lt;br /&gt;
&lt;br /&gt;
===TOPOLOGY_FACES_MAX===&lt;br /&gt;
Syntax:&lt;br /&gt;
 #define TOPOLOGY_FACES_MAX 6&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: How many faces the cube has.&lt;br /&gt;
&lt;br /&gt;
===TOPOLOGY_POSITIONS_MAX===&lt;br /&gt;
Syntax:&lt;br /&gt;
 #define TOPOLOGY_POSITIONS_MAX 4&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: How many screens there are on a single cube face.&lt;br /&gt;
&lt;br /&gt;
==Data structures==&lt;br /&gt;
&lt;br /&gt;
===TOPOLOGY_FACELET===&lt;br /&gt;
Syntax:&lt;br /&gt;
 #define TOPOLOGY_FACELET [ .module, .screen ]&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Array with named fields which represents a single facelet.&lt;br /&gt;
: Fields:&lt;br /&gt;
:* module - an ID of the module on which facelet is located&lt;br /&gt;
:* screen - a number of the module screen which corresponds to the facelet&lt;br /&gt;
&lt;br /&gt;
See also: [[#TOPOLOGY_FACELET_INFO|TOPOLOGY_FACELET_INFO]], [[#TOPOLOGY_getAdjacentFacelet|TOPOLOGY_getAdjacentFacelet()]], [[#TOPOLOGY_getPlace|TOPOLOGY_getPlace()]], [[#TOPOLOGY_getOppositeFacelet|TOPOLOGY_getOppositeFacelet()]], [[#TOPOLOGY_getAngle|TOPOLOGY_getAngle()]], [[#TOPOLOGY_getFaceletOrientation|TOPOLOGY_getFaceletOrientation()]]&lt;br /&gt;
&lt;br /&gt;
===TOPOLOGY_FACELET_INFO===&lt;br /&gt;
Syntax:&lt;br /&gt;
 #define TOPOLOGY_FACELET_INFO [ TOPOLOGY_FACELET, .connected ]&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Array with named fields with meta information about a single facelet.&lt;br /&gt;
: Fields:&lt;br /&gt;
:* module - an ID of the module on which the facelet is located&lt;br /&gt;
:* screen - a number of the module screen which corresponds to the facelet&lt;br /&gt;
:* connected - connection status, depends on the context&lt;br /&gt;
&lt;br /&gt;
See also: [[#TOPOLOGY_FACELET|TOPOLOGY_FACELET]], [[#TOPOLOGY_getFacelet|TOPOLOGY_getFacelet()]], [[#TOPOLOGY_getAdjacentFacelet|TOPOLOGY_getAdjacentFacelet()]], [[#TOPOLOGY_getOppositeFacelet|TOPOLOGY_getOppositeFacelet()]]&lt;br /&gt;
&lt;br /&gt;
===TOPOLOGY_PLACE===&lt;br /&gt;
Syntax:&lt;br /&gt;
 #define TOPOLOGY_PLACE [ .face, .position ]&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Array with named fields which represents screens place on the cube surface.&lt;br /&gt;
: Fields:&lt;br /&gt;
:* face - a face number on which screen is located&lt;br /&gt;
:* position - a position on the face on which screen is located&lt;br /&gt;
&lt;br /&gt;
See also: [[#TOPOLOGY_getFacelet|TOPOLOGY_getFacelet()]], [[#TOPOLOGY_getPlace|TOPOLOGY_getPlace()]], [[#TOPOLOGY_getPlaceOrientation|TOPOLOGY_getPlaceOrientation()]]&lt;br /&gt;
&lt;br /&gt;
===TOPOLOGY_TWIST_INFO===&lt;br /&gt;
Syntax:&lt;br /&gt;
 #define TOPOLOGY_TWIST_INFO [ .screen, .count, TOPOLOGY_twist: .direction ]&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Array with named fields with twist parameters.&lt;br /&gt;
: Fields:&lt;br /&gt;
:* screen - a number of the screen around which a twist was detected&lt;br /&gt;
:* count - how many twists happened from the application start&lt;br /&gt;
:* direction - a twist direction&lt;br /&gt;
&lt;br /&gt;
See also: [[#TOPOLOGY_twist|TOPOLOGY_twist]], [[#ON_Twist|ON_Twist()]]&lt;br /&gt;
&lt;br /&gt;
==Event handlers==&lt;br /&gt;
&lt;br /&gt;
===ON_Twist===&lt;br /&gt;
Syntax:&lt;br /&gt;
 forward ON_Twist(twist[TOPOLOGY_TWIST_INFO]);&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Twist handler.&lt;br /&gt;
: Public function with such signature will be called when a cube twist&lt;br /&gt;
: detected.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''twist''&lt;br /&gt;
:: a twist description&lt;br /&gt;
&lt;br /&gt;
See also: [[#TOPOLOGY_TWIST_INFO|TOPOLOGY_TWIST_INFO]]&lt;br /&gt;
&lt;br /&gt;
==Functions==&lt;br /&gt;
&lt;br /&gt;
===TOPOLOGY_getAdjacentFacelet===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native TOPOLOGY_getAdjacentFacelet[TOPOLOGY_FACELET_INFO](facelet[TOPOLOGY_FACELET], TOPOLOGY_neighbor: direction = NEIGHBOR_DIAGONAL);&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get a facelet neighbor in the given direction.&lt;br /&gt;
: Facelet can have neighbors on the same cube face or neighbors by module.&lt;br /&gt;
: This function provide a neighbor of the given facelet in the given&lt;br /&gt;
: direction. Connection status indicates if there is a connection between&lt;br /&gt;
: modules on which given facelet and its neighbor are located.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''facelet''&lt;br /&gt;
:: a facelet which neighbor is requested&lt;br /&gt;
: ''direction''&lt;br /&gt;
:: a direction in which neighbor is requested&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Neighbor facelet in a given direction with its connection status. The&lt;br /&gt;
: module ID will be MODULES_MAX and the screen number will be SCREENS_MAX in&lt;br /&gt;
: case of an error (e.g. incorrect arguments or the topology malfunction).&lt;br /&gt;
&lt;br /&gt;
See also: [[#TOPOLOGY_FACELET|TOPOLOGY_FACELET]], [[#TOPOLOGY_FACELET_INFO|TOPOLOGY_FACELET_INFO]], [[SDK 6.3/PAWN/Core#MODULES_MAX|MODULES_MAX]], [[SDK 6.3/PAWN/Core#SCREENS_MAX|SCREENS_MAX]], [[#TOPOLOGY_neighbor|TOPOLOGY_neighbor]]&lt;br /&gt;
&lt;br /&gt;
===TOPOLOGY_getFacelet===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native TOPOLOGY_getFacelet[TOPOLOGY_FACELET_INFO](place[TOPOLOGY_PLACE], TOPOLOGY_orientation_mode: mode = ORIENTATION_MODE_MENU);&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get a facelet located in the given place.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''place''&lt;br /&gt;
:: a place on a cube surface which corresponding facelet is&lt;br /&gt;
: requested&lt;br /&gt;
: ''mode''&lt;br /&gt;
:: the place position orientation mode&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Facelet located in the given place, connection status indicates if there&lt;br /&gt;
: any connection to the module on which this facelet resides. The module ID&lt;br /&gt;
: will be MODULES_MAX and the screen screen will be SCREENS_MAX in case of an&lt;br /&gt;
: error (e.g. incorrect arguments or the topology malfunction).&lt;br /&gt;
&lt;br /&gt;
See also: [[#TOPOLOGY_FACELET|TOPOLOGY_FACELET]], [[#TOPOLOGY_FACELET_INFO|TOPOLOGY_FACELET_INFO]], [[#TOPOLOGY_PLACE|TOPOLOGY_PLACE]], [[SDK 6.3/PAWN/Core#MODULES_MAX|MODULES_MAX]], [[SDK 6.3/PAWN/Core#SCREENS_MAX|SCREENS_MAX]], [[#TOPOLOGY_orientation_mode|TOPOLOGY_orientation_mode]]&lt;br /&gt;
&lt;br /&gt;
===TOPOLOGY_getPlace===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native TOPOLOGY_getPlace[TOPOLOGY_PLACE](facelet[TOPOLOGY_FACELET], TOPOLOGY_orientation_mode: mode = ORIENTATION_MODE_MENU);&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get a place of the facelet.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''facelet''&lt;br /&gt;
:: facelet which place on cube surface is requested&lt;br /&gt;
: ''mode''&lt;br /&gt;
:: place position orientation mode&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Place on cube surface where the given facelet located. Face will be&lt;br /&gt;
: TOPOLOGY_FACES_MAX and position will be TOPOLOGY_POSITIONS_MAX in case of&lt;br /&gt;
: an error (e.g. incorrect arguments or topology malfunction)&lt;br /&gt;
&lt;br /&gt;
See also: [[#TOPOLOGY_FACELET|TOPOLOGY_FACELET]], [[#TOPOLOGY_PLACE|TOPOLOGY_PLACE]], [[#TOPOLOGY_FACES_MAX|TOPOLOGY_FACES_MAX]], [[#TOPOLOGY_POSITIONS_MAX|TOPOLOGY_POSITIONS_MAX]], [[#TOPOLOGY_orientation_mode|TOPOLOGY_orientation_mode]]&lt;br /&gt;
&lt;br /&gt;
===TOPOLOGY_getOppositeFacelet===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native TOPOLOGY_getOppositeFacelet[TOPOLOGY_FACELET_INFO](facelet[TOPOLOGY_FACELET]);&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get an opposite facelet located on a diagonal counterpart module.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''facelet''&lt;br /&gt;
:: a facelet for which opposite diagonal counterpart is requested&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Diagonal opposite counterpart facelet. Connection status indicates if there&lt;br /&gt;
: any connection to the module on which that facelet resides. The module ID&lt;br /&gt;
: will be MODULES_MAX and the screen number will be SCREENS_MAX in case of an&lt;br /&gt;
: error (e.g. incorrect arguments or topology malfunction).&lt;br /&gt;
&lt;br /&gt;
See also: [[#TOPOLOGY_FACELET_INFO|TOPOLOGY_FACELET_INFO]], [[#TOPOLOGY_FACELET|TOPOLOGY_FACELET]], [[SDK 6.3/PAWN/Core#MODULES_MAX|MODULES_MAX]], [[SDK 6.3/PAWN/Core#SCREENS_MAX|SCREENS_MAX]]&lt;br /&gt;
&lt;br /&gt;
===TOPOLOGY_getAngle===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native TOPOLOGY_getAngle(facelet[TOPOLOGY_FACELET], TOPOLOGY_orientation_mode: mode = ORIENTATION_MODE_MENU);&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get an angle to align images on a face according to the orientation mode.&lt;br /&gt;
: Display coordinates system is persistent on a module screen. Different&lt;br /&gt;
: angles are needed to align images on all modules with screens on the same&lt;br /&gt;
: face. This function returns the angle for the screen specified by the&lt;br /&gt;
: facelet. The angle is relative to the position 0 on the same face where the&lt;br /&gt;
: facelet is located in the given orientation mode.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''facelet''&lt;br /&gt;
:: a facelet for which screen an angle is requested&lt;br /&gt;
: ''mode''&lt;br /&gt;
:: an orientation mode in which an angle is requested&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Angle to align images on the same face according to the orientation mode, 0&lt;br /&gt;
: in case of an error (e.g. incorrect arguments or the topology malfunction).&lt;br /&gt;
&lt;br /&gt;
See also: [[#TOPOLOGY_FACELET|TOPOLOGY_FACELET]], [[#TOPOLOGY_orientation_mode|TOPOLOGY_orientation_mode]], PawnLibs/GFX module&lt;br /&gt;
&lt;br /&gt;
===TOPOLOGY_getFaceletOrientation===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native TOPOLOGY_orientation: TOPOLOGY_getFaceletOrientation(facelet[TOPOLOGY_FACELET]);&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get a face orientation on which the given facelet resides.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''facelet''&lt;br /&gt;
:: a facelet for which the face orientation is requested&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Face orientation on which the given facelet resides, ORIENTATION_MAX in&lt;br /&gt;
: case of an error (e.g. incorrect arguments or the topology malfunction).&lt;br /&gt;
&lt;br /&gt;
See also: [[#TOPOLOGY_FACELET|TOPOLOGY_FACELET]], [[#TOPOLOGY_orientation|TOPOLOGY_orientation]]&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - renamed from TOPOLOGY_getFaceletLocation() to the&lt;br /&gt;
: TOPOLOGY_getFaceletOrientation()&lt;br /&gt;
&lt;br /&gt;
===TOPOLOGY_getPlaceOrientation===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native TOPOLOGY_orientation: TOPOLOGY_getPlaceOrientation(place[TOPOLOGY_PLACE]);&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get a face orientation on which the given place resides.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''place''&lt;br /&gt;
:: a place for which the face orientation is requested&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Face orientation on which the given place resides, ORIENTATION_MAX in case&lt;br /&gt;
: of an error (e.g. incorrect arguments or the topology malfunction).&lt;br /&gt;
&lt;br /&gt;
See also: [[#TOPOLOGY_PLACE|TOPOLOGY_PLACE]], [[#TOPOLOGY_orientation|TOPOLOGY_orientation]]&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - renamed from TOPOLOGY_getPlaceLocation() to the&lt;br /&gt;
: TOPOLOGY_getPlaceOrientation()&lt;br /&gt;
&lt;br /&gt;
===TOPOLOGY_getFace===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native TOPOLOGY_getFace(TOPOLOGY_orientation: orientation = ORIENTATION_UP);&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get a face number which has the given orientation.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''orientation''&lt;br /&gt;
:: a orientation of the requested face&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Face number which has the given orientation, TOPOLOGY_FACES_MAX in case of&lt;br /&gt;
: an error (e.g. incorrect arguments or the topology malfunction).&lt;br /&gt;
&lt;br /&gt;
See also: [[#TOPOLOGY_orientation|TOPOLOGY_orientation]], [[#TOPOLOGY_FACES_MAX|TOPOLOGY_FACES_MAX]]&lt;br /&gt;
&lt;br /&gt;
===TOPOLOGY_isAssembled===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native bool: TOPOLOGY_isAssembled();&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Check that all modules in a system are connected to each other.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: True if all modules in a system are connected to each other, false&lt;br /&gt;
: otherwise.&lt;br /&gt;
&lt;br /&gt;
[[Category:SDK 6.3]]&lt;br /&gt;
[[Category:PAWN API]]&lt;/div&gt;</summary>
		<author><name>WowBot</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=SDK_6.3/PAWN/Core&amp;diff=16950</id>
		<title>SDK 6.3/PAWN/Core</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=SDK_6.3/PAWN/Core&amp;diff=16950"/>
		<updated>2026-07-26T09:45:49Z</updated>

		<summary type="html">&lt;p&gt;WowBot: Mark PAWN API as legacy (supported, not developed) (WowBot)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{notice|'''Official WOWCube SDK documentation.''' SDK 6.3, PAWN API. Generated from the canonical SDK headers — do not edit by hand; regenerate from source.}}&lt;br /&gt;
{{notice|'''Legacy track.''' The PAWN API is supported but no longer actively developed — the last PAWN additions shipped in SDK 6.2. New development uses the [[SDK 6.3/C++/Native API|C++ (WebAssembly) API]].}}&lt;br /&gt;
&lt;br /&gt;
{{SDK 6.3 nav}}&lt;br /&gt;
&lt;br /&gt;
''← [[SDK 6.3]] · PAWN / Core''&lt;br /&gt;
&lt;br /&gt;
==Constants and defines==&lt;br /&gt;
&lt;br /&gt;
===MODULES_MAX===&lt;br /&gt;
Syntax:&lt;br /&gt;
 #define MODULES_MAX 8&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: How many modules there are in the assembled cube.&lt;br /&gt;
&lt;br /&gt;
===SCREENS_MAX===&lt;br /&gt;
Syntax:&lt;br /&gt;
 #define SCREENS_MAX 3&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: How many screens there are on the each cube module.&lt;br /&gt;
&lt;br /&gt;
===SENSITIVITY_MENU_CHANGE_SCRIPT===&lt;br /&gt;
Syntax:&lt;br /&gt;
 #define SENSITIVITY_MENU_CHANGE_SCRIPT 6&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: How many shakes required to trigger an application quit. Shake is a&lt;br /&gt;
: continuous significant motion which direction has been changed since the&lt;br /&gt;
: previous recent significant motion.&lt;br /&gt;
&lt;br /&gt;
===GAME_SAVE_SIZE===&lt;br /&gt;
Syntax:&lt;br /&gt;
 #define GAME_SAVE_SIZE 64&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Maximum allowed size of an application save data in cells.&lt;br /&gt;
&lt;br /&gt;
===MAX_PACKET_TYPES===&lt;br /&gt;
Syntax:&lt;br /&gt;
 #define MAX_PACKET_TYPES 32&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Maximum number of an application packet types.&lt;br /&gt;
&lt;br /&gt;
===MAX_PACKET_SIZE===&lt;br /&gt;
Syntax:&lt;br /&gt;
 #define MAX_PACKET_SIZE 28&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Maximum size of an application packet.&lt;br /&gt;
&lt;br /&gt;
==Data structures==&lt;br /&gt;
&lt;br /&gt;
===APP_VERSION===&lt;br /&gt;
Syntax:&lt;br /&gt;
 #define APP_VERSION [.major, .minor, .patch]&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Array with named fields describing application version.&lt;br /&gt;
: Fields:&lt;br /&gt;
:* major - increment when application significantly changed&lt;br /&gt;
:* minor - increment when new feature added&lt;br /&gt;
:* patch - increment when bugfix shipped&lt;br /&gt;
&lt;br /&gt;
See also: [[#getAppVersion|getAppVersion()]]&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.0 - added&lt;br /&gt;
&lt;br /&gt;
==Event handlers==&lt;br /&gt;
&lt;br /&gt;
===ON_Init===&lt;br /&gt;
Syntax:&lt;br /&gt;
 forward ON_Init(id, size, const pkt[]);&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Initialization handler.&lt;br /&gt;
: Public function with such signature will be called before the application&lt;br /&gt;
: loop starts. Useful for a globals initializations, e.g. generating level,&lt;br /&gt;
: baking backgrounds, etc. Additionaly save data is provided.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''id''&lt;br /&gt;
:: an id of the save data&lt;br /&gt;
: ''size''&lt;br /&gt;
:: size of the save data in cells&lt;br /&gt;
: ''pkt[]''&lt;br /&gt;
:: array with the save data&lt;br /&gt;
&lt;br /&gt;
See also: [[#GAME_SAVE_SIZE|GAME_SAVE_SIZE]], [[#loadState|loadState()]]&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - provide save data in arguments&lt;br /&gt;
&lt;br /&gt;
===ON_Tick===&lt;br /&gt;
Syntax:&lt;br /&gt;
 forward ON_Tick();&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Main application loop handler.&lt;br /&gt;
: Public function with such signature will be called on each iteration of an&lt;br /&gt;
: application loop. Main application logic should be placed here. Frequency&lt;br /&gt;
: of calls are not constant and depends on the configured framerate,&lt;br /&gt;
: calculations and rendering complexities.&lt;br /&gt;
&lt;br /&gt;
See also: [[#ON_PhysicsTick|ON_PhysicsTick()]], [[SDK 6.3/PAWN/Graphics#ON_Render|ON_Render()]]&lt;br /&gt;
&lt;br /&gt;
===ON_PhysicsTick===&lt;br /&gt;
Syntax:&lt;br /&gt;
 forward ON_PhysicsTick();&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Uniformly delayed loop handler.&lt;br /&gt;
: Public function with such signature will be called approximately each 30&lt;br /&gt;
: milliseconds. However time interval between calls can be larger because the&lt;br /&gt;
: application is single threaded and complex rendering or calculation can&lt;br /&gt;
: delay events processing. Useful for calculations requiring a time delta,&lt;br /&gt;
: e.g. sprite movement at a constant speed.&lt;br /&gt;
&lt;br /&gt;
===ON_Packet===&lt;br /&gt;
Syntax:&lt;br /&gt;
 forward ON_Packet(type, size, const pkt[]);&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Network packet handler.&lt;br /&gt;
: Public function with such signature will be called to handle a received&lt;br /&gt;
: application packet from an another module in the cube network.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''type''&lt;br /&gt;
:: an application packet type&lt;br /&gt;
: ''size''&lt;br /&gt;
:: size of the received packet&lt;br /&gt;
: ''pkt[]''&lt;br /&gt;
:: array with a message data&lt;br /&gt;
&lt;br /&gt;
See also: [[#broadcastPacket|broadcastPacket()]]&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.0 - added&lt;br /&gt;
&lt;br /&gt;
===ON_Load===&lt;br /&gt;
Syntax:&lt;br /&gt;
 forward ON_Load(id, size, const pkt[]);&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Asynchronous application save data handler.&lt;br /&gt;
: Public function with such signature will be called to handle an application&lt;br /&gt;
: save data. It is an asynchronous event so access to flash memory will not&lt;br /&gt;
: affect an application performance.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''id''&lt;br /&gt;
:: an id of the save data&lt;br /&gt;
: ''size''&lt;br /&gt;
:: size of the save data in cells&lt;br /&gt;
: ''pkt[]''&lt;br /&gt;
:: array with the save data&lt;br /&gt;
&lt;br /&gt;
See also: [[#GAME_SAVE_SIZE|GAME_SAVE_SIZE]], [[#loadState|loadState()]], [[#saveState|saveState()]]&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - provide data header as arguments rather than first cell&lt;br /&gt;
&lt;br /&gt;
===ON_Quit===&lt;br /&gt;
Syntax:&lt;br /&gt;
 forward ON_Quit();&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Application quit handler.&lt;br /&gt;
: Public function with such signature will be called to handle an application&lt;br /&gt;
: quit event when user did triple shake. Application can shutdown gracefully,&lt;br /&gt;
: e.g. save state on the flash memory. Application has 1000ms to run handler&lt;br /&gt;
: and will be termintated after that period. No more handlers will be called.&lt;br /&gt;
&lt;br /&gt;
See also: [[#saveState|saveState()]]&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - added&lt;br /&gt;
&lt;br /&gt;
==Functions==&lt;br /&gt;
&lt;br /&gt;
===getTime===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native getTime();&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get time in milliseconds since the module start.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Time in milliseconds since the module start.&lt;br /&gt;
&lt;br /&gt;
===getUserName===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native getUserName(userName[], size = sizeof(userName));&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get the name of a user who is logined on the cube.&lt;br /&gt;
: Get the user name configured in the WOWCube mobile application to save&lt;br /&gt;
: results for.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''size''&lt;br /&gt;
:: size of string to keep a user name&lt;br /&gt;
: Outputs&lt;br /&gt;
: ''userName''&lt;br /&gt;
:: string to keep a user name&lt;br /&gt;
&lt;br /&gt;
See also: USER_NAME_LENGTH&lt;br /&gt;
&lt;br /&gt;
===quit===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native quit();&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Quit from the application.&lt;br /&gt;
&lt;br /&gt;
See also: [[#SENSITIVITY_MENU_CHANGE_SCRIPT|SENSITIVITY_MENU_CHANGE_SCRIPT]]&lt;br /&gt;
&lt;br /&gt;
===toggleDebugInfo===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native toggleDebugInfo();&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Toggle overlay with debug information. TBD - move to GFX&lt;br /&gt;
&lt;br /&gt;
===broadcastPacket===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native broadcastPacket(type, const data[], size = sizeof(data));&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Broadcast a packet over the cube network.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''type''&lt;br /&gt;
:: arbitrary packet type&lt;br /&gt;
: ''data[]''&lt;br /&gt;
:: packet data to broadcast&lt;br /&gt;
: ''size''&lt;br /&gt;
:: size of the packet data in cells&lt;br /&gt;
&lt;br /&gt;
See also: [[#ON_Packet|ON_Packet()]], [[#MAX_PACKET_TYPES|MAX_PACKET_TYPES]], [[#MAX_PACKET_SIZE|MAX_PACKET_SIZE]]&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.0 - added&lt;br /&gt;
&lt;br /&gt;
===saveState===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native bool:saveState(const data[], size = sizeof(data));&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Request to save an application data&lt;br /&gt;
: Save user settings and/or progress on the flash to restore next time. Each&lt;br /&gt;
: save data has an incremental ID.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''data []''&lt;br /&gt;
:: data to save&lt;br /&gt;
: ''size''&lt;br /&gt;
:: size of data in cells to save&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: True if save was successful.&lt;br /&gt;
&lt;br /&gt;
See also: [[#GAME_SAVE_SIZE|GAME_SAVE_SIZE]], [[#ON_Load|ON_Load()]], [[#loadState|loadState()]]&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - fixed a bug in which only part of a data saved on the flash&lt;br /&gt;
&lt;br /&gt;
===loadState===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native loadState();&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Request to load an application save data from the flash.&lt;br /&gt;
: Trigger state load event. It is asynchronous so access to flash memory will&lt;br /&gt;
: not affect an application performance.&lt;br /&gt;
&lt;br /&gt;
See also: [[#ON_Load|ON_Load()]], [[#saveState|saveState()]]&lt;br /&gt;
&lt;br /&gt;
===random===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native random(min, max);&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Generate random number in half-open range.&lt;br /&gt;
: Random number generator is initialized before each application start. Seed&lt;br /&gt;
: for initialization is generated by TRNG (True Random Number Generator).&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''min''&lt;br /&gt;
:: minimal value of range to generate random number&lt;br /&gt;
: ''max''&lt;br /&gt;
:: maximum value of range to generate random number&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Pseudo random value from requested range.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - fixed a bug in which random does not generate numbers in a given&lt;br /&gt;
: range.&lt;br /&gt;
&lt;br /&gt;
===getAppVersion===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native getAppVersion(version[APP_VERSION]);&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get application version.&lt;br /&gt;
: WOWCube applications follow semantic versioning scheme (see&lt;br /&gt;
: https://semver.org). This interface allows to get version parts stored in&lt;br /&gt;
: the cube application descriptor.&lt;br /&gt;
: Outputs&lt;br /&gt;
:* version - structure describing application version&lt;br /&gt;
&lt;br /&gt;
See also: [[#APP_VERSION|APP_VERSION]]&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.0 - added&lt;br /&gt;
&lt;br /&gt;
===parseByte===&lt;br /&gt;
Syntax:&lt;br /&gt;
 stock parseByte(const arr[], const n)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get arbitrary byte value from array.&lt;br /&gt;
: Pawn works with cells which has a size of 4 bytes. Native interfaces&lt;br /&gt;
: handling generic data like network messages have size limits for that data.&lt;br /&gt;
: If application does not need to work with a large numbers, several values&lt;br /&gt;
: can be packed into a single cell. This function provides interface to&lt;br /&gt;
: extract such values from array.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''arr''&lt;br /&gt;
:: array to read byte from&lt;br /&gt;
: ''n''&lt;br /&gt;
:: number of byte to read&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Requested byte value.&lt;br /&gt;
&lt;br /&gt;
See also: [[#broadcastPacket|broadcastPacket()]], [[#saveState|saveState()]], [[#ON_Load|ON_Load()]], [[#ON_Packet|ON_Packet()]]&lt;br /&gt;
&lt;br /&gt;
==Other==&lt;br /&gt;
&lt;br /&gt;
===SELF_ID===&lt;br /&gt;
Syntax:&lt;br /&gt;
 public const SELF_ID = 0;&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: An ID of the module on which application copy is running.&lt;br /&gt;
&lt;br /&gt;
[[Category:SDK 6.3]]&lt;br /&gt;
[[Category:PAWN API]]&lt;/div&gt;</summary>
		<author><name>WowBot</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=SDK_6.3/PAWN/Graphics&amp;diff=16951</id>
		<title>SDK 6.3/PAWN/Graphics</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=SDK_6.3/PAWN/Graphics&amp;diff=16951"/>
		<updated>2026-07-26T09:45:49Z</updated>

		<summary type="html">&lt;p&gt;WowBot: Mark PAWN API as legacy (supported, not developed) (WowBot)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{notice|'''Official WOWCube SDK documentation.''' SDK 6.3, PAWN API. Generated from the canonical SDK headers — do not edit by hand; regenerate from source.}}&lt;br /&gt;
{{notice|'''Legacy track.''' The PAWN API is supported but no longer actively developed — the last PAWN additions shipped in SDK 6.2. New development uses the [[SDK 6.3/C++/Native API|C++ (WebAssembly) API]].}}&lt;br /&gt;
&lt;br /&gt;
{{SDK 6.3 nav}}&lt;br /&gt;
&lt;br /&gt;
''← [[SDK 6.3]] · PAWN / Graphics''&lt;br /&gt;
&lt;br /&gt;
==Enumerations==&lt;br /&gt;
&lt;br /&gt;
===GFX_text_align===&lt;br /&gt;
Syntax:&lt;br /&gt;
 const GFX_text_align: {&lt;br /&gt;
   TEXT_ALIGN_CENTER = 0,&lt;br /&gt;
   TEXT_ALIGN_TOP_CENTER,&lt;br /&gt;
   TEXT_ALIGN_BOTTOM_CENTER,&lt;br /&gt;
   TEXT_ALIGN_LEFT_CORNER,&lt;br /&gt;
   TEXT_ALIGN_LEFT_TOP_CORNER,&lt;br /&gt;
   TEXT_ALIGN_LEFT_BOTTOM_CORNER,&lt;br /&gt;
   TEXT_ALIGN_RIGHT_CORNER,&lt;br /&gt;
   TEXT_ALIGN_RIGHT_TOP_CORNER,&lt;br /&gt;
   TEXT_ALIGN_RIGHT_BOTTOM_CORNER,&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Enumeration of a text align variants.&lt;br /&gt;
&lt;br /&gt;
===GFX_mirror===&lt;br /&gt;
Syntax:&lt;br /&gt;
 const GFX_mirror: {&lt;br /&gt;
   MIRROR_BLANK = 0,&lt;br /&gt;
   MIRROR_X,&lt;br /&gt;
   MIRROR_Y,&lt;br /&gt;
   MIRROR_XY,&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Enumeration of an image mirror variants.&lt;br /&gt;
&lt;br /&gt;
===GFX_format===&lt;br /&gt;
Syntax:&lt;br /&gt;
 const GFX_format: {&lt;br /&gt;
   FORMAT_RGB565 = 0,&lt;br /&gt;
   FORMAT_ARGB6666,&lt;br /&gt;
   FORMAT_ARGB8888,&lt;br /&gt;
 };&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Enumeration of a pixel color formats.&lt;br /&gt;
&lt;br /&gt;
==Data structures==&lt;br /&gt;
&lt;br /&gt;
===GFX_POINT===&lt;br /&gt;
Syntax:&lt;br /&gt;
 #define GFX_POINT [ .x, .y ]&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Array with named fields which represents a point on a screen.&lt;br /&gt;
: Fields:&lt;br /&gt;
:* x, y - coordinates of the point&lt;br /&gt;
&lt;br /&gt;
===GFX_RECTANGLE===&lt;br /&gt;
Syntax:&lt;br /&gt;
 #define GFX_RECTANGLE [ .x, .y, .w, .h ]&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Array with named fields which represents a rectangle.&lt;br /&gt;
: Fields:&lt;br /&gt;
:* x, y - top left coordinates of the rectangle&lt;br /&gt;
:* w - width of the rectangle&lt;br /&gt;
:* h - height of the rectangle&lt;br /&gt;
&lt;br /&gt;
==Event handlers==&lt;br /&gt;
&lt;br /&gt;
===ON_Render===&lt;br /&gt;
Syntax:&lt;br /&gt;
 forward ON_Render();&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Render handler.&lt;br /&gt;
: Public function with such signature will be called at the end of an&lt;br /&gt;
: application loop. Useful to logically divide the application and rendering&lt;br /&gt;
: logic. There is no limitations to render entire scene in the ON_Tick()&lt;br /&gt;
: handler.&lt;br /&gt;
&lt;br /&gt;
==Functions==&lt;br /&gt;
&lt;br /&gt;
===GFX_getAssetId===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native GFX_getAssetId(const name[]);&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get an image ID by the filename.&lt;br /&gt;
: Usually an application uses image IDs to draw sprites and backgrounds. But&lt;br /&gt;
: sometimes IDs are unknown, e.g. in common libraries, or they change rapidly&lt;br /&gt;
: during development. This interface can be used to get an ID of the image by&lt;br /&gt;
: its filename in the runtime. Maximum asset name length is 15 characters,&lt;br /&gt;
: remaining symbols are truncated during lookup.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''name''&lt;br /&gt;
:: an image filename for which ID is requested&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: The ID of image with a given filename or -1 in case of error.&lt;br /&gt;
&lt;br /&gt;
See also: [[SDK 6.3/PAWN/Core#ON_Init|ON_Init()]]&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - renamed from GFX_getId() to GFX_getAssetId()&lt;br /&gt;
: v6.0 - truncate asset name in WASM API&lt;br /&gt;
&lt;br /&gt;
===GFX_clear===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native GFX_clear(const color);&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Clear a layer with a given color.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''color''&lt;br /&gt;
:: a color in RGB888 format to clear a layer with&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.0 - changed color format&lt;br /&gt;
&lt;br /&gt;
===GFX_drawPoint===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native GFX_drawPoint(const point[GFX_POINT], color);&lt;br /&gt;
 native GFX_drawPointXY(x, y, color);&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Draw a point specified by its coordinates with a given color.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''point or (x, y)''&lt;br /&gt;
:: coordinates of point to draw&lt;br /&gt;
: ''color''&lt;br /&gt;
:: a color in ARGB8888 format to draw point with&lt;br /&gt;
&lt;br /&gt;
See also: [[#GFX_POINT|GFX_POINT]]&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - added GFX_drawPointXY() alias&lt;br /&gt;
&lt;br /&gt;
===GFX_drawCircle===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native GFX_drawCircle(const center[GFX_POINT], radius, width, color);&lt;br /&gt;
 native GFX_drawCircleXY(x, y, radius, width, color);&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Draw a circle at the given point with given radius, color and line width.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''center or (x, y)''&lt;br /&gt;
:: coordinates of the circle center&lt;br /&gt;
: ''radius''&lt;br /&gt;
:: radius of the circle&lt;br /&gt;
: ''width''&lt;br /&gt;
:: line width used to draw the circle&lt;br /&gt;
: ''color''&lt;br /&gt;
:: a color in ARGB8888 format to draw circle with&lt;br /&gt;
&lt;br /&gt;
See also: [[#GFX_POINT|GFX_POINT]]&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - added GFX_drawCircleXY() alias&lt;br /&gt;
&lt;br /&gt;
===GFX_drawArc===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native GFX_drawArc(const center[GFX_POINT], radius, width, from, to, color);&lt;br /&gt;
 native GFX_drawArcXY(x, y, radius, width, from, to, color);&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Draw an arc at the given point with given radius, line width, color and&lt;br /&gt;
: angles.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''center or (x, y)''&lt;br /&gt;
:: coordinates of the arc center&lt;br /&gt;
: ''radius''&lt;br /&gt;
:: radius of the arc&lt;br /&gt;
: ''width''&lt;br /&gt;
:: line width used to draw the arc&lt;br /&gt;
: ''from''&lt;br /&gt;
:: starting angle of the arc TBD: in - ? from - ?&lt;br /&gt;
: ''to''&lt;br /&gt;
:: ending angle of the arc TBD: in - ? from - ?&lt;br /&gt;
: ''color''&lt;br /&gt;
:: a color in ARGB8888 format to draw arc with&lt;br /&gt;
&lt;br /&gt;
See also: [[#GFX_POINT|GFX_POINT]]&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - added GFX_drawArcXY() alias&lt;br /&gt;
&lt;br /&gt;
===GFX_drawSector===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native GFX_drawSector(const center[GFX_POINT], radius, from, to, color);&lt;br /&gt;
 native GFX_drawSectorXY(x, y, radius, from, to, color);&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Draw a filled circular sector, connecting the arc to the circle's center&lt;br /&gt;
: like a piece of pie.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''center or (x, y)''&lt;br /&gt;
:: coordinates of the circle's center&lt;br /&gt;
: ''radius''&lt;br /&gt;
:: radius of the circle&lt;br /&gt;
: ''from''&lt;br /&gt;
:: starting angle of the sector TBD: in - ? from - ?&lt;br /&gt;
: ''to''&lt;br /&gt;
:: ending angle of the sector TBD: in - ? from - ?&lt;br /&gt;
: ''color''&lt;br /&gt;
:: a color in ARGB8888 format to draw arc with&lt;br /&gt;
&lt;br /&gt;
See also: [[#GFX_POINT|GFX_POINT]]&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.1 - created&lt;br /&gt;
&lt;br /&gt;
===GFX_drawLine===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native GFX_drawLine(const start[GFX_POINT], const end[GFX_POINT], width, color);&lt;br /&gt;
 native GFX_drawLineXY(xs, ys, xe, ye, width, color);&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Draw a line with from a given point to another one and given width and&lt;br /&gt;
: color.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''start or (xs, ys)''&lt;br /&gt;
:: coordinates of the line starting point&lt;br /&gt;
: ''end or (xe, ye)''&lt;br /&gt;
:: coordinates of the line ending point&lt;br /&gt;
: ''width''&lt;br /&gt;
:: line width to draw&lt;br /&gt;
: ''color''&lt;br /&gt;
:: a color in ARGB8888 format to draw line with&lt;br /&gt;
&lt;br /&gt;
See also: [[#GFX_POINT|GFX_POINT]]&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - added GFX_drawLineXY() alias&lt;br /&gt;
&lt;br /&gt;
===GFX_drawRectangle===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native GFX_drawRectangle(const rectangle[GFX_RECTANGLE], color);&lt;br /&gt;
 native GFX_drawRectangleXY(x, y, w, h, color);&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Draw a solid rectangle at a given position with specified dimensions and a&lt;br /&gt;
: color.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''rectangle or (x, y, w, h)''&lt;br /&gt;
:: top left corner coordinates and dimensions of&lt;br /&gt;
: the rectangle to draw&lt;br /&gt;
: ''color''&lt;br /&gt;
:: a color in ARGB8888 format to draw rectangle with&lt;br /&gt;
&lt;br /&gt;
See also: [[#GFX_RECTANGLE|GFX_RECTANGLE]]&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - added GFX_drawRectangleXY() alias&lt;br /&gt;
&lt;br /&gt;
===GFX_drawText===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native GFX_drawText(const center[GFX_POINT], scale, angle, fontId, GFX_text_align: align, color, const format[], {Float,Fixed,_}:...);&lt;br /&gt;
 native GFX_drawTextXY(x, y, scale, angle, fontId, GFX_text_align: align, color, const format[], {Float,Fixed,_}:...);&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Draw a formatted text by the specified coordinates with a given color,&lt;br /&gt;
: scale, text align and a rotation angle.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''center or (x, y)''&lt;br /&gt;
:: coordinates of the text center&lt;br /&gt;
: ''scale''&lt;br /&gt;
:: percentage scale, max font size is 200x200px (100%)&lt;br /&gt;
: ''angle''&lt;br /&gt;
:: clockwise rotation angle in degrees&lt;br /&gt;
: ''fontId''&lt;br /&gt;
:: not applicable, reserved for future use&lt;br /&gt;
: ''align''&lt;br /&gt;
:: text align (TBD: double check)&lt;br /&gt;
: ''color''&lt;br /&gt;
:: a color in ARGB8888 format to draw text with&lt;br /&gt;
: ''format''&lt;br /&gt;
:: format string, see log.inc for specification&lt;br /&gt;
: ''...''&lt;br /&gt;
:: variable values to insert in the resulting string&lt;br /&gt;
&lt;br /&gt;
See also: [[#GFX_POINT|GFX_POINT]], [[#GFX_text_align|GFX_text_align]], PawnLibs/log&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - clarified documentation, added GFX_drawTextXY() alias&lt;br /&gt;
&lt;br /&gt;
===GFX_bakeImage===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native GFX_bakeImage(const id, const width, const height, const GFX_format: format, bool: overwrite = true);&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Set an ID of a memory buffer to save next rendering result.&lt;br /&gt;
: Specifies the image that will be created by combining the group of&lt;br /&gt;
: graphical primitives used between GFX_bakeImage() and GFS_render()&lt;br /&gt;
: according their order and taking into account alpha channel in images. HW&lt;br /&gt;
: has a limitation and can combine no more than 4 layers simultaneously, so&lt;br /&gt;
: if there are more primitives then they will be combined in a cascade.&lt;br /&gt;
: Useful for creating complex images like backgrounds for later usage.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''id''&lt;br /&gt;
:: an ID of image to access later&lt;br /&gt;
: ''width, height''&lt;br /&gt;
:: image dimensions&lt;br /&gt;
: ''format''&lt;br /&gt;
:: color format of baked image&lt;br /&gt;
: ''overwrite''&lt;br /&gt;
:: true to overwrite previously baked image, false to append on&lt;br /&gt;
: top of it&lt;br /&gt;
&lt;br /&gt;
See also: [[#GFX_format|GFX_format]], [[#GFX_render|GFX_render()]], [[#GFX_removeBakedImage|GFX_removeBakedImage()]]&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.0 - added overwrite parameter&lt;br /&gt;
&lt;br /&gt;
===GFX_setRenderTarget===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native GFX_setRenderTarget(const screen);&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Set a screen which will be used to display next rendering result.&lt;br /&gt;
: Cube module is a special device which has 3 independent screens to display&lt;br /&gt;
: graphics. GFX_setRenderTarget() specifies a screen number which will be&lt;br /&gt;
: used to display a next rendering result. Graphics primitives used in&lt;br /&gt;
: between GFX_setRenderTarget() and GFX_render() calls will be combined&lt;br /&gt;
: together according their order and taking into account alpha channel in&lt;br /&gt;
: images. Resulting image will be immediately flushed onto the given screen.&lt;br /&gt;
: HW has a limitation and can combine no more than 4 layers simultaneously,&lt;br /&gt;
: so if there are more primitives then they will be combined in a cascade. To&lt;br /&gt;
: display anything on the screen GFX_setRenderTarget() has to be always&lt;br /&gt;
: called.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''screen''&lt;br /&gt;
:: a screen number to render the resulting image on&lt;br /&gt;
&lt;br /&gt;
See also: [[#GFX_render|GFX_render()]], [[#GFX_bakeImage|GFX_bakeImage()]]&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - renamed from GFX_updateDisplay() to GFX_setRenderTarget()&lt;br /&gt;
&lt;br /&gt;
===GFX_drawImage===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native GFX_drawImage(const center[GFX_POINT], opacity, colorKey, scaleX, scaleY, angle, GFX_mirror: mirror, id);&lt;br /&gt;
 native GFX_drawImageXY(x, y, opacity, colorKey, scaleX, scaleY, angle, GFX_mirror: mirror, id);&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Draw an image from application assets at a specified position and with&lt;br /&gt;
: given transformations.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''center or (x, y)''&lt;br /&gt;
:: coordinates of the image center to draw&lt;br /&gt;
: ''opacity''&lt;br /&gt;
:: opacity of the entire image, 0 is fully transparent&lt;br /&gt;
: ''colorKey''&lt;br /&gt;
:: transparent background color, pixels of that color will not be&lt;br /&gt;
: used for rendering, it is useful for image with color format without&lt;br /&gt;
: alpha channel, e.g. RGB565&lt;br /&gt;
: ''(scaleX, scaleY)''&lt;br /&gt;
:: scale in percent from 1 to 100 along the corresponding&lt;br /&gt;
: axis&lt;br /&gt;
: ''angle''&lt;br /&gt;
:: clockwise rotation angle in degrees&lt;br /&gt;
: ''mirror''&lt;br /&gt;
:: mirroring variant&lt;br /&gt;
: ''id''&lt;br /&gt;
:: an ID of assets image to draw&lt;br /&gt;
&lt;br /&gt;
See also: [[#GFX_POINT|GFX_POINT]], [[#GFX_mirror|GFX_mirror]], [[#GFX_cacheImages|GFX_cacheImages()]]&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - added GFX_drawImageXY() alias, color argument clarified&lt;br /&gt;
: v6.0 - added scale parameters&lt;br /&gt;
&lt;br /&gt;
===GFX_drawSubImage===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native GFX_drawSubImage(const center[GFX_POINT], winX, winY, winW, winH, opacity, colorKey, scaleX, scaleY, angle, GFX_mirror: mirror, id);&lt;br /&gt;
 native GFX_drawSubImageXY(x, y, winX, winY, winW, winH, opacity, colorKey, scaleX, scaleY, angle, GFX_mirror: mirror, id);&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Draw a sub window of an image from application assets at a specified&lt;br /&gt;
: position and with given transformations.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''center or (x, y)''&lt;br /&gt;
:: coordinates of the sub image center to draw&lt;br /&gt;
: ''(winX, winY, winW, winH)''&lt;br /&gt;
:: coordinates of image sub window relative to&lt;br /&gt;
: its top level corner&lt;br /&gt;
: ''opacity''&lt;br /&gt;
:: opacity of the entire image, 0 is fully transparent&lt;br /&gt;
: ''colorKey''&lt;br /&gt;
:: transparent background color, pixels of that color will not be&lt;br /&gt;
: used for rendering, it is useful for image with color format without&lt;br /&gt;
: alpha channel, e.g. RGB565&lt;br /&gt;
: ''(scaleX, scaleY)''&lt;br /&gt;
:: scale in percent from 1 to 100 along the corresponding&lt;br /&gt;
: axis&lt;br /&gt;
: ''angle''&lt;br /&gt;
:: clockwise rotation angle in degrees&lt;br /&gt;
: ''mirror''&lt;br /&gt;
:: mirroring variant&lt;br /&gt;
: ''id''&lt;br /&gt;
:: an ID of assets image to draw sub window&lt;br /&gt;
&lt;br /&gt;
See also: [[#GFX_POINT|GFX_POINT]], [[#GFX_mirror|GFX_mirror]], [[#GFX_cacheImages|GFX_cacheImages()]]&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.2 - added&lt;br /&gt;
&lt;br /&gt;
===GFX_drawBakedImage===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native GFX_drawBakedImage(const center[GFX_POINT], opacity, colorKey, scaleX, scaleY, angle, GFX_mirror: mirror, id);&lt;br /&gt;
 native GFX_drawBakedImageXY(x, y, opacity, colorKey, scaleX, scaleY, angle, GFX_mirror: mirror, id);&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Draw a previously baked image at a specified position and with given&lt;br /&gt;
: transformations.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''center or (x, y)''&lt;br /&gt;
:: coordinates of the image center to draw&lt;br /&gt;
: ''opacity''&lt;br /&gt;
:: opacity of the entire image, 0 is fully transparent&lt;br /&gt;
: ''colorKey''&lt;br /&gt;
:: transparent background color, pixels of that color will not be&lt;br /&gt;
: used for rendering, it is useful for image with color format without&lt;br /&gt;
: alpha channel, e.g. RGB565&lt;br /&gt;
: ''(scaleX, scaleY)''&lt;br /&gt;
:: scale in percent from 1 to 100 along the corresponding&lt;br /&gt;
: axis&lt;br /&gt;
: ''angle''&lt;br /&gt;
:: clockwise rotation angle in degrees&lt;br /&gt;
: ''mirror''&lt;br /&gt;
:: mirroring variants&lt;br /&gt;
: ''id''&lt;br /&gt;
:: an ID of the baked image to draw&lt;br /&gt;
&lt;br /&gt;
See also: [[#GFX_POINT|GFX_POINT]], [[#GFX_mirror|GFX_mirror]]&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - added GFX_drawBakedImageXY() alias, color argument clarified&lt;br /&gt;
: v6.0 - added scale parameters&lt;br /&gt;
&lt;br /&gt;
===GFX_setFillShader===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native GFX_setFillShader(color);&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Fill next primitives with specified color.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''color''&lt;br /&gt;
:: a color in ARGB8888 format to fill with&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.0 - added primitives shading&lt;br /&gt;
&lt;br /&gt;
===GFX_setLinearGradientShader===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native GFX_setLinearGradientShader(const start[GFX_POINT], const end[GFX_POINT], color0, color1);&lt;br /&gt;
 native GFX_setLinearGradientShaderXY(x0, y0, x1, y1, color0, color1);&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Fill next primitives with linear gradient from a given point / color to&lt;br /&gt;
: another one.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''start or (xs, ys)''&lt;br /&gt;
:: coordinates of the fill starting point&lt;br /&gt;
: ''end or (xe, ye)''&lt;br /&gt;
:: coordinates of the fill ending point&lt;br /&gt;
: ''color0''&lt;br /&gt;
:: a color in ARGB8888 format to start fill with&lt;br /&gt;
: ''color1''&lt;br /&gt;
:: a color in ARGB8888 format to end fill with&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.0 - added primitives shading&lt;br /&gt;
&lt;br /&gt;
===GFX_setRadialGradientShader===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native GFX_setRadialGradientShader(const center[GFX_POINT], radius, color0, color1);&lt;br /&gt;
 native GFX_setRadialGradientShaderXY(x, y, radius, color0, color1);&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Fill next primitives with radial gradient from a given point with radius&lt;br /&gt;
: and from a given color to another one.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''center or (x, y)''&lt;br /&gt;
:: coordinates of the fill center&lt;br /&gt;
: ''radius''&lt;br /&gt;
:: radius of the fill&lt;br /&gt;
: ''color0''&lt;br /&gt;
:: a color in ARGB8888 format to start fill with&lt;br /&gt;
: ''color1''&lt;br /&gt;
:: a color in ARGB8888 format to end fill with&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.0 - added primitives shading&lt;br /&gt;
&lt;br /&gt;
===GFX_removeShader===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native GFX_removeShader();&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Do not use shading in next primitives.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.0 - added primitives shading&lt;br /&gt;
&lt;br /&gt;
===GFX_drawQrCode===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native GFX_drawQrCode(const center[GFX_POINT], size, color0, color1, angle, id, const text[]);&lt;br /&gt;
 native GFX_drawQrCodeXY(x, y, size, color0, color1, angle, id, const text[]);&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Generate and draw QR-code for a given text string.&lt;br /&gt;
: Supported version 2 which is limited by 32 characters of input.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''center or (x, y)''&lt;br /&gt;
:: coordinates of the resulting image of the QR-code to&lt;br /&gt;
: draw&lt;br /&gt;
: ''size''&lt;br /&gt;
:: size of the individual square representing a single bit in the&lt;br /&gt;
: encodeded text string&lt;br /&gt;
: ''color0''&lt;br /&gt;
:: color of squares representing zeroes in the ARGB8888 format&lt;br /&gt;
: ''color1''&lt;br /&gt;
:: color of squares representing ones in the ARGB8888 format&lt;br /&gt;
: ''angle''&lt;br /&gt;
:: clockwise rotation angle in degrees&lt;br /&gt;
: ''id''&lt;br /&gt;
:: an ID of resulting image to distinguish different codes on the same&lt;br /&gt;
: scene, starts from 0&lt;br /&gt;
: ''text''&lt;br /&gt;
:: text string to encode and draw, maximum size is 256 characters&lt;br /&gt;
&lt;br /&gt;
See also: [[#GFX_POINT|GFX_POINT]]&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.0 - added&lt;br /&gt;
&lt;br /&gt;
===GFX_render===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native GFX_render();&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Start rendering process.&lt;br /&gt;
&lt;br /&gt;
See also: [[#GFX_setRenderTarget|GFX_setRenderTarget()]], [[#GFX_bakeImage|GFX_bakeImage()]]&lt;br /&gt;
&lt;br /&gt;
===GFX_cacheImages===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native GFX_cacheImages(imageList[], size = sizeof(imageList));&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Force platform to cache application images.&lt;br /&gt;
: Platform automatically reads and caches images from flash when the&lt;br /&gt;
: application draws an image. Flash operations are synchronous and may cause&lt;br /&gt;
: delays especially when reading large portions of data. To prevent the&lt;br /&gt;
: application from lags it is possible to cache image data in advance.&lt;br /&gt;
: However if application requests to draw a non-cached image and there is not&lt;br /&gt;
: enough memory then oldest accessed images will be removed from cache. Also&lt;br /&gt;
: there is a limit of 256 for a total number of cached images.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''imageList''&lt;br /&gt;
:: array with IDs of images to cache&lt;br /&gt;
: ''size''&lt;br /&gt;
:: size of imageList array&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Number of cached images or negative value if an error happened. Error&lt;br /&gt;
: codes:&lt;br /&gt;
: * -1 invalid function arguments count&lt;br /&gt;
: * -2 invalid imageList array&lt;br /&gt;
&lt;br /&gt;
See also: [[#GFX_clearCache|GFX_clearCache()]]&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - moved from appCtrl module to graphics&lt;br /&gt;
&lt;br /&gt;
===GFX_clearCache===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native GFX_clearCache();&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Clear all cached images.&lt;br /&gt;
: Oldest accessed image cache will be automatically freed if there is not&lt;br /&gt;
: enough memory to cache a new image. This function forces this process, e.g.&lt;br /&gt;
: when switch game levels.&lt;br /&gt;
&lt;br /&gt;
See also: [[#GFX_cacheImages|GFX_cacheImages()]], [[#GFX_removeBakedImage|GFX_removeBakedImage()]]&lt;br /&gt;
&lt;br /&gt;
===GFX_removeBakedImage===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native GFX_removeBakedImage(id);&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Remove specified baked image from cache.&lt;br /&gt;
: Baked images do not automatically invalidate. This function allows to&lt;br /&gt;
: remove any baked image from cache to save some space.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''id''&lt;br /&gt;
:: an ID of the baked image to remove from cache&lt;br /&gt;
&lt;br /&gt;
See also: [[#GFX_clearCache|GFX_clearCache()]], [[#GFX_bakeImage|GFX_bakeImage()]]&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.0 - added&lt;br /&gt;
&lt;br /&gt;
===GFX_getAssetsCount===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native GFX_getAssetsCount();&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get the total count of graphic assets.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Number of graphic assets.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.0 - added&lt;br /&gt;
&lt;br /&gt;
===GFX_fromARGB8888===&lt;br /&gt;
Syntax:&lt;br /&gt;
 stock GFX_fromARGB8888(a, r, g, b)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Returns a hexadecimal value of a color constructed from the channel&lt;br /&gt;
: components.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''a''&lt;br /&gt;
:: the alpha channel, valid values are 0 through 255&lt;br /&gt;
: ''r''&lt;br /&gt;
:: the red channel, valid values are 0 through 255&lt;br /&gt;
: ''g''&lt;br /&gt;
:: the green channel, valid values are 0 through 255&lt;br /&gt;
: ''b''&lt;br /&gt;
:: the blue channel, valid values are 0 through 255&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: The hexadecimal value of a color constructed from the channel components.&lt;br /&gt;
&lt;br /&gt;
See also: [[#GFX_toARGB8888|GFX_toARGB8888()]]&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - created&lt;br /&gt;
&lt;br /&gt;
===GFX_toARGB8888===&lt;br /&gt;
Syntax:&lt;br /&gt;
 stock GFX_toARGB8888(value, &amp;amp;a, &amp;amp;r, &amp;amp;g, &amp;amp;b)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Returns channel values of a color in the hexadecimal format.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''value''&lt;br /&gt;
:: the hexadecimal value of the color&lt;br /&gt;
: Outputs&lt;br /&gt;
: ''a''&lt;br /&gt;
:: the alpha channel&lt;br /&gt;
: ''r''&lt;br /&gt;
:: the red channel&lt;br /&gt;
: ''g''&lt;br /&gt;
:: the green channel&lt;br /&gt;
: ''b''&lt;br /&gt;
:: the blue channel&lt;br /&gt;
&lt;br /&gt;
See also: [[#GFX_fromARGB8888|GFX_fromARGB8888]]&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - created&lt;br /&gt;
&lt;br /&gt;
==Deprecated==&lt;br /&gt;
&lt;br /&gt;
===GFX_drawSolidCircle===&lt;br /&gt;
:'''Deprecated.''' See History below.&lt;br /&gt;
Syntax:&lt;br /&gt;
 native GFX_drawSolidCircle(const center[GFX_POINT], radius, color);&lt;br /&gt;
 native GFX_drawSolidCircleXY(x, y, radius, color);&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Draw a solid circle at the given point with given radius and color.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''center or (x, y)''&lt;br /&gt;
:: coordinates of the circle center&lt;br /&gt;
: ''radius''&lt;br /&gt;
:: radius of the circle&lt;br /&gt;
: ''color''&lt;br /&gt;
:: a color in ARGB8888 format to draw circle with&lt;br /&gt;
&lt;br /&gt;
See also: [[#GFX_POINT|GFX_POINT]], [[#GFX_setFillShader|GFX_setFillShader()]], [[#GFX_setLinearGradientShader|GFX_setLinearGradientShader()]], [[#GFX_setRadialGradientShader|GFX_setRadialGradientShader()]]&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - added GFX_drawSolidCircleXY() alias&lt;br /&gt;
: v6.0 - DEPRECATED, use GFX_setFillShader() instead&lt;br /&gt;
&lt;br /&gt;
[[Category:SDK 6.3]]&lt;br /&gt;
[[Category:PAWN API]]&lt;/div&gt;</summary>
		<author><name>WowBot</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=SDK_6.3&amp;diff=16949</id>
		<title>SDK 6.3</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=SDK_6.3&amp;diff=16949"/>
		<updated>2026-07-26T09:45:47Z</updated>

		<summary type="html">&lt;p&gt;WowBot: Mark PAWN as legacy track (WowBot)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{notice|'''Official WOWCube SDK 6.3 documentation.''' Canonical API reference, generated from the SDK headers.}}&lt;br /&gt;
&lt;br /&gt;
The current WOWCube SDK. Applications can be written in '''PAWN''', '''C++''', or '''Rust'''.&lt;br /&gt;
&lt;br /&gt;
== PAWN API ==&lt;br /&gt;
'''Legacy:''' supported, but no longer actively developed (last PAWN additions — SDK 6.2; 6.3 only removed deprecated calls). For new projects use the [[#C++ API|C++ API]].&lt;br /&gt;
One page per module:&lt;br /&gt;
* [[SDK 6.3/PAWN/Core]] — application lifecycle, state, time, RNG, packets&lt;br /&gt;
* [[SDK 6.3/PAWN/Graphics]] — drawing, images, text, shaders (GFX)&lt;br /&gt;
* [[SDK 6.3/PAWN/Topology]] — cube geometry, facelets, twists&lt;br /&gt;
* [[SDK 6.3/PAWN/Sound]] — sound playback&lt;br /&gt;
* [[SDK 6.3/PAWN/Motion Sensor]] — accelerometer / gyroscope, taps&lt;br /&gt;
* [[SDK 6.3/PAWN/Leaderboard]] — scores and achievements&lt;br /&gt;
* [[SDK 6.3/PAWN/Splash Screen]] — splash screens&lt;br /&gt;
* [[SDK 6.3/PAWN/Physics]] — 2D physics helpers&lt;br /&gt;
* [[SDK 6.3/PAWN/Network]] — inter-module messaging&lt;br /&gt;
* [[SDK 6.3/PAWN/Save]] — persistence&lt;br /&gt;
* [[SDK 6.3/PAWN/Scramble]] — cube scramble&lt;br /&gt;
* [[SDK 6.3/PAWN/Logging]] — debug logging&lt;br /&gt;
&lt;br /&gt;
* [[SDK 6.3/Changelog|SDK changelog]] — what changed in 5.1 / 6.0 / 6.2 / 6.3&lt;br /&gt;
&lt;br /&gt;
== C++ API ==&lt;br /&gt;
C/C++ cubeapps run via WebAssembly: the same engine functions as PAWN, plus an object-oriented framework and a retained scene graph. '''This is the primary development track.'''&lt;br /&gt;
&lt;br /&gt;
'''Native engine ABI''' — [[SDK 6.3/C++/Native API]] (all 64 functions with full descriptions):&lt;br /&gt;
* [[SDK 6.3/C++/Native API#Core|Core]] — time, RNG, packets, BLE, saves, user, version, logging&lt;br /&gt;
* [[SDK 6.3/C++/Native API#Graphics|Graphics]] — drawing, images, text, shaders, QR, render targets&lt;br /&gt;
* [[SDK 6.3/C++/Native API#Topology|Topology]] — facelets, faces, twists, orientation&lt;br /&gt;
* [[SDK 6.3/C++/Native API#Sound|Sound]] — playback and caching&lt;br /&gt;
* [[SDK 6.3/C++/Native API#Motion Sensors|Motion Sensors]] — accelerometer / gyroscope per display&lt;br /&gt;
* [[SDK 6.3/C++/Native API#Leaderboard|Leaderboard]] — scores and rankings&lt;br /&gt;
* [[SDK 6.3/C++/Native API#Types and data structures|Types &amp;amp; data structures]] — structs, enums, constants&lt;br /&gt;
&lt;br /&gt;
'''Application framework''' — [[SDK 6.3/C++/Application]]:&lt;br /&gt;
* [[SDK 6.3/C++/Application#Entry point|Entry point]] · [[SDK 6.3/C++/Application#class Cubios::Application|callbacks (on_Tick, on_Render, on_Twist, …)]] · timers, networking, saves, [[SDK 6.3/C++/Application#class Cubios::AppManager|AppManager]]&lt;br /&gt;
&lt;br /&gt;
'''GFX Engine (scene graph)''' — [[SDK 6.3/C++/GFX Engine]] (56 documented methods + official-sample code):&lt;br /&gt;
* [[SDK 6.3/C++/GFX Engine#The canonical pattern|The canonical pattern]] — how real games are structured&lt;br /&gt;
* [[SDK 6.3/C++/GFX Engine#Scene|Scene]] · [[SDK 6.3/C++/GFX Engine#SceneObject|SceneObject]] · [[SDK 6.3/C++/GFX Engine#Screen|Screen]]&lt;br /&gt;
* [[SDK 6.3/C++/GFX Engine#Gfx::Sprite|Sprite]] · [[SDK 6.3/C++/GFX Engine#Gfx::AnimatedSprite|AnimatedSprite]] · [[SDK 6.3/C++/GFX Engine#Gfx::SpriteAtlas|SpriteAtlas]] · [[SDK 6.3/C++/GFX Engine#Gfx::Background|Background]] · [[SDK 6.3/C++/GFX Engine#Gfx::Text|Text]] · [[SDK 6.3/C++/GFX Engine#Gfx::QRCode|QRCode]] · [[SDK 6.3/C++/GFX Engine#Gfx::OffscreenRenderTarget|OffscreenRenderTarget]]&lt;br /&gt;
* [[SDK 6.3/C++/GFX Engine#Sound and SoundCollection|Sound / SoundCollection]] · [[SDK 6.3/C++/GFX Engine#NetworkMessage and SaveMessage|NetworkMessage / SaveMessage]] · [[SDK 6.3/C++/GFX Engine#Scramble|Scramble]] · [[SDK 6.3/C++/GFX Engine#Splashscreen|Splashscreen]] · [[SDK 6.3/C++/GFX Engine#Math|Math]]&lt;br /&gt;
&lt;br /&gt;
== Rust API ==&lt;br /&gt;
* [[SDK 6.3/Rust]] — the &amp;lt;code&amp;gt;wowcube_sdk&amp;lt;/code&amp;gt; crate: Application trait, FFI bindings, entry points, examples&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
See also: [[:Category:SDK 6.3|all SDK 6.3 pages]].&lt;br /&gt;
[[Category:SDK 6.3]]&lt;/div&gt;</summary>
		<author><name>WowBot</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=SDK_6.3&amp;diff=16948</id>
		<title>SDK 6.3</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=SDK_6.3&amp;diff=16948"/>
		<updated>2026-07-26T09:44:38Z</updated>

		<summary type="html">&lt;p&gt;WowBot: Portal: C++ expanded to full topic grid (primary track) (WowBot)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{notice|'''Official WOWCube SDK 6.3 documentation.''' Canonical API reference, generated from the SDK headers.}}&lt;br /&gt;
&lt;br /&gt;
The current WOWCube SDK. Applications can be written in '''PAWN''', '''C++''', or '''Rust'''.&lt;br /&gt;
&lt;br /&gt;
== PAWN API ==&lt;br /&gt;
One page per module:&lt;br /&gt;
* [[SDK 6.3/PAWN/Core]] — application lifecycle, state, time, RNG, packets&lt;br /&gt;
* [[SDK 6.3/PAWN/Graphics]] — drawing, images, text, shaders (GFX)&lt;br /&gt;
* [[SDK 6.3/PAWN/Topology]] — cube geometry, facelets, twists&lt;br /&gt;
* [[SDK 6.3/PAWN/Sound]] — sound playback&lt;br /&gt;
* [[SDK 6.3/PAWN/Motion Sensor]] — accelerometer / gyroscope, taps&lt;br /&gt;
* [[SDK 6.3/PAWN/Leaderboard]] — scores and achievements&lt;br /&gt;
* [[SDK 6.3/PAWN/Splash Screen]] — splash screens&lt;br /&gt;
* [[SDK 6.3/PAWN/Physics]] — 2D physics helpers&lt;br /&gt;
* [[SDK 6.3/PAWN/Network]] — inter-module messaging&lt;br /&gt;
* [[SDK 6.3/PAWN/Save]] — persistence&lt;br /&gt;
* [[SDK 6.3/PAWN/Scramble]] — cube scramble&lt;br /&gt;
* [[SDK 6.3/PAWN/Logging]] — debug logging&lt;br /&gt;
&lt;br /&gt;
* [[SDK 6.3/Changelog|SDK changelog]] — what changed in 5.1 / 6.0 / 6.2 / 6.3&lt;br /&gt;
&lt;br /&gt;
== C++ API ==&lt;br /&gt;
C/C++ cubeapps run via WebAssembly: the same engine functions as PAWN, plus an object-oriented framework and a retained scene graph. '''This is the primary development track.'''&lt;br /&gt;
&lt;br /&gt;
'''Native engine ABI''' — [[SDK 6.3/C++/Native API]] (all 64 functions with full descriptions):&lt;br /&gt;
* [[SDK 6.3/C++/Native API#Core|Core]] — time, RNG, packets, BLE, saves, user, version, logging&lt;br /&gt;
* [[SDK 6.3/C++/Native API#Graphics|Graphics]] — drawing, images, text, shaders, QR, render targets&lt;br /&gt;
* [[SDK 6.3/C++/Native API#Topology|Topology]] — facelets, faces, twists, orientation&lt;br /&gt;
* [[SDK 6.3/C++/Native API#Sound|Sound]] — playback and caching&lt;br /&gt;
* [[SDK 6.3/C++/Native API#Motion Sensors|Motion Sensors]] — accelerometer / gyroscope per display&lt;br /&gt;
* [[SDK 6.3/C++/Native API#Leaderboard|Leaderboard]] — scores and rankings&lt;br /&gt;
* [[SDK 6.3/C++/Native API#Types and data structures|Types &amp;amp; data structures]] — structs, enums, constants&lt;br /&gt;
&lt;br /&gt;
'''Application framework''' — [[SDK 6.3/C++/Application]]:&lt;br /&gt;
* [[SDK 6.3/C++/Application#Entry point|Entry point]] · [[SDK 6.3/C++/Application#class Cubios::Application|callbacks (on_Tick, on_Render, on_Twist, …)]] · timers, networking, saves, [[SDK 6.3/C++/Application#class Cubios::AppManager|AppManager]]&lt;br /&gt;
&lt;br /&gt;
'''GFX Engine (scene graph)''' — [[SDK 6.3/C++/GFX Engine]] (56 documented methods + official-sample code):&lt;br /&gt;
* [[SDK 6.3/C++/GFX Engine#The canonical pattern|The canonical pattern]] — how real games are structured&lt;br /&gt;
* [[SDK 6.3/C++/GFX Engine#Scene|Scene]] · [[SDK 6.3/C++/GFX Engine#SceneObject|SceneObject]] · [[SDK 6.3/C++/GFX Engine#Screen|Screen]]&lt;br /&gt;
* [[SDK 6.3/C++/GFX Engine#Gfx::Sprite|Sprite]] · [[SDK 6.3/C++/GFX Engine#Gfx::AnimatedSprite|AnimatedSprite]] · [[SDK 6.3/C++/GFX Engine#Gfx::SpriteAtlas|SpriteAtlas]] · [[SDK 6.3/C++/GFX Engine#Gfx::Background|Background]] · [[SDK 6.3/C++/GFX Engine#Gfx::Text|Text]] · [[SDK 6.3/C++/GFX Engine#Gfx::QRCode|QRCode]] · [[SDK 6.3/C++/GFX Engine#Gfx::OffscreenRenderTarget|OffscreenRenderTarget]]&lt;br /&gt;
* [[SDK 6.3/C++/GFX Engine#Sound and SoundCollection|Sound / SoundCollection]] · [[SDK 6.3/C++/GFX Engine#NetworkMessage and SaveMessage|NetworkMessage / SaveMessage]] · [[SDK 6.3/C++/GFX Engine#Scramble|Scramble]] · [[SDK 6.3/C++/GFX Engine#Splashscreen|Splashscreen]] · [[SDK 6.3/C++/GFX Engine#Math|Math]]&lt;br /&gt;
&lt;br /&gt;
== Rust API ==&lt;br /&gt;
* [[SDK 6.3/Rust]] — the &amp;lt;code&amp;gt;wowcube_sdk&amp;lt;/code&amp;gt; crate: Application trait, FFI bindings, entry points, examples&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
See also: [[:Category:SDK 6.3|all SDK 6.3 pages]].&lt;br /&gt;
[[Category:SDK 6.3]]&lt;/div&gt;</summary>
		<author><name>WowBot</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=SDK_6.3/C%2B%2B/GFX_Engine&amp;diff=16947</id>
		<title>SDK 6.3/C++/GFX Engine</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=SDK_6.3/C%2B%2B/GFX_Engine&amp;diff=16947"/>
		<updated>2026-07-26T09:39:44Z</updated>

		<summary type="html">&lt;p&gt;WowBot: Restore enriched reference + detailed Scramble/Splashscreen (WowBot)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{notice|'''Official WOWCube SDK documentation.''' SDK 6.3, C++ (WebAssembly) API. Signatures are extracted from the canonical SDK headers; usage notes and examples come from the official sample projects shipped with the WOWCube Development Kit. The headers remain authoritative.}}&lt;br /&gt;
&lt;br /&gt;
{{SDK 6.3 nav}}&lt;br /&gt;
&lt;br /&gt;
''← [[SDK 6.3]] · C++ / GFX Engine''&lt;br /&gt;
&lt;br /&gt;
The object-oriented retained layer of the C++ SDK (namespace &amp;lt;code&amp;gt;Cubios&amp;lt;/code&amp;gt;): a scene graph with sprites, text, backgrounds, sounds and math primitives. It sits on top of the [[SDK 6.3/C++/Native API|native ABI]] and is driven by the [[SDK 6.3/C++/Application|Application framework]].&lt;br /&gt;
&lt;br /&gt;
== The canonical pattern ==&lt;br /&gt;
&lt;br /&gt;
Every official sample follows the same lifecycle:&lt;br /&gt;
&lt;br /&gt;
# '''Create''' objects once at startup and register them in the application's &amp;lt;code&amp;gt;Scene&amp;lt;/code&amp;gt; under integer IDs (usually an &amp;lt;code&amp;gt;enum&amp;lt;/code&amp;gt;).&lt;br /&gt;
# '''Render''' every frame: for each of the module's three &amp;lt;code&amp;gt;Screen&amp;lt;/code&amp;gt;s open a &amp;lt;code&amp;gt;Begin()/End()&amp;lt;/code&amp;gt; block and &amp;lt;code&amp;gt;Add()&amp;lt;/code&amp;gt; the scene objects you want on that screen, chaining setters.&lt;br /&gt;
&lt;br /&gt;
Resource creation (from the official ''Network/Messaging2'' sample):&lt;br /&gt;
&lt;br /&gt;
 void Messaging2::InitializeResources()&lt;br /&gt;
 {&lt;br /&gt;
     this-&amp;gt;Scene.CreateObjectWithID(GfxObjects::idle, new Sprite(&amp;quot;idle.png&amp;quot;, Transform(120,120,0)));&lt;br /&gt;
     this-&amp;gt;Scene[GfxObjects::idle]-&amp;gt;Color.Set(0xFFFFFFFF);&lt;br /&gt;
     this-&amp;gt;Scene.CreateObjectWithID(GfxObjects::background, new Sprite(&amp;quot;background.png&amp;quot;, Transform(120,120,0)));&lt;br /&gt;
     this-&amp;gt;SetTimer(Timers::mainTimer, 30);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Per-frame rendering (from the official ''GFX Engine Sample 1 — Twinkle''):&lt;br /&gt;
&lt;br /&gt;
 void Twinkle::on_Render(std::array&amp;lt;Cubios::Screen, 3&amp;gt;&amp;amp; screens)&lt;br /&gt;
 {&lt;br /&gt;
     Background* bkg = (Background*)this-&amp;gt;Scene[Sprites::Clear];&lt;br /&gt;
     for(auto it = screens.begin(); it != screens.end(); ++it)&lt;br /&gt;
     {&lt;br /&gt;
         it-&amp;gt;Begin(TOPOLOGY_orientation_mode_t::ORIENTATION_MODE_GRAVITY, true);&lt;br /&gt;
             it-&amp;gt;Add(bkg-&amp;gt;SetColor(0xFF000044));&lt;br /&gt;
             if(TOPOLOGY_isAssembled()==1)&lt;br /&gt;
             {&lt;br /&gt;
                 switch(it-&amp;gt;Position())   // screen's place on the cube face&lt;br /&gt;
                 {&lt;br /&gt;
                     case 0: it-&amp;gt;Add(this-&amp;gt;Scene[Sprites::MyUfo])-&amp;gt;SetPosition(pos.X-280, pos.Y-280); break;&lt;br /&gt;
                     case 1: it-&amp;gt;Add(this-&amp;gt;Scene[Sprites::MyUfo])-&amp;gt;SetPosition(pos.X,     pos.Y-280); break;&lt;br /&gt;
                     case 2: it-&amp;gt;Add(this-&amp;gt;Scene[Sprites::MyUfo])-&amp;gt;SetPosition(pos.X,     pos.Y);     break;&lt;br /&gt;
                 }&lt;br /&gt;
             }&lt;br /&gt;
         it-&amp;gt;End();&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
'''Units and conventions''' (as used across all official samples): screens are 240×240 px; colors are packed '''0xAARRGGBB''' (&amp;lt;code&amp;gt;Math::Color&amp;lt;/code&amp;gt;); &amp;lt;code&amp;gt;Transform&amp;lt;/code&amp;gt; rotation is in degrees, scale is in percent (100 = 1:1); all &amp;lt;code&amp;gt;Set*&amp;lt;/code&amp;gt; methods return &amp;lt;code&amp;gt;SceneObject*&amp;lt;/code&amp;gt;, so calls chain: &amp;lt;code&amp;gt;screen.Add(obj)-&amp;gt;SetPosition(x,y)-&amp;gt;SetAf(0.5f)&amp;lt;/code&amp;gt;. To make one logical object span several screens of a face, samples draw it on each screen with a ±280 px offset per screen position (as above).&lt;br /&gt;
&lt;br /&gt;
== Scene ==&lt;br /&gt;
&lt;br /&gt;
The retained scene graph owned by every &amp;lt;code&amp;gt;Application&amp;lt;/code&amp;gt; (field &amp;lt;code&amp;gt;app.Scene&amp;lt;/code&amp;gt;). It is an ID-addressed registry of objects and sounds; it owns them and disposes them for you.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;uint32_t CreateObject(SceneObject* obj);&amp;lt;/code&amp;gt;&lt;br /&gt;
: Register an object; returns its auto-assigned ID. The scene takes ownership.&lt;br /&gt;
; &amp;lt;code&amp;gt;bool CreateObjectWithID(uint32_t id, SceneObject* obj);&amp;lt;/code&amp;gt;&lt;br /&gt;
: Register under an explicit ID (usually an &amp;lt;code&amp;gt;enum&amp;lt;/code&amp;gt; value). Fails (returns &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;) if the ID is taken. ''The most common way to build a scene in the official samples.''&lt;br /&gt;
; &amp;lt;code&amp;gt;uint32_t CreateSound(Sound* obj);&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;bool CreateSoundWithID(uint32_t id, Sound* obj);&amp;lt;/code&amp;gt;&lt;br /&gt;
: Same, for [[#Sound and SoundCollection|sounds]].&lt;br /&gt;
; &amp;lt;code&amp;gt;SceneObject* operator[](uint32_t);&amp;lt;/code&amp;gt;&lt;br /&gt;
: Look an object up by ID: &amp;lt;code&amp;gt;this-&amp;gt;Scene[Sprites::MyUfo]&amp;lt;/code&amp;gt;.&lt;br /&gt;
; &amp;lt;code&amp;gt;bool DisposeObjectWithID(uint32_t id);&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;bool DisposeSoundWithID(uint32_t id);&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;void DisposeAllObjects();&amp;lt;/code&amp;gt;&lt;br /&gt;
: Remove and delete objects/sounds.&lt;br /&gt;
; &amp;lt;code&amp;gt;void Play(uint32_t id, uint8_t volume);&amp;lt;/code&amp;gt;&lt;br /&gt;
: Play a registered sound by ID.&lt;br /&gt;
&lt;br /&gt;
== SceneObject ==&lt;br /&gt;
&lt;br /&gt;
Base class of every visual object. Holds a &amp;lt;code&amp;gt;Math::Transform&amp;lt;/code&amp;gt;, a &amp;lt;code&amp;gt;Math::Color&amp;lt;/code&amp;gt; and a &amp;lt;code&amp;gt;Visible&amp;lt;/code&amp;gt; flag. All setters are '''chainable''' (return &amp;lt;code&amp;gt;SceneObject*&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;virtual void Render() = 0;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Implemented by each concrete object; called by the engine when the object was &amp;lt;code&amp;gt;Add()&amp;lt;/code&amp;gt;-ed to a screen in the current frame.&lt;br /&gt;
; &amp;lt;code&amp;gt;SetPosition(float x, float y)&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;SetPosition(const Math::Vec2&amp;amp;)&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;SetTransform(const Math::Transform&amp;amp;)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Place the object (240×240 screen space). ''The most-used call in the official samples.''&lt;br /&gt;
; &amp;lt;code&amp;gt;SetRotation(int r)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Rotation in degrees; normalized into 0–359 (negative values allowed).&lt;br /&gt;
; &amp;lt;code&amp;gt;SetScale(unsigned s)&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;SetScale(sx, sy)&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;SetXScale(s)&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;SetYScale(s)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Scale in percent (100 = original size).&lt;br /&gt;
; &amp;lt;code&amp;gt;SetMirroring(unsigned m)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Mirror mode (&amp;lt;code&amp;gt;GFX_mirror_t&amp;lt;/code&amp;gt;: BLANK/X/Y/XY).&lt;br /&gt;
; &amp;lt;code&amp;gt;SetColor(uint32_t argb)&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;SetR/SetG/SetB(uint8_t)&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;SetA(uint8_t)&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;SetAf(float)&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;SetAfSafe(float)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Tint/opacity. &amp;lt;code&amp;gt;SetAf&amp;lt;/code&amp;gt; takes 0.0–1.0; &amp;lt;code&amp;gt;SetAfSafe&amp;lt;/code&amp;gt; clamps out-of-range values (added in SDK 5.1).&lt;br /&gt;
; &amp;lt;code&amp;gt;SetVisible(bool)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Hide without removing from the scene.&lt;br /&gt;
; &amp;lt;code&amp;gt;const Math::Vec2 ScreenPosition();&amp;lt;/code&amp;gt;&lt;br /&gt;
: The object's position converted to physical-screen space, taking the screen's current rotation angle (0/90/180/270°) into account.&lt;br /&gt;
; &amp;lt;code&amp;gt;Move(float dx, float dy)&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;Move(const Math::Vec2&amp;amp;)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Screen-angle-aware relative move. '''Only valid inside a &amp;lt;code&amp;gt;Screen::Begin()/End()&amp;lt;/code&amp;gt; block''' — otherwise it logs a warning and does nothing.&lt;br /&gt;
&lt;br /&gt;
Public fields: &amp;lt;code&amp;gt;Math::Transform Transform; Math::Color Color; bool Visible;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Screen ==&lt;br /&gt;
&lt;br /&gt;
One of the three displays of the current module; an array &amp;lt;code&amp;gt;std::array&amp;amp;lt;Screen, 3&amp;amp;gt;&amp;lt;/code&amp;gt; is passed to &amp;lt;code&amp;gt;on_Render()&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;on_PhysicsTick()&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;void Begin(TOPOLOGY_orientation_mode_t mode = ORIENTATION_MODE_MENU, bool autorotation = false);&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;void End();&amp;lt;/code&amp;gt;&lt;br /&gt;
: Open/close the frame block for this screen. &amp;lt;code&amp;gt;mode&amp;lt;/code&amp;gt; selects the orientation reference (MENU / GRAVITY / SPLASH); with &amp;lt;code&amp;gt;autorotation = true&amp;lt;/code&amp;gt; content is auto-rotated as the cube is turned (samples use &amp;lt;code&amp;gt;ORIENTATION_MODE_GRAVITY, true&amp;lt;/code&amp;gt;).&lt;br /&gt;
; &amp;lt;code&amp;gt;SceneObject* Add(SceneObject* obj);&amp;lt;/code&amp;gt;&lt;br /&gt;
: Queue a scene object for rendering on this screen this frame; returns the object for chaining.&lt;br /&gt;
; &amp;lt;code&amp;gt;SceneObject* AddCopy(SceneObject* obj);&amp;lt;/code&amp;gt;&lt;br /&gt;
: Queue an independent ''copy'' — the standard way to draw the same object several times with different positions in one frame (heavily used in the samples).&lt;br /&gt;
; &amp;lt;code&amp;gt;uint8_t ID();&amp;lt;/code&amp;gt;&lt;br /&gt;
: Physical display index — pass to native calls such as &amp;lt;code&amp;gt;MS_getFaceAccelX(screen.ID())&amp;lt;/code&amp;gt;.&lt;br /&gt;
; &amp;lt;code&amp;gt;uint8_t Position();&amp;lt;/code&amp;gt;&lt;br /&gt;
: The screen's place on its cube face (see the render sample above — used to compute cross-screen offsets).&lt;br /&gt;
; &amp;lt;code&amp;gt;uint8_t Face();&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;uint8_t OppositeFace();&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;TOPOLOGY_orientation_t Direction();&amp;lt;/code&amp;gt;&lt;br /&gt;
: Topology of the screen: which face it belongs to, the opposite face, and the facing direction (UP/DOWN/FRONT/…).&lt;br /&gt;
; &amp;lt;code&amp;gt;void SetOrientation(TOPOLOGY_orientation_mode_t mode);&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;uint32_t Angle();&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;bool IsAutorotation();&amp;lt;/code&amp;gt;&lt;br /&gt;
: Orientation control and current rotation angle of the content.&lt;br /&gt;
&lt;br /&gt;
== Gfx::Sprite ==&lt;br /&gt;
&lt;br /&gt;
Static image sprite bound to an image asset by file name (from the app's packed &amp;lt;code&amp;gt;assets/&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
 Sprite(std::string name);&lt;br /&gt;
 Sprite(std::string name, float x, float y);&lt;br /&gt;
 Sprite(std::string name, const Cubios::Math::Transform&amp;amp; t);&lt;br /&gt;
 Sprite(const Sprite&amp;amp; sprite);&lt;br /&gt;
 void Render() override;&lt;br /&gt;
&lt;br /&gt;
Typical use: &amp;lt;code&amp;gt;new Sprite(&amp;quot;idle.png&amp;quot;, Transform(120,120,0))&amp;lt;/code&amp;gt; — center of a 240×240 screen.&lt;br /&gt;
&lt;br /&gt;
== Gfx::Background ==&lt;br /&gt;
&lt;br /&gt;
Full-screen fill. &amp;lt;code&amp;gt;Background(uint32_t argb)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Background(R,G,B[,A])&amp;lt;/code&amp;gt;; recolor at render time via &amp;lt;code&amp;gt;SetColor(...)&amp;lt;/code&amp;gt; (see the Twinkle sample above — one shared background object recolored per screen).&lt;br /&gt;
&lt;br /&gt;
== Gfx::Text ==&lt;br /&gt;
&lt;br /&gt;
Text object.&lt;br /&gt;
&lt;br /&gt;
 Text(std::string text, float x, float y, uint32_t fontSize = 10);&lt;br /&gt;
 Text(std::string text, float x, float y, uint32_t fontSize, const Math::Color&amp;amp; color);&lt;br /&gt;
 Text(std::string text, const Math::Transform&amp;amp; t, uint32_t fontSize, const Math::Color&amp;amp; color,&lt;br /&gt;
      text_align_t al = TEXT_ALIGN_CENTER);&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;SetContent(std::string)&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;FormatContent(const char* fmt, ...)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Replace the text; &amp;lt;code&amp;gt;FormatContent&amp;lt;/code&amp;gt; is printf-style — handy for scores/counters.&lt;br /&gt;
; &amp;lt;code&amp;gt;SetFontSize(uint32_t)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Change size. Alignment via the public &amp;lt;code&amp;gt;Alignment&amp;lt;/code&amp;gt; field (&amp;lt;code&amp;gt;text_align_t&amp;lt;/code&amp;gt;, 9 anchors).&lt;br /&gt;
&lt;br /&gt;
== Gfx::AnimatedSprite ==&lt;br /&gt;
&lt;br /&gt;
Frame-animated sprite. Three ways to construct: an explicit list of asset names; a name pattern (&amp;lt;code&amp;gt;name + frameNumber + extension&amp;lt;/code&amp;gt;) with a first/last frame range; or a [[#Gfx::SpriteAtlas|SpriteAtlas]].&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;int16_t Tick(uint32_t dt);&amp;lt;/code&amp;gt;&lt;br /&gt;
: Advance the animation; call from &amp;lt;code&amp;gt;on_Tick(time, dt)&amp;lt;/code&amp;gt; for every animated sprite. Returns the current frame.&lt;br /&gt;
; &amp;lt;code&amp;gt;SetPlaybackMode(playbackMode_t)&amp;lt;/code&amp;gt;&lt;br /&gt;
: &amp;lt;code&amp;gt;Loop&amp;lt;/code&amp;gt; (wrap around), &amp;lt;code&amp;gt;Bounce&amp;lt;/code&amp;gt; (ping-pong), &amp;lt;code&amp;gt;Set&amp;lt;/code&amp;gt; (manual frame control).&lt;br /&gt;
; &amp;lt;code&amp;gt;SetPlaybackSpeed(int16_t)&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;SetFrame(int16_t)&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;NextFrame()&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;PrevFrame()&amp;lt;/code&amp;gt;&lt;br /&gt;
: Speed and manual frame stepping.&lt;br /&gt;
&lt;br /&gt;
== Gfx::SpriteAtlas ==&lt;br /&gt;
&lt;br /&gt;
A sprite sheet: one image asset cut into sub-rectangles, each rendered by a &amp;lt;code&amp;gt;SpriteAtlasElement&amp;lt;/code&amp;gt; registered in the scene. Added in SDK 6.2 — saves memory versus per-frame images.&lt;br /&gt;
&lt;br /&gt;
 SpriteAtlas&amp;lt;SpriteAtlasElement&amp;gt; atlas(&amp;quot;sheet.png&amp;quot;, &amp;amp;this-&amp;gt;Scene);&lt;br /&gt;
 atlas.AddSprite(MyIds::run0, Math::Rect2(0,   0, 64, 64));&lt;br /&gt;
 atlas.AddSprite(MyIds::run1, Math::Rect2(64,  0, 64, 64));&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;bool AddSprite(uint32_t id, const Math::Rect2&amp;amp; rc);&amp;lt;/code&amp;gt;&lt;br /&gt;
: Create an element for sub-rectangle &amp;lt;code&amp;gt;rc&amp;lt;/code&amp;gt; and register it in the scene under &amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt; (fails if the ID is taken).&lt;br /&gt;
; &amp;lt;code&amp;gt;T* Get(uint32_t)&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;T* operator[](uint32_t)&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;size_t Count()&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;ElementsInsertionOrder()&amp;lt;/code&amp;gt;&lt;br /&gt;
: Element access. &amp;lt;code&amp;gt;SpriteAtlasElement&amp;lt;/code&amp;gt; itself is a normal &amp;lt;code&amp;gt;SceneObject&amp;lt;/code&amp;gt; (position/scale/color) plus &amp;lt;code&amp;gt;Rect()&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Copy()&amp;lt;/code&amp;gt;. An atlas can also feed an [[#Gfx::AnimatedSprite|AnimatedSprite]].&lt;br /&gt;
&lt;br /&gt;
== Gfx::OffscreenRenderTarget ==&lt;br /&gt;
&lt;br /&gt;
Render-to-texture: draw objects into an offscreen buffer once, then use the result as a single scene object (a &amp;quot;baked image&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
 OffscreenRenderTarget(u32_t width, u32_t height, GFX_PixelFormat_t format);&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;void Begin(bool overwrite = false);&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;void End();&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;Add()&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;AddCopy()&amp;lt;/code&amp;gt;&lt;br /&gt;
: Same block pattern as &amp;lt;code&amp;gt;Screen&amp;lt;/code&amp;gt;, but drawing goes into the buffer. &amp;lt;code&amp;gt;overwrite=true&amp;lt;/code&amp;gt; re-bakes.&lt;br /&gt;
; &amp;lt;code&amp;gt;virtual void RenderLayer(renderLayerOrder_t)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Hook to inject drawing &amp;lt;code&amp;gt;BeforeQueue&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;AfterQueue&amp;lt;/code&amp;gt;. Pixel formats: RGB565 / ARGB6666 / ARGB8888.&lt;br /&gt;
&lt;br /&gt;
== Gfx::QRCode ==&lt;br /&gt;
&lt;br /&gt;
QR-code scene object (SDK 6.0+). &amp;lt;code&amp;gt;QRCode(std::string data, x, y[, size])&amp;lt;/code&amp;gt;; &amp;lt;code&amp;gt;SetData()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SetSize()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SetColor()&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;SetBackgroundColor()&amp;lt;/code&amp;gt; (fields &amp;lt;code&amp;gt;ColorOnes&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;ColorZeros&amp;lt;/code&amp;gt;). Used by system apps to link the cube with the mobile app.&lt;br /&gt;
&lt;br /&gt;
== Sound and SoundCollection ==&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Sound(const std::string&amp;amp; name);&amp;lt;/code&amp;gt; → &amp;lt;code&amp;gt;void Play(uint8_t volume = 100);&amp;lt;/code&amp;gt;&lt;br /&gt;
: One sound asset. &amp;lt;code&amp;gt;static Stop()&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;static bool IsPlaying()&amp;lt;/code&amp;gt; control the playback channel.&lt;br /&gt;
; &amp;lt;code&amp;gt;SoundCollection(std::vector&amp;amp;lt;std::string&amp;amp;gt;&amp;amp;)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;(std::vector&amp;amp;lt;Sound*&amp;amp;gt;&amp;amp;)&amp;lt;/code&amp;gt;&lt;br /&gt;
: A set of sounds (SDK 6.2+):&lt;br /&gt;
:; &amp;lt;code&amp;gt;bool PlayRandomSound(uint8_t volume = 100, bool stopCurrent = true);&amp;lt;/code&amp;gt;&lt;br /&gt;
:: Play a random one — the idiom behind varied game SFX.&lt;br /&gt;
:; &amp;lt;code&amp;gt;bool RepeatRandomSounds(uint8_t volume, int delayMin, int delayMax, int deltaTime);&amp;lt;/code&amp;gt;&lt;br /&gt;
:: Keep playing random sounds with a random delay in [min,max]; call it periodically passing the tick delta.&lt;br /&gt;
:; &amp;lt;code&amp;gt;Stop()&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;IsPlaying()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== NetworkMessage and SaveMessage ==&lt;br /&gt;
&lt;br /&gt;
Two identical bit-packing serializers with different buffers: &amp;lt;code&amp;gt;NetworkMessage&amp;lt;/code&amp;gt; (max &amp;lt;code&amp;gt;MESSAGE_SIZE_MAX&amp;lt;/code&amp;gt;) for inter-module packets, &amp;lt;code&amp;gt;SaveMessage&amp;lt;/code&amp;gt; (max &amp;lt;code&amp;gt;GAME_SAVE_SIZE&amp;lt;/code&amp;gt;) for persistent state (SDK 6.0+).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;WriteInt(int value, int bits)&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;WriteSignedInt(int value, int bits)&amp;lt;/code&amp;gt; (signed added in 5.1) / &amp;lt;code&amp;gt;WriteByte&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;WriteBool&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;WriteFloat&amp;lt;/code&amp;gt;&lt;br /&gt;
: Append a value using exactly &amp;lt;code&amp;gt;bits&amp;lt;/code&amp;gt; bits — pack a whole game state into one packet.&lt;br /&gt;
; &amp;lt;code&amp;gt;ReadInt(int bits)&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;ReadSignedInt&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;ReadByte&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;ReadBool&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;ReadFloat&amp;lt;/code&amp;gt;&lt;br /&gt;
: Read back '''in the same order'''.&lt;br /&gt;
; &amp;lt;code&amp;gt;GetData(int&amp;amp; length)&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;SetData(uint8_t*, int)&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;Reset(bool zero = false)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Raw buffer access and cursor reset.&lt;br /&gt;
&lt;br /&gt;
Canonical flow: master module packs → &amp;lt;code&amp;gt;SendNetworkMessage(type, &amp;amp;msg)&amp;lt;/code&amp;gt; → other modules unpack in &amp;lt;code&amp;gt;on_Message()&amp;lt;/code&amp;gt;. For saves: pack → &amp;lt;code&amp;gt;SaveState(&amp;amp;msg)&amp;lt;/code&amp;gt;; restore via &amp;lt;code&amp;gt;LoadState(&amp;amp;id, &amp;amp;msg)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Scramble ==&lt;br /&gt;
&lt;br /&gt;
Cube-scramble helper (SDK 6.0+) for puzzle titles: it performs a given number of virtual twists from the current topology and lets the game track how the mapping changes. Subclass it and implement the callbacks.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;void StartScramble(uint8_t twistsCount);&amp;lt;/code&amp;gt;&lt;br /&gt;
: Run a scramble of &amp;lt;code&amp;gt;twistsCount&amp;lt;/code&amp;gt; random virtual twists.&lt;br /&gt;
; &amp;lt;code&amp;gt;void VirtualTwist(uint8_t screen, uint8_t direction);&amp;lt;/code&amp;gt;&lt;br /&gt;
: Apply one virtual twist programmatically.&lt;br /&gt;
; &amp;lt;code&amp;gt;virtual void on_BeforeTwist() = 0;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Called before each scramble twist.&lt;br /&gt;
; &amp;lt;code&amp;gt;virtual void on_MappingChanged(uint8_t moduleTo, uint8_t screenTo, uint8_t moduleFrom, uint8_t screenFrom) = 0;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Called for every facelet remapped by the twist — move your game state accordingly.&lt;br /&gt;
; &amp;lt;code&amp;gt;virtual void on_Twist(const TOPOLOGY_twistInfo_t twist) = 0;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Called after the twist with its description. Used across the official ''Topology'' samples.&lt;br /&gt;
&lt;br /&gt;
== Splashscreen ==&lt;br /&gt;
&lt;br /&gt;
Standard splash screen with leaderboard integration (SDK 6.0+, reworked in 6.2): title screen, personal best, points table and control hints, rendered from your own sprite assets.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Splashscreen(Application* app, SplsParms::e_LeadersDataType dataType);&amp;lt;/code&amp;gt;&lt;br /&gt;
: Create for an app; &amp;lt;code&amp;gt;dataType&amp;lt;/code&amp;gt; selects how values are displayed (number, time, …).&lt;br /&gt;
; &amp;lt;code&amp;gt;InitSplashScreenSprites(background, mainImage, gameName, QRcode, leaderboardIcon, resultsIcon, twistIcon_1, twistIcon_2, tapIcon_1, tapIcon_2, borderYou)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Bind your sprite IDs to the standard slots (pass −1 to skip a slot).&lt;br /&gt;
; &amp;lt;code&amp;gt;void Render(Screen* screen);&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;void Tick(uint32_t currentTime, uint32_t deltaTime);&amp;lt;/code&amp;gt;&lt;br /&gt;
: Drive it from &amp;lt;code&amp;gt;on_Render&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;on_Tick&amp;lt;/code&amp;gt; while the splash is active.&lt;br /&gt;
; &amp;lt;code&amp;gt;uint32_t GetPersonalBest();&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;void SetRecord(uint32_t value);&amp;lt;/code&amp;gt;&lt;br /&gt;
: Personal best score.&lt;br /&gt;
; &amp;lt;code&amp;gt;SetNamedValue(idx, name, value, type)&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;SetLabel(idx, text)&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;SetApplicationName(name)&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;SetSeparator(s)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Texts and values shown on the splash.&lt;br /&gt;
; &amp;lt;code&amp;gt;SetLeaderBoardTable(e_LeaderBoardType)&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;SetLeaderBoardTable(lbTable[FACES][POSITIONS])&amp;lt;/code&amp;gt;&lt;br /&gt;
: Leaderboard source — built-in or your own table.&lt;br /&gt;
; &amp;lt;code&amp;gt;SetQRCodeLink(link)&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;SetColors(key, base)&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;SetPlaybackSpeed(idx, speed)&amp;lt;/code&amp;gt;&lt;br /&gt;
: QR link, color theme, label animation speed.&lt;br /&gt;
; &amp;lt;code&amp;gt;virtual void RenderUserDefinedScreen(uint8_t type)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Override to add custom splash screens.&lt;br /&gt;
&lt;br /&gt;
== Math ==&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Math::Vec2&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;Math::Vec2i&amp;lt;/code&amp;gt;&lt;br /&gt;
: 2D float/int vectors with arithmetic.&lt;br /&gt;
; &amp;lt;code&amp;gt;Math::Transform&amp;lt;/code&amp;gt;&lt;br /&gt;
: &amp;lt;code&amp;gt;{ Vec2 Position; int Rotation; unsigned ScaleX, ScaleY; unsigned Mirroring; }&amp;lt;/code&amp;gt; — rotation in degrees (&amp;lt;code&amp;gt;SafeRotation()&amp;lt;/code&amp;gt; normalizes), scale in percent (100 = 1:1). Constructors: &amp;lt;code&amp;gt;(x,y)&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(x,y,angle)&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(x,y,angle,sx,sy)&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(x,y,angle,mirror)&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(x,y,angle,sx,sy,mirror)&amp;lt;/code&amp;gt;.&lt;br /&gt;
; &amp;lt;code&amp;gt;Math::Color&amp;lt;/code&amp;gt;&lt;br /&gt;
: ARGB color; &amp;lt;code&amp;gt;Set(0xAARRGGBB)&amp;lt;/code&amp;gt;, per-channel &amp;lt;code&amp;gt;SetA/R/G/B&amp;lt;/code&amp;gt;, float alpha &amp;lt;code&amp;gt;SetAf&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;SetAfSafe&amp;lt;/code&amp;gt;. Named constants in &amp;lt;code&amp;gt;Gfx/Colors.h&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;Colors::black&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Colors::white&amp;lt;/code&amp;gt;, …).&lt;br /&gt;
; &amp;lt;code&amp;gt;Math::Rect2&amp;lt;/code&amp;gt;&lt;br /&gt;
: 2D rectangle — used for [[#Gfx::SpriteAtlas|atlas]] sub-rectangles.&lt;br /&gt;
&lt;br /&gt;
== Where to see it all together ==&lt;br /&gt;
&lt;br /&gt;
The Development Kit ships complete buildable projects using every class above: ''Basics'' (1–4), ''Rendering'', ''Topology'', ''Network'' (messaging between modules), and ''GFX Engine Sample Projects'' (1–3: Twinkle, SnotFlow, …) — create them via the [https://marketplace.visualstudio.com/items?itemName=cubios-inc.WOWCubeSDK WOWCube SDK extension for VS Code].&lt;br /&gt;
&lt;br /&gt;
[[Category:SDK 6.3]]&lt;br /&gt;
[[Category:C++ API]]&lt;/div&gt;</summary>
		<author><name>WowBot</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=SDK_6.3/C%2B%2B/GFX_Engine&amp;diff=16946</id>
		<title>SDK 6.3/C++/GFX Engine</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=SDK_6.3/C%2B%2B/GFX_Engine&amp;diff=16946"/>
		<updated>2026-07-26T09:39:00Z</updated>

		<summary type="html">&lt;p&gt;WowBot: Fix ROBODoc typo parsing (LB_getInfo/LB_getScore restored), detailed Scramble+Splashscreen (WowBot)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{notice|'''Official WOWCube SDK documentation.''' SDK 6.3, C++ (WebAssembly) API. Signatures are extracted from the canonical SDK headers shipped with the WOWCube Development Kit; the headers remain authoritative.}}&lt;br /&gt;
&lt;br /&gt;
{{SDK 6.3 nav}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''← [[SDK 6.3]] · C++ / GFX Engine''&lt;br /&gt;
&lt;br /&gt;
The object-oriented retained layer of the C++ SDK (namespace &amp;lt;code&amp;gt;Cubios&amp;lt;/code&amp;gt;): a scene graph with sprites, text, backgrounds, sounds and math primitives. It sits on top of the [[SDK 6.3/C++/Native API|native ABI]] and is driven by the [[SDK 6.3/C++/Application|Application framework]]. Public signatures below are extracted from the SDK 6.3 headers.&lt;br /&gt;
&lt;br /&gt;
=== Scene ===&lt;br /&gt;
&lt;br /&gt;
The retained scene graph owned by every &amp;lt;code&amp;gt;Application&amp;lt;/code&amp;gt; (field &amp;lt;code&amp;gt;app.Scene&amp;lt;/code&amp;gt;). Holds scene objects and renders them per screen.&lt;br /&gt;
&lt;br /&gt;
Public interface (&amp;lt;code&amp;gt;Scene.h&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
 Scene();&lt;br /&gt;
 virtual ~Scene();&lt;br /&gt;
 uint32_t CreateObject(SceneObject* obj);&lt;br /&gt;
 bool CreateObjectWithID(uint32_t id, SceneObject* obj);&lt;br /&gt;
 uint32_t CreateSound(Sound* obj);&lt;br /&gt;
 bool CreateSoundWithID(uint32_t id, Sound* obj);&lt;br /&gt;
 bool DisposeObjectWithID(uint32_t id);&lt;br /&gt;
 bool DisposeSoundWithID(uint32_t id);&lt;br /&gt;
 void DisposeAllObjects();&lt;br /&gt;
 void Play(uint32_t id, uint8_t volume);&lt;br /&gt;
&lt;br /&gt;
=== SceneObject ===&lt;br /&gt;
&lt;br /&gt;
Base class of every visual object in the scene graph. Provides position, rotation, scale, opacity, z-order, per-screen placement and lifecycle.&lt;br /&gt;
&lt;br /&gt;
Public interface (&amp;lt;code&amp;gt;SceneObject.h&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
 SceneObject():Parent(nullptr),ScreenAngle(0),Visible(true),InBegin(false);&lt;br /&gt;
 virtual ~SceneObject();&lt;br /&gt;
 virtual void Render() = 0;&lt;br /&gt;
 SceneObject* SetColor(uint32_t v);&lt;br /&gt;
 SceneObject* SetA(uint8_t a);&lt;br /&gt;
 SceneObject* SetAf(float a);&lt;br /&gt;
 SceneObject* SetAfSafe(float a);&lt;br /&gt;
 SceneObject* SetR(uint8_t r);&lt;br /&gt;
 SceneObject* SetG(uint8_t g);&lt;br /&gt;
 SceneObject* SetB(uint8_t b);&lt;br /&gt;
 SceneObject* SetVisible(bool v);&lt;br /&gt;
 SceneObject* SetTransform(const Math::Transform&amp;amp; t);&lt;br /&gt;
 SceneObject* SetPosition(const Math::Vec2&amp;amp; p);&lt;br /&gt;
 SceneObject* SetPosition(float x, float y);&lt;br /&gt;
 SceneObject* SetRotation(int r);&lt;br /&gt;
 SceneObject* SetMirroring(unsigned int m);&lt;br /&gt;
 SceneObject* SetScale(unsigned int s);&lt;br /&gt;
 SceneObject* SetScale(unsigned int sx, unsigned int sy);&lt;br /&gt;
 SceneObject* SetXScale(unsigned int s);&lt;br /&gt;
 SceneObject* SetYScale(unsigned int s);&lt;br /&gt;
 const Math::Vec2 ScreenPosition();&lt;br /&gt;
 if(this-&amp;gt;Parent==nullptr) return pos;&lt;br /&gt;
 switch(ScreenAngle);&lt;br /&gt;
 pos.Set(this-&amp;gt;Transform.Position.X,this-&amp;gt;Transform.Position.Y);&lt;br /&gt;
 pos.Set(240-this-&amp;gt;Transform.Position.Y,this-&amp;gt;Transform.Position.X);&lt;br /&gt;
 pos.Set(240-this-&amp;gt;Transform.Position.X,240-this-&amp;gt;Transform.Position.Y);&lt;br /&gt;
 pos.Set(this-&amp;gt;Transform.Position.Y,240-this-&amp;gt;Transform.Position.X);&lt;br /&gt;
 SceneObject* Move(const Math::Vec2&amp;amp; v);&lt;br /&gt;
 SceneObject* Move(float dx, float dy);&lt;br /&gt;
 if(this-&amp;gt;Parent==nullptr) return this;&lt;br /&gt;
 if(!this-&amp;gt;InBegin);&lt;br /&gt;
 LOG_w(&amp;quot;SceneObject: Move() can only be called within Begin/End block!\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
=== Screen ===&lt;br /&gt;
&lt;br /&gt;
One of the three displays of the current module; passed to &amp;lt;code&amp;gt;on_Render()&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;on_PhysicsTick()&amp;lt;/code&amp;gt;. Render target selector.&lt;br /&gt;
&lt;br /&gt;
Public interface (&amp;lt;code&amp;gt;Screen.h&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
 Screen(uint8_t id);&lt;br /&gt;
 void SetOrientation(TOPOLOGY_orientation_mode_t mode);&lt;br /&gt;
 uint8_t Position() const;&lt;br /&gt;
 TOPOLOGY_orientation_t Direction() const;&lt;br /&gt;
 uint8_t OppositeFace() const;&lt;br /&gt;
 uint8_t Face() const;&lt;br /&gt;
 inline uint8_t ID() const;&lt;br /&gt;
 inline uint32_t Angle() const;&lt;br /&gt;
 SceneObject* Add(SceneObject* obj);&lt;br /&gt;
 SceneObject* AddCopy(SceneObject* obj);&lt;br /&gt;
 void Begin(TOPOLOGY_orientation_mode_t mode = Cubios::ORIENTATION_MODE_MENU,bool autorotation = false);&lt;br /&gt;
 void End();&lt;br /&gt;
 inline bool IsAutorotation();&lt;br /&gt;
&lt;br /&gt;
=== Object ===&lt;br /&gt;
&lt;br /&gt;
Minimal reference-counted base class for engine resources.&lt;br /&gt;
&lt;br /&gt;
Public interface (&amp;lt;code&amp;gt;Object.h&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
 Object();&lt;br /&gt;
 virtual ~Object();&lt;br /&gt;
 inline void SetId(int16_t id);&lt;br /&gt;
&lt;br /&gt;
=== Gfx::Background ===&lt;br /&gt;
&lt;br /&gt;
Full-screen background image object.&lt;br /&gt;
&lt;br /&gt;
Public interface (&amp;lt;code&amp;gt;Gfx/Background.h&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
 Background(uint32_t color);&lt;br /&gt;
 Background(uint8_t R, uint8_t G, uint8_t B);&lt;br /&gt;
 Background(uint8_t R, uint8_t G, uint8_t B, uint8_t A);&lt;br /&gt;
 virtual ~Background();&lt;br /&gt;
 void Render() override;&lt;br /&gt;
 Cubios::SceneObject* SetColor(uint32_t color);&lt;br /&gt;
 Cubios::SceneObject* SetColor(uint8_t R, uint8_t G, uint8_t B);&lt;br /&gt;
 Cubios::SceneObject* SetColor(uint8_t R, uint8_t G, uint8_t B, uint8_t A);&lt;br /&gt;
&lt;br /&gt;
=== Gfx::Sprite ===&lt;br /&gt;
&lt;br /&gt;
Static image sprite bound to an image asset by name.&lt;br /&gt;
&lt;br /&gt;
Public interface (&amp;lt;code&amp;gt;Gfx/Sprite.h&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
 Sprite(std::string name, const Cubios::Math::Transform&amp;amp; t);&lt;br /&gt;
 Sprite(std::string name, float x, float y);&lt;br /&gt;
 Sprite(std::string name);&lt;br /&gt;
 Sprite(const Sprite&amp;amp; sprite);&lt;br /&gt;
 virtual ~Sprite();&lt;br /&gt;
 void Render() override;&lt;br /&gt;
&lt;br /&gt;
=== Gfx::AnimatedSprite ===&lt;br /&gt;
&lt;br /&gt;
Frame-animated sprite.&lt;br /&gt;
&lt;br /&gt;
Public interface (&amp;lt;code&amp;gt;Gfx/AnimatedSprite.h&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
 AnimatedSprite(std::vector&amp;lt;std::string&amp;gt;&amp;amp; names, const Cubios::Math::Transform&amp;amp; t);&lt;br /&gt;
 AnimatedSprite(std::vector&amp;lt;std::string&amp;gt;&amp;amp; names, float x, float y);&lt;br /&gt;
 AnimatedSprite(std::vector&amp;lt;std::string&amp;gt;&amp;amp; names);&lt;br /&gt;
 AnimatedSprite(std::string name,std::string extension, int16_t firstFrame, int16_t lastFrame, const Cubios::Math::Transform&amp;amp; t);&lt;br /&gt;
 AnimatedSprite(std::string name,std::string extension, int16_t firstFrame, int16_t lastFrame, float x, float y);&lt;br /&gt;
 AnimatedSprite(std::string name,std::string extension, int16_t firstFrame, int16_t lastFrame);&lt;br /&gt;
 AnimatedSprite(const AnimatedSprite&amp;amp; sprite);&lt;br /&gt;
 AnimatedSprite(Cubios::Gfx::SpriteAtlas&amp;lt;Cubios::Gfx::SpriteAtlasElement&amp;gt;* atlas, const Cubios::Math::Transform&amp;amp; t);&lt;br /&gt;
 AnimatedSprite(Cubios::Gfx::SpriteAtlas&amp;lt;Cubios::Gfx::SpriteAtlasElement&amp;gt;* atlas, float x, float y);&lt;br /&gt;
 AnimatedSprite(Cubios::Gfx::SpriteAtlas&amp;lt;Cubios::Gfx::SpriteAtlasElement&amp;gt;* atlas);&lt;br /&gt;
 virtual ~AnimatedSprite();&lt;br /&gt;
 void Render() override;&lt;br /&gt;
 int16_t Tick(uint32_t dt);&lt;br /&gt;
 Cubios::SceneObject* SetFrame(int16_t frameNumber);&lt;br /&gt;
 Cubios::SceneObject* SetPlaybackSpeed(int16_t speed);&lt;br /&gt;
 Cubios::SceneObject* SetPlaybackMode(playbackMode_t mode);&lt;br /&gt;
 int16_t PrevFrame();&lt;br /&gt;
 int16_t NextFrame();&lt;br /&gt;
&lt;br /&gt;
=== Gfx::SpriteAtlas ===&lt;br /&gt;
&lt;br /&gt;
Sprite atlas: a sheet of sub-images rendered via &amp;lt;code&amp;gt;SpriteAtlasElement&amp;lt;/code&amp;gt;. Added in SDK 6.2.&lt;br /&gt;
&lt;br /&gt;
Public interface (&amp;lt;code&amp;gt;Gfx/SpriteAtlas.h&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
 SpriteAtlas(std::string name, Cubios::Scene* scene);&lt;br /&gt;
 virtual ~SpriteAtlas();&lt;br /&gt;
 bool AddSprite(uint32_t id, const Cubios::Math::Rect2&amp;amp; rc);&lt;br /&gt;
 bool RemoveSprite(uint32_t id);&lt;br /&gt;
 T* Get(uint32_t ind);&lt;br /&gt;
 inline size_t Count();&lt;br /&gt;
 inline std::vector&amp;lt;uint32_t&amp;gt;* ElementsInsertionOrder();&lt;br /&gt;
&lt;br /&gt;
=== Gfx::SpriteAtlasElement ===&lt;br /&gt;
&lt;br /&gt;
One element (sub-rectangle) of a &amp;lt;code&amp;gt;SpriteAtlas&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Public interface (&amp;lt;code&amp;gt;Gfx/SpriteAtlas.h&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
 SpriteAtlasElement(SpriteAtlasBase* host, const Cubios::Math::Rect2&amp;amp; rc);&lt;br /&gt;
 virtual ~SpriteAtlasElement();&lt;br /&gt;
 void Render() override;&lt;br /&gt;
 virtual SpriteAtlasElement* Copy();&lt;br /&gt;
 inline Cubios::Math::Rect2* Rect();&lt;br /&gt;
&lt;br /&gt;
=== Gfx::Text ===&lt;br /&gt;
&lt;br /&gt;
Text object with scale, alignment and color.&lt;br /&gt;
&lt;br /&gt;
Public interface (&amp;lt;code&amp;gt;Gfx/Text.h&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
 Text(std::string text, const Cubios::Math::Transform&amp;amp; t, uint32_t fontSize, const Cubios::Math::Color&amp;amp; color, Cubios::text_align_t al = Cubios::text_align_t::TEXT_ALIGN_CENTER);&lt;br /&gt;
 Text(std::string text, const Cubios::Math::Transform&amp;amp; t, uint32_t fontSize = 10, Cubios::text_align_t al = Cubios::text_align_t::TEXT_ALIGN_CENTER);&lt;br /&gt;
 Text(std::string text, float x, float y, uint32_t fontSize = 10);&lt;br /&gt;
 Text(std::string text, float x, float y, uint32_t fontSize, const Cubios::Math::Color&amp;amp; color);&lt;br /&gt;
 virtual ~Text();&lt;br /&gt;
 void Render() override;&lt;br /&gt;
 Cubios::SceneObject* SetContent(std::string text);&lt;br /&gt;
 Cubios::SceneObject* FormatContent(char const* format,...);&lt;br /&gt;
 Cubios::SceneObject* SetFontSize(uint32_t fontSize);&lt;br /&gt;
&lt;br /&gt;
=== Gfx::QRCode ===&lt;br /&gt;
&lt;br /&gt;
QR-code object rendered on screen. Added in SDK 6.0.&lt;br /&gt;
&lt;br /&gt;
Public interface (&amp;lt;code&amp;gt;Gfx/QRCode.h&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
 QRCode(std::string data, const Cubios::Math::Transform&amp;amp; t);&lt;br /&gt;
 QRCode(std::string data, float x, float y);&lt;br /&gt;
 QRCode(std::string data, const Cubios::Math::Transform&amp;amp; t, u32_t size);&lt;br /&gt;
 QRCode(std::string data, float x, float y, u32_t size);&lt;br /&gt;
 QRCode(const QRCode&amp;amp; qr);&lt;br /&gt;
 virtual ~QRCode();&lt;br /&gt;
 Cubios::SceneObject* SetSize(u32_t size);&lt;br /&gt;
 Cubios::SceneObject* SetColor(const Math::Color&amp;amp; color);&lt;br /&gt;
 Cubios::SceneObject* SetBackgroundColor(const Math::Color&amp;amp; color);&lt;br /&gt;
 Cubios::SceneObject* SetData(std::string data);&lt;br /&gt;
 void Render() override;&lt;br /&gt;
&lt;br /&gt;
=== Gfx::OffscreenRenderTarget ===&lt;br /&gt;
&lt;br /&gt;
Offscreen render target (baked image) usable as a scene object.&lt;br /&gt;
&lt;br /&gt;
Public interface (&amp;lt;code&amp;gt;Gfx/OffscreenRenderTarget.h&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
 OffscreenRenderTarget(u32_t width, u32_t height, Cubios::GFX_PixelFormat_t format);&lt;br /&gt;
 virtual ~OffscreenRenderTarget();&lt;br /&gt;
 Cubios::SceneObject* Add(Cubios::SceneObject* obj);&lt;br /&gt;
 Cubios::SceneObject* AddCopy(Cubios::SceneObject* obj);&lt;br /&gt;
 void Begin(bool overwrite=false);&lt;br /&gt;
 void End();&lt;br /&gt;
 void Render() override;&lt;br /&gt;
 virtual void RenderLayer(renderLayerOrder_t order);&lt;br /&gt;
&lt;br /&gt;
=== Sound ===&lt;br /&gt;
&lt;br /&gt;
A sound asset; play, stop and query state.&lt;br /&gt;
&lt;br /&gt;
Public interface (&amp;lt;code&amp;gt;Sound.h&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
 explicit Sound(const std::string&amp;amp; name);&lt;br /&gt;
 ~Sound();&lt;br /&gt;
 void Play(uint8_t volume = 100);&lt;br /&gt;
 static void Stop();&lt;br /&gt;
 static bool IsPlaying();&lt;br /&gt;
&lt;br /&gt;
=== SoundCollection ===&lt;br /&gt;
&lt;br /&gt;
A set of sounds with random playback helpers. Added in SDK 6.2.&lt;br /&gt;
&lt;br /&gt;
Public interface (&amp;lt;code&amp;gt;Sound.h&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
 SoundCollection(std::vector&amp;lt;std::string&amp;gt;&amp;amp; names);&lt;br /&gt;
 SoundCollection(std::vector&amp;lt;Cubios::Sound*&amp;gt;&amp;amp; sounds);&lt;br /&gt;
 virtual ~SoundCollection();&lt;br /&gt;
 bool PlayRandomSound(uint8_t volume = 100, bool stopCurrent = true);&lt;br /&gt;
 bool RepeatRandomSounds(uint8_t volume, int delayMin, int delayMax, int deltaTime);&lt;br /&gt;
 void Stop();&lt;br /&gt;
 bool IsPlaying();&lt;br /&gt;
&lt;br /&gt;
=== NetworkMessage ===&lt;br /&gt;
&lt;br /&gt;
Bit-packed serializer for inter-module messages (write/read ints, signed ints, floats).&lt;br /&gt;
&lt;br /&gt;
Public interface (&amp;lt;code&amp;gt;NetworkMessage.h&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
 NetworkMessage(uint8_t* data=NULL,int length=MESSAGE_SIZE_MAX);&lt;br /&gt;
 virtual ~NetworkMessage();&lt;br /&gt;
 void Print();&lt;br /&gt;
 void WriteInt(int value, int bits);&lt;br /&gt;
 void WriteByte(uint8_t value);&lt;br /&gt;
 void WriteSignedInt(int value, int bits);&lt;br /&gt;
 void WriteBool(bool value);&lt;br /&gt;
 void WriteFloat(float value);&lt;br /&gt;
 int ReadInt(int bits);&lt;br /&gt;
 int ReadSignedInt(int bits);&lt;br /&gt;
 uint8_t ReadByte();&lt;br /&gt;
 bool ReadBool();&lt;br /&gt;
 float ReadFloat();&lt;br /&gt;
 uint8_t* GetData(int&amp;amp; length);&lt;br /&gt;
 void SetData(uint8_t* data, int length);&lt;br /&gt;
 inline void Reset(bool zero=false);&lt;br /&gt;
&lt;br /&gt;
=== SaveMessage ===&lt;br /&gt;
&lt;br /&gt;
Serializer for persistent state (used with &amp;lt;code&amp;gt;SaveState()&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;LoadState()&amp;lt;/code&amp;gt;). Added in SDK 6.0.&lt;br /&gt;
&lt;br /&gt;
Public interface (&amp;lt;code&amp;gt;SaveMessage.h&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
 SaveMessage(uint8_t* data=NULL,int length=GAME_SAVE_SIZE);&lt;br /&gt;
 virtual ~SaveMessage();&lt;br /&gt;
 void Print();&lt;br /&gt;
 void WriteInt(int value, int bits);&lt;br /&gt;
 void WriteByte(uint8_t value);&lt;br /&gt;
 void WriteSignedInt(int value, int bits);&lt;br /&gt;
 void WriteBool(bool value);&lt;br /&gt;
 void WriteFloat(float value);&lt;br /&gt;
 int ReadInt(int bits);&lt;br /&gt;
 int ReadSignedInt(int bits);&lt;br /&gt;
 uint8_t ReadByte();&lt;br /&gt;
 bool ReadBool();&lt;br /&gt;
 float ReadFloat();&lt;br /&gt;
 uint8_t* GetData(int&amp;amp; length);&lt;br /&gt;
 void SetData(uint8_t* data, int length);&lt;br /&gt;
 inline void Reset(bool zero=false);&lt;br /&gt;
&lt;br /&gt;
=== Scramble ===&lt;br /&gt;
&lt;br /&gt;
Cube-scramble helper. Added in SDK 6.0.&lt;br /&gt;
&lt;br /&gt;
Public interface (&amp;lt;code&amp;gt;Scramble.h&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
 Scramble();&lt;br /&gt;
 ~Scramble();&lt;br /&gt;
 void StartScramble(uint8_t twistsCount);&lt;br /&gt;
 void VirtualTwist(uint8_t screen, uint8_t direction);&lt;br /&gt;
 virtual void on_BeforeTwist() = 0;&lt;br /&gt;
 virtual void on_MappingChanged(uint8_t moduleTo, uint8_t screenTo, uint8_t moduleFrom, uint8_t screenFrom) = 0;&lt;br /&gt;
 virtual void on_Twist(const Cubios::TOPOLOGY_twistInfo_t twist) = 0;&lt;br /&gt;
&lt;br /&gt;
=== Splashscreen ===&lt;br /&gt;
&lt;br /&gt;
Standard splash screen with leaderboard support (reworked in SDK 6.2).&lt;br /&gt;
&lt;br /&gt;
Public interface (&amp;lt;code&amp;gt;Splashscreen.h&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
 Splashscreen(Cubios::Application *app, SplsParms::e_LeadersDataType dataType);&lt;br /&gt;
 ~Splashscreen();&lt;br /&gt;
 virtual void Render(Cubios::Screen* screen);&lt;br /&gt;
 virtual void Tick(uint32_t currentTime, uint32_t deltaTime);&lt;br /&gt;
 uint32_t GetPersonalBest();&lt;br /&gt;
 void SetRecord(uint32_t value);&lt;br /&gt;
 void SetNamedValue(uint8_t idx, std::string name, uint32_t value, SplsParms::e_LeadersDataType type = SplsParms::e_LeadersDataType::typeNumber);&lt;br /&gt;
 void SetSeparator(std::string s);&lt;br /&gt;
 void SetLabel(SplsParms::e_LabelTypes idx, std::string text);&lt;br /&gt;
 void SetApplicationName(std::string name);&lt;br /&gt;
 void SetLeaderBoardTable(SplsParms::e_LeaderBoardType type);&lt;br /&gt;
 void SetLeaderBoardTable(uint32_t (&amp;amp;lbTable)[TOPOLOGY_FACES_MAX][TOPOLOGY_POSITIONS_MAX]);&lt;br /&gt;
 void SetPlaybackSpeed(SplsParms::e_LabelTypes idx, uint32_t speed);&lt;br /&gt;
 void SetQRCodeLink(std::string link);&lt;br /&gt;
 void SetColors(Cubios::Math::Color key, Cubios::Math::Color base);&lt;br /&gt;
 void SetTopology(uint8_t screen, Cubios::TOPOLOGY_place_t p);&lt;br /&gt;
 void GetTopology(TOPOLOGY_orientation_mode_t mode, bool replaceFaceToOrientation);&lt;br /&gt;
 virtual void RenderUserDefinedScreen(uint8_t type);&lt;br /&gt;
&lt;br /&gt;
=== Math::Vec2 ===&lt;br /&gt;
&lt;br /&gt;
2D float vector.&lt;br /&gt;
&lt;br /&gt;
Public interface (&amp;lt;code&amp;gt;Math/Vec2.h&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
 Vec2();&lt;br /&gt;
 Vec2(const float _x, const float _y);&lt;br /&gt;
 Vec2(const Vec2&amp;amp; vec);&lt;br /&gt;
 Vec2(const float* p);&lt;br /&gt;
 void Set(const float _x, const float _y);&lt;br /&gt;
 void Set(const Vec2&amp;amp; vec);&lt;br /&gt;
 void Set(const float* p);&lt;br /&gt;
 float Len() const;&lt;br /&gt;
 void Norm();&lt;br /&gt;
 bool IsEqual(const Vec2&amp;amp; v, const float tol) const;&lt;br /&gt;
 int Compare(const Vec2&amp;amp; v, float tol) const;&lt;br /&gt;
&lt;br /&gt;
=== Math::Vec2i ===&lt;br /&gt;
&lt;br /&gt;
2D integer vector.&lt;br /&gt;
&lt;br /&gt;
Public interface (&amp;lt;code&amp;gt;Math/Vec2.h&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
 Vec2i();&lt;br /&gt;
 Vec2i(const int16_t _x, const int16_t _y);&lt;br /&gt;
 Vec2i(const Vec2i&amp;amp; vec);&lt;br /&gt;
 Vec2i(const int16_t* p);&lt;br /&gt;
 void Set(const int16_t _x, const int16_t _y);&lt;br /&gt;
 void Set(const Vec2i&amp;amp; vec);&lt;br /&gt;
 void Set(const int16_t* p);&lt;br /&gt;
 float Len() const;&lt;br /&gt;
 void Norm();&lt;br /&gt;
 bool IsEqual(const Vec2i&amp;amp; v, const float tol) const;&lt;br /&gt;
 int Compare(const Vec2i&amp;amp; v, float tol) const;&lt;br /&gt;
&lt;br /&gt;
=== Math::Transform ===&lt;br /&gt;
&lt;br /&gt;
Position + rotation + mirroring transform of a scene object.&lt;br /&gt;
&lt;br /&gt;
Public interface (&amp;lt;code&amp;gt;Math/Transform.h&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
 Transform():Position(0,0),Rotation(0),Mirroring(0),ScaleX(100),ScaleY(100);&lt;br /&gt;
 Transform(float x, float y): Position(x,y),Rotation(0),Mirroring(0),ScaleX(100),ScaleY(100);&lt;br /&gt;
 Transform(float x, float y, unsigned int a): Position(x,y),Rotation(a),Mirroring(0),ScaleX(100),ScaleY(100);&lt;br /&gt;
 Transform(float x, float y, unsigned int a, unsigned int sx, unsigned int sy ): Position(x,y),Rotation(a),Mirroring(0),ScaleX(sx),ScaleY(sy);&lt;br /&gt;
 Transform(float x, float y, unsigned int a, unsigned int m): Position(x,y),Rotation(a),Mirroring(m),ScaleX(100),ScaleY(100);&lt;br /&gt;
 Transform(float x, float y, unsigned int a, unsigned int sx, unsigned int sy, unsigned int m): Position(x,y),Rotation(a),Mirroring(m),ScaleX(sx),ScaleY(sy);&lt;br /&gt;
 Transform(const Transform&amp;amp; t): Position(t.Position),Rotation(t.Rotation),Mirroring(t.Mirroring),ScaleX(t.ScaleX),ScaleY(t.ScaleY);&lt;br /&gt;
 int SafeRotation();&lt;br /&gt;
&lt;br /&gt;
=== Math::Color ===&lt;br /&gt;
&lt;br /&gt;
RGBA color with float/byte accessors (see also &amp;lt;code&amp;gt;Gfx/Colors.h&amp;lt;/code&amp;gt; named constants).&lt;br /&gt;
&lt;br /&gt;
Public interface (&amp;lt;code&amp;gt;Math/Color.h&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
 Color():_R(255),_G(255),_B(255),_A(255),_Value(0xFFFFFFFF);&lt;br /&gt;
 Color(uint8_t r, uint8_t g, uint32_t b):_R(r),_G(g),_B(b),_A(255);&lt;br /&gt;
 Color(uint8_t r, uint8_t g, uint32_t b, uint8_t a):_R(r),_G(g),_B(b),_A(a);&lt;br /&gt;
 Color(uint32_t v):_Value(v);&lt;br /&gt;
 this-&amp;gt;_B = (v &amp;amp; 0x000000ff);&lt;br /&gt;
 this-&amp;gt;_G = (v &amp;amp; 0x0000ff00) &amp;gt;&amp;gt; 8;&lt;br /&gt;
 this-&amp;gt;_R = (v &amp;amp; 0x00ff0000) &amp;gt;&amp;gt; 16;&lt;br /&gt;
 this-&amp;gt;_A = (v &amp;amp; 0xff000000) &amp;gt;&amp;gt; 24;&lt;br /&gt;
 void Set(uint8_t r, uint8_t g, uint32_t b, uint8_t a);&lt;br /&gt;
 void Set(uint8_t r, uint8_t g, uint32_t b);&lt;br /&gt;
 void Set(uint32_t v);&lt;br /&gt;
 inline void SetA(uint8_t a);&lt;br /&gt;
 inline void SetAf(float a);&lt;br /&gt;
 inline void SetAfSafe(float a);&lt;br /&gt;
 inline void SetR(uint8_t r);&lt;br /&gt;
 inline void SetG(uint8_t g);&lt;br /&gt;
 inline void SetB(uint8_t b);&lt;br /&gt;
 inline uint8_t A();&lt;br /&gt;
 inline float Af();&lt;br /&gt;
 inline uint8_t R();&lt;br /&gt;
 inline uint8_t G();&lt;br /&gt;
 inline uint8_t B();&lt;br /&gt;
 inline uint32_t Value();&lt;br /&gt;
&lt;br /&gt;
=== Math::Rect2 ===&lt;br /&gt;
&lt;br /&gt;
2D rectangle.&lt;br /&gt;
&lt;br /&gt;
Public interface (&amp;lt;code&amp;gt;Math/Rect2.h&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
 Rect2();&lt;br /&gt;
 Rect2(const Vec2i&amp;amp; topLeft, const Vec2i&amp;amp; bottomRight);&lt;br /&gt;
 Rect2(int16_t x, int16_t y, int16_t width, int16_t height);&lt;br /&gt;
 void Set(const Vec2i&amp;amp; topLeft, const Vec2i&amp;amp; bottomRight);&lt;br /&gt;
 bool IsInside(const Vec2i&amp;amp; p) const;&lt;br /&gt;
 Vec2i Midpoint() const;&lt;br /&gt;
&lt;br /&gt;
[[Category:SDK 6.3]]&lt;br /&gt;
[[Category:C++ API]]&lt;/div&gt;</summary>
		<author><name>WowBot</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=SDK_6.3/PAWN/Leaderboard&amp;diff=16944</id>
		<title>SDK 6.3/PAWN/Leaderboard</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=SDK_6.3/PAWN/Leaderboard&amp;diff=16944"/>
		<updated>2026-07-26T09:38:59Z</updated>

		<summary type="html">&lt;p&gt;WowBot: Fix ROBODoc typo parsing (LB_getInfo/LB_getScore restored), detailed Scramble+Splashscreen (WowBot)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{notice|'''Official WOWCube SDK documentation.''' SDK 6.3, PAWN API. Generated from the canonical SDK headers — do not edit by hand; regenerate from source.}}&lt;br /&gt;
&lt;br /&gt;
{{SDK 6.3 nav}}&lt;br /&gt;
&lt;br /&gt;
''← [[SDK 6.3]] · PAWN / Leaderboard''&lt;br /&gt;
&lt;br /&gt;
==Data structures==&lt;br /&gt;
&lt;br /&gt;
===LB_INFO===&lt;br /&gt;
Syntax:&lt;br /&gt;
 #define LB_INFO [.leadCount, .selfPosition, .selfScore, .wholeUserListCount]&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Array with named fields with various leaderboard information.&lt;br /&gt;
: Fields:&lt;br /&gt;
:* leadCount - how many best results there are available to display&lt;br /&gt;
:* selfPosition - place which current user takes&lt;br /&gt;
:* selfScore - current users score&lt;br /&gt;
:* wholeUserListCount - total users count&lt;br /&gt;
&lt;br /&gt;
See also: [[#LB_getInfo|LB_getInfo()]]&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - added&lt;br /&gt;
&lt;br /&gt;
==Functions==&lt;br /&gt;
&lt;br /&gt;
===LB_getInfo===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native LB_getInfo(info[LB_INFO]);&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get leaderboard description.&lt;br /&gt;
: Players score and achievements can be saved and shared via mobile&lt;br /&gt;
: application and WOWCube Entertainment System servers. This function&lt;br /&gt;
: provides synced information necessary to display points table.&lt;br /&gt;
: Outputs&lt;br /&gt;
:* info - structure describing leaderboard&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Error code:&lt;br /&gt;
: * 0 - success&lt;br /&gt;
: * -1 - incorrect arguments count&lt;br /&gt;
: * -2 - leaderboard is not synced&lt;br /&gt;
: * -3 - fail to fill output structure&lt;br /&gt;
&lt;br /&gt;
See also: [[#LB_INFO|LB_INFO]], [[#LB_getScore|LB_getScore()]]&lt;br /&gt;
&lt;br /&gt;
===LB_getScore===&lt;br /&gt;
Syntax:&lt;br /&gt;
 native LB_getScore(leadTableBin[], size = sizeof(leadTableBin));&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get best results data data.&lt;br /&gt;
: Players score and achievements can be saved and shared via mobile&lt;br /&gt;
: application and WOWCube Entertainment System servers. This function&lt;br /&gt;
: provides best results table data.&lt;br /&gt;
&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''size''&lt;br /&gt;
:: how many results to get&lt;br /&gt;
: Outputs&lt;br /&gt;
: ''leadTableBin''&lt;br /&gt;
:: TBD, should be structure with name and score&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Error code:&lt;br /&gt;
: * 0 - success&lt;br /&gt;
: * -1 - incorrect arguments count&lt;br /&gt;
: * -2 - leaderboard is not synced&lt;br /&gt;
: * -3 - fail to fill output structure&lt;br /&gt;
&lt;br /&gt;
See also: [[#LB_getInfo|LB_getInfo()]]&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - align error codes with LB_getInfo.&lt;br /&gt;
&lt;br /&gt;
[[Category:SDK 6.3]]&lt;br /&gt;
[[Category:PAWN API]]&lt;/div&gt;</summary>
		<author><name>WowBot</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=SDK_6.3/C%2B%2B/Native_API&amp;diff=16945</id>
		<title>SDK 6.3/C++/Native API</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=SDK_6.3/C%2B%2B/Native_API&amp;diff=16945"/>
		<updated>2026-07-26T09:38:59Z</updated>

		<summary type="html">&lt;p&gt;WowBot: Fix ROBODoc typo parsing (LB_getInfo/LB_getScore restored), detailed Scramble+Splashscreen (WowBot)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{notice|'''Official WOWCube SDK documentation.''' SDK 6.3, C++ (WebAssembly) API. Signatures are extracted from the canonical SDK headers shipped with the WOWCube Development Kit; the headers remain authoritative.}}&lt;br /&gt;
&lt;br /&gt;
{{SDK 6.3 nav}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''← [[SDK 6.3]] · C++ / Native API''&lt;br /&gt;
&lt;br /&gt;
The low-level C ABI available to C/C++ (and Rust) cubeapps, declared in &amp;lt;code&amp;gt;native.h&amp;lt;/code&amp;gt;. These are the same engine functions as the [[SDK 6.3/PAWN/Core|PAWN API]] — descriptions of shared functions below are taken from the official SDK reference. On top of this layer the SDK provides the object-oriented [[SDK 6.3/C++/Application|Application framework]] and the [[SDK 6.3/C++/GFX Engine|GFX Engine]].&lt;br /&gt;
&lt;br /&gt;
== Types and data structures ==&lt;br /&gt;
&lt;br /&gt;
Defined in &amp;lt;code&amp;gt;native.h&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;native_defines.h&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 typedef uint32_t u32_t;   typedef int32_t i32_t;&lt;br /&gt;
 typedef int32_t soundID_t; typedef int32_t spriteID_t;&lt;br /&gt;
 union AppVersion_t { uint32_t full; struct { uint16_t patch:16; uint8_t minor:4; uint8_t major:4; uint8_t reserved:8; }; };&lt;br /&gt;
 struct TOPOLOGY_faceletInfo_t { int32_t module; int32_t screen; int32_t connected; };&lt;br /&gt;
 struct TOPOLOGY_place_t      { int32_t face; int32_t position; };&lt;br /&gt;
 struct TOPOLOGY_twistInfo_t  { int32_t screen; int32_t count; int32_t direction; };&lt;br /&gt;
 struct LB_info_t   { int32_t boardCount; int32_t selfPosition; int32_t selfScore; int32_t wholeUserListCount; };&lt;br /&gt;
 struct GFX_Particle_t { ttl, vx, vy, ax, ay, explosion, velocity, duration, frequency, max, loop, time };&lt;br /&gt;
&lt;br /&gt;
Enumerations: &amp;lt;code&amp;gt;TOPOLOGY_twist_t&amp;lt;/code&amp;gt; (LEFT/RIGHT/DOUBLE), &amp;lt;code&amp;gt;TOPOLOGY_orientation_mode_t&amp;lt;/code&amp;gt; (MENU/GRAVITY/SPLASH), &amp;lt;code&amp;gt;TOPOLOGY_orientation_t&amp;lt;/code&amp;gt; (UP/DOWN/FRONT/BACK/LEFT/RIGHT), &amp;lt;code&amp;gt;TOPOLOGY_neighbor_t&amp;lt;/code&amp;gt; (SELF/LEFT/DIAGONAL/TOP/RIGHT/BOTTOM), &amp;lt;code&amp;gt;text_align_t&amp;lt;/code&amp;gt; (9 values), &amp;lt;code&amp;gt;GFX_mirror_t&amp;lt;/code&amp;gt; (BLANK/X/Y/XY), &amp;lt;code&amp;gt;GFX_PixelFormat_t&amp;lt;/code&amp;gt; (RGB565/ARGB6666/ARGB8888), &amp;lt;code&amp;gt;eventMask_t&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LogLevel_t&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uartID_t&amp;lt;/code&amp;gt;. Constant: &amp;lt;code&amp;gt;NET_BROADCAST = 0xFF&amp;lt;/code&amp;gt;; global &amp;lt;code&amp;gt;cubeN&amp;lt;/code&amp;gt; — the index of the module the code is running on.&lt;br /&gt;
&lt;br /&gt;
== Core ==&lt;br /&gt;
&lt;br /&gt;
===sendPacket===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t sendPacket(u32_t type, uint8_t* pkt, u32_t size)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Send a packet to another module. Use &amp;lt;code&amp;gt;NET_BROADCAST&amp;lt;/code&amp;gt; (0xFF) as the destination to reach all modules. Low-level counterpart of the PAWN &amp;lt;code&amp;gt;broadcastPacket()&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===recvPacket===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t recvPacket(u32_t size, uint32_t* type, uint8_t* pkt)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Read a pending inter-module packet into a buffer. Normally consumed by the &amp;lt;code&amp;gt;AppManager&amp;lt;/code&amp;gt; event loop, which dispatches it to &amp;lt;code&amp;gt;Application::on_Message()&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===getTime===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t getTime()&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get time in milliseconds since the module start.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Time in milliseconds since the module start.&lt;br /&gt;
&lt;br /&gt;
===getUserName===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t getUserName(uint8_t* buffer, u32_t bufSize)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get the name of a user who is logined on the cube.&lt;br /&gt;
: Get the user name configured in the WOWCube mobile application to save&lt;br /&gt;
: results for.&lt;br /&gt;
&lt;br /&gt;
===toggleDebugInfo===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t toggleDebugInfo()&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Toggle overlay with debug information. TBD - move to GFX&lt;br /&gt;
&lt;br /&gt;
===saveState===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t saveState(void* data, u32_t size)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Request to save an application data&lt;br /&gt;
: Save user settings and/or progress on the flash to restore next time. Each&lt;br /&gt;
: save data has an incremental ID.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: True if save was successful.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - fixed a bug in which only part of a data saved on the flash&lt;br /&gt;
&lt;br /&gt;
===loadState===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t loadState(u32_t* id, void* data, u32_t size)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Request to load an application save data from the flash.&lt;br /&gt;
: Trigger state load event. It is asynchronous so access to flash memory will&lt;br /&gt;
: not affect an application performance.&lt;br /&gt;
&lt;br /&gt;
===random===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t random(u32_t min, u32_t max)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Generate random number in half-open range.&lt;br /&gt;
: Random number generator is initialized before each application start. Seed&lt;br /&gt;
: for initialization is generated by TRNG (True Random Number Generator).&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Pseudo random value from requested range.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - fixed a bug in which random does not generate numbers in a given&lt;br /&gt;
: range.&lt;br /&gt;
&lt;br /&gt;
===getAppVersion===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t getAppVersion(Cubios::AppVersion_t *version)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get application version.&lt;br /&gt;
: WOWCube applications follow semantic versioning scheme (see&lt;br /&gt;
: https://semver.org). This interface allows to get version parts stored in&lt;br /&gt;
: the cube application descriptor.&lt;br /&gt;
: Outputs&lt;br /&gt;
:* version - structure describing application version&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.0 - added&lt;br /&gt;
&lt;br /&gt;
===LOG===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t LOG(uint8_t level, const char* text)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Write a log line with the given level. Prefer the &amp;lt;code&amp;gt;LOG_a/e/w/i/d/v&amp;lt;/code&amp;gt; printf-style macros (see &amp;lt;code&amp;gt;LogLevel_t&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
===getTap===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t getTap()&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get the pending tap event, if any. Normally consumed by the &amp;lt;code&amp;gt;AppManager&amp;lt;/code&amp;gt; event loop (&amp;lt;code&amp;gt;Application::on_Tap()&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;on_Pat()&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
===sendBleData===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t sendBleData(u32_t type, uint8_t* pkt, u32_t size)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Send external data over BLE to the connected companion (WOWCube Connect) application.&lt;br /&gt;
&lt;br /&gt;
===recvBleData===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t recvBleData(uint8_t* pkt, u32_t size)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Receive pending external BLE data; dispatched by &amp;lt;code&amp;gt;AppManager&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;Application::on_ExternalMessage()&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===EVENT_getList===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t EVENT_getList()&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get the pending event mask for this module (see &amp;lt;code&amp;gt;eventMask_t&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
== Topology ==&lt;br /&gt;
&lt;br /&gt;
===TOPOLOGY_getAdjacentFacelet===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t TOPOLOGY_getAdjacentFacelet(u32_t module, u32_t screen, u32_t direction, Cubios::TOPOLOGY_faceletInfo_t* result)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get a facelet neighbor in the given direction.&lt;br /&gt;
: Facelet can have neighbors on the same cube face or neighbors by module.&lt;br /&gt;
: This function provide a neighbor of the given facelet in the given&lt;br /&gt;
: direction. Connection status indicates if there is a connection between&lt;br /&gt;
: modules on which given facelet and its neighbor are located.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Neighbor facelet in a given direction with its connection status. The&lt;br /&gt;
: module ID will be MODULES_MAX and the screen number will be SCREENS_MAX in&lt;br /&gt;
: case of an error (e.g. incorrect arguments or the topology malfunction).&lt;br /&gt;
&lt;br /&gt;
===TOPOLOGY_getFacelet===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t TOPOLOGY_getFacelet(u32_t face, u32_t position, Cubios::TOPOLOGY_orientation_mode_t mode, Cubios::TOPOLOGY_faceletInfo_t* result)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get a facelet located in the given place.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Facelet located in the given place, connection status indicates if there&lt;br /&gt;
: any connection to the module on which this facelet resides. The module ID&lt;br /&gt;
: will be MODULES_MAX and the screen screen will be SCREENS_MAX in case of an&lt;br /&gt;
: error (e.g. incorrect arguments or the topology malfunction).&lt;br /&gt;
&lt;br /&gt;
===TOPOLOGY_getPlace===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t TOPOLOGY_getPlace(u32_t module, u32_t screen, Cubios::TOPOLOGY_orientation_mode_t mode, Cubios::TOPOLOGY_place_t* result)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get a place of the facelet.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Place on cube surface where the given facelet located. Face will be&lt;br /&gt;
: TOPOLOGY_FACES_MAX and position will be TOPOLOGY_POSITIONS_MAX in case of&lt;br /&gt;
: an error (e.g. incorrect arguments or topology malfunction)&lt;br /&gt;
&lt;br /&gt;
===TOPOLOGY_getOppositeFacelet===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t TOPOLOGY_getOppositeFacelet(u32_t module, u32_t screen, Cubios::TOPOLOGY_faceletInfo_t* result)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get an opposite facelet located on a diagonal counterpart module.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Diagonal opposite counterpart facelet. Connection status indicates if there&lt;br /&gt;
: any connection to the module on which that facelet resides. The module ID&lt;br /&gt;
: will be MODULES_MAX and the screen number will be SCREENS_MAX in case of an&lt;br /&gt;
: error (e.g. incorrect arguments or topology malfunction).&lt;br /&gt;
&lt;br /&gt;
===TOPOLOGY_getAngle===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t TOPOLOGY_getAngle(u32_t module, u32_t screen, Cubios::TOPOLOGY_orientation_mode_t mode)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get an angle to align images on a face according to the orientation mode.&lt;br /&gt;
: Display coordinates system is persistent on a module screen. Different&lt;br /&gt;
: angles are needed to align images on all modules with screens on the same&lt;br /&gt;
: face. This function returns the angle for the screen specified by the&lt;br /&gt;
: facelet. The angle is relative to the position 0 on the same face where the&lt;br /&gt;
: facelet is located in the given orientation mode.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Angle to align images on the same face according to the orientation mode, 0&lt;br /&gt;
: in case of an error (e.g. incorrect arguments or the topology malfunction).&lt;br /&gt;
&lt;br /&gt;
===TOPOLOGY_getFaceletOrientation===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t TOPOLOGY_getFaceletOrientation(u32_t module, u32_t screen)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get a face orientation on which the given facelet resides.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Face orientation on which the given facelet resides, ORIENTATION_MAX in&lt;br /&gt;
: case of an error (e.g. incorrect arguments or the topology malfunction).&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - renamed from TOPOLOGY_getFaceletLocation() to the&lt;br /&gt;
: TOPOLOGY_getFaceletOrientation()&lt;br /&gt;
&lt;br /&gt;
===TOPOLOGY_getPlaceOrientation===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t TOPOLOGY_getPlaceOrientation(u32_t face, u32_t position)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get a face orientation on which the given place resides.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Face orientation on which the given place resides, ORIENTATION_MAX in case&lt;br /&gt;
: of an error (e.g. incorrect arguments or the topology malfunction).&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - renamed from TOPOLOGY_getPlaceLocation() to the&lt;br /&gt;
: TOPOLOGY_getPlaceOrientation()&lt;br /&gt;
&lt;br /&gt;
===TOPOLOGY_getFace===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t TOPOLOGY_getFace(u32_t orientation)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get a face number which has the given orientation.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Face number which has the given orientation, TOPOLOGY_FACES_MAX in case of&lt;br /&gt;
: an error (e.g. incorrect arguments or the topology malfunction).&lt;br /&gt;
&lt;br /&gt;
===TOPOLOGY_isAssembled===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t TOPOLOGY_isAssembled()&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Check that all modules in a system are connected to each other.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: True if all modules in a system are connected to each other, false&lt;br /&gt;
: otherwise.&lt;br /&gt;
&lt;br /&gt;
===TOPOLOGY_getTwist===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t TOPOLOGY_getTwist(Cubios::TOPOLOGY_twistInfo_t* twist)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Read the pending twist event into a &amp;lt;code&amp;gt;TOPOLOGY_twistInfo_t&amp;lt;/code&amp;gt;. Normally consumed by &amp;lt;code&amp;gt;AppManager&amp;lt;/code&amp;gt;, which calls &amp;lt;code&amp;gt;Application::on_Twist()&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Leaderboard ==&lt;br /&gt;
&lt;br /&gt;
===LB_getInfo===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t LB_getInfo(Cubios::LB_info_t* info)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get leaderboard description.&lt;br /&gt;
: Players score and achievements can be saved and shared via mobile&lt;br /&gt;
: application and WOWCube Entertainment System servers. This function&lt;br /&gt;
: provides synced information necessary to display points table.&lt;br /&gt;
: Outputs&lt;br /&gt;
:* info - structure describing leaderboard&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Error code:&lt;br /&gt;
: * 0 - success&lt;br /&gt;
: * -1 - incorrect arguments count&lt;br /&gt;
: * -2 - leaderboard is not synced&lt;br /&gt;
: * -3 - fail to fill output structure&lt;br /&gt;
&lt;br /&gt;
===LB_getScore===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t LB_getScore(uint8_t* leadTableBin, u32_t bufSize)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get best results data data.&lt;br /&gt;
: Players score and achievements can be saved and shared via mobile&lt;br /&gt;
: application and WOWCube Entertainment System servers. This function&lt;br /&gt;
: provides best results table data.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Error code:&lt;br /&gt;
: * 0 - success&lt;br /&gt;
: * -1 - incorrect arguments count&lt;br /&gt;
: * -2 - leaderboard is not synced&lt;br /&gt;
: * -3 - fail to fill output structure&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - align error codes with LB_getInfo.&lt;br /&gt;
&lt;br /&gt;
== Motion Sensors ==&lt;br /&gt;
&lt;br /&gt;
===MS_getFaceAccelX===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t MS_getFaceAccelX(u32_t display)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get accelerometer value along X axis of some display.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Accelerometer value along X axis.&lt;br /&gt;
&lt;br /&gt;
===MS_getFaceAccelY===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t MS_getFaceAccelY(u32_t display)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get accelerometer value along Y axis of some display.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Accelerometer value along Y axis.&lt;br /&gt;
&lt;br /&gt;
===MS_getFaceAccelZ===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t MS_getFaceAccelZ(u32_t display)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get accelerometer value along Z axis of some display.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Accelerometer value along Z axis.&lt;br /&gt;
&lt;br /&gt;
===MS_getFaceGyroX===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t MS_getFaceGyroX(u32_t display)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get gyroscope value around X axis of some display.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Gyroscope value around X axis.&lt;br /&gt;
&lt;br /&gt;
===MS_getFaceGyroY===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t MS_getFaceGyroY(u32_t display)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get gyroscope value around Y axis of some display.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Gyroscope value around Y axis.&lt;br /&gt;
&lt;br /&gt;
===MS_getFaceGyroZ===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t MS_getFaceGyroZ(u32_t display)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get gyroscope value around Z axis of some display.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Gyroscope value around Z axis.&lt;br /&gt;
&lt;br /&gt;
== Graphics ==&lt;br /&gt;
&lt;br /&gt;
===GFX_getAssetId===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_getAssetId(const char* spriteName)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get an image ID by the filename.&lt;br /&gt;
: Usually an application uses image IDs to draw sprites and backgrounds. But&lt;br /&gt;
: sometimes IDs are unknown, e.g. in common libraries, or they change rapidly&lt;br /&gt;
: during development. This interface can be used to get an ID of the image by&lt;br /&gt;
: its filename in the runtime. Maximum asset name length is 15 characters,&lt;br /&gt;
: remaining symbols are truncated during lookup.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: The ID of image with a given filename or -1 in case of error.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - renamed from GFX_getId() to GFX_getAssetId()&lt;br /&gt;
: v6.0 - truncate asset name in WASM API&lt;br /&gt;
&lt;br /&gt;
===GFX_clear===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_clear(u32_t color)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Clear a layer with a given color.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.0 - changed color format&lt;br /&gt;
&lt;br /&gt;
===GFX_drawText===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_drawText(i32_t x, i32_t y, u32_t scale, u32_t angle, u32_t align, u32_t color, const char* text)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Draw a formatted text by the specified coordinates with a given color,&lt;br /&gt;
: scale, text align and a rotation angle.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - clarified documentation, added GFX_drawTextXY() alias&lt;br /&gt;
&lt;br /&gt;
===GFX_drawPoint===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_drawPoint(i32_t x, i32_t y, u32_t color)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Draw a point specified by its coordinates with a given color.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - added GFX_drawPointXY() alias&lt;br /&gt;
&lt;br /&gt;
===GFX_drawCircle===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_drawCircle(u32_t x, u32_t y, u32_t radius, u32_t width, u32_t color)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Draw a circle at the given point with given radius, color and line width.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - added GFX_drawCircleXY() alias&lt;br /&gt;
&lt;br /&gt;
===GFX_drawSolidCircle===&lt;br /&gt;
:'''Deprecated.''' use fill shader intead&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_drawSolidCircle(u32_t x, u32_t y, u32_t radius, u32_t color)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Draw a solid circle at the given point with given radius and color.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - added GFX_drawSolidCircleXY() alias&lt;br /&gt;
: v6.0 - DEPRECATED, use GFX_setFillShader() instead&lt;br /&gt;
&lt;br /&gt;
===GFX_drawArc===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_drawArc(i32_t x, i32_t y, u32_t radius, u32_t width, u32_t angle0, u32_t angle1, u32_t color)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Draw an arc at the given point with given radius, line width, color and&lt;br /&gt;
: angles.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - added GFX_drawArcXY() alias&lt;br /&gt;
&lt;br /&gt;
===GFX_drawSector===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_drawSector(i32_t x, i32_t y, u32_t radius, u32_t angle0, u32_t angle1, u32_t color)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Draw a filled circular sector, connecting the arc to the circle's center&lt;br /&gt;
: like a piece of pie.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.1 - created&lt;br /&gt;
&lt;br /&gt;
===GFX_drawLine===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_drawLine(i32_t x0, i32_t y0, i32_t x1, i32_t y1, u32_t thickness, u32_t color)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Draw a line with from a given point to another one and given width and&lt;br /&gt;
: color.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - added GFX_drawLineXY() alias&lt;br /&gt;
&lt;br /&gt;
===GFX_drawRectangle===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_drawRectangle(i32_t x, i32_t y, i32_t w, i32_t h, u32_t color)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Draw a solid rectangle at a given position with specified dimensions and a&lt;br /&gt;
: color.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - added GFX_drawRectangleXY() alias&lt;br /&gt;
&lt;br /&gt;
===GFX_bakeImage===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_bakeImage(spriteID_t id, u32_t width, u32_t height, GFX_PixelFormat_t format, u32_t overwrite)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Set an ID of a memory buffer to save next rendering result.&lt;br /&gt;
: Specifies the image that will be created by combining the group of&lt;br /&gt;
: graphical primitives used between GFX_bakeImage() and GFS_render()&lt;br /&gt;
: according their order and taking into account alpha channel in images. HW&lt;br /&gt;
: has a limitation and can combine no more than 4 layers simultaneously, so&lt;br /&gt;
: if there are more primitives then they will be combined in a cascade.&lt;br /&gt;
: Useful for creating complex images like backgrounds for later usage.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.0 - added overwrite parameter&lt;br /&gt;
&lt;br /&gt;
===GFX_setRenderTarget===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_setRenderTarget(u32_t display)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Set a screen which will be used to display next rendering result.&lt;br /&gt;
: Cube module is a special device which has 3 independent screens to display&lt;br /&gt;
: graphics. GFX_setRenderTarget() specifies a screen number which will be&lt;br /&gt;
: used to display a next rendering result. Graphics primitives used in&lt;br /&gt;
: between GFX_setRenderTarget() and GFX_render() calls will be combined&lt;br /&gt;
: together according their order and taking into account alpha channel in&lt;br /&gt;
: images. Resulting image will be immediately flushed onto the given screen.&lt;br /&gt;
: HW has a limitation and can combine no more than 4 layers simultaneously,&lt;br /&gt;
: so if there are more primitives then they will be combined in a cascade. To&lt;br /&gt;
: display anything on the screen GFX_setRenderTarget() has to be always&lt;br /&gt;
: called.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - renamed from GFX_updateDisplay() to GFX_setRenderTarget()&lt;br /&gt;
&lt;br /&gt;
===GFX_drawImage===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_drawImage(spriteID_t id, i32_t x, i32_t y, u32_t opacity, u32_t colorKey, u32_t scale_x, u32_t scale_y, u32_t angle, u32_t mirror)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Draw an image from application assets at a specified position and with&lt;br /&gt;
: given transformations.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - added GFX_drawImageXY() alias, color argument clarified&lt;br /&gt;
: v6.0 - added scale parameters&lt;br /&gt;
&lt;br /&gt;
===GFX_drawBakedImage===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_drawBakedImage(i32_t x, i32_t y, u32_t opacity, u32_t colorKey, u32_t scale_x, u32_t scale_y, u32_t angle, u32_t mirror, spriteID_t id)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Draw a previously baked image at a specified position and with given&lt;br /&gt;
: transformations.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - added GFX_drawBakedImageXY() alias, color argument clarified&lt;br /&gt;
: v6.0 - added scale parameters&lt;br /&gt;
&lt;br /&gt;
===GFX_drawQrCode===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_drawQRCode(i32_t x, i32_t y, u32_t size, u32_t color0, u32_t color1, u32_t angle, u32_t id, const char *text)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Generate and draw QR-code for a given text string.&lt;br /&gt;
: Supported version 2 which is limited by 32 characters of input.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.0 - added&lt;br /&gt;
&lt;br /&gt;
===GFX_render===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_render()&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Start rendering process.&lt;br /&gt;
&lt;br /&gt;
===GFX_clearCache===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_clearCache()&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Clear all cached images.&lt;br /&gt;
: Oldest accessed image cache will be automatically freed if there is not&lt;br /&gt;
: enough memory to cache a new image. This function forces this process, e.g.&lt;br /&gt;
: when switch game levels.&lt;br /&gt;
&lt;br /&gt;
===GFX_removeBakedImage===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_removeBakedImage(spriteID_t id)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Remove specified baked image from cache.&lt;br /&gt;
: Baked images do not automatically invalidate. This function allows to&lt;br /&gt;
: remove any baked image from cache to save some space.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.0 - added&lt;br /&gt;
&lt;br /&gt;
===GFX_cacheImages===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_cacheImages(spriteID_t* spriteIDs, u32_t count)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Force platform to cache application images.&lt;br /&gt;
: Platform automatically reads and caches images from flash when the&lt;br /&gt;
: application draws an image. Flash operations are synchronous and may cause&lt;br /&gt;
: delays especially when reading large portions of data. To prevent the&lt;br /&gt;
: application from lags it is possible to cache image data in advance.&lt;br /&gt;
: However if application requests to draw a non-cached image and there is not&lt;br /&gt;
: enough memory then oldest accessed images will be removed from cache. Also&lt;br /&gt;
: there is a limit of 256 for a total number of cached images.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Number of cached images or negative value if an error happened. Error&lt;br /&gt;
: codes:&lt;br /&gt;
: * -1 invalid function arguments count&lt;br /&gt;
: * -2 invalid imageList array&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - moved from appCtrl module to graphics&lt;br /&gt;
&lt;br /&gt;
===GFX_setFpsWindow===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_setFpsWindow(u32_t size)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Set the averaging window (in frames) used by the on-screen FPS counter (see &amp;lt;code&amp;gt;Application::ShowFPSCounter()&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
===GFX_getAssetsCount===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_getAssetsCount()&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get the total count of graphic assets.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Number of graphic assets.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.0 - added&lt;br /&gt;
&lt;br /&gt;
===GFX_setFillShader===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_setFillShader(u32_t color)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Fill next primitives with specified color.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.0 - added primitives shading&lt;br /&gt;
&lt;br /&gt;
===GFX_setLinearGradientShader===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_setLinearGradientShader(u32_t x0, u32_t y0, u32_t x1, u32_t y1, u32_t color0, u32_t color1)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Fill next primitives with linear gradient from a given point / color to&lt;br /&gt;
: another one.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.0 - added primitives shading&lt;br /&gt;
&lt;br /&gt;
===GFX_setRadialGradientShader===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_setRadialGradientShader(u32_t x0, u32_t y0, u32_t radius, u32_t color0, u32_t color1)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Fill next primitives with radial gradient from a given point with radius&lt;br /&gt;
: and from a given color to another one.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.0 - added primitives shading&lt;br /&gt;
&lt;br /&gt;
===GFX_removeShader===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_removeShader()&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Do not use shading in next primitives.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.0 - added primitives shading&lt;br /&gt;
&lt;br /&gt;
===GFX_drawSubImage===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_drawSubImage(spriteID_t id,i32_t x,i32_t y,u32_t rect_x,u32_t rect_y,u32_t rect_w,u32_t rect_h,u32_t opacity,u32_t colorKey,u32_t scale_x, u32_t scale_y,u32_t angle, u32_t mirror)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Draw a sub window of an image from application assets at a specified&lt;br /&gt;
: position and with given transformations.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.2 - added&lt;br /&gt;
&lt;br /&gt;
== Sound ==&lt;br /&gt;
&lt;br /&gt;
===SND_getAssetId===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t SND_getAssetId(const char* soundName)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get a sound ID by the filename.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: The ID of sound with a given filename or -1 in case of error.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - renamed from SND_getId() to SND_getAssetId()&lt;br /&gt;
: v6.0 - truncate asset name in WASM API&lt;br /&gt;
&lt;br /&gt;
===SND_play===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t SND_play(soundID_t soundID, u32_t volume)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Play sound by ID.&lt;br /&gt;
: Play any sound by its ID. Platform does not support audio mixing, so&lt;br /&gt;
: previously playing sound will be stopped if it has not yet finished.&lt;br /&gt;
: Supported audio formats:&lt;br /&gt;
:* WAV&lt;br /&gt;
:* MP3&lt;br /&gt;
:* MIDI&lt;br /&gt;
&lt;br /&gt;
===SND_cacheSounds===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t SND_cacheSounds(soundID_t* soundIDs, u32_t count)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Force platform to cache application sounds.&lt;br /&gt;
: Platform automatically reads and caches sounds from flash when the&lt;br /&gt;
: application plays a sound. Flash operations are synchronous and may cause&lt;br /&gt;
: delays especially when reading large portions of data. To prevent the&lt;br /&gt;
: application from lags it is possible to cache sound data in advance.&lt;br /&gt;
: However if application requests to play a non-cached sound and there is not&lt;br /&gt;
: enough memory then oldest accessed sounds will be removed from cache. Also&lt;br /&gt;
: there is a limit of 256 for a total number of cached sounds.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Number of cached sounds or negative value if an error happened. Error&lt;br /&gt;
: codes:&lt;br /&gt;
: * -1 invalid function arguments count&lt;br /&gt;
: * -2 invalid soundList array&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - moved from appCtrl module to sound&lt;br /&gt;
&lt;br /&gt;
===SND_isPlaying===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t SND_isPlaying()&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Check if audio is playing.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: True if audio is playing, false otherwise.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.0 - added&lt;br /&gt;
&lt;br /&gt;
===SND_stop===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t SND_stop()&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Stop playing sound if any.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.0 - added&lt;br /&gt;
&lt;br /&gt;
===SND_getAssetsCount===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t SND_getAssetsCount()&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get the total count of sound assets.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Number of sound assets.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.0 - added&lt;br /&gt;
&lt;br /&gt;
[[Category:SDK 6.3]]&lt;br /&gt;
[[Category:C++ API]]&lt;/div&gt;</summary>
		<author><name>WowBot</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=SDK_6.3/C%2B%2B/GFX_Engine&amp;diff=16943</id>
		<title>SDK 6.3/C++/GFX Engine</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=SDK_6.3/C%2B%2B/GFX_Engine&amp;diff=16943"/>
		<updated>2026-07-26T09:29:11Z</updated>

		<summary type="html">&lt;p&gt;WowBot: GFX Engine: detailed per-method reference + usage patterns from official samples (WowBot)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{notice|'''Official WOWCube SDK documentation.''' SDK 6.3, C++ (WebAssembly) API. Signatures are extracted from the canonical SDK headers; usage notes and examples come from the official sample projects shipped with the WOWCube Development Kit. The headers remain authoritative.}}&lt;br /&gt;
&lt;br /&gt;
{{SDK 6.3 nav}}&lt;br /&gt;
&lt;br /&gt;
''← [[SDK 6.3]] · C++ / GFX Engine''&lt;br /&gt;
&lt;br /&gt;
The object-oriented retained layer of the C++ SDK (namespace &amp;lt;code&amp;gt;Cubios&amp;lt;/code&amp;gt;): a scene graph with sprites, text, backgrounds, sounds and math primitives. It sits on top of the [[SDK 6.3/C++/Native API|native ABI]] and is driven by the [[SDK 6.3/C++/Application|Application framework]].&lt;br /&gt;
&lt;br /&gt;
== The canonical pattern ==&lt;br /&gt;
&lt;br /&gt;
Every official sample follows the same lifecycle:&lt;br /&gt;
&lt;br /&gt;
# '''Create''' objects once at startup and register them in the application's &amp;lt;code&amp;gt;Scene&amp;lt;/code&amp;gt; under integer IDs (usually an &amp;lt;code&amp;gt;enum&amp;lt;/code&amp;gt;).&lt;br /&gt;
# '''Render''' every frame: for each of the module's three &amp;lt;code&amp;gt;Screen&amp;lt;/code&amp;gt;s open a &amp;lt;code&amp;gt;Begin()/End()&amp;lt;/code&amp;gt; block and &amp;lt;code&amp;gt;Add()&amp;lt;/code&amp;gt; the scene objects you want on that screen, chaining setters.&lt;br /&gt;
&lt;br /&gt;
Resource creation (from the official ''Network/Messaging2'' sample):&lt;br /&gt;
&lt;br /&gt;
 void Messaging2::InitializeResources()&lt;br /&gt;
 {&lt;br /&gt;
     this-&amp;gt;Scene.CreateObjectWithID(GfxObjects::idle, new Sprite(&amp;quot;idle.png&amp;quot;, Transform(120,120,0)));&lt;br /&gt;
     this-&amp;gt;Scene[GfxObjects::idle]-&amp;gt;Color.Set(0xFFFFFFFF);&lt;br /&gt;
     this-&amp;gt;Scene.CreateObjectWithID(GfxObjects::background, new Sprite(&amp;quot;background.png&amp;quot;, Transform(120,120,0)));&lt;br /&gt;
     this-&amp;gt;SetTimer(Timers::mainTimer, 30);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Per-frame rendering (from the official ''GFX Engine Sample 1 — Twinkle''):&lt;br /&gt;
&lt;br /&gt;
 void Twinkle::on_Render(std::array&amp;lt;Cubios::Screen, 3&amp;gt;&amp;amp; screens)&lt;br /&gt;
 {&lt;br /&gt;
     Background* bkg = (Background*)this-&amp;gt;Scene[Sprites::Clear];&lt;br /&gt;
     for(auto it = screens.begin(); it != screens.end(); ++it)&lt;br /&gt;
     {&lt;br /&gt;
         it-&amp;gt;Begin(TOPOLOGY_orientation_mode_t::ORIENTATION_MODE_GRAVITY, true);&lt;br /&gt;
             it-&amp;gt;Add(bkg-&amp;gt;SetColor(0xFF000044));&lt;br /&gt;
             if(TOPOLOGY_isAssembled()==1)&lt;br /&gt;
             {&lt;br /&gt;
                 switch(it-&amp;gt;Position())   // screen's place on the cube face&lt;br /&gt;
                 {&lt;br /&gt;
                     case 0: it-&amp;gt;Add(this-&amp;gt;Scene[Sprites::MyUfo])-&amp;gt;SetPosition(pos.X-280, pos.Y-280); break;&lt;br /&gt;
                     case 1: it-&amp;gt;Add(this-&amp;gt;Scene[Sprites::MyUfo])-&amp;gt;SetPosition(pos.X,     pos.Y-280); break;&lt;br /&gt;
                     case 2: it-&amp;gt;Add(this-&amp;gt;Scene[Sprites::MyUfo])-&amp;gt;SetPosition(pos.X,     pos.Y);     break;&lt;br /&gt;
                 }&lt;br /&gt;
             }&lt;br /&gt;
         it-&amp;gt;End();&lt;br /&gt;
     }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
'''Units and conventions''' (as used across all official samples): screens are 240×240 px; colors are packed '''0xAARRGGBB''' (&amp;lt;code&amp;gt;Math::Color&amp;lt;/code&amp;gt;); &amp;lt;code&amp;gt;Transform&amp;lt;/code&amp;gt; rotation is in degrees, scale is in percent (100 = 1:1); all &amp;lt;code&amp;gt;Set*&amp;lt;/code&amp;gt; methods return &amp;lt;code&amp;gt;SceneObject*&amp;lt;/code&amp;gt;, so calls chain: &amp;lt;code&amp;gt;screen.Add(obj)-&amp;gt;SetPosition(x,y)-&amp;gt;SetAf(0.5f)&amp;lt;/code&amp;gt;. To make one logical object span several screens of a face, samples draw it on each screen with a ±280 px offset per screen position (as above).&lt;br /&gt;
&lt;br /&gt;
== Scene ==&lt;br /&gt;
&lt;br /&gt;
The retained scene graph owned by every &amp;lt;code&amp;gt;Application&amp;lt;/code&amp;gt; (field &amp;lt;code&amp;gt;app.Scene&amp;lt;/code&amp;gt;). It is an ID-addressed registry of objects and sounds; it owns them and disposes them for you.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;uint32_t CreateObject(SceneObject* obj);&amp;lt;/code&amp;gt;&lt;br /&gt;
: Register an object; returns its auto-assigned ID. The scene takes ownership.&lt;br /&gt;
; &amp;lt;code&amp;gt;bool CreateObjectWithID(uint32_t id, SceneObject* obj);&amp;lt;/code&amp;gt;&lt;br /&gt;
: Register under an explicit ID (usually an &amp;lt;code&amp;gt;enum&amp;lt;/code&amp;gt; value). Fails (returns &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;) if the ID is taken. ''The most common way to build a scene in the official samples.''&lt;br /&gt;
; &amp;lt;code&amp;gt;uint32_t CreateSound(Sound* obj);&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;bool CreateSoundWithID(uint32_t id, Sound* obj);&amp;lt;/code&amp;gt;&lt;br /&gt;
: Same, for [[#Sound and SoundCollection|sounds]].&lt;br /&gt;
; &amp;lt;code&amp;gt;SceneObject* operator[](uint32_t);&amp;lt;/code&amp;gt;&lt;br /&gt;
: Look an object up by ID: &amp;lt;code&amp;gt;this-&amp;gt;Scene[Sprites::MyUfo]&amp;lt;/code&amp;gt;.&lt;br /&gt;
; &amp;lt;code&amp;gt;bool DisposeObjectWithID(uint32_t id);&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;bool DisposeSoundWithID(uint32_t id);&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;void DisposeAllObjects();&amp;lt;/code&amp;gt;&lt;br /&gt;
: Remove and delete objects/sounds.&lt;br /&gt;
; &amp;lt;code&amp;gt;void Play(uint32_t id, uint8_t volume);&amp;lt;/code&amp;gt;&lt;br /&gt;
: Play a registered sound by ID.&lt;br /&gt;
&lt;br /&gt;
== SceneObject ==&lt;br /&gt;
&lt;br /&gt;
Base class of every visual object. Holds a &amp;lt;code&amp;gt;Math::Transform&amp;lt;/code&amp;gt;, a &amp;lt;code&amp;gt;Math::Color&amp;lt;/code&amp;gt; and a &amp;lt;code&amp;gt;Visible&amp;lt;/code&amp;gt; flag. All setters are '''chainable''' (return &amp;lt;code&amp;gt;SceneObject*&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;virtual void Render() = 0;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Implemented by each concrete object; called by the engine when the object was &amp;lt;code&amp;gt;Add()&amp;lt;/code&amp;gt;-ed to a screen in the current frame.&lt;br /&gt;
; &amp;lt;code&amp;gt;SetPosition(float x, float y)&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;SetPosition(const Math::Vec2&amp;amp;)&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;SetTransform(const Math::Transform&amp;amp;)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Place the object (240×240 screen space). ''The most-used call in the official samples.''&lt;br /&gt;
; &amp;lt;code&amp;gt;SetRotation(int r)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Rotation in degrees; normalized into 0–359 (negative values allowed).&lt;br /&gt;
; &amp;lt;code&amp;gt;SetScale(unsigned s)&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;SetScale(sx, sy)&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;SetXScale(s)&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;SetYScale(s)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Scale in percent (100 = original size).&lt;br /&gt;
; &amp;lt;code&amp;gt;SetMirroring(unsigned m)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Mirror mode (&amp;lt;code&amp;gt;GFX_mirror_t&amp;lt;/code&amp;gt;: BLANK/X/Y/XY).&lt;br /&gt;
; &amp;lt;code&amp;gt;SetColor(uint32_t argb)&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;SetR/SetG/SetB(uint8_t)&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;SetA(uint8_t)&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;SetAf(float)&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;SetAfSafe(float)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Tint/opacity. &amp;lt;code&amp;gt;SetAf&amp;lt;/code&amp;gt; takes 0.0–1.0; &amp;lt;code&amp;gt;SetAfSafe&amp;lt;/code&amp;gt; clamps out-of-range values (added in SDK 5.1).&lt;br /&gt;
; &amp;lt;code&amp;gt;SetVisible(bool)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Hide without removing from the scene.&lt;br /&gt;
; &amp;lt;code&amp;gt;const Math::Vec2 ScreenPosition();&amp;lt;/code&amp;gt;&lt;br /&gt;
: The object's position converted to physical-screen space, taking the screen's current rotation angle (0/90/180/270°) into account.&lt;br /&gt;
; &amp;lt;code&amp;gt;Move(float dx, float dy)&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;Move(const Math::Vec2&amp;amp;)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Screen-angle-aware relative move. '''Only valid inside a &amp;lt;code&amp;gt;Screen::Begin()/End()&amp;lt;/code&amp;gt; block''' — otherwise it logs a warning and does nothing.&lt;br /&gt;
&lt;br /&gt;
Public fields: &amp;lt;code&amp;gt;Math::Transform Transform; Math::Color Color; bool Visible;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Screen ==&lt;br /&gt;
&lt;br /&gt;
One of the three displays of the current module; an array &amp;lt;code&amp;gt;std::array&amp;amp;lt;Screen, 3&amp;amp;gt;&amp;lt;/code&amp;gt; is passed to &amp;lt;code&amp;gt;on_Render()&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;on_PhysicsTick()&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;void Begin(TOPOLOGY_orientation_mode_t mode = ORIENTATION_MODE_MENU, bool autorotation = false);&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;void End();&amp;lt;/code&amp;gt;&lt;br /&gt;
: Open/close the frame block for this screen. &amp;lt;code&amp;gt;mode&amp;lt;/code&amp;gt; selects the orientation reference (MENU / GRAVITY / SPLASH); with &amp;lt;code&amp;gt;autorotation = true&amp;lt;/code&amp;gt; content is auto-rotated as the cube is turned (samples use &amp;lt;code&amp;gt;ORIENTATION_MODE_GRAVITY, true&amp;lt;/code&amp;gt;).&lt;br /&gt;
; &amp;lt;code&amp;gt;SceneObject* Add(SceneObject* obj);&amp;lt;/code&amp;gt;&lt;br /&gt;
: Queue a scene object for rendering on this screen this frame; returns the object for chaining.&lt;br /&gt;
; &amp;lt;code&amp;gt;SceneObject* AddCopy(SceneObject* obj);&amp;lt;/code&amp;gt;&lt;br /&gt;
: Queue an independent ''copy'' — the standard way to draw the same object several times with different positions in one frame (heavily used in the samples).&lt;br /&gt;
; &amp;lt;code&amp;gt;uint8_t ID();&amp;lt;/code&amp;gt;&lt;br /&gt;
: Physical display index — pass to native calls such as &amp;lt;code&amp;gt;MS_getFaceAccelX(screen.ID())&amp;lt;/code&amp;gt;.&lt;br /&gt;
; &amp;lt;code&amp;gt;uint8_t Position();&amp;lt;/code&amp;gt;&lt;br /&gt;
: The screen's place on its cube face (see the render sample above — used to compute cross-screen offsets).&lt;br /&gt;
; &amp;lt;code&amp;gt;uint8_t Face();&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;uint8_t OppositeFace();&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;TOPOLOGY_orientation_t Direction();&amp;lt;/code&amp;gt;&lt;br /&gt;
: Topology of the screen: which face it belongs to, the opposite face, and the facing direction (UP/DOWN/FRONT/…).&lt;br /&gt;
; &amp;lt;code&amp;gt;void SetOrientation(TOPOLOGY_orientation_mode_t mode);&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;uint32_t Angle();&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;bool IsAutorotation();&amp;lt;/code&amp;gt;&lt;br /&gt;
: Orientation control and current rotation angle of the content.&lt;br /&gt;
&lt;br /&gt;
== Gfx::Sprite ==&lt;br /&gt;
&lt;br /&gt;
Static image sprite bound to an image asset by file name (from the app's packed &amp;lt;code&amp;gt;assets/&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
 Sprite(std::string name);&lt;br /&gt;
 Sprite(std::string name, float x, float y);&lt;br /&gt;
 Sprite(std::string name, const Cubios::Math::Transform&amp;amp; t);&lt;br /&gt;
 Sprite(const Sprite&amp;amp; sprite);&lt;br /&gt;
 void Render() override;&lt;br /&gt;
&lt;br /&gt;
Typical use: &amp;lt;code&amp;gt;new Sprite(&amp;quot;idle.png&amp;quot;, Transform(120,120,0))&amp;lt;/code&amp;gt; — center of a 240×240 screen.&lt;br /&gt;
&lt;br /&gt;
== Gfx::Background ==&lt;br /&gt;
&lt;br /&gt;
Full-screen fill. &amp;lt;code&amp;gt;Background(uint32_t argb)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Background(R,G,B[,A])&amp;lt;/code&amp;gt;; recolor at render time via &amp;lt;code&amp;gt;SetColor(...)&amp;lt;/code&amp;gt; (see the Twinkle sample above — one shared background object recolored per screen).&lt;br /&gt;
&lt;br /&gt;
== Gfx::Text ==&lt;br /&gt;
&lt;br /&gt;
Text object.&lt;br /&gt;
&lt;br /&gt;
 Text(std::string text, float x, float y, uint32_t fontSize = 10);&lt;br /&gt;
 Text(std::string text, float x, float y, uint32_t fontSize, const Math::Color&amp;amp; color);&lt;br /&gt;
 Text(std::string text, const Math::Transform&amp;amp; t, uint32_t fontSize, const Math::Color&amp;amp; color,&lt;br /&gt;
      text_align_t al = TEXT_ALIGN_CENTER);&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;SetContent(std::string)&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;FormatContent(const char* fmt, ...)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Replace the text; &amp;lt;code&amp;gt;FormatContent&amp;lt;/code&amp;gt; is printf-style — handy for scores/counters.&lt;br /&gt;
; &amp;lt;code&amp;gt;SetFontSize(uint32_t)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Change size. Alignment via the public &amp;lt;code&amp;gt;Alignment&amp;lt;/code&amp;gt; field (&amp;lt;code&amp;gt;text_align_t&amp;lt;/code&amp;gt;, 9 anchors).&lt;br /&gt;
&lt;br /&gt;
== Gfx::AnimatedSprite ==&lt;br /&gt;
&lt;br /&gt;
Frame-animated sprite. Three ways to construct: an explicit list of asset names; a name pattern (&amp;lt;code&amp;gt;name + frameNumber + extension&amp;lt;/code&amp;gt;) with a first/last frame range; or a [[#Gfx::SpriteAtlas|SpriteAtlas]].&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;int16_t Tick(uint32_t dt);&amp;lt;/code&amp;gt;&lt;br /&gt;
: Advance the animation; call from &amp;lt;code&amp;gt;on_Tick(time, dt)&amp;lt;/code&amp;gt; for every animated sprite. Returns the current frame.&lt;br /&gt;
; &amp;lt;code&amp;gt;SetPlaybackMode(playbackMode_t)&amp;lt;/code&amp;gt;&lt;br /&gt;
: &amp;lt;code&amp;gt;Loop&amp;lt;/code&amp;gt; (wrap around), &amp;lt;code&amp;gt;Bounce&amp;lt;/code&amp;gt; (ping-pong), &amp;lt;code&amp;gt;Set&amp;lt;/code&amp;gt; (manual frame control).&lt;br /&gt;
; &amp;lt;code&amp;gt;SetPlaybackSpeed(int16_t)&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;SetFrame(int16_t)&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;NextFrame()&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;PrevFrame()&amp;lt;/code&amp;gt;&lt;br /&gt;
: Speed and manual frame stepping.&lt;br /&gt;
&lt;br /&gt;
== Gfx::SpriteAtlas ==&lt;br /&gt;
&lt;br /&gt;
A sprite sheet: one image asset cut into sub-rectangles, each rendered by a &amp;lt;code&amp;gt;SpriteAtlasElement&amp;lt;/code&amp;gt; registered in the scene. Added in SDK 6.2 — saves memory versus per-frame images.&lt;br /&gt;
&lt;br /&gt;
 SpriteAtlas&amp;lt;SpriteAtlasElement&amp;gt; atlas(&amp;quot;sheet.png&amp;quot;, &amp;amp;this-&amp;gt;Scene);&lt;br /&gt;
 atlas.AddSprite(MyIds::run0, Math::Rect2(0,   0, 64, 64));&lt;br /&gt;
 atlas.AddSprite(MyIds::run1, Math::Rect2(64,  0, 64, 64));&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;bool AddSprite(uint32_t id, const Math::Rect2&amp;amp; rc);&amp;lt;/code&amp;gt;&lt;br /&gt;
: Create an element for sub-rectangle &amp;lt;code&amp;gt;rc&amp;lt;/code&amp;gt; and register it in the scene under &amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt; (fails if the ID is taken).&lt;br /&gt;
; &amp;lt;code&amp;gt;T* Get(uint32_t)&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;T* operator[](uint32_t)&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;size_t Count()&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;ElementsInsertionOrder()&amp;lt;/code&amp;gt;&lt;br /&gt;
: Element access. &amp;lt;code&amp;gt;SpriteAtlasElement&amp;lt;/code&amp;gt; itself is a normal &amp;lt;code&amp;gt;SceneObject&amp;lt;/code&amp;gt; (position/scale/color) plus &amp;lt;code&amp;gt;Rect()&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Copy()&amp;lt;/code&amp;gt;. An atlas can also feed an [[#Gfx::AnimatedSprite|AnimatedSprite]].&lt;br /&gt;
&lt;br /&gt;
== Gfx::OffscreenRenderTarget ==&lt;br /&gt;
&lt;br /&gt;
Render-to-texture: draw objects into an offscreen buffer once, then use the result as a single scene object (a &amp;quot;baked image&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
 OffscreenRenderTarget(u32_t width, u32_t height, GFX_PixelFormat_t format);&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;void Begin(bool overwrite = false);&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;void End();&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;Add()&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;AddCopy()&amp;lt;/code&amp;gt;&lt;br /&gt;
: Same block pattern as &amp;lt;code&amp;gt;Screen&amp;lt;/code&amp;gt;, but drawing goes into the buffer. &amp;lt;code&amp;gt;overwrite=true&amp;lt;/code&amp;gt; re-bakes.&lt;br /&gt;
; &amp;lt;code&amp;gt;virtual void RenderLayer(renderLayerOrder_t)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Hook to inject drawing &amp;lt;code&amp;gt;BeforeQueue&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;AfterQueue&amp;lt;/code&amp;gt;. Pixel formats: RGB565 / ARGB6666 / ARGB8888.&lt;br /&gt;
&lt;br /&gt;
== Gfx::QRCode ==&lt;br /&gt;
&lt;br /&gt;
QR-code scene object (SDK 6.0+). &amp;lt;code&amp;gt;QRCode(std::string data, x, y[, size])&amp;lt;/code&amp;gt;; &amp;lt;code&amp;gt;SetData()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SetSize()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SetColor()&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;SetBackgroundColor()&amp;lt;/code&amp;gt; (fields &amp;lt;code&amp;gt;ColorOnes&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;ColorZeros&amp;lt;/code&amp;gt;). Used by system apps to link the cube with the mobile app.&lt;br /&gt;
&lt;br /&gt;
== Sound and SoundCollection ==&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Sound(const std::string&amp;amp; name);&amp;lt;/code&amp;gt; → &amp;lt;code&amp;gt;void Play(uint8_t volume = 100);&amp;lt;/code&amp;gt;&lt;br /&gt;
: One sound asset. &amp;lt;code&amp;gt;static Stop()&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;static bool IsPlaying()&amp;lt;/code&amp;gt; control the playback channel.&lt;br /&gt;
; &amp;lt;code&amp;gt;SoundCollection(std::vector&amp;amp;lt;std::string&amp;amp;gt;&amp;amp;)&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;(std::vector&amp;amp;lt;Sound*&amp;amp;gt;&amp;amp;)&amp;lt;/code&amp;gt;&lt;br /&gt;
: A set of sounds (SDK 6.2+):&lt;br /&gt;
:; &amp;lt;code&amp;gt;bool PlayRandomSound(uint8_t volume = 100, bool stopCurrent = true);&amp;lt;/code&amp;gt;&lt;br /&gt;
:: Play a random one — the idiom behind varied game SFX.&lt;br /&gt;
:; &amp;lt;code&amp;gt;bool RepeatRandomSounds(uint8_t volume, int delayMin, int delayMax, int deltaTime);&amp;lt;/code&amp;gt;&lt;br /&gt;
:: Keep playing random sounds with a random delay in [min,max]; call it periodically passing the tick delta.&lt;br /&gt;
:; &amp;lt;code&amp;gt;Stop()&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;IsPlaying()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== NetworkMessage and SaveMessage ==&lt;br /&gt;
&lt;br /&gt;
Two identical bit-packing serializers with different buffers: &amp;lt;code&amp;gt;NetworkMessage&amp;lt;/code&amp;gt; (max &amp;lt;code&amp;gt;MESSAGE_SIZE_MAX&amp;lt;/code&amp;gt;) for inter-module packets, &amp;lt;code&amp;gt;SaveMessage&amp;lt;/code&amp;gt; (max &amp;lt;code&amp;gt;GAME_SAVE_SIZE&amp;lt;/code&amp;gt;) for persistent state (SDK 6.0+).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;WriteInt(int value, int bits)&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;WriteSignedInt(int value, int bits)&amp;lt;/code&amp;gt; (signed added in 5.1) / &amp;lt;code&amp;gt;WriteByte&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;WriteBool&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;WriteFloat&amp;lt;/code&amp;gt;&lt;br /&gt;
: Append a value using exactly &amp;lt;code&amp;gt;bits&amp;lt;/code&amp;gt; bits — pack a whole game state into one packet.&lt;br /&gt;
; &amp;lt;code&amp;gt;ReadInt(int bits)&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;ReadSignedInt&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;ReadByte&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;ReadBool&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;ReadFloat&amp;lt;/code&amp;gt;&lt;br /&gt;
: Read back '''in the same order'''.&lt;br /&gt;
; &amp;lt;code&amp;gt;GetData(int&amp;amp; length)&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;SetData(uint8_t*, int)&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;Reset(bool zero = false)&amp;lt;/code&amp;gt;&lt;br /&gt;
: Raw buffer access and cursor reset.&lt;br /&gt;
&lt;br /&gt;
Canonical flow: master module packs → &amp;lt;code&amp;gt;SendNetworkMessage(type, &amp;amp;msg)&amp;lt;/code&amp;gt; → other modules unpack in &amp;lt;code&amp;gt;on_Message()&amp;lt;/code&amp;gt;. For saves: pack → &amp;lt;code&amp;gt;SaveState(&amp;amp;msg)&amp;lt;/code&amp;gt;; restore via &amp;lt;code&amp;gt;LoadState(&amp;amp;id, &amp;amp;msg)&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Scramble ==&lt;br /&gt;
&lt;br /&gt;
Cube-scramble helper (SDK 6.0+), used by puzzle titles to generate and track a scrambled state (&amp;lt;code&amp;gt;Scramble.h&amp;lt;/code&amp;gt;). Used across the official ''Topology'' samples.&lt;br /&gt;
&lt;br /&gt;
== Splashscreen ==&lt;br /&gt;
&lt;br /&gt;
Standard splash screen with leaderboard integration (&amp;lt;code&amp;gt;Splashscreen.h&amp;lt;/code&amp;gt;; reworked in SDK 6.2). Shows the app title screen and player scores before the game starts.&lt;br /&gt;
&lt;br /&gt;
== Math ==&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;Math::Vec2&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;Math::Vec2i&amp;lt;/code&amp;gt;&lt;br /&gt;
: 2D float/int vectors with arithmetic.&lt;br /&gt;
; &amp;lt;code&amp;gt;Math::Transform&amp;lt;/code&amp;gt;&lt;br /&gt;
: &amp;lt;code&amp;gt;{ Vec2 Position; int Rotation; unsigned ScaleX, ScaleY; unsigned Mirroring; }&amp;lt;/code&amp;gt; — rotation in degrees (&amp;lt;code&amp;gt;SafeRotation()&amp;lt;/code&amp;gt; normalizes), scale in percent (100 = 1:1). Constructors: &amp;lt;code&amp;gt;(x,y)&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(x,y,angle)&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(x,y,angle,sx,sy)&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(x,y,angle,mirror)&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;(x,y,angle,sx,sy,mirror)&amp;lt;/code&amp;gt;.&lt;br /&gt;
; &amp;lt;code&amp;gt;Math::Color&amp;lt;/code&amp;gt;&lt;br /&gt;
: ARGB color; &amp;lt;code&amp;gt;Set(0xAARRGGBB)&amp;lt;/code&amp;gt;, per-channel &amp;lt;code&amp;gt;SetA/R/G/B&amp;lt;/code&amp;gt;, float alpha &amp;lt;code&amp;gt;SetAf&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;SetAfSafe&amp;lt;/code&amp;gt;. Named constants in &amp;lt;code&amp;gt;Gfx/Colors.h&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;Colors::black&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;Colors::white&amp;lt;/code&amp;gt;, …).&lt;br /&gt;
; &amp;lt;code&amp;gt;Math::Rect2&amp;lt;/code&amp;gt;&lt;br /&gt;
: 2D rectangle — used for [[#Gfx::SpriteAtlas|atlas]] sub-rectangles.&lt;br /&gt;
&lt;br /&gt;
== Where to see it all together ==&lt;br /&gt;
&lt;br /&gt;
The Development Kit ships complete buildable projects using every class above: ''Basics'' (1–4), ''Rendering'', ''Topology'', ''Network'' (messaging between modules), and ''GFX Engine Sample Projects'' (1–3: Twinkle, SnotFlow, …) — create them via the [https://marketplace.visualstudio.com/items?itemName=cubios-inc.WOWCubeSDK WOWCube SDK extension for VS Code].&lt;br /&gt;
&lt;br /&gt;
[[Category:SDK 6.3]]&lt;br /&gt;
[[Category:C++ API]]&lt;/div&gt;</summary>
		<author><name>WowBot</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=SDK_6.3&amp;diff=16941</id>
		<title>SDK 6.3</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=SDK_6.3&amp;diff=16941"/>
		<updated>2026-07-26T09:14:55Z</updated>

		<summary type="html">&lt;p&gt;WowBot: C++ (WASM) and Rust API reference for SDK 6.3 (WowBot)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{notice|'''Official WOWCube SDK 6.3 documentation.''' Canonical API reference, generated from the SDK headers.}}&lt;br /&gt;
&lt;br /&gt;
The current WOWCube SDK. Applications can be written in '''PAWN''', '''C++''', or '''Rust'''.&lt;br /&gt;
&lt;br /&gt;
== PAWN API ==&lt;br /&gt;
One page per module:&lt;br /&gt;
* [[SDK 6.3/PAWN/Core]] — application lifecycle, state, time, RNG, packets&lt;br /&gt;
* [[SDK 6.3/PAWN/Graphics]] — drawing, images, text, shaders (GFX)&lt;br /&gt;
* [[SDK 6.3/PAWN/Topology]] — cube geometry, facelets, twists&lt;br /&gt;
* [[SDK 6.3/PAWN/Sound]] — sound playback&lt;br /&gt;
* [[SDK 6.3/PAWN/Motion Sensor]] — accelerometer / gyroscope, taps&lt;br /&gt;
* [[SDK 6.3/PAWN/Leaderboard]] — scores and achievements&lt;br /&gt;
* [[SDK 6.3/PAWN/Splash Screen]] — splash screens&lt;br /&gt;
* [[SDK 6.3/PAWN/Physics]] — 2D physics helpers&lt;br /&gt;
* [[SDK 6.3/PAWN/Network]] — inter-module messaging&lt;br /&gt;
* [[SDK 6.3/PAWN/Save]] — persistence&lt;br /&gt;
* [[SDK 6.3/PAWN/Scramble]] — cube scramble&lt;br /&gt;
* [[SDK 6.3/PAWN/Logging]] — debug logging&lt;br /&gt;
&lt;br /&gt;
* [[SDK 6.3/Changelog|SDK changelog]] — what changed in 5.1 / 6.0 / 6.2 / 6.3&lt;br /&gt;
&lt;br /&gt;
== C++ API ==&lt;br /&gt;
C/C++ cubeapps run via WebAssembly and use the same engine functions plus an object-oriented framework:&lt;br /&gt;
* [[SDK 6.3/C++/Native API]] — the low-level C ABI (all engine functions, types, enums)&lt;br /&gt;
* [[SDK 6.3/C++/Application]] — the &amp;lt;code&amp;gt;Application&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;AppManager&amp;lt;/code&amp;gt; framework and callbacks&lt;br /&gt;
* [[SDK 6.3/C++/GFX Engine]] — retained scene graph: sprites, text, atlases, sounds, math&lt;br /&gt;
&lt;br /&gt;
== Rust API ==&lt;br /&gt;
* [[SDK 6.3/Rust]] — the &amp;lt;code&amp;gt;wowcube_sdk&amp;lt;/code&amp;gt; crate: Application trait, FFI bindings, entry points, examples&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
See also: [[:Category:SDK 6.3|all SDK 6.3 pages]].&lt;br /&gt;
[[Category:SDK 6.3]]&lt;/div&gt;</summary>
		<author><name>WowBot</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=WASM&amp;diff=16942</id>
		<title>WASM</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=WASM&amp;diff=16942"/>
		<updated>2026-07-26T09:14:55Z</updated>

		<summary type="html">&lt;p&gt;WowBot: C++ (WASM) and Rust API reference for SDK 6.3 (WowBot)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[SDK 6.3/C++/Native API]]&lt;/div&gt;</summary>
		<author><name>WowBot</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=SDK_6.3/C%2B%2B/GFX_Engine&amp;diff=16939</id>
		<title>SDK 6.3/C++/GFX Engine</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=SDK_6.3/C%2B%2B/GFX_Engine&amp;diff=16939"/>
		<updated>2026-07-26T09:14:54Z</updated>

		<summary type="html">&lt;p&gt;WowBot: C++ (WASM) and Rust API reference for SDK 6.3 (WowBot)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{notice|'''Official WOWCube SDK documentation.''' SDK 6.3, C++ (WebAssembly) API. Signatures are extracted from the canonical SDK headers shipped with the WOWCube Development Kit; the headers remain authoritative.}}&lt;br /&gt;
&lt;br /&gt;
{{SDK 6.3 nav}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''← [[SDK 6.3]] · C++ / GFX Engine''&lt;br /&gt;
&lt;br /&gt;
The object-oriented retained layer of the C++ SDK (namespace &amp;lt;code&amp;gt;Cubios&amp;lt;/code&amp;gt;): a scene graph with sprites, text, backgrounds, sounds and math primitives. It sits on top of the [[SDK 6.3/C++/Native API|native ABI]] and is driven by the [[SDK 6.3/C++/Application|Application framework]]. Public signatures below are extracted from the SDK 6.3 headers.&lt;br /&gt;
&lt;br /&gt;
=== Scene ===&lt;br /&gt;
&lt;br /&gt;
The retained scene graph owned by every &amp;lt;code&amp;gt;Application&amp;lt;/code&amp;gt; (field &amp;lt;code&amp;gt;app.Scene&amp;lt;/code&amp;gt;). Holds scene objects and renders them per screen.&lt;br /&gt;
&lt;br /&gt;
Public interface (&amp;lt;code&amp;gt;Scene.h&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
 Scene();&lt;br /&gt;
 virtual ~Scene();&lt;br /&gt;
 uint32_t CreateObject(SceneObject* obj);&lt;br /&gt;
 bool CreateObjectWithID(uint32_t id, SceneObject* obj);&lt;br /&gt;
 uint32_t CreateSound(Sound* obj);&lt;br /&gt;
 bool CreateSoundWithID(uint32_t id, Sound* obj);&lt;br /&gt;
 bool DisposeObjectWithID(uint32_t id);&lt;br /&gt;
 bool DisposeSoundWithID(uint32_t id);&lt;br /&gt;
 void DisposeAllObjects();&lt;br /&gt;
 void Play(uint32_t id, uint8_t volume);&lt;br /&gt;
&lt;br /&gt;
=== SceneObject ===&lt;br /&gt;
&lt;br /&gt;
Base class of every visual object in the scene graph. Provides position, rotation, scale, opacity, z-order, per-screen placement and lifecycle.&lt;br /&gt;
&lt;br /&gt;
Public interface (&amp;lt;code&amp;gt;SceneObject.h&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
 SceneObject():Parent(nullptr),ScreenAngle(0),Visible(true),InBegin(false);&lt;br /&gt;
 virtual ~SceneObject();&lt;br /&gt;
 virtual void Render() = 0;&lt;br /&gt;
 SceneObject* SetColor(uint32_t v);&lt;br /&gt;
 SceneObject* SetA(uint8_t a);&lt;br /&gt;
 SceneObject* SetAf(float a);&lt;br /&gt;
 SceneObject* SetAfSafe(float a);&lt;br /&gt;
 SceneObject* SetR(uint8_t r);&lt;br /&gt;
 SceneObject* SetG(uint8_t g);&lt;br /&gt;
 SceneObject* SetB(uint8_t b);&lt;br /&gt;
 SceneObject* SetVisible(bool v);&lt;br /&gt;
 SceneObject* SetTransform(const Math::Transform&amp;amp; t);&lt;br /&gt;
 SceneObject* SetPosition(const Math::Vec2&amp;amp; p);&lt;br /&gt;
 SceneObject* SetPosition(float x, float y);&lt;br /&gt;
 SceneObject* SetRotation(int r);&lt;br /&gt;
 SceneObject* SetMirroring(unsigned int m);&lt;br /&gt;
 SceneObject* SetScale(unsigned int s);&lt;br /&gt;
 SceneObject* SetScale(unsigned int sx, unsigned int sy);&lt;br /&gt;
 SceneObject* SetXScale(unsigned int s);&lt;br /&gt;
 SceneObject* SetYScale(unsigned int s);&lt;br /&gt;
 const Math::Vec2 ScreenPosition();&lt;br /&gt;
 if(this-&amp;gt;Parent==nullptr) return pos;&lt;br /&gt;
 switch(ScreenAngle);&lt;br /&gt;
 pos.Set(this-&amp;gt;Transform.Position.X,this-&amp;gt;Transform.Position.Y);&lt;br /&gt;
 pos.Set(240-this-&amp;gt;Transform.Position.Y,this-&amp;gt;Transform.Position.X);&lt;br /&gt;
 pos.Set(240-this-&amp;gt;Transform.Position.X,240-this-&amp;gt;Transform.Position.Y);&lt;br /&gt;
 pos.Set(this-&amp;gt;Transform.Position.Y,240-this-&amp;gt;Transform.Position.X);&lt;br /&gt;
 SceneObject* Move(const Math::Vec2&amp;amp; v);&lt;br /&gt;
 SceneObject* Move(float dx, float dy);&lt;br /&gt;
 if(this-&amp;gt;Parent==nullptr) return this;&lt;br /&gt;
 if(!this-&amp;gt;InBegin);&lt;br /&gt;
 LOG_w(&amp;quot;SceneObject: Move() can only be called within Begin/End block!\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
=== Screen ===&lt;br /&gt;
&lt;br /&gt;
One of the three displays of the current module; passed to &amp;lt;code&amp;gt;on_Render()&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;on_PhysicsTick()&amp;lt;/code&amp;gt;. Render target selector.&lt;br /&gt;
&lt;br /&gt;
Public interface (&amp;lt;code&amp;gt;Screen.h&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
 Screen(uint8_t id);&lt;br /&gt;
 void SetOrientation(TOPOLOGY_orientation_mode_t mode);&lt;br /&gt;
 uint8_t Position() const;&lt;br /&gt;
 TOPOLOGY_orientation_t Direction() const;&lt;br /&gt;
 uint8_t OppositeFace() const;&lt;br /&gt;
 uint8_t Face() const;&lt;br /&gt;
 inline uint8_t ID() const;&lt;br /&gt;
 inline uint32_t Angle() const;&lt;br /&gt;
 SceneObject* Add(SceneObject* obj);&lt;br /&gt;
 SceneObject* AddCopy(SceneObject* obj);&lt;br /&gt;
 void Begin(TOPOLOGY_orientation_mode_t mode = Cubios::ORIENTATION_MODE_MENU,bool autorotation = false);&lt;br /&gt;
 void End();&lt;br /&gt;
 inline bool IsAutorotation();&lt;br /&gt;
&lt;br /&gt;
=== Object ===&lt;br /&gt;
&lt;br /&gt;
Minimal reference-counted base class for engine resources.&lt;br /&gt;
&lt;br /&gt;
Public interface (&amp;lt;code&amp;gt;Object.h&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
 Object();&lt;br /&gt;
 virtual ~Object();&lt;br /&gt;
 inline void SetId(int16_t id);&lt;br /&gt;
&lt;br /&gt;
=== Gfx::Background ===&lt;br /&gt;
&lt;br /&gt;
Full-screen background image object.&lt;br /&gt;
&lt;br /&gt;
Public interface (&amp;lt;code&amp;gt;Gfx/Background.h&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
 Background(uint32_t color);&lt;br /&gt;
 Background(uint8_t R, uint8_t G, uint8_t B);&lt;br /&gt;
 Background(uint8_t R, uint8_t G, uint8_t B, uint8_t A);&lt;br /&gt;
 virtual ~Background();&lt;br /&gt;
 void Render() override;&lt;br /&gt;
 Cubios::SceneObject* SetColor(uint32_t color);&lt;br /&gt;
 Cubios::SceneObject* SetColor(uint8_t R, uint8_t G, uint8_t B);&lt;br /&gt;
 Cubios::SceneObject* SetColor(uint8_t R, uint8_t G, uint8_t B, uint8_t A);&lt;br /&gt;
&lt;br /&gt;
=== Gfx::Sprite ===&lt;br /&gt;
&lt;br /&gt;
Static image sprite bound to an image asset by name.&lt;br /&gt;
&lt;br /&gt;
Public interface (&amp;lt;code&amp;gt;Gfx/Sprite.h&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
 Sprite(std::string name, const Cubios::Math::Transform&amp;amp; t);&lt;br /&gt;
 Sprite(std::string name, float x, float y);&lt;br /&gt;
 Sprite(std::string name);&lt;br /&gt;
 Sprite(const Sprite&amp;amp; sprite);&lt;br /&gt;
 virtual ~Sprite();&lt;br /&gt;
 void Render() override;&lt;br /&gt;
&lt;br /&gt;
=== Gfx::AnimatedSprite ===&lt;br /&gt;
&lt;br /&gt;
Frame-animated sprite.&lt;br /&gt;
&lt;br /&gt;
Public interface (&amp;lt;code&amp;gt;Gfx/AnimatedSprite.h&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
 AnimatedSprite(std::vector&amp;lt;std::string&amp;gt;&amp;amp; names, const Cubios::Math::Transform&amp;amp; t);&lt;br /&gt;
 AnimatedSprite(std::vector&amp;lt;std::string&amp;gt;&amp;amp; names, float x, float y);&lt;br /&gt;
 AnimatedSprite(std::vector&amp;lt;std::string&amp;gt;&amp;amp; names);&lt;br /&gt;
 AnimatedSprite(std::string name,std::string extension, int16_t firstFrame, int16_t lastFrame, const Cubios::Math::Transform&amp;amp; t);&lt;br /&gt;
 AnimatedSprite(std::string name,std::string extension, int16_t firstFrame, int16_t lastFrame, float x, float y);&lt;br /&gt;
 AnimatedSprite(std::string name,std::string extension, int16_t firstFrame, int16_t lastFrame);&lt;br /&gt;
 AnimatedSprite(const AnimatedSprite&amp;amp; sprite);&lt;br /&gt;
 AnimatedSprite(Cubios::Gfx::SpriteAtlas&amp;lt;Cubios::Gfx::SpriteAtlasElement&amp;gt;* atlas, const Cubios::Math::Transform&amp;amp; t);&lt;br /&gt;
 AnimatedSprite(Cubios::Gfx::SpriteAtlas&amp;lt;Cubios::Gfx::SpriteAtlasElement&amp;gt;* atlas, float x, float y);&lt;br /&gt;
 AnimatedSprite(Cubios::Gfx::SpriteAtlas&amp;lt;Cubios::Gfx::SpriteAtlasElement&amp;gt;* atlas);&lt;br /&gt;
 virtual ~AnimatedSprite();&lt;br /&gt;
 void Render() override;&lt;br /&gt;
 int16_t Tick(uint32_t dt);&lt;br /&gt;
 Cubios::SceneObject* SetFrame(int16_t frameNumber);&lt;br /&gt;
 Cubios::SceneObject* SetPlaybackSpeed(int16_t speed);&lt;br /&gt;
 Cubios::SceneObject* SetPlaybackMode(playbackMode_t mode);&lt;br /&gt;
 int16_t PrevFrame();&lt;br /&gt;
 int16_t NextFrame();&lt;br /&gt;
&lt;br /&gt;
=== Gfx::SpriteAtlas ===&lt;br /&gt;
&lt;br /&gt;
Sprite atlas: a sheet of sub-images rendered via &amp;lt;code&amp;gt;SpriteAtlasElement&amp;lt;/code&amp;gt;. Added in SDK 6.2.&lt;br /&gt;
&lt;br /&gt;
Public interface (&amp;lt;code&amp;gt;Gfx/SpriteAtlas.h&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
 SpriteAtlas(std::string name, Cubios::Scene* scene);&lt;br /&gt;
 virtual ~SpriteAtlas();&lt;br /&gt;
 bool AddSprite(uint32_t id, const Cubios::Math::Rect2&amp;amp; rc);&lt;br /&gt;
 bool RemoveSprite(uint32_t id);&lt;br /&gt;
 T* Get(uint32_t ind);&lt;br /&gt;
 inline size_t Count();&lt;br /&gt;
 inline std::vector&amp;lt;uint32_t&amp;gt;* ElementsInsertionOrder();&lt;br /&gt;
&lt;br /&gt;
=== Gfx::SpriteAtlasElement ===&lt;br /&gt;
&lt;br /&gt;
One element (sub-rectangle) of a &amp;lt;code&amp;gt;SpriteAtlas&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Public interface (&amp;lt;code&amp;gt;Gfx/SpriteAtlas.h&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
 SpriteAtlasElement(SpriteAtlasBase* host, const Cubios::Math::Rect2&amp;amp; rc);&lt;br /&gt;
 virtual ~SpriteAtlasElement();&lt;br /&gt;
 void Render() override;&lt;br /&gt;
 virtual SpriteAtlasElement* Copy();&lt;br /&gt;
 inline Cubios::Math::Rect2* Rect();&lt;br /&gt;
&lt;br /&gt;
=== Gfx::Text ===&lt;br /&gt;
&lt;br /&gt;
Text object with scale, alignment and color.&lt;br /&gt;
&lt;br /&gt;
Public interface (&amp;lt;code&amp;gt;Gfx/Text.h&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
 Text(std::string text, const Cubios::Math::Transform&amp;amp; t, uint32_t fontSize, const Cubios::Math::Color&amp;amp; color, Cubios::text_align_t al = Cubios::text_align_t::TEXT_ALIGN_CENTER);&lt;br /&gt;
 Text(std::string text, const Cubios::Math::Transform&amp;amp; t, uint32_t fontSize = 10, Cubios::text_align_t al = Cubios::text_align_t::TEXT_ALIGN_CENTER);&lt;br /&gt;
 Text(std::string text, float x, float y, uint32_t fontSize = 10);&lt;br /&gt;
 Text(std::string text, float x, float y, uint32_t fontSize, const Cubios::Math::Color&amp;amp; color);&lt;br /&gt;
 virtual ~Text();&lt;br /&gt;
 void Render() override;&lt;br /&gt;
 Cubios::SceneObject* SetContent(std::string text);&lt;br /&gt;
 Cubios::SceneObject* FormatContent(char const* format,...);&lt;br /&gt;
 Cubios::SceneObject* SetFontSize(uint32_t fontSize);&lt;br /&gt;
&lt;br /&gt;
=== Gfx::QRCode ===&lt;br /&gt;
&lt;br /&gt;
QR-code object rendered on screen. Added in SDK 6.0.&lt;br /&gt;
&lt;br /&gt;
Public interface (&amp;lt;code&amp;gt;Gfx/QRCode.h&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
 QRCode(std::string data, const Cubios::Math::Transform&amp;amp; t);&lt;br /&gt;
 QRCode(std::string data, float x, float y);&lt;br /&gt;
 QRCode(std::string data, const Cubios::Math::Transform&amp;amp; t, u32_t size);&lt;br /&gt;
 QRCode(std::string data, float x, float y, u32_t size);&lt;br /&gt;
 QRCode(const QRCode&amp;amp; qr);&lt;br /&gt;
 virtual ~QRCode();&lt;br /&gt;
 Cubios::SceneObject* SetSize(u32_t size);&lt;br /&gt;
 Cubios::SceneObject* SetColor(const Math::Color&amp;amp; color);&lt;br /&gt;
 Cubios::SceneObject* SetBackgroundColor(const Math::Color&amp;amp; color);&lt;br /&gt;
 Cubios::SceneObject* SetData(std::string data);&lt;br /&gt;
 void Render() override;&lt;br /&gt;
&lt;br /&gt;
=== Gfx::OffscreenRenderTarget ===&lt;br /&gt;
&lt;br /&gt;
Offscreen render target (baked image) usable as a scene object.&lt;br /&gt;
&lt;br /&gt;
Public interface (&amp;lt;code&amp;gt;Gfx/OffscreenRenderTarget.h&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
 OffscreenRenderTarget(u32_t width, u32_t height, Cubios::GFX_PixelFormat_t format);&lt;br /&gt;
 virtual ~OffscreenRenderTarget();&lt;br /&gt;
 Cubios::SceneObject* Add(Cubios::SceneObject* obj);&lt;br /&gt;
 Cubios::SceneObject* AddCopy(Cubios::SceneObject* obj);&lt;br /&gt;
 void Begin(bool overwrite=false);&lt;br /&gt;
 void End();&lt;br /&gt;
 void Render() override;&lt;br /&gt;
 virtual void RenderLayer(renderLayerOrder_t order);&lt;br /&gt;
&lt;br /&gt;
=== Sound ===&lt;br /&gt;
&lt;br /&gt;
A sound asset; play, stop and query state.&lt;br /&gt;
&lt;br /&gt;
Public interface (&amp;lt;code&amp;gt;Sound.h&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
 explicit Sound(const std::string&amp;amp; name);&lt;br /&gt;
 ~Sound();&lt;br /&gt;
 void Play(uint8_t volume = 100);&lt;br /&gt;
 static void Stop();&lt;br /&gt;
 static bool IsPlaying();&lt;br /&gt;
&lt;br /&gt;
=== SoundCollection ===&lt;br /&gt;
&lt;br /&gt;
A set of sounds with random playback helpers. Added in SDK 6.2.&lt;br /&gt;
&lt;br /&gt;
Public interface (&amp;lt;code&amp;gt;Sound.h&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
 SoundCollection(std::vector&amp;lt;std::string&amp;gt;&amp;amp; names);&lt;br /&gt;
 SoundCollection(std::vector&amp;lt;Cubios::Sound*&amp;gt;&amp;amp; sounds);&lt;br /&gt;
 virtual ~SoundCollection();&lt;br /&gt;
 bool PlayRandomSound(uint8_t volume = 100, bool stopCurrent = true);&lt;br /&gt;
 bool RepeatRandomSounds(uint8_t volume, int delayMin, int delayMax, int deltaTime);&lt;br /&gt;
 void Stop();&lt;br /&gt;
 bool IsPlaying();&lt;br /&gt;
&lt;br /&gt;
=== NetworkMessage ===&lt;br /&gt;
&lt;br /&gt;
Bit-packed serializer for inter-module messages (write/read ints, signed ints, floats).&lt;br /&gt;
&lt;br /&gt;
Public interface (&amp;lt;code&amp;gt;NetworkMessage.h&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
 NetworkMessage(uint8_t* data=NULL,int length=MESSAGE_SIZE_MAX);&lt;br /&gt;
 virtual ~NetworkMessage();&lt;br /&gt;
 void Print();&lt;br /&gt;
 void WriteInt(int value, int bits);&lt;br /&gt;
 void WriteByte(uint8_t value);&lt;br /&gt;
 void WriteSignedInt(int value, int bits);&lt;br /&gt;
 void WriteBool(bool value);&lt;br /&gt;
 void WriteFloat(float value);&lt;br /&gt;
 int ReadInt(int bits);&lt;br /&gt;
 int ReadSignedInt(int bits);&lt;br /&gt;
 uint8_t ReadByte();&lt;br /&gt;
 bool ReadBool();&lt;br /&gt;
 float ReadFloat();&lt;br /&gt;
 uint8_t* GetData(int&amp;amp; length);&lt;br /&gt;
 void SetData(uint8_t* data, int length);&lt;br /&gt;
 inline void Reset(bool zero=false);&lt;br /&gt;
&lt;br /&gt;
=== SaveMessage ===&lt;br /&gt;
&lt;br /&gt;
Serializer for persistent state (used with &amp;lt;code&amp;gt;SaveState()&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;LoadState()&amp;lt;/code&amp;gt;). Added in SDK 6.0.&lt;br /&gt;
&lt;br /&gt;
Public interface (&amp;lt;code&amp;gt;SaveMessage.h&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
 SaveMessage(uint8_t* data=NULL,int length=GAME_SAVE_SIZE);&lt;br /&gt;
 virtual ~SaveMessage();&lt;br /&gt;
 void Print();&lt;br /&gt;
 void WriteInt(int value, int bits);&lt;br /&gt;
 void WriteByte(uint8_t value);&lt;br /&gt;
 void WriteSignedInt(int value, int bits);&lt;br /&gt;
 void WriteBool(bool value);&lt;br /&gt;
 void WriteFloat(float value);&lt;br /&gt;
 int ReadInt(int bits);&lt;br /&gt;
 int ReadSignedInt(int bits);&lt;br /&gt;
 uint8_t ReadByte();&lt;br /&gt;
 bool ReadBool();&lt;br /&gt;
 float ReadFloat();&lt;br /&gt;
 uint8_t* GetData(int&amp;amp; length);&lt;br /&gt;
 void SetData(uint8_t* data, int length);&lt;br /&gt;
 inline void Reset(bool zero=false);&lt;br /&gt;
&lt;br /&gt;
=== Scramble ===&lt;br /&gt;
&lt;br /&gt;
Cube-scramble helper. Added in SDK 6.0.&lt;br /&gt;
&lt;br /&gt;
Public interface (&amp;lt;code&amp;gt;Scramble.h&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
 Scramble();&lt;br /&gt;
 ~Scramble();&lt;br /&gt;
 void StartScramble(uint8_t twistsCount);&lt;br /&gt;
 void VirtualTwist(uint8_t screen, uint8_t direction);&lt;br /&gt;
 virtual void on_BeforeTwist() = 0;&lt;br /&gt;
 virtual void on_MappingChanged(uint8_t moduleTo, uint8_t screenTo, uint8_t moduleFrom, uint8_t screenFrom) = 0;&lt;br /&gt;
 virtual void on_Twist(const Cubios::TOPOLOGY_twistInfo_t twist) = 0;&lt;br /&gt;
&lt;br /&gt;
=== Splashscreen ===&lt;br /&gt;
&lt;br /&gt;
Standard splash screen with leaderboard support (reworked in SDK 6.2).&lt;br /&gt;
&lt;br /&gt;
Public interface (&amp;lt;code&amp;gt;Splashscreen.h&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
 Splashscreen(Cubios::Application *app, SplsParms::e_LeadersDataType dataType);&lt;br /&gt;
 ~Splashscreen();&lt;br /&gt;
 virtual void Render(Cubios::Screen* screen);&lt;br /&gt;
 virtual void Tick(uint32_t currentTime, uint32_t deltaTime);&lt;br /&gt;
 uint32_t GetPersonalBest();&lt;br /&gt;
 void SetRecord(uint32_t value);&lt;br /&gt;
 void SetNamedValue(uint8_t idx, std::string name, uint32_t value, SplsParms::e_LeadersDataType type = SplsParms::e_LeadersDataType::typeNumber);&lt;br /&gt;
 void SetSeparator(std::string s);&lt;br /&gt;
 void SetLabel(SplsParms::e_LabelTypes idx, std::string text);&lt;br /&gt;
 void SetApplicationName(std::string name);&lt;br /&gt;
 void SetLeaderBoardTable(SplsParms::e_LeaderBoardType type);&lt;br /&gt;
 void SetLeaderBoardTable(uint32_t (&amp;amp;lbTable)[TOPOLOGY_FACES_MAX][TOPOLOGY_POSITIONS_MAX]);&lt;br /&gt;
 void SetPlaybackSpeed(SplsParms::e_LabelTypes idx, uint32_t speed);&lt;br /&gt;
 void SetQRCodeLink(std::string link);&lt;br /&gt;
 void SetColors(Cubios::Math::Color key, Cubios::Math::Color base);&lt;br /&gt;
 void SetTopology(uint8_t screen, Cubios::TOPOLOGY_place_t p);&lt;br /&gt;
 void GetTopology(TOPOLOGY_orientation_mode_t mode, bool replaceFaceToOrientation);&lt;br /&gt;
 virtual void RenderUserDefinedScreen(uint8_t type);&lt;br /&gt;
&lt;br /&gt;
=== Math::Vec2 ===&lt;br /&gt;
&lt;br /&gt;
2D float vector.&lt;br /&gt;
&lt;br /&gt;
Public interface (&amp;lt;code&amp;gt;Math/Vec2.h&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
 Vec2();&lt;br /&gt;
 Vec2(const float _x, const float _y);&lt;br /&gt;
 Vec2(const Vec2&amp;amp; vec);&lt;br /&gt;
 Vec2(const float* p);&lt;br /&gt;
 void Set(const float _x, const float _y);&lt;br /&gt;
 void Set(const Vec2&amp;amp; vec);&lt;br /&gt;
 void Set(const float* p);&lt;br /&gt;
 float Len() const;&lt;br /&gt;
 void Norm();&lt;br /&gt;
 bool IsEqual(const Vec2&amp;amp; v, const float tol) const;&lt;br /&gt;
 int Compare(const Vec2&amp;amp; v, float tol) const;&lt;br /&gt;
&lt;br /&gt;
=== Math::Vec2i ===&lt;br /&gt;
&lt;br /&gt;
2D integer vector.&lt;br /&gt;
&lt;br /&gt;
Public interface (&amp;lt;code&amp;gt;Math/Vec2.h&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
 Vec2i();&lt;br /&gt;
 Vec2i(const int16_t _x, const int16_t _y);&lt;br /&gt;
 Vec2i(const Vec2i&amp;amp; vec);&lt;br /&gt;
 Vec2i(const int16_t* p);&lt;br /&gt;
 void Set(const int16_t _x, const int16_t _y);&lt;br /&gt;
 void Set(const Vec2i&amp;amp; vec);&lt;br /&gt;
 void Set(const int16_t* p);&lt;br /&gt;
 float Len() const;&lt;br /&gt;
 void Norm();&lt;br /&gt;
 bool IsEqual(const Vec2i&amp;amp; v, const float tol) const;&lt;br /&gt;
 int Compare(const Vec2i&amp;amp; v, float tol) const;&lt;br /&gt;
&lt;br /&gt;
=== Math::Transform ===&lt;br /&gt;
&lt;br /&gt;
Position + rotation + mirroring transform of a scene object.&lt;br /&gt;
&lt;br /&gt;
Public interface (&amp;lt;code&amp;gt;Math/Transform.h&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
 Transform():Position(0,0),Rotation(0),Mirroring(0),ScaleX(100),ScaleY(100);&lt;br /&gt;
 Transform(float x, float y): Position(x,y),Rotation(0),Mirroring(0),ScaleX(100),ScaleY(100);&lt;br /&gt;
 Transform(float x, float y, unsigned int a): Position(x,y),Rotation(a),Mirroring(0),ScaleX(100),ScaleY(100);&lt;br /&gt;
 Transform(float x, float y, unsigned int a, unsigned int sx, unsigned int sy ): Position(x,y),Rotation(a),Mirroring(0),ScaleX(sx),ScaleY(sy);&lt;br /&gt;
 Transform(float x, float y, unsigned int a, unsigned int m): Position(x,y),Rotation(a),Mirroring(m),ScaleX(100),ScaleY(100);&lt;br /&gt;
 Transform(float x, float y, unsigned int a, unsigned int sx, unsigned int sy, unsigned int m): Position(x,y),Rotation(a),Mirroring(m),ScaleX(sx),ScaleY(sy);&lt;br /&gt;
 Transform(const Transform&amp;amp; t): Position(t.Position),Rotation(t.Rotation),Mirroring(t.Mirroring),ScaleX(t.ScaleX),ScaleY(t.ScaleY);&lt;br /&gt;
 int SafeRotation();&lt;br /&gt;
&lt;br /&gt;
=== Math::Color ===&lt;br /&gt;
&lt;br /&gt;
RGBA color with float/byte accessors (see also &amp;lt;code&amp;gt;Gfx/Colors.h&amp;lt;/code&amp;gt; named constants).&lt;br /&gt;
&lt;br /&gt;
Public interface (&amp;lt;code&amp;gt;Math/Color.h&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
 Color():_R(255),_G(255),_B(255),_A(255),_Value(0xFFFFFFFF);&lt;br /&gt;
 Color(uint8_t r, uint8_t g, uint32_t b):_R(r),_G(g),_B(b),_A(255);&lt;br /&gt;
 Color(uint8_t r, uint8_t g, uint32_t b, uint8_t a):_R(r),_G(g),_B(b),_A(a);&lt;br /&gt;
 Color(uint32_t v):_Value(v);&lt;br /&gt;
 this-&amp;gt;_B = (v &amp;amp; 0x000000ff);&lt;br /&gt;
 this-&amp;gt;_G = (v &amp;amp; 0x0000ff00) &amp;gt;&amp;gt; 8;&lt;br /&gt;
 this-&amp;gt;_R = (v &amp;amp; 0x00ff0000) &amp;gt;&amp;gt; 16;&lt;br /&gt;
 this-&amp;gt;_A = (v &amp;amp; 0xff000000) &amp;gt;&amp;gt; 24;&lt;br /&gt;
 void Set(uint8_t r, uint8_t g, uint32_t b, uint8_t a);&lt;br /&gt;
 void Set(uint8_t r, uint8_t g, uint32_t b);&lt;br /&gt;
 void Set(uint32_t v);&lt;br /&gt;
 inline void SetA(uint8_t a);&lt;br /&gt;
 inline void SetAf(float a);&lt;br /&gt;
 inline void SetAfSafe(float a);&lt;br /&gt;
 inline void SetR(uint8_t r);&lt;br /&gt;
 inline void SetG(uint8_t g);&lt;br /&gt;
 inline void SetB(uint8_t b);&lt;br /&gt;
 inline uint8_t A();&lt;br /&gt;
 inline float Af();&lt;br /&gt;
 inline uint8_t R();&lt;br /&gt;
 inline uint8_t G();&lt;br /&gt;
 inline uint8_t B();&lt;br /&gt;
 inline uint32_t Value();&lt;br /&gt;
&lt;br /&gt;
=== Math::Rect2 ===&lt;br /&gt;
&lt;br /&gt;
2D rectangle.&lt;br /&gt;
&lt;br /&gt;
Public interface (&amp;lt;code&amp;gt;Math/Rect2.h&amp;lt;/code&amp;gt;):&lt;br /&gt;
&lt;br /&gt;
 Rect2();&lt;br /&gt;
 Rect2(const Vec2i&amp;amp; topLeft, const Vec2i&amp;amp; bottomRight);&lt;br /&gt;
 Rect2(int16_t x, int16_t y, int16_t width, int16_t height);&lt;br /&gt;
 void Set(const Vec2i&amp;amp; topLeft, const Vec2i&amp;amp; bottomRight);&lt;br /&gt;
 bool IsInside(const Vec2i&amp;amp; p) const;&lt;br /&gt;
 Vec2i Midpoint() const;&lt;br /&gt;
&lt;br /&gt;
[[Category:SDK 6.3]]&lt;br /&gt;
[[Category:C++ API]]&lt;/div&gt;</summary>
		<author><name>WowBot</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=SDK_6.3/Rust&amp;diff=16940</id>
		<title>SDK 6.3/Rust</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=SDK_6.3/Rust&amp;diff=16940"/>
		<updated>2026-07-26T09:14:54Z</updated>

		<summary type="html">&lt;p&gt;WowBot: C++ (WASM) and Rust API reference for SDK 6.3 (WowBot)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{notice|'''Official WOWCube SDK documentation.''' SDK 6.3, Rust API. Based on the &amp;lt;code&amp;gt;wowcube_sdk&amp;lt;/code&amp;gt; crate shipped with the WOWCube Development Kit; the crate sources remain authoritative.}}&lt;br /&gt;
&lt;br /&gt;
{{SDK 6.3 nav}}&lt;br /&gt;
&lt;br /&gt;
''← [[SDK 6.3]] · Rust''&lt;br /&gt;
&lt;br /&gt;
Rust cubeapps are built to WebAssembly and use the same engine ABI as the [[SDK 6.3/C++/Native API|C++ native API]]. The Development Kit ships the '''&amp;lt;code&amp;gt;wowcube_sdk&amp;lt;/code&amp;gt;''' crate (v0.1.0) together with buildable Rust example projects (''Basics 1–3'', with assets). Projects are created and built with the [https://marketplace.visualstudio.com/items?itemName=cubios-inc.WOWCubeSDK WOWCube SDK extension for VS Code].&lt;br /&gt;
&lt;br /&gt;
== Crate layout ==&lt;br /&gt;
&lt;br /&gt;
 [package]&lt;br /&gt;
 name = &amp;quot;wowcube_sdk&amp;quot;&lt;br /&gt;
 version = &amp;quot;0.1.0&amp;quot;&lt;br /&gt;
 edition = &amp;quot;2021&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 [dependencies]&lt;br /&gt;
 cty = &amp;quot;0.2.2&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;wowcube_sdk::application&amp;lt;/code&amp;gt; — the &amp;lt;code&amp;gt;Application&amp;lt;/code&amp;gt; trait, &amp;lt;code&amp;gt;ApplicationContext&amp;lt;/code&amp;gt;, timers, animation helper (&amp;lt;code&amp;gt;Anim&amp;lt;/code&amp;gt;), error type &amp;lt;code&amp;gt;AppErr&amp;lt;/code&amp;gt;, and the entry helpers &amp;lt;code&amp;gt;application_init()&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;application_run()&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;wowcube_sdk::cubios&amp;lt;/code&amp;gt; — FFI bindings to the engine ABI and the typed submodules &amp;lt;code&amp;gt;comm&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;gfx&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;topology&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Application trait ==&lt;br /&gt;
&lt;br /&gt;
A cubeapp implements the &amp;lt;code&amp;gt;Application&amp;lt;/code&amp;gt; trait; all callbacks have default no-op implementations, so you override only what you need:&lt;br /&gt;
&lt;br /&gt;
 pub trait Application {&lt;br /&gt;
     fn app_context_mut(&amp;amp;mut self) -&amp;gt; &amp;amp;mut ApplicationContext;&lt;br /&gt;
&lt;br /&gt;
     fn on_init(&amp;amp;mut self)  -&amp;gt; Result&amp;lt;(), AppErr&amp;gt; { Ok(()) }&lt;br /&gt;
     fn on_tick(&amp;amp;mut self)  -&amp;gt; Result&amp;lt;(), AppErr&amp;gt; { Ok(()) }&lt;br /&gt;
     fn on_render(&amp;amp;self)    -&amp;gt; Result&amp;lt;(), AppErr&amp;gt; { Ok(()) }&lt;br /&gt;
     fn on_timer(&amp;amp;mut self, _timer_id: u8) -&amp;gt; Result&amp;lt;(), AppErr&amp;gt; { Ok(()) }&lt;br /&gt;
&lt;br /&gt;
     fn set_timer(&amp;amp;mut self, id: u8, delay: u32, suspended: bool) -&amp;gt; bool { … }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Errors are reported through the &amp;lt;code&amp;gt;AppErr&amp;lt;/code&amp;gt; enum (&amp;lt;code&amp;gt;AssetNotFound&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;InvalidModule&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;InvalidTwist&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SceneNotFound&amp;lt;/code&amp;gt;, …).&lt;br /&gt;
&lt;br /&gt;
== Entry points ==&lt;br /&gt;
&lt;br /&gt;
The module exports two &amp;lt;code&amp;gt;extern &amp;quot;C&amp;quot;&amp;lt;/code&amp;gt; functions which the runtime calls (from the shipped ''HelloWOWCube'' example):&lt;br /&gt;
&lt;br /&gt;
 #![no_main]&lt;br /&gt;
 mod cubeapp;&lt;br /&gt;
 use wowcube_sdk;&lt;br /&gt;
&lt;br /&gt;
 static mut APPLICATION: Option&amp;lt;cubeapp::HelloWOWCube&amp;gt; = None;&lt;br /&gt;
&lt;br /&gt;
 #[no_mangle]&lt;br /&gt;
 pub extern &amp;quot;C&amp;quot; fn on_init(cid: u32) {&lt;br /&gt;
     let mut application = cubeapp::HelloWOWCube::new();&lt;br /&gt;
     wowcube_sdk::application::application_init(&amp;amp;mut application, cid);&lt;br /&gt;
     unsafe { APPLICATION = Some(application); }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
 #[no_mangle]&lt;br /&gt;
 pub extern &amp;quot;C&amp;quot; fn run() {&lt;br /&gt;
     let application = unsafe { APPLICATION.as_mut().unwrap() };&lt;br /&gt;
     wowcube_sdk::application::application_run(application);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;cid&amp;lt;/code&amp;gt; is the index of the module (0–7) the instance runs on — the same value as &amp;lt;code&amp;gt;cubeN&amp;lt;/code&amp;gt; in C++ and &amp;lt;code&amp;gt;SELF_ID&amp;lt;/code&amp;gt; in PAWN; it is also available as &amp;lt;code&amp;gt;cubios::CUBE_N&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== FFI types ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;wowcube_sdk::cubios&amp;lt;/code&amp;gt; mirrors the [[SDK 6.3/C++/Native API#Types and data structures|native types]] with Rust naming:&lt;br /&gt;
&lt;br /&gt;
 pub struct TopologyFaceletInfo { pub module: i32, pub screen: i32, pub connected: i32 }&lt;br /&gt;
 pub struct TopologyPlace       { pub face: i32, pub position: i32 }&lt;br /&gt;
 pub struct TopologyTwistInfo   { pub screen: i32, pub count: i32, pub direction: i32 }&lt;br /&gt;
 pub struct LbInfo              { pub board_count: i32, pub self_position: i32,&lt;br /&gt;
                                  pub self_achivement: i32, pub whole_user_list_count: i32 }&lt;br /&gt;
 pub struct GfxParticle         { ttl, vx, vy, ax, ay, explosion, velocity,&lt;br /&gt;
                                  duration, frequency, max, loop, time }&lt;br /&gt;
&lt;br /&gt;
Enumerations: &amp;lt;code&amp;gt;TopologyNeighbour&amp;lt;/code&amp;gt; (None/Left/Diagonal/Top/Right/Bottom), &amp;lt;code&amp;gt;TopologyOrientation&amp;lt;/code&amp;gt; (Menu/Gravity/Splash), &amp;lt;code&amp;gt;TopologyLocation&amp;lt;/code&amp;gt; (Up/Down/Front/Back/Left/Right), &amp;lt;code&amp;gt;TextAlign&amp;lt;/code&amp;gt; (9 values), &amp;lt;code&amp;gt;LogLevel&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;UartId&amp;lt;/code&amp;gt;; constant &amp;lt;code&amp;gt;NET_BROADCAST = 0xFF&amp;lt;/code&amp;gt;; type aliases &amp;lt;code&amp;gt;SoundId&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SpriteId&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For the semantics of the underlying engine functions (graphics, sound, topology, sensors, leaderboard) see the [[SDK 6.3/C++/Native API|native API reference]] — names and behavior match one-to-one.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
The Development Kit ships three buildable Rust projects under &amp;lt;code&amp;gt;examples/…/rust/Basics&amp;lt;/code&amp;gt;, each with a &amp;lt;code&amp;gt;project/src/main.rs&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;cubeapp.rs&amp;lt;/code&amp;gt;, an &amp;lt;code&amp;gt;assets/&amp;lt;/code&amp;gt; folder and a &amp;lt;code&amp;gt;wowcubeapp-build.json&amp;lt;/code&amp;gt; build manifest.&lt;br /&gt;
&lt;br /&gt;
[[Category:SDK 6.3]]&lt;br /&gt;
[[Category:Rust API]]&lt;/div&gt;</summary>
		<author><name>WowBot</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=SDK_6.3/C%2B%2B/Native_API&amp;diff=16937</id>
		<title>SDK 6.3/C++/Native API</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=SDK_6.3/C%2B%2B/Native_API&amp;diff=16937"/>
		<updated>2026-07-26T09:14:53Z</updated>

		<summary type="html">&lt;p&gt;WowBot: C++ (WASM) and Rust API reference for SDK 6.3 (WowBot)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{notice|'''Official WOWCube SDK documentation.''' SDK 6.3, C++ (WebAssembly) API. Signatures are extracted from the canonical SDK headers shipped with the WOWCube Development Kit; the headers remain authoritative.}}&lt;br /&gt;
&lt;br /&gt;
{{SDK 6.3 nav}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''← [[SDK 6.3]] · C++ / Native API''&lt;br /&gt;
&lt;br /&gt;
The low-level C ABI available to C/C++ (and Rust) cubeapps, declared in &amp;lt;code&amp;gt;native.h&amp;lt;/code&amp;gt;. These are the same engine functions as the [[SDK 6.3/PAWN/Core|PAWN API]] — descriptions of shared functions below are taken from the official SDK reference. On top of this layer the SDK provides the object-oriented [[SDK 6.3/C++/Application|Application framework]] and the [[SDK 6.3/C++/GFX Engine|GFX Engine]].&lt;br /&gt;
&lt;br /&gt;
== Types and data structures ==&lt;br /&gt;
&lt;br /&gt;
Defined in &amp;lt;code&amp;gt;native.h&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;native_defines.h&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
 typedef uint32_t u32_t;   typedef int32_t i32_t;&lt;br /&gt;
 typedef int32_t soundID_t; typedef int32_t spriteID_t;&lt;br /&gt;
 union AppVersion_t { uint32_t full; struct { uint16_t patch:16; uint8_t minor:4; uint8_t major:4; uint8_t reserved:8; }; };&lt;br /&gt;
 struct TOPOLOGY_faceletInfo_t { int32_t module; int32_t screen; int32_t connected; };&lt;br /&gt;
 struct TOPOLOGY_place_t      { int32_t face; int32_t position; };&lt;br /&gt;
 struct TOPOLOGY_twistInfo_t  { int32_t screen; int32_t count; int32_t direction; };&lt;br /&gt;
 struct LB_info_t   { int32_t boardCount; int32_t selfPosition; int32_t selfScore; int32_t wholeUserListCount; };&lt;br /&gt;
 struct GFX_Particle_t { ttl, vx, vy, ax, ay, explosion, velocity, duration, frequency, max, loop, time };&lt;br /&gt;
&lt;br /&gt;
Enumerations: &amp;lt;code&amp;gt;TOPOLOGY_twist_t&amp;lt;/code&amp;gt; (LEFT/RIGHT/DOUBLE), &amp;lt;code&amp;gt;TOPOLOGY_orientation_mode_t&amp;lt;/code&amp;gt; (MENU/GRAVITY/SPLASH), &amp;lt;code&amp;gt;TOPOLOGY_orientation_t&amp;lt;/code&amp;gt; (UP/DOWN/FRONT/BACK/LEFT/RIGHT), &amp;lt;code&amp;gt;TOPOLOGY_neighbor_t&amp;lt;/code&amp;gt; (SELF/LEFT/DIAGONAL/TOP/RIGHT/BOTTOM), &amp;lt;code&amp;gt;text_align_t&amp;lt;/code&amp;gt; (9 values), &amp;lt;code&amp;gt;GFX_mirror_t&amp;lt;/code&amp;gt; (BLANK/X/Y/XY), &amp;lt;code&amp;gt;GFX_PixelFormat_t&amp;lt;/code&amp;gt; (RGB565/ARGB6666/ARGB8888), &amp;lt;code&amp;gt;eventMask_t&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;LogLevel_t&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;uartID_t&amp;lt;/code&amp;gt;. Constant: &amp;lt;code&amp;gt;NET_BROADCAST = 0xFF&amp;lt;/code&amp;gt;; global &amp;lt;code&amp;gt;cubeN&amp;lt;/code&amp;gt; — the index of the module the code is running on.&lt;br /&gt;
&lt;br /&gt;
== Core ==&lt;br /&gt;
&lt;br /&gt;
===sendPacket===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t sendPacket(u32_t type, uint8_t* pkt, u32_t size)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Send a packet to another module. Use &amp;lt;code&amp;gt;NET_BROADCAST&amp;lt;/code&amp;gt; (0xFF) as the destination to reach all modules. Low-level counterpart of the PAWN &amp;lt;code&amp;gt;broadcastPacket()&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===recvPacket===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t recvPacket(u32_t size, uint32_t* type, uint8_t* pkt)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Read a pending inter-module packet into a buffer. Normally consumed by the &amp;lt;code&amp;gt;AppManager&amp;lt;/code&amp;gt; event loop, which dispatches it to &amp;lt;code&amp;gt;Application::on_Message()&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===getTime===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t getTime()&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get time in milliseconds since the module start.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Time in milliseconds since the module start.&lt;br /&gt;
&lt;br /&gt;
===getUserName===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t getUserName(uint8_t* buffer, u32_t bufSize)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get the name of a user who is logined on the cube.&lt;br /&gt;
: Get the user name configured in the WOWCube mobile application to save&lt;br /&gt;
: results for.&lt;br /&gt;
&lt;br /&gt;
===toggleDebugInfo===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t toggleDebugInfo()&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Toggle overlay with debug information. TBD - move to GFX&lt;br /&gt;
&lt;br /&gt;
===saveState===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t saveState(void* data, u32_t size)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Request to save an application data&lt;br /&gt;
: Save user settings and/or progress on the flash to restore next time. Each&lt;br /&gt;
: save data has an incremental ID.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: True if save was successful.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - fixed a bug in which only part of a data saved on the flash&lt;br /&gt;
&lt;br /&gt;
===loadState===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t loadState(u32_t* id, void* data, u32_t size)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Request to load an application save data from the flash.&lt;br /&gt;
: Trigger state load event. It is asynchronous so access to flash memory will&lt;br /&gt;
: not affect an application performance.&lt;br /&gt;
&lt;br /&gt;
===random===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t random(u32_t min, u32_t max)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Generate random number in half-open range.&lt;br /&gt;
: Random number generator is initialized before each application start. Seed&lt;br /&gt;
: for initialization is generated by TRNG (True Random Number Generator).&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Pseudo random value from requested range.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - fixed a bug in which random does not generate numbers in a given&lt;br /&gt;
: range.&lt;br /&gt;
&lt;br /&gt;
===getAppVersion===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t getAppVersion(Cubios::AppVersion_t *version)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get application version.&lt;br /&gt;
: WOWCube applications follow semantic versioning scheme (see&lt;br /&gt;
: https://semver.org). This interface allows to get version parts stored in&lt;br /&gt;
: the cube application descriptor.&lt;br /&gt;
: Outputs&lt;br /&gt;
:* version - structure describing application version&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.0 - added&lt;br /&gt;
&lt;br /&gt;
===LOG===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t LOG(uint8_t level, const char* text)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Write a log line with the given level. Prefer the &amp;lt;code&amp;gt;LOG_a/e/w/i/d/v&amp;lt;/code&amp;gt; printf-style macros (see &amp;lt;code&amp;gt;LogLevel_t&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
===getTap===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t getTap()&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get the pending tap event, if any. Normally consumed by the &amp;lt;code&amp;gt;AppManager&amp;lt;/code&amp;gt; event loop (&amp;lt;code&amp;gt;Application::on_Tap()&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;on_Pat()&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
===sendBleData===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t sendBleData(u32_t type, uint8_t* pkt, u32_t size)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Send external data over BLE to the connected companion (WOWCube Connect) application.&lt;br /&gt;
&lt;br /&gt;
===recvBleData===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t recvBleData(uint8_t* pkt, u32_t size)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Receive pending external BLE data; dispatched by &amp;lt;code&amp;gt;AppManager&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;Application::on_ExternalMessage()&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===EVENT_getList===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t EVENT_getList()&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get the pending event mask for this module (see &amp;lt;code&amp;gt;eventMask_t&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
== Topology ==&lt;br /&gt;
&lt;br /&gt;
===TOPOLOGY_getAdjacentFacelet===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t TOPOLOGY_getAdjacentFacelet(u32_t module, u32_t screen, u32_t direction, Cubios::TOPOLOGY_faceletInfo_t* result)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get a facelet neighbor in the given direction.&lt;br /&gt;
: Facelet can have neighbors on the same cube face or neighbors by module.&lt;br /&gt;
: This function provide a neighbor of the given facelet in the given&lt;br /&gt;
: direction. Connection status indicates if there is a connection between&lt;br /&gt;
: modules on which given facelet and its neighbor are located.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Neighbor facelet in a given direction with its connection status. The&lt;br /&gt;
: module ID will be MODULES_MAX and the screen number will be SCREENS_MAX in&lt;br /&gt;
: case of an error (e.g. incorrect arguments or the topology malfunction).&lt;br /&gt;
&lt;br /&gt;
===TOPOLOGY_getFacelet===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t TOPOLOGY_getFacelet(u32_t face, u32_t position, Cubios::TOPOLOGY_orientation_mode_t mode, Cubios::TOPOLOGY_faceletInfo_t* result)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get a facelet located in the given place.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Facelet located in the given place, connection status indicates if there&lt;br /&gt;
: any connection to the module on which this facelet resides. The module ID&lt;br /&gt;
: will be MODULES_MAX and the screen screen will be SCREENS_MAX in case of an&lt;br /&gt;
: error (e.g. incorrect arguments or the topology malfunction).&lt;br /&gt;
&lt;br /&gt;
===TOPOLOGY_getPlace===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t TOPOLOGY_getPlace(u32_t module, u32_t screen, Cubios::TOPOLOGY_orientation_mode_t mode, Cubios::TOPOLOGY_place_t* result)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get a place of the facelet.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Place on cube surface where the given facelet located. Face will be&lt;br /&gt;
: TOPOLOGY_FACES_MAX and position will be TOPOLOGY_POSITIONS_MAX in case of&lt;br /&gt;
: an error (e.g. incorrect arguments or topology malfunction)&lt;br /&gt;
&lt;br /&gt;
===TOPOLOGY_getOppositeFacelet===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t TOPOLOGY_getOppositeFacelet(u32_t module, u32_t screen, Cubios::TOPOLOGY_faceletInfo_t* result)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get an opposite facelet located on a diagonal counterpart module.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Diagonal opposite counterpart facelet. Connection status indicates if there&lt;br /&gt;
: any connection to the module on which that facelet resides. The module ID&lt;br /&gt;
: will be MODULES_MAX and the screen number will be SCREENS_MAX in case of an&lt;br /&gt;
: error (e.g. incorrect arguments or topology malfunction).&lt;br /&gt;
&lt;br /&gt;
===TOPOLOGY_getAngle===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t TOPOLOGY_getAngle(u32_t module, u32_t screen, Cubios::TOPOLOGY_orientation_mode_t mode)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get an angle to align images on a face according to the orientation mode.&lt;br /&gt;
: Display coordinates system is persistent on a module screen. Different&lt;br /&gt;
: angles are needed to align images on all modules with screens on the same&lt;br /&gt;
: face. This function returns the angle for the screen specified by the&lt;br /&gt;
: facelet. The angle is relative to the position 0 on the same face where the&lt;br /&gt;
: facelet is located in the given orientation mode.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Angle to align images on the same face according to the orientation mode, 0&lt;br /&gt;
: in case of an error (e.g. incorrect arguments or the topology malfunction).&lt;br /&gt;
&lt;br /&gt;
===TOPOLOGY_getFaceletOrientation===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t TOPOLOGY_getFaceletOrientation(u32_t module, u32_t screen)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get a face orientation on which the given facelet resides.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Face orientation on which the given facelet resides, ORIENTATION_MAX in&lt;br /&gt;
: case of an error (e.g. incorrect arguments or the topology malfunction).&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - renamed from TOPOLOGY_getFaceletLocation() to the&lt;br /&gt;
: TOPOLOGY_getFaceletOrientation()&lt;br /&gt;
&lt;br /&gt;
===TOPOLOGY_getPlaceOrientation===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t TOPOLOGY_getPlaceOrientation(u32_t face, u32_t position)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get a face orientation on which the given place resides.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Face orientation on which the given place resides, ORIENTATION_MAX in case&lt;br /&gt;
: of an error (e.g. incorrect arguments or the topology malfunction).&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - renamed from TOPOLOGY_getPlaceLocation() to the&lt;br /&gt;
: TOPOLOGY_getPlaceOrientation()&lt;br /&gt;
&lt;br /&gt;
===TOPOLOGY_getFace===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t TOPOLOGY_getFace(u32_t orientation)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get a face number which has the given orientation.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Face number which has the given orientation, TOPOLOGY_FACES_MAX in case of&lt;br /&gt;
: an error (e.g. incorrect arguments or the topology malfunction).&lt;br /&gt;
&lt;br /&gt;
===TOPOLOGY_isAssembled===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t TOPOLOGY_isAssembled()&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Check that all modules in a system are connected to each other.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: True if all modules in a system are connected to each other, false&lt;br /&gt;
: otherwise.&lt;br /&gt;
&lt;br /&gt;
===TOPOLOGY_getTwist===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t TOPOLOGY_getTwist(Cubios::TOPOLOGY_twistInfo_t* twist)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Read the pending twist event into a &amp;lt;code&amp;gt;TOPOLOGY_twistInfo_t&amp;lt;/code&amp;gt;. Normally consumed by &amp;lt;code&amp;gt;AppManager&amp;lt;/code&amp;gt;, which calls &amp;lt;code&amp;gt;Application::on_Twist()&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Leaderboard ==&lt;br /&gt;
&lt;br /&gt;
===LB_getInfo===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t LB_getInfo(Cubios::LB_info_t* info)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===LB_getScore===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t LB_getScore(uint8_t* leadTableBin, u32_t bufSize)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Motion Sensors ==&lt;br /&gt;
&lt;br /&gt;
===MS_getFaceAccelX===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t MS_getFaceAccelX(u32_t display)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get accelerometer value along X axis of some display.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Accelerometer value along X axis.&lt;br /&gt;
&lt;br /&gt;
===MS_getFaceAccelY===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t MS_getFaceAccelY(u32_t display)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get accelerometer value along Y axis of some display.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Accelerometer value along Y axis.&lt;br /&gt;
&lt;br /&gt;
===MS_getFaceAccelZ===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t MS_getFaceAccelZ(u32_t display)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get accelerometer value along Z axis of some display.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Accelerometer value along Z axis.&lt;br /&gt;
&lt;br /&gt;
===MS_getFaceGyroX===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t MS_getFaceGyroX(u32_t display)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get gyroscope value around X axis of some display.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Gyroscope value around X axis.&lt;br /&gt;
&lt;br /&gt;
===MS_getFaceGyroY===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t MS_getFaceGyroY(u32_t display)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get gyroscope value around Y axis of some display.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Gyroscope value around Y axis.&lt;br /&gt;
&lt;br /&gt;
===MS_getFaceGyroZ===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t MS_getFaceGyroZ(u32_t display)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get gyroscope value around Z axis of some display.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Gyroscope value around Z axis.&lt;br /&gt;
&lt;br /&gt;
== Graphics ==&lt;br /&gt;
&lt;br /&gt;
===GFX_getAssetId===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_getAssetId(const char* spriteName)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get an image ID by the filename.&lt;br /&gt;
: Usually an application uses image IDs to draw sprites and backgrounds. But&lt;br /&gt;
: sometimes IDs are unknown, e.g. in common libraries, or they change rapidly&lt;br /&gt;
: during development. This interface can be used to get an ID of the image by&lt;br /&gt;
: its filename in the runtime. Maximum asset name length is 15 characters,&lt;br /&gt;
: remaining symbols are truncated during lookup.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: The ID of image with a given filename or -1 in case of error.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - renamed from GFX_getId() to GFX_getAssetId()&lt;br /&gt;
: v6.0 - truncate asset name in WASM API&lt;br /&gt;
&lt;br /&gt;
===GFX_clear===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_clear(u32_t color)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Clear a layer with a given color.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.0 - changed color format&lt;br /&gt;
&lt;br /&gt;
===GFX_drawText===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_drawText(i32_t x, i32_t y, u32_t scale, u32_t angle, u32_t align, u32_t color, const char* text)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Draw a formatted text by the specified coordinates with a given color,&lt;br /&gt;
: scale, text align and a rotation angle.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - clarified documentation, added GFX_drawTextXY() alias&lt;br /&gt;
&lt;br /&gt;
===GFX_drawPoint===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_drawPoint(i32_t x, i32_t y, u32_t color)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Draw a point specified by its coordinates with a given color.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - added GFX_drawPointXY() alias&lt;br /&gt;
&lt;br /&gt;
===GFX_drawCircle===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_drawCircle(u32_t x, u32_t y, u32_t radius, u32_t width, u32_t color)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Draw a circle at the given point with given radius, color and line width.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - added GFX_drawCircleXY() alias&lt;br /&gt;
&lt;br /&gt;
===GFX_drawSolidCircle===&lt;br /&gt;
:'''Deprecated.''' use fill shader intead&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_drawSolidCircle(u32_t x, u32_t y, u32_t radius, u32_t color)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Draw a solid circle at the given point with given radius and color.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - added GFX_drawSolidCircleXY() alias&lt;br /&gt;
: v6.0 - DEPRECATED, use GFX_setFillShader() instead&lt;br /&gt;
&lt;br /&gt;
===GFX_drawArc===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_drawArc(i32_t x, i32_t y, u32_t radius, u32_t width, u32_t angle0, u32_t angle1, u32_t color)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Draw an arc at the given point with given radius, line width, color and&lt;br /&gt;
: angles.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - added GFX_drawArcXY() alias&lt;br /&gt;
&lt;br /&gt;
===GFX_drawSector===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_drawSector(i32_t x, i32_t y, u32_t radius, u32_t angle0, u32_t angle1, u32_t color)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Draw a filled circular sector, connecting the arc to the circle's center&lt;br /&gt;
: like a piece of pie.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.1 - created&lt;br /&gt;
&lt;br /&gt;
===GFX_drawLine===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_drawLine(i32_t x0, i32_t y0, i32_t x1, i32_t y1, u32_t thickness, u32_t color)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Draw a line with from a given point to another one and given width and&lt;br /&gt;
: color.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - added GFX_drawLineXY() alias&lt;br /&gt;
&lt;br /&gt;
===GFX_drawRectangle===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_drawRectangle(i32_t x, i32_t y, i32_t w, i32_t h, u32_t color)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Draw a solid rectangle at a given position with specified dimensions and a&lt;br /&gt;
: color.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - added GFX_drawRectangleXY() alias&lt;br /&gt;
&lt;br /&gt;
===GFX_bakeImage===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_bakeImage(spriteID_t id, u32_t width, u32_t height, GFX_PixelFormat_t format, u32_t overwrite)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Set an ID of a memory buffer to save next rendering result.&lt;br /&gt;
: Specifies the image that will be created by combining the group of&lt;br /&gt;
: graphical primitives used between GFX_bakeImage() and GFS_render()&lt;br /&gt;
: according their order and taking into account alpha channel in images. HW&lt;br /&gt;
: has a limitation and can combine no more than 4 layers simultaneously, so&lt;br /&gt;
: if there are more primitives then they will be combined in a cascade.&lt;br /&gt;
: Useful for creating complex images like backgrounds for later usage.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.0 - added overwrite parameter&lt;br /&gt;
&lt;br /&gt;
===GFX_setRenderTarget===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_setRenderTarget(u32_t display)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Set a screen which will be used to display next rendering result.&lt;br /&gt;
: Cube module is a special device which has 3 independent screens to display&lt;br /&gt;
: graphics. GFX_setRenderTarget() specifies a screen number which will be&lt;br /&gt;
: used to display a next rendering result. Graphics primitives used in&lt;br /&gt;
: between GFX_setRenderTarget() and GFX_render() calls will be combined&lt;br /&gt;
: together according their order and taking into account alpha channel in&lt;br /&gt;
: images. Resulting image will be immediately flushed onto the given screen.&lt;br /&gt;
: HW has a limitation and can combine no more than 4 layers simultaneously,&lt;br /&gt;
: so if there are more primitives then they will be combined in a cascade. To&lt;br /&gt;
: display anything on the screen GFX_setRenderTarget() has to be always&lt;br /&gt;
: called.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - renamed from GFX_updateDisplay() to GFX_setRenderTarget()&lt;br /&gt;
&lt;br /&gt;
===GFX_drawImage===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_drawImage(spriteID_t id, i32_t x, i32_t y, u32_t opacity, u32_t colorKey, u32_t scale_x, u32_t scale_y, u32_t angle, u32_t mirror)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Draw an image from application assets at a specified position and with&lt;br /&gt;
: given transformations.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - added GFX_drawImageXY() alias, color argument clarified&lt;br /&gt;
: v6.0 - added scale parameters&lt;br /&gt;
&lt;br /&gt;
===GFX_drawBakedImage===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_drawBakedImage(i32_t x, i32_t y, u32_t opacity, u32_t colorKey, u32_t scale_x, u32_t scale_y, u32_t angle, u32_t mirror, spriteID_t id)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Draw a previously baked image at a specified position and with given&lt;br /&gt;
: transformations.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - added GFX_drawBakedImageXY() alias, color argument clarified&lt;br /&gt;
: v6.0 - added scale parameters&lt;br /&gt;
&lt;br /&gt;
===GFX_drawQrCode===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_drawQRCode(i32_t x, i32_t y, u32_t size, u32_t color0, u32_t color1, u32_t angle, u32_t id, const char *text)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Generate and draw QR-code for a given text string.&lt;br /&gt;
: Supported version 2 which is limited by 32 characters of input.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.0 - added&lt;br /&gt;
&lt;br /&gt;
===GFX_render===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_render()&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Start rendering process.&lt;br /&gt;
&lt;br /&gt;
===GFX_clearCache===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_clearCache()&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Clear all cached images.&lt;br /&gt;
: Oldest accessed image cache will be automatically freed if there is not&lt;br /&gt;
: enough memory to cache a new image. This function forces this process, e.g.&lt;br /&gt;
: when switch game levels.&lt;br /&gt;
&lt;br /&gt;
===GFX_removeBakedImage===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_removeBakedImage(spriteID_t id)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Remove specified baked image from cache.&lt;br /&gt;
: Baked images do not automatically invalidate. This function allows to&lt;br /&gt;
: remove any baked image from cache to save some space.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.0 - added&lt;br /&gt;
&lt;br /&gt;
===GFX_cacheImages===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_cacheImages(spriteID_t* spriteIDs, u32_t count)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Force platform to cache application images.&lt;br /&gt;
: Platform automatically reads and caches images from flash when the&lt;br /&gt;
: application draws an image. Flash operations are synchronous and may cause&lt;br /&gt;
: delays especially when reading large portions of data. To prevent the&lt;br /&gt;
: application from lags it is possible to cache image data in advance.&lt;br /&gt;
: However if application requests to draw a non-cached image and there is not&lt;br /&gt;
: enough memory then oldest accessed images will be removed from cache. Also&lt;br /&gt;
: there is a limit of 256 for a total number of cached images.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Number of cached images or negative value if an error happened. Error&lt;br /&gt;
: codes:&lt;br /&gt;
: * -1 invalid function arguments count&lt;br /&gt;
: * -2 invalid imageList array&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - moved from appCtrl module to graphics&lt;br /&gt;
&lt;br /&gt;
===GFX_setFpsWindow===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_setFpsWindow(u32_t size)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Set the averaging window (in frames) used by the on-screen FPS counter (see &amp;lt;code&amp;gt;Application::ShowFPSCounter()&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
===GFX_getAssetsCount===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_getAssetsCount()&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get the total count of graphic assets.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Number of graphic assets.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.0 - added&lt;br /&gt;
&lt;br /&gt;
===GFX_setFillShader===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_setFillShader(u32_t color)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Fill next primitives with specified color.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.0 - added primitives shading&lt;br /&gt;
&lt;br /&gt;
===GFX_setLinearGradientShader===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_setLinearGradientShader(u32_t x0, u32_t y0, u32_t x1, u32_t y1, u32_t color0, u32_t color1)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Fill next primitives with linear gradient from a given point / color to&lt;br /&gt;
: another one.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.0 - added primitives shading&lt;br /&gt;
&lt;br /&gt;
===GFX_setRadialGradientShader===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_setRadialGradientShader(u32_t x0, u32_t y0, u32_t radius, u32_t color0, u32_t color1)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Fill next primitives with radial gradient from a given point with radius&lt;br /&gt;
: and from a given color to another one.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.0 - added primitives shading&lt;br /&gt;
&lt;br /&gt;
===GFX_removeShader===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_removeShader()&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Do not use shading in next primitives.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.0 - added primitives shading&lt;br /&gt;
&lt;br /&gt;
===GFX_drawSubImage===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t GFX_drawSubImage(spriteID_t id,i32_t x,i32_t y,u32_t rect_x,u32_t rect_y,u32_t rect_w,u32_t rect_h,u32_t opacity,u32_t colorKey,u32_t scale_x, u32_t scale_y,u32_t angle, u32_t mirror)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Draw a sub window of an image from application assets at a specified&lt;br /&gt;
: position and with given transformations.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.2 - added&lt;br /&gt;
&lt;br /&gt;
== Sound ==&lt;br /&gt;
&lt;br /&gt;
===SND_getAssetId===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t SND_getAssetId(const char* soundName)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get a sound ID by the filename.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: The ID of sound with a given filename or -1 in case of error.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - renamed from SND_getId() to SND_getAssetId()&lt;br /&gt;
: v6.0 - truncate asset name in WASM API&lt;br /&gt;
&lt;br /&gt;
===SND_play===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t SND_play(soundID_t soundID, u32_t volume)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Play sound by ID.&lt;br /&gt;
: Play any sound by its ID. Platform does not support audio mixing, so&lt;br /&gt;
: previously playing sound will be stopped if it has not yet finished.&lt;br /&gt;
: Supported audio formats:&lt;br /&gt;
:* WAV&lt;br /&gt;
:* MP3&lt;br /&gt;
:* MIDI&lt;br /&gt;
&lt;br /&gt;
===SND_cacheSounds===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t SND_cacheSounds(soundID_t* soundIDs, u32_t count)&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Force platform to cache application sounds.&lt;br /&gt;
: Platform automatically reads and caches sounds from flash when the&lt;br /&gt;
: application plays a sound. Flash operations are synchronous and may cause&lt;br /&gt;
: delays especially when reading large portions of data. To prevent the&lt;br /&gt;
: application from lags it is possible to cache sound data in advance.&lt;br /&gt;
: However if application requests to play a non-cached sound and there is not&lt;br /&gt;
: enough memory then oldest accessed sounds will be removed from cache. Also&lt;br /&gt;
: there is a limit of 256 for a total number of cached sounds.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Number of cached sounds or negative value if an error happened. Error&lt;br /&gt;
: codes:&lt;br /&gt;
: * -1 invalid function arguments count&lt;br /&gt;
: * -2 invalid soundList array&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v5.0 - moved from appCtrl module to sound&lt;br /&gt;
&lt;br /&gt;
===SND_isPlaying===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t SND_isPlaying()&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Check if audio is playing.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: True if audio is playing, false otherwise.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.0 - added&lt;br /&gt;
&lt;br /&gt;
===SND_stop===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t SND_stop()&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Stop playing sound if any.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.0 - added&lt;br /&gt;
&lt;br /&gt;
===SND_getAssetsCount===&lt;br /&gt;
Syntax:&lt;br /&gt;
 i32_t SND_getAssetsCount()&lt;br /&gt;
&lt;br /&gt;
Description:&lt;br /&gt;
: Get the total count of sound assets.&lt;br /&gt;
&lt;br /&gt;
Return values:&lt;br /&gt;
: Number of sound assets.&lt;br /&gt;
&lt;br /&gt;
History:&lt;br /&gt;
: v6.0 - added&lt;br /&gt;
&lt;br /&gt;
[[Category:SDK 6.3]]&lt;br /&gt;
[[Category:C++ API]]&lt;/div&gt;</summary>
		<author><name>WowBot</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=SDK_6.3/C%2B%2B/Application&amp;diff=16938</id>
		<title>SDK 6.3/C++/Application</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=SDK_6.3/C%2B%2B/Application&amp;diff=16938"/>
		<updated>2026-07-26T09:14:53Z</updated>

		<summary type="html">&lt;p&gt;WowBot: C++ (WASM) and Rust API reference for SDK 6.3 (WowBot)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{notice|'''Official WOWCube SDK documentation.''' SDK 6.3, C++ (WebAssembly) API. Signatures are extracted from the canonical SDK headers shipped with the WOWCube Development Kit; the headers remain authoritative.}}&lt;br /&gt;
&lt;br /&gt;
{{SDK 6.3 nav}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''← [[SDK 6.3]] · C++ / Application framework''&lt;br /&gt;
&lt;br /&gt;
Every C++ cubeapp subclasses &amp;lt;code&amp;gt;Cubios::Application&amp;lt;/code&amp;gt; and registers it in the &amp;lt;code&amp;gt;OnInit()&amp;lt;/code&amp;gt; entry point via &amp;lt;code&amp;gt;AppManager::SetApplication()&amp;lt;/code&amp;gt;. The same source runs on all eight modules; use &amp;lt;code&amp;gt;Module&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;IsMasterModule()&amp;lt;/code&amp;gt; to branch per module.&lt;br /&gt;
&lt;br /&gt;
== Entry point ==&lt;br /&gt;
&lt;br /&gt;
 // Application initialization callback. Called once when the cubeapp starts&lt;br /&gt;
 void OnInit(Cubios::AppManager&amp;amp; appMgr)&lt;br /&gt;
 {&lt;br /&gt;
     appMgr.SetApplication(new MyGame);&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== class Cubios::Application ==&lt;br /&gt;
&lt;br /&gt;
Callbacks to override:&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;virtual void on_Message(uint32_t type, uint8_t *pkt, u32_t size) = 0;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Called when the module receives an inter-module network packet.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;virtual void on_ExternalMessage(uint8_t *pkt, u32_t size) = 0;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Called when the module receives external data over BLE from the companion app.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;virtual void on_PhysicsTick(const std::array&amp;lt;Screen, 3&amp;gt; &amp;amp;screens) = 0;&amp;lt;/code&amp;gt;&lt;br /&gt;
: The &amp;quot;physics&amp;quot; callback; called recurrently with at least 33 ms resolution (or less, depending on load).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;virtual void on_Tick(uint32_t time, uint32_t dt) = 0;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Called every tick of the cubeapp application loop with current time and delta.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;virtual void on_Render(std::array&amp;lt;Screen, 3&amp;gt; &amp;amp;screens) = 0;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Called every time the device is about to render visuals; iterate the three &amp;lt;code&amp;gt;Screen&amp;lt;/code&amp;gt;s and draw.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;virtual void on_Twist(const TOPOLOGY_twistInfo_t &amp;amp;twist) = 0;&amp;lt;/code&amp;gt;&lt;br /&gt;
: Called when the cube is twisted and its topological description has changed.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;virtual void on_Tap(uint32_t count);&amp;lt;/code&amp;gt;&lt;br /&gt;
: Called on a tap on one of the module's screens.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;virtual void on_Pat(uint32_t count);&amp;lt;/code&amp;gt;&lt;br /&gt;
: Called on a pat (tap on the opposite side).&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;virtual void on_Close();&amp;lt;/code&amp;gt;&lt;br /&gt;
: Called before the application is closed.&lt;br /&gt;
&lt;br /&gt;
; &amp;lt;code&amp;gt;virtual void on_Timer(uint8_t timerID);&amp;lt;/code&amp;gt;&lt;br /&gt;
: Called when a programmable timer (see &amp;lt;code&amp;gt;SetTimer()&amp;lt;/code&amp;gt;) fires.&lt;br /&gt;
&lt;br /&gt;
Services provided:&lt;br /&gt;
&lt;br /&gt;
 uint32_t GetTime() const;&lt;br /&gt;
 uint32_t GetTimeSeconds() const;&lt;br /&gt;
 void SendNetworkMessage(uint32_t type, NetworkMessage *msg) const;&lt;br /&gt;
 void SendExternalMessage(uint32_t type, uint8_t *data, size_t size) const;&lt;br /&gt;
 void SaveState(void *data, size_t size) const;&lt;br /&gt;
 i32_t LoadState(u32_t *id, void *data, size_t size) const;&lt;br /&gt;
 void SaveState(SaveMessage* msg) const;&lt;br /&gt;
 i32_t LoadState(u32_t *id, SaveMessage* msg) const;&lt;br /&gt;
 bool SetTimer(uint8_t id, uint32_t delay, bool suspended = false);&lt;br /&gt;
 bool StartTimer(uint8_t id);&lt;br /&gt;
 bool StopTimer(uint8_t id);&lt;br /&gt;
 void KillTimer(uint8_t id);&lt;br /&gt;
 void ShowFPSCounter(bool b);&lt;br /&gt;
 bool IsMasterModule();&lt;br /&gt;
 if (this-&amp;gt;Module == 0) return true;&lt;br /&gt;
 inline int GetImageAssetsCount();&lt;br /&gt;
 inline int GetSoundAssetsCount();&lt;br /&gt;
&lt;br /&gt;
Public fields: &amp;lt;code&amp;gt;Cubios::Scene Scene;&amp;lt;/code&amp;gt; — the module's [[SDK 6.3/C++/GFX Engine|scene graph]]; &amp;lt;code&amp;gt;uint32_t Module;&amp;lt;/code&amp;gt; — index (0–7) of the module running this instance.&lt;br /&gt;
&lt;br /&gt;
== class Cubios::AppManager ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The manager pumps the event loop: network packets → &amp;lt;code&amp;gt;on_Message&amp;lt;/code&amp;gt;, BLE data → &amp;lt;code&amp;gt;on_ExternalMessage&amp;lt;/code&amp;gt;, twists → &amp;lt;code&amp;gt;on_Twist&amp;lt;/code&amp;gt;, taps/pats, timers, ticks and rendering.&lt;br /&gt;
&lt;br /&gt;
== struct Timer_t ==&lt;br /&gt;
&lt;br /&gt;
 struct Timer_t { bool suspended; uint32_t delay; uint32_t time; uint8_t id; };&lt;br /&gt;
&lt;br /&gt;
[[Category:SDK 6.3]]&lt;br /&gt;
[[Category:C++ API]]&lt;/div&gt;</summary>
		<author><name>WowBot</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=Category:Rust_API&amp;diff=16936</id>
		<title>Category:Rust API</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=Category:Rust_API&amp;diff=16936"/>
		<updated>2026-07-26T09:14:52Z</updated>

		<summary type="html">&lt;p&gt;WowBot: C++ (WASM) and Rust API reference for SDK 6.3 (WowBot)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;WOWCube SDK '''Rust''' API reference pages.&lt;br /&gt;
&lt;br /&gt;
See also: [[:Category:SDK 6.3|SDK 6.3]] · [[:Category:C++ API|C++]].&lt;br /&gt;
[[Category:SDK 6.3]]&lt;/div&gt;</summary>
		<author><name>WowBot</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=Template:SDK_6.3_nav&amp;diff=16934</id>
		<title>Template:SDK 6.3 nav</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=Template:SDK_6.3_nav&amp;diff=16934"/>
		<updated>2026-07-26T09:14:51Z</updated>

		<summary type="html">&lt;p&gt;WowBot: C++ (WASM) and Rust API reference for SDK 6.3 (WowBot)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div style=&amp;quot;border:1px solid #c8ccd1; background:#f8f9fa; padding:6px 10px; margin:6px 0; font-size:90%;&amp;quot;&amp;gt;&lt;br /&gt;
'''[[SDK 6.3]] · PAWN API:''' [[SDK 6.3/PAWN/Core|Core]] ·&lt;br /&gt;
[[SDK 6.3/PAWN/Graphics|Graphics]] ·&lt;br /&gt;
[[SDK 6.3/PAWN/Topology|Topology]] ·&lt;br /&gt;
[[SDK 6.3/PAWN/Sound|Sound]] ·&lt;br /&gt;
[[SDK 6.3/PAWN/Motion Sensor|Motion Sensor]] ·&lt;br /&gt;
[[SDK 6.3/PAWN/Leaderboard|Leaderboard]] ·&lt;br /&gt;
[[SDK 6.3/PAWN/Splash Screen|Splash Screen]] ·&lt;br /&gt;
[[SDK 6.3/PAWN/Physics|Physics]] ·&lt;br /&gt;
[[SDK 6.3/PAWN/Network|Network]] ·&lt;br /&gt;
[[SDK 6.3/PAWN/Save|Save]] ·&lt;br /&gt;
[[SDK 6.3/PAWN/Scramble|Scramble]] ·&lt;br /&gt;
[[SDK 6.3/PAWN/Logging|Logging]]&amp;lt;br&amp;gt;'''C++:''' [[SDK 6.3/C++/Native API|Native API]] · [[SDK 6.3/C++/Application|Application]] · [[SDK 6.3/C++/GFX Engine|GFX Engine]] &amp;amp;nbsp;·&amp;amp;nbsp; '''Rust:''' [[SDK 6.3/Rust|Rust API]] &amp;amp;nbsp;·&amp;amp;nbsp; [[SDK 6.3/Changelog|Changelog]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&amp;lt;noinclude&amp;gt;Navigation strip for the SDK 6.3 reference. [[Category:Templates]]&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>WowBot</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=Category:C%2B%2B_API&amp;diff=16935</id>
		<title>Category:C++ API</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=Category:C%2B%2B_API&amp;diff=16935"/>
		<updated>2026-07-26T09:14:51Z</updated>

		<summary type="html">&lt;p&gt;WowBot: C++ (WASM) and Rust API reference for SDK 6.3 (WowBot)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;WOWCube SDK '''C++ (WebAssembly)''' API reference pages.&lt;br /&gt;
&lt;br /&gt;
See also: [[:Category:SDK 6.3|SDK 6.3]] · [[:Category:PAWN API|PAWN]] · [[:Category:Rust API|Rust]].&lt;br /&gt;
[[Category:SDK 6.3]]&lt;/div&gt;</summary>
		<author><name>WowBot</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=Games&amp;diff=16933</id>
		<title>Games</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=Games&amp;diff=16933"/>
		<updated>2026-07-26T09:09:27Z</updated>

		<summary type="html">&lt;p&gt;WowBot: Remove Zenspectrum (WowBot)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{notice|'''Official games &amp;amp; apps catalog''' of the WOWCube® Entertainment System. Titles are published in the [https://wowcube.com/store official store] and installed over Bluetooth via the '''WOWCube Connect''' mobile app. Catalog snapshot: July 2026 — see the store for the latest releases and prices.}}&lt;br /&gt;
&lt;br /&gt;
The WOWCube® Entertainment System has a growing catalog of games, apps and widgets — from puzzles and arcades to licensed titles such as ''Cut the Rope™'', ''SPACE INVADERS™ Cubed'' and the official ''Rubik's® WOWCube® 2x2''. Since 2026 the catalog also includes community-developed games published through the [[Development|WOWCube developer program]].&lt;br /&gt;
&lt;br /&gt;
== Games ==&lt;br /&gt;
&lt;br /&gt;
=== 2048 ===&lt;br /&gt;
[[File:Store 2048.jpg|thumb|right|200px|2048]]&lt;br /&gt;
[https://wowcube.com/store/2048 2048] - The objective of the game is to slide numbered tiles on a grid to combine them to create a tile with the number 2048.&lt;br /&gt;
Place the tiles with the same numbers near each other and merge them by twisting the cube in the suitable directions. A new piece of 2 or 4 appears after each turn. The game ends when there are no empty spaces for the new tiles. Compete with friends and try to top the leaderboard.&lt;br /&gt;
&lt;br /&gt;
=== Block Buster ===&lt;br /&gt;
[[File:Store Block Buster.jpg|thumb|right|200px|Block Buster]]&lt;br /&gt;
[https://wowcube.com/store/breakout Block Buster] - You need to figure out your twists and tilts to break all the blocks with a ball. Collect bonuses and beware of hazards and obstacles while keeping the ball in the game. Managed to destroy all the blocks? Try the next level with the new perks and tricky pieces.&lt;br /&gt;
Keep the plate under the ball by tilting the cube. Rotate the sides of the device to bring more blocks to the field or just move a black hole away. Bounce the ball in the right direction to collect bonuses and avoid obstacles and hazards. Keep the ball in the game by all means!&lt;br /&gt;
&lt;br /&gt;
=== BonBon ===&lt;br /&gt;
[[File:Store BonBon.jpg|thumb|right|200px|BonBon]]&lt;br /&gt;
[https://wowcube.com/store/bon-bon BonBon] - The BonBon game is based on the 2048 puzzle, but instead of numbers you should match all sorts of candies. Combine two sweets of the same shape and color by twisting the cube and create a new type of candy. The objective of the game is to collect all the sweets and fill in the tracking bar.&lt;br /&gt;
Place similar candies together and merge them by twisting the cube in the suitable directions. An upgraded and a basic sweet appear after each combination. To win, collect all the sweets and fill in the tracking bar.&lt;br /&gt;
&lt;br /&gt;
=== Butterflies Puzzle ===&lt;br /&gt;
[[File:Store Butterflies Puzzle.jpg|thumb|right|200px|Butterflies Puzzle]]&lt;br /&gt;
[https://wowcube.com/store/butterflies-puzzle Butterflies Puzzle] - Find the separated wings of the same color and bring them together by rotating the sides of the cube. Once a butterfly is assembled, it comes to life and the level is complete.&lt;br /&gt;
Find two halves of a butterfly of the same color and connect the wings together by twisting the sides of the cube. Once done, the butterfly comes to life also giving you the score and statistics on one of the sides. Twist the cube to go to the next level and deal with all the species.&lt;br /&gt;
'''How to play.''' Twisting faces — combine the wings of one butterfly on the same plane. When all the butterflies come together — the level is passed, they will flap their wings. To go to the next level — turn the face of the WOWcube® Game System.&lt;br /&gt;
'''Purpose of the game.''' Make as few turns of the faces as possible. The results of each level will be shown after the end of the level.&lt;br /&gt;
&lt;br /&gt;
=== Catch-It ===&lt;br /&gt;
[[File:Store Catch-It.jpg|thumb|right|200px|Catch-It]]&lt;br /&gt;
[https://wowcube.com/store/catch-it Catch-It] - Become Maxwell's demon for a day and try to slow down the Brownian motion. Catch all the moving atoms in a laser trap — and don't let them escape.&lt;br /&gt;
&lt;br /&gt;
=== Cut the Rope™ ===&lt;br /&gt;
[[File:Store Cut the Rope.jpg|thumb|right|200px|Cut the Rope™]]&lt;br /&gt;
[https://wowcube.com/store/cuttherope Cut the Rope™] - The world famous game with Om Nom where you can naturally cut the rope by twisting the side of the cube.&lt;br /&gt;
Tilt the cube to control the candy and avoid the dangers. Twist it to cut the rope and build the right path. The satisfied Om Nom along with the collected stars will take you to the next level.&lt;br /&gt;
&lt;br /&gt;
=== Eat the Pizza ===&lt;br /&gt;
[[File:Store Eat the Pizza.jpg|thumb|right|200px|Eat the Pizza]]&lt;br /&gt;
[https://wowcube.com/store/eat-the-pizza Eat the Pizza] - Meet Om Nom — a little green monster that craves sweets 24/7! It also likes fruits and, rumor has it, pizza as well! Here is your chance to vary Om Nom's diet with fruit pizza.&lt;br /&gt;
The components move in the direction of the twists. New twists bring more fruits. Collect all of them on the dough and twist to send it to the oven. Be careful, raw ingredients make Om Nom feel unwell, feed it only after baking. Check your achievements and score after each level.&lt;br /&gt;
&lt;br /&gt;
=== Jewel Hunter ===&lt;br /&gt;
[[File:Store Jewel Hunter.jpg|thumb|right|200px|Jewel Hunter]]&lt;br /&gt;
[https://wowcube.com/store/jewel-hunter Jewel Hunter] - It's time to fill your chest with diamonds. Choose the adventure that suits you best: classic mode for steady progression, or endless mode for those who never get enough.&lt;br /&gt;
&lt;br /&gt;
=== Ladybug ===&lt;br /&gt;
[[File:Store Ladybug.jpg|thumb|right|200px|Ladybug]]&lt;br /&gt;
[https://wowcube.com/store/ladybug Ladybug] - Your goal is to ensure that Ladybug eats all the available berries, so it can fly to another level – for more treats, of course.&lt;br /&gt;
The Ladybug eats everything that it walks over. It moves by itself, but you need to draw its path to grab all the treats. Combine the road pieces into a connected pathway by twisting the cube. Expect the speed change along with difficulty increase on each new level.&lt;br /&gt;
&lt;br /&gt;
=== Magic Cube ===&lt;br /&gt;
[[File:Store Magic Cube.jpg|thumb|right|200px|Magic Cube]]&lt;br /&gt;
[https://wowcube.com/store/magic-cube Magic Cube] - Don't know what to decide? You receive the answer immediately! Yes or No, our Magic Cube will help you to choose. Just ask a question and twist the cube for an answer or a hint. It will appear on the screen. Predict your future by playing with fun!&lt;br /&gt;
To get an answer for the desired question, just twist the WOWCube® System. If you want to ask another question, twist the cube again after the previous answer fades out. Wish you good luck and do not take it all serious – you are the ruler of your life!&lt;br /&gt;
&lt;br /&gt;
=== Pixel World: South America ===&lt;br /&gt;
[[File:Store Pixel World South America.jpg|thumb|right|200px|Pixel World: South America]]&lt;br /&gt;
[https://wowcube.com/store/pixel-world-sa Pixel World: South America] - Part 5 of the Pixel World series of puzzles. How well do you know the landmarks of South America? Twist the cube and see if you can collect them all.&lt;br /&gt;
&lt;br /&gt;
=== Planaton ===&lt;br /&gt;
[[File:Store Planaton.jpg|thumb|right|200px|Planaton]]&lt;br /&gt;
[https://wowcube.com/store/planaton Planaton] - The Solar System in your hands. Twist between all eight planets, rotate the cube, and switch information screens on or off to learn more about each planet. ''Community-developed title.''&lt;br /&gt;
&lt;br /&gt;
=== Rubik's® WOWCube® 2x2 ===&lt;br /&gt;
[[File:Store Rubiks WOWCube 2x2.jpg|thumb|right|200px|Rubik's® WOWCube® 2x2]]&lt;br /&gt;
[https://wowcube.com/store/rubikswowcube Rubik's® WOWCube® 2x2] - The official Rubik's® Cube experience on the WOWCube® system. Created by Ernő Rubik in 1974 and launched globally in 1980, the Rubik's® Cube became a worldwide craze — and this officially licensed app brings the classic 2x2 color-matching puzzle to the digital cube. Supersedes the earlier ''Classic Cube'' titles (see [[#Legacy titles|Legacy titles]]).&lt;br /&gt;
&lt;br /&gt;
=== Slime Fight ===&lt;br /&gt;
[[File:Store Slime Fight.jpg|thumb|right|200px|Slime Fight]]&lt;br /&gt;
[https://wowcube.com/store/slime-fight Slime Fight] - A puzzle game where you control a slime monster that escaped from a secret lab. Move through new zones, eat slime essence, and grow. Eat. Grow. Conquer! ''Community-developed title.''&lt;br /&gt;
&lt;br /&gt;
=== SPACE INVADERS™ Cubed ===&lt;br /&gt;
[[File:Store Space Invaders Cubed.jpg|thumb|right|200px|SPACE INVADERS™ Cubed]]&lt;br /&gt;
[https://wowcube.com/store/spaceinvaderscubed SPACE INVADERS™ Cubed] - Protect your part of the universe fighting the enemy Invaders and avoiding their fire. The entire cube surface is your battlefield. Officially licensed adaptation of the arcade classic.&lt;br /&gt;
&lt;br /&gt;
=== Sunny Side Up ===&lt;br /&gt;
[[File:Store Sunny Side Up.jpg|thumb|right|200px|Sunny Side Up]]&lt;br /&gt;
[https://wowcube.com/store/sunny-side-up Sunny Side Up] - Move weather effects and flower tiles in such a way that all the flowers have enough sunlight in order to bloom. A game of suns, clouds and flowers! ''Community-developed title.''&lt;br /&gt;
&lt;br /&gt;
=== Tempo Twister ===&lt;br /&gt;
[[File:Store Tempo Twister.jpg|thumb|right|200px|Tempo Twister]]&lt;br /&gt;
[https://wowcube.com/store/tempo-twister Tempo Twister] - Twist the WOWCube on the beat of eight songs in different genres. Start in easy difficulty and build up your skills. Twist on the beat, move on the groove! ''Community-developed title.''&lt;br /&gt;
&lt;br /&gt;
=== White Rabbit ===&lt;br /&gt;
[[File:Store White Rabbit.jpg|thumb|right|200px|White Rabbit]]&lt;br /&gt;
[https://wowcube.com/store/white-rabbit White Rabbit] - Late to a Very Important Date! Meet the White Rabbit, who enjoys mazes and eats everything on its way. Guide it through the maze and consume everything you can.&lt;br /&gt;
&lt;br /&gt;
=== WOWCUP 2026 ===&lt;br /&gt;
[[File:Store WOWCUP 2026.jpg|thumb|right|200px|WOWCUP 2026]]&lt;br /&gt;
[https://wowcube.com/store/wowcup-26 WOWCUP 2026] - Travel through the history of soccer's most iconic competition, one ball at a time. Every merge unlocks the next official match ball from a past tournament. Collect every World Cup ball.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Apps and widgets ==&lt;br /&gt;
&lt;br /&gt;
=== Aquarium ===&lt;br /&gt;
[[File:Store Aquarium.jpg|thumb|right|200px|Aquarium]]&lt;br /&gt;
[https://wowcube.com/store/aquarium Aquarium] - Take a moment to relax and enjoy watching the fish peacefully swimming in the digital aquarium. Put it on the bedside table to calm down before going to sleep or use it as a pocket tool to dream away at any time.&lt;br /&gt;
Feed the fish by tapping the upper side of the cube.&lt;br /&gt;
&lt;br /&gt;
=== Chess Timer ===&lt;br /&gt;
[[File:Store Chess Timer.jpg|thumb|right|200px|Chess Timer]]&lt;br /&gt;
[https://wowcube.com/store/chesstimer Chess Timer] - Whenever you feel like flexing your intellectual muscles in a chess battle, the WOWCube® System is your perfect companion. Get the feeling of the old-school timer in a modern cubical form.&lt;br /&gt;
&lt;br /&gt;
=== Get Started ===&lt;br /&gt;
[[File:Store Get Started.jpg|thumb|right|200px|Get Started]]&lt;br /&gt;
[https://wowcube.com/store/get-started Get Started] - The built-in tutorial app: your first steps with the new type of game console, explaining twists, tilts, taps and shakes.&lt;br /&gt;
&lt;br /&gt;
=== StopWatch ===&lt;br /&gt;
[[File:Store StopWatch.jpg|thumb|right|200px|StopWatch]]&lt;br /&gt;
[https://wowcube.com/store/stopwatch StopWatch] - The cubical form of the device is the perfect facilitator to join the old-school feeling of an analog stopwatch with the modern numerical form. Twist to start — every second counts.&lt;br /&gt;
&lt;br /&gt;
=== Timer ===&lt;br /&gt;
[[File:Store Timer.jpg|thumb|right|200px|Timer]]&lt;br /&gt;
[https://wowcube.com/store/timer Timer] - Regain control over your life and avoid chronophages. The Timer app will be your devoted assistant in time tracking. Twist your time.&lt;br /&gt;
&lt;br /&gt;
=== Widgets ===&lt;br /&gt;
[[File:Store Widgets.jpg|thumb|right|200px|Widgets]]&lt;br /&gt;
[https://wowcube.com/store/widgets Widgets] - Weather, stock trends, calendar and time – the basic things you are used to seeing on your mobile phone have found their way to your desk.&lt;br /&gt;
&lt;br /&gt;
=== Work and Relax ===&lt;br /&gt;
[[File:Store Work and Relax.jpg|thumb|right|200px|Work and Relax]]&lt;br /&gt;
[https://wowcube.com/store/work-and-relax Work and Relax] - Struggling to define the fine line between time to work and time to relax? This unique timer is designed to make your work-life balance finally work.&lt;br /&gt;
&lt;br /&gt;
== Coming soon ==&lt;br /&gt;
&lt;br /&gt;
=== Twister ===&lt;br /&gt;
[[File:Store Twister.jpg|thumb|right|200px|Twister]]&lt;br /&gt;
[https://wowcube.com/store/twister Twister] - Twist your stress away! Twist your WOWCube® to spin the gears and level up. The perfect way to relax and clear your mind.&lt;br /&gt;
&lt;br /&gt;
== Experiments ==&lt;br /&gt;
&lt;br /&gt;
=== Adventurer ===&lt;br /&gt;
[https://wowcube.com/store/adventurer Adventurer] - An experimental title available in the store's ''Experiments'' section.&lt;br /&gt;
&lt;br /&gt;
== Legacy titles ==&lt;br /&gt;
''These titles are no longer listed in the store catalog; their descriptions are kept for history.''&lt;br /&gt;
&lt;br /&gt;
=== Steam Pipes ===&lt;br /&gt;
[[File:Wowcube anim pipes.gif|thumb|right|200px|Steam Pipes]]&lt;br /&gt;
[https://wowcube.com/store/steampipes Steam Pipes] - Tease your brain in solving the puzzle levels by closing the pipes to stop the steam. Once the pipe is open, the steam comes out. Your task is to assemble a closed pipeline from pipes of different shapes.&lt;br /&gt;
Find the steam leaks and plug them with the pipes of the matching shapes. Twist the cube to position the pipes. As soon as you close the loop you will see the score and statistics. Twist the cube to proceed to the next level.&lt;br /&gt;
'''How to play.''' Rotate the faces of the cube by combining the pipeline into a closed line. As soon as the line closes and all ends are connected to each other, the level is passed. To go to the next level — turn the face of the WOWcube™.&lt;br /&gt;
'''Purpose of the game.''' Make as few turns of the faces as possible. The results of each level will be shown after the end of the level.&lt;br /&gt;
&lt;br /&gt;
=== PlayBall ===&lt;br /&gt;
[[File:Store PlayBall.jpg|thumb|right|200px|PlayBall]]&lt;br /&gt;
[https://wowcube.com/store/playball PlayBall] - By tilting the cube and twisting it's faces try to get out of the dynamic 3D-maze, while avoiding mines and collecting power-ups.&lt;br /&gt;
Build a path by twisting the cube. Tilt it to control the ball. Your ultimate goal is to get out of the maze. As you do so try to collect the bonuses and avoid the dangerous mines. After each level you will see your score and achievements.&lt;br /&gt;
'''How to play.''' Tilting and turning the faces of the cube, try to get out of the maze. Collect health, avoid min. When you find an exit, the level will be completed. Your achievements will be shown at the end of each level.&lt;br /&gt;
'''Purpose of the game.''' Control the ball, go through the maze.&lt;br /&gt;
&lt;br /&gt;
=== Classic Cube 2x2 ===&lt;br /&gt;
Classic Cube - Do you remember the good old times? When there was no digital, games were made of paper, plastic or created in the minds? Our oldschool 2x2x2 Cube game will evoke many of your happy childhood memories.&lt;br /&gt;
Connect colors with each other similarly to the Rubik's cube and prove you are the fastest. Assist yourself with optional arrow-shaped assembly tips.&lt;br /&gt;
''Superseded by the officially licensed [[#Rubik's® WOWCube® 2x2|Rubik's® WOWCube® 2x2]].''&lt;br /&gt;
&lt;br /&gt;
=== Classic Cube 3x3 ===&lt;br /&gt;
Classic Cube 3x3 - Here is a challenge – how to solve a 3x3 Rubik's cube game on 2x2 mechanics? WOWCube® Entertainment System gives you a brand new way of solving one of the most famous puzzles of all times!&lt;br /&gt;
Twist the cube to adjust the color positions. Tilt it to move the line from one pair of modules to the other. Your ultimate goal is to collect the same colored plates on each surface.&lt;br /&gt;
''Superseded by the officially licensed [[#Rubik's® WOWCube® 2x2|Rubik's® WOWCube® 2x2]].''&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [https://wowcube.com/store Official WOWCube store]&lt;br /&gt;
* [[Development]] — how to build your own game for the WOWCube system&lt;br /&gt;
* [[Playstore]] — how games are installed and updated&lt;br /&gt;
&lt;br /&gt;
[[Category:Games]]&lt;/div&gt;</summary>
		<author><name>WowBot</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=SDK_6.3&amp;diff=16932</id>
		<title>SDK 6.3</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=SDK_6.3&amp;diff=16932"/>
		<updated>2026-07-25T20:19:10Z</updated>

		<summary type="html">&lt;p&gt;WowBot: Link SDK changelog from portal (WowBot)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{notice|'''Official WOWCube SDK 6.3 documentation.''' Canonical API reference, generated from the SDK headers.}}&lt;br /&gt;
&lt;br /&gt;
The current WOWCube SDK. Applications can be written in '''PAWN''', '''C++''', or '''Rust'''.&lt;br /&gt;
&lt;br /&gt;
== PAWN API ==&lt;br /&gt;
One page per module:&lt;br /&gt;
* [[SDK 6.3/PAWN/Core]] — application lifecycle, state, time, RNG, packets&lt;br /&gt;
* [[SDK 6.3/PAWN/Graphics]] — drawing, images, text, shaders (GFX)&lt;br /&gt;
* [[SDK 6.3/PAWN/Topology]] — cube geometry, facelets, twists&lt;br /&gt;
* [[SDK 6.3/PAWN/Sound]] — sound playback&lt;br /&gt;
* [[SDK 6.3/PAWN/Motion Sensor]] — accelerometer / gyroscope, taps&lt;br /&gt;
* [[SDK 6.3/PAWN/Leaderboard]] — scores and achievements&lt;br /&gt;
* [[SDK 6.3/PAWN/Splash Screen]] — splash screens&lt;br /&gt;
* [[SDK 6.3/PAWN/Physics]] — 2D physics helpers&lt;br /&gt;
* [[SDK 6.3/PAWN/Network]] — inter-module messaging&lt;br /&gt;
* [[SDK 6.3/PAWN/Save]] — persistence&lt;br /&gt;
* [[SDK 6.3/PAWN/Scramble]] — cube scramble&lt;br /&gt;
* [[SDK 6.3/PAWN/Logging]] — debug logging&lt;br /&gt;
&lt;br /&gt;
* [[SDK 6.3/Changelog|SDK changelog]] — what changed in 5.1 / 6.0 / 6.2 / 6.3&lt;br /&gt;
&lt;br /&gt;
== C++ API ==&lt;br /&gt;
''Coming soon.''&lt;br /&gt;
&lt;br /&gt;
== Rust API ==&lt;br /&gt;
''Coming soon.''&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
See also: [[:Category:SDK 6.3|all SDK 6.3 pages]].&lt;br /&gt;
[[Category:SDK 6.3]]&lt;/div&gt;</summary>
		<author><name>WowBot</name></author>
		
	</entry>
</feed>