GameApi 28
Library used by GameApi Builder tool
Loading...
Searching...
No Matches
test.cpp File Reference
#include "GameApi.hh"
#include "Tasks.hh"
#include <sstream>
#include <fstream>
#include <cmath>
Include dependency graph for test.cpp:

Classes

struct  Envi

Functions

void onload (unsigned int, void *, const char *var)
void onerror (unsigned int, void *, int)
void onprogress (unsigned int, void *, int)
bool find_string (std::string s, std::string s2)
std::string hexify5 (std::string s)
std::string strip_spaces (std::string data)
std::pair< int, std::string > mainloop (Env &e2, EveryApi &ev)
std::string decode (std::string s)
std::string insert_enter (std::string s)
bool check_count (std::vector< std::string > cmd_args, int current_arg, int count)
void set_status (int val, int val_max)
void initialize_low (int flags)
std::string replace_str (std::string s, std::string repl, std::string subst)
void ClearProgress ()
void print_stacktrace ()
void out_of_memory ()
 EM_JS (double, getDevicePixelRatio,(), { return(typeof window !=='undefined' &&window.devicePixelRatio) ? window.devicePixelRatio :2.0;})
IMPORT const char * get_html_directory2 ()
int main (int argc, char *argv[])

Variables

std::vector< std::string > screenshot_filenames
std::vector< float > screenshot_times
std::vector< bool > screenshot_done
std::string code
std::string homepageurl = ""
int call_count =0
bool g_transparent
int g_event_screen_x
int g_event_screen_y
std::string g_platform
bool g_deploy_phase
std::string g_window_href
GameApi::EveryApi * g_everyapi
pthread_t g_main_thread_id
double g_dpr
IMPORT const char * g_html_dir

Function Documentation

◆ check_count()

bool check_count ( std::vector< std::string > cmd_args,
int current_arg,
int count )
Here is the caller graph for this function:

◆ ClearProgress()

void ClearProgress ( )
Here is the caller graph for this function:

◆ decode()

std::string decode ( std::string s)
Here is the caller graph for this function:

◆ EM_JS()

EM_JS ( double ,
getDevicePixelRatio ,
() ,
{ return(typeof window !=='undefined' &&window.devicePixelRatio) ? window.devicePixelRatio :2.0;}  )

◆ find_string()

bool find_string ( std::string s,
std::string s2 )
Here is the caller graph for this function:

◆ get_html_directory2()

IMPORT const char * get_html_directory2 ( )
Here is the caller graph for this function:

◆ hexify5()

std::string hexify5 ( std::string s)

◆ initialize_low()

void initialize_low ( int flags)
Here is the caller graph for this function:

◆ insert_enter()

std::string insert_enter ( std::string s)
Here is the caller graph for this function:

◆ main()

int main ( int argc,
char * argv[] )

◆ mainloop()

std::pair< int, std::string > mainloop ( Env & e2,
EveryApi & ev )
Here is the caller graph for this function:

◆ onerror()

void onerror ( unsigned int ,
void * ,
int  )

◆ onload()

void onload ( unsigned int ,
void * ,
const char * var )

◆ onprogress()

void onprogress ( unsigned int ,
void * ,
int  )

◆ out_of_memory()

void out_of_memory ( )
Here is the caller graph for this function:

◆ print_stacktrace()

void print_stacktrace ( )
Here is the caller graph for this function:

◆ replace_str()

std::string replace_str ( std::string s,
std::string repl,
std::string subst )
Here is the caller graph for this function:

◆ set_status()

void set_status ( int val,
int val_max )
Here is the caller graph for this function:

◆ strip_spaces()

std::string strip_spaces ( std::string data)
Here is the caller graph for this function:

Variable Documentation

◆ call_count

int call_count =0

◆ code

std::string code
Initial value:
=
"BM I1=ev.bitmap_api.chessboard(20,20,8,8,ffffffff,ff880088);\n"
"FB I2=ev.float_bitmap_api.from_green(I1);\n"
"S I3=ev.polygon_api.s_spherical(0,0,0,I2,300,310,0,1);\n"
"BM I4=ev.bitmap_api.loadbitmapfromurl(http://tpgames.org/map.jpg);\n"
"BM I5=ev.bitmap_api.rot90(I4);\n"
"S I6=ev.surface_api.texture(I3,I5);\n"
"P I7=ev.polygon_api.s_sample(I6,200,200);\n"
"MT I8=ev.materials_api.def(ev);\n"
"MT I9=ev.materials_api.web(ev,I8,1.03,2.0,ff000000);\n"
"ML I10=ev.materials_api.bind(I7,I9);\n"
"MN I11=ev.move_api.empty();\n"
"MN I12=ev.move_api.rotatex(I11,3.141);\n"
"MN I13=ev.move_api.rotate(I12,0,10000,0,0,0,0,0,1,628);\n"
"MN I14=ev.move_api.rotatex(I13,2.5);\n"
"ML I15=ev.move_api.move_ml(ev,I10,I14,1,10.0);\n"
"ML I16=ev.mainloop_api.touch_rotate(ev,I15,true,true,0.01,0.01);\n"
"RUN I17=ev.blocker_api.game_window2(ev,I16,false,false,0.0,100000.0);\n"

◆ g_deploy_phase

bool g_deploy_phase
extern

◆ g_dpr

double g_dpr
extern

◆ g_event_screen_x

int g_event_screen_x
extern

◆ g_event_screen_y

int g_event_screen_y
extern

◆ g_everyapi

GameApi::EveryApi* g_everyapi
extern

◆ g_html_dir

IMPORT const char* g_html_dir
extern

◆ g_main_thread_id

pthread_t g_main_thread_id
extern

◆ g_platform

std::string g_platform
extern

◆ g_transparent

bool g_transparent
extern

◆ g_window_href

std::string g_window_href
extern

◆ homepageurl

std::string homepageurl = ""

◆ screenshot_done

std::vector<bool> screenshot_done

◆ screenshot_filenames

std::vector<std::string> screenshot_filenames

◆ screenshot_times

std::vector<float> screenshot_times