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

Directx Animation help!

Started by arwez Jul 6, 2000 at 9:24 AM 2 replies 250+ views
Original Post
arwez
arwez
Here''s a snippet of code that didn''t work for me: lpdirectdraw4 frames[3] int currentframe if key= left currentframe=0 if key= right currentframe=1 if key= up currentframe=2 ETC. bltfast(currentframe) the screen turns black the monitor clicks and I''m back in VC++. However if I remove that snippet it blts the background as regular.
ByteMe95
ByteMe95
Could you copy out your actual code, it''s too ahrd to figure the problem out from that pseudo-code
ByteMe95::~ByteMe95()My S(h)ite
arwez
arwez
oh yeah I also used ddutil.cpp to copy the bitmaps in to a surface.

frame[1]->DDcopybitmaptosurface("lookup.bmp")
frame[2]
frame[3]
ETC.
ByteMe95
ByteMe95
Your code still isn''t specific enough, cant you cut and paste a few things?

First off, if you''re confident that your pseudo code reresents your real code well enough, then you have to declare LPDIRECTDRAWSURFACE Frames, not DIRECTDRAW.

Secondly, make sure you initialize the surfaces correctly and THEN load the bmp file into the surface.

Also make sure your blits are returning with DD_OK, do a check for it cause that problem has caught me many times (such as using BltFast while having a clipper, BIG Mistake)

IF none of this helps at all I suggest you copy some real code in here



------------------------------
fclose(fp)
------------------------------
ByteMe95::~ByteMe95()My S(h)ite

Topic Locked

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

Sign in to reply to this topic.