Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1951 | mario79 | 1 | ;--------------------------------------------------------------------- |
2 | full_screen: |
||
3 | xor eax,eax |
||
4 | mov [Repeat_N],eax |
||
5 | |||
6 | xor eax,eax |
||
7 | mov [press_Enter_flag],al |
||
8 | |||
9 | mov eax,[zoom_factors] |
||
10 | mov [zoom_factors_old],eax |
||
11 | |||
12 | mov eax,[scaling_mode] |
||
13 | mov [scaling_mode_old],eax |
||
14 | |||
15 | call get_window_param_1 |
||
16 | mov eax,[window_start_x] |
||
17 | mov [window_start_x_old],eax |
||
18 | mov eax,[window_start_y] |
||
19 | mov [window_start_y_old],eax |
||
20 | mov eax,[window_high] |
||
21 | mov [window_high_old],eax |
||
22 | mov eax,[window_width] |
||
23 | mov [window_width_old],eax |
||
24 | ;---------------------------------------- |
||
25 | ; get current work area |
||
26 | mcall 48,5 |
||
27 | mov [work_area_LR_old],eax |
||
28 | mov [work_area_TB_old],ebx |
||
29 | ;---------------------------------------- |
||
30 | mov eax,[soi] |
||
31 | test eax,eax |
||
32 | jz still |
||
33 | mov eax,scaling_mode |
||
34 | xor ebx,ebx |
||
35 | mov [eax],ebx ;dword 0 |
||
36 | mov [zoom_factors],dword zoom_factors.1 |
||
37 | |||
38 | mcall 14 |
||
39 | xor ebx,ebx |
||
40 | xor ecx,ecx |
||
41 | mov edx,eax |
||
42 | shr edx,16 |
||
43 | xor esi,esi |
||
44 | mov si,ax |
||
45 | inc ax |
||
46 | mov [wa_high_1],ax |
||
47 | mov [wa_high_2],ax |
||
48 | shr eax,16 |
||
49 | inc ax |
||
50 | mov [wa_width_1],ax |
||
51 | mov [wa_width_2],ax |
||
52 | mcall 67 |
||
53 | ;---------------------------------------- |
||
54 | ; set max work area |
||
55 | mov ecx,edx |
||
56 | mov dx,si |
||
57 | mcall 48,6 |
||
58 | ;---------------------------------------- |
||
59 | mov eax,[fill_color] |
||
60 | mov [fill_color_old],eax |
||
61 | xor eax,eax |
||
62 | mov [fill_color],eax |
||
63 | |||
64 | jmp .still |
||
65 | ;---------------------------------------- |
||
66 | .red: |
||
67 | call .draw_window |
||
68 | .still: |
||
69 | cmp [RAW1_flag],1 |
||
70 | je .animation_handler |
||
71 | mcall 10 |
||
72 | cmp eax,1 ; перерисовать окно ? |
||
73 | je .red ; если да - на метку red |
||
74 | cmp eax,2 ; нажата клавиша ? |
||
75 | je .key ; если да - на key |
||
76 | cmp eax,3 ; нажата кнопка ? |
||
77 | je .button ; если да - на button |
||
78 | jmp .still ; если другое событие - в начало цикла |
||
79 | ;---------------------------------------- |
||
80 | .animation_handler: |
||
81 | mcall 23,1 |
||
82 | ; pusha |
||
83 | ; mcall 26,9 |
||
84 | ; cmp [Animation_timer],eax |
||
85 | ; ja @f |
||
86 | ; call animation_handler.draw_image |
||
87 | ;@@: |
||
88 | ; popa |
||
89 | cmp eax,1 ; перерисовать окно ? |
||
90 | je .red ; если да - на метку red |
||
91 | cmp eax,2 ; нажата клавиша ? |
||
92 | je .key ; если да - на key |
||
93 | cmp eax,3 ; нажата кнопка ? |
||
94 | je .button ; если да - на button |
||
95 | mcall 26,9 |
||
96 | cmp [Animation_timer],eax |
||
97 | ja .animation_handler |
||
98 | |||
99 | mov al,[Disposal_Method] |
||
100 | cmp al,2 |
||
101 | jne @f |
||
102 | call restore_background |
||
103 | jmp .first_frame |
||
104 | @@: |
||
105 | cmp al,3 |
||
106 | jne @f |
||
107 | call restore_previous_frame |
||
108 | @@: |
||
109 | .first_frame: |
||
110 | |||
111 | call copy_next_frame |
||
112 | mov [no_fill],1 |
||
113 | call .draw_image |
||
114 | mov [no_fill],0 |
||
115 | ; call animation_handler.draw_image |
||
116 | jmp .still |
||
117 | ;---------------------------------------- |
||
118 | .key: |
||
119 | mcall 2 |
||
120 | cmp [extended_key],1 |
||
121 | je .extended_key |
||
122 | test al, al |
||
123 | jnz .still |
||
124 | cmp ah, 0xE0 |
||
125 | jne @f |
||
126 | mov [extended_key],1 |
||
127 | jmp .still |
||
128 | @@: |
||
129 | cmp ah,1 ; Esc |
||
130 | je .restore_main_window |
||
131 | cmp ah,156 ; Enter |
||
132 | je .restore_main_window_1 |
||
133 | jmp .still |
||
134 | ;---------------------------------------- |
||
135 | .extended_key: |
||
136 | mov [extended_key],0 |
||
137 | mov [current_key_code],ah |
||
138 | cmp ah,73 |
||
139 | je move_to_left_1 |
||
140 | cmp ah,81 |
||
141 | je move_to_right_1 |
||
142 | cmp ah,71 |
||
143 | je left_limit_1 |
||
144 | cmp ah,79 |
||
145 | je right_limit_1 |
||
146 | |||
147 | cmp ah,156 ; Enter |
||
148 | je .restore_main_window_1 |
||
149 | |||
150 | cmp ah,183 ; Print Screen - Slides Show |
||
151 | je slide_show_1.3 |
||
152 | jmp .still |
||
153 | ;---------------------------------------- |
||
154 | .button: |
||
155 | mcall 17 |
||
156 | cmp ah,1 ; button id=1 ? |
||
157 | ; je START.exit |
||
158 | ; jmp .still ;red_1 |
||
159 | jne .still |
||
160 | .exit: |
||
161 | call restore_work_area |
||
162 | jmp START.exit |
||
163 | ;--------------------------------------------------------------------- |
||
164 | .restore_main_window_1: |
||
165 | cmp [press_Enter_flag],1 |
||
166 | je .restore_main_window |
||
167 | inc [press_Enter_flag] |
||
168 | jmp .still |
||
169 | ;--------------------------------------------------------------------- |
||
170 | .restore_main_window: |
||
171 | call restore_work_area |
||
172 | |||
173 | mov eax,[zoom_factors_old] |
||
174 | mov [zoom_factors],eax |
||
175 | |||
176 | mov eax,[scaling_mode_old] |
||
177 | mov [scaling_mode],eax |
||
178 | |||
179 | mov ebx,[window_start_x_old] |
||
180 | mov ecx,[window_start_y_old] |
||
181 | mov edx,[window_width_old] |
||
182 | mov esi,[window_high_old] |
||
183 | mcall 67 |
||
184 | |||
185 | ; call get_window_param |
||
186 | mov eax,[fill_color_old] |
||
187 | mov [fill_color],eax |
||
188 | |||
189 | xor eax,eax |
||
190 | mov [Repeat_N],eax |
||
191 | |||
192 | ; mcall 15,3 |
||
193 | |||
194 | mov [redraw_wallpaper_flag],1 |
||
195 | jmp still ;red_1 |
||
196 | ;--------------------------------------------------------------------- |
||
197 | .draw_window: |
||
198 | mcall 12,1 |
||
199 | mcall 0,<0,800>,<0,600>,0x41000000,0,0 |
||
200 | ; call get_window_param_1 |
||
201 | ; mcall 8,0,0,1,0 |
||
202 | call .draw_image |
||
203 | mcall 12,2 |
||
204 | ret |
||
205 | ;--------------------------------------------------------------------- |
||
206 | .draw_image: |
||
207 | mcall 14 |
||
208 | inc ax |
||
209 | mov [wa_high_1],ax |
||
210 | mov [wa_high_2],ax |
||
211 | shr eax,16 |
||
212 | inc ax |
||
213 | mov [wa_width_1],ax |
||
214 | mov [wa_width_2],ax |
||
215 | mov [image_start_coordinates],0 |
||
216 | mov [background_color],0 |
||
217 | call scaling.1 |
||
218 | mov [background_color],0xffffff |
||
219 | ret |
||
220 | ;--------------------------------------------------------------------- |
||
221 | get_window_param_1: |
||
222 | mcall 9, procinfo, -1 |
||
223 | mov eax,[ebx+34] |
||
224 | mov [window_start_x],eax |
||
225 | mov eax,[ebx+38] |
||
226 | mov [window_start_y],eax |
||
227 | mov eax,[ebx+46] |
||
228 | mov [window_high],eax |
||
229 | mov eax,[ebx+42] |
||
230 | mov [window_width],eax |
||
231 | mov eax,[ebx+70] |
||
232 | mov [window_status],eax |
||
233 | ret |
||
234 | ;---------------------------------------- |
||
235 | restore_work_area: |
||
236 | ; restore old work area |
||
237 | mov ecx,[work_area_LR_old] |
||
238 | mov edx,[work_area_TB_old] |
||
239 | mcall 48,6 |
||
240 | ret |
||
241 | ;--------------------------------------------------------------------- |
||
242 | move_to_left_1: |
||
243 | xor eax,eax |
||
244 | cmp [load_file_number],eax |
||
245 | je full_screen.still |
||
246 | dec [load_file_number] |
||
247 | jmp right_limit_1.2 |
||
248 | ;---------------------------------------- |
||
249 | move_to_right_1: |
||
250 | mov eax,[load_directory_pointer] |
||
251 | mov eax,[eax+4] |
||
252 | test eax,eax |
||
253 | jz @f |
||
254 | dec eax |
||
255 | @@: |
||
256 | cmp [load_file_number],eax |
||
257 | je full_screen.still |
||
258 | inc [load_file_number] |
||
259 | jmp right_limit_1.2 |
||
260 | ;---------------------------------------- |
||
261 | left_limit_1: |
||
262 | xor eax,eax |
||
263 | jmp right_limit_1.1 |
||
264 | ;---------------------------------------- |
||
265 | right_limit_1: |
||
266 | mov eax,[load_directory_pointer] |
||
267 | mov eax,[eax+4] |
||
268 | test eax,eax |
||
269 | jz @f |
||
270 | dec eax |
||
271 | @@: |
||
272 | .1: |
||
273 | cmp [load_file_number],eax |
||
274 | je full_screen.still |
||
275 | mov [load_file_number],eax |
||
276 | .2: |
||
277 | imul ebx,[load_file_number],304 |
||
278 | add ebx,32+40 |
||
279 | add ebx,[load_directory_pointer] |
||
280 | |||
281 | mov esi,string |
||
282 | mov edi,plugin_pach |
||
283 | call copy_file_path |
||
284 | |||
285 | mov esi,plugin_pach |
||
286 | mov edi,string |
||
287 | mov ecx,4096/4 |
||
288 | cld |
||
289 | rep movsd |
||
290 | |||
291 | ; jmp kopen |
||
292 | mov [open_file_flag],0 |
||
293 | mov ecx,-1 |
||
294 | call getappinfo |
||
295 | call load_image |
||
296 | test eax,eax |
||
297 | jnz kopen_1.err |
||
298 | |||
299 | call convert |
||
300 | |||
301 | call load_directory.copy_dir_path |
||
302 | |||
303 | ; call get_window_param |
||
304 | ; test [window_status],1b |
||
305 | ; jz @f ;draw_still |
||
306 | ; mov [no_draw_window],1 |
||
307 | ;*** call draw_other |
||
308 | ; mov [no_draw_window],0 |
||
309 | ; jmp .3 |
||
310 | ; |
||
311 | ;@@: |
||
312 | ; call .draw_window |
||
313 | call full_screen.draw_image |
||
314 | .3: |
||
315 | mov al,[old_key_code] |
||
316 | mov ah,[current_key_code] |
||
317 | mov [old_key_code],ah |
||
318 | cmp al,ah |
||
319 | jne full_screen.still ;key.extended_key ;still |
||
320 | .still: |
||
321 | mcall 2 |
||
322 | cmp [extended_key],1 |
||
323 | je .extended_key |
||
324 | test al, al |
||
325 | jnz full_screen.still |
||
326 | cmp ah, 0xE0 |
||
327 | jne @f |
||
328 | mov [extended_key],1 |
||
329 | jmp .still |
||
330 | @@: |
||
331 | jmp full_screen.still |
||
332 | .extended_key: |
||
333 | mov [extended_key],0 |
||
334 | mov [current_key_code],ah |
||
335 | jmp .3 |
||
336 | .4: |
||
337 | mov ah,[current_key_code] |
||
338 | mov [old_key_code],ah |
||
339 | jmp full_screen.extended_key ;key.extended_key |
||
340 | ;--------------------------------------------------------------------- |
||
341 | slide_show_1: |
||
342 | mov eax,[load_directory_pointer] |
||
343 | cmp [eax+4],dword 1 |
||
344 | jbe full_screen.still |
||
345 | mcall 26,9 |
||
346 | cmp [timer],eax |
||
347 | jbe .1 |
||
348 | jmp .still |
||
349 | .red: |
||
350 | call full_screen.draw_window |
||
351 | .still: |
||
352 | mcall 23,10 |
||
353 | cmp eax,1 |
||
354 | je .red |
||
355 | cmp eax,2 |
||
356 | je .key |
||
357 | cmp eax,3 |
||
358 | je .button |
||
359 | ; mcall 68,1 |
||
360 | jmp slide_show_1 |
||
361 | ;------------------------------------------- |
||
362 | .key: |
||
363 | mcall 2 |
||
364 | cmp [extended_key],1 |
||
365 | je .extended_key |
||
366 | test al, al |
||
367 | jnz .still |
||
368 | cmp ah, 0xE0 |
||
369 | jne @f |
||
370 | mov [extended_key],1 |
||
371 | jmp .still |
||
372 | @@: |
||
373 | cmp ah,1 ; Esc |
||
374 | je full_screen.still |
||
375 | cmp ah,185 ; Space |
||
376 | je full_screen.still |
||
377 | jmp .still |
||
378 | .extended_key: |
||
379 | mov [extended_key],0 |
||
380 | mov [current_key_code],ah |
||
381 | jmp .still |
||
382 | ;------------------------------------------- |
||
383 | .button: ; button |
||
384 | mov eax,17 ; get id |
||
385 | mcall |
||
386 | cmp ah,1 ; button id=1 ? |
||
387 | je full_screen.exit ;START.exit |
||
388 | .noclose: |
||
389 | cmp ah,2 |
||
390 | je full_screen.still |
||
391 | jmp slide_show_1 |
||
392 | ;------------------------------------------- |
||
393 | .1: |
||
394 | ; mcall 26,9 |
||
395 | ; add eax,[slide_show_delay] ;500 |
||
396 | ; mov [timer],eax |
||
397 | |||
398 | mov eax,[load_directory_pointer] |
||
399 | mov eax,[eax+4] |
||
400 | test eax,eax |
||
401 | jz @f |
||
402 | dec eax |
||
403 | @@: |
||
404 | cmp [load_file_number],eax |
||
405 | je full_screen.still |
||
406 | inc [load_file_number] |
||
407 | imul ebx,[load_file_number],304 |
||
408 | add ebx,32+40 |
||
409 | add ebx,[load_directory_pointer] |
||
410 | |||
411 | mov esi,string |
||
412 | mov edi,plugin_pach |
||
413 | call copy_file_path |
||
414 | |||
415 | mov esi,plugin_pach |
||
416 | mov edi,string |
||
417 | mov ecx,4096/4 |
||
418 | cld |
||
419 | rep movsd |
||
420 | mov [open_file_flag],0 |
||
421 | mov ecx,-1 |
||
422 | call getappinfo |
||
423 | call load_image |
||
424 | |||
425 | test eax,eax |
||
426 | jnz kopen_1.err |
||
427 | |||
428 | call convert |
||
429 | ; call get_window_param |
||
430 | ; test [window_status],1b |
||
431 | ; jz @f ;draw_still |
||
432 | ; mov [no_draw_window],1 |
||
433 | ; call draw_other |
||
434 | ; mov [no_draw_window],0 |
||
435 | ; jmp slide_show_1 ;.3 |
||
436 | ;@@: |
||
437 | ; call draw_window |
||
438 | call load_directory.copy_dir_path |
||
439 | call full_screen.draw_image |
||
440 | ; jmp slide_show_1 |
||
441 | .3: |
||
442 | mcall 26,9 |
||
443 | add eax,[slide_show_delay] ;500 |
||
444 | mov [timer],eax |
||
445 | jmp slide_show_1 |
||
446 | ;---------------------------------------------------------------------0,600>0,800> |