1 #ifndef SCRIPT_API_H
2 #define SCRIPT_API_H
3
4 #include "flt.h"
5
6
7 #define SCRIPT_RUN_ENDED 0
8 #define SCRIPT_RUN_RUNNING 1
9 #define SCRIPT_RUN_ERROR -1
10
11 enum {
12 SCRIPT_SHOOT_HOOK_PRESHOOT=0,
13 SCRIPT_SHOOT_HOOK_SHOOT,
14 SCRIPT_SHOOT_HOOK_RAW,
15 SCRIPT_NUM_SHOOT_HOOKS,
16 };
17
18
19 #define SCRIPT_API_VERSION {3,0}
20
21
22 typedef struct
23 {
24 base_interface_t base;
25
26 int (*script_start)( char const* script, int is_ptp );
27 int (*script_start_file)( char const* filename );
28 int (*script_run)( void );
29 void (*script_reset)(void);
30 void (*set_variable)(char *name, int value, int isBool, int isTable, int labelCount, const char **labels);
31 void (*set_as_ret)(int as_ret);
32 int (*run_restore)( void );
33 void (*shoot_hook)(int hook);
34 } libscriptapi_sym;
35
36 extern libscriptapi_sym* libscriptapi;
37 extern void module_set_script_lang( const char* script_file );
38
39 #endif