Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Mary_B

Old MSDOS Mode13h Sprite/Buffer problem

This topic is 5723 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have an sprite animation stored in a 40*30 bytes buffer distributed: +--+--+--+--+ |0 |1 |2 |3 | frames 0,1,2... each frame has a +--+--+--+--+ 10*15 pixels dimensions |4 |5 |6 |7 | +--+--+--+--+ <---- 40 ----> the big buffer is a char *Buf, and the small buffer (frame) is a char *Buf2, i have this function to move data between 2 buffers: void Move(word Src,word SrcOfs,word Dst,word DstOfs,word NumBytes) { _asm{ push ds mov ax,[Dst] mov es,ax mov di,[DstOfs] mov ax,[Src] mov ds,ax mov si,[SrcOfs] mov cx,[NumBytes] rep movsb pop ds } } but i don''t know how to use/call the function for get the frame that i want from Buf to Buf2 anyone know how?

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
I guess you need a second loop in adition to your
rep

you need a new function, since calling your for only 10bytes is slow

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!