1 //-------------------------------------------------------------------------
2 /*
3 Copyright (C) 2010-2019 EDuke32 developers and contributors
4 Copyright (C) 2019 sirlemonhead, Nuke.YKT
5 
6 This file is part of PCExhumed.
7 
8 PCExhumed is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License version 2
10 as published by the Free Software Foundation.
11 
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15 
16 See the GNU General Public License for more details.
17 
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
21 */
22 //-------------------------------------------------------------------------
23 
24 #ifndef __engine_h__
25 #define __engine_h__
26 
27 #include "compat.h"
28 #include "build.h"
29 #include "pragmas.h"
30 #include "typedefs.h"
31 #include "trigdat.h"
32 #include "osd.h"
33 
34 #define kMaxTiles	6144
35 #define kMaxSprites 4096
36 #define kMaxSectors 1024
37 #define kMaxWalls   8192
38 #define kMaxTiles   6144
39 #define kMaxVoxels	4096
40 
41 enum
42 {
43 	kStatIgnited = 404
44 };
45 
46 #define kMaxSpritesOnscreen		1024
47 
48 #define kMaxPalookups 256
49 #define kMaxStatus   1024
50 //#define MAXPSKYTILES 256
51 
52 typedef spritetype SPRITE;
53 typedef sectortype SECTOR;
54 typedef walltype WALL;
55 
56 
Sin(int angle)57 static inline int Sin(int angle)
58 {
59     return sintable[angle & kAngleMask];
60 }
61 
Cos(int angle)62 static inline int Cos(int angle)
63 {
64     return sintable[(angle + 512) & kAngleMask];
65 }
66 
67 int movesprite(short spritenum, int dx, int dy, int dz, int ceildist, int flordist, unsigned int clipmask);
68 void overwritesprite(int thex, int they, short tilenum, signed char shade, char stat, char dapalnum);
69 void precache();
70 void resettiming();
71 void printext(int x, int y, const char* buffer, short tilenum);
72 void kensetpalette(unsigned char *vgapal);
73 
74 #endif
75