Subversion Repositories Kolibri OS

Rev

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

  1. write_score:
  2.  
  3.     mov  eax,13
  4.     mov  ebx,((LEN_X-BORDER_LEFT-BORDER_RIGHT)*ADOBE_SIZE+X_LOCATION*2-3)*65536+95         ;clear box to write new score
  5.     mov  ecx,20*65536+((LEN_Y-BORDER_TOP-BORDER_BOTTOM)*ADOBE_SIZE+Y_LOCATION-20)
  6.     mov  edx,0x00000000
  7.     int  40h
  8.  
  9.     mov  ebx,((LEN_X-BORDER_LEFT-BORDER_RIGHT)*ADOBE_SIZE+X_LOCATION*2)*65536+25         ; draw info text with function 4
  10.     mov  ecx,0xffff00              ; color
  11.     mov  edx,scoretext
  12.     mov  esi,linestext-scoretext
  13.     mov  eax,4
  14.     int  0x40
  15.  
  16.     mov  eax,[score]
  17.     call number_to_str
  18.  
  19.  
  20.     mov  ebx,((LEN_X-BORDER_LEFT-BORDER_RIGHT)*ADOBE_SIZE+X_LOCATION*2+35)*65536+25         ; draw info text with function 4
  21.     mov  ecx,0xffff00              ; color
  22.     mov  edx,number_str
  23.     mov  esi,[size_of_number_str]
  24.     mov  eax,4
  25.     int  0x40
  26.  
  27.     mov  ebx,((LEN_X-BORDER_LEFT-BORDER_RIGHT)*ADOBE_SIZE+X_LOCATION*2)*65536+35         ; draw info text with function 4
  28.     mov  ecx,0xffff00              ; color
  29.     mov  edx,linestext
  30.     mov  esi,speedtext-linestext
  31.     mov  eax,4
  32.     int  0x40
  33.  
  34.     mov  eax,[lines]
  35.     call number_to_str
  36.  
  37.  
  38.     mov  ebx,((LEN_X-BORDER_LEFT-BORDER_RIGHT)*ADOBE_SIZE+X_LOCATION*2+35)*65536+35         ; draw info text with function 4
  39.     mov  ecx,0xffff00              ; color
  40.     mov  edx,number_str
  41.     mov  esi,[size_of_number_str]
  42.     mov  eax,4
  43.     int  0x40
  44.  
  45.     mov  ebx,((LEN_X-BORDER_LEFT-BORDER_RIGHT)*ADOBE_SIZE+X_LOCATION*2)*65536+45         ; draw info text with function 4
  46.     mov  ecx,0xffff00              ; color
  47.     mov  edx,speedtext
  48.     mov  esi,leveltext-speedtext
  49.     mov  eax,4
  50.     int  0x40
  51.  
  52.     mov  eax,[speed]
  53.     call number_to_str
  54.  
  55.  
  56.     mov  ebx,((LEN_X-BORDER_LEFT-BORDER_RIGHT)*ADOBE_SIZE+X_LOCATION*2+35)*65536+45         ; draw info text with function 4
  57.     mov  ecx,0xffff00              ; color
  58.     mov  edx,number_str
  59.     mov  esi,[size_of_number_str]
  60.     mov  eax,4
  61.     int  0x40
  62.  
  63.     mov  ebx,((LEN_X-BORDER_LEFT-BORDER_RIGHT)*ADOBE_SIZE+X_LOCATION*2)*65536+55         ; draw info text with function 4
  64.     mov  ecx,0xffff00              ; color
  65.     mov  edx,leveltext
  66.     mov  esi,startgame-leveltext
  67.     mov  eax,4
  68.     int  0x40
  69.  
  70.     mov  eax,[level]
  71.     call number_to_str
  72.  
  73.  
  74.     mov  ebx,((LEN_X-BORDER_LEFT-BORDER_RIGHT)*ADOBE_SIZE+X_LOCATION*2+35)*65536+55         ; draw info text with function 4
  75.     mov  ecx,0xffff00              ; color
  76.     mov  edx,number_str
  77.     mov  esi,[size_of_number_str]
  78.     mov  eax,4
  79.     int  0x40
  80.  
  81.     call draw_next_block
  82.  
  83. ret
  84.  
  85.  
  86. number_to_str:
  87.  
  88.     mov edi,end_number_str-1
  89.     mov ecx,9;size_of_number_str
  90.     mov ebx,10
  91.     cld
  92.   new_digit:
  93.     xor edx,edx
  94.     div ebx
  95.     add dl,'0'
  96.     mov [edi],dl
  97.     dec edi
  98.     loop new_digit
  99.  
  100. ret