Rev 6214 | Rev 6216 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6214 | Rev 6215 | ||
---|---|---|---|
Line 30... | Line 30... | ||
30 | dd E_END ; memory for app |
30 | dd E_END ; memory for app |
31 | dd E_END ; esp |
31 | dd E_END ; esp |
32 | dd 0x0,0x0 ; I_Param , I_Icon |
32 | dd 0x0,0x0 ; I_Param , I_Icon |
Line 33... | Line 33... | ||
33 | 33 | ||
- | 34 | include '../../../macros.inc' |
|
34 | include '../../../macros.inc' |
35 | include '../../../gui_patterns.inc' |
Line 35... | Line -... | ||
35 | include '../../../KOSfuncs.inc' |
- | |
36 | - | ||
37 | macro DrawBar x, y, width, height, color |
- | |
38 | { |
- | |
39 | mcall 13, (x) shl 16 + (width), (y) shl 16 + (height), color |
- | |
40 | } |
- | |
41 | - | ||
42 | macro DrawRectangle x, y, w, h, color |
- | |
43 | { |
- | |
44 | DrawBar x,y,w,1,color |
- | |
45 | DrawBar x,y+h,w,1 |
- | |
46 | DrawBar x,y,1,h |
- | |
47 | DrawBar x+w,y,1,h+1 |
- | |
48 | } |
36 | include '../../../KOSfuncs.inc' |
49 | 37 | ||
50 | START: |
38 | START: |
51 | red: |
39 | red: |
52 | call draw_window |
40 | call draw_window |
Line 647... | Line 635... | ||
647 | ; ********************************************* |
635 | ; ********************************************* |
648 | ; ******* WINDOW DEFINITIONS AND DRAW ********* |
636 | ; ******* WINDOW DEFINITIONS AND DRAW ********* |
649 | ; ********************************************* |
637 | ; ********************************************* |
Line 650... | Line 638... | ||
650 | 638 | ||
- | 639 | BTNSP_X equ 39 |
|
- | 640 | DISPLAY_X equ 20 |
|
- | 641 | DISPLAY_Y equ 18 |
|
- | 642 | DISPLAY_W equ 208 |
|
Line 651... | Line 643... | ||
651 | BTNSP_X equ 39 |
643 | DISPLAY_H equ 26 |
652 | 644 | ||
Line 653... | Line 645... | ||
653 | draw_window: |
645 | draw_window: |
Line 682... | Line 674... | ||
682 | inc edx |
674 | inc edx |
683 | cmp edx, BTNSP_X |
675 | cmp edx, BTNSP_X |
684 | jbe newbutton |
676 | jbe newbutton |
Line 685... | Line 677... | ||
685 | 677 | ||
686 | mcall , <253, 36>, <55, 22>, 2, 0xF0969D ; 'C' |
678 | mcall , <253, 36>, <55, 22>, 2, 0xF0969D ; 'C' |
687 | mcall , <235,54>, <20,26>, 3, [sc.work] ; 'dec-bin-hex' |
679 | mcall , <236,53>, |
Line 688... | Line 680... | ||
688 | mov esi, [sc.work_button] |
680 | mov esi, [sc.work_button] |
689 | 681 | ||
Line 719... | Line 711... | ||
719 | mcall 12, 2 |
711 | mcall 12, 2 |
720 | ret |
712 | ret |
Line 721... | Line 713... | ||
721 | 713 | ||
722 | print_display: |
714 | print_display: |
723 | pusha |
715 | pusha |
724 | mcall 13, < 21, 206>, <22, 24>, 0xFFFfff |
716 | DrawRectangle3D DISPLAY_X-1,DISPLAY_Y-1,DISPLAY_W+2,DISPLAY_H+2, [sc.work_3d_dark], [sc.work_3d_light] |
725 | DrawRectangle 19,20,208,26, [sc.work_graph] |
717 | DrawRectangle DISPLAY_X,DISPLAY_Y,DISPLAY_W,DISPLAY_H, [sc.work_graph] |
726 | mcall 38, < 20, 226>, <21, 21>, 0xE0E0E0 ; internal shadow |
718 | mcall 38, < DISPLAY_X+1, DISPLAY_W+DISPLAY_X-1>, |
- | 719 | mcall , < DISPLAY_X+1, DISPLAY_X+1>, |
|
Line 727... | Line 720... | ||
727 | mcall 38, < 20, 20>, <23, 43>, 0xE0E0E0 ; internal shadow |
720 | mcall 13, < DISPLAY_X+2, DISPLAY_W-2>, |
728 | 721 | ||
729 | mov ecx, [sc.work_text] |
722 | mov ecx, [sc.work_text] |
Line 730... | Line 723... | ||
730 | or ecx, 0x40000000 |
723 | or ecx, 0x40000000 |
731 | mcall 4, <135,7>,,calc,1,[sc.work] |
724 | mcall 4, <135,6>,,calc,1,[sc.work] |
732 | 725 | ||
733 | mov ebx, 250 shl 16 + 26 |
726 | mov ebx, 250 shl 16 + DISPLAY_Y+(DISPLAY_H-14)/2 |
734 | mov edx, [display_type] |
727 | mov edx, [display_type] |
735 | shl edx, 2 |
728 | shl edx, 2 |
Line 808... | Line 801... | ||
808 | ret |
801 | ret |
Line 809... | Line 802... | ||
809 | 802 | ||
Line 810... | Line 803... | ||
810 | 803 | ||
Line 811... | Line 804... | ||
811 | ;data |
804 | ;data |
812 | 805 | ||
813 | title db 'Calc 1.4', 0 |
806 | title db 'Calc 1.41', 0 |
814 | 807 |