Skip to main content
GameDev.net gamedev.net
🔒 Locked

VB Directx 7 question

Started by Gregor_Samsa Jan 9, 2001 at 7:26 PM 2 replies 700+ views
Original Post
Gregor_Samsa
Gregor_Samsa
Does anyone know how to create a surface that is larger than the screen size in Visual basic using directx 7? Whenever i try it says that the createSurface method is an invalid procedure call. Does anyone know why this is? I would really appreciate any help you can give because the documentation doesn''t seem to have anything about this. (or at least it''s not very easy to find) "When i was a child I caught a fleeting glimpse, out of the corner of my mind. I turned to look, but it was gone, I cannot put my finger on it now. The child has grown, the dream has gone." -Pink Floyd
"When i was a child I caught a fleeting glimpse, out ofthe corner of my mind. I turned to look, but it was gone, I cannot put my finger on it now. The child hasgrown, the dream has gone." -Pink Floyd
Gregor_Samsa
Gregor_Samsa
Additionally, if you use map tiling to create a background, what do you do when when of the tiles is partially above the screen? For example if one tile only had it''s bottom half at the top of the screen how would you specify the coordinates. Normally you would specify the top-left corner, but that would be off of the coordinate system. So, how would you blit it?

"When i was a child I caught a fleeting glimpse, out of
the corner of my mind. I turned to look, but it was
gone, I cannot put my finger on it now. The child has
grown, the dream has gone." -Pink Floyd
"When i was a child I caught a fleeting glimpse, out ofthe corner of my mind. I turned to look, but it was gone, I cannot put my finger on it now. The child hasgrown, the dream has gone." -Pink Floyd
furby100
furby100
Certain display drivers do not allow surfaces bigger than the primary surface. So you will get an error when trying to create them. To blit a tile to there, use the top left corner, and if you have attached a clipper, it should work absolutely fine (make sure you use Blt, not BltFast)



Just because you''re outnumbered doesn''t mean you''re wrong.


sharewaregames.20m.com

ragonastick
ragonastick
As Furby said, many drivers can''t support surfaces larger than the screen (although they can be taller, they can''t be wider). But if you create the surface in system memory, then you can do it. Just be warned that doing stuff in system memory can sometimes be slow. but try it first and see if it works for you.

With your tile problem, if the tile is half off the screen, then only blit half of it. It is that simple.

You can use a Clipper, just stay away from ClipLists and use a ClipWindow (ClipLists are a bit broken). But I prefer writing my own clipper because it means I can have more control (eg, clipping within a certain area of the screen not just the whole screen) and it is very simple code anyway.

hth

Trying is the first step towards failure.
Trying is the first step towards failure.

Topic Locked

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

Sign in to reply to this topic.