[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] r2510 - in trunk: data/levels/playable src
From: |
jave27 |
Subject: |
[Pingus-CVS] r2510 - in trunk: data/levels/playable src |
Date: |
Fri, 18 Nov 2005 04:29:16 +0100 |
Author: jave27
Date: 2005-11-18 04:29:03 +0100 (Fri, 18 Nov 2005)
New Revision: 2510
Modified:
trunk/data/levels/playable/wland-timpany.pingus
trunk/src/blitter.cxx
Log:
Fixed a bug with ROT90 blitter rotation. Uses BlitterImpl for ROT90 like the
rest of the rotation modifiers now.
Also fixed the exit location on one of the levels.
Modified: trunk/data/levels/playable/wland-timpany.pingus
===================================================================
--- trunk/data/levels/playable/wland-timpany.pingus 2005-11-18 02:26:45 UTC
(rev 2509)
+++ trunk/data/levels/playable/wland-timpany.pingus 2005-11-18 03:29:03 UTC
(rev 2510)
@@ -8,6 +8,7 @@
<number-of-pingus>60</number-of-pingus>
<number-to-save>50</number-to-save>
<time>9000</time>
+<difficulty>50</difficulty>
<playable>0</playable>
<comment>need fix due to head-bounce feature</comment>
<actions>
@@ -120,8 +121,8 @@
<exit>
<owner-id>0</owner-id>
<position>
-<x>975</x>
-<y>553</y>
+<x>1010</x>
+<y>612</y>
<z>0</z>
</position>
<surface>
Modified: trunk/src/blitter.cxx
===================================================================
--- trunk/src/blitter.cxx 2005-11-18 02:26:45 UTC (rev 2509)
+++ trunk/src/blitter.cxx 2005-11-18 03:29:03 UTC (rev 2510)
@@ -713,56 +713,9 @@
/** Rotate a surface 90 degrees */
CL_PixelBuffer
-Blitter::rotate_90 (CL_PixelBuffer prov)
+Blitter::rotate_90 (CL_PixelBuffer sur)
{
- if (prov.get_format().get_type() == pixelformat_index)
- {
- //std::cout << "Using indexed blitter" << std::endl;
- int pwidth = prov.get_width();
- int pheight = prov.get_height();
-
- CL_PixelFormat format(8, 0, 0, 0, 0,
- prov.get_format().has_colorkey(),
prov.get_format().get_colorkey(),
- pixelformat_index);
- CL_PixelBuffer canvas(pheight, pwidth, pwidth, format,
prov.get_palette());
-
- prov.lock();
- canvas.lock();
-
- unsigned char* source_buf = static_cast<unsigned char*>(prov.get_data());
- unsigned char* target_buf = static_cast<unsigned
char*>(canvas.get_data());
-
- for (int y = 0; y < pheight; ++y)
- for (int x = 0; x < pwidth; ++x)
- {
- target_buf[x * pheight + (pheight - y - 1)] = source_buf[y *
pwidth + x];
- }
-
- canvas.unlock();
- prov.unlock();
-
- return canvas;
- }
- else
- {
- CL_PixelBuffer canvas(prov.get_height (), prov.get_width (),
prov.get_height()*4, CL_PixelFormat::rgba8888);
-
- prov.lock ();
- canvas.lock ();
-
- CL_Color color;
- for (int y = 0; y < prov.get_height (); ++y)
- for (int x = 0; x < prov.get_width (); ++x)
- {
- color = prov.get_pixel (x, y);
- canvas.draw_pixel (prov.get_height () - 1 - y, x , color);
- }
-
- canvas.unlock ();
- prov.unlock ();
-
- return canvas;
- }
+ return BlitterImpl::modify(sur, BlitterImpl::transform_rot90());
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] r2510 - in trunk: data/levels/playable src,
jave27 <=