Results 1 to 3 of 3

Thread: Strange DD prob.

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jul 2000
    Posts
    225
    Hiyas,

    My Directdraw game is mostly working...but something very strange I came across :

    Code:
        Set DXTUnits = Nothing
        DDsd3.lFlags = DDSD_CAPS Or DDSD_HEIGHT Or DDSD_WIDTH
        DDsd3.ddsCaps.lCaps = DDSCAPS_OFFSCREENPLAIN
        DDsd3.lWidth = 2300
        DDsd3.lHeight = 50
        Set DXTUnits = DD.CreateSurfaceFromFile(App.Path & "\DXTUnits.bmp", DDsd3)
        DXTUnits.SetColorKey DDCKEY_SRCBLT, Key
    That surface-loading code works perfectly on my Duron 800/GeForce 2 MX based machine. I run it at 1024x768 resolution, and I can run the game at virtually any resolution (usually at 640x480 or 800x600)...

    However... On my P200, which runs at 800x600 (max supported res is 1024x768) and 640x480 in-game, I cannot get the game to work. When I debuged it, I found that it does not like the width being 2300: it dies on that line. I changed it to 640, it works. 641 and it dies.

    What is wrong, how do I fix it, and how do I avoid it in happening again in the future? (btw I'd really prefer to keep the ability to have surfaces above 640x480...otherwise it will create a major pain for my game's development!)

    -Git

  2. #2
    Fanatic Member PsychoMark's Avatar
    Join Date
    Feb 2001
    Location
    Netherlands
    Posts
    540
    It's not that strange, a lot of video cards can't handle surfaces wider than the screen. I think a solution is to add the SYSTEMMEMORY flag when creating the surface, this'll stop the surface from being created in Video Memory, but I think it'll be a little bit slower when performing blitting operations...
    Teaudirenopossum.Musasapientumfixaestinaure.
    (I can't hear you. There's a banana in my ear)

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jul 2000
    Posts
    225
    Thanks - fixed it. =) I can't see any bad speed difference either...

    -Git

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width