-
Notifications
You must be signed in to change notification settings - Fork 2
/
interfaceData.h
126 lines (123 loc) · 1.87 KB
/
interfaceData.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
#pragma once
#include <vector>
using namespace std;
struct rect_t
{
float h_pos;
float v_pos;
float h_size;
float v_size;
rect_t()
{
h_pos = 300;
v_pos = 100;
h_size = 100;
v_size = 40;
}
rect_t(float input_h_pos, float input_v_pos, float input_h_size, float input_v_size)
{
h_pos = input_h_pos;
v_pos = input_v_pos;
h_size = input_h_size;
v_size = input_v_size;
}
};
struct point_t
{
float h;
float v;
};
struct start_t
{
int id;
float v_start;
float h_start_pos = 140.0;
float v_start_pos;
float v_size;
};
struct link_endpoint_t
{
unsigned int id;
int index;
int type;
//types:
// 5 - pOut link (shortcut) (has the same id as the link target)
// 7 - pIn
// 8 - pOut
// 9 - pLocal
//10 - target pIn
//12 - bIn
//13 - bOut
//26 - "Start" bIn
};
struct link_t
{
int id;
int type;
link_endpoint_t start;
int point_count;
vector<point_t> points;
link_endpoint_t end;
};
struct op_t
{
int id;
float h_pos;
float v_pos;
};
struct comment_t
{
// Ignored
};
enum param_style_enum
{
param_style_name = 0x200,
param_style_closed = 0x400,
param_style_namevalue = 0x1000,
param_style_value = 0x2000
};
struct param_t
{
int id;
int h_pos;
int v_pos;
param_style_enum style = param_style_name;
int source_id;
};
struct bb_t
{
int id;
bool folded;
int depth;
rect_t size;
float h_expand_size;
float v_expand_size;
bool is_bg;
int n_links;
vector<link_t> links;
int n_ops;
vector<op_t> ops;
int n_comments;
vector<comment_t> comments;
int n_local_param;
vector<param_t> local_params;
int n_shared_param;
vector<param_t> shared_params;
int input_count;
vector<int> inward_inputs;
vector<int> outward_inputs;
int output_count;
vector<int> inward_outputs;
vector<int> outward_outputs;
};
struct interface_t
{
int class_id;
// int n_obj_fake;
start_t start;
bb_t script_root;
int n_bb;
vector<bb_t> bbs;
char *tail;
int tail_length;
};