WrapBlit x and y reversed
Displaying 1-6 of 6 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
geronimo

WrapBlit seems to have its X and Y reversed. ^^

Posted on 2004-04-15 09:42:53

vecna

ack dblpost

Posted on 2004-04-15 13:01:35 (last edited on 2004-04-15 13:02:01)

vecna

Hmm. Doesnt seem like it to me. Doublecheck it, if it still seems reversed, try to send me some code demonstrating the problem, but a simple test seems to work fine.

Posted on 2004-04-15 13:01:36

geronimo

Just doublechecked, and here's the code. The snippet is pulled from a while loop. I figure if X is being decremented and Y is being incremented the background should scroll Left and Down. But left as shown below, it scrolls to the Right and Up.


WrapBlit(x,y,optbg,screen);
x--;
y++;
if(y==128)
{
x=0;
y=0;
}


optbg image size: 384x256
verge resolution setting: 320x240

Posted on 2004-04-16 01:34:01

vecna

Oh. well, you could consider positive and negative reversed... ^_^ If you do a wrapblit with only x moving or only y moving, you'll see that x and y are correct. However, the x and y arguements are 'offsets to the texture' rather than 'coordinates to the image', which is why it works different.

Also note that you dont have to reset the x/y values. WrapBlit will ... wrap ... the texture coordinates. Which is why slapping a wrapblit(systemtime, systemtime, img, screen) makes a nice, easy effect.

Posted on 2004-04-16 01:50:25

geronimo

ahhh! :D nice.

Posted on 2004-04-16 03:39:23


Displaying 1-6 of 6 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.