API

From WowWiki
Revision as of 17:24, 25 August 2020 by Ilya000 (talk | contribs)
Jump to navigation Jump to search

Template:Qnotice

Introduction

The main functions of the API are listed here, the features of the work of the environment are described

WOWCube Paradigms

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.

Graphic functions

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.]] 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). There is a way to wait until rendering is complete for other tasks. Task is implemented as a NFA

G2D acceleration paradigm

Graphic primitives

Font drawing functions

Example

new text[4] = ['A', 'p', 'p', '\0'];
abi_CMD_TEXT(text, 90, 160, 4, current_angles[face], 255, 0, 0);