Archived

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

Old MSDOS Mode13h Sprite/Buffer problem

This topic is 5478 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
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