1 /* bzflag
2  * Copyright (c) 1993-2021 Tim Riker
3  *
4  * This package is free software;  you can redistribute it and/or
5  * modify it under the terms of the license found in the file
6  * named COPYING that should have accompanied this file.
7  *
8  * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
9  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
10  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
11  */
12 
13 #ifndef __CUSTOM_BOX_H__
14 #define __CUSTOM_BOX_H__
15 
16 /* interface header */
17 #include "WorldFileObstacle.h"
18 
19 /* local interface headers */
20 #include "WorldInfo.h"
21 
22 /* common interface headers */
23 #include "BzMaterial.h"
24 
25 
26 class CustomBox : public WorldFileObstacle
27 {
28 public:
29     CustomBox();
30     ~CustomBox();
31     virtual bool read(const char* cmd, std::istream& input);
32     virtual void writeToGroupDef(GroupDefinition*) const;
33 
34 private:
35     enum
36     {
37         XP = 0,
38         XN,
39         YP,
40         YN,
41         ZP,
42         ZN,
43         FaceCount
44     };
45 
46     bool isOldBox;
47 
48     int phydrv[FaceCount];
49     float texsize[FaceCount][2];
50     float texoffset[FaceCount][2];
51     bool drivethrough[FaceCount];
52     bool shootthrough[FaceCount];
53     bool ricochets[FaceCount];
54     BzMaterial materials[FaceCount];
55 
56     static const char* faceNames[FaceCount];
57 };
58 
59 
60 #endif  /* __CUSTOM_BOX_H__ */
61 
62 // Local variables: ***
63 // mode: C++ ***
64 // tab-width: 4***
65 // c-basic-offset: 4 ***
66 // indent-tabs-mode: nil ***
67 // End: ***
68 // ex: shiftwidth=4 tabstop=4
69