-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdat.h
90 lines (81 loc) · 1.47 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
85
86
87
88
89
90
typedef struct Vertex Vertex;
typedef struct Graph Graph;
typedef struct Node Node;
typedef struct Layout Layout;
typedef struct Clk Clk;
typedef struct Thread Thread;
typedef struct Super Super;
#pragma incomplete Super
#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,
FNvisible = 1<<6,
};
struct Node{
uchar flags;
Vertex pos0; /* FIXME: very annoying to get rid of */
short nedges;
short nin;
ioff eoff;
};
extern Node *nodes;
extern ioff *edges;
extern Super *supers;
enum{
GFlayme = 1<<0,
GFdrawme = 1<<1,
GFarmed = 1<<2,
};
struct Graph{
int type;
uchar flags;
Layout *layout;
ioff nfirst;
vlong nnodes;
vlong nedges;
};
extern Graph *graphs; /* dynamic array */
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;
extern char logbuf[], lastmsg[3][64], iserrmsg[3];
extern int nlog, logsz;
extern int onscreen;