Rev 1711 | Rev 1715 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1711 | Rev 1714 | ||
---|---|---|---|
1 | align 4 |
- | |
2 | draw_obj_info: ;®ª® ᮠ᢮©á⢠¬¨ ®¡ê¥ªâ |
- | |
3 | mov eax,13 ;rect |
- | |
4 | mov edx,WND_CAPT_COLOR |
- | |
5 | mov ebx,[wndObjI.left] |
- | |
6 | shl ebx,16 |
- | |
7 | add ebx,[wndObjI.width] |
- | |
8 | mov ecx,[wndObjI.top] |
- | |
9 | add ecx,[recMain.top] |
- | |
10 | shl ecx,16 |
- | |
11 | add ecx,[wndObjI.height] |
- | |
12 | sub ecx,[recMain.top] |
- | |
13 | mov edx,0xffffff ;0x80ffffff |
- | |
14 | int 0x40 ;¯àאַ㣮«ì¨ª ¤«ï ®ª |
- | |
15 | - | ||
16 | mov ecx,[wndObjI.top] ;draw caption |
- | |
17 | shl ecx,16 |
- | |
18 | add ecx,[recMain.top] |
- | |
19 | mov edx,WND_CAPT_COLOR |
- | |
20 | int 0x40 |
- | |
21 | - | ||
22 | mov edx,[foc_obj] ;¡¥à¥¬ 㪠§ â¥«ì ®¡ê¥ªâ |
- | |
23 | cmp edx,0 |
- | |
24 | je .exit_fun |
- | |
25 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
- | |
26 | pushad |
- | |
27 | ;draw caption wndObjI |
- | |
28 | mov eax,4 ;¯®¤¯¨áì - §¢ ¨¥ ®¡ê¥ªâ |
- | |
29 | - | ||
30 | mov bl,[edx] |
- | |
31 | call find_obj_in_opt |
- | |
32 | mov edx,edi |
- | |
33 | - | ||
34 | mov ebx,[wndObjI.left] |
- | |
35 | add ebx,[recMain.left] |
- | |
36 | add ebx,4 |
- | |
37 | shl ebx,16 |
- | |
38 | add ebx,[wndObjI.top] |
- | |
39 | add ebx,4 |
- | |
40 | mov ecx,0xc0d000ff |
- | |
41 | mov edi,WND_CAPT_COLOR |
- | |
42 | add edx,obj_opt.info-obj_opt |
- | |
43 | int 0x40 |
- | |
44 | - | ||
45 | mov eax,8 ;ª®¯ª ¤«ï á®åà ¥¨ï ¨§¬¥¥¨© |
- | |
46 | mov ebx,[wndObjI.left] |
- | |
47 | add ebx,119 |
- | |
48 | shl ebx,16 |
- | |
49 | add ebx,18 |
- | |
50 | mov ecx,[wndObjI.top] |
- | |
51 | add ecx,1 |
- | |
52 | shl ecx,16 |
- | |
53 | add ecx,18 |
- | |
54 | mov edx,10 |
- | |
55 | mov esi,0xd040 |
- | |
56 | int 0x40 |
- | |
57 | - | ||
58 | ror ebx,16 ;¢ëç¨á«ï¥¬ ª®®à¤¨ âë ¤«ï ¨ª®ª¨ |
- | |
59 | ror ecx,16 |
- | |
60 | and ebx,0xffff |
- | |
61 | and ecx,0xffff |
- | |
62 | inc ebx |
- | |
63 | inc ecx |
- | |
64 | stdcall draw_icon, 17,ebx,ecx ;17 - save |
- | |
65 | - | ||
66 | mov edi,edit2 |
- | |
67 | .cycle: |
- | |
68 | stdcall [edit_box_draw], edi ;à¨á㥬 ¯®«ï ᮠ᢮©á⢠¬¨ ®¡ê¥ªâ |
- | |
69 | add edi,ed_struc_size |
- | |
70 | cmp edi,prop_wnd_edits_end |
- | |
71 | jl .cycle |
- | |
72 | - | ||
73 | popad |
- | |
74 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
- | |
75 | - | ||
76 | xor ebx,ebx ;®¬¥à ¯®«ï |
- | |
77 | .draw_column: |
- | |
78 | mov eax,ebx |
- | |
79 | imul eax,[recMain.height] |
- | |
80 | add eax,[recMain.top] |
- | |
81 | add eax,[wndObjI.top] |
- | |
82 | stdcall draw_icon_obj,[edx],ebx,eax |
- | |
83 | - | ||
84 | inc ebx |
- | |
85 | cmp ebx,MAX_OPT_FIELDS |
- | |
86 | jl .draw_column |
- | |
87 | .exit_fun: |
- | |
88 | ret |
- | |
89 | 1 | ;¯®¤¨¬ ¥¬ ®¡ê¥ªâ ¢¢¥àå ¯® ᯨáªã |
|
90 | ;¯®¤¨¬ ¥¬ ®¡ê¥ªâ ¢¢¥àå ¯® ᯨáªã |
2 | align 4 |
91 | align 4 |
3 | but_obj_move_up: |
92 | but_obj_move_up: |
4 | stdcall [tl_node_move_up], tree2 |
93 | stdcall [tl_node_move_up], tree2 |
5 | ret |
94 | ret |
6 | |
95 | 7 | ;®¯ã᪠¥¬ ®¡ê¥ªâ ¢¨§ ¯® ᯨáªã |
|
96 | ;®¯ã᪠¥¬ ®¡ê¥ªâ ¢¨§ ¯® ᯨáªã |
8 | align 4 |
97 | align 4 |
9 | but_obj_move_down: |
98 | but_obj_move_down: |
10 | stdcall [tl_node_move_down], tree2 |
99 | stdcall [tl_node_move_down], tree2 |
11 | ret |
100 | ret |
12 | |
101 | 13 | ;ª®¯¨à㥬 ®¡ê¥ªâ |
|
102 | ;ª®¯¨à㥬 ®¡ê¥ªâ |
14 | align 4 |
103 | align 4 |
15 | but_obj_copy: |
104 | but_obj_copy: |
16 | push ecx esi edi |
105 | push ecx esi edi |
17 | stdcall [tl_node_get_data], tree2 |
106 | stdcall [tl_node_get_data], tree2 |
18 | pop esi |
107 | pop esi |
19 | mov edi,[tree2.data_info] ;¤ ë¥ 0-£® 㧫 , ¨á¯®«ì§ã¥¬ ¤«ï ª®¯¨à®¢ ¨ï |
108 | mov edi,[tree2.data_info] ;¤ ë¥ 0-£® 㧫 , ¨á¯®«ì§ã¥¬ ¤«ï ª®¯¨à®¢ ¨ï |
20 | xor ecx,ecx |
109 | xor ecx,ecx |
21 | mov cx,word[tree2.info_size] |
110 | mov cx,word[tree2.info_size] |
22 | cld |
111 | cld |
23 | rep movsb |
112 | rep movsb |
24 | pop edi esi ecx |
113 | pop edi esi ecx |
25 | ret |
114 | ret |
26 | |
115 | 27 | ;¢áâ ¢«ï¥¬ ®¡ê¥ªâ |
|
116 | ;¢áâ ¢«ï¥¬ ®¡ê¥ªâ |
28 | align 4 |
117 | align 4 |
29 | but_obj_paste: |
118 | but_obj_paste: |
30 | push eax ebx ecx edi |
119 | push eax ebx ecx edi |
31 | mov eax,[tree2.data_info] ;¤ ë¥ 0-£® 㧫 , ¨á¯®«ì§ã¥¬ ¤«ï ª®¯¨à®¢ ¨ï |
120 | mov eax,[tree2.data_info] ;¤ ë¥ 0-£® 㧫 , ¨á¯®«ì§ã¥¬ ¤«ï ª®¯¨à®¢ ¨ï |
32 | mov bl,byte[eax] |
121 | mov bl,byte[eax] |
33 | call find_obj_in_opt |
122 | call find_obj_in_opt |
34 | xor ecx,ecx |
123 | xor ecx,ecx |
35 | mov cx,word[edi+obj_opt.img-obj_opt] ;cx - ¨¤¥ªá £« ¢®© ¨ª®ª¨ ¤®¡ ¢«ï¥¬®£® ®¡ê¥ªâ |
124 | mov cx,word[edi+obj_opt.img-obj_opt] ;cx - ¨¤¥ªá £« ¢®© ¨ª®ª¨ ¤®¡ ¢«ï¥¬®£® ®¡ê¥ªâ |
36 | shl ecx,16 |
125 | shl ecx,16 |
37 | stdcall [tl_node_add], eax, ecx, tree2 ;¤®¡ ¢«ï¥¬ ®¡ê¥ªâ |
126 | stdcall [tl_node_add], eax, ecx, tree2 ;¤®¡ ¢«ï¥¬ ®¡ê¥ªâ |
38 | stdcall [tl_draw], tree2 |
127 | stdcall [tl_draw], tree2 |
39 | pop edi ecx ebx eax |
128 | pop edi ecx ebx eax |
40 | ret |
129 | ret |
41 | |
130 | 42 | ;®¡®¢«¥¨¥ ®¡ê¥ªâ®¢ ¢ tree2, ¯® § ç¥¨ï¬ â¥ªá⮢ëå ¯®«¥© |
|
131 | ;®¡®¢«¥¨¥ ®¡ê¥ªâ®¢ ¢ tree2, ¯® § ç¥¨ï¬ â¥ªá⮢ëå ¯®«¥© |
43 | ;äãªæ¨ï ®¡à â ï ª ¤ ®© on_file_object_select |
132 | ;äãªæ¨ï ®¡à â ï ª ¤ ®© on_file_object_select |
44 | align 4 |
133 | align 4 |
45 | but_element_change: |
134 | but_element_change: |
46 | ;foc_obj - 㪠§ â¥«ì ¯®á«¥¤¨© ¢ë¡à ë© ã§¥« ¢ tree2 |
135 | ;foc_obj - 㪠§ â¥«ì ¯®á«¥¤¨© ¢ë¡à ë© ã§¥« ¢ tree2 |
47 | cmp dword[foc_obj],0 |
136 | cmp dword[foc_obj],0 |
48 | je .err_obj |
137 | je @f |
49 | pushad |
138 | pushad |
50 | ;ãáâ ®¢ª ⥪á⮢ëå ᢮©á⢠|
- | 51 | xor ebx,ebx |
|
139 | xor ebx,ebx |
52 | mov edi,edit2 |
140 | mov edi,edit2 |
53 | @@: |
141 | .cycle: |
54 | call get_obj_win_param |
142 | call get_obj_win_param |
55 | inc ebx |
143 | inc ebx |
56 | add edi,ed_struc_size |
144 | add edi,ed_struc_size |
57 | cmp edi,prop_wnd_edits_end |
145 | cmp edi,prop_wnd_edits_end |
58 | jl @b |
- | 59 | ||
- | 60 | ;ãáâ ®¢ª áá뫪¨ ®¡ê¥ªâ ⨯ |
|
- | 61 | mov edx,dword[foc_obj] |
|
- | 62 | mov dword[edx+u_object.typid-u_object],0 ; á«ãç © ¥á«¨ ¨ç¥£® ¥ ¢ë¡à ® |
|
- | 63 | stdcall [tl_node_get_data],tree3 |
|
- | 64 | pop eax |
|
- | 65 | cmp eax,0 |
|
- | 66 | je @f |
|
- | 67 | mov eax,dword[eax] ;¡¥à¥¬ ¯®à浪®¢ë© ®¬¥à (¢ ¯ ¬ïâ¨) ¢ë¡à ®£® ®¡ê¥ªâ |
|
- | 68 | mov dword[edx+u_object.typid-u_object],eax |
|
- | 69 | @@: |
|
- | 70 | ||
- | 71 | ;ãáâ ®¢ª «®£¨ç¥áª¨å ᢮©á⢠|
|
- | 72 | mov edi,ch1.flags |
|
- | 73 | mov eax,1 |
|
- | 74 | xor ebx,ebx |
|
- | 75 | @@: |
|
- | 76 | bt dword[edi],1 ;¯®ç¥¬ã ®® âãâ ¥ à ¡®â ¥â ï ¥ § î ... ??? |
|
- | 77 | jnc .opt_no_sel |
|
- | 78 | or ebx,eax ; ª®¯«¥¨¥ ®â¬¥ç¥ëå ®¯æ¨© |
|
- | 79 | .opt_no_sel: |
|
- | 80 | shl eax,1 |
|
146 | jl .cycle |
81 | add edi,ch_struc_size |
- | 82 | cmp edi,check_boxes_end |
|
- | 83 | jl @b |
|
- | 84 | mov dword[edx+u_object.modif-u_object],ebx |
|
- | 85 | popad |
|
147 | popad |
86 | .err_obj: |
148 | @@: |
87 | call draw_constructor ;®¡®¢«ï¥¬ ®ª® ª®áâàãªâ®à |
149 | call draw_constructor ;®¡®¢«ï¥¬ ®ª® ª®áâàãªâ®à |
88 | ;call draw_window |
150 | call draw_window |
89 | ret |
151 | ret |
90 | |
152 | 91 | ;input: |
|
153 | ;input: |
92 | ; ebx - property column |
154 | ; ebx - property column |
93 | ; edi - pointer to property editbox |
155 | ; edi - pointer to property editbox |
94 | align 4 |
156 | align 4 |
95 | get_obj_win_param: |
157 | get_obj_win_param: |
96 | pushad |
158 | pushad |
97 | mov esi,ed_text |
159 | mov esi,ed_text |
98 | stdcall get_obj_text_col, [foc_obj], ebx ;edx - ᬥ饨¥ ¤«ï ⥪áâ |
160 | stdcall get_obj_text_col, [foc_obj], ebx ;edx - ᬥ饨¥ ¤«ï ⥪áâ |
99 | stdcall get_obj_text_len_col, [foc_obj], ebx ;eax - ¤«¨ ¯®«ï |
161 | stdcall get_obj_text_len_col, [foc_obj], ebx ;eax - ¤«¨ ¯®«ï |
100 | cld |
162 | cld |
101 | mov edi,edx |
163 | mov edi,edx |
102 | mov ecx,eax |
164 | mov ecx,eax |
103 | rep movsb |
165 | rep movsb |
104 | popad |
166 | popad |
105 | ret |
167 | ret |
106 | |
168 | 107 | ;input: |
|
169 | ;input: |
108 | ; obj - pointer to object |
170 | ; obj - pointer to object |
109 | ; ind - column index |
171 | ; ind - column index |
110 | ;output: |
172 | ;output: |
111 | ; edx + offset |
173 | ; edx + offset |
112 | ; edx = 0 if not text |
174 | ; edx = 0 if not text |
113 | align 4 |
175 | align 4 |
114 | proc get_obj_text_col, obj:dword, ind:dword |
176 | proc get_obj_text_col, obj:dword, ind:dword |
115 | mov edx,dword[obj] |
177 | mov edx,dword[obj] |
116 | inc edx ;goto text |
178 | inc edx ;goto text |
117 | push ebx |
179 | push ebx |
118 | mov ebx,dword[ind] |
180 | mov ebx,dword[ind] |
119 | cmp bx,0 |
181 | cmp bx,0 |
120 | je .end_fun |
182 | je .end_fun |
121 | |
183 | 122 | shl ebx,8 ;¢ bh ¯®¯ ¤ ¥â ®¬¥à ¨áª®¬®© ª®«®ª¨ |
|
184 | shl ebx,8 ;¢ bh ¯®¯ ¤ ¥â ®¬¥à ¨áª®¬®© ª®«®ª¨ |
123 | mov bl,byte[edx-1] ;¢ bl ¯®¯ ¤ ¥â ª®¤ ®¡ê¥ªâ |
185 | mov bl,byte[edx-1] ;¢ bl ¯®¯ ¤ ¥â ª®¤ ®¡ê¥ªâ |
124 | |
186 | 125 | push ecx edi |
|
187 | push ecx edi |
126 | call find_obj_in_opt ;¨é¥¬ áâàãªâãàã á ®¯æ¨ï¬¨ ®¡ê¥ªâ |
188 | call find_obj_in_opt ;¨é¥¬ áâàãªâãàã á ®¯æ¨ï¬¨ ®¡ê¥ªâ |
127 | |
189 | 128 | add edi,obj_opt.Col-obj_opt |
|
190 | add edi,obj_opt.Col-obj_opt |
129 | dec bh |
191 | dec bh |
130 | and ebx,0xff00 |
192 | and ebx,0xff00 |
131 | shr ebx,7 ;ᤢ¨£ ¥¬ 7, â.ª. 㦮 § 票¥ bh 㬮¦¥®¥ 2 |
193 | shr ebx,7 ;ᤢ¨£ ¥¬ 7, â.ª. 㦮 § 票¥ bh 㬮¦¥®¥ 2 |
132 | add edi,ebx ;+ ¡ë¢è¥¥ bh*2 |
194 | add edi,ebx ;+ ¡ë¢è¥¥ bh*2 |
133 | xor ecx,ecx |
195 | xor ecx,ecx |
134 | mov cx,word[edi] ;ecx - ᤨ£ ¤«ï ¨áª®¬®£® ¯®«ï |
196 | mov cx,word[edi] ;ecx - ᤨ£ ¤«ï ¨áª®¬®£® ¯®«ï |
135 | add edx,ecx |
197 | add edx,ecx |
136 | |
198 | 137 | cmp cx,0 |
|
199 | cmp cx,0 |
138 | jg @f |
200 | jg @f |
139 | mov edx,0 ;not text |
201 | mov edx,0 ;not text |
140 | @@: |
202 | @@: |
141 | cmp cx,MAX_LEN_OBJ_TXT |
203 | cmp cx,MAX_LEN_OBJ_TXT |
142 | jl @f |
204 | jl @f |
143 | mov edx,0 ;not text |
205 | mov edx,0 ;not text |
144 | @@: |
206 | @@: |
145 | |
207 | 146 | pop edi ecx |
|
208 | pop edi ecx |
147 | .end_fun: |
209 | .end_fun: |
148 | pop ebx |
210 | pop ebx |
149 | ret |
211 | ret |
150 | endp |
212 | endp |
151 | |
213 | 152 | ;input: |
|
214 | ;input: |
153 | ; obj - 㪠§ â¥«ì ®¡ê¥ªâ |
215 | ; obj - 㪠§ â¥«ì ®¡ê¥ªâ |
154 | ; ind - ®¬¥à ¯®«ï ¢ãâਠ®¡ê¥ªâ |
216 | ; ind - ®¬¥à ¯®«ï ¢ãâਠ®¡ê¥ªâ |
155 | ;output: |
217 | ;output: |
156 | ; eax - ¤«¨ ⥪á⮢®£® ¯®«ï ¢ãâਠ®¡ê¥ªâ |
218 | ; eax - ¤«¨ ⥪á⮢®£® ¯®«ï ¢ãâਠ®¡ê¥ªâ |
157 | align 4 |
219 | align 4 |
158 | proc get_obj_text_len_col, obj:dword, ind:dword |
220 | proc get_obj_text_len_col, obj:dword, ind:dword |
159 | xor eax,eax |
221 | xor eax,eax |
160 | push ebx |
222 | push ebx |
161 | mov ebx,dword[ind] |
223 | mov ebx,dword[ind] |
162 | shl ebx,8 ;¢ bh ¯®¯ ¤ ¥â ®¬¥à ¨áª®¬®© ª®«®ª¨ |
224 | shl ebx,8 ;¢ bh ¯®¯ ¤ ¥â ®¬¥à ¨áª®¬®© ª®«®ª¨ |
163 | mov eax,dword[obj] |
225 | mov eax,dword[obj] |
164 | mov bl,byte[eax] ;¢ bl ¯®¯ ¤ ¥â ª®¤ ®¡ê¥ªâ |
226 | mov bl,byte[eax] ;¢ bl ¯®¯ ¤ ¥â ª®¤ ®¡ê¥ªâ |
165 | xor eax,eax |
227 | xor eax,eax |
166 | |
228 | 167 | push edi |
|
229 | push edi |
168 | call find_obj_in_opt ;¨é¥¬ áâàãªâãàã á ®¯æ¨ï¬¨ ®¡ê¥ªâ |
230 | call find_obj_in_opt ;¨é¥¬ áâàãªâãàã á ®¯æ¨ï¬¨ ®¡ê¥ªâ |
169 | |
231 | 170 | add edi,obj_opt.Col-obj_opt |
|
232 | add edi,obj_opt.Col-obj_opt |
171 | and ebx,0xff00 |
233 | and ebx,0xff00 |
172 | shr ebx,7 ;ᤢ¨£ ¥¬ 7, â.ª. 㦮 § 票¥ bh 㬮¦¥®¥ 2 |
234 | shr ebx,7 ;ᤢ¨£ ¥¬ 7, â.ª. 㦮 § 票¥ bh 㬮¦¥®¥ 2 |
173 | add edi,ebx ;+ ¡ë¢è¥¥ bh*2 |
235 | add edi,ebx ;+ ¡ë¢è¥¥ bh*2 |
174 | |
236 | 175 | mov ax,word[edi] ;eax - ᤨ£ ¤«ï á«¥¤ã饣® ¯®«ï |
|
237 | mov ax,word[edi] ;eax - ᤨ£ ¤«ï á«¥¤ã饣® ¯®«ï |
176 | cmp ax,0 |
238 | cmp ax,0 |
177 | jg @f |
239 | jg @f |
178 | mov eax,MAX_LEN_OBJ_TXT ;¯®á«¥¤¨¥ ¯®«ï ¤«ï 㤮¡á⢠ª®¤¨àãîâáï 0, ¥ MAX_LEN_OBJ_TXT, ¨á¯à ¢«ï¥¬ á¨âã æ¨î |
240 | mov eax,MAX_LEN_OBJ_TXT ;¯®á«¥¤¨¥ ¯®«ï ¤«ï 㤮¡á⢠ª®¤¨àãîâáï 0, ¥ MAX_LEN_OBJ_TXT, ¨á¯à ¢«ï¥¬ á¨âã æ¨î |
179 | @@: |
241 | @@: |
180 | cmp dword[ind],0 |
242 | cmp dword[ind],0 |
181 | je .end_fun ;¤«ï ¯¥à¢®£® ¯®«ï ᤨ£ = 0, ¯®â®¬ã ¢ áâàãªâãॠ® ¥ åà ¨âáï, â.ª. ¨§¢¥á⥠§ à ¥¥ |
243 | je .end_fun ;¤«ï ¯¥à¢®£® ¯®«ï ᤨ£ = 0, ¯®â®¬ã ¢ áâàãªâãॠ® ¥ åà ¨âáï, â.ª. ¨§¢¥á⥠§ à ¥¥ |
182 | sub ax,word[edi-2] ;®â¨¬ ¥¬ ᤨ£ ¤«ï ¨áª®¬®£® ¯®«ï, ¯®«ãç ¥¬ ¤«¨ã ¯®«ï |
244 | sub ax,word[edi-2] ;®â¨¬ ¥¬ ᤨ£ ¤«ï ¨áª®¬®£® ¯®«ï, ¯®«ãç ¥¬ ¤«¨ã ¯®«ï |
183 | |
245 | 184 | cmp word[edi-2],0 |
|
246 | cmp word[edi-2],0 |
185 | jg @f |
247 | jg @f |
186 | mov eax,0 ;¯®«¥ ¯ãá⮥, ¥ ¨á¯®«ì§ã¥âáï |
248 | mov eax,0 ;¯®«¥ ¯ãá⮥, ¥ ¨á¯®«ì§ã¥âáï |
187 | @@: |
249 | @@: |
188 | cmp ax,MAX_LEN_OBJ_TXT |
250 | cmp ax,MAX_LEN_OBJ_TXT |
189 | jl @f |
251 | jl @f |
190 | mov eax,0 ;not text |
252 | mov eax,0 ;not text |
191 | @@: |
253 | @@: |
192 | |
254 | 193 | pop edi |
|
255 | pop edi |
194 | .end_fun: |
256 | .end_fun: |
195 | pop ebx |
257 | pop ebx |
196 | ret |
258 | ret |
197 | endp |
259 | endp |
198 | |
260 | 199 | align 4 |
|
261 | align 4 |
200 | proc draw_obj_icon, o_type:dword,n_col:dword, coord_y:dword |
262 | proc draw_icon_obj, o_type:dword,n_col:dword, coord_y:dword |
201 | pushad |
263 | pushad |
202 | xor ebx,ebx |
264 | xor ebx,ebx |
203 | mov bl,byte[o_type] |
265 | mov bl,byte[o_type] |
204 | call find_obj_in_opt |
266 | call find_obj_in_opt |
205 | |
267 | 206 | add edi,obj_opt.img-obj_opt ;get index (+0) |
|
268 | add edi,obj_opt.img-obj_opt ;get index (+0) |
207 | mov ebx,[n_col] |
269 | mov ebx,[n_col] |
208 | shl ebx,1 |
270 | shl ebx,1 |
209 | add edi,ebx ;move index (+bh) |
271 | add edi,ebx ;move index (+bh) |
210 | xor ecx,ecx |
272 | xor ecx,ecx |
211 | mov cx,[edi] |
273 | mov cx,[edi] |
212 | |
274 | 213 | cmp cx,0 |
|
275 | cmp cx,0 |
214 | jge @f |
276 | jge @f |
215 | jmp .end_fun ;error icon index |
277 | jmp .end_fun ;error icon index |
216 | @@: |
278 | @@: |
217 | |
279 | 218 | mov ebx,bmp_icon |
|
280 | mov ebx,bmp_icon |
219 | imul ecx,0x300 |
281 | imul ecx,0x300 |
220 | add ebx,ecx |
282 | add ebx,ecx |
221 | |
283 | 222 | mov eax,7 |
|
284 | mov eax,7 |
223 | mov ecx,0x100010 ;ecx - size:16*16 |
285 | mov ecx,0x100010 ;ecx - size:16*16 |
224 | mov edx,3 ;®âáâ㯠®â «¥¢®£® ªà ï à ¬ª¨ ¤® ¨ª®ª¨ |
286 | mov edx,[wndObjI.left] |
- | |
287 | add edx,3 ;®âáâ㯠®â «¥¢®£® ªà ï à ¬ª¨ ¤® ¨ª®ª¨ |
225 | shl edx,16 |
288 | shl edx,16 |
226 | add edx,[coord_y] |
289 | add edx,[coord_y] |
227 | int 0x40 |
290 | int 0x40 |
228 | .end_fun: |
291 | .end_fun: |
229 | popad |
292 | popad |
230 | ret |
- | 231 | endp |
|
- | 232 | ||
- | 233 | ;¢ë¢®¤ ⥪áâ á ¯®¤¯¨áìî |
|
- | 234 | align 4 |
|
- | 235 | proc draw_obj_caption, o_type:dword,n_col:dword, coord_y:dword |
|
- | 236 | pushad |
|
- | 237 | stdcall get_obj_text_len_col, [foc_obj], [n_col] ;eax - ¤«¨ ¯®«ï |
|
- | 238 | cmp eax,1 |
|
- | 239 | jl .no_draw |
|
- | 240 | ||
- | 241 | xor ebx,ebx |
|
- | 242 | mov bl,byte[o_type] |
|
- | 243 | call find_obj_in_opt |
|
- | 244 | ||
- | 245 | mov edx,edi |
|
- | 246 | add edx,obj_opt.caption-obj_opt |
|
- | 247 | ||
- | 248 | mov eax,[n_col] |
|
- | 249 | mov ebx,150 |
|
- | 250 | shl ebx,16 |
|
- | 251 | add ebx,dword[coord_y] |
|
- | 252 | add ebx,3 |
|
- | 253 | mov ecx,0 ;text color |
|
- | 254 | ||
- | 255 | mov esi,edx |
|
- | 256 | .beg_found: |
|
- | 257 | cmp byte[esi],0 |
|
- | 258 | je .end_found |
|
- | 259 | cmp byte[esi],'*' |
|
- | 260 | je @f |
|
- | 261 | inc esi |
|
- | 262 | jmp .beg_found |
|
- | 263 | @@: |
|
- | 264 | cmp eax,0 |
|
- | 265 | je .end_found |
|
- | 266 | dec eax |
|
- | 267 | inc esi |
|
- | 268 | mov edx,esi ;¯¥à¥ª«îç ¥¬ ç «® áâப¨ á«¥¤. ¯®¤¯¨áì |
|
- | 269 | jmp .beg_found |
|
- | 270 | .end_found: |
|
- | 271 | cmp esi,edx |
|
- | 272 | jle .no_draw |
|
- | 273 | sub esi,edx ;esi = text len |
|
- | 274 | mov eax,4 |
|
- | 275 | int 0x40 |
|
- | 276 | .no_draw: |
|
- | 277 | popad |
|
- | 278 | ret |
|
293 | ret |
279 | endp |
294 | endp |
280 | |
295 | 281 | align 4 |
|
296 | align 4 |
282 | proc draw_icon, ind:dword,coord_x:dword,coord_y:dword |
297 | proc draw_icon, ind:dword,coord_x:dword,coord_y:dword |
283 | pushad |
298 | pushad |
284 | mov ecx,[ind] |
299 | mov ecx,[ind] |
285 | cmp ecx,0 |
300 | cmp ecx,0 |
286 | jl .end_fun |
301 | jl .end_fun |
287 | mov ebx,bmp_icon |
302 | mov ebx,bmp_icon |
288 | imul ecx,0x300 |
303 | imul ecx,0x300 |
289 | add ebx,ecx |
304 | add ebx,ecx |
290 | |
305 | 291 | mov eax,7 |
|
306 | mov eax,7 |
292 | mov ecx,0x100010 ;ecx - size:16*16 |
307 | mov ecx,0x100010 ;ecx - size:16*16 |
293 | mov edx,[coord_x] |
308 | mov edx,[coord_x] |
294 | shl edx,16 |
309 | shl edx,16 |
295 | add edx,[coord_y] |
310 | add edx,[coord_y] |
296 | int 0x40 |
311 | int 0x40 |
297 | .end_fun: |
312 | .end_fun: |
298 | popad |
313 | popad |
299 | ret |
314 | ret |
300 | endp |
315 | endp |
301 | |
316 | 302 | ;input |
|
317 | ;input |
303 | ; bl = cod object |
318 | ; bl = cod object |
304 | ;output: |
319 | ;output: |
305 | ; edi = pointer to option struct |
320 | ; edi = pointer to option struct |
306 | align 4 |
321 | align 4 |
307 | find_obj_in_opt: |
322 | find_obj_in_opt: |
308 | push ecx |
323 | push ecx |
309 | xor ecx,ecx ;find 'bl' in options |
324 | xor ecx,ecx ;find 'bl' in options |
310 | mov edi,obj_opt |
325 | mov edi,obj_opt |
311 | @@: |
326 | @@: |
312 | cmp bl,[edi] ;find |
327 | cmp bl,[edi] ;find |
313 | je @f |
328 | je @f |
314 | inc ecx |
329 | inc ecx |
315 | cmp ecx,MAX_OBJ_TYPES |
330 | cmp ecx,MAX_OBJ_TYPES |
316 | je @f ;not find |
331 | je @f ;not find |
317 | add edi,sizeof.ObjOpt |
332 | add edi,sizeof.ObjOpt |
318 | jmp @b |
333 | jmp @b |
319 | @@: |
334 | @@: |
320 | pop ecx |
335 | pop ecx |
321 | ret |
336 | ret |
322 | |
337 | 323 | ||
338 | 324 | obj_find_last dd 0 ;㪠§ â¥«ì ¯®á«¥¤¨© ã¤ ç® ©¤¥ë© ®¡ê¥ªâ, |
|
339 | obj_find_last dd 0 ;㪠§ â¥«ì ¯®á«¥¤¨© ã¤ ç® ©¤¥ë© ®¡ê¥ªâ, |
325 | ;㦥 ¤«ï ãáª®à¥¨ï ¯®á«¥¤ã饣® ¯®¨áª |
340 | ;㦥 ¤«ï ãáª®à¥¨ï ¯®á«¥¤ã饣® ¯®¨áª |
326 | |
341 | 327 | ;¢ë室: |
|
342 | ;¢ë室: |
328 | ;eax - 㪠§ ⥫ì áâàãªâãàã ©¤¥®£® ®¡ê¥ªâ |
343 | ;eax - 㪠§ ⥫ì áâàãªâãàã ©¤¥®£® ®¡ê¥ªâ |
329 | align 4 |
344 | align 4 |
330 | proc find_obj_in_file, o_type:dword |
345 | proc find_obj_in_file, o_type:dword |
331 | push ebx esi |
346 | push ebx esi |
332 | mov ebx,[o_type] |
347 | mov ebx,[o_type] |
333 | stdcall dword[tl_node_poi_get_info], 0,tree2 |
348 | stdcall dword[tl_node_poi_get_info], 0,tree2 |
334 | pop esi |
349 | pop esi |
335 | |
350 | 336 | @@: |
|
351 | @@: |
337 | cmp esi,0 |
352 | cmp esi,0 |
338 | je .find_no |
353 | je .find_no |
339 | |
354 | 340 | stdcall dword[tl_node_poi_get_data], esi,tree2 |
|
355 | stdcall dword[tl_node_poi_get_data], esi,tree2 |
341 | pop eax ;¯®«ãç ¥¬ ¤ ë¥ ã§« |
356 | pop eax ;¯®«ãç ¥¬ ¤ ë¥ ã§« |
342 | cmp eax,0 |
357 | cmp eax,0 |
343 | je .find_no |
358 | je .find_no |
344 | |
359 | 345 | cmp byte[eax],bl ;ᬮâਬ ®¯¨á «¨ ¨áª®¬ë© ®¡ê¥ªâ ¢ 㧫¥ |
|
360 | cmp byte[eax],bl ;ᬮâਬ ®¯¨á «¨ ¨áª®¬ë© ®¡ê¥ªâ ¢ 㧫¥ |
346 | je .find_yes |
361 | je .find_yes |
347 | |
362 | 348 | stdcall dword[tl_node_poi_get_next_info], esi,tree2 |
|
363 | stdcall dword[tl_node_poi_get_next_info], esi,tree2 |
349 | pop esi ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã |
364 | pop esi ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã |
350 | |
365 | 351 | jmp @b |
|
366 | jmp @b |
352 | |
367 | 353 | .find_yes: |
|
368 | .find_yes: |
354 | mov dword[obj_find_last],esi |
369 | mov dword[obj_find_last],esi |
355 | jmp @f |
370 | jmp @f |
356 | .find_no: |
371 | .find_no: |
357 | mov dword[obj_find_last],0 |
372 | mov dword[obj_find_last],0 |
358 | xor eax,eax |
373 | xor eax,eax |
359 | @@: |
374 | @@: |
360 | pop esi ebx |
375 | pop esi ebx |
361 | ret |
376 | ret |
362 | endp |
377 | endp |
363 | |
378 | 364 | ;¢ë室: |
|
379 | ;¢ë室: |
365 | ;eax - 㪠§ ⥫ì áâàãªâãàã ©¤¥®£® ®¡ê¥ªâ |
380 | ;eax - 㪠§ ⥫ì áâàãªâãàã ©¤¥®£® ®¡ê¥ªâ |
366 | align 4 |
381 | align 4 |
367 | proc find_obj_in_file_next, o_type:dword |
382 | proc find_obj_in_file_next, o_type:dword |
368 | push ebx esi |
383 | push ebx esi |
369 | cmp dword[obj_find_last],0 |
384 | cmp dword[obj_find_last],0 |
370 | je .find_no |
385 | je .find_no |
371 | |
386 | 372 | mov ebx,[o_type] |
|
387 | mov ebx,[o_type] |
373 | |
388 | 374 | stdcall dword[tl_node_poi_get_next_info], dword[obj_find_last],tree2 |
|
389 | stdcall dword[tl_node_poi_get_next_info], dword[obj_find_last],tree2 |
375 | pop esi ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã |
390 | pop esi ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã |
376 | |
391 | 377 | @@: |
|
392 | @@: |
378 | cmp esi,0 |
393 | cmp esi,0 |
379 | je .find_no |
394 | je .find_no |
380 | |
395 | 381 | stdcall dword[tl_node_poi_get_data], esi,tree2 |
|
396 | stdcall dword[tl_node_poi_get_data], esi,tree2 |
382 | pop eax ;¯®«ãç ¥¬ ¤ ë¥ ã§« |
397 | pop eax ;¯®«ãç ¥¬ ¤ ë¥ ã§« |
383 | cmp eax,0 |
398 | cmp eax,0 |
384 | je .find_no |
399 | je .find_no |
385 | |
400 | 386 | cmp byte[eax],bl ;ᬮâਬ ®¯¨á «¨ ¨áª®¬ë© ®¡ê¥ªâ ¢ 㧫¥ |
|
401 | cmp byte[eax],bl ;ᬮâਬ ®¯¨á «¨ ¨áª®¬ë© ®¡ê¥ªâ ¢ 㧫¥ |
387 | je .find_yes |
402 | je .find_yes |
388 | |
403 | 389 | stdcall dword[tl_node_poi_get_next_info], esi, tree2 |
|
404 | stdcall dword[tl_node_poi_get_next_info], esi, tree2 |
390 | pop esi ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã |
405 | pop esi ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã |
391 | |
406 | 392 | jmp @b |
|
407 | jmp @b |
393 | |
408 | 394 | .find_yes: |
|
409 | .find_yes: |
395 | mov dword[obj_find_last],esi |
410 | mov dword[obj_find_last],esi |
396 | jmp @f |
411 | jmp @f |
397 | .find_no: |
412 | .find_no: |
398 | mov dword[obj_find_last],0 |
413 | mov dword[obj_find_last],0 |
399 | xor eax,eax |
414 | xor eax,eax |
400 | @@: |
415 | @@: |
401 | pop esi ebx |
416 | pop esi ebx |
402 | ret |
417 | ret |
403 | endp |
418 | endp |
404 | |
419 | 405 | align 4 |
|
420 | align 4 |
406 | but_show_constructor: |
421 | but_show_constructor: |
407 | mov byte[show_mode],0 |
422 | mov byte[show_mode],0 |
408 | stdcall [buf2d_draw], buf_fon |
423 | stdcall [buf2d_draw], buf_fon |
409 | ret |
424 | ret |
410 | |
425 | 411 | align 4 |
|
426 | align 4 |
412 | but_show_code: |
427 | but_show_code: |
413 | mov byte[show_mode],1 |
428 | mov byte[show_mode],1 |
414 | stdcall [ted_draw], tedit0 |
429 | stdcall [ted_draw], tedit0 |
415 | ret |
430 | ret |
416 | |
431 | 417 | ;input: |
|
432 | ;input: |
418 | ; buf - 㪠§ ⥫ì áâபã, ç¨á«® ¤®«¦® ¡ëâì ¢ 10 ¨«¨ 16 à¨ç®¬ ¢¨¤¥ |
433 | ; buf - 㪠§ ⥫ì áâபã, ç¨á«® ¤®«¦® ¡ëâì ¢ 10 ¨«¨ 16 à¨ç®¬ ¢¨¤¥ |
419 | ;output: |
434 | ;output: |
420 | ; eax - ç¨á«® |
435 | ; eax - ç¨á«® |
421 | align 4 |
436 | align 4 |
422 | proc conv_str_to_int, buf:dword |
437 | proc conv_str_to_int, buf:dword |
423 | xor eax,eax |
438 | xor eax,eax |
424 | push ebx esi |
439 | push ebx esi |
425 | xor ebx,ebx |
440 | xor ebx,ebx |
426 | mov esi,[buf] |
441 | mov esi,[buf] |
427 | cmp word[esi],'0x' |
442 | cmp word[esi],'0x' |
428 | je .load_digit_16 |
443 | je .load_digit_16 |
429 | |
444 | 430 | .load_digit_10: ;áç¨âë¢ ¨¥ 10-â¨çëå æ¨äà |
|
445 | .load_digit_10: ;áç¨âë¢ ¨¥ 10-â¨çëå æ¨äà |
431 | mov bl,byte[esi] |
446 | mov bl,byte[esi] |
432 | cmp bl,'0' |
447 | cmp bl,'0' |
433 | jl @f |
448 | jl @f |
434 | cmp bl,'9' |
449 | cmp bl,'9' |
435 | jg @f |
450 | jg @f |
436 | sub bl,'0' |
451 | sub bl,'0' |
437 | imul eax,10 |
452 | imul eax,10 |
438 | add eax,ebx |
453 | add eax,ebx |
439 | inc esi |
454 | inc esi |
440 | jmp .load_digit_10 |
455 | jmp .load_digit_10 |
441 | jmp @f |
456 | jmp @f |
442 | |
457 | 443 | .load_digit_16: ;áç¨âë¢ ¨¥ 16-à¨çëå æ¨äà |
|
458 | .load_digit_16: ;áç¨âë¢ ¨¥ 16-à¨çëå æ¨äà |
444 | add esi,2 |
459 | add esi,2 |
445 | .cycle_16: |
460 | .cycle_16: |
446 | mov bl,byte[esi] |
461 | mov bl,byte[esi] |
447 | cmp bl,'0' |
462 | cmp bl,'0' |
448 | jl @f |
463 | jl @f |
449 | cmp bl,'f' |
464 | cmp bl,'f' |
450 | jg @f |
465 | jg @f |
451 | cmp bl,'9' |
466 | cmp bl,'9' |
452 | jle .us1 |
467 | jle .us1 |
453 | cmp bl,'A' |
468 | cmp bl,'A' |
454 | jl @f ;®âᥨ¢ ¥¬ ᨬ¢®«ë >'9' ¨ <'A' |
469 | jl @f ;®âᥨ¢ ¥¬ ᨬ¢®«ë >'9' ¨ <'A' |
455 | .us1: ;á®áâ ¢®¥ ãá«®¢¨¥ |
470 | .us1: ;á®áâ ¢®¥ ãá«®¢¨¥ |
456 | cmp bl,'F' |
471 | cmp bl,'F' |
457 | jle .us2 |
472 | jle .us2 |
458 | cmp bl,'a' |
473 | cmp bl,'a' |
459 | jl @f ;®âᥨ¢ ¥¬ ᨬ¢®«ë >'F' ¨ <'a' |
474 | jl @f ;®âᥨ¢ ¥¬ ᨬ¢®«ë >'F' ¨ <'a' |
460 | sub bl,32 ;¯¥à¥¢®¤¨¬ ᨬ¢®«ë ¢ ¢¥à娩 ॣ¨áâà, ¤«ï ã¯à®é¥¨ï ¨å ¯®á«¥¤ã饩 ®¡à ¡®âª¨ |
475 | sub bl,32 ;¯¥à¥¢®¤¨¬ ᨬ¢®«ë ¢ ¢¥à娩 ॣ¨áâà, ¤«ï ã¯à®é¥¨ï ¨å ¯®á«¥¤ã饩 ®¡à ¡®âª¨ |
461 | .us2: ;á®áâ ¢®¥ ãá«®¢¨¥ |
476 | .us2: ;á®áâ ¢®¥ ãá«®¢¨¥ |
462 | sub bl,'0' |
477 | sub bl,'0' |
463 | cmp bl,9 |
478 | cmp bl,9 |
464 | jle .cor1 |
479 | jle .cor1 |
465 | sub bl,7 ;convert 'A' to '10' |
480 | sub bl,7 ;convert 'A' to '10' |
466 | .cor1: |
481 | .cor1: |
467 | shl eax,4 |
482 | shl eax,4 |
468 | add eax,ebx |
483 | add eax,ebx |
469 | inc esi |
484 | inc esi |
470 | jmp .cycle_16 |
485 | jmp .cycle_16 |
471 | @@: |
486 | @@: |
472 | |
487 | 473 | pop esi ebx |
|
488 | pop esi ebx |
474 | ret |
489 | ret |
475 | endp'a' |
490 | endp'a' |
476 | >'A' |
491 | >'A' |
477 | > |
492 | > |
- |