ARSA Language
2.8
(Encryption, GPU and Web 3.0)
|
Go to the source code of this file.
Functions | |
void | arsalang (const char *src_name) |
load external code, !!!use in Photoshop layer only!!! More... | |
bool | psd (const char *filename, bool clear=true, bool cache=true, bool snd=true) |
load a new psd file More... | |
bool | openloading (const char *filename, bool only_psd=true) |
show loading screen when load psd file More... | |
void | closeloading () |
close loading screen when load psd file More... | |
void | textarea (const char *layername, const char *areaname, const char *string, int r=255, int g=255, int b=255, int a=255) |
display text in area follow layer position and attribute (build-in font is default) More... | |
void | textareafont (const char *layername, const char *areaname, const char *fontname, const char *string, int r=255, int g=255, int b=255, int a=255) |
display text in area with custom font follow layer position and attribute. More... | |
void | textlayer (const char *layername, const char *string, int r=255, int g=255, int b=255, int a=255) |
display text follow layer position and attribute (build-in font is default) More... | |
void | textlayerfont (const char *layername, const char *fontname, const char *string, int r=255, int g=255, int b=255, int a=255) |
display text with custom font follow layer position and attribute. More... | |
void | text (int x, int y, const char *string) |
display text on screen by build-in font More... | |
void | textalign (int align) |
set text alignment, !!!call before and ONLY effect with textlayer() and textlayerfont()!!! More... | |
void | text (int x, int y, const char *string, int r, int g, int b, int a) |
display text on screen by build-in font More... | |
void | text (const char *fontname, int fontsize, int x, int y, const char *string) |
display text on screen by custom font More... | |
void | text (const char *fontname, int fontsize, int x, int y, const char *string, int r, int g, int b, int a) |
display text on screen by custom font More... | |
void | int (const char *name, int value) |
define local variable as integer More... | |
void | gint (const char *name, int value) |
define global variable as integer More... | |
void | float (const char *name, float value) |
define local variable as float More... | |
void | gfloat (const char *name, int value) |
define global variable as float More... | |
void | string (const char *name, const char *value) |
define local variable as string More... | |
void | gstring (const char *name, int value) |
define global variable as string More... | |
void | struct (const char *name, const char *element,...) |
define local structure More... | |
void | gstruct (const char *name, int value) |
define global structure More... | |
void | set (const char *name, const char *value) |
set value on variable More... | |
void | setstring (const char *name, const char *value) |
set string on variable, don't skip space More... | |
void | add (const char *name, const char *value) |
add value on variable More... | |
void | addstring (const char *name, const char *value) |
string cat, don't skip space More... | |
void | sub (const char *name, const char *value) |
subtract value on variable More... | |
void | mul (const char *name, const char *value) |
multiply value on variable More... | |
void | div (const char *name, const char *value) |
divide value on variable More... | |
void | mod (const char *name, const char *value) |
mod value on variable More... | |
void | _sin (const char *name, const char *value) |
_sin value on variable More... | |
void | _cos (const char *name, const char *value) |
_cos value on variable More... | |
if (test_expr) void *function | |
An if statement consists of a boolean expression followed by one or more statements. More... | |
ifcount (const char *name, test_expr, int count) void *function | |
An if statement with count. More... | |
iftime (const char *name, test_expr, int delay) void *function | |
An if statement with time delay in millisecond. More... | |
void | ifreset (const char *name="") |
reset ifcount() and iftime(), maybe call in deinit function. More... | |
void | function (const char *name) |
function, a group of commands that together perform a task More... | |
void | procedure (void *function1 >> void *function2 >> ... >> void *functionN) |
procedure, a single line of commands that together perform a task More... | |
void | proc (void *function1 >> void *function2 >> ... >> void *functionN) |
short version of procedure(). More... | |
ifelse (test_expr, void *function1, void *function2) | |
if else condition More... | |
for (init_expr;test_expr;increment_expr) void *function | |
A for loop is a repetition control structure that allows you to efficiently write a loop that needs to execute a specific number of times. More... | |
while (test_expr) void *function | |
A while loop in ARSA Language repeatedly executes a target statement as long as a given condition is true. More... | |
long | gettime () |
get virtual time More... | |
long | getrealtime () |
get real time More... | |
float | getdeltatime () |
get delta time More... | |
int | random () |
get random number More... | |
int | random (int min, int max) |
get random number in range More... | |
const char * | random_string (int len) |
get random string in lenght More... | |
const char * | random_guid (bool with_letter=false) |
get random GUID number More... | |
const char * | random_string_custom (int len, const char *string_custom) |
get random string with custom string More... | |
void | setdebug (int debug) |
set debug mode More... | |
int | isdebug () |
query this psd is on debug mode More... | |
void | msgbox (const char *msg) |
show message box More... | |
void | alog (const char *msg) |
log message, a msg is showing on log window More... | |
bool | touch (const char *state) |
query touch state More... | |
void | touch (const char *state, void *function) |
touch anywhere and call the function. More... | |
bool | touch (const char *state, const char *layername) |
query touch on layername More... | |
void | touch (const char *state, const char *layername, void *function) |
touch on layername and call the function. More... | |
void | touchclear () |
touch clear buffer. More... | |
int | touchmax () |
get touch maximum id. More... | |
bool | touchid (int touch_id, const char *state) |
query touch state by id More... | |
void | touchid (int touch_id, const char *state, void *function) |
touch by id in anywhere and call the function. More... | |
bool | touchid (int touch_id, const char *state, const char *layername) |
query touch by id on layername More... | |
void | touchid (int touch_id, const char *state, const char *layername, void *function) |
touch by id on layername and call the function. More... | |
bool | strstr (const char *string, const char *keyword) |
search string, case sensitive More... | |
const char * | strtok (const char *string, const char *token="") |
Split string into tokens, DON'T USE ',' (comma) as token More... | |
void | return () |
void | break () |
void | continue () |
continue(), stop and restart process after called. More... | |
void | setgamefps (int fps) |
set game fps, default: 60 More... | |
int | getgamefps () |
get game fps More... | |
int | getcurrentfps () |
get current fps More... | |
void | winsize (int width, int height) |
windows size, Emulator only!!! More... | |
int | getwinsizewidth () |
get width on windows size Emulator only!!! More... | |
int | getwinsizeheight () |
get height on windows size Emulator only!!! More... | |
void | setlandscape () |
set landscape mode, call before screensize() More... | |
void | setportrait () |
set portrait mode call before screensize() More... | |
float | getzrot (float x1, float y1, float x2, float y2) |
get z rotation between vector2d(x1,y1) and vector2d(x2,y2) More... | |
void | setbgcolor (int r, int g, int b, int a) |
set background color More... | |
const char * | version () |
get version of thrid party libs in a string format. More... | |
const char * | getversion () |
get version of ARSA Framework in a string format. More... | |
const char * | getredeemcode () |
get current redeem code More... | |
const char * | getuuid () |
get device UUID More... | |
const char * | getpackage () |
get application package More... | |
const char * | getplatform () |
get current patform using. More... | |
void | setuserstring (const char *str) |
set user string More... | |
const char * | getuserstring () |
get user string More... | |
void | exit () |
exit application More... | |
void | clear () |
free current psd file More... | |
void | drawonce (bool clear=false, bool updateall=false) |
drawing screen immediately! More... | |
bool | url (const char *url, bool webapp=false, bool use_webbrowser=true) |
open url More... | |
bool | phonecall (const char *number) |
phone call More... | |
bool | sharefile (const char *mailto, const char *subject, const char *msg, const char *filename) |
share text and file More... | |
const char * | savescreenshot (bool silent=false) |
save current screenshot to jpg format More... | |
bool | sharescreenshot (const char *mailto, const char *subject, const char *msg) |
share current screenshot More... | |
const char * | getscreenshotname () |
get a random name of screenshot More... | |
const char * | getgps () |
get a gps location More... | |
bool | isset (const char *var) |
Determine if a variable is considered set, this means if a variable is declared and is different than null. More... | |
bool | isnumber (const char *var) |
Determine if a variable is a number both int or float. More... | |
bool | isint (const char *var) |
Determine if a variable is an int. More... | |
bool | isfloat (const char *var) |
Determine if a variable is a float. More... | |
bool | isstring (const char *var) |
Determine if a variable is a string. More... | |
bool | isspace (const char *var) |
Determine if a variable is a whitespace. More... | |
void | clearqueuerender () |
clear queue rendering both psd and font. More... | |
void | psdrenderall () |
adding all layers in current psd file to queue rendering. More... | |
const char * | camera () |
bool | pickup (const char *state, const char *layername) |
pickup on layername by state condition. More... | |
const char * | pickupgetlayername () |
get layername from user pickup layer. More... | |
void | pickupclear () |
clear pickup buffer. More... | |
const char * | base64encode (const char *str) |
base64 encode More... | |
const char * | base64decode (const char *str) |
base64 decode More... | |
const char * | scanvar (const char *str) |
scan string variable and math replacement More... | |
const char * | urlencode (const char *str) |
url encode More... | |
const char * | urldecode (const char *str) |
url decode More... | |
const char * | getwritepath (const char *filename) |
get write path with filename and extension More... | |
const char * | md5 (const char *filename_or_string) |
get md5 More... | |
const char * | sha256 (const char *filename_or_string) |
get sha256 More... | |
const char * | openfile () |
openfile dialog. More... | |
const char * | getpushfile () |
bool | voicestart (const char *savefilename) |
start voice recording and removing savefilename from audio system before recording. More... | |
void | voicestop () |
stop voice recording. More... | |
int | clamp (int value, int min, int max) |
clamp value as int More... | |
float | clamp (float value, float min, float max) |
clamp value as float More... | |
int | lerp (int a, int b, float t) |
lerp value as int, Computes the linear interpolation between a and b, if the parameter t is inside [0, 1] More... | |
float | lerp (float a, float b, float t) |
lerp value as float, Computes the linear interpolation between a and b, if the parameter t is inside [0, 1] More... | |
void | setclipboard (const char *text) |
Put UTF-8 text into the clipboard. More... | |
const char * | getclipboard () |
Get UTF-8 text from the clipboard. More... | |
void | delay (int millisec) |
delay cpu circle in milli second More... | |
const char * | strftime (const char *format) |
Get time format. More... | |
const char * | strcmp (const char *str1, const char *str2) |
The strcmp() compares two strings character by character. If the strings are equal, the function returns 0. More... | |
const char * | getfilebasename (const char *filename, bool keep_extension=true) |
get filename from full path. More... | |
const char * | getfileextension (const char *filename) |
get extension from from full path. More... | |
const char * | getfiledir (const char *filename) |
get directory from from full path. More... | |
bool | permission (const char *permission_name, bool require=true) |
checking permission on mobile devices only. More... | |
bool | ispsdfile (const char *filename) |
checking is psd file More... | |
float | getaccx () |
get accelerometer x More... | |
float | getaccy () |
get accelerometer y More... | |
float | getaccz () |
get accelerometer z More... | |
int | getorient () |
get current screen orientation More... | |
float | getdpid () |
get screen dpi density More... | |
float | getdpix () |
get screen dpi x More... | |
float | getdpiy () |
get screen dpi y More... | |
bool | or (test_expr,...) |
OR operation with if statement consists of a boolean expression followed by one or more statements. More... | |
bool | and (test_expr,...) |
AND operation with if statement consists of a boolean expression followed by one or more statements. More... | |
void _cos | ( | const char * | name, |
const char * | value | ||
) |
_cos value on variable
name | variable name |
value | variable value |
void _sin | ( | const char * | name, |
const char * | value | ||
) |
_sin value on variable
name | variable name |
value | variable value |
void add | ( | const char * | name, |
const char * | value | ||
) |
add value on variable
name | variable name |
value | variable value |
void addstring | ( | const char * | name, |
const char * | value | ||
) |
string cat, don't skip space
name | variable name |
value | variable value |
void alog | ( | const char * | msg | ) |
bool and | ( | test_expr | , |
... | |||
) |
AND operation with if statement consists of a boolean expression followed by one or more statements.
test_expr | the condition is evaluated. If it is true, the function is executed. If it is false, the function does not execute. |
void arsalang | ( | const char * | src_name | ) |
load external code, !!!use in Photoshop layer only!!!
src_name | is text file formatted only and put this file in same psd folder. |
const char* base64decode | ( | const char * | str | ) |
base64 decode
str | string that want decode. |
const char* base64encode | ( | const char * | str | ) |
base64 encode
str | string that want encode. |
const char* camera | ( | ) |
open camera and take a photo.
win32 only show text on messagebox.
android open camera device from INTENT.
void clear | ( | ) |
free current psd file
void clearqueuerender | ( | ) |
clear queue rendering both psd and font.
void closeloading | ( | ) |
close loading screen when load psd file
void continue | ( | ) |
continue(), stop and restart process after called.
void delay | ( | int | millisec | ) |
delay cpu circle in milli second
void div | ( | const char * | name, |
const char * | value | ||
) |
divide value on variable
name | variable name |
value | variable value |
void drawonce | ( | bool | clear = false , |
bool | updateall = false |
||
) |
drawing screen immediately!
clear | remove and free all objects before draw, default: false |
updateall | update all psd layer, default: false |
void exit | ( | ) |
exit application
void float | ( | const char * | name, |
float | value | ||
) |
for | ( | init_expr;test_expr; | increment_expr | ) |
A for loop is a repetition control structure that allows you to efficiently write a loop that needs to execute a specific number of times.
Here is the flow of control in a for loop:
init_expr | The init step is executed first, and only once. This step allows you to declare and initialize any loop control variables. You are not required to put a statement here, as long as a semicolon appears. |
test_expr | Next, the condition is evaluated. If it is true, the body of the loop is executed. If it is false, the body of the loop does not execute and flow of control jumps to the next statement just after the for loop. |
increment_expr | After the body of the for loop executes, the flow of control jumps back up to the increment statement. This statement allows you to update any loop control variables. This statement can be left blank, as long as a semicolon appears after the condition. |
function | call the function when loop process Example1: for($i=0;$i<10;$i++) text(10,$i*30,Value is: $i) |
void function | ( | const char * | name | ) |
function, a group of commands that together perform a task
can be recursive other function.
name | function name Example: |
float getaccx | ( | ) |
get accelerometer x
float getaccy | ( | ) |
get accelerometer y
float getaccz | ( | ) |
get accelerometer z
const char* getclipboard | ( | ) |
Get UTF-8 text from the clipboard.
int getcurrentfps | ( | ) |
get current fps
float getdeltatime | ( | ) |
get delta time
float getdpid | ( | ) |
get screen dpi density
float getdpix | ( | ) |
get screen dpi x
float getdpiy | ( | ) |
get screen dpi y
const char* getfilebasename | ( | const char * | filename, |
bool | keep_extension = true |
||
) |
get filename from full path.
filename | is a full path. |
keep_extension | keep the extension of filename, default is true. |
const char* getfiledir | ( | const char * | filename | ) |
get directory from from full path.
filename | is a full path. |
const char* getfileextension | ( | const char * | filename | ) |
get extension from from full path.
filename | is a full path. |
int getgamefps | ( | ) |
get game fps
const char* getgps | ( | ) |
get a gps location
int getorient | ( | ) |
get current screen orientation
sa setlandscape() setportrait()
const char* getpackage | ( | ) |
get application package
const char* getplatform | ( | ) |
get current patform using.
const char* getpushfile | ( | ) |
get push file from other application with single file or multi push files.
this support only mobile device that possible sharing file to the other app.
long getrealtime | ( | ) |
get real time
const char* getredeemcode | ( | ) |
get current redeem code
const char* getscreenshotname | ( | ) |
get a random name of screenshot
long gettime | ( | ) |
get virtual time
const char* getuserstring | ( | ) |
get user string
const char* getuuid | ( | ) |
get device UUID
const char* getversion | ( | ) |
get version of ARSA Framework in a string format.
int getwinsizeheight | ( | ) |
get height on windows size Emulator only!!!
int getwinsizewidth | ( | ) |
get width on windows size Emulator only!!!
const char* getwritepath | ( | const char * | filename | ) |
get write path with filename and extension
filename | filename and extension that want to write with fullpath on disk. |
get z rotation between vector2d(x1,y1) and vector2d(x2,y2)
x1 | vector x1 |
y1 | vector y1 |
x2 | vector x2 |
y2 | vector y2 |
void gfloat | ( | const char * | name, |
int | value | ||
) |
void gint | ( | const char * | name, |
int | value | ||
) |
void gstring | ( | const char * | name, |
int | value | ||
) |
void gstruct | ( | const char * | name, |
int | value | ||
) |
if | ( | test_expr | ) |
An if statement consists of a boolean expression followed by one or more statements.
test_expr | the condition is evaluated. If it is true, the function is executed. If it is false, the function does not execute. |
function | call the function when condition is true Example: if($i==10) text(100,100,Value is: $i) |
ifcount | ( | const char * | name, |
test_expr | , | ||
int | count | ||
) |
An if statement with count.
name | uniqueness name of this statement, purpose reset for. |
test_expr | the condition is evaluated. If it is true, the function is executed. If it is false, the function does not execute. |
count | time to do if statement in true case, false not do anything, 0 equal if(). |
function | call the function when condition is true Example: |
ifelse | ( | test_expr | , |
void * | function1, | ||
void * | function2 | ||
) |
if else condition
test_expr | the condition is evaluated. If it is true, the function is executed. If it is false, the function does not execute. |
function1 | call the function when condition is true |
function2 | call the function when condition is false Example: |
void ifreset | ( | const char * | name = "" | ) |
iftime | ( | const char * | name, |
test_expr | , | ||
int | delay | ||
) |
An if statement with time delay in millisecond.
name | uniqueness name of this statement, purpose reset for. |
test_expr | the condition is evaluated. If it is true, the function is executed. If it is false, the function does not execute. |
delay | time to delay in millisecond then doing if statement in true case, false not do anything, 0 equal if(). |
function | call the function when condition is true Example: |
void int | ( | const char * | name, |
int | value | ||
) |
define local variable as integer
int isdebug | ( | ) |
query this psd is on debug mode
bool isfloat | ( | const char * | var | ) |
Determine if a variable is a float.
var | only variable name |
bool isint | ( | const char * | var | ) |
Determine if a variable is an int.
var | only variable name |
bool isnumber | ( | const char * | var | ) |
Determine if a variable is a number both int or float.
var | only variable name |
bool ispsdfile | ( | const char * | filename | ) |
checking is psd file
filename | file that user want to checking. |
bool isset | ( | const char * | var | ) |
Determine if a variable is considered set, this means if a variable is declared and is different than null.
var | only variable name , not enter $ at front! |
bool isspace | ( | const char * | var | ) |
Determine if a variable is a whitespace.
var | only variable name |
bool isstring | ( | const char * | var | ) |
Determine if a variable is a string.
var | only variable name |
lerp value as int, Computes the linear interpolation between a and b, if the parameter t is inside [0, 1]
lerp value as float, Computes the linear interpolation between a and b, if the parameter t is inside [0, 1]
const char* md5 | ( | const char * | filename_or_string | ) |
get md5
filename_or_string | check sum from file or string |
void mod | ( | const char * | name, |
const char * | value | ||
) |
mod value on variable
name | variable name |
value | variable value |
void msgbox | ( | const char * | msg | ) |
show message box
msg | message |
void mul | ( | const char * | name, |
const char * | value | ||
) |
multiply value on variable
name | variable name |
value | variable value |
const char* openfile | ( | ) |
openfile dialog.
bool openloading | ( | const char * | filename, |
bool | only_psd = true |
||
) |
show loading screen when load psd file
psd_only | show loading screen only loading psd file loading screen can have built-in layer name on psd file follows: |
horizontal animation progress bar start from left(empty) to right(full) support only psd class, counting with number of layers.
horizontal animation loop progress bar start from left to right cannot count progress!
vertical animation loop progress bar start from top to bottom cannot count progress!
bool or | ( | test_expr | , |
... | |||
) |
OR operation with if statement consists of a boolean expression followed by one or more statements.
test_expr | the condition is evaluated. If it is true, the function is executed. If it is false, the function does not execute. |
bool permission | ( | const char * | permission_name, |
bool | require = true |
||
) |
checking permission on mobile devices only.
permission_name | checking string of permission, follows: storage gps camera mic |
require | true: if permission is false then call permission process from os, false: check permission only, default: true. |
bool phonecall | ( | const char * | number | ) |
phone call
number | phone number that you want to make a call. |
bool pickup | ( | const char * | state, |
const char * | layername | ||
) |
pickup on layername by state condition.
If state and layername are match then return true, otherwise is false and send layername as build-in variable to other the function.
User can be use null instread layername.
state | check user pickup state, use same touch state as well. |
layername | name of layer, can be null that choose build-in layername from the other function. |
void pickupclear | ( | ) |
clear pickup buffer.
const char* pickupgetlayername | ( | ) |
get layername from user pickup layer.
void proc | ( | void *function1 >> void *function2 >> ... >> void * | functionN | ) |
short version of procedure().
void procedure | ( | void *function1 >> void *function2 >> ... >> void * | functionN | ) |
procedure, a single line of commands that together perform a task
benefit is reduce line of code, every command in procedure token by >>
cannot be recursive any procedure.
function1 | call the function first |
function2 | call the function second |
functionN | call the function end Example: |
bool psd | ( | const char * | filename, |
bool | clear = true , |
||
bool | cache = true , |
||
bool | snd = true |
||
) |
load a new psd file
filename | load psd file only (.psd) |
clear | true: clear scene before load, false: import psd only |
cache | true: allocate memory before load, false: directly read from storage |
snd | true: clear all audio/video before load |
void psdrenderall | ( | ) |
adding all layers in current psd file to queue rendering.
int random | ( | ) |
get random number
get random number in range
min | start random value |
max | end random value |
const char* random_guid | ( | bool | with_letter = false | ) |
get random GUID number
with_letter | use - between guid |
const char* random_string | ( | int | len | ) |
get random string in lenght
len | size of string random |
const char* random_string_custom | ( | int | len, |
const char * | string_custom | ||
) |
get random string with custom string
len | size of string random |
string_custom | character want to random |
const char* savescreenshot | ( | bool | silent = false | ) |
save current screenshot to jpg format
silent | notify message on screen, default: false |
const char* scanvar | ( | const char * | str | ) |
scan string variable and math replacement
str | string that want scan variable and math replacement. |
void set | ( | const char * | name, |
const char * | value | ||
) |
set value on variable
name | variable name |
value | variable value |
set background color
r | red value |
g | green value |
b | blue value |
a | alpha value |
void setclipboard | ( | const char * | text | ) |
Put UTF-8 text into the clipboard.
text | string into the clipboard. |
void setdebug | ( | int | debug | ) |
set debug mode
debug | value of debuging |
void setgamefps | ( | int | fps | ) |
set game fps, default: 60
fps | frame per second |
void setlandscape | ( | ) |
set landscape mode, call before screensize()
set screen size to default
void setportrait | ( | ) |
set portrait mode call before screensize()
set screen size to default
void setstring | ( | const char * | name, |
const char * | value | ||
) |
set string on variable, don't skip space
name | variable name |
value | variable value |
void setuserstring | ( | const char * | str | ) |
set user string
str | any string. |
const char* sha256 | ( | const char * | filename_or_string | ) |
get sha256
filename_or_string | check sum from file or string |
bool sharefile | ( | const char * | mailto, |
const char * | subject, | ||
const char * | msg, | ||
const char * | filename | ||
) |
share text and file
mailto | an email that you want to share to. |
subject | the head of message. |
msg | this is a content. |
filename | location of filename that you want to share, may same psd folder. |
bool sharescreenshot | ( | const char * | mailto, |
const char * | subject, | ||
const char * | msg | ||
) |
share current screenshot
mailto | an email that you want to share to. |
subject | the head of message. |
msg | this is a content. |
const char* strcmp | ( | const char * | str1, |
const char * | str2 | ||
) |
The strcmp() compares two strings character by character. If the strings are equal, the function returns 0.
str1 | a string 1 |
str2 | a string 2 |
const char* strftime | ( | const char * | format | ) |
Get time format.
format | This is the C string format are: %a Abbreviated weekday name Sun %A Full weekday name Sunday %b Abbreviated month name Mar %B Full month name March %c Dateand time representation Sun Aug 19 02:56 : 02 2012 %d Day of the month(01 - 31) 19 %H Hour in 24h format(00 - 23) 14 %I Hour in 12h format(01 - 12) 05 %j Day of the year(001 - 366) 231 %m Month as a decimal number(01 - 12) 08 %M Minute(00 - 59) 55 %p AM or PM designation PM %S Second(00 - 61) 02 %U Week number with the first Sunday as the first day of week one(00 - 53) 33 %w Weekday as a decimal number with Sunday as 0 (0 - 6) 4 %W Week number with the first Monday as the first day of week one(00 - 53) 34 %x Date representation 08 / 19 / 12 %X Time representation 02:50 : 06 %y Year, last two digits(00 - 99) 01 %Y Year 2012 %Z Timezone name or abbreviation CDT %% A % sign % |
void string | ( | const char * | name, |
const char * | value | ||
) |
define local variable as string
name | variable name |
value | variable value Example Example Array |
bool strstr | ( | const char * | string, |
const char * | keyword | ||
) |
search string, case sensitive
string | original string |
keyword | search string |
const char* strtok | ( | const char * | string, |
const char * | token = "" |
||
) |
Split string into tokens, DON'T USE ',' (comma) as token
string | original string |
token | C string containing the delimiter characters. These can be different from one call to another. If use want token by whitespace use "" or " " or leave empty parameter. |
void struct | ( | const char * | name, |
const char * | element, | ||
... | |||
) |
define local structure
element | data member on this structure Example struct($Player,Name,Hp,Att,Def,Int) set($Player.Name, Saros) set($Player.Hp, 1000) set($Player.Att, 99) set($Player.Def, 99) set($Player.Int, 99) text(10, 40, Name: $Player.Name) text(10, 70, ATT: $Player.Att) text(10, 100, DEF: $Player.Def) text(10, 130, INT: $Player.Int) struct($Player[3],Name,Hp, Att, Def, Int) setstring($Player[0].Name,Jerido) set($Player[0].Hp,500) set($Player[0].Att,75) set($Player[0].Def,22) set($Player[0].Int,50) setstring($Player[1].Name,Mu) set($Player[1].Hp,550) set($Player[1].Att,60) set($Player[1].Def,25) set($Player[1].Int,45) setstring($Player[2].Name,Exact) set($Player[2].Hp,600) set($Player[2].Att,70) set($Player[2].Def,30) set($Player[2].Int,50) |
void sub | ( | const char * | name, |
const char * | value | ||
) |
subtract value on variable
name | variable name |
value | variable value |
display text on screen by build-in font
x | position on x axis |
y | position on y axis |
string | text, sometime can use variable or function instread. |
display text on screen by build-in font
specify custom color range between 0-255
x | position on x axis |
y | position on y axis |
string | text, sometime can use variable or function instread. |
r | red value |
g | green value |
b | blue value |
a | alpha value |
display text on screen by custom font
fontname | support only TTF font, user must copy font same psd location |
fontsize | size of font, much is bigger |
x | position on x axis |
y | position on y axis |
string | text, sometime can use variable or function instread. |
void text | ( | const char * | fontname, |
int | fontsize, | ||
int | x, | ||
int | y, | ||
const char * | string, | ||
int | r, | ||
int | g, | ||
int | b, | ||
int | a | ||
) |
display text on screen by custom font
specify custom color range between 0-255
fontname | support only TTF font, user must copy font same psd location |
fontsize | size of font, much is bigger |
x | position on x axis |
y | position on y axis |
string | text, sometime can use variable or function instread. |
r | red value |
g | green value |
b | blue value |
a | alpha value |
void textalign | ( | int | align | ) |
set text alignment, !!!call before and ONLY effect with textlayer() and textlayerfont()!!!
align | flags of text alignment, every flags can or bit. c = center l = left r = right t = top b = bottom d = default is l|t |
void textarea | ( | const char * | layername, |
const char * | areaname, | ||
const char * | string, | ||
int | r = 255 , |
||
int | g = 255 , |
||
int | b = 255 , |
||
int | a = 255 |
||
) |
display text in area follow layer position and attribute (build-in font is default)
layername | name of psd layer, font follow: color, alpha and size = layer height. |
areaname | name of psd layer, rectangle of display text with position (top left corner), wordwrap and scissor. |
string | text, maybe variable or function allow. |
r | red value |
g | green value |
b | blue value |
a | alpha value |
void textareafont | ( | const char * | layername, |
const char * | areaname, | ||
const char * | fontname, | ||
const char * | string, | ||
int | r = 255 , |
||
int | g = 255 , |
||
int | b = 255 , |
||
int | a = 255 |
||
) |
display text in area with custom font follow layer position and attribute.
layername | name of psd layer, font follow: color, alpha and size = layer height. |
areaname | name of psd layer, rectangle of display text with position (top left corner), wordwrap and scissor. |
fontname | support only TTF font, user must copy font same psd location |
string | text, maybe variable or function allow. |
r | red value |
g | green value |
b | blue value |
a | alpha value |
void textlayer | ( | const char * | layername, |
const char * | string, | ||
int | r = 255 , |
||
int | g = 255 , |
||
int | b = 255 , |
||
int | a = 255 |
||
) |
display text follow layer position and attribute (build-in font is default)
layername | name of psd layer, font follow: position, color, alpha and size = layer height*2. |
string | text, maybe variable or function allow. |
r | red value |
g | green value |
b | blue value |
a | alpha value |
void textlayerfont | ( | const char * | layername, |
const char * | fontname, | ||
const char * | string, | ||
int | r = 255 , |
||
int | g = 255 , |
||
int | b = 255 , |
||
int | a = 255 |
||
) |
display text with custom font follow layer position and attribute.
layername | name of psd layer, font follow: position, color, alpha and size = layer height. |
fontname | support only TTF font, user must copy font same psd location |
string | text, maybe variable or function allow. |
r | red value |
g | green value |
b | blue value |
a | alpha value |
bool touch | ( | const char * | state | ) |
query touch state
state | check user touch state, values are: up down press release isleft isright isup isdown isdouble istripple ismoving iszoomin iszoomout getrepeat gettime gettouchx gettouchy gettouchx_old gettouchy_old gettouchx_fromstart gettouchy_fromstart gettouchxy_diff gettouchx_diff gettouchy_diff gettouchx_diff_fromstart gettouchy_diff_fromstart limit // add limit layer touch input that can recursive adding until call limiteclear, e.g. touch( limit, layer1, layer2, ... , layerN ) limitclear // clear limit layer e.g. touch( limitclear ) clear // clear all input buffer and limit |
void touch | ( | const char * | state, |
void * | function | ||
) |
touch anywhere and call the function.
If state match then call the function and send layername as build-in variable to other the function.
User can be use null instread layername.
state | check user touch state. |
function | call the function. |
bool touch | ( | const char * | state, |
const char * | layername | ||
) |
query touch on layername
If state and layername are match then call the function and send layername as build-in variable to other the function.
User can be use null instread layername.
state | check user touch state. |
layername | name of layer, can be null that choose build-in layername from the other function. |
void touch | ( | const char * | state, |
const char * | layername, | ||
void * | function | ||
) |
touch on layername and call the function.
If state and layername are match then call the function and send layername as build-in variable to other the function.
User can be use null instread layername.
Note: this style is not effect with below states:
isleft
isright
isup
isdown
state | check user touch state. |
layername | name of layer, can be null that choose build-in layername from the other function. |
function | call the function. |
void touchclear | ( | ) |
touch clear buffer.
clear all input buffer of touch screen.
bool touchid | ( | int | touch_id, |
const char * | state | ||
) |
query touch state by id
touch_id | number of touch id, maximum id can get from touchmax() |
state | check user touch state, values are: up down press release isleft isright isup isdown isdouble istripple ismoving iszoomin iszoomout getrepeat gettime gettouchx gettouchy gettouchx_old gettouchy_old gettouchx_fromstart gettouchy_fromstart gettouchxy_diff gettouchx_diff gettouchy_diff gettouchx_diff_fromstart gettouchy_diff_fromstart limit // limit layer touch input e.g. touch( limit, layer1, layer2, ... , layerN ) limitclear // clear limit layer e.g. touch( limitclear ) clear // clear all input buffer and limit |
void touchid | ( | int | touch_id, |
const char * | state, | ||
void * | function | ||
) |
touch by id in anywhere and call the function.
If state match then call the function and send layername as build-in variable to other the function.
User can be use null instread layername.
touch_id | number of touch id, maximum id can get from touchmax() |
state | check user touch state. |
function | call the function. |
bool touchid | ( | int | touch_id, |
const char * | state, | ||
const char * | layername | ||
) |
query touch by id on layername
If state and layername are match then call the function and send layername as build-in variable to other the function.
User can be use null instread layername.
touch_id | number of touch id, maximum id can get from touchmax() |
state | check user touch state. |
layername | name of layer, can be null that choose build-in layername from the other function. |
void touchid | ( | int | touch_id, |
const char * | state, | ||
const char * | layername, | ||
void * | function | ||
) |
touch by id on layername and call the function.
If state and layername are match then call the function and send layername as build-in variable to other the function.
User can be use null instread layername.
touch_id | number of touch id, maximum id can get from touchmax() |
state | check user touch state. |
layername | name of layer, can be null that choose build-in layername from the other function. |
function | call the function. |
int touchmax | ( | ) |
get touch maximum id.
bool url | ( | const char * | url, |
bool | webapp = false , |
||
bool | use_webbrowser = true |
||
) |
open url
url | name of website that want to open |
webapp | open as webapp, default: false |
use_webbrowser | using system web browser, default: true |
const char* urldecode | ( | const char * | str | ) |
url decode
str | string that url decode. |
const char* urlencode | ( | const char * | str | ) |
url encode
str | string that url encode. |
const char* version | ( | ) |
get version of thrid party libs in a string format.
bool voicestart | ( | const char * | savefilename | ) |
start voice recording and removing savefilename from audio system before recording.
savefilename | save filename on disk. |
void voicestop | ( | ) |
stop voice recording.
while | ( | test_expr | ) |
A while loop in ARSA Language repeatedly executes a target statement as long as a given condition is true.
Here is the flow of control in a while loop:
test_expr | the condition is evaluated. If it is true, the body of the loop is executed. If it is false, the body of the loop does not execute and flow of control jumps to the next statement just after the for loop. |
function | call the function when loop process Example: |