![]() Shoutbox (View Full Shoutbox)
|
||||
Click Refresh to load shouts. |
||||
|
[FASM] Tibia sprite to RGB(A)
|
|
03-02-2010, 01:28 PM
(This post was last modified: 03-02-2010 09:21 PM by Ian. Edit Reason: Added highlighting)
Post: #1
|
|||
|
|||
|
[FASM] Tibia sprite to RGB(A)
To read single sprite you need to:
To read all sprites you should get whole file at once. It can process 30 000 sprites in 1 second: select asm
proc readSprSprite dest, source cld mov esi, [source] mov edi, [dest] add esi, 3 lodsw movzx ecx, ax ; test ecx, ecx it may not be useful ; jz .skip add ecx, esi .petla: push ecx lodsw movzx ecx, ax xor eax, eax ;ONLY RGBA rep stosd ;ONLY RGBA ;mov eax, 0800080h ;RGB color for transparency ;.alpha: ;RGB ; stosw ;RGB ; ror eax, 16 ;RGB ; stosb ;RGB ; ror eax, 16 ;RGB ; loop .alpha ;RGB lodsw movzx ecx, ax .petla2: movsw movsb mov al, 0FFh ;ONLY RGBA stosb ;ONLY RGBA loop .petla2 pop ecx cmp ecx, esi ja .petla .skip: ret endp |
|||
|
03-02-2010, 03:23 PM
Post: #2
|
|||
|
|||
|
RE: [FASM] Tibia sprite to RGB(A)
Thats freaking sexy.
|
|||
|
« Next Oldest | Next Newest »
|

![[-]](images/mint/collapse.gif)



