2 Copyright (C) 1998 BJ Eirich (aka vecna)
\r
3 This program is free software; you can redistribute it and/or
\r
4 modify it under the terms of the GNU General Public License
\r
5 as published by the Free Software Foundation; either version 2
\r
6 of the License, or (at your option) any later version.
\r
7 This program is distributed in the hope that it will be useful,
\r
8 but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
\r
10 See the GNU General Public Lic
\r
11 See the GNU General Public License for more details.
\r
12 You should have received a copy of the GNU General Public License
\r
13 along with this program; if not, write to the Free Software
\r
14 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
\r
22 int x, y; // xwc, ywx position
\r
23 word tx, ty; // xtc, ytc position
\r
24 byte facing; // direction entity is facing
\r
25 byte moving, movecnt; // direction entity is moving
\r
26 byte frame; // bottom-line frame to display
\r
27 byte specframe; // special-frame set thingo
\r
28 byte chrindex, reset; // CHR index | Reset animation
\r
29 byte obsmode1, obsmode2; // can be obstructed | Is an obstruction
\r
30 byte speed, speedct; // entity speed, speedcount :)
\r
31 byte delayct; // animation frame-delay
\r
32 char *animofs, *scriptofs; // anim script | move script
\r
33 byte face, actm; // auto-face | activation mode
\r
34 byte movecode, movescript; // movement type | movement script
\r
35 byte ctr, mode; // sub-tile move ctr, mode flag (internal)
\r
36 word step, delay; // step, delay
\r
37 word stepctr, delayctr; // internal use counters
\r
38 word data1, data2, data3; //
\r
39 word data4, data5, data6; //
\r
40 int actscript; // activation script
\r
41 int expand1, expand2; //
\r
42 int expand3, expand4; //
\r
43 char desc[20]; // Entity description.
\r
53 byte *imagedata; // CHR frame data
\r
54 int fxsize, fysize; // frame x/y dimensions
\r
55 int hx, hy; // x/y obstruction hotspot
\r
56 int totalframes; // total # of frames.
\r
65 extern chrlist_r chrlist[100];
\r
66 extern byte nmchr, playernum;
\r
67 extern entity_r *player;
\r
68 extern entity_r entity[256];
\r
69 extern chrdata chr[100];
\r
70 extern byte entities, numchrs;
\r
71 extern byte entidx[256], cc;
\r
73 void RenderEntities();
\r
74 void AnimateEntity(entity_r *p);
\r
75 void ProcessEntities();
\r
76 void SiftEntities();
\r
80 void ListActiveEnts();
\r
82 int EntityAt(int ex, int ey);
\r
83 int EntityObsAt(int ex, int ey);
\r
84 int ObstructionAt(int ex, int ey);
\r
85 int CacheCHR(char *fname);
\r
86 int AllocateEntity(int x1, int y1, char *fname);
\r