Rev 1951 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1951 | mario79 | 1 | ;--------------------------------------------------------------------- |
2 | convert_plugin_invoke: |
||
3 | mov eax,[plugin_0_name] |
||
4 | call prepare_convert |
||
5 | push eax |
||
6 | call [Convert_plugin_0.Start] |
||
7 | call check_convert |
||
8 | ;------------------------------- |
||
9 | mov eax,[plugin_1_name] |
||
10 | call prepare_convert |
||
11 | push eax |
||
12 | call [Convert_plugin_1.Start] |
||
13 | call check_convert |
||
14 | ;------------------------------- |
||
15 | mov eax,[plugin_2_name] |
||
16 | call prepare_convert |
||
17 | push eax |
||
18 | call [Convert_plugin_2.Start] |
||
19 | call check_convert |
||
20 | ;------------------------------- |
||
21 | mov eax,[plugin_3_name] |
||
22 | call prepare_convert |
||
23 | push eax |
||
24 | call [Convert_plugin_3.Start] |
||
25 | call check_convert |
||
26 | ;------------------------------- |
||
27 | mov eax,[plugin_4_name] |
||
28 | call prepare_convert |
||
29 | push eax |
||
30 | call [Convert_plugin_4.Start] |
||
31 | call check_convert |
||
32 | ;------------------------------- |
||
33 | mov eax,[plugin_5_name] |
||
34 | call prepare_convert |
||
35 | push eax |
||
36 | call [Convert_plugin_5.Start] |
||
37 | call check_convert |
||
38 | ;------------------------------- |
||
39 | mov eax,[plugin_6_name] |
||
40 | call prepare_convert |
||
41 | push eax |
||
42 | call [Convert_plugin_6.Start] |
||
43 | call check_convert |
||
44 | ;------------------------------- |
||
45 | mov eax,[plugin_7_name] |
||
46 | call prepare_convert |
||
47 | push eax |
||
48 | call [Convert_plugin_7.Start] |
||
49 | call check_convert |
||
50 | ;------------------------------- |
||
51 | mov eax,[plugin_8_name] |
||
52 | call prepare_convert |
||
53 | push eax |
||
54 | call [Convert_plugin_8.Start] |
||
55 | mov eax,[return_code] |
||
56 | call check_convert |
||
57 | ;------------------------------- |
||
58 | mov eax,[plugin_9_name] |
||
59 | call prepare_convert |
||
60 | push eax |
||
61 | call [Convert_plugin_9.Start] |
||
62 | ;------------------------------- |
||
63 | .end: |
||
64 | mov ecx,[image_file] |
||
65 | mcall 68, 13, |
||
66 | ret |
||
67 | ;--------------------------------------------------------------------- |
||
68 | prepare_convert: |
||
69 | cmp eax,dword 'NoKe' |
||
70 | je .1 ;@f |
||
71 | xor eax,eax |
||
72 | mov [return_code],eax |
||
73 | mov eax,image_file |
||
74 | ret |
||
75 | .1: |
||
76 | add esp,4 |
||
77 | jmp convert_plugin_invoke.end |
||
78 | ;--------------------------------------------------------------------- |
||
79 | check_convert: |
||
80 | mov eax,[return_code] |
||
81 | test eax,eax |
||
82 | jz prepare_convert.1 |
||
83 | cmp eax,dword 2 |
||
84 | je prepare_convert.1 |
||
85 | ret |
||
86 | ;--------------------------------------------------------------------- |
||
87 | convert: |
||
88 | xor eax,eax |
||
89 | cmp [error_fs],eax |
||
90 | jnz .error |
||
91 | |||
92 | call convert_plugin_invoke |
||
93 | |||
94 | cmp [return_code],dword 0 |
||
95 | je .all_ok |
||
96 | xor eax,eax |
||
97 | ;------------------------------- |
||
98 | .error_1: |
||
99 | mov [img_size],eax |
||
100 | mov [img_width],eax |
||
101 | mov [img_width_2],eax |
||
102 | mov [img_high],eax |
||
103 | mov [img_high_2],eax |
||
104 | mov [img_resolution],eax |
||
105 | mov [img_resolution_2],eax |
||
106 | mov [img_palette],eax |
||
107 | mov [soi],eax |
||
108 | mov [file_name],eax |
||
109 | mov [Total_Repeat_N],eax |
||
110 | mov [RAW1_pointer],eax |
||
111 | mov [RAW1_flag],al |
||
112 | |||
113 | mov [scaling_mode],dword 100 |
||
114 | call error_window |
||
115 | ret |
||
116 | ;------------------------------- |
||
117 | .error: |
||
118 | xor eax,eax |
||
119 | mov [return_code],eax |
||
120 | jmp .error_1 |
||
121 | ;------------------------------- |
||
122 | .all_ok: |
||
123 | mov ebx,[raw_pointer] |
||
124 | cmp [ebx],dword 'RAW1' |
||
125 | je RAW1_processing |
||
126 | xor eax,eax |
||
127 | mov [RAW1_flag],al |
||
128 | mov [RAW1_pointer],eax |
||
129 | inc eax |
||
130 | mov [Total_Repeat_N],eax |
||
131 | mov eax,[ebx+4] |
||
132 | mov [img_width],eax |
||
133 | mov [img_width_2],eax |
||
134 | mov eax,[ebx+8] |
||
135 | mov [img_high],eax |
||
136 | mov [img_high_2],eax |
||
137 | mov eax,[ebx+12] |
||
138 | mov [img_resolution_2],eax |
||
139 | ; mov eax,[ebx+20] |
||
140 | ; add eax,ebx |
||
141 | ; mov [img_palette],eax |
||
142 | ; mov eax,[ebx+28] |
||
143 | ; add eax,ebx |
||
144 | ; mov [soi],eax |
||
145 | ;------------------------------- |
||
146 | ; xor eax,eax |
||
147 | ; mov [raw_pointer_2],eax |
||
1956 | mario79 | 148 | ; mov eax,image_file |
1951 | mario79 | 149 | ; call [plugin_convert] |
1956 | mario79 | 150 | push dword image_file |
151 | call [convert_Start] |
||
1951 | mario79 | 152 | |
153 | mov ebx,[raw_pointer] |
||
154 | mov eax,[ebx+12] |
||
155 | ; cmp [ebx+18],word 2 |
||
156 | ; jne @f |
||
157 | ; shr eax,1 |
||
158 | ;@@: |
||
159 | cmp eax,15 |
||
160 | jne @f |
||
161 | inc eax |
||
162 | @@: |
||
163 | mov [img_resolution],eax |
||
164 | |||
165 | mov eax,[ebx+20] |
||
166 | add eax,ebx |
||
167 | mov [img_palette],eax |
||
168 | |||
169 | mov eax,[ebx+28] |
||
170 | add eax,ebx |
||
171 | mov [soi],eax |
||
172 | |||
173 | ; mov eax,[raw_pointer_2] |
||
174 | ; test eax,eax |
||
175 | ; jz @f |
||
176 | ; mov [soi],eax |
||
177 | ;@@: |
||
178 | |||
179 | ;------------------------------- |
||
180 | ; mov eax,[img_resolution] |
||
181 | ; cmp eax,32 |
||
182 | ; ja @f |
||
183 | ; cmp [ebx+18],word 2 |
||
184 | ; je @f |
||
185 | ; cmp [ebx+18],word 1 |
||
186 | ; jne .img_resolution_ok |
||
187 | ;.grayscale_16: |
||
188 | ; cmp eax,16 |
||
189 | ; jne .img_resolution_ok |
||
190 | ; shr eax,1 |
||
191 | ; mov [img_resolution],eax |
||
192 | ; jmp .img_resolution_ok |
||
193 | ;@@: |
||
194 | ; shr eax,1 |
||
195 | ; cmp eax,16 |
||
196 | ; jne @f |
||
197 | ; shr eax,1 |
||
198 | ;@@: |
||
199 | ; mov [img_resolution],eax |
||
200 | |||
201 | .img_resolution_ok: |
||
202 | xor eax,eax |
||
203 | mov [scroll_bar_data_vertical.position],eax |
||
204 | mov [scroll_bar_data_horizontal.position],eax |
||
205 | call get_window_param |
||
206 | test [window_status],1b |
||
207 | jnz .end |
||
208 | cmp [scaling_mode],dword 100 |
||
209 | jne .end |
||
210 | mov ebx,[img_high] |
||
211 | mov eax,[img_width] |
||
212 | test ebx, ebx |
||
213 | jns @f |
||
214 | neg ebx |
||
215 | @@: |
||
216 | add eax,9 |
||
217 | cmp eax,770 |
||
218 | jae @f |
||
219 | mov eax,770 |
||
220 | @@: |
||
221 | add ebx,54 |
||
222 | cmp ebx,150 |
||
223 | jae @f |
||
224 | mov ebx,150 |
||
225 | @@: |
||
226 | mov [wnd_width],eax |
||
227 | mov [wnd_height],ebx |
||
228 | |||
229 | mcall 14 |
||
230 | |||
231 | mov ebx,eax |
||
232 | and eax,0xffff |
||
233 | shr ebx,16 |
||
234 | inc eax |
||
235 | inc ebx |
||
236 | cmp eax,[wnd_height] |
||
237 | jae @f |
||
238 | xor eax,eax |
||
239 | mov ax,[scroll_bar_data_vertical.size_x] |
||
240 | add [wnd_width],eax |
||
241 | @@: |
||
242 | cmp ebx,[wnd_width] |
||
243 | jae @f |
||
244 | xor eax,eax |
||
245 | mov ax,[scroll_bar_data_horizontal.size_y] |
||
246 | add [wnd_height],eax |
||
247 | @@: |
||
248 | mov eax,[wnd_width] |
||
249 | mov ebx,[wnd_height] |
||
250 | |||
251 | test [bWasDraw],1 |
||
252 | jz @f |
||
253 | mov esi,ebx |
||
254 | mov edx,eax |
||
255 | mcall 67,-1,-1 |
||
256 | @@: |
||
257 | .end: |
||
258 | ret |
||
259 | ;--------------------------------------------------------------------- |