Rev 7879 | Rev 8497 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
5183 | hidnplayr | 1 | format binary as "" |
2 | |||
1004 | diamond | 3 | use32 |
4 | org 0x0 |
||
5 | |||
6 | db 'MENUET01' |
||
7656 | dunkaist | 7 | dd 0x01, START, I_END, E_END, stacktop, __params, sys_path |
1004 | diamond | 8 | |
9 | ;----------------------------------------------------------------------------- |
||
10 | |||
7656 | dunkaist | 11 | __DEBUG__ = 0 |
12 | __DEBUG_LEVEL__ = 1 |
||
1004 | diamond | 13 | |
7656 | dunkaist | 14 | LG_TRACE equ 1 |
1004 | diamond | 15 | |
7879 | leency | 16 | include '../../../config.inc' |
17 | include '../../../proc32.inc' |
||
18 | include '../../../macros.inc' |
||
19 | include '../../../KOSfuncs.inc' |
||
20 | include '../../../dll.inc' |
||
21 | include '../../../debug-fdo.inc' |
||
22 | include '../../../develop/libraries/libs-dev/libimg/libimg.inc' |
||
7656 | dunkaist | 23 | |
24 | |||
25 | KEY_MOVE_PIXELS = 50 |
||
26 | SCROLL_WIDTH_SIZE = 15 |
||
27 | AR_OFFSET = 10 |
||
28 | |||
7860 | dunkaist | 29 | MIN_WINDOW_WIDTH = 50+25*numimages |
7656 | dunkaist | 30 | MIN_WINDOW_HEIGHT = 100 |
31 | TOOLBAR_HEIGHT = 31 |
||
32 | CANVAS_PADDING = 5 |
||
1004 | diamond | 33 | ;----------------------------------------------------------------------------- |
34 | |||
35 | START: |
||
7656 | dunkaist | 36 | mcall SF_SYSTEM, SSF_MOUSE_SETTINGS, SSSF_SET_SPEED, 5 |
37 | mcall SF_SYSTEM, SSF_MOUSE_SETTINGS, SSSF_SET_SPEEDUP, 5 |
||
38 | mcall SF_SYS_MISC, SSF_HEAP_INIT |
||
39 | mcall SF_KEYBOARD, SSF_SET_INPUT_MODE, 1 ; set kbd mode to scancodes |
||
40 | mcall SF_SET_EVENTS_MASK, EVM_REDRAW or EVM_KEY or EVM_BUTTON or EVM_MOUSE or EVM_MOUSE_FILTER |
||
1004 | diamond | 41 | |
7656 | dunkaist | 42 | stdcall dll.Load, @IMPORT |
43 | or eax, eax |
||
44 | jnz exit |
||
1004 | diamond | 45 | |
7656 | dunkaist | 46 | invoke sort.START, 1 |
1016 | diamond | 47 | |
7656 | dunkaist | 48 | mov ecx, 1 ; for 15.4: 1 = tile |
49 | cmp word[__params], '\T' |
||
50 | jz set_bgr |
||
51 | inc ecx ; for 15.4: 2 = stretch |
||
52 | cmp word[__params], '\S' |
||
53 | jz set_bgr |
||
1004 | diamond | 54 | |
7656 | dunkaist | 55 | cmp byte[__params], 0 |
56 | jz @f |
||
57 | mov esi, __params |
||
58 | mov edi, path |
||
59 | mov ecx, 4096/4 |
||
60 | rep movsd |
||
61 | mov byte[edi-1], 0 |
||
7860 | dunkaist | 62 | @@: |
1594 | mario79 | 63 | ; OpenDialog initialisation |
7656 | dunkaist | 64 | push dword OpenDialog_data |
65 | call [OpenDialog_Init] |
||
1594 | mario79 | 66 | |
1427 | diamond | 67 | ; initialize keyboard handling |
7879 | leency | 68 | invoke ini_get_shortcut, inifilename, aKivSection, aNext, -1, next_mod |
7656 | dunkaist | 69 | mov [next_key], eax |
7879 | leency | 70 | invoke ini_get_shortcut, inifilename, aKivSection, aPrev, -1, prev_mod |
7656 | dunkaist | 71 | mov [prev_key], eax |
7879 | leency | 72 | invoke ini_get_shortcut, inifilename, aKivSection, aSlide, -1, slide_mod |
7656 | dunkaist | 73 | mov [slide_key], eax |
7879 | leency | 74 | invoke ini_get_shortcut, inifilename, aKivSection, aTglbar, -1, tglbar_mod |
7656 | dunkaist | 75 | mov [tglbar_key], eax |
7879 | leency | 76 | |
77 | invoke ini_get_int, inifilename, aKivSection, aWinX, 100 |
||
78 | mov [window.left], eax |
||
79 | invoke ini_get_int, inifilename, aKivSection, aWinY, 150 |
||
80 | mov [window.top], eax |
||
81 | invoke ini_get_int, inifilename, aKivSection, aWinW, 0 |
||
82 | mov [window.width], eax |
||
83 | invoke ini_get_int, inifilename, aKivSection, aWinH, 0 |
||
84 | mov [window.height], eax |
||
1427 | diamond | 85 | |
7656 | dunkaist | 86 | cmp byte[__params], 0 |
87 | jnz params_given |
||
1004 | diamond | 88 | |
7656 | dunkaist | 89 | mov [OpenDialog_data.draw_window], draw_window_fake |
90 | |||
1511 | mario79 | 91 | ; OpenDialog Open |
7656 | dunkaist | 92 | push dword OpenDialog_data |
93 | call [OpenDialog_Start] |
||
1470 | mario79 | 94 | |
7656 | dunkaist | 95 | cmp [OpenDialog_data.status], 1 |
96 | jnz exit |
||
1470 | mario79 | 97 | |
7656 | dunkaist | 98 | mov [OpenDialog_data.draw_window], draw_window |
1470 | mario79 | 99 | |
7656 | dunkaist | 100 | mov esi, path |
101 | mov edi, __params |
||
102 | mov ecx, 4096/4 |
||
103 | rep movsd |
||
104 | mov byte[edi-1], 0 |
||
105 | jmp params_given |
||
1004 | diamond | 106 | |
107 | set_bgr: |
||
7656 | dunkaist | 108 | mcall SF_BACKGROUND_SET, SSF_MODE_BG |
7860 | dunkaist | 109 | stdcall load_image, __params+4 |
7656 | dunkaist | 110 | jc exit |
111 | call set_as_bgr |
||
112 | jmp exit |
||
1004 | diamond | 113 | |
114 | params_given: |
||
7656 | dunkaist | 115 | mov esi, __params |
116 | push esi |
||
117 | call find_last_name_component |
||
118 | call load_directory |
||
1004 | diamond | 119 | |
7656 | dunkaist | 120 | pop eax |
121 | stdcall load_image, eax |
||
122 | jc exit |
||
1427 | diamond | 123 | |
1004 | diamond | 124 | ;----------------------------------------------------------------------------- |
125 | |||
7656 | dunkaist | 126 | redraw_all: |
127 | call draw_window |
||
1004 | diamond | 128 | |
129 | still: |
||
7656 | dunkaist | 130 | mov eax, [orig_image] |
7860 | dunkaist | 131 | test [eax+Image.Flags], Image.IsAnimated |
7656 | dunkaist | 132 | movi eax, SF_WAIT_EVENT |
133 | jz .wait_event |
||
134 | mcall SF_SYSTEM_GET, SSF_TIME_COUNT |
||
135 | mov edx, [cur_frame] |
||
136 | mov ebx, [cur_frame_time] |
||
7860 | dunkaist | 137 | add ebx, [edx+Image.Delay] |
7656 | dunkaist | 138 | sub ebx, eax |
7860 | dunkaist | 139 | cmp ebx, [edx+Image.Delay] |
7656 | dunkaist | 140 | jna @f |
141 | call red_update_frame |
||
142 | jmp still |
||
7860 | dunkaist | 143 | @@: |
7656 | dunkaist | 144 | test ebx, ebx |
145 | jnz @f |
||
146 | call red_update_frame |
||
147 | jmp still |
||
7860 | dunkaist | 148 | @@: |
7656 | dunkaist | 149 | movi eax, SF_WAIT_EVENT_TIMEOUT |
7860 | dunkaist | 150 | .wait_event: |
7656 | dunkaist | 151 | mcall |
152 | dec eax |
||
153 | jns @f |
||
154 | call red_update_frame |
||
155 | jmp still |
||
7860 | dunkaist | 156 | @@: |
7656 | dunkaist | 157 | jz redraw_all |
158 | dec eax |
||
159 | jz key |
||
160 | dec eax |
||
161 | jz button |
||
1004 | diamond | 162 | |
7656 | dunkaist | 163 | mouse: |
7860 | dunkaist | 164 | mov eax, [need_scrollbar_v] |
165 | add eax, [need_scrollbar_h] |
||
166 | test eax, eax |
||
167 | jz .done |
||
7656 | dunkaist | 168 | mov [pict_moved], 0 |
169 | |||
170 | invoke scrollbar_vert_mouse, scroll_bar_data_vertical |
||
171 | invoke scrollbar_hort_mouse, scroll_bar_data_horizontal |
||
172 | xor ecx, ecx |
||
173 | mov eax, [scroll_bar_data_vertical.position] |
||
174 | cmp [pict.top], eax |
||
175 | mov [pict.top], eax |
||
176 | setnz cl |
||
177 | mov eax, [scroll_bar_data_horizontal.position] |
||
178 | cmp [pict.left], eax |
||
179 | mov [pict.left], eax |
||
180 | setnz ch |
||
181 | test ecx, ecx |
||
182 | jz @f |
||
183 | call draw_view |
||
184 | call draw_onimage_decorations |
||
7860 | dunkaist | 185 | @@: |
7656 | dunkaist | 186 | |
187 | ; check for scroll |
||
188 | mcall SF_MOUSE_GET, SSF_SCROLL_DATA |
||
189 | test eax, eax |
||
190 | jz .no_scroll |
||
191 | movsx ecx, ax |
||
192 | shl ecx, 4 |
||
193 | sar eax, 16 |
||
194 | shl eax, 4 |
||
195 | stdcall move_pictport, eax, ecx |
||
196 | mov [pict_moved], eax |
||
197 | jmp .mouse_done |
||
7860 | dunkaist | 198 | .no_scroll: |
7656 | dunkaist | 199 | |
200 | ; get cursor coordinates in window |
||
201 | mcall SF_MOUSE_GET, SSF_WINDOW_POSITION |
||
202 | movsx ebx, ax |
||
203 | cmp ebx, 0 |
||
204 | jge @f |
||
205 | add eax, 0x10000 |
||
7860 | dunkaist | 206 | @@: |
7656 | dunkaist | 207 | mov ecx, [mouse_pos] |
208 | cmp eax, ecx |
||
209 | jz .no_mouse_move |
||
210 | mov [mouse_pos], eax |
||
211 | |||
212 | cmp [pict_drag], 1 |
||
213 | jnz .no_mouse_move |
||
214 | sar eax, 16 |
||
215 | movsx edx, cx |
||
216 | sar ecx, 16 |
||
217 | sub eax, ecx |
||
218 | sub ebx, edx |
||
219 | neg eax |
||
220 | neg ebx |
||
221 | stdcall move_pictport, eax, ebx |
||
222 | mov [pict_moved], eax |
||
223 | jmp .no_mouse_move |
||
7860 | dunkaist | 224 | .no_mouse_move: |
7656 | dunkaist | 225 | |
226 | ; check buttons |
||
227 | mcall SF_MOUSE_GET, SSF_BUTTON |
||
228 | mov ecx, eax |
||
229 | xor ecx, [mouse_buttons] |
||
230 | mov [mouse_buttons], eax |
||
231 | test ecx, 0x01 |
||
232 | jz .left_button_handled |
||
233 | test eax, 0x01 |
||
234 | jnz .left_button_down |
||
7860 | dunkaist | 235 | .left_button_up: |
7656 | dunkaist | 236 | mov [pict_drag], 0 |
237 | jmp .left_button_handled |
||
7860 | dunkaist | 238 | .left_button_down: |
7656 | dunkaist | 239 | mov ecx, [mouse_pos] |
240 | movzx edx, cx |
||
241 | sar ecx, 16 |
||
242 | mov ebx, [canvas_abs_top] |
||
243 | add ebx, [view.top] |
||
244 | cmp ebx, edx |
||
245 | jg .left_click_pict_done |
||
246 | add ebx, [view.height] |
||
247 | cmp ebx, edx |
||
248 | jl .left_click_pict_done |
||
249 | mov ebx, [canvas_abs_left] |
||
250 | add ebx, [view.left] |
||
251 | cmp ebx, ecx |
||
252 | jg .left_click_pict_done |
||
253 | add ebx, [view.width] |
||
254 | cmp ebx, ecx |
||
255 | jl .left_click_pict_done |
||
256 | mov [pict_drag], 1 |
||
257 | jmp .left_button_handled |
||
7860 | dunkaist | 258 | .left_click_pict_done: |
7656 | dunkaist | 259 | |
7860 | dunkaist | 260 | .left_button_handled: |
261 | .mouse_done: |
||
7656 | dunkaist | 262 | mov eax, [pict_moved] |
263 | test eax, eax |
||
264 | jz .done |
||
265 | stdcall update_scrollbars, eax |
||
266 | call draw_view |
||
267 | call draw_onimage_decorations |
||
7860 | dunkaist | 268 | .done: |
7656 | dunkaist | 269 | jmp still |
270 | |||
1080 | diamond | 271 | key: |
7656 | dunkaist | 272 | xor esi, esi |
1427 | diamond | 273 | keyloop: |
7656 | dunkaist | 274 | mcall SF_GET_KEY |
275 | test al, al |
||
276 | jnz keyloopdone |
||
277 | shr eax, 8 |
||
278 | mov ecx, eax |
||
279 | mcall SF_KEYBOARD, SSF_GET_CONTROL_KEYS |
||
280 | mov edx, next_mod |
||
281 | call check_shortcut |
||
282 | jz .next |
||
7860 | dunkaist | 283 | add edx, prev_mod-next_mod |
7656 | dunkaist | 284 | call check_shortcut |
285 | jz .prev |
||
7860 | dunkaist | 286 | add edx, slide_mod-prev_mod |
7656 | dunkaist | 287 | call check_shortcut |
288 | jz .slide |
||
7860 | dunkaist | 289 | add edx, tglbar_mod-slide_mod |
7656 | dunkaist | 290 | call check_shortcut |
291 | jz .tglbar |
||
292 | |||
293 | mov edx, scale_none_mod |
||
294 | call check_shortcut |
||
295 | jz .set_scale_none |
||
7860 | dunkaist | 296 | add edx, scale_fit_min_mod-scale_none_mod |
7656 | dunkaist | 297 | call check_shortcut |
298 | jz .set_scale_fit_min |
||
7860 | dunkaist | 299 | add edx, move_pictport_left_1_mod-scale_fit_min_mod |
7656 | dunkaist | 300 | call check_shortcut |
301 | jz .move_pictport_left |
||
7860 | dunkaist | 302 | add edx, move_pictport_left_2_mod-move_pictport_left_1_mod |
7656 | dunkaist | 303 | call check_shortcut |
304 | jz .move_pictport_left |
||
7860 | dunkaist | 305 | add edx, move_pictport_right_1_mod-move_pictport_left_2_mod |
7656 | dunkaist | 306 | call check_shortcut |
307 | jz .move_pictport_right |
||
7860 | dunkaist | 308 | add edx, move_pictport_right_2_mod-move_pictport_right_1_mod |
7656 | dunkaist | 309 | call check_shortcut |
310 | jz .move_pictport_right |
||
7860 | dunkaist | 311 | add edx, move_pictport_up_1_mod-move_pictport_right_2_mod |
7656 | dunkaist | 312 | call check_shortcut |
313 | jz .move_pictport_up |
||
7860 | dunkaist | 314 | add edx, move_pictport_up_2_mod-move_pictport_up_1_mod |
7656 | dunkaist | 315 | call check_shortcut |
316 | jz .move_pictport_up |
||
7860 | dunkaist | 317 | add edx, move_pictport_down_1_mod-move_pictport_up_2_mod |
7656 | dunkaist | 318 | call check_shortcut |
319 | jz .move_pictport_down |
||
7860 | dunkaist | 320 | add edx, move_pictport_down_2_mod-move_pictport_down_1_mod |
7656 | dunkaist | 321 | call check_shortcut |
322 | jz .move_pictport_down |
||
323 | |||
324 | cmp cl, 1 ; Esc |
||
325 | jz .esc |
||
326 | jmp keyloop |
||
7860 | dunkaist | 327 | .esc: |
7656 | dunkaist | 328 | test [bSlideShow], 1 |
329 | jz keyloop |
||
330 | jmp .slide |
||
7860 | dunkaist | 331 | .tglbar: |
7656 | dunkaist | 332 | bt [window_style], 25 |
333 | jnc @f |
||
334 | mov [bToggleToolbar], 1 |
||
335 | xor [bShowToolbar], 1 |
||
7860 | dunkaist | 336 | @@: |
7656 | dunkaist | 337 | jmp keyloop |
7860 | dunkaist | 338 | .slide: |
7656 | dunkaist | 339 | call slide_show |
340 | jmp keyloop |
||
7860 | dunkaist | 341 | .set_scale_none: |
7726 | dunkaist | 342 | mov eax, LIBIMG_SCALE_NONE |
343 | call set_scale_mode |
||
344 | jz @f |
||
7656 | dunkaist | 345 | call recalc_canvas |
7860 | dunkaist | 346 | @@: |
7656 | dunkaist | 347 | jmp keyloop |
7860 | dunkaist | 348 | .set_scale_fit_min: |
7726 | dunkaist | 349 | mov eax, LIBIMG_SCALE_FIT_MIN |
350 | call set_scale_mode |
||
351 | jz @f |
||
7656 | dunkaist | 352 | call recalc_work |
7860 | dunkaist | 353 | @@: |
7656 | dunkaist | 354 | jmp keyloop |
7860 | dunkaist | 355 | .move_pictport_left: |
7656 | dunkaist | 356 | stdcall move_pictport, -KEY_MOVE_PIXELS, 0 |
357 | stdcall update_scrollbars, eax |
||
358 | call draw_view |
||
359 | call draw_onimage_decorations |
||
360 | jmp keyloop |
||
7860 | dunkaist | 361 | .move_pictport_right: |
7656 | dunkaist | 362 | stdcall move_pictport, KEY_MOVE_PIXELS, 0 |
363 | stdcall update_scrollbars, eax |
||
364 | call draw_view |
||
365 | call draw_onimage_decorations |
||
366 | jmp keyloop |
||
7860 | dunkaist | 367 | .move_pictport_up: |
7656 | dunkaist | 368 | stdcall move_pictport, 0, -KEY_MOVE_PIXELS |
369 | stdcall update_scrollbars, eax |
||
370 | call draw_view |
||
371 | call draw_onimage_decorations |
||
372 | jmp keyloop |
||
7860 | dunkaist | 373 | .move_pictport_down: |
7656 | dunkaist | 374 | stdcall move_pictport, 0, KEY_MOVE_PIXELS |
375 | stdcall update_scrollbars, eax |
||
376 | call draw_view |
||
377 | call draw_onimage_decorations |
||
378 | jmp keyloop |
||
7860 | dunkaist | 379 | .prev: |
7656 | dunkaist | 380 | dec esi |
381 | jmp keyloop |
||
7860 | dunkaist | 382 | .next: |
7656 | dunkaist | 383 | inc esi |
384 | jmp keyloop |
||
1427 | diamond | 385 | keyloopdone: |
7656 | dunkaist | 386 | test esi, esi |
387 | jnz next_or_prev_handler |
||
388 | test [bToggleSlideShow], 1 |
||
389 | jnz redraw_all |
||
390 | test [bToggleToolbar], 1 |
||
391 | stdcall recalc_client |
||
392 | jnz redraw_all |
||
393 | test [bScaleModeChanged], 1 |
||
394 | mov [bScaleModeChanged], 0 |
||
395 | jnz redraw_all |
||
396 | test [bNewImage], 1 |
||
397 | mov [bNewImage], 0 |
||
398 | jnz redraw_all |
||
399 | jmp still |
||
1427 | diamond | 400 | next_or_prev_handler: |
7656 | dunkaist | 401 | call next_or_prev_image |
402 | jmp redraw_all |
||
1004 | diamond | 403 | |
1080 | diamond | 404 | red_update_frame: |
7656 | dunkaist | 405 | mov eax, [cur_frame] |
7860 | dunkaist | 406 | mov eax, [eax+Image.Next] |
7656 | dunkaist | 407 | test eax, eax |
408 | jnz @f |
||
409 | mov eax, [cur_image] |
||
7860 | dunkaist | 410 | @@: |
7656 | dunkaist | 411 | mov [cur_frame], eax |
412 | mcall SF_SYSTEM_GET, SSF_TIME_COUNT |
||
413 | mov [cur_frame_time], eax |
||
414 | call draw_view |
||
415 | ret |
||
1080 | diamond | 416 | |
417 | button: |
||
7656 | dunkaist | 418 | mcall SF_GET_BUTTON |
419 | shr eax, 8 |
||
1004 | diamond | 420 | |
7656 | dunkaist | 421 | ; flip horizontally |
422 | cmp eax, 'flh' |
||
423 | jnz .not_flh |
||
1004 | diamond | 424 | |
7656 | dunkaist | 425 | mov eax, [cur_image] |
426 | cmp eax, [orig_image] |
||
427 | jz @f |
||
428 | invoke img.flip, [cur_image], FLIP_HORIZONTAL |
||
7860 | dunkaist | 429 | @@: |
7656 | dunkaist | 430 | invoke img.flip, [orig_image], FLIP_HORIZONTAL |
431 | jmp redraw_all |
||
1004 | diamond | 432 | |
7656 | dunkaist | 433 | ; flip vertically |
7860 | dunkaist | 434 | .not_flh: |
7656 | dunkaist | 435 | cmp eax, 'flv' |
436 | jnz .not_flv |
||
1004 | diamond | 437 | |
7656 | dunkaist | 438 | mov eax, [cur_image] |
439 | cmp eax, [orig_image] |
||
440 | jz @f |
||
441 | invoke img.flip, [cur_image], FLIP_VERTICAL |
||
7860 | dunkaist | 442 | @@: |
7656 | dunkaist | 443 | invoke img.flip, [orig_image], FLIP_VERTICAL |
444 | jmp redraw_all |
||
1004 | diamond | 445 | |
7656 | dunkaist | 446 | ; flip both horizontally and vertically |
7860 | dunkaist | 447 | .not_flv: |
7656 | dunkaist | 448 | cmp eax, 'flb' |
449 | jnz .not_flb |
||
1004 | diamond | 450 | |
7656 | dunkaist | 451 | mov eax, [cur_image] |
452 | cmp eax, [orig_image] |
||
453 | jz @f |
||
454 | invoke img.flip, [cur_image], FLIP_BOTH |
||
7860 | dunkaist | 455 | @@: |
7656 | dunkaist | 456 | invoke img.flip, [orig_image], FLIP_BOTH |
457 | jmp redraw_all |
||
1004 | diamond | 458 | |
7656 | dunkaist | 459 | ; rotate left |
7860 | dunkaist | 460 | .not_flb: |
7656 | dunkaist | 461 | cmp eax, 'rtl' |
462 | jnz .not_rtl |
||
1004 | diamond | 463 | |
7656 | dunkaist | 464 | push ROTATE_90_CCW |
7860 | dunkaist | 465 | .rotate_common: |
7656 | dunkaist | 466 | mov eax, [cur_image] |
467 | cmp eax, [orig_image] |
||
468 | jz @f |
||
8496 | dunkaist | 469 | push dword[esp] |
470 | invoke img.rotate, [cur_image] |
||
7860 | dunkaist | 471 | @@: |
7656 | dunkaist | 472 | invoke img.rotate, [orig_image] |
8496 | dunkaist | 473 | mov [bNewImage], 1 |
7656 | dunkaist | 474 | jmp redraw_all |
1004 | diamond | 475 | |
7656 | dunkaist | 476 | ; rotate right |
7860 | dunkaist | 477 | .not_rtl: |
7656 | dunkaist | 478 | cmp eax, 'rtr' |
479 | jnz .not_rtr |
||
1004 | diamond | 480 | |
7656 | dunkaist | 481 | push ROTATE_90_CW |
482 | jmp .rotate_common |
||
1004 | diamond | 483 | |
7656 | dunkaist | 484 | ; open new file |
7860 | dunkaist | 485 | .not_rtr: |
7656 | dunkaist | 486 | cmp eax, 'opn' |
487 | jnz @f |
||
488 | |||
1511 | mario79 | 489 | ; OpenDialog Open |
7656 | dunkaist | 490 | push dword OpenDialog_data |
491 | call [OpenDialog_Start] |
||
1475 | diamond | 492 | |
7656 | dunkaist | 493 | cmp [OpenDialog_data.status], 1 |
494 | jnz still |
||
1004 | diamond | 495 | |
7656 | dunkaist | 496 | mov esi, path |
497 | mov edi, __params |
||
498 | push edi |
||
499 | mov ecx, 4096/4 |
||
500 | rep movsd |
||
501 | mov byte[edi-1], 0 |
||
1016 | diamond | 502 | |
7656 | dunkaist | 503 | pop esi |
504 | push esi |
||
505 | call find_last_name_component |
||
1016 | diamond | 506 | |
7656 | dunkaist | 507 | pop eax |
508 | push [cur_image] |
||
509 | stdcall load_image, eax |
||
510 | jc .restore_old |
||
511 | call free_directory |
||
512 | jmp redraw_all |
||
513 | |||
7860 | dunkaist | 514 | .restore_old: |
7656 | dunkaist | 515 | pop eax |
516 | jmp still |
||
517 | |||
518 | ; set background |
||
7860 | dunkaist | 519 | @@: |
7656 | dunkaist | 520 | cmp eax, 'bgr' |
521 | jnz @f |
||
1016 | diamond | 522 | |
7656 | dunkaist | 523 | mcall SF_BACKGROUND_SET, SSF_MODE_BG, 2 ; stretch by default |
524 | call set_as_bgr |
||
525 | jmp still |
||
3116 | dunkaist | 526 | |
7860 | dunkaist | 527 | @@: |
7656 | dunkaist | 528 | cmp eax, 'sld' |
529 | jnz @f |
||
3116 | dunkaist | 530 | |
7656 | dunkaist | 531 | call slide_show |
532 | jmp redraw_all |
||
1016 | diamond | 533 | |
7860 | dunkaist | 534 | @@: |
535 | cmp eax, 'scl' |
||
536 | jnz .not_scl |
||
537 | mov eax, LIBIMG_SCALE_NONE |
||
538 | cmp [scale_mode], LIBIMG_SCALE_NONE |
||
539 | jnz @f |
||
540 | mov eax, LIBIMG_SCALE_FIT_MIN |
||
541 | @@: |
||
542 | call set_scale_mode |
||
543 | jz @f |
||
544 | call recalc_work |
||
545 | @@: |
||
546 | jmp redraw_all |
||
547 | .not_scl: |
||
7656 | dunkaist | 548 | or esi, -1 |
549 | cmp eax, 'bck' |
||
550 | jz next_or_prev_handler |
||
551 | neg esi |
||
552 | cmp eax, 'fwd' |
||
553 | jz next_or_prev_handler |
||
1004 | diamond | 554 | |
7656 | dunkaist | 555 | cmp eax, 1 |
556 | jnz still |
||
1004 | diamond | 557 | |
7656 | dunkaist | 558 | exit: |
7879 | leency | 559 | invoke ini_set_int, inifilename, aKivSection, aWinX, [window.left] |
560 | invoke ini_set_int, inifilename, aKivSection, aWinY, [window.top] |
||
561 | invoke ini_set_int, inifilename, aKivSection, aWinW, [window.width] |
||
562 | invoke ini_set_int, inifilename, aKivSection, aWinH, [window.height] |
||
7656 | dunkaist | 563 | mcall -1 |
1004 | diamond | 564 | |
565 | |||
7656 | dunkaist | 566 | proc load_image _filename |
567 | push ebx esi edi |
||
568 | invoke img.from_file, [_filename] |
||
569 | test eax, eax |
||
570 | jz .error |
||
571 | mov ebx, eax |
||
1004 | diamond | 572 | |
7860 | dunkaist | 573 | test [eax+Image.Flags], Image.IsAnimated |
7656 | dunkaist | 574 | jnz @f |
7860 | dunkaist | 575 | cmp [eax+Image.Next], 0 |
7656 | dunkaist | 576 | jz @f |
577 | stdcall merge_icons_to_single_img, eax |
||
578 | test eax, eax |
||
579 | jz .error_destroy |
||
7860 | dunkaist | 580 | @@: |
7656 | dunkaist | 581 | stdcall init_frame, eax |
582 | clc |
||
583 | jmp .exit |
||
1004 | diamond | 584 | |
7860 | dunkaist | 585 | .error_destroy: |
7656 | dunkaist | 586 | invoke img.destroy, ebx |
587 | xor eax, eax |
||
7860 | dunkaist | 588 | .error: |
7656 | dunkaist | 589 | stc |
7860 | dunkaist | 590 | .exit: |
7656 | dunkaist | 591 | pop edi esi ebx |
592 | ret |
||
593 | endp |
||
1004 | diamond | 594 | |
6804 | IgorA | 595 | |
7656 | dunkaist | 596 | ; in: eax -- pointer to image |
597 | ; out: fill pict structure |
||
598 | proc calculate_picture_size |
||
7860 | dunkaist | 599 | mov edx, [eax+Image.Width] |
600 | test [eax+Image.Flags], Image.IsAnimated |
||
7656 | dunkaist | 601 | jnz .not_in_row |
602 | push eax |
||
7860 | dunkaist | 603 | @@: |
604 | cmp [eax+Image.Next], 0 |
||
7656 | dunkaist | 605 | jz @f |
7860 | dunkaist | 606 | mov eax, [eax+Image.Next] |
607 | add edx, [eax+Image.Width] |
||
7656 | dunkaist | 608 | inc edx |
609 | jmp @b |
||
7860 | dunkaist | 610 | @@: |
7656 | dunkaist | 611 | pop eax |
7860 | dunkaist | 612 | .not_in_row: |
7656 | dunkaist | 613 | mov [pict.width], edx |
614 | add edx, 19 |
||
7860 | dunkaist | 615 | cmp edx, 50+25*numimages |
7656 | dunkaist | 616 | jae @f |
7860 | dunkaist | 617 | mov edx, 50+25*numimages |
618 | @@: |
||
619 | mov esi, [eax+Image.Height] |
||
620 | test [eax+Image.Flags], Image.IsAnimated |
||
7656 | dunkaist | 621 | jnz .max_equals_first |
622 | push eax |
||
7860 | dunkaist | 623 | @@: |
624 | cmp [eax+Image.Next], 0 |
||
7656 | dunkaist | 625 | jz @f |
7860 | dunkaist | 626 | mov eax, [eax+Image.Next] |
627 | cmp esi, [eax+Image.Height] |
||
7656 | dunkaist | 628 | jae @b |
7860 | dunkaist | 629 | mov esi, [eax+Image.Height] |
7656 | dunkaist | 630 | jmp @b |
7860 | dunkaist | 631 | @@: |
7656 | dunkaist | 632 | pop eax |
7860 | dunkaist | 633 | .max_equals_first: |
7656 | dunkaist | 634 | mov [pict.height], esi |
635 | ret |
||
6804 | IgorA | 636 | endp |
637 | |||
1004 | diamond | 638 | |
7656 | dunkaist | 639 | ; in: [orig_image] |
640 | proc set_as_bgr |
||
641 | mov esi, [orig_image] |
||
7860 | dunkaist | 642 | mov ecx, [esi+Image.Width] |
643 | mov edx, [esi+Image.Height] |
||
7656 | dunkaist | 644 | mcall SF_BACKGROUND_SET, SSF_SIZE_BG |
645 | mcall SF_BACKGROUND_SET, SSF_MAP_BG |
||
646 | test eax, eax |
||
647 | jz @f |
||
1004 | diamond | 648 | |
7656 | dunkaist | 649 | push eax |
650 | invoke img.to_rgb2, esi, eax |
||
651 | pop ecx |
||
652 | mcall SF_BACKGROUND_SET, SSF_UNMAP_BG |
||
1016 | diamond | 653 | |
7860 | dunkaist | 654 | @@: |
7656 | dunkaist | 655 | mcall SF_BACKGROUND_SET, SSF_REDRAW_BG |
656 | ; save to file eskin.ini |
||
657 | xor al, al |
||
658 | mov ecx, 1024 |
||
659 | mov edi, sys_path+2 |
||
660 | repne scasb |
||
661 | sub edi, sys_path+3 |
||
662 | invoke ini_set_str, inifileeskin, amain, aprogram, sys_path+2, edi |
||
663 | ; add param '\S__' |
||
664 | cmp word[__params], '\T' |
||
665 | jz @f |
||
666 | cmp word[__params], '\S' |
||
667 | je @f |
||
668 | mov esi, __params+4096-8 |
||
669 | mov edi, __params+4096-4 |
||
670 | mov ecx, 4096/4-1 |
||
671 | std |
||
672 | rep movsd |
||
673 | cld |
||
674 | mov dword[__params], '\S__' |
||
7860 | dunkaist | 675 | @@: |
7656 | dunkaist | 676 | xor al, al |
677 | mov ecx, 4096 |
||
678 | mov edi, __params |
||
679 | repne scasb |
||
680 | sub edi, __params+1 |
||
681 | invoke ini_set_str, inifileeskin, amain, aparam, __params, edi |
||
682 | ret |
||
683 | endp |
||
1016 | diamond | 684 | |
7656 | dunkaist | 685 | proc slide_show |
686 | push ebx esi edi |
||
687 | mov [bToggleSlideShow], 1 |
||
688 | btc [window_style], 25 |
||
689 | xor [bSlideShow], 1 |
||
690 | jnz .to_fullscreen |
||
691 | ; back from fullscreen |
||
692 | movzx eax, [bShowToolbarSave] |
||
693 | mov [bShowToolbar], al |
||
694 | mov [canvas_padding], CANVAS_PADDING |
||
695 | mov [bg_color], 0x00ffffff |
||
696 | mcall SF_CHANGE_WINDOW, [window_save.left], [window_save.top], [window_save.width], [window_save.height] |
||
697 | jmp .done |
||
7860 | dunkaist | 698 | .to_fullscreen: |
7656 | dunkaist | 699 | stdcall copy_box, window, window_save |
700 | movzx eax, [bShowToolbar] |
||
701 | mov [bShowToolbarSave], al |
||
702 | mov [bShowToolbar], 0 |
||
703 | mov [canvas_padding], 0 |
||
704 | mov [bg_color], 0x00000000 |
||
705 | mcall SF_GET_SCREEN_SIZE |
||
706 | mov edx, eax |
||
707 | shr edx, 16 |
||
708 | movzx eax, ax |
||
709 | mov esi, eax |
||
710 | mcall SF_CHANGE_WINDOW, 0, 0, , |
||
7726 | dunkaist | 711 | mov eax, LIBIMG_SCALE_FIT_MIN |
712 | call set_scale_mode |
||
1016 | diamond | 713 | |
7860 | dunkaist | 714 | .done: |
7656 | dunkaist | 715 | pop edi esi ebx |
716 | ret |
||
717 | endp |
||
7421 | leency | 718 | |
1016 | diamond | 719 | |
1427 | diamond | 720 | ; seek to ESI image files |
7860 | dunkaist | 721 | ; esi>0 means next file, esi<0-prev file |
7656 | dunkaist | 722 | proc next_or_prev_image |
723 | locals |
||
724 | files_cnt dd ? |
||
725 | file_idx dd ? |
||
726 | endl |
||
727 | push ebx esi edi |
||
728 | push esi |
||
729 | call load_directory |
||
730 | pop esi |
||
731 | mov eax, [directory_ptr] |
||
732 | mov eax, [eax+4] |
||
733 | mov [files_cnt], eax |
||
734 | cmp [directory_ptr], 0 |
||
735 | jz .ret |
||
736 | cmp [files_cnt], 0 ; number of files |
||
737 | jz .ret |
||
738 | mov eax, [cur_file_idx] |
||
739 | cmp eax, -1 |
||
740 | jnz @f |
||
741 | test esi, esi |
||
742 | jns @f |
||
743 | mov eax, [files_cnt] |
||
7860 | dunkaist | 744 | @@: |
7656 | dunkaist | 745 | add eax, esi |
7860 | dunkaist | 746 | @@: |
7656 | dunkaist | 747 | test eax, eax |
748 | jns @f |
||
749 | add eax, [files_cnt] |
||
750 | jmp @b |
||
7860 | dunkaist | 751 | @@: |
7656 | dunkaist | 752 | cmp eax, [files_cnt] |
753 | jb @f |
||
754 | sub eax, [files_cnt] |
||
755 | jmp @b |
||
7860 | dunkaist | 756 | @@: |
7656 | dunkaist | 757 | mov [file_idx], eax |
7860 | dunkaist | 758 | .scanloop: |
7656 | dunkaist | 759 | push eax esi |
760 | imul esi, eax, 304 |
||
761 | add esi, [directory_ptr] |
||
7860 | dunkaist | 762 | add esi, 32+40 |
7656 | dunkaist | 763 | mov edi, curdir |
7860 | dunkaist | 764 | @@: |
7656 | dunkaist | 765 | inc edi |
766 | cmp byte[edi-1], 0 |
||
767 | jnz @b |
||
768 | mov byte[edi-1], '/' |
||
7860 | dunkaist | 769 | @@: |
7656 | dunkaist | 770 | lodsb |
771 | stosb |
||
772 | test al, al |
||
773 | jnz @b |
||
774 | mov esi, curdir |
||
775 | push esi |
||
776 | mov edi, __params |
||
777 | mov ecx, 4096/4 |
||
778 | rep movsd |
||
779 | mov byte[edi-1], 0 |
||
780 | pop esi |
||
781 | stdcall load_image, curdir |
||
782 | pushfd |
||
7860 | dunkaist | 783 | @@: |
7656 | dunkaist | 784 | lodsb |
785 | test al, al |
||
786 | jnz @b |
||
7860 | dunkaist | 787 | @@: |
7656 | dunkaist | 788 | dec esi |
789 | cmp byte[esi], '/' |
||
790 | jnz @b |
||
791 | mov byte[esi], 0 |
||
792 | popfd |
||
793 | pop esi eax |
||
794 | jnc .loadedok |
||
795 | test esi, esi |
||
796 | js .try_prev |
||
7860 | dunkaist | 797 | .try_next: |
7656 | dunkaist | 798 | inc eax |
799 | cmp eax, [files_cnt] |
||
800 | jb @f |
||
801 | xor eax, eax |
||
7860 | dunkaist | 802 | @@: |
803 | .try_common: |
||
7656 | dunkaist | 804 | cmp eax, [file_idx] |
805 | jz .notfound |
||
806 | jmp .scanloop |
||
7860 | dunkaist | 807 | .try_prev: |
7656 | dunkaist | 808 | dec eax |
809 | jns @f |
||
810 | mov eax, [files_cnt] |
||
811 | dec eax |
||
7860 | dunkaist | 812 | @@: |
7656 | dunkaist | 813 | jmp .try_common |
7860 | dunkaist | 814 | .loadedok: |
7656 | dunkaist | 815 | mov [cur_file_idx], eax |
7860 | dunkaist | 816 | .ret: |
7656 | dunkaist | 817 | pop edi esi ebx |
818 | ret |
||
7860 | dunkaist | 819 | .notfound: |
7656 | dunkaist | 820 | pop edi esi ebx |
821 | ret |
||
822 | endp |
||
1016 | diamond | 823 | |
7656 | dunkaist | 824 | |
1016 | diamond | 825 | load_directory: |
7656 | dunkaist | 826 | cmp [directory_ptr], 0 |
827 | jnz .ret |
||
828 | mov esi, __params |
||
829 | mov edi, curdir |
||
830 | mov ecx, [last_name_component] |
||
831 | sub ecx, esi |
||
832 | dec ecx |
||
833 | js @f |
||
834 | rep movsb |
||
7860 | dunkaist | 835 | @@: |
7656 | dunkaist | 836 | mov byte[edi], 0 |
837 | mcall 68, 12, 0x1000 |
||
838 | test eax, eax |
||
839 | jz .ret |
||
840 | mov ebx, readdir_fileinfo |
||
7860 | dunkaist | 841 | mov dword[ebx+12], (0x1000-32) / 304 ; blocks to read |
7656 | dunkaist | 842 | mov dword[ebx+16], eax ; where to store |
843 | mcall 70 |
||
844 | cmp eax, 6 ; read ok, but there are more files |
||
845 | jz .dirok |
||
846 | test eax, eax |
||
847 | jnz free_directory |
||
848 | mov edx, [directory_ptr] |
||
849 | mov ecx, [edx+8] ; total number of files |
||
850 | mov [readblocks], ecx |
||
851 | imul ecx, 304 ; try to read entire dir, FIXME |
||
852 | add ecx, 32 ; plus header |
||
853 | mcall 68, 20 ; realloc |
||
854 | test eax, eax |
||
855 | jz free_directory |
||
856 | mov [directory_ptr], eax |
||
857 | mcall 70, readdir_fileinfo |
||
7860 | dunkaist | 858 | .dirok: |
7656 | dunkaist | 859 | cmp ebx, 0 |
860 | jle free_directory |
||
861 | mov eax, [directory_ptr] |
||
7860 | dunkaist | 862 | mov edi, [eax+8] ; total number of files |
7656 | dunkaist | 863 | mov [files_num], edi |
864 | add eax, 32 ; skip header |
||
865 | mov edi, eax |
||
866 | push 0 |
||
7860 | dunkaist | 867 | .dirskip: |
7656 | dunkaist | 868 | push eax |
869 | test byte[eax], 0x18 ; volume label or folder |
||
870 | jnz .nocopy |
||
871 | lea esi, [eax+40] ; name |
||
872 | mov ecx, esi |
||
7860 | dunkaist | 873 | @@: |
7656 | dunkaist | 874 | lodsb |
875 | test al, al |
||
876 | jnz @b |
||
7860 | dunkaist | 877 | @@: |
7656 | dunkaist | 878 | dec esi |
879 | cmp esi, ecx |
||
880 | jb .noext |
||
881 | cmp byte[esi], '.' |
||
882 | jnz @b |
||
883 | inc esi |
||
884 | mov ecx, [esi] |
||
885 | cmp byte[esi+3], 0 |
||
886 | jnz .not_3 |
||
887 | or ecx, 0x202020 |
||
888 | cmp ecx, 'jpg' |
||
889 | jz .copy |
||
890 | cmp ecx, 'bmp' |
||
891 | jz .copy |
||
892 | cmp ecx, 'gif' |
||
893 | jz .copy |
||
894 | cmp ecx, 'png' |
||
895 | jz .copy |
||
896 | cmp ecx, 'jpe' |
||
897 | jz .copy |
||
898 | cmp ecx, 'ico' |
||
899 | jz .copy |
||
900 | cmp ecx, 'cur' |
||
901 | jz .copy |
||
902 | cmp ecx, 'tga' |
||
903 | jz .copy |
||
904 | cmp ecx, 'pcx' |
||
905 | jz .copy |
||
906 | cmp ecx, 'xcf' |
||
907 | jz .copy |
||
908 | cmp ecx, 'pbm' |
||
909 | jz .copy |
||
910 | cmp ecx, 'pgm' |
||
911 | jz .copy |
||
912 | cmp ecx, 'pnm' |
||
913 | jz .copy |
||
914 | cmp ecx, 'ppm' |
||
915 | jz .copy |
||
916 | cmp ecx, 'tif' |
||
917 | jz .copy |
||
918 | cmp ecx, 'xbm' |
||
919 | jz .copy |
||
7860 | dunkaist | 920 | .not_3: |
7656 | dunkaist | 921 | cmp byte[esi+4], 0 |
922 | jnz .nocopy |
||
923 | or ecx, 0x20202020 |
||
924 | cmp ecx, 'tiff' |
||
925 | jz @f |
||
926 | cmp ecx, 'wbmp' |
||
927 | jz @f |
||
928 | cmp ecx, 'webp' |
||
929 | jz @f |
||
930 | cmp ecx, 'jpeg' |
||
931 | jnz .nocopy |
||
7860 | dunkaist | 932 | @@: |
7656 | dunkaist | 933 | cmp byte[esi+4], 0 |
934 | jnz .nocopy |
||
7860 | dunkaist | 935 | .copy: |
7656 | dunkaist | 936 | mov esi, [esp] |
937 | mov ecx, 304 / 4 |
||
938 | rep movsd |
||
939 | inc dword[esp+4] |
||
7860 | dunkaist | 940 | .nocopy: |
941 | .noext: |
||
7656 | dunkaist | 942 | pop eax |
943 | add eax, 304 |
||
944 | dec ebx |
||
945 | jnz .dirskip |
||
946 | mov eax, [directory_ptr] |
||
947 | pop ebx |
||
948 | mov [eax+4], ebx |
||
949 | test ebx, ebx |
||
950 | jz free_directory |
||
951 | push 0 ; sort mode |
||
952 | push ebx |
||
953 | add eax, 32 |
||
954 | push eax |
||
955 | call [SortDir] |
||
956 | xor eax, eax |
||
957 | mov edi, [directory_ptr] |
||
7860 | dunkaist | 958 | add edi, 32+40 ; name |
959 | .scan: |
||
7656 | dunkaist | 960 | mov esi, [last_name_component] |
961 | push edi |
||
962 | invoke strcmpi |
||
963 | pop edi |
||
964 | jz .found |
||
965 | inc eax |
||
966 | add edi, 304 |
||
967 | dec ebx |
||
968 | jnz .scan |
||
969 | or eax, -1 |
||
7860 | dunkaist | 970 | .found: |
7656 | dunkaist | 971 | mov [cur_file_idx], eax |
7860 | dunkaist | 972 | .ret: |
7656 | dunkaist | 973 | ret |
1016 | diamond | 974 | |
975 | free_directory: |
||
7656 | dunkaist | 976 | mcall 68, 13, [directory_ptr] |
977 | and [directory_ptr], 0 |
||
978 | ret |
||
1016 | diamond | 979 | |
7656 | dunkaist | 980 | |
1427 | diamond | 981 | ; in: esi->full name (e.g. /path/to/file.png) |
982 | ; out: [last_name_component]->last component (e.g. file.png) |
||
7656 | dunkaist | 983 | proc find_last_name_component |
984 | mov ecx, esi |
||
7860 | dunkaist | 985 | @@: |
7656 | dunkaist | 986 | lodsb |
987 | test al, al |
||
988 | jnz @b |
||
7860 | dunkaist | 989 | @@: |
7656 | dunkaist | 990 | dec esi |
991 | cmp esi, ecx |
||
992 | jb @f |
||
993 | cmp byte[esi], '/' |
||
994 | jnz @b |
||
7860 | dunkaist | 995 | @@: |
7656 | dunkaist | 996 | inc esi |
997 | mov [last_name_component], esi |
||
998 | ret |
||
999 | endp |
||
1427 | diamond | 1000 | |
1080 | diamond | 1001 | |
7860 | dunkaist | 1002 | proc init_frame uses ebx edx, _img |
7656 | dunkaist | 1003 | mov eax, [orig_image] |
1004 | cmp eax, [_img] |
||
1005 | jz .exit |
||
1006 | test eax, eax |
||
1007 | jz .freed |
||
1008 | cmp eax, [cur_image] |
||
1009 | jz @f |
||
1010 | invoke img.destroy, [orig_image] |
||
7860 | dunkaist | 1011 | @@: |
7656 | dunkaist | 1012 | invoke img.destroy, [cur_image] |
7860 | dunkaist | 1013 | .freed: |
3116 | dunkaist | 1014 | |
7656 | dunkaist | 1015 | mov [bNewImage], 1 |
1016 | mov eax, [_img] |
||
1017 | mov [orig_image], eax |
||
1018 | mov [cur_image], eax |
||
1019 | mov [cur_frame], eax |
||
7860 | dunkaist | 1020 | test byte[eax+Image.Flags], Image.IsAnimated |
7656 | dunkaist | 1021 | jz @f |
1022 | push ebx |
||
1023 | mcall SF_SYSTEM_GET, SSF_TIME_COUNT |
||
1024 | pop ebx |
||
1025 | mov [cur_frame_time], eax |
||
7860 | dunkaist | 1026 | @@: |
7656 | dunkaist | 1027 | mov [pict.top], 0 |
1028 | mov [pict.left], 0 |
||
7860 | dunkaist | 1029 | .exit: |
7656 | dunkaist | 1030 | ret |
1031 | endp |
||
1040 | diamond | 1032 | |
1033 | |||
7656 | dunkaist | 1034 | proc draw_window |
1035 | test [bFirstWinDraw], 1 |
||
1036 | jnz .min_size_ok |
||
1040 | diamond | 1037 | |
7656 | dunkaist | 1038 | mcall SF_THREAD_INFO, procinfo, -1 |
1039 | xor eax, eax |
||
1040 | mov edx, -1 |
||
1041 | mov esi, -1 |
||
1042 | cmp [procinfo.box.width], MIN_WINDOW_WIDTH |
||
1043 | ja @f |
||
1044 | mov edx, MIN_WINDOW_WIDTH |
||
1045 | inc eax |
||
7860 | dunkaist | 1046 | @@: |
7656 | dunkaist | 1047 | cmp [procinfo.box.height], MIN_WINDOW_HEIGHT |
1048 | ja @f |
||
1049 | mov esi, MIN_WINDOW_HEIGHT |
||
1050 | inc eax |
||
7860 | dunkaist | 1051 | @@: |
7656 | dunkaist | 1052 | test eax, eax |
1053 | jz @f |
||
1054 | mcall SF_CHANGE_WINDOW, -1, -1, , |
||
7860 | dunkaist | 1055 | @@: |
1004 | diamond | 1056 | |
7860 | dunkaist | 1057 | .min_size_ok: |
7656 | dunkaist | 1058 | test [bNewImage], 1 |
1059 | jz @f |
||
1060 | call generate_window_header |
||
7860 | dunkaist | 1061 | @@: |
7879 | leency | 1062 | cmp [window.width], 0 |
1063 | jne @f |
||
1064 | mcall SF_GET_SCREEN_SIZE |
||
1065 | mov ebx,eax ; |
||
1066 | shr ebx,16 ; ebx = width |
||
1067 | movzx esi,ax ; esi = height |
||
1068 | |||
1069 | mov eax, ebx |
||
1070 | xor edx, edx |
||
1071 | mov ebx, 3 |
||
1072 | div ebx |
||
1073 | imul eax, 2 |
||
1074 | mov [window.width], eax |
||
1075 | |||
1076 | xor edx, edx |
||
1077 | mov ebx, 4 |
||
1078 | div ebx |
||
1079 | mov [window.left], eax |
||
1080 | |||
1081 | mov eax, esi |
||
1082 | xor edx, edx |
||
1083 | mov ebx, 3 |
||
1084 | div ebx |
||
1085 | imul eax, 2 |
||
1086 | mov [window.height], eax |
||
1087 | |||
1088 | xor edx, edx |
||
1089 | mov ebx, 4 |
||
1090 | div ebx |
||
1091 | mov [window.top], eax |
||
1092 | @@: |
||
1093 | |||
7656 | dunkaist | 1094 | mcall SF_REDRAW, SSF_BEGIN_DRAW |
1095 | mov ecx, [window.top] |
||
1096 | shl ecx, 16 |
||
1097 | mov cx, word[window.height] |
||
1098 | mov ebx, [window.left] |
||
1099 | shl ebx, 16 |
||
1100 | mov bx, word[window.width] |
||
1101 | mcall 0, , , [window_style], 0, window_header |
||
1004 | diamond | 1102 | |
7656 | dunkaist | 1103 | mcall SF_THREAD_INFO, procinfo, -1 |
1104 | test [procinfo.wnd_state], 0x04 |
||
1105 | jnz .nodraw |
||
1004 | diamond | 1106 | |
7656 | dunkaist | 1107 | stdcall copy_box, window, window_prev |
1108 | stdcall copy_box, procinfo.box, window |
||
1109 | test [bFirstWinDraw], 1 |
||
1110 | jnz .recalc |
||
1111 | test [bToggleSlideShow], 1 |
||
1112 | jnz .recalc |
||
1113 | mov eax, [window.width] |
||
1114 | cmp eax, [window_prev.width] |
||
1115 | jnz .recalc |
||
1116 | mov eax, [window.height] |
||
1117 | cmp eax, [window_prev.height] |
||
1118 | jnz .recalc |
||
1119 | test [bNewImage], 1 |
||
1120 | jnz .recalc |
||
1121 | test [bToggleToolbar], 1 |
||
1122 | jnz .recalc |
||
1123 | jmp .recalc_done |
||
1004 | diamond | 1124 | |
7860 | dunkaist | 1125 | .recalc: |
7656 | dunkaist | 1126 | stdcall recalc_window |
7860 | dunkaist | 1127 | .recalc_done: |
1004 | diamond | 1128 | |
7656 | dunkaist | 1129 | stdcall draw_client |
7860 | dunkaist | 1130 | .nodraw: |
7656 | dunkaist | 1131 | mcall SF_REDRAW, SSF_END_DRAW |
1132 | mov [bFirstWinDraw], 0 |
||
1133 | mov [bNewImage], 0 |
||
1134 | mov [bToggleToolbar], 0 |
||
1135 | mov [bToggleSlideShow], 0 |
||
3116 | dunkaist | 1136 | |
7656 | dunkaist | 1137 | ret |
1138 | endp |
||
1004 | diamond | 1139 | |
1040 | diamond | 1140 | |
7860 | dunkaist | 1141 | proc draw_view uses ebx esi edi |
7656 | dunkaist | 1142 | cmp [scale_mode], LIBIMG_SCALE_FIT_MIN |
1143 | jnz .scale_none |
||
1144 | mov ecx, [cur_frame] |
||
7860 | dunkaist | 1145 | mov eax, [ecx+Image.Width] |
7656 | dunkaist | 1146 | cmp eax, [view.width] |
1147 | jnz .scale |
||
7860 | dunkaist | 1148 | mov eax, [ecx+Image.Height] |
7656 | dunkaist | 1149 | cmp eax, [view.height] |
1150 | jnz .scale |
||
1151 | jmp .draw |
||
7860 | dunkaist | 1152 | .scale: |
7656 | dunkaist | 1153 | mov eax, [orig_image] |
1154 | cmp eax, [cur_image] |
||
1155 | jz @f |
||
1156 | invoke img.destroy, [cur_image] |
||
1157 | mov eax, [orig_image] |
||
7860 | dunkaist | 1158 | @@: |
1159 | invoke img.scale, eax, 0, 0, [eax+Image.Width], [eax+Image.Height], 0, LIBIMG_SCALE_STRETCH, LIBIMG_INTER_DEFAULT, [view.width], [view.height] |
||
7656 | dunkaist | 1160 | test eax, eax |
1161 | ;FIXME |
||
1162 | mov [cur_image], eax |
||
1163 | mov [cur_frame], eax ; FIXME index |
||
1164 | jmp .draw |
||
1004 | diamond | 1165 | |
7860 | dunkaist | 1166 | .scale_none: |
1080 | diamond | 1167 | |
7860 | dunkaist | 1168 | .draw: |
7656 | dunkaist | 1169 | push [pict.top] |
1170 | push [pict.left] |
||
1171 | push [view.height] |
||
1172 | push [view.width] |
||
1173 | push [view_abs_top] ; ypos |
||
1174 | push [view_abs_left] ; xpos |
||
1175 | invoke img.draw, [cur_frame] |
||
7860 | dunkaist | 1176 | .done: |
7656 | dunkaist | 1177 | ret |
1178 | endp |
||
1004 | diamond | 1179 | |
7860 | dunkaist | 1180 | proc draw_scale_button |
1181 | pushad |
||
1182 | mcall 65, buttons+scalebtn*20, <20,20>, [scale_button_xy], 8, palette |
||
1183 | mov ebx, [scale_button_xy] |
||
1184 | add ebx, 0x00050006 |
||
1185 | ; print letter(s) corresponding to the current scaling mode |
||
1186 | mov edi, 2 |
||
1187 | mov [scale_button_letter], 'x1' |
||
1188 | cmp [scale_mode], LIBIMG_SCALE_NONE |
||
1189 | jz @f |
||
1190 | add ebx, 0x00020001 |
||
1191 | mov edi, 1 |
||
1192 | mov [scale_button_letter], 'W' |
||
1193 | ; cmp [scale_mode], LIBIMG_SCALE_FIT_MIN |
||
1194 | @@: |
||
7862 | dunkaist | 1195 | mcall 4, , 0x800000ff, scale_button_letter |
7860 | dunkaist | 1196 | popad |
1197 | ret |
||
1198 | endp |
||
7656 | dunkaist | 1199 | |
7860 | dunkaist | 1200 | proc draw_toolbar uses ebx esi edi |
7656 | dunkaist | 1201 | cmp [toolbar.height], 0 |
1202 | jz .quit |
||
1203 | mov ebx, [toolbar_abs_left] |
||
1204 | shl ebx, 16 |
||
1205 | add ebx, [toolbar.width] |
||
1206 | inc ebx |
||
1207 | mov ecx, [toolbar_abs_top] |
||
1208 | shl ecx, 16 |
||
1209 | add ecx, [toolbar.height] |
||
1210 | mcall 13, , , [bg_color] |
||
1211 | mov ebx, [toolbar_abs_left] |
||
1212 | shl ebx, 16 |
||
1213 | add ebx, [toolbar_abs_left] |
||
1214 | add ebx, [toolbar.width] |
||
1215 | mov ecx, [toolbar_abs_top] |
||
1216 | shl ecx, 16 |
||
1217 | add ecx, [toolbar_abs_top] |
||
7860 | dunkaist | 1218 | add ecx, (30 SHL 16)+30 |
7656 | dunkaist | 1219 | mcall 38, , , 0x007F7F7F |
1220 | mov ebx, [toolbar_abs_left] |
||
1221 | shl ebx, 16 |
||
1222 | add ebx, [toolbar_abs_left] |
||
7860 | dunkaist | 1223 | add ebx, ((5+25*1) SHL 16)+(5+25*1) |
7656 | dunkaist | 1224 | mov ecx, [toolbar_abs_top] |
1225 | shl ecx, 16 |
||
1226 | add ecx, [toolbar_abs_top] |
||
1227 | add ecx, [toolbar.height] |
||
1228 | mcall |
||
7860 | dunkaist | 1229 | add ebx, ((5+25*2) SHL 16)+(5+25*2) |
7656 | dunkaist | 1230 | mcall |
7860 | dunkaist | 1231 | add ebx, ((5+25*2) SHL 16)+(5+25*2) |
7656 | dunkaist | 1232 | mcall |
7860 | dunkaist | 1233 | add ebx, ((5+25*1) SHL 16)+(5+25*1) |
1234 | mcall |
||
7656 | dunkaist | 1235 | mov ebx, [toolbar_abs_left] |
1236 | add ebx, [toolbar.width] |
||
7860 | dunkaist | 1237 | sub ebx, 25*5+10 |
7656 | dunkaist | 1238 | shl ebx, 16 |
1239 | add ebx, [toolbar_abs_left] |
||
1240 | add ebx, [toolbar.width] |
||
7860 | dunkaist | 1241 | sub ebx, 25*5+10 |
7656 | dunkaist | 1242 | mcall |
1243 | |||
1244 | mov ebx, [toolbar_abs_left] |
||
1245 | shl ebx, 16 |
||
7860 | dunkaist | 1246 | add ebx, ((4+25*0) SHL 16)+21 |
7656 | dunkaist | 1247 | mov ecx, [toolbar_abs_top] |
1248 | shl ecx, 16 |
||
7860 | dunkaist | 1249 | add ecx, (4 SHL 16)+21 |
7656 | dunkaist | 1250 | mcall SF_DEFINE_BUTTON, , , 'opn'+40000000h |
7860 | dunkaist | 1251 | add ebx, (5+25*1) SHL 16 |
7656 | dunkaist | 1252 | mcall , , , 'bck'+40000000h |
7860 | dunkaist | 1253 | add ebx, (0+25*1) SHL 16 |
7656 | dunkaist | 1254 | mcall , , , 'fwd'+40000000h |
7860 | dunkaist | 1255 | add ebx, (5+25*1) SHL 16 |
7656 | dunkaist | 1256 | mcall , , , 'bgr'+40000000h |
7860 | dunkaist | 1257 | add ebx, (0+25*1) SHL 16 |
7656 | dunkaist | 1258 | mcall , , , 'sld'+40000000h |
7860 | dunkaist | 1259 | add ebx, (5+25*1) SHL 16 |
1260 | mcall , , , 'scl'+40000000h |
||
7656 | dunkaist | 1261 | mov ebx, [toolbar_abs_left] |
1262 | add ebx, [toolbar.width] |
||
7860 | dunkaist | 1263 | sub ebx, 25*5+10 |
7656 | dunkaist | 1264 | add ebx, 5 |
1265 | shl ebx, 16 |
||
1266 | mov bl, 21 |
||
1267 | mcall , , , 'flh'+40000000h |
||
1268 | add ebx, 25 SHL 16 |
||
1269 | mcall , , , 'flv'+40000000h |
||
1270 | add ebx, 30 SHL 16 |
||
1271 | mcall , , , 'rtr'+40000000h |
||
1272 | add ebx, 25 SHL 16 |
||
1273 | mcall , , , 'rtl'+40000000h |
||
1274 | add ebx, 25 SHL 16 |
||
1275 | mcall , , , 'flb'+40000000h |
||
1276 | |||
1277 | mov ebp, (numimages-1)*20 |
||
1278 | |||
1279 | mov edx, [toolbar_abs_left] |
||
1280 | shl edx, 16 |
||
1281 | add edx, [toolbar_abs_top] |
||
7860 | dunkaist | 1282 | add edx, ((5+25*0) SHL 16)+5 |
1283 | mcall 65, buttons+openbtn *20, <20, 20>, , 8, palette |
||
1284 | add edx, ((5+25*1) SHL 16)+0 |
||
1285 | mcall , buttons+backbtn *20 |
||
1286 | add edx, ((0+25*1) SHL 16)+0 |
||
1287 | mcall , buttons+forwardbtn*20 |
||
1288 | add edx, ((5+25*1) SHL 16)+0 |
||
1289 | mcall , buttons+bgrbtn *20 |
||
1290 | add edx, ((0+25*1) SHL 16)+0 |
||
1291 | mcall , buttons+slidebtn *20 |
||
1292 | add edx, ((5+25*1) SHL 16)+0 |
||
1293 | ; mcall , buttons+scalebtn *20 |
||
1294 | mov [scale_button_xy], edx |
||
1295 | call draw_scale_button |
||
7656 | dunkaist | 1296 | mov edx, [client_abs_left] |
1297 | add edx, [client.width] |
||
7860 | dunkaist | 1298 | sub edx, 25*5+4 |
7656 | dunkaist | 1299 | shl edx, 16 |
1300 | add edx, [client_abs_top] |
||
1301 | add edx, 5 |
||
1302 | mcall , buttons+fliphorzbtn*20 |
||
7860 | dunkaist | 1303 | add edx, 25*65536 |
7656 | dunkaist | 1304 | mcall , buttons+flipvertbtn*20 |
7860 | dunkaist | 1305 | add edx, 30*65536 |
7656 | dunkaist | 1306 | mcall , buttons+rotcwbtn*20 |
7860 | dunkaist | 1307 | add edx, 25*65536 |
7656 | dunkaist | 1308 | mcall , buttons+rotccwbtn*20 |
7860 | dunkaist | 1309 | add edx, 25*65536 |
7656 | dunkaist | 1310 | mcall , buttons+rot180btn*20 |
1311 | |||
7860 | dunkaist | 1312 | .quit: |
7656 | dunkaist | 1313 | ret |
1314 | endp |
||
1315 | |||
1316 | |||
1317 | proc draw_canvas |
||
1318 | push ebx esi edi |
||
1319 | |||
1320 | mov ebx, [canvas_abs_left] |
||
1321 | shl ebx, 16 |
||
1322 | add ebx, [canvas.width] |
||
1323 | mov ecx, [canvas_abs_top] |
||
1324 | shl ecx, 16 |
||
1325 | add ecx, [view.top] |
||
1326 | ;mov edx, 0xff0000 |
||
1327 | mcall 13, , , [bg_color] |
||
1328 | mcall 13 |
||
1329 | mov ecx, [view_abs_top] |
||
1330 | add ecx, [view.height] |
||
1331 | shl ecx, 16 |
||
1332 | add ecx, [canvas.height] |
||
1333 | sub ecx, [view.top] |
||
1334 | sub ecx, [view.height] |
||
1335 | ;mov edx, 0x00ff00 |
||
1336 | mcall 13, , , [bg_color] |
||
1337 | mcall 13 |
||
1338 | mov ebx, [canvas_abs_left] |
||
1339 | shl ebx, 16 |
||
1340 | add ebx, [view.left] |
||
1341 | mov ecx, [canvas_abs_top] |
||
1342 | shl ecx, 16 |
||
1343 | add ecx, [canvas.height] |
||
1344 | ;mov edx, 0x0000ff |
||
1345 | ;bg_color |
||
1346 | mcall |
||
1347 | mov ebx, [view_abs_left] |
||
1348 | add ebx, [view.width] |
||
1349 | shl ebx, 16 |
||
1350 | mov eax, [canvas.width] |
||
1351 | sub eax, [view.left] |
||
1352 | sub ebx, [view.width] |
||
1353 | add ebx, eax |
||
1354 | ;mov edx, 0xffff00 |
||
1355 | ;bg_color |
||
1356 | mcall 13 |
||
7860 | dunkaist | 1357 | @@: |
7656 | dunkaist | 1358 | |
1359 | call draw_view |
||
1360 | |||
1361 | pop edi esi ebx |
||
1362 | ret |
||
1363 | endp |
||
1364 | |||
1365 | |||
1366 | proc draw_client |
||
1367 | push ebx esi edi |
||
1368 | |||
1369 | test [bShowToolbar], 1 |
||
1370 | jz .toolbar_done |
||
1371 | call draw_toolbar |
||
7860 | dunkaist | 1372 | .toolbar_done: |
7656 | dunkaist | 1373 | call draw_work |
1374 | |||
1375 | pop edi esi ebx |
||
1376 | ret |
||
1377 | endp |
||
1378 | |||
1379 | |||
1380 | proc draw_work |
||
1381 | push ebx esi edi |
||
1382 | |||
1383 | mov ebx, [work_abs_left] |
||
1384 | shl ebx, 16 |
||
1385 | add ebx, [work.width] |
||
1386 | inc ebx |
||
1387 | mov ecx, [work_abs_top] |
||
1388 | shl ecx, 16 |
||
1389 | add ecx, [canvas.top] |
||
1390 | ; mcall 13, , , 0xff0000 |
||
1391 | mcall 13, , , [bg_color] |
||
1392 | mov eax, [canvas.height] |
||
1393 | ror ecx, 16 |
||
1394 | add ecx, eax |
||
1395 | add ecx, [canvas_padding] |
||
1396 | ror ecx, 16 |
||
1397 | ; mcall 13, , , 0x00ff00 |
||
1398 | mcall 13, , , [bg_color] |
||
1399 | ; mcall 13 |
||
1400 | |||
1401 | mov ebx, [work_abs_left] |
||
1402 | shl ebx, 16 |
||
1403 | add ebx, [canvas.left] |
||
1404 | mov ecx, [work_abs_top] |
||
1405 | add ecx, [canvas_padding] |
||
1406 | shl ecx, 16 |
||
1407 | add ecx, [canvas.height] |
||
1408 | ; mcall 13, , , 0x0000ff |
||
1409 | mcall 13, , , [bg_color] |
||
1410 | ; mcall |
||
1411 | mov eax, [canvas.width] |
||
1412 | ror ebx, 16 |
||
1413 | add ebx, eax |
||
1414 | add ebx, [canvas_padding] |
||
1415 | ror ebx, 16 |
||
1416 | ; mcall 13, , , 0xffff00 |
||
1417 | mcall 13, , , [bg_color] |
||
1418 | ; mcall 13 |
||
1419 | |||
1420 | call draw_canvas |
||
1421 | call draw_onimage_decorations |
||
1422 | |||
1423 | mov eax, 13 |
||
1424 | cmp [need_scrollbar_v], 1 |
||
1425 | jnz @f |
||
1426 | cmp [need_scrollbar_h], 1 |
||
1427 | jnz @f |
||
1428 | mov ebx, [work_abs_left] |
||
1429 | add ebx, [work.width] |
||
1430 | sub ebx, SCROLL_WIDTH_SIZE |
||
1431 | shl ebx, 16 |
||
1432 | add ebx, SCROLL_WIDTH_SIZE |
||
1433 | inc ebx |
||
1434 | mov ecx, [work_abs_top] |
||
1435 | add ecx, [work.height] |
||
1436 | sub ecx, SCROLL_WIDTH_SIZE |
||
1437 | shl ecx, 16 |
||
1438 | add ecx, SCROLL_WIDTH_SIZE |
||
1439 | inc ecx |
||
1440 | mov edx, [bg_color] |
||
1441 | ; mov edx, 0x00ffff |
||
1442 | mcall |
||
7860 | dunkaist | 1443 | @@: |
7656 | dunkaist | 1444 | |
1445 | cmp [need_scrollbar_v], 0 |
||
1446 | jz .v_scrollbar_done |
||
1447 | mov eax, [client.left] |
||
1448 | add eax, [client.width] |
||
1449 | sub eax, SCROLL_WIDTH_SIZE |
||
1450 | mov [scroll_bar_data_vertical.start_x], ax |
||
1451 | mov eax, [toolbar.height] |
||
1452 | add eax, [client.top] |
||
1453 | mov [scroll_bar_data_vertical.start_y], ax |
||
1454 | mov eax, [canvas.height] |
||
1455 | add eax, [canvas_padding] |
||
1456 | add eax, [canvas_padding] |
||
1457 | mov [scroll_bar_data_vertical.size_y], ax |
||
1458 | mov [scroll_bar_data_vertical.all_redraw], 1 |
||
1459 | invoke scrollbar_vert_draw, scroll_bar_data_vertical |
||
7860 | dunkaist | 1460 | .v_scrollbar_done: |
7656 | dunkaist | 1461 | |
1462 | cmp [need_scrollbar_h], 0 |
||
1463 | jz .h_scrollbar_done |
||
1464 | mov eax, [client.left] |
||
1465 | mov [scroll_bar_data_horizontal.start_x], ax |
||
1466 | mov eax, [client.top] |
||
1467 | add eax, [client.height] |
||
1468 | sub eax, SCROLL_WIDTH_SIZE |
||
1469 | mov [scroll_bar_data_horizontal.start_y], ax |
||
1470 | mov eax, [canvas.width] |
||
1471 | add eax, [canvas_padding] |
||
1472 | add eax, [canvas_padding] |
||
1473 | mov [scroll_bar_data_horizontal.size_x], ax |
||
1474 | mov [scroll_bar_data_horizontal.all_redraw], 1 |
||
1475 | invoke scrollbar_hort_draw, scroll_bar_data_horizontal |
||
7860 | dunkaist | 1476 | .h_scrollbar_done: |
7656 | dunkaist | 1477 | |
1478 | pop edi esi ebx |
||
1479 | ret |
||
1480 | endp |
||
1481 | |||
1482 | |||
1483 | proc draw_onimage_decorations |
||
1484 | bt [window_style], 25 |
||
1485 | jc @f |
||
1486 | ; draw fullscreen decorations on image |
||
1487 | call draw_filename |
||
1488 | call draw_fullscreen_controls |
||
7860 | dunkaist | 1489 | @@: |
7656 | dunkaist | 1490 | ret |
1491 | endp |
||
1492 | |||
1493 | |||
1494 | proc draw_filename |
||
1495 | push esi |
||
1496 | mcall 4, <100, 65>, 0x40ffffff, window_header, [window_header_len], 0x008800 |
||
1497 | pop esi |
||
1498 | ret |
||
1499 | endp |
||
1500 | |||
1501 | |||
1502 | proc draw_fullscreen_controls |
||
1503 | push esi |
||
1504 | mov ebx, [canvas.width] |
||
1505 | shr ebx, 1 |
||
1506 | add ebx, [canvas.left] |
||
1507 | sub ebx, 22 |
||
1508 | shl ebx, 16 |
||
1509 | add ebx, 20 |
||
1510 | mov ecx, [canvas.height] |
||
1511 | shr ecx, 3 |
||
1512 | neg ecx |
||
1513 | add ecx, [canvas.height] |
||
1514 | add ecx, [canvas.top] |
||
1515 | shl ecx, 16 |
||
1516 | add ecx, 20 |
||
1517 | mcall 8, , , 'bck'+40000000h |
||
1518 | add ebx, 25 SHL 16 |
||
1519 | mcall 8, , , 'fwd'+40000000h |
||
1520 | mov edx, [canvas.width] |
||
1521 | shr edx, 1 |
||
1522 | add edx, [canvas.left] |
||
1523 | sub edx, 22 |
||
1524 | shl edx, 16 |
||
1525 | add edx, [canvas.height] |
||
1526 | shr dx, 3 |
||
1527 | neg dx |
||
1528 | add dx, word[canvas.height] |
||
1529 | add edx, [canvas.top] |
||
7860 | dunkaist | 1530 | mcall 65, buttons+backbtn*20, <20, 20>, , 8, palette |
7656 | dunkaist | 1531 | add edx, 25 SHL 16 |
7860 | dunkaist | 1532 | mcall 65, buttons+forwardbtn*20, , , 8, |
7656 | dunkaist | 1533 | pop esi |
1534 | ret |
||
1535 | endp |
||
1536 | |||
1537 | |||
1538 | proc check_shortcut |
||
1570 | dunkaist | 1539 | ; in: cl = scancode (from sysfn 2), |
1540 | ; eax = state of modifiers (from sysfn 66.3), |
||
1541 | ; edx -> shortcut descriptor |
||
1542 | ; out: ZF set <=> fail |
||
7656 | dunkaist | 1543 | cmp cl, [edx+4] |
1544 | jnz .not |
||
1545 | push eax |
||
1546 | mov esi, [edx] |
||
1547 | and esi, 0xf |
||
1548 | and al, 3 |
||
1549 | call dword[check_modifier_table+esi*4] |
||
1550 | test al, al |
||
1551 | pop eax |
||
1552 | jnz .not |
||
1553 | push eax |
||
1554 | mov esi, [edx] |
||
1555 | shr esi, 4 |
||
1556 | and esi, 0xf |
||
1557 | shr al, 2 |
||
1558 | and al, 3 |
||
1559 | call dword[check_modifier_table+esi*4] |
||
1560 | test al, al |
||
1561 | pop eax |
||
1562 | jnz .not |
||
1563 | push eax |
||
1564 | mov esi, [edx] |
||
1565 | shr esi, 8 |
||
1566 | and esi, 0xf |
||
1567 | shr al, 4 |
||
1568 | and al, 3 |
||
1569 | call dword[check_modifier_table+esi*4] |
||
1570 | test al, al |
||
1571 | pop eax |
||
1572 | ; jnz .not |
||
7860 | dunkaist | 1573 | .not: |
7656 | dunkaist | 1574 | ret |
1575 | endp |
||
1427 | diamond | 1576 | |
7656 | dunkaist | 1577 | |
1427 | diamond | 1578 | check_modifier_0: |
7656 | dunkaist | 1579 | setnz al |
1580 | ret |
||
1427 | diamond | 1581 | check_modifier_1: |
7656 | dunkaist | 1582 | setp al |
1583 | ret |
||
1427 | diamond | 1584 | check_modifier_2: |
7656 | dunkaist | 1585 | cmp al, 3 |
1586 | setnz al |
||
1587 | ret |
||
1427 | diamond | 1588 | check_modifier_3: |
7656 | dunkaist | 1589 | cmp al, 1 |
1590 | setnz al |
||
1591 | ret |
||
1427 | diamond | 1592 | check_modifier_4: |
7656 | dunkaist | 1593 | cmp al, 2 |
1594 | setnz al |
||
1595 | ret |
||
1427 | diamond | 1596 | |
7656 | dunkaist | 1597 | ; >edi = destination string |
1598 | ; >eax = number |
||
1599 | proc bin2dec |
||
1600 | push ebx ecx edx esi |
||
1601 | |||
1602 | mov ebx, 10 |
||
1603 | xor ecx, ecx |
||
7860 | dunkaist | 1604 | @@: |
7656 | dunkaist | 1605 | xor edx, edx |
1606 | div ebx |
||
1607 | push edx |
||
1608 | inc ecx |
||
1609 | test eax, eax |
||
1610 | jnz @b |
||
1611 | |||
7860 | dunkaist | 1612 | @@: |
7656 | dunkaist | 1613 | pop eax |
1614 | add eax, '0' |
||
1615 | stosb |
||
1616 | inc [window_header_len] |
||
1617 | dec ecx |
||
1618 | jnz @b |
||
1619 | |||
1620 | pop esi edx ecx ebx |
||
1621 | ret |
||
1622 | endp |
||
1623 | |||
1624 | |||
1625 | ; fills window_header with window title |
||
1626 | ; window title is generated as '[k/n] |
||
1627 | ; n = total files in dir |
||
1628 | ; k = current file index |
||
1629 | proc generate_window_header |
||
1630 | push eax ebx esi edi |
||
1631 | mov esi, [last_name_component] |
||
1632 | mov edi, window_header |
||
1633 | mov [window_header_len], 4 ; [,/,], |
||
1634 | |||
1635 | mov byte[edi], '[' |
||
1636 | inc edi |
||
1637 | mov eax, [cur_file_idx] |
||
1638 | inc eax |
||
1639 | call bin2dec |
||
1640 | mov byte[edi], '/' |
||
1641 | inc edi |
||
7860 | dunkaist | 1642 | mov eax, [directory_ptr] |
1643 | mov eax, [eax+4] |
||
7656 | dunkaist | 1644 | call bin2dec |
1645 | mov word[edi], '] ' |
||
1646 | add edi, 2 |
||
1647 | |||
1648 | ; add filename |
||
7860 | dunkaist | 1649 | .next_symbol: |
7656 | dunkaist | 1650 | lodsb |
1651 | test al, al |
||
1652 | jz @f |
||
1653 | stosb |
||
1654 | inc [window_header_len] |
||
1655 | cmp edi, window_header+256 |
||
1656 | jb .next_symbol |
||
7860 | dunkaist | 1657 | .overflow: |
7656 | dunkaist | 1658 | mov dword[edi-4], '...' |
7860 | dunkaist | 1659 | .ret: |
7656 | dunkaist | 1660 | pop edi esi ebx eax |
1661 | ret |
||
7860 | dunkaist | 1662 | @@: |
7656 | dunkaist | 1663 | mov esi, s_header |
7860 | dunkaist | 1664 | @@: |
7656 | dunkaist | 1665 | lodsb |
1666 | stosb |
||
1667 | test al, al |
||
1668 | jz .ret |
||
1669 | cmp edi, window_header+256 |
||
1670 | jb @b |
||
1671 | jmp .overflow |
||
1672 | endp |
||
1673 | |||
1674 | |||
1675 | proc scale_none_calc |
||
1676 | push ebx |
||
1677 | |||
1678 | mov [scale_mode], LIBIMG_SCALE_NONE |
||
1679 | |||
8496 | dunkaist | 1680 | mov eax, [cur_image] |
1681 | cmp eax, [orig_image] |
||
1682 | jz @f |
||
1683 | invoke img.destroy, eax |
||
1684 | @@: |
||
7656 | dunkaist | 1685 | mov eax, [orig_image] |
1686 | mov [cur_image], eax |
||
1687 | mov [cur_frame], eax |
||
1688 | mov ebx, eax |
||
1689 | |||
1690 | mov [need_scrollbar_v], 0 |
||
1691 | mov [need_scrollbar_h], 0 |
||
1692 | |||
7860 | dunkaist | 1693 | mov eax, [ebx+Image.Width] |
7656 | dunkaist | 1694 | cmp eax, [canvas.width] |
1695 | jbe @f |
||
1696 | sub [canvas.height], SCROLL_WIDTH_SIZE+1 |
||
1697 | mov [need_scrollbar_h], 1 |
||
7860 | dunkaist | 1698 | @@: |
1699 | mov eax, [ebx+Image.Height] |
||
7656 | dunkaist | 1700 | cmp eax, [canvas.height] |
1701 | jbe @f |
||
1702 | sub [canvas.width], SCROLL_WIDTH_SIZE+1 |
||
1703 | mov [need_scrollbar_v], 1 |
||
7860 | dunkaist | 1704 | @@: |
7656 | dunkaist | 1705 | cmp [need_scrollbar_h], 1 |
1706 | jz @f |
||
7860 | dunkaist | 1707 | mov eax, [ebx+Image.Width] |
7656 | dunkaist | 1708 | cmp eax, [canvas.width] |
1709 | jbe @f |
||
1710 | sub [canvas.height], SCROLL_WIDTH_SIZE+1 |
||
1711 | mov [need_scrollbar_h], 1 |
||
7860 | dunkaist | 1712 | @@: |
7656 | dunkaist | 1713 | |
1714 | |||
7860 | dunkaist | 1715 | mov eax, [ebx+Image.Width] |
7656 | dunkaist | 1716 | cmp eax, [canvas.width] |
1717 | jbe @f |
||
1718 | mov eax, [canvas.width] |
||
7860 | dunkaist | 1719 | @@: |
7656 | dunkaist | 1720 | mov [view.width], eax |
1721 | mov [pict.width], eax |
||
1722 | |||
7860 | dunkaist | 1723 | mov eax, [ebx+Image.Height] |
7656 | dunkaist | 1724 | cmp eax, [canvas.height] |
1725 | jbe @f |
||
1726 | mov eax, [canvas.height] |
||
7860 | dunkaist | 1727 | @@: |
7656 | dunkaist | 1728 | mov [view.height], eax |
1729 | mov [pict.height], eax |
||
1730 | |||
1731 | mov eax, [canvas.width] |
||
1732 | sub eax, [view.width] |
||
1733 | sar eax, 1 |
||
1734 | mov [view.left], eax |
||
1735 | mov eax, [canvas.height] |
||
1736 | sub eax, [view.height] |
||
1737 | sar eax, 1 |
||
1738 | mov [view.top], eax |
||
1739 | |||
7860 | dunkaist | 1740 | mov eax, [ebx+Image.Width] |
7656 | dunkaist | 1741 | sub eax, [pict.width] |
1742 | sar eax, 1 |
||
1743 | mov [pict.left], eax |
||
7860 | dunkaist | 1744 | mov eax, [ebx+Image.Height] |
7656 | dunkaist | 1745 | sub eax, [pict.height] |
1746 | sar eax, 1 |
||
1747 | mov [pict.top], eax |
||
1748 | |||
1749 | |||
7860 | dunkaist | 1750 | mov eax, [ebx+Image.Height] |
7656 | dunkaist | 1751 | mov [scroll_bar_data_vertical.max_area], eax |
1752 | mov eax, [pict.height] |
||
1753 | mov [scroll_bar_data_vertical.cur_area], eax |
||
1754 | mov eax, [pict.top] |
||
1755 | mov [scroll_bar_data_vertical.position], eax |
||
1756 | |||
7860 | dunkaist | 1757 | mov eax, [ebx+Image.Width] |
7656 | dunkaist | 1758 | mov [scroll_bar_data_horizontal.max_area], eax |
1759 | mov eax, [pict.width] |
||
1760 | mov [scroll_bar_data_horizontal.cur_area], eax |
||
1761 | mov eax, [pict.left] |
||
1762 | mov [scroll_bar_data_horizontal.position], eax |
||
1763 | |||
1764 | pop ebx |
||
1765 | ret |
||
1766 | endp |
||
1767 | |||
1768 | |||
1769 | proc scale_fit_min_calc |
||
1770 | push ebx |
||
1771 | |||
1772 | mov [need_scrollbar_v], 0 |
||
1773 | mov [need_scrollbar_h], 0 |
||
1774 | mov [scroll_bar_data_vertical.position], 0 |
||
1775 | mov [scroll_bar_data_horizontal.position], 0 |
||
1776 | |||
1777 | mov eax, [orig_image] |
||
7860 | dunkaist | 1778 | cmp [eax+Image.Type], Image.bpp24 |
7656 | dunkaist | 1779 | jz @f |
7860 | dunkaist | 1780 | cmp [eax+Image.Type], Image.bpp32 |
7656 | dunkaist | 1781 | jz @f |
7860 | dunkaist | 1782 | cmp [eax+Image.Type], Image.bpp8g |
7656 | dunkaist | 1783 | jz @f |
1784 | invoke img.convert, eax, 0, Image.bpp24, 0, 0 |
||
1785 | test eax, eax |
||
1786 | ; jz .error |
||
1787 | push eax |
||
1788 | invoke img.destroy, [orig_image] |
||
1789 | pop eax |
||
1790 | mov [orig_image], eax |
||
1791 | mov [cur_image], eax |
||
1792 | mov [cur_frame], eax |
||
7860 | dunkaist | 1793 | @@: |
7656 | dunkaist | 1794 | |
1795 | mov eax, [orig_image] |
||
7860 | dunkaist | 1796 | mov ecx, [eax+Image.Height] |
1797 | mov eax, [eax+Image.Width] |
||
7656 | dunkaist | 1798 | cmp eax, [canvas.width] |
1799 | ja .get_size |
||
1800 | cmp ecx, [canvas.height] |
||
1801 | ja .get_size |
||
1802 | jmp .got_size |
||
7860 | dunkaist | 1803 | .get_size: |
7656 | dunkaist | 1804 | invoke img.get_scaled_size, eax, ecx, LIBIMG_SCALE_FIT_MIN, [canvas.width], [canvas.height] |
7860 | dunkaist | 1805 | .got_size: |
7656 | dunkaist | 1806 | |
1807 | mov [pict.top], 0 |
||
1808 | mov [pict.left], 0 |
||
1809 | |||
1810 | cmp eax, [canvas.width] |
||
1811 | jbe @f |
||
1812 | mov eax, [canvas.width] |
||
7860 | dunkaist | 1813 | @@: |
7656 | dunkaist | 1814 | mov [view.width], eax |
1815 | mov [pict.width], eax |
||
1816 | neg eax |
||
1817 | add eax, [canvas.width] |
||
1818 | shr eax, 1 |
||
1819 | mov [view.left], eax |
||
1820 | |||
1821 | mov eax, ecx |
||
1822 | cmp eax, [canvas.height] |
||
1823 | jbe @f |
||
1824 | mov eax, [canvas.height] |
||
7860 | dunkaist | 1825 | @@: |
7656 | dunkaist | 1826 | mov [view.height], eax |
1827 | mov [pict.height], eax |
||
1828 | neg eax |
||
1829 | add eax, [canvas.height] |
||
1830 | shr eax, 1 |
||
1831 | mov [view.top], eax |
||
1832 | |||
1833 | |||
1834 | pop ebx |
||
1835 | ret |
||
1836 | endp |
||
1837 | |||
1838 | |||
7726 | dunkaist | 1839 | ; eax: new scaling mode |
1840 | ; z/Z - not/changed |
||
1841 | proc set_scale_mode |
||
1842 | cmp eax, [scale_mode] |
||
7656 | dunkaist | 1843 | mov [scale_mode], eax |
7726 | dunkaist | 1844 | setnz [bScaleModeChanged] |
7656 | dunkaist | 1845 | ret |
1846 | endp |
||
1847 | |||
1848 | proc move_pictport _dx, _dy |
||
1849 | locals |
||
1850 | new_left dd ? |
||
1851 | new_top dd ? |
||
1852 | endl |
||
1853 | push ebx ecx |
||
1854 | |||
1855 | mov ebx, [cur_image] |
||
7860 | dunkaist | 1856 | .x: |
7656 | dunkaist | 1857 | mov eax, [pict.left] |
1858 | add eax, [_dx] |
||
1859 | cmp eax, 0 |
||
1860 | jge @f |
||
1861 | mov [new_left], 0 |
||
1862 | jmp .xdone |
||
7860 | dunkaist | 1863 | @@: |
7656 | dunkaist | 1864 | mov ecx, eax |
1865 | add eax, [pict.width] |
||
7860 | dunkaist | 1866 | cmp eax, [ebx+Image.Width] |
7656 | dunkaist | 1867 | ja @f |
1868 | mov [new_left], ecx |
||
1869 | jmp .xdone |
||
7860 | dunkaist | 1870 | @@: |
1871 | mov eax, [ebx+Image.Width] |
||
7656 | dunkaist | 1872 | sub eax, [pict.width] |
1873 | mov [new_left], eax |
||
1874 | jmp .xdone |
||
7860 | dunkaist | 1875 | .xdone: |
7656 | dunkaist | 1876 | |
7860 | dunkaist | 1877 | .y: |
7656 | dunkaist | 1878 | mov eax, [pict.top] |
1879 | add eax, [_dy] |
||
1880 | cmp eax, 0 |
||
1881 | jge @f |
||
1882 | mov [new_top], 0 |
||
1883 | jmp .ydone |
||
7860 | dunkaist | 1884 | @@: |
7656 | dunkaist | 1885 | mov ecx, eax |
1886 | add eax, [pict.height] |
||
7860 | dunkaist | 1887 | cmp eax, [ebx+Image.Height] |
7656 | dunkaist | 1888 | ja @f |
1889 | mov [new_top], ecx |
||
1890 | jmp .ydone |
||
7860 | dunkaist | 1891 | @@: |
1892 | mov eax, [ebx+Image.Height] |
||
7656 | dunkaist | 1893 | sub eax, [pict.height] |
1894 | mov [new_top], eax |
||
1895 | jmp .ydone |
||
7860 | dunkaist | 1896 | .ydone: |
7656 | dunkaist | 1897 | |
1898 | xor eax, eax |
||
1899 | mov ecx, [new_left] |
||
1900 | mov edx, [new_top] |
||
1901 | |||
1902 | cmp ecx, [pict.left] |
||
1903 | setnz al |
||
1904 | shl eax, 8 |
||
1905 | |||
1906 | cmp edx, [pict.top] |
||
1907 | setnz al |
||
1908 | |||
1909 | mov [pict.left], ecx |
||
1910 | mov [pict.top], edx |
||
1911 | |||
1912 | pop ecx ebx |
||
1913 | ret |
||
1914 | endp |
||
1915 | |||
1916 | |||
1917 | proc update_scrollbars _xxhv |
||
1918 | mov eax, [_xxhv] |
||
1919 | |||
1920 | test ah, ah |
||
1921 | jz .no_h_scroll |
||
1922 | push eax |
||
1923 | mov [scroll_bar_data_horizontal.all_redraw], 0 |
||
1924 | mov eax, [pict.left] |
||
1925 | mov [scroll_bar_data_horizontal.position], eax |
||
1926 | invoke scrollbar_hort_draw, scroll_bar_data_horizontal |
||
1927 | pop eax |
||
7860 | dunkaist | 1928 | .no_h_scroll: |
7656 | dunkaist | 1929 | test al, al |
1930 | jz .no_v_scroll |
||
1931 | push eax |
||
1932 | mov [scroll_bar_data_vertical.all_redraw], 0 |
||
1933 | mov eax, [pict.top] |
||
1934 | mov [scroll_bar_data_vertical.position], eax |
||
1935 | invoke scrollbar_vert_draw, scroll_bar_data_vertical |
||
1936 | pop eax |
||
7860 | dunkaist | 1937 | .no_v_scroll: |
7656 | dunkaist | 1938 | |
1939 | ret |
||
1940 | endp |
||
1941 | |||
1942 | |||
1943 | proc merge_icons_to_single_img _img |
||
1944 | push ebx esi edi |
||
1945 | |||
1946 | mov edx, [_img] |
||
7860 | dunkaist | 1947 | mov eax, [edx+Image.Width] |
1948 | mov ecx, [edx+Image.Height] |
||
1949 | .next: |
||
1950 | cmp [edx+Image.Next], 0 |
||
7656 | dunkaist | 1951 | jz .got_sizes |
1952 | inc eax |
||
7860 | dunkaist | 1953 | mov edx, [edx+Image.Next] |
1954 | add eax, [edx+Image.Width] |
||
1955 | cmp ecx, [edx+Image.Height] |
||
7656 | dunkaist | 1956 | jae @f |
7860 | dunkaist | 1957 | mov ecx, [edx+Image.Height] |
1958 | @@: |
||
7656 | dunkaist | 1959 | jmp .next |
1960 | |||
7860 | dunkaist | 1961 | .got_sizes: |
7656 | dunkaist | 1962 | invoke img.create, eax, ecx, Image.bpp32 |
1963 | test eax, eax |
||
1964 | jz .error |
||
1965 | mov ebx, eax |
||
1966 | |||
1967 | mov eax, [bg_color] |
||
7860 | dunkaist | 1968 | mov edi, [ebx+Image.Data] |
1969 | mov ecx, [ebx+Image.Width] |
||
1970 | imul ecx, [ebx+Image.Height] |
||
7656 | dunkaist | 1971 | rep stosd |
1972 | |||
1973 | mov eax, [_img] |
||
7860 | dunkaist | 1974 | cmp [eax+Image.Type], Image.bpp32 |
7656 | dunkaist | 1975 | jz @f |
1976 | invoke img.convert, eax, 0, Image.bpp32, 0, 0 |
||
1977 | test eax, eax |
||
1978 | jz .error |
||
1979 | push eax |
||
1980 | invoke img.destroy, [_img] |
||
1981 | pop eax |
||
7860 | dunkaist | 1982 | @@: |
7656 | dunkaist | 1983 | mov esi, eax |
1984 | xor edi, edi |
||
7860 | dunkaist | 1985 | .next_img: |
7656 | dunkaist | 1986 | stdcall put_img_on_img, ebx, esi, edi, 0 |
7860 | dunkaist | 1987 | add edi, [esi+Image.Width] |
7656 | dunkaist | 1988 | inc edi |
7860 | dunkaist | 1989 | cmp [esi+Image.Next], 0 |
7656 | dunkaist | 1990 | jz @f |
7860 | dunkaist | 1991 | mov esi, [esi+Image.Next] |
7656 | dunkaist | 1992 | jmp .next_img |
7860 | dunkaist | 1993 | @@: |
7656 | dunkaist | 1994 | invoke img.destroy, esi |
1995 | mov eax, ebx |
||
1996 | jmp .quit |
||
1997 | |||
7860 | dunkaist | 1998 | .error: |
7656 | dunkaist | 1999 | xor eax, eax |
7860 | dunkaist | 2000 | .quit: |
7656 | dunkaist | 2001 | pop edi esi ebx |
2002 | ret |
||
2003 | endp |
||
2004 | |||
2005 | |||
2006 | proc put_img_on_img _bottom, _top, _x, _y |
||
2007 | locals |
||
2008 | img_height dd ? |
||
2009 | endl |
||
2010 | push ebx esi edi |
||
2011 | |||
2012 | mov ebx, [_bottom] |
||
2013 | mov edx, [_top] |
||
7860 | dunkaist | 2014 | mov eax, [edx+Image.Height] |
7656 | dunkaist | 2015 | mov [img_height], eax |
7860 | dunkaist | 2016 | mov esi, [edx+Image.Data] |
2017 | mov edi, [ebx+Image.Data] |
||
7656 | dunkaist | 2018 | mov eax, [_y] |
7860 | dunkaist | 2019 | imul eax, [ebx+Image.Width] |
7656 | dunkaist | 2020 | add eax, [_x] |
2021 | shl eax, 2 |
||
2022 | add edi, eax |
||
7860 | dunkaist | 2023 | .next_line: |
2024 | mov ecx, [edx+Image.Width] |
||
7656 | dunkaist | 2025 | rep movsd |
7860 | dunkaist | 2026 | mov eax, [ebx+Image.Width] |
2027 | sub eax, [edx+Image.Width] |
||
7656 | dunkaist | 2028 | shl eax, 2 |
2029 | add edi, eax |
||
2030 | dec [img_height] |
||
2031 | jnz .next_line |
||
2032 | |||
2033 | pop edi esi ebx |
||
2034 | ret |
||
2035 | endp |
||
2036 | |||
2037 | |||
2038 | proc copy_box _src, _dst |
||
2039 | pushad |
||
2040 | |||
2041 | mov esi, [_src] |
||
2042 | mov edi, [_dst] |
||
2043 | mov ecx, 4 |
||
2044 | rep movsd |
||
2045 | |||
2046 | popad |
||
2047 | ret |
||
2048 | endp |
||
2049 | |||
2050 | |||
2051 | proc cmp_box _a, _b |
||
2052 | pushad |
||
2053 | |||
2054 | mov esi, [_a] |
||
2055 | mov edi, [_b] |
||
2056 | mov ecx, 4 |
||
2057 | rep cmpsd |
||
2058 | |||
2059 | popad |
||
2060 | ret |
||
2061 | endp |
||
2062 | |||
2063 | |||
2064 | proc recalc_client |
||
2065 | stdcall copy_box, toolbar, toolbar_prev |
||
2066 | mov [toolbar.left], 0 |
||
2067 | mov [toolbar.top], 0 |
||
2068 | mov eax, [client.width] |
||
2069 | mov [toolbar.width], eax |
||
2070 | mov [toolbar.height], 0 |
||
2071 | cmp [bShowToolbar], 1 |
||
2072 | jnz @f |
||
2073 | mov [toolbar.height], TOOLBAR_HEIGHT |
||
7860 | dunkaist | 2074 | @@: |
7656 | dunkaist | 2075 | |
2076 | mov eax, [toolbar.top] |
||
2077 | add eax, [client_abs_top] |
||
2078 | mov [toolbar_abs_top], eax |
||
2079 | mov eax, [toolbar.left] |
||
2080 | add eax, [client_abs_left] |
||
2081 | mov [toolbar_abs_left], eax |
||
2082 | |||
2083 | test [bFirstWinDraw], 1 |
||
2084 | jnz .recalc_toolbar |
||
2085 | stdcall cmp_box, toolbar, toolbar_prev |
||
2086 | jnz .recalc_toolbar |
||
2087 | test [bNewImage], 1 |
||
2088 | jnz .recalc_toolbar |
||
2089 | jmp .recalc_toolbar_done |
||
7860 | dunkaist | 2090 | .recalc_toolbar: |
7656 | dunkaist | 2091 | stdcall recalc_toolbar |
7860 | dunkaist | 2092 | .recalc_toolbar_done: |
7656 | dunkaist | 2093 | |
2094 | stdcall copy_box, work, work_prev |
||
2095 | xor ecx, ecx |
||
2096 | test [bShowToolbar], 1 |
||
2097 | jz @f |
||
2098 | mov ecx, [toolbar.height] |
||
7860 | dunkaist | 2099 | @@: |
7656 | dunkaist | 2100 | mov eax, ecx |
2101 | mov [work.top], eax |
||
2102 | mov eax, [client.height] |
||
2103 | sub eax, ecx |
||
2104 | mov [work.height], eax |
||
2105 | mov [work.left], 0 |
||
2106 | mov eax, [client.width] |
||
2107 | mov [work.width], eax |
||
2108 | |||
2109 | mov eax, [work.top] |
||
2110 | add eax, [client_abs_top] |
||
2111 | mov [work_abs_top], eax |
||
2112 | mov eax, [work.left] |
||
2113 | add eax, [client_abs_left] |
||
2114 | mov [work_abs_left], eax |
||
2115 | |||
2116 | test [bFirstWinDraw], 1 |
||
2117 | jnz .recalc_work |
||
2118 | test [bNewImage], 1 |
||
2119 | jnz .recalc_work |
||
2120 | stdcall cmp_box, work, work_prev |
||
2121 | jnz .recalc_work |
||
2122 | jmp .recalc_work_done |
||
7860 | dunkaist | 2123 | .recalc_work: |
7656 | dunkaist | 2124 | stdcall recalc_work |
7860 | dunkaist | 2125 | .recalc_work_done: |
7656 | dunkaist | 2126 | |
2127 | ret |
||
2128 | endp |
||
2129 | |||
2130 | |||
2131 | proc recalc_toolbar |
||
2132 | |||
2133 | ret |
||
2134 | endp |
||
2135 | |||
2136 | |||
2137 | proc recalc_window |
||
2138 | stdcall copy_box, client, client_prev |
||
2139 | test [bSlideShow], 1 |
||
2140 | jz .no_slide_show |
||
7860 | dunkaist | 2141 | .slide_show: |
7656 | dunkaist | 2142 | mov [client.left], 0 |
2143 | mov [client.top], 0 |
||
2144 | mov eax, [procinfo.box.width] |
||
2145 | mov [client.width], eax |
||
2146 | mov eax, [procinfo.box.height] |
||
2147 | mov [client.height], eax |
||
2148 | jmp .calc_abs |
||
7860 | dunkaist | 2149 | .no_slide_show: |
7656 | dunkaist | 2150 | mcall SF_STYLE_SETTINGS, SSF_GET_SKIN_HEIGHT |
2151 | mov [client.top], eax |
||
2152 | neg eax |
||
2153 | add eax, [procinfo.box.height] |
||
2154 | sub eax, 5 |
||
2155 | mov [client.height], eax |
||
2156 | mov [client.left], 5 |
||
2157 | mov eax, [procinfo.box.width] |
||
2158 | sub eax, 10 |
||
2159 | mov [client.width], eax |
||
2160 | |||
7860 | dunkaist | 2161 | .calc_abs: |
7656 | dunkaist | 2162 | mov eax, [client.top] |
2163 | mov [client_abs_top], eax |
||
2164 | mov eax, [client.left] |
||
2165 | mov [client_abs_left], eax |
||
2166 | |||
2167 | stdcall cmp_box, client, client_prev |
||
2168 | jnz .recalc_client |
||
2169 | test [bNewImage], 1 |
||
2170 | jnz .recalc_client |
||
2171 | test [bToggleToolbar], 1 |
||
2172 | jnz .recalc_client |
||
2173 | jmp .recalc_client_done |
||
7860 | dunkaist | 2174 | .recalc_client: |
7656 | dunkaist | 2175 | stdcall recalc_client |
7860 | dunkaist | 2176 | .recalc_client_done: |
7656 | dunkaist | 2177 | |
2178 | ret |
||
2179 | endp |
||
2180 | |||
2181 | |||
2182 | proc recalc_work |
||
2183 | stdcall copy_box, canvas, canvas_prev |
||
2184 | mov eax, [work.left] |
||
2185 | add eax, [canvas_padding] |
||
2186 | mov [canvas.left], eax |
||
2187 | mov eax, [work.width] |
||
2188 | sub eax, [canvas_padding] |
||
2189 | sub eax, [canvas_padding] |
||
2190 | inc eax |
||
2191 | mov [canvas.width], eax |
||
2192 | mov eax, [canvas_padding] |
||
2193 | mov [canvas.top], eax |
||
2194 | mov eax, [work.height] |
||
2195 | sub eax, [canvas_padding] |
||
2196 | sub eax, [canvas_padding] |
||
2197 | inc eax |
||
2198 | mov [canvas.height], eax |
||
2199 | |||
2200 | mov eax, [canvas.top] |
||
2201 | add eax, [work_abs_top] |
||
2202 | mov [canvas_abs_top], eax |
||
2203 | mov eax, [canvas.left] |
||
2204 | add eax, [work_abs_left] |
||
2205 | mov [canvas_abs_left], eax |
||
2206 | |||
2207 | test [bFirstWinDraw], 1 |
||
2208 | jnz .recalc_canvas |
||
2209 | test [bNewImage], 1 |
||
2210 | jnz .recalc_canvas |
||
2211 | stdcall cmp_box, canvas, canvas_prev |
||
2212 | jnz .recalc_canvas |
||
7860 | dunkaist | 2213 | cmp [bScaleModeChanged], 0 |
2214 | jnz .recalc_canvas |
||
7656 | dunkaist | 2215 | jmp .recalc_canvas_done |
7860 | dunkaist | 2216 | .recalc_canvas: |
7656 | dunkaist | 2217 | stdcall recalc_canvas |
7860 | dunkaist | 2218 | .recalc_canvas_done: |
7656 | dunkaist | 2219 | ret |
2220 | endp |
||
2221 | |||
2222 | |||
2223 | proc recalc_canvas |
||
2224 | stdcall copy_box, view, view_prev |
||
2225 | mov eax, [scale_mode] |
||
7860 | dunkaist | 2226 | call [scale_mode_calc+eax*4] |
7656 | dunkaist | 2227 | |
2228 | mov eax, [view.top] |
||
2229 | add eax, [canvas_abs_top] |
||
2230 | mov [view_abs_top], eax |
||
2231 | mov eax, [view.left] |
||
2232 | add eax, [canvas_abs_left] |
||
2233 | mov [view_abs_left], eax |
||
2234 | |||
2235 | ret |
||
2236 | endp |
||
2237 | |||
1004 | diamond | 2238 | ;----------------------------------------------------------------------------- |
7656 | dunkaist | 2239 | DATA |
1004 | diamond | 2240 | |
7656 | dunkaist | 2241 | s_header db ' - Kolibri Image Viewer',0 |
2242 | window_style dd 0x53FFFFFF |
||
7879 | leency | 2243 | window BOX 100, 150, 0, 0 ; left top width height |
7656 | dunkaist | 2244 | window_prev BOX 0, 0, 0, 0 |
2245 | window_save BOX 0, 0, 0, 0 ; restore after slide show |
||
2246 | client BOX 0, 0, 0, 0 |
||
2247 | client_prev BOX 0, 0, 0, 0 |
||
2248 | client_abs_top dd ? |
||
2249 | client_abs_left dd ? |
||
2250 | toolbar BOX 0, 0, 0, 0 |
||
2251 | toolbar_prev BOX 0, 0, 0, 0 |
||
2252 | toolbar_abs_top dd ? |
||
2253 | toolbar_abs_left dd ? |
||
2254 | work BOX 0, 0, 0, 0 |
||
2255 | work_prev BOX 0, 0, 0, 0 |
||
2256 | work_abs_top dd ? |
||
2257 | work_abs_left dd ? |
||
2258 | canvas BOX 0, 0, 0, 0 |
||
2259 | canvas_prev BOX 0, 0, 0, 0 |
||
2260 | canvas_abs_top dd ? |
||
2261 | canvas_abs_left dd ? |
||
2262 | view BOX -1, -1, 0, 0 |
||
2263 | view_prev BOX -1, -1, 0, 0 |
||
2264 | view_abs_top dd ? |
||
2265 | view_abs_left dd ? |
||
2266 | pict BOX 0, 0, 0, 0 |
||
2267 | canvas_padding dd 5 |
||
2268 | bg_color dd 0x00ffffff |
||
2269 | scale_mode dd LIBIMG_SCALE_FIT_MIN |
||
2270 | pict_drag dd 0 |
||
2271 | scroll_v_drag dd 0 |
||
2272 | scroll_h_drag dd 0 |
||
1004 | diamond | 2273 | |
7656 | dunkaist | 2274 | mouse_buttons dd 0 |
2275 | mouse_pos dd 0 |
||
2276 | need_scrollbar_v dd 0 |
||
2277 | need_scrollbar_h dd 0 |
||
2278 | |||
2279 | pict_moved dd 0 |
||
2280 | |||
1004 | diamond | 2281 | ;----------------------------------------------------------------------------- |
7656 | dunkaist | 2282 | align 4 |
2283 | scroll_bar_data_vertical: |
||
2284 | .x: |
||
2285 | .size_x dw SCROLL_WIDTH_SIZE |
||
2286 | .start_x dw 1 |
||
2287 | .y: |
||
2288 | .size_y dw 100 |
||
2289 | .start_y dw 0 |
||
2290 | .btn_high dd SCROLL_WIDTH_SIZE |
||
2291 | .type dd 0 ;+12 |
||
2292 | .max_area dd 100 ;+16 |
||
2293 | .cur_area dd 10 ;+20 |
||
2294 | .position dd 0 ;+24 |
||
2295 | .bckg_col dd 0xAAAAAA ;+28 |
||
2296 | .frnt_col dd 0xCCCCCC ;+32 |
||
2297 | .line_col dd 0 ;+36 |
||
2298 | .redraw dd 0 ;+40 |
||
2299 | .delta dw 0 ;+44 |
||
2300 | .delta2 dw 0 ;+46 |
||
2301 | .run_x: |
||
2302 | .r_size_x dw 0 ;+48 |
||
2303 | .r_start_x dw 0 ;+50 |
||
2304 | .run_y: |
||
2305 | .r_size_y dw 0 ;+52 |
||
2306 | .r_start_y dw 0 ;+54 |
||
2307 | .m_pos dd 0 ;+56 |
||
2308 | .m_pos_2 dd 0 ;+60 |
||
2309 | .m_keys dd 0 ;+64 |
||
2310 | .run_size dd 0 ;+68 |
||
2311 | .position2 dd 0 ;+72 |
||
2312 | .work_size dd 0 ;+76 |
||
2313 | .all_redraw dd 0 ;+80 |
||
2314 | .ar_offset dd KEY_MOVE_PIXELS ;+84 |
||
1004 | diamond | 2315 | ;----------------------------------------------------------------------------- |
7656 | dunkaist | 2316 | align 4 |
2317 | scroll_bar_data_horizontal: |
||
2318 | .x: |
||
2319 | .size_x dw 0 ;+0 |
||
2320 | .start_x dw 0 ;+2 |
||
2321 | .y: |
||
2322 | .size_y dw SCROLL_WIDTH_SIZE ;+4 |
||
2323 | .start_y dw 0 ;+6 |
||
2324 | .btn_high dd SCROLL_WIDTH_SIZE ;+8 |
||
2325 | .type dd 0 ;+12 |
||
2326 | .max_area dd 50 ;+16 |
||
2327 | .cur_area dd 50 ;+20 |
||
2328 | .position dd 0 ;+24 |
||
2329 | .bckg_col dd 0xAAAAAA ;+28 |
||
2330 | .frnt_col dd 0xCCCCCC ;+32 |
||
2331 | .line_col dd 0 ;+36 |
||
2332 | .redraw dd 0 ;+40 |
||
2333 | .delta dw 0 ;+44 |
||
2334 | .delta2 dw 0 ;+46 |
||
2335 | .run_x: |
||
2336 | .r_size_x dw 0 ;+48 |
||
2337 | .r_start_x dw 0 ;+50 |
||
2338 | .run_y: |
||
2339 | .r_size_y dw 0 ;+52 |
||
2340 | .r_start_y dw 0 ;+54 |
||
2341 | .m_pos dd 0 ;+56 |
||
2342 | .m_pos_2 dd 0 ;+60 |
||
2343 | .m_keys dd 0 ;+64 |
||
2344 | .run_size dd 0 ;+68 |
||
2345 | .position2 dd 0 ;+72 |
||
2346 | .work_size dd 0 ;+76 |
||
2347 | .all_redraw dd 0 ;+80 |
||
2348 | .ar_offset dd KEY_MOVE_PIXELS ;+84 |
||
2349 | ;----------------------------------------------------------------------------- |
||
1004 | diamond | 2350 | align 4 |
2351 | @IMPORT: |
||
2352 | |||
7656 | dunkaist | 2353 | library \ |
2354 | libgfx , 'libgfx.obj' , \ |
||
2355 | libimg , 'libimg.obj' , \ |
||
2356 | libini , 'libini.obj' , \ |
||
2357 | sort , 'sort.obj' , \ |
||
2358 | proc_lib, 'proc_lib.obj', \ |
||
2359 | box_lib , 'box_lib.obj' |
||
1004 | diamond | 2360 | |
1511 | mario79 | 2361 | |
7656 | dunkaist | 2362 | import libgfx , \ |
2363 | libgfx.init , 'lib_init' , \ |
||
2364 | gfx.open , 'gfx_open' , \ |
||
2365 | gfx.close , 'gfx_close' , \ |
||
2366 | gfx.pen.color, 'gfx_pen_color', \ |
||
2367 | gfx.line , 'gfx_line' |
||
1004 | diamond | 2368 | |
7656 | dunkaist | 2369 | import libimg , \ |
2370 | libimg.init , 'lib_init' , \ |
||
2371 | img.from_file , 'img_from_file' , \ |
||
2372 | img.to_rgb2 , 'img_to_rgb2' , \ |
||
2373 | img.create , 'img_create' , \ |
||
2374 | img.flip , 'img_flip' , \ |
||
2375 | img.rotate , 'img_rotate' , \ |
||
2376 | img.destroy , 'img_destroy' , \ |
||
2377 | img.scale , 'img_scale' , \ |
||
2378 | img.get_scaled_size, 'img_get_scaled_size', \ |
||
2379 | img.convert , 'img_convert' , \ |
||
2380 | img.draw , 'img_draw' |
||
1004 | diamond | 2381 | |
7656 | dunkaist | 2382 | import libini , \ |
2383 | ini_get_shortcut, 'ini_get_shortcut', \ |
||
7879 | leency | 2384 | ini_get_int, 'ini_get_int',\ |
2385 | ini_set_int, 'ini_set_int',\ |
||
7656 | dunkaist | 2386 | ini_set_str, 'ini_set_str' |
1004 | diamond | 2387 | |
7656 | dunkaist | 2388 | import sort ,\ |
2389 | sort.START, 'START' ,\ |
||
2390 | SortDir , 'SortDir',\ |
||
2391 | strcmpi , 'strcmpi' |
||
1427 | diamond | 2392 | |
7656 | dunkaist | 2393 | import proc_lib ,\ |
2394 | OpenDialog_Init , 'OpenDialog_init' ,\ |
||
2395 | OpenDialog_Start, 'OpenDialog_start' |
||
1016 | diamond | 2396 | |
7656 | dunkaist | 2397 | import box_lib ,\ |
2398 | scrollbar_vert_draw , 'scrollbar_v_draw' ,\ |
||
2399 | scrollbar_vert_mouse, 'scrollbar_v_mouse',\ |
||
2400 | scrollbar_hort_draw , 'scrollbar_h_draw' ,\ |
||
2401 | scrollbar_hort_mouse, 'scrollbar_h_mouse' |
||
1511 | mario79 | 2402 | |
7656 | dunkaist | 2403 | bFirstWinDraw db 1 |
2404 | bSlideShow db 0 |
||
2405 | bToggleSlideShow db 0 |
||
2406 | bShowToolbar db 1 |
||
2407 | bShowToolbarSave db 0 ; to restore state when return from slide show |
||
2408 | bToggleToolbar db 0 |
||
2409 | bScaleModeChanged db 0 |
||
2410 | bNewImage db 0 |
||
1004 | diamond | 2411 | ;----------------------------------------------------------------------------- |
2412 | |||
1016 | diamond | 2413 | virtual at 0 |
2414 | file 'kivicons.bmp':0xA,4 |
||
2415 | load offbits dword from 0 |
||
2416 | end virtual |
||
7860 | dunkaist | 2417 | numimages = 11 |
1016 | diamond | 2418 | openbtn = 0 |
2419 | backbtn = 1 |
||
2420 | forwardbtn = 2 |
||
2421 | bgrbtn = 3 |
||
2422 | fliphorzbtn = 4 |
||
2423 | flipvertbtn = 5 |
||
2424 | rotcwbtn = 6 |
||
2425 | rotccwbtn = 7 |
||
2426 | rot180btn = 8 |
||
3116 | dunkaist | 2427 | slidebtn = 9 |
7860 | dunkaist | 2428 | scalebtn = 10 |
1016 | diamond | 2429 | |
1004 | diamond | 2430 | palette: |
1570 | dunkaist | 2431 | file 'kivicons.bmp':0x36,offbits-0x36 |
1016 | diamond | 2432 | buttons: |
1570 | dunkaist | 2433 | file 'kivicons.bmp':offbits |
7862 | dunkaist | 2434 | repeat 10 |
7860 | dunkaist | 2435 | y = %-1 |
2436 | z = 20-% |
||
1016 | diamond | 2437 | repeat numimages*5 |
2438 | load a dword from $ - numimages*20*20 + numimages*20*y + (%-1)*4 |
||
2439 | load b dword from $ - numimages*20*20 + numimages*20*z + (%-1)*4 |
||
7656 | dunkaist | 2440 | store dword a at $ - numimages*20*20 + numimages*20*z + (%-1)*4 |
2441 | store dword b at $ - numimages*20*20 + numimages*20*y + (%-1)*4 |
||
1004 | diamond | 2442 | end repeat |
2443 | end repeat |
||
2444 | |||
7432 | leency | 2445 | inifilename db '/sys/settings/app.ini',0 |
7879 | leency | 2446 | aKivSection db 'Kiv',0 |
1570 | dunkaist | 2447 | aNext db 'Next',0 |
2448 | aPrev db 'Prev',0 |
||
3116 | dunkaist | 2449 | aSlide db 'SlideShow',0 |
2450 | aTglbar db 'ToggleBar',0 |
||
7879 | leency | 2451 | aWinX db 'WinX',0 |
2452 | aWinY db 'WinY',0 |
||
2453 | aWinW db 'WinW',0 |
||
2454 | aWinH db 'WinH',0 |
||
1427 | diamond | 2455 | |
7870 | leency | 2456 | inifileeskin db '/sys/settings/system.ini',0 |
2457 | amain db 'style',0 |
||
2458 | aprogram db 'bg_program',0 |
||
2459 | aparam db 'bg_param',0 |
||
7421 | leency | 2460 | |
1427 | diamond | 2461 | align 4 |
2462 | check_modifier_table: |
||
1570 | dunkaist | 2463 | dd check_modifier_0 |
2464 | dd check_modifier_1 |
||
2465 | dd check_modifier_2 |
||
2466 | dd check_modifier_3 |
||
2467 | dd check_modifier_4 |
||
1427 | diamond | 2468 | |
1470 | mario79 | 2469 | ;--------------------------------------------------------------------- |
2470 | align 4 |
||
2471 | OpenDialog_data: |
||
7656 | dunkaist | 2472 | .type dd 0 |
2473 | .procinfo dd procinfo ; +4 |
||
2474 | .com_area_name dd communication_area_name ; +8 |
||
2475 | .com_area dd 0 ; +12 |
||
2476 | .opendir_path dd temp_dir_path ; +16 |
||
2477 | .dir_default_path dd communication_area_default_path ; +20 |
||
2478 | .start_path dd open_dialog_path ; +24 |
||
2479 | .draw_window dd draw_window ; +28 |
||
2480 | .status dd 0 ; +32 |
||
2481 | .openfile_path dd path ; openfile_path ; +36 |
||
2482 | .filename_area dd 0 ; +40 |
||
2483 | .filter_area dd Filter |
||
1582 | mario79 | 2484 | .x: |
7656 | dunkaist | 2485 | .x_size dw 420 ; +48 ; Window X size |
2486 | .x_start dw 10 ; +50 ; Window X position |
||
1582 | mario79 | 2487 | .y: |
7656 | dunkaist | 2488 | .y_size dw 320 ; +52 ; Window y size |
2489 | .y_start dw 10 ; +54 ; Window Y position |
||
1004 | diamond | 2490 | |
1470 | mario79 | 2491 | communication_area_name: |
1570 | dunkaist | 2492 | db 'FFFFFFFF_open_dialog',0 |
1701 | lrz | 2493 | |
1470 | mario79 | 2494 | open_dialog_path: |
1701 | lrz | 2495 | if __nightbuild eq yes |
2496 | db '/sys/MANAGERS/opendial',0 |
||
2497 | else |
||
1570 | dunkaist | 2498 | db '/sys/File Managers/opendial',0 |
1701 | lrz | 2499 | end if |
7656 | dunkaist | 2500 | communication_area_default_path: |
1570 | dunkaist | 2501 | db '/rd/1',0 |
1004 | diamond | 2502 | |
1470 | mario79 | 2503 | Filter: |
7860 | dunkaist | 2504 | dd Filter.end-Filter |
1470 | mario79 | 2505 | .1: |
2506 | db 'BMP',0 |
||
2507 | db 'GIF',0 |
||
2508 | db 'JPG',0 |
||
2509 | db 'JPEG',0 |
||
2510 | db 'JPE',0 |
||
2511 | db 'PNG',0 |
||
2512 | db 'ICO',0 |
||
2513 | db 'CUR',0 |
||
3116 | dunkaist | 2514 | db 'TGA',0 |
1570 | dunkaist | 2515 | db 'PCX',0 |
1922 | dunkaist | 2516 | db 'XCF',0 |
2389 | dunkaist | 2517 | db 'PBM',0 |
2518 | db 'PGM',0 |
||
2519 | db 'PNM',0 |
||
7656 | dunkaist | 2520 | db 'PPM',0 |
2389 | dunkaist | 2521 | db 'TIF',0 |
2522 | db 'TIFF',0 |
||
2394 | dunkaist | 2523 | db 'WBMP',0 |
7656 | dunkaist | 2524 | db 'WEBP',0 |
2525 | db 'XBM',0 |
||
1470 | mario79 | 2526 | .end: |
2527 | db 0 |
||
1004 | diamond | 2528 | |
1470 | mario79 | 2529 | draw_window_fake: |
1570 | dunkaist | 2530 | ret |
1470 | mario79 | 2531 | ;------------------------------------------------------------------------------ |
7656 | dunkaist | 2532 | scale_mode_calc dd scale_none_calc, 0, 0, 0, scale_fit_min_calc |
2533 | |||
2534 | scale_none_mod dd 0 |
||
2535 | scale_none_key dd 13 ; '=' |
||
2536 | scale_fit_min_mod dd 0 |
||
2537 | scale_fit_min_key dd 17 ; 'w' |
||
2538 | |||
2539 | move_pictport_left_1_mod dd 0 |
||
2540 | move_pictport_left_1_key dd 35 ; 'h' |
||
2541 | move_pictport_left_2_mod dd 0 |
||
2542 | move_pictport_left_2_key dd 75 ; arrow left |
||
2543 | |||
2544 | move_pictport_right_1_mod dd 0 |
||
2545 | move_pictport_right_1_key dd 38 ; 'l' |
||
2546 | move_pictport_right_2_mod dd 0 |
||
2547 | move_pictport_right_2_key dd 77 ; arrow right |
||
2548 | |||
2549 | move_pictport_up_1_mod dd 0 |
||
2550 | move_pictport_up_1_key dd 37 ; 'k' |
||
2551 | move_pictport_up_2_mod dd 0 |
||
2552 | move_pictport_up_2_key dd 72 ; arrow up |
||
2553 | |||
2554 | move_pictport_down_1_mod dd 0 |
||
2555 | move_pictport_down_1_key dd 36 ; 'j' |
||
2556 | move_pictport_down_2_mod dd 0 |
||
2557 | move_pictport_down_2_key dd 80 ; arrow down |
||
2558 | |||
2559 | ;shift_left_down_mod |
||
2560 | |||
2561 | ;include_debug_strings |
||
2562 | |||
1016 | diamond | 2563 | readdir_fileinfo: |
1570 | dunkaist | 2564 | dd 1 |
2565 | dd 0 |
||
2566 | dd 0 |
||
2567 | readblocks dd 0 |
||
7860 | dunkaist | 2568 | directory_ptr dd 0 |
2569 | curdir rb 1024 |
||
1470 | mario79 | 2570 | ;------------------------------------------------------------------------------ |
7656 | dunkaist | 2571 | |
1004 | diamond | 2572 | I_END: |
1016 | diamond | 2573 | align 4 |
7656 | dunkaist | 2574 | img_data_len rd 1 |
2575 | fh rd 1 |
||
2576 | orig_image rd 1 |
||
2577 | cur_image rd 1 |
||
2578 | files_num rd 1 |
||
2579 | cur_file_idx rd 1 |
||
2580 | cur_frame_time rd 1 |
||
2581 | cur_frame rd 1 |
||
1004 | diamond | 2582 | |
7656 | dunkaist | 2583 | next_mod rd 1 |
2584 | next_key rd 1 |
||
2585 | prev_mod rd 1 |
||
2586 | prev_key rd 1 |
||
2587 | slide_mod rd 1 |
||
2588 | slide_key rd 1 |
||
2589 | tglbar_mod rd 1 |
||
2590 | tglbar_key rd 1 |
||
1004 | diamond | 2591 | |
3116 | dunkaist | 2592 | |
7656 | dunkaist | 2593 | last_name_component rd 1 |
2594 | toolbar.height_old rd 1 |
||
2595 | |||
2596 | procinfo process_information |
||
7860 | dunkaist | 2597 | scale_button_xy dd ? |
2598 | scale_button_letter dd ? ; i.e. 'x1',0 |
||
7421 | leency | 2599 | align 16 |
7656 | dunkaist | 2600 | path rb 4096 |
2601 | window_header rb 256 |
||
2602 | window_header_len rd 1 |
||
2603 | __params rb 4096 |
||
1470 | mario79 | 2604 | ;--------------------------------------------------------------------- |
7421 | leency | 2605 | sys_path rb 1024 |
7656 | dunkaist | 2606 | temp_dir_path: |
1470 | mario79 | 2607 | rb 4096 |
2608 | ;--------------------------------------------------------------------- |
||
1570 | dunkaist | 2609 | rb 4096 |
1470 | mario79 | 2610 | stacktop: |
2611 | ;--------------------------------------------------------------------- |
||
7656 | dunkaist | 2612 | E_END:=>20,>100,>20,>20,20>0-prev> |