Original Post
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?