Advertisement

Blitting problems

Started by December 10, 2000 02:49 PM
3 comments, last by Strife 24 years ago
Ok, first of all, I asked this earlier in the DX... and other APIs forum, but got no response. Anyway, here''s the problem: I''m having trouble blitting under DX8 when using the ddutil.h/.cpp files. Here''s my blitting code: int CEntity::blit_to_buffer(int x,int y, CSurface *surf) // blit surface to back buffer { // blit it if(FAILED(hresult = display->ColorKeyBlt((DWORD)x, (DWORD)y, surf->GetDDrawSurface()))) { CRoidsGeneral::error("Can''t blit!",hresult); return 0; } else return 1; } When I run it, I get the message box that says "Can''t blit!". It''s also supposed to show the error (that''s what hresult is for). I''m guessing that since it doesn''t show the error means that DXGetErrorString8() doesn''t work with DD errors. Is there a function like this that does? If I can know this, I''ll probably be able to find out the blitting problem. Until then, does anyone have any ideas of what it might be? Currently consolidating my power... Commander M (a.k.a. Crazy Yank, digitalp1aya, and countless other things) http://commanderm.8m.com CmndrM@gdnmail.net
Wow, people here are a lot of help...

Currently consolidating my power...

Commander M
(a.k.a. Crazy Yank, digitalp1aya, and countless other things)
http://commanderm.8m.com
CmndrM@gdnmail.net
Advertisement
Are you using DX7 or 8? Sounds like 7, otherwise you wouldn''t be able to access DirectDraw. If it is 7, make sure that all your other drawing and 3D (graphics in general) stuff is using DX7, too.
In that case, there was a D3DX function that does the same thing as DXGetErrorString8(), but for DX7 errors - D3DXGetErrorString(), or something like that. You''d better do some research on that one, cause I''ve only got the DX8 docs, and it won''t have the DX7 version. You could try going through the header files of DX to find old function headers.

Hope that helped.


IO_FissionSig();
Ok, I''ll try that...

BTW, I''ve got DX8, and you CAN use DDraw with it . It''s really just the DD7 interfaces, though...

Currently consolidating my power...

Commander M
(a.k.a. Crazy Yank, digitalp1aya, and countless other things)
http://commanderm.8m.com
CmndrM@gdnmail.net
Yeah, well i know you can use DDraw7 from the DX8 SDK, but you have to do a bit of odd manipulation to get it. Better to use either DirectGraphics (v8) or DirectDraw & Direct3D (v7), but don''t try to mix them.


IO_FissionSig();

This topic is closed to new replies.

Advertisement