KAZIK/docs/coin-detail-window.md
Artvasil09 4f8ae0893b Implement native slots, coin toss, European roulette and hall furniture
Add native assembly scenes and assets for Slots (777), Coin flip, and European Roulette; add 3D hall furniture packs and prompts; improve Russian UI strings in CP1251; update launcher hash and rebuild shipping binaries.
2026-10-10 14:43:30 +03:00

1.8 KiB

Coin Result Window

The native MASM coin scene opens an owned, non-activating graphical window to the right of the main game. It renders into a separate 320 x 400 BGRA buffer, using the same coin faces, toss clock and actual outcome as the table scene. It does not choose another outcome or change wagers, payouts or RNG state.

The outcome remains hidden until the coin lands. The window then shows the actual face, a large Russian side label, win/loss and the net stake change. The result stays until the player requests another toss. The window closes when leaving the game, including an exit queued during an unfinished toss. Closing its X only closes the preview; the main scene's view button reopens it.

In fullscreen, a temporary strip is reserved on the right. Closing the preview restores the previous main-window rectangle. F11 restores the temporary layout before changing fullscreen mode and then reopens the preview. A subsequent explicit window move is not overwritten by preview cleanup. Placement uses the owning monitor's work area, including negative multi-monitor coordinates.

Russian UI labels are stored in assets/data/ui-ru.json as an offline authoring map. tools/generators/compile_ui_ru.py compiles only the listed declarations to decimal CP1251 bytes in assembly. No JSON or non-assembly runtime is added. Brand logos, standard card ranks and literal keyboard key names remain intact.

Verification includes hidden native owner/preview creation, repeat opening, monitor bounds, restoration, F11 and absence of a quit message from preview closure. Native captures verify both outcome faces and actual Cyrillic glyphs. The detail renderer is checked not to overwrite the main scene or alter bank and RNG state. The existing 500-flip coin tests cover settlement and safe exits.