Subversion Repositories Kolibri OS

Rev

Rev 1956 | Go to most recent revision | Details | 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
148
	mov eax,image_file
149
;	call [plugin_convert]
150
	call [convert_Start]
151
 
152
	mov  ebx,[raw_pointer]
153
	mov  eax,[ebx+12]
154
;	cmp  [ebx+18],word 2
155
;	jne  @f
156
;	shr  eax,1
157
;@@:
158
	cmp  eax,15
159
	jne  @f
160
	inc  eax
161
@@:
162
	mov  [img_resolution],eax
163
 
164
	mov  eax,[ebx+20]
165
	add  eax,ebx
166
	mov  [img_palette],eax
167
 
168
	mov  eax,[ebx+28]
169
	add  eax,ebx
170
	mov  [soi],eax
171
 
172
;    mov  eax,[raw_pointer_2]
173
;    test eax,eax
174
;	jz  @f
175
;    mov  [soi],eax
176
;@@:
177
 
178
;-------------------------------
179
;    mov  eax,[img_resolution]
180
;    cmp  eax,32
181
;    ja   @f
182
;    cmp  [ebx+18],word 2
183
;    je   @f
184
;    cmp  [ebx+18],word 1
185
;    jne  .img_resolution_ok
186
;.grayscale_16:
187
;    cmp  eax,16
188
;    jne  .img_resolution_ok
189
;    shr  eax,1
190
;    mov  [img_resolution],eax
191
;    jmp  .img_resolution_ok
192
;@@:
193
;    shr  eax,1
194
;    cmp  eax,16
195
;    jne  @f
196
;    shr  eax,1
197
;@@:
198
;    mov  [img_resolution],eax
199
 
200
.img_resolution_ok:
201
	xor  eax,eax
202
	mov  [scroll_bar_data_vertical.position],eax
203
	mov  [scroll_bar_data_horizontal.position],eax
204
    call  get_window_param
205
    test  [window_status],1b
206
    jnz   .end
207
	cmp  [scaling_mode],dword 100
208
	jne   .end
209
    mov  ebx,[img_high]
210
    mov  eax,[img_width]
211
	test	ebx, ebx
212
	jns	@f
213
	neg	ebx
214
@@:
215
    add  eax,9
216
    cmp  eax,770
217
    jae  @f
218
    mov  eax,770
219
@@:
220
    add  ebx,54
221
    cmp  ebx,150
222
    jae  @f
223
    mov  ebx,150
224
@@:
225
    mov  [wnd_width],eax
226
    mov  [wnd_height],ebx
227
 
228
	mcall 14
229
 
230
	mov  ebx,eax
231
	and  eax,0xffff
232
	shr  ebx,16
233
	inc  eax
234
	inc  ebx
235
	cmp  eax,[wnd_height]
236
	jae  @f
237
	xor  eax,eax
238
	mov  ax,[scroll_bar_data_vertical.size_x]
239
	add  [wnd_width],eax
240
@@:
241
	cmp  ebx,[wnd_width]
242
	jae  @f
243
	xor  eax,eax
244
	mov  ax,[scroll_bar_data_horizontal.size_y]
245
	add  [wnd_height],eax
246
@@:
247
    mov  eax,[wnd_width]
248
    mov  ebx,[wnd_height]
249
 
250
    test [bWasDraw],1
251
    jz	 @f
252
    mov  esi,ebx
253
    mov  edx,eax
254
    mcall 67,-1,-1
255
@@:
256
.end:
257
    ret
258
;---------------------------------------------------------------------