1 /*
2  * OpenBOR - http://www.chronocrash.com
3  * -----------------------------------------------------------------------
4  * All rights reserved. See LICENSE in OpenBOR root for license details.
5  *
6  * Copyright (c) 2004 - 2017 OpenBOR Team
7  */
8 
9 #include "scriptcommon.h"
10 
11 //return name of function from pointer to function
Script_GetFunctionName(void * functionRef)12 const char *Script_GetFunctionName(void *functionRef)
13 {
14     if (functionRef == ((void *)system_isempty))
15     {
16         return "isempty";
17     }
18     else if (functionRef == ((void *)system_exit))
19     {
20         return "exit";
21     }
22     else if (functionRef == ((void *)system_NULL))
23     {
24         return "NULL";
25     }
26     else if (functionRef == ((void *)system_rand))
27     {
28         return "rand";
29     }
30     else if (functionRef == ((void *)system_srand))
31     {
32         return "srand";
33     }
34     else if (functionRef == ((void *)system_getglobalvar))
35     {
36         return "getglobalvar";
37     }
38     else if (functionRef == ((void *)system_setglobalvar))
39     {
40         return "setglobalvar";
41     }
42     else if (functionRef == ((void *)system_getlocalvar))
43     {
44         return "getlocalvar";
45     }
46     else if (functionRef == ((void *)system_setlocalvar))
47     {
48         return "setlocalvar";
49     }
50     else if (functionRef == ((void *)system_clearglobalvar))
51     {
52         return "clearglobalvar";
53     }
54     else if (functionRef == ((void *)system_clearlocalvar))
55     {
56         return "clearlocalvar";
57     }
58     else if (functionRef == ((void *)system_free))
59     {
60         return "free";
61     }
62     else if (functionRef == ((void *)system_typeof))
63     {
64         return "typeof";
65     }
66     else if (functionRef == ((void *)math_sin))
67     {
68         return "sin";
69     }
70     else if (functionRef == ((void *)math_ssin))
71     {
72         return "ssin";
73     }
74     else if (functionRef == ((void *)math_cos))
75     {
76         return "cos";
77     }
78     else if (functionRef == ((void *)math_scos))
79     {
80         return "scos";
81     }
82     else if (functionRef == ((void *)math_sqrt))
83     {
84         return "sqrt";
85     }
86     else if (functionRef == ((void *)math_pow))
87     {
88         return "pow";
89     }
90     else if (functionRef == ((void *)math_asin))
91     {
92         return "asin";
93     }
94     else if (functionRef == ((void *)math_acos))
95     {
96         return "acos";
97     }
98     else if (functionRef == ((void *)math_atan))
99     {
100         return "atan";
101     }
102     else if (functionRef == ((void *)math_trunc))
103     {
104         return "trunc";
105     }
106     else if (functionRef == ((void *)math_round))
107     {
108         return "round";
109     }
110     else if (functionRef == ((void *)openbor_systemvariant))
111     {
112         return "openborvariant";
113     }
114     else if (functionRef == ((void *)openbor_setsystemvariant))
115     {
116         return "changeopenborvariant";
117     }
118     else if (functionRef == ((void *)openbor_setsystemvariant))
119     {
120         return "setopenborvariant";
121     }
122     else if (functionRef == ((void *)openbor_drawstring))
123     {
124         return "drawstring";
125     }
126     else if (functionRef == ((void *)openbor_drawstringtoscreen))
127     {
128         return "drawstringtoscreen";
129     }
130     else if (functionRef == ((void *)openbor_log))
131     {
132         return "log";
133     }
134     else if (functionRef == ((void *)openbor_drawbox))
135     {
136         return "drawbox";
137     }
138     else if (functionRef == ((void *)openbor_drawboxtoscreen))
139     {
140         return "drawboxtoscreen";
141     }
142     else if (functionRef == ((void *)openbor_drawline))
143     {
144         return "drawline";
145     }
146     else if (functionRef == ((void *)openbor_drawlinetoscreen))
147     {
148         return "drawlinetoscreen";
149     }
150     else if (functionRef == ((void *)openbor_drawsprite))
151     {
152         return "drawsprite";
153     }
154     else if (functionRef == ((void *)openbor_drawspritetoscreen))
155     {
156         return "drawspritetoscreen";
157     }
158     else if (functionRef == ((void *)openbor_drawdot))
159     {
160         return "drawdot";
161     }
162     else if (functionRef == ((void *)openbor_drawdottoscreen))
163     {
164         return "drawdottoscreen";
165     }
166     else if (functionRef == ((void *)openbor_drawscreen))
167     {
168         return "drawscreen";
169     }
170     else if (functionRef == ((void *)openbor_changeplayerproperty))
171     {
172         return "changeplayerproperty";
173     }
174 
175     // Axis
176     else if (functionRef == ((void *)openbor_get_axis_plane_lateral_float_property))
177     {
178         return "get_axis_plane_lateral_float_property";
179     }
180     else if (functionRef == ((void *)openbor_get_axis_plane_lateral_int_property))
181     {
182         return "get_axis_plane_lateral_int_property";
183     }
184     else if (functionRef == ((void *)openbor_get_axis_plane_vertical_int_property))
185     {
186         return "get_axis_plane_vertical_int_property";
187     }
188     else if (functionRef == ((void *)openbor_get_axis_principal_float_property))
189     {
190         return "get_axis_principal_float_property";
191     }
192     else if (functionRef == ((void *)openbor_get_axis_principal_int_property))
193     {
194         return "get_axis_principal_int_property";
195     }
196     else if (functionRef == ((void *)openbor_set_axis_plane_lateral_float_property))
197     {
198         return "set_axis_plane_lateral_float_property";
199     }
200     else if (functionRef == ((void *)openbor_set_axis_plane_lateral_int_property))
201     {
202         return "set_axis_plane_lateral_int_property";
203     }
204     else if (functionRef == ((void *)openbor_set_axis_plane_vertical_int_property))
205     {
206         return "set_axis_plane_vertical_int_property";
207     }
208     else if (functionRef == ((void *)openbor_set_axis_principal_float_property))
209     {
210         return "set_axis_principal_float_property";
211     }
212     else if (functionRef == ((void *)openbor_set_axis_principal_int_property))
213     {
214         return "set_axis_principal_int_property";
215     }
216 
217     // Binding
218     else if (functionRef == ((void *)openbor_get_bind_property))
219     {
220         return "get_bind_property";
221     }
222     else if (functionRef == ((void *)openbor_set_bind_property))
223     {
224         return "set_bind_property";
225     }
226 	else if (functionRef == ((void *)openbor_update_bind))
227 	{
228 		return "update_bind";
229 	}
230 
231 	// Drawmethod
232 	else if (functionRef == ((void *)openbor_allocate_drawmethod))
233 	{
234 		return "allocate_drawmethod";
235 	}
236 	else if (functionRef == ((void *)openbor_copy_drawmethod))
237 	{
238 		return "copy_drawmethod";
239 	}
240 	else if (functionRef == ((void *)openbor_free_drawmethod))
241 	{
242 	return "free_drawmethod";
243 	}
244 	else if (functionRef == ((void *)openbor_get_drawmethod_property))
245 	{
246 		return "get_drawmethod_property";
247 	}
248 	else if (functionRef == ((void *)openbor_set_drawmethod_property))
249 	{
250 		return "set_drawmethod_property";
251 	}
252 
253     else if (functionRef == ((void *)openbor_getplayerproperty))
254     {
255         return "getplayerproperty";
256     }
257     else if (functionRef == ((void *)openbor_changeentityproperty))
258     {
259         return "changeentityproperty";
260     }
261     else if (functionRef == ((void *)openbor_getentityproperty))
262     {
263         return "getentityproperty";
264     }
265     else if (functionRef == ((void *)openbor_get_entity_property))
266     {
267         return "get_entity_property";
268     }
269     else if (functionRef == ((void *)openbor_set_entity_property))
270     {
271         return "set_entity_property";
272     }
273     else if (functionRef == ((void *)openbor_get_animation_property))
274     {
275         return "get_animation_property";
276     }
277     else if (functionRef == ((void *)openbor_set_animation_property))
278     {
279         return "set_animation_property";
280     }
281     else if (functionRef == ((void *)openbor_get_attack_collection))
282     {
283         return "get_attack_collection";
284     }
285     else if (functionRef == ((void *)openbor_get_attack_instance))
286     {
287         return "get_attack_instance";
288     }
289     else if (functionRef == ((void *)openbor_get_attack_property))
290     {
291         return "get_attack_property";
292     }
293     else if (functionRef == ((void *)openbor_set_attack_property))
294     {
295         return "set_attack_property";
296     }
297 
298 	// Recursive damage.
299 	else if (functionRef == ((void *)openbor_get_recursive_damage_property))
300 	{
301 	return "get_recursive_damage_property";
302 	}
303 	else if (functionRef == ((void *)openbor_set_recursive_damage_property))
304 	{
305 	return "set_recursive_damage_property";
306 	}
307 
308     // Body collision (bbox)
309     else if (functionRef == ((void *)openbor_get_body_collision_collection))
310     {
311         return "get_body_collision_collection";
312     }
313     else if (functionRef == ((void *)openbor_get_body_collision_instance))
314     {
315         return "get_body_collision_instance";
316     }
317     else if (functionRef == ((void *)openbor_get_body_collision_property))
318     {
319         return "get_body_collision_property";
320     }
321     else if (functionRef == ((void *)openbor_set_body_collision_property))
322     {
323         return "set_body_collision_property";
324     }
325 
326     // Entity collision (ebox)
327     else if (functionRef == ((void *)openbor_get_entity_collision_collection))
328     {
329         return "get_entity_collision_collection";
330     }
331     else if (functionRef == ((void *)openbor_get_entity_collision_instance))
332     {
333         return "get_entity_collision_instance";
334     }
335     else if (functionRef == ((void *)openbor_get_entity_collision_property))
336     {
337         return "get_entity_collision_property";
338     }
339     else if (functionRef == ((void *)openbor_set_entity_collision_property))
340     {
341         return "set_entity_collision_property";
342     }
343 
344     else if (functionRef == ((void *)openbor_tossentity))
345     {
346         return "tossentity";
347     }
348     else if (functionRef == ((void *)openbor_clearspawnentry))
349     {
350         return "clearspawnentry";
351     }
352     else if (functionRef == ((void *)openbor_setspawnentry))
353     {
354         return "setspawnentry";
355     }
356     else if (functionRef == ((void *)openbor_spawn))
357     {
358         return "spawn";
359     }
360     else if (functionRef == ((void *)openbor_projectile))
361     {
362         return "projectile";
363     }
364     else if (functionRef == ((void *)openbor_transconst))
365     {
366         return "openborconstant";
367     }
368     else if (functionRef == ((void *)openbor_playmusic))
369     {
370         return "playmusic";
371     }
372     else if (functionRef == ((void *)openbor_fademusic))
373     {
374         return "fademusic";
375     }
376     else if (functionRef == ((void *)openbor_setmusicvolume))
377     {
378         return "setmusicvolume";
379     }
380     else if (functionRef == ((void *)openbor_setmusictempo))
381     {
382         return "setmusictempo";
383     }
384     else if (functionRef == ((void *)openbor_pausemusic))
385     {
386         return "pausemusic";
387     }
388     else if (functionRef == ((void *)openbor_pausesamples))
389     {
390         return "pausesamples";
391     }
392     else if (functionRef == ((void *)openbor_pausesample))
393     {
394         return "pausesample";
395     }
396     else if (functionRef == ((void *)openbor_querychannel))
397     {
398         return "querychannel";
399     }
400     else if (functionRef == ((void *)openbor_stopchannel))
401     {
402         return "stopchannel";
403     }
404     else if (functionRef == ((void *)openbor_isactivesample))
405     {
406         return "isactivesample";
407     }
408     else if (functionRef == ((void *)openbor_sampleid))
409     {
410         return "sampleid";
411     }
412     else if (functionRef == ((void *)openbor_playsample))
413     {
414         return "playsample";
415     }
416     else if (functionRef == ((void *)openbor_loadsample))
417     {
418         return "loadsample";
419     }
420     else if (functionRef == ((void *)openbor_unloadsample))
421     {
422         return "unloadsample";
423     }
424     else if (functionRef == ((void *)openbor_fadeout))
425     {
426         return "fadeout";
427     }
428     else if (functionRef == ((void *)openbor_playerkeys))
429     {
430         return "playerkeys";
431     }
432     else if (functionRef == ((void *)openbor_changepalette))
433     {
434         return "changepalette";
435     }
436     else if (functionRef == ((void *)openbor_damageentity))
437     {
438         return "damageentity";
439     }
440     else if (functionRef == ((void *)openbor_getcomputeddamage))
441     {
442         return "getcomputeddamage";
443     }
444     else if (functionRef == ((void *)openbor_killentity))
445     {
446         return "killentity";
447     }
448     else if (functionRef == ((void *)openbor_dograb))
449     {
450         return "dograb";
451     }
452     else if (functionRef == ((void *)openbor_findtarget))
453     {
454         return "findtarget";
455     }
456     else if (functionRef == ((void *)openbor_checkrange))
457     {
458         return "checkrange";
459     }
460     else if (functionRef == ((void *)openbor_gettextobjproperty))
461     {
462         return "gettextobjproperty";
463     }
464     else if (functionRef == ((void *)openbor_changetextobjproperty))
465     {
466         return "changetextobjproperty";
467     }
468     else if (functionRef == ((void *)openbor_settextobj))
469     {
470         return "settextobj";
471     }
472     else if (functionRef == ((void *)openbor_cleartextobj))
473     {
474         return "cleartextobj";
475     }
476     else if (functionRef == ((void *)openbor_getlayerproperty))
477     {
478         return "getlayerproperty";
479     }
480     else if (functionRef == ((void *)openbor_changelayerproperty))
481     {
482         return "changelayerproperty";
483     }
484     else if (functionRef == ((void *)openbor_get_level_property))
485     {
486         return "get_level_property";
487     }
488     else if (functionRef == ((void *)openbor_set_level_property))
489     {
490         return "set_level_property";
491     }
492     else if (functionRef == ((void *)openbor_get_set_property))
493     {
494         return "get_set_property";
495     }
496     else if (functionRef == ((void *)openbor_set_set_property))
497     {
498         return "set_set_property";
499     }
500     else if (functionRef == ((void *)openbor_get_set_handle))
501     {
502         return "get_set_handle";
503     }
504     else if (functionRef == ((void *)openbor_get_layer_handle))
505     {
506         return "get_layer_handle";
507     }
508     else if (functionRef == ((void *)openbor_changelevelproperty))
509     {
510         return "changelevelproperty";
511     }
512     else if (functionRef == ((void *)openbor_checkhole))
513     {
514         return "checkhole";
515     }
516     else if (functionRef == ((void *)openbor_checkholeindex))
517     {
518         return "checkholeindex";
519     }
520     else if (functionRef == ((void *)openbor_checkwall))
521     {
522         return "checkwall";
523     }
524     else if (functionRef == ((void *)openbor_checkwallindex))
525     {
526         return "checkwallindex";
527     }
528     else if (functionRef == ((void *)openbor_checkplatformbelow))
529     {
530         return "checkplatformbelow";
531     }
532     else if (functionRef == ((void *)openbor_checkplatformabove))
533     {
534         return "checkplatformabove";
535     }
536     else if (functionRef == ((void *)openbor_checkplatformbetween))
537     {
538         return "checkplatformbetween";
539     }
540     else if (functionRef == ((void *)openbor_checkbasemap))
541     {
542         return "checkbasemap";
543     }
544     else if (functionRef == ((void *)openbor_checkbasemapindex))
545     {
546         return "checkbasemapindex";
547     }
548     else if (functionRef == ((void *)openbor_checkbase))
549     {
550         return "checkbase";
551     }
552     else if (functionRef == ((void *)openbor_generatebasemap))
553     {
554         return "generatebasemap";
555     }
556     else if (functionRef == ((void *)openbor_openfilestream))
557     {
558         return "openfilestream";
559     }
560     else if (functionRef == ((void *)openbor_getfilestreamline))
561     {
562         return "getfilestreamline";
563     }
564     else if (functionRef == ((void *)openbor_getfilestreamargument))
565     {
566         return "getfilestreamargument";
567     }
568     else if (functionRef == ((void *)openbor_filestreamnextline))
569     {
570         return "filestreamnextline";
571     }
572     else if (functionRef == ((void *)openbor_getfilestreamposition))
573     {
574         return "getfilestreamposition";
575     }
576     else if (functionRef == ((void *)openbor_setfilestreamposition))
577     {
578         return "setfilestreamposition";
579     }
580     else if (functionRef == ((void *)openbor_filestreamappend))
581     {
582         return "filestreamappend";
583     }
584     else if (functionRef == ((void *)openbor_createfilestream))
585     {
586         return "createfilestream";
587     }
588     else if (functionRef == ((void *)openbor_closefilestream))
589     {
590         return "closefilestream";
591     }
592     else if (functionRef == ((void *)openbor_savefilestream))
593     {
594         return "savefilestream";
595     }
596     else if (functionRef == ((void *)openbor_getindexedvar))
597     {
598         return "getindexedvar";
599     }
600     else if (functionRef == ((void *)openbor_setindexedvar))
601     {
602         return "setindexedvar";
603     }
604     else if (functionRef == ((void *)openbor_getscriptvar))
605     {
606         return "getscriptvar";
607     }
608     else if (functionRef == ((void *)openbor_setscriptvar))
609     {
610         return "setscriptvar";
611     }
612     else if (functionRef == ((void *)openbor_getentityvar))
613     {
614         return "getentityvar";
615     }
616     else if (functionRef == ((void *)openbor_setentityvar))
617     {
618         return "setentityvar";
619     }
620     else if (functionRef == ((void *)openbor_shutdown))
621     {
622         return "shutdown";
623     }
624     else if (functionRef == ((void *)openbor_jumptobranch))
625     {
626         return "jumptobranch";
627     }
628     else if (functionRef == ((void *)openbor_changelight))
629     {
630         return "changelight";
631     }
632     else if (functionRef == ((void *)openbor_changeshadowcolor))
633     {
634         return "changeshadowcolor";
635     }
636     else if (functionRef == ((void *)openbor_bindentity))
637     {
638         return "bindentity";
639     }
640     else if (functionRef == ((void *)openbor_array))
641     {
642         return "array";
643     }
644     else if (functionRef == ((void *)openbor_size))
645     {
646         return "size";
647     }
648     else if (functionRef == ((void *)openbor_get))
649     {
650         return "get";
651     }
652     else if (functionRef == ((void *)openbor_set))
653     {
654         return "set";
655     }
656     else if (functionRef == ((void *)openbor_delete))
657     {
658         return "delete";
659     }
660     else if (functionRef == ((void *)openbor_add))
661     {
662         return "add";
663     }
664     else if (functionRef == ((void *)openbor_reset))
665     {
666         return "reset";
667     }
668     else if (functionRef == ((void *)openbor_next))
669     {
670         return "next";
671     }
672     else if (functionRef == ((void *)openbor_previous))
673     {
674         return "previous";
675     }
676     else if (functionRef == ((void *)openbor_key))
677     {
678         return "key";
679     }
680     else if (functionRef == ((void *)openbor_value))
681     {
682         return "value";
683     }
684     else if (functionRef == ((void *)openbor_islast))
685     {
686         return "islast";
687     }
688     else if (functionRef == ((void *)openbor_isfirst))
689     {
690         return "isfirst";
691     }
692     else if (functionRef == ((void *)openbor_allocscreen))
693     {
694         return "allocscreen";
695     }
696     else if (functionRef == ((void *)openbor_clearscreen))
697     {
698         return "clearscreen";
699     }
700     else if (functionRef == ((void *)openbor_setdrawmethod))
701     {
702         return "setdrawmethod";
703     }
704     else if (functionRef == ((void *)openbor_changedrawmethod))
705     {
706         return "changedrawmethod";
707     }
708     else if (functionRef == ((void *)openbor_getdrawmethod))
709     {
710         return "getdrawmethod";
711     }
712     else if (functionRef == ((void *)openbor_updateframe))
713     {
714         return "updateframe";
715     }
716     else if (functionRef == ((void *)openbor_performattack))
717     {
718         return "performattack";
719     }
720     else if (functionRef == ((void *)openbor_executeanimation))
721     {
722         return "executeanimation";
723     }
724     else if (functionRef == ((void *)openbor_setidle))
725     {
726         return "setidle";
727     }
728     else if (functionRef == ((void *)openbor_getentity))
729     {
730         return "getentity";
731     }
732     else if (functionRef == ((void *)openbor_hallfame))
733     {
734         return "hallfame";
735     }
736     else if (functionRef == ((void *)openbor_loadmodel))
737     {
738         return "loadmodel";
739     }
740 	else if (functionRef == ((void *)openbor_unload_model))
741     {
742         return "unload_model";
743     }
744     else if (functionRef == ((void *)openbor_loadsprite))
745     {
746         return "loadsprite";
747     }
748     else if (functionRef == ((void *)openbor_menu_options))
749     {
750         return "options";
751     }
752     else if (functionRef == ((void *)openbor_playwebm))
753     {
754         return "playwebm";
755     }
756     else if (functionRef == ((void *)openbor_playgif))
757     {
758         return "playgif";
759     }
760     else if (functionRef == ((void *)openbor_openanigif))
761     {
762         return "openanigif";
763     }
764     else if (functionRef == ((void *)openbor_decodeanigif))
765     {
766         return "decodeanigif";
767     }
768     else if (functionRef == ((void *)openbor_getanigifinfo))
769     {
770         return "getanigifinfo";
771     }
772     else if (functionRef == ((void *)openbor_strinfirst))
773     {
774         return "strinfirst";
775     }
776     else if (functionRef == ((void *)openbor_strinlast))
777     {
778         return "strinlast";
779     }
780     else if (functionRef == ((void *)openbor_strleft))
781     {
782         return "strleft";
783     }
784     else if (functionRef == ((void *)openbor_strlength))
785     {
786         return "strlength";
787     }
788     else if (functionRef == ((void *)openbor_strwidth))
789     {
790         return "strwidth";
791     }
792     else if (functionRef == ((void *)openbor_strright))
793     {
794         return "strright";
795     }
796     else if (functionRef == ((void *)openbor_getmodelproperty))
797     {
798         return "getmodelproperty";
799     }
800     else if (functionRef == ((void *)openbor_changemodelproperty))
801     {
802         return "changemodelproperty";
803     }
804     else if (functionRef == ((void *)openbor_rgbcolor))
805     {
806         return "rgbcolor";
807     }
808     else if (functionRef == ((void *)openbor_adjustwalkanimation))
809     {
810         return "adjustwalkanimation";
811     }
812     else if (functionRef == ((void *)openbor_finditem))
813     {
814         return "finditem";
815     }
816     else if (functionRef == ((void *)openbor_pickup))
817     {
818         return "pickup";
819     }
820     else if (functionRef == ((void *)openbor_waypoints))
821     {
822         return "waypoints";
823     }
824     else if (functionRef == ((void *)openbor_drawspriteq))
825     {
826         return "drawspriteq";
827     }
828     else if (functionRef == ((void *)openbor_clearspriteq))
829     {
830         return "clearspriteq";
831     }
832     else if (functionRef == ((void *)openbor_getgfxproperty))
833     {
834         return "getgfxproperty";
835     }
836     else if (functionRef == ((void *)openbor_allocscript))
837     {
838         return "allocscript";
839     }
840     else if (functionRef == ((void *)openbor_loadscript))
841     {
842         return "loadscript";
843     }
844     else if (functionRef == ((void *)openbor_compilescript))
845     {
846         return "compilescript";
847     }
848     else if (functionRef == ((void *)openbor_executescript))
849     {
850         return "executescript";
851     }
852     else if (functionRef == ((void *)openbor_loadgamefile))
853     {
854         return "loadgamefile";
855     }
856     else if (functionRef == ((void *)openbor_finishlevel))
857     {
858         return "finishlevel";
859     }
860     else if (functionRef == ((void *)openbor_gameover))
861     {
862         return "gameover";
863     }
864     else if (functionRef == ((void *)openbor_gotomainmenu))
865     {
866         return "gotomainmenu";
867     }
868     else if (functionRef == ((void *)openbor_playgame))
869     {
870         return "playgame";
871     }
872     else if (functionRef == ((void *)openbor_getrecordingstatus))
873     {
874         return "getrecordingstatus";
875     }
876     else if (functionRef == ((void *)openbor_recordinputs))
877     {
878         return "recordinputs";
879     }
880     else if (functionRef == ((void *)openbor_getsaveinfo))
881     {
882         return "getsaveinfo";
883     }
884     else
885     {
886         return "<unknown function>";
887     }
888 }
889 
890 //return string mapping function corresponding to a given function
Script_GetStringMapFunction(void * functionRef)891 void *Script_GetStringMapFunction(void *functionRef)
892 {
893     if (functionRef == ((void *)openbor_systemvariant))
894     {
895         return (void *)mapstrings_systemvariant;
896     }
897     else if (functionRef == ((void *)openbor_setsystemvariant))
898     {
899         return (void *)mapstrings_systemvariant;
900     }
901     else if (functionRef == ((void *)openbor_getentityproperty))
902     {
903         return (void *)mapstrings_entityproperty;
904     }
905     else if (functionRef == ((void *)openbor_changeentityproperty))
906     {
907         return (void *)mapstrings_entityproperty;
908     }
909     else if (functionRef == ((void *)openbor_get_entity_property))
910     {
911         return (void *)mapstrings_entity_property;
912     }
913     else if (functionRef == ((void *)openbor_set_entity_property))
914     {
915         return (void *)mapstrings_entity_property;
916     }
917     else if (functionRef == ((void *)openbor_getplayerproperty))
918     {
919         return (void *)mapstrings_playerproperty;
920     }
921     else if (functionRef == ((void *)openbor_changeplayerproperty))
922     {
923         return (void *)mapstrings_playerproperty;
924     }
925 	else if (functionRef == ((void *)openbor_get_recursive_damage_property))
926 	{
927 		return (void *)mapstrings_recursive_damage_property;
928 	}
929 	else if (functionRef == ((void *)openbor_set_recursive_damage_property))
930 	{
931 		return (void *)mapstrings_recursive_damage_property;
932 	}
933 
934     // Axis
935     else if (functionRef == ((void *)openbor_get_axis_plane_lateral_float_property))
936     {
937         return (void *)mapstrings_axis_plane_lateral_property;
938     }
939     else if (functionRef == ((void *)openbor_get_axis_plane_lateral_int_property))
940     {
941         return (void *)mapstrings_axis_plane_lateral_property;
942     }
943     else if (functionRef == ((void *)openbor_get_axis_plane_vertical_int_property))
944     {
945         return (void *)mapstrings_axis_plane_vertical_property;
946     }
947     else if (functionRef == ((void *)openbor_get_axis_principal_float_property))
948     {
949         return (void *)mapstrings_axis_principal_property;
950     }
951     else if (functionRef == ((void *)openbor_get_axis_principal_int_property))
952     {
953         return (void *)mapstrings_axis_principal_property;
954     }
955     else if (functionRef == ((void *)openbor_set_axis_plane_lateral_float_property))
956     {
957         return (void *)mapstrings_axis_plane_lateral_property;
958     }
959     else if (functionRef == ((void *)openbor_set_axis_plane_lateral_int_property))
960     {
961         return (void *)mapstrings_axis_plane_lateral_property;
962     }
963     else if (functionRef == ((void *)openbor_set_axis_plane_vertical_int_property))
964     {
965         return (void *)mapstrings_axis_plane_vertical_property;
966     }
967     else if (functionRef == ((void *)openbor_set_axis_principal_float_property))
968     {
969         return (void *)mapstrings_axis_principal_property;
970     }
971     else if (functionRef == ((void *)openbor_set_axis_principal_int_property))
972     {
973         return (void *)mapstrings_axis_principal_property;
974     }
975 
976     // Binding
977     else if (functionRef == ((void *)openbor_get_bind_property))
978     {
979         return (void *)mapstrings_bind_property;
980     }
981     else if (functionRef == ((void *)openbor_set_bind_property))
982     {
983         return (void *)mapstrings_bind_property;
984     }
985 
986 	// Drawmethod
987 	else if (functionRef == ((void *)openbor_get_drawmethod_property))
988 	{
989 		return (void *)mapstrings_drawmethod;
990 	}
991 	else if (functionRef == ((void *)openbor_set_drawmethod_property))
992 	{
993 		return (void *)mapstrings_drawmethod;
994 	}
995 
996     else if (functionRef == ((void *)openbor_setspawnentry))
997     {
998         return (void *)mapstrings_setspawnentry;
999     }
1000     else if (functionRef == ((void *)openbor_transconst))
1001     {
1002         return (void *)mapstrings_transconst;
1003     }
1004     else if (functionRef == ((void *)openbor_playerkeys))
1005     {
1006         return (void *)mapstrings_playerkeys;
1007     }
1008     else if (functionRef == ((void *)openbor_gettextobjproperty))
1009     {
1010         return (void *)mapstrings_textobjproperty;
1011     }
1012     else if (functionRef == ((void *)openbor_changetextobjproperty))
1013     {
1014         return (void *)mapstrings_textobjproperty;
1015     }
1016     else if (functionRef == ((void *)openbor_getlayerproperty))
1017     {
1018         return (void *)mapstrings_layerproperty;
1019     }
1020     else if (functionRef == ((void *)openbor_changelayerproperty))
1021     {
1022         return (void *)mapstrings_layerproperty;
1023     }
1024     else if (functionRef == ((void *)openbor_changedrawmethod))
1025     {
1026         return (void *)mapstrings_drawmethodproperty;
1027     }
1028     else if (functionRef == ((void *)openbor_getgfxproperty))
1029     {
1030         return (void *)mapstrings_gfxproperty;
1031     }
1032     else if (functionRef == ((void *)openbor_getlevelproperty))
1033     {
1034         return (void *)mapstrings_levelproperty;
1035     }
1036     else if (functionRef == ((void *)openbor_changelevelproperty))
1037     {
1038         return (void *)mapstrings_levelproperty;
1039     }
1040     else
1041     {
1042         return NULL;
1043     }
1044 }
1045 
1046 //used by Script_Global_Init
Script_LoadSystemFunctions()1047 void Script_LoadSystemFunctions()
1048 {
1049     //printf("Loading system script functions....");
1050     //load system functions if we need
1051     List_Reset(&theFunctionList);
1052 
1053     List_InsertAfter(&theFunctionList,
1054                      (void *)system_isempty, "isempty");
1055     List_InsertAfter(&theFunctionList,
1056                      (void *)system_exit, "exit");
1057     List_InsertAfter(&theFunctionList,
1058                      (void *)system_NULL, "NULL");
1059     List_InsertAfter(&theFunctionList,
1060                      (void *)system_rand, "rand");
1061     List_InsertAfter(&theFunctionList,
1062                      (void *)system_srand, "srand");
1063     List_InsertAfter(&theFunctionList,
1064                      (void *)system_getglobalvar, "getglobalvar");
1065     List_InsertAfter(&theFunctionList,
1066                      (void *)system_setglobalvar, "setglobalvar");
1067     List_InsertAfter(&theFunctionList,
1068                      (void *)system_getlocalvar, "getlocalvar");
1069     List_InsertAfter(&theFunctionList,
1070                      (void *)system_setlocalvar, "setlocalvar");
1071     List_InsertAfter(&theFunctionList,
1072                      (void *)system_clearglobalvar, "clearglobalvar");
1073     List_InsertAfter(&theFunctionList,
1074                      (void *)system_clearlocalvar, "clearlocalvar");
1075     List_InsertAfter(&theFunctionList,
1076                      (void *)system_free, "free");
1077     List_InsertAfter(&theFunctionList,
1078                      (void *)system_typeof, "typeof");
1079     List_InsertAfter(&theFunctionList,
1080                      (void *)math_sin, "sin");
1081     List_InsertAfter(&theFunctionList,
1082                      (void *)math_ssin, "ssin");
1083     List_InsertAfter(&theFunctionList,
1084                      (void *)math_cos, "cos");
1085     List_InsertAfter(&theFunctionList,
1086                      (void *)math_scos, "scos");
1087     List_InsertAfter(&theFunctionList,
1088                      (void *)math_sqrt, "sqrt");
1089     List_InsertAfter(&theFunctionList,
1090                      (void *)math_pow, "pow");
1091     List_InsertAfter(&theFunctionList,
1092                      (void *)math_asin, "asin");
1093     List_InsertAfter(&theFunctionList,
1094                      (void *)math_acos, "acos");
1095     List_InsertAfter(&theFunctionList,
1096                      (void *)math_atan, "atan");
1097     List_InsertAfter(&theFunctionList,
1098                      (void *)math_trunc, "trunc");
1099     List_InsertAfter(&theFunctionList,
1100                      (void *)math_round, "round");
1101     List_InsertAfter(&theFunctionList,
1102                      (void *)openbor_systemvariant, "openborvariant");
1103     List_InsertAfter(&theFunctionList,
1104                      (void *)openbor_setsystemvariant, "changeopenborvariant");
1105     List_InsertAfter(&theFunctionList,
1106                      (void *)openbor_setsystemvariant, "setopenborvariant");
1107     List_InsertAfter(&theFunctionList,
1108                      (void *)openbor_drawstring, "drawstring");
1109     List_InsertAfter(&theFunctionList,
1110                      (void *)openbor_drawstringtoscreen, "drawstringtoscreen");
1111     List_InsertAfter(&theFunctionList,
1112                      (void *)openbor_log, "log");
1113     List_InsertAfter(&theFunctionList,
1114                      (void *)openbor_drawbox, "drawbox");
1115     List_InsertAfter(&theFunctionList,
1116                      (void *)openbor_drawboxtoscreen, "drawboxtoscreen");
1117     List_InsertAfter(&theFunctionList,
1118                      (void *)openbor_drawline, "drawline");
1119     List_InsertAfter(&theFunctionList,
1120                      (void *)openbor_drawlinetoscreen, "drawlinetoscreen");
1121     List_InsertAfter(&theFunctionList,
1122                      (void *)openbor_drawsprite, "drawsprite");
1123     List_InsertAfter(&theFunctionList,
1124                      (void *)openbor_drawspritetoscreen, "drawspritetoscreen");
1125     List_InsertAfter(&theFunctionList,
1126                      (void *)openbor_drawdot, "drawdot");
1127     List_InsertAfter(&theFunctionList,
1128                      (void *)openbor_drawdottoscreen, "drawdottoscreen");
1129     List_InsertAfter(&theFunctionList,
1130                      (void *)openbor_drawscreen, "drawscreen");
1131     List_InsertAfter(&theFunctionList,
1132                      (void *)openbor_changeplayerproperty, "changeplayerproperty");
1133 
1134 
1135     // Axis
1136     List_InsertAfter(&theFunctionList,
1137                      (void *)openbor_get_axis_plane_lateral_float_property, "get_axis_plane_lateral_float_property");
1138     List_InsertAfter(&theFunctionList,
1139                      (void *)openbor_get_axis_plane_lateral_int_property, "get_axis_plane_lateral_int_property");
1140     List_InsertAfter(&theFunctionList,
1141                      (void *)openbor_get_axis_plane_vertical_int_property, "get_axis_plane_vertical_int_property");
1142     List_InsertAfter(&theFunctionList,
1143                      (void *)openbor_get_axis_principal_float_property, "get_axis_principal_float_property");
1144     List_InsertAfter(&theFunctionList,
1145                      (void *)openbor_get_axis_principal_int_property, "get_axis_principal_int_property");
1146     List_InsertAfter(&theFunctionList,
1147                      (void *)openbor_set_axis_plane_lateral_float_property, "set_axis_plane_lateral_float_property");
1148     List_InsertAfter(&theFunctionList,
1149                      (void *)openbor_set_axis_plane_lateral_int_property, "set_axis_plane_lateral_int_property");
1150     List_InsertAfter(&theFunctionList,
1151                      (void *)openbor_set_axis_plane_vertical_int_property, "set_axis_plane_vertical_int_property");
1152     List_InsertAfter(&theFunctionList,
1153                      (void *)openbor_set_axis_principal_float_property, "set_axis_principal_float_property");
1154     List_InsertAfter(&theFunctionList,
1155                      (void *)openbor_set_axis_principal_int_property, "set_axis_principal_int_property");
1156 
1157     // Binding
1158     List_InsertAfter(&theFunctionList,
1159                      (void *)openbor_get_bind_property, "get_bind_property");
1160     List_InsertAfter(&theFunctionList,
1161                      (void *)openbor_set_bind_property, "set_bind_property");
1162 	List_InsertAfter(&theFunctionList,
1163 					(void *)openbor_update_bind, "update_bind");
1164 
1165 	// Drawmethod
1166 	List_InsertAfter(&theFunctionList,
1167 		(void *)openbor_allocate_drawmethod, "allocate_drawmethod");
1168 	List_InsertAfter(&theFunctionList,
1169 		(void *)openbor_copy_drawmethod, "copy_drawmethod");
1170 	List_InsertAfter(&theFunctionList,
1171 		(void *)openbor_free_drawmethod, "free_drawmethod");
1172 	List_InsertAfter(&theFunctionList,
1173 		(void *)openbor_get_drawmethod_property, "get_drawmethod_property");
1174 	List_InsertAfter(&theFunctionList,
1175 		(void *)openbor_set_drawmethod_property, "set_drawmethod_property");
1176 
1177     List_InsertAfter(&theFunctionList,
1178                      (void *)openbor_getplayerproperty, "getplayerproperty");
1179     List_InsertAfter(&theFunctionList,
1180                      (void *)openbor_get_animation_property, "get_animation_property");
1181     List_InsertAfter(&theFunctionList,
1182                      (void *)openbor_set_animation_property, "set_animation_property");
1183 
1184     // Attack properties
1185     List_InsertAfter(&theFunctionList,
1186                      (void *)openbor_get_attack_collection, "get_attack_collection");
1187     List_InsertAfter(&theFunctionList,
1188                      (void *)openbor_get_attack_instance, "get_attack_instance");
1189     List_InsertAfter(&theFunctionList,
1190                      (void *)openbor_get_attack_property, "get_attack_property");
1191     List_InsertAfter(&theFunctionList,
1192                      (void *)openbor_set_attack_property, "set_attack_property");
1193 
1194 	// Recursive damage properties.
1195 	List_InsertAfter(&theFunctionList,
1196 		(void *)openbor_get_recursive_damage_property, "get_recursive_damage_property");
1197 	List_InsertAfter(&theFunctionList,
1198 		(void *)openbor_set_recursive_damage_property, "set_recursive_damage_property");
1199 
1200     // Body collision (bbox) properties.
1201     List_InsertAfter(&theFunctionList,
1202                      (void *)openbor_get_body_collision_collection, "get_body_collision_collection");
1203     List_InsertAfter(&theFunctionList,
1204                      (void *)openbor_get_body_collision_instance, "get_body_collision_instance");
1205     List_InsertAfter(&theFunctionList,
1206                      (void *)openbor_get_body_collision_property, "get_body_collision_property");
1207     List_InsertAfter(&theFunctionList,
1208                      (void *)openbor_set_body_collision_property, "set_body_collision_property");
1209 
1210     // Entity collision (ebox) properties.
1211     List_InsertAfter(&theFunctionList,
1212                      (void *)openbor_get_entity_collision_collection, "get_entity_collision_collection");
1213     List_InsertAfter(&theFunctionList,
1214                      (void *)openbor_get_entity_collision_instance, "get_entity_collision_instance");
1215     List_InsertAfter(&theFunctionList,
1216                      (void *)openbor_get_entity_collision_property, "get_entity_collision_property");
1217     List_InsertAfter(&theFunctionList,
1218                      (void *)openbor_set_entity_collision_property, "set_entity_collision_property");
1219 
1220     // Entity properties.
1221     List_InsertAfter(&theFunctionList,
1222                      (void *)openbor_get_entity_property, "get_entity_property");
1223     List_InsertAfter(&theFunctionList,
1224                      (void *)openbor_set_entity_property, "set_entity_property");
1225 
1226     List_InsertAfter(&theFunctionList,
1227                      (void *)openbor_changeentityproperty, "changeentityproperty");
1228     List_InsertAfter(&theFunctionList,
1229                      (void *)openbor_getentityproperty, "getentityproperty");
1230     List_InsertAfter(&theFunctionList,
1231                      (void *)openbor_tossentity, "tossentity");
1232     List_InsertAfter(&theFunctionList,
1233                      (void *)openbor_clearspawnentry, "clearspawnentry");
1234     List_InsertAfter(&theFunctionList,
1235                      (void *)openbor_setspawnentry, "setspawnentry");
1236     List_InsertAfter(&theFunctionList,
1237                      (void *)openbor_spawn, "spawn");
1238     List_InsertAfter(&theFunctionList,
1239                      (void *)openbor_projectile, "projectile");
1240     List_InsertAfter(&theFunctionList,
1241                      (void *)openbor_transconst, "openborconstant");
1242     List_InsertAfter(&theFunctionList,
1243                      (void *)openbor_playmusic, "playmusic");
1244     List_InsertAfter(&theFunctionList,
1245                      (void *)openbor_fademusic, "fademusic");
1246     List_InsertAfter(&theFunctionList,
1247                      (void *)openbor_setmusicvolume, "setmusicvolume");
1248     List_InsertAfter(&theFunctionList,
1249                      (void *)openbor_setmusictempo, "setmusictempo");
1250     List_InsertAfter(&theFunctionList,
1251                      (void *)openbor_pausemusic, "pausemusic");
1252     List_InsertAfter(&theFunctionList,
1253                      (void *)openbor_pausesamples, "pausesamples");
1254     List_InsertAfter(&theFunctionList,
1255                      (void *)openbor_pausesample, "pausesample");
1256     List_InsertAfter(&theFunctionList,
1257                      (void *)openbor_querychannel, "querychannel");
1258     List_InsertAfter(&theFunctionList,
1259                      (void *)openbor_stopchannel, "stopchannel");
1260     List_InsertAfter(&theFunctionList,
1261                      (void *)openbor_isactivesample, "isactivesample");
1262     List_InsertAfter(&theFunctionList,
1263                      (void *)openbor_sampleid, "sampleid");
1264     List_InsertAfter(&theFunctionList,
1265                      (void *)openbor_playsample, "playsample");
1266     List_InsertAfter(&theFunctionList,
1267                      (void *)openbor_loadsample, "loadsample");
1268     List_InsertAfter(&theFunctionList,
1269                      (void *)openbor_unloadsample, "unloadsample");
1270     List_InsertAfter(&theFunctionList,
1271                      (void *)openbor_fadeout, "fadeout");
1272     List_InsertAfter(&theFunctionList,
1273                      (void *)openbor_playerkeys, "playerkeys");
1274     List_InsertAfter(&theFunctionList,
1275                      (void *)openbor_changepalette, "changepalette");
1276     List_InsertAfter(&theFunctionList,
1277                      (void *)openbor_damageentity, "damageentity");
1278     List_InsertAfter(&theFunctionList,
1279                      (void *)openbor_getcomputeddamage, "getcomputeddamage");
1280     List_InsertAfter(&theFunctionList,
1281                      (void *)openbor_killentity, "killentity");
1282     List_InsertAfter(&theFunctionList,
1283                      (void *)openbor_dograb, "dograb");
1284     List_InsertAfter(&theFunctionList,
1285                      (void *)openbor_findtarget, "findtarget");
1286     List_InsertAfter(&theFunctionList,
1287                      (void *)openbor_checkrange, "checkrange");
1288     List_InsertAfter(&theFunctionList,
1289                      (void *)openbor_gettextobjproperty, "gettextobjproperty");
1290     List_InsertAfter(&theFunctionList,
1291                      (void *)openbor_changetextobjproperty, "changetextobjproperty");
1292     List_InsertAfter(&theFunctionList,
1293                      (void *)openbor_settextobj, "settextobj");
1294     List_InsertAfter(&theFunctionList,
1295                      (void *)openbor_cleartextobj, "cleartextobj");
1296     List_InsertAfter(&theFunctionList,
1297                      (void *)openbor_getlayerproperty, "getlayerproperty");
1298     List_InsertAfter(&theFunctionList,
1299                      (void *)openbor_changelayerproperty, "changelayerproperty");
1300 
1301     // 2017-04-25, DC
1302     List_InsertAfter(&theFunctionList,
1303                      (void *)openbor_get_level_property, "get_level_property");
1304     List_InsertAfter(&theFunctionList,
1305                      (void *)openbor_set_level_property, "set_level_property");
1306     List_InsertAfter(&theFunctionList,
1307                      (void *)openbor_get_set_property, "get_set_property");
1308     List_InsertAfter(&theFunctionList,
1309                      (void *)openbor_set_set_property, "set_set_property");
1310     List_InsertAfter(&theFunctionList,
1311                      (void *)openbor_get_set_handle, "get_set_handle");
1312 
1313     // 2017-04-27, DC, Layers
1314     List_InsertAfter(&theFunctionList,
1315                      (void *)openbor_get_layer_handle, "get_layer_handle");
1316 
1317     List_InsertAfter(&theFunctionList,
1318                      (void *)openbor_getlevelproperty, "getlevelproperty");
1319     List_InsertAfter(&theFunctionList,
1320                      (void *)openbor_changelevelproperty, "changelevelproperty");
1321     List_InsertAfter(&theFunctionList,
1322                      (void *)openbor_checkhole, "checkhole");
1323     List_InsertAfter(&theFunctionList,
1324                      (void *)openbor_checkholeindex, "checkholeindex");
1325     List_InsertAfter(&theFunctionList,
1326                      (void *)openbor_checkwall, "checkwall");
1327     List_InsertAfter(&theFunctionList,
1328                      (void *)openbor_checkholeindex, "checkwallindex");
1329     List_InsertAfter(&theFunctionList,
1330                      (void *)openbor_checkplatformbelow, "checkplatformbelow");
1331     List_InsertAfter(&theFunctionList,
1332                      (void *)openbor_checkplatformabove, "checkplatformabove");
1333     List_InsertAfter(&theFunctionList,
1334                      (void *)openbor_checkplatformbetween, "checkplatformbetween");
1335     List_InsertAfter(&theFunctionList,
1336                      (void *)openbor_checkbasemap, "checkbasemap");
1337     List_InsertAfter(&theFunctionList,
1338                      (void *)openbor_checkbasemapindex, "checkbasemapindex");
1339     List_InsertAfter(&theFunctionList,
1340                      (void *)openbor_checkbase, "checkbase");
1341     List_InsertAfter(&theFunctionList,
1342                      (void *)openbor_generatebasemap, "generatebasemap");
1343     List_InsertAfter(&theFunctionList,
1344                      (void *)openbor_openfilestream, "openfilestream");
1345     List_InsertAfter(&theFunctionList,
1346                      (void *)openbor_getfilestreamline, "getfilestreamline");
1347     List_InsertAfter(&theFunctionList,
1348                      (void *)openbor_getfilestreamargument, "getfilestreamargument");
1349     List_InsertAfter(&theFunctionList,
1350                      (void *)openbor_filestreamnextline, "filestreamnextline");
1351     List_InsertAfter(&theFunctionList,
1352                      (void *)openbor_getfilestreamposition, "getfilestreamposition");
1353     List_InsertAfter(&theFunctionList,
1354                      (void *)openbor_setfilestreamposition, "setfilestreamposition");
1355     List_InsertAfter(&theFunctionList,
1356                      (void *)openbor_filestreamappend, "filestreamappend");
1357     List_InsertAfter(&theFunctionList,
1358                      (void *)openbor_createfilestream, "createfilestream");
1359     List_InsertAfter(&theFunctionList,
1360                      (void *)openbor_closefilestream, "closefilestream");
1361     List_InsertAfter(&theFunctionList,
1362                      (void *)openbor_savefilestream, "savefilestream");
1363     List_InsertAfter(&theFunctionList,
1364                      (void *)openbor_getindexedvar, "getindexedvar");
1365     List_InsertAfter(&theFunctionList,
1366                      (void *)openbor_setindexedvar, "setindexedvar");
1367     List_InsertAfter(&theFunctionList,
1368                      (void *)openbor_getscriptvar, "getscriptvar");
1369     List_InsertAfter(&theFunctionList,
1370                      (void *)openbor_setscriptvar, "setscriptvar");
1371     List_InsertAfter(&theFunctionList,
1372                      (void *)openbor_getentityvar, "getentityvar");
1373     List_InsertAfter(&theFunctionList,
1374                      (void *)openbor_setentityvar, "setentityvar");
1375     List_InsertAfter(&theFunctionList,
1376                      (void *)openbor_shutdown, "shutdown");
1377     List_InsertAfter(&theFunctionList,
1378                      (void *)openbor_jumptobranch, "jumptobranch");
1379     List_InsertAfter(&theFunctionList,
1380                      (void *)openbor_changelight, "changelight");
1381     List_InsertAfter(&theFunctionList,
1382                      (void *)openbor_changeshadowcolor, "changeshadowcolor");
1383     List_InsertAfter(&theFunctionList,
1384                      (void *)openbor_bindentity, "bindentity");
1385     List_InsertAfter(&theFunctionList,
1386                      (void *)openbor_array, "array");
1387     List_InsertAfter(&theFunctionList,
1388                      (void *)openbor_size, "size");
1389     List_InsertAfter(&theFunctionList,
1390                      (void *)openbor_get, "get");
1391     List_InsertAfter(&theFunctionList,
1392                      (void *)openbor_set, "set");
1393     List_InsertAfter(&theFunctionList,
1394                      (void *)openbor_delete, "delete");
1395     List_InsertAfter(&theFunctionList,
1396                      (void *)openbor_add, "add");
1397     List_InsertAfter(&theFunctionList,
1398                      (void *)openbor_reset, "reset");
1399     List_InsertAfter(&theFunctionList,
1400                      (void *)openbor_next, "next");
1401     List_InsertAfter(&theFunctionList,
1402                      (void *)openbor_previous, "previous");
1403     List_InsertAfter(&theFunctionList,
1404                      (void *)openbor_key, "key");
1405     List_InsertAfter(&theFunctionList,
1406                      (void *)openbor_value, "value");
1407     List_InsertAfter(&theFunctionList,
1408                      (void *)openbor_islast, "islast");
1409     List_InsertAfter(&theFunctionList,
1410                      (void *)openbor_isfirst, "isfirst");
1411     List_InsertAfter(&theFunctionList,
1412                      (void *)openbor_allocscreen, "allocscreen");
1413     List_InsertAfter(&theFunctionList,
1414                      (void *)openbor_clearscreen, "clearscreen");
1415     List_InsertAfter(&theFunctionList,
1416                      (void *)openbor_setdrawmethod, "setdrawmethod");
1417     List_InsertAfter(&theFunctionList,
1418                      (void *)openbor_changedrawmethod, "changedrawmethod");
1419     List_InsertAfter(&theFunctionList,
1420                      (void *)openbor_getdrawmethod, "getdrawmethod");
1421     List_InsertAfter(&theFunctionList,
1422                      (void *)openbor_updateframe, "updateframe");
1423     List_InsertAfter(&theFunctionList,
1424                      (void *)openbor_performattack, "performattack");
1425     List_InsertAfter(&theFunctionList,
1426                      (void *)openbor_executeanimation, "executeanimation");
1427     List_InsertAfter(&theFunctionList,
1428                      (void *)openbor_setidle, "setidle");
1429     List_InsertAfter(&theFunctionList,
1430                      (void *)openbor_getentity, "getentity");
1431     List_InsertAfter(&theFunctionList,
1432                      (void *)openbor_loadmodel, "loadmodel");
1433 	List_InsertAfter(&theFunctionList,
1434                      (void *)openbor_unload_model, "unload_model");
1435     List_InsertAfter(&theFunctionList,
1436                      (void *)openbor_loadsprite, "loadsprite");
1437     List_InsertAfter(&theFunctionList,
1438                      (void *)openbor_hallfame, "hallfame");
1439     List_InsertAfter(&theFunctionList,
1440                      (void *)openbor_menu_options, "options");
1441     List_InsertAfter(&theFunctionList,
1442                      (void *)openbor_playwebm, "playwebm");
1443     List_InsertAfter(&theFunctionList,
1444                      (void *)openbor_playgif, "playgif");
1445     List_InsertAfter(&theFunctionList,
1446                      (void *)openbor_openanigif, "openanigif");
1447     List_InsertAfter(&theFunctionList,
1448                      (void *)openbor_decodeanigif, "decodeanigif");
1449     List_InsertAfter(&theFunctionList,
1450                      (void *)openbor_getanigifinfo, "getanigifinfo");
1451     List_InsertAfter(&theFunctionList,
1452                      (void *)openbor_strinfirst, "strinfirst");
1453     List_InsertAfter(&theFunctionList,
1454                      (void *)openbor_strinlast, "strinlast");
1455     List_InsertAfter(&theFunctionList,
1456                      (void *)openbor_strleft, "strleft");
1457     List_InsertAfter(&theFunctionList,
1458                      (void *)openbor_strlength, "strlength");
1459     List_InsertAfter(&theFunctionList,
1460                      (void *)openbor_strwidth, "strwidth");
1461     List_InsertAfter(&theFunctionList,
1462                      (void *)openbor_strright, "strright");
1463     List_InsertAfter(&theFunctionList,
1464                      (void *)openbor_getmodelproperty, "getmodelproperty");
1465     List_InsertAfter(&theFunctionList,
1466                      (void *)openbor_changemodelproperty, "changemodelproperty");
1467     List_InsertAfter(&theFunctionList,
1468                      (void *)openbor_rgbcolor, "rgbcolor");
1469 
1470     List_InsertAfter(&theFunctionList,
1471                      (void *)openbor_adjustwalkanimation, "adjustwalkanimation");
1472     List_InsertAfter(&theFunctionList,
1473                      (void *)openbor_finditem, "finditem");
1474     List_InsertAfter(&theFunctionList,
1475                      (void *)openbor_pickup, "pickup");
1476     List_InsertAfter(&theFunctionList,
1477                      (void *)openbor_waypoints, "waypoints");
1478     List_InsertAfter(&theFunctionList,
1479                      (void *)openbor_drawspriteq, "drawspriteq");
1480     List_InsertAfter(&theFunctionList,
1481                      (void *)openbor_clearspriteq, "clearspriteq");
1482     List_InsertAfter(&theFunctionList,
1483                      (void *)openbor_getgfxproperty, "getgfxproperty");
1484     List_InsertAfter(&theFunctionList,
1485                      (void *)openbor_allocscript, "allocscript");
1486     List_InsertAfter(&theFunctionList,
1487                      (void *)openbor_loadscript, "loadscript");
1488     List_InsertAfter(&theFunctionList,
1489                      (void *)openbor_compilescript, "compilescript");
1490     List_InsertAfter(&theFunctionList,
1491                      (void *)openbor_executescript, "executescript");
1492     List_InsertAfter(&theFunctionList,
1493                      (void *)openbor_loadgamefile, "loadgamefile");
1494     List_InsertAfter(&theFunctionList,
1495                      (void *)openbor_finishlevel, "finishlevel");
1496     List_InsertAfter(&theFunctionList,
1497                      (void *)openbor_gameover, "gameover");
1498     List_InsertAfter(&theFunctionList,
1499                      (void *)openbor_gotomainmenu, "gotomainmenu");
1500     List_InsertAfter(&theFunctionList,
1501                      (void *)openbor_playgame, "playgame");
1502     List_InsertAfter(&theFunctionList,
1503                      (void *)openbor_getrecordingstatus, "getrecordingstatus");
1504     List_InsertAfter(&theFunctionList,
1505                      (void *)openbor_recordinputs, "recordinputs");
1506     List_InsertAfter(&theFunctionList,
1507                      (void *)openbor_getsaveinfo, "getsaveinfo");
1508 
1509     //printf("Done!\n");
1510 
1511 }
1512 
1513