Rev 6620 | Rev 7832 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6620 | Rev 7829 | ||
---|---|---|---|
Line 1... | Line -... | ||
1 | ; kpack = Kolibri Packer |
- | |
2 | ;--------------------------------------------------------------------- |
- | |
3 | ; version: 0.20 |
- | |
4 | ; last update: 08/18/2011 |
- | |
5 | ; changed by: Marat Zakiyanov aka Mario79, aka Mario |
- | |
6 | ; changes: Checking for "rolled up" window |
- | |
7 | ;--------------------------------------------------------------------- |
- | |
8 | ; version: 0.20 |
- | |
9 | ; last update: 07/12/2010 |
- | |
10 | ; changed by: Marat Zakiyanov aka Mario79, aka Mario |
- | |
11 | ; changes: Added code for packing the kernel.mnt |
- | |
12 | ;--------------------------------------------------------------------- |
- | |
13 | ; version: 0.15 |
- | |
14 | ; last update: 06/11/2010 |
- | |
15 | ; changed by: Marat Zakiyanov aka Mario79, aka Mario |
- | |
16 | ; changes: 1) Window Y=4, B=1 |
- | |
17 | ; 2) Refresh lenght of data after Editbox editing |
- | |
18 | ; 3) Changed format of start parameter - |
- | |
19 | ; longer path (total length 255 + zero). |
- | |
20 | ;--------------------------------------------------------------------- |
- | |
21 | ; version: 0.14 |
- | |
22 | ; last update: 03/11/2010 |
- | |
23 | ; changed by: Marat Zakiyanov aka Mario79, aka Mario |
- | |
24 | ; changes: select path with OpenDialog, |
- | |
25 | ; using Box_Lib and Proc_Lib |
- | |
26 | ;--------------------------------------------------------------------- |
1 | ;--------------------------------------------------------------------- |
27 | ; Kpack - Kolibri Packer |
2 | ; Kpack - Kolibri Packer |
28 | ; Kolibri version |
3 | ; Kolibri version |
29 | ; Written by diamond in 2006, 2007 specially for KolibriOS |
4 | ; Written by diamond in 2006, 2007 specially for KolibriOS |
30 | ; |
5 | ; |
31 | ; Disassemled and corrected in 2010 specially for FASM |
6 | ; Disassemled and corrected in 2010-2011 specially for FASM |
32 | ; by Marat Zakiyanov aka Mario79, aka Mario |
7 | ; by Marat Zakiyanov aka Mario79, aka Mario |
33 | ; |
8 | ; |
34 | ; Uses LZMA compression library by Igor Pavlov |
9 | ; Uses LZMA compression library by Igor Pavlov |
35 | ; (for more information on LZMA and 7-Zip visit http://www.7-zip.org) |
10 | ; (for more information on LZMA and 7-Zip visit http://www.7-zip.org) |
36 | ; (plain-C packer and ASM unpacker are ported by diamond) |
11 | ; (plain-C packer and ASM unpacker are ported by diamond) |
Line 47... | Line 22... | ||
47 | dd params |
22 | dd params |
48 | dd cur_dir_path |
23 | dd cur_dir_path |
49 | ;--------------------------------------------------------------------- |
24 | ;--------------------------------------------------------------------- |
50 | include '../../../config.inc' ;for nightbuild |
25 | include '../../../config.inc' ;for nightbuild |
51 | include '../../../macros.inc' |
26 | include '../../../macros.inc' |
- | 27 | include '../../../gui_patterns.inc' |
|
52 | include '../../../develop/libraries/box_lib/trunk/box_lib.mac' |
28 | include '../../../develop/libraries/box_lib/trunk/box_lib.mac' |
53 | include '../../../develop/libraries/box_lib/load_lib.mac' |
29 | include '../../../develop/libraries/box_lib/load_lib.mac' |
54 | @use_library |
30 | @use_library |
Line 55... | Line 31... | ||
55 | 31 | ||
Line 395... | Line 371... | ||
395 | loop x1 |
371 | loop x1 |
396 | ;-------------------------------------- |
372 | ;-------------------------------------- |
397 | x2: |
373 | x2: |
398 | mov [message_cur_pos],edx |
374 | mov [message_cur_pos],edx |
399 | ; update window |
375 | ; update window |
400 | mcall 13,<6,414>,<54,222>,[color_table+20] |
376 | call draw_log_area |
401 | ;-------------------------------------- |
377 | ;-------------------------------------- |
402 | draw_messages: |
378 | draw_messages: |
403 | mov ebx,12 shl 16+60 |
379 | mov ebx,12 shl 16 + LOG_Y + 7 |
404 | mov edi,message_mem |
380 | mov edi,message_mem |
405 | ;-------------------------------------- |
381 | ;-------------------------------------- |
406 | @@: |
382 | @@: |
407 | push edi |
383 | push edi |
408 | xor eax,eax |
384 | xor eax,eax |
Line 411... | Line 387... | ||
411 | repnz scasb |
387 | repnz scasb |
412 | sub ecx,79 |
388 | sub ecx,79 |
413 | neg ecx |
389 | neg ecx |
414 | mov esi,ecx |
390 | mov esi,ecx |
415 | pop edi |
391 | pop edi |
416 | mcall 4,,[color_table+32],edi |
392 | mcall 4,,0xB0000000,edi |
417 | add ebx,10 |
393 | add ebx,16 |
418 | add edi,80 |
394 | add edi,80 |
419 | cmp edi,message_cur_pos |
395 | cmp edi,message_cur_pos |
420 | jb @b |
396 | jb @b |
Line 421... | Line 397... | ||
421 | 397 | ||
422 | ret |
398 | ret |
- | 399 | ;********************************************************************* |
|
- | 400 | draw_log_area: |
|
- | 401 | DrawRectangle 5, LOG_Y, WIN_W-12, LOG_H, [sc.work_graph] |
|
- | 402 | mcall 13, <6,WIN_W-13>, |
|
- | 403 | ret |
|
423 | ;********************************************************************* |
404 | ;********************************************************************* |
424 | draw_window: |
405 | draw_window: |
425 | ; start redraw |
406 | ; start redraw |
426 | mcall 12,1 |
- | |
427 | 407 | mcall 12,1 |
|
428 | mcall 48,3,color_table,40 |
408 | mcall 48,3,sc,40 |
429 | ;-------------------------------------- |
409 | ;-------------------------------------- |
430 | edit_boxes_set_sys_color edit1,editboxes_end,color_table |
410 | edit_boxes_set_sys_color edit1,editboxes_end,sc |
431 | check_boxes_set_sys_color2 check1,check1_end,color_table |
411 | check_boxes_set_sys_color2 check1,check1_end,sc |
432 | ;-------------------------------------- |
412 | ;-------------------------------------- |
433 | ; define window |
413 | ; define window |
- | 414 | mcall 48,4 |
|
434 | xor eax,eax |
415 | |
- | 416 | mov ecx,100 shl 16 + WIN_H |
|
- | 417 | add ecx, eax |
|
435 | mov ecx,100 shl 16+306 |
418 | |
436 | mov edx,[color_table.work] |
419 | mov edx,[sc.work] |
437 | add edx,34000000h |
420 | add edx,34000000h |
438 | xor esi,esi |
421 | xor esi,esi |
439 | xor edi,edi |
422 | xor edi,edi |
440 | mcall ,<100,436>,,,,caption_str |
423 | mcall 0,<250,WIN_W+10>,,,,caption_str |
Line 441... | Line 424... | ||
441 | mcall 9,procinfo,-1 |
424 | mcall 9,procinfo,-1 |
442 | 425 | ||
443 | mov eax,[procinfo+70] ;status of window |
426 | mov eax,[procinfo+70] ;status of window |
444 | test eax,100b |
427 | test eax,100b |
445 | jne .end |
428 | jne .end |
446 | ;-------------------------------------- |
429 | ;-------------------------------------- |
447 | ; draw lines and frame |
430 | ; draw lines and frame |
448 | call draw_lines |
431 | call draw_log_area |
449 | ; draw buttons |
432 | ; draw buttons |
450 | call draw_buttons |
433 | call draw_buttons |
451 | ; draw messages |
434 | ; draw messages |
452 | call draw_messages |
- | |
453 | ; draw editbox's |
- | |
454 | mov eax,[procinfo+42] |
- | |
455 | sub eax,65+72+10 |
- | |
456 | mov [edit1.width],eax |
- | |
457 | mov [edit2.width],eax |
- | |
458 | mov [edit3.width],eax |
435 | call draw_messages |
459 | 436 | ; draw editbox's |
|
460 | call draw_editbox |
437 | call draw_editbox |
461 | ; end redraw |
438 | ; end redraw |
462 | .end: |
439 | .end: |
Line 471... | Line 448... | ||
471 | call [edit_box_draw] |
448 | call [edit_box_draw] |
Line 472... | Line 449... | ||
472 | 449 | ||
473 | push dword edit3 |
450 | push dword edit3 |
Line -... | Line 451... | ||
- | 451 | call [edit_box_draw] |
|
- | 452 | ||
- | 453 | mov eax,[sc.work_text] |
|
474 | call [edit_box_draw] |
454 | or eax, 0x90000000 |
475 | 455 | mov [check1.text_color], eax |
|
476 | push dword check1 |
456 | push dword check1 |
477 | call [check_box_draw] |
457 | call [check_box_draw] |
478 | ret |
458 | ret |
Line 489... | Line 469... | ||
489 | dec eax |
469 | dec eax |
490 | mov [edi+48], eax ;ed_size |
470 | mov [edi+48], eax ;ed_size |
491 | mov [edi+52], eax ;ed_pos |
471 | mov [edi+52], eax ;ed_pos |
492 | ret |
472 | ret |
493 | ;********************************************************************* |
473 | ;********************************************************************* |
494 | draw_lines: |
- | |
495 | mov ecx,2 shl 16+12*3 |
- | |
496 | ; draw frame for messages data |
- | |
497 | push ecx |
- | |
498 | add ecx,50 shl 16+16 |
- | |
499 | mcall 38,<3,423>,,[color_table.work_graph] |
- | |
500 | add ecx,224*(1 shl 16+1) |
- | |
501 | mcall |
- | |
502 | sub cx,224 |
- | |
503 | mcall ,<3,3> |
- | |
504 | mcall ,<423,423> |
- | |
505 | pop ecx |
- | |
506 | ret |
- | |
507 | ;********************************************************************* |
- | |
508 | draw_buttons: |
474 | draw_buttons: |
509 | ; define compress button |
475 | ; define compress button |
510 | mov cx,18 |
476 | mov cx,18 |
511 | mcall 8,<351,73>,<1, 17>,2,[color_table.work_button] |
477 | mcall 8, |
512 | ; uncompress button |
478 | ; uncompress button |
513 | add ecx,18 shl 16 |
- | |
514 | inc edx |
479 | inc edx |
- | 480 | add ecx,LINE_H shl 16 |
|
515 | mcall |
481 | mcall |
516 | ;add ecx,-12h+0Ch+140000h |
- | |
517 | mov ecx, 38 shl 16 + 11 |
- | |
518 | ; question button |
482 | ; question button |
519 | push esi |
483 | push esi |
520 | mov dl,7 |
484 | mov dl,7 |
521 | mcall ,<413,11> |
485 | mcall , |
- | 486 | mov ecx,[sc.work_button_text] |
|
522 | shr ecx,16 |
487 | or ecx,0x90000000 |
523 | lea ebx,[ecx+1A00002h] |
488 | mov edx,aQuestion |
524 | mcall 4,,[color_table.work_button_text],aQuestion,1 |
489 | mcall 4, |
525 | pop esi |
490 | pop esi |
526 | ; define settings buttons |
491 | ; define Path button |
527 | mov ecx,16*2+2 |
- | |
528 | shl ecx,16 |
- | |
529 | mov cx,13 |
- | |
530 | mcall 8,<6,50>,,4 |
492 | mcall 8,<6,64>, |
531 | ; text on settings buttons |
493 | ; text on Path button |
532 | mov ebx,8 shl 16+5 |
494 | mov ebx,8 shl 16+5 |
533 | mov al,4 |
495 | mov al,4 |
534 | mov ecx,[color_table.work_text] |
496 | mov ecx,[sc.work_text] |
535 | push buttons1names |
497 | push buttons1names |
536 | pop edx |
498 | pop edx |
537 | push 8 |
499 | push 8 |
538 | pop esi |
500 | pop esi |
539 | ;-------------------------------------- |
501 | ;-------------------------------------- |
- | 502 | ; text on settings buttons |
|
- | 503 | mov ecx, [sc.work_text] |
|
540 | mcall |
504 | or ecx, 0x10000000 |
- | 505 | mcall , <8, 5>, , buttons1names, 8 |
|
- | 506 | ||
541 | add edx,esi |
507 | add edx,esi |
542 | add ebx,16 |
508 | add ebx,LINE_H |
543 | mcall |
509 | mcall |
544 | add edx,esi |
510 | add edx,esi |
545 | add ebx,16 |
511 | add ebx,LINE_H |
546 | mov ecx,[color_table.work_button_text] |
512 | mov ecx,[sc.work_button_text] |
- | 513 | or ecx, 0x10000000 |
|
- | 514 | sub ebx, 10 shl 16 |
|
547 | mcall |
515 | mcall |
548 | ; text on compress and decompress buttons |
516 | ; text on compress and decompress buttons |
549 | or ecx,0x80000000 |
517 | or ecx,0x80000000 |
550 | mcall ,<364,6>,,aCompress |
518 | mcall , |
551 | mcall ,<359,24>,,aDecompress |
519 | mcall , |
552 | ret |
520 | ret |
553 | ;********************************************************************* |
521 | ;********************************************************************* |
554 | ;Pack procedures |
522 | ;Pack procedures |
555 | include 'packpoc.inc' |
523 | include 'packpoc.inc' |
556 | ;--------------------------------------------------------------------- |
524 | ;--------------------------------------------------------------------- |