Subversion Repositories Kolibri OS

Rev

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

  1. ;---------------------------------------------
  2. ;-----------panel BUTTONS---------------------
  3. ;---------------------------------------------
  4. buttons:
  5.  
  6.         cmp [Current_instrument],21
  7.         jne no_finish_instrument_button
  8.  
  9.         cmp [instrument_used],1
  10.         jne no_finish_instrument_button
  11.  
  12.         cmp [Activate_instrument],0
  13.         jne no_finish_instrument_button
  14.  
  15.         cmp [crossing],1
  16.         jne no_finish_instrument_button
  17.  
  18.         mov [finishing_crossing],1
  19.         call TakeButtonInstruments
  20.  
  21.         no_finish_instrument_button:
  22.  
  23.         mov eax,17
  24.         mcall
  25.  
  26.         shr eax,8
  27.  
  28.         cmp eax,1
  29.         jne no_exit
  30.  
  31.         mov eax,CursorsID
  32.         call delete_cursors
  33.  
  34.         or eax,-1
  35.         mcall
  36.  
  37.         no_exit:
  38.  
  39.  
  40.         mov [Current_instrument],eax
  41.  
  42.         ; set cursor for current instrument
  43.         pushad
  44.  
  45.         mov eax,CursorsID
  46.         mov ebx,[Current_instrument]
  47.  
  48.         call set_cursor
  49.         popad
  50.  
  51.  
  52.  
  53.         cmp eax,10
  54.         jl still
  55.  
  56.         ;save instrumnets 10-40
  57.         cmp eax,40
  58.         jae no_save_last_instrument
  59.  
  60.          mov [Last_instrument],eax
  61.  
  62.         no_save_last_instrument:
  63.  
  64.         cmp eax,10
  65.         je still
  66.  
  67.         cmp eax,14
  68.         je still
  69.  
  70.         cmp eax,11
  71.         je still
  72.  
  73.         cmp eax,13
  74.         je still
  75.  
  76.         cmp eax,12
  77.         je still
  78.  
  79.         cmp eax,51
  80.         jne no_palette_
  81.  
  82.         call TakeButtonInstruments
  83.         jmp still
  84.  
  85.         no_palette_:
  86.  
  87.         cmp eax,17
  88.         je still
  89.  
  90.         cmp eax,21
  91.         jne no_allocation__
  92.  
  93.         and [Activate_instrument],0
  94.         jmp still
  95.  
  96.         no_allocation__:
  97.  
  98.         cmp eax,20
  99.         jne no_kontur__
  100.  
  101.         and [instrument_used],0
  102.         jmp still
  103.  
  104.         no_kontur__:
  105.  
  106.         call TakeButtonInstruments
  107.  
  108.         jmp still