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
|
// rendergl
extern void gl_init(int w, int h);
extern void cleangl();
extern void gl_drawframe(int w, int h, float curfps);
extern bool installtex(int tnum, OFIRI *IRI, int *xs, int *ys, bool clamp);
extern void mipstats(int a, int b, int c);
extern void vertf(float v1, float v2, float v3, sqr *ls, float t1, float t2);
extern void addstrip(int tex, int start, int n);
extern int lookuptexture(int tex, int *xs, int *ys);
// rendercubes
extern void resetcubes();
extern void render_flat(int tex, int x, int y, int size, int h, sqr *l1,
sqr *l2, sqr *l3, sqr *l4, bool isceil);
extern void render_flatdelta(int wtex, int x, int y, int size, float h1,
float h2, float h3, float h4, sqr *l1, sqr *l2, sqr *l3, sqr *l4,
bool isceil);
extern void render_square(int wtex, float floor1, float floor2, float ceil1,
float ceil2, int x1, int y1, int x2, int y2, int size, sqr *l1, sqr *l2,
bool topleft);
extern void render_tris(int x, int y, int size, bool topleft, sqr *h1, sqr *h2,
sqr *s, sqr *t, sqr *u, sqr *v);
extern void addwaterquad(int x, int y, int size);
extern int renderwater(float hf);
extern void finishstrips();
extern void setarraypointers();
// client
extern void localservertoclient(uchar *buf, int len);
|
|
>
|
|
|
|
|
|
|
|
|
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
|
// rendergl
extern void gl_init(int w, int h);
extern void cleangl();
extern void gl_drawframe(int w, int h, float curfps);
extern bool installtex(int tnum, OFIRI *IRI, int *xs, int *ys, bool clamp);
extern void mipstats(int a, int b, int c);
extern void vertf(
float v1, float v2, float v3, struct sqr *ls, float t1, float t2);
extern void addstrip(int tex, int start, int n);
extern int lookuptexture(int tex, int *xs, int *ys);
// rendercubes
extern void resetcubes();
extern void render_flat(int tex, int x, int y, int size, int h, struct sqr *l1,
struct sqr *l2, struct sqr *l3, struct sqr *l4, bool isceil);
extern void render_flatdelta(int wtex, int x, int y, int size, float h1,
float h2, float h3, float h4, struct sqr *l1, struct sqr *l2,
struct sqr *l3, struct sqr *l4, bool isceil);
extern void render_square(int wtex, float floor1, float floor2, float ceil1,
float ceil2, int x1, int y1, int x2, int y2, int size, struct sqr *l1,
struct sqr *l2, bool topleft);
extern void render_tris(int x, int y, int size, bool topleft, struct sqr *h1,
struct sqr *h2, struct sqr *s, struct sqr *t, struct sqr *u, struct sqr *v);
extern void addwaterquad(int x, int y, int size);
extern int renderwater(float hf);
extern void finishstrips();
extern void setarraypointers();
// client
extern void localservertoclient(uchar *buf, int len);
|
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
|
DynamicEntity *d, bool team, OFString *mdlname, bool hellpig, float scale);
void showscores(bool on);
extern void renderscores();
// world
extern void setupworld(int factor);
extern void empty_world(int factor, bool force);
extern void remip(const block *b, int level);
extern void remipmore(const block *b, int level);
extern int closestent();
extern int findentity(int type, int index);
extern void trigger(int tag, int type, bool savegame);
extern void resettagareas();
extern void settagareas();
extern Entity *newentity(
int x, int y, int z, OFString *what, int v1, int v2, int v3, int v4);
// worldlight
extern void calclight();
extern void dodynlight(const OFVector3D *vold, const OFVector3D *v, int reach,
int strength, DynamicEntity *owner);
extern void cleardlights();
extern block *blockcopy(const block *b);
extern void blockpaste(const block *b);
// worldrender
extern void render_world(float vx, float vy, float vh, int yaw, int pitch,
float widef, int w, int h);
// worldocull
extern void computeraytable(float vx, float vy);
|
|
|
|
|
|
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
|
DynamicEntity *d, bool team, OFString *mdlname, bool hellpig, float scale);
void showscores(bool on);
extern void renderscores();
// world
extern void setupworld(int factor);
extern void empty_world(int factor, bool force);
extern void remip(const struct block *b, int level);
extern void remipmore(const struct block *b, int level);
extern int closestent();
extern int findentity(int type, int index);
extern void trigger(int tag, int type, bool savegame);
extern void resettagareas();
extern void settagareas();
extern Entity *newentity(
int x, int y, int z, OFString *what, int v1, int v2, int v3, int v4);
// worldlight
extern void calclight();
extern void dodynlight(const OFVector3D *vold, const OFVector3D *v, int reach,
int strength, DynamicEntity *owner);
extern void cleardlights();
extern struct block *blockcopy(const struct block *b);
extern void blockpaste(const struct block *b);
// worldrender
extern void render_world(float vx, float vy, float vh, int yaw, int pitch,
float widef, int w, int h);
// worldocull
extern void computeraytable(float vx, float vy);
|
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
|
extern int text_width(OFString *string);
extern void draw_envbox(int t, int fogdist);
// editing
extern void cursorupdate();
extern void toggleedit();
extern void editdrag(bool isdown);
extern void setvdeltaxy(int delta, const block *sel);
extern void editequalisexy(bool isfloor, const block *sel);
extern void edittypexy(int type, const block *sel);
extern void edittexxy(int type, int t, const block *sel);
extern void editheightxy(bool isfloor, int amount, const block *sel);
extern bool noteditmode();
extern void pruneundos(int maxremain);
// renderextras
extern void line(int x1, int y1, float z1, int x2, int y2, float z2);
extern void box(const block *b, float z1, float z2, float z3, float z4);
extern void dot(int x, int y, float z);
extern void linestyle(float width, int r, int g, int b);
extern void newsphere(const OFVector3D *o, float max, int type);
extern void renderspheres(int time);
extern void gl_drawhud(
int w, int h, int curfps, int nquads, int curvert, bool underwater);
extern void readdepth(int w, int h);
|
|
|
|
|
|
|
|
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
|
extern int text_width(OFString *string);
extern void draw_envbox(int t, int fogdist);
// editing
extern void cursorupdate();
extern void toggleedit();
extern void editdrag(bool isdown);
extern void setvdeltaxy(int delta, const struct block *sel);
extern void editequalisexy(bool isfloor, const struct block *sel);
extern void edittypexy(int type, const struct block *sel);
extern void edittexxy(int type, int t, const struct block *sel);
extern void editheightxy(bool isfloor, int amount, const struct block *sel);
extern bool noteditmode();
extern void pruneundos(int maxremain);
// renderextras
extern void line(int x1, int y1, float z1, int x2, int y2, float z2);
extern void box(const struct block *b, float z1, float z2, float z3, float z4);
extern void dot(int x, int y, float z);
extern void linestyle(float width, int r, int g, int b);
extern void newsphere(const OFVector3D *o, float max, int type);
extern void renderspheres(int time);
extern void gl_drawhud(
int w, int h, int curfps, int nquads, int curvert, bool underwater);
extern void readdepth(int w, int h);
|