[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src/editor editor.cxx,1.34,1.35 editor_ev
From: |
torangan |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src/editor editor.cxx,1.34,1.35 editor_event.cxx,1.36,1.37 editor_view.cxx,1.3,1.4 editor_view.hxx,1.6,1.7 editorobj.hxx,1.16,1.17 editorobj_group.cxx,1.5,1.6 editorobj_group.hxx,1.11,1.12 entrance_window.cxx,1.5,1.6 object_manager.cxx,1.34,1.35 object_manager.hxx,1.20,1.21 object_selector.cxx,1.28,1.29 object_selector.hxx,1.12,1.13 rect_editorobj.cxx,1.6,1.7 rect_editorobj.hxx,1.6,1.7 scroll_map.cxx,1.4,1.5 selection.cxx,1.14,1.15 selection.hxx,1.11,1.12 sprite_editorobj.cxx,1.7,1.8 sprite_editorobj.hxx,1.8,1.9 start_pos.cxx,1.6,1.7 start_pos.hxx,1.7,1.8 status_line.cxx,1.8,1.9 weather_obj.cxx,1.10,1.11 weather_obj.hxx,1.9,1.10 |
Date: |
28 Sep 2002 11:52:56 -0000 |
Update of /usr/local/cvsroot/Games/Pingus/src/editor
In directory dark:/tmp/cvs-serv10023/editor
Modified Files:
editor.cxx editor_event.cxx editor_view.cxx editor_view.hxx
editorobj.hxx editorobj_group.cxx editorobj_group.hxx
entrance_window.cxx object_manager.cxx object_manager.hxx
object_selector.cxx object_selector.hxx rect_editorobj.cxx
rect_editorobj.hxx scroll_map.cxx selection.cxx selection.hxx
sprite_editorobj.cxx sprite_editorobj.hxx start_pos.cxx
start_pos.hxx status_line.cxx weather_obj.cxx weather_obj.hxx
Log Message:
replaced CL_Vector with a smaller Vector class
Index: editor.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/editor.cxx,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- editor.cxx 24 Sep 2002 17:02:48 -0000 1.34
+++ editor.cxx 28 Sep 2002 11:52:23 -0000 1.35
@@ -197,7 +197,7 @@
if (mouse_x != CL_Mouse::get_x() || mouse_y != CL_Mouse::get_y())
{
- view->move (CL_Vector ((mouse_x - CL_Mouse::get_x()) / 5,
+ view->move (Vector ((mouse_x - CL_Mouse::get_x()) / 5,
(mouse_y - CL_Mouse::get_y()) / 5));
// object_manager->x_offset += (mouse_x - CL_Mouse::get_x()) / 5;
// object_manager->y_offset += (mouse_y - CL_Mouse::get_y()) / 5;
@@ -364,15 +364,15 @@
void
Editor::rect_get_current_objs()
{
- CL_Vector start_pos (CL_Mouse::get_x(),
+ Vector start_pos (CL_Mouse::get_x(),
CL_Mouse::get_y ());
- CL_Vector end_pos;
+ Vector end_pos;
while (CL_Mouse::middle_pressed())
{
CL_System::keep_alive();
- end_pos = CL_Vector(CL_Mouse::get_x(),
+ end_pos = Vector(CL_Mouse::get_x(),
CL_Mouse::get_y ());
// Draw the screen
@@ -439,10 +439,10 @@
CL_System::keep_alive();
selection->drag ();
- CL_Vector old_pos (view->screen_to_world(CL_Vector(CL_Mouse::get_x(),
CL_Mouse::get_y())));
+ Vector old_pos (view->screen_to_world(Vector(CL_Mouse::get_x(),
CL_Mouse::get_y())));
while (CL_Mouse::left_pressed())
{
- CL_Vector new_pos (view->screen_to_world(CL_Vector(CL_Mouse::get_x(),
CL_Mouse::get_y())));
+ Vector new_pos (view->screen_to_world(Vector(CL_Mouse::get_x(),
CL_Mouse::get_y())));
selection->move(new_pos.x - old_pos.x, new_pos.y - old_pos.y);
old_pos = new_pos;
Index: editor_event.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/editor_event.cxx,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- editor_event.cxx 17 Sep 2002 21:45:56 -0000 1.36
+++ editor_event.cxx 28 Sep 2002 11:52:23 -0000 1.37
@@ -241,11 +241,11 @@
if (CL_Keyboard::get_keycode(CL_KEY_RSHIFT))
{
- selection->move(CL_Vector(0, 0, -50));
+ selection->move(Vector(0, 0, -50));
}
else if (CL_Keyboard::get_keycode(CL_KEY_RCTRL))
{
- selection->move(CL_Vector(0, 0, -1));
+ selection->move(Vector(0, 0, -1));
}
break;
@@ -254,11 +254,11 @@
selection->raise();
if (CL_Keyboard::get_keycode(CL_KEY_RSHIFT))
{
- selection->move(CL_Vector(0, 0, 50));
+ selection->move(Vector(0, 0, 50));
}
else if (CL_Keyboard::get_keycode(CL_KEY_RCTRL))
{
- selection->move(CL_Vector(0, 0, 1));
+ selection->move(Vector(0, 0, 1));
}
break;
@@ -323,7 +323,7 @@
else if (device == CL_Input::pointers[0])
{
/*std::cout << "Mouse: (" << CL_Mouse::get_x () << ", " <<
CL_Mouse::get_y () << ") "
- << "World: " << editor->view->screen_to_world
(CL_Vector(CL_Mouse::get_x (), CL_Mouse::get_y ()))
+ << "World: " << editor->view->screen_to_world
(Vector(CL_Mouse::get_x (), CL_Mouse::get_y ()))
<< std::endl;*/
switch (key.id)
@@ -618,7 +618,7 @@
{
// Apply object offset (not really needed, but makes it
// easier to see that the object got duplicated)
- obj->set_position_offset (CL_Vector(8, 8));
+ obj->set_position_offset (Vector(8, 8));
// FIXME: We don't take the object position into account!
object_manager->add (obj); // ObjectManager will take care of the
deletion
@@ -684,7 +684,7 @@
return;
EditorObj* obj
- = object_manager->find_object(editor->view->screen_to_world
(CL_Vector(CL_Mouse::get_x(),
+ = object_manager->find_object(editor->view->screen_to_world
(Vector(CL_Mouse::get_x(),
CL_Mouse::get_y())));
if (obj)
Index: editor_view.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/editor_view.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- editor_view.cxx 11 Sep 2002 12:45:58 -0000 1.3
+++ editor_view.cxx 28 Sep 2002 11:52:23 -0000 1.4
@@ -17,6 +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 <iostream>
#include <ClanLib/Core/Math/rect.h>
#include <ClanLib/Display/Display/display.h>
#include "../sprite.hxx"
@@ -29,7 +30,7 @@
int /*x_offset*/, int /*y_offset*/)
: x1 (x1), y1 (y1), x2 (x2), y2 (y2), offset (-(x2 - x1)/2.0f,
-(y2-x1)/2.0f, 1.0f)
{
- center = CL_Vector ((x2 - x1)/2.0f + x1,
+ center = Vector ((x2 - x1)/2.0f + x1,
(y2 - y1)/2.0f + y1);
std::cout << "View: " << x1 << ", " << y1 << ", " << x2 << ", " << y2
<< std::endl;
@@ -39,7 +40,7 @@
{
}
-CL_Vector
+Vector
EditorView::get_offset ()
{
return offset;
@@ -68,10 +69,10 @@
rect.y1 = Math::min (arg_rect.y1, arg_rect.y2);
rect.y2 = Math::max (arg_rect.y1, arg_rect.y2);
- CL_Vector pos1 = screen_to_world (CL_Vector(rect.x1, rect.y1));
- CL_Vector pos2 = screen_to_world (CL_Vector(rect.x2, rect.y2));
+ Vector pos1 = screen_to_world (Vector(rect.x1, rect.y1));
+ Vector pos2 = screen_to_world (Vector(rect.x2, rect.y2));
- CL_Vector center = (pos2 + pos1) * 0.5f;
+ Vector center = (pos2 + pos1) * 0.5f;
offset = -center;
float width = pos2.x - pos1.x;
@@ -106,19 +107,19 @@
}
void
-EditorView::move (const CL_Vector & delta)
+EditorView::move (const Vector & delta)
{
offset += delta;
}
-CL_Vector
-EditorView::screen_to_world (CL_Vector pos)
+Vector
+EditorView::screen_to_world (Vector pos)
{
return ((pos - center) * (1.0f/offset.z)) - offset;
}
-CL_Vector
-EditorView::world_to_screen (CL_Vector pos)
+Vector
+EditorView::world_to_screen (Vector pos)
{
return ((pos + offset) * offset.z) + center;
}
@@ -136,7 +137,7 @@
}
void
-EditorView::draw (Sprite& sprite, const CL_Vector& pos)
+EditorView::draw (Sprite& sprite, const Vector& pos)
{
CL_Surface sur (sprite.get_surface ());
draw (sur,
@@ -145,7 +146,7 @@
}
void
-EditorView::draw (Sprite& sprite, const CL_Vector& pos, int frame)
+EditorView::draw (Sprite& sprite, const Vector& pos, int frame)
{
CL_Surface sur (sprite.get_surface ());
draw (sur,
@@ -155,7 +156,7 @@
}
void
-EditorView::draw (CL_Surface& sur, const CL_Vector& pos)
+EditorView::draw (CL_Surface& sur, const Vector& pos)
{
if (offset.z == 1.0)
{
@@ -173,7 +174,7 @@
}
void
-EditorView::draw (CL_Surface& sur, const CL_Vector& pos, int frame)
+EditorView::draw (CL_Surface& sur, const Vector& pos, int frame)
{
draw (sur, int(pos.x), int(pos.y), frame);
}
@@ -223,7 +224,7 @@
}
void
-EditorView::draw_line (const CL_Vector& pos1, const CL_Vector& pos2,
+EditorView::draw_line (const Vector& pos1, const Vector& pos2,
float r, float g, float b, float a)
{
draw_line (int(pos1.x), int(pos1.y), int(pos2.x), int(pos2.y), r, g, b, a);
@@ -278,8 +279,8 @@
// FIXME: Probally not the fast circle draw algo on this world...
const float pi = 3.1415927f * 2.0f;
const float steps = 8;
- CL_Vector current (radius, 0);
- CL_Vector next = current.rotate (pi/steps, CL_Vector (0, 0, 1.0f));
+ Vector current (radius, 0);
+ Vector next = current.rotate (pi/steps, Vector (0, 0, 1.0f));
for (int i = 0; i < steps; ++i)
{
@@ -287,7 +288,7 @@
int(x_pos + next.x), int(y_pos + next.y),
r, g, b, a);
current = next;
- next = next.rotate (pi/8, CL_Vector (0, 0, 1.0f));
+ next = next.rotate (pi/8, Vector (0, 0, 1.0f));
}
}
Index: editor_view.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/editor_view.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- editor_view.hxx 27 Sep 2002 11:26:45 -0000 1.6
+++ editor_view.hxx 28 Sep 2002 11:52:23 -0000 1.7
@@ -21,7 +21,7 @@
#define header_pingus_editor_editor_view_hxx
#include "../pingus.hxx"
-#include <ClanLib/Core/Math/cl_vector.h>
+#include "../vector.hxx"
class Sprite;
class CL_Rect;
@@ -37,19 +37,19 @@
{
private:
int x1, y1, x2, y2;
- CL_Vector center;
+ Vector center;
/** The current view position, x and y component are the current
position in the level in world coordinates and the z componet is
the zoom of the level (1.0 is default)*/
- CL_Vector offset;
+ Vector offset;
public:
EditorView (int x1, int y1, int x2, int y2,
int x_offset = 0, int y_offset = 0);
virtual ~EditorView ();
- CL_Vector get_offset ();
+ Vector get_offset ();
float get_x_offset ();
float get_y_offset ();
@@ -65,23 +65,23 @@
void zoom_to (const CL_Rect & rect);
/// Scroll the view by the given delta
- void move (const CL_Vector & delta);
+ void move (const Vector & delta);
/** Converts a given screen coordinate, as returned by
CL_Mouse::get_x(), into the world coordinate system. */
- CL_Vector screen_to_world (CL_Vector pos);
- CL_Vector world_to_screen (CL_Vector pos);
+ Vector screen_to_world (Vector pos);
+ Vector world_to_screen (Vector pos);
- void draw (Sprite& sprite, const CL_Vector& pos);
- void draw (Sprite& sprite, const CL_Vector& pos, int frame);
- void draw (CL_Surface& sur, const CL_Vector& pos);
- void draw (CL_Surface& sur, const CL_Vector& pos, int frame);
+ void draw (Sprite& sprite, const Vector& pos);
+ void draw (Sprite& sprite, const Vector& pos, int frame);
+ void draw (CL_Surface& sur, const Vector& pos);
+ void draw (CL_Surface& sur, const Vector& pos, int frame);
void draw (CL_Surface& sur, int x_pos, int y_pos);
void draw (CL_Surface& sur, int x_pos, int y_pos, int frame);
void draw (CL_Surface& sur, int x_pos, int y_pos,
float size_x, float size_y, int frame);
- void draw_line (const CL_Vector& pos1, const CL_Vector& pos2,
+ void draw_line (const Vector& pos1, const Vector& pos2,
float r, float g, float b, float a = 1.0f);
void draw_line (int x1, int y1, int x2, int y2,
float r, float g, float b, float a = 1.0f);
Index: editorobj.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/editorobj.hxx,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- editorobj.hxx 27 Sep 2002 11:26:45 -0000 1.16
+++ editorobj.hxx 28 Sep 2002 11:52:23 -0000 1.17
@@ -26,7 +26,7 @@
#include <vector>
class CL_Rect;
-class CL_Vector;
+class Vector;
class CL_Component;
class EditorObj;
@@ -65,7 +65,7 @@
virtual void draw_mark (EditorNS::EditorView * view) =0;
/** Return true when the object is under the given coordinates */
- virtual bool is_over(const CL_Vector&) =0;
+ virtual bool is_over(const Vector&) =0;
/** Return true if the object is inside the given rectangle */
virtual bool is_in_rect(const CL_Rect& rect) =0;
@@ -75,7 +75,7 @@
virtual float get_z_pos() =0;
/** Move the object to the given offset */
- virtual void set_position_offset(const CL_Vector& offset) =0;
+ virtual void set_position_offset(const Vector& offset) =0;
/** Generic operations that can make an object larger, what exactly
happens is object dependend. Default is to do nothing */
Index: editorobj_group.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/editorobj_group.cxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- editorobj_group.cxx 11 Sep 2002 12:45:58 -0000 1.5
+++ editorobj_group.cxx 28 Sep 2002 11:52:23 -0000 1.6
@@ -17,7 +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 <fstream>
+#include <iostream>
#include "editorobj_group.hxx"
/******************/
@@ -47,7 +47,7 @@
}
void
-EditorObjGroup::set_position_offset(const CL_Vector& offset)
+EditorObjGroup::set_position_offset(const Vector& offset)
{
upper_left_corner += offset;
for(std::vector<EditorObj*>::iterator i = objs.begin();
@@ -161,7 +161,7 @@
}
bool
-EditorObjGroup::is_over(const CL_Vector& pos)
+EditorObjGroup::is_over(const Vector& pos)
{
for(std::vector<EditorObj*>::iterator i = objs.begin();
i != objs.end();
Index: editorobj_group.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/editorobj_group.hxx,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- editorobj_group.hxx 27 Sep 2002 11:26:45 -0000 1.11
+++ editorobj_group.hxx 28 Sep 2002 11:52:23 -0000 1.12
@@ -21,7 +21,7 @@
#define HEADER_PINGUS_EDITOR_EDITOROBJ_GROUP_HXX
#include <vector>
-#include <ClanLib/Core/Math/cl_vector.h>
+#include "../vector.hxx"
#include "editorobj.hxx"
class EditorObjGroup : public EditorObj
@@ -29,7 +29,7 @@
private:
std::vector<EditorObj*> objs;
- CL_Vector upper_left_corner;
+ Vector upper_left_corner;
//int width, height;
//bool init;
public:
@@ -39,7 +39,7 @@
float get_z_pos();
- void set_position_offset(const CL_Vector& offset);
+ void set_position_offset(const Vector& offset);
void draw(EditorNS::EditorView *);
void draw_mark (EditorNS::EditorView * view);
@@ -49,7 +49,7 @@
///
std::vector<EditorObj*>* get_objs();
- bool is_over(const CL_Vector &);
+ bool is_over(const Vector &);
bool is_in_rect(const CL_Rect &);
void write_xml(std::ostream& xml);
Index: entrance_window.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/entrance_window.cxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- entrance_window.cxx 27 Sep 2002 11:26:45 -0000 1.5
+++ entrance_window.cxx 28 Sep 2002 11:52:23 -0000 1.6
@@ -17,6 +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 <iostream>
#include "../editorobjs/entrance_obj.hxx"
#include "editor.hxx"
#include "object_manager.hxx"
Index: object_manager.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/object_manager.cxx,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- object_manager.cxx 16 Sep 2002 20:31:09 -0000 1.34
+++ object_manager.cxx 28 Sep 2002 11:52:23 -0000 1.35
@@ -18,6 +18,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <fstream>
+#include <iostream>
#include <algorithm>
#include <ClanLib/Core/Math/rect.h>
#include "../plf.hxx"
@@ -313,7 +314,7 @@
}
EditorObj*
-ObjectManager::find_object(const CL_Vector& pos)
+ObjectManager::find_object(const Vector& pos)
{
// We go reverse about the list, since the top-most object is the
// last in the list
Index: object_manager.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/object_manager.hxx,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- object_manager.hxx 27 Sep 2002 11:26:45 -0000 1.20
+++ object_manager.hxx 28 Sep 2002 11:52:23 -0000 1.21
@@ -140,7 +140,7 @@
void erase (const std::vector<EditorObj*>&);
/** Add the object at the given position to the selection */
- EditorObj* find_object(const CL_Vector & pos);
+ EditorObj* find_object(const Vector & pos);
std::vector<ActionData>* get_actions ();
Index: object_selector.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/object_selector.cxx,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- object_selector.cxx 27 Sep 2002 18:36:40 -0000 1.28
+++ object_selector.cxx 28 Sep 2002 11:52:23 -0000 1.29
@@ -90,7 +90,7 @@
x_offset = x_off;
y_offset = y_off;
- pos = CL_Vector (CL_Mouse::get_x () - x_offset,
+ pos = Vector (CL_Mouse::get_x () - x_offset,
CL_Mouse::get_y () - y_offset,
0.0f);
Index: object_selector.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/object_selector.hxx,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- object_selector.hxx 27 Sep 2002 11:26:45 -0000 1.12
+++ object_selector.hxx 28 Sep 2002 11:52:23 -0000 1.13
@@ -23,7 +23,7 @@
#include <config.h>
#include <map>
#include <list>
-#include <ClanLib/Core/Math/cl_vector.h>
+#include "../vector.hxx"
#include "../groundtype.hxx"
#include "surface_selector.hxx"
#include "editorobj.hxx"
@@ -43,7 +43,7 @@
int x_offset;
int y_offset;
- CL_Vector pos;
+ Vector pos;
std::string last_object;
std::map<std::string, bool> data_loaded;
Index: rect_editorobj.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/rect_editorobj.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- rect_editorobj.cxx 27 Sep 2002 11:26:45 -0000 1.6
+++ rect_editorobj.cxx 28 Sep 2002 11:52:23 -0000 1.7
@@ -41,7 +41,7 @@
void
RectEditorObj::draw_mark (EditorNS::EditorView * view)
{
- CL_Vector ul (get_upper_left_corner ());
+ Vector ul (get_upper_left_corner ());
view->draw_rect(int(ul.x),
int(ul.y),
@@ -51,9 +51,9 @@
}
bool
-RectEditorObj::is_over(const CL_Vector& pos)
+RectEditorObj::is_over(const Vector& pos)
{
- CL_Vector ul (get_upper_left_corner ());
+ Vector ul (get_upper_left_corner ());
return (ul.x < pos.x
&& ul.x + get_width () > pos.x
@@ -64,7 +64,7 @@
bool
RectEditorObj::is_in_rect(const CL_Rect& rect)
{
- CL_Vector pos (get_upper_left_corner ());
+ Vector pos (get_upper_left_corner ());
// FIXME: Simple, stupid and wrong,... but works good =;-)
return (pos.x >= rect.x1 && pos.x < rect.x2
Index: rect_editorobj.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/rect_editorobj.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- rect_editorobj.hxx 27 Sep 2002 11:26:45 -0000 1.6
+++ rect_editorobj.hxx 28 Sep 2002 11:52:23 -0000 1.7
@@ -30,7 +30,7 @@
RectEditorObj ();
/** Returns the position of the upper left corner of the object */
- virtual CL_Vector get_upper_left_corner () =0;
+ virtual Vector get_upper_left_corner () =0;
/// Return the object width
virtual int get_width () =0;
@@ -41,7 +41,7 @@
virtual void draw_mark (EditorNS::EditorView * view);
/** Return true when the object is under the given coordinates */
- virtual bool is_over (const CL_Vector&);
+ virtual bool is_over (const Vector&);
/** Return true if the current object is inside the current
selection rectangle */
Index: scroll_map.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/scroll_map.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- scroll_map.cxx 11 Sep 2002 12:45:58 -0000 1.4
+++ scroll_map.cxx 28 Sep 2002 11:52:23 -0000 1.5
@@ -33,7 +33,7 @@
view (new EditorView(x_pos, y_pos, x_pos + width, y_pos + height))
{
view->set_zoom (0.1f);
- view->move (CL_Vector (-640, -480));
+ view->move (Vector (-640, -480));
}
ScrollMap::~ScrollMap()
Index: selection.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/selection.cxx,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- selection.cxx 13 Sep 2002 18:28:26 -0000 1.14
+++ selection.cxx 28 Sep 2002 11:52:23 -0000 1.15
@@ -18,7 +18,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <algorithm>
-#include <ClanLib/Core/Math/cl_vector.h>
+#include "../vector.hxx"
#include <ClanLib/Display/Input/keyboard.h>
#include <ClanLib/Display/Input/key.h>
#include "selection.hxx"
@@ -32,11 +32,11 @@
Selection::move(float x, float y)
{
for (vector<EditorObj*>::iterator it = obj_list.begin(); it !=
obj_list.end(); it++)
- (*it)->set_position_offset(CL_Vector(x, y));
+ (*it)->set_position_offset(Vector(x, y));
}
void
-Selection::move(const CL_Vector& pos)
+Selection::move(const Vector& pos)
{
for (vector<EditorObj*>::iterator it = obj_list.begin(); it !=
obj_list.end(); it++)
(*it)->set_position_offset(pos);
Index: selection.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/selection.hxx,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- selection.hxx 27 Sep 2002 11:26:45 -0000 1.11
+++ selection.hxx 28 Sep 2002 11:52:23 -0000 1.12
@@ -22,7 +22,7 @@
#include "object_manager.hxx"
-class CL_Vector;
+class Vector;
namespace EditorNS {
@@ -43,7 +43,7 @@
void clear() { obj_list.clear(); }
void move(float x, float y);
- void move(const CL_Vector& pos);
+ void move(const Vector& pos);
void drag();
void drop();
Index: sprite_editorobj.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/sprite_editorobj.cxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- sprite_editorobj.cxx 27 Sep 2002 11:26:45 -0000 1.7
+++ sprite_editorobj.cxx 28 Sep 2002 11:52:23 -0000 1.8
@@ -27,13 +27,13 @@
{
}
-SpriteEditorObj::SpriteEditorObj (CL_Vector* arg_pos)
+SpriteEditorObj::SpriteEditorObj (Vector* arg_pos)
: pos_ref (arg_pos)
{
}
SpriteEditorObj::SpriteEditorObj (const ResDescriptor& desc,
- CL_Vector* arg_pos)
+ Vector* arg_pos)
: sprite (desc),
pos_ref (arg_pos)
{
@@ -41,7 +41,7 @@
SpriteEditorObj::SpriteEditorObj (const std::string& sur_name,
const std::string& datafile,
- CL_Vector* arg_pos)
+ Vector* arg_pos)
: sprite (sur_name, datafile),
pos_ref (arg_pos)
{
@@ -84,22 +84,22 @@
void
-SpriteEditorObj::set_position_offset(const CL_Vector& offset)
+SpriteEditorObj::set_position_offset(const Vector& offset)
{
assert (pos_ref);
*pos_ref += offset;
}
-CL_Vector
+Vector
SpriteEditorObj::get_upper_left_corner()
{
assert (pos_ref);
- CL_Vector pos(*pos_ref);
- return pos + CL_Vector(sprite.get_x_align (), sprite.get_y_align ());
+ Vector pos(*pos_ref);
+ return pos + Vector(sprite.get_x_align (), sprite.get_y_align ());
}
bool
-SpriteEditorObj::is_over(const CL_Vector& pos)
+SpriteEditorObj::is_over(const Vector& pos)
{
// FIXME: We don't handle animated objects special (do we need to?)
if (RectEditorObj::is_over (pos))
@@ -110,7 +110,7 @@
CL_SurfaceProvider* provider = sprite.get_surface ().get_provider ();
float r, g, b, a;
// Position relative to the surface, not world
- CL_Vector provider_pos = pos;
+ Vector provider_pos = pos;
provider_pos -= *pos_ref;
provider->get_pixel (int(provider_pos.x), int(provider_pos.y), &r, &g,
&b, &a);
Index: sprite_editorobj.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/sprite_editorobj.hxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- sprite_editorobj.hxx 27 Sep 2002 11:26:45 -0000 1.8
+++ sprite_editorobj.hxx 28 Sep 2002 11:52:24 -0000 1.9
@@ -23,7 +23,7 @@
#include "../sprite.hxx"
#include "rect_editorobj.hxx"
-class CL_Vector;
+class Vector;
class SpriteEditorObj : public RectEditorObj
{
@@ -34,20 +34,20 @@
FIXME: A bit ugly, but requires less changes than a full blown
FIXME: get/set handling, it also looks nicer */
- CL_Vector* pos_ref;
+ Vector* pos_ref;
public:
/** Empty constructor, you *must* initialise pos_ref manually */
SpriteEditorObj ();
- SpriteEditorObj (CL_Vector* arg_pos);
+ SpriteEditorObj (Vector* arg_pos);
SpriteEditorObj (const std::string& sur_name,
const std::string& datafile,
- CL_Vector* arg_pos = 0);
+ Vector* arg_pos = 0);
SpriteEditorObj (const ResDescriptor&,
- CL_Vector* arg_pos = 0);
+ Vector* arg_pos = 0);
/// Return the object width
virtual int get_width() { return sprite.get_width (); }
@@ -56,15 +56,15 @@
virtual float get_z_pos();
- virtual CL_Vector get_upper_left_corner ();
+ virtual Vector get_upper_left_corner ();
virtual void draw (EditorNS::EditorView *);
- virtual void set_position_offset (const CL_Vector& offset);
+ virtual void set_position_offset (const Vector& offset);
/** This will be overritten to provide pixel exact click
detection */
- virtual bool is_over (const CL_Vector&);
+ virtual bool is_over (const Vector&);
protected:
SpriteEditorObj (const SpriteEditorObj& old);
Index: start_pos.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/start_pos.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- start_pos.cxx 10 Sep 2002 14:33:07 -0000 1.6
+++ start_pos.cxx 28 Sep 2002 11:52:24 -0000 1.7
@@ -17,11 +17,11 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#include <fstream>
+#include <iostream>
#include "../xml_helper.hxx"
#include "start_pos.hxx"
-StartPos::StartPos(int arg_x_pos, int arg_y_pos)
+StartPos::StartPos (int arg_x_pos, int arg_y_pos)
: SpriteEditorObj("editor/start_pos", "core")
{
pos.x = arg_x_pos;
@@ -32,7 +32,7 @@
}
void
-StartPos::write_xml(std::ostream& xml)
+StartPos::write_xml (std::ostream& xml)
{
xml << " <start-position>\n";
XMLhelper::write_vector_xml(xml, pos);
@@ -40,7 +40,7 @@
}
EditorObj*
-StartPos::duplicate()
+StartPos::duplicate ()
{
std::cout << "StartPos: The start position can't be duplicated" << std::endl;
return 0;
Index: start_pos.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/start_pos.hxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- start_pos.hxx 27 Sep 2002 11:26:45 -0000 1.7
+++ start_pos.hxx 28 Sep 2002 11:52:24 -0000 1.8
@@ -20,13 +20,13 @@
#ifndef HEADER_PINGUS_EDITOR_START_POS_HXX
#define HEADER_PINGUS_EDITOR_START_POS_HXX
-#include <ClanLib/Core/Math/cl_vector.h>
+#include "../vector.hxx"
#include "sprite_editorobj.hxx"
class StartPos : public SpriteEditorObj
{
private:
- CL_Vector pos;
+ Vector pos;
public:
StartPos(int arg_x_pos, int arg_y_pos);
Index: status_line.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/status_line.cxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- status_line.cxx 11 Sep 2002 12:45:58 -0000 1.8
+++ status_line.cxx 28 Sep 2002 11:52:24 -0000 1.9
@@ -62,7 +62,7 @@
font->print_left(50, 5, status_line_text.c_str());
- CL_Vector pos = view->screen_to_world(CL_Vector (CL_Mouse::get_x(),
CL_Mouse::get_y ()));
+ Vector pos = view->screen_to_world(Vector (CL_Mouse::get_x(),
CL_Mouse::get_y ()));
snprintf(mouse_co, 256, "X:%-3d Y:%-3d", static_cast<int>(pos.x),
static_cast<int>(pos.y));
font->print_left(CL_Display::get_width() - 100, 5, mouse_co);
Index: weather_obj.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/weather_obj.cxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- weather_obj.cxx 16 Sep 2002 17:17:17 -0000 1.10
+++ weather_obj.cxx 28 Sep 2002 11:52:24 -0000 1.11
@@ -17,7 +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 <fstream>
+#include <iostream>
#include "../xml_helper.hxx"
#include "editor_view.hxx"
#include "weather_obj.hxx"
@@ -64,7 +64,7 @@
}
}
- CL_Vector tmp_pos (pos);
+ Vector tmp_pos (pos);
pos.x = int((pos.x + sprite.get_width ()/2)
/sprite.get_width ()) * sprite.get_width ();
pos.y = int((pos.y - sprite.get_height ()/2)
Index: weather_obj.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/weather_obj.hxx,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- weather_obj.hxx 27 Sep 2002 11:26:46 -0000 1.9
+++ weather_obj.hxx 28 Sep 2002 11:52:24 -0000 1.10
@@ -20,14 +20,14 @@
#ifndef HEADER_PINGUS_EDITOR_WEATHER_OBJ_HXX
#define HEADER_PINGUS_EDITOR_WEATHER_OBJ_HXX
-#include <ClanLib/Core/Math/cl_vector.h>
+#include "../vector.hxx"
#include "sprite_editorobj.hxx"
class WeatherObj : public SpriteEditorObj
{
private:
std::string type;
- CL_Vector pos;
+ Vector pos;
bool dragging;
public:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src/editor editor.cxx,1.34,1.35 editor_event.cxx,1.36,1.37 editor_view.cxx,1.3,1.4 editor_view.hxx,1.6,1.7 editorobj.hxx,1.16,1.17 editorobj_group.cxx,1.5,1.6 editorobj_group.hxx,1.11,1.12 entrance_window.cxx,1.5,1.6 object_manager.cxx,1.34,1.35 object_manager.hxx,1.20,1.21 object_selector.cxx,1.28,1.29 object_selector.hxx,1.12,1.13 rect_editorobj.cxx,1.6,1.7 rect_editorobj.hxx,1.6,1.7 scroll_map.cxx,1.4,1.5 selection.cxx,1.14,1.15 selection.hxx,1.11,1.12 sprite_editorobj.cxx,1.7,1.8 sprite_editorobj.hxx,1.8,1.9 start_pos.cxx,1.6,1.7 start_pos.hxx,1.7,1.8 status_line.cxx,1.8,1.9 weather_obj.cxx,1.10,1.11 weather_obj.hxx,1.9,1.10,
torangan <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/src/actions boarder.cxx,1.9,1.10 bomber.cxx,1.13,1.14 bridger.cxx,1.17,1.18 bridger.hxx,1.13,1.14 drown.cxx,1.8,1.9 exiter.cxx,1.8,1.9 faller.cxx,1.24,1.25 floater.cxx,1.16,1.17 jumper.cxx,1.12,1.13 laser_kill.cxx,1.9,1.10 slider.cxx,1.10,1.11 smashed.cxx,1.8,1.9 splashed.cxx,1.8,1.9 waiter.cxx,1.8,1.9 walker.cxx,1.23,1.24
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/src vector.cxx,NONE,1.1 vector.hxx,NONE,1.1 Makefile.am,1.110,1.111 action_button.hxx,1.12,1.13 button_panel.cxx,1.14,1.15 capture_rectangle.cxx,1.7,1.8 client.cxx,1.23,1.24 client.hxx,1.18,1.19 col_map.cxx,1.10,1.11 display_graphic_context.cxx,1.4,1.5 display_graphic_context.hxx,1.3,1.4 exit_menu.cxx,1.9,1.10 force_vector.cxx,1.6,1.7 force_vector.hxx,1.5,1.6 game_session.cxx,1.10,1.11 graphic_context.hxx,1.2,1.3 input_event.hxx,1.7,1.8 intro.cxx,1.4,1.5 intro.hxx,1.5,1.6 multiplayer_client.cxx,1.4,1.5 multiplayer_client_child.cxx,1.11,1.12 multiplayer_client_child.hxx,1.6,1.7 multiplayer_game.cxx,1.9,1.10 option_menu.cxx,1.6,1.7 pingu.cxx,1.27,1.28 pingu.hxx,1.17,1.18 pingu_holder.cxx,1.9,1.10 pingu_holder.hxx,1.7,1.8 pingus_menu_manager.cxx,1.13,1.14 playfield.cxx,1.22,1.23 playfield_view.cxx,1.3,1.4 playfield_view.hxx,1.6,1.7 plf.cxx,1.9,1.10 plt_xml.cxx,1.7,1.8 smallmap_image.cxx,1.7,1.8 smallmap_image.hxx,1.7,1.8 sprite.cxx,1.6,1.7 sprite.hxx,1.6,1.7 story.cxx,1.11,1.12 string_converter.hxx,1.7,1.8 theme.cxx,1.7,1.8 theme_selector.cxx,1.6,1.7 true_server.cxx,1.9,1.10 usb_mouse_controller.cxx,1.1,1.2 usb_mouse_controller.hxx,1.5,1.6 view.cxx,1.12,1.13 view.hxx,1.9,1.10 world.cxx,1.26,1.27 world.hxx,1.13,1.14 worldobj_data_factory.cxx,1.25,1.26 xml_helper.cxx,1.17,1.18 xml_helper.hxx,1.11,1.12 xml_plf.cxx,1.25,1.26
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/src/actions boarder.cxx,1.9,1.10 bomber.cxx,1.13,1.14 bridger.cxx,1.17,1.18 bridger.hxx,1.13,1.14 drown.cxx,1.8,1.9 exiter.cxx,1.8,1.9 faller.cxx,1.24,1.25 floater.cxx,1.16,1.17 jumper.cxx,1.12,1.13 laser_kill.cxx,1.9,1.10 slider.cxx,1.10,1.11 smashed.cxx,1.8,1.9 splashed.cxx,1.8,1.9 waiter.cxx,1.8,1.9 walker.cxx,1.23,1.24
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/src vector.cxx,NONE,1.1 vector.hxx,NONE,1.1 Makefile.am,1.110,1.111 action_button.hxx,1.12,1.13 button_panel.cxx,1.14,1.15 capture_rectangle.cxx,1.7,1.8 client.cxx,1.23,1.24 client.hxx,1.18,1.19 col_map.cxx,1.10,1.11 display_graphic_context.cxx,1.4,1.5 display_graphic_context.hxx,1.3,1.4 exit_menu.cxx,1.9,1.10 force_vector.cxx,1.6,1.7 force_vector.hxx,1.5,1.6 game_session.cxx,1.10,1.11 graphic_context.hxx,1.2,1.3 input_event.hxx,1.7,1.8 intro.cxx,1.4,1.5 intro.hxx,1.5,1.6 multiplayer_client.cxx,1.4,1.5 multiplayer_client_child.cxx,1.11,1.12 multiplayer_client_child.hxx,1.6,1.7 multiplayer_game.cxx,1.9,1.10 option_menu.cxx,1.6,1.7 pingu.cxx,1.27,1.28 pingu.hxx,1.17,1.18 pingu_holder.cxx,1.9,1.10 pingu_holder.hxx,1.7,1.8 pingus_menu_manager.cxx,1.13,1.14 playfield.cxx,1.22,1.23 playfield_view.cxx,1.3,1.4 playfield_view.hxx,1.6,1.7 plf.cxx,1.9,1.10 plt_xml.cxx,1.7,1.8 smallmap_image.cxx,1.7,1.8 smallmap_image.hxx,1.7,1.8 sprite.cxx,1.6,1.7 sprite.hxx,1.6,1.7 story.cxx,1.11,1.12 string_converter.hxx,1.7,1.8 theme.cxx,1.7,1.8 theme_selector.cxx,1.6,1.7 true_server.cxx,1.9,1.10 usb_mouse_controller.cxx,1.1,1.2 usb_mouse_controller.hxx,1.5,1.6 view.cxx,1.12,1.13 view.hxx,1.9,1.10 world.cxx,1.26,1.27 world.hxx,1.13,1.14 worldobj_data_factory.cxx,1.25,1.26 xml_helper.cxx,1.17,1.18 xml_helper.hxx,1.11,1.12 xml_plf.cxx,1.25,1.26
- Index(es):