[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src hotspot.cxx,1.3,1.4 pingu.cxx,1.21,1.
From: |
grumbel |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src hotspot.cxx,1.3,1.4 pingu.cxx,1.21,1.22 pingu.hxx,1.12,1.13 pingu_action.hxx,1.13,1.14 pingu_holder.cxx,1.5,1.6 pingu_holder.hxx,1.3,1.4 |
Date: |
4 Sep 2002 20:30:31 -0000 |
Update of /usr/local/cvsroot/Games/Pingus/src
In directory dark:/tmp/cvs-serv30636
Modified Files:
hotspot.cxx pingu.cxx pingu.hxx pingu_action.hxx
pingu_holder.cxx pingu_holder.hxx
Log Message:
some more GC stuff -> s/draw_offset/draw(GraphicContext&)/
Index: hotspot.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/hotspot.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- hotspot.cxx 4 Sep 2002 19:40:19 -0000 1.3
+++ hotspot.cxx 4 Sep 2002 20:30:28 -0000 1.4
@@ -44,6 +44,7 @@
void
Hotspot::draw (GraphicContext& gc)
{
+ // FIXME: para support doesnn't work correctly
gc.draw (surface, pos * para, static_cast<int>(count));
++count;
}
Index: pingu.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/pingu.cxx,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- pingu.cxx 4 Sep 2002 14:55:11 -0000 1.21
+++ pingu.cxx 4 Sep 2002 20:30:28 -0000 1.22
@@ -319,12 +319,11 @@
// Draws the pingu on the screen with the given offset
void
-Pingu::draw_offset (int x, int y, float s)
+Pingu::draw (GraphicContext& gc)
{
char str[16];
- y += 2;
- action->draw_offset(x, y,s);
+ action->draw (gc);
if (action_time != -1)
{
@@ -333,21 +332,9 @@
// FIXME: in ticks, should probally be in seconds]
snprintf(str, 16, "%d", action_time);
- if (s == 1.0)
- {
- font->print_center(static_cast<int>(pos_x + x),
static_cast<int>(pos_y - 45) + y, str);
- }
- else if (s > 1.0)
- {
- font->print_left(static_cast<int>((pos_x + x) * s),
- static_cast<int>((pos_y - 45 + y) * s) -
(static_cast<int>(font->get_text_width(str) * s) / 2),
- static_cast<int>(s), static_cast<int>(s),
- str);
- }
- else
- {
- // Don't draw the font if the zoom is smaller than default (1.0)
- }
+ font->print_center(static_cast<int>(pos_x),
+ static_cast<int>(pos_y - 45) + 2,
+ str);
}
}
Index: pingu.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/pingu.hxx,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- pingu.hxx 4 Sep 2002 14:55:11 -0000 1.12
+++ pingu.hxx 4 Sep 2002 20:30:28 -0000 1.13
@@ -20,6 +20,7 @@
#ifndef HEADER_PINGUS_PINGU_HXX
#define HEADER_PINGUS_PINGU_HXX
+#include "graphic_context.hxx"
#include "direction.hxx"
#include "pingu_enums.hxx"
@@ -174,7 +175,7 @@
/** Returns true if the pingu needs to catch another pingu */
bool need_catch ();
- void draw_offset (int x, int y, float s = 1.0);
+ void draw (GraphicContext& gc);
void apply_force (CL_Vector);
void update (float delta);
Index: pingu_action.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/pingu_action.hxx,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- pingu_action.hxx 4 Sep 2002 14:55:11 -0000 1.13
+++ pingu_action.hxx 4 Sep 2002 20:30:28 -0000 1.14
@@ -20,6 +20,7 @@
#ifndef HEADER_PINGUS_PINGU_ACTION_HXX
#define HEADER_PINGUS_PINGU_ACTION_HXX
+#include "graphic_context.hxx"
#include "pingu_enums.hxx"
class Pingu;
@@ -74,9 +75,8 @@
/// The "AI" of the pingu.
virtual void update (float delta) = 0;
- /** Draws the surfaced defined by the action, can be overwritten if
- the action needs a more complicated way of drawing. */
- virtual void draw_offset (int x, int y, float s) =0;
+ /** Draws the action */
+ virtual void draw (GraphicContext& gc) =0;
/// Returns the activation mode
virtual ActionType get_activation_mode (void) const;
Index: pingu_holder.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/pingu_holder.cxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- pingu_holder.cxx 4 Sep 2002 14:55:11 -0000 1.5
+++ pingu_holder.cxx 4 Sep 2002 20:30:28 -0000 1.6
@@ -62,7 +62,7 @@
}
void
-PinguHolder::draw_offset(int x_of, int y_of, float s)
+PinguHolder::draw (GraphicContext& gc)
{
PinguIter pingu = pingus.begin();
@@ -85,7 +85,7 @@
// We don't draw the actions here, since we want them above
// all other pingus, for better visibility
if (!(*pingu)->get_action())
- (*pingu)->draw_offset(x_of, y_of, s);
+ (*pingu)->draw (gc);
// move to the next Pingu
pingu++;
@@ -96,7 +96,7 @@
for(pingu = pingus.begin(); pingu != pingus.end(); pingu++)
{
if ((*pingu)->get_action())
- (*pingu)->draw_offset(x_of, y_of, s);
+ (*pingu)->draw (gc);
}
}
Index: pingu_holder.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/pingu_holder.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- pingu_holder.hxx 23 Aug 2002 15:49:49 -0000 1.3
+++ pingu_holder.hxx 4 Sep 2002 20:30:28 -0000 1.4
@@ -52,7 +52,7 @@
PinguHolder();
~PinguHolder();
- void draw_offset(int, int, float s = 1.0);
+ void draw (GraphicContext& gc);
int total_size();
int get_saved() { return saved_pingus; }
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src hotspot.cxx,1.3,1.4 pingu.cxx,1.21,1.22 pingu.hxx,1.12,1.13 pingu_action.hxx,1.13,1.14 pingu_holder.cxx,1.5,1.6 pingu_holder.hxx,1.3,1.4,
grumbel <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/src Makefile.am,1.93,1.94 client.cxx,1.18,1.19 col_map.cxx,1.6,1.7 col_map.hxx,1.5,1.6 entrance.cxx,1.4,1.5 entrance.hxx,1.3,1.4 exit.cxx,1.5,1.6 exit.hxx,1.3,1.4 hotspot.cxx,1.2,1.3 hotspot.hxx,1.3,1.4 liquid.cxx,1.3,1.4 liquid.hxx,1.3,1.4 pingu_map.cxx,1.1,1.2 pingu_map.hxx,1.3,1.4 playfield_view.cxx,1.1,1.2 playfield_view.hxx,1.4,1.5 spot_map.cxx,1.9,1.10 spot_map.hxx,1.4,1.5 view.cxx,1.8,1.9 view.hxx,1.7,1.8 world.cxx,1.20,1.21 world.hxx,1.9,1.10 worldobj.cxx,1.5,1.6 bmp_map.cxx,1.2,NONE bmp_map.hxx,1.3,NONE
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/src/worldobjs info_box.cxx,1.6,1.7
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/src Makefile.am,1.93,1.94 client.cxx,1.18,1.19 col_map.cxx,1.6,1.7 col_map.hxx,1.5,1.6 entrance.cxx,1.4,1.5 entrance.hxx,1.3,1.4 exit.cxx,1.5,1.6 exit.hxx,1.3,1.4 hotspot.cxx,1.2,1.3 hotspot.hxx,1.3,1.4 liquid.cxx,1.3,1.4 liquid.hxx,1.3,1.4 pingu_map.cxx,1.1,1.2 pingu_map.hxx,1.3,1.4 playfield_view.cxx,1.1,1.2 playfield_view.hxx,1.4,1.5 spot_map.cxx,1.9,1.10 spot_map.hxx,1.4,1.5 view.cxx,1.8,1.9 view.hxx,1.7,1.8 world.cxx,1.20,1.21 world.hxx,1.9,1.10 worldobj.cxx,1.5,1.6 bmp_map.cxx,1.2,NONE bmp_map.hxx,1.3,NONE
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/src/worldobjs info_box.cxx,1.6,1.7
- Index(es):