Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

linedefs.hpp

Go to the documentation of this file.
00001 // libdoomwad: manipulates Doom wad files.
00002 // Copyright (C) 2005  John Gaughan
00003 //
00004 // This library is free software; you can redistribute it and/or
00005 // modify it under the terms of the GNU Lesser General Public
00006 // License as published by the Free Software Foundation; either
00007 // version 2.1 of the License, or (at your option) any later version.
00008 //
00009 // This library is distributed in the hope that it will be useful,
00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012 // Lesser General Public License for more details.
00013 //
00014 // You should have received a copy of the GNU Lesser General Public
00015 // License along with this library; if not, write to the Free Software
00016 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00017 //
00018 // This library is distributed with the full text of the LGPL. Please see
00019 // the accompanying file named COPYING.
00020 // 
00021 // You may contact the author at john@johngaughan.net
00022 
00044 // C++ required.
00045 #if !defined __cplusplus
00046 #error C++ compiler required
00047 #endif
00048 
00049 // Include guard
00050 #if !defined LINEDEFS_H
00051 #define LINEDEFS_H
00052 
00053 // C++ headers
00054 #include <string>
00055 #include <vector>
00056 
00057 // Doom headers
00058 #include "global.hpp"
00059 #include "lump.hpp"
00060 #include "wadentry.hpp"
00061 
00062 namespace Doomwad
00063 {
00064 
00093   EXPORT class Linedef : public WadEntryElement
00094   {
00095     public:
00096 
00098     static const size_t LENGTH;
00099 
00101     static const uint16 IMPASSIBLE;
00102 
00104     static const uint16 BLOCK_MONSTER;
00105 
00107     static const uint16 TWOSIDED;
00108 
00110     static const uint16 UNPEG_UPPER;
00111 
00113     static const uint16 UNPEG_LOWER;
00114 
00116     static const uint16 SECRET;
00117 
00119     static const uint16 BLOCK_SOUND;
00120 
00122     static const uint16 INVISIBLE;
00123 
00125     static const uint16 ALWAYS_MAPPED;
00126 
00128     static const uint16 ACTION_PASSTHROUGH;
00129 
00131     static const uint16 NOSIDEDEF;
00132 
00134     uint16 start;
00135 
00137     uint16 end;
00138 
00140     uint16 flags;
00141 
00144     uint16 tag;
00145 
00147     uint16 sidedef1;
00148 
00150     uint16 sidedef2;
00151 
00153     uint16 type;
00154 
00155     Linedef (uint16 = 0xFFFF, uint16 = 0xFFFF, uint16 = IMPASSIBLE, uint16 = 0, uint16 = NOSIDEDEF, uint16 = NOSIDEDEF, uint16 = 0) throw ();
00156     virtual ~Linedef (void) throw ();
00157 
00158     virtual size_t getLength (void) const throw ();
00159     virtual bool write (Lump &lump, Lump::size_type i) const throw ();
00160     virtual bool read (const Lump &lump, Lump::size_type i) throw ();
00161     virtual std::string toString (void) const throw ();
00162   };
00163 
00182   EXPORT class HexenLinedef : public Linedef
00183   {
00184     public:
00185 
00187     static const size_t LENGTH;
00188 
00190     static const uint16 ACTIVE_MULTIPLE;
00191 
00193     static const uint16 ACTIVE_PLAYER;
00194 
00196     static const uint16 ACTIVE_MONSTER;
00197 
00199     static const uint16 ACTIVE_PROJECTILE_HIT;
00200 
00202     static const uint16 ACTIVE_PLAYER_BUMP;
00203 
00205     static const uint16 ACTIVE_PROJECTILE_PASSTHROUGH;
00206 
00208     static const uint16 ACTIVE_PLAYER_PASSTHROUGH;
00209 
00211     static const uint16 ACTIVE_PLAYER_MONSTERS;
00212 
00214     static const uint16 ZDOOM_UNKNOWN;
00215 
00217     static const uint16 BLOCKS_EVERYTHING;
00218 
00220     uint16 start;
00221 
00223     uint16 end;
00224 
00226     uint16 flags;
00227 
00229     uint16 sidedef1;
00230 
00232     uint16 sidedef2;
00233 
00235     uint8 type;
00236 
00238     int8 arg1;
00239 
00241     int8 arg2;
00242 
00244     int8 arg3;
00245 
00247     int8 arg4;
00248 
00250     int8 arg5;
00251 
00252     HexenLinedef (uint16 = 0xFFFF, uint16 = 0xFFFF, uint16 = IMPASSIBLE, uint16 = NOSIDEDEF, uint16 = NOSIDEDEF, uint8 = 0, int8 = 0, int8 = 0, int8 = 0, int8 = 0, int8 = 0) throw ();
00253     virtual ~HexenLinedef (void) throw ();
00254 
00255     virtual size_t getLength (void) const throw ();
00256     virtual bool write (Lump &lump, Lump::size_type i) const throw ();
00257     virtual bool read (const Lump &lump, Lump::size_type i) throw ();
00258     virtual std::string toString (void) const throw ();
00259   };
00260 
00269   EXPORT class Linedefs : public WadEntry, public std::vector<Linedef>
00270   {
00271     public:
00272 
00274     static const std::string NAME;
00275 
00276     Linedefs (void) throw ();
00277     Linedefs (const Lump&) throw ();
00278     virtual ~Linedefs (void) throw ();
00279 
00280     virtual bool setFromLump (const Lump &lump) throw ();
00281     virtual Lump toLump (void) const throw ();
00282     virtual std::string toString (void) const throw ();
00283   };
00284 
00293   EXPORT class HexenLinedefs : public WadEntry, public std::vector<HexenLinedef>
00294   {
00295     public:
00296 
00298     static const std::string NAME;
00299 
00300     HexenLinedefs (void) throw ();
00301     HexenLinedefs (const Lump&) throw ();
00302     virtual ~HexenLinedefs (void) throw ();
00303 
00304     virtual bool setFromLump (const Lump &lump) throw ();
00305     virtual Lump toLump (void) const throw ();
00306     virtual std::string toString (void) const throw ();
00307   };
00308 }
00309 #endif

Generated on Fri Jun 10 19:38:51 2005 for libdoomwad by  doxygen 1.4.0