<?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=Oleg.sayakhov</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=Oleg.sayakhov"/>
	<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/wiki/Special:Contributions/Oleg.sayakhov"/>
	<updated>2026-04-21T11:03:20Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.33.0</generator>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=SDK&amp;diff=179</id>
		<title>SDK</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=SDK&amp;diff=179"/>
		<updated>2021-06-26T06:53:33Z</updated>

		<summary type="html">&lt;p&gt;Oleg.sayakhov: /* Quick start */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;SDK/Framework&lt;br /&gt;
&lt;br /&gt;
*[[pawn]]&lt;br /&gt;
&lt;br /&gt;
==WOWCube Emulator installation==&lt;br /&gt;
&lt;br /&gt;
===Windows===&lt;br /&gt;
Launch the wowcube-sdk.exe installer and follow the steps of the installer.&lt;br /&gt;
&lt;br /&gt;
Installing Dependencies (for Pawn Application Developers) &lt;br /&gt;
To run scripts written in the Pawn language, you need to install Python 3, Pip, IntelHex, and Pillow.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Installing Python'''&lt;br /&gt;
&lt;br /&gt;
Go to the site https://www.python.org/downloads/windows/, click on the &amp;quot;Latest Python 3 Release&amp;quot; link, wait for the download to complete.&lt;br /&gt;
[[File:Highlight_Latest_Python_3_Release_link.png]]&lt;br /&gt;
&lt;br /&gt;
Run the downloaded Python installer, select the &amp;quot;Add Python to PATH&amp;quot; checkbox (without it, the path to Python will need to be specified in full), and then click &amp;quot;Install Now&amp;quot;.&lt;br /&gt;
[[File:Python_installation_configuration.png]]&lt;br /&gt;
&lt;br /&gt;
Python 3 will be installed in &amp;quot;%LOCALAPPDATA%\Programs\Python&amp;quot;. After installation, it will offer to remove the 260-character limit on the PATH length. Click. We complete the installation. Some Python libraries may not work or work incorrectly due to the standard 260 character limit.&lt;br /&gt;
[[File:Python_disable_path_length_limit.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Installing libraries'''&lt;br /&gt;
&lt;br /&gt;
To install the dependencies, you need to start the terminal. Go to Start menu (or press Windows key + X) and select Windows PowerShell.&lt;br /&gt;
&lt;br /&gt;
[[File:Start_menu_with_PowerShell.png]]&lt;br /&gt;
&lt;br /&gt;
Type command &amp;quot;pip install intelhex pillow&amp;quot; and press enter. &lt;br /&gt;
[[File:Intelhex_and_pillow_installation.png]]&lt;br /&gt;
&lt;br /&gt;
This command will download and install the IntelHex and Pillow dependencies. If the installation is successful, a corresponding message will be displayed. &lt;br /&gt;
&lt;br /&gt;
If your company uses a proxy, then you need to add the --proxy option to the command above. The option has the following format:&lt;br /&gt;
&lt;br /&gt;
[user: password @] proxy.server: port&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
''pip install --proxy = http: //proxy.jf.intel.com: 911 intelhex pillow''&lt;br /&gt;
&lt;br /&gt;
===macOS===&lt;br /&gt;
&lt;br /&gt;
Open the .dmg file, drag the WOWCube Emulator application into the Applications folder. &lt;br /&gt;
[[File:Installation_on_macOS.png]]&lt;br /&gt;
&lt;br /&gt;
If the .dmg file was downloaded not in the App Store, then an error will pop up when starting the application.&lt;br /&gt;
[[File:Error_message_macOS_emulator_installation.png]]&lt;br /&gt;
&lt;br /&gt;
To fix this error, you need to open the Terminal application. It can be opened in a number of ways: with Siri, or through Launchpad, or through the Finder, or by pressing Command + Space bar and pressing the Enter.&lt;br /&gt;
&lt;br /&gt;
[[File:Terminal_window_in_macOS.png]]&lt;br /&gt;
&lt;br /&gt;
In the terminal, write the command ''/ Applications / WOWCube \ Emulator.app/Contents/MacOS/bin/wowcube'' and press enter.&lt;br /&gt;
&lt;br /&gt;
If the following error occurs&lt;br /&gt;
&lt;br /&gt;
''/ usr / bin / env: bad interpreter: Operation not permitted, or zsh: operation not permitted: / Applications / WOWCube Emulator.app/Contents/MacOS/bin/wowcube''&lt;br /&gt;
&lt;br /&gt;
Then run the following command ''xattr -rd com.apple.quarantine / Applications / WOWCube \ Emulator.app/''. It will output errors Permission Denied, but they are expected.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Installing Python'''&lt;br /&gt;
&lt;br /&gt;
For macOS version below Catalina open a terminal, install and download Homebrew&lt;br /&gt;
&lt;br /&gt;
''/ bin / bash -c &amp;quot;$ (curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)&amp;quot;''&lt;br /&gt;
&lt;br /&gt;
Homebrew is a package manager that lets you install Open Source applications.&lt;br /&gt;
&lt;br /&gt;
Next, install Python 3 and Pip&lt;br /&gt;
&lt;br /&gt;
''brew install python3''&lt;br /&gt;
&lt;br /&gt;
''brew cask install python3''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For macOS by Catalina. First you need to make sure that python is installed and that it is the correct version.&lt;br /&gt;
&lt;br /&gt;
''python3 -V''&lt;br /&gt;
&lt;br /&gt;
This command should print “Python 3.x.x”. If the command did not display anything, or was not found, try to execute&lt;br /&gt;
&lt;br /&gt;
''python -V''&lt;br /&gt;
&lt;br /&gt;
If it displays “Python 2.x.x”, then Python 3 is not installed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Install pip:&lt;br /&gt;
&lt;br /&gt;
''curl -fsSL https://bootstrap.pypa.io/get-pip.py | python3''&lt;br /&gt;
&lt;br /&gt;
[[File:Check_for_python_and_installing_pip.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Installing labraries'''&lt;br /&gt;
&lt;br /&gt;
Install IntelHex and Pillow libraries.&lt;br /&gt;
&lt;br /&gt;
''pip3 install pillow intelhex''&lt;br /&gt;
&lt;br /&gt;
==Starting WOWCube Emulator==&lt;br /&gt;
&lt;br /&gt;
===Windows===&lt;br /&gt;
&lt;br /&gt;
Launch WOWCube Emulator by clicking on shortcut on desktop.&lt;br /&gt;
&lt;br /&gt;
[[File:WOWCube_Emulator_shortcut_windows.png]]&lt;br /&gt;
&lt;br /&gt;
On first launch, a warning from the firewall will appear.&lt;br /&gt;
&lt;br /&gt;
[[File:Windows_security_alert_first_emulator_launch.png]]&lt;br /&gt;
&lt;br /&gt;
Allow access. WOWCube Emulator uses local ports for communication between the processes it creates, as well as for projector mode.&lt;br /&gt;
&lt;br /&gt;
===macOS===&lt;br /&gt;
&lt;br /&gt;
Open terminal and enter ''WOWCube Emulator'' then and press Enter.&lt;br /&gt;
&lt;br /&gt;
==WOWCube Emulator interface==&lt;br /&gt;
&lt;br /&gt;
===General view===&lt;br /&gt;
&lt;br /&gt;
There are 4 main groups of widgets in the WOWCube Emulator interface.&lt;br /&gt;
&lt;br /&gt;
[[File:WOWCube_Emulator_UI.png]]&lt;br /&gt;
&lt;br /&gt;
===Cube model interactions===&lt;br /&gt;
&lt;br /&gt;
Contains links for interacting with the cube module. Buttons from left to right:&lt;br /&gt;
&lt;br /&gt;
* simulates the shaking of a cube&lt;br /&gt;
* returns the cube module to its original state (restoring rotations and position)&lt;br /&gt;
* open code editor (does not work in version 2.2.0 and below)&lt;br /&gt;
* rotates a random side of the cube&lt;br /&gt;
&lt;br /&gt;
===Emulation progress control===&lt;br /&gt;
&lt;br /&gt;
Serves to interact with the progress of the script. Buttons from left to right:&lt;br /&gt;
&lt;br /&gt;
* start emulation of the selected pawn script. Аfter startup is replaced by the emulation restart button&lt;br /&gt;
* stops pawn script emulation&lt;br /&gt;
* loading a script to a physical cube using the bluetooth protocol (does not work in version 2.2.0 and below)&lt;br /&gt;
&lt;br /&gt;
===General settings===&lt;br /&gt;
&lt;br /&gt;
====Project tab====&lt;br /&gt;
&lt;br /&gt;
In this tab you can choose one of two modes of operation:&lt;br /&gt;
&lt;br /&gt;
* Pawn;&lt;br /&gt;
* Projector.&lt;br /&gt;
 &lt;br /&gt;
''Projector mode''&lt;br /&gt;
&lt;br /&gt;
The projector is used to transfer images from a computer or mobile device to the WOWCube via the Bluetooth protocol.&lt;br /&gt;
&lt;br /&gt;
The projector in the WOWCube Emulator is used for prototyping and faster development of web-projector applications.&lt;br /&gt;
&lt;br /&gt;
''Pawn Mode''&lt;br /&gt;
&lt;br /&gt;
In this mode, you can:&lt;br /&gt;
&lt;br /&gt;
* select the path to the projects folder&lt;br /&gt;
* select a startup project&lt;br /&gt;
* view additional data for a running project&lt;br /&gt;
&lt;br /&gt;
====View tab====&lt;br /&gt;
&lt;br /&gt;
The Sound adjusts the overall volume.&lt;br /&gt;
&lt;br /&gt;
[[File:WOWCube_Emulator_view_tab_sound.png]]&lt;br /&gt;
&lt;br /&gt;
In the Emulation, the transparency of the overlay is adjusted. The overlay displays on each module its current number, screen and adjacent modules.&lt;br /&gt;
&lt;br /&gt;
The Limit FPS slider allows you to limit the frame rate in the application running on the emulator.&lt;br /&gt;
&lt;br /&gt;
If necessary, it is possible to configure the simulation of lost packets during transmission.&lt;br /&gt;
&lt;br /&gt;
[[File:WOWCube_Emulator_view_tab_emulation.png]]&lt;br /&gt;
 &lt;br /&gt;
In the CubeNet, the transparency and the size of the cube unfolding are configured.&lt;br /&gt;
&lt;br /&gt;
[[File:WOWCube_Emulator_view_tab_CubeNet.png]]&lt;br /&gt;
&lt;br /&gt;
In the Scene, the removal of the camera, the field of view, the backdrop are configured.&lt;br /&gt;
&lt;br /&gt;
ABI calls - displays abi function calls to the console.&lt;br /&gt;
&lt;br /&gt;
Console follows mouse click - if you click on one of the modules of the virtual cube model, it opens the console tab corresponding to the module number.&lt;br /&gt;
&lt;br /&gt;
[[File:WOWCube_Emulator_view_tab_scene.png]]&lt;br /&gt;
&lt;br /&gt;
====Settings Tab====&lt;br /&gt;
&lt;br /&gt;
This is where the PAWN compiler path and python path are selected. &lt;br /&gt;
&lt;br /&gt;
[[File:WOWCube_Emulator_settings_tab.png]]&lt;br /&gt;
&lt;br /&gt;
===Console and logs===&lt;br /&gt;
&lt;br /&gt;
Contains tabs for displaying script assembly logs and tabs with the console of each module separately.&lt;br /&gt;
&lt;br /&gt;
===Controls===&lt;br /&gt;
&lt;br /&gt;
LMB on a cube - rotation of the sides.&lt;br /&gt;
&lt;br /&gt;
RMB (or Ctrl + LMB) on a cube - tilt the cube.&lt;br /&gt;
&lt;br /&gt;
RMB (or Ctrl + LMB) past the cube - rotate the camera.&lt;br /&gt;
&lt;br /&gt;
Mouse wheel - zoom out / zoom in the camera.&lt;br /&gt;
&lt;br /&gt;
==Quick start==&lt;br /&gt;
&lt;br /&gt;
Go to https://github.com/wowcube/WOWCube_apps_examples&lt;br /&gt;
&lt;br /&gt;
Clone or download to the necessary folder.&lt;br /&gt;
&lt;br /&gt;
Launch WOWCube Emulator.&lt;br /&gt;
&lt;br /&gt;
In ''Project'' tab switch Pawn mode.&lt;br /&gt;
&lt;br /&gt;
Specify ''Project path'' to the folder with examples.&lt;br /&gt;
&lt;br /&gt;
[[File:WOWCube_emulator_path_to_examples.png]]&lt;br /&gt;
&lt;br /&gt;
Under ''Run configuration'' choose example project.&lt;br /&gt;
&lt;br /&gt;
[[File:WOWCube_emulator_choose_example.png]]&lt;br /&gt;
&lt;br /&gt;
You can press 'i' button to watch what resources loaded for each script&lt;br /&gt;
&lt;br /&gt;
[[File:WOWCube_emulator_resources_for_scripts.png]]&lt;br /&gt;
&lt;br /&gt;
Press ''Start button'' to launch emulation&lt;br /&gt;
&lt;br /&gt;
[[File:WOWCube_emulator_launched_first_example.png]]&lt;br /&gt;
&lt;br /&gt;
In order to make changes in examples you need:&lt;br /&gt;
&lt;br /&gt;
* Go to folder where your WOWCube examples located&lt;br /&gt;
* Open file 'example1.pwn' with any text editor&lt;br /&gt;
* make what changes you need&lt;/div&gt;</summary>
		<author><name>Oleg.sayakhov</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=SDK&amp;diff=178</id>
		<title>SDK</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=SDK&amp;diff=178"/>
		<updated>2021-06-25T16:48:05Z</updated>

		<summary type="html">&lt;p&gt;Oleg.sayakhov: /* Cube model interactions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;SDK/Framework&lt;br /&gt;
&lt;br /&gt;
*[[pawn]]&lt;br /&gt;
&lt;br /&gt;
==WOWCube Emulator installation==&lt;br /&gt;
&lt;br /&gt;
===Windows===&lt;br /&gt;
Launch the wowcube-sdk.exe installer and follow the steps of the installer.&lt;br /&gt;
&lt;br /&gt;
Installing Dependencies (for Pawn Application Developers) &lt;br /&gt;
To run scripts written in the Pawn language, you need to install Python 3, Pip, IntelHex, and Pillow.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Installing Python'''&lt;br /&gt;
&lt;br /&gt;
Go to the site https://www.python.org/downloads/windows/, click on the &amp;quot;Latest Python 3 Release&amp;quot; link, wait for the download to complete.&lt;br /&gt;
[[File:Highlight_Latest_Python_3_Release_link.png]]&lt;br /&gt;
&lt;br /&gt;
Run the downloaded Python installer, select the &amp;quot;Add Python to PATH&amp;quot; checkbox (without it, the path to Python will need to be specified in full), and then click &amp;quot;Install Now&amp;quot;.&lt;br /&gt;
[[File:Python_installation_configuration.png]]&lt;br /&gt;
&lt;br /&gt;
Python 3 will be installed in &amp;quot;%LOCALAPPDATA%\Programs\Python&amp;quot;. After installation, it will offer to remove the 260-character limit on the PATH length. Click. We complete the installation. Some Python libraries may not work or work incorrectly due to the standard 260 character limit.&lt;br /&gt;
[[File:Python_disable_path_length_limit.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Installing libraries'''&lt;br /&gt;
&lt;br /&gt;
To install the dependencies, you need to start the terminal. Go to Start menu (or press Windows key + X) and select Windows PowerShell.&lt;br /&gt;
&lt;br /&gt;
[[File:Start_menu_with_PowerShell.png]]&lt;br /&gt;
&lt;br /&gt;
Type command &amp;quot;pip install intelhex pillow&amp;quot; and press enter. &lt;br /&gt;
[[File:Intelhex_and_pillow_installation.png]]&lt;br /&gt;
&lt;br /&gt;
This command will download and install the IntelHex and Pillow dependencies. If the installation is successful, a corresponding message will be displayed. &lt;br /&gt;
&lt;br /&gt;
If your company uses a proxy, then you need to add the --proxy option to the command above. The option has the following format:&lt;br /&gt;
&lt;br /&gt;
[user: password @] proxy.server: port&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
''pip install --proxy = http: //proxy.jf.intel.com: 911 intelhex pillow''&lt;br /&gt;
&lt;br /&gt;
===macOS===&lt;br /&gt;
&lt;br /&gt;
Open the .dmg file, drag the WOWCube Emulator application into the Applications folder. &lt;br /&gt;
[[File:Installation_on_macOS.png]]&lt;br /&gt;
&lt;br /&gt;
If the .dmg file was downloaded not in the App Store, then an error will pop up when starting the application.&lt;br /&gt;
[[File:Error_message_macOS_emulator_installation.png]]&lt;br /&gt;
&lt;br /&gt;
To fix this error, you need to open the Terminal application. It can be opened in a number of ways: with Siri, or through Launchpad, or through the Finder, or by pressing Command + Space bar and pressing the Enter.&lt;br /&gt;
&lt;br /&gt;
[[File:Terminal_window_in_macOS.png]]&lt;br /&gt;
&lt;br /&gt;
In the terminal, write the command ''/ Applications / WOWCube \ Emulator.app/Contents/MacOS/bin/wowcube'' and press enter.&lt;br /&gt;
&lt;br /&gt;
If the following error occurs&lt;br /&gt;
&lt;br /&gt;
''/ usr / bin / env: bad interpreter: Operation not permitted, or zsh: operation not permitted: / Applications / WOWCube Emulator.app/Contents/MacOS/bin/wowcube''&lt;br /&gt;
&lt;br /&gt;
Then run the following command ''xattr -rd com.apple.quarantine / Applications / WOWCube \ Emulator.app/''. It will output errors Permission Denied, but they are expected.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Installing Python'''&lt;br /&gt;
&lt;br /&gt;
For macOS version below Catalina open a terminal, install and download Homebrew&lt;br /&gt;
&lt;br /&gt;
''/ bin / bash -c &amp;quot;$ (curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)&amp;quot;''&lt;br /&gt;
&lt;br /&gt;
Homebrew is a package manager that lets you install Open Source applications.&lt;br /&gt;
&lt;br /&gt;
Next, install Python 3 and Pip&lt;br /&gt;
&lt;br /&gt;
''brew install python3''&lt;br /&gt;
&lt;br /&gt;
''brew cask install python3''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For macOS by Catalina. First you need to make sure that python is installed and that it is the correct version.&lt;br /&gt;
&lt;br /&gt;
''python3 -V''&lt;br /&gt;
&lt;br /&gt;
This command should print “Python 3.x.x”. If the command did not display anything, or was not found, try to execute&lt;br /&gt;
&lt;br /&gt;
''python -V''&lt;br /&gt;
&lt;br /&gt;
If it displays “Python 2.x.x”, then Python 3 is not installed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Install pip:&lt;br /&gt;
&lt;br /&gt;
''curl -fsSL https://bootstrap.pypa.io/get-pip.py | python3''&lt;br /&gt;
&lt;br /&gt;
[[File:Check_for_python_and_installing_pip.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Installing labraries'''&lt;br /&gt;
&lt;br /&gt;
Install IntelHex and Pillow libraries.&lt;br /&gt;
&lt;br /&gt;
''pip3 install pillow intelhex''&lt;br /&gt;
&lt;br /&gt;
==Starting WOWCube Emulator==&lt;br /&gt;
&lt;br /&gt;
===Windows===&lt;br /&gt;
&lt;br /&gt;
Launch WOWCube Emulator by clicking on shortcut on desktop.&lt;br /&gt;
&lt;br /&gt;
[[File:WOWCube_Emulator_shortcut_windows.png]]&lt;br /&gt;
&lt;br /&gt;
On first launch, a warning from the firewall will appear.&lt;br /&gt;
&lt;br /&gt;
[[File:Windows_security_alert_first_emulator_launch.png]]&lt;br /&gt;
&lt;br /&gt;
Allow access. WOWCube Emulator uses local ports for communication between the processes it creates, as well as for projector mode.&lt;br /&gt;
&lt;br /&gt;
===macOS===&lt;br /&gt;
&lt;br /&gt;
Open terminal and enter ''WOWCube Emulator'' then and press Enter.&lt;br /&gt;
&lt;br /&gt;
==WOWCube Emulator interface==&lt;br /&gt;
&lt;br /&gt;
===General view===&lt;br /&gt;
&lt;br /&gt;
There are 4 main groups of widgets in the WOWCube Emulator interface.&lt;br /&gt;
&lt;br /&gt;
[[File:WOWCube_Emulator_UI.png]]&lt;br /&gt;
&lt;br /&gt;
===Cube model interactions===&lt;br /&gt;
&lt;br /&gt;
Contains links for interacting with the cube module. Buttons from left to right:&lt;br /&gt;
&lt;br /&gt;
* simulates the shaking of a cube&lt;br /&gt;
* returns the cube module to its original state (restoring rotations and position)&lt;br /&gt;
* open code editor (does not work in version 2.2.0 and below)&lt;br /&gt;
* rotates a random side of the cube&lt;br /&gt;
&lt;br /&gt;
===Emulation progress control===&lt;br /&gt;
&lt;br /&gt;
Serves to interact with the progress of the script. Buttons from left to right:&lt;br /&gt;
&lt;br /&gt;
* start emulation of the selected pawn script. Аfter startup is replaced by the emulation restart button&lt;br /&gt;
* stops pawn script emulation&lt;br /&gt;
* loading a script to a physical cube using the bluetooth protocol (does not work in version 2.2.0 and below)&lt;br /&gt;
&lt;br /&gt;
===General settings===&lt;br /&gt;
&lt;br /&gt;
====Project tab====&lt;br /&gt;
&lt;br /&gt;
In this tab you can choose one of two modes of operation:&lt;br /&gt;
&lt;br /&gt;
* Pawn;&lt;br /&gt;
* Projector.&lt;br /&gt;
 &lt;br /&gt;
''Projector mode''&lt;br /&gt;
&lt;br /&gt;
The projector is used to transfer images from a computer or mobile device to the WOWCube via the Bluetooth protocol.&lt;br /&gt;
&lt;br /&gt;
The projector in the WOWCube Emulator is used for prototyping and faster development of web-projector applications.&lt;br /&gt;
&lt;br /&gt;
''Pawn Mode''&lt;br /&gt;
&lt;br /&gt;
In this mode, you can:&lt;br /&gt;
&lt;br /&gt;
* select the path to the projects folder&lt;br /&gt;
* select a startup project&lt;br /&gt;
* view additional data for a running project&lt;br /&gt;
&lt;br /&gt;
====View tab====&lt;br /&gt;
&lt;br /&gt;
The Sound adjusts the overall volume.&lt;br /&gt;
&lt;br /&gt;
[[File:WOWCube_Emulator_view_tab_sound.png]]&lt;br /&gt;
&lt;br /&gt;
In the Emulation, the transparency of the overlay is adjusted. The overlay displays on each module its current number, screen and adjacent modules.&lt;br /&gt;
&lt;br /&gt;
The Limit FPS slider allows you to limit the frame rate in the application running on the emulator.&lt;br /&gt;
&lt;br /&gt;
If necessary, it is possible to configure the simulation of lost packets during transmission.&lt;br /&gt;
&lt;br /&gt;
[[File:WOWCube_Emulator_view_tab_emulation.png]]&lt;br /&gt;
 &lt;br /&gt;
In the CubeNet, the transparency and the size of the cube unfolding are configured.&lt;br /&gt;
&lt;br /&gt;
[[File:WOWCube_Emulator_view_tab_CubeNet.png]]&lt;br /&gt;
&lt;br /&gt;
In the Scene, the removal of the camera, the field of view, the backdrop are configured.&lt;br /&gt;
&lt;br /&gt;
ABI calls - displays abi function calls to the console.&lt;br /&gt;
&lt;br /&gt;
Console follows mouse click - if you click on one of the modules of the virtual cube model, it opens the console tab corresponding to the module number.&lt;br /&gt;
&lt;br /&gt;
[[File:WOWCube_Emulator_view_tab_scene.png]]&lt;br /&gt;
&lt;br /&gt;
====Settings Tab====&lt;br /&gt;
&lt;br /&gt;
This is where the PAWN compiler path and python path are selected. &lt;br /&gt;
&lt;br /&gt;
[[File:WOWCube_Emulator_settings_tab.png]]&lt;br /&gt;
&lt;br /&gt;
===Console and logs===&lt;br /&gt;
&lt;br /&gt;
Contains tabs for displaying script assembly logs and tabs with the console of each module separately.&lt;br /&gt;
&lt;br /&gt;
===Controls===&lt;br /&gt;
&lt;br /&gt;
LMB on a cube - rotation of the sides.&lt;br /&gt;
&lt;br /&gt;
RMB (or Ctrl + LMB) on a cube - tilt the cube.&lt;br /&gt;
&lt;br /&gt;
RMB (or Ctrl + LMB) past the cube - rotate the camera.&lt;br /&gt;
&lt;br /&gt;
Mouse wheel - zoom out / zoom in the camera.&lt;br /&gt;
&lt;br /&gt;
==Quick start==&lt;br /&gt;
&lt;br /&gt;
Go to https://github.com/wowcube/WOWCube_apps_examples&lt;br /&gt;
&lt;br /&gt;
Clone or download to the necessary folder.&lt;br /&gt;
&lt;br /&gt;
Launch WOWCube Emulator.&lt;br /&gt;
&lt;br /&gt;
In ''Project'' tab switch Pawn mode.&lt;br /&gt;
&lt;br /&gt;
Specify ''Project path'' to the folder with examples.&lt;br /&gt;
&lt;br /&gt;
[[File:WOWCube_emulator_path_to_examples.png]]&lt;br /&gt;
&lt;br /&gt;
Under ''Run configuration'' choose example project.&lt;br /&gt;
&lt;br /&gt;
[[File:WOWCube_emulator_choose_example.png]]&lt;br /&gt;
&lt;br /&gt;
You can press 'i' button to watch what resources loaded for each script&lt;br /&gt;
&lt;br /&gt;
[[File:WOWCube_emulator_resources_for_scripts.png]]&lt;br /&gt;
&lt;br /&gt;
Press ''Start button'' to launch emulation&lt;br /&gt;
&lt;br /&gt;
[[File:WOWCube_emulator_launched_first_example.png]]&lt;br /&gt;
&lt;br /&gt;
In order to make changes in examples you need:&lt;br /&gt;
&lt;br /&gt;
* Go to folder where your WOWCube examples located&lt;br /&gt;
* Open file 'example1.pwn' with any text redactor&lt;br /&gt;
* make what changes you need&lt;/div&gt;</summary>
		<author><name>Oleg.sayakhov</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=API&amp;diff=64</id>
		<title>API</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=API&amp;diff=64"/>
		<updated>2020-09-03T17:10:46Z</updated>

		<summary type="html">&lt;p&gt;Oleg.sayakhov: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{notice|This is a beta version, API changes can be made without warning.}}&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
The main functions of the API are listed here, the features of the work of the environment are described&lt;br /&gt;
&lt;br /&gt;
==WOWCube Paradigms==&lt;br /&gt;
&lt;br /&gt;
WOWCube executes 8 copies of the byte-code of the script at the same time, providing functions for the interaction of scripts with each other, drawing functions, functions for accessing resources, and other specific functions. Each copy of the script has access to 3 displays. Resource scripts are packed into a package.&lt;br /&gt;
&lt;br /&gt;
==Pawn API==&lt;br /&gt;
===Graphic functions===&lt;br /&gt;
&lt;br /&gt;
====Graphics 2D acceleration (G2D)====&lt;br /&gt;
WOWCube provides the 2D acceleration interfaces to enhance gaming experience . Basically G2D engine allows to blend up to the 4 image layers at once with a HW acceleration. However there is no limit of layers, they are blended in a cascade. For example, if Pawn script requested 7 layers to be blended then 2 HW blending will occur:&lt;br /&gt;
[[File:Cascade.png|center|G2D cascading scheme]]&lt;br /&gt;
Result of the blending can be saved as an internal G2D resource or flushed immediately on the specified display. Internal G2D resources can be used as an usual bitmap primitive ([[API#abi_CMD_BITMAP|abi_CMD_BITMAP]]) or reused as an input for the next G2D action.&lt;br /&gt;
Basic coordinate principle:&lt;br /&gt;
[[File:G2d_coordinates.png|center|G2D coordinates sceme]]&lt;br /&gt;
Coordinates are limited from -2048 to 2047. Maximum layers size is 240x240.&lt;br /&gt;
&lt;br /&gt;
=====abi_CMD_G2D_BEGIN_BITMAP=====&lt;br /&gt;
Syntax:&lt;br /&gt;
 abi_CMD_G2D_BEGIN_BITMAP(const resID, const width, const height, const bool:replace)&lt;br /&gt;
Description:&lt;br /&gt;
: abi_CMD_G2D_BEGIN_BITMAP and [[API#abi_CMD_G2D_END|abi_CMD_G2D_END]] delimits the group of layers to be blended into internal G2D resource. This API is not intended for frequent usage. It is better suited for complex background generation on game initialization or dynamic resource modification triggered by rare game events.&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''resID''&lt;br /&gt;
:: ID of the resource that will be generated from blending layers presented between abi_CMD_G2D_BEGIN_BITMAP and the subsequent [[API#abi_CMD_G2D_END|abi_CMD_G2D_END]]. G2D engine can keep up to 3 different resources with IDs: 0, 1 and 2.&lt;br /&gt;
: ''width'' &lt;br /&gt;
:: Width of the resulting resource. G2D engine can keep resource of 240px width maximum.&lt;br /&gt;
: ''height'' &lt;br /&gt;
:: Height of the resulting resource. G2D engine can keep resource of 240px height maximum.&lt;br /&gt;
: ''replace'' &lt;br /&gt;
:: If true, then an existing image will be replaced completely, otherwise it will be overwritten by reusing itself as a background layer.&lt;br /&gt;
&lt;br /&gt;
=====abi_CMD_G2D_BEGIN_DISPLAY=====&lt;br /&gt;
Syntax:&lt;br /&gt;
 abi_CMD_G2D_BEGIN_DISPLAY(const display, const bool:replace)&lt;br /&gt;
Description:&lt;br /&gt;
: abi_CMD_G2D_BEGIN_DISPLAY and [[API#abi_CMD_G2D_END|abi_CMD_G2D_END]] delimits the group of layers to be blended directly into display framebuffer. Obviously this API is designed for rendering scene on game tick. This API is not limited by layers count as well as [[API#abi_CMD_G2D_BEGIN_BITMAP|abi_CMD_G2D_BEGIN_BITMAP]]. However it is strictly recommended to blend no more than 4 layers. Otherwise cascade blending will be initiated resulting in some FPS drop.&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''display''&lt;br /&gt;
:: ID of the display which framebuffer will be used for blending. Each module have 3 displays with ID starting from 0.&lt;br /&gt;
: ''replace'' &lt;br /&gt;
:: If true then an existing image will be replaced completely, otherwise it will be overwritten by reusing itself as a background layer.&lt;br /&gt;
&lt;br /&gt;
=====abi_CMD_G2D_ADD_SPRITE=====&lt;br /&gt;
Syntax:&lt;br /&gt;
 abi_CMD_G2D_ADD_SPRITE(const resID, const bool:g2d, const x, const y, const alpha, const color, const rotation, const mirror)&lt;br /&gt;
Description:&lt;br /&gt;
: Specifies game resource which will be used as a layer for blending.&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''resID''&lt;br /&gt;
:: ID of the resource to be uses as a layer.&lt;br /&gt;
: ''g2d''&lt;br /&gt;
:: Indicates if an internal G2D resource is specified or not.&lt;br /&gt;
: ''x'', ''y''&lt;br /&gt;
:: Coordinates of the bitmap center to place on the layer.&lt;br /&gt;
: ''alpha''&lt;br /&gt;
:: Layer transparency in range between 0x00 and 0xFF, where 0x00 is a fully transparent layer.&lt;br /&gt;
: ''color''&lt;br /&gt;
:: Layer's source key - a color in ARGB8888 format to be avoided.&lt;br /&gt;
: ''rotation''&lt;br /&gt;
:: Clockwise rotation angle in degrees. It is possible to specify free angle, but only right angles have HW acceleration.&lt;br /&gt;
: ''mirror''&lt;br /&gt;
:: Mirroring variant. Possible values are self-explained: MIRROR_BLANK, MIRROR_X, MIRROR_Y, MIRROR_XY.&lt;br /&gt;
&lt;br /&gt;
=====abi_CMD_G2D_ADD_RECTANGLE=====&lt;br /&gt;
Syntax:&lt;br /&gt;
 abi_CMD_G2D_ADD_RECTANGLE(const x, const y, const width, const height, const color)&lt;br /&gt;
Description:&lt;br /&gt;
: Specifies rectangle area which will be used as layer of blending. This API is not intended for frequent usage, i.e. particles generation. It is better suited for changing image background or applying color mask.&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''x'', ''y''&lt;br /&gt;
:: Coordinates of top left rectangle corner.&lt;br /&gt;
: ''width''&lt;br /&gt;
:: Rectangle width.&lt;br /&gt;
: ''height''&lt;br /&gt;
:: Rectangle height.&lt;br /&gt;
: ''color''&lt;br /&gt;
:: Rectangle color in ARGB8888 format.&lt;br /&gt;
&lt;br /&gt;
=====abi_CMD_G2D_END=====&lt;br /&gt;
Syntax:&lt;br /&gt;
 abi_CMD_G2D_END()&lt;br /&gt;
Description:&lt;br /&gt;
: abi_CMD_G2D_END() and [[API#abi_CMD_G2D_BEGIN_BITMAP|abi_CMD_G2D_BEGIN_BITMAP]]/[[API#abi_CMD_G2D_BEGIN_DISPLAY|abi_CMD_G2D_BEGIN_DISPLAY]] delimits the group of layers to be blended. After abi_CMD_G2D_END call final blending will be initiated and results will be stored according to the begin comand.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Font drawing functions====&lt;br /&gt;
=====abi_CMD_TEXT=====&lt;br /&gt;
API:&lt;br /&gt;
  abi_CMD_TEXT(const text[], const fontResID, const x, const y, const scale, const angle, const r, const g, const b)&lt;br /&gt;
Description:&lt;br /&gt;
: Intended to render a system font or a custom font from resources with specified coordinates, scale and rotation at an arbitrary angle.&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''text''&lt;br /&gt;
:: Array of chars.&lt;br /&gt;
: ''fontResID''&lt;br /&gt;
:: Custom font resource identifier.&lt;br /&gt;
: ''x'', ''y''&lt;br /&gt;
:: Coordinates of top left rectangle corner.&lt;br /&gt;
: ''scale'', ''angle''&lt;br /&gt;
:: Percentage scale and clockwise rotation angle in degrees. Max size of font is 200x200 px. (scale = 100%)&lt;br /&gt;
: ''r'', ''g'', ''b''&lt;br /&gt;
:: Font color in RGB format.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 new text[4] = ['A', 'p', 'p', '\0'];&lt;br /&gt;
 abi_CMD_TEXT(text, RES_ID_FONT, 90, 160, 16, current_angles[face], 255, 0, 0);&lt;/div&gt;</summary>
		<author><name>Oleg.sayakhov</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=API&amp;diff=63</id>
		<title>API</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=API&amp;diff=63"/>
		<updated>2020-09-03T17:10:29Z</updated>

		<summary type="html">&lt;p&gt;Oleg.sayakhov: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{notice|This is a beta version, API changes can be made without warning.}}&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
The main functions of the API are listed here, the features of the work of the environment are described&lt;br /&gt;
&lt;br /&gt;
==WOWCube Paradigms==&lt;br /&gt;
&lt;br /&gt;
WOWCube executes 8 copies of the byte-code of the script at the same time, providing functions for the interaction of scripts with each other, drawing functions, functions for accessing resources, and other specific functions. Each copy of the script has access to 3 displays. Resource scripts are packed into a package.&lt;br /&gt;
&lt;br /&gt;
==Pawn API==&lt;br /&gt;
===Graphic functions===&lt;br /&gt;
&lt;br /&gt;
====Graphics 2D acceleration (G2D)====&lt;br /&gt;
WOWCube provides the 2D acceleration interfaces to enhance gaming experience . Basically G2D engine allows to blend up to the 4 image layers at once with a HW acceleration. However there is no limit of layers, they are blended in a cascade. For example, if Pawn script requested 7 layers to be blended then 2 HW blending will occur:&lt;br /&gt;
[[File:Cascade.png|center|G2D cascading scheme]]&lt;br /&gt;
Result of the blending can be saved as an internal G2D resource or flushed immediately on the specified display. Internal G2D resources can be used as an usual bitmap primitive ([[API#abi_CMD_BITMAP|abi_CMD_BITMAP]]) or reused as an input for the next G2D action.&lt;br /&gt;
Basic coordinate principle:&lt;br /&gt;
[[File:G2d_coordinates.png|center|G2D coordinates sceme]]&lt;br /&gt;
Coordinates are limited from -2048 to 2047. Maximum layers size is 240x240.&lt;br /&gt;
&lt;br /&gt;
=====abi_CMD_G2D_BEGIN_BITMAP=====&lt;br /&gt;
Syntax:&lt;br /&gt;
 abi_CMD_G2D_BEGIN_BITMAP(const resID, const width, const height, const bool:replace)&lt;br /&gt;
Description:&lt;br /&gt;
: abi_CMD_G2D_BEGIN_BITMAP and [[API#abi_CMD_G2D_END|abi_CMD_G2D_END]] delimits the group of layers to be blended into internal G2D resource. This API is not intended for frequent usage. It is better suited for complex background generation on game initialization or dynamic resource modification triggered by rare game events.&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''resID''&lt;br /&gt;
:: ID of the resource that will be generated from blending layers presented between abi_CMD_G2D_BEGIN_BITMAP and the subsequent [[API#abi_CMD_G2D_END|abi_CMD_G2D_END]]. G2D engine can keep up to 3 different resources with IDs: 0, 1 and 2.&lt;br /&gt;
: ''width'' &lt;br /&gt;
:: Width of the resulting resource. G2D engine can keep resource of 240px width maximum.&lt;br /&gt;
: ''height'' &lt;br /&gt;
:: Height of the resulting resource. G2D engine can keep resource of 240px height maximum.&lt;br /&gt;
: ''replace'' &lt;br /&gt;
:: If true, then an existing image will be replaced completely, otherwise it will be overwritten by reusing itself as a background layer.&lt;br /&gt;
&lt;br /&gt;
=====abi_CMD_G2D_BEGIN_DISPLAY=====&lt;br /&gt;
Syntax:&lt;br /&gt;
 abi_CMD_G2D_BEGIN_DISPLAY(const display, const bool:replace)&lt;br /&gt;
Description:&lt;br /&gt;
: abi_CMD_G2D_BEGIN_DISPLAY and [[API#abi_CMD_G2D_END|abi_CMD_G2D_END]] delimits the group of layers to be blended directly into display framebuffer. Obviously this API is designed for rendering scene on game tick. This API is not limited by layers count as well as [[API#abi_CMD_G2D_BEGIN_BITMAP|abi_CMD_G2D_BEGIN_BITMAP]]. However it is strictly recommended to blend no more than 4 layers. Otherwise cascade blending will be initiated resulting in some FPS drop.&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''display''&lt;br /&gt;
:: ID of the display which framebuffer will be used for blending. Each module have 3 displays with ID starting from 0.&lt;br /&gt;
: ''replace'' &lt;br /&gt;
:: If true then an existing image will be replaced completely, otherwise it will be overwritten by reusing itself as a background layer.&lt;br /&gt;
&lt;br /&gt;
=====abi_CMD_G2D_ADD_SPRITE=====&lt;br /&gt;
Syntax:&lt;br /&gt;
 abi_CMD_G2D_ADD_SPRITE(const resID, const bool:g2d, const x, const y, const alpha, const color, const rotation, const mirror)&lt;br /&gt;
Description:&lt;br /&gt;
: Specifies game resource which will be used as a layer for blending.&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''resID''&lt;br /&gt;
:: ID of the resource to be uses as a layer.&lt;br /&gt;
: ''g2d''&lt;br /&gt;
:: Indicates if an internal G2D resource is specified or not.&lt;br /&gt;
: ''x'', ''y''&lt;br /&gt;
:: Coordinates of the bitmap center to place on the layer.&lt;br /&gt;
: ''alpha''&lt;br /&gt;
:: Layer transparency in range between 0x00 and 0xFF, where 0x00 is a fully transparent layer.&lt;br /&gt;
: ''color''&lt;br /&gt;
:: Layer's source key - a color in ARGB8888 format to be avoided.&lt;br /&gt;
: ''rotation''&lt;br /&gt;
:: Clockwise rotation angle in degrees. It is possible to specify free angle, but only right angles have HW acceleration.&lt;br /&gt;
: ''mirror''&lt;br /&gt;
:: Mirroring variant. Possible values are self-explained: MIRROR_BLANK, MIRROR_X, MIRROR_Y, MIRROR_XY.&lt;br /&gt;
&lt;br /&gt;
=====abi_CMD_G2D_ADD_RECTANGLE=====&lt;br /&gt;
Syntax:&lt;br /&gt;
 abi_CMD_G2D_ADD_RECTANGLE(const x, const y, const width, const height, const color)&lt;br /&gt;
Description:&lt;br /&gt;
: Specifies rectangle area which will be used as layer of blending. This API is not intended for frequent usage, i.e. particles generation. It is better suited for changing image background or applying color mask.&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''x'', ''y''&lt;br /&gt;
:: Coordinates of top left rectangle corner.&lt;br /&gt;
: ''width''&lt;br /&gt;
:: Rectangle width.&lt;br /&gt;
: ''height''&lt;br /&gt;
:: Rectangle height.&lt;br /&gt;
: ''color''&lt;br /&gt;
:: Rectangle color in ARGB8888 format.&lt;br /&gt;
&lt;br /&gt;
=====abi_CMD_G2D_END=====&lt;br /&gt;
Syntax:&lt;br /&gt;
 abi_CMD_G2D_END()&lt;br /&gt;
Description:&lt;br /&gt;
: abi_CMD_G2D_END() and [[API#abi_CMD_G2D_BEGIN_BITMAP|abi_CMD_G2D_BEGIN_BITMAP]]/[[API#abi_CMD_G2D_BEGIN_DISPLAY|abi_CMD_G2D_BEGIN_DISPLAY]] delimits the group of layers to be blended. After abi_CMD_G2D_END call final blending will be initiated and results will be stored according to the begin comand.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Font drawing functions====&lt;br /&gt;
=====abi_CMD_TEXT=====&lt;br /&gt;
API:&lt;br /&gt;
  abi_CMD_TEXT(const text[], const fontResID, const x, const y, const scale, const angle, const r, const g, const b)&lt;br /&gt;
Description:&lt;br /&gt;
: Intended to render a system font or a custom font from resources with specified coordinates, scale and rotation at an arbitrary angle.&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''text''&lt;br /&gt;
:: Array of chars.&lt;br /&gt;
: ''fontResID''&lt;br /&gt;
:: Custom font resource identifier.&lt;br /&gt;
: ''x'', ''y''&lt;br /&gt;
:: Coordinates of top left rectangle corner.&lt;br /&gt;
: ''scale'', ''angle''&lt;br /&gt;
:: Percentage scale and clockwise rotation angle in degrees. Max size of font is 200x200 px. (scale = 100%)&lt;br /&gt;
: 'r', 'g', 'b'&lt;br /&gt;
:: Font color in RGB format.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 new text[4] = ['A', 'p', 'p', '\0'];&lt;br /&gt;
 abi_CMD_TEXT(text, RES_ID_FONT, 90, 160, 16, current_angles[face], 255, 0, 0);&lt;/div&gt;</summary>
		<author><name>Oleg.sayakhov</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=API&amp;diff=62</id>
		<title>API</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=API&amp;diff=62"/>
		<updated>2020-09-03T17:09:40Z</updated>

		<summary type="html">&lt;p&gt;Oleg.sayakhov: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{notice|This is a beta version, API changes can be made without warning.}}&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
The main functions of the API are listed here, the features of the work of the environment are described&lt;br /&gt;
&lt;br /&gt;
==WOWCube Paradigms==&lt;br /&gt;
&lt;br /&gt;
WOWCube executes 8 copies of the byte-code of the script at the same time, providing functions for the interaction of scripts with each other, drawing functions, functions for accessing resources, and other specific functions. Each copy of the script has access to 3 displays. Resource scripts are packed into a package.&lt;br /&gt;
&lt;br /&gt;
==Pawn API==&lt;br /&gt;
===Graphic functions===&lt;br /&gt;
&lt;br /&gt;
====Graphics 2D acceleration (G2D)====&lt;br /&gt;
WOWCube provides the 2D acceleration interfaces to enhance gaming experience . Basically G2D engine allows to blend up to the 4 image layers at once with a HW acceleration. However there is no limit of layers, they are blended in a cascade. For example, if Pawn script requested 7 layers to be blended then 2 HW blending will occur:&lt;br /&gt;
[[File:Cascade.png|center|G2D cascading scheme]]&lt;br /&gt;
Result of the blending can be saved as an internal G2D resource or flushed immediately on the specified display. Internal G2D resources can be used as an usual bitmap primitive ([[API#abi_CMD_BITMAP|abi_CMD_BITMAP]]) or reused as an input for the next G2D action.&lt;br /&gt;
Basic coordinate principle:&lt;br /&gt;
[[File:G2d_coordinates.png|center|G2D coordinates sceme]]&lt;br /&gt;
Coordinates are limited from -2048 to 2047. Maximum layers size is 240x240.&lt;br /&gt;
&lt;br /&gt;
=====abi_CMD_G2D_BEGIN_BITMAP=====&lt;br /&gt;
Syntax:&lt;br /&gt;
 abi_CMD_G2D_BEGIN_BITMAP(const resID, const width, const height, const bool:replace)&lt;br /&gt;
Description:&lt;br /&gt;
: abi_CMD_G2D_BEGIN_BITMAP and [[API#abi_CMD_G2D_END|abi_CMD_G2D_END]] delimits the group of layers to be blended into internal G2D resource. This API is not intended for frequent usage. It is better suited for complex background generation on game initialization or dynamic resource modification triggered by rare game events.&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''resID''&lt;br /&gt;
:: ID of the resource that will be generated from blending layers presented between abi_CMD_G2D_BEGIN_BITMAP and the subsequent [[API#abi_CMD_G2D_END|abi_CMD_G2D_END]]. G2D engine can keep up to 3 different resources with IDs: 0, 1 and 2.&lt;br /&gt;
: ''width'' &lt;br /&gt;
:: Width of the resulting resource. G2D engine can keep resource of 240px width maximum.&lt;br /&gt;
: ''height'' &lt;br /&gt;
:: Height of the resulting resource. G2D engine can keep resource of 240px height maximum.&lt;br /&gt;
: ''replace'' &lt;br /&gt;
:: If true, then an existing image will be replaced completely, otherwise it will be overwritten by reusing itself as a background layer.&lt;br /&gt;
&lt;br /&gt;
=====abi_CMD_G2D_BEGIN_DISPLAY=====&lt;br /&gt;
Syntax:&lt;br /&gt;
 abi_CMD_G2D_BEGIN_DISPLAY(const display, const bool:replace)&lt;br /&gt;
Description:&lt;br /&gt;
: abi_CMD_G2D_BEGIN_DISPLAY and [[API#abi_CMD_G2D_END|abi_CMD_G2D_END]] delimits the group of layers to be blended directly into display framebuffer. Obviously this API is designed for rendering scene on game tick. This API is not limited by layers count as well as [[API#abi_CMD_G2D_BEGIN_BITMAP|abi_CMD_G2D_BEGIN_BITMAP]]. However it is strictly recommended to blend no more than 4 layers. Otherwise cascade blending will be initiated resulting in some FPS drop.&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''display''&lt;br /&gt;
:: ID of the display which framebuffer will be used for blending. Each module have 3 displays with ID starting from 0.&lt;br /&gt;
: ''replace'' &lt;br /&gt;
:: If true then an existing image will be replaced completely, otherwise it will be overwritten by reusing itself as a background layer.&lt;br /&gt;
&lt;br /&gt;
=====abi_CMD_G2D_ADD_SPRITE=====&lt;br /&gt;
Syntax:&lt;br /&gt;
 abi_CMD_G2D_ADD_SPRITE(const resID, const bool:g2d, const x, const y, const alpha, const color, const rotation, const mirror)&lt;br /&gt;
Description:&lt;br /&gt;
: Specifies game resource which will be used as a layer for blending.&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''resID''&lt;br /&gt;
:: ID of the resource to be uses as a layer.&lt;br /&gt;
: ''g2d''&lt;br /&gt;
:: Indicates if an internal G2D resource is specified or not.&lt;br /&gt;
: ''x'', ''y''&lt;br /&gt;
:: Coordinates of the bitmap center to place on the layer.&lt;br /&gt;
: ''alpha''&lt;br /&gt;
:: Layer transparency in range between 0x00 and 0xFF, where 0x00 is a fully transparent layer.&lt;br /&gt;
: ''color''&lt;br /&gt;
:: Layer's source key - a color in ARGB8888 format to be avoided.&lt;br /&gt;
: ''rotation''&lt;br /&gt;
:: Clockwise rotation angle in degrees. It is possible to specify free angle, but only right angles have HW acceleration.&lt;br /&gt;
: ''mirror''&lt;br /&gt;
:: Mirroring variant. Possible values are self-explained: MIRROR_BLANK, MIRROR_X, MIRROR_Y, MIRROR_XY.&lt;br /&gt;
&lt;br /&gt;
=====abi_CMD_G2D_ADD_RECTANGLE=====&lt;br /&gt;
Syntax:&lt;br /&gt;
 abi_CMD_G2D_ADD_RECTANGLE(const x, const y, const width, const height, const color)&lt;br /&gt;
Description:&lt;br /&gt;
: Specifies rectangle area which will be used as layer of blending. This API is not intended for frequent usage, i.e. particles generation. It is better suited for changing image background or applying color mask.&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''x'', ''y''&lt;br /&gt;
:: Coordinates of top left rectangle corner.&lt;br /&gt;
: ''width''&lt;br /&gt;
:: Rectangle width.&lt;br /&gt;
: ''height''&lt;br /&gt;
:: Rectangle height.&lt;br /&gt;
: ''color''&lt;br /&gt;
:: Rectangle color in ARGB8888 format.&lt;br /&gt;
&lt;br /&gt;
=====abi_CMD_G2D_END=====&lt;br /&gt;
Syntax:&lt;br /&gt;
 abi_CMD_G2D_END()&lt;br /&gt;
Description:&lt;br /&gt;
: abi_CMD_G2D_END() and [[API#abi_CMD_G2D_BEGIN_BITMAP|abi_CMD_G2D_BEGIN_BITMAP]]/[[API#abi_CMD_G2D_BEGIN_DISPLAY|abi_CMD_G2D_BEGIN_DISPLAY]] delimits the group of layers to be blended. After abi_CMD_G2D_END call final blending will be initiated and results will be stored according to the begin comand.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Font drawing functions====&lt;br /&gt;
=====abi_CMD_TEXT=====&lt;br /&gt;
API:&lt;br /&gt;
  abi_CMD_TEXT(const text[], const fontResID, const x, const y, const scale, const angle, const r, const g, const b)&lt;br /&gt;
Description:&lt;br /&gt;
: Intended for render a system font or a custom font from resources with specified coordinates, scale and rotation at an arbitrary angle.&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''text''&lt;br /&gt;
:: Array of chars.&lt;br /&gt;
: ''fontResID''&lt;br /&gt;
:: Custom font resource identifier.&lt;br /&gt;
: ''x'', ''y''&lt;br /&gt;
:: Coordinates of top left rectangle corner.&lt;br /&gt;
: ''scale'', ''angle''&lt;br /&gt;
:: Percentage scale and clockwise rotation angle in degrees. Max size of font is 200x200 px. (scale = 100%)&lt;br /&gt;
: 'r', 'g', 'b'&lt;br /&gt;
:: Font color in RGB format.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 new text[4] = ['A', 'p', 'p', '\0'];&lt;br /&gt;
 abi_CMD_TEXT(text, RES_ID_FONT, 90, 160, 16, current_angles[face], 255, 0, 0);&lt;/div&gt;</summary>
		<author><name>Oleg.sayakhov</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=API&amp;diff=61</id>
		<title>API</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=API&amp;diff=61"/>
		<updated>2020-09-03T17:08:52Z</updated>

		<summary type="html">&lt;p&gt;Oleg.sayakhov: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{notice|This is a beta version, API changes can be made without warning.}}&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
The main functions of the API are listed here, the features of the work of the environment are described&lt;br /&gt;
&lt;br /&gt;
==WOWCube Paradigms==&lt;br /&gt;
&lt;br /&gt;
WOWCube executes 8 copies of the byte-code of the script at the same time, providing functions for the interaction of scripts with each other, drawing functions, functions for accessing resources, and other specific functions. Each copy of the script has access to 3 displays. Resource scripts are packed into a package.&lt;br /&gt;
&lt;br /&gt;
==Pawn API==&lt;br /&gt;
===Graphic functions===&lt;br /&gt;
&lt;br /&gt;
====Graphics 2D acceleration (G2D)====&lt;br /&gt;
WOWCube provides the 2D acceleration interfaces to enhance gaming experience . Basically G2D engine allows to blend up to the 4 image layers at once with a HW acceleration. However there is no limit of layers, they are blended in a cascade. For example, if Pawn script requested 7 layers to be blended then 2 HW blending will occur:&lt;br /&gt;
[[File:Cascade.png|center|G2D cascading scheme]]&lt;br /&gt;
Result of the blending can be saved as an internal G2D resource or flushed immediately on the specified display. Internal G2D resources can be used as an usual bitmap primitive ([[API#abi_CMD_BITMAP|abi_CMD_BITMAP]]) or reused as an input for the next G2D action.&lt;br /&gt;
Basic coordinate principle:&lt;br /&gt;
[[File:G2d_coordinates.png|center|G2D coordinates sceme]]&lt;br /&gt;
Coordinates are limited from -2048 to 2047. Maximum layers size is 240x240.&lt;br /&gt;
&lt;br /&gt;
=====abi_CMD_G2D_BEGIN_BITMAP=====&lt;br /&gt;
Syntax:&lt;br /&gt;
 abi_CMD_G2D_BEGIN_BITMAP(const resID, const width, const height, const bool:replace)&lt;br /&gt;
Description:&lt;br /&gt;
: abi_CMD_G2D_BEGIN_BITMAP and [[API#abi_CMD_G2D_END|abi_CMD_G2D_END]] delimits the group of layers to be blended into internal G2D resource. This API is not intended for frequent usage. It is better suited for complex background generation on game initialization or dynamic resource modification triggered by rare game events.&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''resID''&lt;br /&gt;
:: ID of the resource that will be generated from blending layers presented between abi_CMD_G2D_BEGIN_BITMAP and the subsequent [[API#abi_CMD_G2D_END|abi_CMD_G2D_END]]. G2D engine can keep up to 3 different resources with IDs: 0, 1 and 2.&lt;br /&gt;
: ''width'' &lt;br /&gt;
:: Width of the resulting resource. G2D engine can keep resource of 240px width maximum.&lt;br /&gt;
: ''height'' &lt;br /&gt;
:: Height of the resulting resource. G2D engine can keep resource of 240px height maximum.&lt;br /&gt;
: ''replace'' &lt;br /&gt;
:: If true, then an existing image will be replaced completely, otherwise it will be overwritten by reusing itself as a background layer.&lt;br /&gt;
&lt;br /&gt;
=====abi_CMD_G2D_BEGIN_DISPLAY=====&lt;br /&gt;
Syntax:&lt;br /&gt;
 abi_CMD_G2D_BEGIN_DISPLAY(const display, const bool:replace)&lt;br /&gt;
Description:&lt;br /&gt;
: abi_CMD_G2D_BEGIN_DISPLAY and [[API#abi_CMD_G2D_END|abi_CMD_G2D_END]] delimits the group of layers to be blended directly into display framebuffer. Obviously this API is designed for rendering scene on game tick. This API is not limited by layers count as well as [[API#abi_CMD_G2D_BEGIN_BITMAP|abi_CMD_G2D_BEGIN_BITMAP]]. However it is strictly recommended to blend no more than 4 layers. Otherwise cascade blending will be initiated resulting in some FPS drop.&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''display''&lt;br /&gt;
:: ID of the display which framebuffer will be used for blending. Each module have 3 displays with ID starting from 0.&lt;br /&gt;
: ''replace'' &lt;br /&gt;
:: If true then an existing image will be replaced completely, otherwise it will be overwritten by reusing itself as a background layer.&lt;br /&gt;
&lt;br /&gt;
=====abi_CMD_G2D_ADD_SPRITE=====&lt;br /&gt;
Syntax:&lt;br /&gt;
 abi_CMD_G2D_ADD_SPRITE(const resID, const bool:g2d, const x, const y, const alpha, const color, const rotation, const mirror)&lt;br /&gt;
Description:&lt;br /&gt;
: Specifies game resource which will be used as a layer for blending.&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''resID''&lt;br /&gt;
:: ID of the resource to be uses as a layer.&lt;br /&gt;
: ''g2d''&lt;br /&gt;
:: Indicates if an internal G2D resource is specified or not.&lt;br /&gt;
: ''x'', ''y''&lt;br /&gt;
:: Coordinates of the bitmap center to place on the layer.&lt;br /&gt;
: ''alpha''&lt;br /&gt;
:: Layer transparency in range between 0x00 and 0xFF, where 0x00 is a fully transparent layer.&lt;br /&gt;
: ''color''&lt;br /&gt;
:: Layer's source key - a color in ARGB8888 format to be avoided.&lt;br /&gt;
: ''rotation''&lt;br /&gt;
:: Clockwise rotation angle in degrees. It is possible to specify free angle, but only right angles have HW acceleration.&lt;br /&gt;
: ''mirror''&lt;br /&gt;
:: Mirroring variant. Possible values are self-explained: MIRROR_BLANK, MIRROR_X, MIRROR_Y, MIRROR_XY.&lt;br /&gt;
&lt;br /&gt;
=====abi_CMD_G2D_ADD_RECTANGLE=====&lt;br /&gt;
Syntax:&lt;br /&gt;
 abi_CMD_G2D_ADD_RECTANGLE(const x, const y, const width, const height, const color)&lt;br /&gt;
Description:&lt;br /&gt;
: Specifies rectangle area which will be used as layer of blending. This API is not intended for frequent usage, i.e. particles generation. It is better suited for changing image background or applying color mask.&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''x'', ''y''&lt;br /&gt;
:: Coordinates of top left rectangle corner.&lt;br /&gt;
: ''width''&lt;br /&gt;
:: Rectangle width.&lt;br /&gt;
: ''height''&lt;br /&gt;
:: Rectangle height.&lt;br /&gt;
: ''color''&lt;br /&gt;
:: Rectangle color in ARGB8888 format.&lt;br /&gt;
&lt;br /&gt;
=====abi_CMD_G2D_END=====&lt;br /&gt;
Syntax:&lt;br /&gt;
 abi_CMD_G2D_END()&lt;br /&gt;
Description:&lt;br /&gt;
: abi_CMD_G2D_END() and [[API#abi_CMD_G2D_BEGIN_BITMAP|abi_CMD_G2D_BEGIN_BITMAP]]/[[API#abi_CMD_G2D_BEGIN_DISPLAY|abi_CMD_G2D_BEGIN_DISPLAY]] delimits the group of layers to be blended. After abi_CMD_G2D_END call final blending will be initiated and results will be stored according to the begin comand.&lt;br /&gt;
&lt;br /&gt;
====Graphic primitives====&lt;br /&gt;
&lt;br /&gt;
=====Font drawing functions=====&lt;br /&gt;
======abi_CMD_TEXT======&lt;br /&gt;
API:&lt;br /&gt;
  abi_CMD_TEXT(const text[], const fontResID, const x, const y, const scale, const angle, const r, const g, const b)&lt;br /&gt;
Description:&lt;br /&gt;
: Intended for render a system font or a custom font from resources with specified coordinates, scale and rotation at an arbitrary angle.&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''text''&lt;br /&gt;
:: Array of chars.&lt;br /&gt;
: ''fontResID''&lt;br /&gt;
:: Custom font resource identifier.&lt;br /&gt;
: ''x'', ''y''&lt;br /&gt;
:: Coordinates of top left rectangle corner.&lt;br /&gt;
: ''scale'', ''angle''&lt;br /&gt;
:: Percentage scale and clockwise rotation angle in degrees. Max size of font is 200x200 px. (scale = 100%)&lt;br /&gt;
: 'r', 'g', 'b'&lt;br /&gt;
:: Font color in RGB format.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 new text[4] = ['A', 'p', 'p', '\0'];&lt;br /&gt;
 abi_CMD_TEXT(text, RES_ID_FONT, 90, 160, 16, current_angles[face], 255, 0, 0);&lt;/div&gt;</summary>
		<author><name>Oleg.sayakhov</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=API&amp;diff=60</id>
		<title>API</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=API&amp;diff=60"/>
		<updated>2020-09-03T17:07:55Z</updated>

		<summary type="html">&lt;p&gt;Oleg.sayakhov: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{notice|This is a beta version, API changes can be made without warning.}}&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
The main functions of the API are listed here, the features of the work of the environment are described&lt;br /&gt;
&lt;br /&gt;
==WOWCube Paradigms==&lt;br /&gt;
&lt;br /&gt;
WOWCube executes 8 copies of the byte-code of the script at the same time, providing functions for the interaction of scripts with each other, drawing functions, functions for accessing resources, and other specific functions. Each copy of the script has access to 3 displays. Resource scripts are packed into a package.&lt;br /&gt;
&lt;br /&gt;
==Pawn API==&lt;br /&gt;
===Graphic functions===&lt;br /&gt;
&lt;br /&gt;
====Graphics 2D acceleration (G2D)====&lt;br /&gt;
WOWCube provides the 2D acceleration interfaces to enhance gaming experience . Basically G2D engine allows to blend up to the 4 image layers at once with a HW acceleration. However there is no limit of layers, they are blended in a cascade. For example, if Pawn script requested 7 layers to be blended then 2 HW blending will occur:&lt;br /&gt;
[[File:Cascade.png|center|G2D cascading scheme]]&lt;br /&gt;
Result of the blending can be saved as an internal G2D resource or flushed immediately on the specified display. Internal G2D resources can be used as an usual bitmap primitive ([[API#abi_CMD_BITMAP|abi_CMD_BITMAP]]) or reused as an input for the next G2D action.&lt;br /&gt;
Basic coordinate principle:&lt;br /&gt;
[[File:G2d_coordinates.png|center|G2D coordinates sceme]]&lt;br /&gt;
Coordinates are limited from -2048 to 2047. Maximum layers size is 240x240.&lt;br /&gt;
&lt;br /&gt;
=====abi_CMD_G2D_BEGIN_BITMAP=====&lt;br /&gt;
Syntax:&lt;br /&gt;
 abi_CMD_G2D_BEGIN_BITMAP(const resID, const width, const height, const bool:replace)&lt;br /&gt;
Description:&lt;br /&gt;
: abi_CMD_G2D_BEGIN_BITMAP and [[API#abi_CMD_G2D_END|abi_CMD_G2D_END]] delimits the group of layers to be blended into internal G2D resource. This API is not intended for frequent usage. It is better suited for complex background generation on game initialization or dynamic resource modification triggered by rare game events.&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''resID''&lt;br /&gt;
:: ID of the resource that will be generated from blending layers presented between abi_CMD_G2D_BEGIN_BITMAP and the subsequent [[API#abi_CMD_G2D_END|abi_CMD_G2D_END]]. G2D engine can keep up to 3 different resources with IDs: 0, 1 and 2.&lt;br /&gt;
: ''width'' &lt;br /&gt;
:: Width of the resulting resource. G2D engine can keep resource of 240px width maximum.&lt;br /&gt;
: ''height'' &lt;br /&gt;
:: Height of the resulting resource. G2D engine can keep resource of 240px height maximum.&lt;br /&gt;
: ''replace'' &lt;br /&gt;
:: If true, then an existing image will be replaced completely, otherwise it will be overwritten by reusing itself as a background layer.&lt;br /&gt;
&lt;br /&gt;
=====abi_CMD_G2D_BEGIN_DISPLAY=====&lt;br /&gt;
Syntax:&lt;br /&gt;
 abi_CMD_G2D_BEGIN_DISPLAY(const display, const bool:replace)&lt;br /&gt;
Description:&lt;br /&gt;
: abi_CMD_G2D_BEGIN_DISPLAY and [[API#abi_CMD_G2D_END|abi_CMD_G2D_END]] delimits the group of layers to be blended directly into display framebuffer. Obviously this API is designed for rendering scene on game tick. This API is not limited by layers count as well as [[API#abi_CMD_G2D_BEGIN_BITMAP|abi_CMD_G2D_BEGIN_BITMAP]]. However it is strictly recommended to blend no more than 4 layers. Otherwise cascade blending will be initiated resulting in some FPS drop.&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''display''&lt;br /&gt;
:: ID of the display which framebuffer will be used for blending. Each module have 3 displays with ID starting from 0.&lt;br /&gt;
: ''replace'' &lt;br /&gt;
:: If true then an existing image will be replaced completely, otherwise it will be overwritten by reusing itself as a background layer.&lt;br /&gt;
&lt;br /&gt;
=====abi_CMD_G2D_ADD_SPRITE=====&lt;br /&gt;
Syntax:&lt;br /&gt;
 abi_CMD_G2D_ADD_SPRITE(const resID, const bool:g2d, const x, const y, const alpha, const color, const rotation, const mirror)&lt;br /&gt;
Description:&lt;br /&gt;
: Specifies game resource which will be used as a layer for blending.&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''resID''&lt;br /&gt;
:: ID of the resource to be uses as a layer.&lt;br /&gt;
: ''g2d''&lt;br /&gt;
:: Indicates if an internal G2D resource is specified or not.&lt;br /&gt;
: ''x'', ''y''&lt;br /&gt;
:: Coordinates of the bitmap center to place on the layer.&lt;br /&gt;
: ''alpha''&lt;br /&gt;
:: Layer transparency in range between 0x00 and 0xFF, where 0x00 is a fully transparent layer.&lt;br /&gt;
: ''color''&lt;br /&gt;
:: Layer's source key - a color in ARGB8888 format to be avoided.&lt;br /&gt;
: ''rotation''&lt;br /&gt;
:: Clockwise rotation angle in degrees. It is possible to specify free angle, but only right angles have HW acceleration.&lt;br /&gt;
: ''mirror''&lt;br /&gt;
:: Mirroring variant. Possible values are self-explained: MIRROR_BLANK, MIRROR_X, MIRROR_Y, MIRROR_XY.&lt;br /&gt;
&lt;br /&gt;
=====abi_CMD_G2D_ADD_RECTANGLE=====&lt;br /&gt;
Syntax:&lt;br /&gt;
 abi_CMD_G2D_ADD_RECTANGLE(const x, const y, const width, const height, const color)&lt;br /&gt;
Description:&lt;br /&gt;
: Specifies rectangle area which will be used as layer of blending. This API is not intended for frequent usage, i.e. particles generation. It is better suited for changing image background or applying color mask.&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''x'', ''y''&lt;br /&gt;
:: Coordinates of top left rectangle corner.&lt;br /&gt;
: ''width''&lt;br /&gt;
:: Rectangle width.&lt;br /&gt;
: ''height''&lt;br /&gt;
:: Rectangle height.&lt;br /&gt;
: ''color''&lt;br /&gt;
:: Rectangle color in ARGB8888 format.&lt;br /&gt;
&lt;br /&gt;
=====abi_CMD_G2D_END=====&lt;br /&gt;
Syntax:&lt;br /&gt;
 abi_CMD_G2D_END()&lt;br /&gt;
Description:&lt;br /&gt;
: abi_CMD_G2D_END() and [[API#abi_CMD_G2D_BEGIN_BITMAP|abi_CMD_G2D_BEGIN_BITMAP]]/[[API#abi_CMD_G2D_BEGIN_DISPLAY|abi_CMD_G2D_BEGIN_DISPLAY]] delimits the group of layers to be blended. After abi_CMD_G2D_END call final blending will be initiated and results will be stored according to the begin comand.&lt;br /&gt;
&lt;br /&gt;
====Graphic primitives====&lt;br /&gt;
&lt;br /&gt;
====Font drawing functions====&lt;br /&gt;
=====abi_CMD_TEXT=====&lt;br /&gt;
API:&lt;br /&gt;
  abi_CMD_TEXT(const text[], const fontResID, const x, const y, const scale, const angle, const r, const g, const b)&lt;br /&gt;
Description:&lt;br /&gt;
: Intended for render a system font or a custom font from resources with specified coordinates, scale and rotation at an arbitrary angle.&lt;br /&gt;
Arguments:&lt;br /&gt;
: ''text''&lt;br /&gt;
:: Array of chars.&lt;br /&gt;
: ''fontResID''&lt;br /&gt;
:: Custom font resource identifier.&lt;br /&gt;
: ''x'', ''y''&lt;br /&gt;
:: Coordinates of top left rectangle corner.&lt;br /&gt;
: ''scale'', ''angle''&lt;br /&gt;
:: Percentage scale and clockwise rotation angle in degrees. Max size of font is 200x200 px. (scale = 100%)&lt;br /&gt;
: 'r', 'g', 'b'&lt;br /&gt;
:: Font color in RGB format.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 new text[4] = ['A', 'p', 'p', '\0'];&lt;br /&gt;
 abi_CMD_TEXT(text, RES_ID_FONT, 90, 160, 16, current_angles[face], 255, 0, 0);&lt;/div&gt;</summary>
		<author><name>Oleg.sayakhov</name></author>
		
	</entry>
	<entry>
		<id>https://wiki.wowcube.com/index.php?title=API&amp;diff=53</id>
		<title>API</title>
		<link rel="alternate" type="text/html" href="https://wiki.wowcube.com/index.php?title=API&amp;diff=53"/>
		<updated>2020-09-02T16:56:55Z</updated>

		<summary type="html">&lt;p&gt;Oleg.sayakhov: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{notice|This is a beta version, API changes can be made without warning.}}&lt;br /&gt;
&lt;br /&gt;
=Introduction=&lt;br /&gt;
&lt;br /&gt;
The main functions of the API are listed here, the features of the work of the environment are described&lt;br /&gt;
&lt;br /&gt;
==WOWCube Paradigms==&lt;br /&gt;
&lt;br /&gt;
WOWCUBE executes 8 copies of the byte-code of the script at the same time, providing functions for the interaction of scripts with each other, drawing functions, functions for accessing resources, and other specific functions. Each copy of the script has access to 3 displays. Resource scripts are packed into a package.&lt;br /&gt;
&lt;br /&gt;
==Firmware API==&lt;br /&gt;
===Common Libraries===&lt;br /&gt;
&lt;br /&gt;
====math_g2d.h====&lt;br /&gt;
 Located at cubios/graphics/math_g2d.h&lt;br /&gt;
 Contains functions to work with fixed point, vectors, matrix, quaternion and colors.&lt;br /&gt;
&lt;br /&gt;
  &lt;br /&gt;
====tests_g2d.h====&lt;br /&gt;
 Located at cubios/graphics/tests_g2d.h&lt;br /&gt;
 Contains functions for debug and testing purposes.&lt;br /&gt;
&lt;br /&gt;
Examples&lt;br /&gt;
&lt;br /&gt;
 Measure execution time of foo() method&lt;br /&gt;
 G2D_beginMeasure();&lt;br /&gt;
 foo();&lt;br /&gt;
 uint32_t time = G2D_endMeasure();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====tile.h====&lt;br /&gt;
Tile engine allows effectively render tiles - repeated fragments of 2-color images(or monochrome images with transparent).&lt;br /&gt;
    Located at cubios/tile.h&lt;br /&gt;
    Contains methods for load tile map from resources and render tiles.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Effects===&lt;br /&gt;
====Cube 3D====  &lt;br /&gt;
Located at cubios/graphics/effects_cube3d.h &lt;br /&gt;
&lt;br /&gt;
General purpose to use this effect comes from requirements to menu item groups.&lt;br /&gt;
&lt;br /&gt;
Effect allows to draw 3d cube with properties&lt;br /&gt;
 - border width ( in fixed32_t units from 0 to 1 )&lt;br /&gt;
 - border color ( in rgb565 format )&lt;br /&gt;
 - clip rect    ( rectangle in the buffer to draw cube)&lt;br /&gt;
 - buffer       ( start address of custom buffer to draw )&lt;br /&gt;
 - pitch        ( pitch of the buffer - used to calculate address in memory for next 'line' in buffer  address(x,y) = startAddress + x + y * pitch&lt;br /&gt;
 - textures     ( array of pointer to custom textures to draw )&lt;br /&gt;
 - texturesIds[24]  ( index of texture must be show on cube face, each face contains 4 cells ( 0 top-left, 1 top-right, 2 bottom-left, 3 bottom-right)  &lt;br /&gt;
                      index = faceId * 4 + cellIndex  &lt;br /&gt;
                     for example we need set 1st texture to 3rd face and top-right cell = 3 * 4 + 1 = 13  :&lt;br /&gt;
                           texuresIds[13] = 1; &lt;br /&gt;
                           texuresIds[13] = 0; zero will mean that there must be empty cell&lt;br /&gt;
                     )&lt;br /&gt;
&lt;br /&gt;
To find live example of usage look at the function effect_cube3d_render_test(framebuffer_t fb, uint32_t currentTime)&lt;br /&gt;
There implemented animation of two cubes flying around screen center &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Pawn API==&lt;br /&gt;
===Graphic functions===&lt;br /&gt;
&lt;br /&gt;
G2D acceleration is implemented as a separate task which handles all communication with G2D accelerator. It has mailbox for requests and it also provides utility functions to fill up this mail box for other tasks. Communication is done in OpenGL style, any other task can ask to prepare layers blending, add some layers to blend and initiate blending process.]]&lt;br /&gt;
Currently result is stored in 3 internal buffers (one for each modules face) and ADD_BITMAP command is modified to access buffers in a primitive way. It is also supposed to render directly into display framebuffer (TBD).&lt;br /&gt;
There is a way to wait until rendering is complete for other tasks.&lt;br /&gt;
Task is implemented as a NFA&lt;br /&gt;
&lt;br /&gt;
[[File:G2D acceleration.png|thumb|right|280px| G2D acceleration paradigm]]&lt;br /&gt;
&lt;br /&gt;
====Graphic primitives====&lt;br /&gt;
&lt;br /&gt;
====Font drawing functions====&lt;br /&gt;
API:&lt;br /&gt;
  abi_CMD_TEXT(const text[], const fontResID, const x, const y, const scale, const angle, const r, const g, const b)&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 new text[4] = ['A', 'p', 'p', '\0'];&lt;br /&gt;
 abi_CMD_TEXT(text, RES_ID_FONT, 90, 160, 16, current_angles[face], 255, 0, 0);&lt;/div&gt;</summary>
		<author><name>Oleg.sayakhov</name></author>
		
	</entry>
</feed>