[Kde-games-devel] bug ? in libkdegames
Paolo Capriotti
p.capriotti at gmail.com
Thu May 17 10:42:01 CEST 2007
On 5/16/07, Mauricio Piacentini <mauricio at tabuleiro.com> wrote:
> > to match KGameCanvasItem declaration, but changing that makes the
> > KGameCanvasGroup function not compile as it calls += over delta.
> >
> > Can you fix that?
>
> Fix committed, KBattleship and KGoldrunner are back to running state now.
Almost :) You forgot to update the references to delta in the function body:
Index: kgamecanvas.cpp
===================================================================
--- kgamecanvas.cpp (revision 665571)
+++ kgamecanvas.cpp (working copy)
@@ -575,11 +575,11 @@
for(int i=0;i<m_items.size();i++) {
KGameCanvasItem *el = m_items[i];
- QRect r = el->rect().translated(delta);
+ QRect r = el->rect().translated(adelta);
if( el->m_visible && prect.intersects( r ) && preg.contains( r ) ) {
el->m_last_rect = r;
- el->paintInternal(p,prect,preg,delta,cumulative_opacity);
+ el->paintInternal(p,prect,preg,adelta,cumulative_opacity);
}
}
Now it seems to work. I've analyzed the other EBN-related changes, and
they all seem to be safe (though they alter the coding convention used
for kgamecanvas... is this intentional?).
Paolo
More information about the kde-games-devel
mailing list