Rev 2038 | Rev 6342 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
255 | heavyiron | 1 | ;----------------------------------------------------------- |
2 | ;---load icons in memory and draw icons on panel----------- |
||
3 | ;----------------------------------------------------------- |
||
4 | load_icons: |
||
6328 | IgorA | 5 | stdcall [img_decode], panel_picture, panel_picture.end-panel_picture, 0 |
6 | mov ebx,eax |
||
7 | mov edi,[ScreenPointer] |
||
8 | add edi,(1200*1000*3)+8 |
||
9 | stdcall [img_to_rgb2], ebx,edi ;преобразуем изображение к формату rgb |
||
10 | stdcall [img_destroy], ebx ;удаляем временный буфер с параметрами изображения |
||
11 | ret |
||
255 | heavyiron | 12 | |
13 | draw_icons: |
||
14 | |||
15 | mov [Icon_X],7 |
||
16 | mov [Icon_Y],20+15+4 |
||
17 | |||
18 | ;draw panel picture |
||
19 | mov edx,[Icon_X] |
||
20 | shl edx,16 |
||
21 | add edx,[Icon_Y] |
||
22 | mov ebx,[ScreenPointer] |
||
552 | diamond | 23 | add ebx,(1200*1000*3)+8 |
255 | heavyiron | 24 | mov eax,7 |
25 | mov ecx,417*65536+46 |
||
485 | heavyiron | 26 | mcall |
255 | heavyiron | 27 | |
28 | |||
29 | ;main buttons of instrumnts |
||
30 | |||
31 | and [counter],0 |
||
2038 | leency | 32 | mov [Icon_X],9 |
33 | mov [Icon_Y],21+15+4+1 |
||
255 | heavyiron | 34 | |
35 | main_buttons: |
||
36 | |||
37 | mov eax,8 |
||
38 | mov ebx,[Icon_X] |
||
39 | mov ecx,[Icon_Y] |
||
40 | dec ebx |
||
41 | dec ecx |
||
42 | shl ebx,16 |
||
43 | shl ecx,16 |
||
2038 | leency | 44 | add ebx,18 |
45 | add ecx,19 |
||
255 | heavyiron | 46 | mov edx,[counter] |
47 | add edx,10 |
||
48 | add edx,1000000000000000000000000000000b |
||
485 | heavyiron | 49 | mcall |
255 | heavyiron | 50 | |
51 | |||
52 | add [Icon_X],22 |
||
53 | |||
54 | inc [counter] |
||
55 | cmp [counter],19 |
||
56 | jne main_buttons |
||
57 | |||
58 | |||
59 | ;buttons of brushes(and lines width) |
||
60 | and [counter],0 |
||
61 | |||
2038 | leency | 62 | mov [Icon_X],8+1 |
255 | heavyiron | 63 | mov [Icon_Y],20+15+4+25+1 |
64 | |||
65 | next_button_brush: |
||
66 | |||
67 | mov eax,8 |
||
68 | mov ebx,[Icon_X] |
||
69 | mov ecx,[Icon_Y] |
||
70 | dec ebx |
||
71 | dec ecx |
||
72 | shl ebx,16 |
||
73 | shl ecx,16 |
||
2038 | leency | 74 | add ebx,18 |
75 | add ecx,19 |
||
255 | heavyiron | 76 | mov edx,[counter] |
77 | add edx,40 |
||
78 | add edx,1000000000000000000000000000000b |
||
485 | heavyiron | 79 | mcall |
255 | heavyiron | 80 | |
81 | add [Icon_X],19 |
||
82 | |||
83 | inc [counter] |
||
84 | cmp [counter],5 |
||
85 | jne next_button_brush |
||
86 | |||
87 | |||
88 | ;buttons of zoom |
||
89 | and [counter],0 |
||
90 | |||
2038 | leency | 91 | mov [Icon_X],8+155+1 |
255 | heavyiron | 92 | mov [Icon_Y],20+15+4+25+1 |
93 | |||
94 | next_button_zoom: |
||
95 | |||
96 | mov eax,8 |
||
97 | mov ebx,[Icon_X] |
||
98 | mov ecx,[Icon_Y] |
||
99 | dec ebx |
||
100 | dec ecx |
||
101 | shl ebx,16 |
||
102 | shl ecx,16 |
||
2038 | leency | 103 | add ebx,18 |
104 | add ecx,19 |
||
255 | heavyiron | 105 | mov edx,[counter] |
106 | add edx,45 |
||
107 | add edx,1000000000000000000000000000000b |
||
485 | heavyiron | 108 | mcall |
255 | heavyiron | 109 | |
110 | add [Icon_X],19 |
||
111 | |||
112 | inc [counter] |
||
113 | cmp [counter],6 |
||
114 | jne next_button_zoom |
||
115 | |||
116 | |||
117 | ; button of palette |
||
118 | mov [Icon_X],7+105+1 |
||
2038 | leency | 119 | mov [Icon_Y],19+15+4+25+1 |
255 | heavyiron | 120 | |
121 | mov eax,8 |
||
122 | mov ebx,[Icon_X] |
||
123 | mov ecx,[Icon_Y] |
||
124 | dec ebx |
||
125 | dec ecx |
||
126 | shl ebx,16 |
||
127 | shl ecx,16 |
||
128 | add ebx,20 |
||
129 | add ecx,21 |
||
130 | mov edx,51 |
||
131 | add edx,1000000000000000000000000000000b |
||
485 | heavyiron | 132 | mcall |
255 | heavyiron | 133 | |
134 | ; button of color |
||
135 | mov [Icon_X],7+128+1 |
||
2038 | leency | 136 | mov [Icon_Y],19+15+4+25+1 |
255 | heavyiron | 137 | |
138 | mov eax,8 |
||
139 | mov ebx,[Icon_X] |
||
140 | mov ecx,[Icon_Y] |
||
141 | dec ebx |
||
142 | dec ecx |
||
143 | shl ebx,16 |
||
144 | shl ecx,16 |
||
145 | add ebx,20 |
||
2038 | leency | 146 | add ecx,20 |
255 | heavyiron | 147 | mov edx,52 |
148 | add edx,1000000000000000000000000000000b |
||
485 | heavyiron | 149 | mcall |
255 | heavyiron | 150 | |
151 | mov eax,13 |
||
2038 | leency | 152 | mov ebx,136*65536+19 |
153 | mov ecx,64*65536+19 |
||
255 | heavyiron | 154 | mov edx,[Color] |
485 | heavyiron | 155 | mcall |
255 | heavyiron | 156 | |
157 | ret |