-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdat.h
84 lines (75 loc) · 1.45 KB
/
dat.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
typedef struct Vertex Vertex;
typedef struct Graph Graph;
typedef struct Node Node;
typedef struct Layout Layout;
typedef struct Clk Clk;
typedef struct Thread Thread;
#pragma incomplete Layout
#pragma incomplete Thread
typedef s32int ioff;
struct Vertex{
float x;
float y;
float z;
};
enum{
FNfixedx = 1<<0,
FNfixedy = 1<<1,
FNfixedz = 1<<2,
FNfixed = FNfixedx | FNfixedy | FNfixedz,
FNinitx = 1<<3,
FNinity = 1<<4,
FNinitz = 1<<5,
FNinitpos = FNinitx | FNinity | FNinitz,
FNalias = 1<<6,
};
struct Node{
ioff id;
uchar flags;
Vertex pos0; /* FIXME: shouldn't be here, only query */
ioff eoff;
ioff nedges;
};
extern Node *nodes; /* visible only */
extern ioff *edges; /* visible only */
extern ioff *vedges; /* redge index to edge index */
enum{
GFlayme = 1<<0,
GFdrawme = 1<<1,
GFarmed = 1<<2,
};
struct Graph{
int flags;
Layout *layout;
};
extern Graph graph;
enum{
Debugdraw = 1<<0,
Debugrender = 1<<1,
Debuglayout = 1<<2,
Debugfs = 1<<3,
Debugcoarse = 1<<4,
Debugextmem = 1<<5,
Debugcmd = 1<<6,
Debugperf = 1<<7,
Debugmeta = 1<<8,
Debugawk = 1<<9,
Debugload = 1<<10,
Debuggraph = 1<<11,
Debuginfo = 1<<12,
Debugstrawk = 1<<13,
Debugtheworld = 0xffffffff,
PerfΔt = 1000000,
};
struct Clk{
char lab[32];
vlong t;
vlong t0;
double s;
vlong n;
};
extern int debug;
extern int gottagofast; /* FIXME: state flag */
extern char logbuf[], lastmsg[3][64], iserrmsg[3];
extern int nlog, logsz;
extern int onscreen; /* FIXME: state flag */