Rev 814 | Rev 9014 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 814 | Rev 997 | ||
---|---|---|---|
Line 38... | Line 38... | ||
38 | ret |
38 | ret |
39 | @@: |
39 | @@: |
40 | pushad |
40 | pushad |
41 | ; message loop |
41 | ; message loop |
42 | .event: |
42 | .event: |
- | 43 | ; call get_event |
|
43 | push 10 |
44 | push 10 |
44 | pop eax |
45 | pop eax |
45 | int 40h |
46 | int 40h |
46 | dec eax |
47 | dec eax |
47 | jz .redraw |
48 | jz .redraw |
Line 262... | Line 263... | ||
262 | push eax |
263 | push eax |
263 | call save_console_data |
264 | call save_console_data |
264 | ; draw shadow |
265 | ; draw shadow |
265 | test byte [ebx+dlgtemplate.flags], 4 |
266 | test byte [ebx+dlgtemplate.flags], 4 |
266 | jnz .noshadow |
267 | jnz .noshadow |
- | 268 | call draw_dialog_shadow |
|
- | 269 | .noshadow: |
|
- | 270 | popad |
|
- | 271 | push dword [esp+8] |
|
- | 272 | push dword [esp+8] |
|
- | 273 | call DrawGenericBox |
|
- | 274 | xor eax, eax |
|
- | 275 | ret 8 |
|
- | 276 | ||
- | 277 | draw_dialog_shadow: |
|
267 | mov eax, [ebx+dlgtemplate.x] |
278 | mov eax, [ebx+dlgtemplate.x] |
268 | sub eax, [ebx+dlgtemplate.border_size_x] |
279 | sub eax, [ebx+dlgtemplate.border_size_x] |
269 | ja @f |
280 | ja @f |
270 | xor eax, eax |
281 | xor eax, eax |
271 | @@: |
282 | @@: |
Line 314... | Line 325... | ||
314 | pop edi |
325 | pop edi |
315 | add edi, [cur_width] |
326 | add edi, [cur_width] |
316 | add edi, [cur_width] |
327 | add edi, [cur_width] |
317 | dec edx |
328 | dec edx |
318 | jnz .shadow_loop |
329 | jnz .shadow_loop |
319 | .noshadow: |
- | |
320 | popad |
330 | ret |
321 | push dword [esp+8] |
- | |
322 | push dword [esp+8] |
- | |
323 | call DrawGenericBox |
- | |
324 | xor eax, eax |
- | |
325 | ret 8 |
- | |
Line 326... | Line 331... | ||
326 | 331 | ||
327 | ; void __stdcall DrawGenericBox(DLGDATA* dlg, void* DlgProc) |
332 | ; void __stdcall DrawGenericBox(DLGDATA* dlg, void* DlgProc) |
328 | DrawGenericBox: |
333 | DrawGenericBox: |
329 | pushad |
334 | pushad |
Line 646... | Line 651... | ||
646 | ; 室¨¬ è¨à¨ã ¨ ¢ëá®âã ®ª |
651 | ; 室¨¬ è¨à¨ã ¨ ¢ëá®âã ®ª |
647 | xor eax, eax |
652 | xor eax, eax |
648 | xor ecx, ecx |
653 | xor ecx, ecx |
649 | mov esi, [esp+20h+20] |
654 | mov esi, [esp+20h+20] |
650 | mov [ebx+40], esi |
655 | mov [ebx+40], esi |
651 | and dword [ebx+56], 0 |
656 | mov dword [ebx+56], eax |
652 | @@: |
657 | @@: |
653 | cmp dword [esi+4], 0 |
658 | cmp dword [esi+4], eax |
654 | jz .find_width |
659 | jz .find_width |
655 | mov esi, [esi+4] |
660 | mov esi, [esi+4] |
656 | inc dword [ebx+56] |
661 | inc dword [ebx+56] |
657 | jmp @b |
662 | jmp @b |
658 | .find_width: |
663 | .find_width: |
Line 1101... | Line 1106... | ||
1101 | dlgitemtemplate: |
1106 | dlgitemtemplate: |
1102 | ; «¥¬¥âë: |
1107 | ; «¥¬¥âë: |
1103 | ; 1 = áâ â¨ç¥áª¨© ⥪áâ |
1108 | ; 1 = áâ â¨ç¥áª¨© ⥪áâ |
1104 | ; 2 = ª®¯ª |
1109 | ; 2 = ª®¯ª |
1105 | ; 3 = ¯®«¥ । ªâ¨à®¢ ¨ï |
1110 | ; 3 = ¯®«¥ । ªâ¨à®¢ ¨ï |
- | 1111 | ; 4 = £®à¨§®â «ìë© à §¤¥«¨â¥«ì |
|
- | 1112 | ; 5 = ä« ¦®ª |
|
- | 1113 | ; 6 = ᯨ᮪ |
|
1106 | .type dd ? |
1114 | .type dd ? |
1107 | .x1 dd ? |
1115 | .x1 dd ? |
1108 | .y1 dd ? |
1116 | .y1 dd ? |
1109 | .x2 dd ? |
1117 | .x2 dd ? |
1110 | .y2 dd ? |
1118 | .y2 dd ? |
1111 | ; ë¥: |
1119 | ; ë¥: |
1112 | ; ¤«ï ⥪áâ : const char* data - ASCIIZ-áâப |
1120 | ; ¤«ï ⥪áâ : const char* data - ASCIIZ-áâப |
1113 | ; ¤«ï ª®¯ª¨: const char* data - § £®«®¢®ª |
1121 | ; ¤«ï ª®¯ª¨ ¨ ä« ¦ª : const char* data - § £®«®¢®ª |
1114 | ; ¤«ï । ªâ®à : struct {unsigned maxlength; unsigned pos; unsigned start; |
1122 | ; ¤«ï । ªâ®à : struct {unsigned maxlength; unsigned pos; unsigned start; |
1115 | ; char data[maxlength+1];}* data; |
1123 | ; char data[maxlength+1];}* data; |
- | 1124 | ; ¤«ï ᯨ᪠: struct {listitem* curitemptr; unsigned numitems; |
|
- | 1125 | ; listitem *head; unsigned curitem;}* data; |
|
- | 1126 | ; head = 㪠§ â¥«ì ¯¥à¢ë© ®â®¡à ¦ ¥¬ë© í«¥¬¥â, |
|
- | 1127 | ; curitemptr = 㪠§ â¥«ì ¢ë¤¥«¥ë© í«¥¬¥â, curitem = ¥£® ¨¤¥ªá ¢ ᯨ᪥ (®â 0) |
|
- | 1128 | ; (£¤¥ struct listitem {listitem* next; listitem* prev; char text[];};) |
|
1116 | .data dd ? |
1129 | .data dd ? |
1117 | .flags dd ? |
1130 | .flags dd ? |
1118 | ; « £¨: |
1131 | ; « £¨: |
1119 | ; 0 = ¢ëà ¢¨¢ ¨¥ ¢«¥¢® |
1132 | ; 0 = ¢ëà ¢¨¢ ¨¥ ¢«¥¢® |
1120 | ; 1 = ¢ëà ¢¨¢ ¨¥ ¯® æ¥âàã |
1133 | ; 1 = ¢ëà ¢¨¢ ¨¥ ¯® æ¥âàã |
1121 | ; 2 = ¢ëà ¢¨¢ ¨¥ ¢¯à ¢® |
1134 | ; 2 = ¢ëà ¢¨¢ ¨¥ ¢¯à ¢® |
1122 | ; 4 = í«¥¬¥â ¨¬¥¥â 䮪ãá ¢¢®¤ |
1135 | ; 4 = í«¥¬¥â ¨¬¥¥â 䮪ãá ¢¢®¤ |
1123 | ; 8 = í«¥¬¥â ¬®¦¥â ¨¬¥âì 䮪ãá ¢¢®¤ |
1136 | ; 8 = í«¥¬¥â ¬®¦¥â ¨¬¥âì 䮪ãá ¢¢®¤ |
1124 | ; 10h: ¤«ï ª®¯ª¨ = ª®¯ª ¯® 㬮«ç ¨î (Enter ¥-ª®¯ª¥) |
1137 | ; 10h: ¤«ï ª®¯ª¨ = ª®¯ª ¯® 㬮«ç ¨î (Enter ¥-ª®¯ª¥) |
1125 | ; ¤«ï ¯®«ï ¢¢®¤ = ¤ ë¥ ¡ë«¨ ¬®¤¨ä¨æ¨à®¢ ë |
1138 | ; ¤«ï ¯®«ï ¢¢®¤ = ¤ ë¥ ¡ë«¨ ¬®¤¨ä¨æ¨à®¢ ë |
- | 1139 | ; ¤«ï ä« ¦ª = ä« ¦®ª ãáâ ®¢«¥ |
|
1126 | ; 20h: ¤«ï ¯®«ï ¢¢®¤ = ¥ ®â®¡à ¦ âì ¢¢®¤¨¬ë¥ ¤ ë¥ (¯®ª §ë¢ âì '*') |
1140 | ; 20h: ¤«ï ¯®«ï ¢¢®¤ = ¥ ®â®¡à ¦ âì ¢¢®¤¨¬ë¥ ¤ ë¥ (¯®ª §ë¢ âì '*') |
1127 | .size = $ |
1141 | .size = $ |
1128 | end virtual |
1142 | end virtual |
1129 | ; struct DLGDATA |
1143 | ; struct DLGDATA |
1130 | ; { |
1144 | ; { |
Line 1189... | Line 1203... | ||
1189 | jz .tab |
1203 | jz .tab |
1190 | cmp al, 0x48 |
1204 | cmp al, 0x48 |
1191 | jz .up |
1205 | jz .up |
1192 | cmp al, 0x50 |
1206 | cmp al, 0x50 |
1193 | jz .down |
1207 | jz .down |
1194 | jecxz @f |
1208 | jecxz .nobtns2 |
1195 | cmp [ebx+dlgitemtemplate.type], 3 |
1209 | cmp [ebx+dlgitemtemplate.type], 3 |
1196 | jz .key_edit |
1210 | jz .key_edit |
- | 1211 | cmp [ebx+dlgitemtemplate.type], 5 |
|
- | 1212 | jnz @f |
|
- | 1213 | cmp al, 0x39 |
|
- | 1214 | jnz @f |
|
- | 1215 | xor [ebx+dlgitemtemplate.flags], 10h |
|
- | 1216 | jmp .ret_draw |
|
1197 | @@: |
1217 | @@: |
- | 1218 | .nobtns2: |
|
1198 | cmp al, 0x4B |
1219 | cmp al, 0x4B |
1199 | jz .left |
1220 | jz .left |
1200 | cmp al, 0x4D |
1221 | cmp al, 0x4D |
1201 | jz .right |
1222 | jz .right |
1202 | .ret0: |
1223 | .ret0: |
Line 1384... | Line 1405... | ||
1384 | add ebx, 4 |
1405 | add ebx, 4 |
1385 | jecxz .done_draw |
1406 | jecxz .done_draw |
1386 | .draw_loop: |
1407 | .draw_loop: |
1387 | push ecx |
1408 | push ecx |
1388 | mov eax, [ebx+dlgitemtemplate.type] |
1409 | mov eax, [ebx+dlgitemtemplate.type] |
1389 | dec eax |
- | |
1390 | jz .draw_text |
- | |
1391 | dec eax |
- | |
1392 | jz .draw_button |
- | |
1393 | dec eax |
- | |
1394 | jnz .draw_loop_continue |
- | |
1395 | call draw_editbox |
- | |
1396 | jmp .draw_loop_continue |
1410 | cmp eax, draw_functions_num |
1397 | .draw_button: |
- | |
1398 | call draw_button |
- | |
1399 | jmp .draw_loop_continue |
1411 | jae .draw_loop_continue |
1400 | .draw_text: |
- | |
1401 | call draw_static_text |
1412 | call [draw_functions + eax*4] |
1402 | .draw_loop_continue: |
1413 | .draw_loop_continue: |
1403 | pop ecx |
1414 | pop ecx |
1404 | add ebx, dlgitemtemplate.size |
1415 | add ebx, dlgitemtemplate.size |
1405 | loop .draw_loop |
1416 | loop .draw_loop |
1406 | .done_draw: |
1417 | .done_draw: |
1407 | ret |
1418 | ret |
Line -... | Line 1419... | ||
- | 1419 | ||
- | 1420 | iglobal |
|
- | 1421 | align 4 |
|
- | 1422 | label draw_functions dword |
|
- | 1423 | dd ManagerDlgProc.done_draw |
|
- | 1424 | dd draw_static_text |
|
- | 1425 | dd draw_button |
|
- | 1426 | dd draw_editbox |
|
- | 1427 | dd draw_h_separator |
|
- | 1428 | dd draw_checkbox |
|
- | 1429 | dd draw_listbox |
|
- | 1430 | draw_functions_num = ($ - draw_functions) / 4 |
|
- | 1431 | endg |
|
1408 | 1432 | ||
1409 | draw_static_text: |
1433 | draw_static_text: |
1410 | ; à¨á㥬 áâ â¨ç¥áª¨© ⥪áâ |
1434 | ; à¨á㥬 áâ â¨ç¥áª¨© ⥪áâ |
1411 | mov ah, [dialog_main_color] |
1435 | mov ah, [dialog_main_color] |
1412 | test byte [ebp+dlgtemplate.flags], 2 |
1436 | test byte [ebp+dlgtemplate.flags], 2 |
Line 1415... | Line 1439... | ||
1415 | draw_text: |
1439 | draw_text: |
1416 | ; ®¯à¥¤¥«ï¥¬ ¤«¨ã áâப¨ |
1440 | ; ®¯à¥¤¥«ï¥¬ ¤«¨ã áâப¨ |
1417 | mov esi, [ebx+dlgitemtemplate.data] |
1441 | mov esi, [ebx+dlgitemtemplate.data] |
1418 | draw_text_esi: |
1442 | draw_text_esi: |
1419 | test esi, esi |
1443 | test esi, esi |
1420 | jz .ret |
1444 | jz .ret2 |
- | 1445 | push eax |
|
1421 | push -1 |
1446 | push -1 |
1422 | pop ecx |
1447 | pop ecx |
1423 | @@: |
1448 | @@: |
1424 | inc ecx |
1449 | inc ecx |
1425 | cmp byte [ecx+esi], 0 |
1450 | cmp byte [ecx+esi], 0 |
1426 | jnz @b |
1451 | jnz @b |
1427 | ; ¢ ecx ¤«¨ áâப¨ |
1452 | ; ¢ ecx ¤«¨ áâப¨ |
1428 | push eax |
- | |
1429 | xor eax, eax |
1453 | xor eax, eax |
1430 | mov edx, [ebx+dlgitemtemplate.x2] |
1454 | mov edx, [ebx+dlgitemtemplate.x2] |
1431 | sub edx, [ebx+dlgitemtemplate.x1] |
1455 | sub edx, [ebx+dlgitemtemplate.x1] |
1432 | inc edx |
1456 | inc edx |
1433 | cmp ecx, edx |
1457 | cmp ecx, edx |
Line 1449... | Line 1473... | ||
1449 | .text_align_left: |
1473 | .text_align_left: |
1450 | xor eax, eax |
1474 | xor eax, eax |
1451 | .text_draw: |
1475 | .text_draw: |
1452 | push ecx |
1476 | push ecx |
1453 | push eax |
1477 | push eax |
1454 | mov eax, [ebx+dlgitemtemplate.x1] |
- | |
1455 | add eax, [ebp+dlgtemplate.x] |
- | |
1456 | push edx |
1478 | push edx |
1457 | mov edx, [ebx+dlgitemtemplate.y1] |
- | |
1458 | add edx, [ebp+dlgtemplate.y] |
- | |
1459 | call get_console_ptr |
1479 | call dlgitem_get_console_ptr |
1460 | pop edx |
1480 | pop edx |
1461 | pop ecx |
1481 | pop ecx |
1462 | mov ah, [esp+5] |
1482 | mov ah, [esp+5] |
1463 | mov al, ' ' |
1483 | mov al, ' ' |
1464 | rep stosw |
1484 | rep stosw |
Line 1506... | Line 1526... | ||
1506 | sub ecx, edi |
1526 | sub ecx, edi |
1507 | shr ecx, 1 |
1527 | shr ecx, 1 |
1508 | pop eax |
1528 | pop eax |
1509 | mov al, ' ' |
1529 | mov al, ' ' |
1510 | rep stosw |
1530 | rep stosw |
- | 1531 | .ret2: |
|
1511 | ret |
1532 | ret |
Line 1512... | Line 1533... | ||
1512 | 1533 | ||
1513 | draw_button: |
1534 | draw_button: |
1514 | mov ecx, dialog_colors |
1535 | mov ecx, dialog_colors |
Line 1549... | Line 1570... | ||
1549 | mov esi, [ebx+dlgitemtemplate.data] |
1570 | mov esi, [ebx+dlgitemtemplate.data] |
1550 | add esi, [edx+8] |
1571 | add esi, [edx+8] |
1551 | add esi, 12 |
1572 | add esi, 12 |
1552 | jmp draw_text_esi |
1573 | jmp draw_text_esi |
Line -... | Line 1574... | ||
- | 1574 | ||
- | 1575 | dlgitem_get_console_ptr: |
|
- | 1576 | mov eax, [ebx+dlgitemtemplate.x1] |
|
- | 1577 | mov edx, [ebx+dlgitemtemplate.y1] |
|
- | 1578 | mov ecx, eax |
|
- | 1579 | add eax, [ebp+dlgtemplate.x] |
|
- | 1580 | add edx, [ebp+dlgtemplate.y] |
|
- | 1581 | jmp get_console_ptr |
|
- | 1582 | ||
- | 1583 | draw_h_separator: |
|
- | 1584 | ; à¨á㥬 £®à¨§®â «ìë© à §¤¥«¨â¥«ì |
|
- | 1585 | call dlgitem_get_console_ptr |
|
- | 1586 | .scan: |
|
- | 1587 | mov al, 0xC7 |
|
- | 1588 | test ecx, ecx |
|
- | 1589 | js @f |
|
- | 1590 | mov al, 0xB6 |
|
- | 1591 | cmp ecx, [ebp+dlgtemplate.width] |
|
- | 1592 | jz @f |
|
- | 1593 | mov al, 0xC4 |
|
- | 1594 | @@: |
|
- | 1595 | stosb |
|
- | 1596 | jz .done |
|
- | 1597 | inc ecx |
|
- | 1598 | inc edi |
|
- | 1599 | cmp ecx, [ebx+dlgitemtemplate.x2] |
|
- | 1600 | jb .scan |
|
- | 1601 | .done: |
|
- | 1602 | ret |
|
- | 1603 | ||
- | 1604 | draw_checkbox: |
|
- | 1605 | ; à¨á㥬 ä« ¦®ª |
|
- | 1606 | call dlgitem_get_console_ptr |
|
- | 1607 | test byte [ebx+dlgitemtemplate.flags], 4 |
|
- | 1608 | jz @f |
|
- | 1609 | inc eax |
|
- | 1610 | mov [cursor_x], eax |
|
- | 1611 | mov [cursor_y], edx |
|
- | 1612 | @@: |
|
- | 1613 | mov ah, [dialog_main_color] |
|
- | 1614 | test byte [ebp+dlgtemplate.flags], 2 |
|
- | 1615 | jz @f |
|
- | 1616 | mov ah, [warning_main_color] |
|
- | 1617 | @@: |
|
- | 1618 | mov al, '[' |
|
- | 1619 | stosw |
|
- | 1620 | mov al, 'x' |
|
- | 1621 | test byte [ebx+dlgitemtemplate.flags], 10h |
|
- | 1622 | jnz @f |
|
- | 1623 | mov al, ' ' |
|
- | 1624 | @@: |
|
- | 1625 | stosw |
|
- | 1626 | mov al, ']' |
|
- | 1627 | stosw |
|
- | 1628 | mov al, ' ' |
|
- | 1629 | stosw |
|
- | 1630 | mov ecx, [ebx+dlgitemtemplate.x2] |
|
- | 1631 | sub ecx, [ebx+dlgitemtemplate.x1] |
|
- | 1632 | jb .ret |
|
- | 1633 | sub ecx, 3 |
|
- | 1634 | jbe .ret |
|
- | 1635 | mov esi, [ebx+dlgitemtemplate.data] |
|
- | 1636 | @@: |
|
- | 1637 | lodsb |
|
- | 1638 | test al, al |
|
- | 1639 | jz .ret |
|
- | 1640 | stosw |
|
- | 1641 | loop @b |
|
- | 1642 | .ret: |
|
- | 1643 | ret |
|
- | 1644 | ||
- | 1645 | draw_listbox: |
|
- | 1646 | ; à¨á㥬 ᯨ᮪ |
|
- | 1647 | call dlgitem_get_console_ptr |
|
- | 1648 | mov edx, [ebx+dlgitemtemplate.data] |
|
- | 1649 | mov esi, [edx+8] |
|
- | 1650 | mov eax, [ebx+dlgitemtemplate.y2] |
|
- | 1651 | sub eax, [ebx+dlgitemtemplate.y1] |
|
- | 1652 | push eax |
|
- | 1653 | push eax |
|
- | 1654 | .0: |
|
- | 1655 | test esi, esi |
|
- | 1656 | jz .listdone |
|
- | 1657 | push esi edi |
|
- | 1658 | push edx |
|
- | 1659 | or edx, -1 |
|
- | 1660 | mov ecx, [ebx+dlgitemtemplate.x2] |
|
- | 1661 | sub ecx, [ebx+dlgitemtemplate.x1] |
|
- | 1662 | inc ecx |
|
- | 1663 | xor eax, eax |
|
- | 1664 | @@: |
|
- | 1665 | inc edx |
|
- | 1666 | cmp byte [esi+8+edx], al |
|
- | 1667 | jnz @b |
|
- | 1668 | @@: |
|
- | 1669 | cmp ecx, edx |
|
- | 1670 | jae .text_draw |
|
- | 1671 | mov al, byte [ebx+dlgitemtemplate.flags] |
|
- | 1672 | and al, 3 |
|
- | 1673 | jz .text_align_left |
|
- | 1674 | cmp al, 1 |
|
- | 1675 | jz .text_align_center |
|
- | 1676 | ; ⥪áâ ¢ë஢¥ ¢¯à ¢® |
|
- | 1677 | mov eax, edx |
|
- | 1678 | sub eax, ecx |
|
- | 1679 | jmp .text_draw |
|
- | 1680 | .text_align_center: |
|
- | 1681 | mov eax, edx |
|
- | 1682 | sub eax, ecx |
|
- | 1683 | shr eax, 1 |
|
- | 1684 | jmp .text_draw |
|
- | 1685 | .text_align_left: |
|
- | 1686 | ; xor eax, eax |
|
- | 1687 | .text_draw: |
|
- | 1688 | pop edx |
|
- | 1689 | cmp esi, [edx] |
|
- | 1690 | lea esi, [esi+8+eax] |
|
- | 1691 | mov ah, [dialog_selected_list_color] |
|
- | 1692 | jz @f |
|
- | 1693 | mov ah, [dialog_list_color] |
|
- | 1694 | @@: |
|
- | 1695 | jecxz .next |
|
- | 1696 | @@: |
|
- | 1697 | lodsb |
|
- | 1698 | test al, al |
|
- | 1699 | jz @f |
|
- | 1700 | stosw |
|
- | 1701 | loop @b |
|
- | 1702 | @@: |
|
- | 1703 | mov al, ' ' |
|
- | 1704 | rep stosw |
|
- | 1705 | .next: |
|
- | 1706 | pop edi esi |
|
- | 1707 | add edi, [cur_width] |
|
- | 1708 | add edi, [cur_width] |
|
- | 1709 | mov esi, [esi] |
|
- | 1710 | dec dword [esp] |
|
- | 1711 | jns .0 |
|
- | 1712 | .listdone: |
|
- | 1713 | pop eax |
|
- | 1714 | ; ¨¥©ª ¯à®ªàã⪨ |
|
- | 1715 | pop ecx |
|
- | 1716 | inc ecx |
|
- | 1717 | mov esi, [edx+4] |
|
- | 1718 | cmp ecx, esi |
|
- | 1719 | jae .noscrollbar |
|
- | 1720 | sub ecx, 2 |
|
- | 1721 | jbe .noscrollbar |
|
- | 1722 | mov eax, [edx+12] |
|
- | 1723 | mul ecx |
|
- | 1724 | div esi |
|
- | 1725 | push eax |
|
- | 1726 | mov eax, [ebx+dlgitemtemplate.x2] |
|
- | 1727 | add eax, [ebp+dlgtemplate.x] |
|
- | 1728 | mov edx, [ebx+dlgitemtemplate.y1] |
|
- | 1729 | add edx, [ebp+dlgtemplate.y] |
|
- | 1730 | call get_console_ptr |
|
- | 1731 | pop edx |
|
- | 1732 | inc edx |
|
- | 1733 | mov al, 0x1E |
|
- | 1734 | mov ah, [dialog_scroll_list_color] |
|
- | 1735 | mov [edi], ax |
|
- | 1736 | add edi, [cur_width] |
|
- | 1737 | add edi, [cur_width] |
|
- | 1738 | .2: |
|
- | 1739 | mov al, 0xB1 |
|
- | 1740 | dec edx |
|
- | 1741 | jz @f |
|
- | 1742 | mov al, 0xB0 |
|
- | 1743 | @@: |
|
- | 1744 | mov [edi], ax |
|
- | 1745 | add edi, [cur_width] |
|
- | 1746 | add edi, [cur_width] |
|
- | 1747 | loop .2 |
|
- | 1748 | mov al, 0x1F |
|
- | 1749 | stosw |
|
- | 1750 | .noscrollbar: |
|
- | 1751 | ret |
|
- | 1752 | ||
- | 1753 | listbox_key: |
|
- | 1754 | mov edx, [ebx+dlgitemtemplate.data] |
|
- | 1755 | cmp al, 0x48 |
|
- | 1756 | jz .prev |
|
- | 1757 | cmp al, 0x50 |
|
- | 1758 | jz .next |
|
- | 1759 | cmp al, 0x47 |
|
- | 1760 | jz .home |
|
- | 1761 | cmp al, 0x4F |
|
- | 1762 | jz .end |
|
- | 1763 | cmp al, 0x51 |
|
- | 1764 | jz .pgdn |
|
- | 1765 | cmp al, 0x49 |
|
- | 1766 | jz .pgup |
|
- | 1767 | ret |
|
- | 1768 | .next: |
|
- | 1769 | call .calc_last_line |
|
- | 1770 | mov eax, [edx] |
|
- | 1771 | cmp dword [eax], 0 |
|
- | 1772 | jz @f |
|
- | 1773 | call .line_next |
|
- | 1774 | @@: |
|
- | 1775 | mov [edx], eax |
|
- | 1776 | ret |
|
- | 1777 | .pgdn: |
|
- | 1778 | call .calc_last_line |
|
- | 1779 | mov eax, [edx] |
|
- | 1780 | mov ecx, [ebx+dlgitemtemplate.y2] |
|
- | 1781 | sub ecx, [ebx+dlgitemtemplate.y1] |
|
- | 1782 | .pgdnl: |
|
- | 1783 | cmp dword [eax], 0 |
|
- | 1784 | jz @f |
|
- | 1785 | call .line_next |
|
- | 1786 | loop .pgdnl |
|
- | 1787 | @@: |
|
- | 1788 | mov [edx], eax |
|
- | 1789 | ret |
|
- | 1790 | .prev: |
|
- | 1791 | mov eax, [edx] |
|
- | 1792 | cmp dword [eax+4], 0 |
|
- | 1793 | jz @f |
|
- | 1794 | call .line_prev |
|
- | 1795 | @@: |
|
- | 1796 | mov [edx], eax |
|
- | 1797 | ret |
|
- | 1798 | .pgup: |
|
- | 1799 | mov eax, [edx] |
|
- | 1800 | mov ecx, [ebx+dlgitemtemplate.y2] |
|
- | 1801 | sub ecx, [ebx+dlgitemtemplate.y1] |
|
- | 1802 | ; inc ecx |
|
- | 1803 | .pgupl: |
|
- | 1804 | cmp dword [eax+4], 0 |
|
- | 1805 | jz @f |
|
- | 1806 | call .line_prev |
|
- | 1807 | loop .pgupl |
|
- | 1808 | @@: |
|
- | 1809 | mov [edx], eax |
|
- | 1810 | ret |
|
- | 1811 | .home: |
|
- | 1812 | mov eax, [edx] |
|
- | 1813 | @@: |
|
- | 1814 | cmp dword [eax+4], 0 |
|
- | 1815 | jz @f |
|
- | 1816 | mov eax, [eax+4] |
|
- | 1817 | jmp @b |
|
- | 1818 | @@: |
|
- | 1819 | mov [edx], eax |
|
- | 1820 | mov [edx+8], eax |
|
- | 1821 | and dword [edx+12], 0 |
|
- | 1822 | ret |
|
- | 1823 | .end: |
|
- | 1824 | mov eax, [edx] |
|
- | 1825 | @@: |
|
- | 1826 | cmp dword [eax], 0 |
|
- | 1827 | jz @f |
|
- | 1828 | mov eax, [eax] |
|
- | 1829 | jmp @b |
|
- | 1830 | @@: |
|
- | 1831 | mov [edx], eax |
|
- | 1832 | mov ecx, [ebx+dlgitemtemplate.y2] |
|
- | 1833 | sub ecx, [ebx+dlgitemtemplate.y1] |
|
- | 1834 | jz .e1 |
|
- | 1835 | .e2: |
|
- | 1836 | mov eax, [eax+4] |
|
- | 1837 | loop .e2 |
|
- | 1838 | .e1: |
|
- | 1839 | mov [edx+8], eax |
|
- | 1840 | mov eax, [edx+4] |
|
- | 1841 | dec eax |
|
- | 1842 | mov [edx+12], eax |
|
- | 1843 | ret |
|
- | 1844 | ||
- | 1845 | .line_prev: |
|
- | 1846 | cmp eax, [edx+8] |
|
- | 1847 | mov eax, [eax+4] |
|
- | 1848 | jnz @f |
|
- | 1849 | mov [edx+8], eax |
|
- | 1850 | @@: |
|
- | 1851 | dec dword [edx+12] |
|
- | 1852 | ret |
|
- | 1853 | .calc_last_line: |
|
- | 1854 | mov esi, [edx+8] |
|
- | 1855 | mov ecx, [ebx+dlgitemtemplate.y2] |
|
- | 1856 | sub ecx, [ebx+dlgitemtemplate.y1] |
|
- | 1857 | jz .clldone |
|
- | 1858 | @@: |
|
- | 1859 | mov esi, [esi] |
|
- | 1860 | test esi, esi |
|
- | 1861 | jz @f |
|
- | 1862 | loop @b |
|
- | 1863 | .clldone: |
|
- | 1864 | ret |
|
- | 1865 | .line_next: |
|
- | 1866 | cmp eax, esi |
|
- | 1867 | mov eax, [eax] |
|
- | 1868 | jnz @f |
|
- | 1869 | push eax |
|
- | 1870 | mov eax, [edx+8] |
|
- | 1871 | mov eax, [eax] |
|
- | 1872 | mov [edx+8], eax |
|
- | 1873 | pop eax |
|
- | 1874 | mov esi, eax |
|
- | 1875 | @@: |
|
- | 1876 | inc dword [edx+12] |
|
- | 1877 | ret |
|
1553 | 1878 | ||
1554 | ; void __stdcall SayNoMem(void); |
1879 | ; void __stdcall SayNoMem(void); |
1555 | SayNoMem: |
1880 | SayNoMem: |
1556 | or dword [nomem_dlgdata+4], -1 |
1881 | or dword [nomem_dlgdata+4], -1 |
1557 | or dword [nomem_dlgdata+8], -1 |
1882 | or dword [nomem_dlgdata+8], -1 |
1558 | push nomem_dlgdata |
1883 | push nomem_dlgdata |
1559 | call DialogBox |
1884 | call DialogBox |
Line -... | Line 1885... | ||
- | 1885 | ret |
|
- | 1886 | ||
- | 1887 | ; int __stdcall ConfirmCancel(void); |
|
- | 1888 | ; return value: 0 = the user is sure, nonzero = the user wants to continue |
|
- | 1889 | ConfirmCancel: |
|
- | 1890 | push YesOrNoBtn |
|
- | 1891 | push 2 |
|
- | 1892 | push ConfirmCancelMsg |
|
- | 1893 | push 1 |
|
- | 1894 | push aCancelled |
|
- | 1895 | call SayErrTitle |
|
- | 1896 | test eax, eax |
|
1560 | ret |
1897 | ret |
1561 | 1898 | ||
1562 | ; int __stdcall SayErr(int num_strings, const char* strings[], |
1899 | ; int __stdcall SayErr(int num_strings, const char* strings[], |
1563 | ; int num_buttons, const char* buttons[]); |
1900 | ; int num_buttons, const char* buttons[]); |
1564 | SayErr: |
1901 | SayErr: |