GameApi 28
Library used by GameApi Builder tool
Loading...
Searching...
No Matches
GameApi.hh
Go to the documentation of this file.
1
2
3#ifndef GAMEAPI_HH
4#define GAMEAPI_HH
5
6#include "deps.hh"
7#include "Buffer.hh"
8#include "GameApi_low.hh"
9#include <string>
10#include <functional>
11#include <vector>
12#include <map>
13#include <iostream>
14
15int add_block();
16void set_current_block(int id);
18void clear_block(int id);
19
20extern int ELayoutEmpty;
21
22template<class T, class K> class Array;
23
25struct ASyncData;
26struct BufferRef;
27struct MainLoopEnv;
28class LoadStream;
29 class ASyncTask;
31namespace GameApi
32{
33using std::placeholders::_1;
34using std::placeholders::_2;
35using std::placeholders::_3;
36using std::placeholders::_4;
37using std::placeholders::_5;
38using std::placeholders::_6;
39using std::placeholders::_7;
40using std::placeholders::_8;
41using std::placeholders::_9;
42
43 class ShaderApi;
44
45
46struct PinIn { }; // empty class for return type of a function which
47 // sends data to hardware pins, basically opengl pieces.
48template<class T>
49struct PinOut { T data; }; // one-element class that fetches data from pins. Also used for return type of function.
50
51
52
53#undef rad1
54#undef rad2
55
56
57
58#define MAC(name) \
59 struct name { int id;\
60 name(const name &i) : id(i.id) { } \
61 name(const volatile name &i) : id(i.id) { } \
62 name() : id(-1) { } \
63 name(int i) : id(i) { }\
64 name &operator=(const name &i) { id=i.id; return *this; } \
65 volatile name &operator=(volatile name &i) volatile { id=i.id; return *this; } \
66 name* clone() const { if (id!=-1) { return new name(id); } return 0; } \
67 };
68#ifndef PAT_DEFINED
69 MAC(PAT)
70#define PAT_DEFINED 1
71#endif
72 MAC(ZIP)
73 MAC(BS)
74 MAC(US)
75 MAC(CS)
76 MAC(CSI)
77 MAC(TT)
78 MAC(PBO)
79 MAC(SHP)
80 MAC(SHI)
81 MAC(AA)
82 MAC(GC)
83 MAC(GS)
84 MAC(HML)
85 MAC(UV)
86 MAC(AV)
87 MAC(H)
88 MAC(FBU)
89 MAC(FML)
90 MAC(CG)
91 MAC(INP)
92 MAC(IBM)
93 MAC(DS)
94 MAC(SBM)
95 MAC(PN)
96 MAC(DC)
97 MAC(CBB)
98 MAC(CFB)
99 MAC(SI)
100 MAC(PLP)
101 MAC(PLL)
102 MAC(PLF)
103 MAC(PR)
104 MAC(CMD)
105 MAC(FI)
106 MAC(SD)
107 MAC(GI)
108 MAC(FF)
109 MAC(IF)
110 MAC(PF)
111 MAC(SF)
112 struct ARR { int id;
113 ARR(const ARR &i) : id(i.id) { }
114 ARR(const volatile ARR &i) : id(i.id) { }
115 ARR() : id(-1) { }
116 ARR(int i) : id(i) { }
117 ARR &operator=(const ARR &i) { id=i.id; return *this; }
118 volatile ARR &operator=(volatile ARR &i) volatile { id=i.id; return *this; }
119 ARR* clone() const { if (id!=-1) { return new ARR(id); } return 0; }
120 // special functions:
121 // problem: return value should be handle, not int.
122 // problem: e env is not available inside this function?
123 // problem: passing env via ctor is not working, since only id
124 // data member is allowed in handles due to templates in
125 // registration system.
126#if 0
127 int operator[](int i) const {
128 ArrayType t = find_array(e,id);
129 int id2 = t->vec[i];
130 return id2;
131 }
132#endif
133 // problem: return value should be std::vector<GameApi::handle>, not std::vector<int>.
134 // problem: e env is not available inside this function?
135#if 0
136 std::vector<int> operator std::vector<int>()
137 {
138 ArrayType t = find_array(e,id);
139 return t->vec;
140 }
141#endif
142 };
143#if 0
144 // problem: current script doesnt insert convert_bm() calls anywhere.
145 std::vector<GameApi::BM> convert_bm(std::vector<int> vec)
146 {
147 std::vector<GameApi::BM> res;
148 int s = vec.size();
149 for(int i=0;i<s;i++)
150 {
151 GameApi::BM bm; bm.id = vec[i];
152 res.push_back(bm);
153 }
154 return res;
155 }
156#endif
157 MAC(PAR)
158 MAC(CPP)
159 MAC(PTT)
160 MAC(KF)
161 MAC(BLK)
162 MAC(RUN)
163 MAC(EV)
164 MAC(AC)
165 MAC(MX)
166 MAC(Pa)
167 MAC(Va)
168 MAC(AS)
169 MAC(MC)
170 MAC(MS)
171 MAC(MT)
172 MAC(SMT)
173 MAC(TL)
174 MAC(MN)
175 MAC(CP)
176 MAC(DR)
177 MAC(OM)
178 MAC(FO)
179 MAC(WV)
180 MAC(BM)
181 MAC(BMA)
182 MAC(VBM)
183 MAC(BB)
184 MAC(FB)
185 MAC(CBM)
186 MAC(SP)
187 MAC(SA)
188 MAC(PT)
189 MAC(V)
190 struct M { float mat[16]; M(const M &ii) { for(int i=0;i<16;i++) mat[i]=ii.mat[i]; } M() { }}; // matrix
191 MAC(LN)
192 MAC(RM)
193 MAC(IS)
194 MAC(O)
195 MAC(P)
196 MAC(OO)
197 MAC(PP)
198 MAC(PA)
199 MAC(LA)
200 MAC(TN)
201 MAC(SH)
202 MAC(C)
203 MAC(CO)
204 MAC(F)
205 MAC(FA)
206 MAC(Ft)
207 MAC(VF)
208 MAC(PPT)
209 MAC(PSP)
210 MAC(MA)
211 MAC(S)
212 MAC(Vb)
213 MAC(T)
214 MAC(E)
215 MAC(L)
216 MAC(LAY)
217 MAC(MP)
218 MAC(MV)
219 MAC(LL)
220 MAC(ME)
221 MAC(ST)
222 MAC(TY)
223 MAC(PS)
224 MAC(ID)
225 MAC(Str)
226 MAC(Fi)
227 MAC(Op)
228 MAC(D)
229 MAC(Ht)
230 MAC(BF)
231 MAC(VA)
232 MAC(VAA)
233 MAC(VX)
234 MAC(PL)
235 MAC(PLA)
236 MAC(TX)
237 MAC(TXID)
238 MAC(TXA)
239 MAC(TR)
240 MAC(VV)
241 MAC(Q)
242 MAC(DO)
243 MAC(PC)
244 MAC(SV)
245 MAC(FOA)
246 MAC(COV)
247 MAC(LI)
248 MAC(LLA)
249 MAC(FD)
250 MAC(VO)
251 MAC(PTS)
252 MAC(MSA)
253 MAC(PTA)
254 MAC(RD)
255 MAC(FBO)
256 MAC(SM)
257 MAC(TRK)
258 MAC(WAV)
259 MAC(TBUF)
260 MAC(SFO)
261 MAC(W)
262 MAC(WM)
263 MAC(FtA)
264 MAC(ML)
265 MAC(GML)
266 MAC(TF)
267 MAC(SHC)
268 template<class T>
269 struct A { int id; };
270 MAC(EX)
271 MAC(PH)
272 MAC(TS)
273 MAC(CT)
274 MAC(CC)
275 MAC(IM)
276 MAC(FFi)
277 MAC(VFi)
278 MAC(MB)
279 MAC(PKG)
280 MAC(ATT)
281 MAC(CX)
282 MAC(OVX)
283 MAC(PM)
284 MAC(PV)
285 MAC(FS)
286 struct TRB { int id; }; // g_resize_transfer_id+g_anim_transfer_id, both included
287 struct TRR { int id; }; // g_resize_transfer_id
288 struct TRA { int id; }; // g_anim_transfer_id
289#undef MAC
290
291 //template<class T>
292 //struct E { int id; };
293 //struct A { int id; };
294
295
296 struct EveryApi;
297 std::vector<PTS> arr_to_pts_arr(EveryApi &ev, ARR a);
298
299
301{
302 std::vector<std::string> names;
303 std::vector<std::string> values;
304 std::map<std::string, int> envmap;
305 std::vector<int> env; // contains indexes to EnvImpl/all vectors
306};
307
308
309
310 template<class P, class R>
312 {
313 public:
314 virtual R Map(P p) const=0;
315 };
316
317 class Env;
318 struct EveryApi;
319
320#ifdef WINDOWS
321#ifdef GAMEAPI_EXPORTS
322#define IMPORT __declspec(dllexport)
323#else
324#define IMPORT __declspec(dllimport)
325#endif
326#define EXPORT
327#else
328
329#ifdef GAMEAPI_EXPORTS
330#define IMPORT __attribute__((visibility("default")))
331#else
332#define IMPORT
333#endif
334#define EXPORT
335
336
337 /*
338#ifndef __clang__
339#define IMPORT
340#define EXPORT
341#else
342#ifdef GAMEAPI_COMPILATION
343#define IMPORT __declspec(dllexport)
344#define EXPORT __declspec(dllexport)
345#else
346#define IMPORT
347#define EXPORT
348#endif
349#endif
350 */
351#endif
352
353 IMPORT std::pair<int,std::string> execute_codegen(Env &e2, EveryApi &ev, std::string text, ExecuteEnv &e);
354
355
356 int register_cache_deleter(void (*fptr)(void*), void *data);
358
359
360 class ASyncVec;
361class Env
362{
363public:
364 IMPORT Env();
365 IMPORT void free_memory();
366 IMPORT void print_dependencies(int num);
367 IMPORT std::vector<int> store_counts();
368 IMPORT void free_to_counts(std::vector<int> vec);
370 IMPORT void async_load_url(std::string url, std::string homepage, bool nosize=false);
371 IMPORT void async_load_all_urls(std::vector<std::string> urls, std::string homepage);
372 IMPORT void async_load_callback(std::string url, void (*fptr)(void*), void *data);
375 IMPORT void async_rem_callback(std::string url);
377 IMPORT int add_to_download_bar(std::string filename);
378 IMPORT int download_index_mapping(int index);
379 IMPORT int download_bar_count() const;
380 //IMPORT std::vector<unsigned char> *get_download_bar_item(int i) const;
381 IMPORT void set_download_data(int i, const std::vector<unsigned char> &file);
382 IMPORT void set_download_progress(int i, float percentage);
383 IMPORT void set_download_ready(int i);
384 IMPORT std::string get_download_bar_filename(int i) const;
385 IMPORT float get_download_bar_progress(int i) const;
386 IMPORT bool get_download_bar_ready(int i) const;
388
389 IMPORT int start_async(ASyncTask *task);
390 IMPORT int async_mapping(int index);
391 IMPORT void remove_async(int i);
392 IMPORT void async_scheduler();
393
394 // persistent store
395 IMPORT void store_file(std::string filename, ASyncVec *vec);
396 IMPORT bool store_file_exists(std::string filename);
397 IMPORT void load_file(std::string filename, void (*fptr)(void*), void*, bool &success);
398 IMPORT ASyncVec *load_file_result(std::string filename);
399 IMPORT void load_file_clean(std::string filename);
400
401 IMPORT ~Env();
402 IMPORT static Env *Latest_Env();
403private:
404 Env(const Env &);
405 void operator=(const Env &);
406public:
407 void *envimpl;
408 friend struct EnvImpl;
409};
410#if 0
411class SoundApi
412{
413public:
414 SoundApi(Env e) : e(e) { }
415 SD physical_key_press(ML ml, WVI wv);
416private:
417 Env &e;
418};
419#endif
420
422{
423public:
425 IMPORT BLK game_window(EveryApi &ev, ML ml, bool logo, bool fpscounter, float start_time, float duration);
426 IMPORT BLK game_seq(EveryApi &ev, std::vector<BLK> vec);
427 IMPORT void run(BLK blk);
429 IMPORT RUN game_window2(EveryApi &ev, ML ml, bool logo, bool fpscounter, float start_time, float duration);
430 IMPORT RUN game_window_2nd_display(EveryApi &ev, ML ml, bool logo, bool fpscounter, float start_time, float duration);
431 IMPORT RUN vr_window(EveryApi &ev, ML ml, bool logo, bool fpscounter, float start_time, float dura, bool invert, bool translate);
432 IMPORT ML vr_submit(EveryApi &ev, TXID left, TXID right);
433 IMPORT ML vr_submit_ml(EveryApi &ev, ML ml, TXID left, TXID right, bool invert, bool translate);
434 IMPORT void run2(EveryApi &ev, RUN spl);
435 IMPORT RUN run_seq(EveryApi &ev, std::vector<RUN> vec);
436private:
437 Env &e;
438};
439
440#ifdef F_MAINLOOP_API
442{
443public:
446 IMPORT void call_execute_hack(ML ml);
447 IMPORT ML double_instancing(EveryApi &ev, P p, PTS static_inst, PTS real_inst, MT mat);
448 IMPORT ML double_instancing_matrix(EveryApi &ev, P p, MS static_ms, MS real_ms, MT mat);
449 IMPORT ML AI_modified(EveryApi &ev, ML ml, std::string url);
450 IMPORT ML AI_generated(EveryApi &ev, ML ml, std::string url);
451 IMPORT ML web_link(EveryApi &ev, ML item, ML highlighted_item, float pt_x, float pt_y, float pt_z, float radius, std::string url);
454 IMPORT ML random_game_seq(float time_step,MN mn,std::vector<ML> true_vec,std::vector<ML> false_vec,float perc,int num_levels);
455 //IMPORT ML reload_ml(void *next, P p, std::string name, int phase, P default_p, void *default_p_material, PTS pts, MS ms);
456 IMPORT ML progress_bar_config(ML ml, bool progress_impl, bool max_impl, bool install_impl, float mult_ems0, float mult_ems1, float mult_ems2, float mult_builder);
457 IMPORT TF tf_join(EveryApi &ev, TF tf);
458 IMPORT ML ogl_set_frame_rate(ML ml, int fps);
459 IMPORT float get_frame_time() const;
464 IMPORT bool is_gltf_animated(EveryApi &ev, TF tf);
465 ML mesh_anim_2(std::vector<P> time_range_start_mesh_array,
466 std::vector<P> time_range_end_mesh_array,
467 std::vector<MN> moves_array,
468 std::vector<MT> materials_array,
469 std::vector<MS> matrix_array_arrays,
470 std::vector<IF> state_machines,
471 //std::vector<float> *optional_time_range_duration // probably needs to be implemented using ENUM in builder.
472 std::string optional_time_range_duration_array_with_separators_float,
473 std::string url_to_mp_file
474 );
475
477 std::string a_script_url,
478 std::string a_param1,
479 std::string a_param2,
480 std::string a_param3,
481 std::string a_param4,
482 std::string a_param5,
483 std::string b_script_url,
484 std::string b_param1,
485 std::string b_param2,
486 std::string b_param3,
487 std::string b_param4,
488 std::string b_param5,
489 std::vector<float> *optional_time_range_duration);
491 std::string script_url,
492 std::string param1,
493 std::string param2,
494 std::string param3,
495 std::string param4,
496 std::string param5
497 );
498 ML cmb_glb_3d_interpolate(GameApi::EveryApi &ev, std::vector<GameApi::TF> tf_arr,
499 // Material properties
500 int material_id, float mix, float self_mult, float rest_mult, float light_dir_x, float light_dir_y, float light_dir_z,
501 // Animation properties
502 int skin_num, int animation, int num_timeindexes, MT next, int key, std::string keys, int mode, int inst, int timeid);
503
504
505
506
507 GameApi::ML glb_to_download_bar(TF tf, std::string filename);
508 GameApi::ML logo_change(ML ml, BM conn, BM download, BM prepare);
510
511
512 GameApi::ML lod_anim(GameApi::EveryApi &ev, GameApi::TF tf, GameApi::PTS pts, float level1, float level2, float level3, float level4, int l1, int l2, int l3, int l4, float mix, float self_mult, float rest_mult, int mode, std::string keys, float light_dir_x, float light_dir_y, float light_dir_z, float border_width, unsigned int border_color, bool transparent, bool acesfilm, int start_anim_seq, bool emissive, int frame_skip);
513 GameApi::ML lod_anim_matrix(GameApi::EveryApi &ev, GameApi::TF tf, GameApi::MS ms, float level1, float level2, float level3, float level4, int l1, int l2, int l3, int l4, float mix, float self_mult, float rest_mult, int mode, std::string keys, float light_dir_x, float light_dir_y, float light_dir_z, float border_width, unsigned int border_color, bool transparent, bool acesfilm, int start_anim_seq, bool emissive, int frame_skip);
514
515
516
517 GameApi::ML lod_pts_tf(GameApi::EveryApi &ev, GameApi::TF p, GameApi::PTS pts, float level1, float level2, float level3, float level4, int l1, int l2, int l3, int l4, float mix, float selt_mult, float rest_mult, int mode, float light_dir_x, float light_dir_y, float light_dir_z, float border_width, unsigned int border_color, bool transparent, bool acesfilm, float start_brightness, float end_brightness, bool emissive);
518
519 GameApi::ML lod_matrix_tf(GameApi::EveryApi &ev, GameApi::TF p, GameApi::MS ms, float level1, float level2, float level3, float level4, int l1, int l2, int l3, int l4, float mix, float selt_mult, float rest_mult, int mode, float light_dir_x, float light_dir_y, float light_dir_z, float border_width, unsigned int border_color, bool transparent, bool acesfilm, float start_brightness, float end_brightness, bool emissive);
520 GameApi::ML lod_gpu(GameApi::EveryApi &ev, GameApi::P p, GameApi::MT mat, GameApi::PTS pts, float level1_tri, /*float level1_quad, float level1_polygon,*/ float level2_tri, /*float level2_quad, float level2_polygon,*/ float level3_tri, /*float level3_quad, float level3_polygon,*/ float level4_tri, /*float level4_quad, float level4_polygon,*/ int l1, int l2, int l3, int l4);
521
522
523 GameApi::ML lod_gpu_matrix(GameApi::EveryApi &ev, GameApi::P p, GameApi::MT mat, GameApi::MS ms, float level1_tri, float level1_quad, float level1_polygon, float level2_tri, float level2_quad, float level2_polygon, float level3_tri, float level3_quad, float level3_polygon, float level4_tri, float level4_quad, float level4_polygon, int l1, int l2, int l3, int l4);
524 GameApi::ML lod_gpu_pts_tf(GameApi::EveryApi &ev, GameApi::P p, GameApi::MT mat, GameApi::PTS pts, float level1_tri, /*float level1_quad, float level1_polygon*/ float level2_tri, /*float level2_quad, float level2_polygon*/ float level3_tri, /*float level3_quad, float level3_polygon*/ float level4_tri, /*float level4_quad, float level4_polygon*/ int l1, int l2, int l3, int l4, float mix, float self_mult, float rest_mult, int mode, float light_dir_x, float light_dir_y, float light_dir_z, float border_width, unsigned int border_color, bool transparent, bool acesfil, float start_brightness, float end_brightness);
525
526 GameApi::ML lod_gpu_matrix_tf(GameApi::EveryApi &ev, GameApi::P p, GameApi::MT mat, GameApi::MS pts, float level1_tri, /*float level1_quad, float level1_polygon*/ float level2_tri, /*float level2_quad, float level2_polygon*/ float level3_tri, /*float level3_quad, float level3_polygon*/ float level4_tri, /*float level4_quad, float level4_polygon*/ int l1, int l2, int l3, int l4, float mix, float self_mult, float rest_mult, int mode, float light_dir_x, float light_dir_y, float light_dir_z, float border_width, unsigned int border_color, bool transparent, bool acesfil, float start_brightness, float end_brightness);
527
528 IMPORT ML lod_matrix(EveryApi &ev, P p, MT mat, MS ms,float level1, float level2, float level3, float level4, int l1, int l2, int l3, int l4);
529 IMPORT ML lod(EveryApi &ev, P p, MT mat, PTS pts, float level1, float level2, float level3, float level4, int l1, int l2, int l3, int l4);
530 IMPORT ML gltf_mesh_all_inst( EveryApi &ev, TF model0, float mix, float light_dir_x, float light_dir_y, float light_dir_z, int skin_id );
531 IMPORT ARR gltf_mesh_all_parr( EveryApi &ev, TF model0, float mix, float light_dir_x, float light_dir_y, float light_dir_z, int skin_num );
532 IMPORT ARR gltf_mesh_all_msarr( EveryApi &ev, TF model0, int skin_num );
533 IMPORT ARR gltf_mesh_all_parr_msarr( EveryApi &ev, TF model0, float mix, float light_dir_x, float light_dir_y, float light_dir_z,int skin_num );
534 IMPORT std::vector<GameApi::MT> gltf_mesh_all_parr_mat( EveryApi &ev, TF model0, float mix, float light_x, float light_y, float light_z, int skin_num);
535 IMPORT ML bindinst_parr_msarr( EveryApi &ev, std::vector<P> parr, std::vector<MS> msarr, std::vector<MT> mat );
536 IMPORT PTS bytestore_pts(BS bs, PTS pts, char disable_char, char enable_char, bool default_is_enable);
537 IMPORT ML bytestore_render(EveryApi &ev, BS bs, std::vector<ML> mls, std::string url, float delta_x, float delta_y);
538 IMPORT BS string_bytestore(std::string s);
539 IMPORT ML bytestore_timing(BS store, int ch, std::string s, float time_delta);
540 IMPORT ML bytestore_array(EveryApi &ev, BS store, std::string url, float delta_time);
542 IMPORT ML if_keys(ML ml, IF fetcher, std::string keys);
543 IMPORT void save_glb_store(EveryApi &ev, std::string filename, TF tf);
544 IMPORT ML shader_cache_disable(ML ml, bool disable);
545 IMPORT void step();
549 IMPORT ML turn_to_meters(EveryApi &ev, ML ml, float sx1,float sx2, float sy1,float sy2, float sz1,float sz2);
550 IMPORT void check_glerrors(std::string context);
551 IMPORT HML load_zip2(EveryApi &ev, std::string zip_url);
552 IMPORT HML load_zip_assets2(std::string zip_url);
553 IMPORT ML load_zip(EveryApi &ev, std::string zip_url);
554 IMPORT ML load_zip_assets(std::string zip_url);
556 IMPORT ML hires_ml(EveryApi &ev, ML I3, int size, int numsamples, float blur_radius);
557 IMPORT ML render_txid(EveryApi &ev, P p1, TXID I7, int size);
558 IMPORT ML android_resize(EveryApi &ev, ML ml, float mult);
559 //IMPORT ML gltf_material_nop_resize(EveryApi &ev, TF tf, int mesh_index, int prim_index, float mix);
560 //IMPORT ML prim_render(EveryApi &ev, TF tf, int mesh_index, int prim_index, std::vector<GameApi::BM> bm, std::vector<int> types, std::vector<std::string> id_labels);
561 //IMPORT ML mesh_render(EveryApi &ev, TF tf, int mesh_index, std::vector<BM> bm, std::vector<int> types, std::vector<std::string> id_labels);
562 //IMPORT ML gltf_material_nop(EveryApi &ev, TF tf, int mesh_index, int prim_id, float mix);
563 //IMPORT ML gltf_material_mesh(EveryApi &ev, TF tf, int mesh_index, float mix);
564 //IMPORT ML gltf_node2(EveryApi &ev, TF tf, int node_id, float mix);
565 //IMPORT ML gltf_scene2(EveryApi &ev, TF tf, int scene_id, float mix);
570 IMPORT TT timing_start();
571 IMPORT TT timing_event(IF fetch, TT timing, ML show);
572 IMPORT TT timing(float duration, TT link, ML show);
573 IMPORT TT array_timing_chain(TT prev, float start_time, std::string durations, std::vector<ML> vec);
574 IMPORT ML array_timing_chain_ml(float start_time, std::string durations, std::vector<ML> vec, int repeat);
575 IMPORT ML array_timing_chain_key_ml(EveryApi &ev, int key, float time_after_key, std::string durations, std::vector<ML> vec, int repeat);
576 IMPORT TT current_time(TT prev);
577 IMPORT TT t_repeat(TT prev, TT curr_to_repeated, int count);
578 IMPORT TT timing_switch(EveryApi &ev, float duration, TT link, ML show, ML show2, int switch_dir);
581 IMPORT ML game(EveryApi &ev, int tile_sx, int tile_sy, std::string url, std::string url2, std::string url3,std::string url4, std::string tiles_string, std::string tiles_string2, int start_pos_x, int start_pos_y, int player_start_tile, int player_end_tile, BM tile_bm, BM player_bm, BM ruohikko_bm, BM corn_bm, BM vesisade_bm, BM jump_bm, FI font, BM status_bm, BM splash, std::vector<BM> item_types, std::vector<BM> enemy_types, BM weapon_bm, std::vector<BM> enemy_child_death,BM aku_death);
582 IMPORT W pts_world(PTS p, int type);
583 IMPORT CX cache_one(P p, MT mt);
584 IMPORT CX array_cache(std::vector<CX> vec);
585 IMPORT CX subworld(CX c, W w, int start_block, int end_block);
586 IMPORT W array_world(std::vector<W> vec);
587 IMPORT ML load_midi(EveryApi &ev, ML next, std::string url, std::string url_patchset);
590 IMPORT ARR gltf_mesh_all_p_arr(GameApi::EveryApi &ev, TF model0,float light_dir_x, float light_dir_y, float light_dir_z, bool transparent, bool emissive, int lod_level);
591 IMPORT ARR gltf_mesh_all_mt_arr( EveryApi &ev, TF model0, float mix, float self_mult, float rest_mult,float light_dir_x, float light_dir_y, float light_dir_z, bool transparent, bool emissive, int lod_level);
593 IMPORT TF glb_load_sketchfab_zip(std::string url_to_zip);
594 IMPORT TF gltf_load_sketchfab_zip(std::string url_to_zip);
595 IMPORT ML vr_scale(ML ml, float);
597 IMPORT ML print_deps(ML ml, int num);
598 IMPORT ML screenspace_rendering(EveryApi &ev, ML scene, SMT screenspace_material);
599 IMPORT ARR load_shader2(std::string vertex_url, std::string fragment_url);
600 IMPORT SHC load_shader(std::string shader_url);
601 IMPORT SHI generic_anim_shader2(EveryApi &ev, SHP params, std::string funcname, SHC code, std::vector<SHI> children);
602 IMPORT void make_current();
603 IMPORT SHP constant_shp_f(SHP next, int num, float value);
604 IMPORT SHP constant_shp_i(SHP next, int num, int value);
605 IMPORT SHP constant_shp_u(SHP next, int num, unsigned int value);
606 IMPORT SHP constant_shp_p3d(SHP next, int num, PT value);
607 IMPORT SHP constant_shp_uvw(SHP next, int num, PT value);
608 IMPORT SHP timed_shp_f(float start_time, float end_time, SHP next, int num, float start_value, float end_value);
609 IMPORT SHP timed_shp_i(float start_time, float end_time, SHP next, int num, int start_value, int end_value);
610 IMPORT SHP timed_shp_u(float start_time, float end_time, SHP next, int num, unsigned int start_value, unsigned int end_value);
611 IMPORT SHP timed_shp_p3d(float start_time, float end_time, SHP next, int num, PT start_value, PT end_value);
612 IMPORT SHP timed_shp_uvw(float start_time, float end_time, SHP next, int num, PT start_value, PT end_value);
613 IMPORT ML save_deploy(HML h, std::string filename, GameApi::EveryApi &ev);
614 IMPORT ML save_deploy2(EveryApi &ev, RUN run, std::string homepage, bool is_in_arr, std::string filename);
615 IMPORT ML save_script(HML h, std::string filename);
616 IMPORT HML html_url(std::string url);
617 IMPORT SHI empty_shaderI();
618 IMPORT SHI phong_vertex(SHI next);
619 IMPORT SHI phong_fragment(SHI next, unsigned int ambient, unsigned int highlight, float pow);
620 IMPORT ML phong_shader3(EveryApi &ev, ML ml, unsigned int ambient, unsigned int highlight, float pow);
621 IMPORT SHP empty_shp();
622 IMPORT ML generic_shader_fragment_only(EveryApi &ev, ML ml, SHI fragment, std::vector<TXID> vec);
623 IMPORT ML generic_shader(EveryApi &ev, ML ml, SHI vertex, SHI fragment, std::vector<TXID> vec);
624 IMPORT SHI generic_anim_shader(SHP,std::string, std::string, std::vector<SHI> children);
625 IMPORT ML save_gltf(TF tf, std::string filename);
626 IMPORT TF gltf_loadKK(std::string base_url, std::string url);
627 IMPORT TF gltf_loadKK2(std::string url);
628 IMPORT ML send_key_at_time(ML ml, float time, int key);
634 IMPORT ML perspective(EveryApi &ev, ML next, float mult, float front_plane, float end_plane);
635 IMPORT ML anim_ML(EveryApi &ev, std::string url, std::string p1, std::string p2, std::string p3, std::string p4, std::string p5, IF dyn);
636 IMPORT ML glClear(EveryApi &ev, unsigned int color);
637 IMPORT GS game_state();
638 IMPORT ML gs_mouse_pos(GS gs, ML ml, int x, int y);
639 IMPORT ML gs_obj_pos(GS gs, ML ml, int x, int y, int z);
640 IMPORT ML gs_delta(GS gs, ML ml, int p, int n, float delta);
641 IMPORT ML gs_time(GS gs, ML ml, int t);
642 IMPORT ML gltf_mesh_all_env(EveryApi &ev, TF model0, BM diffuse, BM specular, BM bfrd, float mix);
644 IMPORT ML async_gltf(ML ml, TF tf);
645 IMPORT ML tunnel_tree(EveryApi &ev, std::vector<P> faces, std::vector<MN> moves, std::string url, MT mat2);
646 IMPORT ML edit_3d(EveryApi &ev, P p, float radius);
648 //ML gltf_joint_matrices(EveryApi &ev, LoadGltf *load, int skin_num, int animation, int time_index, ML next);
649 IMPORT ML choose_ml_from_status(ML connect, ML download, ML prepare);
650 IMPORT ML key_ml(std::vector<ML> vec, std::string keys);
651 IMPORT ML async_url(std::string url, ML ml);
652 IMPORT ARR gltf_anim_skeleton(EveryApi &ev, TF model0, int skin_num, int animation, int channelk, int num_keyframes);
653 IMPORT P gltf_scene_p(GameApi::EveryApi &ev, TF model0, int scene_id);
654 IMPORT ML memmap_window2(EveryApi &ev, std::string url);
655 IMPORT ML memmap_window3(EveryApi &ev, std::string url_1, std::string url_2, std::string url_3, std::string url_4, std::string url_5, std::string url_6);
656 IMPORT ML ml_load_um(EveryApi &ev, std::string url);
658 IMPORT PKG load_um(DS st);
659 IMPORT MB network(std::string url, std::string homapge);
660 IMPORT BM img_decode(MB memblock);
661
666 IMPORT ML random_instantiate(EveryApi &ev, ML ml, std::vector<MN> vec, float start_time, float time_step, float random_chance);
668 IMPORT ML isometric(ML ml, float y_angle, float x_angle, float translate);
671 IMPORT ML dyn(D d);
675 IMPORT ML bind_obj_type(std::string name, GameApi::P obj, GameApi::MN move, GameApi::MT mat, float radius);
677 IMPORT ML read_obj_pos(std::string url);
678 IMPORT ML parse_areatype(EveryApi &ev, std::string url, GameApi::FB heightmap, GameApi::BM top_texture, GameApi::BM side_texture);
679 IMPORT ML create_landscape(EveryApi &ev, std::string url);
680 IMPORT ML create_objs(EveryApi &ev, int area_id);
681 IMPORT HML emscripten_frame(EveryApi &ev, RUN r, std::string homepage);
682 IMPORT HML emscripten_frame2(EveryApi &ev, RUN r, std::string homepage, bool is_envparams_arr=false);
683 IMPORT HML emscripten_frame2_ML(EveryApi &ev, ML ml, std::string homepage);
684 IMPORT HML emscripten_frame2_P(EveryApi &ev, P p, std::string homepage);
685 IMPORT HML emscripten_frame2_MN(EveryApi &ev, MN mn, std::string homepage);
686 IMPORT HML emscripten_frame2_MT(EveryApi &ev, MT mt, std::string homepage);
687 IMPORT void init_window(int screen_width = 800, int screen_height=600, std::string window_title="meshpage.org -- the next technology level for web", bool vr_init=false);
688 IMPORT void init(SH sh, int screen_width = 800, int screen_height = 600);
689 IMPORT void init_3d(SH sh, int screen_width = 800, int screen_heigth = 600);
690 IMPORT void nvidia_init();
692 IMPORT void clear(unsigned int col = 0xff000000);
694 IMPORT void clear_3d(unsigned int col = 0xff000000);
695 IMPORT void switch_to_3d(bool b, SH sh, int screen_width=800., int screen_height = 600);
696 IMPORT ML restart_game(EveryApi &ev, ML ml, int key);
697 IMPORT ML matrix_range_check(EveryApi &ev, ML ml, ML ml2, std::string url); // this uses restart_game.
698 IMPORT LI gltf_skeleton(EveryApi &ev, TF model0, int start_node);
699 IMPORT ML gltf_mesh( EveryApi &ev, TF model0, int mesh_id, int skin_id, std::string keys, float mix, float self_mult, float rest_mult, int mode, float light_dir_x, float light_dir_y, float light_dir_z, int animation, float border_width, unsigned int border_color, bool acesfilm, bool emissive, int frame_skip, int lod_level );
700 IMPORT ML gltf_mesh_all( EveryApi &ev, TF model0, float mix,float self_mult, float rest_mult,int mode, float light_dir_x, float light_dir_y, float light_dir_z, float border_width, unsigned int border_color, bool transparent, bool acesfilm, bool emissive, int lod_level );
701 IMPORT ML gltf_mesh_all_inst2( EveryApi &ev, TF model0, TF resize_obj, PTS pts, float mix,float self_mult, float rest_mult,int mode, float light_dir_x, float light_dir_y, float light_dir_z, float border_width, unsigned int border_color, bool transparent, bool acesfilm, std::string keys, bool emissive, int lod_level );
702
703 IMPORT ML gltf_mesh_all_inst_matrix( EveryApi &ev, TF model0, TF resize_obj, MS ms, float mix,float self_mult, float rest_mult,int mode, float light_dir_x, float light_dir_y, float light_dir_z, float border_width, unsigned int border_color, bool transparent, bool acesfilm, std::string keys, bool emissive, int lod_level );
704 IMPORT ML gltf_mesh_all_anim( EveryApi &ev, TF model0, float mix, float self_mult, float rest_mult, int mode, std::string keys, float light_dir_x, float light_dir_y, float light_dir_z, float border_width, unsigned int border_color, bool transparent, bool acesfilm, int start_anim_seq, bool emissive, int frame_skip, int lod_level);
705 IMPORT ML gltf_mesh_all_anim_inst( EveryApi &ev, TF model0, TF resize_obj, PTS ms, float mix, float self_mult, float rest_mult, int mode, std::string keys, float light_dir_x, float light_dir_y, float light_dir_z, float border_width, unsigned int border_color, bool transparent, bool acesfilm, bool emissive, int frame_skip, int lod_level );
706 IMPORT ML gltf_mesh_all_anim_inst_matrix( EveryApi &ev, TF model0, TF resize_obj, MS ms, float mix, float self_mult, float rest_mult, int mode, std::string keys, float light_dir_x, float light_dir_y, float light_dir_z, float border_width, unsigned int border_color, bool transparent, bool acesfilm, bool emissive, int anim_skip, int lod_level );
707 IMPORT ML gltf_node( EveryApi &ev, TF model0, int node_id, std::string keys, float mix, float self_mult, float rest_mult, int mode, float light_dir_x, float light_dir_y, float light_dir_z, int animation, float border_width, unsigned int border_color, bool transparent, bool acesfilm, bool emissive, int frame_skip, int lod_level );
708 IMPORT ML gltf_scene( EveryApi &ev, TF model0, int scene_id, std::string keys , float mix,float self_mult,float rest_mult,int mode, float light_dir_x, float light_dir_y, float light_dir_z, int animation , float border_width, unsigned int border_color, bool transparent, bool acesfilm, bool emissive, int frame_skip, int lod_level );
709 //IMPORT ML gltf_anim( EveryApi &ev, std::string base_url, std::string url, int animation, int channel, int mesh_index, int prim_index, MT mat );
710 IMPORT ML gltf_anim2( EveryApi &ev, TF model0, int animation, int channel);
711 IMPORT ML gltf_anim4( EveryApi &ev, TF model0, int animation, int channel, float mix, float self_mult, float rest_mult, int mode, float light_dir_x, float light_dir_y, float light_dir_z, float border_width, unsigned int border_color, bool acesfilm, bool emissive, int frame_skip, int lod_level);
712 IMPORT ML gltf_scene_anim(EveryApi &ev, TF model0, int scene_id, int animation, std::string keys, float mix, float self_mult, float rest_mult,int mode, float light_dir_x, float light_dir_y, float light_dir_z, float border_width, unsigned int border_color, bool transparent, bool acesfilm, bool emissive, int frame_skip, int lod_level);
715 IMPORT ML activate_item(ML ml, ML def);
716 IMPORT ML activate_array(std::vector<ML> vec);
717 IMPORT ARR activate_arr_arr(std::vector<ML> arr);
718 IMPORT ML slow_activate_item(ML ml,int i);
719 IMPORT BM framebuffer_bitmap(FBU framebuffer);
720 IMPORT ML display_background(EveryApi &ev, ML ml, bool is_logo=false);
721 IMPORT ML small_window(EveryApi &ev, ML ml, int x, int y, int sx, int sy);
722 IMPORT ML drag_drop_area(EveryApi &ev, ML mainloop, RUN (*fptr)(Env &e, EveryApi &ev, std::string filename));
725 //IMPORT ML looking_glass(EveryApi &ev, ML ml);
726 //IMPORT TXID looking_glass_txid(EveryApi &ev, ML ml);
727 //IMPORT ML looking_glass_lib(TXID id, int sx, int sy, int x, int y);
728 IMPORT ML looking_glass_full(EveryApi &ev, ML ml, float amount, int mode, int start, int end);
729 IMPORT void alpha(bool enabled);
730 void alpha_1(bool enabled);
731 IMPORT void depth_test(bool enabled);
732 IMPORT void transparency(bool enabled);
733 IMPORT void cursor_visible(bool enabled);
734 IMPORT void antialias(bool enabled);
735 IMPORT void outline_first();
736 IMPORT void outline_second();
737 IMPORT void outline_third();
738 IMPORT void outline_disable();
739 //IMPORT void reset_time();
740 IMPORT float get_time();
741 IMPORT void advance_time(float val);
742 IMPORT float get_delta_time();
743 IMPORT void reset_time();
744 IMPORT int get_framenum();
745 IMPORT void swapbuffers();
746 IMPORT void finish();
748 IMPORT void fpscounter_init();
752 IMPORT float fpscounter(bool print=true);
753 IMPORT ML fps_display(EveryApi &ev, ML ml, std::string font);
754 IMPORT ML score_display(EveryApi &ev, ML ml, std::string font);
755 IMPORT ML time_display(EveryApi &ev, ML ml, std::string font, float start_time);
756
757 IMPORT UV face_fetcher(P p, int facenum);
758 IMPORT void profile(std::string label, bool start);
759 IMPORT void print_profile();
760 IMPORT void delay(int ms);
761 IMPORT unsigned int random();
762 IMPORT unsigned int rand_max();
763 IMPORT PT random_point_3d(float start_x, float end_x,float start_y, float end_y,float start_z, float end_z);
764 IMPORT PT random_point_2d(float start_x, float end_x,float start_y, float end_y,float z);
765 IMPORT V random_dir_vector_2d_xy(float length);
766 IMPORT V random_dir_vector_2d_xz(float length);
767 IMPORT V random_dir_vector_3d(float length);
770 IMPORT void set_corner(int x, int y, int screen_sx, int screen_sy);
771 IMPORT int get_corner_x();
772 IMPORT int get_corner_y();
775 IMPORT int get_screen_sx();
776 IMPORT int get_screen_sy();
777 IMPORT void set_screen_size(int sx, int sy);
778 IMPORT void set_viewport(int x, int y, int sx, int sy);
779
780 IMPORT bool logo_iter();
783 IMPORT bool seamless_iter();
786 IMPORT ML restart_screen(EveryApi &ev, ML ml, std::string fontname);
787 IMPORT ML save_ds_ml(EveryApi &ev, std::string output_filename, P p, bool disable_normal, bool disable_color, bool disable_texcoord, bool disable_texcoord3, bool disable_objects);
788 IMPORT void save_ds_store(std::string filename, DS ds);
789 IMPORT void save_png_store(std::string filename, BM bm);
790 struct Event
791 {
792 int type=-1;
793 int ch=-1;
795 int button=-1;
797 bool joy0_button0=false;
798 bool joy0_button1=false;
799 bool joy0_button2=false;
800 bool joy0_button3=false;
801
802 bool joy1_button0=false;
803 bool joy1_button1=false;
804 bool joy1_button2=false;
805 bool joy1_button3=false;
806
819
820 int joy0_ball0 = 0;
821 int joy0_ball1 = 0;
822 int joy1_ball0 = 0;
823 int joy1_ball1 = 0;
824
825
826 bool last=false;
827 std::string drag_drop_filename="";
828 int repeat = 0;
829 };
831 IMPORT bool ch_doubletap_detect(Event &e, int exprire_timer_count, int ch, DoubleTapState &state);
835 IMPORT void execute_ml(EveryApi &ev, ML ml, SH color, SH texture, SH texture_2d, SH arr_texture, M in_MV, M in_T, M in_N, int screen_width, int screen_height);
836 IMPORT void event_ml(ML ml, const Event &e);
837 IMPORT ML array_ml(GameApi::EveryApi &ev, std::vector<ML> vec);
838 IMPORT ML slow_start_array_ml(GameApi::EveryApi &ev, std::vector<ML> vec, int max_ticks);
841 IMPORT FML array_fml(std::vector<FML> vec);
842 //IMPORT ML timing_ml(std::vector<ML> vec, float duration);
843 IMPORT ML dyn_points(EveryApi &ev, ML ml, MN move, int pointnum, float pos_x, float pos_y, float pos_z);
844 IMPORT ML seq_ml(std::vector<ML> vec, float time);
845 IMPORT ML seq_ml_score(ML ml1, ML ml2, int score);
846 IMPORT ML timed_tmp_seq_ml(ML curr, ML end, float start_time, float end_time, float show_duration, int key);
847 IMPORT ML collision_seq_ml(ML curr, ML end, std::string obj1, std::string obj2, float show_duration);
848 IMPORT ML collision_gen_key(ML curr, std::string obj1, std::string obj2, int key, float duration);
849 IMPORT ML collision_detection(EveryApi &ev,float player_size,float enemy_size, ML normal_game_screen, ML gameover_screen);
850
851 IMPORT M in_MV(EveryApi &ev, bool is_3d);
852 IMPORT M in_T(EveryApi &ev, bool is_3d);
853 IMPORT M in_N(EveryApi &ev, bool is_3d);
854 IMPORT M in_P(EveryApi &ev, bool is_3d);
855 IMPORT std::string get_homepage_url();
856 IMPORT void set_homepage_url(std::string url);
857 IMPORT void set_seamless_url(std::string url);
858
859 IMPORT ML load_song(EveryApi& ev, ML next, std::string url);
860 IMPORT ML skybox(EveryApi &ev, BM land, BM sky); // 100x100 bm's required
861 IMPORT ML scale_2d_screen(EveryApi &ev, ML orig, float sx, float sy);
862 IMPORT ML keyboard_toggle(ML m1, ML m2, int key);
863 IMPORT ML touch_rotate(EveryApi &ev, ML ml, bool leftright, bool topdown, float x_speed, float y_speed);
864 IMPORT P p_script2(EveryApi &ev, HML h, std::string p1, std::string p2, std::string p3, std::string p4, std::string p5);
865 IMPORT P load_P_script(EveryApi &ev, std::string url, std::string p1, std::string p2, std::string p3, std::string p4, std::string p5);
866 IMPORT ARR load_P_script_array(EveryApi &ev, HML hml /*std::string url*/, std::string p1, std::string p2, std::string p3, std::string p4, std::string p5);
867 IMPORT ML load_ML_script(EveryApi &ev, std::string url, std::string p1, std::string p2, std::string p3, std::string p4, std::string p5);
868 IMPORT ML load_ML_script2(EveryApi &ev, HML h, std::string p1, std::string p2, std::string p3, std::string p4, std::string p5);
869 IMPORT ML load_ML_script3(EveryApi &ev, std::string url);
870 IMPORT MN load_MN_script(EveryApi &ev, std::string url, std::string p1, std::string p2, std::string p3, std::string p4, std::string p5);
871 IMPORT MN load_MN_script2(EveryApi &ev, HML h, std::string p1, std::string p2, std::string p3, std::string p4, std::string p5);
872 IMPORT MT load_MT_script(EveryApi &ev, std::string url, std::string p1, std::string p2, std::string p3, std::string p4, std::string p5);
873 IMPORT MT load_MT_script2(EveryApi &ev, HML h, std::string p1, std::string p2, std::string p3, std::string p4, std::string p5);
874
875 IMPORT ARR load_ML_script_array(EveryApi &ev, std::string url, std::string p1, std::string p2, std::string p3, std::string p4, std::string p5);
876 IMPORT BM load_BM_script(EveryApi &ev, std::string url, std::string p1, std::string p2, std::string p3, std::string p4, std::string p5);
877 IMPORT ARR load_BM_script_array(EveryApi &ev, std::string url, std::string p1, std::string p2, std::string p3, std::string p4, std::string p5);
878 IMPORT ARR load_BM_script_array_comb(EveryApi &ev, std::string url, std::string p1, std::string p2, std::string p3, std::string p4, std::string p5);
879 IMPORT ML prepare_pts(ML ml, PTS pts);
880 IMPORT ML depthfunc(ML ml, int val);
881 IMPORT ML depthmask(ML ml, bool b);
882 IMPORT ML blendfunc(ML ml, int val, int val2);
883 IMPORT ML cullface(ML ml, bool b, bool is_gltf);
884 IMPORT ML record_keypresses(ML ml, std::string output_filename);
885 IMPORT ML playback_keypresses(ML ml, std::string input_url);
886 IMPORT ML setup_hmd_projection(EveryApi &ev, ML ml, bool eye, bool is_standard, float n, float f, bool translate);
887
888 IMPORT DS load_ds_from_mem(const unsigned char *buf, const unsigned char *end);
889 IMPORT DS load_ds_from_disk(std::string filename);
890 IMPORT DS load_ds_from_disk_incrementally(std::string filename);
891 IMPORT void save_ds(std::string output_filename, DS ds);
892 IMPORT std::string ds_to_string(DS ds);
893
894 // temp store
895 IMPORT void load_ds_from_temp(std::string filename, void (*fptr)(void*), void *data, bool &success);
896 IMPORT DS load_ds_from_temp2(std::string filename);
897 IMPORT void load_ds_from_temp3(std::string filename);
898
900 IMPORT INP cursor_keys_rotate_move(float speed_rot, float pos_forward, float pos_normal, float pos_backward);
901 IMPORT INP move_sequence(float start_time, float time_per_char, std::string str);
902 IMPORT INP move_speed(INP orig, float speed);
903 IMPORT INP gravity(INP im, IBM bitmap, float start_x, float end_x, float start_y, float end_y, float speed);
904 IMPORT INP move_collision(IBM scene, float start_x, float end_x, float start_y, float end_y, float s_x, float m_x, float e_x, float s_y, float m_y, float e_y, float speed_up, float speed_down, float speed_left, float speed_right, float speed_gravity);
905 IMPORT ML move_in(EveryApi &ev, ML ml, INP in);
906 IMPORT ML score_adder(EveryApi &ev, ML ml, O o, MN transform, int enter_score, int leave_score, int dyn_point, float timeout);
907 IMPORT ML score_adder2(EveryApi &ev, ML ml, O o,PTS points, MN transform, int enter_score, int leave_score, int dyn_point, float timeout, IF fetcher);
908 IMPORT ML score_hidder(EveryApi &ev, ML ml, O o, int max_count);
909 IMPORT IF state_int_fetcher(std::string url, std::string states);
910 IMPORT MN state_speed_movement(MN mn, std::string url, std::string states, std::string x_speeds, std::string y_speeds, std::string z_speeds);
911private:
912 MainLoopApi(const MainLoopApi&);
913 void operator=(const MainLoopApi&);
914 float frame;
915 float time;
916 Env &e;
917 void *priv;
918};
919#endif
920
922{
923public:
924 IMPORT MixedApi(Env &e);
925 // constructing
926 IMPORT MX mx_float(float val);
927 IMPORT MX mx_int(int val);
928 IMPORT MX mx_bool(bool val);
929 IMPORT MX mx_point(float x, float y, float z);
930 IMPORT MX mx_vector(float dx, float dy, float dz);
931 IMPORT MX mx_color(int r, int g, int b, int a);
932 IMPORT MX mx_pair(std::string name, MX val);
933 IMPORT MX mx_string(std::string value);
934 IMPORT MX mx_array(std::vector<MX> vec);
935
936 // accessing
937 IMPORT int mx_size(MX arr);
938 IMPORT MX mx_index(MX arr, int idx);
939 IMPORT MX mx_find(MX arr, std::string name);
940 IMPORT float mx_to_float(MX val, float def=0.0);
941 IMPORT int mx_to_int(MX val, int def=-1);
942 IMPORT std::vector<std::string> mx_names(MX val);
943 IMPORT std::vector<MX> mx_values(MX val);
944private:
945 Env &e;
946};
947
948
949#ifdef F_SPRITE_API
951{
952public:
953 IMPORT SpriteApi(Env &e);
955 IMPORT void spritepos(BM bm, float x, float y);
956 IMPORT void preparesprite(BM bm, int bbm_choose = -1);
957
958 IMPORT VA create_vertex_array(BM bm, bool progress=false, bool textrender=false);
959 IMPORT void clear_arrays(VA va);
961 IMPORT void update_vertex_array(VA va, BM bm);
963 IMPORT void clipping_sprite(VA va, int sx, int sy, float tex_l, float tex_t, float tex_r, float teb_b);
967
968 IMPORT void rendersprite(BM bm, SH sh, float x, float y, float mult_x = 1.0, float mult_y = 1.0);
969 IMPORT void rendersprite2(BM bm, SH sh, PT pos);
970 IMPORT void rendersprite3(BM bm, int bm_choose, SH sh, float x, float y, float mult_x, float mult_y);
971 void rendersprite3_1(BM bm, int bm_choose, SH sh, float x, float y, float mult_x, float mult_y);
972 IMPORT void rendersprite4(BM bm, int bm_choose, SH sh, PT pos);
973 IMPORT void rendersprite5(BM bm, int bm_choose, SH sh, SP move_space, SP sprite_space, float x, float y);
974 IMPORT void rendersprite6(BM bm, int bm_choose, SH sh, SP move_space, SP sprite_space, PT pos);
975 //IMPORT void rendersprite(BM bm, SH sh, float x, float y, float x1, float y1, float inside_x, float inside_y, float inside_x1, float inside_y1);
977 IMPORT PT pixelpos(BM bm, int x, int y);
978 IMPORT std::vector<BM> bitmap_anim(std::function<BM (float)> f, std::vector<float> key_frames);
979 IMPORT ML bitmap_anim_ml(EveryApi &ev, std::vector<BM> vec, std::vector<float> key_frames, float repeat_time);
980 IMPORT ML turn_to_2d(EveryApi &ev, ML ml, float tl_x, float tl_y, float br_x, float br_y);
981 IMPORT ML alt_ml_array(EveryApi &ev, std::vector<ML> vec, float start_time, float time_delta, bool repeat);
982 IMPORT ARR sprite_atlas_x(EveryApi &ev, BM orig, int start_x, int end_x, int start_y, int end_y, int delta_x, int count);
983 IMPORT ARR sprite_atlas_y(EveryApi &ev, BM orig, int start_x, int end_x, int start_y, int end_y, int delta_y, int count);
984 IMPORT ARR sprite_atlas_xy(EveryApi &ev, BM orig, int start_x, int end_x, int start_y, int end_y, int delta_x, int delta_y, int count_x, int count_y);
985private:
986 SpriteApi(const SpriteApi&);
987 void operator=(const SpriteApi&);
988 void *priv;
989 Env &e;
990};
991#endif
992
993#ifdef F_TEXTURE_API
995{
996public:
1000 IMPORT std::vector<BufferRef> prepare_many_buf(EveryApi &ev, std::vector<BM> vec, std::vector<int> types, bool mipmaps, std::vector<std::string> id_labels, std::vector<Low_GLuint> &res);
1001 IMPORT std::vector<TXID> prepare_many_txid(EveryApi &ev, std::vector<BufferRef> vec, std::vector<Low_GLuint> ids, std::vector<int> types, bool mipmaps, std::vector<std::string> id_labels);
1003 IMPORT ARR send_screenshots_via_key_array(EveryApi &ev, ML ml3, int key, float time_delta, int num);
1004 IMPORT PBO create_pbo(int sx, int sy);
1005 IMPORT ML upload_bm_to_pbo(BM bm, PBO p);
1006 IMPORT ML upload_txid_to_pbo(TXID tx, PBO p); // TODO
1007 IMPORT BM pbo_to_bitmap(PBO p);
1008 IMPORT TXID pbo_to_txid(PBO p);
1009 IMPORT ML grab_to_server(BM bm, int id, int num);
1010 IMPORT ML send_screenshots_via_key_to_server(EveryApi &ev, ML ml3, int key, float time_delta, int num);
1011 IMPORT ML prepare_key_anim(ML next, std::vector<ML> keyed, int key, float time_delta, std::vector<std::string> filenames);
1012 IMPORT ML save_screenshots_via_key(EveryApi &ev, ML ml3, int key, float time_delta, int num);
1013 IMPORT ML save_screenshot_via_key(EveryApi &ev, ML ml3, int key, std::string filename);
1015 IMPORT ML prepare_key(ML next, ML keyed, int key);
1018 IMPORT TX tex_plane(int sx, int sy);
1019 IMPORT TX tex_bitmap(BM bm);
1020 IMPORT int unique_id();
1021 IMPORT TX tex_assign(TX tx, int id, int x, int y, BM bm);
1022 IMPORT TX tex_coord(TX tx, int id, int x, int y, int width, int height);
1023 IMPORT Q get_tex_coord(TX tx, int id);
1024 Q get_tex_coord_1(TX tx, int id);
1025 IMPORT TXID prepare(TX tx, bool is_srgb=true, bool text_render=false);
1026 IMPORT TXID bufferref_to_txid(TXID old, const BufferRef &buf);
1029 IMPORT TXID webcam_txid_win(EveryApi &ev, int sx, int sy, int num);
1030 IMPORT TXID webcam_txid_linux(EveryApi &ev, int sx, int sy, int num);
1032 IMPORT TXID webcam_txid_generic(EveryApi &ev, int sx, int sy, int num);
1033 IMPORT TXID videofile_txid_generic(EveryApi &ev, int sx, int sy, std::string url);
1034 IMPORT TXID videofile_txid_emscripten(EveryApi &ev, int sx, int sy, std::string url, int num);
1035 IMPORT TXID videofile_txid_win32(EveryApi &ev, int sx, int sy, std::string url);
1036 IMPORT ML vr_overlay(TXID id, std::string key, std::string name, int sx, int sy);
1037 IMPORT std::vector<TXID> prepare_many(EveryApi &ev, std::vector<BM> vec, std::vector<int> types=std::vector<int>(),bool mipmaps=true, std::vector<std::string> id_labels=std::vector<std::string>(), std::vector<bool> is_srgb=std::vector<bool>());
1038 IMPORT TXID prepare_cubemap(EveryApi &ev, BM right, BM left, BM top, BM bottom, BM back, BM front);
1039 IMPORT void use(TXID tx, int i = 0);
1040 IMPORT void use_many(std::vector<TXID> vec, int i=0);
1041 IMPORT void unuse(TXID tx);
1042 IMPORT void delete_texid(TXID tx);
1043 IMPORT void delete_texid(std::vector<TXID> vec);
1044 IMPORT VA bind(VA va, TXID tx);
1045 IMPORT VA bind_many(VA va, std::vector<TXID> tx, std::vector<int> types=std::vector<int>());
1046 IMPORT VA bind_cubemap(VA va, TXID id);
1047 IMPORT VA bind_arr(VA va, TXA tx);
1048 IMPORT TXA prepare_arr(EveryApi &ev, std::vector<BM> vec, int sx, int sy);
1051private:
1052 TextureApi(const TextureApi&);
1053 void operator=(const TextureApi&);
1054 Env &e;
1055 int count;
1056};
1057#endif
1058
1059#ifdef F_GRID_API
1061{
1062public:
1063 IMPORT GridApi(Env &e);
1064 IMPORT ~GridApi();
1065 IMPORT SP gridtilespace(BM tilebm, int sx, int sy, int x, int y);
1066 IMPORT SP wholegridspace(int sx, int sy, BM grid);
1067
1068 IMPORT void preparegrid(BM tile_bitmap, int tile_choose = -1);
1069 IMPORT void rendergrid(BM grid, int grid_choose, float top_x, float top_y);
1070
1071private:
1072 GridApi(const GridApi&);
1073 void operator=(const GridApi&);
1074 void *priv;
1075 Env &e;
1076};
1077#endif
1078
1079
1080#ifdef F_BITMAP_API
1082{
1083public:
1084 IMPORT BitmapApi(Env &e);
1086 IMPORT ML isoline_render2(EveryApi &ev, FB fb, float pos, float delta_pos, int num);
1087 IMPORT BB isoline_render(EveryApi &ev, FB bm, float start_range, float end_range, float delta_range, int num);
1088 IMPORT BM render_volume_object(O o, float start_x, float end_x, float start_y, float end_y, float z, int sx, int sy, float ray_length, int sample_count);
1090 IMPORT BB range_choose(FB bm, float start_range, float end_range);
1091 IMPORT BM sphere_rays_bitmap(float center_x, float center_y, float center_z, float radius, float delta_alfa, float delta_beta, FS field, int maxiter, float c, int fptr_enum, std::vector<PT> vec, int vec_choose);
1092 IMPORT TXID video_source(std::string filename, int sx, int sy);
1093 IMPORT BM stable_diffusion(EveryApi &ev, std::string prompt, std::string filename);
1094 // temp store
1095 IMPORT BM bm_png_bm(EveryApi &ev, BM bm, std::string url);
1096 IMPORT void load_png_from_temp(std::string filename, void (*fptr)(void*), void *data, bool &success);
1097 IMPORT BM load_png_from_temp2(std::string filename);
1098 IMPORT void load_png_from_temp3(std::string filename);
1099
1100 IMPORT BM debug_number(EveryApi &ev, BM bm0, int num, bool disable, std::string url);
1101 IMPORT ML display_bitmaps(EveryApi &ev, std::vector<BM> vec, float start_time, float delta_time);
1102 IMPORT ML vertical_bitmap_display(EveryApi &ev, std::vector<BM> vec, float y_delta);
1103 IMPORT BM flip_tile_bitmap(BM bm, int sx, int sy, bool is_x);
1104 IMPORT ML write_gif_anim2(Array<int,int> *vec, std::string filename, int delay);
1105 IMPORT ML gif_anim(EveryApi &ev, ML ml3, int key, float time_delta, int num, std::string filename, int delay);
1106 IMPORT ML write_gif_anim(std::vector<BM> vec, std::string filename, int delay);
1107 IMPORT ML savepng_array_ml(EveryApi &ev, std::vector<BM> bms, std::string filename_start, std::string filename_end, bool alpha, float time);
1108 IMPORT BM gray_to_black(BM bm, float val);
1109 IMPORT BM newbitmap_bm(BM bm, unsigned int color);
1110 IMPORT BM newbitmap_fb(FB fb, unsigned int color);
1111 IMPORT BM newbitmap_bb(BB bb, unsigned int color);
1112 IMPORT FB flood_fill(FB fb, float percentage, int x, int y, bool inv);
1113 IMPORT BM flood_fill_color(EveryApi &ev, BM bm, float percentage, int x, int y, unsigned int color);
1114 IMPORT BM flood_fill_color_inv(EveryApi &ev, BM bm, float percentage, int x, int y, unsigned int color);
1116 IMPORT ML save_raw(BM bm, std::string filename);
1117 IMPORT BM lightmap_bitmap(int sx, int sy, P faces, P faces2, int face, float light_dir_x, float light_dir_y, float light_dir_z);
1118 IMPORT BM circular_gradient(int sx, int sy, unsigned int center_color, unsigned int edge_color);
1119 IMPORT BM script_bitmap(std::string url, int sx, int sy);
1120 IMPORT ML grid_ml(EveryApi &ev, ML next, IBM map, float y, float pos_x, float pos_z, float x_vec_x, float x_vec_z, float z_vec_x, float z_vec_z, int start_x, int start_z, float frame_inc);
1121 IMPORT P p_world_from_bitmap(EveryApi &ev, std::vector<P> vec, IBM world, float pos_x, float pos_y, float pos_z, float dx, float dz, float y);
1122 IMPORT BM scale_to_size(BM bm, int sz);
1123 IMPORT BM median_filter(BM bm, int sx, int sy);
1124 IMPORT BM newbitmap(int sx, int sy, unsigned int color = 0x00000000);
1125 IMPORT BM function(std::function<unsigned(int, int)> f, int sx, int sy);
1126 IMPORT BM transform(BM orig, std::function<unsigned int(int, int, unsigned int)> f);
1127 IMPORT BM newintbitmap(char *array, int sx, int sy, std::function<int(char)> f);
1128 IMPORT IBM intbitmap_loader(std::string url);
1129 IMPORT BM calculate_baked_light(P p, P p2, BM texture, int count, float light_pos_x, float light_pos_y, float light_pos_z, float shadow_darkness, float softness);
1130 IMPORT BM color_bm(BM bm, unsigned int color);
1131 IMPORT BB choose_color(BM bm, unsigned int c1, unsigned int c2);
1133 IMPORT BM chai_bm(std::string url, int sx, int sy);
1134 IMPORT BM bump_map(FB fb, float h);
1135 IMPORT BM newcolorbitmap(char *array, int sz, int sy, std::function<unsigned int(char)> f);
1136 IMPORT BM newtilebitmap(int sx, int sy, int tile_sx, int tile_sy);
1137 IMPORT BM loadbitmap(std::string filename);
1138 IMPORT BM loadbitmapfromurl(std::string url);
1139 IMPORT BM loadtilebitmap(std::string filename, int tile_sx, int tile_sy);
1140 IMPORT BM loadposbitmap(std::string filename);
1141 IMPORT BM findtile(BM tile_bitmap, int x, int y);
1142 IMPORT BM compose_x(BM bm1, BM bm2);
1143 IMPORT BM compose_y(BM bm1, BM bm2);
1144 IMPORT BM border(BM, int left ,int right ,int top ,int bottom);
1145 IMPORT BM add_shape_border(EveryApi &ev, BM bm, float dist_field_size, float start_range, float end_range, int r, int g, int b, int a, int border_size);
1146 IMPORT BM subbitmap(BM orig, int x, int y, int width, int height);
1147 IMPORT BM subbitmapimage(BM orig, int r_start_range, int r_end_range, int g_start_range, int g_end_range, int b_start_range, int b_end_range, unsigned int empty_color);
1148 IMPORT BM plus_bitmap(BM bm, BM bm2);
1149 IMPORT BM noise_vectors(int sx, int sy);
1150 IMPORT IBM random_int_bitmap(int sx,int sy,int min_value,int max_value);
1151 IMPORT IBM convert_fb_to_ibm_bitmap(FB fb, float start, float d);
1153 IMPORT BM growbitmap(BM small_orig_bitmap, int l, int t, int r, int b);
1154 IMPORT BM blitbitmap(BM bg, BM orig, int x, int y);
1155 IMPORT BM blitbitmap_fb(BM bg, BM orig, int x, int y, FB mask);
1156 IMPORT BM blitbitmap_bb(BM bg, BM orig, int x, int y, BB mask);
1158 IMPORT BM modify_bitmap(BM orig, BM bm, int x, int y);
1159 IMPORT BM interpolate_bitmap(BM orig1, BM orig2, float x); // x=[0..1]
1160 IMPORT BM repeat_bitmap(BM orig, int xcount, int ycount);
1161 IMPORT BM sample_bitmap(BM orig, float xmult, float ymult, float x, float y);
1162 IMPORT BM scale_bitmap(EveryApi &ev, BM orig, int sx, int sy);
1164 IMPORT BM world_from_bitmap(std::function<BM(int)> f, BM int_bm, int dx, int dy);
1165 IMPORT ARR cubemap(BM bm);
1166 IMPORT BM bm_cubemap(EveryApi &ev, BM left, BM top, BM middle, BM right, BM back, BM down, int sx, int sy);
1167 IMPORT BM world_from_bitmap2(EveryApi &ev, std::vector<BM> v, std::string filename, std::string chars, int dx, int dy, int sx, int sy);
1168 IMPORT BM world_from_bitmap3(EveryApi &ev, std::vector<BM> v, std::string url, std::string chars, int dx, int dy);
1169 IMPORT BM dup_x(BM orig);
1170 IMPORT BM flip_x(BM orig);
1171 IMPORT BM flip_y(BM orig);
1172 IMPORT BM rot90(BM orig);
1173 IMPORT BM alpha_color(BM orig, unsigned int color_key);
1174 IMPORT BM gradient(PT pos_1, PT pos_2, unsigned int color_1, unsigned int color_2, int sx, int sy);
1175 IMPORT BM gradient_y(unsigned int color_1, unsigned int color_2, int sx, int sy);
1176 IMPORT BM radial_gradient(int sx, int sy, PT pos, float r1, float r2, unsigned int color_1, unsigned int color_2);
1177 IMPORT BM conical_gradient(int sx, int sy, float x, float y, float angle1, float angle2, unsigned int color_1, unsigned int color_2);
1178 //BM bitmapandtypes(BM bm, BM (*fptr)(int)); // bm has ints in it
1180
1181 IMPORT BM addsubrects(BM orig); // use subbitmap with orig bitmap.
1182 IMPORT void savebitmap(BM orig, std::string filename, bool alpha=false);
1183 IMPORT ML savebitmap_ml(EveryApi &ev, BM bm, std::string filename, bool alpha, float time);
1184 IMPORT void save_png(BM bm, std::string filename);
1185 IMPORT ML save_png_ml(EveryApi &ev, BM bm, std::string filename);
1186 IMPORT BM mandelbrot(bool julia,float start_x, float end_x, float start_y, float end_y, float xx, float yy, int sx, int sy,int count);
1187 IMPORT BM mandelbrot2(bool julia,float start_x, float end_x, float start_y, float end_y, float xx, float yy, int sx, int sy,int count);
1188 IMPORT BM chessboard(int tile_sx, int tile_sy, int count_x, int count_y, unsigned int c1, unsigned int c2);
1189 IMPORT BM color_range(BM orig, unsigned int source_upper, unsigned int source_lower, unsigned int target_upper, unsigned int target_lower);
1190 IMPORT BM memoize(BM orig);
1191 IMPORT BM memoize_all(BM orig);
1192 IMPORT BM persistent_cache(BM orig, std::string filename);
1193 IMPORT BM alt(std::vector<BM> vec, int index);
1194 IMPORT BM simple_blur(BM bm, float center, float left, float right, float top, float bottom); // this is dangerous operation
1195 IMPORT int intvalue(BM bm, int x, int y);
1196 IMPORT unsigned int colorvalue(BM bm, int x, int y);
1197 IMPORT int size_x(BM bm);
1198 IMPORT int size_y(BM bm);
1199 IMPORT void prepare(BM bm);
1200 IMPORT bool ready_to_prepare(BM bm);
1201
1203 IMPORT BMA array(BM *array, int size);
1204 IMPORT BM array_elem(BMA array, int i);
1205 IMPORT BM Indicator(int sx, int sy, int g_ind);
1206 IMPORT BM avg(BM bm1, BM bm2);
1207 IMPORT BM fix_edges(BM bm);
1208
1209 IMPORT FB gradient_fb(int sx, int sy, float val, float val2, bool flip);
1210 IMPORT FB radial_fb(int sx, int sy, float x, float y, float r, float val_at_zero, float val_at_r);
1212 IMPORT FB plus_fb(FB f1, FB f2);
1213 IMPORT FB mul_fb(FB f, float mul);
1215 IMPORT H bitmap_prepare_heavy(EveryApi &ev, H bitmap_gen, int scanlines_per_slot);
1216 IMPORT H network_heavy(std::string url, std::string homepageurl, H timing_heavy);
1217 IMPORT H bitmap_heavy(BM bm, H timing);
1218 IMPORT H png_heavy(EveryApi &ev, H data, std::string url, int texture_unit);
1219 IMPORT H png_heavy2(EveryApi &ev, H net, std::string url, int texture_unit, int sx, int sy);
1220 IMPORT H mtl_heavy(EveryApi &ev, H net, std::string url_prefix, int texture_unit_delta);
1221 IMPORT H progressive_heavy(EveryApi &ev, std::string url, std::string url2);
1222 IMPORT H array_heavy(std::vector<H> vec);
1223 IMPORT H thread_heavy(H threaded);
1224 IMPORT H timing_heavy(int num_frames);
1225 IMPORT TXID dyn_fetch_bitmap(EveryApi& ev, std::string url, int time, int texture_unit);
1226 IMPORT TXID dyn_fetch_bitmap2(EveryApi &ev, std::string url, std::string url2, int time, int texture_unit, int sx, int sy, int sx2, int sy2);
1227 IMPORT std::vector<TXID> dyn_fetch_mtl(EveryApi &ev, std::string mtl_url, ML ml2);
1228 IMPORT ML txidarray_from_heavy(EveryApi &ev, H heavy, std::vector<TXID> *vec, ML ml, int start_range, int end_range, int heavycount);
1229
1230 IMPORT IBM create_ibm(std::vector<BB> vec);
1231 IMPORT BB choose_bool(IBM bm, int val);
1232 IMPORT ARR choose_ints(IBM bm, int count);
1233private:
1234 BitmapApi(const BitmapApi&);
1235 void operator=(const BitmapApi&);
1236 void *priv;
1237 Env &e;
1238};
1239#endif
1240
1241#ifdef F_FLOAT_API
1243{
1244public:
1245 IMPORT FloatApi(Env &e);
1246 IMPORT F value(float v);
1247 IMPORT F ref(float *v);
1248 IMPORT F array_index(float *array, int pos);
1249 IMPORT float get_value(F f);
1250private:
1251 Env &e;
1252};
1253#endif
1254
1255#ifdef F_ARRAY_API
1256template<class T>
1258{ // handle arrays
1259public:
1260 IMPORT ArrayApi(Env &e);
1261 A<T> array(std::vector<T> vec);
1262private:
1263 Env &e;
1264};
1265#endif
1266
1267#ifdef F_FLOAT_ARRAY_API
1269{
1270public:
1272 FA array(float *array, int size);
1273 FA f_array(F *array, int size);
1274 FA duparray(float value, int size);
1275 FA duparray(FA fa, int count);
1276 FA subarray(FA fa, int start_index, int length);
1277 FA ramp(float start_value, float end_value, int steps);
1278 F array_index(FA fa, int index);
1279 BM span_arrays(FA fa1, FA fa2, CBM f);
1280private:
1281 Env &e;
1282};
1283#endif
1284
1285#ifdef F_FONT_API
1287{
1288public:
1289 IMPORT FontApi(Env &e);
1290 IMPORT ~FontApi();
1291 IMPORT BM outline_bm(FI font, std::string glyph);
1292 IMPORT BM outline_string(EveryApi &ev, FI font, std::string str);
1293 IMPORT void save_atlas_store_file(FtA atlas, std::string filename);
1294 IMPORT FtA load_atlas_from_string(std::string buf);
1295 IMPORT ARR FI_sprite_atlas(EveryApi &ev, FI font, std::string chars, int sx, int sy, int y_delta);
1296 IMPORT ARR FI_sprite_atlas_persistent_cache(EveryApi &ev, FtA atlas, BM atlas_bm, std::string atlas_filename, std::string atlas_bm_filename);
1297 IMPORT BM large_string_from_atlas(EveryApi &ev, FtA atlas, BM atlas_bm, std::string url, int x_gap, int empty_line_height, int baseline_separation);
1298 IMPORT FF span_key_fetcher(float start_x, float end_x, float speed_x, int down_key, int up_key);
1299 IMPORT ARR choose_screen(float left_x, float right_x, int min_screen, int max_screen);
1300 IMPORT IF quake_area_fetcher(float start_x, float end_x, float start_z, float end_z);
1301 IMPORT Ft newfont(std::string filename, int sx, int sy);
1302 IMPORT BM glyph(Ft font, long idx);
1303 IMPORT LI glyph_outline(Ft font, long idx, float sx, float sy);
1304 IMPORT PL glyph_plane(Ft font, long idx, float sx, float sy, float dx, float dy);
1305 IMPORT BM font_string(Ft font, std::string str, int x_gap);
1306 IMPORT FB glyph_fb(Ft font, long idx);
1307 IMPORT BB glyph_bb(Ft font, long idx);
1308
1310 IMPORT BM font_atlas_engine2(EveryApi &ev, FI font, FtA atlas, float sx, float sy);
1311 IMPORT FtA font_atlas_info_engine2(EveryApi &ev, FI font, std::string chars, float sx, float sy, int y_delta);
1312
1313 IMPORT FtA font_atlas_info(EveryApi &ev,Ft font, std::string chars, float sx, float sy, int y_delta);
1314 IMPORT BM font_atlas(EveryApi &ev, Ft font, FtA atlas, float sx, float sy);
1315 IMPORT BM font_string_from_atlas(EveryApi &ev, FtA atlas, BM atlas_bm, std::string str, int x_gap);
1316 IMPORT P font_string_from_atlas_opengl_pipeline(EveryApi &ev, FtA atlas, BM atlas_bm, std::string str, int x_gap);
1317 IMPORT void save_atlas(FtA atlas, std::string filename);
1318 IMPORT FtA load_atlas(std::string filename);
1319 IMPORT ARR font_string_array(Ft font, std::string s, int x_gap);
1320 IMPORT ARR font_string_array2(FI font, std::string s);
1322 IMPORT SF score_string_fetcher(std::string id, std::string label, int numdigits); // use score_display instead.
1323 IMPORT IF char_fetcher_from_string(SF string_fetcher, std::string alternatives, int idx);
1324 IMPORT IF key_move_2_area_fetcher(float start_x, float end_x, float start_z, float end_z);
1326 IMPORT ML dynamic_character(EveryApi &ev, std::vector<BM> vec, IF fetcher, int x, int y);
1327 IMPORT FML dynamic_character_frame(EveryApi &ev, std::vector<BM> vec, IF fetcher, int x, int y, int fmt, MN mn);
1328 IMPORT ML dynamic_polygon(EveryApi &ev, std::vector<P> vec, MT material, IF fetcher);
1329 IMPORT ML dynamic_string(EveryApi &ev, Ft font, std::string alternative_chars, SF fetcher, int x, int y, int numchars);
1330 IMPORT FI load_font(std::string ttf_filename, int sx, int sy);
1331 IMPORT ML save_font_dump(FI font, std::string chars, std::string filename);
1332 IMPORT FI load_font_dump(std::string url);
1333 IMPORT GI choose_glyph_from_font(FI font, long idx);
1334 IMPORT GI combine_glyphs(GI glyph1, GI glyph2);
1335 IMPORT SD draw_text_string_sd(std::vector<GI> glyphs, std::string str, int gap_x, int empty_line_height);
1336 IMPORT BM string_display_to_bitmap(SD sd, int def);
1337 IMPORT BM draw_text_string(FI font, std::string str, int x_gap, int empty_line_height);
1338 IMPORT BM draw_text_large(EveryApi &ev, FI font, std::string url, int x_gap, int empty_line_height, int baseline_separation);
1339 IMPORT ML dynamic_character2(EveryApi &ev, std::vector<GI> vec, std::string alternatives, IF fetcher, int x, int y);
1340 IMPORT IF timed_int_fetcher(EveryApi &ev, int start, int end, float start_time, float end_time);
1341 IMPORT IF movement_int_fetcher(int count, float x_mult, float y_mult, float z_mult);
1342 IMPORT IF repeat_int_fetcher(IF fetcher, float duration);
1343 IMPORT IF toggle_button_fetcher(float start_x, float end_x, float start_y, float end_y);
1345 IMPORT IF keypress_int_fetcher(int key, int key_down_value, int key_up_value);
1346 IMPORT IF x_comp(PF point_fetcher, float start_x, float end_x, int num_steps);
1347 IMPORT IF y_comp(PF point_fetcher, float start_y, float end_y, int num_steps);
1348 IMPORT IF z_comp(PF point_fetcher, float start_z, float end_z, int num_steps);
1349 IMPORT PF point_fetcher_constant(float x, float y, float z);
1350 IMPORT PF point_fetcher_part(PF point_fetcher, int component, FF float_fetcher);
1352 IMPORT FF choose_float_fetcher(IF int_fetcher, float a_1, float a_2, float a_3, float a_4, float a_5, float a_6, float a_7);
1355 IMPORT FF time_range_fetcher(float start_time, float end_time, float before_start, float start_value, float end_value, float after_end, float repeat);
1356 IMPORT FF time_range_fetcher_key(int key, float start_time, float end_time, float before_start, float start_value, float end_value, float after_end, float repeat);
1357 IMPORT FF time_range_fetcher_state(int state, IF states, float start_time, float end_time, float before_start, float start_value, float end_value, float after_end, float repeat);
1358 IMPORT FF time_range_fetcher_state_key(int state, int key, IF if_state, float start_time, float end_time, float before_start, float start_value, float end_value, float after_end, float repeat);
1360 IMPORT IF time_fetcher(EveryApi &ev, float start_time);
1364 IMPORT ML ml_chooser(std::vector<ML> vec, IF fetcher);
1365 IMPORT std::vector<GameApi::BM> bm_array_id_inv(ARR arr);
1366 IMPORT ARR bm_array_id(std::vector<BM> vec);
1367private:
1368 FontApi(const FontApi&);
1369 void operator=(const FontApi&);
1370 void *priv;
1371 Env &e;
1372};
1373#endif
1374
1375#ifdef F_ANIM_API
1377{
1378public:
1379 IMPORT AnimApi(Env &e);
1380 IMPORT ~AnimApi();
1381 IMPORT IS single(int val, float duration);
1382 IMPORT IS single(PT point, float duration);
1383 IMPORT IS single(float val, float duration);
1384 IMPORT IS line(int val1, int val2, float duration);
1385 IMPORT IS line(PT p1, PT p2, float duration);
1386 IMPORT IS line(float val1, float val2, float duration);
1387 IMPORT IS line_obj(P p, P p2, float duration);
1388
1389 IMPORT IS repeat(IS i, int count);
1391
1392 IMPORT int timed_value(IS i, float time);
1393 IMPORT PT timed_value_point(IS i, float time);
1394 IMPORT float timed_value_float(IS i, float time);
1395
1396 IMPORT int timed_value_repeat_num(IS i, float time);
1397 IMPORT P timeline_obj(IS i, float time);
1398
1399 IMPORT IS seq_line(IS *array, int size);
1400 IMPORT IS par_line(IS *array, int arraysize);
1401 IMPORT int timeline_int(IS l, int choose_par, float time);
1402 IMPORT float timeline_float(IS i, int choose_par, float time);
1403 IMPORT PT timeline_point(IS l, int choose_par, float time);
1404 IMPORT P timeline_obj(IS i, int choose_par, float time);
1405private:
1406 AnimApi(const AnimApi&);
1407 void operator=(const AnimApi&);
1408
1409 void *priv;
1410 Env &e;
1411};
1412#endif
1413
1414#ifdef F_EVENT_API
1416{
1417public:
1418 IMPORT EventApi(Env &e);
1419 IMPORT ~EventApi();
1420 E root_event();
1421 E timer(E activation_event, float time);
1422 E key_down_event(int key, E start_time, E end_time);
1423 E key_up_event(int key, E start_time, E end_time);
1424 E activate_mouse_plane(E activation_event, MP m);
1425 E deactivate_mouse_plane(E deactivation_event, MP m);
1426 E pair(E e1, E e2);
1428 L polygon(E start, E end, P polygon);
1429 L polygon(E start, E end, P start_polygon, P end_polygon);
1430 L bitmap(E start, E end, BM bitmap);
1431 L bitmap(E start, E end, BM start_bitmap, BM end_bitmap);
1434 M mouse_rectangle(MP m, int x, int y, int width, int height);
1436 MV point(float x, float y, float z);
1437 MV line(E start, E end, MV start_mv, MV end_mv, int start_choose, int end_choose);
1439 LL link(L obj, ID pointnum, MV point);
1441 ST states(int count_states);
1442 ST mouse_plane(ST states, int state, M mouse);
1443 ST activate_event(ST states, int state, E event);
1444 ST enable_obj(ST states, int state, LL link);
1446 E state_change(E event, int old_state, int new_state);
1447 void run_game(ST states, int start_state);
1448 std::string Serialize(ST states, int start_state);
1449 ST UnSerialize(std::string s);
1450private:
1451 EventApi(const EventApi&);
1452 void operator=(const EventApi&);
1453 void *priv;
1454 Env &e;
1455};
1456#endif
1457
1458#if 0
1459class CurvePathApi
1460{
1461public:
1462 CD constant(float time, float val);
1463 CD linear_move(CD prev, float time, float delta);
1464 CD quadratic_move(CD prev, float time, float delta_pos, float end_delta_pos);
1465 CD cos_circular_move(float time, float center, float radius, float start_angle, float end_angle);
1466 CD sin_circular_move(float time, float center, float radius, float start_angle, float end_angle);
1467 CD cd_time_seq(CD a1, CD a2);
1468 CD cd_time_seq_arr(std::vector<CD> vec);
1469 CD cd_repeat(CD cd);
1470
1471 CP xyz_combine(CD x, CD y, CD z);
1472 CP cp_time_seq(CP a1, CP a2);
1473 CP cp_time_seq_arr(std::vector<CP> vec);
1474 CP cp_repeat(CP cp);
1475 MN cp_to_movement(CP cp);
1476};
1477#endif
1478
1479#ifdef F_CURVE_API
1481{
1482public:
1483 IMPORT CurveApi(Env &e);
1484 IMPORT C line(PT p1, PT p2);
1485 IMPORT C circle_xy(PT center, float r);
1486 IMPORT C circle_xz(PT center, float r);
1487 IMPORT C circle_xy_wave(float start_r, float end_r, WV wave, float length);
1488 IMPORT C linear(std::vector<PT> vec);
1489 IMPORT C bezier(std::vector<PT> vec);
1490
1491
1492 IMPORT C scale(C curve, float mx, float my, float mz);
1493 IMPORT C trans(C curve, float dx, float dy, float dz);
1494 //C constantspeed(C curve, float speed);
1495 IMPORT C compose(std::vector<C> vec);
1496 //C plane(C curve2d, PT pos, PT u_x, PT u_y);
1497 IMPORT C change_length(C curve, float new_length);
1498 IMPORT C split(C orig_curve, float start_var, float end_var);
1499
1500 IMPORT PA curve_product(C c1, C c2, PT c2_center);
1501 IMPORT P patch_sample(PA patch, int sx, int sy);
1502 IMPORT C x_curve(PA patch, float y);
1503 IMPORT C y_curve(PA patch, float x);
1504
1505 IMPORT PT pos(C curve, float p);
1506
1507 IMPORT PTS sample(C input_curve, int num_samples);
1508 IMPORT LI to_lines(C curve, int num_lines);
1510 IMPORT LI lines_from_curve_group(CG curvegroup, int split);
1511 // curve_pos
1512 IMPORT CPP xy_sum();
1513 IMPORT CPP xy_sum2(float xmult, float ymult, float zmult);
1514private:
1515 Env &e;
1516};
1517#endif
1518
1519#ifdef F_MATRIX_CURVE_API
1521{
1522public:
1524 IMPORT MC from_curve(C curve);
1525 IMPORT MC circle_xy(float radius);
1526 IMPORT MC circle_xz(float radius);
1527 IMPORT MS sample(MC m_curve, int num);
1528private:
1529 Env &e;
1530};
1531#endif
1532
1533#ifdef F_CURVES_API
1535{
1536public:
1537 IMPORT CurvesApi(Env &e);
1538 CC start(PTS points);
1539 CC comb(CC prev, PTS points);
1540 PTS extract(CC curves, int block, float val);
1541private:
1542 Env &e;
1543};
1544#endif
1545
1546#ifdef F_FUNCTION_API
1548{
1549public:
1552 F constant(float y);
1553 F sin();
1554 F cos();
1555 F line_from_bm_x(BM bm, int bm_x, float length);
1556 F line_from_bm_y(BM bm, int bm_y, float length);
1560 F line(float x, float y, float x2, float y2, float begin_y, float end_y);
1561
1562 float get_value(F f, float x);
1563
1564 F change_range(F orig, F replace, float x_start, float x_end);
1565 F move_x(F orig, float delta);
1566 F move_y(F orig, float delta);
1567 F max(F orig, F orig2);
1568 F min(F orig, F orig2);
1569 F scale_y(F orig, float old_min_y, float old_max_y, float new_min_y, float new_max_y);
1570
1573 std::vector<PT> equalizer(F f1, F f2, float start, float length);
1574 //float pullback(F a_f, F b_f, F p_a, F p_b, F f_p, float t_0, float t_1);
1575private:
1576 FunctionApi(const FunctionApi&);
1577 void operator=(const FunctionApi&);
1578
1579 Env &e;
1580 void *priv;
1581};
1582#endif
1583
1584#ifdef F_SPACE_API
1586{
1587public:
1588 IMPORT SpaceApi(Env &e);
1589 ~SpaceApi();
1590 SP rotatespace(SP s, float angle);
1591 SP rotatespace(SP s, PT center, float angle);
1592 //SP rotatespace(SP s, float center_x, float center_y, float angle);
1593 SP translatespace(SP s, float x, float y);
1594 SP scalespace(SP s, float scale_x, float scale_y);
1595 SP moveorigo(SP s, float x, float y);
1596 float sizex(SP s);
1597 float sizey(SP s);
1598 float origo_x(SP s);
1599 float origo_y(SP s);
1600 PT pos(SP sp, float x, float y, float z = 0.0); // x = (0..sizex), y=(0..sizey)
1601 PT posN(SP sp, float x, float y, float z=0.0); // x = (0..1), y = (0..1)
1602 float pt_x(PT p);
1603 float pt_y(PT p);
1604 float pt_z(PT p);
1605 PT plus(PT p1, PT p2);
1606private:
1607 SpaceApi(const SpaceApi&);
1608 void operator=(const SpaceApi&);
1609 Env &e;
1610};
1611#endif
1612
1613#ifdef F_DUP_API
1626#endif
1627
1628#ifdef F_TEXT_API
1630{
1631public:
1632 TextApi(BitmapApi &bm, SpriteApi &sp) : bm(bm), sp(sp), priv(0) { }
1633 IMPORT ~TextApi();
1634 IMPORT void load_font(std::string filename, int sx, int sy, int x, int y, char start_char, char end_char);
1635 IMPORT void draw_text(std::string text, int x, int y, SH sh);
1636private:
1637 TextApi(const TextApi&);
1638 void operator=(const TextApi&);
1639 BitmapApi &bm;
1640 SpriteApi &sp;
1641 void *priv;
1642 int sx,sy;
1643 char start_char, end_char;
1644};
1645#endif
1646
1647#ifdef F_IMPLICIT_API
1649{
1650public:
1652 IMPORT IM im_sphere(float r);
1653 IMPORT IM blob(float c, float c_x, float c_y, float cc_x, float cc_y);
1654 IMPORT IM im_translate(IM obj, float dx, float dy, float dz);
1655 IMPORT IM from_distance(FD fd, float pos_x, float pos_y, float pos_z, float u_x, float u_y, float u_z, float sx, float sy);
1656 IMPORT IM from_distance_cyl(FD fd, float pos_x, float pos_y, float pos_z, float u_x, float u_y, float u_z, float sx, float sy);
1657 IMPORT IM from_distance_sph(FD fd, float pos_x, float pos_y, float pos_z, float u_x, float u_y, float u_z, float sx, float sy);
1658 IMPORT FB render_upper(IM obj, float size_x, float size_y, int sx, int sy, float dx, float dy);
1659 IMPORT FB render_lower(IM obj, float size_x, float size_y, int sx, int sy, float dx, float dy);
1660
1661 IMPORT BM render_upper_color(IM obj, float size_x, float size_y, int sx, int sy, float dx, float dy);
1662 IMPORT BM render_lower_color(IM obj, float size_x, float size_y, int sx, int sy, float dx, float dy);
1663private:
1664 Env &e;
1665};
1666#endif
1667
1668#ifdef F_VOLUME_API
1670{
1671public:
1672 IMPORT VolumeApi(Env &e);
1674 IMPORT O bounding_x(O next, O next2, float x);
1675 IMPORT O bounding_y(O next, O next2, float y);
1676 IMPORT O bounding_z(O next, O next2, float z);
1677 IMPORT O bounding_sphere(O next, float cx, float cy, float cz, float radius);
1678 IMPORT BB volumeprojection(O o, float start_x, float end_x, float start_y, float end_y, float start_z, float end_z, int sx, int sy, int numsamples);
1679 IMPORT O boolfunction(std::function<bool(float x, float y, float z)> f);
1680 IMPORT O subvolume(std::function<float(float x, float y, float z)> f, float start_range, float end_range);
1681 IMPORT PTS random_vol_object(O o, float start_x, float end_x, float start_y, float end_y, float start_z, float end_z, int numpoints);
1682 IMPORT O from_polygon(P p, float x, float y, float z); // point outside of shape.
1683 IMPORT O from_bool_bitmap(BB b, float dist);
1684 IMPORT O link_areas(O o, PT p1, PT p2, float d);
1685 IMPORT O o_sphere(float center_x, float center_y, float center_z, float radius);
1686 IMPORT O o_cube(float start_x, float end_x,float start_y, float end_y,float start_z, float end_z);
1687 IMPORT O o_cone(PT p1, PT p2, float rad1, float rad2);
1688 IMPORT O o_torus(PT center, PT u_x, PT u_y, float dist1, float dist2);
1689
1691 IMPORT O colour(O object, unsigned int col);
1692 IMPORT O reflect(O object, float val); // val = [0..1]
1693 IMPORT O cubetexture(O object, PT origo, PT u_x, PT u_y, PT u_z, BM bm);
1694 IMPORT O spheretexture(O object, PT center, BM texture, float multx, float multy);
1695 IMPORT O subset_color(O model, O color_subset, unsigned int color);
1696
1697
1698 //IMPORT O move(O object, PT pos);
1699 IMPORT O move(O obj, float dx, float dy, float dz);
1700 IMPORT O rotatex(O object, float angle);
1701 IMPORT O rotatey(O object, float angle);
1702 IMPORT O rotatez(O object, float angle);
1703 IMPORT O scale(O object, float sx, float sy, float sz);
1704
1705 IMPORT O not_op(O object1);
1706 IMPORT O min_op(O object1, O object2);
1707 IMPORT O max_op(O object1, O object2);
1708 IMPORT O andnot_op(O object1, O object2);
1709
1710 IMPORT O mandelbulb(float n, float p_x, float p_y, float p_z,float c_x, float c_y, float c_z,float radius,int iterations);
1711 IMPORT O mandelbrot_volume(bool julia, int count, float yy);
1712
1713 IMPORT BB plane(O o, int sx, int sy,PT u_p, V u_x, V u_y,float start_x, float end_x,float start_y, float end_y,float start_z, float end_z);
1714
1715 IMPORT BM render(O object, int sx, int sy, PT ray_0, PT ray_x, PT ray_y, PT ray_z);
1716 typedef std::function<P (float start_x, float end_x,
1717 float start_y, float end_y,
1718 float start_z, float end_z,
1719 unsigned int color)> fptrtype;
1720 IMPORT P rendercubes(O object,fptrtype fptr,int size,float wholesize); // marching cubes algo
1721 IMPORT PTS instanced_positions(O object,int size,float wholesize);
1722
1723 IMPORT P rendercubes2(EveryApi &ev, O object,fptrtype fptr,int sx, int sy, int sz,float world_x, float world_y, float world_z); // normal for loop algo
1724 IMPORT P rendercubes3(O object,int sx, int sy, int sz,float start_x, float end_x,float start_y, float end_y,float start_z, float end_z);
1725 IMPORT PTS instanced_positions(O object,int sx, int sy, int sz,float start_x, float end_x,float start_y, float end_y, float start_z, float end_z);
1726 IMPORT void find_surface(O object, PT p1, PT p2, PT *res1, PT *res2, int level);
1727 // use RayTracingBitmap class in graph.hh
1728 // problem1: float values in O. (currently uses bool)
1729 // problem2: colors in O.
1730 // problem3: conversion from volumeobject to continuousvoxel<float> and continuousvoxel<color> (something like that exists already)
1731 // BM raytrace(O volume, int sx, int sy, V v, float z); IMPORT BM montecarlo(O object, PT p_top, PT p_x, PT p_y, PT p_z, int sx, int sy);
1732private:
1733 VolumeApi(const VolumeApi&);
1734 void operator=(const VolumeApi&);
1735
1736 Env &e;
1737};
1738#endif
1739
1740#ifdef F_SHADER_MODULE_API
1742{
1743public:
1746 IMPORT SFO function(std::function<std::string (std::string id)> function, std::string function_name, std::vector<std::string> param_names = std::vector<std::string>(), std::vector<std::string> arg_values = std::vector<std::string>());
1747 IMPORT SFO color_function(SFO orig, std::function<std::string (std::string)> function, std::string function_name);
1748 IMPORT SFO sphere(); // vec3 center, float radius
1749 IMPORT SFO sphere(PT center, float radius); // ()
1750 IMPORT SFO cube(); // vec3 tl, vec3 br
1751 IMPORT SFO cube(float start_x, float end_x,float start_y, float end_y,float start_z, float end_z); // ()
1752 IMPORT SFO rounded_cube(float start_x, float end_x,float start_y, float end_y,float start_z, float end_z,float r);
1754 IMPORT SFO texture_box(float start_x, float end_x,float start_y, float end_y,float start_z, float end_z);
1755 IMPORT SFO line(); // vec3 tl, vec3 br, float line_width1, float line_width2
1756 IMPORT SFO line(float start_x, float start_y, float start_z,float end_x, float end_y, float end_z,float line_width1, float line_width2);
1757 IMPORT SFO plane(PT center, V u_x, V u_y);
1758 IMPORT SFO torus(float radius_1, float radius_2);
1759 IMPORT SFO color(SFO obj, float r, float g, float b, float a);
1760 IMPORT SFO rot_x(SFO obj, float angle);
1761 IMPORT SFO rot_y(SFO obj, float angle); // float angle
1762 IMPORT SFO rot_z(SFO obj, float angle);
1763 IMPORT SFO rot_x(SFO obj, float angle, PT center);
1764 IMPORT SFO rot_y(SFO obj, float angle, PT center);
1765 IMPORT SFO rot_z(SFO obj, float angle, PT center);
1766 IMPORT SFO mod_x(SFO obj, float dx);
1767 IMPORT SFO mod_y(SFO obj, float dy);
1768 IMPORT SFO mod_z(SFO obj, float dz);
1769 IMPORT SFO and_not(SFO obj, SFO not_obj);
1770 IMPORT SFO or_elem(SFO obj1, SFO obj2);
1771 IMPORT SFO blend(SFO obj1, SFO obj2, float k);
1773 IMPORT SFO trans(SFO obj, float dx, float dy, float dz);
1775 IMPORT SFO scale(SFO obj, float sx, float sy, float sz);
1778 IMPORT SFO bind_arg(SFO obj, std::string name, std::string value);
1780 IMPORT SFO grayscale_from_distance(SFO obj, SFO dist, float length);
1782 IMPORT SFO mix_color(SFO col1, SFO col2, float t); // kills obj side
1784 IMPORT SFO noise(SFO obj, float strength);
1785 IMPORT SFO ambient_occulsion(SFO obj, float d, float i);
1786 IMPORT SFO soft_shadow(SFO scene, V light_dir, float mint, float maxt, float k, float strong);
1787 IMPORT SFO bounding_primitive(SFO prim, SFO inside, SFO outside);
1788 IMPORT SFO spherical(SFO obj, PT tl, PT br, float rr, float rp);
1789 IMPORT SFO render(SFO obj);
1790 IMPORT SFO v_render(SFO obj);
1792 IMPORT SFO color_from_position(SFO obj, float sx, float sy, float sz);
1793 IMPORT SFO colormod_from_position(SFO obj, float px, float py, float pz, float sx, float sy, float sz);
1794 IMPORT ML sfo_to_ml(EveryApi &ev, SFO sfo, float sx, float sy);
1795private:
1796
1797 Env &e;
1798};
1799#endif
1800
1801#ifdef F_INTERACTION_API
1803{
1804public:
1805 struct Wasd_data {
1806 bool up=false;
1807 bool down=false;
1808 bool left=false;
1809 bool right=false;
1810 };
1812 float &pos_x, float &pos_y, Wasd_data &data,
1813 float speed_x, float speed_y);
1815 float &pos_x, float &pos_y, Wasd_data &data,
1816 float speed_x, float speed_y);
1817 struct Quake_data {
1818 bool forward=false;
1819 bool backward=false;
1820 bool left=false;
1821 bool right=false;
1822 bool side_left=false;
1823 bool side_right=false;
1824 float old_pos_x=0.0;
1825 float old_pos_y=0.0;
1826 bool mv_mode= false;
1827 };
1829 float &pos_x, float &pos_y, float &rot_y,
1831 float &speed_x, float &speed_y, float speed, float rot_speed);
1833 float &pos_x, float &pos_y, float &rot_y,
1835 float &speed_x, float &speed_y, float speed, float rot_speed);
1836};
1837#endif
1838
1839#ifdef F_PICKING_API
1841{
1842public:
1843 IMPORT PickingApi(Env &e);
1844 BB pick_area(EveryApi &ev, float mouse_x, float mouse_y, float radius, int scr_size_x, int scr_size_y);
1845 O pick_volume(M in_P, BB pick);
1846 bool picked( O o, float x, float y, float z);
1847private:
1848 Env &e;
1849};
1850#endif
1851
1852#ifdef F_TREE_API
1854{
1855public:
1856 IMPORT TreeApi(Env &e);
1857 IMPORT TL level(std::vector<MN> vec);
1858 IMPORT T tree(std::vector<TL> vec);
1859 IMPORT ML tree_ml(EveryApi &ev, T tree, std::vector<ML> vec);
1860 IMPORT P tree_p(EveryApi &ev, T tree, std::vector<P> vec, float time, float percentage);
1861 IMPORT MS tree_ms(EveryApi &ev, T tree, float time);
1862private:
1863 Env &e;
1864};
1865#endif
1866
1867#ifdef F_MATERIALS_API
1869{
1870public:
1873 IMPORT MT reload_material(EveryApi &ev, MT next, std::string name, P default_p, MT default_mat);
1876 IMPORT MT hires(EveryApi &ev, MT mat, int size, int numsampled, float blur_radius);
1878 IMPORT MT mt_alt(EveryApi &ev, std::vector<MT> v, int index);
1879 IMPORT MT progressmaterial(MT nxt, void (*fptr)(void*), void*data);
1880 IMPORT SMT ss_def(EveryApi &ev);
1881 IMPORT SMT screenspace_bloom(EveryApi &ev, SMT next, float cut_x, float cut_y, float cut_z, float x_amount, float y_amount);
1882 IMPORT SMT generic_screenspace_material00(EveryApi &ev, SMT next, SHI vertex, SHI fragment);
1883 IMPORT MT phong3_material(EveryApi &ev, MT next, unsigned int ambient, unsigned int highlight, float pow);
1884 IMPORT MT generic_shader_material00(EveryApi &ev, MT next, SHI vertex, SHI fragment, std::vector<TXID> vec);
1885 IMPORT MT generic_shader_material0(EveryApi &ev, MT next, std::string, std::string, std::string);
1886 IMPORT MT generic_shader_material1(EveryApi &ev, MT next, SHP params, std::string, std::string, std::string);
1887 IMPORT MT generic_shader_material2(EveryApi &ev, MT next, SHP params, std::string, std::string, std::string, std::vector<SHI>);
1888 IMPORT MT gltf_material_from_file(EveryApi &ev, std::string url, float light_dir_x, float light_dir_y, float light_dir_z);
1889 IMPORT MT transparent_material(EveryApi &ev, BM bm, MT next, bool is_transparent);
1890 IMPORT MT m_keys(EveryApi &ev, std::vector<MT> vec, std::string keys);
1891 IMPORT MT gltf_anim_material(EveryApi &ev, TF model0, int skin_num, int animation, int num_timeindexes, MT next, int key, int mode, TRA anim_transfer_id, int frame_skip);
1892 IMPORT MT gltf_anim_material2(EveryApi &e, TF model0, int skin_num, int num_timeindexes, MT next, std::string keys,int mode, TRA anim_transfer_id, int frame_skip);
1893 IMPORT MT toon_border(EveryApi &ev, MT next, float border_width, unsigned int color, bool is_gltf);
1897 IMPORT MT texture(EveryApi &ev, BM bm, float mix);
1898 IMPORT MT textureid(EveryApi &ev, TXID txid, float mix);
1899 IMPORT MT texture_many(EveryApi&ev, std::vector<BM> vec, float mix);
1900 IMPORT MT colour_material(EveryApi &ev, float mix, bool color_from_pts=false);
1901 IMPORT MT many_texture_id_material(EveryApi &ev, std::string mtl_url, std::string url_prefix, float mix, int start_range, int end_range);
1902 IMPORT MT texture_cubemap(EveryApi&ev, std::vector<BM> vec, float mix, float mix2);
1903 IMPORT MT texture_many2(EveryApi &ev, float mix);
1904 IMPORT MT texture_arr(EveryApi &ev, std::vector<BM> vec, int sx, int sy, float mix);
1905 IMPORT MT gltf_material( EveryApi &ev, TF model0, int material_id, float mix, float self_mult, float rest_mult, float light_dir_x, float light_dir_y, float light_dir_z, bool emissive, int lod_level=-1 );
1906 IMPORT MT gltf_material_manual( EveryApi &ev, float mix,float self_mult, float rest_mult, BM, BM, BM,BM,BM,bool,bool,bool,bool,bool,float,float,float,float,float,float,float, float light_dir_x, float light_dir_y, float light_dir_z );
1907 IMPORT MT gltf_material_env( EveryApi &ev, TF model0, int material_id, float mix, BM diffuse_env, BM specular_env, BM bfrd);
1908 IMPORT MT gltf_material3( EveryApi &ev, float roughness, float metallic, float base_r, float base_g, float base_b, float base_a, float mix, float self_mult, float rest_mult, float light_dir_x, float light_dir_y, float light_dir_z, bool emissive);
1909 IMPORT MT glow_edge(EveryApi &ev, MT next, float light_level, float gray_level, float edge_pos);
1910 IMPORT MT water(EveryApi &ev, MT next, unsigned int color1, unsigned int color2, unsigned int color3, float center_x, float center_y, float center_z, float wave_mult, float time_mult);
1911
1912 IMPORT MT adjust(EveryApi &ev, MT nxt, unsigned int ad_color, float ad_dark, float ad_light);
1913
1914 IMPORT MT phong(EveryApi &ev, MT nxt, float light_dir_x, float light_dir_y, float light_dir_z, unsigned int ambient, unsigned int specular, unsigned int highlight, float pow);
1915 IMPORT MT phong2(EveryApi &ev, MT nxt, float light_dir_x, float light_dir_y, float light_dir_z, unsigned int ambient, unsigned int specular, unsigned int highlight, float pow);
1916 IMPORT MT vertex_phong(EveryApi &ev, MT nxt, float light_dir_x, float light_dir_y, float light_dir_z, unsigned int ambient, unsigned int highlight, float pow, float mix);
1917 IMPORT ARR m_apply_phong(EveryApi &ev, std::vector<MT> vec, float light_dir_x, float light_dir_y, float light_dir_z, unsigned int ambient, unsigned int specular, unsigned int highlight, float pow);
1918 IMPORT ARR p_dup(EveryApi &ev, P obj, int count);
1919 IMPORT ARR m_dup(EveryApi &ev, MT mat, int count);
1920 IMPORT ARR m_apply_phong_color(EveryApi &ev, std::vector<MT> vec, std::vector<P> vec2, float light_dir_x, float light_dir_y, float light_dir_z, float ambient_mult, float specular_mult, float highlight_mult, float pow);
1921 IMPORT MT edge(EveryApi &ev, MT nxt, float edge_width, unsigned int edge_color);
1922 IMPORT MT gi(EveryApi &ev, MT nxt, PTS points, float obj_size);
1923 IMPORT MT bump_phong(EveryApi &ev, float light_dir_x, float light_dir_y, float light_dir_z, unsigned int ambient, unsigned int highlight, float pow, FB bm, float bump_width);
1924 IMPORT MT fog(EveryApi &ev, MT nxt, float fog_dist, unsigned int dark_color, unsigned int light_color);
1925 IMPORT MT shadow(EveryApi &ev, P p, std::vector<BM> vec, float p_x, float p_y, float p_z, int sx, int sy, unsigned int dark_color, float mix, float mix2);
1926 IMPORT MT shadow2(EveryApi &ev, P p, float p_x, float p_y, float p_z, int sx, int sy, unsigned int dark_color, float mix, float mix2, int numtextures);
1927 IMPORT MT newshadow(EveryApi &ev, MT nxt, P models, float light_dir_x, float light_dir_y, float light_dir_z, float dark_level, float light_level, float scale, int size, bool is_phong, int texindex, MT shadow_mt);
1928 IMPORT ML newshadow2_phong(EveryApi &ev, P models, MT model_mt, P shadow_mesh, MT shadow_mt, float light_dir_x, float light_dir_y, float light_dir_z, float dark_level, float light_level, unsigned int ambient_color, unsigned int dark_color, unsigned int light_color, float scale, int size, bool draw_model, MT shadow2_mt);
1929 IMPORT ML newshadow2_gltf(EveryApi &ev, TF I1, P shadow_p, MT shadow_mt, float light_dir_x, float light_dir_y, float light_dir_z, float dark_level, float light_level, unsigned int ambient_color, unsigned int dark_color, unsigned int light_color, float scale, int size, MT shadow2_mt, bool emissive);
1930 IMPORT ML gltf_newshadow2(EveryApi &ev, P models, MT model_mt, P shadow_mesh, MT shadow_mt, float light_dir_x, float light_dir_y, float light_dir_z, float dark_level, float light_level, float scale, int size, TF tf);
1931 IMPORT MT dyn_lights(EveryApi &ev, MT nxt, float light_pos_x, float light_pos_y, float light_pos_z, float dist, MN dyn_point);
1932 IMPORT MT coloured_lights(EveryApi &ev, MT nxt, float scale,
1933 unsigned int color_1, unsigned int color_2, unsigned int color_3, unsigned int color_4, unsigned int color_5, unsigned int color_6, unsigned int color_7, unsigned int color_8,
1934 PT pos_1, PT pos_2, PT pos_3, PT pos_4, PT pos_5, PT pos_6, PT pos_7, PT pos_8,
1935 float dist_1, float dist_2, float dist_3, float dist_4, float dist_5, float dist_6, float dist_7, float dist_8);
1936 IMPORT MT snow(EveryApi &ev, MT nxt, unsigned int color1=0xffaaaaaa, unsigned int color2=0xffeeeeee, unsigned int color3=0xffffffff, float mix_val=0.5f);
1937 IMPORT MT shading1(EveryApi &ev, MT nxt, float mix_val, float mix_val2);
1938 IMPORT MT shading2(EveryApi &ev, MT nxt, unsigned int color1, unsigned int colo2, unsigned int color3);
1939 IMPORT MT flat(EveryApi &ev, MT nxt, unsigned int color1, unsigned int color2, unsigned int color3);
1940 IMPORT MT fur(EveryApi &ev, MT nxt, PT center, float dist, float max_angle, int count, float size, int cone_numfaces);
1941 IMPORT MT noise(EveryApi &ev, int sx, int sy, int r, int g, int b, int a, int r2, int g2, int b2, int a2, float mix);
1942
1943 IMPORT MT choose_color(EveryApi &ev, MT nxt, unsigned int color, float mix_val);
1944 IMPORT MT brashmetal(EveryApi &ev, MT nxt, int count, bool web);
1945 IMPORT MT marble(EveryApi &ev, MT nxt, int count, float cubesize);
1946 IMPORT MT web(EveryApi &ev, MT nxt, float val=1.01, float linewidth=2.0, unsigned int color=0xff000000); // TODO: add line width property
1947 IMPORT MT bevel(EveryApi &ev, MT nxt, float dir, float linewidth);
1948 IMPORT MT bloom(EveryApi &ev, MT nxt, BM bm, float r_cut, float g_cut, float b_cut, float pixel_x, float pixel_y);
1949 IMPORT MT dist_field_mesh(EveryApi &ev, SFO sfo, MT next);
1950
1952
1953 IMPORT MT sfo_sandbox(EveryApi &ev, SFO sfo, MT next);
1954 IMPORT MT combine_materials(EveryApi &ev, MT mat1, MT mat2);
1955
1956 IMPORT MT fade(EveryApi &ev, MT next, float start_time, float end_time, float start_time2, float end_time2);
1957
1958 IMPORT ML bind(P p, MT mat);
1959 IMPORT ML bind_inst(P p, PTS pts, MT mat);
1961 IMPORT ML bind_inst_va(VA va, PTS pts, MT mat, float level);
1962 IMPORT ML bind_inst_matrix(P p, MS ms, MT mat);
1963 IMPORT ML bind_inst2(P p, PTA pta, MT mat);
1964 IMPORT ML bind_inst_fade(P p, PTS pts, MT mat, bool flip, float start_time, float end_time);
1965 IMPORT ML render_instanced_ml(EveryApi &ev, P p, PTS pts, bool color_from_pts=false);
1966 IMPORT ML render_instanced_ml_matrix(EveryApi &ev, P p, MS pts, bool color_from_matrix=false);
1967 IMPORT ML render_instanced_ml_fade(EveryApi &ev, P p, PTS pts, bool flip, float start_time, float end_time, bool color_from_pts=false);
1968 IMPORT ML render_instanced_ml_texture(EveryApi &ev, P p, PTS pts, std::vector<BM> vec, std::vector<int> types=std::vector<int>(), std::vector<std::string> id_labels=std::vector<std::string>(), std::vector<bool> is_srgb=std::vector<bool>());
1969 IMPORT ML render_instanced_ml_texture_id(EveryApi &ev, P p, PTS pts, std::vector<TXID> *vec);
1970 IMPORT ML render_instanced_ml_cubemap(EveryApi &ev, P p, PTS pts, std::vector<BM> vec);
1972 //--
1973 IMPORT ML render_instanced_ml_texture_matrix(EveryApi &ev, P p, MS pts, std::vector<BM> vec, std::vector<int> types=std::vector<int>(), std::vector<std::string> id_labels=std::vector<std::string>(), std::vector<bool> is_srgb=std::vector<bool>());
1974 IMPORT ML render_instanced_ml_texture_id_matrix(EveryApi &ev, P p, MS pts, std::vector<TXID> *vec);
1975 IMPORT ML render_instanced_ml_cubemap_matrix(EveryApi &ev, P p, MS pts, std::vector<BM> vec);
1977 //--
1978
1979 IMPORT ML render_instanced_ml_fade_texture(EveryApi &ev, P p, PTS pts, bool flip, float start_time, float end_time, std::vector<BM> vec);
1980 IMPORT ML render_instanced2_ml(EveryApi &ev, VA va, PTA pta, bool color_from_pts=false);
1981 IMPORT ML render_instanced2_ml_texture(EveryApi &ev, VA va, PTA pta, std::vector<BM> vec);
1983 IMPORT ML render_instanced2_ml_texture_id(EveryApi &ev, VA va, PTA pta, std::vector<TXID> *vec);
1985 IMPORT ML render_instanced2_ml_fade(EveryApi &ev, VA va, PTA pta, bool flip, float start_time, float end_time);
1986 //ML snow(EveryApi &ev, P p);
1987 //ML web(EveryApi &ev, P p);
1988private:
1989 Env &e;
1990};
1991#endif
1992
1993#ifdef F_INPUT_API
1995{
1996public:
1997 IMPORT InputApi(Env &e);
1998
1999private:
2000 Env &e;
2001};
2002#endif
2003
2004#ifdef F_PHYSICS_API
2006{
2007public:
2008 IMPORT PhysicsApi(Env &e);
2009 struct PHI { PH phy; int id; };
2011 IMPORT PHI anchor_point(PH phy, PT pos);
2012 PH anchor_point2(PH phy, PT pos) { PHI pp = anchor_point(phy,pos); return pp.phy; }
2013 IMPORT PH ext_force(PH phy, int point, V dir);
2014 IMPORT PH ext_force_all(PH phy, V dir);
2015 IMPORT PH anchor_link(PH phy, int p1, int p2, float dist);
2016 IMPORT PH force_obj(PH phy, O obj,
2017 V dir);
2018 IMPORT PH phy_from_p(P p);
2019 // PH gameover_obj(PH phy, O obj, int point)
2020 // PH keypress_force(PH phy, int point, V dir, int key);
2021 //PH array(PH *arr, int size);
2022
2023 IMPORT int num_anchors(PH phy);
2024 IMPORT int num_forces(PH phy, int anchor);
2025 IMPORT int num_links(PH phy);
2026 IMPORT int num_force_volumes(PH phy);
2027
2028 IMPORT PTS init_points(PH pos);
2029 IMPORT void step_points(PH phy, PTA prev_frame, float timestep);
2031private:
2032 Env &e;
2033};
2034#endif
2035
2036#ifdef F_COLLISION_PLANE
2038{
2039public:
2041 IMPORT CP circle(int id, float radius);
2042 IMPORT CP rectangle(int id, float x, float y, float sx, float sy);
2043 IMPORT CP or_elem(int id, std::vector<CP> vec);
2044 IMPORT void set_pos(CP plane, int id, float x, float y);
2045 IMPORT bool check_collision(CP plane, float x, float y);
2046private:
2047 Env &e;
2048};
2049#endif
2050
2051#ifdef F_SKELETAL
2053{
2054public:
2055 IMPORT Skeletal(Env &e);
2056 SA root(PT absolute_pos);
2057 SA node(SA parent, MN matrix, PT point_offset);
2058 ML skeletal_bind(EveryApi &ev, std::vector<P> vec, std::vector<PT> vec2, std::vector<SA> sa_vec);
2059 ML skeletal_bind_material(EveryApi &ev, std::vector<P> vec, std::vector<PT> vec2, std::vector<SA> sa_vec, MT material);
2060private:
2061 Env &e;
2062};
2063#endif
2064
2066{
2067public:
2071 IMPORT KF keyframe_bind(EveryApi &ev, KF keyframe, PTT pointtransform, float delta_time);
2072 IMPORT KF keyframe_bind2(EveryApi &ev, KF keyframe, PTT pointtransform, float delta_time, bool dif);
2073 IMPORT KF curve_trans(EveryApi &ev, KF kf, C curve, CPP pos, int numsamples, float duration);
2074 IMPORT KF repeat_keyframes(KF rep, int count);
2075
2076 IMPORT KF sample_rot(EveryApi &ev, KF kf, float nx, float ny, float nz, float angle, int numsamples, float duration);
2077
2078
2079 //KF keyframe_bind2(KF keyframe, O subpart, PTT pointtransform, float delta_time);
2081 IMPORT PTT curve_accessor(C curve, CPP pos, float start_pos, float time_mult);
2082 IMPORT PTT rot_accessor(float start_time, float time_mult, float nx, float ny, float nz, float dist_angle);
2083 IMPORT PTT translate_trans(PTT prev, float speed_x, float speed_y, float speed_z);
2084 IMPORT PTT translate_trans2(PTT prev, float duration,float dist_x, float dist_y, float dist_z);
2085 IMPORT PTT rotate_trans(PTT prev, float nx, float ny, float nz, float speed_angle);
2086 IMPORT PTT rotate_trans2(PTT prev, float duration,float nx, float ny, float nz, float dist_angle);
2087 IMPORT PTT scale_trans(PTT prev, float scale_speed_x, float scale_speed_y, float scale_speed_z);
2088 IMPORT PTT scale_trans2(PTT prev, float duration,float scale_dist_x, float scale_dist_y, float scale_dist_z);
2090public:
2091 IMPORT P change_pos(P p, P orig, PTT transform, float delta_time, bool dif);
2092 IMPORT LI change_pos_li(LI p, LI orig, PTT transform, float delta_time, bool dif);
2093private:
2094 Env &e;
2095};
2096
2098{
2099public:
2100 IMPORT EventNode(Env &e);
2102 EV key_event(EV next, int key_id, int key_type);
2103 EV timer_event(EV next, float time);
2104 EV delta_timer(EV next, EV event, float delta_time);
2105 //EV event_enable(EV next, EV event, EV start_event, EV end_event);
2106 //EV event_disable(EV next, EV event, EV start_event, EV end_event);
2107
2109 AC choose_ml_action(AC action, ML alternative);
2110 AC move_ml_action(AC action, MN movement, float start_time, float end_time);
2111 AC color_ml_action(AC action, int color_num, CC cc);
2112 AC send_key_action(AC action, int key_id, int key_type);
2113 AC change_time_action(AC action, float new_time);
2114 AC array_action(std::vector<AC> arr);
2115 AC sequence_action(std::vector<AC> arr, float time_step);
2117
2118 ML event_bind(ML next, EV event, AC action);
2119private:
2120 Env &e;
2121};
2122
2123#ifdef F_MOVEMENT_NODE
2125{
2126public:
2130 IMPORT ML key_move_ml(EveryApi &ev, ML ml, int key_forward, int key_backward, int key_rotate_minus, int key_rotate_plus, float speed, float rot_speed, float start_angle, float start_x, float end_x, float start_z, float end_z);
2133 IMPORT MN mn_mouse_y(FF fetcher, MN move, float start_x, float end_x, float start_y, float end_y, float start_val, float end_val);
2134 IMPORT MN whack_a_mole_start(EveryApi &ev, MN prev, float &time);
2135 IMPORT MN whack_a_mole_rotate_around(EveryApi &ev, MN prev, int num, float &time);
2136 IMPORT MN whack_a_mole_exit(EveryApi &ev, MN prev, int exit_num, float &time);
2137 IMPORT MN whack_a_mole_all(EveryApi &ev, int cycle_count, int exit_num);
2138 IMPORT MN mn_interpolate(MN n1, MN n2, FF fetcher);
2139 IMPORT MN mn_interpolate2(MN n1, MN n2, float start_time, float end_time);
2140 IMPORT MN interpolate(MN n1, MN n2, float start_time, float end_time, float start_value, float end_value);
2141 IMPORT MN mn_empty();
2142 IMPORT MN level(MN next);
2143 IMPORT MN trans2(MN next, float dx, float dy, float dz);
2144 IMPORT MN scale2(MN next, float sx, float sy, float sz);
2145 IMPORT MN rotatex(MN next, float angle);
2146 IMPORT MN rotatey(MN next, float angle);
2147 IMPORT MN rotatez(MN next, float angle);
2148 IMPORT MN rotate_around_axis(MN next, float p_x, float p_y, float p_z, float v_x, float v_y, float v_z, float angle);
2149 IMPORT MN matrix(MN next, M mat);
2150 IMPORT MN pose(MN next, bool pose_in_screen);
2152 IMPORT MN translate(MN next, float start_time, float end_time,float dx, float dy, float dz);
2153 IMPORT MN translate_wave(MN next, float start_time, float end_time, WV wave, float dx, float dy, float dz);
2154 IMPORT MN scale_progress(MN next, bool is_x, bool is_y, bool is_z, int state);
2155 IMPORT MN scale_progress_max(MN next, bool is_x, bool is_y, bool is_z, int state);
2156 IMPORT MN mn_fetcher(PF pf);
2157 IMPORT MN scale(MN next, float start_time, float end_time,float sx, float sy, float sz);
2158 IMPORT MN scale_wave(MN next, float start_time, float end_time,WV wave,float sx, float sy, float sz);
2159 IMPORT MN rotate(MN next, float start_time, float end_time,float p_x, float p_y, float p_z,float v_x, float v_y, float v_z, float angle);
2160 IMPORT MN rotate_wave(MN next, float start_time, float end_time,WV wave,float p_x, float p_y, float p_z,float v_x, float v_y, float v_z, float angle);
2161
2162
2163 IMPORT MN compress(MN next, float start_time, float end_time);
2164 IMPORT MN change_time(MN next, float d_time);
2165 IMPORT MN event_activate(MN next, MN event, float event_time, float duration);
2166 IMPORT MN anim_enable(MN next, float start_time, float end_time);
2167 IMPORT MN anim_disable(MN next, float start_time, float end_time);
2168 IMPORT MN anim_choose(std::vector<MN> vec, float start_time, float duration);
2169 IMPORT MN time_repeat(MN next, float start_time, float repeat_duration);
2170 IMPORT CC color_start(unsigned int color);
2171 IMPORT CC color_interpolate(CC next, unsigned int color, unsigned int color2, float start_time, float end_time);
2172 IMPORT void set_matrix(MN n, M m);
2173 IMPORT M get_matrix(MN n, float time, float delta_time);
2174 IMPORT ML color_ml(EveryApi &ev, int color_num, ML ml, CC cc);
2175 IMPORT ML move_ml(EveryApi &ev, ML ml, MN mn, int clone_count=1, float time_delta=10.0);
2176 IMPORT ML keypress_move_ml(EveryApi &ev, ML ml, MN mn, int clone_count=1, float time_delta=10.0, int key=32, bool flipenabled=false);
2177 IMPORT ML move_ml_projection(EveryApi &ev, ML ml, MN mn, int clone_count=1, float time_delta=10.0);
2178 IMPORT P move_ml_p(EveryApi &ev, P p, MN move, float time);
2179 IMPORT ML repeat_ml(EveryApi &ev, ML ml, float duration);
2180 IMPORT ML key_activate_ml(EveryApi &ev, ML ml, MN mn, int key, float duration);
2181 IMPORT ML comb_key_activate_ml(EveryApi &ev, ML ml, MN mn, int key, int key_2, float duration);
2182 IMPORT ML temp_key_activate_ml(EveryApi &ev, ML ml, MN mn, int key, float duration);
2183 IMPORT ML move_x_ml(EveryApi &ev, ML ml, int key_forward, int key_backward, float speed, float start_x, float end_x);
2184 IMPORT ML move_y_ml(EveryApi &ev, ML ml, int key_forward, int key_backward, float speed, float start_y, float end_y);
2185 IMPORT ML move_z_ml(EveryApi &ev, ML ml, int key_forward, int key_backward, float speed, float start_z, float end_z);
2186 IMPORT ML rot_x_ml(EveryApi &ev, ML ml, int key_forward, int key_backward, float speed, float start_x, float end_x);
2187 IMPORT ML rot_y_ml(EveryApi &ev, ML ml, int key_forward, int key_backward, float speed, float start_y, float end_y);
2188 IMPORT ML rot_z_ml(EveryApi &ev, ML ml, int key_forward, int key_backward, float speed, float start_z, float end_z);
2189 IMPORT ML jump_ml(EveryApi &ev, ML ml, int key_jump, float height, float jump_duration);
2190 IMPORT ML move_ml_array(EveryApi &ev, std::vector<ML> ml, std::vector<MN> mn);
2191 IMPORT ML enable_ml(EveryApi &ev, ML ml, float start_time, float end_time);
2192 IMPORT ML key_event(EveryApi &ev, ML ml, MN mn, int type, int ch, int button, float duration);
2193 IMPORT ML wasd(EveryApi &ev, ML ml, MN w, MN a, MN s, MN d, float duration);
2194 IMPORT ML quake_ml(EveryApi &ev, ML ml, float speed, float rot_speed);
2195 IMPORT ML quake_ml2(EveryApi &ev, ML ml, float speed, float rot_speed);
2196 IMPORT ML quake_ml3(EveryApi &ev, ML ml, ML ml2, float speed, float rot_speed, float p_x, float p_y, float p_z);
2198 IMPORT ML local_move(EveryApi &ev, ML inner_ml, PTS center_points);
2199 IMPORT ML local_move_matrix(EveryApi &ev, ML inner_ml, MS center_points);
2200 IMPORT CMD default_cmds(float dx, float dy, float dz);
2201 IMPORT CMD cmd_repeat(CMD cmds, std::string repeat, float dx, float dy, float dz);
2202 IMPORT CMD cmd_rotate(CMD cmds, float v_x, float v_y, float v_z, float angle, float delta_angle);
2203 IMPORT PTS cmd_to_pts(CMD cmds, std::string commands);
2204 IMPORT LI cmd_to_li(CMD cmds, std::string commands);
2205 IMPORT PLF cmd_to_plf(CMD cmds, std::string commands);
2206
2207 IMPORT ML all_cursor_keys(EveryApi &ev, ML ml, float speed, float duration);
2208 IMPORT ML cursor_keys(EveryApi &ev, ML ml, int key_up, int key_left, int key_down, int key_right, float speed, float duration);
2209
2210 IMPORT ML player(ML prev);
2211 IMPORT ML enemy(ML prev);
2212 IMPORT ML player_pos(ML prev, PT pos);
2213 IMPORT ML enemy_pos(ML prev, PTS pos);
2214 IMPORT DC identity();
2215 IMPORT DC wave(float r,float speed1,float speed2,float dist1, float dist2,int sx,int sy);
2216 IMPORT DC sphwave(float r1, float fr_1, float t_1, float r2, float fr_2, float t_2);
2217 IMPORT DC explosion(float center_x, float center_y, float center_z, float start_val, float end_val, float start_time, float end_time);
2219 IMPORT DC split(DC d1, DC d2, float val);
2220private:
2221 Env &e;
2222};
2223#endif
2224
2225#ifdef F_EXPR_API
2227{
2228public:
2229 IMPORT ExprApi(Env &e);
2230 IMPORT EX variable(std::string name);
2231 IMPORT EX plus(EX e1, EX e2);
2232 IMPORT EX mul(EX e1, EX e2);
2233 IMPORT EX minus(EX e1, EX e2);
2234 IMPORT EX div(EX e1, EX e2);
2235 IMPORT EX sin(EX e1);
2236 IMPORT EX cos(EX e1);
2237 IMPORT EX float_constant(float val);
2238 IMPORT EX int_constant(int val);
2239
2240 IMPORT EX expr_float(std::string expr, bool &success);
2241 IMPORT EX expr_int(std::string expr, bool &success);
2242
2243 struct FloatExprEnv { std::string name; float value; };
2244 struct IntExprEnv { std::string name; int value; };
2245 IMPORT float expr_eval_float(EX expr, std::vector<FloatExprEnv> env);
2246 IMPORT int expr_eval_int(EX expr, std::vector<IntExprEnv> env);
2247private:
2248 Env &e;
2249};
2250#endif
2251
2252#ifdef F_GUI_API
2254{
2255public:
2256 GuiApi(Env &e, EveryApi &ev, SH sh) : e(e), ev(ev), sh(sh) { }
2257 IMPORT W hide_nonsearchable(W w, std::string label, W *redraw_w);
2258 IMPORT W hide_if_array_empty(W w, std::vector<W> items, W *redraw_w);
2259 IMPORT W search_panel(int sx, FtA atlas, BM atlas_bm, int x_gap, W *redraw_w);
2260 IMPORT W download_bar(GameApi::EveryApi &ev, std::vector<std::string> titles, std::vector<W> &close_button, std::vector<W> &buttons, FtA atlas, BM atlas_bm, int active_tab, std::vector<float> progress);
2261 IMPORT W directory_view(std::vector<std::string> dir_items, int &selection, std::vector<W> &clicks, FtA atlas, BM atlas_bm);
2262 IMPORT W asset_view(std::string url_or_filename);
2263 IMPORT W navi_bar(EveryApi &ev, std::vector<std::string> titles, W &back_button, W &forward_button, W &save_button, std::string &url, W &url_button, std::vector<W> &close_button, std::vector<W> &tab_change_button, W &new_tab_button, std::vector<std::string> bookmark_labels, std::vector<std::string> bookmark_urls, FtA atlas, BM atlas_bm, int &active_tab);
2264 IMPORT W alt(std::vector<W> vec, int *choose);
2265 IMPORT W overlap(EveryApi &ev, std::vector<W> vec);
2266 IMPORT W asset_item(EveryApi &ev, std::string jpg_url, std::string jpg_display_name, FtA atlas, BM atlas_bm);
2267 IMPORT W asset_dialog(EveryApi &ev, std::vector<std::string> jpg_urls, std::vector<std::string> jpg_display_names,W &select_button, W &cancel_button, FtA atlas, BM atlas_bm);
2268 IMPORT W dynamic_text(std::string need_letters, std::string *dyn_text, void (*fptr)(void *, float mouse_x, float mouse_y, int button, int ch, int type, int mouse_wheel_y), void *user_ptr, GameApi::FtA atlas, GameApi::BM atlas_bm, int x_gap);
2269 IMPORT W progress_dialog(int sx, int sy, FtA atlas, BM atlas_bm, std::vector<std::string> vec, int val, int max);
2270 IMPORT void update_progress_dialog(volatile W &w, int sx, int sy, FtA atlas, BM atlas_bm, std::vector<std::string> vec, int val, int max, int process);
2271 IMPORT void delete_widget(W w);
2272 IMPORT W window_decoration(int sx, int sy, std::string label, FtA atlas, BM atlas_bm);
2273 IMPORT W window_decoration2(int sx, int sy, std::string label, FtA atlas, BM atlas_bm, bool move);
2274 IMPORT W empty();
2276 IMPORT W alt(GameApi::EveryApi &ev, std::vector<W> vec, int *choose);
2277 IMPORT W text(std::string label, FtA atlas, BM atlas_bm, int x_gap=3);
2278 IMPORT W icon(BM bitmap);
2279 IMPORT W icon_shared(BM bitmap, int key);
2280 IMPORT W icon_shared_noscale(BM bitmap, int key);
2281 IMPORT W poly(P p, SH sh, int sx, int sy, int screen_size_x, int screen_size_y);
2282 IMPORT W va(VA p, SH sh, int sx, int sy, int screen_size_x, int screen_size_y);
2283 IMPORT W ml(ML p, SH sh, SH sh2, SH sh_2d, SH sh_arr, int sx, int sy, int screen_size_x, int screen_size_y);
2284 IMPORT W shader_plane(SFO p, int sx, int sy, int screen_size_x, int screen_size_y);
2285 IMPORT W lines(LI p, SH sh, int sx, int sy, int screen_size_x, int screen_size_y);
2286 IMPORT W pts(PTS p, SH sh, int sx, int sy, int screen_size_x, int screen_size_y);
2287 IMPORT W line(W target1, int delta_x, int delta_y,W target2, int delta2_x, int delta2_y, SH sh, SH old_sh);
2288 IMPORT W gradient(int sx, int sy, PT pos_1, PT pos_2, unsigned int colot_1, unsigned int color_2);
2289 IMPORT W button(int sx, int sy, unsigned int color_1, unsigned int color_2);
2290 IMPORT W mouse_move(W widget, int area_x, int area_y, int area_width, int area_height);
2291 IMPORT W window_move(W widget, int area_x, int area_y, int area_width, int area_height);
2292 IMPORT W click_area(W widget, int area_x, int area_y, int area_width, int area_height, int button_id);
2293 IMPORT W key_area(W widget, int area_x, int area_y, int area_width, int area_height, int key);
2294 IMPORT W click_visibility(W area_widget, W hidden_widget);
2295 IMPORT W click_hide(W widget);
2296 IMPORT W top_right_corner_match(W wid, W floating); // returns floating
2297 IMPORT W or_elem(W (*w1_func)(void*), W (*w2_func)(void*), void *data);
2298 IMPORT W rectangle(int start_x, int end_x, int start_y, int end_y, unsigned int color);
2299 IMPORT W highlight(int sx, int sy);
2300 IMPORT W highlight(W wid);
2301 IMPORT W layout(W item, int left, int top, int width, int height, int right, int bottom);
2302 IMPORT W layout_wh(W item, int left, int top, int width, int height, int right, int bottom, int (*fptr_W)(void *), int (*fptr_H)(void *), void *ctx1, void *ctx2);
2303 IMPORT W layout_lt(W item, int left, int top, int width, int height, int right, int bottom, int (*fptr_l)(void *), int (*fptr_t)(void *), void *ctx1, void *ctx2);
2304 IMPORT W layout_rb(W item, int left, int top, int width, int height, int right, int bottom, int (*fptr_r)(void *), int (*fptr_b)(void *), void *ctx1, void *ctx2);
2305 IMPORT W layout_lh(W item, int left, int top, int width, int height, int right, int bottom, int (*fptr_l)(void*), int (*fptr_H)(void*), void *ctx1, void *ctx2);
2306 IMPORT W margin(W item, int left, int top, int right, int bottom);
2307 IMPORT W size(W item, int sx, int sy);
2308 IMPORT W left_align(W item, int sx);
2309 IMPORT W right_align(W item, int sx);
2310 IMPORT W center_align(W item, int sx);
2311 IMPORT W center_y(W item, int sy);
2312 IMPORT W layer(W w1, W w2);
2313 IMPORT W array_y(std::vector<W> arr, int y_gap, bool heavy=false);
2314 IMPORT W array_x(W *arr, int size, int x_gap);
2315 IMPORT W timed_visibility(W orig, W (*timed_widget_func)(void*),void*data, W insert, float start_duration, float duration, float dx);
2316 IMPORT W tooltip(W orig, W insert, std::string label, FtA atlas, BM atlas_bm, int x_gap=2, float dx=40.0);
2317 IMPORT W popup_box(std::string label, std::vector<std::string> options, FtA atlas, BM atlas_bm);
2318 IMPORT W popup_box_menu(std::vector<std::string> options, FtA atlas, BM atlas_bm);
2319
2320 IMPORT W license_item(std::string filename, std::string &license_url, std::string &author, FtA atlas, BM atlas_bm, FtA atlas2, BM atlas_bm2);
2321 IMPORT W license_dialog(std::vector<std::string> filename,
2322 std::vector<std::string> &license_url,
2323 std::vector<std::string> &author_names,
2324 FtA atlas, BM atlas_bm,
2325 FtA atlas2, BM atlas_bm2,
2326 FtA atlas3, BM atlas_bm3,
2327 W &next_button, W &cancel_button, W &canvas2, W &canvas_area,W &scroll_bar);
2328
2329 IMPORT W main_menu(std::vector<std::string> labels, FtA atlas, BM atlas_bm);
2330 IMPORT W menu(W main_menu, int menu_id, std::vector<std::string> labels, FtA atlas, BM atlas_bm);
2331 IMPORT W submenu(W menu, int menu_pane_id, std::vector<std::string> labels, FtA atlas, BM atlas_bm);
2332 IMPORT W popup_menu(int x, int y, std::vector<std::string> labels, FtA atlas, BM atlas_bm, std::vector<W> &areas);
2333 IMPORT W scrollbar_y(int sx, int sy, int area_y);
2334 IMPORT W scrollbar_x(int sx, int sy, int area_x);
2335 IMPORT W scroll_area(W orig, int sx, int sy, int screen_y);
2336 IMPORT W scroll_area2(W orig, int sx, int sy, int screen_y);
2337 IMPORT W waveform(std::function<float (float)> f, float start_range, float end_range, float min_value, float max_value, int sx, int sy, unsigned int true_color, unsigned int false_color);
2338 IMPORT W canvas(int sx, int sy);
2339 IMPORT W find_canvas_item(W canvas, std::string id);
2340 IMPORT int canvas_item_index(W canvas, W item);
2341 IMPORT int canvas_item(W canvas, W item, int x, int y);
2342 IMPORT void del_canvas_item(W canvas, int id);
2343 IMPORT W canvas_item_gameapi_node(int sx, int sy, std::string label, std::vector<std::string> param_types, std::vector<std::string> param_tooltips, std::string return_type, FtA atlas, BM atlas_bm, std::vector<W *> connect_click, std::string uid, std::vector<W> &params, std::string symbol, std::string comment);
2344 IMPORT W list_item_title(int sx, std::string label, FtA atlas, BM atlas_bm);
2345 IMPORT W list_item_opened(int sx, std::string label, FtA atlas, BM atlas_bm, std::vector<std::string> subitems, std::vector<std::string> subitems_tooltip, FtA atlas2, BM atlas_bm2, W insert, bool hide, W *redraw_w, std::vector<std::string> subitems_funcname);
2346 IMPORT W list_item(BM icon, std::string label, int sx, int sy);
2347 IMPORT W list(W *array, int size, int sx, int sy);
2348 IMPORT W dialog_item(std::string text, BM icon, int sx, int sy);
2350 IMPORT W copy_paste_dialog(SH sh, W &close_button, FI font, FtA atlas, BM atlas_bm, std::string &edit);
2351 IMPORT W bitmap_dialog(BM bm, W &close_button, FtA atlas, BM atlas_bm, W &codegen_button, W &collect_button, FtA atlas_tiny, BM atlas_tiny_bm);
2352 IMPORT W polygon_dialog(P p, SH sh, int screen_size_x, int screen_size_y, W &close_button, FtA atlas, BM atlas_bm, W &codegen_button, W &collect_button, W &mem);
2353 IMPORT W va_dialog(VA p, SH sh, int screen_size_x, int screen_size_y, W &close_button, FtA atlas, BM atlas_bm, W &codegen_button, W &collect_button);
2354 IMPORT W ml_dialog(ML p, SH sh, SH sh2, SH sh_2d, SH sh_arr, int screen_size_x, int screen_size_y, W &close_button, FtA atlas, BM atlas_bm, W &codegen_button, W &collect_button);
2355 IMPORT W shader_dialog(SFO p, W &close_button, FtA atlas, BM atlas_bm, int screen_size_x, int screen_size_y, W &codegen_button, W &collect_button);
2356 IMPORT W lines_dialog(LI p, SH sh, int screen_size_x, int screen_size_y, W &close_button, FtA atlas, BM atlas_bm, W &codegen_button, W &collect_button);
2357 IMPORT W pts_dialog(PTS p, SH sh, int screen_size_x, int screen_size_y, W &close_button, FtA atlas, BM atlas_bm, W &codegen_button, W &collect_button);
2358
2359 IMPORT W button_with_text(std::string label);
2362 IMPORT W editor_mouse_tweak(W inner, W outer, W outerouter);
2363 IMPORT W string_editor(std::string allowed_chars, std::string &target, std::string &target_expr, FtA atlas, BM atlas_bm, int x_gap, int non_editable, W *redraw_w, bool allow_expr=true);
2364 IMPORT W multiline_string_editor(std::string allowed_chars, std::string &target, FI font, int x_gap, int line_height);
2365 IMPORT W url_editor(std::string &target, FtA atlas, BM atlas_bm, int x_gap, std::string &expr, int noneditnum=0);
2366 IMPORT W float_editor(float &target, std::string &target_expr, FtA atlas, BM atlas_bm, int x_gap, int noneditnum=0);
2367 IMPORT W int_editor(int &target, std::string &target_expr, FtA atlas, BM atlas_bm, int x_gap, int noneditnum=0);
2368 IMPORT W enum_editor(EveryApi &ev, W &click_target, int &target, FtA atlas, BM atlas_bm, int x_gap, std::string type,std::string &expr,int noneditnum=0);
2369 IMPORT W long_editor(long &target, FtA atlas, BM atlas_bm, int x_gap,int noneditnum, std::string &expr);
2370 IMPORT W point_editor(float &x, float &y, float &z, FtA atlas, BM atlas_bm, int x_gap);
2371 IMPORT W color_editor(std::string &col, FtA atlas, BM atlas_bm, int x_gap,int noneditnum, std::string &expr);
2373 {
2376 float f_value;
2377 float f_x, f_y, f_z;
2378 std::string color;
2379 std::string s;
2380 std::string expr;
2381 };
2382 IMPORT W generic_editor(EveryApi &ev, EditTypes &target, FtA atlas, BM atlas_bm, std::string type, int x_gap, FtA atlas_tiny, BM atlas_tiny_bm, int sy, W &click_target);
2383 IMPORT void generic_to_string(const EditTypes &source, std::string type, std::string &target, std::string &expr);
2384 IMPORT void string_to_generic(EditTypes &target, std::string type, const std::string &source, const std::string &expr);
2385 IMPORT W edit_dialog(const std::vector<std::string> &labels, const std::vector<EditTypes*> &vec, Ft font, const std::vector<std::string> &types, W &cancel_button, W &ok_button);
2386 IMPORT W edit_dialog(EveryApi &ev, const std::vector<std::string> &labels, const std::vector<EditTypes*> &vec, FtA atlas, BM atlas_bm, const std::vector<std::string> &types, W &cancel_button, W &ok_button, FtA atlas_tiny, BM atlas_tiny_bm, std::vector<W> &enum_click_targets);
2387 IMPORT W bitmapapi_functions_list_item(FtA font1, BM font1_bm, FtA font2, BM font2_bm, W insert, W *outer);
2388 IMPORT W boolbitmapapi_functions_list_item(FtA font1, BM font1_bm, FtA font2, BM font2_bm, W insert, W *outer);
2389 IMPORT W floatbitmapapi_functions_list_item(FtA font1, BM font1_bm, FtA font2, BM font2_bm, W insert, W *outer);
2390 IMPORT W polygonapi_functions_list_item(FtA font1, BM font1_bm, FtA font2, BM font2_bm, W insert, W *outer);
2391 IMPORT W polygondistapi_functions_list_item(FtA font1, BM font1_bm, FtA font2, BM font2_bm, W insert, W *outer);
2392 IMPORT W shadermoduleapi_functions_list_item(FtA font1, BM font1_bm, FtA font2, BM font2_bm, W insert, W *outer);
2393 IMPORT W shaderapi_functions_list_item(FtA font1, BM font1_bm, FtA font2, BM font2_bm, W insert, W *outer);
2394 IMPORT W framebuffermoduleapi_functions_list_item(FtA font1, BM font1_bm, FtA font2, BM font2_bm, W insert, W *outer);
2395 IMPORT W linesapi_functions_list_item(FtA font1, BM font1_bm, FtA font2, BM font2_bm, W insert, W *outer);
2396 IMPORT W pointsapi_functions_list_item(FtA font1, BM font1_bm, FtA font2, BM font2_bm, W insert, W *outer);
2397 IMPORT W pointapi_functions_list_item(FtA font1, BM font1_bm, FtA font2, BM font2_bm, W insert, W *outer);
2398 IMPORT W vectorapi_functions_list_item(FtA font1, BM font1_bm, FtA font2, BM font2_bm, W insert, W *outer);
2399 IMPORT W volumeapi_functions_list_item(FtA font1, BM font1_bm, FtA font2, BM font2_bm, W insert, W *outer);
2400 IMPORT W floatvolumeapi_functions_list_item(FtA font1, BM font1_bm, FtA font2, BM font2_bm, W insert, W *outer);
2401 IMPORT W colorvolumeapi_functions_list_item(FtA font1, BM font1_bm, FtA font2, BM font2_bm, W insert, W *outer);
2402 IMPORT W fontapi_functions_list_item(FtA font1, BM font1_bm, FtA font2, BM font2_bm, W insert, W *outer);
2403 IMPORT W textureapi_functions_list_item(FtA font1, BM font1_bm, FtA font2, BM font2_bm, W insert, W *outer);
2404 IMPORT W booleanopsapi_functions_list_item(FtA font1, BM font1_bm, FtA font2, BM font2_bm, W insert, W *outer);
2405 IMPORT W moveapi_functions_list_item(FtA font1, BM font1_bm, FtA font2, BM font2_bm, W insert, W *outer);
2406 IMPORT W waveformapi_functions_list_item(FtA font1, BM font1_bm, FtA font2, BM font2_bm, W insert, W *outer);
2407 IMPORT W blockerapi_functions_list_item(GameApi::EveryApi &ev, FtA font1, BM font1_bm, FtA font2, BM font2_bm, W insert, W *outer);
2408
2409
2410 IMPORT std::string bitmapapi_functions_item_label(int i);
2411 IMPORT std::string waveformapi_functions_item_label(int i);
2413 IMPORT std::string boolbitmapapi_functions_item_label(int i);
2415 IMPORT std::string polygonapi_functions_item_label(int i);
2418 IMPORT std::string shaderapi_functions_item_label(int i);
2420 IMPORT std::string linesapi_functions_item_label(int i);
2421 IMPORT std::string pointsapi_functions_item_label(int i);
2422 IMPORT std::string pointapi_functions_item_label(int i);
2423 IMPORT std::string vectorapi_functions_item_label(int i);
2424 IMPORT std::string volumeapi_functions_item_label(int i);
2427 IMPORT std::string fontapi_functions_item_label(int i);
2428 IMPORT std::string textureapi_functions_item_label(int i);
2429 IMPORT std::string booleanopsapi_functions_item_label(int i);
2430 IMPORT std::string moveapi_functions_item_label(int i);
2431 IMPORT W insert_widget(W item, std::function<void(int,int)> f);
2433
2434 IMPORT void set_pos(W w, float px, float py);
2435 IMPORT void set_size(W ow, float sx, float sy);
2436 IMPORT void update(W w, PT mouse_cursor_pos, int button, int ch, int type, int mouse_wheel_y);
2437 IMPORT void render(W w);
2438 IMPORT int chosen_item(W w);
2439 IMPORT void select_item(W w, int item);
2440 IMPORT float dynamic_param(W w, int id);
2441 IMPORT void set_dynamic_param(W w, int id, float val);
2442 IMPORT std::string get_id(W w);
2443 IMPORT void set_id(W w, std::string id);
2444 IMPORT int get_index(W w);
2445 IMPORT void set_index(W w, int j);
2446 IMPORT int get_size2(W w);
2447 IMPORT void set_size2(W w, int sz);
2448 IMPORT int num_childs(W w);
2449 IMPORT W get_child(W w, int i);
2450 IMPORT int pos_x(W w);
2451 IMPORT int pos_y(W w);
2452 IMPORT int size_x(W w);
2453 IMPORT int size_y(W w);
2454
2455 IMPORT std::vector<std::pair<std::string,std::string> > get_functions_mapping(GameApi::EveryApi &ev);
2456private:
2457 Env &e;
2458 EveryApi &ev;
2459 SH sh;
2460};
2461#endif
2462
2463 class EditNode;
2465 std::vector<EditNode*> res;
2466 std::string p;
2467 std::string pn;
2468 };
2469
2470
2471 int collect_counter(int mode); // 0=reset, 1=count_next
2472
2473#ifdef F_WMOD_API
2475{
2476public:
2477 IMPORT WModApi(Env &e);
2478 IMPORT std::string dep_from_function(EveryApi &ev, WM mod2, int id);
2479 IMPORT std::string deps_from_mod(EveryApi &ev, WM mod2);
2480 IMPORT std::string extract_deps(std::string filename);
2481 IMPORT std::string extract_funcname(std::string line);
2484 IMPORT std::string dump_functions(GameApi::EveryApi &ev, int i);
2485 IMPORT WM load(EveryApi &ev, std::string filename);
2486 IMPORT void save(WM mod, std::string ilename);
2487 IMPORT void insert_to_canvas(GameApi::EveryApi &ev, GuiApi &gui, W canvas, WM mod, int id, FtA font, BM font_bm, std::vector<W> &connect_clicks, std::vector<W> &params, std::vector<W> &diaplay_clicks, std::vector<W> &edit_clicks, std::vector<W> &delete_key, std::vector<W> &codegen_button, std::vector<W> &popup_open, void (*fptr)(void*), void *data);
2488 IMPORT void update_lines_from_canvas(W canvas, WM mod, int id);
2489 IMPORT void insert_inserted_to_canvas(GuiApi &gui, W canvas, W item, std::string uid, W &display_clicks, W &edit_clicks, W &delete_key, W &codegen_button, W &popup_open);
2490 IMPORT W inserted_widget(GameApi::EveryApi &ev, GuiApi &gui, WM mod2, int id, FtA atlas, BM atlas_bm, std::string func_name, std::vector<W *> connect_click, std::string uid, std::vector<W> &params);
2491 IMPORT std::vector<int> indexes_from_funcname(GameApi::EveryApi &ev, std::string funcname);
2492 IMPORT std::vector<std::string> types_from_function(GameApi::EveryApi &ev, WM mod, int id, std::string funcname);
2493 IMPORT std::vector<std::string> labels_from_function(GameApi::EveryApi &ev, WM mod, int id, std::string funcname);
2494 IMPORT std::vector<std::string*> refs_from_function(GameApi::EveryApi &ev, WM mod, int id, std::string funcname);
2495 IMPORT std::vector<std::string*> exprs_from_function(GameApi::EveryApi &ev, WM mod, int id, std::string funcname);
2496 IMPORT std::vector<std::pair<std::string,std::string> > defaults_from_function(GameApi::EveryApi &ev, std::string module_name);
2498 std::string first;
2499 std::string second;
2500 bool is_array = false;
2502 };
2503 IMPORT void insert_to_mod(WM mod, int id, std::string modname, std::string uid, bool array_return, int x, int y, std::vector<InsertParam> params);
2504
2505 IMPORT std::string get_funcname(WM mod2, int id, std::string uid);
2506 IMPORT void change_param_value(WM mod2, int id, std::string uid, int param_index, std::string newvalue, int j);
2507 IMPORT void change_param_is_array(WM mod2, int id, std::string uid, int param_index, bool is_array, int ref_line_index);
2508 IMPORT void change_param_multiple_return_values(WM mod2, int id, std::string uid, int j, int sz);
2509 IMPORT int find_line_index(WM mod2, int id, std::string uid);
2510 IMPORT std::string param_value(WM mod2, int id, std::string uid, int param_index);
2511 IMPORT std::vector<std::string> parse_param_array(std::string s);
2512 IMPORT std::pair<std::string,int> parse_multiple_return_uid(std::string s, bool &success);
2513 IMPORT std::string generate_param_array(std::vector<std::string> v);
2514 IMPORT bool typecheck(GameApi::EveryApi &ev, WM mod2, int id, std::string uid1, std::string uid2, int param_index, int ret_index, bool &is_array, bool &is_array_return);
2515 IMPORT void insert_links(EveryApi &ev, GuiApi &gui, WM mod2, int id, std::vector<W> &links, W canvas, const std::vector<W> &connect_targets, SH sh2, SH sh);
2516
2517 IMPORT int execute(EveryApi &ev, WM mod2, int id, std::string line_uid, ExecuteEnv &exeenv, int level, int j);
2518 IMPORT std::pair<int,std::vector<std::string> > collect_urls(EveryApi &ev, WM mod2, int id, std::string line_uid, ExecuteEnv &exeenv, int level, ASyncData *arr, int arr_size, int j, bool use_async=false);
2519
2520
2521 IMPORT CollectResult collect_nodes(EveryApi &ev, WM mod2, int id, std::string line_uid, int level);
2523 IMPORT std::pair<std::string, std::string> codegen(EveryApi &ev, WM mod2, int id, std::string line_uid, int level, int j, CodeGenPositions *pos=0);
2524 IMPORT std::string return_type(GameApi::EveryApi &ev, WM mod2, int id, std::string line_uid);
2525 IMPORT void delete_by_uid(WM mod2, int id, std::string line_uid);
2526private:
2527 Env &e;
2528};
2529#endif
2530
2531#ifdef F_FLOAT_VOLUME_API
2533{
2534public:
2536 IMPORT FO light(float dist);
2537 IMPORT FO julia(float c_x, float c_y, float limit);
2538 IMPORT FO mandelbrot(float x_x, float x_y, float limit);
2539 IMPORT FO function(std::function<float(float x, float y, float z)> f);
2540 IMPORT FO from_volume(O o, float false_val, float true_val);
2541 IMPORT FO from_float_bitmap(FB bm,float start_x, float end_x, float start_y, float end_y, float start_z, float end_z);
2542 IMPORT FO distance();
2543 IMPORT FO torusdistance(PT center, V u_x, V u_y, float radius);
2544 IMPORT FO move(FO f1, float dx, float dy, float dz);
2545 IMPORT FO minimum(FO f1, FO f2);
2546 IMPORT FO maximum(FO f1, FO f2);
2547 IMPORT FO waveform_sphere(WV wav, float r);
2548 IMPORT WV wave_move_y(WV wav, float delta);
2549 IMPORT O subvolume(FO f, float start_range, float end_range);
2550 IMPORT FO smooth(std::vector<FO> vec, float val);
2551 IMPORT FO interpolate(FO f1, FO f2, float val);
2552 IMPORT FO min_distance(C curve);
2553
2554 IMPORT FO shadow(FD fd, V light_dir, float mint, float maxt, float k);
2555
2556 IMPORT FB integrate_render(FO obj, int sx, int sy, int numsamples);
2557
2558 //FO plus(FO f1, FO f2);
2559 IMPORT BM raytrace(FO object, int sx, int sy,
2560 PT ray_0, PT ray_x, PT ray_y, PT ray_z, float surface_value);
2561 IMPORT FOA prepare(FO object, int numpoints,
2562 float start_x, float start_y, float start_z,
2563 float end_x, float end_y, float end_z);
2564 IMPORT void render(FOA array);
2565private:
2567 void operator=(const FloatVolumeApi&);
2568 Env &e;
2569};
2570#endif
2571
2572#ifdef F_COLOR_VOLUME_API
2574{
2575public:
2577 IMPORT COV function(std::function<unsigned int(float x, float y, float z)> f);
2578 IMPORT COV from_float_volume(FO obj, unsigned int col0, unsigned int col1);
2579 IMPORT COV from_volume(O obj, unsigned int col_true, unsigned int col_false);
2581
2582 IMPORT COV mix(COV p1, COV p2, float value); // value=[0..1]
2584 IMPORT COV phong(VO normal, PT light_pos, CO i_s, CO i_d, CO i_a, float k_s, float k_d, float k_a, float alfa);
2585 IMPORT COV directcolor(VO normal);
2587 IMPORT BM texture_bm(P obj, COV colors, int face, int sx, int sy);
2588 IMPORT BM array_bm(COV colours, int sx, int sy, float ssx, float ssy, float z);
2589 // TODO
2590private:
2592 void operator=(const ColorVolumeApi&);
2593 Env &e;
2594};
2595#endif
2596
2597#ifdef F_VECTOR_VOLUME_API
2599{
2600public:
2602 IMPORT VO function(std::function<V(float x, float y, float z)> f);
2603 IMPORT VO normal(FD fd);
2604 IMPORT VO normal2(FO fo, float stepsize);
2605 IMPORT P setup_normal(P orig, VO v);
2606private:
2608 void operator=(const VectorVolumeApi&);
2609
2610 Env &e;
2611};
2612#endif
2613
2614#ifdef F_DISTANCE_FLOAT_VOLUME_API
2616{
2617public:
2619 IMPORT FD function(std::function<float(float x, float y, float z)> f);
2620 IMPORT FD fd_sphere(PT center, float radius);
2621 IMPORT FD fd_cube(float start_x, float end_x,float start_y, float end_y,float start_z, float end_z);
2622 IMPORT FD fd_round_cube(float start_x, float end_x,float start_y, float end_y,float start_z, float end_z,float r);
2623 IMPORT FD fd_torus(float radius_1, float radius_2);
2624 IMPORT FD fd_cone(float c_x, float c_y);
2625 IMPORT FD fd_plane(float n_x, float n_y, float n_z, float n_w);
2626 IMPORT FD fd_hex_prism(float h_x, float h_y);
2627 IMPORT FD fd_tri_prism(float h_x, float h_y);
2630 IMPORT FD fd_line(PT start, PT end, float dist);
2631 IMPORT FD fd_color(FD fd, float r, float g, float b, float a);
2632 IMPORT FD fd_rot_x(FD fd, float angle);
2633 IMPORT FD fd_rot_y(FD fd, float angle);
2634 IMPORT FD fd_rot_z(FD fd, float angle);
2635 IMPORT FD fd_trans(FD fd, float dx, float dy, float dz);
2636
2637 IMPORT FD fd_min(FD a1, FD a2);
2638 IMPORT FD fd_max(FD a1, FD a2);
2639 IMPORT FD fd_and_not(FD a1, FD a2);
2640 IMPORT FD fd_blend(FD a1, FD a2, float k);
2642 IMPORT FD ambient_occulsion(FD fd, float d, float i);
2644 float dx, float dy, float dz,
2645 int sx, int sy,
2646 float ssx, float ssy,
2647 int ssxi, int ssyi,
2648 float ssx2, float ssy2);
2650 float pos_x, float pos_y, float pos_z,
2651 float dx, float dy, float dz,
2652 int sx, int sy,
2653 float ssx, float ssy,
2654 int ssxi, int ssyi,
2655 float ssx2, float ssy2);
2657 float dx, float dy, float dz,
2658 int sx, int sy,
2659 float ssx, float ssy,
2660 int ssxi, int ssyi,
2661 float ssx2, float ssy2);
2662 IMPORT PT ray_shape_intersect(FD shape, PT pos, V vec);
2663 IMPORT BM render(FD obj,PT pos, V u_x, V u_y, V u_z, int sx, int sy);
2664 IMPORT BM render2(EveryApi &ev, FD obj, int sx, int sy);
2665 IMPORT std::string shader_func(std::string name, FD obj, COV color);
2666private:
2668 void operator=(const DistanceFloatVolumeApi&);
2669
2670 Env &e;
2671};
2672#endif
2673
2674#ifdef F_SEPARATE_API
2676{
2677public:
2679 SA empty();
2680 SA u_sep(SA orig, float (*sep_u)(float x, float y, float z, void *data), void *data);
2681 SA v_sep(SA orig, float (*sep_v)(float x, float y, float z, void *data), void *data);
2682 SA surf_sep(SA orig, float (*sep_dist)(float x, float y, float z, void *data), void *data);
2683 P create_quads(SA object, float dist, float dist_accuracy,
2684 float x_range_start, float x_range_end, float x_step,
2685 float y_range_start, float y_range_end, float y_step,
2686 float z_range_start, float z_range_end, float z_step,
2687 float u_range_start, float u_range_end, float u_step,
2688 float v_range_start, float v_range_end, float v_step);
2689
2690private:
2691 Env &e;
2692};
2693#endif
2694
2695#ifdef F_SURFACE_API
2697{
2698public:
2699 IMPORT SurfaceApi(Env &e);
2701 S plane(PT pos, V u_x, V u_y);
2702 S sphere(PT center, float radius);
2703 S torus(PT center, float dist1, float dist2, PT pos, PT u_x, PT u_y);
2704 S interpolate(S s1, S s2, float val); // val = [0..1]
2705
2706 S betweensurface(C curve1, C curve2);
2707
2708 S bitmapsphere(PT center, float radius0, float radius1, BM height);
2709
2710 S color(S orig, unsigned int color);
2711 S texture(S orig, BM texture); // see bitmaptexturesurface from graph.hh
2712
2713 BM render(S surf, int sx, int sy, PT ray_0, PT ray_x, PT ray_y, PT ray_z);
2714 PTS surface_points(S surf, int sx, int sy);
2715private:
2716 void *priv;
2717 Env &e;
2718};
2719#endif
2720
2721#ifdef F_TRISTRIP_API
2723{
2724public:
2728 IMPORT TS function(std::function<PT (int i)> f, int count);
2729 IMPORT TS color_function(TS ts, std::function<unsigned int (int i)> f);
2730 IMPORT TS texcoord_function(TS ts, std::function<PT (int i)> texcoord);
2731 IMPORT TS normal_function(TS ts, std::function<V (int i)> normal);
2732 IMPORT TS rectangle_xy(float start_x, float end_x, float start_y, float end_y, float z, int sx, int sy);
2733 IMPORT TS rectangle_xz(float start_x, float end_x, float y, float start_z, float end_z);
2734 IMPORT TS circle(float center_x, float center_y, float center_z, float radius, int count);
2735 IMPORT TS transform(TS orig, std::function<PT (PT)> trans);
2736
2737 IMPORT TS from_convex_plane(PL pl, PT pos, V u_x, V u_y);
2738 IMPORT TS span_3d_object(TS orig, float z_dist);
2739
2741 IMPORT TS or_array(TS *array, int size);
2742
2743 IMPORT void save(TS tris, std::string filename);
2744 IMPORT TS load(std::string filename);
2745 IMPORT P to_poly(TS strip);
2746 IMPORT TS from_poly(P poly);
2747private:
2748 Env &e;
2749};
2750#endif
2751
2752#ifdef F_CUTTER_API
2754{
2755public:
2756 IMPORT CutterApi(Env &e);
2757 IMPORT CT function(std::function<PT (PT,PT)> f);
2758 IMPORT CT plane_cut(PT pos, V u_x, V u_y);
2759 //IMPORT CT sphere_cut(PT center, float radius);
2760 IMPORT CT distance_cut(FD dist);
2761 IMPORT O cutter_volume(CT c, PT point_from_inside, float outside_dist);
2762private:
2763 Env &e;
2764};
2765#endif
2766
2767 struct BO { int id; };
2768#ifdef F_BOOLEAN_OPS
2769
2771{
2772public:
2773 IMPORT BooleanOps(Env &e);
2774 IMPORT BO create_bo(P mesh, O bools, FD fd);
2775 IMPORT BO cube_bo(EveryApi &ev, float start_x, float end_x,float start_y, float end_y,float start_z, float end_z,int split_x, int split_y);
2776 IMPORT BO sphere_bo(EveryApi &ev, PT center, float radius, int numfaces1, int numfaces2);
2777 //BO cone(int numfaces, PT p1, PT p2, float rad1, float rad2);
2778 //BO torus(int numfaces1, int numfaces2, PT center, V u_x, V u_y, float radius1, V uu_x, V uu_y, float radius2);
2779 IMPORT BO or_elem_bo(EveryApi &ev, BO obj, BO obj2);
2780 IMPORT BO and_not_bo(EveryApi &ev, BO obj, BO not_obj);
2781 IMPORT BO intersect_bo(EveryApi &ev, BO obj, BO obj2);
2782 IMPORT P to_polygon(BO obj);
2783 IMPORT O to_volume(BO obj);
2784 IMPORT FD to_dist(BO obj);
2785private:
2786 Env &e;
2787};
2788#endif
2789struct PD { int id; };
2790
2791#ifdef F_POLYGON_DISTANCE_FIELD
2793{
2794public:
2797 IMPORT PD create_pd(P mesh, SFO distance_field);
2798 IMPORT PD cube_pd(EveryApi &ev, float start_x, float end_x,float start_y, float end_y,float start_z, float end_z);
2799 IMPORT PD rounded_cube_pd(EveryApi &ev, float start_x, float end_x,float start_y, float end_y,float start_z, float end_z,float radius);
2800 IMPORT PD sphere_pd(EveryApi &ev, PT center, float radius, int numfaces1, int numfaces2);
2801 IMPORT PD cone_pd(EveryApi &ev, int numfaces, PT p1, PT p2, float rad1, float rad2);
2802 IMPORT PD or_array_pd(EveryApi &ev, std::vector<PD> vec);
2803 IMPORT PD translate_pd(EveryApi &ev, PD orig, float dx, float dy, float dz);
2804 IMPORT PD rotatex_pd(EveryApi &ev, PD orig, float angle);
2805 IMPORT PD rotatey_pd(EveryApi &ev, PD orig, float angle);
2806 IMPORT PD rotatez_pd(EveryApi &ev, PD orig, float angle);
2807 IMPORT PD scale_pd(EveryApi &ev, PD orig, float sx, float sy, float sz);
2809 IMPORT PD ambient_occulsion_sfo(EveryApi &ev, PD obj, float d, float i);
2810 IMPORT PD colormod_from_position(EveryApi &ev, PD obj, float px, float py, float pz, float sx, float sy, float sz);
2812
2813 IMPORT ML render_scene(EveryApi &ev, PD object, PD world); // this has access to sfo, P and matrix stack -- should make dynamic movement possible with proper shading which responds to movement of the objects in the scene. especially AO needs to be recalculated, but will also allow other shading stuff. This hasnt worked before since P object doesnt have access to shader side, SFO can't deal with meshes and matrix stack/ML is completely separate and it's needed for movement. // shader side needs to respond to matrix stack changes. So this is basically a bridge between matrix stack and shaders.
2814 IMPORT std::vector<ML> render_scene_array(EveryApi &ev, std::vector<PD> vec); // this on the other hand, is completely different -- it can connect multiple objects together in nice way. Unfortunately, builder doesn't support this api, but it's anyway useful later. (we can make builder support this prototype)
2815
2818private:
2819 Env &e;
2820};
2821#endif
2822#ifdef F_POLYGON_ARRAY_API
2824{
2825public:
2827 Pa split_p(EveryApi &ev, P p, int max_chunk);
2828 Va create_vertex_array(EveryApi &ev, Pa p, bool keep=false);
2829 void delete_vertex_array(EveryApi &ev, Va va);
2831 void prepare_vertex_array_instanced(EveryApi &ev, ShaderApi &sha, Va va, PTA pta, SH sh);
2833 void render_vertex_array_instanced(EveryApi &ev, ShaderApi &sha, Va va, PTA pta, SH sh);
2834private:
2835 Env &e;
2836};
2837#endif
2838#ifdef F_POLYGON_API
2839
2841{
2842 std::string material_name;
2843 float Ns;
2844 float Ni;
2845 float d;
2846 float Tr;
2848 float Ka_x, Ka_y, Ka_z;
2852 std::string map_Ka;
2853 std::string map_Kd;
2854 std::string map_d;
2855 std::string map_bump;
2856 std::string bump;
2857};
2858
2860{
2861public:
2863
2864 BM render_with_lipschitz_and_forallexists(EveryApi &ev, FS bounding_spheres, O obj, float z, float z_dist, unsigned int bg_color, float per_pixel_sample_rate, float start_x, float end_x, float start_y, float end_y, int sx, int sy);
2865 FS fs_sphere(float center_x, float center_y, float center_z, float radius);
2866 FS fs_min(FS a1, FS a2);
2867 FS fs_min_arr(std::vector<FS> arr);
2868 FS fs_bound_x(FS left, FS right, float x);
2869 FS fs_bound_y(FS left, FS right, float y);
2870 FS fs_bound_z(FS left, FS right, float z);
2871
2872 FS color_scene(FS scene, unsigned int color, int fptr_enum);
2873 FS fd_to_fs(EveryApi &ev, FD fd);
2874 VX fs_to_vx(EveryApi &ev, int sx, int sy, int sz, float ssx, float ssy, float ssz, FS obj, float pos);
2875 O fs_to_o(FS obj, float val);
2876 ML fs_to_ml(EveryApi &ev, int sx, int sy, int sz,
2877 float ssx, float ssy, float ssz,
2878 FS obj,
2879 float pos,
2880 //std::vector<P> vec,
2881 MT mat, float sx1, float sy1, float sz1);
2882 ML fs_to_ml3(EveryApi &ev, int sx, int sy, int sz,
2883 float ssx, float ssy, float ssz,
2884 FS obj,
2885 float pos,
2886 //std::vector<P> vec,
2887 MT mat, float sx1, float sy1, float sz1,
2888 float border_width, unsigned int border_color);
2889 ML fs_to_ml4(EveryApi &ev, int sx, int sy, int sz,
2890 float ssx, float ssy, float ssz,
2891 FS obj,
2892 float pos,
2893 //std::vector<P> vec,
2894 float sx1, float sy1, float sz1,
2895 float border_width, unsigned int border_color);
2896 ML o_to_ml3(EveryApi &ev, int sx, int sy, int sz,
2897 float ssx, float ssy, float ssz,
2898 O obj,
2899 float pos,
2900 //std::vector<P> vec,
2901 MT mat, float sx1, float sy1, float sz1,
2902 float border_width, unsigned int border_color);
2903 ML o_to_ml4(EveryApi &ev, int sx, int sy, int sz,
2904 float ssx, float ssy, float ssz,
2905 O obj,
2906 float pos,
2907 //std::vector<P> vec,
2908 float sx1, float sy1, float sz1,
2909 float border_width, unsigned int border_color);
2910 ML fs_to_ml2(EveryApi &ev, int sx, int sy, int sz,
2911 float ssx, float ssy, float ssz,
2912 FS obj,
2913 float pos,
2914 //std::vector<P> vec,
2915 MT mat, float sx1, float sy1, float sz1, float border_width, unsigned int border_color);
2916private:
2917 Env &e;
2918};
2919
2920
2922{
2923public:
2924 IMPORT PolygonApi(Env &e);
2926 IMPORT P solid_of_revolution(EveryApi &ev, int numfaces, float p_x, float p_y, float p_z, float p1_x, float p1_y, float p1_z, std::string deltas, std::string radiuses);
2927 IMPORT P prepare_cache(std::string url, P p);
2928 IMPORT P sphere_rays(float center_x, float center_y, float center_z, float radius,
2929 float delta_alfa, float delta_beta,
2930 FS field,
2931 int maxiter, float c, std::vector<PT> vec);
2932 IMPORT ARR sphere_rays2(EveryApi &ev, float center_x, float center_y, float center_z, float radius,
2933 float delta_alfa, float delta_beta,
2934 FS field,
2935 int maxiter, float c, std::vector<PT> vec);
2936 IMPORT PV p_array(std::vector<P> vec);
2937 IMPORT ARR array_p_array(std::vector<PV> vec);
2938 IMPORT ARR seq_p_array(std::vector<P> vec, std::vector<P> vec2);
2939 IMPORT P interpolate_mesh_pair(P start_p, P end_p);
2940 IMPORT ARR interpolate_mesh_pair_arr(std::vector<P> start_ps, std::vector<P> end_ps);
2944 IMPORT P multiply_facecoll(P p, int sx, int sy, int sz);
2945 IMPORT P spatial_decimate(P p, float val);
2946 IMPORT TF decimate_tf(TF mesh, float val);
2947 IMPORT TF decimate_tf_zero(TF mesh);
2948 IMPORT P decimate(P p, float val);
2949 IMPORT P decimate2(P p, float val);
2950 IMPORT P decimate3(P p, float val);
2952 IMPORT P decimate3_inv(P p, float val);
2953 IMPORT P decimate_without_holes(EveryApi &ev, P p, float, int, float, std::vector<BM>);
2954 IMPORT bool ready_to_prepare(ML p);
2955 IMPORT DS tf_ds_inv(TF tf, int flags);
2956 IMPORT void load_glb_from_temp(std::string filename, void (*fptr)(void*), void*, bool &success);
2957 IMPORT TF load_glb_from_temp2(std::string filename);
2958 IMPORT void load_glb_from_temp3(std::string filename);
2959 IMPORT TF tf_glb_tf(EveryApi &ev, TF tf, std::string url);
2960 IMPORT TF meshy(EveryApi &ev, std::string prompt, std::string filename);
2961 IMPORT P p_ds2(EveryApi &ev, DS ds2);
2962 IMPORT P load_ds_from_temp_p(EveryApi &ev, P p, std::string url);
2963 IMPORT ML fade_pic(EveryApi &ev, BM bm1, float start_time, float transition_time, float end_time, float end_transition_time,
2964 BM bm2, float start2_time, float transition2_time, float end2_time, float end2_transition_time);
2967 IMPORT CS colourspace_or_elem(CS cs, float delta_t, CS cs2, float delta_t2);
2968 IMPORT CS colourspace_func(std::function<unsigned int (float,float,float,float)> f, float sx, float ex, float sy, float ey, float sz, float ez, float st, float et);
2969 IMPORT CSI colourspace_sample(CS i, int sx, int sy, int sz);
2970 IMPORT P colourspace_facecoll(CSI i, float t);
2972 IMPORT PL rect_pl(float start_x, float end_x,
2973 float start_y, float end_y,
2974 float start_z, float end_z,
2975 bool x_or_z,
2976 bool start_or_end_higher);
2977 IMPORT PL or_elem_pl(PL pl1, PL pl2);
2978 IMPORT PL array_pl(std::vector<PL> vec);
2979
2980 IMPORT P render_pl(PL pl);
2981 IMPORT P material_face_collection(P base, P material);
2982 IMPORT ML mixshader_shader(EveryApi &ev, ML ml, float mix=0.5);
2983 IMPORT P extract_large_polygons(P p, float minimum_size, bool reverse);
2984 IMPORT P x_split(P p, float x, float x_0, float x_1);
2985 IMPORT P y_split(P p, float y, float y_0, float y_1);
2986 IMPORT P z_split(P p, float z, float z_0, float z_1);
2989 IMPORT P face_cutter(P p, float start, float end);
2990 IMPORT P heightmap2(FB bm, float start_x, float end_x, float start_y, float end_y, float start_z, float end_z);
2991 IMPORT FB fractal_mountain(int level, int sx, int sy);
2992 IMPORT P combine_anim(P p1, P p2, float start_time, float end_time);
2993 IMPORT P sphere_anim(float c_x, float c_y, float c_z,
2994 float c2_x, float c2_y, float c2_z,
2995 float r, float r2, float start_time, float end_time, int numfaces1, int numfaces2);
2996 IMPORT P cone_anim(float c_x, float c_y, float c_z,
2997 float d_x, float d_y, float d_z,
2998 float c2_x, float c2_y, float c2_z,
2999 float d2_x, float d2_y, float d2_z,
3000 float r1, float r2,
3001 float r1_2, float r2_2, int numfaces, float start_time, float end_time);
3002 IMPORT P cube_anim(float start_x, float end_x,
3003 float start_y, float end_y,
3004 float start_z, float end_z,
3005 float start_x2, float end_x2,
3006 float start_y2, float end_y2,
3007 float start_z2, float end_z2,
3008 float start_time, float end_time);
3009 IMPORT ARR or_elem_anim(P p1, P p2, float time);
3010 IMPORT ML anim_render(AA, float delta);
3012 IMPORT ARR material_choose(std::vector<MT> mat, std::vector<P> p);
3013 IMPORT ARR comb_mat(GameApi::EveryApi &ev, std::vector<MT> vec1, std::vector<MT> vec2);
3017 IMPORT P transparent_separate2(P p, std::vector<BM> vec, bool opaque);
3018 IMPORT P transparent_separate(P p, BM bm, bool opaque, bool force_transparent, bool force_opaque);
3019 IMPORT void sort_vertices(VA va, M m);
3021 IMPORT P combine_textures(P p1, P p2);
3022 IMPORT P slow_calc_lights(P p, float light_dir_x, float light_dir_y, float light_dir_z);
3023 IMPORT MS identity_pose(int li_size);
3024 IMPORT ARR gltf_split_faces2(EveryApi &ev, TF model0, int mesh_index, int prim_index, int max_attach);
3025
3026 IMPORT ARR split_faces(P p, ATT att, int max_attach);
3027 IMPORT std::vector<P> orig_pose(EveryApi &ev, P p, LI li, int li_size);
3028 IMPORT std::vector<P> orig_pose2(EveryApi &ev, std::vector<P> vec, LI li, int li_size);
3029 IMPORT MS new_pose(EveryApi &ev, LI li_orig, LI li);
3030 IMPORT ML ske_anim(EveryApi &ev, P mesh, LI orig_pose, int li_size, std::string url, std::vector<LI> new_poses, MT mat);
3031 IMPORT ML ske_anim2(EveryApi &ev, std::vector<P> mesh, LI orig_pose, int li_size, std::string url, std::vector<LI> new_poses, MT mat);
3032 IMPORT ATT find_attach2(P p, LI li);
3033 IMPORT ATT attach_cache(ATT a, P p);
3034
3035 IMPORT P convex_hull(PTS pts);
3036 IMPORT P optimize_mesh(P p, float max);
3037 IMPORT P toon_outline(P p, float border_width);
3038 IMPORT ML cullface(ML ml, bool b, bool is_gltf);
3039 IMPORT P substitute(P p1, P p2, float start_x, float end_x, float start_y, float end_y, float start_z, float end_z, float normal);
3040 IMPORT ARR block_divide(P p, float pos_x, float pos_z, int sx, int sz, float delta_x, float delta_z);
3041 IMPORT ARR block_render(GameApi::EveryApi &ev, std::vector<P> vec, MT mat);
3042 IMPORT ARR block_render2(GameApi::EveryApi &ev, std::vector<P> vec, std::vector<MT> mat);
3043 IMPORT ML block_draw(std::vector<ML> vec, float pos_x, float pos_z, int sx, int sz, float delta_x, float delta_z, int view);
3045 // Array functions
3046 IMPORT PTS voxelarray_to_pts(AV arr, float start_x, float end_x, float start_y, float end_y, float start_z, float end_z);
3047 IMPORT AV pts_to_voxel(PTS pts, float start_x, float end_x, float start_y, float end_y, float start_z, float end_z, int sx, int sy, int sz);
3048 IMPORT AV av_unique(AV arr);
3049 IMPORT ML quad_tree(P p);
3050 IMPORT P mix_mesh(P p, PTS points, float val);
3051 IMPORT ARR poly_array(std::vector<P> vec);
3052 IMPORT P poly_index(ARR arr, int idx);
3053 IMPORT int poly_size(ARR arr);
3054 IMPORT ARR poly_execute(EveryApi &ev, ARR arr, std::string gameapi_script);
3055 IMPORT P normal_darkness(P p, float dark);
3056 IMPORT P gltf_load( EveryApi &ev, TF model, int mesh_index, int prim_index, TRR resize_transfer_id );
3057 IMPORT P gltf_load_nr( EveryApi &ev, TF model, int mesh_index, int prim_index , TRR resize_transfer_id);
3058 IMPORT BM gltf_load_bitmap( GameApi::EveryApi &ev, TF model, int image_index );
3059 IMPORT ARR material_extractor_p(P p, int start_index, int end_index, int num_slots, int current_slot);
3060 IMPORT ARR material_extractor_bm(P p, int start_index, int end_index);
3061 IMPORT ARR material_extractor_mt(EveryApi &ev, P p, float mix, int start_index, int end_index);
3062 IMPORT MT material_index(EveryApi &ev, std::vector<MT> vec, int index);
3063 IMPORT ARR material_arr(std::vector<MT> vec, int start_range, int end_range);
3064 IMPORT ML mesh_anim_display_inst(EveryApi &ev, P p, FF val, MN move, MT mat, MS inst);
3065 IMPORT ML mesh_anim_display_inst2(EveryApi &ev, P p, FF val, MN mn, MT mat, PTS inst);
3066 IMPORT ML mesh_anim(EveryApi &ev, std::vector<P> vec, std::vector<MN> move, std::vector<MT> mat, std::vector<MS> inst, std::vector<IF> states, std::string url);
3067 IMPORT P mesh_elem(P start, P end);
3068 IMPORT P bar_chart( GameApi::EveryApi &ev, std::string url, float start_x, float end_x, float start_y, float end_y, float start_z, float end_z, float per );
3069 IMPORT P bar_chart2( GameApi::EveryApi &ev, std::string url, float start_x, float end_x, float start_y, float end_y, float start_z, float end_z, float per, float per2 );
3070 IMPORT LI li_piechart(float c_x, float c_y, float c_z, float start_angle, float end_angle, float radius, int numsteps);
3071 IMPORT P p_piechart(EveryApi &ev, float c_x, float c_y, float start_angle, float end_angle, float radius, int numsteps, float start_z, float end_z);
3072 IMPORT ML piechart_full(EveryApi &ev, float c_x, float c_y, std::string url, float radius, int numsteps, float start_z, float end_z);
3073 IMPORT P li_polygon(LI li, float width);
3074 IMPORT P gradient_color(P p, float p_x, float p_y, float p_z, float v_x, float v_y, float v_z, unsigned int start_color, unsigned int end_color);
3075 IMPORT P texture_add(P p, BM bm);
3076 IMPORT P stl_load(std::string url);
3078 IMPORT P filter_invisible(P p, float size);
3079 IMPORT std::vector<TXID> mtl_parse(EveryApi&ev, std::vector<unsigned char> mtlfilecontents, std::string url_prefix, int delta=0);
3080
3081 IMPORT ML m_bind_inst_many(EveryApi &ev, std::vector<P> vec, std::vector<MT> materials, PTS pts, int ticks);
3082 IMPORT ML m_bind_many(EveryApi &ev, std::vector<P> vec, std::vector<MT> materials, int ticks);
3083 IMPORT ML load_scene(EveryApi &ev, std::string url, int sx, int sy);
3084
3085 IMPORT CG curve_group_from_anim(MA ma, float start_time, float end_time);
3086 IMPORT MA meshanim(std::vector<P> vec, float start_time, float end_time);
3087 IMPORT P meshanim_mesh(MA ma, float time);
3088 IMPORT P meshanim_mesh2(MA ma, float time1, float time2);
3089 IMPORT ARR meshanim_anim_meshes(MA ma, float start_time, float delta_time, int count);
3090
3091 IMPORT P lod_choose(std::vector<P> vec, std::string name);
3092 IMPORT P lod_set(P p, std::string name, int value);
3093 IMPORT IF lod_select(float start_dist, float dist_step, int max_value);
3094
3095 IMPORT BM shadow_map(EveryApi &ev, P p, float p_x, float p_y, float p_z, int sx, int sy);
3096 IMPORT BB shadow_map2(P p, float p_x, float p_y, float p_z, int sx, int sy, P quad);
3097 IMPORT BM shadow_map3(EveryApi &ev, P objs, float p_x, float p_Y, float p_z, int sx, int sy, P quad);
3098 IMPORT ML choose_time(ML next, std::vector<ML> vec, float delta_time);
3099 IMPORT ML anim(EveryApi &ev, ML next, MA anim, float start_time, float delta_time, int count);
3100 IMPORT ML anim_bind(EveryApi &ev, ML next, MA anim, MT material, float start_time, float delta_time, int count);
3101
3102 // normal functions
3103 IMPORT void print_stat(P p);
3104 IMPORT void print_data(P p);
3105 IMPORT void print_data2(P p);
3106 IMPORT void print_stat(VA p);
3107 IMPORT P p_empty();
3108 IMPORT P load_model(std::string filename, int obj_num);
3109 IMPORT P load_model_all(std::string filename, int count);
3110 IMPORT P load_model_all_no_cache(std::string filename, int count, bool nr);
3111 IMPORT P load_model_all_no_cache(LoadStream * file_data, int count, bool nr);
3112 IMPORT P load_model_all_no_cache_mtl(std::string filename, int count, std::vector<std::string> material_names, bool nr);
3113 IMPORT P load_model_all_no_cache_mtl(LoadStream * file_data, int count, std::vector<std::string> material_names, bool nr);
3114 IMPORT P p_url(EveryApi &ev, std::string url, int count);
3115 IMPORT P ds_cache_url(EveryApi &ev, P input, int count);
3116 IMPORT P p_url_nr(EveryApi &ev, std::string url, int count);
3117 IMPORT P p_mtl(EveryApi &ev, std::string obj_url, std::string mtl_url, std::string prefix, int count);
3118 IMPORT P ds_cache_mtl(EveryApi &ev, P input, int count, std::string mtl_url, std::string url_prefix);
3119 IMPORT P p_mtl_nr(EveryApi &ev, std::string obj_url, std::string mtl_url, std::string prefix, int count);
3120 IMPORT ARR p_mtl2(EveryApi &ev, std::string obj_url, std::string mtl_url, std::string prefix, int count, int start_index, int end_index, float mix);
3121 IMPORT ARR p_mtl2_nr(EveryApi &ev, std::string obj_url, std::string mtl_url, std::string prefix, int count, int start_index, int end_index, float mix);
3122 IMPORT ARR p_mtl_d(P p);
3124 IMPORT P p_url_mtl(EveryApi &ev, std::string url, int count, std::vector<std::string> material_names);
3125 IMPORT P p_ds(EveryApi &ev, const unsigned char *beg, const unsigned char *end);
3126 IMPORT P p_ds_url(EveryApi &ev, std::string url);
3127 IMPORT DS p_ds_inv(P model, int flags=-1); // flags at GameApi_pl.cc/DSFlags
3128 IMPORT P file_cache(P model, std::string filename, int obj_num);
3130 IMPORT P resize_to_correct_size_g(P model, TRR resize_transfer_id);
3131 IMPORT void save_model(P poly, std::string filename);
3132 IMPORT ML save_model_ml(P poly, std::string filename);
3133 IMPORT P prepare_cut(P p);
3134 IMPORT P mesh_resize(P p, float start_x, float end_x, float start_y, float end_Y, float start_z, float end_z);
3135
3136 IMPORT P texture_splitter(P p, int start_index, int end_index);
3137 IMPORT P texture_splitter2(P p, int num, int num_slots, int current_slot);
3138 IMPORT P replace_texture(P p, BM bm, int num);
3139 IMPORT P texture_storage(P p, int texture_sx, int texture_sy);
3140 IMPORT P light_transport(P p, int num, float light_dir_x, float light_dir_y, float light_dir_z);
3141 IMPORT BM texture_from_p(P p, int num);
3142
3145
3146 //IMPORT P line(PT p1, PT p2);
3147 IMPORT P triangle(PT p1, PT p2, PT p3);
3148 IMPORT P quad(PT p1, PT p2, PT p3, PT p4);
3149 IMPORT P quad_x(float x,float y1, float y2,float z1, float z2);
3150 IMPORT P quad_y(float x1, float x2,float y,float z1, float z2);
3151 IMPORT P quad_z(float x1, float x2,float y1, float y2,float z);
3154 IMPORT P vr_fullscreen_quad(EveryApi &ev, bool is_right);
3155 IMPORT P tri_strip(PT *array, int size);
3156 IMPORT P polygon2(std::vector<PT> vec);
3157 IMPORT P polygon(PT *array, int size); // use render_dynamic with this.
3158 IMPORT P polygon3(PTS points);
3159 IMPORT P tri_vertex_array(float *v_array, int v_size,
3160 float *n_array, int n_size,
3161 unsigned int *c_array, int c_size,
3162 float *tex_array, int tex_size,
3163 float **attrib_array, int a_size1, int a_size2);
3164 IMPORT P cube(float start_x, float end_x,
3165 float start_y, float end_y,
3166 float start_z, float end_z);
3167 IMPORT P cube(PT *p); // 8 points needed
3168 IMPORT P rounded_cube(EveryApi &ev, float start_x, float end_x,float start_y, float end_y,float start_z, float end_z,float round_radius);
3169 IMPORT P repeat_xy_p(EveryApi &ev, P p, float start_x, float start_y, float dx, float dy, int sx, int sy);
3170 IMPORT P repeat_xz_p(EveryApi &ev, P p, float start_x, float start_z, float dx, float dz, int sx, int sz);
3171 IMPORT P repeat_yz_p(EveryApi &ev, P p, float start_y, float start_z, float dy, float dz, int sy, int sz);
3172 IMPORT P deform(P obj, O bools, float dx, float dy, float dz);
3173 IMPORT P flip_normals(P obj);
3174 IMPORT P color_map2(BM bm, PT pos, V u_x, V u_y);
3175 IMPORT P color_map(BM bm, float start_x, float end_x, float start_y, float end_y, float z);
3176 IMPORT P color_map3(BM bm, FB height, PT pos, V u_x, V u_y);
3177 IMPORT P color_map3(BM bm, FB height, float sx, float sy, float z);
3178 IMPORT P color_map3_cyl(BM bm, FB height, PT pos, V u_x, V u_y);
3179 IMPORT P color_map3_cyl(BM bm, FB height, float sx, float sy, float z);
3180 IMPORT P color_map3_sph(BM bm, FB height, PT pos, V u_x, V u_y);
3181 IMPORT P color_map3_sph(BM bm, FB height, float sx, float sy, float z);
3182 IMPORT P color_map4(BM bm, FB height, float sx, float sy, float z);
3183 IMPORT P cube_map(float start_x, float end_x,float stary_y, float end_y,float start_z, float end_z,BM bm_front, BM bm_back, BM bm_left, BM bm_right, BM bm_top, BM bm_bottom);
3184 IMPORT P sphere(PT center, float radius, int numfaces1, int numfaces2);
3185 IMPORT P sphere_map(float c_x, float c_y, float c_z, FB fb, float start_radius, float end_radius, float start_values, float end_values, int sx, int sy);
3186 IMPORT P plane_map(float start_x, float end_x, float start_y, float end_y, float start_z, float end_z, float start_values, float end_values, FB fb, int sx, int sy);
3187 IMPORT P cone(int numfaces, PT p1, PT p2, float rad1, float rad2);
3188 IMPORT P torus2(EveryApi &ev, int numfaces1, int numfacesw2, PT center, float radius1, float radius2);
3189 IMPORT P torus(int numfaces1, int numfaces2, PT center, V u_x, V u_y, float radius1, V uu_x, V uu_y, float radius2);
3190 IMPORT P ring(float sx, float sy, float x, int steps); // use RingEffect::Init() to implement
3191 IMPORT P disc(EveryApi &ev, int numfaces, float center_x, float center_y, float center_z, float normal_x, float normal_y, float normal_z, float radius);
3194 float min_x, float max_x,
3195 float min_y, float max_y,
3196 float min_z, float max_z);
3197 IMPORT P heightmap(FB fb, std::function<P (float)> f, float dx, float dz);
3198 IMPORT P circular_span(EveryApi &ev, LI li, float delta_angle_around_y_axis, int num_steps);
3199 IMPORT P linear_span(EveryApi &ev, LI li, float dx, float dy, float dz, int num_steps);
3200 IMPORT P cut_faces(P p, O o, CT cutter);
3201 IMPORT P tri_to_quad(P p);
3202 IMPORT P curve_to_poly(C c, float start_x, float end_x, float start_y, float end_y, float start_angle, float end_angle, int numinstances);
3203
3204 IMPORT P split_p(P p, int start_face, int end_face);
3205 IMPORT P subpoly_change(P p, P p2, O choose);
3206
3207 IMPORT P span(LI li, M matrix, int num_steps);
3208 IMPORT P fromsurface(S s, float thickness);
3209 IMPORT P fromsurface(S s1, S s2, C curve); // surfacebetweensurfaces
3210
3211 IMPORT P sprite_bind(P p, TX tx, int id);
3212 IMPORT P sprite_bind(P p, Q bm, TX tx);
3213 P sprite_bind_1(P p, Q bm, TX tx);
3214 IMPORT P texture(P orig, BM bm, int bm_choose = -1); // all quads
3215
3216 IMPORT P line_to_cone(EveryApi &ev, LI li, float size, int numfaces);
3217 IMPORT ML line_to_cone2(EveryApi &ev, LI li, float size, int numfaces, MT mt);
3218 IMPORT ML line_to_cone3(EveryApi &ev, LI li, float size, int numfaces, MT mt, unsigned int color);
3220 IMPORT P static_instancing_array(EveryApi &ev, std::vector<P> vec, PTS pos);
3222 IMPORT P static_instancing_matrix(EveryApi &ev, P obj, MS matrix_array);
3223 IMPORT LI li_static_instancing_matrix(EveryApi &ev, LI obj, MS matrix_array);
3224 IMPORT P static_instancing_with_color(EveryApi &ev, P obj, BM bm, float start_x, float end_x, float start_y, float end_y, float z);
3225
3226 IMPORT P color_distance(P faces, float center_x, float center_y, float center_z, unsigned int color_center, unsigned int color_dist, float dist_center, float dist_dist);
3227 IMPORT P color(P orig, unsigned int color);
3228 IMPORT P color_voxel(P orig, VX colours, PT p, V u_x, V u_y, V u_z);
3229 IMPORT P mix_color(P orig, P orig2, float val);
3230 IMPORT P min_color(P orig, P orig2);
3231 IMPORT P max_color(P orig, P orig2);
3232 IMPORT P color_lambert(P orig, unsigned int color, float light_dir_x, float light_dir_y, float light_dir_z, float pow, float intensity);
3233 IMPORT P texcoord_cube(P orig,PT o, PT u_x, PT u_y, PT u_z, PT tex_o, PT tex_x, PT tex_y, PT tex_z); // tex_* are 2d
3234 IMPORT P texcoord_default(P orig);
3235 IMPORT P texcoord_manual(P orig, float p1_x, float p1_y,float p2_x, float p2_y,float p3_x, float p3_y,float p4_x, float p4_y);
3236 IMPORT P texcoord_spherical(PT center, P orig);
3237 IMPORT P texcoord_spherical2(EveryApi &ev, PT center, float r, P orig);
3238 IMPORT P texcoord_cylindar(P orig, float start_y, float end_y);
3241 IMPORT P texcoord_plane(P p, float start_x, float end_x, float start_y, float end_y);
3242 IMPORT P texcoord_subarea(P p, float start_x, float end_x, float start_y, float end_y);
3244 IMPORT P color_cube(P orig,
3245 PT o, PT u_x, PT u_y, PT u_z,
3246 unsigned int color_o, unsigned int color_x, unsigned int color_y, unsigned int color_z);
3247 IMPORT P color_faces(P orig,unsigned int color_1, unsigned int color_2,unsigned int color_3, unsigned int color_4);
3249 IMPORT P color_alpha(P orig, unsigned int alpha);
3250 IMPORT P color_grayscale(P orig);
3251 IMPORT P color_from_texcoord(P orig,unsigned int color_1, unsigned int color_2,unsigned int color_3, unsigned int color_4);
3252 IMPORT P color_range(P orig, unsigned int source_upper, unsigned int source_lower, unsigned int upper_range, unsigned int lower_range);
3253
3254 IMPORT P texcoord_poly(P orig, int facenum, PT *array, int size);
3255 IMPORT P choose_texture(P orig, int num);
3256 IMPORT P color_poly(P orig, int facenum, unsigned int *array, int size);
3257
3260
3261 IMPORT P skeletal_anim(P p, PT p_0, PT p_1, PT n_0, PT n_1);
3262
3263 IMPORT P build_offsets(P p, std::vector<PT> vec);
3264
3265 IMPORT P or_elem(P p1, P p2);
3266 IMPORT P or_array(P *array, int size);
3267 IMPORT P or_array2(std::vector<P> vec);
3268 IMPORT P or_array3(std::vector<P> vec); // no memory usage.
3269 P or_array_1(P *array, int size);
3270 IMPORT P and_not_elem(EveryApi &ev, P p1, P p_not,
3271 O o1, O o_not,
3272 CT cutter1, CT cutter_not);
3273 IMPORT P intersect(EveryApi &ev, P p1, P p2,
3274 O o1, O o2,
3275 CT cutter1, CT cutter2);
3276 IMPORT P alt(std::vector<P> vec, int index);
3277 //P and_not_elem(P p1, P p_not);
3278
3279
3280 IMPORT P grid(PT o, PT u_x, PT u_y, int num_x, int num_y);
3281 IMPORT P grid(PT o, PT u_x, PT u_y, int num_x, int num_y, P *grid);
3282
3283
3284 IMPORT P translate(P orig, float dx, float dy, float dz);
3285 P translate_1(P orig, float dx, float dy, float dz);
3286 IMPORT P rotatex(P orig, float angle);
3287 IMPORT P rotatey(P orig, float angle);
3288 IMPORT P rotatez(P orig, float angle);
3289 IMPORT P rotate(P orig, PT pt, V axis, float angle);
3290 IMPORT P scale(P orig, float sx, float sy, float sz);
3291 IMPORT P matrix(P orig, M mat);
3292 IMPORT P matrix44(P orig, M mat); // otherwise the same as matrix, but doesnt do normals.
3293
3294 IMPORT P log_coords(P p);
3295 IMPORT P log_coords2(P p, int x_count, int y_count, float sx, float sy, float sz);
3296 IMPORT P spherical_wave(P p, float r1, float fr_1, float r2, float fr_2);
3297
3298 IMPORT P unit_cube(P orig, PT pos, V u_x, V u_y, V u_z);
3299 IMPORT P unit_to_cube(P orig, PT pos, V u_x, V u_y, V u_z);
3300 IMPORT P unit_to_flex(P orig,
3301 PT bTL, PT bTR, PT bBL, PT bBR,
3302 PT fTL, PT fTR, PT fBL, PT fBR);
3303
3304 IMPORT P move(P orig, PT obj_0, V obj_x, V obj_y, V obj_z,
3305 PT world_0, V world_x, V world_y, V world_z);
3306
3307 IMPORT L color_lighting(float dx, float dy, float dz,
3308 int r, int g, int b, int a);
3309 IMPORT L radial_lighting(float dx, float dy, float dz,
3310 int r, int g, int b, int a,
3311 int r2, int g2, int b2, int a2,
3312 float dist);
3316
3317 IMPORT P shadow(P orig, PT pos, V u_x, V u_y, V light_vec);
3318 IMPORT P reflection(P orig, PT pos, V u_x, V u_y, V ref_vec); // note, requires transparent object, which are not yet implemented.
3319
3321
3322 IMPORT P anim_array(P *array, int size); // OLD
3323
3324 IMPORT P splitquads(P orig, int x_count, int y_count);
3325 IMPORT P change_positions(P orig, std::function<PT(PT p, int face, int point)> f);
3326 IMPORT P change_normals(P orig, std::function<V(V orig, int face, int point)> f);
3327 //P change_attrib(P orig, float (*fptr)(float orig, int face, int point, void *data), void *data=0);
3328 //P change_attribI(P orig, int (*fptr)(int orig, int face, int point, void *data), void *data=0);
3329 IMPORT P change_colors(P orig, std::function<unsigned int(unsigned int orig, int face, int point)> f);
3330 IMPORT P change_texture(P orig, std::function<int(int face)> f, BM *array, int size);
3331
3333 IMPORT P spherical_normals(P p, float p_x, float p_y, float p_z);
3334 IMPORT P average_normals(P orig, int sx, int sy);
3336 IMPORT P memoize(P orig);
3337 IMPORT P memoize_all(P orig);
3338 IMPORT P persistent_cache(P orig, std::string filename);
3339
3340 IMPORT S s_spherical(float c_x, float c_y, float c_z, FB fb, float start_radius, float end_radius, float start_values, float end_values);
3341 IMPORT P s_sample(S surf, int sx, int sy);
3342
3343 IMPORT ID find_point_id(P p, int facenum, int pointnum); // save id's to ENV.
3344 IMPORT ID find_normal_id(P p, int facenum, int pointnum);
3345 IMPORT ID find_color_id(P p, int facenum, int pointnum);
3346 IMPORT ID find_texcoord_id(P p, int facenum, int pointnum);
3347 IMPORT ID id_array(ID *array, int size);
3348 IMPORT void preparepoly(P p, int bbm_choose = -1);
3349 IMPORT void renderpoly(P p, float x, float y, float z);
3350 IMPORT void renderpoly(P p, PT pos);
3351 IMPORT void renderpoly(P p, int choose, float x, float y, float z);
3352 IMPORT void prepare(P p, int bbm_choose = -1);
3353 IMPORT void render(P p, int choose, float x, float y, float z);
3354 IMPORT void update(VA va);
3355 IMPORT bool is_texture(VA va);
3356 IMPORT bool is_array_texture(VA va);
3357
3358 IMPORT void update_vertex_array(VA va, P p, bool keep=false);
3360 IMPORT ML update_vertex_array_ml(VA va, P p, bool keep=false);
3361 IMPORT VA create_vertex_array(P p, bool keep=false); // slow
3363 IMPORT void delete_vertex_array(VA arr);
3364 IMPORT VA create_vertex_array_attribs(P p, bool keep,std::vector<int> attribs, std::vector<int> attribi); // slow
3365 IMPORT void render_vertex_array(VA va); // fast
3366 IMPORT void clone(VA va);
3369 IMPORT void render_vertex_array_instanced(ShaderApi &ev, VA va, PTA pta, SH sh, int hide_n = -1); // fast
3371 IMPORT void render_vertex_array_instanced_matrix(ShaderApi &ev, VA va, MSA pta, SH sh, int hide_n = -1); // fast
3374 IMPORT ML render_vertex_array_ml2_texture(EveryApi &ev, P va, std::vector<BM> vec, std::vector<int> types=std::vector<int>(), std::vector<std::string> id_labels=std::vector<std::string>(), std::vector<bool> is_srgb=std::vector<bool>());
3375 IMPORT ML render_vertex_array_ml2_texture_id(EveryApi &ev, P va, std::vector<TXID> *vec);
3376 IMPORT ML render_vertex_array_ml2_cubemap(EveryApi &ev, P va, std::vector<BM> vec);
3379 IMPORT SBM sbm_circle(float start_time, float end_time, float start_pos_x, float start_pos_y, float end_pos_x, float end_pos_y, float start_radius, float end_radius);
3381 IMPORT SBM combine_sbm(SBM texture1, SBM texture2);
3382 IMPORT SBM bloom_cut_sbm(SBM texture, float r, float g, float b);
3383 IMPORT SBM blur_sbm(SBM texture, float pixel_x, float pixel_y);
3389 IMPORT ML water_shader(EveryApi &ev, ML mainloop, unsigned int color1, unsigned int color2, unsigned int color3, float center_x, float center_y, float center_z, float wave_mult, float time_mult);
3390 IMPORT ML glowedge_shader(EveryApi &ev, ML mainloop, float white_level, float gray_level, float edge_pos);
3391 IMPORT ML newshadow_shader_1(EveryApi &ev, ML ml, float light_dir_x, float light_dir_y, float light_dir_z, float scale);
3392 IMPORT ML newshadow_shader_2_phong(EveryApi &ev, ML ml, float light_dir_x, float light_dir_y, float light_dir_z, float dark_level, float light_level, float scale);
3393 IMPORT ML newshadow_shader_2_gltf(EveryApi &ev, ML ml, float light_dir_x, float light_dir_y, float light_dir_z, float dark_level, float light_level, float scale, int texindex);
3394 IMPORT ML adjust_shader(EveryApi &ev, ML mainloop, unsigned int ad_color, float ad_dark, float ad_light);
3395 IMPORT ML blurred_render_shader(EveryApi &ev, ML mainloop, int numsamples, float blur_radius);
3396 IMPORT ML phong_shader(EveryApi &ev, ML mainloop, float light_dir_x, float light_dir_y, float light_dir_z, unsigned int ambient, unsigned int specular, unsigned int highlight, float pow);
3397 IMPORT ML phong_shader2(EveryApi &ev, ML mainloop, float light_dir_x, float light_dir_y, float light_dir_z, unsigned int ambient, unsigned int specular, unsigned int highlight, float pow);
3398 IMPORT ML vertex_phong_shader(EveryApi &ev, ML mainloop, float light_dir_x, float light_dir_y, float light_dir_z, unsigned int ambient, unsigned int highlight, float pow, float mix);
3399 IMPORT ML edge_shader(EveryApi &ev, ML mainloop, float edge_width, unsigned int edge_color);
3400 IMPORT ML gltf_anim_shader(GameApi::EveryApi &ev, ML ml_orig, std::vector<GameApi::ML> mls, int key, int mode, int timeid, TRA anim_transfer_id, int frame_skip);
3401 IMPORT ML globe_shader(EveryApi &ev, ML mainloop, float globe_r);
3402 //IMPORT ML ao_shader(EveryApi &ev, ML mainloop, float radius, int kernelsize, int noisesize);
3404 IMPORT ML gi_shader(EveryApi &ev, ML mainloop, PTS points, float obj_size);
3405 IMPORT ML bump_phong_shader(EveryApi &ev, ML mainloop, float light_dir_x, float light_dir_y, float light_dir_z, unsigned int ambient, unsigned int highlight, float pow);
3406 IMPORT ML fog_shader(EveryApi &ev, ML mainloop, float fog_dist, unsigned int dark_color, unsigned int light_color);
3407 IMPORT ML shadow_shader(EveryApi &ev, ML mainloop, int tex_num, float p_x, float p_y, float p_z, unsigned int dark_color, float mix);
3408 IMPORT ML dyn_lights_shader(EveryApi &ev, ML mainloop, float light_pos_x, float light_pos_y, float light_pos_z, float dist, MN dyn_point);
3409 IMPORT ML shading_shader(EveryApi &ev, ML mainloop,unsigned int level1,unsigned int level2,unsigned int level3, float spec_size=5.0f, bool ambient=true, bool diffuse=true, bool specular=false);
3410 IMPORT ML spotlight_shader(EveryApi &ev, ML mainloop,int light_color_id, MN move);
3412 unsigned int color_1, unsigned int color_2, unsigned int color_3, unsigned int color_4, unsigned int color_5, unsigned int color_6, unsigned int color_7, unsigned int color_8,
3413 PT pos_1, PT pos_2, PT pos_3, PT pos_4, PT pos_5, PT pos_6, PT pos_7, PT pos_8,
3414 float dist_1, float dist_2, float dist_3, float dist_4, float dist_5, float dist_6, float dist_7, float dist_8);
3415 IMPORT ML ambient_shader(EveryApi &ev, ML mainloop,int ambient_color_id,float ambient_level);
3417 IMPORT ML custom_shader(EveryApi &ev, ML mainloop, std::string v_shader, std::string f_shader, std::string v_funcname, std::string f_funcname);
3420 IMPORT ML choose_color_shader(EveryApi &ev, ML mainloop, unsigned int color, float mix_val);
3421 IMPORT ML blur_shader(EveryApi &ev, ML mainloop, float x_val, float y_val);
3422 IMPORT ML bloom1_shader(EveryApi &ev, ML mainloop, float r_val, float g_val, float b_val);
3423 IMPORT ML wave_shader(EveryApi &ev, ML mainloop, float radius, float t_mult, float x_mult, float y_mult);
3425 IMPORT ML fade_shader(EveryApi &ev, ML mainloop, float start_time, float end_time, float start_time2, float end_time2);
3429 IMPORT ML texture_cubemap_shader(EveryApi &ev, ML mainloop, float mix, float mix2);
3431 IMPORT ML skeletal_shader(EveryApi &ev, ML mainloop, std::vector<SA> vec);
3432 IMPORT ML gltf_shader(EveryApi &ev, ML mainloop, float mix, bool tex0, bool tex1, bool tex2, bool tex3, bool tex4, bool tex5, bool tex6, bool tex7, float roughness, float metallic, float basecolor0, float basecolor1, float basecolor2, float basecolor3, float occul, float emiss, bool spec, float diff_factor_r=1.0, float diff_factor_g=1.0, float diff_factor_b=1.0, float spec_factor_r=1.0, float spec_factor_g=1.0, float spec_factor_b=1.0, float glossi_factor=1.0, bool unlit=false, float emis2_r=0.0, float emis2_g=0.0, float emis2_b=0.0, float light_dir_x=0.0, float light_dir_y=0.0, float light_dir_z=-400.0, std::string cache_id="gltf", float self_mult=1.0, float rest_mult=0.0, bool emissive=false);
3433 IMPORT void explode(VA va, PT pos, float dist);
3434 //IMPORT int accexss_point_count(VA va, bool triangle);
3435 //IMPORT float *access_points(VA va, bool triangle, int face, int point);
3436 //IMPORT float *access_color(VA va, bool triangle, int face, int point);
3437 //IMPORT float *access_normals(VA va, bool triangle, int face, int point);
3438 //IMPORT float *access_texcoord(VA va, bool triangle, int face, int point);
3439 //IMPORT void update(VA va);
3440
3441 IMPORT ML sprite_render(EveryApi &ev, BM bm, float start_x, float end_x, float start_y, float end_y, float z);
3442 IMPORT ML sprite_render_inst(EveryApi &ev, BM bm, PTS pts, float start_x, float end_x, float start_y, float end_y, float z);
3443 IMPORT ML sprite_render_fade(EveryApi &ev, BM bm, PTS pts, float start_x, float end_x, float start_y, float end_y, float z, bool flip, float start_time, float end_time);
3444
3446 IMPORT P anim_target_scale(P p, PT center, float scale_x, float scale_y, float scale_z);
3448 IMPORT P anim_endpoints(P p1, P p2); // must have similar 3d objects/same number of faces.
3449 IMPORT P anim_interpolate(P p, float val);
3450
3451 IMPORT P counts(P p1, int numfaces);
3452 IMPORT P count_function(P p1, std::function<int(int face)> f);
3453 IMPORT P point_function(P p1, std::function<PT(int face, int point)> f);
3454 IMPORT P color_function(P p1, std::function<unsigned int(int face, int point)> f);
3455 IMPORT P texcoord_function(P p1, std::function<PT(int face, int point)> f);
3456 IMPORT P normal_function(P p1, std::function<V(int face, int point)> f);
3457 IMPORT P attrib_function(P p1, std::function<float(int face, int point, int idx)> f, int idx);
3458 IMPORT P attribi_function(P p1, std::function<int(int face, int point, int idx)> f, int idx);
3459
3460
3461 // must call prepare for P before these.
3464 IMPORT void get_tri_vertex_array(P p, int choose, int row,
3465 int *v_size, float **v_array,
3466 int *n_size, float **n_array,
3467 int *c_size, unsigned int **c_array,
3468 int *tex_size, float **tex_array,
3469 int *attrib_size1, int *attrib_size2, float ***attrib_array);
3470
3471 // this is for better animations, separates modified and non-modified parts
3472 IMPORT P create_static_geometry(P *array, int size);
3473 IMPORT P create_dynamic_geometry(P *array, int size);
3474 IMPORT void render_dynamic(P p, int array_elem, bool textures); // use memoize_all for p before calling this.
3475
3476 IMPORT P world_from_bitmap(std::function<P (int c)> f, BM int_bm, float dx, float dy, int max_c);
3477 IMPORT P world_from_bitmap(EveryApi &ev, std::vector<P> vec, std::string filename, std::string chars, float dx, float dy, int sx, int sy);
3478 IMPORT P world_from_bitmap2(EveryApi &ev, std::function<P (int c, PT tl, PT tr, PT bl, PT br)> f, BM int_bm, FB float_bm, float dx, float dz, float height);
3479 IMPORT P world_from_voxel(std::function<P (unsigned int c)> f, VX voxel, float dx, float dy, float dz, int max_c);
3480
3481 IMPORT P from_points(PTS p, std::function<P (int i, float x,float y,float z, unsigned int color)> f);
3482 IMPORT P from_lines(LI li, std::function<P (int i, float sx, float sy, float sz, float ex, float ey, float ez, unsigned int scolor, unsigned int ecolor)> f);
3483 IMPORT P from_polygon(P p, std::function<P (int face,
3484 PT p1, PT p2, PT p3, PT p4)> f);
3485 P from_polygon_1(P p, std::function<P (int face,
3486 PT p1, PT p2, PT p3, PT p4)> f);
3487
3488
3489 IMPORT P dist_from_lines(LI li, float d1, float d2, PT center);
3490
3491 IMPORT BM renderpolytobitmap(EveryApi &ev, P p, SH sh, float x, float y, float z, int sx, int sy);
3493
3494
3495 IMPORT std::vector<MaterialDef> parse_mtl(std::string filename);
3496 IMPORT std::string output_ml(std::string objfileurl, int count, std::string prefix, std::vector<MaterialDef> filenames);
3497
3498 IMPORT int p_num_textures(P p);
3499 IMPORT void p_gen_texture(P p, int i);
3500 IMPORT BM p_texture(P p, int i);
3501 IMPORT void preparedone(P p);
3502private:
3503 PolygonApi(const PolygonApi&);
3504 void operator=(const PolygonApi&);
3505
3506 void *priv;
3507 Env &e;
3508};
3509#endif
3510
3511#ifdef F_WAVEFORM_API
3513{ // [0..length] -> [-1..1]
3514public:
3516 IMPORT WV wv_empty(float length);
3517 IMPORT WV function(std::function<float(float)> f, float length, float min_value, float max_value);
3518 IMPORT WV sinwave(float length, float freq);
3519 IMPORT WV gaussian(float start_x, float end_x, float start_y, float end_y);
3520 IMPORT WV sum(WV w1, WV w2);
3521 IMPORT WV move(WV w1, float delta);
3522 IMPORT WV scale(WV w1, float scale);
3523 IMPORT WV repeat(WV wave, int num);
3524 IMPORT WV sample(float *array, int length, float samplelength);
3525 IMPORT WV int_sample(int *array, int length, float samplelength, int min_value, int max_value);
3526 IMPORT WV mix(WV orig, float pos, WV sample);
3527 IMPORT WV volume_ramp(WV orig, float old_y_value, float x_pos1, float x_pos2, float y_pos1, float y_pos2);
3528 IMPORT WV freq_change(WV orig, float old_freq, float new_freq);
3529 IMPORT float length(WV orig);
3530 IMPORT float get_value(WV orig, float val);
3531 IMPORT WV length_change(WV orig, float new_length);
3532 IMPORT WV step(bool b);
3533 IMPORT WV cubic(float f_0, float f_1, float df_0, float df_1, float min_y, float max_y);
3534 IMPORT BM waveform_bitmap(WV wave, int sx, int sy, unsigned int true_color, unsigned int false_color);
3535 IMPORT P waveform_rotated_polygon(WV wave, float start_angle, float end_angle, float radius, int num_samples, int num_waves);
3536
3537 IMPORT PN std_polynomial(float x_5, float x_4, float x_3, float x_2, float x_1, float c);
3538 IMPORT PN df_dx(PN poly);
3539 IMPORT WV polynomial_wave(PN pn, float start_x, float end_x, float start_y, float end_y);
3540
3541private:
3542 WaveformApi(const WaveformApi&);
3543 void operator=(const WaveformApi&);
3544 Env &e;
3545};
3546#endif
3547#ifdef F_SAMPLE_COLLECTION_API
3549{
3550public:
3552 IMPORT SM empty();
3553 IMPORT SM add(SM orig, WV wave, int sample_rate, int id);
3554 //WV find_wave(SM orig, int id);
3555 //int find_rate(SM orig, int id);
3556 IMPORT void init_audio();
3557 IMPORT WAV prepare(SM samples);
3558 IMPORT void play_sample(int channel, WAV w, int id);
3559 void play_sample_1(int channel, WAV w, int id);
3560private:
3561 Env &e;
3562};
3563#endif
3564#ifdef F_TRACKER_API
3566{
3567public:
3568 IMPORT TrackerApi(Env &e);
3569 IMPORT TRK empty(int numchannels, int numslots);
3570 IMPORT TRK audio_slot(TRK orig, int channel, int slot, int duration, int sample);
3571 IMPORT TRK array(TRK *array, int size);
3572 IMPORT TBUF prepare(TRK trk);
3573 IMPORT void play_song(EveryApi &ev, TBUF buf, WAV samples, int framenum, int speed);
3574 IMPORT void play_mp3(std::string filename);
3575 IMPORT void play_ogg(std::string filename);
3576 IMPORT void play_ogg(const std::vector<unsigned char> &vec);
3577 IMPORT void play_ogg(void*);
3578 IMPORT void* setup_ogg(const std::vector<unsigned char> &data, int type);
3580 IMPORT ML play_wave_via_keypress(EveryApi &ev, ML ml, std::string url, int key);
3581private:
3582 Env &e;
3583};
3584#endif
3585
3586class ShaderApi;
3587
3588#ifdef F_STATE_CHANGE_API
3590{
3591public:
3593 IMPORT TR init(int paths);
3594 IMPORT TR linear(TR s, int path_num, std::function<P(float val)> f, float start_v, float end_v, float duration);
3595 TR linear_1(TR s, int path_num, std::function<P(float val)> f, float start_v, float end_v, float duration);
3596 IMPORT VV prepare(TR sc);
3597 VV prepare_1(TR sc);
3598 IMPORT VV prepareloop(float *array, int arraysize,
3599 std::function<P (float val)> f,
3600 float step_duration);
3601 IMPORT void render(VV sc, float time, SH shadero);
3602 IMPORT void render(VV sc, float time, SH shadero, float(*fptr)(int path, std::string name));
3603private:
3605 void operator=(const StateChangeApi&);
3606 Env &e;
3607 ShaderApi &api;
3608};
3609#endif
3610
3611#ifdef F_NEW_PLANE_API
3613{
3614public:
3616 IMPORT PP function(std::function<PT (int idx)> f, int num_points, float px, float py, float sx, float sy);
3617 IMPORT PP color_function(PP pl, std::function<unsigned int (int idx)> f);
3618 IMPORT PP polygon(std::vector<PT> vec);
3619 IMPORT PP polygon2(PTS pts); // kills z
3620 IMPORT PP color(PP p, unsigned int color);
3621 IMPORT PP trans(PP pl, float dx, float dy);
3622 IMPORT std::vector<PP> single_elem(PP p1);
3623 IMPORT std::vector<PP> or_elem(PP p1, PP p2);
3624 IMPORT std::vector<PP> or_elem(std::vector<PP> p1, std::vector<PP> p2);
3625 IMPORT PP cicle(PT center, float radius, int numpoints);
3626 IMPORT PP star(PT center, float radius_1, float radius_2, int numpoints);
3627
3628 IMPORT LI to_lines(PP pl, float z);
3629 IMPORT P to_poly(PP pl, float z);
3630
3631 //
3632 // new plane
3633 //
3634 PLF reverse_faces(PLF faces); // if triangulate doesnt work, use reverse_faces first
3635 PLF triangulate(PLF faces);
3636 P to_polygon(PLF faces);
3637private:
3638 Env &e;
3639};
3640#endif
3641
3642#ifdef F_PLANE_API
3644{ // 2d coordinates in PT
3645 // could be array of pointcollections
3646 // but colours etc and textures still needed.
3647 // so really it's P type with 2d points.
3648 // int->PT
3649public:
3650 IMPORT PlaneApi(Env &e);
3651 IMPORT PL function(PT (*fptr)(EveryApi &e, int idx, void *data), int num_points, float sx, float sy, void *data);
3652 IMPORT PL color_function(PL pl, CO (*fptr)(EveryApi &ev, int idx, PT pos, void *data), void *data);
3653 IMPORT PL empty_plane(float sx, float sy);
3655 IMPORT PL move(PL pl, float dx, float dy);
3656 PL or_plane(PL p1, PL p2);
3657
3658 IMPORT PL circle(PT center, float radius, int numpoints);
3659 IMPORT PL star(PT center, float radius_1, float radius_2, int numpoints);
3660
3661 IMPORT PL floodfill_border(BB bitmap, int x, int y);
3662 // TODO: how to represent/load fonts to this type.
3663 IMPORT PL empty(float sx, float sy);
3664 IMPORT PL circle(PL bg, PT center, float radius, int numpoints);
3665 IMPORT PL rectangle(PL bg, PT p1, PT p2);
3666 IMPORT PL rectangle(PL bg, PT p1, PT p2, PT p3, PT p4);
3667 IMPORT PL sprite(PL bg, BM bitmap, PT pos, float size_x, float size_y);
3668 IMPORT PL polygon(PL bg, PT *points, int size);
3669 IMPORT PL color(PL orig, unsigned int new_color);
3673
3674 IMPORT PL and_not(PL p1, PL not_p); // needed in fonts for the holes
3675 // draw to bitmap, do and_not, put to texture
3676
3677 IMPORT PL render_p(P p, M proj_matrix, float sx, float sy);
3678 IMPORT PL remove_splines(PL pl, float xdelta);
3679
3680 IMPORT std::pair<PL,PL> triangulate(EveryApi &ev, PL pl, int obj);
3681 IMPORT PL triangulate_all(EveryApi &ev, PL pl, int point_count, int max_obj);
3683
3684 IMPORT P to_polygon_face(PL triangulated_pl, PT pos, V u_x, V u_y);
3685 IMPORT P to_polygon_lines(PL pl, PT pos, V u_x, V u_y, V u_z, float z_mult);
3686 P to_polygon_lines_1(PL pl, PT pos, V u_x, V u_y, V u_z, float z_mult);
3687 IMPORT P to_polygon(EveryApi &ev, PL pl, PT pos, V u_x, V u_y, V u_z, float z_mult);
3688
3689 IMPORT P to_polygon_strip(EveryApi &ev, PL pl, PT pos, V u_x, V u_y);
3690
3691 // 1) get black bitmap
3692 // 2) draw white polygon
3693 // 3) draw more black
3694 // 4) blit to screen, take only white pixels
3695 // PRoblem: How to change from black pixels to alpha pixels?
3696
3697 // TODO: bezier curves in 2d.
3698
3699 IMPORT P substitute_quads_with_plane(P orig, PL (*fptr)(EveryApi &ev, int face, void *data), void *data);
3700 IMPORT P plane_in_3d(PL plane, PT u_p, V v1, V v2);
3701
3702 CBM render_continuous(PL pl, int num, unsigned int color_0, unsigned int color_1);
3703 IMPORT BB render_bool(PL pl, int num, int sx, int sy);
3704
3706 IMPORT void render(PLA pl, float x, float y, float mult_x, float mult_y);
3707
3708private:
3709 PlaneApi(const PlaneApi&);
3710 void operator=(const PlaneApi&);
3711 Env &e;
3712};
3713#endif
3714
3715#ifdef F_BOOL_BITMAP_API
3717{ // NxN->2
3718public:
3721 IMPORT BB bb_empty(int sx, int sy);
3722 BB function(std::function<bool(int, int)> f, int sx, int sy);
3723 IMPORT BB transform(BB orig, std::function<bool(int, int, bool)> f);
3724 IMPORT O to_volume(BB b, float dist);
3725 IMPORT BB from_float_bitmap(FB float_bm, float range_start, float range_end);
3726 IMPORT BB from_bitmaps_color(BM bm, int r, int g, int b);
3727 IMPORT BB from_bitmaps_color_area(BM bm, std::function<bool(int r, int g, int b, int a)> f);
3728 IMPORT BB from_bitmaps_color_area(BM bm, int r_start, int r_end,int g_start, int g_end, int b_start, int b_end, int a_start, int a_end);
3729 IMPORT BB line(BB bg, float p_x, float p_y, float p2_x, float p2_y, float line_width1, float line_width2);
3730 IMPORT BB tri(BB orig, float p1_x, float p1_y, float p2_x, float p2_y, float p3_x, float p3_y);
3731
3732 IMPORT BB circle(BB bg, float center_x, float center_y, float radius);
3733 IMPORT BB ellipse(BB bg, float center_x, float center_y, float center2_x, float center2_y, float sum_of_distances);
3734 //IMPORT BB rectangle(BB bg, int x, int y, int width, int height); // for static ones
3735 IMPORT BB rectangle(BB bg, float x, float y, float width, float height); // for moving
3736 IMPORT BB sprite(BB bg, BB sprite, float x, float y, float size_multiplier_x, float size_multiplier_y);
3737 IMPORT BB polygon(BB bg, PT *points, int size);
3738 IMPORT BB text(BB bg, int x, int y, const char *string, int size,BB *glyphs, int glyphcount, int(*fptr)(EveryApi &ev, char));
3739
3740 IMPORT BB part_circle(int sx, int sy, float x, float y, float start_angle, float end_angle, float start_rad, float end_rad);
3741 IMPORT BB sections(int sx, int sy, float x, float y, std::function<bool (float angle)> f);
3742 IMPORT BB rings(int sx, int sy, float center_x_start, float center_y_start, float center_x_end, float center_y_end, float start_radius, float end_radius, float start_thickness, float end_thickness, int numrings);
3743
3745 IMPORT BB or_bitmap(BB b1, BB b2);
3746 IMPORT BB andnot_bitmap(BB b1, BB not_b2);
3747 IMPORT BB xor_bitmap(BB b1, BB flip_b2);
3748 IMPORT BM choose_bitmap(BB bools, BM true_bitmap, BM false_bitmap);
3749
3750 IMPORT BM to_bitmap(BB bools,int true_r, int true_g, int true_b, int true_a,int false_r, int false_g, int false_b, int false_a);
3751 BM to_bitmap_1(BB bools,int true_r, int true_g, int true_b, int true_a,int false_r, int false_g, int false_b, int false_a);
3752 IMPORT BM texture(BM bg,BB bools1, int l1, int t1,BM texturebitmap2, int l2, int t2);
3753 IMPORT int size_x(BB bm);
3754 IMPORT int size_y(BB bm);
3755 IMPORT bool boolvalue(BB bb, int x, int y);
3757private:
3759 void operator=(const BoolBitmapApi&);
3760
3761 Env &e;
3762};
3763#endif
3764
3765#ifdef F_FLOAT_BITMAP_API
3767{ // NxN->R
3768public: // values are [0.0..1.0]
3771
3772 IMPORT FB fb_empty(int sx, int sy);
3773 IMPORT FB function(std::function<float(int, int)> f, int sx, int sy);
3774 IMPORT FB newfloatbitmap(char *array, int sx, int sy, std::function<float(char)> f);
3775 IMPORT FB from_bool_bitmap(BB bm, int csx, int csy);
3776 IMPORT FB dist(int sx, int sy, float p_x, float p_y);
3777 IMPORT FB blur_bitmap(FB fb, float d);
3778 IMPORT FB gaussian(float start_x, float end_x, float start_y, float end_y, float start_z, float end_z, int sx, int sy);
3780 IMPORT FB from_red(BM color_bm);
3781 IMPORT FB from_green(BM color_bm);
3782 IMPORT FB from_blue(BM color_bm);
3783 IMPORT FB from_alpha(BM color_bm);
3784 IMPORT FB from_grayscale(BM color_bm);
3785
3786 IMPORT FB min_fb(FB fb1, FB fb2);
3787 IMPORT FB max_fb(FB fb1, FB fb2);
3788
3789 IMPORT FB mix_fb(FB fb1, FB fb2, float val);
3790 IMPORT FB space_fill(PT *array, float *array2, int size, int sx, int sy);
3791
3793 IMPORT BM to_grayscale_color(FB fb,int r, int g, int b, int a,int r2, int g2, int b2, int a2);
3794 IMPORT BM to_color(FB r, FB g, FB b, FB a);
3795 IMPORT BM choose_bitmap(FB fb, BM bm1, BM bm2);
3796 IMPORT FB perlin_noise(FB grad_1, FB grad_2);
3797 IMPORT FB perlin_noise2(int sx, int sy, float key);
3798 IMPORT BM subfloatbitmap(EveryApi &ev, FB fb, float range_start, float range_end, unsigned int true_color, unsigned int false_color);
3799
3800 IMPORT FB from_bool(BB b, float val_true, float val_false);
3801 IMPORT FB distance_field(FB bb, float max_value);
3802
3803 IMPORT FB add_border(FB fb);
3804
3805 BB to_bool(FB f, float true_range_start, float true_range_end);
3806
3807 IMPORT BB to_bool_mod(FB f, float mod_value);
3808
3809 IMPORT TXID to_texid(FB bm);
3810
3811 IMPORT CFB C_bitmap(float sx, float sy, float val);
3812 IMPORT CFB X_bitmap(float sx, float sy);
3813 IMPORT CFB Y_bitmap(float sx, float sy);
3814 IMPORT CFB MulBitmap(std::vector<CFB> vec);
3815 IMPORT CFB AddBitmap(std::vector<CFB> vec);
3817 IMPORT CFB Sin(CFB val);
3818 IMPORT CFB Cos(CFB val);
3819 IMPORT CFB Tan(CFB val);
3820 IMPORT FB SampleContFloat(CFB a1, float start_x,float end_x,float start_y,float end_y,int sx,int sy, float mult);
3821 IMPORT BB SampleContBool(CBB a1, float start_x,float end_x,float start_y,float end_y,int sx,int sy);
3823
3824
3825 IMPORT int size_x(FB bm);
3826 IMPORT int size_y(FB bm);
3827 IMPORT float floatvalue(FB bm, int x, int y);
3828private:
3830 void operator=(const FloatBitmapApi&);
3831 Env &e;
3832};
3833#endif
3834
3835#ifdef F_VECTOR_BITMAP_API
3837{
3838public:
3840 VBM spheredelta(float radius1, float radius2, float x, float y, float z,
3841 float sx, float sy);
3842 VBM plane(PT pos, V u_x, V u_y, V u_z);
3843 P span_object(VBM vectors, FB floats); // dimensions must be the same
3844private:
3845 Env &e;
3846};
3847#endif
3848
3849#ifdef F_CONTINUOUS_BITMAP_API
3851{ // RxR->RGB
3852public:
3854 IMPORT CBM cbm_empty(float x, float y);
3855 CBM constant(unsigned int color, float x, float y);
3856 IMPORT CBM function(std::function<unsigned int(float, float)> f, float sx, float sy);
3857 IMPORT BM sample(CBM c_bitmap, int sx, int sy);
3858 IMPORT CBM from_bitmap(BM bm, float xsize, float ysize);
3859 IMPORT BM to_bitmap(CBM bm, int sx, int sy);
3860
3861 IMPORT CBM rotate(CBM bm, float center_x, float center_y, float angle);
3862 IMPORT CBM surfacecolor(S s, COV cov);
3863 IMPORT CBM bicubic(float f_0, float f_1, float df_0, float df_1,
3864 float ff_0, float ff_1, float dff_0, float dff_1);
3865 IMPORT unsigned int get_pixel(CBM bitmap, float x, float y);
3866public: // Different rendering functions...
3867 CBM distance_render(FD obj, COV colours, float sx,float sy);
3868
3869private:
3871 void operator=(const ContinuousBitmapApi&);
3872
3873 Env &e;
3874};
3875#endif
3876
3877#ifdef F_VOXEL_API
3879{ // we don't have good ways to render these. RayTraceBitmap is one way,
3880 // but it could be useful in other rendering systems to get colours from
3881 // 3d space.
3882 // NxNxN->RGB
3883public:
3884 IMPORT VoxelApi(Env &e);
3885 IMPORT OVX empty_ovx();
3886 IMPORT OVX remove_not_enabled(OVX vx);
3887 IMPORT OVX remove_colours(OVX vx);
3888 IMPORT OVX resize_voxels(OVX vx, VX vx2);
3889 IMPORT OVX vx_to_ovx(VX vx, std::vector<P> vec);
3890 IMPORT ML render_ovx(EveryApi &ev, OVX vx, MT mat, float sx, float sy, float sz, float border_width, unsigned int border_color);
3891 IMPORT VX blur(VX vx);
3892 IMPORT ML lod_vox(EveryApi &ev, std::string vox_url, int model, float sx, float sy, float sz, MT mat, PTS pts, int l1, int l2, int l3, int l4);
3893 IMPORT P render_ovx_p(EveryApi &ev, OVX vx, float sx, float sy, float sz);
3894 IMPORT ML vox_bind_ml(EveryApi &ev, std::string url, int model, float sx, float sy, float sz, GameApi::MT mt, int level=0);
3895 IMPORT ML vox_ml(EveryApi &ev, std::string url, int model, float sx, float sy, float sz, int level=0);
3896 IMPORT ML vox_bind_ml2(EveryApi &ev, std::string url, int model, float sx, float sy, float sz, GameApi::MT mt, float border_width, unsigned int border_color, int level=0);
3897 IMPORT ML vox_ml2(EveryApi &ev, std::string url, int model, float sx, float sy, float sz, float border_width, unsigned int border_color, int level=0);
3898 IMPORT VX vox_voxel2(EveryApi &ev, std::string url, int model, float sx, float sy, float sz);
3899 IMPORT P vox_voxel3(EveryApi &ev, std::string url, int model, float sx, float sy, float sz, int level=0);
3900 IMPORT ARR vox_cubes(EveryApi &ev, std::string url, int model, float sx, float sy, float sz);
3901 IMPORT P vox_voxel(EveryApi &ev, std::string url, int model, float sx, float sy, float sz, int level=0);
3902 IMPORT VX voxel_from_bitmaps(std::vector<BM> vec, std::string url);
3903 IMPORT VX function(unsigned int (*fptr)(EveryApi &ev, int x, int y, int z, void *data), int sx, int sy, int sz, void *data);
3904 IMPORT unsigned int get_pixel(VX v, int x, int y, int z);
3905 IMPORT BM sw_rays(O volume, VX colours, int sx, int sy, float vx, float vy, float vz, float z);
3906 IMPORT P render_boxes(VX v, float sx, float sy, float sz);
3907 IMPORT PTS instanced_positions(VX x, float sx, float sy, float sz, unsigned int value);
3908
3909 // int voxel
3910 IMPORT VX empty_voxel(int sx, int sy, int sz);
3911 IMPORT VX subvoxel(VX voxel, int start_x, int end_x, int start_y, int end_y, int start_z, int end_z);
3912 IMPORT VX blit_voxel2(VX voxel, VX voxel2, int p_x, int p_y, int p_z);
3913 IMPORT VX blit_voxel(O object, int sx, int sy, int sz, float start_x, float end_x, float start_y, float end_y, float start_z, float end_z, int false_value, int true_value);
3914 IMPORT ARR voxel_instancing(VX voxel, int count, float start_x, float end_x, float start_y, float end_y, float start_z, float end_z);
3915 IMPORT ML voxel_render(EveryApi &ev, std::vector<P> objs, std::vector<PTS> vec);
3916 IMPORT ML voxel_bind(EveryApi &ev, std::vector<P> objs, std::vector<PTS> vec, MT material);
3917 IMPORT P voxel_static(EveryApi &ev, std::vector<P> objs, std::vector<PTS> vec);
3918 IMPORT VX voxel_landscape_from_fbm(FB bitmap, int height, int false_val, int true_val);
3919 IMPORT VX convert_p_to_vx(P p, int sx, int sy, int sz, float start_x, float end_x, float start_y, float end_y, float start_z, float end_z, int value);
3920 IMPORT VX from_implicit(IM i, int sx, int sy, int sz, float start_x, float end_x, float start_y, float end_y, float start_z, float end_z, int value);
3921private:
3922 Env &e;
3923};
3924#endif
3925
3926#ifdef F_COLOR_API
3928{ // ()->RGB
3929public:
3930 IMPORT ColorApi(Env &e);
3931 IMPORT CO u_color(unsigned int color); // argb
3932 IMPORT CO rgb_color(int r, int g, int b, int a); // r,g,b,a [0..255]
3933 IMPORT CO rgbf_color(float r, float g, float b, float a);
3934private:
3935 ColorApi(const ColorApi&);
3936 void operator=(const ColorApi&);
3937 Env &e;
3938};
3939#endif
3940
3941#ifdef F_POINT_API
3943{ // ()->PT
3944public:
3945 IMPORT PointApi(Env &e);
3946 IMPORT PT origo();
3947 IMPORT PT point(float x, float y, float z = 0.0);
3948 IMPORT PT move(PT p1, float dx, float dy, float dz = 0.0);
3949 IMPORT PT move(PT p1, V vec);
3950
3951 IMPORT PT mix(PT p1, PT p2, float val); // val=[0.0..1.0]
3952
3953 IMPORT PT from_angle(float radius, float angle);
3954 IMPORT PT from_angle(PT center, float radius, float angle);
3957
3958 IMPORT float pt_x(PT p);
3959 IMPORT float pt_y(PT p);
3960 IMPORT float pt_z(PT p);
3961 IMPORT float dist3d(PT p, PT p2);
3962 IMPORT float dist2d(PT p, PT p2);
3963 IMPORT V minus(PT p1, PT p2);
3964private:
3965 PointApi(const PointApi&);
3966 void operator=(const PointApi&);
3967 Env &e;
3968};
3969#endif
3970
3971#ifdef F_POINT_COLLECTION_API
3973 { // int -> PT
3974public:
3976 IMPORT PC function(std::function<PT (int)> f, int count);
3979 IMPORT PC single(float x, float y, float z);
3981 IMPORT PC bezier(PT *array, PT *control_array, int size, int iteration_count);
3983private:
3985 void operator=(const PointCollectionApi&);
3986 Env &e;
3987};
3988#endif
3989
3990#ifdef F_MATRICES_API
3992{
3993public:
3995 MS mn_matrix_array2(EveryApi &ev, std::vector<MN> moves);
3997 MS load_matrices(std::string url);
3998 MS load_matrices_nr(std::string url);
3999 MS ms_steady(MS ms);
4000 ML render_ms_files2_si(EveryApi &ev, std::vector<P> p, std::vector<MT> mat, VX voxel, int start_type, int end_type, float start_x, float end_x, float start_y, float end_y, float start_z, float end_z);
4001 ML render_ms_files_si(EveryApi &ev, std::vector<P> p, MT mat, VX voxel, int start_type, int end_type, float start_x, float end_x, float start_y, float end_y, float start_z, float end_z);
4002
4003 IMPORT MS mn_matrix_array(EveryApi &ev, int count, MN move);
4004 IMPORT MS random_time_seq(EveryApi &ev, MS inner_start, MS outer, MS inner_end, float outer_time, float inner_time);
4005 IMPORT MS ms_interface(VX vox, int type, float start_x, float end_x, float start_y, float end_y, float start_z, float end_z);
4006 IMPORT MS ms_file(std::string url, int use_type);
4007 IMPORT ML render_ms_files(EveryApi &ev, std::vector<P> p, MT mat, std::string url, int start_type, int end_type);
4008 IMPORT ML render_ms_files2(EveryApi &ev, std::vector<P> p, std::vector<MT> mat, std::string url, int start_type, int end_type);
4009 IMPORT MS interpolate(MS start, MS end, float val);
4010 IMPORT MS inverse_ms(MS ms);
4011 IMPORT MS from_points(PTS pts);
4012 IMPORT MS mult(MS m, M mat);
4013 IMPORT MS mult(M mat, MS m);
4014 IMPORT MS apply_matrix(MS m, M mat);
4015 IMPORT MS trans2(MS m, float tx,float ty, float tz);
4016 IMPORT MS scale2(MS m, float sx,float sy, float sz);
4017 IMPORT MS repeat_ms(EveryApi &ev, MN mn, int val);
4018 IMPORT MS subarray(MS m, int start, int count);
4019 IMPORT MS ms_random_rot(float px, float py, float pz, int count);
4020 IMPORT MS mult_array(MS m1, MS m2);
4023 IMPORT MSA prepare(MS p, bool color_from_instance);
4024
4025private:
4026 Env &e;
4027};
4028#endif
4029
4030#ifdef F_POINTS_API
4032{
4033public:
4034 IMPORT PointsApi(Env &e);
4035 // should use cubes at left,top,right edge to cut out rendering.
4036 IMPORT PTS combine_pts(PTS p1, PTS p2);
4038 IMPORT PTS world_filter(PTS points); // uses DynamicCursor g_dyn_cursor
4040 float start_delta_x, float end_delta_x,
4041 float start_delta_y, float end_delta_y,
4042 float start_delta_z, float end_delta_z);
4043
4044 IMPORT ML publish_heightfield(ML ml, CFB landscape, float start_x, float end_x,
4045 float start_y, float end_y, float start_z, float end_z);
4046 IMPORT CFB cbm_to_cfb( CBM bm, float red_mult, float red_add,
4047 float green_mult, float green_add,
4048 float blue_mult, float blue_add,
4049 float alpha_mult, float alpha_add);
4050 IMPORT PTS height_field_pts(PTS points, CFB landscape, float start_x, float end_x, float start_y, float end_y, float start_z, float end_z);
4051 IMPORT P height_field_p(P faces, CFB landscape, float start_x, float end_x, float start_y, float end_y, float start_z, float end_z);
4052
4055 float start_x, float end_x,
4056 float start_z, float end_z,
4057 float y,
4058 int num);
4059 IMPORT PTS pts_lines(std::string url, float start_pos, float dist, float speed);
4060 IMPORT PTS block_pts(PTS pts, float d, int max_points_visible);
4061 IMPORT PTS block_pts_lod(PTS pts, float start_x, float end_x, float start_y, float end_y, int max_points_visible, float ncd_z_s, float ncd_z_e);
4062 IMPORT MS block_ms_lod(MS pts, float start_x, float end_x, float start_y, float end_y, int max_points_visible, float ncd_z_s, float ncd_z_e);
4063 IMPORT PTS load_points(std::string url);
4064 IMPORT PTS pts_alt(std::vector<PTS> vec, int index);
4065 IMPORT PTS points_field(float start_speed_y, float end_speed_y, int numpoints, float start_x, float end_x, float start_y, float end_y);
4066 IMPORT P ply_faces(std::string url);
4067 IMPORT PTS ply_pts(std::string url);
4068 IMPORT PTS iterate_points(PTS points, VFi field, FA speed);
4069 IMPORT VFi pressure_gradient(FFi pressure);
4070 IMPORT VFi matrix_field(MN start, MN end);
4071 IMPORT FA random_speeds(float start_speed, float end_speed, int num);
4072 IMPORT PTS bullet(int key, float vx, float vy, float vz, float px, float py, float pz, float dist, int max_count, float repeat_time);
4076 IMPORT PTS pt_array(EveryApi &ev, std::vector<PT> vec);
4077 IMPORT PTS function(std::function<PT(int pointnum)> f, int numpoints);
4078 IMPORT PTS color_function(PTS orig, std::function<unsigned int(int pointnum, PT pos)> f);
4079 IMPORT PTS collision_points(float start_x, float end_x, float start_y, float end_y, float start_z, float end_z);
4080 IMPORT ML collision_bind(EveryApi &ev, PTS bounding_box, std::string name);
4081 IMPORT ML collision_bind_inst(EveryApi &ev, PTS bounding_box, PTS inst_points, std::string name);
4083 IMPORT PTS from_float_volume(FO float_volume, int numpoints, float start_x, float start_y, float start_z,float end_x, float end_y, float end_z);
4084 IMPORT PTS color_points(PTS p, unsigned int color);
4085 IMPORT PTS li_pts(LI li, float pos);
4086 IMPORT PTS li_pts2(LI li);
4087 IMPORT PTS hemisphere_points(PT points, V normal, float r, int numpoints);
4088 IMPORT PTS pts_grid(BM bm, float start_x, float end_x, float start_y, float en_y, float z);
4089 IMPORT PTS pts_grid_bb(BB bb, float start_x, float end_x, float start_y, float en_y, float z);
4090 IMPORT PTS or_points(PTS p1, PTS p2);
4092 IMPORT PTS heightmap(BM colour, FB floatbitmap, PT pos, V u_x, V u_y, V u_z, int sx, int sy);
4093 IMPORT PTS random_plane(PT pos, V u_x, V u_y, int numpoints);
4094 IMPORT PTS random_bitmap_instancing(EveryApi &ev, BB bm, int count, float start_x, float end_x, float start_y, float end_y, float z);
4096 IMPORT PTS random_mesh_quad_instancing_color(EveryApi &ev, P p, int count, std::vector<BM> textures);
4097 IMPORT PTS random_lattice(EveryApi &ev, int sx, int sy, int sz,
4098 float s_x, float s_y, float s_z,
4099 float px, float py, float pz,
4100 int count);
4101 IMPORT PTS surface(S surf, int sx, int sy);
4102 IMPORT PTS surface(std::function<PT (float,float)> surf,
4103 std::function<unsigned int (PT,float,float)> color,
4104 float start_u, float end_u,
4105 float start_v, float end_v,
4106 float step_u, float step_v);
4107 IMPORT PTS from_volume(O o, PT pos, V u_x, V u_y, V u_z, int sx, int sy, int sz);
4108 IMPORT PTS anim_mix(PTS o1, PTS o2, float start_val, float end_val, float start_time, float end_time);
4109 IMPORT PTS move(PTS obj, float dx, float dy, float dz);
4110 IMPORT PTS scale(PTS obj, float sx, float sy, float sz);
4111 IMPORT PTS rot_x(PTS obj, float angle);
4112 IMPORT PTS rot_y(PTS obj, float angle);
4113 IMPORT PTS rot_z(PTS obj, float angle);
4114 IMPORT PTS shadow_points(PTS obj, PT pos, V u_x, V u_y, V light_vec);
4115
4116 IMPORT PTS unit_cube(PTS orig, PT pos, V u_x, V u_y, V u_z);
4117 IMPORT PTS unit_to_cube(PTS orig, PT pos, V u_x, V u_y, V u_z);
4119 PT bTL, PT bTR, PT bBL, PT bBR,
4120 PT fTL, PT fTR, PT fBL, PT fBR);
4121 IMPORT PTS wave_points(WV wave, int num_samples,
4122 float pos_x, float pos_y, float pos_z,
4123 float u_x_x, float u_x_y, float u_x_z,
4124 float u_y_x, float u_y_y, float u_y_z);
4125 IMPORT PTS filter_component(PTS pts, int comp, float val);
4126 IMPORT PTS anim_rot_pts(PTS pts, float start_time, float end_time, float v_x, float v_y, float v_z, float rotate_amount);
4127
4128 IMPORT PTA prepare(PTS p, bool color_from_instance);
4129 IMPORT int num_points(PTA pta);
4130 IMPORT int num_points(MSA pta);
4131 float *point_access(PTA pta, int pointnum); // use ptr[0], ptr[1] and ptr[2] to access the x,y,z coordinate
4132 IMPORT void set_point(PTA pta, int pointnum, float x, float y, float z);
4133 //unsigned int *color_access(PTA pta, int pointnum);
4134 void update_from_data(PTA array, PTS p, bool draw=true);
4135 void update_from_data(MSA array, MS p, bool draw=true);
4136 void update(PTA array, GameApi::P pp, bool slow=false);
4137 IMPORT void render(PTA array);
4138 IMPORT ML render_ml(EveryApi &ev, PTA array);
4139 IMPORT void explode(PTA array, float x, float y, float z, float dist);
4140
4141 IMPORT PTS standard_box(int sx, int sy, int sz, float start_x, float end_x, float start_y, float end_y, float start_z, float end_z);
4144 IMPORT LI matrix2_display(EveryApi &ev, M matrix1, M matrix2, int sx,int sy,int sz, float start_x, float end_x, float start_y, float end_y, float start_z, float end_z);
4145 IMPORT ML movement_display(EveryApi &ev, ML ml, MN mn, int count, int sx, int sy, int sz, float start_x, float end_x, float start_y, float end_y, float start_z, float end_z);
4146
4147 IMPORT int NumPoints(PTS p);
4148 IMPORT int NumPoints(MS p);
4149 IMPORT float pos_x(PTS p, int index);
4150 IMPORT float pos_y(PTS p, int index);
4151 IMPORT float pos_z(PTS p, int index);
4153 IMPORT LI li_from_pts(PTS pts, float dx, float dy, float dz);
4155private:
4156 PointsApi(const PointsApi&);
4157 void operator=(const PointsApi&);
4158
4159 Env &e;
4160};
4161#endif
4162
4163#ifdef F_LINES_API
4165{
4166public:
4167 IMPORT LinesApi(Env &e);
4168 IMPORT LI pos_choose(EveryApi &ev, FB bm, float pos, float start_x, float end_x, float start_y, float end_y, float z);
4169 IMPORT LI alt(std::vector<LI> v, int index);
4170 IMPORT LI li_empty();
4171 IMPORT LI li_url(std::string url);
4172 IMPORT LI li_url_nr(std::string url);
4173 IMPORT LI function(std::function<PT(int linenum, bool id)> f,
4174 int numlines);
4175 IMPORT LI line_pos_mult(float val, LI li);
4176 IMPORT LI point_array(std::vector<PT> vec);
4177 IMPORT LI li_or_array(std::vector<LI> vec);
4178 IMPORT LI li_bevel(LI li, P p, float mix);
4179 IMPORT P p_towards_normal(P p, float amount);
4180 IMPORT LI li_matrix(LI lines, M matrix);
4181 IMPORT LI color_function(LI lines, std::function<unsigned int(int linenum, bool id)> f);
4182 IMPORT LI change_color(LI li, unsigned int color);
4183 IMPORT LI change_color2(LI li, unsigned int color_1, unsigned int color_2);
4184 IMPORT LI from_points(PC points, bool loops);
4185 IMPORT LI from_points2(PTS start_points, PTS end_points);
4186 IMPORT LI from_plane(PL plane);
4187 IMPORT LI from_polygon(P poly);
4188 IMPORT LI from_polygon2(P poly1, P poly2);
4189 IMPORT LI normals_from_polygon(P poly, float length);
4190 IMPORT P line_anim(P poly, LI lines_from_polygon2, float val);
4191 IMPORT PTS pts_line_anim(LI lines, float val);
4192 IMPORT PTS pts_line_anim2(LI lines, std::function<float (int)> f);
4193 IMPORT LI border_from_bool_bitmap(BB b, float start_x, float end_x,
4194 float start_y, float end_y, float z);
4195 IMPORT LI render_slice_2d(P p, PT pos, V u_x, V u_y);
4196 IMPORT LI translate(LI lines, float dx, float dy, float dz);
4197 IMPORT LI scale(LI lines, float m_x, float m_y, float m_z);
4198 IMPORT LI li_or_elem(LI li1, LI li2);
4199 IMPORT LI rotx(LI lines, float angle);
4200 IMPORT LI roty(LI lines, float angle);
4201 IMPORT LI rotz(LI lines, float angle);
4202 IMPORT P line_product(LI lines1, LI lines2);
4203 IMPORT LI fur(PTS pts, PT center, float dist);
4204 IMPORT LI split_lines(LI lines, float dist);
4205 IMPORT LI twist_y(LI lines, float y_0, float angle_per_y_unit);
4206 IMPORT LI random_angle(LI lines, float max_angle);
4207
4208 IMPORT LI unit_cube(LI orig, PT pos, V u_x, V u_y, V u_z);
4209 IMPORT LI unit_to_cube(LI orig, PT pos, V u_x, V u_y, V u_z);
4211 PT bTL, PT bTR, PT bBL, PT bBR,
4212 PT fTL, PT fTR, PT fBL, PT fBR);
4213 IMPORT LI random_mesh_quad_lines(EveryApi &ev, P p, int count);
4214 IMPORT LI lines_from_quads(P p, int sx, int sy);
4215
4216 IMPORT ML ml_li_render(EveryApi &ev, LI l, float linewidth);
4217 IMPORT LLA prepare(LI l);
4218 IMPORT void update(LLA la, LI l);
4219 IMPORT ML update_ml(LLA la, LI l);
4220 //IMPORT int line_count(LLA l);
4221 // IMPORT float *line_access(LLA lines, int line, bool b);
4222 //IMPORT unsigned int *color_access(LLA lines, int line, bool b);
4223 //IMPORT void update(LLA lines);
4224 IMPORT void render(LLA array);
4225 IMPORT void prepare_inst(LLA array, PTA instances);
4226 IMPORT void render_inst(LLA array, PTA instances);
4227 IMPORT void prepare_inst_matrix(LLA array, MSA instances);
4228 IMPORT void render_inst_matrix(LLA array, MSA instances);
4229 IMPORT ML render_ml(EveryApi &ev, LLA array, float linewidth);
4230 IMPORT ML render_ml2(EveryApi &ev, LI array, float linewidth);
4231 IMPORT ML render_inst_ml(EveryApi &ev, LLA array, PTA pta, float linewidth);
4232 IMPORT ML render_inst_ml2(EveryApi &ev, LI array, PTA pta, float linewidth);
4233 IMPORT ML render_inst_ml3(EveryApi &ev, LI array, PTS pts, float linewidth);
4234 IMPORT ML render_inst_ml3_matrix(EveryApi &ev, LI array, MS pts, float linewidth);
4236private:
4237 LinesApi(const LinesApi&);
4238 void operator=(const LinesApi&);
4239 Env &e;
4240};
4241#endif
4242
4243#ifdef F_VECTOR_API
4245{ // to be implemented via virtual Vector vec() const=0;
4246 // ()->V
4247public:
4248 IMPORT VectorApi(Env &e);
4250 IMPORT V vector(float delta_x, float delta_y, float delta_z);
4251 IMPORT V sum(V v1, V v2);
4252 IMPORT V mul(V v1, float scalar);
4253 IMPORT float dot(V v1, V v2);
4254 IMPORT V cross(V v1, V v2);
4255 IMPORT float projection_length(V u, V u_x);
4256 IMPORT V projection_1(V u, V u_x);
4257 IMPORT V projection_2(V u, V u_x);
4258 IMPORT V neg(V v);
4259 IMPORT float dist3d(V v);
4260 IMPORT float dist2d(V v);
4261private:
4262 VectorApi(const VectorApi&);
4263 void operator=(const VectorApi&);
4264 Env &e;
4265};
4266#endif
4267
4268#ifdef F_SPACE_VECTOR_API
4270{ // f : PT->V
4271public:
4273 SV function(std::function<V (float x, float y, float z)> f); // TODO
4274 SV from_points(PC coll); // choose poly(nearest points), linear interpoate, ensure no failures
4275 PT flow_next_point(SV v, PT p, float mult);
4276private:
4278 void operator=(const SpaceVectorApi&);
4279 Env &e;
4280};
4281#endif
4282
4283#ifdef F_MATRIX_API
4285{
4286public:
4287 IMPORT MatrixApi(Env &e);
4288 IMPORT M identity();
4289 IMPORT M transpose(M m);
4290 IMPORT M xrot(float rot);
4291 IMPORT M yrot(float rot);
4292 IMPORT M zrot(float rot);
4293 IMPORT M trans(float x, float y, float z);
4295 IMPORT M scale(float sx, float sy, float sz);
4296 IMPORT M projection(float z_min);
4298 IMPORT M perspective(float fovy, float aspect, float near, float far);
4299 IMPORT M ortho( float left, float right, float bottom, float top, float near, float far);
4300 IMPORT M inverse(M m1);
4301 IMPORT M mult(M m1, M m2);
4302 IMPORT M rotate_around_axis(V v, float angle);
4303 IMPORT M rotate_around_axis(PT point, V v, float angle);
4305 IMPORT PT mult(PT point, M matrix);
4306private:
4307 MatrixApi(const MatrixApi&);
4308 void operator=(const MatrixApi&);
4309 Env &e;
4310};
4311#endif
4312#ifdef F_OBJECT_MOVE_API
4314{
4315public:
4317 OM empty(int numobjects);
4318 OM add_object(OM orig, int index, P obj);
4319 OM clear_object(OM orig, int index);
4320 OM change_pos(OM orig, int index, M mat);
4321 VAA prepare_all(OM orig);
4322 void render_all(VAA orig);
4323private:
4325 void operator=(const ObjectMoveApi&);
4326
4327 Env &e;
4328};
4329#endif
4330
4331#ifdef F_VBO_API
4333{
4334public:
4335 IMPORT VBOApi(Env &e);
4336 ~VBOApi();
4337 // preparing
4338 Vb alloc(int obj_count);
4339 void sprite(Vb v, int obj_num, BM bm, float x, float y);
4340 void polygon(Vb v, int obj_num, P p, float x, float y, float z);
4341 void grid(Vb v, int obj_num, BM tile_bitmap, BM grid, float top_x, float top_y);
4342 void heightmap(Vb v, int obj_num, BM bitmap_float);
4343 void prepare(Vb v);
4344 // rendering
4345 void swapframe(Vb v, int obj_num, int type, int frame);
4346 void move(Vb v, int obj_num, float x, float y, float z);
4347 void render(Vb v);
4348private:
4349 VBOApi(const VBOApi&);
4350 void operator=(const VBOApi&);
4351
4352 void *priv;
4353 Env &e;
4354};
4355#endif
4356
4357#ifdef F_PATH_API
4359{
4360public:
4366 P object(LA l, PT o, float dx, float dy, float dz);
4367
4368 PA line(PT p1, PT p2, int splitnum);
4369 PA cross(PT pos, PA p1, PA p2);
4370 PA grid(PT pos, PT p_x, PT p_y, int sx, int sy);
4371 PA cube(PT pos, PT p_x, PT p_y, PT p_z, int sx, int sy, int sz);
4372private:
4373 void *priv;
4374 Env &e;
4375};
4376#endif
4377
4378#ifdef F_UBER_SHADER_API
4380{
4381public:
4383 IMPORT US v_empty();
4384 IMPORT US v_water(US us);
4385 IMPORT US v_edge(US us);
4386 IMPORT US v_gltf_anim(US us);
4387 IMPORT US v_globe(US us);
4390 IMPORT US v_diffuse(US us);
4391 IMPORT US v_ambient(US us);
4392 IMPORT US v_specular(US us);
4393 IMPORT US v_inst(US us);
4395 IMPORT US v_passall(US us);
4399 IMPORT US v_snoise(US us);
4400 IMPORT US v_light(US us);
4401 IMPORT US v_ref(US us);
4402 IMPORT US v_wave(US us);
4403 IMPORT US v_toon(US us);
4404 IMPORT US v_texture(US us);
4408 IMPORT US v_colour(US us);
4409 IMPORT US v_blur(US us); // dangerous operation
4410 IMPORT US v_dist_field_mesh(US us, SFO sfo);
4411 IMPORT US v_skeletal(US us);
4412 IMPORT US v_custom(US us, std::string v_funcname);
4415 IMPORT US v_phong(US us);
4417 IMPORT US v_adjust(US us);
4418 IMPORT US v_generic(US us, std::string name, std::string flags);
4420 IMPORT US v_glowedge(US us);
4422 IMPORT US v_fog(US us);
4423 IMPORT US v_shadow(US us);
4424 IMPORT US v_mix(US us);
4426 IMPORT US v_gi(US us);
4427 IMPORT US v_gltf(US us, std::string cache_id);
4429 IMPORT US v_fade(US us);
4430 IMPORT US f_water(US us);
4431 IMPORT US f_acesfilm(US us);
4432 IMPORT US f_discard(US us);
4433 IMPORT US f_edge(US us);
4434 IMPORT US f_gltf_anim(US us);
4435 IMPORT US f_mesh_color(US us, SFO sfo); // this requires v_pass_position() in vertex shader
4436 IMPORT US f_sandbox(US us, SFO sfo); // this requires texture coordinates
4437 IMPORT US f_empty(bool transparent);
4438 IMPORT US f_diffuse(US us);
4439 IMPORT US f_ambient(US us);
4440 IMPORT US f_specular(US us);
4442 IMPORT US f_newshadow_2(US us, bool is_phong);
4443 IMPORT US f_adjust(US us);
4444 IMPORT US f_phong(US us);
4446 IMPORT US f_phong2(US us);
4447 IMPORT US f_generic(US us, std::string name, std::string flags);
4448 IMPORT US f_generic_flip(US us, std::string name, std::string flags);
4450 IMPORT US f_glowedge(US us);
4452 IMPORT US f_fog(US us);
4453 IMPORT US f_shadow(US us);
4454 IMPORT US f_mix(US us);
4457 IMPORT US f_color_from_id(US us, int id); // id = [0..9]
4460 IMPORT US f_bands(US us);
4461 IMPORT US f_snoise(US us);
4462 IMPORT US f_blur(US us); // dangerous operation
4463 IMPORT US f_ref(US us);
4464 IMPORT US f_light(US us);
4465 IMPORT US f_toon(US us);
4466 IMPORT US f_texture(US us);
4470 IMPORT US f_colour(US us);
4471 IMPORT US f_mix_color(US us, US us2, float val); // TODO
4473 IMPORT US f_custom(US us, std::string f_funcname);
4474 IMPORT US f_gi(US us);
4476 IMPORT US f_gltf(US us, bool tex0, bool tex1, bool tex2, bool tex3, bool tex4, bool tex5, bool tex6, bool tex7, bool spec, bool unlit, std::string cache_id, bool emissive);
4477 IMPORT US f_fade(US us);
4479private:
4480 Env &e;
4481};
4482#endif
4483
4484#ifdef F_SHADER_API
4486{
4487public:
4488 IMPORT ShaderApi(Env &e);
4490 IMPORT void load_default();
4491 IMPORT void load(std::string filename);
4492 IMPORT SH get_shader(std::string v_format, std::string f_format, std::string g_format,std::string v_comb="", std::string f_comb="", bool trans=true, SFO module={-1} );
4493 IMPORT SH get_normal_shader(std::string v_format, std::string f_format, std::string g_format,std::string v_comb="", std::string f_comb="", bool trans=true, SFO mod={-1}, std::string v_defines="IN_NORMAL IN_COLOR IN_TEXCOORD IN_POSITION EX_COLOR EX_NORMAL EX_POSITION EX_TEXCOORD", std::string f_defines="EX_COLOR EX_NORMAL EX_POSITION EX_TEXCOORD", bool is_new=false);
4494 IMPORT SH get_normal_shader(std::string v_format, std::string f_format, std::string g_format,US v_comb, US f_comb, bool trans=true, SFO mod={-1}, std::string v_defines="", std::string f_defines="", bool is_new=false);
4495 IMPORT SH get_normal_shader(std::string v_format, std::string f_format, std::string g_format, US v_comb, US f_comb, std::string v_shader, std::string f_shader, bool trans=true, SFO mod={-1}, std::string v_defines="", std::string f_defines="", bool is_new=false);
4496 SH get_shader_1(std::string v_format, std::string f_format, std::string g_format,
4497 std::string v_comb="", std::string f_comb="", bool trans=true, SFO mod={-1}, US v_c={-1}, US f_c={-1}, std::string v_defines="IN_NORMAL IN_COLOR IN_TEXCOORD IN_POSITION EX_COLOR EX_NORMAL EX_POSITION EX_TEXCOORD EX_POSITION", std::string f_defines="EX_COLOR EX_NORMAL EX_POSITION EX_TEXCOORD", std::string v_shader="", std::string f_shader="");
4498 SH get_normal_shader_1(std::string v_format, std::string f_format, std::string g_format,
4499 std::string v_comb="", std::string f_comb="", bool trans=true, SFO mod = { -1 }, US v_c = { -1 }, US f_c = { -1 }, std::string v_defines="IN_NORMAL IN_POSITION IN_COLOR IN_TEXCOORD EX_COLOR EX_NORMAL EX_POSITION EX_TEXCOORD", std::string f_defines="EX_COLOR EX_NORMAL EX_POSITION EX_TEXCOORD", std::string v_shader="", std::string f_shader="");
4500 SH get_normal_shader_1_new(std::string v_format, std::string f_format, std::string g_format,
4501 std::string v_comb="", std::string f_comb="", bool trans=true, SFO mod = { -1 }, US v_c = { -1 }, US f_c = { -1 }, std::string v_defines="IN_NORMAL IN_POSITION IN_COLOR IN_TEXCOORD EX_COLOR EX_NORMAL EX_POSITION EX_TEXCOORD", std::string f_defines="EX_COLOR EX_NORMAL EX_POSITION EX_TEXCOORD", std::string v_shader="", std::string f_shader="");
4502 IMPORT SH texture_shader(bool text_draw=false);
4508 IMPORT PinIn link(SH shader);
4509 IMPORT PinIn use(SH shader);
4510 IMPORT void print_log(SH shader);
4511 void link_1(SH shader);
4512 void use_1(SH shader);
4513 IMPORT PinIn unuse(SH shader);
4514 IMPORT void bindnames(GameApi::SH shader,
4515 std::string s_vertex,
4516 std::string s_normal,
4517 std::string s_color,
4518 std::string s_texcoord);
4519 IMPORT void set_default_projection(GameApi::SH shader, std::string name);
4520 void set_default_projection_1(GameApi::SH shader, std::string name);
4521 IMPORT void set_y_rotation(SH shader, std::string name, float angle);
4522 IMPORT void bind_attrib(GameApi::SH shader, int num, std::string name);
4523 void bind_attrib_1(GameApi::SH shader, int num, std::string name);
4524 IMPORT void bind_frag(GameApi::SH shader, int attachment_num, std::string name);
4525 IMPORT PinIn set_var(GameApi::SH shader, const char * name, float val);
4526 IMPORT PinIn set_var(GameApi::SH shader, const char * name, float x, float y, float z);
4527 IMPORT PinIn set_var(GameApi::SH shader, const char *name, float x, float y, float z, float k);
4528 IMPORT PinIn set_var(GameApi::SH shader, const char * name, int val);
4529 IMPORT PinIn set_var(GameApi::SH shader, const char * name, M matrix);
4530 IMPORT PinIn set_var(GameApi::SH shader, const char * name, const std::vector<M> &m, int start, int end);
4531 IMPORT PinIn set_var(GameApi::SH shader, const char * name, const std::vector<M> &m, int num);
4532 IMPORT PinIn set_var(GameApi::SH shader, const char * name, const std::vector<PT> &v);
4533 IMPORT PinOut<M> get_matrix_var(GameApi::SH shader, std::string name);
4534private:
4535 ShaderApi(const ShaderApi&);
4536 void operator=(const ShaderApi&);
4537
4538 friend class StateChangeApi;
4539 void *priv;
4540 Env &e;
4541};
4542#endif
4543
4545{
4546public:
4548 IMPORT RUN low_framebuffer_run(EveryApi &ev, FBU buffer, int mode, int scr_x, int scr_y);
4549 IMPORT FBU low_framebuffer(FML mainloop, int format, int width, int height, int depth);
4550 IMPORT FML low_sprite_draw(std::string name, BM bm, MN mn, int x, int y, int fmt, float start_time);
4551 IMPORT FML low_poly_draw(std::string name, P p,MN mn);
4552 IMPORT FML low_sprite_array(std::string name, std::string url, std::vector<BM> bms, MN mn, int x, int y, int fmt, float start_time);
4553 IMPORT FML low_render_world(std::vector<BM> blocks, int screen_width, int screen_height, int fmt);
4554 IMPORT FML low_scroll_world(FML ml, float speed_x, float speed_y, float p_x, float p_y, float left_offset, float right_offset, float height, float height2, int mode, int jump_frames);
4555 IMPORT FML low_build_world(FML ml, std::string url, std::string chars,int x, int y);
4556 IMPORT FML low_enemy_draw(BM bm, std::string url, int fmt, float speed);
4557 IMPORT FML low_enemy_draw2(std::vector<BM> bm, std::string url, int fmt, float speed, int time_delta, int time_duration);
4558 IMPORT FML low_collision(FML ml, float start_x, float end_x, float start_y, float end_y, int key);
4559 IMPORT BM low_frame_bitmap(FML ml, int sx, int sy);
4560 IMPORT FML low_key_bm_prepare(FML ml, BM bm, int key,FML normal, float duration, FML next);
4561 IMPORT FML low_activate_snapshot(EveryApi &ev, FML ml, int key, MN move, float duration, FML next);
4562 IMPORT FML qml_print(std::string url);
4563 IMPORT FML qml_create_node(std::string url);
4565 IMPORT W w_layout(std::vector<W> vec, std::string url);
4566 IMPORT W w_rect(unsigned int color);
4567 IMPORT W w_bitmap(BM bm);
4568 IMPORT W w_text(EveryApi &ev, Ft font, std::string str, int x_gap, float baseline);
4569private:
4571 void operator=(const LowFrameBufferApi&);
4572 Env &e;
4573};
4574
4575#ifdef F_FRAMEBUFFER_API
4577{
4578public:
4579 struct vp { int viewport[4]; };
4581 IMPORT FBO create_fbo(EveryApi &ev, int sx, int sy);
4582 IMPORT void config_fbo(FBO buffer);
4583 IMPORT void unconfig_fbo(FBO buffer);
4584 IMPORT vp bind_fbo(FBO buffer);
4585 IMPORT void bind_screen(vp viewport);
4586 IMPORT TXID tex_id(FBO buffer);
4587 IMPORT TXID depth_id(FBO buffer);
4588 IMPORT bool fbo_status(FBO buffer);
4590 IMPORT TXID fbo_ml(EveryApi &ev, ML mainloop, int sx, int sy, bool translate);
4591 IMPORT TXID depth_ml(EveryApi &ev, ML mainloop, int sx, int sy, bool translate);
4592 IMPORT ML fbo_ml_blit(EveryApi &ev, TXID id, float start_x, float end_x, float start_y, float end_y, float z);
4593private:
4595 void operator=(const FrameBufferApi&);
4596 Env &e;
4597};
4598#endif
4599
4600#ifdef F_LAYOUT_API
4602{
4603public:
4604 IMPORT LayoutApi(Env &e);
4605 LAY root(int sx, int sy); // id = {0}
4606 LAY split_y(LAY l, int id, int num); // id = {0..num-1}
4607 LAY split_x(LAY l, int id, int num); // id = {0..num-1}
4608 LAY split_xy(LAY l, int id, int num_x, int num_y); // id={0..(num_x*num_y-1)}
4609 LAY margin(LAY l, int id, int lx, int rx, int ty, int by); // id={ 0 }
4610 LAY size(LAY l, int id, int lx, int size_x, int ty, int size_y); // id = { 0 }
4611 LAY center(LAY l, int id, int content_size_x, int content_size_y); // id={0}
4612 LAY array(LAY *array, int *id, int size); // id = { 0..size }
4613
4614 int root_sx(LAY l);
4615 int root_sy(LAY l);
4616
4617 int count(LAY l);
4618 int pos_x(LAY l, int id);
4619 int pos_y(LAY l, int id);
4620 int size_x(LAY l, int id);
4621 int size_y(LAY l, int id);
4622
4623private:
4624 Env &e;
4625};
4626#endif
4627
4628#ifdef F_DRAW_API
4630{
4631public:
4632 IMPORT DrawApi(Env &e);
4633 DR label(LAY l, int id, std::string str, Ft font);
4634 DR icon(LAY l, int id, BM bm);
4635 DR rect(LAY l, int id, unsigned int color);
4636 DR scroll(DR dr, int delta_x, int delta_y);
4637 DR scroll_area(DR dr, LAY l, int id);
4638 DR cliprect(DR cmds, LAY l, int id);
4639
4641 DR alternatives_array(std::string id, DR *array, int size);
4642 DR choose_alternative(DR dr, std::string id, int val);
4643
4645 bool is_specific_alternative(DR d, std::string id);
4648 DR array_index(DR d, int index);
4653
4655 std::string render_to_html_canvas(DR dr);
4656 std::string generate_java_code(DR dr);
4657private:
4658 Env &e;
4659};
4660#endif
4661
4662
4664{
4665 IMPORT EveryApi(Env &e);
4666 IMPORT Env &get_env();
4667 IMPORT ~EveryApi();
4682 //CurveApi curve_api;
4726private:
4727 Env &env;
4728 EveryApi(const EveryApi&);
4729 void operator=(const EveryApi&);
4730
4731};
4732
4733#ifdef F_GAMES_API
4735{
4736public:
4737 IMPORT GamesApi(Env &e);
4738 IMPORT ~GamesApi();
4739 IMPORT void register_game(int game_id, void (*fptr)(EveryApi &e));
4740 IMPORT void modify_map(int event, int game_id);
4741 IMPORT void start_game(int event);
4742private:
4743 Env &e;
4744 //void *priv;
4745};
4746#endif
4747
4748
4749 //
4750 // Object-Oriented API
4751 //
4752
4753
4755 {
4756 public:
4757 virtual ~RenderObject() { }
4758 virtual void prepare(bool keep=false)=0;
4759 virtual void render()=0;
4760 virtual void set_var(std::string name, float r, float g, float b, float a)=0;
4761 };
4762 void prepare(RenderObject &o);
4764 {
4765 public:
4767 virtual void set_pos(float pos_x, float pos_y)=0;
4768 virtual void set_scale(float mult_x, float mult_y)=0;
4769 };
4771 {
4772 public:
4774 virtual void set_pos(float pos_x, float pos_y, float pos_z)=0;
4775 virtual void set_scale(float mult_x, float mult_y, float mult_z)=0;
4776 virtual void set_rotation_matrix(M m)=0;
4777 virtual void set_rotation_matrix2(M m)=0;
4778 };
4779
4781 {
4782 public:
4783 ArrayObj3d(EveryApi &ev) : ev(ev), p_x(0.0), p_y(0.0), p_z(0.0), s_x(1.0), s_y(1.0), s_z(1.0)
4784 {
4785 current_rot_matrix = ev.matrix_api.identity();
4786 current_rot_matrix2 = ev.matrix_api.identity();
4787 }
4789 {
4790 render_vec.push_back(obj);
4791 move_scale_vec.push_back(obj2);
4792 pos_x.push_back(0.0);
4793 pos_y.push_back(0.0);
4794 pos_z.push_back(0.0);
4795 scale_x.push_back(1.0);
4796 scale_y.push_back(1.0);
4797 scale_z.push_back(1.0);
4798 rot_matrix.push_back(ev.matrix_api.identity());
4799 }
4800 void prepare(bool keep=false) {
4801 int s = render_vec.size();
4802 for(int i=0;i<s;i++) {
4803 render_vec[i]->prepare();
4804 }
4805 }
4806 void render() {
4807 int s = render_vec.size();
4808 for(int i=0;i<s;i++) {
4809 int ss = child_var.size();
4810 for(int j=0;j<ss;j++)
4811 {
4812 ChildVar &v = child_var[j];
4813 if (v.i==i)
4814 render_vec[i]->set_var(v.name, v.r, v.g, v.b,v.a);
4815 }
4816 render_vec[i]->render();
4817 }
4818 }
4819 int size() const { return render_vec.size(); }
4820
4821 void set_child_pos(int i, float cpos_x, float cpos_y, float cpos_z)
4822 {
4823 pos_x[i] = cpos_x;
4824 pos_y[i] = cpos_y;
4825 pos_z[i] = cpos_z;
4826 setup_one(i);
4827 }
4828 void set_child_scale(int i, float mult_x, float mult_y, float mult_z)
4829 {
4830 scale_x[i] = mult_x;
4831 scale_y[i] = mult_y;
4832 scale_z[i] = mult_z;
4833 setup_one(i);
4834 }
4835 M rot_y(float c_x, float c_y, float c_z, float angle)
4836 {
4837 M m1 = ev.matrix_api.trans(c_x, c_y, c_z);
4838 M m2 = ev.matrix_api.yrot(angle);
4839 M m3 = ev.matrix_api.trans(-c_x, -c_y, -c_z);
4840 M mm = ev.matrix_api.mult(m1,m2);
4841 M mmm = ev.matrix_api.mult(mm, m3);
4842 return mmm;
4843 }
4844 M rot_x(float c_x, float c_y, float c_z, float angle)
4845 {
4846 M m1 = ev.matrix_api.trans(c_x, c_y, c_z);
4847 M m2 = ev.matrix_api.xrot(angle);
4848 M m3 = ev.matrix_api.trans(-c_x, -c_y, -c_z);
4849 M mm = ev.matrix_api.mult(m1,m2);
4850 M mmm = ev.matrix_api.mult(mm, m3);
4851 return mmm;
4852 }
4853 M rot_z(float c_x, float c_y, float c_z, float angle)
4854 {
4855 M m1 = ev.matrix_api.trans(c_x, c_y, c_z);
4856 M m2 = ev.matrix_api.zrot(angle);
4857 M m3 = ev.matrix_api.trans(-c_x, -c_y, -c_z);
4858 M mm = ev.matrix_api.mult(m1,m2);
4859 M mmm = ev.matrix_api.mult(mm, m3);
4860 return mmm;
4861 }
4862
4864 {
4865 rot_matrix[i] = m;
4866 setup_one(i);
4867 }
4869 {
4870 int i;
4871 std::string name;
4872 float r,g,b,a;
4873 };
4874
4875 void set_var(std::string name, float r, float g, float b, float a)
4876 {
4877 int s = render_vec.size();
4878 for(int i=0;i<s;i++)
4879 {
4880 set_child_shader_var(i, name, r,g,b,a);
4881 }
4882 }
4883
4884 void set_child_shader_var(int i, std::string name, float r, float g, float b, float a)
4885 {
4886 ChildVar v;
4887 v.i = i;
4888 v.name = name;
4889 v.r = r; v.g = g; v.b=b; v.a=a;
4890 child_var.push_back(v);
4891 }
4892 void set_pos(float pos_x, float pos_y, float pos_z)
4893 {
4894 p_x = pos_x;
4895 p_y = pos_y;
4896 p_z = pos_z;
4897 setup();
4898 }
4899 void set_scale(float mult_x, float mult_y, float mult_z)
4900 {
4901 s_x = mult_x;
4902 s_y = mult_y;
4903 s_z = mult_z;
4904 setup();
4905 }
4907 {
4908 current_rot_matrix = m;
4909 setup();
4910 }
4912 {
4913 current_rot_matrix2 = m;
4914 }
4915 private:
4916 void setup_one(int i)
4917 {
4918 float ap_x = pos_x[i];
4919 float ap_y = pos_y[i];
4920 float ap_z = pos_z[i];
4921 float as_x = scale_x[i];
4922 float as_y = scale_y[i];
4923 float as_z = scale_z[i];
4924 M m = rot_matrix[i];
4925 ap_x += p_x;
4926 ap_y += p_y;
4927 ap_z += p_z;
4928 as_x*=s_x;
4929 as_y*=s_y;
4930 as_z*=s_z;
4931 m = ev.matrix_api.mult(m, current_rot_matrix);
4932 move_scale_vec[i]->set_pos(ap_x,ap_y,ap_z);
4933 move_scale_vec[i]->set_scale(as_x,as_y,as_z);
4934 move_scale_vec[i]->set_rotation_matrix(m);
4935 move_scale_vec[i]->set_rotation_matrix2(current_rot_matrix2);
4936 }
4937 void setup()
4938 {
4939 int s = pos_x.size();
4940 for(int i=0;i<s;i++)
4941 {
4942 setup_one(i);
4943 }
4944 }
4945 private:
4946 EveryApi &ev;
4947 std::vector<RenderObject *> render_vec;
4948 std::vector<MoveScaleObject3d *> move_scale_vec;
4949 std::vector<float> pos_x;
4950 std::vector<float> pos_y;
4951 std::vector<float> pos_z;
4952 std::vector<float> scale_x;
4953 std::vector<float> scale_y;
4954 std::vector<float> scale_z;
4955 std::vector<M> rot_matrix;
4956 std::vector<M> rot_matrix2;
4957 std::vector<ChildVar> child_var;
4958 float p_x, p_y, p_z;
4959 float s_x, s_y, s_z;
4960 M current_rot_matrix;
4961 M current_rot_matrix2;
4962 };
4964 {
4965 public:
4966 SpriteObj(EveryApi &ev, BM bm_, SH sh) : sp(ev.sprite_api), matrix_api(ev.matrix_api), shader_api(ev.shader_api), sh(sh)
4967 {
4968 bm.push_back(bm_);
4969 pos_x = 0.0; pos_y = 0.0;
4970 mult_x = 1.0; mult_y = 1.0;
4971 anim_id = 0;
4972 m = matrix_api.identity();
4973 prepared=false;
4974 }
4975 SpriteObj(EveryApi &ev, std::vector<BM> anim, SH sh) : sp(ev.sprite_api), matrix_api(ev.matrix_api), shader_api(ev.shader_api), bm(anim), sh(sh)
4976 {
4977 pos_x = 0.0; pos_y = 0.0;
4978 mult_x = 1.0; mult_y = 1.0;
4979 anim_id = 0;
4980 m = matrix_api.identity();
4981 prepared=false;
4982 }
4983 void prepare(bool keep=false)
4984 {
4985 va.clear();
4986 for(int i=0;i<(int)bm.size();i++)
4987 va.push_back(sp.create_vertex_array(bm[i]));
4988 prepared=true;
4989 }
4990 void render()
4991 {
4992 if (prepared)
4993 {
4994 shader_api.set_var(sh, "in_MV", matrix_api.mult(m,matrix_api.mult(matrix_api.scale(mult_x, mult_y, 1.0), matrix_api.trans(pos_x+0.5, pos_y+0.5, 0.0))));
4995 sp.render_sprite_vertex_array(va[anim_id]);
4996 }
4997 //sp.rendersprite(bm[anim_id], sh, pos_x, pos_y, mult_x, mult_y);
4998 }
4999 void set_pos(float p_x, float p_y) { pos_x=p_x; pos_y=p_y; }
5000 void set_scale(float m_x, float m_y) { mult_x = m_x; mult_y=m_y; }
5001 void set_matrix(M m1) { m = m1; }
5002 void set_anim_frame(int id)
5003 {
5004 if (id>=0 && id<(int)bm.size())
5005 anim_id = id;
5006 }
5007 void set_var(std::string name, float r, float g, float b, float a)
5008 {
5009 shader_api.set_var(sh, name.c_str(), r,g,b,a);
5010 }
5011 private:
5012 float pos_x, pos_y;
5013 float mult_x, mult_y;
5014 SpriteApi &sp;
5015 MatrixApi &matrix_api;
5016 ShaderApi &shader_api;
5017 std::vector<BM> bm;
5018 std::vector<VA> va;
5019 M m;
5020 int anim_id;
5021 SH sh;
5022 bool prepared;
5023 };
5025 {
5026 public:
5027 SpriteWorldObj(EveryApi &ev, std::function<BM(int)> f, int numvalues, BM int_bm, int dx, int dy, SH sh) : bmapi(ev.bitmap_api), sp(ev.sprite_api), matrix_api(ev.matrix_api), shader_api(ev.shader_api), sh(sh), f(f), numvalues(numvalues), int_bm(int_bm), dx(dx), dy(dy)
5028 {
5029 m_t = 0;
5030 m_l = 0;
5031 m_width = bmapi.size_x(int_bm);
5032 m_height = bmapi.size_y(int_bm);
5033 mult_x = 1.0;
5034 mult_y = 1.0;
5035 bitmap = new int[m_width*m_height];
5036 for(int y=0;y<m_height;y++)
5037 for(int x=0;x<m_width;x++)
5038 {
5039 bitmap[x+y*m_width] = bmapi.intvalue(int_bm, x,y);
5040 }
5041 }
5042 ~SpriteWorldObj() { delete [] bitmap; }
5043 void set_block(int x, int y, int c)
5044 {
5045 if (x>=0&&x<m_width)
5046 if (y>=0&&y<m_height)
5047 bitmap[x+y*m_width] = c;
5048 }
5049 int read_block(int x, int y)
5050 {
5051 if (x>=0&&x<m_width)
5052 if (y>=0&&y<m_height)
5053 return bitmap[x+y*m_width];
5054 return 0;
5055 }
5056 void set_range(int l, int t, int width, int height)
5057 {
5058 m_l = l;
5059 m_t = t;
5060 m_width = width;
5061 m_height = height;
5062 }
5063 void prepare(bool keep=false)
5064 {
5065 va.clear();
5066 for(int i=0;i<(int)numvalues;i++)
5067 va.push_back(sp.create_vertex_array(f(i)));
5068 prepared=true;
5069 }
5070 void render()
5071 {
5072 if (prepared)
5073 {
5074 M m = matrix_api.mult(matrix_api.scale(mult_x, mult_y, 1.0), matrix_api.trans(pos_x, pos_y, 0.0));
5075 for(int y=m_t;y<m_height;y++)
5076 for(int x=m_l;x<m_width;x++)
5077 {
5078 M m2 = matrix_api.mult(matrix_api.trans(x*dx+0.5, y*dy+0.5, 0.0),m);
5079 shader_api.set_var(sh, "in_MV", m2);
5080 int index = bitmap[x+y*m_width]; //bmapi.intvalue(int_bm, x,y);
5081 sp.render_sprite_vertex_array(va[index]);
5082 }
5083 }
5084 //sp.rendersprite(bm[anim_id], sh, pos_x, pos_y, mult_x, mult_y);
5085 }
5086 void set_pos(float p_x, float p_y) { pos_x=p_x; pos_y=p_y; }
5087 void set_scale(float m_x, float m_y) { mult_x = m_x; mult_y=m_y; }
5088 int get_pos_x(float mouse_x) const
5089 {
5090 mouse_x-=pos_x;
5091 mouse_x/=mult_x;
5092 mouse_x/=dx;
5093 return (int)mouse_x;
5094 }
5095 int get_pos_y(float mouse_y) const
5096 {
5097 mouse_y-=pos_y;
5098 mouse_y/=mult_y;
5099 mouse_y/=dy;
5100 return (int)mouse_y;
5101 }
5102 void set_var(std::string name, float r, float g, float b, float a)
5103 {
5104 shader_api.set_var(sh, name.c_str(), r,g,b,a);
5105 }
5106 private:
5107 BitmapApi &bmapi;
5108 SpriteApi &sp;
5109 MatrixApi &matrix_api;
5110 ShaderApi &shader_api;
5111 SH sh;
5112 std::function<BM(int)> f;
5113 std::vector<VA> va;
5114 int *bitmap;
5115 int numvalues;
5116 BM int_bm;
5117 float dx,dy;
5118 int m_t, m_l, m_width, m_height;
5119 bool prepared;
5120 float mult_x,mult_y;
5121 float pos_x, pos_y;
5122 };
5123
5124
5126 {
5127 public:
5128 PolygonObj(EveryApi &ev, P p, SH sh) : ev(ev), api(ev.polygon_api), shapi(ev.shader_api), mat(ev.matrix_api), tex(ev.texture_api), sh(sh)
5129 {
5130 m_p.push_back(ev.polygon_arr_api.split_p(ev,p,500000));
5131 id.resize(1);
5132 m_va2.resize(1);
5133 current_pos = mat.identity();
5134 current_scale = mat.identity();
5135 current_rot = mat.identity();
5136 current_rot2 = mat.identity();
5137 setup_m();
5138 //id.id = 0;
5139 //va.id = 0;
5140 anim_id = 0;
5141 anim_time = 0.0;
5142 txa_id.id = 0;
5143 first = true;
5144 }
5145
5146 PolygonObj(EveryApi &ev, std::vector<P> anim_p, SH sh) : ev(ev), api(ev.polygon_api), shapi(ev.shader_api), mat(ev.matrix_api), tex(ev.texture_api), sh(sh)
5147 {
5148 int s = anim_p.size();
5149 for(int i=0;i<s;i++)
5150 {
5151 m_p.push_back(ev.polygon_arr_api.split_p(ev,anim_p[i],500000));
5152 }
5153 id.resize(anim_p.size());
5154 m_va2.resize(anim_p.size());
5155 current_pos = mat.identity();
5156 current_scale = mat.identity();
5157 current_rot = mat.identity();
5158 current_rot2 = mat.identity();
5159 setup_m();
5160 //id.id = 0;
5161 //va.id = 0;
5162 anim_id = 0;
5163 anim_time = 0.0;
5164 first = true;
5165 }
5166#if 0
5167 PolygonObj(PolygonApi &api, ShaderApi &shapi, MatrixApi &mat, TextureApi &tex,P p, SH sh) : api(api), shapi(shapi), mat(mat), tex(tex), sh(sh)
5168 {
5169 m_p.push_back(p);
5170 id.resize(1);
5171 m_va2.resize(1);
5172 current_pos = mat.identity();
5173 current_scale = mat.identity();
5174 current_rot = mat.identity();
5175 current_rot2 = mat.identity();
5176 setup_m();
5177 //id.id=0;
5178 //va.id =0;
5179 anim_id = 0;
5180 anim_time = 0.0;
5181 first = true;
5182 }
5183#endif
5185 int s = va_mem.size();
5186 for(int i=0;i<s;i++)
5187 {
5188 ev.polygon_arr_api.delete_vertex_array(ev,va_mem[i]);
5189 }
5190 }
5191 void prepare(bool keep=false)
5192 {
5193 m_va2.clear();
5194 for(int i=0;i<(int)m_p.size();i++)
5195 {
5196 Va va = ev.polygon_arr_api.create_vertex_array(ev,m_p[i], id[i].id!=0||keep);
5197 va_mem.push_back(va);
5198 Va va2;
5199#ifdef TODO
5200 if (id[i].id!=0) {
5201 va2 = tex.bind(va, id[i]);
5202 } else {
5203 if (txa_id.id!=0) {
5204 va2 = tex.bind_arr(va, txa_id);
5205 }
5206 else
5207#endif
5208 va2 = va;
5209#ifdef TODO
5210 }
5211#endif
5212 m_va2.push_back(va2);
5213 }
5214 }
5215 void render() {
5216 shapi.use(sh);
5217 shapi.set_var(sh, "in_MV", m);
5218 shapi.set_var(sh, "in_N", normal_matrix);
5219 //shapi.set_var(sh, "in_T", m2);
5220 shapi.set_var(sh, "in_POS", anim_time);
5221 ev.polygon_arr_api.render_vertex_array(ev,m_va2[anim_id]);
5222 shapi.set_var(sh, "in_POS", 0.0f);
5223 }
5225 shapi.use(sh);
5226 shapi.set_var(sh, "in_MV", m);
5227 shapi.set_var(sh, "in_N", normal_matrix);
5228 //shapi.set_var(sh, "in_T", m2);
5229 shapi.set_var(sh, "in_POS", anim_time);
5230 if (first)
5231 {
5232 ev.polygon_arr_api.prepare_vertex_array_instanced(ev,shapi, m_va2[anim_id], pta,sh);
5233 first = false;
5234 }
5235 ev.polygon_arr_api.render_vertex_array_instanced(ev,shapi, m_va2[anim_id], pta, sh);
5236 shapi.set_var(sh, "in_POS", 0.0f);
5237 }
5238 void set_pos(float pos_x, float pos_y, float pos_z)
5239 {
5240 current_pos = mat.trans(pos_x, pos_y, pos_z);
5241 setup_m();
5242 }
5243 void set_scale(float mult_x, float mult_y, float mult_z)
5244 {
5245 current_scale = mat.scale(mult_x, mult_y, mult_z);
5246 setup_m();
5247 }
5248 void set_rotation_y(float angle)
5249 {
5250 current_rot = mat.yrot(angle);
5251 setup_m();
5252 }
5254 {
5255 current_rot = m;
5256 setup_m();
5257 }
5259 {
5260 current_rot2 = m;
5261 setup_m();
5262 }
5263 void bind_texture(int anim_id, TXID id_)
5264 {
5265 id[anim_id] = id_;
5266 }
5268 {
5269 txa_id = id;
5270 }
5271 void set_anim_frame(int id)
5272 {
5273 if (id>=0&&id<(int)m_va2.size())
5274 anim_id = id;
5275 }
5276 void set_anim_time(float time)
5277 {
5278 anim_time = time;
5279 }
5280#if 0
5281 void explode(PT pos, float val)
5282 {
5283 api.explode(m_va2[anim_id], pos, val);
5284 api.update(m_va2[anim_id]);
5285 }
5286#endif
5287 void set_var(std::string name, float r, float g, float b, float a)
5288 {
5289 shapi.set_var(sh, name.c_str(), r,g,b,a);
5290 }
5291 private:
5292 void setup_m() {
5293 m = mat.mult(mat.mult(mat.mult(current_rot,current_scale), current_pos), current_rot2);
5294 normal_matrix = mat.keep_rotation(m);
5295 //m2 = mat.mult(mat.mult(current_rot, current_scale), current_rot2);
5296 }
5297 private:
5298 EveryApi &ev;
5299 PolygonApi &api;
5300 ShaderApi &shapi;
5301 MatrixApi &mat;
5302 TextureApi &tex;
5303 M current_pos;
5304 M current_scale;
5305 M current_rot;
5306 M current_rot2;
5307 M m;
5308 M normal_matrix;
5309 M m2;
5310 std::vector<Pa> m_p;
5311 SH sh;
5312 //VA va;
5313 std::vector<Va> m_va2;
5314 std::vector<Va> va_mem;
5315 std::vector<TXID> id;
5316 TXA txa_id;
5317 int anim_id;
5318 float anim_time;
5319 bool first;
5320 };
5321
5323 {
5324 public:
5325 WorldObj(EveryApi &ev, std::function<P(int)> f, int numvalues, BM bm, float dx, float dy, SH sh) : ev(ev), bmapi(ev.bitmap_api), api(ev.polygon_api), shapi(ev.shader_api), mat(ev.matrix_api), tex(ev.texture_api), pts(ev.point_api), numvalues(numvalues), bm(bm), f(f), dx(dx), dy(dy), sh(sh)
5326 {
5327 int sx = bmapi.size_x(bm);
5328 int sy = bmapi.size_y(bm);
5329 bitmap = new int[sx*sy];
5330 var_bitmap = new std::vector<Var>[sx*sy];
5331 outline_bitmap = new bool[sx*sy];
5332 anim_time = new float[sx*sy];
5333 for(int y=0;y<sy;y++)
5334 {
5335 for(int x=0;x<sx;x++)
5336 {
5337 int val = bmapi.intvalue(bm, x,y);
5338 bitmap[x+y*sx] = val;
5339 var_bitmap[x+y*sx] = std::vector<Var>();
5340 outline_bitmap[x+y*sx] = false;
5341 anim_time[x+y*sx] = 0.0f;
5342 }
5343 }
5344
5345 m_x = 0;
5346 m_y = 0;
5347 m_sx = sx;
5348 m_sy = sy;
5349
5350
5351 id.resize(numvalues);
5352 current_pos = mat.identity();
5353 current_scale = mat.identity();
5354 current_rot = mat.identity();
5355 current_rot2 = mat.identity();
5356 setup_m();
5357 //id.id = 0;
5358 //va.id = 0;
5359 anim_id = 0;
5360 txa_id.id = 0;
5361 }
5362 ~WorldObj() { delete [] bitmap; }
5363 void set_block(int x, int y, int c) {
5364 int sx=m_sx; //bmapi.size_x(bm);
5365 bitmap[x+y*sx] = c;
5366 }
5367 int read_block(int x, int y) const {
5368 int sx=m_sx; //bmapi.size_x(bm);
5369 return bitmap[x+y*sx];
5370 }
5371 void set_anim_time(int x, int y, float time)
5372 {
5373 int sx = m_sx; //bmapi.size_x(bm);
5374 anim_time[x+y*sx] = time;
5375 }
5376 void prepare(bool keep=false)
5377 {
5378 m_va2.clear();
5379 for(int i=0;i<numvalues;i++)
5380 {
5381 P p = f(i);
5382 VA va = api.create_vertex_array(p);
5383 VA va2;
5384 if (id[i].id!=0) {
5385 va2 = tex.bind(va, id[i]);
5386 } else {
5387 if (txa_id.id!=0)
5388 {
5389 va2 = tex.bind_arr(va, txa_id);
5390 }
5391 else
5392 va2 = va;
5393 }
5394 m_va2[i] = va2;
5395 }
5396 }
5397 void set_range(int x, int y, int sx, int sy)
5398 {
5399 m_x = x;
5400 m_y = y;
5401 m_sx = sx;
5402 m_sy = sy;
5403 }
5405 std::vector<P> vec2;
5406 int sx = m_sx; //bmapi.size_x(bm);
5407 for(int y=m_y;y<m_y+m_sy;y++) {
5408 std::vector<P> vec1;
5409 for(int x=m_x;x<m_x+m_sx;x++) {
5410 P p = f(bitmap[x+y*sx]);
5411 P p2 = api.translate(p, dx*x,0.0,dy*y);
5412 vec1.push_back(p2);
5413 }
5414 vec2.push_back(api.or_array(&vec1[0], vec1.size()));
5415 }
5416 return api.or_array(&vec2[0], vec2.size());
5417 }
5418 void render_outline(SH sh_new)
5419 {
5420#ifndef EMSCRIPTEN
5421 SH sh2 = sh;
5422 ev.mainloop_api.outline_first();
5423 render();
5424 sh = sh_new;
5425 ev.mainloop_api.outline_second();
5426 render();
5427 ev.mainloop_api.outline_first();
5428 render();
5429 sh = sh2;
5430 ev.mainloop_api.outline_third();
5431 //render();
5432 ev.mainloop_api.outline_disable();
5433#else
5434 render();
5435#endif
5436 }
5437 void render() {
5438 shapi.use(sh);
5439 int sx = m_sx; //bmapi.size_x(bm);
5440 for(int y=m_y;y<m_y+m_sy;y++) {
5441 for(int x=m_x;x<m_x+m_sx;x++) {
5442 M t = mat.trans(dx*x,0.0,dy*y);
5443 M t2 = mat.mult(t,m);
5444 shapi.set_var(sh, "in_MV", t2);
5445 shapi.set_var(sh, "in_POS", anim_time[x+y*sx]);
5446 if (outline_bitmap[x+y*m_sx])
5447 {
5448 shapi.use(m_sh3);
5449 shapi.set_var(m_sh3, "in_MV", t2);
5450 shapi.set_var(m_sh3, "in_POS", anim_time[x+y*sx]);
5451 shapi.use(sh);
5452 }
5453 //std::cout << x << " " << y << " " << anim_time[x+y*sx] << std::endl;
5454 std::vector<Var> &v = var_bitmap[x+y*sx];
5455 int s = v.size();
5456 for(int i=0;i<s;i++)
5457 {
5458 Var &vv = v[i];
5459 shapi.set_var(sh, vv.name.c_str(), vv.r, vv.g, vv.b, vv.a);
5460 //std::cout << i << ":" << vv.name << " " << vv.r << " " << vv.g << " " << vv.b <<" " << vv.a << std::endl;
5461 if (outline_bitmap[x+y*m_sx])
5462 {
5463 shapi.use(m_sh3);
5464 shapi.set_var(m_sh3, vv.name.c_str(), vv.r, vv.g, vv.b, vv.a);
5465 shapi.use(sh);
5466 }
5467
5468 }
5469
5470 if (outline_bitmap[x+y*m_sx])
5471 render_one_outline(x,y,m_sh3);
5472 else
5473 render_one(x,y);
5474 //api.render_vertex_array(m_va2[bitmap[x+y*sx]]);
5475 shapi.set_var(sh, "in_POS", 0.0f);
5476 }
5477 }
5478 }
5479 private:
5480 void render_one(int x, int y)
5481 {
5482 api.render_vertex_array(m_va2[bitmap[x+y*m_sx]]);
5483 }
5484 void render_one_outline(int x, int y, SH sh_new)
5485 {
5486#ifndef EMSCRIPTEN
5487 ev.mainloop_api.outline_first();
5488 render_one(x,y);
5489 ev.shader_api.use(sh_new);
5490 ev.mainloop_api.outline_second();
5491 render_one(x,y);
5492 ev.shader_api.use(sh);
5493 ev.mainloop_api.outline_third();
5494 ev.mainloop_api.outline_disable();
5495#else
5496 render_one(x,y);
5497#endif
5498 }
5499 public:
5500 void set_pos(float pos_x, float pos_y, float pos_z)
5501 {
5502 current_pos = mat.trans(pos_x, pos_y, pos_z);
5503 setup_m();
5504 }
5505 void set_scale(float mult_x, float mult_y, float mult_z)
5506 {
5507 current_scale = mat.scale(mult_x, mult_y, mult_z);
5508 setup_m();
5509 }
5510 void set_rotation_y(float angle)
5511 {
5512 current_rot = mat.yrot(angle);
5513 setup_m();
5514 }
5516 {
5517 current_rot = m;
5518 setup_m();
5519 }
5521 {
5522 current_rot2 = m;
5523 setup_m();
5524 }
5525 void bind_texture(int num_id, TXID id_)
5526 {
5527 id[num_id] = id_;
5528 }
5530 {
5531 txa_id = id;
5532 }
5533 void set_anim_frame(int id)
5534 {
5535 if (id>=0&&id<(int)m_va2.size())
5536 anim_id = id;
5537 }
5538 void pick_object1(float x, float y, float &xx, float &yy, float &zz)
5539 {
5540 PT point = pts.point(x,y,0.0f);
5541
5542 PinOut<M> mp = shapi.get_matrix_var(sh, "in_P");
5543 M m3 = mat.inverse(mp.data);
5544 PT point1 = mat.mult(point, m3);
5545
5546 PinOut<M> mp2 = shapi.get_matrix_var(sh, "in_T");
5547 M m4 = mat.inverse(mp2.data);
5548 PT point2 = mat.mult(point1, m4);
5549
5550 M m2 = mat.inverse(m);
5551 PT point3 = mat.mult(point2, m2);
5552
5553 xx = pts.pt_x(point3);
5554 yy = pts.pt_y(point3);
5555 zz = pts.pt_z(point3);
5556
5557 }
5558 bool pick_object2(float mouse_x, float mouse_y, float radius, int scr_x, int scr_y, M in_P, int x, int y)
5559 {
5560 float pos_x = dx*x + radius/2;
5561 float pos_y = 0.0;
5562 float pos_z = dy*y + radius/2;
5563 BB area = ev.picking_api.pick_area(ev, mouse_x, mouse_y, radius, scr_x, scr_y);
5564 O vol = ev.picking_api.pick_volume(in_P, area);
5565 bool b = ev.picking_api.picked(vol, pos_x, pos_y, pos_z);
5566 return b;
5567 }
5568 void set_var(std::string name, float r, float g, float b, float a)
5569 {
5570 shapi.set_var(sh, name.c_str(), r,g,b,a);
5571 }
5572 struct Var
5573 {
5574 std::string name;
5575 float r,g,b,a;
5576 };
5577 void clear_child_var(int x, int y)
5578 {
5579 var_bitmap[x+y*m_sx]=std::vector<Var>();
5580 }
5581 void set_child_var(int x, int y, std::string name, float r, float g, float b, float a)
5582 {
5583 Var v;
5584 v.name = name;
5585 v.r = r;
5586 v.g = g;
5587 v.b = b;
5588 v.a = a;
5589 var_bitmap[x+y*m_sx].push_back(v);
5590 }
5591 void set_outline(int x, int y, bool b, SH sh3)
5592 {
5593 m_sh3 = sh3;
5594 outline_bitmap[x+y*m_sx] = b;
5595 }
5596 private:
5597 void setup_m() {
5598 m = mat.mult(mat.mult(mat.mult(current_rot,current_scale), current_pos), current_rot2);
5599 }
5600
5601 private:
5602 EveryApi &ev;
5603 BitmapApi &bmapi;
5604 PolygonApi &api;
5605 ShaderApi &shapi;
5606 MatrixApi &mat;
5607 TextureApi &tex;
5608 PointApi &pts;
5609 M current_pos;
5610 M current_scale;
5611 M current_rot;
5612 M current_rot2;
5613 M m;
5614 //std::vector<P> m_p;
5615 int numvalues;
5616 BM bm;
5617 std::function<P(int)> f;
5618 float dx,dy;
5619 int *bitmap;
5620 std::vector<Var> *var_bitmap;
5621 bool *outline_bitmap;
5622 float *anim_time;
5623 SH sh;
5624 SH m_sh3;
5625 int m_x, m_y, m_sx, m_sy;
5626 //VA va;
5627 //std::vector<VA> m_va2;
5628 std::map<int, VA> m_va2;
5629 std::vector<TXID> id;
5630 TXA txa_id;
5631 int anim_id;
5632 };
5633
5635 {
5636 public:
5637 PointsObj(EveryApi &ev, PTS fo, SH sh, P pp, float mix) : points_api(ev.points_api), mat(ev.matrix_api), shapi(ev.shader_api), fo(fo), sh(sh),pp(pp),mix(mix)
5638 {
5639 numpoints = 5000;
5640 start_x = -1.0;
5641 start_y = -1.0;
5642 start_z = -1.0;
5643 end_x = 1.0;
5644 end_y = 1.0;
5645 end_z = 1.0;
5646 current_pos = mat.identity();
5647 current_scale = mat.identity();
5648 current_rot = mat.identity();
5649 setup_m();
5650 }
5651 void set_numpoints(int count) { numpoints = count; }
5652 void set_bounds(float s_x, float s_y, float s_z,
5653 float e_x, float e_y, float e_z)
5654 {
5655 start_x = s_x;
5656 start_y = s_y;
5657 start_z = s_z;
5658 end_x = e_x;
5659 end_y = e_y;
5660 end_z = e_z;
5661 }
5662 void prepare(bool keep=false) {
5663 array = points_api.prepare(fo,false);
5664 //array = floatvolume.prepare(fo, numpoints, start_x, start_y, start_z, end_x, end_y, end_z);
5665 }
5666 void render() {
5667 shapi.use(sh);
5668 shapi.set_var(sh, "in_MV", m);
5669 points_api.render(array);
5670 //floatvolume.render(array);
5671 }
5672 void set_pos(float pos_x, float pos_y, float pos_z)
5673 {
5674 current_pos = mat.trans(pos_x, pos_y, pos_z);
5675 setup_m();
5676 }
5677 void set_scale(float mult_x, float mult_y, float mult_z)
5678 {
5679 current_scale = mat.scale(mult_x, mult_y, mult_z);
5680 setup_m();
5681 }
5683 {
5684 current_rot = m;
5685 setup_m();
5686 }
5688 void set_var(std::string name, float r, float g, float b, float a)
5689 {
5690 shapi.set_var(sh, name.c_str(), r,g,b,a);
5691 }
5692 private:
5693 void setup_m() {
5694 m = mat.mult(current_rot, mat.mult(current_scale, current_pos));
5695 }
5696
5697 private:
5698 PointsApi &points_api;
5699 MatrixApi &mat;
5700 ShaderApi &shapi;
5701 PTS fo;
5702 //PTS fo2;
5703 PTA array;
5704 SH sh;
5705 M current_pos;
5706 M current_scale;
5707 M current_rot;
5708 M m;
5709 int numpoints;
5710 float start_x, start_y, start_z;
5711 float end_x, end_y, end_z;
5712 P pp;
5713 float mix;
5714 };
5716 {
5717 public:
5718 LinesObj(EveryApi &ev, LI li, SH sh) : lines(ev.lines_api), mat(ev.matrix_api), shapi(ev.shader_api), li(li), sh(sh)
5719 {
5720 current_pos = mat.identity();
5721 current_scale = mat.identity();
5722 current_rot = mat.identity();
5723 current_rot2 = mat.identity();
5724 setup_m();
5725 }
5726 //LinesObj(LinesApi &lines, MatrixApi &mat, ShaderApi &shapi, LI li, SH sh) : lines(lines), mat(mat), shapi(shapi), li(li), sh(sh) { }
5727 void prepare(bool keep=false) { li2 = lines.prepare(li); }
5728 void render() {
5729 shapi.use(sh);
5730 shapi.set_var(sh, "in_MV", m);
5731 lines.render(li2);
5732 }
5733 void set_pos(float pos_x, float pos_y, float pos_z)
5734 {
5735 current_pos = mat.trans(pos_x, pos_y, pos_z);
5736 setup_m();
5737 }
5738 void set_scale(float mult_x, float mult_y, float mult_z)
5739 {
5740 current_scale = mat.scale(mult_x, mult_y, mult_z);
5741 setup_m();
5742 }
5744 {
5745 current_rot = m;
5746 setup_m();
5747 }
5749 {
5750 current_rot2 = m;
5751 setup_m();
5752 }
5753 void set_var(std::string name, float r, float g, float b, float a)
5754 {
5755 shapi.set_var(sh, name.c_str(), r,g,b,a);
5756 }
5757 private:
5758 void setup_m() {
5759 m = mat.mult(mat.mult(current_rot, mat.mult(current_scale, current_pos)),current_rot2);
5760 }
5761 private:
5762 LinesApi &lines;
5763 MatrixApi &mat;
5764 ShaderApi &shapi;
5765 LI li;
5766 SH sh;
5767 LLA li2;
5768 M current_pos;
5769 M current_scale;
5770 M current_rot;
5771 M current_rot2;
5772 M m;
5773 };
5774
5775 void append_url_map(const char* url, const unsigned char* data, const unsigned char *data_end);
5776
5777}; // GameApi namespace
5778
5779#endif
char world[]
Definition test.cpp:7
char chars[]
Definition test.cpp:102
struct Envi env
P blocks(int c, EveryApi &ev)
Definition test.cpp:19
ML mainloop(EveryApi &ev, MN &move)
Definition test.cpp:851
Env e
Definition Common.cc:2
EveryApi ev(e)
Color2 colors[]
Definition Effect.cc:56
Point2d pt(const FT_Vector *v)
Definition FreeType2.cc:459
void matrix(BoxableFaceCollection &coll, Matrix m, FaceStore &s)
Definition Functions.cc:56
BirdNode n_0
Definition GameApi.cc:44227
void print(const VoxFrame &f)
Definition GameApi.cc:22580
GameApi::ML part(GameApi::EveryApi &ev, GameApi::ML ml, float x_trans, float y_rot, int x, int y, int mode=0)
Definition GameApi.cc:38016
BirdNode n_1
Definition GameApi.cc:44228
int score
Definition GameApi.cc:19119
std::string MB(long num)
Definition GameApi.cc:43586
int ELayoutEmpty
Definition GameApi_gui.cc:2662
#define IMPORT
Definition GameApi.hh:332
void clear_block(int id)
Definition GameApi_dep_add_find.cc:114
#define MAC(name)
Definition GameApi.hh:58
int add_block()
Definition GameApi_dep_add_find.cc:33
void set_current_block(int id)
Definition GameApi_dep_add_find.cc:65
int get_current_block()
Definition GameApi_dep_add_find.cc:110
void * process(void *ptr)
Definition GameApi_dep_env.cc:2773
float event_time(Sequencer2 &seq, int e1)
Definition GameApi_ev.cc:54
size dy
Definition GameApi_gui.cc:1727
EditorGuiWidgetAtlas GuiWidgetForward render()
Definition GameApi_gui.cc:1412
unsigned int Low_GLuint
Definition GameApi_low.hh:42
float delta_time
Definition GameApi_main.cc:967
Complex mul(Complex x, Complex y)
Definition GameApi_pl.cc:31400
std::string cache_id(std::string filename, int obj_count)
Definition GameApi_pl.cc:14795
char * cmds[]
Definition Interpreter.hh:5
float cs(float x, float m)
Definition VectorTools.cc:1167
unsigned int color_1(int pointnum, PT pos)
Definition test.cpp:7
Definition test.cpp:3163
Definition EffectI.hh:22
Definition Effect.hh:10323
Definition GameApi_wmod.cc:1144
Definition GraphI.hh:690
Definition GameApi.hh:1377
IMPORT IS seq_line(IS *array, int size)
Definition GameApi_an.cc:200
IMPORT P timeline_obj(IS i, int choose_par, float time)
IMPORT PT timed_value_point(IS i, float time)
Definition GameApi_an.cc:263
IMPORT P timeline_obj(IS i, float time)
IMPORT IS repeat(IS i, int count)
Definition GameApi_an.cc:209
IMPORT AnimApi(Env &e)
Definition GameApi_bm.cc:35
IMPORT IS single(int val, float duration)
Definition GameApi_bm.cc:1663
IMPORT IS par_line(IS *array, int arraysize)
IMPORT IS line_obj(P p, P p2, float duration)
IMPORT int timed_value_repeat_num(IS i, float time)
Definition GameApi_an.cc:227
IMPORT float timeline_float(IS i, int choose_par, float time)
IMPORT ~AnimApi()
Definition GameApi_bm.cc:39
IMPORT int timed_value(IS i, float time)
Definition GameApi_an.cc:252
IMPORT float timed_value_float(IS i, float time)
Definition GameApi_an.cc:274
IMPORT IS line(int val1, int val2, float duration)
Definition GameApi_an.cc:118
IMPORT IS repeat_infinite(IS i)
Definition GameApi_an.cc:218
IMPORT int timeline_int(IS l, int choose_par, float time)
IMPORT PT timeline_point(IS l, int choose_par, float time)
IMPORT ArrayApi(Env &e)
Definition GameApi.cc:44483
A< T > array(std::vector< T > vec)
Definition GameApi_h.hh:1593
void prepare(bool keep=false)
Definition GameApi.hh:4800
void set_rotation_matrix(M m)
Definition GameApi.hh:4906
M rot_x(float c_x, float c_y, float c_z, float angle)
Definition GameApi.hh:4844
void set_pos(float pos_x, float pos_y, float pos_z)
Definition GameApi.hh:4892
M rot_y(float c_x, float c_y, float c_z, float angle)
Definition GameApi.hh:4835
ArrayObj3d(EveryApi &ev)
Definition GameApi.hh:4783
void set_child_scale(int i, float mult_x, float mult_y, float mult_z)
Definition GameApi.hh:4828
M rot_z(float c_x, float c_y, float c_z, float angle)
Definition GameApi.hh:4853
void set_var(std::string name, float r, float g, float b, float a)
Definition GameApi.hh:4875
void set_rotation_matrix2(M m)
Definition GameApi.hh:4911
int size() const
Definition GameApi.hh:4819
void push_back(RenderObject *obj, MoveScaleObject3d *obj2)
Definition GameApi.hh:4788
void set_child_shader_var(int i, std::string name, float r, float g, float b, float a)
Definition GameApi.hh:4884
void set_child_rot_matrix(int i, M m)
Definition GameApi.hh:4863
void render()
Definition GameApi.hh:4806
void set_child_pos(int i, float cpos_x, float cpos_y, float cpos_z)
Definition GameApi.hh:4821
void set_scale(float mult_x, float mult_y, float mult_z)
Definition GameApi.hh:4899
Definition GameApi.hh:1082
IMPORT BM world_from_bitmap(std::function< BM(int)> f, BM int_bm, int dx, int dy)
Definition GameApi_bm.cc:1839
IMPORT BM plus_bitmap(BM bm, BM bm2)
Definition GameApi_bm.cc:4753
IMPORT BB isoline_render(EveryApi &ev, FB bm, float start_range, float end_range, float delta_range, int num)
Definition GameApi_bm.cc:9858
IMPORT ML txidarray_from_heavy(EveryApi &ev, H heavy, std::vector< TXID > *vec, ML ml, int start_range, int end_range, int heavycount)
Definition GameApi.cc:37679
IMPORT BM loadbitmapfromurl(std::string url)
Definition GameApi_gltf.cc:2704
IMPORT BM fix_edges(BM bm)
Definition GameApi_bm.cc:4435
IMPORT void load_png_from_temp(std::string filename, void(*fptr)(void *), void *data, bool &success)
Definition GameApi.cc:31951
IMPORT BM interpolate_bitmap(BM orig1, BM orig2, float x)
Definition GameApi_bm.cc:1556
IMPORT BM flip_x(BM orig)
Definition GameApi_bm.cc:1767
IMPORT BM repeat_bitmap(BM orig, int xcount, int ycount)
Definition GameApi_bm.cc:1795
IMPORT void save_png(BM bm, std::string filename)
Definition GameApi_bm.cc:4330
IMPORT BB choose_color(BM bm, unsigned int c1, unsigned int c2)
Definition GameApi_bm.cc:5472
IMPORT int size_x(BM bm)
Definition GameApi_bm.cc:1481
IMPORT H bitmap_prepare_heavy(EveryApi &ev, H bitmap_gen, int scanlines_per_slot)
Definition GameApi.cc:37421
IMPORT BM flip_y(BM orig)
Definition GameApi_bm.cc:1776
IMPORT BM scale_bitmap_fullscreen(EveryApi &ev, BM orig)
Definition GameApi_bm.cc:167
IMPORT FB radial_fb(int sx, int sy, float x, float y, float r, float val_at_zero, float val_at_r)
Definition GameApi_bm.cc:4827
IMPORT void load_png_from_temp3(std::string filename)
Definition GameApi.cc:31964
IMPORT BM persistent_cache(BM orig, std::string filename)
Definition GameApi_bm.cc:3779
IMPORT BB range_choose(FB bm, float start_range, float end_range)
Definition GameApi_bm.cc:9578
IMPORT IBM create_ibm(std::vector< BB > vec)
Definition GameApi_bm.cc:5313
IMPORT TXID video_source(std::string filename, int sx, int sy)
IMPORT ML vertical_bitmap_display(EveryApi &ev, std::vector< BM > vec, float y_delta)
Definition GameApi_bm.cc:9239
IMPORT BM color_bm(BM bm, unsigned int color)
Definition GameApi_bm.cc:5400
IMPORT SP space(BM bm)
IMPORT IBM intbitmap_loader(std::string url)
Definition GameApi_bm.cc:4674
IMPORT IBM convert_fb_to_ibm_bitmap(FB fb, float start, float d)
Definition GameApi_bm.cc:4538
IMPORT BM anim_array(BM *array, int size)
Definition GameApi_bm.cc:1637
IMPORT BM Indicator(int sx, int sy, int g_ind)
Definition GameApi_bm.cc:4321
IMPORT unsigned int colorvalue(BM bm, int x, int y)
Definition GameApi_bm.cc:1540
IMPORT H network_heavy(std::string url, std::string homepageurl, H timing_heavy)
Definition GameApi.cc:37416
IMPORT FB mul_fb(FB f, float mul)
Definition GameApi_bm.cc:4910
IMPORT BM scale_bitmap(EveryApi &ev, BM orig, int sx, int sy)
Definition GameApi_bm.cc:160
IMPORT BMA array(BM *array, int size)
Definition GameApi_bm.cc:130
IMPORT BM mandelbrot(bool julia, float start_x, float end_x, float start_y, float end_y, float xx, float yy, int sx, int sy, int count)
Definition GameApi_bm.cc:560
IMPORT H thread_heavy(H threaded)
Definition GameApi.cc:37410
IMPORT H png_heavy2(EveryApi &ev, H net, std::string url, int texture_unit, int sx, int sy)
Definition GameApi.cc:37394
IMPORT CBM scale_bitmap2(BM bm)
IMPORT BM intbitmap_bm(IBM ibm)
Definition GameApi_bm.cc:4708
IMPORT BM sample_bitmap(BM orig, float xmult, float ymult, float x, float y)
IMPORT TXID dyn_fetch_bitmap(EveryApi &ev, std::string url, int time, int texture_unit)
Definition GameApi.cc:37706
IMPORT bool ready_to_prepare(BM bm)
Definition GameApi_bm.cc:1450
IMPORT BM median_filter(BM bm, int sx, int sy)
Definition GameApi_bm.cc:5550
IMPORT FB flood_fill(FB fb, float percentage, int x, int y, bool inv)
Definition GameApi_bm.cc:6950
IMPORT ML gif_anim(EveryApi &ev, ML ml3, int key, float time_delta, int num, std::string filename, int delay)
Definition GameApi_bm.cc:7153
IMPORT BM newcolorbitmap(char *array, int sz, int sy, std::function< unsigned int(char)> f)
Definition GameApi_bm.cc:1619
IMPORT BM avg(BM bm1, BM bm2)
Definition GameApi_bm.cc:4420
IMPORT IBM random_int_bitmap(int sx, int sy, int min_value, int max_value)
Definition GameApi.cc:32225
IMPORT FB plus_fb(FB f1, FB f2)
Definition GameApi_bm.cc:4884
IMPORT ML display_bitmaps(EveryApi &ev, std::vector< BM > vec, float start_time, float delta_time)
Definition GameApi_bm.cc:9324
IMPORT BM flood_fill_color(EveryApi &ev, BM bm, float percentage, int x, int y, unsigned int color)
Definition GameApi_bm.cc:6957
IMPORT BM alt(std::vector< BM > vec, int index)
Definition GameApi_bm.cc:3604
IMPORT BM mandelbrot2(bool julia, float start_x, float end_x, float start_y, float end_y, float xx, float yy, int sx, int sy, int count)
Definition GameApi_bm.cc:584
IMPORT VX convert_ibm_to_vx(IBM bm)
Definition GameApi_bm.cc:4573
IMPORT BM newbitmap_bb(BB bb, unsigned int color)
Definition GameApi_bm.cc:413
IMPORT ML write_gif_anim(std::vector< BM > vec, std::string filename, int delay)
Definition GameApi_bm.cc:7137
IMPORT BM alpha_color(BM orig, unsigned int color_key)
Definition GameApi_bm.cc:190
IMPORT ARR cubemap(BM bm)
Definition GameApi_bm.cc:5052
IMPORT BM newtilebitmap(int sx, int sy, int tile_sx, int tile_sy)
Definition GameApi_bm.cc:608
IMPORT ML save_raw(BM bm, std::string filename)
Definition GameApi_bm.cc:6624
IMPORT void savebitmap(BM orig, std::string filename, bool alpha=false)
Definition GameApi_bm.cc:622
IMPORT BM color_range(BM orig, unsigned int source_upper, unsigned int source_lower, unsigned int target_upper, unsigned int target_lower)
Definition GameApi_bm.cc:228
IMPORT BM memoize_all(BM orig)
Definition GameApi_bm.cc:516
IMPORT BitmapApi(Env &e)
Definition GameApi_bm.cc:27
IMPORT H timing_heavy(int num_frames)
Definition GameApi.cc:37377
IMPORT H progressive_heavy(EveryApi &ev, std::string url, std::string url2)
IMPORT FB sin_fb(FB gradient)
Definition GameApi_bm.cc:4854
IMPORT BM blitbitmap_fb(BM bg, BM orig, int x, int y, FB mask)
Definition GameApi_bm.cc:1417
IMPORT BM border(BM, int left, int right, int top, int bottom)
Definition GameApi_bm.cc:3790
IMPORT BM modify_bitmap(BM orig, BM bm, int x, int y)
Definition GameApi_bm.cc:1400
IMPORT BM transform(BM orig, std::function< unsigned int(int, int, unsigned int)> f)
Definition GameApi_bm.cc:480
IMPORT BM compose_x(BM bm1, BM bm2)
Definition GameApi.cc:21042
IMPORT BM stable_diffusion(EveryApi &ev, std::string prompt, std::string filename)
Definition GameApi.cc:31167
IMPORT BM load_png_from_temp2(std::string filename)
Definition GameApi.cc:31955
IMPORT H array_heavy(std::vector< H > vec)
Definition GameApi.cc:37399
IMPORT BM flip_tile_bitmap(BM bm, int sx, int sy, bool is_x)
Definition GameApi_bm.cc:7235
IMPORT BM simple_blur(BM bm, float center, float left, float right, float top, float bottom)
Definition GameApi_bm.cc:3865
IMPORT BM gradient_y(unsigned int color_1, unsigned int color_2, int sx, int sy)
Definition GameApi_bm.cc:322
IMPORT BM rot90(BM orig)
Definition GameApi_bm.cc:1786
IMPORT BM add_shape_border(EveryApi &ev, BM bm, float dist_field_size, float start_range, float end_range, int r, int g, int b, int a, int border_size)
Definition GameApi_bm.cc:3804
IMPORT BM growbitmap(BM small_orig_bitmap, int l, int t, int r, int b)
Definition GameApi_bm.cc:1335
IMPORT BM loadtilebitmap(std::string filename, int tile_sx, int tile_sy)
Definition GameApi_bm.cc:1136
IMPORT BM blitbitmap(BM bg, BM orig, int x, int y)
Definition GameApi_bm.cc:1408
IMPORT BM addsubrects(BM orig)
IMPORT BM bump_map(FB fb, float h)
Definition GameApi_bm.cc:5251
IMPORT BM dup_x(BM orig)
Definition GameApi_bm.cc:1753
IMPORT BM world_from_bitmap2(EveryApi &ev, std::vector< BM > v, std::string filename, std::string chars, int dx, int dy, int sx, int sy)
Definition GameApi_bm.cc:1806
IMPORT BM debug_number(EveryApi &ev, BM bm0, int num, bool disable, std::string url)
Definition GameApi_bm.cc:9397
IMPORT BM radial_gradient(int sx, int sy, PT pos, float r1, float r2, unsigned int color_1, unsigned int color_2)
Definition GameApi_bm.cc:363
IMPORT BM chessboard(int tile_sx, int tile_sy, int count_x, int count_y, unsigned int c1, unsigned int c2)
Definition GameApi_bm.cc:552
IMPORT BMA empty_array()
Definition GameApi_bm.cc:91
IMPORT H mtl_heavy(EveryApi &ev, H net, std::string url_prefix, int texture_unit_delta)
Definition GameApi.cc:37372
IMPORT BM blitbitmap_bb(BM bg, BM orig, int x, int y, BB mask)
Definition GameApi_bm.cc:1428
IMPORT BM loadposbitmap(std::string filename)
Definition GameApi_bm.cc:1156
IMPORT BM newintbitmap(char *array, int sx, int sy, std::function< int(char)> f)
Definition GameApi_bm.cc:1609
IMPORT int intvalue(BM bm, int x, int y)
Definition GameApi_bm.cc:1439
IMPORT BM lightmap_bitmap(int sx, int sy, P faces, P faces2, int face, float light_dir_x, float light_dir_y, float light_dir_z)
Definition GameApi_pl.cc:25840
IMPORT BM gradient(PT pos_1, PT pos_2, unsigned int color_1, unsigned int color_2, int sx, int sy)
Definition GameApi_bm.cc:313
IMPORT H bitmap_heavy(BM bm, H timing)
Definition GameApi.cc:37381
IMPORT TXID dyn_fetch_bitmap2(EveryApi &ev, std::string url, std::string url2, int time, int texture_unit, int sx, int sy, int sx2, int sy2)
Definition GameApi.cc:37686
IMPORT ML savepng_array_ml(EveryApi &ev, std::vector< BM > bms, std::string filename_start, std::string filename_end, bool alpha, float time)
Definition GameApi_bm.cc:714
IMPORT BM memoize(BM orig)
Definition GameApi_bm.cc:509
IMPORT BM circular_gradient(int sx, int sy, unsigned int center_color, unsigned int edge_color)
Definition GameApi_bm.cc:6784
IMPORT ML savebitmap_ml(EveryApi &ev, BM bm, std::string filename, bool alpha, float time)
Definition GameApi_bm.cc:674
IMPORT BM flood_fill_color_inv(EveryApi &ev, BM bm, float percentage, int x, int y, unsigned int color)
Definition GameApi_bm.cc:6966
IMPORT BM scale_to_size(BM bm, int sz)
Definition GameApi_bm.cc:5807
IMPORT ML save_png_ml(EveryApi &ev, BM bm, std::string filename)
Definition GameApi_bm.cc:4386
IMPORT BM newbitmap_bm(BM bm, unsigned int color)
Definition GameApi_bm.cc:394
IMPORT ARR choose_ints(IBM bm, int count)
Definition GameApi_bm.cc:5355
IMPORT BM world_from_bitmap3(EveryApi &ev, std::vector< BM > v, std::string url, std::string chars, int dx, int dy)
Definition GameApi_bm.cc:1944
IMPORT BM bm_cubemap(EveryApi &ev, BM left, BM top, BM middle, BM right, BM back, BM down, int sx, int sy)
Definition GameApi_bm.cc:4973
IMPORT BM bm_png_bm(EveryApi &ev, BM bm, std::string url)
Definition GameApi.cc:31729
IMPORT BM sphere_rays_bitmap(float center_x, float center_y, float center_z, float radius, float delta_alfa, float delta_beta, FS field, int maxiter, float c, int fptr_enum, std::vector< PT > vec, int vec_choose)
Definition GameApi_ff.cc:136
IMPORT BM newbitmap_fb(FB fb, unsigned int color)
Definition GameApi_bm.cc:404
IMPORT ~BitmapApi()
Definition GameApi_bm.cc:31
IMPORT H png_heavy(EveryApi &ev, H data, std::string url, int texture_unit)
Definition GameApi.cc:37389
IMPORT BM loadbitmap(std::string filename)
Definition GameApi_bm.cc:1088
IMPORT BM calculate_baked_light(P p, P p2, BM texture, int count, float light_pos_x, float light_pos_y, float light_pos_z, float shadow_darkness, float softness)
Definition GameApi_bm.cc:5752
IMPORT BM newbitmap(int sx, int sy, unsigned int color=0x00000000)
Definition GameApi_bm.cc:423
IMPORT int size_y(BM bm)
Definition GameApi_bm.cc:1509
IMPORT BM subbitmapimage(BM orig, int r_start_range, int r_end_range, int g_start_range, int g_end_range, int b_start_range, int b_end_range, unsigned int empty_color)
IMPORT std::vector< TXID > dyn_fetch_mtl(EveryApi &ev, std::string mtl_url, ML ml2)
Definition GameApi.cc:37716
IMPORT BM chai_bm(std::string url, int sx, int sy)
IMPORT BM noise_vectors(int sx, int sy)
Definition GameApi_bm.cc:5159
IMPORT BM compose_y(BM bm1, BM bm2)
Definition GameApi.cc:21055
IMPORT BM subbitmap(BM orig, int x, int y, int width, int height)
Definition GameApi_bm.cc:1252
IMPORT BM script_bitmap(std::string url, int sx, int sy)
Definition GameApi_bm.cc:6518
IMPORT BM findtile(BM tile_bitmap, int x, int y)
Definition GameApi_bm.cc:1171
IMPORT ML isoline_render2(EveryApi &ev, FB fb, float pos, float delta_pos, int num)
Definition GameApi_bm.cc:9870
IMPORT ARR choose_neg_zero_positive(EveryApi &ev, FB fb, float pos)
Definition GameApi_bm.cc:9671
IMPORT ML grid_ml(EveryApi &ev, ML next, IBM map, float y, float pos_x, float pos_z, float x_vec_x, float x_vec_z, float z_vec_x, float z_vec_z, int start_x, int start_z, float frame_inc)
Definition GameApi_bm.cc:5984
IMPORT void prepare(BM bm)
Definition GameApi_bm.cc:3723
IMPORT P p_world_from_bitmap(EveryApi &ev, std::vector< P > vec, IBM world, float pos_x, float pos_y, float pos_z, float dx, float dz, float y)
Definition GameApi_bm.cc:6122
IMPORT BM render_volume_object(O o, float start_x, float end_x, float start_y, float end_y, float z, int sx, int sy, float ray_length, int sample_count)
Definition GameApi_bm.cc:9846
IMPORT FB gradient_fb(int sx, int sy, float val, float val2, bool flip)
Definition GameApi_bm.cc:4790
IMPORT BB choose_bool(IBM bm, int val)
Definition GameApi_bm.cc:5349
IMPORT TXID txid_from_heavy(H heavy)
Definition GameApi.cc:37544
IMPORT ML write_gif_anim2(Array< int, int > *vec, std::string filename, int delay)
Definition GameApi_bm.cc:7148
IMPORT BM gray_to_black(BM bm, float val)
Definition GameApi_bm.cc:7002
IMPORT BM conical_gradient(int sx, int sy, float x, float y, float angle1, float angle2, unsigned int color_1, unsigned int color_2)
Definition GameApi_bm.cc:2521
IMPORT BM array_elem(BMA array, int i)
Definition GameApi_bm.cc:180
Definition GameApi.hh:422
IMPORT void run2(EveryApi &ev, RUN spl)
Definition GameApi.cc:19541
IMPORT ML vr_submit_ml(EveryApi &ev, ML ml, TXID left, TXID right, bool invert, bool translate)
Definition GameApi_vr.cc:388
IMPORT void run(BLK blk)
Definition GameApi.cc:19362
IMPORT BLK game_seq(EveryApi &ev, std::vector< BLK > vec)
Definition GameApi.cc:19347
IMPORT BLK game_window(EveryApi &ev, ML ml, bool logo, bool fpscounter, float start_time, float duration)
Definition GameApi.cc:19247
IMPORT RUN game_window2(EveryApi &ev, ML ml, bool logo, bool fpscounter, float start_time, float duration)
Definition GameApi.cc:19260
IMPORT RUN run_seq(EveryApi &ev, std::vector< RUN > vec)
Definition GameApi.cc:19311
IMPORT RUN vr_window(EveryApi &ev, ML ml, bool logo, bool fpscounter, float start_time, float dura, bool invert, bool translate)
Definition GameApi_vr.cc:62
IMPORT RUN webgpu_window(EveryApi &ev, GML ml)
Definition webgpu.cc:140
IMPORT BlockerApi(Env &e)
Definition GameApi.cc:44480
IMPORT RUN game_window_2nd_display(EveryApi &ev, ML ml, bool logo, bool fpscounter, float start_time, float duration)
Definition GameApi.cc:38723
IMPORT ML vr_submit(EveryApi &ev, TXID left, TXID right)
Definition GameApi_vr.cc:400
Definition GameApi.hh:3717
IMPORT BoolBitmapApi(Env &e)
Definition GameApi_bm.cc:2687
IMPORT BB xor_bitmap(BB b1, BB flip_b2)
Definition GameApi_bm.cc:2664
IMPORT BB tri(BB orig, float p1_x, float p1_y, float p2_x, float p2_y, float p3_x, float p3_y)
Definition GameApi_bm.cc:2262
IMPORT BB from_bitmaps_color_area(BM bm, std::function< bool(int r, int g, int b, int a)> f)
IMPORT BB bb_empty(int sx, int sy)
Definition GameApi_bm.cc:2303
IMPORT BB sprite(BB bg, BB sprite, float x, float y, float size_multiplier_x, float size_multiplier_y)
Definition GameApi_bm.cc:2646
IMPORT O to_volume(BB b, float dist)
Definition GameApi_bm.cc:1965
IMPORT BB polygon(BB bg, PT *points, int size)
Definition GameApi_bm.cc:3312
IMPORT BM to_bitmap(BB bools, int true_r, int true_g, int true_b, int true_a, int false_r, int false_g, int false_b, int false_a)
Definition GameApi_bm.cc:2676
IMPORT BB or_bitmap(BB b1, BB b2)
Definition GameApi_bm.cc:2658
IMPORT BB not_bitmap(BB b)
Definition GameApi_bm.cc:2652
IMPORT BB black_white_dithering(FB fb)
Definition GameApi_bm.cc:3923
BM to_bitmap_1(BB bools, int true_r, int true_g, int true_b, int true_a, int false_r, int false_g, int false_b, int false_a)
Definition GameApi_bm.cc:2681
IMPORT int size_y(BB bm)
Definition GameApi_bm.cc:2510
IMPORT BB ellipse(BB bg, float center_x, float center_y, float center2_x, float center2_y, float sum_of_distances)
Definition GameApi_bm.cc:2467
IMPORT BB transform(BB orig, std::function< bool(int, int, bool)> f)
Definition GameApi_bm.cc:2290
IMPORT BM choose_bitmap(BB bools, BM true_bitmap, BM false_bitmap)
Definition GameApi_bm.cc:2217
IMPORT BB rectangle(BB bg, float x, float y, float width, float height)
Definition GameApi_bm.cc:2589
IMPORT BB from_bitmaps_color(BM bm, int r, int g, int b)
Definition GameApi_bm.cc:2312
IMPORT int size_x(BB bm)
Definition GameApi_bm.cc:2505
IMPORT BB from_float_bitmap(FB float_bm, float range_start, float range_end)
Definition GameApi_bm.cc:2345
IMPORT BB text(BB bg, int x, int y, const char *string, int size, BB *glyphs, int glyphcount, int(*fptr)(EveryApi &ev, char))
IMPORT ~BoolBitmapApi()
Definition GameApi_bm.cc:2688
IMPORT BB sections(int sx, int sy, float x, float y, std::function< bool(float angle)> f)
Definition GameApi_bm.cc:2530
IMPORT BB line(BB bg, float p_x, float p_y, float p2_x, float p2_y, float line_width1, float line_width2)
Definition GameApi_bm.cc:2460
IMPORT BB part_circle(int sx, int sy, float x, float y, float start_angle, float end_angle, float start_rad, float end_rad)
Definition GameApi_bm.cc:2538
IMPORT BB circle(BB bg, float center_x, float center_y, float radius)
Definition GameApi_bm.cc:2478
IMPORT BB andnot_bitmap(BB b1, BB not_b2)
Definition GameApi_bm.cc:2670
IMPORT BB rings(int sx, int sy, float center_x_start, float center_y_start, float center_x_end, float center_y_end, float start_radius, float end_radius, float start_thickness, float end_thickness, int numrings)
Definition GameApi_bm.cc:2270
IMPORT bool boolvalue(BB bb, int x, int y)
Definition GameApi_bm.cc:2515
IMPORT BM texture(BM bg, BB bools1, int l1, int t1, BM texturebitmap2, int l2, int t2)
Definition GameApi.hh:2771
IMPORT BO cube_bo(EveryApi &ev, float start_x, float end_x, float start_y, float end_y, float start_z, float end_z, int split_x, int split_y)
Definition GameApi.cc:984
IMPORT BO or_elem_bo(EveryApi &ev, BO obj, BO obj2)
Definition GameApi.cc:1009
IMPORT BO sphere_bo(EveryApi &ev, PT center, float radius, int numfaces1, int numfaces2)
Definition GameApi.cc:1000
IMPORT P to_polygon(BO obj)
Definition GameApi.cc:1056
IMPORT O to_volume(BO obj)
Definition GameApi.cc:1062
IMPORT BooleanOps(Env &e)
Definition GameApi.cc:44508
IMPORT FD to_dist(BO obj)
Definition GameApi.cc:1068
IMPORT BO intersect_bo(EveryApi &ev, BO obj, BO obj2)
Definition GameApi.cc:1038
IMPORT BO create_bo(P mesh, O bools, FD fd)
Definition GameApi.cc:970
IMPORT BO and_not_bo(EveryApi &ev, BO obj, BO not_obj)
Definition GameApi.cc:1021
Definition GameApi.hh:2038
IMPORT bool check_collision(CP plane, float x, float y)
Definition GameApi.cc:1183
IMPORT void set_pos(CP plane, int id, float x, float y)
Definition GameApi.cc:1178
IMPORT CollisionPlane(Env &e)
Definition GameApi.cc:44494
IMPORT CP or_elem(int id, std::vector< CP > vec)
Definition GameApi.cc:1164
IMPORT CP rectangle(int id, float x, float y, float sx, float sy)
Definition GameApi.cc:1148
IMPORT CP circle(int id, float radius)
Definition GameApi.cc:1156
Definition GameApi.hh:3928
IMPORT CO u_color(unsigned int color)
Definition GameApi_co.cc:6
IMPORT ColorApi(Env &e)
Definition GameApi_co.cc:4
IMPORT CO rgbf_color(float r, float g, float b, float a)
Definition GameApi_co.cc:18
IMPORT CO rgb_color(int r, int g, int b, int a)
Definition GameApi_co.cc:14
Definition GameApi.hh:2574
IMPORT BM array_bm(COV colours, int sx, int sy, float ssx, float ssy, float z)
Definition GameApi_vo.cc:994
IMPORT COV phong(VO normal, PT light_pos, CO i_s, CO i_d, CO i_a, float k_s, float k_d, float k_a, float alfa)
Definition GameApi_vo.cc:1167
IMPORT COV from_float_volume(FO obj, unsigned int col0, unsigned int col1)
Definition GameApi_vo.cc:877
IMPORT BM texture_bm(P obj, COV colors, int face, int sx, int sy)
Definition GameApi_vo.cc:957
IMPORT P texture(P obj, COV colors)
IMPORT COV directcolor(VO normal)
Definition GameApi_vo.cc:1176
IMPORT COV from_continuous_bitmap(CBM bm)
Definition GameApi_vo.cc:895
IMPORT COV mix(COV p1, COV p2, float value)
Definition GameApi_vo.cc:1160
IMPORT COV from_volume(O obj, unsigned int col_true, unsigned int col_false)
Definition GameApi_vo.cc:1005
IMPORT COV or_cov(COV p1, COV p2)
IMPORT ColorVolumeApi(Env &e)
Definition GameApi.cc:44502
Definition GameApi.hh:3851
IMPORT CBM surfacecolor(S s, COV cov)
Definition GameApi_bm.cc:3587
IMPORT CBM from_bitmap(BM bm, float xsize, float ysize)
Definition GameApi_bm.cc:3597
IMPORT CBM bicubic(float f_0, float f_1, float df_0, float df_1, float ff_0, float ff_1, float dff_0, float dff_1)
Definition GameApi_bm.cc:3493
CBM constant(unsigned int color, float x, float y)
Definition GameApi_bm.cc:3396
IMPORT BM sample(CBM c_bitmap, int sx, int sy)
Definition GameApi_bm.cc:3541
IMPORT CBM rotate(CBM bm, float center_x, float center_y, float angle)
Definition GameApi_bm.cc:3548
IMPORT BM to_bitmap(CBM bm, int sx, int sy)
Definition GameApi_bm.cc:3556
IMPORT unsigned int get_pixel(CBM bitmap, float x, float y)
Definition GameApi_bm.cc:3524
CBM distance_render(FD obj, COV colours, float sx, float sy)
Definition GameApi_bm.cc:3386
IMPORT ContinuousBitmapApi(Env &e)
Definition GameApi_bm.cc:3346
IMPORT CBM cbm_empty(float x, float y)
Definition GameApi_bm.cc:3348
Definition GameApi.hh:1481
IMPORT PTS sample(C input_curve, int num_samples)
Definition GameApi.cc:16350
IMPORT LI lines_from_curve_group(CG curvegroup, int split)
Definition GameApi.cc:33250
IMPORT C compose(std::vector< C > vec)
Definition GameApi.cc:16266
IMPORT C bezier(std::vector< PT > vec)
Definition GameApi.cc:16204
IMPORT C linear(std::vector< PT > vec)
Definition GameApi.cc:16180
IMPORT P patch_sample(PA patch, int sx, int sy)
Definition GameApi.cc:16483
IMPORT C change_length(C curve, float new_length)
Definition GameApi.cc:16294
IMPORT PA curve_product(C c1, C c2, PT c2_center)
Definition GameApi.cc:16403
IMPORT C trans(C curve, float dx, float dy, float dz)
Definition GameApi.cc:16237
IMPORT LI to_lines(C curve, int num_lines)
Definition GameApi.cc:16375
IMPORT C x_curve(PA patch, float y)
Definition GameApi.cc:16517
IMPORT C line(PT p1, PT p2)
Definition GameApi.cc:16135
IMPORT C split(C orig_curve, float start_var, float end_var)
Definition GameApi.cc:16314
IMPORT CG curve_group_from_lines(LI li)
Definition GameApi.cc:33095
IMPORT CPP xy_sum()
Definition GameApi.cc:16117
IMPORT C circle_xy_wave(float start_r, float end_r, WV wave, float length)
Definition GameApi.cc:16165
IMPORT C scale(C curve, float mx, float my, float mz)
Definition GameApi.cc:16231
IMPORT C circle_xy(PT center, float r)
Definition GameApi.cc:16170
IMPORT C y_curve(PA patch, float x)
Definition GameApi.cc:16522
IMPORT C circle_xz(PT center, float r)
Definition GameApi.cc:16175
IMPORT PT pos(C curve, float p)
Definition GameApi.cc:16320
IMPORT CPP xy_sum2(float xmult, float ymult, float zmult)
Definition GameApi.cc:16130
IMPORT CurveApi(Env &e)
Definition GameApi.cc:44484
CC start(PTS points)
CC comb(CC prev, PTS points)
PTS extract(CC curves, int block, float val)
IMPORT CurvesApi(Env &e)
Definition GameApi.cc:44486
Definition GameApi.hh:2754
IMPORT CT distance_cut(FD dist)
Definition GameApi_cut.cc:89
IMPORT CutterApi(Env &e)
Definition GameApi.cc:44507
IMPORT CT function(std::function< PT(PT, PT)> f)
IMPORT O cutter_volume(CT c, PT point_from_inside, float outside_dist)
Definition GameApi_cut.cc:116
IMPORT CT plane_cut(PT pos, V u_x, V u_y)
Definition GameApi_cut.cc:24
Definition GameApi.hh:2616
IMPORT FD fd_triangle(PT a, PT b, PT c)
IMPORT PT ray_shape_intersect(FD shape, PT pos, V vec)
Definition GameApi_vo.cc:1849
IMPORT BM render2(EveryApi &ev, FD obj, int sx, int sy)
Definition GameApi_vo.cc:1866
IMPORT FD fd_max(FD a1, FD a2)
Definition GameApi_vo.cc:1795
IMPORT FD fd_line(PT start, PT end, float dist)
Definition GameApi_vo.cc:1492
IMPORT FD ambient_occulsion(FD fd, float d, float i)
Definition GameApi_vo.cc:1722
IMPORT FD fd_torus(float radius_1, float radius_2)
Definition GameApi_vo.cc:1769
IMPORT std::string shader_func(std::string name, FD obj, COV color)
IMPORT FD fd_rot_x(FD fd, float angle)
Definition GameApi_vo.cc:1754
IMPORT FD fd_quad(PT a, PT b, PT c, PT d)
IMPORT FD fd_blend(FD a1, FD a2, float k)
Definition GameApi_vo.cc:1963
IMPORT FD fd_and_not(FD a1, FD a2)
Definition GameApi_vo.cc:1803
IMPORT FD fd_cone(float c_x, float c_y)
IMPORT P distance_poly_cyl(EveryApi &ev, FD fd, float pos_x, float pos_y, float pos_z, float dx, float dy, float dz, int sx, int sy, float ssx, float ssy, int ssxi, int ssyi, float ssx2, float ssy2)
Definition GameApi_vo.cc:1998
IMPORT FD fd_round_cube(float start_x, float end_x, float start_y, float end_y, float start_z, float end_z, float r)
Definition GameApi_vo.cc:1773
IMPORT FD fd_rot_z(FD fd, float angle)
Definition GameApi_vo.cc:1764
IMPORT FD fd_trans(FD fd, float dx, float dy, float dz)
Definition GameApi_vo.cc:1906
IMPORT FD fd_hex_prism(float h_x, float h_y)
IMPORT FD fd_min(FD a1, FD a2)
Definition GameApi_vo.cc:1784
IMPORT FD fd_rot_y(FD fd, float angle)
Definition GameApi_vo.cc:1759
IMPORT FD fd_cube(float start_x, float end_x, float start_y, float end_y, float start_z, float end_z)
Definition GameApi_vo.cc:1488
IMPORT P distance_poly(EveryApi &ev, FD fd, float dx, float dy, float dz, int sx, int sy, float ssx, float ssy, int ssxi, int ssyi, float ssx2, float ssy2)
Definition GameApi_vo.cc:1969
IMPORT P distance_poly_sph(EveryApi &ev, FD fd, float dx, float dy, float dz, int sx, int sy, float ssx, float ssy, int ssxi, int ssyi, float ssx2, float ssy2)
Definition GameApi_vo.cc:2028
IMPORT FD fd_plane(float n_x, float n_y, float n_z, float n_w)
IMPORT FD recalculate_normals(FD fd)
Definition GameApi_vo.cc:1717
IMPORT FD fd_sphere(PT center, float radius)
Definition GameApi_vo.cc:1452
IMPORT FD fd_tri_prism(float h_x, float h_y)
IMPORT FD fd_color(FD fd, float r, float g, float b, float a)
Definition GameApi_vo.cc:1727
IMPORT DistanceFloatVolumeApi(Env &e)
Definition GameApi.cc:44504
IMPORT FD function(std::function< float(float x, float y, float z)> f)
bool is_alternative_array(DR d)
int array_count(DR d)
int alternative_array_count(DR d)
DR choose_alternative(DR dr, std::string id, int val)
DR scroll(DR dr, int delta_x, int delta_y)
bool is_specific_alternative(DR d, std::string id)
DR alternative_array_index(DR d, int index)
std::string generate_java_code(DR dr)
IMPORT DrawApi(Env &e)
Definition GameApi.cc:44526
bool is_array(DR d)
DR icon(LAY l, int id, BM bm)
DR alternatives_array(std::string id, DR *array, int size)
BM render_to_bm(DR dr)
DR array_index(DR d, int index)
bool is_primitive(DR d)
DR rect(LAY l, int id, unsigned int color)
std::string render_to_html_canvas(DR dr)
DR scroll_area(DR dr, LAY l, int id)
DR array(DR *array, int size)
DR label(LAY l, int id, std::string str, Ft font)
DR cliprect(DR cmds, LAY l, int id)
DR deep_copy(DR d)
IMPORT DupApi(Env &e)
Definition GraphI.hh:2078
Definition GameApi.hh:362
IMPORT void async_load_url(std::string url, std::string homepage, bool nosize=false)
Definition GameApi_dep_env.cc:2402
IMPORT void async_load_all_urls(std::vector< std::string > urls, std::string homepage)
Definition GameApi_dep_env.cc:2410
IMPORT std::vector< int > store_counts()
Definition GameApi_dep_env.cc:2262
IMPORT bool store_file_exists(std::string filename)
Definition GameApi_dep_store.cc:11
IMPORT void set_download_ready(int i)
Definition GameApi_dep_env.cc:2303
IMPORT int download_index_mapping(int index)
Definition GameApi_dep_env.cc:2283
friend struct EnvImpl
Definition GameApi.hh:408
void * envimpl
Definition GameApi.hh:407
IMPORT void free_temp_memory()
Definition GameApi_dep_env.cc:2272
IMPORT void free_to_counts(std::vector< int > vec)
Definition GameApi_dep_env.cc:2267
static IMPORT Env * Latest_Env()
Definition GameApi_dep_env.cc:2241
IMPORT void async_scheduler()
Definition GameApi_dep_env.cc:2345
IMPORT void async_rem_callback(std::string url)
Definition GameApi_dep_env.cc:2434
IMPORT ASyncVec * load_file_result(std::string filename)
Definition GameApi_dep_store.cc:223
IMPORT void set_download_progress(int i, float percentage)
Definition GameApi_dep_env.cc:2298
IMPORT float get_download_bar_progress(int i) const
Definition GameApi_dep_env.cc:2313
IMPORT bool get_download_bar_ready(int i) const
Definition GameApi_dep_env.cc:2318
IMPORT Env()
Definition GameApi_dep_env.cc:2245
IMPORT int add_to_download_bar(std::string filename)
Definition GameApi_dep_env.cc:2278
IMPORT void remove_download_bar_item(int i)
Definition GameApi_dep_env.cc:2323
IMPORT void async_load_callback(std::string url, void(*fptr)(void *), void *data)
Definition GameApi_dep_env.cc:2418
IMPORT ASyncVec * get_loaded_async_url(std::string url)
Definition GameApi_dep_env.cc:2440
IMPORT int count_async_callbacks_still_pending()
Definition GameApi_dep_env.cc:2424
IMPORT ~Env()
Definition GameApi_dep_env.cc:2447
IMPORT int async_mapping(int index)
Definition GameApi_dep_env.cc:2334
IMPORT void load_file_clean(std::string filename)
Definition GameApi_dep_store.cc:236
IMPORT void remove_async(int i)
Definition GameApi_dep_env.cc:2340
IMPORT void load_file(std::string filename, void(*fptr)(void *), void *, bool &success)
Definition GameApi_dep_store.cc:147
IMPORT void print_callbacks_pending()
Definition GameApi_dep_env.cc:2429
IMPORT std::string get_download_bar_filename(int i) const
Definition GameApi_dep_env.cc:2308
IMPORT void free_memory()
Definition GameApi_dep_env.cc:2257
IMPORT void store_file(std::string filename, ASyncVec *vec)
Definition GameApi_dep_store.cc:54
IMPORT void set_download_data(int i, const std::vector< unsigned char > &file)
Definition GameApi_dep_env.cc:2293
IMPORT int download_bar_count() const
Definition GameApi_dep_env.cc:2288
IMPORT void print_dependencies(int num)
Definition GameApi_dep_env.cc:2251
IMPORT int start_async(ASyncTask *task)
Definition GameApi_dep_env.cc:2328
Definition GameApi.hh:1416
E pair(E e1, E e2)
L polygon(E start, E end, P polygon)
Definition GameApi_ev.cc:20
E root_event()
Definition GameApi_ev.cc:9
M mouse_rectangle(MP m, int x, int y, int width, int height)
void run_game(ST states, int start_state)
Definition GameApi_ev.cc:104
LL link(L obj, MV point)
ST activate_event(ST states, int state, E event)
E activate_mouse_plane(E activation_event, MP m)
L array(L *array, int size)
ST UnSerialize(std::string s)
M array(M *array, int size)
E state_change(E event, int old_state, int new_state)
IMPORT ~EventApi()
Definition GameApi_ev.cc:205
E key_down_event(int key, E start_time, E end_time)
L polygon(E start, E end, P start_polygon, P end_polygon)
E timer(E activation_event, float time)
Definition GameApi_ev.cc:14
LL link(L obj, ID pointnum, MV point)
LL array(LL *array, int size)
IMPORT EventApi(Env &e)
Definition GameApi_ev.cc:4
ST enable_obj(ST states, int state, LL link)
Definition GameApi.cc:507
E array(E *array, int size)
std::string Serialize(ST states, int start_state)
ST states(int count_states)
Definition GameApi_ev.cc:210
MV line(E start, E end, MV start_mv, MV end_mv, int start_choose, int end_choose)
ST disable_obj(ST states, int state, LL link)
E deactivate_mouse_plane(E deactivation_event, MP m)
MV point(float x, float y, float z)
E key_up_event(int key, E start_time, E end_time)
L bitmap(E start, E end, BM bitmap)
ST mouse_plane(ST states, int state, M mouse)
AC choose_ml_action(AC action, ML alternative)
EV delta_timer(EV next, EV event, float delta_time)
ML event_bind(ML next, EV event, AC action)
EV timer_event(EV next, float time)
AC send_key_action(AC action, int key_id, int key_type)
EV key_event(EV next, int key_id, int key_type)
AC sequence_action(std::vector< AC > arr, float time_step)
IMPORT EventNode(Env &e)
Definition GameApi.cc:44497
AC move_ml_action(AC action, MN movement, float start_time, float end_time)
AC change_time_action(AC action, float new_time)
AC color_ml_action(AC action, int color_num, CC cc)
AC array_action(std::vector< AC > arr)
AC skip_time_action(AC action, float delta_time)
IMPORT EX expr_float(std::string expr, bool &success)
Definition GameApi_ex.cc:594
IMPORT EX minus(EX e1, EX e2)
Definition GameApi_ex.cc:196
IMPORT EX sin(EX e1)
Definition GameApi_ex.cc:312
IMPORT EX int_constant(int val)
Definition GameApi_ex.cc:358
IMPORT EX div(EX e1, EX e2)
Definition GameApi_ex.cc:236
IMPORT float expr_eval_float(EX expr, std::vector< FloatExprEnv > env)
Definition GameApi_ex.cc:363
IMPORT ExprApi(Env &e)
Definition GameApi.cc:44499
IMPORT EX plus(EX e1, EX e2)
Definition GameApi_ex.cc:113
IMPORT EX float_constant(float val)
Definition GameApi_ex.cc:354
IMPORT EX variable(std::string name)
Definition GameApi_ex.cc:77
IMPORT EX cos(EX e1)
Definition GameApi_ex.cc:317
IMPORT EX mul(EX e1, EX e2)
Definition GameApi_ex.cc:154
IMPORT EX expr_int(std::string expr, bool &success)
Definition GameApi_ex.cc:598
IMPORT int expr_eval_int(EX expr, std::vector< IntExprEnv > env)
Definition GameApi_ex.cc:377
IMPORT F value(float v)
Definition GameApi_f.cc:34
IMPORT F array_index(float *array, int pos)
Definition GameApi_f.cc:50
IMPORT FloatApi(Env &e)
Definition GameApi_f.cc:4
IMPORT F ref(float *v)
Definition GameApi_f.cc:42
IMPORT float get_value(F f)
Definition GameApi_f.cc:58
FA ramp(float start_value, float end_value, int steps)
Definition GameApi_f.cc:136
IMPORT FloatArrayApi(Env &e)
Definition GameApi_f.cc:66
FA duparray(float value, int size)
Definition GameApi_f.cc:153
FA array(float *array, int size)
Definition GameApi_f.cc:67
BM span_arrays(FA fa1, FA fa2, CBM f)
Definition GameApi_f.cc:125
FA subarray(FA fa, int start_index, int length)
Definition GameApi_f.cc:162
F array_index(FA fa, int index)
Definition GameApi_f.cc:176
FA f_array(F *array, int size)
Definition GameApi_f.cc:144
Definition GameApi.hh:3767
IMPORT FB SampleContFloat(CFB a1, float start_x, float end_x, float start_y, float end_y, int sx, int sy, float mult)
Definition GameApi_bm.cc:4248
IMPORT CFB Y_bitmap(float sx, float sy)
Definition GameApi_bm.cc:3995
IMPORT CFB SqrtContFloat(CFB val)
Definition GameApi_bm.cc:4242
IMPORT FB min_fb(FB fb1, FB fb2)
IMPORT BM to_grayscale(FB fb)
Definition GameApi_bm.cc:3284
BB to_bool(FB f, float true_range_start, float true_range_end)
Definition GameApi_bm.cc:3237
IMPORT int size_x(FB bm)
Definition GameApi_bm.cc:2543
IMPORT CFB Tan(CFB val)
Definition GameApi_bm.cc:4292
IMPORT BM subfloatbitmap(EveryApi &ev, FB fb, float range_start, float range_end, unsigned int true_color, unsigned int false_color)
Definition GameApi_bm.cc:1952
IMPORT CBB Equalizer(CFB, CFB)
Definition GameApi_bm.cc:4152
IMPORT BM to_grayscale_color(FB fb, int r, int g, int b, int a, int r2, int g2, int b2, int a2)
Definition GameApi_bm.cc:3290
IMPORT FB from_green(BM color_bm)
Definition GameApi_bm.cc:2845
IMPORT FB fb_empty(int sx, int sy)
Definition GameApi_bm.cc:2308
IMPORT FB perlin_noise(FB grad_1, FB grad_2)
Definition GameApi_bm.cc:2194
IMPORT BB SampleContBool(CBB a1, float start_x, float end_x, float start_y, float end_y, int sx, int sy)
Definition GameApi_bm.cc:4253
IMPORT FB perlin_noise2(int sx, int sy, float key)
Definition GameApi_bm.cc:2200
IMPORT FB from_bool(BB b, float val_true, float val_false)
Definition GameApi_bm.cc:3179
IMPORT CFB C_bitmap(float sx, float sy, float val)
Definition GameApi_bm.cc:3966
IMPORT FB space_fill(PT *array, float *array2, int size, int sx, int sy)
Definition GameApi_bm.cc:2834
IMPORT FB grayscale(BM color_bm)
IMPORT BM to_color(FB r, FB g, FB b, FB a)
Definition GameApi_bm.cc:3224
IMPORT FB distance_field(FB bb, float max_value)
Definition GameApi_bm.cc:3169
IMPORT FloatBitmapApi(Env &e)
Definition GameApi_bm.cc:2690
IMPORT CFB AddBitmap(std::vector< CFB > vec)
Definition GameApi_bm.cc:4112
IMPORT int size_y(FB bm)
Definition GameApi_bm.cc:2548
IMPORT FB add_border(FB fb)
Definition GameApi_bm.cc:3174
IMPORT CFB X_bitmap(float sx, float sy)
Definition GameApi_bm.cc:3970
IMPORT FB from_grayscale(BM color_bm)
Definition GameApi_bm.cc:2906
IMPORT TXID to_texid(FB bm)
Definition GameApi_bm.cc:3686
IMPORT FB gaussian(float start_x, float end_x, float start_y, float end_y, float start_z, float end_z, int sx, int sy)
Definition GameApi_bm.cc:2762
IMPORT BB to_bool_mod(FB f, float mod_value)
Definition GameApi_bm.cc:3269
IMPORT float floatvalue(FB bm, int x, int y)
Definition GameApi_bm.cc:2553
IMPORT CFB MulBitmap(std::vector< CFB > vec)
Definition GameApi_bm.cc:4102
IMPORT FB from_bool_bitmap(BB bm, int csx, int csy)
Definition GameApi_bm.cc:3278
IMPORT FB from_red(BM color_bm)
Definition GameApi_bm.cc:2766
IMPORT CFB Sin(CFB val)
Definition GameApi_bm.cc:4282
IMPORT FB max_fb(FB fb1, FB fb2)
IMPORT FB from_alpha(BM color_bm)
Definition GameApi_bm.cc:2947
IMPORT FB from_blue(BM color_bm)
Definition GameApi_bm.cc:2914
IMPORT CFB Cos(CFB val)
Definition GameApi_bm.cc:4287
IMPORT FB mix_fb(FB fb1, FB fb2, float val)
IMPORT BM choose_bitmap(FB fb, BM bm1, BM bm2)
Definition GameApi_bm.cc:2207
IMPORT FB dist(int sx, int sy, float p_x, float p_y)
Definition GameApi_bm.cc:4467
IMPORT FB newfloatbitmap(char *array, int sx, int sy, std::function< float(char)> f)
Definition GameApi_bm.cc:1605
IMPORT FB blur_bitmap(FB fb, float d)
Definition GameApi_bm.cc:4501
IMPORT ~FloatBitmapApi()
Definition GameApi_bm.cc:2691
Definition GameApi.hh:2860
FS fs_bound_x(FS left, FS right, float x)
Definition GameApi_ff.cc:1203
FS fs_bound_z(FS left, FS right, float z)
Definition GameApi_ff.cc:1276
ML fs_to_ml4(EveryApi &ev, int sx, int sy, int sz, float ssx, float ssy, float ssz, FS obj, float pos, float sx1, float sy1, float sz1, float border_width, unsigned int border_color)
Definition GameApi_ff.cc:680
BM render_with_lipschitz_and_forallexists(EveryApi &ev, FS bounding_spheres, O obj, float z, float z_dist, unsigned int bg_color, float per_pixel_sample_rate, float start_x, float end_x, float start_y, float end_y, int sx, int sy)
Definition GameApi_ff.cc:1171
VX fs_to_vx(EveryApi &ev, int sx, int sy, int sz, float ssx, float ssy, float ssz, FS obj, float pos)
Definition GameApi_ff.cc:602
O fs_to_o(FS obj, float val)
Definition GameApi_ff.cc:551
ML o_to_ml4(EveryApi &ev, int sx, int sy, int sz, float ssx, float ssy, float ssz, O obj, float pos, float sx1, float sy1, float sz1, float border_width, unsigned int border_color)
Definition GameApi_ff.cc:691
ML o_to_ml3(EveryApi &ev, int sx, int sy, int sz, float ssx, float ssy, float ssz, O obj, float pos, MT mat, float sx1, float sy1, float sz1, float border_width, unsigned int border_color)
Definition GameApi_ff.cc:703
FS fs_min(FS a1, FS a2)
Definition GameApi_ff.cc:1307
IMPORT FloatSceneApi(Env &e)
Definition GameApi_ff.cc:4
FS fs_min_arr(std::vector< FS > arr)
Definition GameApi_ff.cc:1313
FS fs_sphere(float center_x, float center_y, float center_z, float radius)
Definition GameApi_ff.cc:500
FS fd_to_fs(EveryApi &ev, FD fd)
Definition GameApi_ff.cc:528
FS color_scene(FS scene, unsigned int color, int fptr_enum)
Definition GameApi_ff.cc:469
ML fs_to_ml2(EveryApi &ev, int sx, int sy, int sz, float ssx, float ssy, float ssz, FS obj, float pos, MT mat, float sx1, float sy1, float sz1, float border_width, unsigned int border_color)
Definition GameApi_ff.cc:845
FS fs_bound_y(FS left, FS right, float y)
Definition GameApi_ff.cc:1240
ML fs_to_ml(EveryApi &ev, int sx, int sy, int sz, float ssx, float ssy, float ssz, FS obj, float pos, MT mat, float sx1, float sy1, float sz1)
Definition GameApi_ff.cc:800
ML fs_to_ml3(EveryApi &ev, int sx, int sy, int sz, float ssx, float ssy, float ssz, FS obj, float pos, MT mat, float sx1, float sy1, float sz1, float border_width, unsigned int border_color)
Definition GameApi_ff.cc:754
Definition GameApi.hh:2533
IMPORT FO maximum(FO f1, FO f2)
Definition GameApi_vo.cc:1369
IMPORT FOA prepare(FO object, int numpoints, float start_x, float start_y, float start_z, float end_x, float end_y, float end_z)
Definition GameApi_vo.cc:696
IMPORT FO light(float dist)
Definition GameApi_vo.cc:734
IMPORT O subvolume(FO f, float start_range, float end_range)
Definition GameApi_vo.cc:785
IMPORT FO mandelbrot(float x_x, float x_y, float limit)
Definition GameApi_vo.cc:776
IMPORT FO min_distance(C curve)
Definition GameApi_vo.cc:1139
IMPORT FO julia(float c_x, float c_y, float limit)
Definition GameApi_vo.cc:768
IMPORT FO distance()
Definition GameApi_vo.cc:1315
IMPORT FO from_float_bitmap(FB bm, float start_x, float end_x, float start_y, float end_y, float start_z, float end_z)
Definition GameApi_vo.cc:1246
IMPORT FO move(FO f1, float dx, float dy, float dz)
Definition GameApi_vo.cc:1383
IMPORT FO from_volume(O o, float false_val, float true_val)
Definition GameApi_vo.cc:1206
IMPORT FO waveform_sphere(WV wav, float r)
Definition GameApi_integrator.cc:321
IMPORT FO shadow(FD fd, V light_dir, float mint, float maxt, float k)
Definition GameApi_vo.cc:1133
IMPORT FO smooth(std::vector< FO > vec, float val)
Definition GameApi_vo.cc:830
IMPORT FloatVolumeApi(Env &e)
Definition GameApi.cc:44501
IMPORT FO interpolate(FO f1, FO f2, float val)
Definition GameApi_vo.cc:805
IMPORT BM raytrace(FO object, int sx, int sy, PT ray_0, PT ray_x, PT ray_y, PT ray_z, float surface_value)
Definition GameApi_vo.cc:1389
IMPORT FO minimum(FO f1, FO f2)
Definition GameApi_vo.cc:1363
IMPORT FO torusdistance(PT center, V u_x, V u_y, float radius)
Definition GameApi_vo.cc:1345
IMPORT FB integrate_render(FO obj, int sx, int sy, int numsamples)
Definition GameApi_integrator.cc:278
IMPORT WV wave_move_y(WV wav, float delta)
Definition GameApi_integrator.cc:342
Definition GameApi.hh:1287
IMPORT PF point_fetcher_part(PF point_fetcher, int component, FF float_fetcher)
Definition GameApi_fnt.cc:2228
IMPORT SF int_to_string_fetcher(IF fetcher)
Definition GameApi_fnt.cc:2077
IMPORT IF z_comp(PF point_fetcher, float start_z, float end_z, int num_steps)
Definition GameApi_fnt.cc:2219
IMPORT BM render_glyph(GI glyph)
Definition GameApi.cc:20581
IMPORT IF hmd_request_presenting(IF i)
Definition GameApi_vr.cc:935
IMPORT FtA font_atlas_info(EveryApi &ev, Ft font, std::string chars, float sx, float sy, int y_delta)
Definition GameApi_fnt.cc:363
IMPORT IF hmd_state_fetcher()
Definition GameApi_vr.cc:972
IMPORT P font_string_from_atlas_opengl_pipeline(EveryApi &ev, FtA atlas, BM atlas_bm, std::string str, int x_gap)
Definition GameApi_fnt.cc:491
IMPORT GI choose_glyph_from_font(FI font, long idx)
Definition GameApi.cc:20591
IMPORT FI load_font(std::string ttf_filename, int sx, int sy)
Definition GameApi.cc:21069
IMPORT BM outline_bm(FI font, std::string glyph)
Definition GameApi.cc:21198
IMPORT IF key_move_2_area_fetcher(float start_x, float end_x, float start_z, float end_z)
Definition GameApi_fnt.cc:1228
IMPORT Ft newfont(std::string filename, int sx, int sy)
Definition GameApi_fnt.cc:24
IMPORT BM string_display_to_bitmap(SD sd, int def)
Definition GameApi.cc:20521
IMPORT BM outline_string(EveryApi &ev, FI font, std::string str)
Definition GameApi.cc:21281
IMPORT ~FontApi()
Definition GameApi_fnt.cc:19
IMPORT FF time_range_fetcher_state(int state, IF states, float start_time, float end_time, float before_start, float start_value, float end_value, float after_end, float repeat)
Definition GameApi_fnt.cc:1847
IMPORT ML save_font_dump(FI font, std::string chars, std::string filename)
Definition GameApi.cc:38288
IMPORT IF ready_fetcher(P p)
Definition GameApi_fnt.cc:1200
IMPORT FF choose_float_fetcher(IF int_fetcher, float a_1, float a_2, float a_3, float a_4, float a_5, float a_6, float a_7)
Definition GameApi_fnt.cc:1612
IMPORT void save_atlas(FtA atlas, std::string filename)
Definition GameApi_fnt.cc:778
IMPORT IF repeat_int_fetcher(IF fetcher, float duration)
Definition GameApi_fnt.cc:2319
IMPORT BM font_atlas_engine2(EveryApi &ev, FI font, FtA atlas, float sx, float sy)
Definition GameApi_fnt.cc:176
IMPORT IF x_comp(PF point_fetcher, float start_x, float end_x, int num_steps)
Definition GameApi_fnt.cc:2209
IMPORT FF fps_fetcher(EveryApi &ev)
Definition GameApi_fnt.cc:1647
IMPORT ARR choose_screen(float left_x, float right_x, int min_screen, int max_screen)
Definition GameApi_fnt.cc:1998
IMPORT FontApi(Env &e)
Definition GameApi_fnt.cc:15
IMPORT SF float_to_string_fetcher(FF fetcher)
Definition GameApi_fnt.cc:2047
IMPORT IF y_comp(PF point_fetcher, float start_y, float end_y, int num_steps)
Definition GameApi_fnt.cc:2214
IMPORT PL glyph_plane(Ft font, long idx, float sx, float sy, float dx, float dy)
Definition GameApi_fnt.cc:59
IMPORT ARR FI_sprite_atlas(EveryApi &ev, FI font, std::string chars, int sx, int sy, int y_delta)
Definition GameApi_fnt.cc:254
IMPORT ML dynamic_string(EveryApi &ev, Ft font, std::string alternative_chars, SF fetcher, int x, int y, int numchars)
Definition GameApi_fnt.cc:1133
IMPORT IF time_fetcher(EveryApi &ev, float start_time)
Definition GameApi_fnt.cc:1927
IMPORT FB glyph_fb(Ft font, long idx)
IMPORT PF point_fetcher_constant(float x, float y, float z)
Definition GameApi_fnt.cc:2224
IMPORT PF mouse_fetcher()
Definition GameApi_fnt.cc:2136
IMPORT BM large_string_from_atlas(EveryApi &ev, FtA atlas, BM atlas_bm, std::string url, int x_gap, int empty_line_height, int baseline_separation)
Definition GameApi_fnt.cc:604
IMPORT FF span_key_fetcher(float start_x, float end_x, float speed_x, int down_key, int up_key)
Definition GameApi_fnt.cc:1354
IMPORT IF timed_int_fetcher(EveryApi &ev, int start, int end, float start_time, float end_time)
Definition GameApi_fnt.cc:2315
IMPORT ML ml_chooser(std::vector< ML > vec, IF fetcher)
Definition GameApi_fnt.cc:2378
IMPORT GI combine_glyphs(GI glyph1, GI glyph2)
Definition GameApi_fnt.cc:169
IMPORT ARR bm_array_id(std::vector< BM > vec)
Definition GameApi_fnt.cc:2488
IMPORT SD draw_text_string_sd(std::vector< GI > glyphs, std::string str, int gap_x, int empty_line_height)
Definition GameApi.cc:20798
IMPORT FF time_fetcher2(EveryApi &ev)
Definition GameApi_fnt.cc:1875
IMPORT IF toggle_button_fetcher(float start_x, float end_x, float start_y, float end_y)
Definition GameApi_fnt.cc:2016
IMPORT BB glyph_bb(Ft font, long idx)
IMPORT ML dynamic_character(EveryApi &ev, std::vector< BM > vec, IF fetcher, int x, int y)
Definition GameApi_fnt.cc:1116
IMPORT IF score_fetcher(EveryApi &ev)
Definition GameApi_fnt.cc:2012
IMPORT IF movement_int_fetcher(int count, float x_mult, float y_mult, float z_mult)
Definition GameApi_fnt.cc:2020
IMPORT std::vector< GameApi::BM > bm_array_id_inv(ARR arr)
Definition GameApi_fnt.cc:2475
IMPORT LI glyph_outline(Ft font, long idx, float sx, float sy)
Definition GameApi_fnt.cc:37
IMPORT FtA load_atlas_from_string(std::string buf)
Definition GameApi_fnt.cc:663
IMPORT BM font_string_from_atlas(EveryApi &ev, FtA atlas, BM atlas_bm, std::string str, int x_gap)
Definition GameApi_fnt.cc:617
IMPORT FI load_font_dump(std::string url)
Definition GameApi.cc:38457
IMPORT ML dynamic_character2(EveryApi &ev, std::vector< GI > vec, std::string alternatives, IF fetcher, int x, int y)
IMPORT FtA font_atlas_info_engine2(EveryApi &ev, FI font, std::string chars, float sx, float sy, int y_delta)
Definition GameApi_fnt.cc:199
IMPORT SF score_string_fetcher(std::string id, std::string label, int numdigits)
Definition GameApi_fnt.cc:2412
IMPORT FF time_range_fetcher_state_key(int state, int key, IF if_state, float start_time, float end_time, float before_start, float start_value, float end_value, float after_end, float repeat)
Definition GameApi_fnt.cc:1852
IMPORT IF char_fetcher_from_string(SF string_fetcher, std::string alternatives, int idx)
Definition GameApi_fnt.cc:2328
IMPORT BM draw_text_string(FI font, std::string str, int x_gap, int empty_line_height)
Definition GameApi.cc:20863
IMPORT BM font_string(Ft font, std::string str, int x_gap)
Definition GameApi_fnt.cc:2455
IMPORT FF time_range_fetcher_key(int key, float start_time, float end_time, float before_start, float start_value, float end_value, float after_end, float repeat)
Definition GameApi_fnt.cc:1843
IMPORT FF time_range_fetcher(float start_time, float end_time, float before_start, float start_value, float end_value, float after_end, float repeat)
Definition GameApi_fnt.cc:1839
IMPORT IF quake_area_fetcher(float start_x, float end_x, float start_z, float end_z)
Definition GameApi_fnt.cc:1409
IMPORT FtA load_atlas(std::string filename)
Definition GameApi_fnt.cc:709
IMPORT ARR font_string_array(Ft font, std::string s, int x_gap)
Definition GameApi_fnt.cc:819
IMPORT SF time_string_fetcher(EveryApi &ev)
Definition GameApi_fnt.cc:2450
IMPORT ML dynamic_polygon(EveryApi &ev, std::vector< P > vec, MT material, IF fetcher)
Definition GameApi_fnt.cc:1128
IMPORT void save_atlas_store_file(FtA atlas, std::string filename)
Definition GameApi_fnt.cc:754
IMPORT BM draw_text_large(EveryApi &ev, FI font, std::string url, int x_gap, int empty_line_height, int baseline_separation)
Definition GameApi.cc:20962
IMPORT ARR font_string_array2(FI font, std::string s)
Definition GameApi_fnt.cc:800
IMPORT BM glyph(Ft font, long idx)
Definition GameApi_fnt.cc:101
IMPORT IF keypress_int_fetcher(int key, int key_down_value, int key_up_value)
Definition GameApi_fnt.cc:2324
IMPORT ARR FI_sprite_atlas_persistent_cache(EveryApi &ev, FtA atlas, BM atlas_bm, std::string atlas_filename, std::string atlas_bm_filename)
Definition GameApi_fnt.cc:317
IMPORT FML dynamic_character_frame(EveryApi &ev, std::vector< BM > vec, IF fetcher, int x, int y, int fmt, MN mn)
Definition GameApi_fnt.cc:1121
IMPORT BM font_atlas(EveryApi &ev, Ft font, FtA atlas, float sx, float sy)
Definition GameApi_fnt.cc:407
Definition GameApi.hh:4577
IMPORT TXID depth_ml(EveryApi &ev, ML mainloop, int sx, int sy, bool translate)
Definition GameApi_fbo.cc:396
IMPORT TXID tex_id(FBO buffer)
Definition GameApi_fbo.cc:6
IMPORT void config_fbo(FBO buffer)
Definition GameApi_fbo.cc:74
IMPORT bool fbo_status(FBO buffer)
Definition GameApi_fbo.cc:125
IMPORT void unconfig_fbo(FBO buffer)
Definition GameApi_fbo.cc:93
IMPORT FrameBufferApi(Env &e)
Definition GameApi.cc:44524
IMPORT void bind_screen(vp viewport)
Definition GameApi_fbo.cc:116
IMPORT TXID fbo_ml(EveryApi &ev, ML mainloop, int sx, int sy, bool translate)
Definition GameApi_fbo.cc:391
IMPORT TXID depth_id(FBO buffer)
Definition GameApi_fbo.cc:13
IMPORT FBO create_fbo(EveryApi &ev, int sx, int sy)
Definition GameApi_fbo.cc:20
IMPORT vp bind_fbo(FBO buffer)
Definition GameApi_fbo.cc:105
IMPORT ML fbo_ml_blit(EveryApi &ev, TXID id, float start_x, float end_x, float start_y, float end_y, float z)
Definition GameApi_fbo.cc:482
IMPORT BM fbo_to_bitmap(EveryApi &ev, FBO buffer)
Definition GameApi_fbo.cc:136
Definition GameApi.hh:1548
F min(F orig, F orig2)
F line_from_bm_y(BM bm, int bm_y, float length)
IMPORT ~FunctionApi()
Definition GameApi_fn.cc:13
F scale_y(F orig, float old_min_y, float old_max_y, float new_min_y, float new_max_y)
F cos()
Definition GameApi_fn.cc:37
IMPORT FunctionApi(Env &e)
Definition GameApi_fn.cc:9
F line(float x, float y, float x2, float y2, float begin_y, float end_y)
std::vector< PT > equalizer(F f1, F f2, float start, float length)
F sin()
Definition GameApi_fn.cc:33
F constant(float y)
Definition GameApi_fn.cc:25
F move_x(F orig, float delta)
F move_y(F orig, float delta)
F max(F orig, F orig2)
float get_value(F f, float x)
Definition GameApi_fn.cc:17
F change_range(F orig, F replace, float x_start, float x_end)
F line_from_bm_x(BM bm, int bm_x, float length)
Definition GameApi.hh:312
virtual R Map(P p) const =0
IMPORT void start_game(int event)
Definition GameApi.cc:572
IMPORT GamesApi(Env &e)
Definition GameApi.cc:558
IMPORT void modify_map(int event, int game_id)
Definition GameApi.cc:568
IMPORT void register_game(int game_id, void(*fptr)(EveryApi &e))
Definition GameApi.cc:564
IMPORT ~GamesApi()
Definition GameApi.cc:561
Definition GameApi.hh:1061
IMPORT ~GridApi()
Definition GameApi.cc:532
IMPORT GridApi(Env &e)
Definition GameApi.cc:528
IMPORT SP gridtilespace(BM tilebm, int sx, int sy, int x, int y)
IMPORT void preparegrid(BM tile_bitmap, int tile_choose=-1)
Definition GameApi_gr.cc:6
IMPORT void rendergrid(BM grid, int grid_choose, float top_x, float top_y)
Definition GameApi_gr.cc:32
IMPORT SP wholegridspace(int sx, int sy, BM grid)
Definition GameApi.hh:2254
IMPORT W generic_editor(EveryApi &ev, EditTypes &target, FtA atlas, BM atlas_bm, std::string type, int x_gap, FtA atlas_tiny, BM atlas_tiny_bm, int sy, W &click_target)
Definition GameApi_gui.cc:5981
IMPORT W colorvolumeapi_functions_list_item(FtA font1, BM font1_bm, FtA font2, BM font2_bm, W insert, W *outer)
Definition GameApi_gui.cc:8976
IMPORT W bounding_box(W w)
Definition GameApi_gui.cc:2377
IMPORT W or_elem(W(*w1_func)(void *), W(*w2_func)(void *), void *data)
Definition GameApi_gui.cc:6727
IMPORT std::string boolbitmapapi_functions_item_label(int i)
Definition GameApi_gui.cc:8798
IMPORT int size_x(W w)
Definition GameApi_gui.cc:6845
IMPORT W multiline_string_editor(std::string allowed_chars, std::string &target, FI font, int x_gap, int line_height)
Definition GameApi_gui.cc:4740
IMPORT W click_hide(W widget)
Definition GameApi.cc:17418
IMPORT W submenu(W menu, int menu_pane_id, std::vector< std::string > labels, FtA atlas, BM atlas_bm)
IMPORT W ml(ML p, SH sh, SH sh2, SH sh_2d, SH sh_arr, int sx, int sy, int screen_size_x, int screen_size_y)
Definition GameApi_gui.cc:4706
IMPORT int pos_y(W w)
Definition GameApi_gui.cc:6840
IMPORT std::string textureapi_functions_item_label(int i)
Definition GameApi_gui.cc:8708
IMPORT std::string fontapi_functions_item_label(int i)
Definition GameApi_gui.cc:8716
IMPORT W pts_dialog(PTS p, SH sh, int screen_size_x, int screen_size_y, W &close_button, FtA atlas, BM atlas_bm, W &codegen_button, W &collect_button)
Definition GameApi_gui.cc:5447
IMPORT W layout_lh(W item, int left, int top, int width, int height, int right, int bottom, int(*fptr_l)(void *), int(*fptr_H)(void *), void *ctx1, void *ctx2)
Definition GameApi_gui.cc:6104
IMPORT std::string linesapi_functions_item_label(int i)
Definition GameApi_gui.cc:8752
IMPORT W floatvolumeapi_functions_list_item(FtA font1, BM font1_bm, FtA font2, BM font2_bm, W insert, W *outer)
Definition GameApi_gui.cc:8972
IMPORT void set_dynamic_param(W w, int id, float val)
Definition GameApi_gui.cc:6942
IMPORT W canvas(int sx, int sy)
Definition GameApi_gui.cc:3735
IMPORT void insert_widget_activate(W w, bool b)
IMPORT W directory_view(std::vector< std::string > dir_items, int &selection, std::vector< W > &clicks, FtA atlas, BM atlas_bm)
Definition GameApi_gui.cc:5002
IMPORT W top_right_corner_match(W wid, W floating)
Definition GameApi.cc:17487
IMPORT W floatbitmapapi_functions_list_item(FtA font1, BM font1_bm, FtA font2, BM font2_bm, W insert, W *outer)
Definition GameApi_gui.cc:9015
IMPORT int get_size2(W w)
Definition GameApi_gui.cc:6957
IMPORT W overlap(EveryApi &ev, std::vector< W > vec)
Definition GameApi_gui.cc:4571
IMPORT W array_y(std::vector< W > arr, int y_gap, bool heavy=false)
Definition GameApi_gui.cc:6139
IMPORT W license_item(std::string filename, std::string &license_url, std::string &author, FtA atlas, BM atlas_bm, FtA atlas2, BM atlas_bm2)
Definition GameApi_gui.cc:4152
IMPORT W list_item_opened(int sx, std::string label, FtA atlas, BM atlas_bm, std::vector< std::string > subitems, std::vector< std::string > subitems_tooltip, FtA atlas2, BM atlas_bm2, W insert, bool hide, W *redraw_w, std::vector< std::string > subitems_funcname)
Definition GameApi_gui.cc:3823
IMPORT W fontapi_functions_list_item(FtA font1, BM font1_bm, FtA font2, BM font2_bm, W insert, W *outer)
Definition GameApi_gui.cc:8963
IMPORT W line(W target1, int delta_x, int delta_y, W target2, int delta2_x, int delta2_y, SH sh, SH old_sh)
Definition GameApi_gui.cc:3727
IMPORT W bitmapapi_functions_list_item(FtA font1, BM font1_bm, FtA font2, BM font2_bm, W insert, W *outer)
Definition GameApi_gui.cc:8933
IMPORT W linesapi_functions_list_item(FtA font1, BM font1_bm, FtA font2, BM font2_bm, W insert, W *outer)
Definition GameApi_gui.cc:8994
IMPORT W gradient(int sx, int sy, PT pos_1, PT pos_2, unsigned int colot_1, unsigned int color_2)
Definition GameApi_gui.cc:6621
IMPORT W polygon_dialog(P p, SH sh, int screen_size_x, int screen_size_y, W &close_button, FtA atlas, BM atlas_bm, W &codegen_button, W &collect_button, W &mem)
Definition GameApi_gui.cc:5175
IMPORT void set_index(W w, int j)
Definition GameApi_gui.cc:6967
IMPORT W download_bar(GameApi::EveryApi &ev, std::vector< std::string > titles, std::vector< W > &close_button, std::vector< W > &buttons, FtA atlas, BM atlas_bm, int active_tab, std::vector< float > progress)
Definition GameApi_gui.cc:5025
IMPORT int size_y(W w)
Definition GameApi_gui.cc:6850
IMPORT W hide_nonsearchable(W w, std::string label, W *redraw_w)
Definition GameApi_gui.cc:4605
IMPORT W boolbitmapapi_functions_list_item(FtA font1, BM font1_bm, FtA font2, BM font2_bm, W insert, W *outer)
Definition GameApi_gui.cc:9011
IMPORT W lines_dialog(LI p, SH sh, int screen_size_x, int screen_size_y, W &close_button, FtA atlas, BM atlas_bm, W &codegen_button, W &collect_button)
Definition GameApi_gui.cc:5404
IMPORT std::string pointapi_functions_item_label(int i)
Definition GameApi_gui.cc:8812
IMPORT W blockerapi_functions_list_item(GameApi::EveryApi &ev, FtA font1, BM font1_bm, FtA font2, BM font2_bm, W insert, W *outer)
Definition GameApi_gui.cc:8941
IMPORT W moveapi_functions_list_item(FtA font1, BM font1_bm, FtA font2, BM font2_bm, W insert, W *outer)
Definition GameApi_gui.cc:8956
IMPORT W progress_dialog(int sx, int sy, FtA atlas, BM atlas_bm, std::vector< std::string > vec, int val, int max)
Definition GameApi_gui.cc:4326
IMPORT W framebuffermoduleapi_functions_list_item(FtA font1, BM font1_bm, FtA font2, BM font2_bm, W insert, W *outer)
Definition GameApi_gui.cc:8990
IMPORT int pos_x(W w)
Definition GameApi_gui.cc:6835
IMPORT W booleanopsapi_functions_list_item(FtA font1, BM font1_bm, FtA font2, BM font2_bm, W insert, W *outer)
Definition GameApi_gui.cc:8951
IMPORT W icon_shared_noscale(BM bitmap, int key)
Definition GameApi_gui.cc:4674
IMPORT W click_visibility(W area_widget, W hidden_widget)
Definition GameApi.cc:17410
IMPORT W layer(W w1, W w2)
Definition GameApi_gui.cc:6123
IMPORT W navi_bar(EveryApi &ev, std::vector< std::string > titles, W &back_button, W &forward_button, W &save_button, std::string &url, W &url_button, std::vector< W > &close_button, std::vector< W > &tab_change_button, W &new_tab_button, std::vector< std::string > bookmark_labels, std::vector< std::string > bookmark_urls, FtA atlas, BM atlas_bm, int &active_tab)
Definition GameApi_gui.cc:5082
IMPORT W insert_widget(W item, std::function< void(int, int)> f)
Definition GameApi_gui.cc:9069
IMPORT W layout_wh(W item, int left, int top, int width, int height, int right, int bottom, int(*fptr_W)(void *), int(*fptr_H)(void *), void *ctx1, void *ctx2)
Definition GameApi_gui.cc:6090
IMPORT W window_decoration(int sx, int sy, std::string label, FtA atlas, BM atlas_bm)
Definition GameApi_gui.cc:5366
IMPORT W vectorapi_functions_list_item(FtA font1, BM font1_bm, FtA font2, BM font2_bm, W insert, W *outer)
Definition GameApi_gui.cc:9006
IMPORT std::string colorvolumeapi_functions_item_label(int i)
Definition GameApi_gui.cc:8789
IMPORT std::string polygonapi_functions_item_label(int i)
Definition GameApi_gui.cc:8760
IMPORT W button_with_icon(BM bitmap)
IMPORT W va_dialog(VA p, SH sh, int screen_size_x, int screen_size_y, W &close_button, FtA atlas, BM atlas_bm, W &codegen_button, W &collect_button)
Definition GameApi_gui.cc:5232
IMPORT void update_progress_dialog(volatile W &w, int sx, int sy, FtA atlas, BM atlas_bm, std::vector< std::string > vec, int val, int max, int process)
Definition GameApi_gui.cc:4438
GuiApi(Env &e, EveryApi &ev, SH sh)
Definition GameApi.hh:2256
IMPORT W shadermoduleapi_functions_list_item(FtA font1, BM font1_bm, FtA font2, BM font2_bm, W insert, W *outer)
Definition GameApi_gui.cc:8982
IMPORT W point_editor(float &x, float &y, float &z, FtA atlas, BM atlas_bm, int x_gap)
Definition GameApi_gui.cc:6054
IMPORT void set_pos(W w, float px, float py)
Definition GameApi_gui.cc:6855
IMPORT W scrollbar_x(int sx, int sy, int area_x)
Definition GameApi_gui.cc:6737
IMPORT W scrollbar_y(int sx, int sy, int area_y)
Definition GameApi_gui.cc:6733
IMPORT std::string framebuffermoduleapi_functions_item_label(int i)
Definition GameApi_gui.cc:8738
IMPORT std::string vectorapi_functions_item_label(int i)
Definition GameApi_gui.cc:8819
IMPORT W timed_visibility(W orig, W(*timed_widget_func)(void *), void *data, W insert, float start_duration, float duration, float dx)
Definition GameApi_gui.cc:3669
IMPORT W layout(W item, int left, int top, int width, int height, int right, int bottom)
Definition GameApi_gui.cc:6080
IMPORT int get_index(W w)
Definition GameApi_gui.cc:6952
IMPORT W alt(std::vector< W > vec, int *choose)
Definition GameApi_gui.cc:4626
IMPORT W dialog_border(W item)
IMPORT W right_align(W item, int sx)
Definition GameApi_gui.cc:5793
IMPORT W va(VA p, SH sh, int sx, int sy, int screen_size_x, int screen_size_y)
Definition GameApi_gui.cc:4699
IMPORT W pointapi_functions_list_item(FtA font1, BM font1_bm, FtA font2, BM font2_bm, W insert, W *outer)
Definition GameApi_gui.cc:9002
IMPORT W int_editor(int &target, std::string &target_expr, FtA atlas, BM atlas_bm, int x_gap, int noneditnum=0)
Definition GameApi_gui.cc:4923
IMPORT W copy_paste_dialog(SH sh, W &close_button, FI font, FtA atlas, BM atlas_bm, std::string &edit)
Definition GameApi_gui.cc:4961
IMPORT W alt(GameApi::EveryApi &ev, std::vector< W > vec, int *choose)
IMPORT std::string bitmapapi_functions_item_label(int i)
Definition GameApi_gui.cc:8686
IMPORT W polygonapi_functions_list_item(FtA font1, BM font1_bm, FtA font2, BM font2_bm, W insert, W *outer)
Definition GameApi_gui.cc:9020
IMPORT void set_size2(W w, int sz)
Definition GameApi_gui.cc:6962
IMPORT W editor_mouse_tweak(W inner, W outer, W outerouter)
Definition GameApi_gui.cc:390
IMPORT W tooltip(W orig, W insert, std::string label, FtA atlas, BM atlas_bm, int x_gap=2, float dx=40.0)
Definition GameApi_gui.cc:3712
IMPORT std::string get_id(W w)
Definition GameApi_gui.cc:6947
IMPORT W list_item(BM icon, std::string label, int sx, int sy)
IMPORT float dynamic_param(W w, int id)
Definition GameApi_gui.cc:6897
IMPORT std::string pointsapi_functions_item_label(int i)
Definition GameApi_gui.cc:8745
IMPORT W waveform(std::function< float(float)> f, float start_range, float end_range, float min_value, float max_value, int sx, int sy, unsigned int true_color, unsigned int false_color)
Definition GameApi_gui.cc:6756
IMPORT W window_move(W widget, int area_x, int area_y, int area_width, int area_height)
Definition GameApi_gui.cc:4110
IMPORT W scroll_area2(W orig, int sx, int sy, int screen_y)
Definition GameApi_gui.cc:6746
IMPORT W asset_view(std::string url_or_filename)
Definition GameApi_gui.cc:5018
IMPORT void select_item(W w, int item)
Definition GameApi_gui.cc:6892
IMPORT W shader_plane(SFO p, int sx, int sy, int screen_size_x, int screen_size_y)
Definition GameApi_gui.cc:4717
IMPORT W scroll_area(W orig, int sx, int sy, int screen_y)
Definition GameApi_gui.cc:6741
IMPORT std::vector< std::pair< std::string, std::string > > get_functions_mapping(GameApi::EveryApi &ev)
Definition GameApi_gui.cc:9081
IMPORT W dynamic_text(std::string need_letters, std::string *dyn_text, void(*fptr)(void *, float mouse_x, float mouse_y, int button, int ch, int type, int mouse_wheel_y), void *user_ptr, GameApi::FtA atlas, GameApi::BM atlas_bm, int x_gap)
Definition GameApi_gui.cc:4646
IMPORT std::string shaderapi_functions_item_label(int i)
Definition GameApi_gui.cc:8731
IMPORT W rectangle(int start_x, int end_x, int start_y, int end_y, unsigned int color)
Definition GameApi_gui.cc:4014
IMPORT W lines(LI p, SH sh, int sx, int sy, int screen_size_x, int screen_size_y)
Definition GameApi_gui.cc:4722
IMPORT std::string booleanopsapi_functions_item_label(int i)
Definition GameApi_gui.cc:8827
IMPORT W main_menu(std::vector< std::string > labels, FtA atlas, BM atlas_bm)
Definition GameApi_gui.cc:6150
IMPORT W waveformapi_functions_list_item(FtA font1, BM font1_bm, FtA font2, BM font2_bm, W insert, W *outer)
Definition GameApi_gui.cc:8937
IMPORT W list_item_title(int sx, std::string label, FtA atlas, BM atlas_bm)
Definition GameApi_gui.cc:3812
IMPORT int canvas_item_index(W canvas, W item)
Definition GameApi_gui.cc:3800
IMPORT W icon_shared(BM bitmap, int key)
Definition GameApi_gui.cc:4685
IMPORT W polygondistapi_functions_list_item(FtA font1, BM font1_bm, FtA font2, BM font2_bm, W insert, W *outer)
Definition GameApi_gui.cc:9024
IMPORT W search_panel(int sx, FtA atlas, BM atlas_bm, int x_gap, W *redraw_w)
Definition GameApi_gui.cc:4590
IMPORT int num_childs(W w)
Definition GameApi_gui.cc:6904
IMPORT W pts(PTS p, SH sh, int sx, int sy, int screen_size_x, int screen_size_y)
Definition GameApi_gui.cc:4726
IMPORT W long_editor(long &target, FtA atlas, BM atlas_bm, int x_gap, int noneditnum, std::string &expr)
Definition GameApi_gui.cc:4936
IMPORT std::string volumeapi_functions_item_label(int i)
Definition GameApi_gui.cc:8774
IMPORT W popup_menu(int x, int y, std::vector< std::string > labels, FtA atlas, BM atlas_bm, std::vector< W > &areas)
Definition GameApi_gui.cc:6790
IMPORT void update(W w, PT mouse_cursor_pos, int button, int ch, int type, int mouse_wheel_y)
Definition GameApi_gui.cc:6869
IMPORT W size(W item, int sx, int sy)
Definition GameApi_gui.cc:6118
IMPORT W dialog_item(std::string text, BM icon, int sx, int sy)
IMPORT std::string blockerapi_functions_item_label(GameApi::EveryApi &ev, int i)
Definition GameApi_gui.cc:8700
IMPORT W volumeapi_functions_list_item(FtA font1, BM font1_bm, FtA font2, BM font2_bm, W insert, W *outer)
Definition GameApi_gui.cc:8968
IMPORT W mouse_move(W widget, int area_x, int area_y, int area_width, int area_height)
Definition GameApi_gui.cc:4104
IMPORT W array_x(W *arr, int size, int x_gap)
Definition GameApi_gui.cc:6129
IMPORT W list(W *array, int size, int sx, int sy)
IMPORT W shaderapi_functions_list_item(FtA font1, BM font1_bm, FtA font2, BM font2_bm, W insert, W *outer)
Definition GameApi_gui.cc:8986
IMPORT W shader_dialog(SFO p, W &close_button, FtA atlas, BM atlas_bm, int screen_size_x, int screen_size_y, W &codegen_button, W &collect_button)
Definition GameApi_gui.cc:5322
IMPORT W asset_item(EveryApi &ev, std::string jpg_url, std::string jpg_display_name, FtA atlas, BM atlas_bm)
Definition GameApi_gui.cc:4177
IMPORT std::string floatbitmapapi_functions_item_label(int i)
Definition GameApi_gui.cc:8805
IMPORT W text(std::string label, FtA atlas, BM atlas_bm, int x_gap=3)
Definition GameApi_gui.cc:4658
IMPORT W center_y(W item, int sy)
Definition GameApi_gui.cc:5808
IMPORT W edit_dialog(const std::vector< std::string > &labels, const std::vector< EditTypes * > &vec, Ft font, const std::vector< std::string > &types, W &cancel_button, W &ok_button)
IMPORT int canvas_item(W canvas, W item, int x, int y)
Definition GameApi_gui.cc:3776
IMPORT void set_size(W ow, float sx, float sy)
Definition GameApi_gui.cc:6863
IMPORT W license_dialog(std::vector< std::string > filename, std::vector< std::string > &license_url, std::vector< std::string > &author_names, FtA atlas, BM atlas_bm, FtA atlas2, BM atlas_bm2, FtA atlas3, BM atlas_bm3, W &next_button, W &cancel_button, W &canvas2, W &canvas_area, W &scroll_bar)
Definition GameApi_gui.cc:4256
IMPORT W window_decoration2(int sx, int sy, std::string label, FtA atlas, BM atlas_bm, bool move)
Definition GameApi_gui.cc:5371
IMPORT W button_with_text(std::string label)
IMPORT W button(int sx, int sy, unsigned int color_1, unsigned int color_2)
Definition GameApi_gui.cc:6650
IMPORT W asset_dialog(EveryApi &ev, std::vector< std::string > jpg_urls, std::vector< std::string > jpg_display_names, W &select_button, W &cancel_button, FtA atlas, BM atlas_bm)
Definition GameApi_gui.cc:4192
IMPORT W hide_if_array_empty(W w, std::vector< W > items, W *redraw_w)
Definition GameApi_gui.cc:4612
IMPORT W bitmap_dialog(BM bm, W &close_button, FtA atlas, BM atlas_bm, W &codegen_button, W &collect_button, FtA atlas_tiny, BM atlas_tiny_bm)
Definition GameApi_gui.cc:5526
IMPORT void delete_widget(W w)
Definition GameApi_gui.cc:9075
IMPORT W canvas_item_gameapi_node(int sx, int sy, std::string label, std::vector< std::string > param_types, std::vector< std::string > param_tooltips, std::string return_type, FtA atlas, BM atlas_bm, std::vector< W * > connect_click, std::string uid, std::vector< W > &params, std::string symbol, std::string comment)
Definition GameApi_gui.cc:4454
IMPORT std::string floatvolumeapi_functions_item_label(int i)
Definition GameApi_gui.cc:8781
IMPORT W center_align(W item, int sx)
Definition GameApi_gui.cc:5803
IMPORT W poly(P p, SH sh, int sx, int sy, int screen_size_x, int screen_size_y)
Definition GameApi_gui.cc:4695
IMPORT W menu(W main_menu, int menu_id, std::vector< std::string > labels, FtA atlas, BM atlas_bm)
Definition GameApi_gui.cc:6760
IMPORT void set_id(W w, std::string id)
Definition GameApi_gui.cc:6972
IMPORT W icon(BM bitmap)
Definition GameApi_gui.cc:4670
IMPORT W opengl_wrapper(W widget)
IMPORT std::string waveformapi_functions_item_label(int i)
Definition GameApi_gui.cc:8693
IMPORT W pointsapi_functions_list_item(FtA font1, BM font1_bm, FtA font2, BM font2_bm, W insert, W *outer)
Definition GameApi_gui.cc:8998
IMPORT W get_child(W w, int i)
Definition GameApi_gui.cc:6914
IMPORT W key_area(W widget, int area_x, int area_y, int area_width, int area_height, int key)
Definition GameApi_gui.cc:4097
IMPORT W click_area(W widget, int area_x, int area_y, int area_width, int area_height, int button_id)
Definition GameApi_gui.cc:4091
IMPORT W layout_rb(W item, int left, int top, int width, int height, int right, int bottom, int(*fptr_r)(void *), int(*fptr_b)(void *), void *ctx1, void *ctx2)
Definition GameApi_gui.cc:6095
IMPORT W textureapi_functions_list_item(FtA font1, BM font1_bm, FtA font2, BM font2_bm, W insert, W *outer)
Definition GameApi_gui.cc:8946
IMPORT std::string polygondistapi_functions_item_label(int i)
Definition GameApi_gui.cc:8767
IMPORT std::string moveapi_functions_item_label(int i)
Definition GameApi_gui.cc:8834
IMPORT W empty()
Definition GameApi_gui.cc:3682
IMPORT void generic_to_string(const EditTypes &source, std::string type, std::string &target, std::string &expr)
Definition GameApi_gui.cc:5890
IMPORT W float_editor(float &target, std::string &target_expr, FtA atlas, BM atlas_bm, int x_gap, int noneditnum=0)
Definition GameApi_gui.cc:4748
IMPORT W popup_box_menu(std::vector< std::string > options, FtA atlas, BM atlas_bm)
Definition GameApi.cc:17494
IMPORT W highlight(int sx, int sy)
Definition GameApi_gui.cc:6071
IMPORT std::string shadermoduleapi_functions_item_label(int i)
Definition GameApi_gui.cc:8724
IMPORT void string_to_generic(EditTypes &target, std::string type, const std::string &source, const std::string &expr)
Definition GameApi_gui.cc:5824
IMPORT W color_editor(std::string &col, FtA atlas, BM atlas_bm, int x_gap, int noneditnum, std::string &expr)
Definition GameApi_gui.cc:4951
IMPORT W layout_lt(W item, int left, int top, int width, int height, int right, int bottom, int(*fptr_l)(void *), int(*fptr_t)(void *), void *ctx1, void *ctx2)
Definition GameApi_gui.cc:6085
IMPORT W find_canvas_item(W canvas, std::string id)
Definition GameApi_gui.cc:3739
IMPORT W string_editor(std::string allowed_chars, std::string &target, std::string &target_expr, FtA atlas, BM atlas_bm, int x_gap, int non_editable, W *redraw_w, bool allow_expr=true)
Definition GameApi_gui.cc:4731
IMPORT W left_align(W item, int sx)
Definition GameApi_gui.cc:5798
IMPORT W popup_box(std::string label, std::vector< std::string > options, FtA atlas, BM atlas_bm)
Definition GameApi.cc:17425
IMPORT int chosen_item(W w)
Definition GameApi_gui.cc:6886
IMPORT W url_editor(std::string &target, FtA atlas, BM atlas_bm, int x_gap, std::string &expr, int noneditnum=0)
Definition GameApi_gui.cc:4759
IMPORT W ml_dialog(ML p, SH sh, SH sh2, SH sh_2d, SH sh_arr, int screen_size_x, int screen_size_y, W &close_button, FtA atlas, BM atlas_bm, W &codegen_button, W &collect_button)
Definition GameApi_gui.cc:5275
IMPORT W enum_editor(EveryApi &ev, W &click_target, int &target, FtA atlas, BM atlas_bm, int x_gap, std::string type, std::string &expr, int noneditnum=0)
Definition GameApi_gui.cc:4793
IMPORT void del_canvas_item(W canvas, int id)
Definition GameApi_gui.cc:3789
Definition GameApi.hh:1649
IMPORT IM im_sphere(float r)
Definition GameApi_imp.cc:42
IMPORT FB render_lower(IM obj, float size_x, float size_y, int sx, int sy, float dx, float dy)
Definition GameApi_imp.cc:270
IMPORT BM render_upper_color(IM obj, float size_x, float size_y, int sx, int sy, float dx, float dy)
Definition GameApi_imp.cc:286
IMPORT IM im_translate(IM obj, float dx, float dy, float dz)
Definition GameApi_imp.cc:131
IMPORT ImplicitApi(Env &e)
Definition GameApi.cc:44487
IMPORT BM render_lower_color(IM obj, float size_x, float size_y, int sx, int sy, float dx, float dy)
Definition GameApi_imp.cc:281
IMPORT IM blob(float c, float c_x, float c_y, float cc_x, float cc_y)
Definition GameApi_imp.cc:85
IMPORT IM from_distance(FD fd, float pos_x, float pos_y, float pos_z, float u_x, float u_y, float u_z, float sx, float sy)
Definition GameApi_imp.cc:611
IMPORT IM from_distance_cyl(FD fd, float pos_x, float pos_y, float pos_z, float u_x, float u_y, float u_z, float sx, float sy)
Definition GameApi_imp.cc:616
IMPORT FB render_upper(IM obj, float size_x, float size_y, int sx, int sy, float dx, float dy)
Definition GameApi_imp.cc:275
IMPORT IM from_distance_sph(FD fd, float pos_x, float pos_y, float pos_z, float u_x, float u_y, float u_z, float sx, float sy)
Definition GameApi_imp.cc:622
IMPORT InputApi(Env &e)
Definition GameApi.cc:44492
Definition GameApi.hh:1803
static IMPORT void wasd_movement_event(MainLoopApi::Event &e, float &pos_x, float &pos_y, Wasd_data &data, float speed_x, float speed_y)
Definition GameApi_in.cc:10
static IMPORT void wasd_movement_frame(MainLoopApi::Event &e, float &pos_x, float &pos_y, Wasd_data &data, float speed_x, float speed_y)
Definition GameApi_in.cc:23
static IMPORT void quake_movement_frame(GameApi::EveryApi &ev, float &pos_x, float &pos_y, float &rot_y, Quake_data &data, float &speed_x, float &speed_y, float speed, float rot_speed)
Definition GameApi_in.cc:144
static IMPORT void quake_movement_event(GameApi::EveryApi &ev, MainLoopApi::Event &e, float &pos_x, float &pos_y, float &rot_y, Quake_data &data, float &speed_x, float &speed_y, float speed, float rot_speed)
Definition GameApi_in.cc:34
LAY split_xy(LAY l, int id, int num_x, int num_y)
Definition GameApi_lay.cc:30
int pos_y(LAY l, int id)
Definition GameApi_lay.cc:81
LAY split_y(LAY l, int id, int num)
Definition GameApi_lay.cc:12
IMPORT LayoutApi(Env &e)
Definition GameApi.cc:44525
LAY array(LAY *array, int *id, int size)
Definition GameApi_lay.cc:57
LAY root(int sx, int sy)
Definition GameApi_lay.cc:4
int count(LAY l)
Definition GameApi_lay.cc:71
int size_y(LAY l, int id)
Definition GameApi_lay.cc:92
int size_x(LAY l, int id)
Definition GameApi_lay.cc:87
LAY center(LAY l, int id, int content_size_x, int content_size_y)
Definition GameApi_lay.cc:48
LAY size(LAY l, int id, int lx, int size_x, int ty, int size_y)
int root_sx(LAY l)
int pos_x(LAY l, int id)
Definition GameApi_lay.cc:76
LAY split_x(LAY l, int id, int num)
Definition GameApi_lay.cc:21
int root_sy(LAY l)
Definition GameApi.hh:4165
IMPORT LI change_color2(LI li, unsigned int color_1, unsigned int color_2)
Definition GameApi_li.cc:33
IMPORT ML render_inst_ml2(EveryApi &ev, LI array, PTA pta, float linewidth)
Definition GameApi_li.cc:999
IMPORT LI point_array(std::vector< PT > vec)
Definition GameApi_li.cc:1753
IMPORT void prepare_inst_matrix(LLA array, MSA instances)
Definition GameApi_li.cc:1035
IMPORT LI lines_from_quads(P p, int sx, int sy)
Definition GameApi.cc:33161
IMPORT LI li_url(std::string url)
Definition GameApi_li.cc:2713
IMPORT LI border_from_bool_bitmap(BB b, float start_x, float end_x, float start_y, float end_y, float z)
Definition GameApi_li.cc:450
IMPORT LI from_points2(PTS start_points, PTS end_points)
Definition GameApi_li.cc:1659
IMPORT LI render_slice_2d(P p, PT pos, V u_x, V u_y)
Definition GameApi_li.cc:328
IMPORT ML render_ml(EveryApi &ev, LLA array, float linewidth)
Definition GameApi_li.cc:987
IMPORT LI li_url_nr(std::string url)
Definition GameApi_li.cc:2719
IMPORT LI li_empty()
Definition GameApi_li.cc:883
IMPORT LI split_lines(LI lines, float dist)
Definition GameApi_li.cc:1893
IMPORT LI li_or_elem(LI li1, LI li2)
Definition GameApi_li.cc:2388
IMPORT ML update_ml(LLA la, LI l)
Definition GameApi_li.cc:1313
IMPORT PTS pts_line_anim2(LI lines, std::function< float(int)> f)
Definition GameApi_li.cc:1389
IMPORT LI twist_y(LI lines, float y_0, float angle_per_y_unit)
Definition GameApi_li.cc:1922
IMPORT LI pos_choose(EveryApi &ev, FB bm, float pos, float start_x, float end_x, float start_y, float end_y, float z)
Definition GameApi_bm.cc:9604
IMPORT LI li_or_array(std::vector< LI > vec)
Definition GameApi_li.cc:2158
IMPORT LI from_points(PC points, bool loops)
Definition GameApi_li.cc:174
IMPORT void render_inst(LLA array, PTA instances)
Definition GameApi_li.cc:1060
IMPORT ML render_ml2(EveryApi &ev, LI array, float linewidth)
Definition GameApi_li.cc:991
IMPORT LLA prepare(LI l)
Definition GameApi_li.cc:1534
IMPORT LI random_angle(LI lines, float max_angle)
Definition GameApi_li.cc:2074
IMPORT ML render_inst_ml3_matrix(EveryApi &ev, LI array, MS pts, float linewidth)
Definition GameApi_li.cc:1007
IMPORT LI import_ifc(EveryApi &ev, std::string url)
IMPORT void prepare_inst(LLA array, PTA instances)
Definition GameApi_li.cc:1012
IMPORT void update(LLA la, LI l)
Definition GameApi_li.cc:1399
IMPORT LI translate(LI lines, float dx, float dy, float dz)
Definition GameApi_li.cc:303
IMPORT LI random_mesh_quad_lines(EveryApi &ev, P p, int count)
Definition GameApi_li.cc:1989
IMPORT LI rotz(LI lines, float angle)
Definition GameApi_li.cc:318
IMPORT LI from_plane(PL plane)
Definition GameApi_li.cc:165
IMPORT ML render_inst_ml(EveryApi &ev, LLA array, PTA pta, float linewidth)
Definition GameApi_li.cc:995
IMPORT LI color_function(LI lines, std::function< unsigned int(int linenum, bool id)> f)
Definition GameApi_li.cc:58
IMPORT LI from_polygon(P poly)
Definition GameApi_li.cc:377
IMPORT ML render_inst_ml3(EveryApi &ev, LI array, PTS pts, float linewidth)
Definition GameApi_li.cc:1003
IMPORT LI change_color(LI li, unsigned int color)
Definition GameApi_li.cc:28
IMPORT LI from_polygon2(P poly1, P poly2)
Definition GameApi_li.cc:183
IMPORT LI rotx(LI lines, float angle)
Definition GameApi_li.cc:308
IMPORT LI fur(PTS pts, PT center, float dist)
Definition GameApi_li.cc:1982
IMPORT LI unit_to_flex(LI orig, PT bTL, PT bTR, PT bBL, PT bBR, PT fTL, PT fTR, PT fBL, PT fBR)
IMPORT LI scale(LI lines, float m_x, float m_y, float m_z)
Definition GameApi_li.cc:323
IMPORT LI roty(LI lines, float angle)
Definition GameApi_li.cc:313
IMPORT P p_towards_normal(P p, float amount)
Definition GameApi_li.cc:2521
IMPORT LI line_pos_mult(float val, LI li)
Definition GameApi_li.cc:2335
IMPORT LI li_bevel(LI li, P p, float mix)
Definition GameApi_li.cc:2442
IMPORT LI normals_from_polygon(P poly, float length)
Definition GameApi_li.cc:269
IMPORT void render_inst_matrix(LLA array, MSA instances)
Definition GameApi_li.cc:1125
IMPORT LI li_matrix(LI lines, M matrix)
Definition GameApi_li.cc:297
IMPORT LI alt(std::vector< LI > v, int index)
Definition GameApi_pl.cc:14372
IMPORT LinesApi(Env &e)
Definition GameApi.cc:44519
IMPORT ML ml_li_render(EveryApi &ev, LI l, float linewidth)
Definition GameApi_li.cc:1526
IMPORT P line_anim(P poly, LI lines_from_polygon2, float val)
Definition GameApi_li.cc:367
IMPORT PTS pts_line_anim(LI lines, float val)
Definition GameApi_li.cc:1379
IMPORT LI unit_to_cube(LI orig, PT pos, V u_x, V u_y, V u_z)
IMPORT P line_product(LI lines1, LI lines2)
Definition GameApi_li.cc:1726
IMPORT LI unit_cube(LI orig, PT pos, V u_x, V u_y, V u_z)
void set_scale(float mult_x, float mult_y, float mult_z)
Definition GameApi.hh:5738
void set_var(std::string name, float r, float g, float b, float a)
Definition GameApi.hh:5753
void prepare(bool keep=false)
Definition GameApi.hh:5727
void render()
Definition GameApi.hh:5728
LinesObj(EveryApi &ev, LI li, SH sh)
Definition GameApi.hh:5718
void set_rotation_matrix2(M m)
Definition GameApi.hh:5748
void set_rotation_matrix(M m)
Definition GameApi.hh:5743
void set_pos(float pos_x, float pos_y, float pos_z)
Definition GameApi.hh:5733
Definition GameApi.hh:4545
IMPORT FML low_activate_snapshot(EveryApi &ev, FML ml, int key, MN move, float duration, FML next)
Definition GameApi.cc:36642
IMPORT FML qml_create_node(std::string url)
Definition GameApi_qt.cc:429
IMPORT W w_bitmap(BM bm)
Definition GameApi.cc:39043
IMPORT LowFrameBufferApi(Env &e)
Definition GameApi.cc:44523
IMPORT BM low_frame_bitmap(FML ml, int sx, int sy)
Definition GameApi.cc:36567
IMPORT FML low_sprite_array(std::string name, std::string url, std::vector< BM > bms, MN mn, int x, int y, int fmt, float start_time)
Definition GameApi.cc:35313
IMPORT FML w_root(GameApi::EveryApi &ev, GameApi::W wd)
Definition GameApi.cc:38859
IMPORT W w_text(EveryApi &ev, Ft font, std::string str, int x_gap, float baseline)
Definition GameApi.cc:39094
IMPORT W w_layout(std::vector< W > vec, std::string url)
Definition GameApi.cc:38866
IMPORT FML low_poly_draw(std::string name, P p, MN mn)
Definition GameApi.cc:33923
IMPORT FML low_collision(FML ml, float start_x, float end_x, float start_y, float end_y, int key)
Definition GameApi.cc:36531
IMPORT FML qml_print(std::string url)
Definition GameApi_qt.cc:382
IMPORT W w_rect(unsigned int color)
Definition GameApi.cc:38966
IMPORT FML low_build_world(FML ml, std::string url, std::string chars, int x, int y)
Definition GameApi.cc:35877
IMPORT FML low_scroll_world(FML ml, float speed_x, float speed_y, float p_x, float p_y, float left_offset, float right_offset, float height, float height2, int mode, int jump_frames)
Definition GameApi.cc:35765
IMPORT FML low_render_world(std::vector< BM > blocks, int screen_width, int screen_height, int fmt)
Definition GameApi.cc:35551
IMPORT FML low_sprite_draw(std::string name, BM bm, MN mn, int x, int y, int fmt, float start_time)
Definition GameApi.cc:33741
IMPORT FML low_key_bm_prepare(FML ml, BM bm, int key, FML normal, float duration, FML next)
Definition GameApi.cc:36633
IMPORT FML low_enemy_draw(BM bm, std::string url, int fmt, float speed)
Definition GameApi.cc:36339
IMPORT FML low_enemy_draw2(std::vector< BM > bm, std::string url, int fmt, float speed, int time_delta, int time_duration)
Definition GameApi.cc:36458
IMPORT FBU low_framebuffer(FML mainloop, int format, int width, int height, int depth)
Definition GameApi.cc:36233
IMPORT RUN low_framebuffer_run(EveryApi &ev, FBU buffer, int mode, int scr_x, int scr_y)
Definition GameApi.cc:33593
Definition GameApi.hh:442
IMPORT ML mouse_roll_zoom(EveryApi &ev, ML next)
Definition GameApi_pl.cc:26419
IMPORT SHP timed_shp_p3d(float start_time, float end_time, SHP next, int num, PT start_value, PT end_value)
Definition cpushader.cc:327
IMPORT PT random_point_3d(float start_x, float end_x, float start_y, float end_y, float start_z, float end_z)
Definition GameApi_main.cc:314
IMPORT ML mouse_roll_zoom2(EveryApi &ev, ML nect)
Definition GameApi_pl.cc:26424
GameApi::ML lod_gpu_matrix(GameApi::EveryApi &ev, GameApi::P p, GameApi::MT mat, GameApi::MS ms, float level1_tri, float level1_quad, float level1_polygon, float level2_tri, float level2_quad, float level2_polygon, float level3_tri, float level3_quad, float level3_polygon, float level4_tri, float level4_quad, float level4_polygon, int l1, int l2, int l3, int l4)
Definition GameApi.cc:44656
IMPORT ~MainLoopApi()
Definition GameApi_main.cc:31
IMPORT ML save_script(HML h, std::string filename)
Definition GameApi.cc:26906
IMPORT ML activate_array(std::vector< ML > vec)
Definition GameApi.cc:39604
IMPORT PTS score_hide_pts(PTS pts)
Definition GameApi.cc:32987
IMPORT ML array_timing_chain_key_ml(EveryApi &ev, int key, float time_after_key, std::string durations, std::vector< ML > vec, int repeat)
Definition GameApi_main.cc:4550
IMPORT ML concurrent_download(ML ml)
Definition GameApi_main.cc:4870
IMPORT void load_ds_from_temp3(std::string filename)
Definition GameApi.cc:31979
IMPORT ML flip_scene_x_if_mobile(EveryApi &ev, ML ml)
Definition GameApi.cc:39770
IMPORT void outline_disable()
Definition GameApi_main.cc:1255
IMPORT ML slow_activate_item(ML ml, int i)
Definition GameApi.cc:39665
IMPORT void outline_first()
Definition GameApi_main.cc:1223
IMPORT ML display_background(EveryApi &ev, ML ml, bool is_logo=false)
Definition GameApi_main.cc:2975
IMPORT int get_screen_rect_sx()
Definition GameApi_main.cc:746
IMPORT ARR gltf_anim_skeleton(EveryApi &ev, TF model0, int skin_num, int animation, int channelk, int num_keyframes)
IMPORT CX cache_one(P p, MT mt)
Definition GameApi_pl.cc:27476
IMPORT ML depthmask(ML ml, bool b)
Definition GameApi_main.cc:3694
IMPORT BM framebuffer_bitmap(FBU framebuffer)
Definition GameApi.cc:35912
IMPORT ML save_gltf(TF tf, std::string filename)
Definition GameApi_gltf.cc:15650
IMPORT INP move_collision(IBM scene, float start_x, float end_x, float start_y, float end_y, float s_x, float m_x, float e_x, float s_y, float m_y, float e_y, float speed_up, float speed_down, float speed_left, float speed_right, float speed_gravity)
Definition GameApi.cc:32491
IMPORT DS load_ds_from_mem(const unsigned char *buf, const unsigned char *end)
Definition GameApi.cc:32000
IMPORT TT timing_start()
Definition GameApi_main.cc:4499
IMPORT V random_dir_vector_2d_xz(float length)
Definition GameApi_main.cc:348
IMPORT ML setup_hmd_projection(EveryApi &ev, ML ml, bool eye, bool is_standard, float n, float f, bool translate)
Definition GameApi_vr.cc:724
IMPORT ML timed_tmp_seq_ml(ML curr, ML end, float start_time, float end_time, float show_duration, int key)
Definition GameApi_main.cc:2036
IMPORT TF tf_join(EveryApi &ev, TF tf)
Definition GameApi_gltf.cc:17457
IMPORT void delay(int ms)
Definition GameApi_main.cc:300
IMPORT ML tunnel_tree(EveryApi &ev, std::vector< P > faces, std::vector< MN > moves, std::string url, MT mat2)
Definition GameApi.cc:43838
IMPORT void save_png_store(std::string filename, BM bm)
Definition Main.cc:1746
IMPORT TT timing(float duration, TT link, ML show)
Definition GameApi_main.cc:4812
IMPORT void waittof()
IMPORT ARR activate_arr_arr(std::vector< ML > arr)
Definition GameApi.cc:39675
IMPORT TT timing_event(IF fetch, TT timing, ML show)
Definition GameApi_main.cc:4804
IMPORT ML print_deps(ML ml, int num)
Definition GameApi.cc:44341
IMPORT BM img_decode(MB memblock)
Definition GameApi.cc:42407
IMPORT HML emscripten_frame(EveryApi &ev, RUN r, std::string homepage)
IMPORT float get_time()
Definition GameApi_main.cc:1004
IMPORT ML gltf_anim4(EveryApi &ev, TF model0, int animation, int channel, float mix, float self_mult, float rest_mult, int mode, float light_dir_x, float light_dir_y, float light_dir_z, float border_width, unsigned int border_color, bool acesfilm, bool emissive, int frame_skip, int lod_level)
Definition GameApi_gltf.cc:13610
IMPORT ML disable_z_buffer(ML ml)
Definition GameApi_main.cc:4148
IMPORT ML cursorkeys_to_wasd(ML ml)
Definition GameApi.cc:44474
IMPORT ML load_midi(EveryApi &ev, ML next, std::string url, std::string url_patchset)
Definition GameApi_main.cc:3527
IMPORT ML generic_shader_fragment_only(EveryApi &ev, ML ml, SHI fragment, std::vector< TXID > vec)
Definition cpushader.cc:912
GameApi::ML lod_anim(GameApi::EveryApi &ev, GameApi::TF tf, GameApi::PTS pts, float level1, float level2, float level3, float level4, int l1, int l2, int l3, int l4, float mix, float self_mult, float rest_mult, int mode, std::string keys, float light_dir_x, float light_dir_y, float light_dir_z, float border_width, unsigned int border_color, bool transparent, bool acesfilm, int start_anim_seq, bool emissive, int frame_skip)
Definition GameApi.cc:44552
IMPORT ML read_obj_pos(std::string url)
Definition GameApi.cc:41412
IMPORT ARR load_BM_script_array(EveryApi &ev, std::string url, std::string p1, std::string p2, std::string p3, std::string p4, std::string p5)
Definition GameApi.cc:30439
IMPORT ML time_display(EveryApi &ev, ML ml, std::string font, float start_time)
Definition GameApi.cc:26504
IMPORT ML lod_matrix(EveryApi &ev, P p, MT mat, MS ms, float level1, float level2, float level3, float level4, int l1, int l2, int l3, int l4)
Definition GameApi.cc:44662
IMPORT ML drag_drop_area(EveryApi &ev, ML mainloop, RUN(*fptr)(Env &e, EveryApi &ev, std::string filename))
Definition GameApi.cc:38770
IMPORT HML emscripten_frame2_MN(EveryApi &ev, MN mn, std::string homepage)
Definition GameApi.cc:40127
IMPORT ML create_objs(EveryApi &ev, int area_id)
Definition GameApi.cc:41645
IMPORT ML gltf_mesh_all_anim(EveryApi &ev, TF model0, float mix, float self_mult, float rest_mult, int mode, std::string keys, float light_dir_x, float light_dir_y, float light_dir_z, float border_width, unsigned int border_color, bool transparent, bool acesfilm, int start_anim_seq, bool emissive, int frame_skip, int lod_level)
Definition GameApi_gltf.cc:11966
void alpha_1(bool enabled)
Definition GameApi_main.cc:926
IMPORT ML matrix_range_check(EveryApi &ev, ML ml, ML ml2, std::string url)
Definition GameApi.cc:39929
IMPORT ML scale_2d_screen(EveryApi &ev, ML orig, float sx, float sy)
Definition GameApi.cc:26277
IMPORT void check_glerrors(std::string context)
Definition GameApi_main.cc:1082
IMPORT ML hires_ml(EveryApi &ev, ML I3, int size, int numsamples, float blur_radius)
Definition GameApi.cc:8905
IMPORT void clear(unsigned int col=0xff000000)
Definition GameApi_main.cc:829
IMPORT ML lod(EveryApi &ev, P p, MT mat, PTS pts, float level1, float level2, float level3, float level4, int l1, int l2, int l3, int l4)
Definition GameApi.cc:44638
IMPORT ML gs_obj_pos(GS gs, ML ml, int x, int y, int z)
Definition GameApi.cc:44144
IMPORT PTS bytestore_pts(BS bs, PTS pts, char disable_char, char enable_char, bool default_is_enable)
Definition GameApi_pl.cc:29691
IMPORT void set_viewport(int x, int y, int sx, int sy)
Definition GameApi_main.cc:2750
IMPORT void fpscounter_swapbuffersready()
Definition GameApi_main.cc:451
IMPORT SHI generic_anim_shader(SHP, std::string, std::string, std::vector< SHI > children)
Definition cpushader.cc:1572
IMPORT BM screenshot()
Definition GameApi_main.cc:1041
IMPORT ML right_mouse_pan(EveryApi &ev, ML next)
Definition GameApi_pl.cc:26489
IMPORT ML perspective(EveryApi &ev, ML next, float mult, float front_plane, float end_plane)
Definition GameApi_pl.cc:26251
IMPORT void fpscounter_frameready()
Definition GameApi_main.cc:441
IMPORT ML load_zip_assets(std::string zip_url)
Definition GameApi_gltf.cc:16432
IMPORT ML score_adder(EveryApi &ev, ML ml, O o, MN transform, int enter_score, int leave_score, int dyn_point, float timeout)
Definition GameApi.cc:32911
IMPORT bool is_gltf_animated(EveryApi &ev, TF tf)
Definition GameApi.cc:45734
IMPORT ARR gltf_mesh_all_parr(EveryApi &ev, TF model0, float mix, float light_dir_x, float light_dir_y, float light_dir_z, int skin_num)
IMPORT FML array_fml(std::vector< FML > vec)
Definition GameApi_main.cc:2811
IMPORT void antialias(bool enabled)
Definition GameApi_main.cc:948
IMPORT TF gltf_loadKK(std::string base_url, std::string url)
Definition GameApi_gltf.cc:15666
IMPORT IF state_int_fetcher(std::string url, std::string states)
Definition GameApi.cc:35049
IMPORT void init_window(int screen_width=800, int screen_height=600, std::string window_title="meshpage.org -- the next technology level for web", bool vr_init=false)
Definition GameApi_main.cc:96
IMPORT std::vector< GameApi::MT > gltf_mesh_all_parr_mat(EveryApi &ev, TF model0, float mix, float light_x, float light_y, float light_z, int skin_num)
IMPORT ML send_key_at_time(ML ml, float time, int key)
Definition GameApi_main.cc:4188
IMPORT ARR gltf_mesh_all_p_arr(GameApi::EveryApi &ev, TF model0, float light_dir_x, float light_dir_y, float light_dir_z, bool transparent, bool emissive, int lod_level)
Definition GameApi_gltf.cc:11786
IMPORT V random_dir_vector_2d_xy(float length)
Definition GameApi_main.cc:337
IMPORT MN load_MN_script(EveryApi &ev, std::string url, std::string p1, std::string p2, std::string p3, std::string p4, std::string p5)
Definition GameApi.cc:30199
IMPORT ML double_instancing_matrix(EveryApi &ev, P p, MS static_ms, MS real_ms, MT mat)
Definition GameApi_pl.cc:31708
IMPORT ML turn_to_meters(EveryApi &ev, ML ml, float sx1, float sx2, float sy1, float sy2, float sz1, float sz2)
Definition GameApi_sp.cc:422
IMPORT INP gravity(INP im, IBM bitmap, float start_x, float end_x, float start_y, float end_y, float speed)
Definition GameApi.cc:32610
IMPORT PT random_point_2d(float start_x, float end_x, float start_y, float end_y, float z)
Definition GameApi_main.cc:326
IMPORT ML load_ML_script2(EveryApi &ev, HML h, std::string p1, std::string p2, std::string p3, std::string p4, std::string p5)
Definition GameApi.cc:30188
IMPORT PKG load_um(DS st)
Definition GameApi.cc:42498
IMPORT void call_execute_hack(ML ml)
Definition GameApi.cc:32005
IMPORT ML bytestore_array(EveryApi &ev, BS store, std::string url, float delta_time)
Definition GameApi_pl.cc:29528
IMPORT ML ml_empty()
Definition GameApi_gltf.cc:11931
IMPORT void clear_3d_transparent()
Definition GameApi_main.cc:853
IMPORT V random_dir_vector_3d(float length)
Definition GameApi_main.cc:360
IMPORT float get_delta_time()
Definition GameApi_main.cc:1011
IMPORT ML fullscreen_button(EveryApi &ev)
Definition GameApi_fnt.cc:2869
IMPORT ARR gltf_mesh_all_msarr(EveryApi &ev, TF model0, int skin_num)
IMPORT void start_editor_state()
Definition GameApi_main.cc:525
IMPORT void event_ml(ML ml, const Event &e)
Definition GameApi_main.cc:2220
IMPORT M in_P(EveryApi &ev, bool is_3d)
Definition GameApi_main.cc:3303
IMPORT void print_profile()
Definition GameApi_main.cc:406
IMPORT ML restart_game(EveryApi &ev, ML ml, int key)
Definition GameApi.cc:39820
IMPORT ML choose_ml_from_status(ML connect, ML download, ML prepare)
Definition GameApi_main.cc:3038
IMPORT int get_screen_sx()
Definition GameApi_main.cc:762
IMPORT ML game(EveryApi &ev, int tile_sx, int tile_sy, std::string url, std::string url2, std::string url3, std::string url4, std::string tiles_string, std::string tiles_string2, int start_pos_x, int start_pos_y, int player_start_tile, int player_end_tile, BM tile_bm, BM player_bm, BM ruohikko_bm, BM corn_bm, BM vesisade_bm, BM jump_bm, FI font, BM status_bm, BM splash, std::vector< BM > item_types, std::vector< BM > enemy_types, BM weapon_bm, std::vector< BM > enemy_child_death, BM aku_death)
Definition GameApi_bm.cc:8981
IMPORT void switch_to_3d(bool b, SH sh, int screen_width=800., int screen_height=600)
Definition GameApi_main.cc:773
IMPORT P gltf_scene_p(GameApi::EveryApi &ev, TF model0, int scene_id)
Definition GameApi_gltf.cc:13505
IMPORT ML collision_detection(EveryApi &ev, float player_size, float enemy_size, ML normal_game_screen, ML gameover_screen)
Definition GameApi_main.cc:2054
IMPORT M in_MV(EveryApi &ev, bool is_3d)
Definition GameApi_main.cc:3346
IMPORT ML whack_a_mole_collision(ML ml)
Definition GameApi.cc:42042
IMPORT TRB transfer_id()
Definition GameApi_pl.cc:15330
IMPORT void clear_3d(unsigned int col=0xff000000)
Definition GameApi_main.cc:862
IMPORT void save_ds_store(std::string filename, DS ds)
Definition GameApi.cc:32158
IMPORT ML gltf_mesh_all_anim_inst_matrix(EveryApi &ev, TF model0, TF resize_obj, MS ms, float mix, float self_mult, float rest_mult, int mode, std::string keys, float light_dir_x, float light_dir_y, float light_dir_z, float border_width, unsigned int border_color, bool transparent, bool acesfilm, bool emissive, int anim_skip, int lod_level)
Definition GameApi_gltf.cc:11999
IMPORT SHI phong_fragment(SHI next, unsigned int ambient, unsigned int highlight, float pow)
Definition cpushader.cc:579
IMPORT P load_P_script(EveryApi &ev, std::string url, std::string p1, std::string p2, std::string p3, std::string p4, std::string p5)
IMPORT ARR load_shader2(std::string vertex_url, std::string fragment_url)
Definition cpushader.cc:1461
IMPORT ML async_url(std::string url, ML ml)
Definition GameApi_gui.cc:7922
IMPORT DS load_ds_from_disk_incrementally(std::string filename)
Definition GameApi.cc:30616
IMPORT ML score_hidder(EveryApi &ev, ML ml, O o, int max_count)
Definition GameApi.cc:33048
IMPORT SHP constant_shp_uvw(SHP next, int num, PT value)
Definition cpushader.cc:305
IMPORT ML load_song(EveryApi &ev, ML next, std::string url)
Definition GameApi_main.cc:3444
IMPORT ML memmap_window2(EveryApi &ev, std::string url)
Definition GameApi.cc:43434
IMPORT DS load_ds_from_temp2(std::string filename)
Definition GameApi.cc:31974
IMPORT ML gs_mouse_pos(GS gs, ML ml, int x, int y)
Definition GameApi.cc:44138
IMPORT ML gltf_anim2(EveryApi &ev, TF model0, int animation, int channel)
IMPORT MN state_speed_movement(MN mn, std::string url, std::string states, std::string x_speeds, std::string y_speeds, std::string z_speeds)
Definition GameApi.cc:35140
GameApi::ML lod_anim_matrix(GameApi::EveryApi &ev, GameApi::TF tf, GameApi::MS ms, float level1, float level2, float level3, float level4, int l1, int l2, int l3, int l4, float mix, float self_mult, float rest_mult, int mode, std::string keys, float light_dir_x, float light_dir_y, float light_dir_z, float border_width, unsigned int border_color, bool transparent, bool acesfilm, int start_anim_seq, bool emissive, int frame_skip)
Definition GameApi.cc:44576
IMPORT ML chai_mainloop(EveryApi &ev, std::string url)
IMPORT HML load_zip2(EveryApi &ev, std::string zip_url)
Definition GameApi_gltf.cc:16829
GameApi::ML lod_matrix_tf(GameApi::EveryApi &ev, GameApi::TF p, GameApi::MS ms, float level1, float level2, float level3, float level4, int l1, int l2, int l3, int l4, float mix, float selt_mult, float rest_mult, int mode, float light_dir_x, float light_dir_y, float light_dir_z, float border_width, unsigned int border_color, bool transparent, bool acesfilm, float start_brightness, float end_brightness, bool emissive)
Definition GameApi.cc:44813
IMPORT ML disable_resize(ML ml)
Definition GameApi_pl.cc:14842
IMPORT TF gltf_load_sketchfab_zip(std::string url_to_zip)
Definition GameApi_gltf.cc:16872
IMPORT ML gltf_mesh_all_inst_matrix(EveryApi &ev, TF model0, TF resize_obj, MS ms, float mix, float self_mult, float rest_mult, int mode, float light_dir_x, float light_dir_y, float light_dir_z, float border_width, unsigned int border_color, bool transparent, bool acesfilm, std::string keys, bool emissive, int lod_level)
Definition GameApi_gltf.cc:11954
IMPORT void swapbuffers()
Definition GameApi_main.cc:1112
IMPORT void save_logo(EveryApi &ev)
Definition GameApi_main.cc:2824
IMPORT SHI empty_shaderI()
Definition cpushader.cc:362
GameApi::ML lod_gpu(GameApi::EveryApi &ev, GameApi::P p, GameApi::MT mat, GameApi::PTS pts, float level1_tri, float level2_tri, float level3_tri, float level4_tri, int l1, int l2, int l3, int l4)
Definition GameApi.cc:44618
IMPORT TT timing_switch(EveryApi &ev, float duration, TT link, ML show, ML show2, int switch_dir)
Definition GameApi_main.cc:4816
IMPORT ML AI_modified(EveryApi &ev, ML ml, std::string url)
Definition GameApi.cc:46215
IMPORT ML record_keypresses(ML ml, std::string output_filename)
Definition GameApi_main.cc:3889
IMPORT void set_homepage_url(std::string url)
Definition GameApi_main.cc:3367
IMPORT ML android_resize(EveryApi &ev, ML ml, float mult)
Definition GameApi.cc:44422
IMPORT INP move_sequence(float start_time, float time_per_char, std::string str)
Definition GameApi.cc:32378
IMPORT ML playback_keypresses(ML ml, std::string input_url)
Definition GameApi_main.cc:3960
IMPORT HML emscripten_frame2_MT(EveryApi &ev, MT mt, std::string homepage)
Definition GameApi.cc:40093
IMPORT P edit_3d_p(EveryApi &ev)
Definition GameApi.cc:44020
IMPORT ML anim_ML(EveryApi &ev, std::string url, std::string p1, std::string p2, std::string p3, std::string p4, std::string p5, IF dyn)
Definition GameApi.cc:30167
IMPORT MT load_MT_script(EveryApi &ev, std::string url, std::string p1, std::string p2, std::string p3, std::string p4, std::string p5)
Definition GameApi.cc:30208
IMPORT ML dyn(D d)
Definition GameApi_main.cc:4019
IMPORT SHP timed_shp_u(float start_time, float end_time, SHP next, int num, unsigned int start_value, unsigned int end_value)
Definition cpushader.cc:322
IMPORT ML restart_screen(EveryApi &ev, ML ml, std::string fontname)
Definition GameApi_main.cc:3808
IMPORT int get_screen_sy()
Definition GameApi_main.cc:767
IMPORT ML gltf_mesh_all_inst(EveryApi &ev, TF model0, float mix, float light_dir_x, float light_dir_y, float light_dir_z, int skin_id)
IMPORT ML android_landscape_scale(EveryApi &ev, ML ml)
Definition GameApi_main.cc:2955
IMPORT ML memmap_window(EveryApi &ev, PKG p)
Definition GameApi.cc:43099
GameApi::ML glb_to_download_bar(TF tf, std::string filename)
Definition GameApi_gltf.cc:17265
IMPORT ML save_deploy(HML h, std::string filename, GameApi::EveryApi &ev)
Definition GameApi.cc:28914
IMPORT SHC load_shader(std::string shader_url)
Definition cpushader.cc:1457
IMPORT ML double_instancing(EveryApi &ev, P p, PTS static_inst, PTS real_inst, MT mat)
Definition GameApi_pl.cc:31701
IMPORT ARR gltf_mesh_all_mt_arr(EveryApi &ev, TF model0, float mix, float self_mult, float rest_mult, float light_dir_x, float light_dir_y, float light_dir_z, bool transparent, bool emissive, int lod_level)
Definition GameApi_gltf.cc:11903
IMPORT SHP constant_shp_i(SHP next, int num, int value)
Definition cpushader.cc:289
IMPORT HML emscripten_frame2(EveryApi &ev, RUN r, std::string homepage, bool is_envparams_arr=false)
Definition GameApi.cc:40232
IMPORT PTS whack_a_mole_explosion(EveryApi &ev)
Definition GameApi.cc:42178
IMPORT Event get_event()
Definition GameApi_main.cc:1350
IMPORT ML score_display(EveryApi &ev, ML ml, std::string font)
Definition GameApi.cc:26439
IMPORT std::string ds_to_string(DS ds)
Definition GameApi.cc:32075
IMPORT UV face_fetcher(P p, int facenum)
Definition GameApi_fnt.cc:1581
IMPORT void reset_time()
Definition GameApi_main.cc:1024
IMPORT ML vr_scale(ML ml, float)
Definition GameApi_vr.cc:51
IMPORT void fpscounter_framestart()
Definition GameApi_main.cc:433
IMPORT ML fps_display(EveryApi &ev, ML ml, std::string font)
Definition GameApi.cc:26570
IMPORT HML emscripten_frame2_ML(EveryApi &ev, ML ml, std::string homepage)
Definition GameApi.cc:40196
IMPORT ML phong_shader3(EveryApi &ev, ML ml, unsigned int ambient, unsigned int highlight, float pow)
Definition cpushader.cc:927
IMPORT ML progress_bar_config(ML ml, bool progress_impl, bool max_impl, bool install_impl, float mult_ems0, float mult_ems1, float mult_ems2, float mult_builder)
Definition GameApi.cc:45924
IMPORT ML touch_rotate(EveryApi &ev, ML ml, bool leftright, bool topdown, float x_speed, float y_speed)
Definition GameApi.cc:26433
IMPORT M in_T(EveryApi &ev, bool is_3d)
Definition GameApi_main.cc:3335
IMPORT ML dyn_points(EveryApi &ev, ML ml, MN move, int pointnum, float pos_x, float pos_y, float pos_z)
Definition GameApi.cc:32696
IMPORT ML gltf_mesh_all_inst2(EveryApi &ev, TF model0, TF resize_obj, PTS pts, float mix, float self_mult, float rest_mult, int mode, float light_dir_x, float light_dir_y, float light_dir_z, float border_width, unsigned int border_color, bool transparent, bool acesfilm, std::string keys, bool emissive, int lod_level)
Definition GameApi_gltf.cc:11948
IMPORT void finish()
Definition GameApi_main.cc:1077
IMPORT ML transparent(ML ml)
Definition GameApi.cc:6285
IMPORT ML small_window(EveryApi &ev, ML ml, int x, int y, int sx, int sy)
Definition GameApi.cc:38010
IMPORT float get_frame_time() const
Definition GameApi_main.cc:2573
ML mesh_anim_2(std::vector< P > time_range_start_mesh_array, std::vector< P > time_range_end_mesh_array, std::vector< MN > moves_array, std::vector< MT > materials_array, std::vector< MS > matrix_array_arrays, std::vector< IF > state_machines, std::string optional_time_range_duration_array_with_separators_float, std::string url_to_mp_file)
Definition GameApi.cc:45625
IMPORT ML depthfunc(ML ml, int val)
Definition GameApi_main.cc:3688
IMPORT ML bytestore_render(EveryApi &ev, BS bs, std::vector< ML > mls, std::string url, float delta_x, float delta_y)
Definition GameApi_pl.cc:29646
IMPORT int get_corner_x()
Definition GameApi_main.cc:736
IMPORT ML joystick_printer(ML ml)
Definition GameApi_main.cc:2088
IMPORT void end_editor_state()
Definition GameApi_main.cc:531
IMPORT ML load_zip(EveryApi &ev, std::string zip_url)
Definition GameApi_gltf.cc:16856
IMPORT ML ml_load_um(EveryApi &ev, std::string url)
Definition GameApi.cc:42547
IMPORT INP cursor_keys_rotate_move(float speed_rot, float pos_forward, float pos_normal, float pos_backward)
Definition GameApi.cc:32374
IMPORT ML collision_gen_key(ML curr, std::string obj1, std::string obj2, int key, float duration)
Definition GameApi_main.cc:2048
IMPORT ML async_gltf(ML ml, TF tf)
Definition GameApi_gltf.cc:15468
IMPORT ARR load_ML_script_array(EveryApi &ev, std::string url, std::string p1, std::string p2, std::string p3, std::string p4, std::string p5)
Definition GameApi.cc:30218
IMPORT ML screenspace_rendering(EveryApi &ev, ML scene, SMT screenspace_material)
Definition GameApi_main.cc:4283
IMPORT ML prepare_pts(ML ml, PTS pts)
Definition GameApi_main.cc:3615
IMPORT ARR load_P_script_array(EveryApi &ev, HML hml, std::string p1, std::string p2, std::string p3, std::string p4, std::string p5)
Definition GameApi.cc:29263
GameApi::ML lod_gpu_matrix_tf(GameApi::EveryApi &ev, GameApi::P p, GameApi::MT mat, GameApi::MS pts, float level1_tri, float level2_tri, float level3_tri, float level4_tri, int l1, int l2, int l3, int l4, float mix, float self_mult, float rest_mult, int mode, float light_dir_x, float light_dir_y, float light_dir_z, float border_width, unsigned int border_color, bool transparent, bool acesfil, float start_brightness, float end_brightness)
Definition GameApi.cc:44807
IMPORT ML keyboard_toggle(ML m1, ML m2, int key)
Definition GameApi_main.cc:3579
IMPORT TT array_timing_chain(TT prev, float start_time, std::string durations, std::vector< ML > vec)
Definition GameApi_main.cc:4505
IMPORT P gltf_mesh_all_p(GameApi::EveryApi &ev, TF model0)
Definition GameApi_gltf.cc:11051
IMPORT ML bytestore_timing(BS store, int ch, std::string s, float time_delta)
Definition GameApi_pl.cc:29466
IMPORT SHP constant_shp_f(SHP next, int num, float value)
Definition cpushader.cc:284
IMPORT SHP timed_shp_i(float start_time, float end_time, SHP next, int num, int start_value, int end_value)
Definition cpushader.cc:317
IMPORT void set_corner(int x, int y, int screen_sx, int screen_sy)
Definition GameApi_main.cc:728
IMPORT unsigned int random()
Definition GameApi_main.cc:309
IMPORT void init_3d(SH sh, int screen_width=800, int screen_heigth=600)
Definition GameApi_main.cc:540
IMPORT void set_seamless_url(std::string url)
Definition GameApi_main.cc:3363
IMPORT ML create_landscape(EveryApi &ev, std::string url)
Definition GameApi.cc:41317
IMPORT ML AI_generated(EveryApi &ev, ML ml, std::string url)
Definition GameApi.cc:46239
IMPORT ML blendfunc(ML ml, int val, int val2)
Definition GameApi_main.cc:3802
IMPORT SHP empty_shp()
Definition cpushader.cc:280
IMPORT ML gltf_mesh_all_anim_inst(EveryApi &ev, TF model0, TF resize_obj, PTS ms, float mix, float self_mult, float rest_mult, int mode, std::string keys, float light_dir_x, float light_dir_y, float light_dir_z, float border_width, unsigned int border_color, bool transparent, bool acesfilm, bool emissive, int frame_skip, int lod_level)
Definition GameApi_gltf.cc:11989
IMPORT ML glClear(EveryApi &ev, unsigned int color)
Definition GameApi_main.cc:2948
IMPORT ML key_press_print_time_sync(ML ml)
Definition GameApi.cc:46092
IMPORT void load_ds_from_temp(std::string filename, void(*fptr)(void *), void *data, bool &success)
Definition GameApi.cc:31970
IMPORT void save_glb_store(EveryApi &ev, std::string filename, TF tf)
Definition GameApi_gltf.cc:15752
IMPORT void make_current()
Definition GameApi_main.cc:37
IMPORT bool logo_iter()
Definition GameApi_main.cc:2847
IMPORT void outline_third()
Definition GameApi_main.cc:1246
IMPORT P p_script2(EveryApi &ev, HML h, std::string p1, std::string p2, std::string p3, std::string p4, std::string p5)
Definition GameApi.cc:29095
IMPORT MT load_MT_script2(EveryApi &ev, HML h, std::string p1, std::string p2, std::string p3, std::string p4, std::string p5)
Definition GameApi.cc:30212
IMPORT ML shader_cache_disable(ML ml, bool disable)
Definition GameApi_main.cc:80
IMPORT ML print_time_sync(ML ml)
Definition GameApi.cc:46065
IMPORT ARR load_BM_script_array_comb(EveryApi &ev, std::string url, std::string p1, std::string p2, std::string p3, std::string p4, std::string p5)
Definition GameApi.cc:30386
IMPORT bool ch_doubletap_detect(Event &e, int exprire_timer_count, int ch, DoubleTapState &state)
Definition GameApi_main.cc:1260
IMPORT ML joystick_to_wasd(ML ml)
Definition GameApi_main.cc:4120
IMPORT DS load_ds_from_disk(std::string filename)
Definition GameApi.cc:31986
IMPORT SHP constant_shp_p3d(SHP next, int num, PT value)
Definition cpushader.cc:299
IMPORT INP cursor_keys_normal_move()
Definition GameApi.cc:32282
IMPORT W pts_world(PTS p, int type)
Definition GameApi_pl.cc:27452
IMPORT void advance_time(float val)
Definition GameApi_main.cc:1033
IMPORT ML parse_areatype(EveryApi &ev, std::string url, GameApi::FB heightmap, GameApi::BM top_texture, GameApi::BM side_texture)
Definition GameApi.cc:41215
IMPORT ML score_adder2(EveryApi &ev, ML ml, O o, PTS points, MN transform, int enter_score, int leave_score, int dyn_point, float timeout, IF fetcher)
Definition GameApi.cc:32919
IMPORT ML no_concurrent_download(ML ml)
Definition GameApi_main.cc:4895
IMPORT ML gltf_scene(EveryApi &ev, TF model0, int scene_id, std::string keys, float mix, float self_mult, float rest_mult, int mode, float light_dir_x, float light_dir_y, float light_dir_z, int animation, float border_width, unsigned int border_color, bool transparent, bool acesfilm, bool emissive, int frame_skip, int lod_level)
Definition GameApi_gltf.cc:10332
IMPORT RUN no_concurrent_download_run(RUN r)
IMPORT ML bind_obj_type(std::string name, GameApi::P obj, GameApi::MN move, GameApi::MT mat, float radius)
Definition GameApi.cc:41349
ML cmb_2____(GameApi::EveryApi &ev, std::string a_script_url, std::string a_param1, std::string a_param2, std::string a_param3, std::string a_param4, std::string a_param5, std::string b_script_url, std::string b_param1, std::string b_param2, std::string b_param3, std::string b_param4, std::string b_param5, std::vector< float > *optional_time_range_duration)
Definition GameApi.cc:45638
IMPORT CX subworld(CX c, W w, int start_block, int end_block)
Definition GameApi_pl.cc:27573
IMPORT void alpha(bool enabled)
Definition GameApi_main.cc:922
IMPORT void nvidia_init()
Definition GameApi_main.cc:715
IMPORT ML save_deploy2(EveryApi &ev, RUN run, std::string homepage, bool is_in_arr, std::string filename)
Definition GameApi.cc:28920
IMPORT void outline_second()
Definition GameApi_main.cc:1235
IMPORT TT current_time(TT prev)
Definition GameApi_main.cc:4605
GameApi::ML lod_pts_tf(GameApi::EveryApi &ev, GameApi::TF p, GameApi::PTS pts, float level1, float level2, float level3, float level4, int l1, int l2, int l3, int l4, float mix, float selt_mult, float rest_mult, int mode, float light_dir_x, float light_dir_y, float light_dir_z, float border_width, unsigned int border_color, bool transparent, bool acesfilm, float start_brightness, float end_brightness, bool emissive)
Definition GameApi.cc:44687
IMPORT void set_screen_size(int sx, int sy)
Definition GameApi_main.cc:756
IMPORT void step()
Definition GameApi_main.cc:971
IMPORT ML random_instantiate(EveryApi &ev, ML ml, std::vector< MN > vec, float start_time, float time_step, float random_chance)
Definition GameApi.cc:41954
IMPORT std::string get_homepage_url()
Definition GameApi_main.cc:3358
IMPORT int get_screen_height()
Definition GameApi_main.cc:2745
IMPORT ML seq_ml(std::vector< ML > vec, float time)
Definition GameApi_main.cc:2093
IMPORT IF score_set_hide()
Definition GameApi.cc:32992
IMPORT HML emscripten_frame2_P(EveryApi &ev, P p, std::string homepage)
Definition GameApi.cc:40162
IMPORT TF gltf_loadKK2(std::string url)
Definition GameApi_gltf.cc:15659
IMPORT ML isometric(ML ml, float y_angle, float x_angle, float translate)
Definition GameApi.cc:41744
IMPORT TF glb_load_sketchfab_zip(std::string url_to_zip)
IMPORT M in_N(EveryApi &ev, bool is_3d)
Definition GameApi_main.cc:3324
IMPORT MainLoopApi(Env &e)
Definition GameApi_main.cc:19
IMPORT ARR resize_and_anim_transfer_id()
Definition GameApi_pl.cc:15350
IMPORT ML gltf_mesh_all(EveryApi &ev, TF model0, float mix, float self_mult, float rest_mult, int mode, float light_dir_x, float light_dir_y, float light_dir_z, float border_width, unsigned int border_color, bool transparent, bool acesfilm, bool emissive, int lod_level)
Definition GameApi_gltf.cc:11938
IMPORT ML slow_start_array_ml(GameApi::EveryApi &ev, std::vector< ML > vec, int max_ticks)
Definition GameApi_main.cc:2774
IMPORT ML print_stats(P p)
Definition GameApi_main.cc:2214
IMPORT ML activate_item(ML ml, ML def)
Definition GameApi.cc:39594
IMPORT ML web_link(EveryApi &ev, ML item, ML highlighted_item, float pt_x, float pt_y, float pt_z, float radius, std::string url)
Definition GameApi_pl.cc:31691
IMPORT float fpscounter(bool print=true)
Definition GameApi_main.cc:463
GameApi::ML get_movement_from_MV(GameApi::ML ml)
Definition GameApi_pl.cc:31182
GameApi::ML logo_change(ML ml, BM conn, BM download, BM prepare)
Definition GameApi_main.cc:3096
IMPORT void transfer_sdl_surface(MainLoopApi &orig)
Definition GameApi_main.cc:294
IMPORT ML save_ds_ml(EveryApi &ev, std::string output_filename, P p, bool disable_normal, bool disable_color, bool disable_texcoord, bool disable_texcoord3, bool disable_objects)
Definition GameApi.cc:32070
IMPORT SHI generic_anim_shader2(EveryApi &ev, SHP params, std::string funcname, SHC code, std::vector< SHI > children)
Definition cpushader.cc:1567
IMPORT ML timing_exit(TT link)
Definition GameApi_main.cc:4837
IMPORT ML ogl_set_frame_rate(ML ml, int fps)
Definition GameApi_main.cc:2683
IMPORT ML memmap_window3(EveryApi &ev, std::string url_1, std::string url_2, std::string url_3, std::string url_4, std::string url_5, std::string url_6)
Definition GameApi.cc:43439
IMPORT W array_world(std::vector< W > vec)
Definition GameApi_pl.cc:27639
IMPORT ML scene_transparency(ML scene)
Definition GameApi_main.cc:4326
IMPORT ML render_txid(EveryApi &ev, P p1, TXID I7, int size)
Definition GameApi.cc:8809
IMPORT ML gs_time(GS gs, ML ml, int t)
Definition GameApi.cc:44158
IMPORT HML html_url(std::string url)
Definition GameApi.cc:26864
IMPORT SHP timed_shp_f(float start_time, float end_time, SHP next, int num, float start_value, float end_value)
Definition cpushader.cc:312
IMPORT ML gltf_node(EveryApi &ev, TF model0, int node_id, std::string keys, float mix, float self_mult, float rest_mult, int mode, float light_dir_x, float light_dir_y, float light_dir_z, int animation, float border_width, unsigned int border_color, bool transparent, bool acesfilm, bool emissive, int frame_skip, int lod_level)
Definition GameApi_gltf.cc:10238
IMPORT ML or_elem_ml(GameApi::EveryApi &ev, ML m1, ML m2)
Definition GameApi_main.cc:2767
IMPORT ML edit_3d(EveryApi &ev, P p, float radius)
Definition GameApi.cc:44009
IMPORT TRR resize_transfer_id(TRB id)
Definition GameApi_pl.cc:15338
IMPORT void depth_test(bool enabled)
Definition GameApi_main.cc:910
IMPORT ML looking_glass_full(EveryApi &ev, ML ml, float amount, int mode, int start, int end)
Definition GameApi.cc:38222
ML cmb_glb_3d_interpolate(GameApi::EveryApi &ev, std::vector< GameApi::TF > tf_arr, int material_id, float mix, float self_mult, float rest_mult, float light_dir_x, float light_dir_y, float light_dir_z, int skin_num, int animation, int num_timeindexes, MT next, int key, std::string keys, int mode, int inst, int timeid)
Definition GameApi.cc:45681
IMPORT ML gltf_mesh(EveryApi &ev, TF model0, int mesh_id, int skin_id, std::string keys, float mix, float self_mult, float rest_mult, int mode, float light_dir_x, float light_dir_y, float light_dir_z, int animation, float border_width, unsigned int border_color, bool acesfilm, bool emissive, int frame_skip, int lod_level)
Definition GameApi_gltf.cc:10139
IMPORT ML key_ml(std::vector< ML > vec, std::string keys)
Definition GameApi.cc:43576
IMPORT ML if_keys(ML ml, IF fetcher, std::string keys)
Definition GameApi_fnt.cc:1305
IMPORT ML move_in(EveryApi &ev, ML ml, INP in)
Definition GameApi.cc:32565
IMPORT SHP constant_shp_u(SHP next, int num, unsigned int value)
Definition cpushader.cc:294
IMPORT int get_corner_y()
Definition GameApi_main.cc:741
IMPORT ML disable_polygons(ML ml)
Definition GameApi_pl.cc:27044
IMPORT BM load_BM_script(EveryApi &ev, std::string url, std::string p1, std::string p2, std::string p3, std::string p4, std::string p5)
Definition GameApi.cc:30376
IMPORT bool seamless_iter()
Definition GameApi_main.cc:2875
IMPORT void transparency(bool enabled)
Definition GameApi_main.cc:895
IMPORT BM flip_bitmap_if_mobile(EveryApi &ev, BM bm)
Definition GameApi.cc:39723
IMPORT void display_logo(EveryApi &ev)
Definition GameApi_main.cc:3102
IMPORT ML array_ml(GameApi::EveryApi &ev, std::vector< ML > vec)
Definition GameApi_main.cc:2797
IMPORT TT t_repeat(TT prev, TT curr_to_repeated, int count)
Definition GameApi_main.cc:4701
GameApi::ML lod_gpu_pts_tf(GameApi::EveryApi &ev, GameApi::P p, GameApi::MT mat, GameApi::PTS pts, float level1_tri, float level2_tri, float level3_tri, float level4_tri, int l1, int l2, int l3, int l4, float mix, float self_mult, float rest_mult, int mode, float light_dir_x, float light_dir_y, float light_dir_z, float border_width, unsigned int border_color, bool transparent, bool acesfil, float start_brightness, float end_brightness)
Definition GameApi.cc:44680
IMPORT ML chai_mainloop2(EveryApi &ev, std::string url, GameApi::ML ml)
IMPORT ML generic_shader(EveryApi &ev, ML ml, SHI vertex, SHI fragment, std::vector< TXID > vec)
Definition cpushader.cc:919
IMPORT int get_screen_rect_sy()
Definition GameApi_main.cc:751
IMPORT ML seq_ml_score(ML ml1, ML ml2, int score)
Definition GameApi_main.cc:2104
IMPORT INP move_speed(INP orig, float speed)
Definition GameApi.cc:32496
IMPORT void profile(std::string label, bool start)
Definition GameApi_main.cc:374
IMPORT void execute_ml(EveryApi &ev, ML ml, SH color, SH texture, SH texture_2d, SH arr_texture, M in_MV, M in_T, M in_N, int screen_width, int screen_height)
Definition GameApi_main.cc:2114
IMPORT ML bindinst_parr_msarr(EveryApi &ev, std::vector< P > parr, std::vector< MS > msarr, std::vector< MT > mat)
IMPORT ML skybox(EveryApi &ev, BM land, BM sky)
Definition GameApi_main.cc:3535
IMPORT unsigned int rand_max()
Definition GameApi_main.cc:304
IMPORT ML cullface(ML ml, bool b, bool is_gltf)
Definition GameApi_main.cc:3796
IMPORT void fpscounter_init()
Definition GameApi_main.cc:429
IMPORT BS string_bytestore(std::string s)
Definition GameApi_pl.cc:29431
IMPORT ML turn_to_meters_default(EveryApi &ev, ML ml, P p)
Definition GameApi_sp.cc:528
IMPORT ML array_timing_chain_ml(float start_time, std::string durations, std::vector< ML > vec, int repeat)
Definition GameApi_main.cc:4529
IMPORT ML load_ML_script3(EveryApi &ev, std::string url)
Definition GameApi.cc:30193
IMPORT ML gltf_scene_anim(EveryApi &ev, TF model0, int scene_id, int animation, std::string keys, float mix, float self_mult, float rest_mult, int mode, float light_dir_x, float light_dir_y, float light_dir_z, float border_width, unsigned int border_color, bool transparent, bool acesfilm, bool emissive, int frame_skip, int lod_level)
Definition GameApi_gltf.cc:13602
IMPORT int get_screen_width()
Definition GameApi_main.cc:2740
ML cmb_____(GameApi::EveryApi &ev, std::string script_url, std::string param1, std::string param2, std::string param3, std::string param4, std::string param5)
Definition GameApi.cc:45665
IMPORT void cursor_visible(bool enabled)
Definition GameApi_main.cc:86
IMPORT MT mainloop_material(EveryApi &ev, ML ml)
Definition GameApi.cc:44384
IMPORT ML filter_execute_array_ml(GameApi::EveryApi &ev, std::vector< ML > vec)
Definition GameApi_main.cc:2785
IMPORT ML whack_a_mole_flag_bmchooser(ML ml)
Definition GameApi.cc:42075
IMPORT TRA anim_transfer_id(TRB id)
Definition GameApi_pl.cc:15344
IMPORT HML load_zip_assets2(std::string zip_url)
Definition GameApi_gltf.cc:16571
IMPORT void save_ds(std::string output_filename, DS ds)
Definition GameApi.cc:32117
IMPORT ARR gltf_mesh_all_parr_msarr(EveryApi &ev, TF model0, float mix, float light_dir_x, float light_dir_y, float light_dir_z, int skin_num)
IMPORT ML load_ML_script(EveryApi &ev, std::string url, std::string p1, std::string p2, std::string p3, std::string p4, std::string p5)
Definition GameApi.cc:30184
IMPORT SHP timed_shp_uvw(float start_time, float end_time, SHP next, int num, PT start_value, PT end_value)
Definition cpushader.cc:334
IMPORT SHI phong_vertex(SHI next)
Definition cpushader.cc:436
IMPORT ML collision_seq_ml(ML curr, ML end, std::string obj1, std::string obj2, float show_duration)
Definition GameApi_main.cc:2042
IMPORT void init(SH sh, int screen_width=800, int screen_height=600)
Definition GameApi_main.cc:127
IMPORT MB network(std::string url, std::string homapge)
Definition GameApi.cc:42361
IMPORT SP screenspace()
Definition GameApi_main.cc:1202
IMPORT LI gltf_skeleton(EveryApi &ev, TF model0, int start_node)
IMPORT void display_seamless(EveryApi &ev)
Definition GameApi_main.cc:2896
IMPORT CX array_cache(std::vector< CX > vec)
Definition GameApi_pl.cc:27528
IMPORT ML disable_matrices(EveryApi &ev, ML ml, int size)
Definition GameApi.cc:8803
IMPORT ML flip_scene_if_mobile(EveryApi &ev, ML ml)
Definition GameApi.cc:39733
IMPORT MN load_MN_script2(EveryApi &ev, HML h, std::string p1, std::string p2, std::string p3, std::string p4, std::string p5)
Definition GameApi.cc:30203
IMPORT int get_framenum()
Definition GameApi_main.cc:1037
IMPORT GS game_state()
Definition GameApi.cc:44192
IMPORT ML debug_obj(EveryApi &ev)
Definition GameApi.cc:32891
IMPORT ML gs_delta(GS gs, ML ml, int p, int n, float delta)
Definition GameApi.cc:44151
IMPORT ML random_game_seq(float time_step, MN mn, std::vector< ML > true_vec, std::vector< ML > false_vec, float perc, int num_levels)
Definition GameApi_ff.cc:1065
IMPORT ML gltf_mesh_all_env(EveryApi &ev, TF model0, BM diffuse, BM specular, BM bfrd, float mix)
Definition GameApi_gltf.cc:12088
Definition GameApi.hh:1869
IMPORT MT hires(EveryApi &ev, MT mat, int size, int numsampled, float blur_radius)
Definition GameApi.cc:8899
IMPORT ML render_instanced_ml_texture2_matrix(EveryApi &ev, P p, MS pts)
Definition GameApi.cc:15063
IMPORT MT sfo_sandbox(EveryApi &ev, SFO sfo, MT next)
Definition GameApi.cc:17077
IMPORT MT bump_phong(EveryApi &ev, float light_dir_x, float light_dir_y, float light_dir_z, unsigned int ambient, unsigned int highlight, float pow, FB bm, float bump_width)
Definition GameApi.cc:11221
IMPORT MT texture_many(EveryApi &ev, std::vector< BM > vec, float mix)
Definition GameApi.cc:10982
IMPORT ARR m_apply_phong(EveryApi &ev, std::vector< MT > vec, float light_dir_x, float light_dir_y, float light_dir_z, unsigned int ambient, unsigned int specular, unsigned int highlight, float pow)
Definition GameApi.cc:10571
IMPORT MT fur(EveryApi &ev, MT nxt, PT center, float dist, float max_angle, int count, float size, int cone_numfaces)
Definition GameApi.cc:10956
IMPORT MT bevel(EveryApi &ev, MT nxt, float dir, float linewidth)
Definition GameApi.cc:11481
IMPORT ML bind_inst_fade(P p, PTS pts, MT mat, bool flip, float start_time, float end_time)
Definition GameApi.cc:12055
IMPORT SMT screenspace_bloom(EveryApi &ev, SMT next, float cut_x, float cut_y, float cut_z, float x_amount, float y_amount)
Definition GameApi.cc:6693
IMPORT ML render_instanced2_ml_texture(EveryApi &ev, VA va, PTA pta, std::vector< BM > vec)
Definition GameApi.cc:15046
IMPORT MT vertex_phong(EveryApi &ev, MT nxt, float light_dir_x, float light_dir_y, float light_dir_z, unsigned int ambient, unsigned int highlight, float pow, float mix)
Definition GameApi.cc:11202
IMPORT ML gltf_newshadow2(EveryApi &ev, P models, MT model_mt, P shadow_mesh, MT shadow_mt, float light_dir_x, float light_dir_y, float light_dir_z, float dark_level, float light_level, float scale, int size, TF tf)
Definition GameApi.cc:11155
IMPORT ML render_instanced_ml_texture_id(EveryApi &ev, P p, PTS pts, std::vector< TXID > *vec)
Definition GameApi.cc:15004
IMPORT MT transparent_material(EveryApi &ev, BM bm, MT next, bool is_transparent)
Definition GameApi.cc:6639
IMPORT ARR m_dup(EveryApi &ev, MT mat, int count)
Definition GameApi.cc:10540
IMPORT ML render_instanced_ml_texture2(EveryApi &ev, P p, PTS pts)
Definition GameApi.cc:15023
IMPORT MT phong3_material(EveryApi &ev, MT next, unsigned int ambient, unsigned int highlight, float pow)
Definition cpushader.cc:1152
IMPORT MT fade(EveryApi &ev, MT next, float start_time, float end_time, float start_time2, float end_time2)
Definition GameApi.cc:10977
IMPORT ML render_instanced_ml_texture(EveryApi &ev, P p, PTS pts, std::vector< BM > vec, std::vector< int > types=std::vector< int >(), std::vector< std::string > id_labels=std::vector< std::string >(), std::vector< bool > is_srgb=std::vector< bool >())
Definition GameApi.cc:15000
IMPORT MT marble(EveryApi &ev, MT nxt, int count, float cubesize)
Definition GameApi.cc:11288
IMPORT ML render_instanced2_ml(EveryApi &ev, VA va, PTA pta, bool color_from_pts=false)
Definition GameApi.cc:15091
IMPORT MT shading2(EveryApi &ev, MT nxt, unsigned int color1, unsigned int colo2, unsigned int color3)
Definition GameApi.cc:11268
IMPORT MT edge(EveryApi &ev, MT nxt, float edge_width, unsigned int edge_color)
Definition GameApi.cc:11207
IMPORT MT choose_color(EveryApi &ev, MT nxt, unsigned int color, float mix_val)
Definition GameApi.cc:11278
IMPORT MT gltf_material_from_file(EveryApi &ev, std::string url, float light_dir_x, float light_dir_y, float light_dir_z)
Definition GameApi_gltf.cc:7834
IMPORT MT many_texture_id_material(EveryApi &ev, std::string mtl_url, std::string url_prefix, float mix, int start_range, int end_range)
Definition GameApi.cc:37847
IMPORT MT web(EveryApi &ev, MT nxt, float val=1.01, float linewidth=2.0, unsigned int color=0xff000000)
Definition GameApi.cc:11475
IMPORT MT textureid(EveryApi &ev, TXID txid, float mix)
Definition GameApi.cc:10973
IMPORT MT adjust(EveryApi &ev, MT nxt, unsigned int ad_color, float ad_dark, float ad_light)
Definition GameApi.cc:11187
IMPORT MT discard_material(EveryApi &ev, MT next)
Definition GameApi.cc:10995
IMPORT MT colour_material(EveryApi &ev, float mix, bool color_from_pts=false)
Definition GameApi.cc:10986
IMPORT MT phong2(EveryApi &ev, MT nxt, float light_dir_x, float light_dir_y, float light_dir_z, unsigned int ambient, unsigned int specular, unsigned int highlight, float pow)
Definition GameApi.cc:11197
IMPORT MT mesh_color_from_sfo(EveryApi &ev, SFO sfo, MT next)
Definition GameApi.cc:17086
IMPORT ML render_instanced_ml_texture_id_matrix(EveryApi &ev, P p, MS pts, std::vector< TXID > *vec)
Definition GameApi.cc:15054
IMPORT MT combine_materials(EveryApi &ev, MT mat1, MT mat2)
Definition GameApi.cc:37945
IMPORT MT gltf_anim_material2(EveryApi &e, TF model0, int skin_num, int num_timeindexes, MT next, std::string keys, int mode, TRA anim_transfer_id, int frame_skip)
Definition GameApi_gltf.cc:14836
IMPORT MT gltf_material_env(EveryApi &ev, TF model0, int material_id, float mix, BM diffuse_env, BM specular_env, BM bfrd)
Definition GameApi_gltf.cc:7884
IMPORT MT mt_empty(EveryApi &ev)
Definition GameApi.cc:256
IMPORT MT generic_shader_material0(EveryApi &ev, MT next, std::string, std::string, std::string)
Definition cpushader.cc:1906
IMPORT MT gltf_anim_material(EveryApi &ev, TF model0, int skin_num, int animation, int num_timeindexes, MT next, int key, int mode, TRA anim_transfer_id, int frame_skip)
Definition GameApi_gltf.cc:14849
IMPORT MT gi(EveryApi &ev, MT nxt, PTS points, float obj_size)
Definition GameApi.cc:11216
IMPORT MT texture(EveryApi &ev, BM bm, float mix)
Definition GameApi.cc:10969
IMPORT MT generic_shader_material1(EveryApi &ev, MT next, SHP params, std::string, std::string, std::string)
Definition cpushader.cc:1911
IMPORT MT m_keys(EveryApi &ev, std::vector< MT > vec, std::string keys)
Definition GameApi_gltf.cc:14802
IMPORT ARR material_pack_1(EveryApi &ev)
Definition GameApi.cc:41694
IMPORT MT noise(EveryApi &ev, int sx, int sy, int r, int g, int b, int a, int r2, int g2, int b2, int a2, float mix)
Definition GameApi.cc:33055
IMPORT MT gltf_material(EveryApi &ev, TF model0, int material_id, float mix, float self_mult, float rest_mult, float light_dir_x, float light_dir_y, float light_dir_z, bool emissive, int lod_level=-1)
Definition GameApi_gltf.cc:7839
IMPORT MT snow(EveryApi &ev, MT nxt, unsigned int color1=0xffaaaaaa, unsigned int color2=0xffeeeeee, unsigned int color3=0xffffffff, float mix_val=0.5f)
Definition GameApi.cc:11014
IMPORT MT skeletal(EveryApi &ev)
Definition GameApi.cc:10952
IMPORT ML render_instanced_ml_cubemap_matrix(EveryApi &ev, P p, MS pts, std::vector< BM > vec)
Definition GameApi.cc:15058
IMPORT MT choose_material(EveryApi &ev, int i)
Definition GameApi.cc:46350
IMPORT ML render_instanced2_ml_texture_id(EveryApi &ev, VA va, PTA pta, std::vector< TXID > *vec)
Definition GameApi.cc:15042
IMPORT MT generic_shader_material00(EveryApi &ev, MT next, SHI vertex, SHI fragment, std::vector< TXID > vec)
Definition cpushader.cc:1900
IMPORT ML bind_inst_matrix(P p, MS ms, MT mat)
Definition GameApi.cc:12011
IMPORT ARR m_apply_phong_color(EveryApi &ev, std::vector< MT > vec, std::vector< P > vec2, float light_dir_x, float light_dir_y, float light_dir_z, float ambient_mult, float specular_mult, float highlight_mult, float pow)
Definition GameApi.cc:10548
IMPORT MT flat(EveryApi &ev, MT nxt, unsigned int color1, unsigned int color2, unsigned int color3)
Definition GameApi.cc:11273
IMPORT MT fog(EveryApi &ev, MT nxt, float fog_dist, unsigned int dark_color, unsigned int light_color)
Definition GameApi.cc:11225
IMPORT MT generic_shader_material2(EveryApi &ev, MT next, SHP params, std::string, std::string, std::string, std::vector< SHI >)
Definition cpushader.cc:1915
IMPORT ML render_instanced2_ml_fade(EveryApi &ev, VA va, PTA pta, bool flip, float start_time, float end_time)
Definition GameApi.cc:15101
IMPORT MT m_def(EveryApi &ev)
Definition GameApi.cc:10528
IMPORT ML newshadow2_gltf(EveryApi &ev, TF I1, P shadow_p, MT shadow_mt, float light_dir_x, float light_dir_y, float light_dir_z, float dark_level, float light_level, unsigned int ambient_color, unsigned int dark_color, unsigned int light_color, float scale, int size, MT shadow2_mt, bool emissive)
Definition GameApi.cc:11141
IMPORT MT mt_alt(EveryApi &ev, std::vector< MT > v, int index)
Definition GameApi_pl.cc:14381
IMPORT MT phong(EveryApi &ev, MT nxt, float light_dir_x, float light_dir_y, float light_dir_z, unsigned int ambient, unsigned int specular, unsigned int highlight, float pow)
Definition GameApi.cc:11192
IMPORT ML render_instanced2_ml_texture2(EveryApi &ev, VA va, PTA pta)
Definition GameApi.cc:15013
IMPORT MT shading1(EveryApi &ev, MT nxt, float mix_val, float mix_val2)
Definition GameApi.cc:11263
IMPORT ML render_instanced_ml(EveryApi &ev, P p, PTS pts, bool color_from_pts=false)
Definition GameApi.cc:14987
IMPORT MT glow_edge(EveryApi &ev, MT next, float light_level, float gray_level, float edge_pos)
Definition GameApi.cc:10935
IMPORT ML render_instanced_ml_cubemap(EveryApi &ev, P p, PTS pts, std::vector< BM > vec)
Definition GameApi.cc:15008
IMPORT MaterialsApi(Env &e)
Definition GameApi.cc:44491
IMPORT ML render_instanced_ml_fade(EveryApi &ev, P p, PTS pts, bool flip, float start_time, float end_time, bool color_from_pts=false)
Definition GameApi.cc:15073
IMPORT MT shadow2(EveryApi &ev, P p, float p_x, float p_y, float p_z, int sx, int sy, unsigned int dark_color, float mix, float mix2, int numtextures)
Definition GameApi.cc:11238
IMPORT ML render_instanced2_ml_matrix(EveryApi &ev, VA va, MSA pta)
Definition GameApi.cc:15095
IMPORT MT shadow(EveryApi &ev, P p, std::vector< BM > vec, float p_x, float p_y, float p_z, int sx, int sy, unsigned int dark_color, float mix, float mix2)
Definition GameApi.cc:11230
IMPORT MT reload_material(EveryApi &ev, MT next, std::string name, P default_p, MT default_mat)
Definition GameApi_reload.cc:425
IMPORT MT bloom(EveryApi &ev, MT nxt, BM bm, float r_cut, float g_cut, float b_cut, float pixel_x, float pixel_y)
Definition GameApi.cc:10962
IMPORT ML bind_inst2(P p, PTA pta, MT mat)
Definition GameApi.cc:11997
IMPORT MT brashmetal(EveryApi &ev, MT nxt, int count, bool web)
Definition GameApi.cc:11283
IMPORT MT acesfilm_material(EveryApi &ev, MT next)
Definition GameApi.cc:10990
IMPORT MT dyn_lights(EveryApi &ev, MT nxt, float light_pos_x, float light_pos_y, float light_pos_z, float dist, MN dyn_point)
Definition GameApi.cc:11246
IMPORT ML bind_inst_va(VA va, PTS pts, MT mat, float level)
Definition GameApi.cc:12035
IMPORT ML render_instanced_ml_matrix(EveryApi &ev, P p, MS pts, bool color_from_matrix=false)
Definition GameApi.cc:15029
IMPORT MT coloured_lights(EveryApi &ev, MT nxt, float scale, unsigned int color_1, unsigned int color_2, unsigned int color_3, unsigned int color_4, unsigned int color_5, unsigned int color_6, unsigned int color_7, unsigned int color_8, PT pos_1, PT pos_2, PT pos_3, PT pos_4, PT pos_5, PT pos_6, PT pos_7, PT pos_8, float dist_1, float dist_2, float dist_3, float dist_4, float dist_5, float dist_6, float dist_7, float dist_8)
Definition GameApi.cc:11251
IMPORT ML render_instanced_ml_fade_texture(EveryApi &ev, P p, PTS pts, bool flip, float start_time, float end_time, std::vector< BM > vec)
Definition GameApi.cc:15085
IMPORT MT texture_many2(EveryApi &ev, float mix)
Definition GameApi.cc:11004
IMPORT ML newshadow2_phong(EveryApi &ev, P models, MT model_mt, P shadow_mesh, MT shadow_mt, float light_dir_x, float light_dir_y, float light_dir_z, float dark_level, float light_level, unsigned int ambient_color, unsigned int dark_color, unsigned int light_color, float scale, int size, bool draw_model, MT shadow2_mt)
Definition GameApi.cc:11026
IMPORT ML render_instanced_ml_texture_matrix(EveryApi &ev, P p, MS pts, std::vector< BM > vec, std::vector< int > types=std::vector< int >(), std::vector< std::string > id_labels=std::vector< std::string >(), std::vector< bool > is_srgb=std::vector< bool >())
Definition GameApi.cc:15050
IMPORT VA bind_inst_va_prepare(P p, MT mat)
Definition GameApi.cc:12027
IMPORT MT gltf_material_manual(EveryApi &ev, float mix, float self_mult, float rest_mult, BM, BM, BM, BM, BM, bool, bool, bool, bool, bool, float, float, float, float, float, float, float, float light_dir_x, float light_dir_y, float light_dir_z)
Definition GameApi_gltf.cc:7856
IMPORT MT water(EveryApi &ev, MT next, unsigned int color1, unsigned int color2, unsigned int color3, float center_x, float center_y, float center_z, float wave_mult, float time_mult)
Definition GameApi.cc:10940
IMPORT MT texture_cubemap(EveryApi &ev, std::vector< BM > vec, float mix, float mix2)
Definition GameApi.cc:11000
IMPORT ML bind_inst(P p, PTS pts, MT mat)
Definition GameApi.cc:12041
IMPORT MT dist_field_mesh(EveryApi &ev, SFO sfo, MT next)
Definition GameApi.cc:17071
IMPORT MT newshadow(EveryApi &ev, MT nxt, P models, float light_dir_x, float light_dir_y, float light_dir_z, float dark_level, float light_level, float scale, int size, bool is_phong, int texindex, MT shadow_mt)
Definition GameApi.cc:11020
IMPORT MT texture_arr(EveryApi &ev, std::vector< BM > vec, int sx, int sy, float mix)
Definition GameApi.cc:11010
IMPORT ML bind(P p, MT mat)
Definition GameApi.cc:11983
IMPORT SMT ss_def(EveryApi &ev)
Definition GameApi.cc:6665
IMPORT SMT generic_screenspace_material00(EveryApi &ev, SMT next, SHI vertex, SHI fragment)
Definition cpushader.cc:1920
IMPORT MT toon_border(EveryApi &ev, MT next, float border_width, unsigned int color, bool is_gltf)
Definition GameApi.cc:10946
IMPORT MT gltf_material3(EveryApi &ev, float roughness, float metallic, float base_r, float base_g, float base_b, float base_a, float mix, float self_mult, float rest_mult, float light_dir_x, float light_dir_y, float light_dir_z, bool emissive)
Definition GameApi_gltf.cc:7829
IMPORT MT progressmaterial(MT nxt, void(*fptr)(void *), void *data)
Definition GameApi.cc:6765
IMPORT ARR p_dup(EveryApi &ev, P obj, int count)
Definition GameApi.cc:10532
Definition GameApi.hh:3992
MS mn_matrix_array2(EveryApi &ev, std::vector< MN > moves)
Definition GameApi.cc:4593
IMPORT MS from_lines_2d(LI li)
Definition GameApi.cc:16625
IMPORT ML render_ms_files(EveryApi &ev, std::vector< P > p, MT mat, std::string url, int start_type, int end_type)
Definition GameApi.cc:5325
IMPORT MS ms_interface(VX vox, int type, float start_x, float end_x, float start_y, float end_y, float start_z, float end_z)
Definition GameApi.cc:4956
IMPORT MS mult_array(MS m1, MS m2)
Definition GameApi.cc:16740
IMPORT ML render_ms_files2(EveryApi &ev, std::vector< P > p, std::vector< MT > mat, std::string url, int start_type, int end_type)
Definition GameApi.cc:5329
IMPORT MS ms_file(std::string url, int use_type)
Definition GameApi.cc:5191
IMPORT MS subarray(MS m, int start, int count)
Definition GameApi.cc:16772
MS load_matrices_nr(std::string url)
Definition GameApi_pts.cc:196
IMPORT MatricesApi(Env &e)
Definition GameApi.cc:44517
IMPORT MS from_points(PTS pts)
Definition GameApi.cc:16585
IMPORT MS trans2(MS m, float tx, float ty, float tz)
Definition GameApi.cc:5476
MS ms_steady(MS ms)
Definition GameApi.cc:4996
ML render_ms_files2_si(EveryApi &ev, std::vector< P > p, std::vector< MT > mat, VX voxel, int start_type, int end_type, float start_x, float end_x, float start_y, float end_y, float start_z, float end_z)
Definition GameApi.cc:4901
IMPORT MS mult(MS m, M mat)
Definition GameApi.cc:16712
IMPORT MS ms_random_rot(float px, float py, float pz, int count)
Definition GameApi.cc:16580
IMPORT MS inverse_ms(MS ms)
Definition GameApi.cc:5467
IMPORT MS from_lines_3d(LI li)
Definition GameApi.cc:16665
IMPORT MS mn_matrix_array(EveryApi &ev, int count, MN move)
Definition GameApi.cc:4525
IMPORT MS apply_matrix(MS m, M mat)
Definition GameApi.cc:5509
MS mult_g_last_resize(EveryApi &ev, MS ms)
Definition GameApi.cc:4559
IMPORT MS repeat_ms(EveryApi &ev, MN mn, int val)
Definition GameApi.cc:5435
IMPORT MSA prepare(MS p, bool color_from_instance)
Definition GameApi_pts.cc:881
IMPORT MS interpolate(MS start, MS end, float val)
Definition GameApi.cc:5549
ML render_ms_files_si(EveryApi &ev, std::vector< P > p, MT mat, VX voxel, int start_type, int end_type, float start_x, float end_x, float start_y, float end_y, float start_z, float end_z)
Definition GameApi.cc:4805
MS load_matrices(std::string url)
Definition GameApi_pts.cc:192
IMPORT MS scale2(MS m, float sx, float sy, float sz)
Definition GameApi.cc:5472
IMPORT MS random_time_seq(EveryApi &ev, MS inner_start, MS outer, MS inner_end, float outer_time, float inner_time)
Definition GameApi.cc:4674
Definition GameApi.hh:4285
IMPORT M trans(V vec)
IMPORT M rotate_around_axis(V v, float angle)
IMPORT M mult(M m1, M m2)
Definition GameApi_mx.cc:46
IMPORT M projection(float z_min)
IMPORT M perspective(float fovy, float aspect, float near, float far)
Definition GameApi_mx.cc:57
IMPORT M trans(float x, float y, float z)
Definition GameApi_mx.cc:27
IMPORT M xrot(float rot)
Definition GameApi_mx.cc:15
IMPORT M rotate_around_axis(PT point, V v, float angle)
IMPORT MatrixApi(Env &e)
Definition GameApi_mx.cc:4
IMPORT M inverse(M m1)
Definition GameApi_mx.cc:35
IMPORT M perspective_projection(float dist)
IMPORT M keep_rotation(M m)
Definition GameApi_mx.cc:40
IMPORT M zrot(float rot)
Definition GameApi_mx.cc:23
IMPORT M ortho(float left, float right, float bottom, float top, float near, float far)
Definition GameApi_mx.cc:52
IMPORT M scale(float sx, float sy, float sz)
Definition GameApi_mx.cc:31
IMPORT M yrot(float rot)
Definition GameApi_mx.cc:19
IMPORT M transpose(M m)
Definition GameApi_mx.cc:10
IMPORT M identity()
Definition GameApi_mx.cc:6
IMPORT MatrixCurveApi(Env &e)
Definition GameApi.cc:44485
IMPORT MC circle_xz(float radius)
Definition GameApi.cc:16838
IMPORT MC from_curve(C curve)
Definition GameApi.cc:16793
IMPORT MC circle_xy(float radius)
Definition GameApi.cc:16832
IMPORT MS sample(MC m_curve, int num)
Definition GameApi.cc:16875
IMPORT MX mx_find(MX arr, std::string name)
Definition GameApi.cc:17689
IMPORT MX mx_pair(std::string name, MX val)
Definition GameApi.cc:17623
IMPORT MX mx_color(int r, int g, int b, int a)
Definition GameApi.cc:17619
IMPORT MX mx_string(std::string value)
Definition GameApi.cc:17632
IMPORT MX mx_bool(bool val)
Definition GameApi.cc:17605
IMPORT int mx_to_int(MX val, int def=-1)
Definition GameApi.cc:17724
IMPORT MX mx_array(std::vector< MX > vec)
Definition GameApi.cc:17636
IMPORT std::vector< std::string > mx_names(MX val)
Definition GameApi.cc:17736
IMPORT MX mx_index(MX arr, int idx)
Definition GameApi.cc:17667
IMPORT float mx_to_float(MX val, float def=0.0)
Definition GameApi.cc:17713
IMPORT MixedApi(Env &e)
Definition GameApi.cc:44481
IMPORT MX mx_int(int val)
Definition GameApi.cc:17601
IMPORT MX mx_float(float val)
Definition GameApi.cc:17597
IMPORT int mx_size(MX arr)
Definition GameApi.cc:17651
IMPORT MX mx_vector(float dx, float dy, float dz)
Definition GameApi.cc:17614
IMPORT MX mx_point(float x, float y, float z)
Definition GameApi.cc:17609
IMPORT std::vector< MX > mx_values(MX val)
Definition GameApi.cc:17744
Definition GameApi.hh:4764
virtual ~MoveScaleObject2d()
Definition GameApi.hh:4766
virtual void set_scale(float mult_x, float mult_y)=0
virtual void set_pos(float pos_x, float pos_y)=0
Definition GameApi.hh:4771
virtual void set_rotation_matrix(M m)=0
virtual void set_scale(float mult_x, float mult_y, float mult_z)=0
virtual ~MoveScaleObject3d()
Definition GameApi.hh:4773
virtual void set_rotation_matrix2(M m)=0
virtual void set_pos(float pos_x, float pos_y, float pos_z)=0
Definition GameApi.hh:2125
IMPORT MN translate_wave(MN next, float start_time, float end_time, WV wave, float dx, float dy, float dz)
Definition GameApi.cc:1522
IMPORT MN mn_last_resize(MN mn)
Definition GameApi_pts.cc:118
IMPORT MN android_landscape_rotate(MN next)
Definition GameApi.cc:1982
IMPORT MN rotatez(MN next, float angle)
Definition GameApi.cc:2266
IMPORT DC wave(float r, float speed1, float speed2, float dist1, float dist2, int sx, int sy)
Definition GameApi.cc:26089
IMPORT ML temp_key_activate_ml(EveryApi &ev, ML ml, MN mn, int key, float duration)
Definition GameApi.cc:4089
IMPORT MN translate(MN next, float start_time, float end_time, float dx, float dy, float dz)
Definition GameApi.cc:1593
IMPORT MN anim_choose(std::vector< MN > vec, float start_time, float duration)
Definition GameApi.cc:2123
IMPORT MN interpolate(MN n1, MN n2, float start_time, float end_time, float start_value, float end_value)
Definition GameApi.cc:2380
IMPORT CMD cmd_rotate(CMD cmds, float v_x, float v_y, float v_z, float angle, float delta_angle)
Definition GameApi.cc:21457
IMPORT ML rot_y_ml(EveryApi &ev, ML ml, int key_forward, int key_backward, float speed, float start_y, float end_y)
Definition GameApi.cc:4120
IMPORT DC identity()
Definition GameApi.cc:26081
IMPORT MN whack_a_mole_exit(EveryApi &ev, MN prev, int exit_num, float &time)
Definition GameApi.cc:41816
IMPORT MN matrix(MN next, M mat)
Definition GameApi.cc:2245
IMPORT MN whack_a_mole_rotate_around(EveryApi &ev, MN prev, int num, float &time)
Definition GameApi.cc:41804
IMPORT ML move_ml_projection(EveryApi &ev, ML ml, MN mn, int clone_count=1, float time_delta=10.0)
Definition GameApi.cc:4063
IMPORT ML move_y_ml(EveryApi &ev, ML ml, int key_forward, int key_backward, float speed, float start_y, float end_y)
Definition GameApi.cc:4104
IMPORT MN whack_a_mole_all(EveryApi &ev, int cycle_count, int exit_num)
Definition GameApi.cc:41868
IMPORT ML key_event(EveryApi &ev, ML ml, MN mn, int type, int ch, int button, float duration)
Definition GameApi.cc:4157
IMPORT ML rot_z_ml(EveryApi &ev, ML ml, int key_forward, int key_backward, float speed, float start_z, float end_z)
Definition GameApi.cc:4125
IMPORT MN scale_wave(MN next, float start_time, float end_time, WV wave, float sx, float sy, float sz)
Definition GameApi.cc:1866
IMPORT ML move_ml(EveryApi &ev, ML ml, MN mn, int clone_count=1, float time_delta=10.0)
Definition GameApi.cc:4053
IMPORT ML jump_ml(EveryApi &ev, ML ml, int key_jump, float height, float jump_duration)
Definition GameApi.cc:4099
IMPORT ML local_move_matrix(EveryApi &ev, ML inner_ml, MS center_points)
Definition GameApi.cc:25921
IMPORT void set_matrix(MN n, M m)
Definition GameApi.cc:2387
IMPORT LI cmd_to_li(CMD cmds, std::string commands)
Definition GameApi.cc:21572
IMPORT ML player(ML prev)
Definition GameApi.cc:21656
IMPORT MN scale(MN next, float start_time, float end_time, float sx, float sy, float sz)
Definition GameApi.cc:1882
IMPORT M get_matrix(MN n, float time, float delta_time)
Definition GameApi.cc:2393
IMPORT MN scale_progress_max(MN next, bool is_x, bool is_y, bool is_z, int state)
Definition GameApi.cc:1758
IMPORT MN mn_interpolate2(MN n1, MN n2, float start_time, float end_time)
Definition GameApi.cc:1334
IMPORT DC sphwave(float r1, float fr_1, float t_1, float r2, float fr_2, float t_2)
Definition GameApi.cc:26093
IMPORT MN trans2(MN next, float dx, float dy, float dz)
Definition GameApi.cc:2231
IMPORT MovementNode(Env &e)
Definition GameApi.cc:44498
IMPORT ML quake_ml2(EveryApi &ev, ML ml, float speed, float rot_speed)
Definition GameApi.cc:25563
IMPORT MN whack_a_mole_start(EveryApi &ev, MN prev, float &time)
Definition GameApi.cc:41796
IMPORT MN fix_root(EveryApi &ev, MN mn)
Definition GameApi.cc:1230
IMPORT MN rotate_wave(MN next, float start_time, float end_time, WV wave, float p_x, float p_y, float p_z, float v_x, float v_y, float v_z, float angle)
Definition GameApi.cc:1973
IMPORT ML enemy_pos(ML prev, PTS pos)
Definition GameApi.cc:21765
IMPORT MN change_time(MN next, float d_time)
Definition GameApi.cc:2315
IMPORT MN debug_translate(MN next)
Definition GameApi.cc:1512
IMPORT ML quake_ml3(EveryApi &ev, ML ml, ML ml2, float speed, float rot_speed, float p_x, float p_y, float p_z)
Definition GameApi.cc:25757
IMPORT ML key_move_ml(EveryApi &ev, ML ml, int key_forward, int key_backward, int key_rotate_minus, int key_rotate_plus, float speed, float rot_speed, float start_angle, float start_x, float end_x, float start_z, float end_z)
Definition GameApi.cc:4131
IMPORT MN mn_empty()
Definition GameApi.cc:1203
IMPORT ML rot_x_ml(EveryApi &ev, ML ml, int key_forward, int key_backward, float speed, float start_x, float end_x)
Definition GameApi.cc:4115
IMPORT MN mn_interpolate(MN n1, MN n2, FF fetcher)
Definition GameApi.cc:1319
IMPORT MN anim_enable(MN next, float start_time, float end_time)
Definition GameApi.cc:2113
IMPORT ML move_z_ml(EveryApi &ev, ML ml, int key_forward, int key_backward, float speed, float start_z, float end_z)
Definition GameApi.cc:4109
IMPORT ML cursor_keys(EveryApi &ev, ML ml, int key_up, int key_left, int key_down, int key_right, float speed, float duration)
Definition GameApi.cc:25222
IMPORT PLF cmd_to_plf(CMD cmds, std::string commands)
Definition GameApi.cc:21577
IMPORT MN scale_progress(MN next, bool is_x, bool is_y, bool is_z, int state)
Definition GameApi.cc:1753
IMPORT DC compose(DC d1, DC d2)
IMPORT MN pose(MN next, bool pose_in_screen)
Definition GameApi_vr.cc:455
IMPORT CC color_interpolate(CC next, unsigned int color, unsigned int color2, float start_time, float end_time)
Definition GameApi.cc:1380
IMPORT MN rotatex(MN next, float angle)
Definition GameApi.cc:2256
IMPORT CC color_start(unsigned int color)
Definition GameApi.cc:1376
IMPORT MN scale2(MN next, float sx, float sy, float sz)
Definition GameApi.cc:2251
IMPORT ML all_cursor_keys(EveryApi &ev, ML ml, float speed, float duration)
Definition GameApi.cc:25214
IMPORT ML repeat_ml(EveryApi &ev, ML ml, float duration)
Definition GameApi.cc:4048
IMPORT ML local_move(EveryApi &ev, ML inner_ml, PTS center_points)
Definition GameApi.cc:25846
IMPORT ML move_ml_array(EveryApi &ev, std::vector< ML > ml, std::vector< MN > mn)
Definition GameApi.cc:4143
IMPORT CMD default_cmds(float dx, float dy, float dz)
Definition GameApi.cc:21448
IMPORT P move_ml_p(EveryApi &ev, P p, MN move, float time)
Definition GameApi.cc:4068
IMPORT CMD cmd_repeat(CMD cmds, std::string repeat, float dx, float dy, float dz)
Definition GameApi.cc:21452
IMPORT PTS cmd_to_pts(CMD cmds, std::string commands)
Definition GameApi.cc:21491
IMPORT ML enable_ml(EveryApi &ev, ML ml, float start_time, float end_time)
Definition GameApi.cc:4137
IMPORT ML quake_ml(EveryApi &ev, ML ml, float speed, float rot_speed)
Definition GameApi.cc:25397
IMPORT ML keypress_move_ml(EveryApi &ev, ML ml, MN mn, int clone_count=1, float time_delta=10.0, int key=32, bool flipenabled=false)
Definition GameApi.cc:4058
IMPORT MN mn_fetcher(PF pf)
Definition GameApi.cc:1781
IMPORT MN android_landscape_rotate_inv(MN next)
Definition GameApi.cc:1992
IMPORT MN mn_mouse_y(FF fetcher, MN move, float start_x, float end_x, float start_y, float end_y, float start_val, float end_val)
Definition GameApi.cc:1327
IMPORT MN event_activate(MN next, MN event, float event_time, float duration)
Definition GameApi.cc:2225
IMPORT ML color_ml(EveryApi &ev, int color_num, ML ml, CC cc)
Definition GameApi.cc:4073
IMPORT DC explosion(float center_x, float center_y, float center_z, float start_val, float end_val, float start_time, float end_time)
Definition GameApi.cc:26085
IMPORT ML comb_key_activate_ml(EveryApi &ev, ML ml, MN mn, int key, int key_2, float duration)
Definition GameApi.cc:4084
IMPORT DC split(DC d1, DC d2, float val)
Definition GameApi.cc:26118
IMPORT MN rotate(MN next, float start_time, float end_time, float p_x, float p_y, float p_z, float v_x, float v_y, float v_z, float angle)
Definition GameApi.cc:2003
IMPORT MN time_repeat(MN next, float start_time, float repeat_duration)
Definition GameApi.cc:2308
IMPORT MN rotatey(MN next, float angle)
Definition GameApi.cc:2261
IMPORT MN anim_disable(MN next, float start_time, float end_time)
Definition GameApi.cc:2118
IMPORT ML player_pos(ML prev, PT pos)
Definition GameApi.cc:21701
IMPORT MN rotate_around_axis(MN next, float p_x, float p_y, float p_z, float v_x, float v_y, float v_z, float angle)
Definition GameApi.cc:2271
IMPORT ML key_printer_ml(ML ml)
Definition GameApi.cc:4015
IMPORT ML key_activate_ml(EveryApi &ev, ML ml, MN mn, int key, float duration)
Definition GameApi.cc:4079
IMPORT ML wasd(EveryApi &ev, ML ml, MN w, MN a, MN s, MN d, float duration)
Definition GameApi.cc:4163
IMPORT MN level(MN next)
Definition GameApi.cc:1402
IMPORT ML enemy(ML prev)
Definition GameApi.cc:21661
IMPORT ML move_x_ml(EveryApi &ev, ML ml, int key_forward, int key_backward, float speed, float start_x, float end_x)
Definition GameApi.cc:4094
Definition GameApi.hh:3613
IMPORT PP trans(PP pl, float dx, float dy)
PLF reverse_faces(PLF faces)
Definition GameApi_plane.cc:429
IMPORT std::vector< PP > single_elem(PP p1)
IMPORT std::vector< PP > or_elem(PP p1, PP p2)
IMPORT PP cicle(PT center, float radius, int numpoints)
PLF triangulate(PLF faces)
Definition GameApi_plane.cc:381
IMPORT LI to_lines(PP pl, float z)
IMPORT NewPlaneApi(Env &e)
Definition GameApi.cc:44514
IMPORT P to_poly(PP pl, float z)
IMPORT PP color_function(PP pl, std::function< unsigned int(int idx)> f)
P to_polygon(PLF faces)
Definition GameApi_plane.cc:435
IMPORT PP function(std::function< PT(int idx)> f, int num_points, float px, float py, float sx, float sy)
IMPORT PP polygon(std::vector< PT > vec)
IMPORT PP star(PT center, float radius_1, float radius_2, int numpoints)
IMPORT PP polygon2(PTS pts)
IMPORT PP color(PP p, unsigned int color)
IMPORT std::vector< PP > or_elem(std::vector< PP > p1, std::vector< PP > p2)
void render_all(VAA orig)
Definition GameApi.cc:829
OM add_object(OM orig, int index, P obj)
Definition GameApi.cc:783
OM change_pos(OM orig, int index, M mat)
Definition GameApi.cc:803
IMPORT ObjectMoveApi(Env &e)
Definition GameApi.cc:44521
OM clear_object(OM orig, int index)
Definition GameApi.cc:792
VAA prepare_all(OM orig)
Definition GameApi.cc:812
IMPORT PathApi(Env &e)
P object(LA l, PT o, float dx, float dy, float dz)
PA cube(PT pos, PT p_x, PT p_y, PT p_z, int sx, int sy, int sz)
PA cross(PT pos, PA p1, PA p2)
PA grid(PT pos, PT p_x, PT p_y, int sx, int sy)
PA line(PT p1, PT p2, int splitnum)
PA next_point(PA pa, PT p)
Definition GameApi.hh:2006
IMPORT PH ext_force_all(PH phy, V dir)
Definition GameApi_phy.cc:105
IMPORT PH phy_empty()
Definition GameApi_phy.cc:21
IMPORT PTS init_points(PH pos)
Definition GameApi_phy.cc:281
IMPORT PH phy_from_p(P p)
Definition GameApi_phy.cc:236
IMPORT int num_links(PH phy)
Definition GameApi_phy.cc:257
IMPORT PHI anchor_point(PH phy, PT pos)
Definition GameApi_phy.cc:41
IMPORT PH force_obj(PH phy, O obj, V dir)
Definition GameApi_phy.cc:163
IMPORT int num_anchors(PH phy)
Definition GameApi_phy.cc:246
PH anchor_point2(PH phy, PT pos)
Definition GameApi.hh:2012
IMPORT PH anchor_link(PH phy, int p1, int p2, float dist)
Definition GameApi_phy.cc:137
IMPORT int num_force_volumes(PH phy)
Definition GameApi_phy.cc:262
IMPORT PTS physics_action(EveryApi &ev, PH phy)
Definition GameApi_phy.cc:330
IMPORT PhysicsApi(Env &e)
Definition GameApi.cc:44493
IMPORT void step_points(PH phy, PTA prev_frame, float timestep)
Definition GameApi_phy.cc:336
IMPORT PH ext_force(PH phy, int point, V dir)
Definition GameApi_phy.cc:78
IMPORT int num_forces(PH phy, int anchor)
Definition GameApi_phy.cc:252
Definition GameApi.hh:1841
IMPORT PickingApi(Env &e)
Definition GameApi.cc:44489
bool picked(O o, float x, float y, float z)
Definition GameApi.cc:4221
O pick_volume(M in_P, BB pick)
Definition GameApi.cc:4209
BB pick_area(EveryApi &ev, float mouse_x, float mouse_y, float radius, int scr_size_x, int scr_size_y)
Definition GameApi.cc:4175
Definition GameApi.hh:3644
IMPORT P to_polygon_face(PL triangulated_pl, PT pos, V u_x, V u_y)
IMPORT void render(PLA pl, float x, float y, float mult_x, float mult_y)
IMPORT PL empty(float sx, float sy)
PL or_plane(PL p1, PL p2)
IMPORT P substitute_quads_with_plane(P orig, PL(*fptr)(EveryApi &ev, int face, void *data), void *data)
IMPORT PL circle(PL bg, PT center, float radius, int numpoints)
IMPORT PL render_p(P p, M proj_matrix, float sx, float sy)
IMPORT PL empty_plane(float sx, float sy)
P to_polygon_lines_1(PL pl, PT pos, V u_x, V u_y, V u_z, float z_mult)
IMPORT PL move(PL pl, float dx, float dy)
IMPORT PL color_function(PL pl, CO(*fptr)(EveryApi &ev, int idx, PT pos, void *data), void *data)
IMPORT PL rectangle(PL bg, PT p1, PT p2)
IMPORT PLA prepare(PL pl)
IMPORT P to_polygon_strip(EveryApi &ev, PL pl, PT pos, V u_x, V u_y)
IMPORT P plane_in_3d(PL plane, PT u_p, V v1, V v2)
IMPORT PL function(PT(*fptr)(EveryApi &e, int idx, void *data), int num_points, float sx, float sy, void *data)
IMPORT PL star(PT center, float radius_1, float radius_2, int numpoints)
IMPORT std::pair< PL, PL > triangulate(EveryApi &ev, PL pl, int obj)
IMPORT PL floodfill_border(BB bitmap, int x, int y)
IMPORT P to_polygon_lines(PL pl, PT pos, V u_x, V u_y, V u_z, float z_mult)
IMPORT BB render_bool(PL pl, int num, int sx, int sy)
IMPORT PL flip_y(PL pl)
IMPORT PL plane_array(PL *array, int size)
IMPORT PL polygon(PL bg, PT *points, int size)
IMPORT PlaneApi(Env &e)
Definition GameApi_pla.cc:4
IMPORT PL plane_elem(PL p1, PL p2)
CBM render_continuous(PL pl, int num, unsigned int color_0, unsigned int color_1)
IMPORT PL and_not(PL p1, PL not_p)
IMPORT PL color(PL orig, unsigned int new_color)
IMPORT PL sprite(PL bg, BM bitmap, PT pos, float size_x, float size_y)
IMPORT PL circle(PT center, float radius, int numpoints)
IMPORT PL rectangle(PL bg, PT p1, PT p2, PT p3, PT p4)
IMPORT PL remove_empty_faces(PL pl)
IMPORT PL triangulate_all(EveryApi &ev, PL pl, int point_count, int max_obj)
IMPORT P to_polygon(EveryApi &ev, PL pl, PT pos, V u_x, V u_y, V u_z, float z_mult)
IMPORT PL remove_splines(PL pl, float xdelta)
IMPORT PL move_plane(PL p1, V delta)
Definition GameApi.hh:3943
IMPORT PT move(PT p1, float dx, float dy, float dz=0.0)
Definition GameApi_pt.cc:12
IMPORT PT point(float x, float y, float z=0.0)
Definition GameApi_pt.cc:8
IMPORT PT from_angle(float radius, float angle)
Definition GameApi_pt.cc:70
IMPORT float dist3d(PT p, PT p2)
Definition GameApi_pt.cc:43
IMPORT PT spherical_coords(PT pos)
Definition GameApi_pt.cc:82
IMPORT float pt_x(PT p)
Definition GameApi_pt.cc:31
IMPORT PT cartesian_coords(PT pos)
Definition GameApi_pt.cc:94
IMPORT V minus(PT p1, PT p2)
Definition GameApi_pt.cc:60
IMPORT float dist2d(PT p, PT p2)
Definition GameApi_pt.cc:50
IMPORT float pt_z(PT p)
Definition GameApi_pt.cc:39
IMPORT float pt_y(PT p)
Definition GameApi_pt.cc:35
IMPORT PT mix(PT p1, PT p2, float val)
Definition GameApi_pt.cc:24
IMPORT PT origo()
Definition GameApi_pt.cc:4
IMPORT PointApi(Env &e)
Definition GameApi_pt.cc:68
IMPORT PC array(PT *array, int size)
IMPORT PC single(PT point)
IMPORT PC single(float x, float y, float z)
IMPORT PC bezier(PT *array, PT *control_array, int size, int iteration_count)
IMPORT PointCollectionApi(Env &e)
Definition GameApi.cc:44516
Definition GameApi.hh:4032
IMPORT ML movement_display(EveryApi &ev, ML ml, MN mn, int count, int sx, int sy, int sz, float start_x, float end_x, float start_y, float end_y, float start_z, float end_z)
Definition GameApi_pts.cc:1623
void update_from_data(MSA array, MS p, bool draw=true)
IMPORT PTS wave_points(WV wave, int num_samples, float pos_x, float pos_y, float pos_z, float u_x_x, float u_x_y, float u_x_z, float u_y_x, float u_y_y, float u_y_z)
Definition GameApi.cc:26154
IMPORT ML collision_bind_inst(EveryApi &ev, PTS bounding_box, PTS inst_points, std::string name)
Definition GameApi_pts.cc:2272
IMPORT PTS random_bitmap_instancing(EveryApi &ev, BB bm, int count, float start_x, float end_x, float start_y, float end_y, float z)
Definition GameApi_pts.cc:1475
IMPORT VFi pressure_gradient(FFi pressure)
Definition GameApi_pts.cc:2936
IMPORT PTS matrix_points(PTS orig, M matrix)
Definition GameApi_pts.cc:1550
IMPORT PTS world_filter(PTS points)
Definition GameApi.cc:45496
IMPORT LI matrix_display(EveryApi &ev, M matrix)
Definition GameApi_pts.cc:1556
IMPORT PTS surface(S surf, int sx, int sy)
Definition GameApi_pts.cc:1292
IMPORT PTS rot_y(PTS obj, float angle)
Definition GameApi_pts.cc:494
IMPORT float pos_z(PTS p, int index)
Definition GameApi_pts.cc:1322
void update(PTA array, GameApi::P pp, bool slow=false)
Definition GameApi_pts.cc:738
IMPORT PTS hemisphere_points(PT points, V normal, float r, int numpoints)
Definition GameApi_pts.cc:2609
IMPORT PointsApi(Env &e)
Definition GameApi.cc:44518
IMPORT ML pts_render(EveryApi &ev, PTS pts)
Definition GameApi_pts.cc:2078
IMPORT PTA prepare(PTS p, bool color_from_instance)
Definition GameApi_pts.cc:937
IMPORT PTS iterate_points(PTS points, VFi field, FA speed)
Definition GameApi_pts.cc:2877
IMPORT PTS unit_cube(PTS orig, PT pos, V u_x, V u_y, V u_z)
IMPORT PTS pts_grid(BM bm, float start_x, float end_x, float start_y, float en_y, float z)
Definition GameApi_pts.cc:1965
IMPORT PTS or_points(PTS p1, PTS p2)
Definition GameApi_pts.cc:507
IMPORT PTS combine_pts(PTS p1, PTS p2)
Definition GameApi_pts.cc:90
IMPORT PTS random_plane(PT pos, V u_x, V u_y, int numpoints)
Definition GameApi_pts.cc:344
IMPORT P height_field_p(P faces, CFB landscape, float start_x, float end_x, float start_y, float end_y, float start_z, float end_z)
Definition GameApi_pts.cc:3918
IMPORT PTS pts_lines(std::string url, float start_pos, float dist, float speed)
Definition GameApi_pts.cc:3747
IMPORT PTS scale(PTS obj, float sx, float sy, float sz)
Definition GameApi_pts.cc:386
IMPORT PTS pts_grid_bb(BB bb, float start_x, float end_x, float start_y, float en_y, float z)
Definition GameApi_pts.cc:2024
IMPORT PTS random_lattice(EveryApi &ev, int sx, int sy, int sz, float s_x, float s_y, float s_z, float px, float py, float pz, int count)
Definition GameApi_pts.cc:1916
IMPORT PTS polygon_face_center_points(P p)
Definition GameApi_pts.cc:2700
IMPORT PTS random_mesh_quad_instancing(EveryApi &ev, P p, int count)
Definition GameApi_pts.cc:1922
IMPORT PTS unit_to_flex(PTS orig, PT bTL, PT bTR, PT bBL, PT bBR, PT fTL, PT fTR, PT fBL, PT fBR)
IMPORT ML render_ml(EveryApi &ev, PTA array)
Definition GameApi_pts.cc:1463
IMPORT PTS random_mesh_quad_instancing_color(EveryApi &ev, P p, int count, std::vector< BM > textures)
Definition GameApi_pts.cc:1838
IMPORT ML collision_collect(ML mainloop)
Definition GameApi_pts.cc:2428
IMPORT FA random_speeds(float start_speed, float end_speed, int num)
Definition GameApi_pts.cc:2910
IMPORT PTS points_field(float start_speed_y, float end_speed_y, int numpoints, float start_x, float end_x, float start_y, float end_y)
Definition GameApi_pts.cc:3599
IMPORT void explode(PTA array, float x, float y, float z, float dist)
Definition GameApi_pts.cc:1129
IMPORT P ply_faces(std::string url)
Definition GameApi_pts.cc:3538
IMPORT PTS collision_points(float start_x, float end_x, float start_y, float end_y, float start_z, float end_z)
Definition GameApi_pts.cc:2172
float * point_access(PTA pta, int pointnum)
Definition GameApi_pts.cc:577
IMPORT PTS sort_pts(PTS p)
Definition GameApi_pts.cc:2559
IMPORT PTS from_volume(O o, PT pos, V u_x, V u_y, V u_z, int sx, int sy, int sz)
Definition GameApi_pts.cc:409
IMPORT PTS random_points_in_plane(EveryApi &ev, float key, float start_x, float end_x, float start_z, float end_z, float y, int num)
Definition GameApi_pts.cc:3752
IMPORT PTS color_function(PTS orig, std::function< unsigned int(int pointnum, PT pos)> f)
Definition GameApi_pts.cc:1248
IMPORT float pos_x(PTS p, int index)
Definition GameApi_pts.cc:1312
IMPORT PTS li_pts2(LI li)
Definition GameApi_pts.cc:2497
IMPORT PTS pts_alt(std::vector< PTS > vec, int index)
Definition GameApi_pts.cc:3631
void update_from_data(PTA array, PTS p, bool draw=true)
Definition GameApi_pts.cc:679
IMPORT PTS unit_to_cube(PTS orig, PT pos, V u_x, V u_y, V u_z)
IMPORT MS block_ms_lod(MS pts, float start_x, float end_x, float start_y, float end_y, int max_points_visible, float ncd_z_s, float ncd_z_e)
Definition GameApi_pl.cc:23930
IMPORT PTS move(PTS obj, float dx, float dy, float dz)
Definition GameApi_pts.cc:423
IMPORT PTS bullet(int key, float vx, float vy, float vz, float px, float py, float pz, float dist, int max_count, float repeat_time)
Definition GameApi_pts.cc:2808
IMPORT PTS rot_x(PTS obj, float angle)
Definition GameApi_pts.cc:488
IMPORT void set_point(PTA pta, int pointnum, float x, float y, float z)
Definition GameApi_pts.cc:582
IMPORT ML world_filter_cursor(ML ml, float start_delta_x, float end_delta_x, float start_delta_y, float end_delta_y, float start_delta_z, float end_delta_z)
Definition GameApi.cc:45614
IMPORT ML publish_heightfield(ML ml, CFB landscape, float start_x, float end_x, float start_y, float end_y, float start_z, float end_z)
Definition GameApi_pts.cc:3905
IMPORT PTS color_points(PTS p, unsigned int color)
Definition GameApi_pts.cc:1370
IMPORT ML collision_bind(EveryApi &ev, PTS bounding_box, std::string name)
Definition GameApi_pts.cc:2255
IMPORT PTS li_pts(LI li, float pos)
Definition GameApi_pts.cc:2492
IMPORT int num_points(PTA pta)
Definition GameApi_pts.cc:567
IMPORT float pos_y(PTS p, int index)
Definition GameApi_pts.cc:1317
IMPORT PTS block_pts_debug()
Definition GameApi_pl.cc:23925
IMPORT PTS anim_rot_pts(PTS pts, float start_time, float end_time, float v_x, float v_y, float v_z, float rotate_amount)
Definition GameApi.cc:26235
IMPORT CFB cbm_to_cfb(CBM bm, float red_mult, float red_add, float green_mult, float green_add, float blue_mult, float blue_add, float alpha_mult, float alpha_add)
Definition GameApi_pts.cc:3960
IMPORT PTS shadow_points(PTS obj, PT pos, V u_x, V u_y, V light_vec)
Definition GameApi_pts.cc:551
IMPORT VFi matrix_field(MN start, MN end)
Definition GameApi_pts.cc:2958
IMPORT PTS block_pts_lod(PTS pts, float start_x, float end_x, float start_y, float end_y, int max_points_visible, float ncd_z_s, float ncd_z_e)
Definition GameApi_pl.cc:23919
IMPORT PTS filter_component(PTS pts, int comp, float val)
Definition GameApi.cc:26192
IMPORT LI li_from_pts(PTS pts, float dx, float dy, float dz)
Definition GameApi_pts.cc:2072
IMPORT PTS single_pts()
Definition GameApi_pts.cc:2041
IMPORT PTS voxelarray_to_pts(AV arr)
IMPORT PTS ply_pts(std::string url)
Definition GameApi_pts.cc:3372
IMPORT PTS load_points(std::string url)
Definition GameApi_pts.cc:259
IMPORT PTS from_float_volume(FO float_volume, int numpoints, float start_x, float start_y, float start_z, float end_x, float end_y, float end_z)
Definition GameApi_pts.cc:1115
IMPORT int colour_divisor_calc(P p)
Definition GameApi_pts.cc:656
IMPORT PTS block_pts(PTS pts, float d, int max_points_visible)
Definition GameApi_pl.cc:23530
IMPORT int NumPoints(PTS p)
Definition GameApi_pts.cc:1302
IMPORT PTS heightmap(BM colour, FB floatbitmap, PT pos, V u_x, V u_y, V u_z, int sx, int sy)
Definition GameApi_pts.cc:393
IMPORT PTS standard_box(int sx, int sy, int sz, float start_x, float end_x, float start_y, float end_y, float start_z, float end_z)
Definition GameApi_pts.cc:1536
IMPORT PTS pt_array(EveryApi &ev, std::vector< PT > vec)
Definition GameApi_pts.cc:2451
IMPORT PTS anim_mix(PTS o1, PTS o2, float start_val, float end_val, float start_time, float end_time)
Definition GameApi_pts.cc:482
IMPORT PTS rot_z(PTS obj, float angle)
Definition GameApi_pts.cc:500
IMPORT PTS height_field_pts(PTS points, CFB landscape, float start_x, float end_x, float start_y, float end_y, float start_z, float end_z)
Definition GameApi_pts.cc:3911
IMPORT PTS memoize_pts(PTS pts)
Definition GameApi_pts.cc:2130
IMPORT LI matrix2_display(EveryApi &ev, M matrix1, M matrix2, int sx, int sy, int sz, float start_x, float end_x, float start_y, float end_y, float start_z, float end_z)
Definition GameApi_pts.cc:1563
void set_bounds(float s_x, float s_y, float s_z, float e_x, float e_y, float e_z)
Definition GameApi.hh:5652
void set_numpoints(int count)
Definition GameApi.hh:5651
PointsObj(EveryApi &ev, PTS fo, SH sh, P pp, float mix)
Definition GameApi.hh:5637
void set_rotation_matrix2(M m)
Definition GameApi.hh:5687
void render()
Definition GameApi.hh:5666
void set_pos(float pos_x, float pos_y, float pos_z)
Definition GameApi.hh:5672
void set_rotation_matrix(M m)
Definition GameApi.hh:5682
void set_scale(float mult_x, float mult_y, float mult_z)
Definition GameApi.hh:5677
void prepare(bool keep=false)
Definition GameApi.hh:5662
void set_var(std::string name, float r, float g, float b, float a)
Definition GameApi.hh:5688
Definition GameApi.hh:2922
IMPORT DS p_ds_inv(P model, int flags=-1)
Definition GameApi_pl.cc:18074
IMPORT P spatial_decimate(P p, float val)
Definition GameApi_pl.cc:31367
IMPORT P unit_to_flex(P orig, PT bTL, PT bTR, PT bBL, PT bBR, PT fTL, PT fTR, PT fBL, PT fBR)
Definition GameApi_pl.cc:1112
IMPORT P anim_target_scale(P p, PT center, float scale_x, float scale_y, float scale_z)
Definition GameApi_pl.cc:13652
IMPORT ML bg_image(EveryApi &ev, BM bm)
Definition GameApi_pl.cc:3391
IMPORT P substitute(P p1, P p2, float start_x, float end_x, float start_y, float end_y, float start_z, float end_z, float normal)
Definition GameApi_pl.cc:24136
IMPORT P color_distance(P faces, float center_x, float center_y, float center_z, unsigned int color_center, unsigned int color_dist, float dist_center, float dist_dist)
Definition GameApi_pl.cc:933
IMPORT MT material_index(EveryApi &ev, std::vector< MT > vec, int index)
Definition GameApi_pl.cc:18476
IMPORT P file_cache(P model, std::string filename, int obj_num)
Definition GameApi_pl.cc:14813
IMPORT ML ske_anim(EveryApi &ev, P mesh, LI orig_pose, int li_size, std::string url, std::vector< LI > new_poses, MT mat)
Definition GameApi_pl.cc:25449
IMPORT P log_coords2(P p, int x_count, int y_count, float sx, float sy, float sz)
Definition GameApi_pl.cc:16635
IMPORT ML shadow_shader(EveryApi &ev, ML mainloop, int tex_num, float p_x, float p_y, float p_z, unsigned int dark_color, float mix)
Definition GameApi_pl.cc:12769
IMPORT int get_tri_vertex_array_frames(P p)
Definition GameApi_pl.cc:6092
IMPORT P replace_texture(P p, BM bm, int num)
Definition GameApi_pl.cc:19115
IMPORT ML mesh_anim_display_inst(EveryApi &ev, P p, FF val, MN move, MT mat, MS inst)
Definition GameApi_pl.cc:22912
IMPORT P texture_storage(P p, int texture_sx, int texture_sy)
Definition GameApi_pl.cc:19065
IMPORT ML piechart_full(EveryApi &ev, float c_x, float c_y, std::string url, float radius, int numsteps, float start_z, float end_z)
Definition GameApi_diag.cc:457
IMPORT void renderpoly(P p, float x, float y, float z)
Definition GameApi_pl.cc:5771
IMPORT ML sfo_sandbox_shader(EveryApi &ev, ML mainloop, SFO sfo)
Definition GameApi_pl.cc:12644
IMPORT ML render_vertex_array_ml2_texture(EveryApi &ev, P va, std::vector< BM > vec, std::vector< int > types=std::vector< int >(), std::vector< std::string > id_labels=std::vector< std::string >(), std::vector< bool > is_srgb=std::vector< bool >())
Definition GameApi_pl.cc:12807
IMPORT P mix_mesh(P p, PTS points, float val)
Definition GameApi_pl.cc:22411
IMPORT ML render_dynamic_ml(EveryApi &ev, P p, DC dyn)
Definition GameApi_pl.cc:12827
IMPORT P cube_map(float start_x, float end_x, float stary_y, float end_y, float start_z, float end_z, BM bm_front, BM bm_back, BM bm_left, BM bm_right, BM bm_top, BM bm_bottom)
IMPORT P quad(PT p1, PT p2, PT p3, PT p4)
Definition GameApi_pl.cc:3351
IMPORT ARR meshanim_anim_meshes(MA ma, float start_time, float delta_time, int count)
Definition GameApi_pl.cc:20552
IMPORT PL or_elem_pl(PL pl1, PL pl2)
Definition GameApi_pl.cc:27813
IMPORT ML p_mtl2_prepare(P p)
Definition GameApi_pl.cc:18700
IMPORT void print_stat(P p)
Definition GameApi_pl.cc:682
IMPORT CS colourspace_or_elem(CS cs, float delta_t, CS cs2, float delta_t2)
Definition GameApi_pl.cc:28230
IMPORT P texture_add(P p, BM bm)
Definition GameApi_pl.cc:21082
IMPORT P gradient_color(P p, float p_x, float p_y, float p_z, float v_x, float v_y, float v_z, unsigned int start_color, unsigned int end_color)
Definition GameApi_pl.cc:22313
IMPORT P decimate3(P p, float val)
Definition GameApi_pl.cc:30042
IMPORT std::vector< MaterialDef > parse_mtl(std::string filename)
Definition GameApi_pl.cc:18258
IMPORT P cube_anim(float start_x, float end_x, float start_y, float end_y, float start_z, float end_z, float start_x2, float end_x2, float start_y2, float end_y2, float start_z2, float end_z2, float start_time, float end_time)
Definition GameApi_pl.cc:26747
IMPORT P lod_set(P p, std::string name, int value)
Definition GameApi_pl.cc:21759
IMPORT ML colour_shader(EveryApi &ev, ML mainloop, float mix)
Definition GameApi_pl.cc:12744
IMPORT P convex_hull(PTS pts)
Definition GameApi_pl.cc:24643
IMPORT SBM combine_sbm(SBM texture1, SBM texture2)
Definition GameApi_pl.cc:16458
IMPORT ML shading_shader(EveryApi &ev, ML mainloop, unsigned int level1, unsigned int level2, unsigned int level3, float spec_size=5.0f, bool ambient=true, bool diffuse=true, bool specular=false)
Definition GameApi_pl.cc:12784
IMPORT P decimate2(P p, float val)
Definition GameApi_pl.cc:29327
IMPORT P z_split(P p, float z, float z_0, float z_1)
Definition GameApi_pl.cc:27011
IMPORT P filter_invisible(P p, float size)
Definition GameApi_pl.cc:21508
IMPORT P shadow(P orig, PT pos, V u_x, V u_y, V light_vec)
Definition GameApi_pl.cc:3701
IMPORT ARR poly_execute(EveryApi &ev, ARR arr, std::string gameapi_script)
Definition GameApi_pl.cc:16046
IMPORT P tri_vertex_array(float *v_array, int v_size, float *n_array, int n_size, unsigned int *c_array, int c_size, float *tex_array, int tex_size, float **attrib_array, int a_size1, int a_size2)
Definition GameApi_pl.cc:6072
IMPORT P transparent_separate(P p, BM bm, bool opaque, bool force_transparent, bool force_opaque)
Definition GameApi.cc:5976
IMPORT P and_not_elem(EveryApi &ev, P p1, P p_not, O o1, O o_not, CT cutter1, CT cutter_not)
Definition GameApi_pl.cc:14686
IMPORT ML ske_anim2(EveryApi &ev, std::vector< P > mesh, LI orig_pose, int li_size, std::string url, std::vector< LI > new_poses, MT mat)
Definition GameApi_pl.cc:25433
IMPORT void explode(VA va, PT pos, float dist)
Definition GameApi_pl.cc:6535
IMPORT ARR split_faces(P p, ATT att, int max_attach)
Definition GameApi_pl.cc:24908
IMPORT P color_from_normals(P orig)
Definition GameApi_pl.cc:4854
IMPORT PTS voxelarray_to_pts(AV arr, float start_x, float end_x, float start_y, float end_y, float start_z, float end_z)
Definition GameApi_pl.cc:22161
IMPORT P max_color(P orig, P orig2)
Definition GameApi_pl.cc:4361
IMPORT ML toon_shader(EveryApi &ev, ML mainloop)
Definition GameApi_pl.cc:12624
IMPORT void render_dynamic(P p, int array_elem, bool textures)
Definition GameApi_pl.cc:6245
IMPORT P color_from_texcoord(P orig, unsigned int color_1, unsigned int color_2, unsigned int color_3, unsigned int color_4)
Definition GameApi_pl.cc:14653
IMPORT P move(P orig, PT obj_0, V obj_x, V obj_y, V obj_z, PT world_0, V world_x, V world_y, V world_z)
Definition GameApi_pl.cc:5049
IMPORT P color_map(BM bm, float start_x, float end_x, float start_y, float end_y, float z)
Definition GameApi_pl.cc:14258
IMPORT P cone_anim(float c_x, float c_y, float c_z, float d_x, float d_y, float d_z, float c2_x, float c2_y, float c2_z, float d2_x, float d2_y, float d2_z, float r1, float r2, float r1_2, float r2_2, int numfaces, float start_time, float end_time)
Definition GameApi_pl.cc:26730
IMPORT P y_split(P p, float y, float y_0, float y_1)
Definition GameApi_pl.cc:27006
IMPORT P texcoord_manual(P orig, float p1_x, float p1_y, float p2_x, float p2_y, float p3_x, float p3_y, float p4_x, float p4_y)
Definition GameApi_pl.cc:3311
IMPORT P memoize(P orig)
Definition GameApi_pl.cc:5371
IMPORT P splitquads(P orig, int x_count, int y_count)
Definition GameApi_pl.cc:5082
IMPORT ML update_vertex_array_ml(VA va, P p, bool keep=false)
Definition GameApi_pl.cc:6315
IMPORT P lighting(P orig, L lighting)
IMPORT void load_glb_from_temp(std::string filename, void(*fptr)(void *), void *, bool &success)
Definition GameApi.cc:31930
IMPORT P optimize_mesh(P p)
IMPORT P from_lines(LI li, std::function< P(int i, float sx, float sy, float sz, float ex, float ey, float ez, unsigned int scolor, unsigned int ecolor)> f)
Definition GameApi_pl.cc:719
IMPORT P meshanim_mesh(MA ma, float time)
Definition GameApi_pl.cc:20487
IMPORT CS colourspace_func(std::function< unsigned int(float, float, float, float)> f, float sx, float ex, float sy, float ey, float sz, float ez, float st, float et)
Definition GameApi_pl.cc:28237
IMPORT ML newshadow_shader_2_gltf(EveryApi &ev, ML ml, float light_dir_x, float light_dir_y, float light_dir_z, float dark_level, float light_level, float scale, int texindex)
Definition GameApi_pl.cc:12684
IMPORT DS tf_ds_inv(TF tf, int flags)
Definition GameApi_pl.cc:18188
IMPORT P s_sample(S surf, int sx, int sy)
Definition GameApi_pl.cc:16828
IMPORT P tri_strip(PT *array, int size)
Definition GameApi_pl.cc:6187
IMPORT P min_color(P orig, P orig2)
Definition GameApi_pl.cc:4355
IMPORT P scale(P orig, float sx, float sy, float sz)
Definition GameApi_pl.cc:5041
IMPORT ML m_bind_inst_many(EveryApi &ev, std::vector< P > vec, std::vector< MT > materials, PTS pts, int ticks)
Definition GameApi_pl.cc:21930
IMPORT ML acesfilm_shader(EveryApi &ev, ML mainloop)
Definition GameApi_pl.cc:12749
IMPORT P quad_y(float x1, float x2, float y, float z1, float z2)
Definition GameApi_pl.cc:3371
IMPORT P fix_vertex_order(P p)
Definition GameApi_pl.cc:21422
IMPORT P single_texture(P orig, BM texture)
IMPORT void delete_vertex_array(VA arr)
Definition GameApi_pl.cc:6331
IMPORT P texcoord_spherical2(EveryApi &ev, PT center, float r, P orig)
Definition GameApi_pl.cc:14617
IMPORT P color_voxel(P orig, VX colours, PT p, V u_x, V u_y, V u_z)
Definition GameApi_pl.cc:6277
IMPORT void print_data(P p)
Definition GameApi_pl.cc:643
IMPORT P mesh_resize(P p, float start_x, float end_x, float start_y, float end_Y, float start_z, float end_z)
Definition GameApi_pl.cc:19245
IMPORT ML blur_shader(EveryApi &ev, ML mainloop, float x_val, float y_val)
Definition GameApi_pl.cc:16175
IMPORT PV p_array(std::vector< P > vec)
Definition GameApi_main.cc:2516
IMPORT P color(P orig, unsigned int color)
Definition GameApi_pl.cc:4470
IMPORT ML render_vertex_array_ml(EveryApi &ev, VA va)
Definition GameApi_pl.cc:12790
IMPORT void load_glb_from_temp3(std::string filename)
Definition GameApi.cc:31945
IMPORT MS identity_pose(int li_size)
Definition GameApi_pl.cc:25186
IMPORT P from_normal_to_texcoord(P p)
Definition GameApi_pl.cc:20312
IMPORT P count_function(P p1, std::function< int(int face)> f)
Definition GameApi_pl.cc:5966
IMPORT P recalculate_normals(P orig)
Definition GameApi_pl.cc:5356
IMPORT P unit_cube(P orig, PT pos, V u_x, V u_y, V u_z)
Definition GameApi_pl.cc:1051
IMPORT P anim_interpolate(P p, float val)
Definition GameApi_pl.cc:13623
IMPORT L radial_lighting(float dx, float dy, float dz, int r, int g, int b, int a, int r2, int g2, int b2, int a2, float dist)
IMPORT ML phong_shader(EveryApi &ev, ML mainloop, float light_dir_x, float light_dir_y, float light_dir_z, unsigned int ambient, unsigned int specular, unsigned int highlight, float pow)
Definition GameApi_pl.cc:12697
IMPORT ARR material_extractor_p(P p, int start_index, int end_index, int num_slots, int current_slot)
Definition GameApi_pl.cc:18664
IMPORT P change_texture(P orig, std::function< int(int face)> f, BM *array, int size)
Definition GameApi_pl.cc:5329
IMPORT L color_lighting(float dx, float dy, float dz, int r, int g, int b, int a)
IMPORT P color_function(P p1, std::function< unsigned int(int face, int point)> f)
Definition GameApi_pl.cc:5994
IMPORT P flip_normals(P obj)
Definition GameApi_pl.cc:16013
IMPORT P color_map3_sph(BM bm, FB height, PT pos, V u_x, V u_y)
Definition GameApi_pl.cc:14303
IMPORT ARR gltf_split_faces2(EveryApi &ev, TF model0, int mesh_index, int prim_index, int max_attach)
Definition GameApi_gltf.cc:14157
IMPORT ML blurred_render_shader(EveryApi &ev, ML mainloop, int numsamples, float blur_radius)
Definition GameApi_pl.cc:12690
IMPORT P resize_to_correct_size(P model)
Definition GameApi_pl.cc:15368
IMPORT P change_normals(P orig, std::function< V(V orig, int face, int point)> f)
Definition GameApi_pl.cc:5221
P translate_1(P orig, float dx, float dy, float dz)
Definition GameApi_pl.cc:4983
IMPORT ML sprite_render_inst(EveryApi &ev, BM bm, PTS pts, float start_x, float end_x, float start_y, float end_y, float z)
Definition GameApi_pl.cc:14241
IMPORT P torus2(EveryApi &ev, int numfaces1, int numfacesw2, PT center, float radius1, float radius2)
Definition GameApi_pl.cc:3650
IMPORT BM shadow_map3(EveryApi &ev, P objs, float p_x, float p_Y, float p_z, int sx, int sy, P quad)
Definition GameApi_pl.cc:20956
IMPORT P rounded_cube(EveryApi &ev, float start_x, float end_x, float start_y, float end_y, float start_z, float end_z, float round_radius)
Definition GameApi_pl.cc:3553
IMPORT ML mesh_anim_display_inst2(EveryApi &ev, P p, FF val, MN mn, MT mat, PTS inst)
Definition GameApi_pl.cc:22922
IMPORT int p_num_textures(P p)
Definition GameApi_pl.cc:18314
IMPORT ML block_draw(std::vector< ML > vec, float pos_x, float pos_z, int sx, int sz, float delta_x, float delta_z, int view)
Definition GameApi_pl.cc:24027
IMPORT P normal_darkness(P p, float dark)
Definition GameApi_pl.cc:22281
IMPORT P multiply_facecoll(P p, int sx, int sy, int sz)
Definition GameApi.cc:23127
IMPORT P attrib_function(P p1, std::function< float(int face, int point, int idx)> f, int idx)
Definition GameApi_pl.cc:6012
IMPORT P no_batch_map(P p)
Definition GameApi_pl.cc:28315
IMPORT P from_polygon(P p, std::function< P(int face, PT p1, PT p2, PT p3, PT p4)> f)
Definition GameApi_pl.cc:637
IMPORT P gltf_load_nr(EveryApi &ev, TF model, int mesh_index, int prim_index, TRR resize_transfer_id)
Definition GameApi_gltf.cc:6141
IMPORT P load_ds_from_temp_p(EveryApi &ev, P p, std::string url)
Definition GameApi.cc:31921
IMPORT P polygon_fetch(P p)
Definition VertexArray.cc:4833
IMPORT P smooth_normals(P orig)
IMPORT ML fog_shader(EveryApi &ev, ML mainloop, float fog_dist, unsigned int dark_color, unsigned int light_color)
Definition GameApi_pl.cc:12764
IMPORT ML anim_render(AA, float delta)
IMPORT P persistent_cache(P orig, std::string filename)
Definition GameApi_pl.cc:15523
IMPORT ML sprite_render_fade(EveryApi &ev, BM bm, PTS pts, float start_x, float end_x, float start_y, float end_y, float z, bool flip, float start_time, float end_time)
Definition GameApi_pl.cc:14249
IMPORT P world_from_bitmap(std::function< P(int c)> f, BM int_bm, float dx, float dy, int max_c)
Definition GameApi_pl.cc:878
IMPORT P color_map3_cyl(BM bm, FB height, PT pos, V u_x, V u_y)
Definition GameApi_pl.cc:14292
IMPORT P matrix(P orig, M mat)
Definition GameApi_pl.cc:4971
IMPORT void save_model(P poly, std::string filename)
Definition GameApi_pl.cc:3001
IMPORT P texcoord_from_normal2(P p)
Definition GameApi_pl.cc:15698
IMPORT void print_data2(P p)
Definition GameApi_pl.cc:663
IMPORT ML line_to_cone2(EveryApi &ev, LI li, float size, int numfaces, MT mt)
Definition GameApi_pl.cc:15893
IMPORT P fix_texcoord(P p)
Definition GameApi_pl.cc:15756
IMPORT ML bloom1_shader(EveryApi &ev, ML mainloop, float r_val, float g_val, float b_val)
Definition GameApi_pl.cc:16581
IMPORT ML skeletal_shader(EveryApi &ev, ML mainloop, std::vector< SA > vec)
Definition GameApi_pl.cc:12651
IMPORT ATT attach_cache(ATT a, P p)
Definition GameApi_pl.cc:24773
IMPORT P spherical_normals(P p, float p_x, float p_y, float p_z)
Definition GameApi_pl.cc:16093
IMPORT ML dyn_lights_shader(EveryApi &ev, ML mainloop, float light_pos_x, float light_pos_y, float light_pos_z, float dist, MN dyn_point)
Definition GameApi_pl.cc:12777
IMPORT P repeat_xy_p(EveryApi &ev, P p, float start_x, float start_y, float dx, float dy, int sx, int sy)
Definition GameApi_pl.cc:19123
IMPORT BM renderpolytobitmap(EveryApi &ev, P p, SH sh, float x, float y, float z, int sx, int sy)
Definition GameApi_pl.cc:14706
IMPORT P sphere(PT center, float radius, int numfaces1, int numfaces2)
Definition GameApi_pl.cc:3644
IMPORT ML anim(EveryApi &ev, ML next, MA anim, float start_time, float delta_time, int count)
Definition GameApi_pl.cc:20640
IMPORT void update_vertex_array(VA va, P p, bool keep=false)
Definition GameApi_pl.cc:6353
IMPORT ARR sphere_rays2(EveryApi &ev, float center_x, float center_y, float center_z, float radius, float delta_alfa, float delta_beta, FS field, int maxiter, float c, std::vector< PT > vec)
Definition GameApi_ff.cc:386
IMPORT LI li_static_instancing_matrix(EveryApi &ev, LI obj, MS matrix_array)
Definition GameApi_pl.cc:15922
IMPORT P color_range(P orig, unsigned int source_upper, unsigned int source_lower, unsigned int upper_range, unsigned int lower_range)
Definition GameApi_pl.cc:4590
IMPORT ML bump_phong_shader(EveryApi &ev, ML mainloop, float light_dir_x, float light_dir_y, float light_dir_z, unsigned int ambient, unsigned int highlight, float pow)
Definition GameApi_pl.cc:12759
IMPORT P prepare_cache(std::string url, P p)
Definition GameApi_pl.cc:2607
IMPORT P decimate_without_holes(EveryApi &ev, P p, float, int, float, std::vector< BM >)
Definition GameApi_pl.cc:30053
IMPORT P static_instancing_vertex_color(EveryApi &ev, P obj, PTS pos)
Definition GameApi_pl.cc:15967
IMPORT void render_vertex_array_instanced_matrix(ShaderApi &ev, VA va, MSA pta, SH sh, int hide_n=-1)
Definition GameApi_pl.cc:13311
IMPORT P stl_load(std::string url)
Definition GameApi_pl.cc:21352
IMPORT ML coloured_lights_shader(EveryApi &ev, ML mainloop, float scale, unsigned int color_1, unsigned int color_2, unsigned int color_3, unsigned int color_4, unsigned int color_5, unsigned int color_6, unsigned int color_7, unsigned int color_8, PT pos_1, PT pos_2, PT pos_3, PT pos_4, PT pos_5, PT pos_6, PT pos_7, PT pos_8, float dist_1, float dist_2, float dist_3, float dist_4, float dist_5, float dist_6, float dist_7, float dist_8)
Definition GameApi_pl.cc:12549
IMPORT P face_cutter(P p, float start, float end)
Definition GameApi_pl.cc:26858
IMPORT P color_map2(BM bm, PT pos, V u_x, V u_y)
Definition GameApi_pl.cc:14269
IMPORT P deform(P obj, O bools, float dx, float dy, float dz)
Definition GameApi_pl.cc:14680
IMPORT void prepare_vertex_array_instanced(ShaderApi &ev, VA va, PTA pta, SH sh)
Definition GameApi_pl.cc:13072
IMPORT ARR p_mtl2(EveryApi &ev, std::string obj_url, std::string mtl_url, std::string prefix, int count, int start_index, int end_index, float mix)
Definition GameApi_pl.cc:18709
IMPORT ML spotlight_shader(EveryApi &ev, ML mainloop, int light_color_id, MN move)
Definition GameApi_pl.cc:12541
IMPORT P color_map3(BM bm, FB height, PT pos, V u_x, V u_y)
Definition GameApi_pl.cc:14280
IMPORT ML position_based_on_screen(ML obj)
Definition GameApi_pl.cc:16702
IMPORT ML sbm_texture(EveryApi &ev, ML mainloop, SBM bitmap)
Definition GameApi_pl.cc:16565
HeightMapType
Definition GameApi.hh:3192
@ EQuad
Definition GameApi.hh:3192
@ ETriangle
Definition GameApi.hh:3192
IMPORT ML custom_shader(EveryApi &ev, ML mainloop, std::string v_shader, std::string f_shader, std::string v_funcname, std::string f_funcname)
Definition GameApi_pl.cc:12532
IMPORT VA create_vertex_array_attribs(P p, bool keep, std::vector< int > attribs, std::vector< int > attribi)
Definition GameApi_pl.cc:7160
IMPORT ML adjust_shader(EveryApi &ev, ML mainloop, unsigned int ad_color, float ad_dark, float ad_light)
Definition GameApi_pl.cc:12703
IMPORT ARR p_mtl2_materials(EveryApi &ev, P p)
Definition GameApi_pl.cc:2381
IMPORT ID find_texcoord_id(P p, int facenum, int pointnum)
IMPORT P combine_textures(P p1, P p2)
Definition GameApi_pl.cc:26129
IMPORT ML fade_pic(EveryApi &ev, BM bm1, float start_time, float transition_time, float end_time, float end_transition_time, BM bm2, float start2_time, float transition2_time, float end2_time, float end2_transition_time)
Definition GameApi_pl.cc:28321
IMPORT P anim_target_matrix(P p, M matrix)
IMPORT P sphere_anim(float c_x, float c_y, float c_z, float c2_x, float c2_y, float c2_z, float r, float r2, float start_time, float end_time, int numfaces1, int numfaces2)
Definition GameApi_pl.cc:26719
IMPORT P world_from_bitmap2(EveryApi &ev, std::function< P(int c, PT tl, PT tr, PT bl, PT br)> f, BM int_bm, FB float_bm, float dx, float dz, float height)
Definition GameApi_pl.cc:793
IMPORT BM texture_from_p(P p, int num)
Definition GameApi_pl.cc:20275
IMPORT P fullscreen_quad(EveryApi &ev)
Definition GameApi_pl.cc:3383
IMPORT P p_url_mtl(EveryApi &ev, std::string url, int count, std::vector< std::string > material_names)
Definition GameApi_pl.cc:2628
IMPORT P smooth_normals2(P p)
Definition GameApi_pl.cc:19348
IMPORT P texture(P orig, BM bm, int bm_choose=-1)
Definition GameApi_pl.cc:3735
IMPORT ML water_shader(EveryApi &ev, ML mainloop, unsigned int color1, unsigned int color2, unsigned int color3, float center_x, float center_y, float center_z, float wave_mult, float time_mult)
Definition GameApi_pl.cc:12667
IMPORT ID find_normal_id(P p, int facenum, int pointnum)
IMPORT P load_model(std::string filename, int obj_num)
Definition GameApi_pl.cc:2922
IMPORT ML sprite_render(EveryApi &ev, BM bm, float start_x, float end_x, float start_y, float end_y, float z)
Definition GameApi_pl.cc:14233
IMPORT P color_alpha(P orig, unsigned int alpha)
Definition GameApi_pl.cc:4860
IMPORT ML dither_shader(EveryApi &ev, ML mainloop)
Definition GameApi_pl.cc:16123
IMPORT ARR poly_array(std::vector< P > vec)
Definition GameApi_pl.cc:16018
IMPORT ML ambient_shader(EveryApi &ev, ML mainloop, int ambient_color_id, float ambient_level)
IMPORT P color_cube(P orig, PT o, PT u_x, PT u_y, PT u_z, unsigned int color_o, unsigned int color_x, unsigned int color_y, unsigned int color_z)
Definition GameApi_pl.cc:4928
P sprite_bind_1(P p, Q bm, TX tx)
Definition GameApi_pl.cc:3341
IMPORT P flip_polygon_order(P p)
Definition GameApi_pl.cc:4807
IMPORT P resize_to_correct_size_g(P model, TRR resize_transfer_id)
Definition GameApi_pl.cc:15373
IMPORT P cut_faces(P p, O o, CT cutter)
Definition GameApi_pl.cc:13851
IMPORT P transparent_separate2(P p, std::vector< BM > vec, bool opaque)
Definition GameApi.cc:6237
IMPORT void update_vertex_array_no_memory(VA va, P p)
Definition GameApi_pl.cc:6321
IMPORT P or_array2(std::vector< P > vec)
Definition GameApi_pl.cc:4245
IMPORT P p_piechart(EveryApi &ev, float c_x, float c_y, float start_angle, float end_angle, float radius, int numsteps, float start_z, float end_z)
Definition GameApi_diag.cc:286
IMPORT CS colourspace_sphere2()
Definition GameApi_pl.cc:28189
IMPORT P dist_from_lines(LI li, float d1, float d2, PT center)
Definition GameApi_pl.cc:1017
IMPORT PolygonApi(Env &e)
Definition GameApi_pl.cc:627
IMPORT P load_model_all_no_cache_mtl(std::string filename, int count, std::vector< std::string > material_names, bool nr)
Definition GameApi_pl.cc:1175
IMPORT void prepare_vertex_array_instanced_matrix(ShaderApi &ev, VA va, MSA pta, SH sh)
Definition GameApi_pl.cc:13081
IMPORT void update(VA va)
Definition GameApi_pl.cc:7330
IMPORT ID find_color_id(P p, int facenum, int pointnum)
IMPORT P load_model_all_no_cache(std::string filename, int count, bool nr)
Definition GameApi_pl.cc:1139
IMPORT TF decimate_tf_zero(TF mesh)
Definition GameApi_pl.cc:31151
IMPORT P create_dynamic_geometry(P *array, int size)
Definition GameApi_pl.cc:6049
IMPORT P counts(P p1, int numfaces)
Definition GameApi_pl.cc:5959
IMPORT P create_static_geometry(P *array, int size)
Definition GameApi_pl.cc:6033
IMPORT ML texture_cubemap_shader(EveryApi &ev, ML mainloop, float mix, float mix2)
Definition GameApi_pl.cc:12606
IMPORT P change_colors(P orig, std::function< unsigned int(unsigned int orig, int face, int point)> f)
Definition GameApi_pl.cc:5279
IMPORT ML glowedge_shader(EveryApi &ev, ML mainloop, float white_level, float gray_level, float edge_pos)
Definition GameApi_pl.cc:12662
IMPORT P p_mtl(EveryApi &ev, std::string obj_url, std::string mtl_url, std::string prefix, int count)
Definition GameApi_pl.cc:2641
IMPORT P light_transport(P p, int num, float light_dir_x, float light_dir_y, float light_dir_z)
Definition GameApi_pl.cc:20219
IMPORT void preparepoly(P p, int bbm_choose=-1)
Definition GameApi_pl.cc:5703
IMPORT ML render_vertex_array_ml2_cubemap(EveryApi &ev, P va, std::vector< BM > vec)
Definition GameApi_pl.cc:12817
IMPORT ML gi_shader(EveryApi &ev, ML mainloop, PTS points, float obj_size)
Definition GameApi_pl.cc:12737
IMPORT std::vector< P > orig_pose(EveryApi &ev, P p, LI li, int li_size)
Definition GameApi_pl.cc:25070
IMPORT void preparedone(P p)
Definition GameApi_pl.cc:21346
IMPORT P intersect(EveryApi &ev, P p1, P p2, O o1, O o2, CT cutter1, CT cutter2)
Definition GameApi_pl.cc:13859
IMPORT P grid(PT o, PT u_x, PT u_y, int num_x, int num_y)
IMPORT ARR p_mtl_d(P p)
Definition GameApi_pl.cc:2426
IMPORT P p_ds_url(EveryApi &ev, std::string url)
Definition GameApi_pl.cc:2674
IMPORT ARR block_divide(P p, float pos_x, float pos_z, int sx, int sz, float delta_x, float delta_z)
Definition GameApi_pl.cc:23185
IMPORT P p_url(EveryApi &ev, std::string url, int count)
Definition GameApi_pl.cc:2595
IMPORT ML wave_shader(EveryApi &ev, ML mainloop, float radius, float t_mult, float x_mult, float y_mult)
Definition GameApi_pl.cc:16143
IMPORT FB fractal_mountain(int level, int sx, int sy)
Definition GameApi_bm.cc:5196
IMPORT ML render_vertex_array_ml2_texture2(EveryApi &ev, P p)
Definition GameApi_pl.cc:12822
IMPORT ML phong_shader2(EveryApi &ev, ML mainloop, float light_dir_x, float light_dir_y, float light_dir_z, unsigned int ambient, unsigned int specular, unsigned int highlight, float pow)
Definition GameApi_pl.cc:12709
IMPORT ARR comb_mat(GameApi::EveryApi &ev, std::vector< MT > vec1, std::vector< MT > vec2)
Definition GameApi_pl.cc:2326
IMPORT ARR or_elem_anim(P p1, P p2, float time)
IMPORT P ambient_occulsion_color(P p)
Definition GameApi_pl.cc:26922
IMPORT ML texture_shader(EveryApi &ev, ML mainloop, float mix)
Definition GameApi_pl.cc:12584
IMPORT P torus(int numfaces1, int numfaces2, PT center, V u_x, V u_y, float radius1, V uu_x, V uu_y, float radius2)
Definition GameApi_pl.cc:3658
IMPORT P texcoord_from_normal(P p)
Definition GameApi_pl.cc:15665
IMPORT P combine_anim(P p1, P p2, float start_time, float end_time)
Definition GameApi_pl.cc:26708
IMPORT P unit_to_cube(P orig, PT pos, V u_x, V u_y, V u_z)
Definition GameApi_pl.cc:1080
IMPORT P quads_to_triangles(P p)
Definition GameApi_pl.cc:4813
IMPORT P prepare_cut(P p)
Definition GameApi_pl.cc:14787
IMPORT SBM blur_sbm(SBM texture, float pixel_x, float pixel_y)
Definition GameApi_pl.cc:16415
IMPORT PL rect_pl(float start_x, float end_x, float start_y, float end_y, float start_z, float end_z, bool x_or_z, bool start_or_end_higher)
Definition GameApi_pl.cc:27821
IMPORT P tri_to_quad(P p)
Definition GameApi_pl.cc:13927
IMPORT P cube(float start_x, float end_x, float start_y, float end_y, float start_z, float end_z)
Definition GameApi_pl.cc:3613
IMPORT SBM sbm_circle(float start_time, float end_time, float start_pos_x, float start_pos_y, float end_pos_x, float end_pos_y, float start_radius, float end_radius)
Definition GameApi_pl.cc:16523
IMPORT BM p_texture(P p, int i)
Definition GameApi_pl.cc:18326
IMPORT P texcoord_cube(P orig, PT o, PT u_x, PT u_y, PT u_z, PT tex_o, PT tex_x, PT tex_y, PT tex_z)
IMPORT P mix_color(P orig, P orig2, float val)
Definition GameApi_pl.cc:4349
IMPORT P static_instancing_matrix(EveryApi &ev, P obj, MS matrix_array)
Definition GameApi_pl.cc:15908
IMPORT P color_grayscale(P orig)
Definition GameApi_pl.cc:4596
IMPORT P quad_x(float x, float y1, float y2, float z1, float z2)
Definition GameApi_pl.cc:3360
IMPORT P decimate3_inv(P p, float val)
Definition GameApi_pl.cc:30047
IMPORT ML vertex_phong_shader(EveryApi &ev, ML mainloop, float light_dir_x, float light_dir_y, float light_dir_z, unsigned int ambient, unsigned int highlight, float pow, float mix)
Definition GameApi_pl.cc:12714
IMPORT P meshanim_mesh2(MA ma, float time1, float time2)
Definition GameApi_pl.cc:20546
IMPORT P subpoly_change(P p, P p2, O choose)
Definition GameApi_pl.cc:14504
IMPORT ARR material_extractor_bm(P p, int start_index, int end_index)
Definition GameApi_pl.cc:18854
IMPORT P fromsurface(S s1, S s2, C curve)
IMPORT MA meshanim(std::vector< P > vec, float start_time, float end_time)
Definition GameApi_pl.cc:20429
IMPORT P world_from_voxel(std::function< P(unsigned int c)> f, VX voxel, float dx, float dy, float dz, int max_c)
Definition GameApi_pl.cc:751
IMPORT bool ready_to_prepare(ML p)
Definition GameApi_pl.cc:22
IMPORT P change_positions(P orig, std::function< PT(PT p, int face, int point)> f)
Definition GameApi_pl.cc:5167
IMPORT P build_offsets(P p, std::vector< PT > vec)
Definition GameApi_pl.cc:15562
IMPORT P ds_cache_url(EveryApi &ev, P input, int count)
Definition GameApi_pl.cc:2785
IMPORT ML dist_field_mesh_shader(EveryApi &ev, ML mainloop, SFO sfo)
Definition GameApi_pl.cc:12634
IMPORT P ring(float sx, float sy, float x, int steps)
Definition GameApi_pl.cc:3681
IMPORT BM gltf_load_bitmap(GameApi::EveryApi &ev, TF model, int image_index)
Definition GameApi_gltf.cc:6011
IMPORT P curve_to_poly(C c, float start_x, float end_x, float start_y, float end_y, float start_angle, float end_angle, int numinstances)
Definition GameApi_pl.cc:16904
IMPORT P sort_faces_by_area(P p)
Definition GameApi_pl.cc:29890
IMPORT P rotatez(P orig, float angle)
Definition GameApi_pl.cc:5016
IMPORT ML texture_many_shader(EveryApi &ev, ML mainloop, float mix)
Definition GameApi_pl.cc:12596
IMPORT ML line_to_cone3(EveryApi &ev, LI li, float size, int numfaces, MT mt, unsigned int color)
Definition GameApi_pl.cc:15882
IMPORT P p_empty()
Definition GameApi_pl.cc:1133
IMPORT std::vector< P > orig_pose2(EveryApi &ev, std::vector< P > vec, LI li, int li_size)
Definition GameApi_pl.cc:25053
IMPORT ML render_vertex_array_ml2(EveryApi &ev, P va)
Definition GameApi_pl.cc:12794
IMPORT P grid(PT o, PT u_x, PT u_y, int num_x, int num_y, P *grid)
IMPORT P circular_span(EveryApi &ev, LI li, float delta_angle_around_y_axis, int num_steps)
Definition GameApi_pl.cc:5386
IMPORT P texture_splitter2(P p, int num, int num_slots, int current_slot)
Definition GameApi_pl.cc:18658
IMPORT P log_coords(P p)
Definition GameApi_pl.cc:16627
IMPORT P p_ds(EveryApi &ev, const unsigned char *beg, const unsigned char *end)
Definition GameApi_pl.cc:17839
IMPORT P texcoord_spherical(PT center, P orig)
Definition GameApi_pl.cc:3317
IMPORT void render_vertex_array_instanced(ShaderApi &ev, VA va, PTA pta, SH sh, int hide_n=-1)
Definition GameApi_pl.cc:13089
IMPORT ML mesh_anim(EveryApi &ev, std::vector< P > vec, std::vector< MN > move, std::vector< MT > mat, std::vector< MS > inst, std::vector< IF > states, std::string url)
Definition GameApi_pl.cc:22733
IMPORT P attribi_function(P p1, std::function< int(int face, int point, int idx)> f, int idx)
Definition GameApi_pl.cc:6022
IMPORT P texcoord_default(P orig)
Definition GameApi_pl.cc:7318
IMPORT S s_spherical(float c_x, float c_y, float c_z, FB fb, float start_radius, float end_radius, float start_values, float end_values)
Definition GameApi_pl.cc:16819
IMPORT SBM texture_sbm()
Definition GameApi_pl.cc:16297
IMPORT VA create_vertex_array(P p, bool keep=false)
Definition GameApi_pl.cc:6557
IMPORT P memoize_all(P orig)
Definition GameApi_pl.cc:5378
IMPORT P repeat_yz_p(EveryApi &ev, P p, float start_y, float start_z, float dy, float dz, int sy, int sz)
Definition GameApi_pl.cc:19139
IMPORT P disc(EveryApi &ev, int numfaces, float center_x, float center_y, float center_z, float normal_x, float normal_y, float normal_z, float radius)
Definition GameApi_pl.cc:16063
IMPORT ARR material_choose(std::vector< MT > mat, std::vector< P > p)
Definition GameApi_pl.cc:18784
IMPORT void create_vertex_array_hw(VA va)
Definition GameApi_pl.cc:6542
IMPORT P heightmap2(FB bm, float start_x, float end_x, float start_y, float end_y, float start_z, float end_z)
Definition GameApi_pl.cc:5578
IMPORT void render_vertex_array_dyn(VA va, DC dc, MainLoopEnv &e)
Definition GameApi_pl.cc:12983
IMPORT P point_function(P p1, std::function< PT(int face, int point)> f)
Definition GameApi_pl.cc:5976
IMPORT ARR block_render(GameApi::EveryApi &ev, std::vector< P > vec, MT mat)
Definition GameApi_pl.cc:23201
IMPORT P or_array(P *array, int size)
Definition GameApi_pl.cc:4254
IMPORT MS new_pose(EveryApi &ev, LI li_orig, LI li)
Definition GameApi_pl.cc:25174
IMPORT ML choose_time(ML next, std::vector< ML > vec, float delta_time)
Definition GameApi_pl.cc:20622
IMPORT ML load_scene(EveryApi &ev, std::string url, int sx, int sy)
Definition GameApi_pl.cc:22045
IMPORT P static_instancing_array(EveryApi &ev, std::vector< P > vec, PTS pos)
Definition GameApi_pl.cc:15937
IMPORT P decimate(P p, float val)
Definition GameApi_pl.cc:28967
IMPORT P average_normals(P orig, int sx, int sy)
Definition GameApi_pl.cc:5362
IMPORT P normal_function(P p1, std::function< V(int face, int point)> f)
Definition GameApi_pl.cc:5986
IMPORT P matrix44(P orig, M mat)
Definition GameApi_pl.cc:25419
IMPORT P span(LI li, M matrix, int num_steps)
Definition GameApi_pl.cc:5493
IMPORT bool is_texture(VA va)
Definition GameApi_pl.cc:12836
IMPORT ML gltf_shader(EveryApi &ev, ML mainloop, float mix, bool tex0, bool tex1, bool tex2, bool tex3, bool tex4, bool tex5, bool tex6, bool tex7, float roughness, float metallic, float basecolor0, float basecolor1, float basecolor2, float basecolor3, float occul, float emiss, bool spec, float diff_factor_r=1.0, float diff_factor_g=1.0, float diff_factor_b=1.0, float spec_factor_r=1.0, float spec_factor_g=1.0, float spec_factor_b=1.0, float glossi_factor=1.0, bool unlit=false, float emis2_r=0.0, float emis2_g=0.0, float emis2_b=0.0, float light_dir_x=0.0, float light_dir_y=0.0, float light_dir_z=-400.0, std::string cache_id="gltf", float self_mult=1.0, float rest_mult=0.0, bool emissive=false)
Definition GameApi_pl.cc:12601
IMPORT P choose_texture(P orig, int num)
Definition GameApi_pl.cc:7325
IMPORT P interpolate_mesh_pair(P start_p, P end_p)
Definition GameApi_pl.cc:31593
IMPORT void p_gen_texture(P p, int i)
Definition GameApi_pl.cc:18320
IMPORT CG curve_group_from_anim(MA ma, float start_time, float end_time)
Definition GameApi.cc:33202
IMPORT void prepare(P p, int bbm_choose=-1)
Definition GameApi_pl.cc:5695
IMPORT ATT find_attach2(P p, LI li)
Definition GameApi_pl.cc:24761
IMPORT ARR material_extractor_mt(EveryApi &ev, P p, float mix, int start_index, int end_index)
Definition GameApi_pl.cc:18870
IMPORT P colourspace_facecoll(CSI i, float t)
Definition GameApi_pl.cc:28248
IMPORT std::string output_ml(std::string objfileurl, int count, std::string prefix, std::vector< MaterialDef > filenames)
Definition GameApi_pl.cc:18275
IMPORT P translate(P orig, float dx, float dy, float dz)
Definition GameApi_pl.cc:4967
IMPORT void clone(VA va)
Definition GameApi_pl.cc:12978
IMPORT ID id_array(ID *array, int size)
IMPORT P decimate_zeros(P p)
IMPORT ARR seq_p_array(std::vector< P > vec, std::vector< P > vec2)
Definition GameApi_main.cc:2552
IMPORT ML fade_shader(EveryApi &ev, ML mainloop, float start_time, float end_time, float start_time2, float end_time2)
Definition GameApi_pl.cc:12629
IMPORT std::vector< TXID > mtl_parse(EveryApi &ev, std::vector< unsigned char > mtlfilecontents, std::string url_prefix, int delta=0)
Definition GameApi_pl.cc:1652
IMPORT P quad_z(float x1, float x2, float y1, float y2, float z)
Definition GameApi_pl.cc:3540
IMPORT void get_tri_vertex_array(P p, int choose, int row, int *v_size, float **v_array, int *n_size, float **n_array, int *c_size, unsigned int **c_array, int *tex_size, float **tex_array, int *attrib_size1, int *attrib_size2, float ***attrib_array)
Definition GameApi_pl.cc:6111
IMPORT P material_face_collection(P base, P material)
Definition GameApi_pl.cc:27329
IMPORT P linear_span(EveryApi &ev, LI li, float dx, float dy, float dz, int num_steps)
Definition GameApi_pl.cc:5504
IMPORT P or_array3(std::vector< P > vec)
Definition GameApi_pl.cc:4226
IMPORT AV pts_to_voxel(PTS pts, float start_x, float end_x, float start_y, float end_y, float start_z, float end_z, int sx, int sy, int sz)
Definition GameApi_pl.cc:22104
IMPORT TF decimate_tf(TF mesh, float val)
Definition GameApi_pl.cc:30763
IMPORT P sphere_map(float c_x, float c_y, float c_z, FB fb, float start_radius, float end_radius, float start_values, float end_values, int sx, int sy)
Definition GameApi_pl.cc:16835
IMPORT P sprite_bind(P p, TX tx, int id)
Definition GameApi_pl.cc:3331
IMPORT P anim_array(P *array, int size)
Definition GameApi_pl.cc:5635
IMPORT P texture_splitter(P p, int start_index, int end_index)
Definition GameApi_pl.cc:18470
IMPORT P color_poly(P orig, int facenum, unsigned int *array, int size)
IMPORT AV av_unique(AV arr)
Definition GameApi_pl.cc:22242
IMPORT ML m_bind_many(EveryApi &ev, std::vector< P > vec, std::vector< MT > materials, int ticks)
Definition GameApi_pl.cc:21952
IMPORT P load_model_all(std::string filename, int count)
Definition GameApi_pl.cc:1232
IMPORT P bitmapsized_quad(BM bm)
Definition GameApi_pl.cc:3516
IMPORT ML cullface(ML ml, bool b, bool is_gltf)
Definition GameApi.cc:42306
IMPORT P gltf_load(EveryApi &ev, TF model, int mesh_index, int prim_index, TRR resize_transfer_id)
Definition GameApi_gltf.cc:6206
IMPORT P plane_map(float start_x, float end_x, float start_y, float end_y, float start_z, float end_z, float start_values, float end_values, FB fb, int sx, int sy)
Definition GameApi_pl.cc:16845
IMPORT ML anim_bind(EveryApi &ev, ML next, MA anim, MT material, float start_time, float delta_time, int count)
Definition GameApi_pl.cc:20743
IMPORT ARR interpolate_mesh_pair_arr(std::vector< P > start_ps, std::vector< P > end_ps)
Definition GameApi_pl.cc:31599
IMPORT P p_ds2(EveryApi &ev, DS ds2)
Definition GameApi_pl.cc:17833
IMPORT P rotatey(P orig, float angle)
Definition GameApi_pl.cc:5005
IMPORT P fromsurface(S s, float thickness)
IMPORT P remove_faces(P p)
Definition GameApi_pl.cc:25581
IMPORT P vr_fullscreen_quad(EveryApi &ev, bool is_right)
Definition GameApi_pl.cc:3522
IMPORT P ds_cache_mtl(EveryApi &ev, P input, int count, std::string mtl_url, std::string url_prefix)
Definition GameApi_pl.cc:2900
IMPORT ML newshadow_shader_1(EveryApi &ev, ML ml, float light_dir_x, float light_dir_y, float light_dir_z, float scale)
Definition GameApi_pl.cc:12673
IMPORT int poly_size(ARR arr)
Definition GameApi_pl.cc:16026
IMPORT ML edge_shader(EveryApi &ev, ML mainloop, float edge_width, unsigned int edge_color)
Definition GameApi_pl.cc:12719
IMPORT P spherical_wave(P p, float r1, float fr_1, float r2, float fr_2)
Definition GameApi_pl.cc:16666
IMPORT ARR block_render2(GameApi::EveryApi &ev, std::vector< P > vec, std::vector< MT > mat)
Definition GameApi_pl.cc:23214
IMPORT ML mesh_color_shader(EveryApi &ev, ML mainloop, SFO sfo)
Definition GameApi_pl.cc:12639
IMPORT P rotatex(P orig, float angle)
Definition GameApi_pl.cc:4994
IMPORT P texcoord_plane(P p, float start_x, float end_x, float start_y, float end_y)
Definition GameApi_pl.cc:3304
IMPORT P repeat_xz_p(EveryApi &ev, P p, float start_x, float start_z, float dx, float dz, int sx, int sz)
Definition GameApi_pl.cc:19130
IMPORT P poly_index(ARR arr, int idx)
Definition GameApi_pl.cc:16031
P from_polygon_1(P p, std::function< P(int face, PT p1, PT p2, PT p3, PT p4)> f)
Definition GameApi_pl.cc:696
IMPORT int get_tri_vertex_array_rows(P p)
Definition GameApi_pl.cc:6103
IMPORT P bar_chart2(GameApi::EveryApi &ev, std::string url, float start_x, float end_x, float start_y, float end_y, float start_z, float end_z, float per, float per2)
Definition GameApi_diag.cc:235
IMPORT P p_url_nr(EveryApi &ev, std::string url, int count)
Definition GameApi_pl.cc:2616
IMPORT L array_lighting(L *array, int size)
IMPORT CSI colourspace_sample(CS i, int sx, int sy, int sz)
Definition GameApi_pl.cc:28242
IMPORT P get_face_count(P p)
Definition GameApi_pl.cc:26531
IMPORT P texcoord_subarea(P p, float start_x, float end_x, float start_y, float end_y)
Definition GameApi_pl.cc:21822
IMPORT P cone(int numfaces, PT p1, PT p2, float rad1, float rad2)
Definition GameApi_pl.cc:3673
IMPORT P mesh_elem(P start, P end)
Definition GameApi_pl.cc:22803
IMPORT P x_split(P p, float x, float x_0, float x_1)
Definition GameApi_pl.cc:27001
IMPORT ML colormix_shader(EveryApi &ev, ML mainloop, float mix)
IMPORT P static_instancing(EveryApi &ev, P obj, PTS pos)
Definition GameApi_pl.cc:15953
IMPORT void sort_vertices(VA va, M m)
Definition GameApi_pl.cc:12846
IMPORT P bar_chart(GameApi::EveryApi &ev, std::string url, float start_x, float end_x, float start_y, float end_y, float start_z, float end_z, float per)
Definition GameApi_diag.cc:230
IMPORT ARR p_mtl_bump(P p)
Definition GameApi_pl.cc:2465
IMPORT P li_polygon(LI li, float width)
Definition GameApi_pl.cc:22376
IMPORT LI li_piechart(float c_x, float c_y, float c_z, float start_angle, float end_angle, float radius, int numsteps)
Definition GameApi_diag.cc:281
IMPORT P static_instancing_with_color(EveryApi &ev, P obj, BM bm, float start_x, float end_x, float start_y, float end_y, float z)
Definition GameApi_pl.cc:15985
IMPORT ML texture_arr_shader(EveryApi &ev, ML mainloop, float mix)
Definition GameApi_pl.cc:12611
IMPORT P solid_of_revolution(EveryApi &ev, int numfaces, float p_x, float p_y, float p_z, float p1_x, float p1_y, float p1_z, std::string deltas, std::string radiuses)
Definition GameApi_pl.cc:31722
IMPORT P color_faces(P orig, unsigned int color_1, unsigned int color_2, unsigned int color_3, unsigned int color_4)
Definition GameApi_pl.cc:4952
IMPORT P p_mtl_nr(EveryApi &ev, std::string obj_url, std::string mtl_url, std::string prefix, int count)
Definition GameApi_pl.cc:2657
IMPORT ML globe_shader(EveryApi &ev, ML mainloop, float globe_r)
Definition GameApi_pl.cc:12726
IMPORT P extract_large_polygons(P p, float minimum_size, bool reverse)
Definition GameApi_pl.cc:27190
IMPORT ML quad_tree(P p)
Definition GameApi.cc:39464
IMPORT ML render_vertex_array_ml2_texture_id(EveryApi &ev, P va, std::vector< TXID > *vec)
Definition GameApi_pl.cc:12812
IMPORT P toon_outline(P p, float border_width)
Definition GameApi.cc:42259
IMPORT ARR material_arr(std::vector< MT > vec, int start_range, int end_range)
Definition GameApi_pl.cc:18485
IMPORT ML choose_color_shader(EveryApi &ev, ML mainloop, unsigned int color, float mix_val)
Definition GameApi_pl.cc:12579
IMPORT P alt(std::vector< P > vec, int index)
Definition GameApi_pl.cc:14389
IMPORT P rotate(P orig, PT pt, V axis, float angle)
Definition GameApi_pl.cc:5027
IMPORT P skeletal_anim(P p, PT p_0, PT p_1, PT n_0, PT n_1)
Definition GameApi_pl.cc:4841
IMPORT P polygon(PT *array, int size)
Definition GameApi_pl.cc:6225
IMPORT PL array_pl(std::vector< PL > vec)
Definition GameApi_pl.cc:27802
IMPORT P polygon2(std::vector< PT > vec)
Definition GameApi_pl.cc:6198
IMPORT ML save_model_ml(P poly, std::string filename)
Definition GameApi_pl.cc:2997
IMPORT TF tf_glb_tf(EveryApi &ev, TF tf, std::string url)
Definition GameApi.cc:31734
IMPORT ML newshadow_shader_2_phong(EveryApi &ev, ML ml, float light_dir_x, float light_dir_y, float light_dir_z, float dark_level, float light_level, float scale)
Definition GameApi_pl.cc:12679
IMPORT ML noise_shader(EveryApi &ev, ML mainloop)
Definition GameApi_pl.cc:12527
IMPORT SBM bloom_cut_sbm(SBM texture, float r, float g, float b)
Definition GameApi_pl.cc:16346
IMPORT ARR p_mtl_materials(EveryApi &ev, P P)
Definition GameApi_pl.cc:2339
IMPORT BM light_bm(L lighting, P poly)
IMPORT P anim_endpoints(P p1, P p2)
Definition GameApi_pl.cc:13565
IMPORT P color_map4(BM bm, FB height, float sx, float sy, float z)
IMPORT P heightmap(BM bm, HeightMapType t, float min_x, float max_x, float min_y, float max_y, float min_z, float max_z)
Definition GameApi_pl.cc:5610
IMPORT ARR p_mtl2_nr(EveryApi &ev, std::string obj_url, std::string mtl_url, std::string prefix, int count, int start_index, int end_index, float mix)
Definition GameApi_pl.cc:18726
IMPORT P polygon3(PTS points)
Definition GameApi_pl.cc:6202
IMPORT P from_points(PTS p, std::function< P(int i, float x, float y, float z, unsigned int color)> f)
Definition GameApi_pl.cc:736
IMPORT BM shadow_map(EveryApi &ev, P p, float p_x, float p_y, float p_z, int sx, int sy)
Definition GameApi_pl.cc:20811
IMPORT P line_to_cone(EveryApi &ev, LI li, float size, int numfaces)
Definition GameApi_pl.cc:15903
IMPORT P slow_calc_lights(P p, float light_dir_x, float light_dir_y, float light_dir_z)
Definition GameApi_pl.cc:26034
IMPORT P lod_choose(std::vector< P > vec, std::string name)
Definition GameApi_pl.cc:21641
IMPORT ML discard_shader(EveryApi &ev, ML mainloop)
Definition GameApi_pl.cc:12754
IMPORT P anim_target_vector(P p, V v)
Definition GameApi_pl.cc:13540
IMPORT TF meshy(EveryApi &ev, std::string prompt, std::string filename)
Definition GameApi.cc:31029
IMPORT P texcoord_poly(P orig, int facenum, PT *array, int size)
IMPORT P or_elem(P p1, P p2)
Definition GameApi_pl.cc:3722
IMPORT ML gltf_anim_shader(GameApi::EveryApi &ev, ML ml_orig, std::vector< GameApi::ML > mls, int key, int mode, int timeid, TRA anim_transfer_id, int frame_skip)
Definition GameApi_gltf.cc:15359
P or_array_1(P *array, int size)
Definition GameApi_pl.cc:4258
IMPORT P sphere_rays(float center_x, float center_y, float center_z, float radius, float delta_alfa, float delta_beta, FS field, int maxiter, float c, std::vector< PT > vec)
Definition GameApi_ff.cc:412
IMPORT IF lod_select(float start_dist, float dist_step, int max_value)
Definition GameApi_pl.cc:21792
IMPORT P triangle(PT p1, PT p2, PT p3)
Definition GameApi_pl.cc:1025
IMPORT BB shadow_map2(P p, float p_x, float p_y, float p_z, int sx, int sy, P quad)
Definition GameApi_pl.cc:20891
IMPORT ~PolygonApi()
Definition GameApi_pl.cc:632
IMPORT SBM sfo_sbm(EveryApi &ev, SFO sfo)
Definition GameApi_pl.cc:16558
IMPORT ML light_shader(EveryApi &ev, ML mainloop)
Definition GameApi_pl.cc:12617
IMPORT P split_p(P p, int start_face, int end_face)
Definition GameApi_pl.cc:15764
IMPORT void render_vertex_array(VA va)
Definition GameApi_pl.cc:12852
IMPORT P texcoord_cylindar(P orig, float start_y, float end_y)
Definition GameApi_pl.cc:3324
IMPORT P reflection(P orig, PT pos, V u_x, V u_y, V ref_vec)
Definition GameApi_pl.cc:3711
IMPORT TF load_glb_from_temp2(std::string filename)
Definition GameApi.cc:31936
IMPORT P render_pl(PL pl)
Definition GameApi_pl.cc:27834
IMPORT P color_lambert(P orig, unsigned int color, float light_dir_x, float light_dir_y, float light_dir_z, float pow, float intensity)
Definition GameApi_pl.cc:4403
IMPORT ID find_point_id(P p, int facenum, int pointnum)
IMPORT ML mixshader_shader(EveryApi &ev, ML ml, float mix=0.5)
Definition GameApi_pl.cc:12589
IMPORT ARR array_p_array(std::vector< PV > vec)
Definition GameApi_main.cc:2530
IMPORT bool is_array_texture(VA va)
Definition GameApi_pl.cc:12841
IMPORT P texcoord_function(P p1, std::function< PT(int face, int point)> f)
Definition GameApi_pl.cc:6004
Definition GameApi.hh:2824
IMPORT PolygonArrayApi(Env &e)
Definition GameApi.cc:44510
Va create_vertex_array(EveryApi &ev, Pa p, bool keep=false)
Definition GameApi.cc:908
void delete_vertex_array(EveryApi &ev, Va va)
Definition GameApi.cc:958
void render_vertex_array_instanced(EveryApi &ev, ShaderApi &sha, Va va, PTA pta, SH sh)
Definition GameApi.cc:947
void render_vertex_array(EveryApi &ev, Va p)
Definition GameApi.cc:925
Pa split_p(EveryApi &ev, P p, int max_chunk)
Definition GameApi.cc:883
void prepare_vertex_array_instanced_matrix(EveryApi &ev, ShaderApi &sha, Va va, MSA pta, SH sh)
void prepare_vertex_array_instanced(EveryApi &ev, ShaderApi &sha, Va va, PTA pta, SH sh)
Definition GameApi.cc:936
Definition GameApi.hh:2793
IMPORT MT mesh_color_from_sfo(EveryApi &ev, PD orig, MT next)
Definition GameApi.cc:17291
IMPORT std::vector< ML > render_scene_array(EveryApi &ev, std::vector< PD > vec)
Definition GameApi.cc:17306
IMPORT PD colormod_from_position(EveryApi &ev, PD obj, float px, float py, float pz, float sx, float sy, float sz)
Definition GameApi.cc:17272
IMPORT PD rotatex_pd(EveryApi &ev, PD orig, float angle)
IMPORT PD scale_pd(EveryApi &ev, PD orig, float sx, float sy, float sz)
IMPORT PD translate_pd(EveryApi &ev, PD orig, float dx, float dy, float dz)
IMPORT PD cone_pd(EveryApi &ev, int numfaces, PT p1, PT p2, float rad1, float rad2)
IMPORT PD ambient_occulsion_sfo(EveryApi &ev, PD obj, float d, float i)
Definition GameApi.cc:17264
IMPORT PD create_pd(P mesh, SFO distance_field)
Definition GameApi.cc:17184
IMPORT P get_polygon(PD p)
Definition GameApi.cc:17285
IMPORT PD cube_pd(EveryApi &ev, float start_x, float end_x, float start_y, float end_y, float start_z, float end_z)
Definition GameApi.cc:17195
IMPORT PD or_array_pd(EveryApi &ev, std::vector< PD > vec)
Definition GameApi.cc:17237
IMPORT PD rotatey_pd(EveryApi &ev, PD orig, float angle)
IMPORT PD color_from_normal_pd(EveryApi &ev, PD obj)
Definition GameApi.cc:17257
IMPORT SFO get_distance_field(PD p)
Definition GameApi.cc:17280
IMPORT PolygonDistanceField(Env &e)
Definition GameApi.cc:44509
IMPORT PD sphere_pd(EveryApi &ev, PT center, float radius, int numfaces1, int numfaces2)
Definition GameApi.cc:17225
IMPORT PD rotatez_pd(EveryApi &ev, PD orig, float angle)
IMPORT PD rounded_cube_pd(EveryApi &ev, float start_x, float end_x, float start_y, float end_y, float start_z, float end_z, float radius)
Definition GameApi.cc:17208
IMPORT ML render_scene(EveryApi &ev, PD object, PD world)
Definition GameApi.cc:17296
~PolygonObj()
Definition GameApi.hh:5184
void set_rotation_matrix2(M m)
Definition GameApi.hh:5258
void set_var(std::string name, float r, float g, float b, float a)
Definition GameApi.hh:5287
void set_anim_time(float time)
Definition GameApi.hh:5276
void render()
Definition GameApi.hh:5215
PolygonObj(EveryApi &ev, P p, SH sh)
Definition GameApi.hh:5128
void bind_texture(int anim_id, TXID id_)
Definition GameApi.hh:5263
void set_rotation_matrix(M m)
Definition GameApi.hh:5253
void set_anim_frame(int id)
Definition GameApi.hh:5271
void set_scale(float mult_x, float mult_y, float mult_z)
Definition GameApi.hh:5243
void bind_texarray(TXA id)
Definition GameApi.hh:5267
PolygonObj(EveryApi &ev, std::vector< P > anim_p, SH sh)
Definition GameApi.hh:5146
void set_rotation_y(float angle)
Definition GameApi.hh:5248
void set_pos(float pos_x, float pos_y, float pos_z)
Definition GameApi.hh:5238
void prepare(bool keep=false)
Definition GameApi.hh:5191
void render_instanced(PTA pta)
Definition GameApi.hh:5224
Definition GameApi.hh:4755
virtual void set_var(std::string name, float r, float g, float b, float a)=0
virtual void prepare(bool keep=false)=0
virtual ~RenderObject()
Definition GameApi.hh:4757
virtual void render()=0
Definition GameApi.hh:3549
IMPORT SampleCollectionApi(Env &e)
Definition GameApi.cc:44512
void play_sample_1(int channel, WAV w, int id)
Definition GameApi_sm.cc:75
IMPORT void init_audio()
Definition GameApi_sm.cc:63
IMPORT void play_sample(int channel, WAV w, int id)
Definition GameApi_sm.cc:72
IMPORT WAV prepare(SM samples)
Definition GameApi_sm.cc:95
IMPORT SM add(SM orig, WV wave, int sample_rate, int id)
Definition GameApi_sm.cc:53
IMPORT SM empty()
Definition GameApi_sm.cc:15
Definition GameApi.hh:2676
SA u_sep(SA orig, float(*sep_u)(float x, float y, float z, void *data), void *data)
Definition GameApi.cc:642
IMPORT SeparateApi(Env &e)
Definition GameApi.cc:44505
SA empty()
Definition GameApi.cc:637
SA surf_sep(SA orig, float(*sep_dist)(float x, float y, float z, void *data), void *data)
Definition GameApi.cc:660
SA v_sep(SA orig, float(*sep_v)(float x, float y, float z, void *data), void *data)
Definition GameApi.cc:651
P create_quads(SA object, float dist, float dist_accuracy, float x_range_start, float x_range_end, float x_step, float y_range_start, float y_range_end, float y_step, float z_range_start, float z_range_end, float z_step, float u_range_start, float u_range_end, float u_step, float v_range_start, float v_range_end, float v_step)
Definition GameApi.cc:670
Definition GameApi.hh:4486
void bind_attrib_1(GameApi::SH shader, int num, std::string name)
Definition GameApi_sh.cc:338
IMPORT SH colour_texture_shader()
Definition GameApi_sh.cc:132
SH get_normal_shader_1_new(std::string v_format, std::string f_format, std::string g_format, std::string v_comb="", std::string f_comb="", bool trans=true, SFO mod={ -1 }, US v_c={ -1 }, US f_c={ -1 }, std::string v_defines="IN_NORMAL IN_POSITION IN_COLOR IN_TEXCOORD EX_COLOR EX_NORMAL EX_POSITION EX_TEXCOORD", std::string f_defines="EX_COLOR EX_NORMAL EX_POSITION EX_TEXCOORD", std::string v_shader="", std::string f_shader="")
Definition GameApi_sh.cc:195
IMPORT SH texture_many_shader()
Definition GameApi_sh.cc:107
void use_1(SH shader)
Definition GameApi_sh.cc:305
IMPORT SH texture_array_shader()
Definition GameApi_sh.cc:103
IMPORT SH get_shader(std::string v_format, std::string f_format, std::string g_format, std::string v_comb="", std::string f_comb="", bool trans=true, SFO module={-1})
Definition GameApi_sh.cc:252
IMPORT void print_log(SH shader)
Definition GameApi_sh.cc:75
IMPORT void bind_attrib(GameApi::SH shader, int num, std::string name)
Definition GameApi_sh.cc:325
IMPORT PinIn use(SH shader)
Definition GameApi_sh.cc:300
IMPORT SH get_normal_shader(std::string v_format, std::string f_format, std::string g_format, std::string v_comb="", std::string f_comb="", bool trans=true, SFO mod={-1}, std::string v_defines="IN_NORMAL IN_COLOR IN_TEXCOORD IN_POSITION EX_COLOR EX_NORMAL EX_POSITION EX_TEXCOORD", std::string f_defines="EX_COLOR EX_NORMAL EX_POSITION EX_TEXCOORD", bool is_new=false)
Definition GameApi_sh.cc:136
IMPORT SH shader_choice(EveryApi &ev, int i)
Definition GameApi_sh.cc:116
SH get_shader_1(std::string v_format, std::string f_format, std::string g_format, std::string v_comb="", std::string f_comb="", bool trans=true, SFO mod={-1}, US v_c={-1}, US f_c={-1}, std::string v_defines="IN_NORMAL IN_COLOR IN_TEXCOORD IN_POSITION EX_COLOR EX_NORMAL EX_POSITION EX_TEXCOORD EX_POSITION", std::string f_defines="EX_COLOR EX_NORMAL EX_POSITION EX_TEXCOORD", std::string v_shader="", std::string f_shader="")
Definition GameApi_sh.cc:259
IMPORT void set_y_rotation(SH shader, std::string name, float angle)
Definition GameApi_sh.cc:59
IMPORT void load_default()
Definition GameApi_sh.cc:29
IMPORT ShaderApi(Env &e)
Definition GameApi_sh.cc:5
IMPORT PinOut< M > get_matrix_var(GameApi::SH shader, std::string name)
Definition GameApi_sh.cc:347
IMPORT SH texture_shader(bool text_draw=false)
Definition GameApi_sh.cc:93
IMPORT PinIn set_var(GameApi::SH shader, const char *name, float val)
Definition GameApi_sh.cc:359
void link_1(SH shader)
Definition GameApi_sh.cc:84
IMPORT PinIn unuse(SH shader)
Definition GameApi_sh.cc:316
void set_default_projection_1(GameApi::SH shader, std::string name)
Definition GameApi_sh.cc:45
IMPORT ~ShaderApi()
Definition GameApi_sh.cc:13
SH get_normal_shader_1(std::string v_format, std::string f_format, std::string g_format, std::string v_comb="", std::string f_comb="", bool trans=true, SFO mod={ -1 }, US v_c={ -1 }, US f_c={ -1 }, std::string v_defines="IN_NORMAL IN_POSITION IN_COLOR IN_TEXCOORD EX_COLOR EX_NORMAL EX_POSITION EX_TEXCOORD", std::string f_defines="EX_COLOR EX_NORMAL EX_POSITION EX_TEXCOORD", std::string v_shader="", std::string f_shader="")
Definition GameApi_sh.cc:165
IMPORT void bind_frag(GameApi::SH shader, int attachment_num, std::string name)
Definition GameApi_sh.cc:330
IMPORT void bindnames(GameApi::SH shader, std::string s_vertex, std::string s_normal, std::string s_color, std::string s_texcoord)
Definition GameApi_sh.cc:520
IMPORT SH colour_shader()
Definition GameApi_sh.cc:112
IMPORT void load(std::string filename)
Definition GameApi_sh.cc:21
IMPORT PinIn link(SH shader)
Definition GameApi_sh.cc:69
IMPORT void set_default_projection(GameApi::SH shader, std::string name)
Definition GameApi_sh.cc:38
friend class StateChangeApi
Definition GameApi.hh:4538
Definition GameApi.hh:1742
IMPORT SFO cube()
Definition GameApi_shm.cc:324
IMPORT SFO mix_color(SFO col1, SFO col2, float t)
IMPORT SFO sphere()
Definition GameApi_shm.cc:333
IMPORT SFO soft_shadow(SFO scene, V light_dir, float mint, float maxt, float k, float strong)
IMPORT SFO mod_z(SFO obj, float dz)
IMPORT SFO torus(float radius_1, float radius_2)
IMPORT SFO rot_y(SFO obj, float angle, PT center)
IMPORT SFO bind_arg(SFO obj, std::string name, std::string value)
IMPORT SFO rot_x(SFO obj, float angle, PT center)
IMPORT SFO color_from_position(SFO obj, float sx, float sy, float sz)
IMPORT SFO trans(SFO obj, float dx, float dy, float dz)
IMPORT SFO rot_y(SFO obj, float angle)
IMPORT SFO rot_x(SFO obj, float angle)
IMPORT ShaderModuleApi(Env &e)
Definition GameApi.cc:44488
IMPORT SFO mod_x(SFO obj, float dx)
IMPORT SFO color_function(SFO orig, std::function< std::string(std::string)> function, std::string function_name)
IMPORT SFO rot_z(SFO obj, float angle, PT center)
IMPORT SFO from_lines(LI li, SFO obj)
IMPORT SFO bounding_primitive(SFO prim, SFO inside, SFO outside)
IMPORT SFO rounded_cube(float start_x, float end_x, float start_y, float end_y, float start_z, float end_z, float r)
Definition GameApi_shm.cc:1789
IMPORT SFO stop_generation(SFO obj)
IMPORT SFO v_render(SFO obj)
Definition GameApi_shm.cc:698
IMPORT SFO and_not(SFO obj, SFO not_obj)
IMPORT SFO texture_box(float start_x, float end_x, float start_y, float end_y, float start_z, float end_z)
IMPORT SFO f_render_color(SFO obj)
IMPORT SFO grayscale_from_distance(SFO obj, SFO dist, float length)
IMPORT SFO ambient_occulsion(SFO obj, float d, float i)
Definition GameApi_shm.cc:1776
IMPORT SFO color(SFO obj, float r, float g, float b, float a)
IMPORT SFO plane(PT center, V u_x, V u_y)
IMPORT SFO blend(SFO obj1, SFO obj2, float k)
IMPORT SFO scale(SFO obj)
IMPORT SFO scale(SFO obj, float sx, float sy, float sz)
IMPORT SFO spherical(SFO obj, PT tl, PT br, float rr, float rp)
IMPORT SFO texture(SFO obj)
IMPORT SFO from_points(PTS p, SFO obj)
IMPORT SFO colormod_from_position(SFO obj, float px, float py, float pz, float sx, float sy, float sz)
Definition GameApi_shm.cc:2278
IMPORT SFO color_from_normal(SFO obj)
Definition GameApi_shm.cc:677
IMPORT SFO function(std::function< std::string(std::string id)> function, std::string function_name, std::vector< std::string > param_names=std::vector< std::string >(), std::vector< std::string > arg_values=std::vector< std::string >())
IMPORT SFO noise(SFO obj, float strength)
IMPORT SFO grayscale(SFO obj)
IMPORT SFO line(float start_x, float start_y, float start_z, float end_x, float end_y, float end_z, float line_width1, float line_width2)
IMPORT SFO trans(SFO obj)
IMPORT ML sfo_to_ml(EveryApi &ev, SFO sfo, float sx, float sy)
Definition GameApi_shm.cc:2390
IMPORT SFO rot_z(SFO obj, float angle)
IMPORT SFO mod_y(SFO obj, float dy)
IMPORT SFO or_elem(SFO obj1, SFO obj2)
Definition GameApi_shm.cc:985
Definition GameApi.hh:2053
ML skeletal_bind_material(EveryApi &ev, std::vector< P > vec, std::vector< PT > vec2, std::vector< SA > sa_vec, MT material)
Definition GameApi.cc:17147
ML skeletal_bind(EveryApi &ev, std::vector< P > vec, std::vector< PT > vec2, std::vector< SA > sa_vec)
Definition GameApi.cc:17134
SA node(SA parent, MN matrix, PT point_offset)
Definition GameApi.cc:17127
IMPORT Skeletal(Env &e)
Definition GameApi.cc:44495
SA root(PT absolute_pos)
Definition GameApi.cc:17102
float pt_x(PT p)
Definition GameApi_spa.cc:25
IMPORT SpaceApi(Env &e)
Definition GameApi.cc:543
float sizex(SP s)
PT plus(PT p1, PT p2)
Definition GameApi_su.cc:32
float origo_x(SP s)
float origo_y(SP s)
float sizey(SP s)
SP scalespace(SP s, float scale_x, float scale_y)
SP translatespace(SP s, float x, float y)
SP moveorigo(SP s, float x, float y)
SP rotatespace(SP s, float angle)
SP rotatespace(SP s, PT center, float angle)
~SpaceApi()
Definition GameApi.cc:545
float pt_y(PT p)
Definition GameApi_spa.cc:31
PT pos(SP sp, float x, float y, float z=0.0)
Definition GameApi_spa.cc:4
float pt_z(PT p)
Definition GameApi_spa.cc:37
PT posN(SP sp, float x, float y, float z=0.0)
Definition GameApi_spa.cc:16
PT flow_next_point(SV v, PT p, float mult)
Definition GameApi.cc:630
SV from_points(PC coll)
Definition GameApi.cc:619
SV function(std::function< V(float x, float y, float z)> f)
IMPORT SpaceVectorApi(Env &e)
Definition GameApi.cc:44520
Definition GameApi.hh:951
IMPORT SpriteApi(Env &e)
Definition GameApi_sp.cc:177
void rendersprite3_1(BM bm, int bm_choose, SH sh, float x, float y, float mult_x, float mult_y)
Definition GameApi_sp.cc:807
IMPORT PT pixelpos(BM bm, int x, int y)
Definition GameApi_sp.cc:871
IMPORT ML render_sprite_vertex_array_ml(EveryApi &ev, BM bm)
Definition GameApi_sp.cc:606
IMPORT void rendersprite4(BM bm, int bm_choose, SH sh, PT pos)
Definition GameApi_sp.cc:824
IMPORT void delete_vertex_array(VA va)
IMPORT void clipping_sprite(VA va, int sx, int sy, float tex_l, float tex_t, float tex_r, float teb_b)
Definition GameApi_sp.cc:657
IMPORT std::vector< BM > bitmap_anim(std::function< BM(float)> f, std::vector< float > key_frames)
Definition GameApi_bm.cc:3612
IMPORT void render_sprite_vertex_array(VA va)
Definition GameApi_sp.cc:613
IMPORT void preparesprite(BM bm, int bbm_choose=-1)
Definition GameApi_sp.cc:766
IMPORT ~SpriteApi()
Definition GameApi_sp.cc:535
IMPORT void rendersprite5(BM bm, int bm_choose, SH sh, SP move_space, SP sprite_space, float x, float y)
Definition GameApi_sp.cc:838
IMPORT void spritepos(BM bm, float x, float y)
Definition GameApi_sp.cc:539
IMPORT void clear_arrays(VA va)
Definition GameApi_sp.cc:759
IMPORT ML bitmap_anim_ml(EveryApi &ev, std::vector< BM > vec, std::vector< float > key_frames, float repeat_time)
Definition GameApi_bm.cc:3674
IMPORT void rendersprite2(BM bm, SH sh, PT pos)
Definition GameApi_sp.cc:781
IMPORT ARR sprite_atlas_x(EveryApi &ev, BM orig, int start_x, int end_x, int start_y, int end_y, int delta_x, int count)
Definition GameApi_sp.cc:878
IMPORT ARR sprite_atlas_y(EveryApi &ev, BM orig, int start_x, int end_x, int start_y, int end_y, int delta_y, int count)
Definition GameApi_sp.cc:891
IMPORT ARR sprite_atlas_xy(EveryApi &ev, BM orig, int start_x, int end_x, int start_y, int end_y, int delta_x, int delta_y, int count_x, int count_y)
Definition GameApi_sp.cc:905
IMPORT void rendersprite6(BM bm, int bm_choose, SH sh, SP move_space, SP sprite_space, PT pos)
Definition GameApi_sp.cc:862
IMPORT void rendersprite(BM bm, SH sh, float x, float y, float mult_x=1.0, float mult_y=1.0)
Definition GameApi_sp.cc:777
IMPORT ML vertex_array_render(EveryApi &ev, BM bm)
Definition GameApi_sp.cc:733
IMPORT void update_vertex_array(VA va, BM bm)
Definition GameApi_sp.cc:711
IMPORT ML turn_to_2d(EveryApi &ev, ML ml, float tl_x, float tl_y, float br_x, float br_y)
Definition GameApi_sp.cc:414
IMPORT VA create_vertex_array(BM bm, bool progress=false, bool textrender=false)
Definition GameApi_sp.cc:739
IMPORT void rendersprite3(BM bm, int bm_choose, SH sh, float x, float y, float mult_x, float mult_y)
Definition GameApi_sp.cc:803
IMPORT SP spritespace(BM bm)
Definition GameApi_sp.cc:865
IMPORT ML update_vertex_array_ml(VA va, BM bm)
Definition GameApi_sp.cc:707
IMPORT ML alt_ml_array(EveryApi &ev, std::vector< ML > vec, float start_time, float time_delta, bool repeat)
Definition GameApi_sp.cc:401
void set_var(std::string name, float r, float g, float b, float a)
Definition GameApi.hh:5007
void render()
Definition GameApi.hh:4990
void prepare(bool keep=false)
Definition GameApi.hh:4983
void set_anim_frame(int id)
Definition GameApi.hh:5002
void set_matrix(M m1)
Definition GameApi.hh:5001
SpriteObj(EveryApi &ev, BM bm_, SH sh)
Definition GameApi.hh:4966
void set_pos(float p_x, float p_y)
Definition GameApi.hh:4999
void set_scale(float m_x, float m_y)
Definition GameApi.hh:5000
SpriteObj(EveryApi &ev, std::vector< BM > anim, SH sh)
Definition GameApi.hh:4975
int get_pos_x(float mouse_x) const
Definition GameApi.hh:5088
void render()
Definition GameApi.hh:5070
void set_scale(float m_x, float m_y)
Definition GameApi.hh:5087
SpriteWorldObj(EveryApi &ev, std::function< BM(int)> f, int numvalues, BM int_bm, int dx, int dy, SH sh)
Definition GameApi.hh:5027
void set_pos(float p_x, float p_y)
Definition GameApi.hh:5086
void set_range(int l, int t, int width, int height)
Definition GameApi.hh:5056
void prepare(bool keep=false)
Definition GameApi.hh:5063
int get_pos_y(float mouse_y) const
Definition GameApi.hh:5095
void set_block(int x, int y, int c)
Definition GameApi.hh:5043
int read_block(int x, int y)
Definition GameApi.hh:5049
void set_var(std::string name, float r, float g, float b, float a)
Definition GameApi.hh:5102
~SpriteWorldObj()
Definition GameApi.hh:5042
Definition GameApi.hh:3590
IMPORT StateChangeApi(Env &e, ShaderApi &api)
Definition GameApi_st.cc:82
IMPORT VV prepareloop(float *array, int arraysize, std::function< P(float val)> f, float step_duration)
Definition GameApi_st.cc:23
TR linear_1(TR s, int path_num, std::function< P(float val)> f, float start_v, float end_v, float duration)
Definition GameApi_st.cc:42
IMPORT TR linear(TR s, int path_num, std::function< P(float val)> f, float start_v, float end_v, float duration)
Definition GameApi_st.cc:38
IMPORT TR init(int paths)
Definition GameApi_st.cc:3
VV prepare_1(TR sc)
Definition GameApi_st.cc:61
IMPORT VV prepare(TR sc)
Definition GameApi_st.cc:57
Definition GameApi.hh:2697
IMPORT SurfaceApi(Env &e)
Definition GameApi_su.cc:3
S texture(S orig, BM texture)
Definition GameApi_su.cc:93
S interpolate(S s1, S s2, float val)
S torus(PT center, float dist1, float dist2, PT pos, PT u_x, PT u_y)
S sphere(PT center, float radius)
Definition GameApi_su.cc:81
IMPORT ~SurfaceApi()
Definition GameApi_su.cc:7
S color(S orig, unsigned int color)
S bitmapsphere(PT center, float radius0, float radius1, BM height)
Definition GameApi_su.cc:11
S plane(PT pos, V u_x, V u_y)
Definition GameApi_su.cc:66
S betweensurface(C curve1, C curve2)
PTS surface_points(S surf, int sx, int sy)
Definition GameApi.hh:1630
IMPORT ~TextApi()
Definition GameApi_tx.cc:4
TextApi(BitmapApi &bm, SpriteApi &sp)
Definition GameApi.hh:1632
IMPORT void draw_text(std::string text, int x, int y, SH sh)
Definition GameApi_tx.cc:29
IMPORT void load_font(std::string filename, int sx, int sy, int x, int y, char start_char, char end_char)
Definition GameApi_tx.cc:9
Definition GameApi.hh:995
IMPORT ML prepare_key(ML next, ML keyed, int key)
Definition GameApi_tex.cc:1246
IMPORT TXID pbo_to_txid(PBO p)
Definition GameApi_tex.cc:1755
IMPORT TXID webcam_txid(int num)
IMPORT ML grab_to_server(BM bm, int id, int num)
Definition GameApi_tex.cc:1483
IMPORT BM pbo_to_bitmap(PBO p)
Definition GameApi_tex.cc:1711
IMPORT TXID prepare_cubemap(EveryApi &ev, BM right, BM left, BM top, BM bottom, BM back, BM front)
Definition GameApi_tex.cc:113
IMPORT ML vr_overlay(TXID id, std::string key, std::string name, int sx, int sy)
IMPORT std::vector< BufferRef > prepare_many_buf(EveryApi &ev, std::vector< BM > vec, std::vector< int > types, bool mipmaps, std::vector< std::string > id_labels, std::vector< Low_GLuint > &res)
Definition GameApi_tex.cc:300
IMPORT std::vector< TXID > prepare_many(EveryApi &ev, std::vector< BM > vec, std::vector< int > types=std::vector< int >(), bool mipmaps=true, std::vector< std::string > id_labels=std::vector< std::string >(), std::vector< bool > is_srgb=std::vector< bool >())
Definition GameApi_tex.cc:436
IMPORT int unique_id()
Definition GameApi_tex.cc:75
IMPORT void unuse(TXID tx)
Definition GameApi_tex.cc:870
IMPORT std::vector< TXID > prepare_many_txid(EveryApi &ev, std::vector< BufferRef > vec, std::vector< Low_GLuint > ids, std::vector< int > types, bool mipmaps, std::vector< std::string > id_labels)
Definition GameApi_tex.cc:365
IMPORT TXID webcam_txid_generic(EveryApi &ev, int sx, int sy, int num)
Definition GameApi_webcam.cc:1184
IMPORT TXID videofile_txid_generic(EveryApi &ev, int sx, int sy, std::string url)
Definition GameApi_webcam.cc:1196
IMPORT TXID webcam_txid_win(EveryApi &ev, int sx, int sy, int num)
Definition GameApi_webcam.cc:380
IMPORT TXID send_fb_to_gpu(BufferRefF ref, Low_GLuint id)
Definition GameApi_tex.cc:257
IMPORT VA bind_many(VA va, std::vector< TXID > tx, std::vector< int > types=std::vector< int >())
Definition GameApi_tex.cc:41
Q get_tex_coord_1(TX tx, int id)
Definition GameApi_tex.cc:99
IMPORT TX tex_assign(TX tx, int id, int x, int y, BM bm)
Definition GameApi_tex.cc:80
IMPORT TXID webcam_txid_linux(EveryApi &ev, int sx, int sy, int num)
IMPORT ARR grab_screen(EveryApi &ev, RUN r)
Definition GameApi_tex.cc:1037
IMPORT TX tex_plane(int sx, int sy)
Definition GameApi_tex.cc:11
IMPORT Q get_tex_coord(TX tx, int id)
Definition GameApi_tex.cc:91
IMPORT BufferRefF prepare_fb(FB bitmap, Low_GLuint &id)
Definition GameApi_tex.cc:228
IMPORT void use_many(std::vector< TXID > vec, int i=0)
Definition GameApi_tex.cc:851
IMPORT TXID bufferref_to_txid(TXID old, const BufferRef &buf)
Definition GameApi_tex.cc:1154
IMPORT TX tex_coord(TX tx, int id, int x, int y, int width, int height)
Definition GameApi_tex.cc:87
IMPORT TXID prepare(TX tx, bool is_srgb=true, bool text_render=false)
Definition GameApi_tex.cc:760
IMPORT ML prepare_key_anim(ML next, std::vector< ML > keyed, int key, float time_delta, std::vector< std::string > filenames)
Definition GameApi_tex.cc:1311
IMPORT ML save_screenshot_via_key(EveryApi &ev, ML ml3, int key, std::string filename)
Definition GameApi_tex.cc:1403
IMPORT ML forward_to_txid(VA va, ML mainloop, TXID id)
Definition GameApi.cc:7642
IMPORT ML upload_txid_to_pbo(TXID tx, PBO p)
Definition GameApi_tex.cc:1653
IMPORT ARR grab_to_bm_array(BM bm)
Definition GameApi_tex.cc:1463
IMPORT ML upload_bm_to_pbo(BM bm, PBO p)
Definition GameApi_tex.cc:1643
IMPORT ML save_screenshots_via_key(EveryApi &ev, ML ml3, int key, float time_delta, int num)
Definition GameApi_tex.cc:1541
IMPORT TXID webcam_txid_slow(EveryApi &ev, int num)
IMPORT PBO create_pbo(int sx, int sy)
Definition GameApi_tex.cc:1588
IMPORT ARR send_screenshots_via_key_array(EveryApi &ev, ML ml3, int key, float time_delta, int num)
Definition GameApi_tex.cc:1511
IMPORT ML send_screenshots_via_key_to_server(EveryApi &ev, ML ml3, int key, float time_delta, int num)
Definition GameApi_tex.cc:1492
IMPORT TXID videofile_txid_emscripten(EveryApi &ev, int sx, int sy, std::string url, int num)
IMPORT TXID webcam_txid_emscripten(EveryApi &ev, int sx, int sy, int num)
IMPORT BM grab_screen_bitmap(EveryApi &ev)
Definition GameApi_tex.cc:1390
IMPORT TextureApi(Env &e)
Definition GameApi_tex.cc:9
IMPORT TXID videofile_txid_win32(EveryApi &ev, int sx, int sy, std::string url)
IMPORT TX tex_bitmap(BM bm)
Definition GameApi_tex.cc:15
IMPORT RUN combine_screens(RUN r1, RUN r2)
Definition GameApi_tex.cc:1026
IMPORT VA bind(VA va, TXID tx)
Definition GameApi_tex.cc:21
IMPORT VA bind_arr(VA va, TXA tx)
Definition GameApi_tex.cc:65
IMPORT void use(TXID tx, int i=0)
Definition GameApi_tex.cc:841
IMPORT VA bind_cubemap(VA va, TXID id)
Definition GameApi_tex.cc:31
IMPORT BM to_bitmap(EveryApi &ev, TXID id)
Definition GameApi_tex.cc:1062
IMPORT void delete_texid(TXID tx)
Definition GameApi_tex.cc:877
IMPORT TXA prepare_arr(EveryApi &ev, std::vector< BM > vec, int sx, int sy)
Definition GameApi_tex.cc:713
Definition GameApi.hh:3566
IMPORT void * setup_ogg(const std::vector< unsigned char > &data, int type)
Definition GameApi_trk.cc:271
IMPORT ML play_wave_via_keypress(EveryApi &ev, ML ml, std::string url, int key)
Definition GameApi_trk.cc:500
IMPORT void play_song(EveryApi &ev, TBUF buf, WAV samples, int framenum, int speed)
Definition GameApi_trk.cc:197
IMPORT TrackerApi(Env &e)
Definition GameApi.cc:44513
IMPORT void stop_music_playing()
Definition GameApi_trk.cc:345
IMPORT void play_ogg(std::string filename)
Definition GameApi_trk.cc:237
IMPORT TRK array(TRK *array, int size)
Definition GameApi_trk.cc:155
IMPORT TRK audio_slot(TRK orig, int channel, int slot, int duration, int sample)
Definition GameApi_trk.cc:77
IMPORT void play_mp3(std::string filename)
Definition GameApi_trk.cc:218
IMPORT TBUF prepare(TRK trk)
Definition GameApi_trk.cc:170
Definition GameApi.hh:1854
IMPORT ML tree_ml(EveryApi &ev, T tree, std::vector< ML > vec)
Definition GameApi.cc:4383
IMPORT MS tree_ms(EveryApi &ev, T tree, float time)
Definition GameApi.cc:5381
IMPORT TL level(std::vector< MN > vec)
Definition GameApi.cc:4244
IMPORT TreeApi(Env &e)
Definition GameApi.cc:44490
IMPORT T tree(std::vector< TL > vec)
Definition GameApi.cc:4269
IMPORT P tree_p(EveryApi &ev, T tree, std::vector< P > vec, float time, float percentage)
Definition GameApi.cc:5388
Definition GameApi.hh:2723
IMPORT TS or_elem(TS t1, TS t2)
IMPORT TS or_array(TS *array, int size)
IMPORT TS rectangle_xz(float start_x, float end_x, float y, float start_z, float end_z)
IMPORT TS rectangle_xy(float start_x, float end_x, float start_y, float end_y, float z, int sx, int sy)
~TriStripApi()
Definition GameApi.hh:2726
IMPORT void save(TS tris, std::string filename)
IMPORT TS transform(TS orig, std::function< PT(PT)> trans)
IMPORT TS normal_function(TS ts, std::function< V(int i)> normal)
IMPORT TS color_function(TS ts, std::function< unsigned int(int i)> f)
IMPORT P to_poly(TS strip)
Definition GameApi_tr.cc:417
IMPORT TS function(std::function< PT(int i)> f, int count)
IMPORT TS from_poly(P poly)
Definition GameApi_tr.cc:168
IMPORT TriStripApi(Env &e)
Definition GameApi.cc:44506
IMPORT TS from_array(PT *arr, int size)
IMPORT TS load(std::string filename)
IMPORT TS span_3d_object(TS orig, float z_dist)
IMPORT TS from_convex_plane(PL pl, PT pos, V u_x, V u_y)
IMPORT TS texcoord_function(TS ts, std::function< PT(int i)> texcoord)
IMPORT TS circle(float center_x, float center_y, float center_z, float radius, int count)
Definition GameApi.hh:4380
IMPORT US v_passall(US us)
Definition GameApi.cc:15524
IMPORT US f_choose_color(US us)
Definition GameApi.cc:16053
IMPORT US f_coloured_lights(US us)
Definition GameApi.cc:15957
IMPORT US v_fade(US us)
Definition GameApi.cc:15476
IMPORT US f_texture_arr(US us)
Definition GameApi.cc:16038
IMPORT US f_custom(US us, std::string f_funcname)
Definition GameApi.cc:16003
IMPORT US f_color_from_id(US us, int id)
Definition GameApi.cc:15937
IMPORT US v_light(US us)
Definition GameApi.cc:15553
IMPORT US f_manytexture(US us)
Definition GameApi.cc:16027
IMPORT US f_dyn_lights(US us)
Definition GameApi.cc:15925
IMPORT US v_inst(US us)
Definition GameApi.cc:15408
IMPORT US f_cubemaptexture(US us)
Definition GameApi.cc:16032
IMPORT US v_colour_with_mix(US us)
Definition GameApi.cc:15481
IMPORT US f_phong2(US us)
Definition GameApi.cc:15852
IMPORT US v_gltf_anim(US us)
Definition GameApi.cc:15387
IMPORT US f_empty(bool transparent)
Definition GameApi.cc:15796
IMPORT US f_flip(US us, US us2)
IMPORT US f_newshadow_2(US us, bool is_phong)
Definition GameApi.cc:15816
IMPORT US f_gltf_anim(US us)
Definition GameApi.cc:15772
IMPORT US f_color_from_normals(US us)
Definition GameApi.cc:15951
IMPORT US v_texture(US us)
Definition GameApi.cc:15577
IMPORT US f_fog(US us)
Definition GameApi.cc:15911
IMPORT US v_gi(US us)
Definition GameApi.cc:15466
IMPORT US v_newshadow_2(US us)
Definition GameApi.cc:15431
IMPORT US f_glowedge(US us)
Definition GameApi.cc:15806
IMPORT US f_sandbox(US us, SFO sfo)
Definition GameApi.cc:15783
IMPORT US f_point_light(US us)
Definition GameApi.cc:15963
IMPORT US v_skeletal(US us)
Definition GameApi.cc:15789
IMPORT US f_diffuse(US us)
Definition GameApi.cc:15801
IMPORT US v_dyn_lights(US us)
Definition GameApi.cc:15506
IMPORT US f_mix_color(US us, US us2, float val)
IMPORT US v_vertexphong(US us)
Definition GameApi.cc:15456
IMPORT US f_shadow(US us)
Definition GameApi.cc:15920
IMPORT US f_blur(US us)
Definition GameApi.cc:15986
IMPORT US v_point_light(US us)
Definition GameApi.cc:15535
IMPORT US v_adjust(US us)
Definition GameApi.cc:15436
IMPORT US f_mesh_color(US us, SFO sfo)
Definition GameApi.cc:15777
IMPORT US f_specular(US us)
Definition GameApi.cc:15945
IMPORT US v_coloured_lights(US us)
Definition GameApi.cc:15541
IMPORT US f_ambient(US us)
Definition GameApi.cc:15932
IMPORT US v_diffuse(US us)
Definition GameApi.cc:15512
IMPORT US f_toon(US us)
Definition GameApi.cc:16015
IMPORT US v_glowedge(US us)
Definition GameApi.cc:15461
IMPORT US v_blurred_render(US us)
Definition GameApi.cc:15441
IMPORT US v_shadow(US us)
Definition GameApi.cc:15501
IMPORT US f_mix(US us)
Definition GameApi.cc:15916
IMPORT US v_newshadow_1(US us)
Definition GameApi.cc:15426
IMPORT US f_fade(US us)
Definition GameApi.cc:15869
IMPORT US v_inst_matrix(US us)
Definition GameApi.cc:15414
IMPORT US v_pass_position(US us)
Definition GameApi.cc:15529
IMPORT US v_phong(US us)
Definition GameApi.cc:15446
IMPORT US f_newshadow_1(US us)
Definition GameApi.cc:15811
IMPORT US f_adjust(US us)
Definition GameApi.cc:15837
IMPORT US v_edge(US us)
Definition GameApi.cc:15381
IMPORT US v_ref(US us)
Definition GameApi.cc:15559
IMPORT US f_acesfilm(US us)
Definition GameApi.cc:15757
IMPORT UberShaderApi(Env &e)
Definition GameApi.cc:44522
IMPORT US v_empty()
Definition GameApi.cc:15371
IMPORT US f_texture(US us)
Definition GameApi.cc:16021
IMPORT US v_wave(US us)
Definition GameApi.cc:15565
IMPORT US f_gi(US us)
Definition GameApi.cc:15864
IMPORT US f_generic_flip(US us, std::string name, std::string flags)
Definition GameApi.cc:15847
IMPORT US f_blurred_render(US us)
Definition GameApi.cc:15831
IMPORT US f_bands(US us)
Definition GameApi.cc:15974
IMPORT US v_water(US us)
Definition GameApi.cc:15375
IMPORT US v_cubemaptexture(US us)
Definition GameApi.cc:15587
IMPORT US v_fog(US us)
Definition GameApi.cc:15491
IMPORT US f_colour(US us)
Definition GameApi.cc:16048
IMPORT US f_edge(US us)
Definition GameApi.cc:15767
IMPORT US f_colour_with_mix(US us)
Definition GameApi.cc:15900
IMPORT US f_discard(US us)
Definition GameApi.cc:15762
IMPORT US v_gltf(US us, std::string cache_id)
Definition GameApi.cc:15471
IMPORT US v_snoise(US us)
Definition GameApi.cc:15547
IMPORT US f_light(US us)
Definition GameApi.cc:16009
IMPORT US v_globe(US us)
Definition GameApi.cc:15392
IMPORT US f_snoise(US us)
Definition GameApi.cc:15980
IMPORT US v_mix(US us)
Definition GameApi.cc:15496
IMPORT US v_colour(US us)
Definition GameApi.cc:15603
IMPORT US v_bump_phong(US us)
Definition GameApi.cc:15486
IMPORT US f_gltf(US us, bool tex0, bool tex1, bool tex2, bool tex3, bool tex4, bool tex5, bool tex6, bool tex7, bool spec, bool unlit, std::string cache_id, bool emissive)
Definition GameApi.cc:15878
IMPORT US v_custom(US us, std::string v_funcname)
Definition GameApi.cc:15997
IMPORT US f_water(US us)
Definition GameApi.cc:15752
IMPORT US v_generic(US us, std::string name, std::string flags)
Definition GameApi.cc:15451
IMPORT US f_generic(US us, std::string name, std::string flags)
Definition GameApi.cc:15842
IMPORT US v_blur(US us)
Definition GameApi.cc:15609
IMPORT US v_manytexture(US us)
Definition GameApi.cc:15582
IMPORT US f_bump_phong(US us)
Definition GameApi.cc:15906
IMPORT US v_specular(US us)
Definition GameApi.cc:15518
IMPORT US v_texture_arr(US us)
Definition GameApi.cc:15593
IMPORT US f_phong(US us)
Definition GameApi.cc:15825
IMPORT US v_dist_field_mesh(US us, SFO sfo)
Definition GameApi.cc:15746
IMPORT US v_recalc_normal(US us)
Definition GameApi.cc:15402
IMPORT US v_color_from_normals(US us)
Definition GameApi.cc:15397
IMPORT US v_toon(US us)
Definition GameApi.cc:15571
IMPORT US v_ambient(US us)
Definition GameApi.cc:15421
IMPORT US f_vertexphong(US us)
Definition GameApi.cc:15857
IMPORT US f_ref(US us)
Definition GameApi.cc:15992
void polygon(Vb v, int obj_num, P p, float x, float y, float z)
Definition GameApi_vbo.cc:63
Vb alloc(int obj_count)
Definition GameApi_vbo.cc:27
void move(Vb v, int obj_num, float x, float y, float z)
Definition GameApi_vbo.cc:103
void heightmap(Vb v, int obj_num, BM bitmap_float)
IMPORT VBOApi(Env &e)
Definition GameApi_vbo.cc:18
void sprite(Vb v, int obj_num, BM bm, float x, float y)
Definition GameApi_vbo.cc:43
void prepare(Vb v)
Definition GameApi_vbo.cc:70
~VBOApi()
Definition GameApi_vbo.cc:22
void swapframe(Vb v, int obj_num, int type, int frame)
Definition GameApi_vbo.cc:84
void grid(Vb v, int obj_num, BM tile_bitmap, BM grid, float top_x, float top_y)
Definition GameApi_vbo.cc:66
Definition GameApi.hh:4245
IMPORT V sum(V v1, V v2)
Definition GameApi_ve.cc:15
IMPORT float dot(V v1, V v2)
Definition GameApi_ve.cc:28
IMPORT float dist2d(V v)
IMPORT V cross(V v1, V v2)
Definition GameApi_ve.cc:34
IMPORT V vector(float delta_x, float delta_y, float delta_z)
Definition GameApi_ve.cc:11
IMPORT float dist3d(V v)
IMPORT VectorApi(Env &e)
Definition GameApi_ve.cc:5
IMPORT V neg(V v)
Definition GameApi_ve.cc:67
IMPORT float projection_length(V u, V u_x)
Definition GameApi_ve.cc:42
IMPORT V projection_2(V u, V u_x)
Definition GameApi_ve.cc:58
IMPORT V projection_1(V u, V u_x)
Definition GameApi_ve.cc:49
IMPORT V null_vector()
Definition GameApi_ve.cc:7
IMPORT V mul(V v1, float scalar)
Definition GameApi_ve.cc:22
VBM plane(PT pos, V u_x, V u_y, V u_z)
VBM spheredelta(float radius1, float radius2, float x, float y, float z, float sx, float sy)
IMPORT VectorBitmapApi(Env &e)
Definition GameApi.cc:44515
P span_object(VBM vectors, FB floats)
Definition GameApi.hh:2599
IMPORT VectorVolumeApi(Env &e)
Definition GameApi.cc:44503
IMPORT VO normal(FD fd)
Definition GameApi_vo.cc:1181
IMPORT P setup_normal(P orig, VO v)
Definition GameApi_vo.cc:1900
IMPORT VO normal2(FO fo, float stepsize)
Definition GameApi_vo.cc:1186
IMPORT VO function(std::function< V(float x, float y, float z)> f)
Definition GameApi.hh:2066
IMPORT ML vertex_anim_render(EveryApi &ev, KF kf)
Definition GameApi.cc:20334
IMPORT KF repeat_keyframes(KF rep, int count)
Definition GameApi.cc:20367
IMPORT PTT rotate_trans(PTT prev, float nx, float ny, float nz, float speed_angle)
Definition GameApi.cc:20027
IMPORT LI change_pos_li(LI p, LI orig, PTT transform, float delta_time, bool dif)
Definition GameApi.cc:19751
IMPORT PTT scale_trans2(PTT prev, float duration, float scale_dist_x, float scale_dist_y, float scale_dist_z)
Definition GameApi.cc:20052
IMPORT VertexAnimApi(Env &e)
Definition GameApi.cc:44496
IMPORT PTT curve_accessor(C curve, CPP pos, float start_pos, float time_mult)
Definition GameApi.cc:19801
IMPORT KF keyframe_bind2(EveryApi &ev, KF keyframe, PTT pointtransform, float delta_time, bool dif)
Definition GameApi.cc:19907
IMPORT KF keyframe_bind(EveryApi &ev, KF keyframe, PTT pointtransform, float delta_time)
Definition GameApi.cc:19902
IMPORT KF curve_trans(EveryApi &ev, KF kf, C curve, CPP pos, int numsamples, float duration)
Definition GameApi.cc:19822
IMPORT PTT translate_trans(PTT prev, float speed_x, float speed_y, float speed_z)
Definition GameApi.cc:20015
IMPORT PTT translate_trans2(PTT prev, float duration, float dist_x, float dist_y, float dist_z)
Definition GameApi.cc:20020
IMPORT KF keyframe_mesh(P part)
Definition GameApi.cc:19660
IMPORT PTT rot_accessor(float start_time, float time_mult, float nx, float ny, float nz, float dist_angle)
Definition GameApi.cc:19814
IMPORT PTT scale_trans(PTT prev, float scale_speed_x, float scale_speed_y, float scale_speed_z)
Definition GameApi.cc:20045
IMPORT PTT rotate_trans2(PTT prev, float duration, float nx, float ny, float nz, float dist_angle)
Definition GameApi.cc:20036
IMPORT P change_pos(P p, P orig, PTT transform, float delta_time, bool dif)
Definition GameApi.cc:19759
IMPORT KF keyframe_lines(LI part)
Definition GameApi.cc:19664
IMPORT PTT empty_trans()
Definition GameApi.cc:19953
IMPORT KF sample_rot(EveryApi &ev, KF kf, float nx, float ny, float nz, float angle, int numsamples, float duration)
Definition GameApi.cc:19836
Definition GameApi.hh:1670
IMPORT O bounding_z(O next, O next2, float z)
Definition GameApi_vo.cc:20
IMPORT BM render(O object, int sx, int sy, PT ray_0, PT ray_x, PT ray_y, PT ray_z)
IMPORT O subvolume(std::function< float(float x, float y, float z)> f, float start_range, float end_range)
Definition GameApi_vo.cc:293
IMPORT O o_torus(PT center, PT u_x, PT u_y, float dist1, float dist2)
Definition GameApi_vo.cc:112
IMPORT O from_bool_bitmap(BB b, float dist)
Definition GameApi_vo.cc:32
IMPORT O andnot_op(O object1, O object2)
Definition GameApi_vo.cc:177
IMPORT O bounding_x(O next, O next2, float x)
Definition GameApi_vo.cc:8
IMPORT O bounding_sphere(O next, float cx, float cy, float cz, float radius)
Definition GameApi_vo.cc:27
IMPORT O subset_color(O model, O color_subset, unsigned int color)
Definition GameApi_vo.cc:58
IMPORT O rotatey(O object, float angle)
Definition GameApi_vo.cc:69
IMPORT O spheretexture(O object, PT center, BM texture, float multx, float multy)
IMPORT O cubetexture(O object, PT origo, PT u_x, PT u_y, PT u_z, BM bm)
IMPORT O rotatex(O object, float angle)
Definition GameApi_vo.cc:64
IMPORT O link_areas(O o, PT p1, PT p2, float d)
IMPORT P rendercubes(O object, fptrtype fptr, int size, float wholesize)
Definition GameApi_vo.cc:651
IMPORT O min_op(O object1, O object2)
Definition GameApi_vo.cc:135
IMPORT O rotatez(O object, float angle)
Definition GameApi_vo.cc:74
IMPORT O reflect(O object, float val)
IMPORT P rendercubes2(EveryApi &ev, O object, fptrtype fptr, int sx, int sy, int sz, float world_x, float world_y, float world_z)
Definition GameApi_vo.cc:593
IMPORT O from_polygon(P p, float x, float y, float z)
Definition GameApi_vo.cc:310
IMPORT O instancing_volume(O o, PTS p)
Definition GameApi_vo.cc:2076
IMPORT P rendercubes3(O object, int sx, int sy, int sz, float start_x, float end_x, float start_y, float end_y, float start_z, float end_z)
Definition GameApi_vo.cc:588
std::function< P(float start_x, float end_x, float start_y, float end_y, float start_z, float end_z, unsigned int color)> fptrtype
Definition GameApi.hh:1719
IMPORT PTS random_vol_object(O o, float start_x, float end_x, float start_y, float end_y, float start_z, float end_z, int numpoints)
Definition GameApi_vo.cc:2130
IMPORT BB volumeprojection(O o, float start_x, float end_x, float start_y, float end_y, float start_z, float end_z, int sx, int sy, int numsamples)
Definition GameApi.cc:41790
IMPORT O bounding_y(O next, O next2, float y)
Definition GameApi_vo.cc:14
IMPORT ~VolumeApi()
Definition GameApi_vo.cc:86
IMPORT O max_op(O object1, O object2)
Definition GameApi_vo.cc:143
IMPORT O colour(O object, unsigned int col)
Definition GameApi_vo.cc:119
IMPORT O not_op(O object1)
Definition GameApi_vo.cc:125
IMPORT O move(O obj, float dx, float dy, float dz)
Definition GameApi_vo.cc:79
IMPORT O scale(O object, float sx, float sy, float sz)
Definition GameApi_vo.cc:186
IMPORT O o_cube(float start_x, float end_x, float start_y, float end_y, float start_z, float end_z)
Definition GameApi_vo.cc:100
IMPORT O mandelbulb(float n, float p_x, float p_y, float p_z, float c_x, float c_y, float c_z, float radius, int iterations)
Definition GameApi_vo.cc:192
IMPORT VolumeApi(Env &e)
Definition GameApi_vo.cc:85
IMPORT O o_cone(PT p1, PT p2, float rad1, float rad2)
Definition GameApi_vo.cc:94
IMPORT BB plane(O o, int sx, int sy, PT u_p, V u_x, V u_y, float start_x, float end_x, float start_y, float end_y, float start_z, float end_z)
Definition GameApi_vo.cc:151
IMPORT O boolfunction(std::function< bool(float x, float y, float z)> f)
Definition GameApi_vo.cc:235
IMPORT void find_surface(O object, PT p1, PT p2, PT *res1, PT *res2, int level)
Definition GameApi_vo.cc:321
IMPORT O o_sphere(float center_x, float center_y, float center_z, float radius)
Definition GameApi_vo.cc:88
IMPORT O mandelbrot_volume(bool julia, int count, float yy)
Definition GameApi_vo.cc:54
IMPORT PTS instanced_positions(O object, int size, float wholesize)
Definition GameApi_vo.cc:679
Definition GameApi.hh:3879
IMPORT ARR vox_cubes(EveryApi &ev, std::string url, int model, float sx, float sy, float sz)
Definition GameApi.cc:25051
IMPORT VX vox_voxel2(EveryApi &ev, std::string url, int model, float sx, float sy, float sz)
Definition GameApi.cc:25047
IMPORT ML vox_bind_ml2(EveryApi &ev, std::string url, int model, float sx, float sy, float sz, GameApi::MT mt, float border_width, unsigned int border_color, int level=0)
Definition GameApi.cc:25187
IMPORT P render_ovx_p(EveryApi &ev, OVX vx, float sx, float sy, float sz)
Definition GameApi.cc:24406
IMPORT OVX remove_not_enabled(OVX vx)
Definition GameApi.cc:23703
IMPORT OVX vx_to_ovx(VX vx, std::vector< P > vec)
Definition GameApi.cc:24621
IMPORT PTS instanced_positions(VX x, float sx, float sy, float sz, unsigned int value)
Definition GameApi_vx.cc:47
IMPORT P voxel_static(EveryApi &ev, std::vector< P > objs, std::vector< PTS > vec)
Definition GameApi.cc:22404
IMPORT VX from_implicit(IM i, int sx, int sy, int sz, float start_x, float end_x, float start_y, float end_y, float start_z, float end_z, int value)
Definition GameApi.cc:33296
IMPORT OVX remove_colours(OVX vx)
Definition GameApi.cc:23637
IMPORT ML vox_ml(EveryApi &ev, std::string url, int model, float sx, float sy, float sz, int level=0)
Definition GameApi.cc:25142
IMPORT P render_boxes(VX v, float sx, float sy, float sz)
Definition GameApi_vx.cc:174
IMPORT VX empty_voxel(int sx, int sy, int sz)
Definition GameApi.cc:21891
IMPORT VoxelApi(Env &e)
Definition GameApi_vx.cc:32
IMPORT ML vox_bind_ml(EveryApi &ev, std::string url, int model, float sx, float sy, float sz, GameApi::MT mt, int level=0)
Definition GameApi.cc:25179
IMPORT VX voxel_landscape_from_fbm(FB bitmap, int height, int false_val, int true_val)
Definition GameApi.cc:22072
IMPORT VX blit_voxel(O object, int sx, int sy, int sz, float start_x, float end_x, float start_y, float end_y, float start_z, float end_z, int false_value, int true_value)
Definition GameApi.cc:22083
IMPORT VX voxel_from_bitmaps(std::vector< BM > vec, std::string url)
Definition GameApi.cc:21963
IMPORT ML render_ovx(EveryApi &ev, OVX vx, MT mat, float sx, float sy, float sz, float border_width, unsigned int border_color)
Definition GameApi.cc:24397
IMPORT VX subvoxel(VX voxel, int start_x, int end_x, int start_y, int end_y, int start_z, int end_z)
Definition GameApi.cc:22061
IMPORT VX blit_voxel2(VX voxel, VX voxel2, int p_x, int p_y, int p_z)
Definition GameApi.cc:22077
IMPORT P vox_voxel(EveryApi &ev, std::string url, int model, float sx, float sy, float sz, int level=0)
Definition GameApi.cc:24979
IMPORT P vox_voxel3(EveryApi &ev, std::string url, int model, float sx, float sy, float sz, int level=0)
Definition GameApi.cc:25022
IMPORT BM sw_rays(O volume, VX colours, int sx, int sy, float vx, float vy, float vz, float z)
IMPORT OVX resize_voxels(OVX vx, VX vx2)
Definition GameApi.cc:23570
IMPORT VX blur(VX vx)
Definition GameApi.cc:24475
IMPORT unsigned int get_pixel(VX v, int x, int y, int z)
Definition GameApi_vx.cc:42
IMPORT VX convert_p_to_vx(P p, int sx, int sy, int sz, float start_x, float end_x, float start_y, float end_y, float start_z, float end_z, int value)
Definition GameApi_vx.cc:310
IMPORT OVX empty_ovx()
Definition GameApi.cc:24436
IMPORT ML vox_ml2(EveryApi &ev, std::string url, int model, float sx, float sy, float sz, float border_width, unsigned int border_color, int level=0)
Definition GameApi.cc:25151
IMPORT ML lod_vox(EveryApi &ev, std::string vox_url, int model, float sx, float sy, float sz, MT mat, PTS pts, int l1, int l2, int l3, int l4)
Definition GameApi.cc:44600
IMPORT ARR voxel_instancing(VX voxel, int count, float start_x, float end_x, float start_y, float end_y, float start_z, float end_z)
Definition GameApi.cc:22357
IMPORT ML voxel_bind(EveryApi &ev, std::vector< P > objs, std::vector< PTS > vec, MT material)
Definition GameApi.cc:22393
IMPORT ML voxel_render(EveryApi &ev, std::vector< P > objs, std::vector< PTS > vec)
Definition GameApi.cc:22380
Definition GameApi.hh:2475
IMPORT void codegen_reset_counter()
Definition GameApi_wmod.cc:1055
IMPORT std::string extract_deps(std::string filename)
Definition GameApi_wmod.cc:1113
IMPORT WModApi(Env &e)
Definition GameApi.cc:44500
IMPORT void change_param_is_array(WM mod2, int id, std::string uid, int param_index, bool is_array, int ref_line_index)
Definition GameApi_wmod.cc:2001
IMPORT std::vector< std::string > parse_param_array(std::string s)
Definition GameApi_wmod.cc:2042
IMPORT int execute(EveryApi &ev, WM mod2, int id, std::string line_uid, ExecuteEnv &exeenv, int level, int j)
Definition GameApi_wmod.cc:1462
IMPORT void insert_inserted_to_canvas(GuiApi &gui, W canvas, W item, std::string uid, W &display_clicks, W &edit_clicks, W &delete_key, W &codegen_button, W &popup_open)
Definition GameApi_wmod.cc:2265
IMPORT std::vector< int > indexes_from_funcname(GameApi::EveryApi &ev, std::string funcname)
Definition GameApi_wmod.cc:464
IMPORT void dump_functions_for_docs(GameApi::EveryApi &ev, int i)
Definition GameApi_wmod.cc:2418
IMPORT void change_param_multiple_return_values(WM mod2, int id, std::string uid, int j, int sz)
Definition GameApi_wmod.cc:1985
IMPORT std::vector< std::string * > refs_from_function(GameApi::EveryApi &ev, WM mod, int id, std::string funcname)
Definition GameApi_wmod.cc:717
IMPORT void insert_to_mod(WM mod, int id, std::string modname, std::string uid, bool array_return, int x, int y, std::vector< InsertParam > params)
Definition GameApi_wmod.cc:2146
IMPORT std::string get_funcname(WM mod2, int id, std::string uid)
Definition GameApi_wmod.cc:2124
IMPORT std::string generate_param_array(std::vector< std::string > v)
Definition GameApi_wmod.cc:2065
IMPORT std::string dump_functions(GameApi::EveryApi &ev, int i)
Definition GameApi_wmod.cc:2466
IMPORT void change_param_value(WM mod2, int id, std::string uid, int param_index, std::string newvalue, int j)
Definition GameApi_wmod.cc:2023
IMPORT std::vector< std::string > labels_from_function(GameApi::EveryApi &ev, WM mod, int id, std::string funcname)
Definition GameApi_wmod.cc:2215
IMPORT int dump_functions_count()
Definition GameApi_wmod.cc:2416
IMPORT void update_lines_from_canvas(W canvas, WM mod, int id)
Definition GameApi_wmod.cc:434
IMPORT std::string extract_funcname(std::string line)
Definition GameApi_wmod.cc:1096
IMPORT std::string return_type(GameApi::EveryApi &ev, WM mod2, int id, std::string line_uid)
Definition GameApi_wmod.cc:965
IMPORT void save(WM mod, std::string ilename)
Definition GameApi_wmod.cc:345
IMPORT std::pair< std::string, int > parse_multiple_return_uid(std::string s, bool &success)
Definition GameApi_wmod.cc:2080
IMPORT CollectResult collect_nodes(EveryApi &ev, WM mod2, int id, std::string line_uid, int level)
IMPORT std::vector< std::string * > exprs_from_function(GameApi::EveryApi &ev, WM mod, int id, std::string funcname)
Definition GameApi_wmod.cc:654
IMPORT std::vector< std::string > types_from_function(GameApi::EveryApi &ev, WM mod, int id, std::string funcname)
Definition GameApi_wmod.cc:776
IMPORT W inserted_widget(GameApi::EveryApi &ev, GuiApi &gui, WM mod2, int id, FtA atlas, BM atlas_bm, std::string func_name, std::vector< W * > connect_click, std::string uid, std::vector< W > &params)
Definition GameApi_wmod.cc:501
IMPORT std::pair< int, std::vector< std::string > > collect_urls(EveryApi &ev, WM mod2, int id, std::string line_uid, ExecuteEnv &exeenv, int level, ASyncData *arr, int arr_size, int j, bool use_async=false)
Definition GameApi_wmod.cc:1676
IMPORT std::string dep_from_function(EveryApi &ev, WM mod2, int id)
Definition GameApi_wmod.cc:631
IMPORT int find_line_index(WM mod2, int id, std::string uid)
Definition GameApi_wmod.cc:1969
IMPORT WM load(EveryApi &ev, std::string filename)
Definition GameApi_wmod.cc:352
IMPORT void delete_by_uid(WM mod2, int id, std::string line_uid)
Definition GameApi_wmod.cc:998
IMPORT bool typecheck(GameApi::EveryApi &ev, WM mod2, int id, std::string uid1, std::string uid2, int param_index, int ret_index, bool &is_array, bool &is_array_return)
Definition GameApi_wmod.cc:1905
IMPORT std::string param_value(WM mod2, int id, std::string uid, int param_index)
Definition GameApi_wmod.cc:2104
IMPORT void insert_links(EveryApi &ev, GuiApi &gui, WM mod2, int id, std::vector< W > &links, W canvas, const std::vector< W > &connect_targets, SH sh2, SH sh)
Definition GameApi_wmod.cc:826
IMPORT std::vector< std::pair< std::string, std::string > > defaults_from_function(GameApi::EveryApi &ev, std::string module_name)
Definition GameApi_wmod.cc:2185
IMPORT std::pair< std::string, std::string > codegen(EveryApi &ev, WM mod2, int id, std::string line_uid, int level, int j, CodeGenPositions *pos=0)
Definition GameApi_wmod.cc:1210
IMPORT void insert_to_canvas(GameApi::EveryApi &ev, GuiApi &gui, W canvas, WM mod, int id, FtA font, BM font_bm, std::vector< W > &connect_clicks, std::vector< W > &params, std::vector< W > &diaplay_clicks, std::vector< W > &edit_clicks, std::vector< W > &delete_key, std::vector< W > &codegen_button, std::vector< W > &popup_open, void(*fptr)(void *), void *data)
Definition GameApi_wmod.cc:2581
IMPORT std::string deps_from_mod(EveryApi &ev, WM mod2)
Definition GameApi_wmod.cc:640
Definition GameApi.hh:3513
IMPORT WV int_sample(int *array, int length, float samplelength, int min_value, int max_value)
Definition GameApi_wv.cc:178
IMPORT WV sample(float *array, int length, float samplelength)
Definition GameApi_wv.cc:174
IMPORT WV mix(WV orig, float pos, WV sample)
Definition GameApi_wv.cc:184
IMPORT WV move(WV w1, float delta)
Definition GameApi_wv.cc:140
IMPORT P waveform_rotated_polygon(WV wave, float start_angle, float end_angle, float radius, int num_samples, int num_waves)
Definition GameApi_wv.cc:65
IMPORT WV step(bool b)
Definition GameApi_wv.cc:312
IMPORT WV gaussian(float start_x, float end_x, float start_y, float end_y)
Definition GameApi_wv.cc:170
IMPORT float get_value(WV orig, float val)
Definition GameApi_wv.cc:201
IMPORT BM waveform_bitmap(WV wave, int sx, int sy, unsigned int true_color, unsigned int false_color)
Definition GameApi.cc:537
IMPORT WV sum(WV w1, WV w2)
Definition GameApi_wv.cc:92
IMPORT WaveformApi(Env &e)
Definition GameApi.cc:44511
IMPORT PN df_dx(PN poly)
Definition GameApi.cc:26324
IMPORT WV wv_empty(float length)
Definition GameApi_wv.cc:72
IMPORT WV polynomial_wave(PN pn, float start_x, float end_x, float start_y, float end_y)
Definition GameApi.cc:26318
IMPORT WV length_change(WV orig, float new_length)
Definition GameApi_wv.cc:231
IMPORT float length(WV orig)
Definition GameApi_wv.cc:206
IMPORT PN std_polynomial(float x_5, float x_4, float x_3, float x_2, float x_1, float c)
Definition GameApi.cc:26283
IMPORT WV freq_change(WV orig, float old_freq, float new_freq)
Definition GameApi_wv.cc:195
IMPORT WV scale(WV w1, float scale)
Definition GameApi_wv.cc:115
IMPORT WV sinwave(float length, float freq)
Definition GameApi_wv.cc:147
IMPORT WV repeat(WV wave, int num)
Definition GameApi_wv.cc:306
IMPORT WV volume_ramp(WV orig, float old_y_value, float x_pos1, float x_pos2, float y_pos1, float y_pos2)
Definition GameApi_wv.cc:190
IMPORT WV cubic(float f_0, float f_1, float df_0, float df_1, float min_y, float max_y)
Definition GameApi_wv.cc:335
void set_child_var(int x, int y, std::string name, float r, float g, float b, float a)
Definition GameApi.hh:5581
void set_rotation_matrix2(M m)
Definition GameApi.hh:5520
void pick_object1(float x, float y, float &xx, float &yy, float &zz)
Definition GameApi.hh:5538
void set_anim_frame(int id)
Definition GameApi.hh:5533
void set_rotation_y(float angle)
Definition GameApi.hh:5510
void set_block(int x, int y, int c)
Definition GameApi.hh:5363
void set_range(int x, int y, int sx, int sy)
Definition GameApi.hh:5397
void set_anim_time(int x, int y, float time)
Definition GameApi.hh:5371
void render_outline(SH sh_new)
Definition GameApi.hh:5418
void bind_texarray(TXA id)
Definition GameApi.hh:5529
void prepare(bool keep=false)
Definition GameApi.hh:5376
WorldObj(EveryApi &ev, std::function< P(int)> f, int numvalues, BM bm, float dx, float dy, SH sh)
Definition GameApi.hh:5325
bool pick_object2(float mouse_x, float mouse_y, float radius, int scr_x, int scr_y, M in_P, int x, int y)
Definition GameApi.hh:5558
void set_scale(float mult_x, float mult_y, float mult_z)
Definition GameApi.hh:5505
void set_pos(float pos_x, float pos_y, float pos_z)
Definition GameApi.hh:5500
void clear_child_var(int x, int y)
Definition GameApi.hh:5577
void set_outline(int x, int y, bool b, SH sh3)
Definition GameApi.hh:5591
int read_block(int x, int y) const
Definition GameApi.hh:5367
void bind_texture(int num_id, TXID id_)
Definition GameApi.hh:5525
void set_var(std::string name, float r, float g, float b, float a)
Definition GameApi.hh:5568
void render()
Definition GameApi.hh:5437
void set_rotation_matrix(M m)
Definition GameApi.hh:5515
P collect()
Definition GameApi.hh:5404
~WorldObj()
Definition GameApi.hh:5362
Definition GraphI.hh:3114
Definition GameApi_pl.cc:10958
std::string code
Definition test.cpp:145
std::string homepageurl
Definition test.cpp:222
Tabs_Gui * g_start
Definition test.cpp:4105
IMPORT ArrayType * find_array(GameApi::Env &e, GameApi::ARR arr)
Definition GameApi_dep_add_find.cc:1924
frame( $arr, $width, $height, $data, $i, $homepage, $noheaders, $seamless, $transparent)
Definition emscripten_frame.php:18
</style ><!-- TO CHANGE THE PARAMETERS, YOU SHOULD CHANGE:container width/height(to change what area of the page is reserved for the model) and wd/hd(to change how large the 3d model is) and delta_x and delta_y(to position the model) -->< script > let wd
Definition gameapi_example.php:60
border radius
Definition gameapi_example.php:45
let delta_y
Definition gameapi_example.php:63
let delta_x
Definition gameapi_example.php:62
background color
Definition gameapi_example.php:46
P sky(EveryApi &ev)
Definition test.cpp:214
void function(void)
Definition memory_leak_test.cpp:26
left margin
Definition mesh_preview.php:76
d
Definition meshpage.php:3895
iVBORw0KGgoAAAANSUhEUgAAANcAAAB5CAMAAACdtUQZAAAA51BMVEX</div ></div >< div style="padding: 0px 0px; width: 1324px;">< div style="height: 400px; width: 1324px;"></div >< div itemscope itemtype="https: </div><div itemscope itemtype="https:</div >< div itemscope itemtype="https: </div></div><p><div style="padding:0px 0px;width:1324px;"><div></div><div itemscope itemtype="https:< ul >< li >< b > Application name
8AkrcAgqgAs9wqQ0ey2tkAo8gAuuQfeI4hPUH09fXHy8z4+fng4uNKXF/Lz9BzfoAcgpkQMTUAKjAbOT4Qr9AXhJ8Rl7ktMCwTosA...
Definition meshpage.php:1610
lazy data
Definition meshpage.php:1583
str
Definition meshpage.php:1778
instead of< li > Displaying models works via URL t expect full length movie as the output of this process< li > Different animation models are very limited basically just translate rotate</ul >< h2 > What to do if your hosting location has no php</h2 >< ul >< li > comment out or remove display php lines at the beginning< li > you will lose threads too< li > every zip file distributed by meshpage org has one of those display php files with this issue</ul >< h2 > What should I do to serve the files via http</h2 > I get some random triangles that do not belong to the model</h2 > The engine works correctly The obj file supports quads and polygons But some external tools that create obj files insert random polygons to the file to discourage rendering of polygons We consider polygon rendering is important and our engine should support it by default If you have we have disable_polygons() feature in the engine to get rid of the trash. But real solution is to change the tool you use to create the .obj file/check the .obj file that it doesn 't contain random(invisible) polygons that do not render in competing 3d engines. Our engine does not have the performance problems normally associated with polygons given that triangle quad polygon type change does not cause additional draw commands to the opengl rendering< p > GLTF standard organisation made significant mistake when specifying GLTF file format
Definition meshpage.php:1092
line height
Definition meshpage.php:3536
n< br > font size
Definition meshpage.php:3536
< h2 > I want smooth transition from jpg png webp to the engine</h2 > There s few options
Definition meshpage.php:1181
url
Definition meshpage.php:1781
store
Definition meshpage_bootstrap.php:1758
Definition FreeType.hh:46
void prepare(RenderObject &o)
Definition GameApi.cc:874
int collect_counter(int mode)
void unregister_cache_deleter(int id)
void append_url_map(const char *url, const unsigned char *data, const unsigned char *data_end)
Definition GameApi_bm.cc:723
IMPORT std::pair< int, std::string > execute_codegen(Env &e2, EveryApi &ev, std::string text, ExecuteEnv &e)
Definition GameApi_gui.cc:8557
int register_cache_deleter(void(*fptr)(void *), void *data)
std::vector< PTS > arr_to_pts_arr(EveryApi &ev, ARR a)
Definition GameApi.cc:22283
Definition Plane.cc:5
std::string filenames[]
Definition parser.cc:237
P colour(EveryApi &ev, P p1, unsigned int col)
Definition test.cpp:106
double f(const std::string &, double, bool) noexcept
Definition profile_cpp_calls_2.cpp:4
BM grid(EveryApi &ev, int sx, int sy, int cell_x, int cell_y)
Definition test.cpp:32
int f2(char c)
Definition test.cpp:51
Definition GameApiTest5.cc:17
Definition test.cpp:815
Definition test.cpp:82
std::vector< int > vec
Definition test.cpp:84
Definition GameApi.h:8
Definition Buffer.hh:48
Definition Buffer.hh:32
Definition Common.hh:54
Definition GameApi.hh:112
ARR * clone() const
Definition GameApi.hh:119
ARR(const ARR &i)
Definition GameApi.hh:113
ARR & operator=(const ARR &i)
Definition GameApi.hh:117
ARR()
Definition GameApi.hh:115
ARR(const volatile ARR &i)
Definition GameApi.hh:114
volatile ARR & operator=(volatile ARR &i) volatile
Definition GameApi.hh:118
ARR(int i)
Definition GameApi.hh:116
int id
Definition GameApi.hh:112
Definition Common.hh:58
Definition GameApi.hh:269
int id
Definition GameApi.hh:269
Definition GameApi.hh:4869
float b
Definition GameApi.hh:4872
float a
Definition GameApi.hh:4872
float g
Definition GameApi.hh:4872
float r
Definition GameApi.hh:4872
int i
Definition GameApi.hh:4870
std::string name
Definition GameApi.hh:4871
Definition Common.hh:74
Definition Common.hh:123
Definition Common.hh:51
Definition Common.hh:72
Definition Common.hh:71
int id
Definition Common.hh:71
Definition GameApi.hh:2767
int id
Definition GameApi.hh:2767
Definition Common.hh:31
Definition Common.hh:76
Definition Common.hh:163
Definition Common.hh:32
Definition Common.hh:24
Definition Common.hh:38
Definition Common.hh:139
Definition Common.hh:94
Definition Common.hh:48
Definition Common.hh:66
Definition Common.hh:162
Definition Common.hh:93
Definition GameApi.hh:2464
std::string p
Definition GameApi.hh:2466
std::string pn
Definition GameApi.hh:2467
std::vector< EditNode * > res
Definition GameApi.hh:2465
Definition Common.hh:30
Definition Common.hh:135
Definition Common.hh:67
Definition Common.hh:27
Definition Common.hh:121
Definition Common.hh:53
Definition Common.hh:159
Definition Common.hh:107
Definition GameApi.hh:4664
SampleCollectionApi sample_api
Definition GameApi.hh:4700
PlaneApi plane_api
Definition GameApi.hh:4696
CollisionPlane collision_api
Definition GameApi.hh:4708
PolygonArrayApi polygon_arr_api
Definition GameApi.hh:4718
EventApi event_api
Definition GameApi.hh:4681
SurfaceApi surface_api
Definition GameApi.hh:4723
Skeletal skeletal_api
Definition GameApi.hh:4717
BitmapApi bitmap_api
Definition GameApi.hh:4674
SeparateApi separate_api
Definition GameApi.hh:4692
FrameBufferApi fbo_api
Definition GameApi.hh:4699
AnimApi anim_api
Definition GameApi.hh:4680
FloatVolumeApi float_volume_api
Definition GameApi.hh:4685
IMPORT ~EveryApi()
Definition GameApi.cc:44536
LinesApi lines_api
Definition GameApi.hh:4695
StateChangeApi state_change_api
Definition GameApi.hh:4690
TriStripApi ts_api
Definition GameApi.hh:4705
MatrixApi matrix_api
Definition GameApi.hh:4671
MatricesApi matrices_api
Definition GameApi.hh:4716
WaveformApi waveform_api
Definition GameApi.hh:4693
TreeApi tree_api
Definition GameApi.hh:4712
UberShaderApi uber_api
Definition GameApi.hh:4714
BooleanOps bool_api
Definition GameApi.hh:4707
MainLoopApi mainloop_api
Definition GameApi.hh:4668
IMPORT Env & get_env()
Definition GameApi.cc:44533
ShaderApi shader_api
Definition GameApi.hh:4689
SpriteApi sprite_api
Definition GameApi.hh:4672
CurveApi curve_api
Definition GameApi.hh:4715
GridApi grid_api
Definition GameApi.hh:4673
TrackerApi tracker_api
Definition GameApi.hh:4701
PhysicsApi physics_api
Definition GameApi.hh:4704
WModApi mod_api
Definition GameApi.hh:4703
NewPlaneApi newplane_api
Definition GameApi.hh:4722
PointsApi points_api
Definition GameApi.hh:4697
MovementNode move_api
Definition GameApi.hh:4709
ShaderModuleApi sh_api
Definition GameApi.hh:4702
VertexAnimApi vertex_anim_api
Definition GameApi.hh:4721
VectorVolumeApi vector_volume_api
Definition GameApi.hh:4688
FloatBitmapApi float_bitmap_api
Definition GameApi.hh:4677
BoolBitmapApi bool_bitmap_api
Definition GameApi.hh:4676
ColorVolumeApi color_volume_api
Definition GameApi.hh:4686
FunctionApi function_api
Definition GameApi.hh:4683
IMPORT EveryApi(Env &e)
Definition GameApi.cc:44527
PickingApi picking_api
Definition GameApi.hh:4711
BlockerApi blocker_api
Definition GameApi.hh:4720
VolumeApi volume_api
Definition GameApi.hh:4684
PointApi point_api
Definition GameApi.hh:4669
CutterApi cutter_api
Definition GameApi.hh:4706
VectorApi vector_api
Definition GameApi.hh:4670
PolygonApi polygon_api
Definition GameApi.hh:4675
FontApi font_api
Definition GameApi.hh:4679
LowFrameBufferApi low_frame_api
Definition GameApi.hh:4724
VoxelApi voxel_api
Definition GameApi.hh:4698
MaterialsApi materials_api
Definition GameApi.hh:4713
PolygonDistanceField polygon_dist_api
Definition GameApi.hh:4719
ImplicitApi implicit_api
Definition GameApi.hh:4710
ContinuousBitmapApi cont_bitmap_api
Definition GameApi.hh:4678
FloatSceneApi float_scene_api
Definition GameApi.hh:4725
TextureApi texture_api
Definition GameApi.hh:4691
ColorApi color_api
Definition GameApi.hh:4694
DistanceFloatVolumeApi dist_api
Definition GameApi.hh:4687
Definition GameApi.hh:301
std::vector< std::string > names
Definition GameApi.hh:302
std::vector< std::string > values
Definition GameApi.hh:303
std::vector< int > env
Definition GameApi.hh:305
std::map< std::string, int > envmap
Definition GameApi.hh:304
Definition GameApi.hh:2243
float value
Definition GameApi.hh:2243
std::string name
Definition GameApi.hh:2243
Definition GameApi.hh:2244
std::string name
Definition GameApi.hh:2244
int value
Definition GameApi.hh:2244
Definition Common.hh:96
Definition Common.hh:147
Definition Common.hh:22
Definition Common.hh:75
Definition Common.hh:142
Definition Common.hh:42
Definition Common.hh:39
Definition Common.hh:23
Definition Common.hh:138
Definition Common.hh:69
Definition Common.hh:95
Definition Common.hh:119
Definition GameApi.hh:4579
int viewport[4]
Definition GameApi.hh:4579
Definition Common.hh:155
Definition Common.hh:97
Definition Common.hh:41
Definition GameApi.hh:2373
float f_value
Definition GameApi.hh:2376
std::string s
Definition GameApi.hh:2379
int i_value
Definition GameApi.hh:2374
float f_z
Definition GameApi.hh:2377
float f_x
Definition GameApi.hh:2377
std::string color
Definition GameApi.hh:2378
float f_y
Definition GameApi.hh:2377
std::string expr
Definition GameApi.hh:2380
long l_value
Definition GameApi.hh:2375
Definition Common.hh:21
Definition Common.hh:122
Definition Common.hh:26
Definition Common.hh:117
Definition Common.hh:43
Definition Common.hh:164
Definition Common.hh:25
Definition Common.hh:84
Definition GameApi.hh:1817
float old_pos_y
Definition GameApi.hh:1825
bool side_left
Definition GameApi.hh:1822
bool forward
Definition GameApi.hh:1818
bool right
Definition GameApi.hh:1821
bool left
Definition GameApi.hh:1820
bool side_right
Definition GameApi.hh:1823
bool mv_mode
Definition GameApi.hh:1826
float old_pos_x
Definition GameApi.hh:1824
bool backward
Definition GameApi.hh:1819
Definition GameApi.hh:1805
bool up
Definition GameApi.hh:1806
bool right
Definition GameApi.hh:1809
bool left
Definition GameApi.hh:1808
bool down
Definition GameApi.hh:1807
Definition Common.hh:50
Definition Common.hh:109
Definition Common.hh:90
Definition Common.hh:140
Definition Common.hh:141
Definition Common.hh:112
Definition Common.hh:82
Definition Common.hh:108
Definition Common.hh:101
Definition Common.hh:59
Definition Common.hh:113
Definition Common.hh:156
Definition Common.hh:65
Definition Common.hh:110
Definition Common.hh:60
Definition Common.hh:62
Definition Common.hh:111
Definition Common.hh:55
Definition GameApi.hh:190
M(const M &ii)
Definition GameApi.hh:190
float mat[16]
Definition GameApi.hh:190
Definition GameApi.hh:830
DoubleTapState()
Definition GameApi.hh:830
bool in_between
Definition GameApi.hh:830
int start_frame
Definition GameApi.hh:830
Definition GameApi.hh:791
int type
Definition GameApi.hh:792
int joy1_axis2
Definition GameApi.hh:816
bool joy0_button1
Definition GameApi.hh:798
int joy0_ball1
Definition GameApi.hh:821
bool joy1_button1
Definition GameApi.hh:803
int joy1_ball1
Definition GameApi.hh:823
bool last
Definition GameApi.hh:826
int joy1_axis1
Definition GameApi.hh:815
int joy0_axis4
Definition GameApi.hh:812
bool joy1_button3
Definition GameApi.hh:805
bool joy0_button2
Definition GameApi.hh:799
bool joy0_button3
Definition GameApi.hh:800
int joy1_axis4
Definition GameApi.hh:818
int joy0_current_axis
Definition GameApi.hh:807
int ch
Definition GameApi.hh:793
int joy0_axis2
Definition GameApi.hh:810
int mouse_wheel_y
Definition GameApi.hh:796
bool joy1_button2
Definition GameApi.hh:804
bool joy1_button0
Definition GameApi.hh:802
int joy1_axis3
Definition GameApi.hh:817
PT cursor_pos
Definition GameApi.hh:794
int joy1_ball0
Definition GameApi.hh:822
int joy0_axis3
Definition GameApi.hh:811
int button
Definition GameApi.hh:795
int joy0_ball0
Definition GameApi.hh:820
int joy0_axis0
Definition GameApi.hh:808
int joy1_current_axis
Definition GameApi.hh:813
int repeat
Definition GameApi.hh:828
bool joy0_button0
Definition GameApi.hh:797
int joy0_axis1
Definition GameApi.hh:809
std::string drag_drop_filename
Definition GameApi.hh:827
int joy1_axis0
Definition GameApi.hh:814
Definition GameApi.hh:2841
std::string map_bump
Definition GameApi.hh:2855
float Kd_x
Definition GameApi.hh:2849
std::string material_name
Definition GameApi.hh:2842
float Ns
Definition GameApi.hh:2843
std::string bump
Definition GameApi.hh:2856
std::string map_Kd
Definition GameApi.hh:2853
float Ke_y
Definition GameApi.hh:2851
float Ka_y
Definition GameApi.hh:2848
float Ni
Definition GameApi.hh:2844
float Kd_z
Definition GameApi.hh:2849
std::string map_Ka
Definition GameApi.hh:2852
float Ka_z
Definition GameApi.hh:2848
float Ke_x
Definition GameApi.hh:2851
float Ks_x
Definition GameApi.hh:2850
float d
Definition GameApi.hh:2845
float Ka_x
Definition GameApi.hh:2848
int illum
Definition GameApi.hh:2847
float Ks_z
Definition GameApi.hh:2850
float Tr
Definition GameApi.hh:2846
float Kd_y
Definition GameApi.hh:2849
float Ke_z
Definition GameApi.hh:2851
float Ks_y
Definition GameApi.hh:2850
std::string map_d
Definition GameApi.hh:2854
Definition Common.hh:68
Definition Common.hh:87
Definition Common.hh:85
Definition Common.hh:120
Definition Common.hh:47
Definition Common.hh:89
Definition Common.hh:136
Definition GameApi.hh:2789
int id
Definition GameApi.hh:2789
Definition Common.hh:44
Definition Common.hh:160
Definition Common.hh:128
Definition Common.hh:36
Definition Common.hh:29
Definition Common.hh:99
Definition Common.hh:88
Definition Common.hh:100
Definition Common.hh:116
Definition Common.hh:145
Definition Common.hh:144
Definition Common.hh:49
Definition Common.hh:79
Definition Common.hh:86
Definition Common.hh:56
Definition GameApi.hh:2009
int id
Definition GameApi.hh:2009
PH phy
Definition GameApi.hh:2009
Definition GameApi.hh:46
Definition GameApi.hh:49
T data
Definition GameApi.hh:49
Definition Common.hh:134
Definition Common.hh:146
Definition Common.hh:83
Definition Common.hh:52
Definition Common.hh:78
Definition Common.hh:28
Definition Common.hh:40
Definition Common.hh:152
Definition Common.hh:45
Definition Common.hh:92
Definition Common.hh:148
Definition Common.hh:77
Definition Common.hh:114
Definition Common.hh:137
Definition Common.hh:103
Definition Common.hh:118
Definition Common.hh:151
Definition Common.hh:63
Definition Common.hh:91
Definition GameApi.hh:288
int id
Definition GameApi.hh:288
Definition GameApi.hh:286
int id
Definition GameApi.hh:286
Definition Common.hh:149
Definition GameApi.hh:287
int id
Definition GameApi.hh:287
Definition Common.hh:132
Definition Common.hh:161
Definition Common.hh:131
Definition Common.hh:130
Definition Common.hh:129
Definition Common.hh:115
Definition Common.hh:106
Definition Common.hh:61
Definition Common.hh:125
Definition Common.hh:124
Definition Common.hh:73
Definition Common.hh:98
Definition Common.hh:143
Definition Common.hh:133
Definition Common.hh:126
Definition Common.hh:80
Definition Common.hh:57
Definition Common.hh:104
Definition Common.hh:150
Definition Common.hh:154
Definition GameApi.hh:2497
std::string second
Definition GameApi.hh:2499
int line_index_in_gameapi_function_lines_array
Definition GameApi.hh:2501
std::string first
Definition GameApi.hh:2498
bool is_array
Definition GameApi.hh:2500
Definition Common.hh:70
Definition Common.hh:153
Definition GameApi.hh:5573
float g
Definition GameApi.hh:5575
float a
Definition GameApi.hh:5575
float b
Definition GameApi.hh:5575
std::string name
Definition GameApi.hh:5574
float r
Definition GameApi.hh:5575
Definition GameApi.h:76
Definition GameApi.h:77
Definition GameApi.h:92
Definition GameApi.h:18
Definition GraphI.hh:1502
Definition GameApi.h:81
Definition GameApi.h:80
Definition GameApi.h:23
Definition GameApi.h:29
Definition GameApi.h:67
Definition FloatVolumeObject.hh:5
W link(std::string url, std::string str, int size_x, int size_y, int font_size, unsigned int font_colour, int align)
Definition ui.cc:731
W empty()
Definition ui.cc:634
W center_y(W item, int sy)
Definition ui.cc:947
W hide(W widget)
Definition ui.cc:954
you need to obtain reproduction rights and give meshpage org permission to publish the content in meshpage org While the content is available only to people who gets access to resulting urls
Definition view.php:234
num
Definition view.php:2821
#define compress
Definition zip_file.hpp:485