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