ARSA Language  2.8
(Encryption, GPU and Web 3.0)
operator.h
Go to the documentation of this file.
1 
111 
115 void arsalang(const char* src_name);
116 
118 
141 bool psd(const char* filename, bool clear = true, bool cache = true, bool snd = true);
142 
144 
164 bool openloading(const char* filename, bool only_psd = true);
165 
167 
170 void closeloading();
171 
173 
182 void textarea(const char* layername, const char* areaname, const char* string, int r = 255, int g = 255, int b = 255, int a = 255);
183 
185 
195 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);
196 
198 
206 void textlayer(const char* layername, const char* string, int r = 255, int g = 255, int b = 255, int a = 255);
207 
209 
218 void textlayerfont(const char* layername, const char* fontname, const char* string, int r = 255, int g = 255, int b = 255, int a = 255);
219 
221 
226 void text(int x, int y, const char* string);
227 
229 
239 void text(int x, int y, const char* string, int r, int g, int b, int a);
240 
242 
249 void text(const char* fontname, int fontsize, int x, int y, const char* string);
250 
252 
264 void text(const char* fontname, int fontsize, int x, int y, const char* string, int r, int g, int b, int a);
265 
267 
293 void int(const char* name, int value);
294 
296 
301 void gint(const char* name, int value);
302 
304 
325 void float(const char* name, float value);
326 
328 
333 void gfloat(const char* name, int value);
334 
336 
357 void string(const char* name, const char* value);
358 
360 
365 void gstring(const char* name, int value);
366 
368 
409 void struct(const char* name, const char* element, ...);
410 
412 
417 void gstruct(const char* name, int value);
418 
420 
424 void set(const char* name,const char* value);
425 
427 
431 void setstring(const char* name, const char* value);
432 
434 
438 void add(const char* name,const char* value);
439 
441 
445 void addstring(const char* name, const char* value);
446 
448 
452 void sub(const char* name,const char* value);
453 
455 
459 void mul(const char* name,const char* value);
460 
462 
466 void div(const char* name,const char* value);
467 
469 
473 void mod(const char* name,const char* value);
474 
476 
480 void _sin(const char* name,const char* value);
481 
483 
487 void _cos(const char* name,const char* value);
488 
490 
498 if(test_expr) void* function;
499 
501 
511 ifcount (const char* name, test_expr, int count ) void* function;
512 
514 
524 iftime(const char* name, test_expr, int delay) void* function;
525 
527 
530 void ifreset(const char* name = "");
531 
533 
543 void function(const char* name);
544 
546 
557 void procedure( void* function1 >> void* function2 >> ... >> void* functionN );
558 
560 void proc(void* function1 >> void* function2 >> ... >> void* functionN);
561 
563 
572 ifelse(test_expr, void* function1, void* function2);
573 
575 
591 for(init_expr; test_expr; increment_expr) void* function;
592 
594 
604 while(test_expr) void* function;
605 
607 
610 long gettime();
611 
613 
616 long getrealtime();
617 
619 
622 float getdeltatime();
623 
625 
628 int random();
629 
631 
636 int random(int min, int max);
637 
639 
643 const char* random_string(int len);
644 
646 
657 const char* random_guid(bool with_letter = false);
658 
660 
670 const char* random_string_custom(int len, const char* string_custom);
671 
673 
676 void setdebug(int debug);
677 
679 
682 int isdebug();
683 
685 
688 void msgbox(const char* msg);
689 
691 
701 void alog( const char* msg );
702 
704 
740 bool touch(const char* state);
741 
743 
750 void touch(const char* state, void* function);
751 
753 
761 bool touch(const char* state, const char* layername);
762 
764 
777 void touch(const char* state, const char* layername, void* function);
778 
780 
783 void touchclear();
784 
786 
789 int touchmax();
790 
792 
829 bool touchid(int touch_id, const char* state);
830 
832 
840 void touchid(int touch_id, const char* state, void* function);
841 
843 
852 bool touchid(int touch_id, const char* state, const char* layername);
853 
855 
864 void touchid(int touch_id, const char* state, const char* layername, void* function);
865 
867 
873 bool strstr(const char* string, const char* keyword);
874 
876 
906 const char* strtok(const char* string, const char* token = "");
907 
910 void return();
911 
914 void break();
915 
917 void continue();
918 
920 
923 void setgamefps(int fps);
924 
926 
929 int getgamefps();
930 
932 
935 int getcurrentfps();
936 int getcurrentfps();
937 
939 
943 void winsize(int width, int height);
944 
946 
949 int getwinsizewidth();
950 
952 
955 int getwinsizeheight();
956 
958 
961 void setlandscape();
962 
964 
967 void setportrait();
968 
970 
977 float getzrot(float x1, float y1, float x2, float y2);
978 
980 
986 void setbgcolor(int r, int g, int b, int a);
987 
989 
992 const char* version();
993 
995 
998 const char* getversion();
999 
1001 
1004 const char* getredeemcode();
1005 
1007 
1010 const char* getuuid();
1011 
1013 
1016 const char* getpackage();
1017 
1019 
1029 const char* getplatform();
1030 
1032 
1035 void setuserstring(const char* str);
1036 
1038 
1041 const char* getuserstring();
1042 
1044 void exit();
1045 
1047 void clear();
1048 
1050 
1054 void drawonce( bool clear = false, bool updateall = false );
1055 
1057 
1069 bool url(const char* url, bool webapp = false , bool use_webbrowser = true);
1070 
1072 
1080 bool phonecall(const char* number);
1081 
1083 
1098 bool sharefile(const char* mailto, const char* subject, const char* msg, const char* filename);
1099 
1101 
1105 const char* savescreenshot( bool silent = false );
1106 
1108 
1118 bool sharescreenshot(const char* mailto, const char* subject, const char* msg);
1119 
1121 
1124 const char* getscreenshotname();
1125 
1127 
1131 const char* getgps();
1132 
1134 
1138 bool isset(const char* var );
1139 
1141 void clearqueuerender();
1142 
1144 void psdrenderall();
1145 
1149 
1152 const char* camera();
1153 
1155 
1163 bool pickup(const char* state, const char* layername);
1164 
1166 
1169 const char* pickupgetlayername();
1170 
1172 void pickupclear();
1173 
1175 
1179 const char* base64encode(const char* str);
1180 
1182 
1186 const char* base64decode(const char* str);
1187 
1189 
1193 const char* scanvar(const char* str);
1194 
1196 
1200 const char* urlencode(const char* str);
1201 
1203 
1207 const char* urldecode(const char* str);
1208 
1210 
1214 const char* getwritepath(const char* filename);
1215 
1217 
1221 const char* md5(const char* filename_or_string);
1222 
1224 
1228 const char* sha256(const char* filename_or_string);
1229 
1231 
1235 const char* openfile( bool multi_selections = false );
1236 
1239 
1242 const char* getpushfile();
1243 
1245 
1249 bool voicestart(const char* savefilename);
1250 
1252 void voicestop();
1253 
1255 
1258 int clamp(int value, int min, int max);
1259 
1261 
1264 float clamp(float value, float min, float max);
1265 
1267 
1270 int lerp(int a, int b, float t);
1271 
1273 
1276 float lerp(float a, float b, float t);
1277 
1279 
1282 void setclipboard(const char* text);
1283 
1285 
1288 const char* getclipboard();
1289 
1291 void delay( int millisec );
1292 
1294 
1326 const char* strftime(const char* format);
1327 
1329 
1334 const char* strcmp(const char* str1, const char* str2);
1335 
1337 
1342 const char* getfilebasename(const char* filename, bool keep_extension = true );
1343 
1345 
1349 const char* getfileextension(const char* filename);
1350 
1352 
1356 const char* getfiledir(const char* filename);
1357 
void clearqueuerender()
clear queue rendering both psd and font.
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)
void procedure(void *function1 >> void *function2 >> ... >> void *functionN)
procedure, a single line of commands that together perform a task
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.
bool sharefile(const char *mailto, const char *subject, const char *msg, const char *filename)
share text and file
const char * getscreenshotname()
get a random name of screenshot
void setportrait()
set portrait mode call before screensize()
void add(const char *name, const char *value)
add value on variable
int getwinsizeheight()
get height on windows size Emulator only!!!
int getcurrentfps()
get current fps
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.
iftime(const char *name, test_expr, int delay) void *function
An if statement with time delay in millisecond.
void setdebug(int debug)
set debug mode
float getdeltatime()
get delta time
bool url(const char *url, bool webapp=false, bool use_webbrowser=true)
open url
void ifreset(const char *name="")
reset ifcount() and iftime(), maybe call in deinit function.
const char * base64decode(const char *str)
base64 decode
void _sin(const char *name, const char *value)
_sin value on variable
void voicestop()
stop voice recording.
int getgamefps()
get game fps
r
rotation layer
Definition: builtin.h:39
bool sharescreenshot(const char *mailto, const char *subject, const char *msg)
share current screenshot
const char * savescreenshot(bool silent=false)
save current screenshot to jpg format
void exit()
exit application
ifelse(test_expr, void *function1, void *function2)
if else condition
void gstruct(const char *name, int value)
define global structure
bool voicestart(const char *savefilename)
start voice recording and removing savefilename from audio system before recording.
void psdrenderall()
adding all layers in current psd file to queue rendering.
const char * random_guid(bool with_letter=false)
get random GUID number
const char * getuuid()
get device UUID
void clear()
free current psd file
void sub(const char *name, const char *value)
subtract value on variable
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)
void setgamefps(int fps)
set game fps, default: 60
int getwinsizewidth()
get width on windows size Emulator only!!!
void text(int x, int y, const char *string)
display text on screen by build-in font
bool openloading(const char *filename, bool only_psd=true)
show loading screen when load psd file
const char * openfile(bool multi_selections=false)
openfile dialog with single file only or multi selection files.
void setstring(const char *name, const char *value)
set string on variable, don't skip space
void delay(int millisec)
delay cpu circle in milli second
bool strstr(const char *string, const char *keyword)
search string, case sensitive
const char * random_string_custom(int len, const char *string_custom)
get random string with custom string
bool psd(const char *filename, bool clear=true, bool cache=true, bool snd=true)
load a new psd file
void alog(const char *msg)
log message, a msg is showing on log window
const char * urldecode(const char *str)
url decode
void mod(const char *name, const char *value)
mod value on variable
void setbgcolor(int r, int g, int b, int a)
set background color
const char * getfileextension(const char *filename)
get extension from from full path.
void winsize(int width, int height)
windows size, Emulator only!!!
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...
const char * strftime(const char *format)
Get time format.
void string(const char *name, const char *value)
define local variable as string
const char * getversion()
get version of ARSA Framework in a string format.
bool isset(const char *var)
Determine if a variable is considered set, this means if a variable is declared and is different than...
int touchmax()
get touch maximum id.
const char * strcmp(const char *str1, const char *str2)
The strcmp() compares two strings character by character. If the strings are equal,...
const char * getpushfile()
void setlandscape()
set landscape mode, call before screensize()
const char * getfilebasename(const char *filename, bool keep_extension=true)
get filename from full path.
const char * sha256(const char *filename_or_string)
get sha256
const char * getwritepath(const char *filename)
get write path with filename and extension
const char * getfiledir(const char *filename)
get directory from from full path.
const char * camera()
int clamp(int value, int min, int max)
clamp value as int
void div(const char *name, const char *value)
divide value on variable
const char * getuserstring()
get user string
void gfloat(const char *name, int value)
define global variable as float
bool phonecall(const char *number)
phone call
void set(const char *name, const char *value)
set value on variable
const char * urlencode(const char *str)
url encode
void _cos(const char *name, const char *value)
_cos value on variable
void addstring(const char *name, const char *value)
string cat, don't skip space
const char * md5(const char *filename_or_string)
get md5
void int(const char *name, int value)
define local variable as integer
void drawonce(bool clear=false, bool updateall=false)
drawing screen immediately!
bool touch(const char *state)
query touch state
void gint(const char *name, int value)
define global variable as integer
const char * random_string(int len)
get random string in lenght
const char * scanvar(const char *str)
scan string variable and math replacement
const char * version()
get version of thrid party libs in a string format.
const char * pickupgetlayername()
get layername from user pickup layer.
bool pickup(const char *state, const char *layername)
pickup on layername by state condition.
void setuserstring(const char *str)
set user string
int random()
get random number
const char * base64encode(const char *str)
base64 encode
void msgbox(const char *msg)
show message box
void arsalang(const char *src_name)
load external code, !!!use in Photoshop layer only!!!
long gettime()
get virtual time
void proc(void *function1 >> void *function2 >> ... >> void *functionN)
short version of procedure().
void gstring(const char *name, int value)
define global variable as string
void touchclear()
touch clear buffer.
ifcount(const char *name, test_expr, int count) void *function
An if statement with count.
const char * getclipboard()
Get UTF-8 text from the clipboard.
int isdebug()
query this psd is on debug mode
void setclipboard(const char *text)
Put UTF-8 text into the clipboard.
const char * getredeemcode()
get current redeem code
float getzrot(float x1, float y1, float x2, float y2)
get z rotation between vector2d(x1,y1) and vector2d(x2,y2)
const char * getgps()
get a gps location
long getrealtime()
get real time
void pickupclear()
clear pickup buffer.
bool touchid(int touch_id, const char *state)
query touch state by id
void float(const char *name, float value)
define local variable as float
void closeloading()
close loading screen when load psd file
const char * getpackage()
get application package
const char * strtok(const char *string, const char *token="")
Split string into tokens, DON'T USE ',' (comma) as token
const char * getplatform()
get current patform using.
void mul(const char *name, const char *value)
multiply value on variable