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 starfield_background_obj.c


From: torangan
Subject: [Pingus-CVS] CVS: Games/Pingus/src/editorobjs starfield_background_obj.cxx,NONE,1.1 starfield_background_obj.hxx,NONE,1.1 surface_background_obj.cxx,NONE,1.1 surface_background_obj.hxx,NONE,1.1 Makefile.am,1.7,1.8 solid_color_background_obj.cxx,1.1,1.2
Date: 16 Sep 2002 20:52:24 -0000

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

Modified Files:
        Makefile.am solid_color_background_obj.cxx 
Added Files:
        starfield_background_obj.cxx starfield_background_obj.hxx 
        surface_background_obj.cxx surface_background_obj.hxx 
Log Message:
splitted some more backgrounds


--- NEW FILE: starfield_background_obj.cxx ---
//  $Id: starfield_background_obj.cxx,v 1.1 2002/09/16 20:52:22 torangan Exp $
//
//  Pingus - A free Lemmings clone
//  Copyright (C) 1999 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 "../string_converter.hxx"
#include "starfield_background_obj.hxx"
#include "../worldobjsdata/starfield_background_data.hxx"

namespace EditorObjs {

StarfieldBackgroundObj::StarfieldBackgroundObj 
(WorldObjsData::StarfieldBackgroundData* data_)
  : SpriteEditorObj ("Stars/starfield_icon", "game"),
    pos (-64.0f, 0.0f),
    data(new WorldObjsData::StarfieldBackgroundData(*data_))
{
  pos_ref = &pos;
}

StarfieldBackgroundObj::~StarfieldBackgroundObj ()
{
  delete data;
}

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

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

std::string
StarfieldBackgroundObj::status_line ()
{
  return "StarfieldBackground: " 
         + to_string (pos.x) + ", "
         + to_string (pos.y) + ", "
         + to_string (pos.z);
}


} // namespace EditorObjs

/* EOF */

--- NEW FILE: starfield_background_obj.hxx ---
//  $Id: starfield_background_obj.hxx,v 1.1 2002/09/16 20:52:22 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_EDITOROBJS_STARFIELD_BACKGROUND_OBJ_HXX
#define HEADER_PINGUS_EDITOROBJS_STARFIELD_BACKGROUND_OBJ_HXX

#include <ClanLib/Core/Math/cl_vector.h>
#include "../string_converter.hxx"
#include "../editor/sprite_editorobj.hxx"

namespace WorldObjsData {
class StarfieldBackgroundData;
}

namespace EditorObjs {

class StarfieldBackgroundObj : public SpriteEditorObj
{
private:
  CL_Vector pos;
  WorldObjsData::StarfieldBackgroundData* const data;
  
public:
  StarfieldBackgroundObj (WorldObjsData::StarfieldBackgroundData* data_);
 ~StarfieldBackgroundObj ();

  void write_xml (std::ostream& xml);

  EditorObj* duplicate ();

  std::string status_line ();
  
private:
  StarfieldBackgroundObj (const StarfieldBackgroundObj&);
  StarfieldBackgroundObj operator= (const StarfieldBackgroundObj&);
};

} // namespace EditorObjs

#endif

/* EOF */

--- NEW FILE: surface_background_obj.cxx ---
//  $Id: surface_background_obj.cxx,v 1.1 2002/09/16 20:52:22 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 "../string_converter.hxx"
#include "../worldobjsdata/surface_background_data.hxx"
#include "surface_background_obj.hxx"

namespace EditorObjs {

SurfaceBackgroundObj::SurfaceBackgroundObj 
(WorldObjsData::SurfaceBackgroundData* data_)
  : SpriteEditorObj (data_->desc.res_name, data_->desc.datafile, &data_->pos),
    data(new WorldObjsData::SurfaceBackgroundData(*data_))
{
}

SurfaceBackgroundObj::~SurfaceBackgroundObj ()
{
  delete data;
}

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

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

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

} // namespace EditorObjs

/* EOF */

--- NEW FILE: surface_background_obj.hxx ---
//  $Id: surface_background_obj.hxx,v 1.1 2002/09/16 20:52:22 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_EDITOROBJS_SURFACE_BACKGROUND_OBJ_HXX
#define HEADER_PINGUS_EDITOROBJS_SURFACE_BACKGROUND_OBJ_HXX

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

namespace WorldObjsData {
class SurfaceBackgroundData;
}

namespace EditorObjs {

class SurfaceBackgroundObj : public SpriteEditorObj
{
private:
  WorldObjsData::SurfaceBackgroundData* const data;
  
public:
  SurfaceBackgroundObj (WorldObjsData::SurfaceBackgroundData* data_);
 ~SurfaceBackgroundObj ();
 
  void write_xml (std::ostream& xml);

  EditorObj* duplicate ();

  std::string status_line ();
  
private:
  SurfaceBackgroundObj (const SurfaceBackgroundObj&);
  SurfaceBackgroundObj operator= (const SurfaceBackgroundObj&);
};

} // namespace EditorObjs

#endif

/* EOF */

Index: Makefile.am
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editorobjs/Makefile.am,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- Makefile.am 15 Sep 2002 16:49:20 -0000      1.7
+++ Makefile.am 16 Sep 2002 20:52:22 -0000      1.8
@@ -30,9 +30,11 @@
        smasher_obj.cxx                smasher_obj.hxx \
        solid_color_background_obj.cxx solid_color_background_obj.hxx \
        spike_obj.cxx                  spike_obj.hxx \
+       starfield_background_obj.cxx   starfield_background_obj.hxx \
+       surface_background_obj.cxx     surface_background_obj.hxx \
        switch_door_obj.cxx            switch_door_obj.hxx \
+        switch_door_switch_obj.cxx     switch_door_switch_obj.hxx \
        teleporter_obj.cxx             teleporter_obj.hxx \
-       teleporter_target_obj.cxx      teleporter_target_obj.cxx \
-        switch_door_switch_obj.cxx     switch_door_switch_obj.hxx
+       teleporter_target_obj.cxx      teleporter_target_obj.cxx 
 
 # EOF #

Index: solid_color_background_obj.cxx
===================================================================
RCS file: 
/usr/local/cvsroot/Games/Pingus/src/editorobjs/solid_color_background_obj.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- solid_color_background_obj.cxx      15 Sep 2002 09:54:34 -0000      1.1
+++ solid_color_background_obj.cxx      16 Sep 2002 20:52:22 -0000      1.2
@@ -17,9 +17,7 @@
 //  along with this program; if not, write to the Free Software
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
-#include <ostream>
 #include "../string_converter.hxx"
-#include "../xml_helper.hxx"
 #include "../editor/editor_view.hxx"
 #include "../worldobjsdata/solid_color_background_data.hxx"
 #include "solid_color_background_obj.hxx"





reply via email to

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