virstone.h

Go to the documentation of this file.
00001 
00007 /*
00008 Copyright (C) 2000  Jeffrey S. Freedman
00009 
00010 This program is free software; you can redistribute it and/or
00011 modify it under the terms of the GNU General Public License
00012 as published by the Free Software Foundation; either version 2
00013 of the License, or (at your option) any later version.
00014 
00015 This program is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU General Public License for more details.
00019 
00020 You should have received a copy of the GNU General Public License
00021 along with this program; if not, write to the Free Software
00022 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00023 */
00024 
00025 #ifndef INCL_VIRSTONE
00026 #define INCL_VIRSTONE 1
00027 
00028 #include "iregobjs.h"
00029 
00030 /*
00031  *  A virtue stone can be set to a position on the map.
00032  */
00033 class Virtue_stone_object : public Ireg_game_object
00034   {
00035   Tile_coord pos;     // Position it teleports to.
00036 public:
00037   Virtue_stone_object(int shapenum, int framenum, unsigned int tilex, 
00038         unsigned int tiley, unsigned int lft)
00039     : Ireg_game_object(shapenum, framenum, tilex, tiley, lft),
00040       pos(0, 0, 0)
00041     {  }
00042   void set_pos(Tile_coord t)  // Set/get position.
00043     { pos = t; }
00044   void set_pos(unsigned char tilex, unsigned char tiley,
00045       unsigned char schunk, unsigned char lft);
00046   Tile_coord get_pos()
00047     { return pos; }
00048           // Write out to IREG file.
00049   virtual void write_ireg(DataSource* out);
00050         // Get size of IREG. Returns -1 if can't write to buffer
00051   virtual int get_ireg_size();
00052   };
00053 
00054 #endif

Generated on Mon Jul 9 14:42:49 2007 for ExultEngine by  doxygen 1.5.1