[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Pingus on a PowerPC
From: |
Cedric Pradalier |
Subject: |
Pingus on a PowerPC |
Date: |
Thu, 20 May 2004 19:35:54 +0200 |
Hi all,
I just made Pingus (0.6.5) work nicely on a PowerPC (big endian)
(ibook2) with Debian, and debian patches applied. The challenge was that
a lot of images where badly colored or had wrong alpha on a big endian
arch, even with the debian endianness patch.
After some investigation, I found that it was mainly due to wrong
management of endianness in ClanLib when loading PNG of JPEGs, and also
when preparing surfaces for display.
Pingus had only a minor responsibility in this in blitter.cxx :
create_canvas and scale_canvas are very little endian dependant.
Nevertheless, this is OK know, with small modifs in pingus and more
complex ones in clanlib, my pinguins are no longer mangentish, yellowish
or greenish, neither transparent.
Also I tried to think about reducing the CPU usage to be able to play
more than 5 minutes on an unplugged laptop. The first thing to do is to
attach really some code to the min-cpu-usage flag : a 40ms (25fps) sleep
between each frame seems to be fine (in screen manager : )
if (max_cpu_usage)
// Stupid hack to make this thing take less CPU
CL_System::sleep (0);
else
// 25 fps is enough
CL_System::sleep (40);
To be really efficient it would be necessary to avoid redrawing the
whole screen at each step... but I agree that it's much more complex
I can give further details if someone is interested.
--
Cedric
"[Of course] I'm French! Why do think I have this outrageous
accent, you silly king-a?!" Monty Python and the Holy Grail
- Pingus on a PowerPC,
Cedric Pradalier <=