Hi Jeremy,
Thank you for your report. About your bugfix, it's something like
that ? ...
114 void TileItem_AlphaSoftware::Dig(const Point2i &position, const
Surface& dig) {
115 need_check_empty = true;
... ...
120
121 for (int py = starting_y ; py < ending_y ; py++) {
122 for (int px = starting_x ; px < ending_x ; px++) {
123 if ( *(Uint32 *)(dig.GetPixels() +
(py-position.y)*dig.GetPitch() + (px-position.x) * 4) != 0) {
124 *(Uint32 *)(m_surface.GetPixels() +
py*m_surface.GetPitch() + px * 4) = 0;
125 }
126 }
127 }
128 }
Le dimanche 16 mai 2010 à 20:48 -0700, Jeremy Hiatt a écrit :
> Hi all,
>
> First off, thanks for making this game! It's really fun.
>
> I came across a really strange bug where the airhammer doesn't dig.
> The sound effects and animation run but no hole appears in the ground.
> I'm running Wormux 0.9.2 on a PowerPC Mac (PowerBook G4 laptop running
> OS X 10.5). The issue appears both in the 0.9.2 binary I downloaded
> from the website, and a version I built from SVN trunk.
>
> I think I tracked down the source of the bug. It appears in src/map/
> tileitem.cpp, in the TileItem_AlphaSoftware::Dig function. I believe
> the problem is with endianness. I was able to fix the issue by taking
> out the (+ 3) from the pixel indexing, and then casting the pointer
> type to a (Uint32 *) so it would read/write the whole 32-bit value
> instead of looking at the wrong byte.
>
> Please let me know if anything in my description of the problem/
> solution was unclear.
>
> -Jeremy
>
> _______________________________________________
> Wormux-dev mailing list
> [email protected]
> https://mail.gna.org/listinfo/wormux-dev
_______________________________________________
Wormux-dev mailing list
[email protected]
https://mail.gna.org/listinfo/wormux-dev