Subversion Repositories Kolibri OS

Rev

Rev 5575 | Rev 5582 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. //CODED by Veliant, Leency, Nable. GNU GPL licence.
  2.  
  3. #define LIB_KOLIBRI_H
  4.  
  5. #startaddress 0
  6. #code32 TRUE
  7.  
  8. char   os_name[8]   = {'M','E','N','U','E','T','0','1'};
  9. dword  os_version   = 0x00000001;
  10. dword  start_addr   = #load_init_main;
  11. dword  final_addr   = #stop+32;
  12. dword  alloc_mem    = MEMSIZE;
  13. dword  x86esp_reg   = MEMSIZE;
  14. dword  I_Param      = #param;
  15. dword  I_Path       = #program_path;
  16. char param[4096];
  17. char program_path[4096];
  18.  
  19. #define NULL      0
  20. #define OLD      -1
  21. #define true      1
  22. #define false     0
  23.  
  24. //Events
  25. #define evReDraw  1
  26. #define evKey     2
  27. #define evButton  3
  28. #define evDesktop 5
  29. #define evMouse   6
  30. #define evIPC     7
  31. #define evNetwork 8
  32. #define evDebug   9
  33.  
  34. //Button options
  35. #define BT_DEL      0x80000000
  36. #define BT_HIDE     0x40000000
  37. #define BT_NOFRAME  0x20000000
  38.  
  39. //Button mouse
  40. #define MOUSE_LEFT   001b
  41. #define MOUSE_RIGHT  010b
  42. #define MOUSE_LR     011b
  43. #define MOUSE_CENTER 100b
  44.  
  45. //ASCII KEYS
  46. #define ASCII_KEY_BS    008
  47. #define ASCII_KEY_TAB   009
  48. #define ASCII_KEY_ENTER 013
  49. #define ASCII_KEY_ESC   027
  50. #define ASCII_KEY_DEL   182
  51. #define ASCII_KEY_INS   185
  52. #define ASCII_KEY_SPACE 032
  53.  
  54. #define ASCII_KEY_LEFT  176
  55. #define ASCII_KEY_RIGHT 179
  56. #define ASCII_KEY_DOWN  177
  57. #define ASCII_KEY_UP    178
  58. #define ASCII_KEY_HOME  180
  59. #define ASCII_KEY_END   181
  60. #define ASCII_KEY_PGDN  183
  61. #define ASCII_KEY_PGUP  184
  62.  
  63. //allow event mask
  64. #define EVENT_MASK_REDRAW   000000001b
  65. #define EVENT_MASK_KEYBOARD 000000010b
  66. #define EVENT_MASK_BUTTONS  000000100b
  67. #define EVENT_MASK_DESKTOP  000010000b
  68. #define EVENT_MASK_MOUSE    000100000b
  69. #define EVENT_MASK_IPC      001000000b
  70. #define EVENT_MASK_NETWORK  010000000b
  71. #define EVENT_MASK_DEBUG    100000000b
  72.  
  73. //ARGS FUNCTION
  74. #define END_ARGS 0xFF00FF
  75. //-------------------------------------------------------------------------
  76.  
  77. :struct raw_image {
  78.         dword w, h, data;
  79. };
  80.  
  81. /**
  82.  *  The structure of the mouse
  83.  *  x - coordinate X
  84.  *  y - coordinate Y
  85.  *  xx and yy - time coordinates
  86.  *  lkm - left mouse button
  87.  *  pkm - right mouse button
  88.  *  mkm - mouse wheel
  89.  *  key - keycode button
  90.  *  tmp - time keycode
  91.  *  down - key event press
  92.  *  up - key release events
  93.  *  move - event mouse movements
  94.  *  click - when clicked
  95.  *  dblclick - double-click the default 50 ms
  96.  */
  97.  
  98. dword __TMP_TIME,MOUSE_TIME;
  99. :struct mouse
  100. {
  101.         signed x,y,xx,yy,lkm,mkm,pkm,key,tmp,tmp_time,hor,vert,down,up,move,click,dblclick,left,top;
  102.         dword handle,_;
  103.         byte cmd;
  104.         void clearTime();
  105.         void get();
  106.         void set();
  107.         void center();
  108.         dword hide();
  109.         void slider();
  110.         void show();
  111. };
  112. :void mouse::clearTime()
  113. {
  114.         tmp_time = GetStartTime()+MOUSE_TIME;
  115. }
  116. :void mouse::show()
  117. {
  118.         if(!handle)return;
  119.         ECX = handle;
  120.         EAX = 37;
  121.         EBX = 5;
  122.         $int 0x40;
  123. }
  124. :dword mouse::hide()
  125. {
  126.         if(!_)
  127.         {
  128.                 EAX = 68;
  129.                 EBX = 12;
  130.                 ECX = 32*32*4;
  131.                 $int 0x40
  132.                 ECX = EAX;
  133.                 _ = EAX;
  134.         } else ECX = _;
  135.         EAX = 37;
  136.         EBX = 4;
  137.         DX  = 2;
  138.         $int 0x40;
  139.         handle = EAX;
  140.         ECX = EAX;
  141.         EAX = 37;
  142.         EBX = 5;
  143.         $int 0x40;
  144.         handle = EAX;
  145. }
  146.  
  147. //set new attributes mouse
  148. :void mouse::set()
  149. {
  150.         if((xx!=x)||(yy!=y))
  151.         {
  152.                 EAX = 18;
  153.                 EBX = 19;
  154.                 ECX = 4;
  155.                 EDX = (x<<16)+y;
  156.                 $int 0x40
  157.                 //move = true;
  158.         }
  159.         if((key)||(lkm|mkm|pkm))&&(down|up|click|dblclick|move)
  160.         {
  161.                 if(lkm|mkm|pkm)key=(lkm)|(pkm<<1)|(2<<mkm);
  162.                 EAX = 18;
  163.                 EBX = 19;
  164.                 ECX = key;
  165.                 EDX = (x<<16)+y;
  166.                 $int 0x40
  167.         }
  168. }
  169.  
  170. :void mouse::center()
  171. {
  172.         EAX = 18;
  173.         EBX = 15;
  174.         $int 0x40
  175. }
  176.  
  177. //get new attributes mouse
  178. :void mouse::get()
  179. {
  180.         EAX = 37;
  181.         EBX = 1;
  182.         $int    0x40
  183.         $mov    ebx, eax
  184.         $shr    eax, 16
  185.         $and    ebx,0x0000FFFF
  186.         x = EAX;
  187.         y = EBX;
  188.         if (x>6000) x-=65535;
  189.         if (y>6000) y-=65535;
  190.         EAX = 37;
  191.         EBX = 2;
  192.         $int    0x40
  193.         $mov    ebx, eax
  194.         $mov    ecx, eax
  195.         key = EAX;
  196.         $and    eax, 0x00000001
  197.         $shr    ebx, 1
  198.         $and    ebx, 0x00000001
  199.         $shr    ecx, 2
  200.         $and    ecx, 0x00000001
  201.         lkm = EAX;
  202.         pkm = EBX;
  203.         mkm = ECX;
  204.        
  205.         //when you release the mouse button
  206.         // Mouse Up Event
  207.         if((cmd)&&!(key)){
  208.                 up = true;
  209.                 down = false;
  210.                 if(!move) click = true;
  211.                 move = false;
  212.                 __TMP_TIME = GetStartTime();
  213.                 if(__TMP_TIME-tmp_time<=MOUSE_TIME){ dblclick = true;click = false; }
  214.                 tmp_time = __TMP_TIME;
  215.                 //returns the key code
  216.                 key = tmp;
  217.                 lkm = 1&tmp;
  218.                 pkm = 2&tmp;
  219.                 pkm >>= 1;
  220.                 mkm = 4&tmp;
  221.                 mkm >>= 2;
  222.                 cmd = false;
  223.         }
  224.        
  225.         //when you press the mouse button
  226.         // Mouse Down Event/Move Event
  227.         else {
  228.             up       = false;
  229.                 click    = false;
  230.                 dblclick = false;
  231.                 down     = false;
  232.                 // Mouse Move Event
  233.                 if((xx!=x)||(yy!=y))
  234.                 {
  235.                         move = true;
  236.                         xx = x;
  237.                         yy = y;
  238.                 }
  239.                 else move = false;
  240.                 if(key)if(!cmd) {down = true;cmd = true;tmp=key;}
  241.         }
  242.        
  243.         //scroll
  244.         EAX = 37;
  245.         EBX = 7;
  246.         $int    0x40
  247.         $mov    ebx, eax
  248.         $shr    eax, 16
  249.         $and    ebx,0x0000FFFF
  250.         //hor = EAX;
  251.         vert = EBX;
  252. }
  253.  
  254. :void mouse::slider()
  255. {
  256.         signed _x,_y;
  257.         if(!handle)hide();
  258.         get();
  259.         _x = x;_y = y;
  260.         pause(5);
  261.         get();
  262.         left = _x - x;
  263.         top  = _y - y;
  264.         center();
  265.         get();
  266.         _x = x;_y = y;
  267.         pause(5);
  268. }
  269.  
  270. :struct keyboard
  271. {
  272.         signed key;
  273.         byte down,up,press;
  274.         void get(void);
  275. };
  276.  
  277. :void keyboard::get(void)
  278. {
  279.        
  280. }
  281.  
  282. :struct system_colors
  283. {
  284.         dword frame,grab,grab_button,grab_button_text,grab_text,
  285.               work,work_button,work_button_text,work_text,work_graph;
  286.         void get();
  287. };
  288.  
  289. :void system_colors::get()
  290. {
  291.         EAX = 48;
  292.         EBX = 3;
  293.         ECX = #frame;
  294.         EDX = 40;
  295.         $int 0x40
  296. }
  297.  
  298. //------------------------------------------------------------------------------
  299. dword wait_event_code;
  300. inline fastcall dword WaitEvent()
  301. {
  302.         $mov eax,10
  303.         $int 0x40
  304.         wait_event_code = EAX;
  305. }
  306.  
  307. inline fastcall dword CheckEvent()
  308. {
  309.         $mov eax,11
  310.         $int 0x40
  311. }
  312.  
  313. inline fastcall dword WaitEventTimeout(EBX)
  314. {
  315.         $mov eax,23
  316.         $int 0x40
  317. }
  318.  
  319. inline fastcall SetEventMask(EBX)
  320. {
  321.         $mov eax,40
  322.         $int 0x40
  323. }
  324.  
  325. inline fastcall ScancodesGeting(){
  326.         $mov eax,66
  327.         $mov ebx,1
  328.         $mov ecx,1 //᪠­ª®¤ë
  329.         $int 0x40
  330. }
  331.  
  332. inline fastcall word GetKey()  //+Gluk fix
  333. {
  334.                 $push edx
  335. GETKEY:
  336.                 $mov  eax,2
  337.                 $int  0x40
  338.                 $cmp eax,1
  339.                 $jne GETKEYI
  340.                 $mov ah,dh
  341.                 $jmp GETKEYII //jz?
  342. GETKEYI:
  343.                 $mov dh,ah
  344.                 $jmp GETKEY
  345. GETKEYII:
  346.                 $pop edx
  347.                 $shr eax,8
  348. }
  349.  
  350. inline fastcall int GetFullKey()
  351. {
  352.         $mov  eax,2
  353.         $int  0x40
  354. }
  355.  
  356.  
  357. inline fastcall pause(EBX)
  358. {
  359.         $mov eax, 5
  360.         $int 0x40
  361. }
  362.  
  363. inline fastcall word GetButtonID()
  364. {
  365.         $mov eax,17
  366.         $int  0x40
  367.         $shr eax,8
  368. }
  369.  
  370. inline fastcall dword GetFreeRAM()
  371. {
  372.         $mov eax, 18
  373.         $mov ebx, 16
  374.         $int 0x40
  375.         //return eax = ðàçìåð ñâîáîäíîé ïàìÿòè â êèëîáàéòàõ
  376. }
  377.  
  378. inline fastcall dword LoadDriver(ECX) //ECX - èìÿ äðàéâåðà
  379. {
  380.         $mov eax, 68
  381.         $mov ebx, 16
  382.         $int 0x40
  383.         //return 0 - íåóäà÷à, èíà÷å eax = õýíäë äðàéâåðà
  384. }
  385.  
  386. inline fastcall dword RuleDriver(ECX) //óêàçàòåëü íà óïðàâëÿþùóþ ñòðóêòóðó
  387. {
  388.         $mov eax, 68
  389.         $mov ebx, 17
  390.         $int 0x40
  391.         //return eax = îïðåäåëÿåòñÿ äðàéâåðîì
  392. }
  393.  
  394. struct proc_info
  395. {
  396.         #define SelfInfo -1
  397.         dword   use_cpu;
  398.         word    pos_in_stack,num_slot,rezerv1;
  399.         unsigned char name[11];
  400.         char    rezerv2;
  401.         dword   adress,use_memory,ID,left,top,width,height;
  402.         word    status_slot,rezerv3;
  403.         dword   work_left,work_top,work_width,work_height;
  404.         char    status_window;
  405.         dword   cwidth,cheight;
  406.         byte    reserved[1024-71-8];
  407. };
  408.  
  409. inline fastcall void GetProcessInfo(EBX, ECX)
  410. {
  411.         $mov eax,9;
  412.         $int  0x40
  413.         DSDWORD[EBX+71] = DSDWORD[EBX+42] - 9; //set cwidth
  414.         DSDWORD[EBX+75] = DSDWORD[EBX+46] - GetSkinHeight() - 4; //set cheight
  415. }
  416.  
  417. inline fastcall int GetPointOwner( EBX, ECX) //ebx=m.x, ecx=m.y
  418. {
  419.         $mov eax,34
  420.         $int 0x40
  421. }
  422.  
  423. inline fastcall int GetProcessSlot( ECX)
  424. {
  425.         EAX = 18;
  426.         EBX = 21;
  427.         $int 0x40
  428. }
  429.  
  430. inline fastcall int GetActiveProcess()
  431. {
  432.         EAX = 18;
  433.         EBX = 7;
  434.         $int 0x40
  435. }
  436.  
  437. :int CheckActiveProcess(int Form_ID)
  438. {
  439.         int id9=GetProcessSlot(Form_ID);
  440.         if (id9==GetActiveProcess()) return 1;
  441.         return 0;
  442. }
  443.  
  444. inline fastcall void ActivateWindow( ECX)
  445. {
  446.         EAX = 18;
  447.         EBX = 3;
  448.         $int 0x40
  449. }
  450.  
  451. inline fastcall int MinimizeWindow()
  452. {
  453.         EAX = 18;
  454.         EBX = 10;
  455.         $int 0x40
  456. }
  457.  
  458. inline fastcall int CreateThread(ECX,EDX)
  459. {
  460.         $mov eax,51
  461.         $mov ebx,1
  462.         $int 0x40
  463. }
  464.  
  465. inline fastcall void SwitchToAnotherThread()
  466. {
  467.         $mov eax,68
  468.         $mov ebx,1
  469.         $int 0x40
  470. }
  471.  
  472. inline fastcall int SendWindowMessage( ECX, EDX)
  473. {
  474.         $mov eax, 72
  475.         $mov ebx, 1
  476.         $int 0x40
  477. }
  478.  
  479. inline fastcall int KillProcess( ECX)
  480. {
  481.         $mov eax,18;
  482.         $mov ebx,18;
  483.         $int 0x40
  484. }
  485.  
  486. #define TURN_OFF 2
  487. #define REBOOT 3
  488. #define KERNEL 4
  489. inline fastcall int ExitSystem( ECX)
  490. {
  491.         $mov eax, 18
  492.         $mov ebx, 9
  493.         $int 0x40
  494. }
  495.  
  496. inline fastcall ExitProcess()
  497. {
  498.         $mov eax,-1;
  499.         $int 0x40
  500. }
  501.  
  502. //------------------------------------------------------------------------------
  503.  
  504. //eax = ÿçûê ñèñòåìû (1=eng, 2=fi, 3=ger, 4=rus)
  505. inline fastcall int GetSystemLanguage()
  506. {
  507.         EAX = 26;
  508.         EBX = 5;
  509.         $int 0x40
  510. }
  511.  
  512. inline fastcall GetSkinHeight()
  513. {
  514.         $push ebx
  515.         $mov  eax,48
  516.         $mov  ebx,4
  517.         $int 0x40
  518.         $pop  ebx
  519. }
  520.  
  521. inline fastcall void SetSystemSkin( ECX)
  522. {
  523.         EAX = 48;
  524.         EBX = 8;
  525.         $int 0x40
  526. }
  527.  
  528. inline fastcall int GetScreenWidth()
  529. {
  530.         $mov eax, 14
  531.         $int 0x40
  532.         $shr eax, 16
  533. }
  534.  
  535. inline fastcall int GetScreenHeight()
  536. {
  537.         $mov eax, 14
  538.         $int 0x40
  539.         $and eax,0x0000FFFF
  540. }
  541.  
  542. inline fastcall int GetClientTop()
  543. {
  544.         $mov eax, 48
  545.         $mov ebx, 5
  546.         $int 0x40
  547.     $mov eax, ebx
  548.     $shr eax, 16
  549. }
  550.  
  551. inline fastcall int GetClientHeight()
  552. {
  553.         $mov eax, 48
  554.         $mov ebx, 5
  555.         $int 0x40
  556.     $mov eax, ebx
  557. }
  558.  
  559.  
  560. inline fastcall dword LoadLibrary( ECX)
  561. {
  562.         $mov eax, 68
  563.         $mov ebx, 19
  564.         $int  0x40
  565. }
  566.  
  567. inline fastcall int TestBit( EAX, CL)
  568. {
  569.         $shr eax,cl
  570.         $and eax,1
  571. }
  572.  
  573. inline fastcall int PlaySpeaker( ESI)
  574. {
  575.         $mov eax, 55
  576.         $mov ebx, 55
  577.         $int 0x40
  578. }
  579.  
  580. inline fastcall void debugln( EDX)
  581. {
  582.         $push eax
  583.         $push ebx
  584.         $push ecx
  585.         $mov eax, 63
  586.         $mov ebx, 1
  587. NEXT_CHAR:
  588.         $mov ecx, DSDWORD[edx]
  589.         $or      cl, cl
  590.         $jz  DONE
  591.         $int 0x40
  592.         $inc edx
  593.         $jmp NEXT_CHAR
  594. DONE:
  595.         $mov cl, 13
  596.         $int 0x40
  597.         $mov cl, 10
  598.         $int 0x40
  599.         $pop ecx
  600.         $pop ebx
  601.         $pop eax
  602. }
  603.  
  604. inline fastcall void debug( EDX)
  605. {
  606.         $push eax
  607.         $push ebx
  608.         $push ecx
  609.         $mov eax, 63
  610.         $mov ebx, 1
  611. NEXT_CHAR:
  612.         $mov ecx, DSDWORD[edx]
  613.         $or      cl, cl
  614.         $jz  DONE
  615.         $int 0x40
  616.         $inc edx
  617.         $jmp NEXT_CHAR
  618. DONE:
  619.         $pop ecx
  620.         $pop ebx
  621.         $pop eax
  622. }
  623.  
  624.  
  625. inline fastcall void debugch( ECX)
  626. {
  627.         $push eax
  628.         $push ebx
  629.         $mov eax,63
  630.         $mov ebx,1
  631.         $int 0x40
  632.         $pop ebx
  633.         $pop eax
  634. }
  635. //------------------------------------------------------------------------------
  636.  
  637. void DefineAndDrawWindow(dword x, y, size_w, size_h, byte WindowType,dword WindowAreaColor, EDI, ESI)
  638. {
  639.         EAX = 12;              // function 12:tell os about windowdraw
  640.         EBX = 1;
  641.         $int 0x40
  642.        
  643.         $xor EAX,EAX
  644.         EBX = x << 16 + size_w;
  645.         ECX = y << 16 + size_h;
  646.  
  647.         EDX = WindowType << 24 | WindowAreaColor;
  648.         $int 0x40
  649.  
  650.         EAX = 12;              // function 12:tell os about windowdraw
  651.         EBX = 2;
  652.         $int 0x40
  653. }
  654.  
  655. inline fastcall MoveSize( EBX,ECX,EDX,ESI)
  656. {
  657.         $mov eax, 67
  658.         $int 0x40
  659. }
  660.  
  661. inline fastcall void DrawTitle( ECX)
  662. {
  663.         EAX = 71;
  664.         EBX = 1;
  665.         $int 0x40;
  666. }
  667.  
  668. void WriteTextB(dword x,y,byte fontType, dword color, EDX)
  669. {
  670.         EAX = 4;
  671.         EBX = x<<16+y;
  672.         ECX = fontType<<24+color;
  673.         ESI = 0;
  674.         $int 0x40;
  675.         $add ebx, 1<<16
  676.         $int 0x40
  677. }
  678.  
  679. void WriteText(dword x,y,byte fontType, dword color, EDX)
  680. {
  681.         EAX = 4;
  682.         EBX = x<<16+y;
  683.         ECX = fontType<<24+color;
  684.         $int 0x40;
  685. }
  686.  
  687. dword WriteBufText(dword x,y,byte fontType, dword color, EDX, EDI)
  688. {
  689.         EAX = 4;
  690.         EBX = x<<16+y;
  691.         ECX = fontType<<24+color;
  692.         $int 0x40;
  693. }
  694.  
  695. void WriteNumber(dword x,y,byte fontType, dword color, count, ECX)
  696. {
  697.         EAX = 47;
  698.         EBX = count<<16;
  699.         EDX = x<<16+y;
  700.         ESI = fontType<<24+color;
  701.         $int 0x40;
  702. }
  703.  
  704. void CopyScreen(dword EBX, x, y, w, h)
  705. {
  706.   EAX = 36;
  707.   ECX = w << 16 + h;
  708.   EDX = x << 16 + y;
  709.   $int  0x40;
  710. }
  711.  
  712. :dword GetPixelColor(dword x, x_size, y)
  713. {
  714.         $mov eax, 35
  715.         EBX= y*x_size+x;
  716.         $int 0x40
  717. }
  718.  
  719.  
  720. void _PutImage(dword x,y, w,h, EBX)
  721. {
  722.         EAX = 7;
  723.         ECX = w<<16+h;
  724.         EDX = x<<16+y;
  725.         $int 0x40
  726. }
  727.  
  728. void PutPaletteImage(dword EBX,w,h,x,y,ESI,EDI)
  729. {
  730.         EAX = 65;
  731.         ECX = w<<16+h;
  732.         EDX = x<<16+y;
  733.         EBP = 0;
  734.         $int 0x40
  735. }
  736.  
  737. inline fastcall void PutPixel( EBX,ECX,EDX)
  738. {
  739.   EAX=1;
  740.   $int 0x40
  741. }
  742.  
  743. void DrawBar(dword x,y,w,h,EDX)
  744. {
  745.         if (h<=0) || (h>60000) || (w<=0) || (w>60000) return; //bad boy :)
  746.         EAX = 13;
  747.         EBX = x<<16+w;
  748.         ECX = y<<16+h;
  749.         $int 0x40
  750. }
  751.  
  752. void DefineButton(dword x,y,w,h,EDX,ESI)
  753. {
  754.         EAX = 8;
  755.         $push edx
  756.         EDX += BT_DEL;
  757.         $int 0x40;
  758.         $pop edx
  759.         EBX = x<<16+w;
  760.         ECX = y<<16+h;
  761.         $int 0x40
  762. }
  763.  
  764. void UnsafeDefineButton(dword x,y,w,h,EDX,ESI)
  765. {
  766.         EAX = 8;
  767.         EBX = x<<16+w;
  768.         ECX = y<<16+h;
  769.         $int 0x40
  770. }
  771.  
  772. inline fastcall void DeleteButton( EDX)
  773. {
  774.         EAX = 8;
  775.         EDX += BT_DEL;
  776.         $int 0x40;
  777. }
  778.  
  779. inline fastcall dword GetStartTime()
  780. {
  781.         $mov eax,26
  782.         $mov ebx,9
  783.         $int 0x40
  784. }
  785.  
  786. :dword ALERT_TEXT;
  787. :void dialog_alert()
  788. {
  789.         byte id;
  790.         loop()switch(WaitEvent())
  791.         {
  792.                 case evReDraw:
  793.                         DefineAndDrawWindow(215,100,250,200,0x34,0xFFFFFF,"Alert");
  794.                         WriteTextB(5,5,0x90,0x0,ALERT_TEXT);
  795.                 break;
  796.                 case evButton:
  797.                         id=GetButtonID();
  798.                         if (id==1) ExitProcess();
  799.                 break;
  800.         }
  801. }
  802.  
  803. :dword alert(dword text)
  804. {
  805.         dword mem = malloc(4096);
  806.         ALERT_TEXT = text;
  807.         CreateThread(#dialog_alert,mem+4092);
  808.         return mem;
  809. }
  810.  
  811. dword __generator;  // random number generator - äëÿ ãåíåðàöèè ñëó÷àéíûõ ÷èñåë
  812.  
  813. dword program_path_length;
  814.  
  815. //The initialization of the initial data before running
  816. void load_init_main()
  817. {
  818.         //program_path_length = strlen(program_path);
  819.         MOUSE_TIME = 50; //Default 500 ms.
  820.         __generator = GetStartTime();
  821.         main();
  822. }