Rev 2487 | Rev 2507 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2487 | Rev 2501 | ||
---|---|---|---|
Line 25... | Line 25... | ||
25 | 25 | ||
26 | pole_index equ dword[edi] |
26 | pole_index equ dword[edi] |
27 | pole_data equ dword[edi +4] ;㪠§ â¥«ì ¯ ¬ïâì á® áâàãªâãà ¬¨ ï祥ª |
27 | pole_data equ dword[edi +4] ;㪠§ â¥«ì ¯ ¬ïâì á® áâàãªâãà ¬¨ ï祥ª |
28 | pole_max_cell equ dword[edi +8] |
28 | pole_max_cell equ dword[edi +8] |
- | 29 | pole_b_sort equ dword[edi+12] ;£à ¨æ ¤«ï á®àâ¨à®¢ ëå ï祥ª |
|
Line 29... | Line 30... | ||
29 | pole_b_sort equ dword[edi+12] ;£à ¨æ ¤«ï á®àâ¨à®¢ ëå ï祥ª |
30 | offs_pole_b_sort equ 12 |
30 | 31 | ||
31 | macro get_cell_offset reg,ind |
32 | macro get_cell_offset reg,ind |
32 | { |
33 | { |
Line 149... | Line 150... | ||
149 | ;㤠«¥¨¥ ï祩ª¨ |
150 | ;㤠«¥¨¥ ï祩ª¨ |
150 | align 4 |
151 | align 4 |
151 | proc pole_cell_delete, pole:dword, x:dword, y:dword |
152 | proc pole_cell_delete, pole:dword, x:dword, y:dword |
152 | pushad |
153 | pushad |
153 | mov edi,dword[pole] |
154 | mov edi,dword[pole] |
- | 155 | mov ebx,edi |
|
- | 156 | add ebx,offs_pole_b_sort |
|
154 | mov esi,pole_index |
157 | mov esi,pole_index |
Line 155... | Line 158... | ||
155 | 158 | ||
156 | mov ecx,[esi] |
159 | mov ecx,[esi] |
157 | cmp ecx,1 |
160 | cmp ecx,1 |
Line 158... | Line 161... | ||
158 | jl .fun_e |
161 | jl .fun_e |
159 | 162 | ||
160 | stdcall pole_cell_find, [pole], [x],[y] |
163 | stdcall pole_cell_find, [pole], [x],[y] |
Line 161... | Line -... | ||
161 | cmp eax,0 |
- | |
162 | je .fun_e ;¥á«¨ ª«¥âª ¥ ¡ë« ᮧ¤ |
- | |
163 | - | ||
164 | cmp pole_b_sort,0 |
- | |
165 | je @f |
164 | cmp eax,0 |
Line 166... | Line 165... | ||
166 | dec pole_b_sort |
165 | je .fun_e ;¥á«¨ ª«¥âª ¥ ¡ë« ᮧ¤ |
167 | @@: |
166 | |
168 | dec dword[esi] |
167 | dec dword[esi] |
169 | 168 | ||
170 | mov edi,esi |
169 | mov edi,esi |
171 | add edi,4 |
170 | add edi,4 |
Line -... | Line 171... | ||
- | 171 | mov edx,ecx |
|
- | 172 | cld |
|
- | 173 | repnz scasd ;¯®¨áª |
|
- | 174 | sub edi,4 |
|
- | 175 | ||
- | 176 | cmp dword[ebx],1 ;[ebx]=pole_b_sort |
|
- | 177 | jl @f |
|
- | 178 | mov eax,edi |
|
- | 179 | sub eax,esi ;esi=pole_index |
|
- | 180 | shr eax,2 |
|
- | 181 | dec eax |
|
172 | mov edx,ecx |
182 | cmp [ebx],eax ;eax - ¯®§¨æ¨ï 㪠§ ⥫ï 㤠«ï¥¬®© ï祩ª¨ |
173 | cld |
183 | jle @f ;¡ë«® jl @f |
174 | repnz scasd ;¯®¨áª |
184 | dec dword[ebx] |
175 | sub edi,4 |
185 | @@: |
176 | 186 | ||
Line 191... | Line 201... | ||
191 | .fun_e: |
201 | .fun_e: |
192 | popad |
202 | popad |
193 | ret |
203 | ret |
194 | endp |
204 | endp |
Line 195... | Line 205... | ||
195 | 205 | ||
196 | if 0 |
206 | if debug |
197 | align 4 |
207 | align 4 |
198 | proc but_test_pole, pole:dword |
208 | proc but_test_pole, pole:dword |
199 | pushad |
209 | pushad |
Line 203... | Line 213... | ||
203 | stdcall pole_paint,edi |
213 | stdcall pole_paint,edi |
204 | mov ebx,5 |
214 | mov ebx,5 |
Line 205... | Line 215... | ||
205 | 215 | ||
206 | mov esi,pole_index |
216 | mov esi,pole_index |
- | 217 | mov ecx,[esi] |
|
- | 218 | ||
207 | mov ecx,[esi] |
219 | mov eax,pole_b_sort |
- | 220 | mov edi,open_file_lif |
|
- | 221 | stdcall convert_int_to_str |
|
- | 222 | stdcall [buf2d_draw_text], buf_0, buf_font,edi,5,ebx,color_s0 ;à¨á㥬 b_sort |
|
Line 208... | Line 223... | ||
208 | mov edi,open_file_lif |
223 | add ebx,18 |
209 | 224 | ||
210 | mov eax,[esi] |
225 | mov eax,[esi] |
211 | add esi,4 |
226 | add esi,4 |
Line 277... | Line 292... | ||
277 | mov ecx,pole_index |
292 | mov ecx,pole_index |
278 | mov ebx,pole_b_sort |
293 | mov ebx,pole_b_sort |
279 | mov edx,ebx |
294 | mov edx,ebx |
280 | shl edx,2 |
295 | shl edx,2 |
281 | add edx,ecx |
296 | add edx,ecx |
282 | inc ebx |
- | |
283 | mov ecx,dword[ecx] |
297 | mov ecx,dword[ecx] |
284 | .cycle_b: ;for(i=pole_b_sort+1;i<=fristC;i++) |
298 | .cycle_b: ;for(i=pole_b_sort+1;i<=fristC;i++) |
- | 299 | inc ebx |
|
- | 300 | cmp ebx,ecx |
|
- | 301 | jg .not_found |
|
285 | add edx,4 |
302 | add edx,4 |
286 | get_cell_offset esi,dword[edx] |
303 | get_cell_offset esi,dword[edx] |
287 | mov eax,dword[x] |
304 | mov eax,dword[x] |
288 | cmp dword[esi],eax ;+0 = .x |
305 | cmp dword[esi],eax ;+0 = .x |
289 | jne .if_e |
306 | jne .if_e |
Line 292... | Line 309... | ||
292 | jne .if_e |
309 | jne .if_e |
293 | ;if(cell[pole_index[i]].x==x && cell[pole_index[i]].y==y){ |
310 | ;if(cell[pole_index[i]].x==x && cell[pole_index[i]].y==y){ |
294 | mov eax,dword[edx] ;fnd=pole_index[i]; |
311 | mov eax,dword[edx] ;fnd=pole_index[i]; |
295 | jmp .cycle_e ;break; |
312 | jmp .cycle_e ;break; |
296 | .if_e: |
313 | .if_e: |
297 | inc ebx |
- | |
298 | cmp ebx,ecx |
314 | jmp .cycle_b |
299 | jle .cycle_b |
315 | .not_found: |
300 | xor eax,eax ;¢®ááâ ¢«¨¢ ¥¬ ã«¥¢®¥ § 票¥ ¥á«¨ ¥ 諨 ï祩ªã (¢ 横«¥ eax ¯®àâ¨âáï ¯à¨ ¯à®¢¥àª¥ ª®®à¤¨ â) |
316 | xor eax,eax ;¢®ááâ ¢«¨¢ ¥¬ ã«¥¢®¥ § 票¥ ¥á«¨ ¥ 諨 ï祩ªã (¢ 横«¥ eax ¯®àâ¨âáï ¯à¨ ¯à®¢¥àª¥ ª®®à¤¨ â) |
301 | .cycle_e: |
317 | .cycle_e: |
302 | pop esi edx ecx ebx |
318 | pop esi edx ecx ebx |
303 | @@: |
319 | @@: |
304 | .fun_e: |
320 | .fun_e: |
Line 361... | Line 377... | ||
361 | jne .cycle_b ;}while(por); |
377 | jne .cycle_b ;}while(por); |
Line 362... | Line 378... | ||
362 | 378 | ||
363 | ret |
379 | ret |
Line -... | Line 380... | ||
- | 380 | endp |
|
- | 381 | ||
- | 382 | ;ᤢ¨£ ¢á¥å ï祥ª (¨ ®¡ê¥ªâ®¢) |
|
- | 383 | align 4 |
|
- | 384 | proc pole_move_all, pole:dword, m_d_x:dword, m_d_y:dword |
|
- | 385 | pushad |
|
- | 386 | mov edi,dword[pole] |
|
- | 387 | mov edx,[m_d_x] |
|
- | 388 | mov esi,[m_d_y] |
|
- | 389 | ||
- | 390 | mov eax,pole_index |
|
- | 391 | cmp dword[eax],0 |
|
- | 392 | je .end_0 ;¥á«¨ ¥â ï祥ª (¯à®¢®¤®¢) â® ¢ë室 |
|
- | 393 | ||
- | 394 | mov ecx,dword[eax] |
|
- | 395 | cld |
|
- | 396 | @@: ;横« ¯® ¢á¥¬ ï祩ª ¬ |
|
- | 397 | add eax,4 |
|
- | 398 | mov ebx,[eax] |
|
- | 399 | imul ebx,sizeof.Cell |
|
- | 400 | add ebx,pole_data |
|
- | 401 | ||
- | 402 | add dword[ebx+offs_cell_x],edx |
|
- | 403 | add dword[ebx+offs_cell_y],esi |
|
- | 404 | loop @b |
|
- | 405 | .end_0: |
|
- | 406 | ||
- | 407 | ;横« ¯® «®£¨ç¥áª¨¬ í«¥¬¥â ¬ ¨ ¯®¤¯¨áï¬ |
|
- | 408 | stdcall dword[tl_node_poi_get_info],0,tree1 |
|
- | 409 | pop eax |
|
- | 410 | @@: |
|
- | 411 | cmp eax,0 |
|
- | 412 | je .end_1 |
|
- | 413 | cmp word[eax],el_icon_elems ;¯®«ã票¥ ç¥à¥§ eax ⨯ ¨ª®ª¨ |
|
- | 414 | je .mov_1 |
|
- | 415 | cmp word[eax],el_icon_captions |
|
- | 416 | je .mov_1 |
|
- | 417 | jmp .end_mov_1 |
|
- | 418 | .mov_1: |
|
- | 419 | stdcall [tl_node_poi_get_data], eax, tree1 |
|
- | 420 | pop ecx |
|
- | 421 | ||
- | 422 | add [ecx],edx ;coord x |
|
- | 423 | add [ecx+4],esi ;coord y |
|
- | 424 | .end_mov_1: |
|
- | 425 | stdcall dword[tl_node_poi_get_next_info],eax,tree1 |
|
- | 426 | pop eax ;¯¥à¥å®¤¨¬ ª á«¥¤ã饬ã 㧫ã |
|
- | 427 | jmp @b |
|
- | 428 | .end_1: |
|
- | 429 | ||
- | 430 | popad |
|
- | 431 | ret |
|
364 | endp |
432 | endp |
365 | 433 | ||
366 | ;output: |
434 | ;output: |
367 | ; dl |
435 | ; dl |
368 | align 4 |
436 | align 4 |
Line 908... | Line 976... | ||
908 | align 4 |
976 | align 4 |
909 | proc pole_draw_pok uses eax ebx ecx edx edi esi, pole:dword |
977 | proc pole_draw_pok uses eax ebx ecx edx edi esi, pole:dword |
910 | ;mov edi,dword[pole] |
978 | ;mov edi,dword[pole] |
Line 911... | Line 979... | ||
911 | 979 | ||
912 | mov eax,4 ;à¨á®¢ ¨¥ ⥪áâ |
980 | mov eax,4 ;à¨á®¢ ¨¥ ⥪áâ |
913 | mov ebx,325*65536+5 |
981 | mov ebx,400*65536+5 |
914 | mov ecx,[sc.work_text] |
982 | mov ecx,[sc.work_text] |
915 | or ecx,0x80000000 ;or (1 shl 30) |
983 | or ecx,0x80000000 ;or (1 shl 30) |
916 | mov edx,txt_zoom |
984 | mov edx,txt_zoom |
917 | ;mov edi,[sc.work] |
985 | ;mov edi,[sc.work] |
Line 926... | Line 994... | ||
926 | int 0x40 |
994 | int 0x40 |
Line 927... | Line 995... | ||
927 | 995 | ||
928 | mov eax,47 |
996 | mov eax,47 |
929 | movzx ecx,byte[zoom] |
997 | movzx ecx,byte[zoom] |
930 | mov ebx,(2 shl 16) |
998 | mov ebx,(2 shl 16) |
931 | mov edx,(325+6*9)*65536+5 |
999 | mov edx,(400+6*9)*65536+5 |
932 | mov esi,[sc.work_button_text] |
1000 | mov esi,[sc.work_button_text] |
933 | or esi,(1 shl 30) |
1001 | or esi,(1 shl 30) |
934 | mov edi,[sc.work_button] |
1002 | mov edi,[sc.work_button] |