Rev 109 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 109 | Rev 135 | ||
---|---|---|---|
Line 2... | Line 2... | ||
2 | ; Written in pure assembler by Ivushkin Andrey aka Willow |
2 | ; Written in pure assembler by Ivushkin Andrey aka Willow |
3 | ; |
3 | ; |
4 | ; This include file will contain functions to handle GIF image format |
4 | ; This include file will contain functions to handle GIF image format |
5 | ; |
5 | ; |
6 | ; Created: August 15, 2004 |
6 | ; Created: August 15, 2004 |
7 | ; Last changed: September 9, 2004 |
7 | ; Last changed: August 25, 2006 |
Line 8... | Line 8... | ||
8 | 8 | ||
9 | ; Change COLOR_ORDER in your program |
9 | ; Change COLOR_ORDER in your program |
Line 10... | Line 10... | ||
10 | ; if colors are displayed improperly |
10 | ; if colors are displayed improperly |
Line 86... | Line 86... | ||
86 | xor eax,eax |
86 | xor eax,eax |
87 | mov [.globalColor],eax |
87 | mov [.globalColor],eax |
88 | mov [.img_count],eax |
88 | mov [.img_count],eax |
89 | inc eax |
89 | inc eax |
90 | cmp dword[esi],'GIF8' |
90 | cmp dword[esi],'GIF8' |
91 | jne .er ; signature |
91 | jne .ex ; signature |
92 | mov ecx,[esi+0xa] |
92 | mov ecx,[esi+0xa] |
93 | inc eax |
93 | inc eax |
94 | add esi,0xd |
94 | add esi,0xd |
95 | mov edi,esi |
95 | mov edi,esi |
96 | bt ecx,7 |
96 | bt ecx,7 |
Line 121... | Line 121... | ||
121 | jne .nextblock |
121 | jne .nextblock |
122 | add edi,13 |
122 | add edi,13 |
123 | jmp .block_skip |
123 | jmp .block_skip |
124 | .noextblock: |
124 | .noextblock: |
125 | cmp byte[edi],0x2c ; image beginning |
125 | cmp byte[edi],0x2c ; image beginning |
126 | jne .er |
126 | jne .ex |
127 | inc [.img_count] |
127 | inc [.img_count] |
128 | inc edi |
128 | inc edi |
129 | mov esi,[.cur_info] |
129 | mov esi,[.cur_info] |
130 | add esi,4 |
130 | add esi,4 |
131 | xchg esi,edi |
131 | xchg esi,edi |
Line 209... | Line 209... | ||
209 | push ebx |
209 | push ebx |
210 | movzx eax,bx |
210 | movzx eax,bx |
211 | call .Gif_output |
211 | call .Gif_output |
212 | pop ebx eax |
212 | pop ebx eax |
213 | jmp .add |
213 | jmp .add |
214 | .er: |
- | |
215 | pop edi |
- | |
216 | jmp .ex |
- | |
217 | .end: |
214 | .end: |
218 | mov eax,[.cur_info] |
215 | mov eax,[.cur_info] |
219 | mov [eax],edi |
216 | mov [eax],edi |
220 | mov [.cur_info],edi |
217 | mov [.cur_info],edi |
221 | add esi,2 |
218 | add esi,2 |