You are not logged in.
I use GRRLIB_DrawImg for displaying images in my platform game.
When an object hits an object it turns direction (and flip image horizontally): I tought passing -1 parameter to the zoom one, as the doc says.
GRRLIB flips the image but when I try to display it the coordinate isn't correct, infact the starting coordinate of display is flipped too.
The following code produces the image I posted.
int x = 10; GRRLIB_DrawImg(x, 10, tex_square, 0, 1, 1, 0xFFFFFFFF); GRRLIB_DrawImg(x, 60, tex_square, 0, -1, 1, 0xFFFFFFFF);
I tried to add a workaround, adding image width to the x coordinate:
GRRLIB_DrawImg(x+tex_square->w, 60, tex_square, , -1, 1, 0xFFFFFFFF);
It works correctly, but in the game, only at a specific zone (99% of the rest of the game it work), exactly at same location, the game CRASHES.
The address of the function in the dump shows me that the error is in the GRRLIB_DrawImg.
It doesn't crash if I remove the -1.
I don't know where the problem could be...
1) Is the flipping behaviour intended?
2) Where could be the problem?
3) Any workaround?
Thanks in advance
Offline
hi,
have a look at the function : GRRLIB_SetHandle
Offline
It is what I tought initially, but before adding it as workaround I wanted to know if that beahaviour was ok.
It works now thanks...my game will be released soon! (I'm still searching some japanese guy to translate some text message)
Offline