[Kde-games-devel] Review Request: Port KLines to KGameRenderer
Parker Coates
parker.coates at kdemail.net
Tue Sep 21 16:42:26 CEST 2010
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://svn.reviewboard.kde.org/r/5399/#review7705
-----------------------------------------------------------
/trunk/KDE/kdegames/klines/ballitem.cpp
<http://svn.reviewboard.kde.org/r/5399/#comment7820>
You're not actually using the KGameRenderedItem API at all, so there's no point in porting this class from from QGraphicsPixmapItem. In fact doing so just adds extra overhead.
Ideally, you should be using KGRI's built-in support for animation frames, sprite keys, threaded renderering, etc. instead of just calling setPixmap manually.
/trunk/KDE/kdegames/klines/renderer.h
<http://svn.reviewboard.kde.org/r/5399/#comment7821>
Why not make KLinesRenderer inherit from KGameRenderer? This is the approach used by most of the other games. It would remove the need for the renderer() method.
/trunk/KDE/kdegames/klines/renderer.h
<http://svn.reviewboard.kde.org/r/5399/#comment7827>
Extra whitespace.
/trunk/KDE/kdegames/klines/renderer.h
<http://svn.reviewboard.kde.org/r/5399/#comment7826>
Extra whitespace.
/trunk/KDE/kdegames/klines/renderer.cpp
<http://svn.reviewboard.kde.org/r/5399/#comment7825>
Extra whitespace.
/trunk/KDE/kdegames/klines/renderer.cpp
<http://svn.reviewboard.kde.org/r/5399/#comment7828>
Why not drop the customSize parameter entirely? As far as I can tell, all calls using the customSize parameter can just be replaced with direct calls to spritePixmap().
/trunk/KDE/kdegames/klines/renderer.cpp
<http://svn.reviewboard.kde.org/r/5399/#comment7823>
Extra whitespace.
/trunk/KDE/kdegames/klines/renderer.cpp
<http://svn.reviewboard.kde.org/r/5399/#comment7822>
Commented out code.
/trunk/KDE/kdegames/klines/renderer.cpp
<http://svn.reviewboard.kde.org/r/5399/#comment7824>
Extra whitespace.
- Parker
On 2010-09-21 13:07:22, Lindsay Mathieson wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://svn.reviewboard.kde.org/r/5399/
> -----------------------------------------------------------
>
> (Updated 2010-09-21 13:07:22)
>
>
> Review request for KDE Games.
>
>
> Summary
> -------
>
> Updates klines to use KGameRenderer and KGameRenderedItem in place of QSvgRenderer and QGraphicsPixmapItem
> Removes KPixmapCache usage
>
>
> Diffs
> -----
>
> /trunk/KDE/kdegames/klines/ballitem.h 1177731
> /trunk/KDE/kdegames/klines/ballitem.cpp 1177731
> /trunk/KDE/kdegames/klines/renderer.h 1177731
> /trunk/KDE/kdegames/klines/renderer.cpp 1177731
>
> Diff: http://svn.reviewboard.kde.org/r/5399/diff
>
>
> Testing
> -------
>
> Playing game
> Changing themes
> Resizing game
> Comparison with original
>
>
> Thanks,
>
> Lindsay
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kde-games-devel/attachments/20100921/5af3ea7b/attachment-0001.htm
More information about the kde-games-devel
mailing list