pingus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pingus-CVS] CVS: Games/Pingus/src/editorobjs hotspot_obj.cxx,NONE,1.1 h


From: torangan
Subject: [Pingus-CVS] CVS: Games/Pingus/src/editorobjs hotspot_obj.cxx,NONE,1.1 hotspot_obj.hxx,NONE,1.1
Date: 24 Sep 2002 09:29:06 -0000

Update of /usr/local/cvsroot/Games/Pingus/src/editorobjs
In directory dark:/tmp/cvs-serv19854/editorobjs

Added Files:
        hotspot_obj.cxx hotspot_obj.hxx 
Log Message:
added more missing files


--- NEW FILE: hotspot_obj.cxx ---
//  $Id: hotspot_obj.cxx,v 1.1 2002/09/24 09:29:04 torangan Exp $
// 
//  Pingus - A free Lemmings clone
//  Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
//  This program is free software; you can redistribute it and/or
//  modify it under the terms of the GNU General Public License
//  as published by the Free Software Foundation; either version 2
//  of the License, or (at your option) any later version.
//
//  This program is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU General Public License for more details.
// 
//  You should have received a copy of the GNU General Public License
//  along with this program; if not, write to the Free Software
//  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

#include "../worldobjsdata/hotspot_data.hxx"
#include "../string_converter.hxx"
#include "hotspot_obj.hxx"

namespace EditorObjs {

HotspotObj::HotspotObj (WorldObjsData::HotspotData* data_)
  : SpriteEditorObj (data_->desc),
    data(new WorldObjsData::HotspotData(*data_))
{
  pos_ref = &data->pos;
}

void
HotspotObj::write_xml (std::ostream& xml)
{
  data->write_xml(xml);
}

EditorObj*
HotspotObj::duplicate ()
{
  return new HotspotObj(data);
}

std::string
HotspotObj::status_line ()
{
  return "Hotspot: "  
         + to_string(data->pos.x) + ", "
         + to_string(data->pos.y) + ", "
         + to_string(data->pos.z);
}

} // namespace EditorObjs

/* EOF */

--- NEW FILE: hotspot_obj.hxx ---
//  $Id: hotspot_obj.hxx,v 1.1 2002/09/24 09:29:04 torangan Exp $
// 
//  Pingus - A free Lemmings clone
//  Copyright (C) 2000 Ingo Ruhnke <address@hidden>
//
//  This program is free software; you can redistribute it and/or
//  modify it under the terms of the GNU General Public License
//  as published by the Free Software Foundation; either version 2
//  of the License, or (at your option) any later version.
//
//  This program is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU General Public License for more details.
// 
//  You should have received a copy of the GNU General Public License
//  along with this program; if not, write to the Free Software
//  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

#ifndef HEADER_PINGUS_EDITOR_HOTSPOT_HXX
#define HEADER_PINGUS_EDITOR_HOTSPOT_HXX

#include "../editor/sprite_editorobj.hxx" 

namespace WorldObjsData {
class HotspotData;
}

namespace EditorObjs {

class HotspotObj : public SpriteEditorObj
{
private:
  WorldObjsData::HotspotData* const data;
  
public:
  HotspotObj (WorldObjsData::HotspotData* data_);

  void write_xml (std::ostream& xml);

  EditorObj* duplicate ();

  std::string status_line ();

private:
  HotspotObj (const HotspotObj&);
  HotspotObj operator= (const HotspotObj&);
};

} // namespace EditorObjs

#endif

/* EOF */





reply via email to

[Prev in Thread] Current Thread [Next in Thread]