DDraw, DirectX 7 SDK - Load bmp to DirectDrawSurface??

Im stuck - Im looking for a function that can take a bmp from file and put it to a surface...only I cant find one that VC++ 6.0 recognizes..
there errror is sometimes "unresolved external" and sometimes "undeclared identifier" (on the function)..

Ive included "mssdkINCLUDE" ... is there something else Im missing? or maybe another function? Ive tried:
DDLoadBitmap
DDReLoadBitmap
DDCopyBitmap
copyBitmap

....any help would be appreciated. blasted "tutorials" and "help" files lie/ dont tell me if I need to add a directory to include..

Comments

  • : Im stuck - Im looking for a function that can take a bmp from file and put it to a surface...only I cant find one that VC++ 6.0 recognizes..
    : there errror is sometimes "unresolved external" and sometimes "undeclared identifier" (on the function)..
    :
    : Ive included "mssdkINCLUDE" ... is there something else Im missing? or maybe another function? Ive tried:
    : DDLoadBitmap
    : DDReLoadBitmap
    : DDCopyBitmap
    : copyBitmap
    :
    : ....any help would be appreciated. blasted "tutorials" and "help" files lie/ dont tell me if I need to add a directory to include..
    :

    Did you include the ddutil.cpp to the project? if not, it can be found in the examples src directory, look under example 2 i think...
  • : Did you include the ddutil.cpp to the project? if not, it can be found in the examples src directory, look under example 2 i think...
    :

    Thanks ..but it's already #included. Any other suggestions, Pag, anyone? They'd be greatly appreciated.

    btw, also included are:
    #include
    #include
    #include


    [italic]"Ah yes," he said, "that's to do with the day I finally realized that the world had gone totally mad and built the Asylum to put it in, poor thing, and hoped it would get better."[/italic]

  • : : Did you include the ddutil.cpp to the project? if not, it can be found in the examples src directory, look under example 2 i think...
    : :
    :
    : Thanks ..but it's already #included. Any other suggestions, Pag, anyone? They'd be greatly appreciated.
    :
    : btw, also included are:
    : #include
    : #include
    : #include
    :
    :
    : [italic]"Ah yes," he said, "that's to do with the day I finally realized that the world had gone totally mad and built the Asylum to put it in, poor thing, and hoped it would get better."[/italic]
    :
    :

    well another way of doing it is writing your own functions, it isnt really that hard, and you would probably learn a few things on the way... I remember I did it, but since it was a year ago and I have jumped over to opengl, so I can't provide any source code... :(

  • Here's what you have to do:
    1. Lock the surface.
    2. Open your .bmp file, read the header (dimensions etc.), skip it and read the pixels and write them right into the surface. Pay attention to the alignment.
    3. Unlock the surface.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories