draw_sprite_ext not working

S

sir_derp

Guest
I'm trying to use draw_sprite_ext to draw a sprite to a surface, but it doesn't seem to draw the sprite if the xscale or yscale is negative. Any ideas?
 
P

Phemus

Guest
You may forgot put your object to room. Cause I think it works normal when you write negative. Did you add this to Draw Event?
 
S

sir_derp

Guest
You may forgot put your object to room. Cause I think it works normal when you write negative. Did you add this to Draw Event?
-the object is definitely in the room
-it's not working normally.
-it's being called from a script, and it works normally if boths scales have the same sign..
 
C

CoderJoe

Guest
Code please? Can't really help without it as it should work fine with a negative scale.
 

obscene

Member
Without comments in your code I got no earthly idea what all that is lol.

But, since you are drawing onto a surface at 0,0, and your xscale is negative, could it be that whatever you're drawing is actually being flipped off the left side of the surface into the negative area, off the surface, therefore being discarded?
 
S

sir_derp

Guest
Without comments in your code I got no earthly idea what all that is lol.

But, since you are drawing onto a surface at 0,0, and your xscale is negative, could it be that whatever you're drawing is actually being flipped off the left side of the surface into the negative area, off the surface, therefore being discarded?
but if the rotation is 90 degrees and the xscale is -1 then shouldn't it still render in the same place?
 

obscene

Member
Draw it at some other place than 0,0 to see. In theory that sounds right but there's too much going on there I don't know.
 
S

sir_derp

Guest
So I tried this:

draw_sprite_ext(map,0, 15, 15, 1, 1, 0, c_white, 1);

and got:
screen.PNG

then I tried this:

draw_sprite_ext(map,0, 15, 15, -1, 1, 0, c_white, 1);

and got this:
screen2.PNG
 
Top