Author: mordante
Date: Fri Apr 4 19:40:12 2008
New Revision: 25545
URL: http://svn.gna.org/viewcvs/wesnoth?rev=25545&view=rev
Log:
Fix some 64 bit issues discovered by boucman.
Modified:
trunk/src/gui/widgets/canvas.cpp
trunk/src/gui/widgets/canvas.hpp
Modified: trunk/src/gui/widgets/canvas.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/canvas.cpp?rev=25545&r1=25544&r2=25545&view=diff
==============================================================================
--- trunk/src/gui/widgets/canvas.cpp (original)
+++ trunk/src/gui/widgets/canvas.cpp Fri Apr 4 19:40:12 2008
@@ -218,7 +218,7 @@
}
}
-void tcanvas::tshape::put_pixel(unsigned start, Uint32 colour, unsigned w,
unsigned x, unsigned y)
+void tcanvas::tshape::put_pixel(ptrdiff_t start, Uint32 colour, unsigned w,
unsigned x, unsigned y)
{
// fixme the 4 is true due to Uint32..
*reinterpret_cast<Uint32*>(start + (y * w * 4) + x * 4) = colour;
@@ -236,7 +236,7 @@
((colour & 0x0000FF00) >> 8),
((colour & 0x000000FF)));
- unsigned start = reinterpret_cast<unsigned>(canvas->pixels);
+ ptrdiff_t start = reinterpret_cast<ptrdiff_t>(canvas->pixels);
unsigned w = canvas->w;
DBG_G_D << "Shape: draw line from "
Modified: trunk/src/gui/widgets/canvas.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/canvas.hpp?rev=25545&r1=25544&r2=25545&view=diff
==============================================================================
--- trunk/src/gui/widgets/canvas.hpp (original)
+++ trunk/src/gui/widgets/canvas.hpp Fri Apr 4 19:40:12 2008
@@ -60,7 +60,7 @@
// draw basic primitives
- void put_pixel(unsigned start, Uint32 colour, unsigned w,
unsigned x, unsigned y);
+ void put_pixel(ptrdiff_t start, Uint32 colour, unsigned w,
unsigned x, unsigned y);
void draw_line(surface& canvas, Uint32 colour,
const unsigned x1, unsigned y1, const unsigned x2,
unsigned y2);
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits