[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.36,1.37 editorobj
From: |
torangan |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src/editor editor.cxx,1.36,1.37 editorobj_group.cxx,1.6,1.7 rect_editorobj.cxx,1.7,1.8 |
Date: |
4 Oct 2002 11:38:31 -0000 |
Update of /usr/local/cvsroot/Games/Pingus/src/editor
In directory dark:/tmp/cvs-serv17475/editor
Modified Files:
editor.cxx editorobj_group.cxx rect_editorobj.cxx
Log Message:
- removed a few FIXME
- some minor clean/speed up
Index: editor.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/editor.cxx,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- editor.cxx 3 Oct 2002 12:33:09 -0000 1.36
+++ editor.cxx 4 Oct 2002 11:38:29 -0000 1.37
@@ -133,21 +133,21 @@
Editor::update (const GameDelta&)
{
// FIXME: This should be moved to the object manager
- if (tmp_selection != selection->get_objects ())
+ if (tmp_selection != selection->get_objects())
{
std::cout << "Exit: Selection changed" << std::endl;
- tmp_selection = selection->get_objects ();
+ tmp_selection = selection->get_objects();
// FIXME: dirty hack
if (selection->size() == 1)
{
- EditorObj* obj = selection->get_current_obj ();
- property_window->update_frame (obj);
+ EditorObj* obj = selection->get_current_obj();
+ property_window->update_frame(obj);
//CL_Component* comp = obj->get_gui_dialog (editor->property_window);
}
else
{
- property_window->update_frame (0);
+ property_window->update_frame(0);
std::cout << "EditorEvent::editor_show_object_properties (): error:
multiple objects selected" << std::endl;
}
}
@@ -190,7 +190,7 @@
void
-Editor::scroll()
+Editor::scroll ()
{
int mouse_x = CL_Mouse::get_x();
int mouse_y = CL_Mouse::get_y();
Index: editorobj_group.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/editorobj_group.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- editorobj_group.cxx 28 Sep 2002 11:52:23 -0000 1.6
+++ editorobj_group.cxx 4 Oct 2002 11:38:29 -0000 1.7
@@ -69,7 +69,7 @@
}
float
-EditorObjGroup::get_z_pos()
+EditorObjGroup::get_z_pos ()
{
/*for(std::vector<boost::shared_ptr<EditorObj> >::iterator i = objs.begin();
i != objs.end();
Index: rect_editorobj.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/rect_editorobj.cxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- rect_editorobj.cxx 28 Sep 2002 11:52:23 -0000 1.7
+++ rect_editorobj.cxx 4 Oct 2002 11:38:29 -0000 1.8
@@ -41,33 +41,31 @@
void
RectEditorObj::draw_mark (EditorNS::EditorView * view)
{
- Vector ul (get_upper_left_corner ());
+ Vector ul(get_upper_left_corner());
- view->draw_rect(int(ul.x),
- int(ul.y),
- int(ul.x + get_width()),
- int(ul.y + get_height()),
+ view->draw_rect(static_cast<int>(ul.x),
+ static_cast<int>(ul.y),
+ static_cast<int>(ul.x + get_width()),
+ static_cast<int>(ul.y + get_height()),
1.0, 0.0, 1.0, 1.0);
}
bool
RectEditorObj::is_over(const Vector& pos)
{
- Vector ul (get_upper_left_corner ());
+ Vector ul(get_upper_left_corner());
- return (ul.x < pos.x
- && ul.x + get_width () > pos.x
- && ul.y < pos.y
- && ul.y + get_height () > pos.y);
+ return ( ul.x < pos.x && ul.x + get_width () > pos.x
+ && ul.y < pos.y && ul.y + get_height() > pos.y);
}
bool
-RectEditorObj::is_in_rect(const CL_Rect& rect)
+RectEditorObj::is_in_rect (const CL_Rect& rect)
{
- 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
+ return ( pos.x >= rect.x1 && pos.x < rect.x2
&& pos.y >= rect.y1 && pos.y < rect.y2);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src/editor editor.cxx,1.36,1.37 editorobj_group.cxx,1.6,1.7 rect_editorobj.cxx,1.7,1.8,
torangan <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/src/gui gui_manager.cxx,1.13,1.14
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/src/particles explosive_particle.cxx,1.3,1.4 ground_particle.cxx,1.1,1.2 smoke_particle.cxx,1.3,1.4
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/src/gui gui_manager.cxx,1.13,1.14
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/src/particles explosive_particle.cxx,1.3,1.4 ground_particle.cxx,1.1,1.2 smoke_particle.cxx,1.3,1.4
- Index(es):