[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src blitter.cxx,1.16,1.17 blitter.hxx,1.8
From: |
grumbel |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src blitter.cxx,1.16,1.17 blitter.hxx,1.8,1.9 pingus_resource.cxx,1.18,1.19 smallmap.cxx,1.24,1.25 |
Date: |
16 Oct 2002 09:14:47 -0000 |
Update of /usr/local/cvsroot/Games/Pingus/src
In directory dark:/tmp/cvs-serv32403
Modified Files:
blitter.cxx blitter.hxx pingus_resource.cxx smallmap.cxx
Log Message:
- added pathfinding cache for worldmap
- put some stuff in the blitter class where it belongs
Index: blitter.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/blitter.cxx,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- blitter.cxx 28 Sep 2002 22:24:24 -0000 1.16
+++ blitter.cxx 16 Oct 2002 09:14:45 -0000 1.17
@@ -632,4 +632,35 @@
return CL_Surface(canvas, true);
}
+
+CL_Surface
+Blitter::rotate_180 (const CL_Surface& sur)
+{
+ return Blitter::rotate_90(Blitter::rotate_90(sur));
+}
+
+CL_Surface
+Blitter::rotate_270 (const CL_Surface& sur)
+{
+ return Blitter::rotate_90(Blitter::rotate_90(Blitter::rotate_90(sur)));
+}
+
+CL_Surface
+Blitter::rotate_90_flip (const CL_Surface& sur)
+{
+ return Blitter::flip_horizontal(Blitter::rotate_90(sur));
+}
+
+CL_Surface
+Blitter::rotate_180_flip (const CL_Surface& sur)
+{
+ return Blitter::flip_horizontal(Blitter::rotate_90(Blitter::rotate_90(sur)));
+}
+
+CL_Surface
+Blitter::rotate_270_flip (const CL_Surface& sur)
+{
+ return
Blitter::flip_horizontal(Blitter::rotate_90(Blitter::rotate_90(Blitter::rotate_90(sur))));
+}
+
/* EOF */
Index: blitter.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/blitter.hxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- blitter.hxx 27 Sep 2002 11:26:43 -0000 1.8
+++ blitter.hxx 16 Oct 2002 09:14:45 -0000 1.9
@@ -87,6 +87,16 @@
/** Rotate a surface 90 degrees */
static CL_Surface rotate_90 (const CL_Surface& sur);
+ static CL_Surface rotate_180 (const CL_Surface& sur);
+
+ static CL_Surface rotate_270 (const CL_Surface& sur);
+
+ static CL_Surface rotate_90_flip (const CL_Surface& sur);
+
+ static CL_Surface rotate_180_flip (const CL_Surface& sur);
+
+ static CL_Surface rotate_270_flip (const CL_Surface& sur);
+
/** Creates a new canvas with the given width and height and
stretches the source surface onto it, the caller is responsible
to delete the returned CL_Canvas.
Index: pingus_resource.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/pingus_resource.cxx,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- pingus_resource.cxx 14 Oct 2002 11:15:15 -0000 1.18
+++ pingus_resource.cxx 16 Oct 2002 09:14:45 -0000 1.19
@@ -183,22 +183,22 @@
return Blitter::rotate_90(surf);
case ResourceModifierNS::ROT180:
- return Blitter::rotate_90(Blitter::rotate_90(surf));
+ return Blitter::rotate_180(surf);
case ResourceModifierNS::ROT270:
- return Blitter::rotate_90(Blitter::rotate_90(Blitter::rotate_90(surf)));
+ return Blitter::rotate_270(surf);
case ResourceModifierNS::ROT0FLIP:
return Blitter::flip_horizontal(surf);
case ResourceModifierNS::ROT90FLIP:
- return Blitter::flip_horizontal(Blitter::rotate_90(surf));
+ return Blitter::rotate_90_flip(surf);
case ResourceModifierNS::ROT180FLIP:
- return
Blitter::flip_horizontal(Blitter::rotate_90(Blitter::rotate_90(surf)));
+ return Blitter::rotate_180_flip(surf);
case ResourceModifierNS::ROT270FLIP:
- return
Blitter::flip_horizontal(Blitter::rotate_90(Blitter::rotate_90(Blitter::rotate_90(surf))));
+ return Blitter::rotate_270_flip(surf);
default:
perr << "PingusResource: Unhandled modifier: " << res_desc.modifier <<
std::endl;
Index: smallmap.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/smallmap.cxx,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- smallmap.cxx 14 Oct 2002 11:15:15 -0000 1.24
+++ smallmap.cxx 16 Oct 2002 09:14:45 -0000 1.25
@@ -243,7 +243,7 @@
void
SmallMap::update (float delta)
{
- float smallmap_update_time = 2.0f;
+ float smallmap_update_time = 1.0f;
update_count += delta;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src blitter.cxx,1.16,1.17 blitter.hxx,1.8,1.9 pingus_resource.cxx,1.18,1.19 smallmap.cxx,1.24,1.25,
grumbel <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/src/editor editor_event.cxx,1.39,1.40
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/src/worldmap path_graph.cxx,1.14,1.15 path_graph.hxx,1.6,1.7 pathfinder.hxx,1.10,1.11
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/src/editor editor_event.cxx,1.39,1.40
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/src/worldmap path_graph.cxx,1.14,1.15 path_graph.hxx,1.6,1.7 pathfinder.hxx,1.10,1.11
- Index(es):