Skip to main content
gamedev.net
🔒 Locked

bltfast question

Started by frizb Dec 21, 1999 at 6:36 PM 2 replies 700+ views
Original Post
frizb
frizb

OK, I've been stuck for about 2 days now on what should be an easy thing to figure out. But I'm not getting it.

Suppose I have the following:

int dx; // represents the destination x
int dy; // represents the destination y

int xvel; // move x
int yvel; // move y

//global
int xnew = 0;
int ynew = 0;
============

dx = 100;
dy = 100;

xvel = 5;
yvel = 5;

xnew = dx + xvel;
ynew = dy + yvel;

lpddsback->BltFast(xnew,ynew, lpddsoff2, NULL, FALSE);

// shouldn't this update the location of the image with the new location? Assume the lpddsoff2 holds the image. Each time this is called doesn't the xnew,ynew hold the updated total of (X,Y)? I tried changing it to static, but isn't already static? What the heck am I doing wrong?


The way I have it figured it should run itself right off the screen after a couple of calls, but it doesn't move

------------------
Still Learning...

Still Learning...
blaze
blaze
Once you do get that baby moving, you'll need to do your own clipping or it won't move properly off of the edge of the screen.
--Shannon Schlomer, BLAZE Technologies, Inc.
frizb
frizb
Thanks. I did get it working and I set up borders around the screen except where I needed to be able to exit the screen. Its working great now though. Thanks again!

------------------
Still Learning...

Still Learning...

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.