08-16-2002, 01:21 PM
Yo people, im makin my multiplayer RPG with DirectDraw7 - and im makin the engine, and i just wanna know how to get 2 or more pictures in seperate locations on one surface, like a still map with 3 people walkin round, do i use loads of rects and blt them all 1 by one onto the Buffer thing, or is their another way, plz help.
Ive stuck on a pic so u can see wht the layouts like if ure interested :p
08-17-2002, 05:03 PM
You can do it a number of ways. You could use a for loop and do like for i = 1 to 3 then stick the blt code in there but each time in the for bring in the next values with an array. Something like this...
First load in the coords:
type player(1 to 3)
x as integer
y as integer
The way I did the coords is really stupid. It was just to show that somehow you need to hold all of there x and y values but also have then in an array.
Then do something like this...
for i = 1 to 3
blitting code goes here and have it use like player(i).x and player(i).y for the coords so each time it loops it blts to the new places.
08-18-2002, 01:33 AM
That helps, but its not the whole answer i was lookin for, i need the code that blits it, in the for and next block.
I need to see how to use the rects for this bit
08-18-2002, 07:37 PM
go find the following in your DX7 SDK docs:
Here's the flow
Create Primary surface
Attach Backbuffer to the primary surface
load surface(s) from file(s)
do until trigger
blt loaded surface to backbuffer (order is important to determine who's on top)
flip backbuffer to primary surface
For beginners, just use single frame bitmaps. You can blt the whole image just by passing a blank RECT. Just make sure that the whole bitmap fits inside the backbuffer(the current screen resolution), as we haven't initialized a clipper or made a custom clipping routine.
I am assuming you are using fullscreen mode.
08-21-2002, 11:13 AM
Dont matter anymore, dunno why i dint think of it be b4... btw
Im NOT a begginer ;) Begginners dont make MMORPGs, that pics outa date now aswel
08-22-2002, 02:21 AM
Beginner with Directdraw, then. ;-)