Rev 4878 | Rev 6637 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4878 | Rev 6435 | ||
---|---|---|---|
1 | ;***************************************************************************** |
1 | ;***************************************************************************** |
2 | ;***************************************************************************** |
2 | ;***************************************************************************** |
3 | ; zSea - advanced image viewer for KolibriOS |
3 | ; zSea - advanced image viewer for KolibriOS |
4 | ; Copyright (c) 2008-2014, Marat Zakiyanov aka Mario79, aka Mario |
4 | ; Copyright (c) 2008-2014, Marat Zakiyanov aka Mario79, aka Mario |
5 | ; All rights reserved. |
5 | ; All rights reserved. |
6 | ; |
6 | ; |
7 | ; Redistribution and use in source and binary forms, with or without |
7 | ; Redistribution and use in source and binary forms, with or without |
8 | ; modification, are permitted provided that the following conditions are met: |
8 | ; modification, are permitted provided that the following conditions are met: |
9 | ; * Redistributions of source code must retain the above copyright |
9 | ; * Redistributions of source code must retain the above copyright |
10 | ; notice, this list of conditions and the following disclaimer. |
10 | ; notice, this list of conditions and the following disclaimer. |
11 | ; * Redistributions in binary form must reproduce the above copyright |
11 | ; * Redistributions in binary form must reproduce the above copyright |
12 | ; notice, this list of conditions and the following disclaimer in the |
12 | ; notice, this list of conditions and the following disclaimer in the |
13 | ; documentation and/or other materials provided with the distribution. |
13 | ; documentation and/or other materials provided with the distribution. |
14 | ; * Neither the name of the |
14 | ; * Neither the name of the |
15 | ; names of its contributors may be used to endorse or promote products |
15 | ; names of its contributors may be used to endorse or promote products |
16 | ; derived from this software without specific prior written permission. |
16 | ; derived from this software without specific prior written permission. |
17 | ; |
17 | ; |
18 | ; THIS SOFTWARE IS PROVIDED BY Marat Zakiyanov ''AS IS'' AND ANY |
18 | ; THIS SOFTWARE IS PROVIDED BY Marat Zakiyanov ''AS IS'' AND ANY |
19 | ; EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
19 | ; EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
20 | ; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
20 | ; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
21 | ; DISCLAIMED. IN NO EVENT SHALL |
21 | ; DISCLAIMED. IN NO EVENT SHALL |
22 | ; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
22 | ; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
23 | ; (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
23 | ; (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
24 | ; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
24 | ; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
25 | ; ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
25 | ; ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
26 | ; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
26 | ; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
27 | ; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 | ; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
28 | ;***************************************************************************** |
28 | ;***************************************************************************** |
29 | ; v.1.0 rñ5 22.04.2014 |
29 | ; v.1.0 rñ5 22.04.2014 |
30 | ;****************************************************************************** |
30 | ;****************************************************************************** |
31 | use32 |
31 | use32 |
32 | org 0x0 |
32 | org 0x0 |
33 | db 'MENUET01' ; 8 byte id |
33 | db 'MENUET01' ; 8 byte id |
34 | dd 0x01 ; header version |
34 | dd 0x01 ; header version |
35 | dd START ; start of code |
35 | dd START ; start of code |
36 | dd IM_END ; size of image |
36 | dd IM_END ; size of image |
37 | dd I_END ; memory for app |
37 | dd I_END ; memory for app |
38 | dd stacktop ; esp |
38 | dd stacktop ; esp |
39 | dd ext_dest_cmdline ; I_Param |
39 | dd dest_cmdline ; I_Param |
40 | dd path ; APPLICATION PACH |
40 | dd path ; APPLICATION PACH |
41 | 41 | ||
42 | include 'lang.inc' |
42 | include 'lang.inc' |
43 | ;include 'macros.inc' |
43 | ;include 'macros.inc' |
44 | ;include 'editbox_ex.mac' |
44 | ;include 'editbox_ex.mac' |
45 | ;include 'proc32.inc' |
45 | ;include 'proc32.inc' |
46 | include '../../macros.inc' |
46 | include '../../macros.inc' |
47 | include '../../develop/libraries/box_lib/trunk/box_lib.mac' |
47 | include '../../develop/libraries/box_lib/trunk/box_lib.mac' |
48 | include '../../proc32.inc' |
48 | include '../../proc32.inc' |
49 | ;include 'debug.inc' |
49 | ;include 'debug.inc' |
50 | ;include 'load_lib.mac' |
50 | ;include 'load_lib.mac' |
51 | include '../../develop/libraries/box_lib/load_lib.mac' |
51 | include '../../develop/libraries/box_lib/load_lib.mac' |
52 | @use_library ;use load lib macros |
52 | @use_library ;use load lib macros |
53 | ;****************************************************************************** |
53 | ;****************************************************************************** |
54 | ext_dest_cmdline: |
- | |
55 | dd 0xffffffff |
- | |
56 | dd temp_area |
- | |
57 | ;------------------------------------------------------------------------------ |
54 | ;------------------------------------------------------------------------------ |
58 | START: ; start of execution |
55 | START: ; start of execution |
59 | mcall 68, 11 |
56 | mcall 68, 11 |
60 | mcall 66, 1,1 |
57 | mcall 66, 1,1 |
61 | mcall 40, 0x27 |
58 | mcall 40, 0x27 |
62 | 59 | ||
63 | mcall 9, procinfo, -1 |
60 | mcall 9, procinfo, -1 |
64 | mov eax,[ebx+30] |
61 | mov eax,[ebx+30] |
65 | mov [PID],eax |
62 | mov [PID],eax |
66 | xor ecx,ecx |
63 | xor ecx,ecx |
67 | @@: |
64 | @@: |
68 | inc ecx |
65 | inc ecx |
69 | mcall 9, procinfo |
66 | mcall 9, procinfo |
70 | mov eax,[PID] |
67 | mov eax,[PID] |
71 | cmp eax,[ebx+30] |
68 | cmp eax,[ebx+30] |
72 | jne @r |
69 | jne @r |
73 | mov [active_process],ecx |
70 | mov [active_process],ecx |
74 | 71 | ||
75 | mcall 48,4 |
72 | mcall 48,4 |
76 | mov [skin_height],eax |
73 | mov [skin_height],eax |
77 | 74 | ||
78 | mcall 68,12,1024 |
75 | mcall 68,12,1024 |
79 | mov [menu_data_1.procinfo],eax |
76 | mov [menu_data_1.procinfo],eax |
80 | mov [menu_data_2.procinfo],eax |
77 | mov [menu_data_2.procinfo],eax |
81 | mov [menu_data_3.procinfo],eax |
78 | mov [menu_data_3.procinfo],eax |
82 | mov [menu_data_4.procinfo],eax |
79 | mov [menu_data_4.procinfo],eax |
83 | mov [menu_data_5.procinfo],eax |
80 | mov [menu_data_5.procinfo],eax |
84 | mov [menu_data_6.procinfo],eax |
81 | mov [menu_data_6.procinfo],eax |
85 | 82 | ||
86 | mov [load_directory_pointer],dir_header |
83 | mov [load_directory_pointer],dir_header |
87 | 84 | ||
88 | 85 | ||
89 | call load_plugins |
86 | call load_plugins |
90 | 87 | ||
91 | ;init_checkboxes2 check1,... |
88 | ;init_checkboxes2 check1,... |
92 | push check1 |
89 | push check1 |
93 | call [init_checkbox] |
90 | call [init_checkbox] |
94 | push check2 |
91 | push check2 |
95 | call [init_checkbox] |
92 | call [init_checkbox] |
96 | 93 | ||
97 | call load_buttons |
94 | call load_buttons |
98 | 95 | ||
99 | ; call init_data_OpenDialog |
96 | ; call init_data_OpenDialog |
100 | 97 | ||
101 | ;init_OpenDialog OpenDialog_data |
98 | ;init_OpenDialog OpenDialog_data |
102 | push dword OpenDialog_data |
99 | push dword OpenDialog_data |
103 | call [OpenDialog_Init] |
100 | call [OpenDialog_Init] |
104 | 101 | ||
105 | ;init_ColorDialog ColorDialog_data |
102 | ;init_ColorDialog ColorDialog_data |
106 | push dword ColorDialog_data |
103 | push dword ColorDialog_data |
107 | call [ColorDialog_Init] |
104 | call [ColorDialog_Init] |
108 | 105 | ||
109 | call get_filter_data |
106 | call get_filter_data |
110 | 107 | ||
111 | ;----------------------------------------------------- |
108 | ;----------------------------------------------------- |
112 | ; check for parameters |
109 | ; check for parameters |
- | 110 | mov esi, [28] |
|
113 | cmp dword [temp_area],'BOOT' |
111 | cmp dword [esi],'BOOT' |
114 | jne .no_boot |
112 | jne .no_boot |
115 | .background: |
113 | .background: |
116 | call load_image |
114 | call load_image |
117 | cmp [error_fs],0 |
115 | cmp [error_fs],0 |
118 | jnz .exit |
116 | jnz .exit |
119 | call convert |
117 | call convert |
120 | 118 | ||
121 | call background |
119 | call background |
122 | 120 | ||
123 | .exit: |
121 | .exit: |
124 | call Set_ini |
122 | call Set_ini |
125 | .exit_1: |
123 | .exit_1: |
126 | mov ebx,18 |
124 | mov ebx,18 |
127 | mov edx,PID1 |
125 | mov edx,PID1 |
128 | mov esi,7 |
126 | mov esi,7 |
129 | .kill_successors: |
127 | .kill_successors: |
130 | mov ecx,[edx] |
128 | mov ecx,[edx] |
131 | add edx,4 |
129 | add edx,4 |
132 | test ecx,ecx |
130 | test ecx,ecx |
133 | jz @f |
131 | jz @f |
134 | mcall 18 |
132 | mcall 18 |
135 | @@: |
133 | @@: |
136 | dec esi |
134 | dec esi |
137 | jnz .kill_successors |
135 | jnz .kill_successors |
138 | 136 | ||
139 | mcall -1 |
137 | mcall -1 |
140 | ;----------------------------------------------------- |
138 | ;----------------------------------------------------- |
141 | .no_boot: |
139 | .no_boot: |
142 | xor eax,eax |
140 | xor eax,eax |
143 | cmp byte [temp_area],al |
141 | cmp [esi],al |
144 | jnz @f |
142 | jnz @f |
145 | mov [file_name],eax |
143 | mov [file_name],eax |
146 | jmp .no_param |
144 | jmp .no_param |
147 | @@: |
145 | @@: |
148 | 146 | ||
149 | 147 | ||
150 | mov edi,string ; clear string |
148 | mov edi,string ; clear string |
151 | mov ecx,4096/4 ;256/4 ; length of a string |
149 | mov ecx,4096/4 ;256/4 ; length of a string |
152 | xor eax,eax ; symbol <0> |
150 | xor eax,eax ; symbol <0> |
153 | rep stosd |
151 | rep stosd |
154 | 152 | ||
155 | 153 | ||
156 | mov edi,temp_area ; look for <0> in temp_area |
154 | mov edi, [28] ; look for <0> in temp_area |
157 | 155 | ||
158 | cmp [edi],byte "\" |
156 | cmp [edi],byte "\" |
159 | jne .continue |
157 | jne .continue |
160 | cmp [edi+1],byte "T" |
158 | cmp [edi+1],byte "T" |
161 | jne @f |
159 | jne @f |
162 | mov [bgrmode],dword 1 |
160 | mov [bgrmode],dword 1 |
163 | jmp .continue_1 |
161 | jmp .continue_1 |
164 | @@: |
162 | @@: |
165 | cmp [edi+1],byte "S" |
163 | cmp [edi+1],byte "S" |
166 | jne START.exit |
164 | jne START.exit |
167 | mov [bgrmode],dword 2 |
165 | mov [bgrmode],dword 2 |
168 | .continue_1: |
166 | .continue_1: |
169 | add edi,4 |
167 | add edi,4 |
170 | .continue: |
168 | .continue: |
171 | mov esi,edi |
169 | mov esi,edi |
172 | mov ecx,4095 ;257 ; strlen |
170 | mov ecx,4095 ;257 ; strlen |
173 | repne scasb |
171 | repne scasb |
- | 172 | mov ecx, edi |
|
174 | lea ecx, [edi-temp_area] |
173 | sub ecx, [28] |
175 | 174 | ||
176 | mov edi,string |
175 | mov edi,string |
177 | rep movsb ; copy string from temp_area to "string" (filename) |
176 | rep movsb ; copy string from temp_area to "string" (filename) |
- | 177 | mov ecx, [28] |
|
178 | cmp [temp_area],byte "\" |
178 | cmp [ecx],byte "\" |
179 | je START.background |
179 | je START.background |
180 | call load_directory |
180 | call load_directory |
181 | test eax,eax |
181 | test eax,eax |
182 | jnz @f |
182 | jnz @f |
183 | call load_image |
183 | call load_image |
184 | test eax,eax |
184 | test eax,eax |
185 | jnz @f |
185 | jnz @f |
186 | call convert |
186 | call convert |
187 | jmp .no_param |
187 | jmp .no_param |
188 | @@: |
188 | @@: |
189 | mov [load_directory_pointer],dir_header |
189 | mov [load_directory_pointer],dir_header |
190 | mov [error_fs],eax |
190 | mov [error_fs],eax |
191 | call convert.error |
191 | call convert.error |
192 | ;----------------------------------------------------- |
192 | ;----------------------------------------------------- |
193 | .no_param: |
193 | .no_param: |
194 | ; or ecx,-1 ; get information about me |
194 | ; or ecx,-1 ; get information about me |
195 | ; call getappinfo |
195 | ; call getappinfo |
196 | 196 | ||
197 | ; mov edx,[process_info+30] ; òåïåðü â edx íàø èäåíòèôèêàòîð |
197 | ; mov edx,[process_info+30] ; òåïåðü â edx íàø èäåíòèôèêàòîð |
198 | ; mov ecx,eax |
198 | ; mov ecx,eax |
199 | 199 | ||
200 | ; @@: |
200 | ; @@: |
201 | ; call getappinfo |
201 | ; call getappinfo |
202 | ; cmp edx,[process_info+30] |
202 | ; cmp edx,[process_info+30] |
203 | ; je @f ; åñëè íàø PID ñîâïàë ñ PID ðàññìàòðèâàåìîãî ïðîöåññà, ìû íàøëè ñåáÿ |
203 | ; je @f ; åñëè íàø PID ñîâïàë ñ PID ðàññìàòðèâàåìîãî ïðîöåññà, ìû íàøëè ñåáÿ |
204 | ; dec ecx ; èíà÷å ñìîòðèì ñëåäóþùèé ïðîöåññ |
204 | ; dec ecx ; èíà÷å ñìîòðèì ñëåäóþùèé ïðîöåññ |
205 | ; jne @b ; âîçâðàùàåìñÿ, åñëè íå âñå ïðîöåññû ðàññìîòðåíû |
205 | ; jne @b ; âîçâðàùàåìñÿ, åñëè íå âñå ïðîöåññû ðàññìîòðåíû |
206 | ; @@: |
206 | ; @@: |
207 | 207 | ||
208 | ; òåïåðü â ecx íîìåð ïðîöåññà |
208 | ; òåïåðü â ecx íîìåð ïðîöåññà |
209 | ; mov [process],ecx |
209 | ; mov [process],ecx |
210 | ;--------------------------------------------------------------------- |
210 | ;--------------------------------------------------------------------- |
211 | cmp [wnd_width],635 |
211 | cmp [wnd_width],635 |
212 | jae @f |
212 | jae @f |
213 | mov [wnd_width],635 |
213 | mov [wnd_width],635 |
214 | @@: |
214 | @@: |
215 | mcall 48, 5 ; GetClientTop, fix for case when @patel in the top |
215 | mcall 48, 5 ; GetClientTop, fix for case when @patel in the top |
216 | shr ebx, 16 |
216 | shr ebx, 16 |
217 | mov ecx,ebx |
217 | mov ecx,ebx |
218 | shl ecx,16 |
218 | shl ecx,16 |
219 | add ecx,150 ; [y start] *65536 + [y size] |
219 | add ecx,150 ; [y start] *65536 + [y size] |
220 | cmp [wnd_height],ecx |
220 | cmp [wnd_height],ecx |
221 | jae @f |
221 | jae @f |
222 | mov [wnd_height],ecx |
222 | mov [wnd_height],ecx |
223 | @@: |
223 | @@: |
224 | ; call draw_window |
224 | ; call draw_window |
225 | red: |
225 | red: |
226 | ;draw_still: |
226 | ;draw_still: |
227 | ; pusha |
227 | ; pusha |
228 | call get_window_param |
228 | call get_window_param |
229 | test [window_status],10b |
229 | test [window_status],10b |
230 | jnz red_1 ;still |
230 | jnz red_1 ;still |
231 | test [window_status],100b |
231 | test [window_status],100b |
232 | jnz red_1 |
232 | jnz red_1 |
233 | test [window_status],1b |
233 | test [window_status],1b |
234 | jnz red_1 |
234 | jnz red_1 |
235 | mov esi,-1 |
235 | mov esi,-1 |
236 | mov eax,procinfo |
236 | mov eax,procinfo |
237 | mov eax,[eax+66] |
237 | mov eax,[eax+66] |
238 | cmp eax,150 |
238 | cmp eax,150 |
239 | ; cmp [window_high],150 |
239 | ; cmp [window_high],150 |
240 | jae @f |
240 | jae @f |
241 | mov esi,150 |
241 | mov esi,150 |
242 | mcall 67,-1,ebx,ebx |
242 | mcall 67,-1,ebx,ebx |
243 | @@: |
243 | @@: |
244 | mov edx,-1 |
244 | mov edx,-1 |
245 | mov eax,procinfo |
245 | mov eax,procinfo |
246 | mov eax,[eax+62] |
246 | mov eax,[eax+62] |
247 | cmp eax,635 |
247 | cmp eax,635 |
248 | ; cmp [window_width],635 |
248 | ; cmp [window_width],635 |
249 | jae @f ;red_1 |
249 | jae @f ;red_1 |
250 | mov edx,635 |
250 | mov edx,635 |
251 | mcall 67,-1,ebx, ,ebx |
251 | mcall 67,-1,ebx, ,ebx |
252 | @@: |
252 | @@: |
253 | ; mcall 67,-1,ebx |
253 | ; mcall 67,-1,ebx |
254 | ; popa |
254 | ; popa |
255 | ; xor esi,esi |
255 | ; xor esi,esi |
256 | red_1: |
256 | red_1: |
257 | ; xor eax,eax |
257 | ; xor eax,eax |
258 | ; mov [scroll_bar_data_vertical.position],eax |
258 | ; mov [scroll_bar_data_vertical.position],eax |
259 | ; mov [scroll_bar_data_horizontal.position],eax |
259 | ; mov [scroll_bar_data_horizontal.position],eax |
260 | 260 | ||
261 | call draw_window |
261 | call draw_window |
262 | 262 | ||
263 | cmp [redraw_wallpaper_flag],0 |
263 | cmp [redraw_wallpaper_flag],0 |
264 | je still |
264 | je still |
265 | mov [redraw_wallpaper_flag],0 |
265 | mov [redraw_wallpaper_flag],0 |
266 | call clear_thread |
266 | call clear_thread |
267 | ; mcall 15,3 |
267 | ; mcall 15,3 |
268 | ; jmp red_1 |
268 | ; jmp red_1 |
269 | still: |
269 | still: |
270 | call pause_cicle |
270 | call pause_cicle |
271 | 271 | ||
272 | cmp [RAW1_flag],1 |
272 | cmp [RAW1_flag],1 |
273 | je animation_handler |
273 | je animation_handler |
274 | 274 | ||
275 | mcall 48,4 |
275 | mcall 48,4 |
276 | cmp [skin_height],eax |
276 | cmp [skin_height],eax |
277 | je @f |
277 | je @f |
278 | mov [skin_height],eax |
278 | mov [skin_height],eax |
279 | call convert.img_resolution_ok |
279 | call convert.img_resolution_ok |
280 | jmp red_1 |
280 | jmp red_1 |
281 | @@: |
281 | @@: |
282 | mcall 10 |
282 | mcall 10 |
283 | .1: |
283 | .1: |
284 | cmp [open_file_flag],1 |
284 | cmp [open_file_flag],1 |
285 | je kopen_1 |
285 | je kopen_1 |
286 | cmp [sort_directory_flag],byte 1 |
286 | cmp [sort_directory_flag],byte 1 |
287 | je red_sort_directory |
287 | je red_sort_directory |
288 | cmp [redraw_flag],byte 1 |
288 | cmp [redraw_flag],byte 1 |
289 | je redraw_window |
289 | je redraw_window |
290 | cmp eax,1 ; ïåðåðèñîâàòü îêíî ? |
290 | cmp eax,1 ; ïåðåðèñîâàòü îêíî ? |
291 | je red ; åñëè äà - íà ìåòêó red |
291 | je red ; åñëè äà - íà ìåòêó red |
292 | cmp eax,2 ; íàæàòà êëàâèøà ? |
292 | cmp eax,2 ; íàæàòà êëàâèøà ? |
293 | je key ; åñëè äà - íà key |
293 | je key ; åñëè äà - íà key |
294 | cmp eax,3 ; íàæàòà êíîïêà ? |
294 | cmp eax,3 ; íàæàòà êíîïêà ? |
295 | je button ; åñëè äà - íà button |
295 | je button ; åñëè äà - íà button |
296 | cmp eax,6 |
296 | cmp eax,6 |
297 | je mouse |
297 | je mouse |
298 | ; cmp [redraw_wallpaper_flag],1 |
298 | ; cmp [redraw_wallpaper_flag],1 |
299 | ; jne still |
299 | ; jne still |
300 | ; mov [redraw_wallpaper_flag],0 |
300 | ; mov [redraw_wallpaper_flag],0 |
301 | ; mcall 15,3 |
301 | ; mcall 15,3 |
302 | jmp still ; åñëè äðóãîå ñîáûòèå - â íà÷àëî öèêëà |
302 | jmp still ; åñëè äðóãîå ñîáûòèå - â íà÷àëî öèêëà |
303 | 303 | ||
304 | red_sort_directory: |
304 | red_sort_directory: |
305 | mov [sort_directory_flag],byte 0 |
305 | mov [sort_directory_flag],byte 0 |
306 | jmp red_1 |
306 | jmp red_1 |
307 | 307 | ||
308 | redraw_window: |
308 | redraw_window: |
309 | mov [redraw_flag],byte 0 |
309 | mov [redraw_flag],byte 0 |
310 | jmp red_1 |
310 | jmp red_1 |
311 | 311 | ||
312 | ;--------------------------------------------------------------------- |
312 | ;--------------------------------------------------------------------- |
313 | ; red: |
313 | ; red: |
314 | ; test dword [status], 4 |
314 | ; test dword [status], 4 |
315 | ; jz draw_still |
315 | ; jz draw_still |
316 | ; mov al,18 |
316 | ; mov al,18 |
317 | ; mov ebx,3 |
317 | ; mov ebx,3 |
318 | ; mov ecx,[process] |
318 | ; mov ecx,[process] |
319 | ; mcall 18,3,[active_process] |
319 | ; mcall 18,3,[active_process] |
320 | ; and byte [status], not 4 |
320 | ; and byte [status], not 4 |
321 | ; jmp still |
321 | ; jmp still |
322 | ;--------------------------------------------------------------------- |
322 | ;--------------------------------------------------------------------- |
323 | button: ; button |
323 | button: ; button |
324 | mov eax,17 ; get id |
324 | mov eax,17 ; get id |
325 | mcall |
325 | mcall |
326 | cmp ah,1 ; button id=1 ? |
326 | cmp ah,1 ; button id=1 ? |
327 | je START.exit |
327 | je START.exit |
328 | ; jne .noclose |
328 | ; jne .noclose |
329 | ; |
329 | ; |
330 | ; mov eax,-1 ; close this program |
330 | ; mov eax,-1 ; close this program |
331 | ; mcall |
331 | ; mcall |
332 | .noclose: |
332 | .noclose: |
333 | cmp ah,2 |
333 | cmp ah,2 |
334 | je slide_show.3 ;still |
334 | je slide_show.3 ;still |
335 | jmp slide_show |
335 | jmp slide_show |
336 | ;--------------------------------------------------------------------- |
336 | ;--------------------------------------------------------------------- |
337 | pause_cicle: |
337 | pause_cicle: |
338 | pusha |
338 | pusha |
339 | .start: |
339 | .start: |
340 | mcall 9,procinfo,-1 |
340 | mcall 9,procinfo,-1 |
341 | mov eax,[procinfo+70] ;status of window |
341 | mov eax,[procinfo+70] ;status of window |
342 | test eax,100b |
342 | test eax,100b |
343 | jne @f |
343 | jne @f |
344 | popa |
344 | popa |
345 | ret |
345 | ret |
346 | @@: |
346 | @@: |
347 | mcall 10 |
347 | mcall 10 |
348 | dec eax |
348 | dec eax |
349 | jz .redraw |
349 | jz .redraw |
350 | dec eax |
350 | dec eax |
351 | jz .key |
351 | jz .key |
352 | dec eax |
352 | dec eax |
353 | jnz .start |
353 | jnz .start |
354 | .button: |
354 | .button: |
355 | mcall -1 |
355 | mcall -1 |
356 | .key: |
356 | .key: |
357 | mcall 2 |
357 | mcall 2 |
358 | jmp .start |
358 | jmp .start |
359 | .redraw: |
359 | .redraw: |
360 | call draw_window |
360 | call draw_window |
361 | jmp .start |
361 | jmp .start |
362 | ;--------------------------------------------------------------------- |
362 | ;--------------------------------------------------------------------- |
363 | get_filter_data: |
363 | get_filter_data: |
364 | mov edi,Filter+4 |
364 | mov edi,Filter+4 |
365 | xor eax,eax |
365 | xor eax,eax |
366 | mov ecx,10 |
366 | mov ecx,10 |
367 | cld |
367 | cld |
368 | @@: |
368 | @@: |
369 | mov esi,10 |
369 | mov esi,10 |
370 | sub esi,ecx |
370 | sub esi,ecx |
371 | lea esi,[esi+esi*2] ; x 3 |
371 | lea esi,[esi+esi*2] ; x 3 |
372 | shl esi,3 ; x 8 |
372 | shl esi,3 ; x 8 |
373 | add esi,dword Convert_plugin_0.Assoc |
373 | add esi,dword Convert_plugin_0.Assoc |
374 | mov esi,[esi] |
374 | mov esi,[esi] |
375 | add esi,4 |
375 | add esi,4 |
376 | 376 | ||
377 | test esi,esi |
377 | test esi,esi |
378 | jz @f |
378 | jz @f |
379 | call .start |
379 | call .start |
380 | dec ecx |
380 | dec ecx |
381 | jnz @r |
381 | jnz @r |
382 | @@: |
382 | @@: |
383 | mov [edi],byte 0 |
383 | mov [edi],byte 0 |
384 | mov eax,Filter |
384 | mov eax,Filter |
385 | sub edi,eax |
385 | sub edi,eax |
386 | mov [eax],edi |
386 | mov [eax],edi |
387 | 387 | ||
388 | ret |
388 | ret |
389 | .start: |
389 | .start: |
390 | @@: |
390 | @@: |
391 | lodsb |
391 | lodsb |
392 | stosb |
392 | stosb |
393 | test eax,eax |
393 | test eax,eax |
394 | jnz @r |
394 | jnz @r |
395 | cmp [esi],ah |
395 | cmp [esi],ah |
396 | jne @r |
396 | jne @r |
397 | ret |
397 | ret |
398 | ;--------------------------------------------------------------------- |
398 | ;--------------------------------------------------------------------- |
399 | kopen_1: |
399 | kopen_1: |
400 | 400 | ||
401 | mov [open_file_flag],0 |
401 | mov [open_file_flag],0 |
402 | call load_directory |
402 | call load_directory |
403 | test eax,eax |
403 | test eax,eax |
404 | jz kopen |
404 | jz kopen |
405 | .err: |
405 | .err: |
406 | mov [load_directory_pointer],dir_header |
406 | mov [load_directory_pointer],dir_header |
407 | mov [error_fs],eax |
407 | mov [error_fs],eax |
408 | call convert.error |
408 | call convert.error |
409 | jmp still ;red_1 |
409 | jmp still ;red_1 |
410 | 410 | ||
411 | kopen: |
411 | kopen: |
412 | cmp [string],byte 0 |
412 | cmp [string],byte 0 |
413 | je still |
413 | je still |
414 | 414 | ||
415 | mov ecx,-1 |
415 | mov ecx,-1 |
416 | call getappinfo |
416 | call getappinfo |
417 | 417 | ||
418 | call load_image |
418 | call load_image |
419 | 419 | ||
420 | test eax,eax |
420 | test eax,eax |
421 | jnz kopen_1.err |
421 | jnz kopen_1.err |
422 | call convert |
422 | call convert |
423 | 423 | ||
424 | .1: |
424 | .1: |
425 | call get_window_param |
425 | call get_window_param |
426 | test [window_status],1b |
426 | test [window_status],1b |
427 | jz red ;draw_still |
427 | jz red ;draw_still |
428 | mov [no_draw_window],1 |
428 | mov [no_draw_window],1 |
429 | 429 | ||
430 | ; push edx |
430 | ; push edx |
431 | ; mov edx,size_after_convert_2 |
431 | ; mov edx,size_after_convert_2 |
432 | ; call write_memory_size |
432 | ; call write_memory_size |
433 | ; pop edx |
433 | ; pop edx |
434 | 434 | ||
435 | call draw_other |
435 | call draw_other |
436 | 436 | ||
437 | mov [no_draw_window],0 |
437 | mov [no_draw_window],0 |
438 | ; jmp draw_still |
438 | ; jmp draw_still |
439 | jmp still |
439 | jmp still |
440 | ;--------------------------------------------------------------------- |
440 | ;--------------------------------------------------------------------- |
441 | getappinfo: |
441 | getappinfo: |
442 | mov eax,9 |
442 | mov eax,9 |
443 | mov ebx,process_info |
443 | mov ebx,process_info |
444 | mcall |
444 | mcall |
445 | ret |
445 | ret |
446 | ;--------------------------------------------------------------------- |
446 | ;--------------------------------------------------------------------- |
447 | get_window_param: |
447 | get_window_param: |
448 | mcall 9, procinfo, -1 |
448 | mcall 9, procinfo, -1 |
449 | mov eax,[ebx+34] |
449 | mov eax,[ebx+34] |
450 | mov [window_start_x],eax |
450 | mov [window_start_x],eax |
451 | mov eax,[ebx+38] |
451 | mov eax,[ebx+38] |
452 | mov [window_start_y],eax |
452 | mov [window_start_y],eax |
453 | mov eax,[ebx+66] ;46] |
453 | mov eax,[ebx+66] ;46] |
454 | inc eax |
454 | inc eax |
455 | mov [window_high],eax |
455 | mov [window_high],eax |
456 | mov eax,[ebx+62] ;42] |
456 | mov eax,[ebx+62] ;42] |
457 | inc eax |
457 | inc eax |
458 | mov [window_width],eax |
458 | mov [window_width],eax |
459 | mov eax,[ebx+70] |
459 | mov eax,[ebx+70] |
460 | mov [window_status],eax |
460 | mov [window_status],eax |
461 | ; mcall 48,4 |
461 | ; mcall 48,4 |
462 | ; mov [skin_high],eax |
462 | ; mov [skin_high],eax |
463 | ret |
463 | ret |
464 | ;--------------------------------------------------------------------- |
464 | ;--------------------------------------------------------------------- |
465 | ;write_memory_size: |
465 | ;write_memory_size: |
466 | ; pusha |
466 | ; pusha |
467 | ; mcall 9, procinfo, -1 |
467 | ; mcall 9, procinfo, -1 |
468 | ; mov eax,[ebx+26] |
468 | ; mov eax,[ebx+26] |
469 | ; mov [edx],eax |
469 | ; mov [edx],eax |
470 | ; popa |
470 | ; popa |
471 | ; ret |
471 | ; ret |
472 | ;--------------------------------------------------------------------- |
472 | ;--------------------------------------------------------------------- |
473 | include 'backgrnd.inc' |
473 | include 'backgrnd.inc' |
474 | include 'draw_win.inc' |
474 | include 'draw_win.inc' |
475 | include 'full_win.inc' |
475 | include 'full_win.inc' |
476 | include 'mouse.inc' |
476 | include 'mouse.inc' |
477 | include 'key.inc' |
477 | include 'key.inc' |
478 | include 'menu_key.inc' |
478 | include 'menu_key.inc' |
479 | include 'clr_bcgr.inc' |
479 | include 'clr_bcgr.inc' |
480 | include 'w_error.inc' |
480 | include 'w_error.inc' |
481 | include 'load.inc' |
481 | include 'load.inc' |
482 | include 'animat.inc' |
482 | include 'animat.inc' |
483 | include 'draw_img.inc' |
483 | include 'draw_img.inc' |
484 | include 'convert.inc' |
484 | include 'convert.inc' |
485 | include 'zoom.inc' |
485 | include 'zoom.inc' |
486 | include 'w_about.inc' |
486 | include 'w_about.inc' |
487 | include 'win_file.inc' |
487 | include 'win_file.inc' |
488 | include 'win_info.inc' |
488 | include 'win_info.inc' |
489 | include 'win_bcgr.inc' |
489 | include 'win_bcgr.inc' |
490 | include 'win_sort.inc' |
490 | include 'win_sort.inc' |
491 | include 'win_opti.inc' |
491 | include 'win_opti.inc' |
492 | include 'libini.inc' |
492 | include 'libini.inc' |
493 | include '../../dll.inc' |
493 | include '../../dll.inc' |
494 | include 'data.inc' |
494 | include 'data.inc' |
495 | ;--------------------------------------------------------------------- |
495 | ;--------------------------------------------------------------------- |
496 | IM_END: |
496 | IM_END: |
497 | include 'dat_area.inc' |
497 | include 'dat_area.inc' |
498 | I_END:0>0> |
498 | I_END:0>0> |