The Build Engine

- Main Page
- Classes
- Files

- File List
- File Members

engine.h
Go to the documentation of this file.
1 /*
2 * A list of all symbols exported from engine.c for a game's use.
3 *
4 * Put together by Ryan C. Gordon (icculus@clutteredmind.org)
5 *
6 * Please do NOT harrass Ken Silverman about any code modifications
7 * (including this file) to BUILD.
8 */
9
10 /*
11 * "Build Engine & Tools" Copyright (c) 1993-1997 Ken Silverman
12 * Ken Silverman's official web site: "http://www.advsys.net/ken"
13 * See the included license file "BUILDLIC.TXT" for license info.
14 * This file IS NOT A PART OF Ken Silverman's original release
15 */
16
23 #ifndef _INCLUDE_ENGINE_H_
24 #define _INCLUDE_ENGINE_H_
25
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29
30 #define SUPERBUILD /* don't touch this. */
31
32 /*
33 * this must be implemented by every program that uses the BUILD engine.
34 * engine.c calls this function in several places.
35 * See Ken's test game (in game.c), and his editor (in bstub.c) for examples.
36 */
37 void faketimerhandler(void);
38
39 /*
40 * exported engine functions, in absolutely no particular order.
41 * See build.txt, build2.txt...and anything else with a .txt extention for
42 * information on using these functions that may or may not be accurate. :)
43 */
44 int initmouse(void);
45
64 int setgamemode(char davidoption, long daxdim, long daydim);
65
74 int getceilzofslope(short sectnum, long dax, long day);
75
84 int getflorzofslope(short sectnum, long dax, long day);
85
96 void getzsofslope(short sectnum, long dax, long day, long *ceilz, long *florz);
97
129 void setaspect(long daxrange, long daaspect);
130
138 int insertsprite(short sectnum, short statnum);
139
155 void updatesector(long x, long y, short *sectnum);
156
163 int lastwall(short point);
164
170 void initspritelists(void);
171
177 int deletesprite(short spritenum);
178 int insertspritesect(short sectnum);
179 int deletespritesect(short deleteme);
180 int deletespritestat (short deleteme);
181 int insertspritestat(short statnum);
182 int changespritesect(short spritenum, short newsectnum);
183 int changespritestat(short spritenum, short newstatnum);
192 void loadtile(short tilenume);
193 void setmmxoverlay(int isenabled);
194 int getmmxoverlay(void);
195
203 void nextpage(void);
204
217 void drawrooms(long daposx, long daposy, long daposz,
218 short daang, long dahoriz, short dacursectnum);
219
233 int loadboard(char *filename, long *daposx, long *daposy,
234 long *daposz, short *daang, short *dacursectnum);
235
253 void drawmasks(void);
254
266 void printext256(long xpos, long ypos, short col, short backcol,
267 char name[82], char fontsize);
268
290 void printext256_noupdate(long xpos, long ypos, short col, short backcol,
291 char name[82], char fontsize);
292
298 void initengine(void);
299
305 void uninitengine(void);
306
316 int loadpics(char *filename);
317
330 int saveboard(char *filename, long *daposx, long *daposy, long *daposz,
331 short *daang, short *dacursectnum);
332
343 void plotpixel(long x, long y, char col);
344
355 unsigned char getpixel(long x, long y);
356
364 void setbrightness(char dabrightness, unsigned char *dapal);
365
379 int screencapture(char *filename, char inverseit);
380
393 void getmousevalues(short *mousx, short *mousy, short *bstatus);
394
424 int clipmove (long *x, long *y, long *z, short *sectnum, long xvect,
425 long yvect, long walldist, long ceildist,
426 long flordist, unsigned long cliptype);
427
447 void getzrange(long x, long y, long z, short sectnum,
448 long *ceilz, long *ceilhit, long *florz, long *florhit,
449 long walldist, unsigned long cliptype);
450
459 int getangle(long xvect, long yvect);
460
473 void alignceilslope(short dasect, long x, long y, long z);
474
488 void alignflorslope(short dasect, long x, long y, long z);
489
530 int hitscan(long xs, long ys, long zs, short sectnum,
531 long vx, long vy, long vz,
532 short *hitsect, short *hitwall, short *hitsprite,
533 long *hitx, long *hity, long *hitz, unsigned long cliptype);
534
542 int inside (long x, long y, short sectnum);
543
552 void setfirstwall(short sectnum, short newfirstwall);
553
567 void rotatepoint(long xpivot, long ypivot, long x, long y, short daang,
568 long *x2, long *y2);
569
577 int drawtilescreen(long pictopleft, long picbox);
578
584 void clearview(long dacol);
585
591 void clearallviews(long dacol);
592
606 void draw2dgrid(long posxe, long posye, short ange, long zoome,
607 short gride);
608
616 void draw2dscreen(long posxe, long posye, short ange, long zoome,
617 short gride);
618
625 int sectorofwall(short theline);
626
636 int setsprite(short spritenum, long newx, long newy, long newz);
637
651 void dragpoint(short pointhighlight, long dax, long day);
652
660 int ksqrt(long num);
661
671 int loopnumofsector(short sectnum, short wallnum);
672
686 int cansee(long x1, long y1, long z1, short sect1,
687 long x2, long y2, long z2, short sect2);
688 int lintersect(long x1, long y1, long z1, long x2, long y2, long z2,
689 long x3, long y3, long x4, long y4, long *intx,
690 long *inty, long *intz);
691 int rintersect(long x1, long y1, long z1, long vx, long vy, long vz,
692 long x3, long y3, long x4, long y4, long *intx,
693 long *inty, long *intz);
694
706 int allocatepermanenttile(short tilenume, long xsiz, long ysiz);
707
717 void drawline256 (long x1, long y1, long x2, long y2, unsigned char col);
718
737 void copytilepiece(long tilenume1, long sx1, long sy1, long xsiz, long ysiz,
738 long tilenume2, long sx2, long sy2);
739
753 int nextsectorneighborz(short sectnum, long thez,
754 short topbottom, short direction);
755
777 int neartag(long xs, long ys, long zs, short sectnum, short ange,
778 short *neartagsector, short *neartagwall, short *neartagsprite,
779 long *neartaghitdist, long neartagrange, char tagsearch);
780
800 int pushmove(long *x, long *y, long *z, short *sectnum,
801 long walldist, long ceildist, long flordist,
802 unsigned long cliptype);
803
809 int krand(void);
810 void flushperms(void);
811
863 void rotatesprite(long sx, long sy, long z, short a, short picnum,
864 signed char dashade, char dapalnum, char dastat,
865 long cx1, long cy1, long cx2, long cy2);
887 void makepalookup(long palnum, char *remapbuf, signed char r,
888 signed char g, signed char b, char dastat);
889
898 void drawmapview(long dax, long day, long zoome, short ang);
899
910 void setview(long x1, long y1, long x2, long y2);
911
923 void setviewtotile(short tilenume, long xsiz, long ysiz);
924
929 void setviewback(void);
930
937 void squarerotatetile(short tilenume);
938 void preparemirror(long dax, long day, long daz,
939 short daang, long dahoriz, short dawall,
940 short dasector, long *tposx, long *tposy,
941 short *tang);
942 void completemirror(void);
943
954 int clipinsidebox(long x, long y, short wallnum, long walldist);
955
956 #ifdef SUPERBUILD
957
986 void qloadkvx(long voxindex, char *filename);
987 #endif
988
989 #ifdef __cplusplus
990 }
991 #endif
992
993 #endif /* !defined _INCLUDE_ENGINE_H_ */
994
995 /* end of engine.h ... */
996
997
998