[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src/editor editor_event.cxx,1.37,1.38 edi
From: |
torangan |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src/editor editor_event.cxx,1.37,1.38 editor_view.cxx,1.4,1.5 |
Date: |
12 Oct 2002 00:49:12 -0000 |
Update of /usr/local/cvsroot/Games/Pingus/src/editor
In directory dark:/tmp/cvs-serv10029/editor
Modified Files:
editor_event.cxx editor_view.cxx
Log Message:
removed a few variable shadowings
Index: editor_event.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/editor_event.cxx,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- editor_event.cxx 28 Sep 2002 11:52:23 -0000 1.37
+++ editor_event.cxx 12 Oct 2002 00:49:10 -0000 1.38
@@ -393,7 +393,7 @@
i != objs->end();
++i)
{
- EditorObj* obj = (*i)->duplicate ();
+ obj = (*i)->duplicate ();
if (obj)
{
object_manager->add (obj);
Index: editor_view.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/editor_view.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- editor_view.cxx 28 Sep 2002 11:52:23 -0000 1.4
+++ editor_view.cxx 12 Oct 2002 00:49:10 -0000 1.5
@@ -26,14 +26,16 @@
namespace EditorNS {
-EditorView::EditorView (int x1, int y1, int x2, int y2,
- 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)
+EditorView::EditorView (int x1_, int y1_, int x2_, int y2_,
+ 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 = Vector ((x2 - x1)/2.0f + x1,
(y2 - y1)/2.0f + y1);
std::cout << "View: " << x1 << ", " << y1 << ", " << x2 << ", " << y2
<< std::endl;
+ UNUSED_ARG(x_offset);
+ UNUSED_ARG(y_offset);
}
EditorView::~EditorView ()
@@ -72,8 +74,8 @@
Vector pos1 = screen_to_world (Vector(rect.x1, rect.y1));
Vector pos2 = screen_to_world (Vector(rect.x2, rect.y2));
- Vector center = (pos2 + pos1) * 0.5f;
- offset = -center;
+ Vector center_ = (pos2 + pos1) * 0.5f;
+ offset = -center_;
float width = pos2.x - pos1.x;
float height = pos2.y - pos1.y;
@@ -231,36 +233,36 @@
}
void
-EditorView::draw_line (int x1, int y1, int x2, int y2,
+EditorView::draw_line (int x1_, int y1_, int x2_, int y2_,
float r, float g, float b, float a)
{
- CL_Display::draw_line (int((x1 + get_x_offset ()) * offset.z + center.x),
- int((y1 + get_y_offset ()) * offset.z + center.y),
- int((x2 + get_x_offset ()) * offset.z + center.x),
- int((y2 + get_y_offset ()) * offset.z + center.y),
+ CL_Display::draw_line (static_cast<int>((x1_ + get_x_offset()) * offset.z +
center.x),
+ static_cast<int>((y1_ + get_y_offset()) * offset.z +
center.y),
+ static_cast<int>((x2_ + get_x_offset()) * offset.z +
center.x),
+ static_cast<int>((y2_ + get_y_offset()) * offset.z +
center.y),
r, g, b, a);
}
void
-EditorView::draw_fillrect (int x1, int y1, int x2, int y2,
+EditorView::draw_fillrect (int x1_, int y1_, int x2_, int y2_,
float r, float g, float b, float a)
{
- CL_Display::fill_rect (int((x1 + get_x_offset ()) * offset.z + center.x),
- int((y1 + get_y_offset ()) * offset.z + center.y),
- int((x2 + get_x_offset ()) * offset.z + center.x),
- int((y2 + get_y_offset ()) * offset.z + center.y),
+ CL_Display::fill_rect (static_cast<int>((x1_ + get_x_offset()) * offset.z +
center.x),
+ static_cast<int>((y1_ + get_y_offset()) * offset.z +
center.y),
+ static_cast<int>((x2_ + get_x_offset()) * offset.z +
center.x),
+ static_cast<int>((y2_ + get_y_offset()) * offset.z +
center.y),
r, g, b, a);
}
void
-EditorView::draw_rect (int x1, int y1, int x2, int y2,
- float r, float g, float b, float a)
+EditorView::draw_rect (int x1_, int y1_, int x2_, int y2_,
+ float r, float g, float b, float a)
{
- CL_Display::draw_rect (int((x1 + get_x_offset ()) * offset.z + center.x),
- int((y1 + get_y_offset ()) * offset.z + center.y),
- int((x2 + get_x_offset ()) * offset.z + center.x),
- int((y2 + get_y_offset ()) * offset.z + center.y),
- r, g, b, a);
+ CL_Display::draw_rect(static_cast<int>((x1_ + get_x_offset()) * offset.z +
center.x),
+ static_cast<int>((y1_ + get_y_offset()) * offset.z +
center.y),
+ static_cast<int>((x2_ + get_x_offset()) * offset.z +
center.x),
+ static_cast<int>((y2_ + get_y_offset()) * offset.z +
center.y),
+ r, g, b, a);
}
void
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src/editor editor_event.cxx,1.37,1.38 editor_view.cxx,1.4,1.5,
torangan <=