Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | Download | RSS feed

  1. TILT_levelp:
  2.     call SMZ_levelp
  3.     mov  esi,[stepptr]
  4.     movzx ecx,byte[esi]
  5.     mov  [finish],ecx
  6.     inc  ecx
  7.     mov  edi,area
  8.     rep  movsb
  9.     mov  [pause_time],10
  10.     ret
  11.  
  12. TILT_key:
  13.     cmp  eax,176
  14.     jb   .ex
  15.     cmp  eax,179
  16.     ja   .ex
  17.     mov  esi,area
  18.     inc  esi
  19.     lea  ebx,[eax-176]
  20.     mov  eax,[player]
  21.   .lp:
  22.     call check_move
  23.     jc   .ex1
  24.     add  eax,[dirs+ebx*4]
  25.     movzx ecx,byte[esi-1]
  26.     mov  edi,esi
  27.     repne scasb
  28.     jne  .notfound
  29.     mov  byte[edi-1],0xff
  30.     dec  dword[finish]
  31.   .notfound:
  32.     mov  [player],eax
  33.     call delay
  34.     call drwfld
  35.     jmp  .lp
  36.   .ex1:
  37.     cmp  dword[finish],0
  38.     jnz  .ex
  39.     mov  [win_flag],1
  40.   .ex:
  41.     ret
  42.  
  43. TILT_drawm:
  44.     mov  eax,[player]
  45.     call get_xy
  46.     mcall 13,[lx],[ly],0xff00
  47.     cmp  [win_flag],1
  48.     je   .ex
  49.     mov  edi,area
  50.     movzx ecx,byte[edi]
  51.     jecxz .ex
  52.     inc  edi
  53.   .lp:
  54.     push ecx
  55.     movzx eax,byte[edi]
  56.     cmp  eax,0xff
  57.     je   .no
  58.     call get_xy
  59.     mcall 13,[lx],[ly],0xff0000
  60.   .no:
  61.     pop  ecx
  62.     inc  edi
  63.     loop .lp
  64.   .ex:
  65.     ret
  66.  
  67. TILT_level:
  68. file 'tilt.bin'
  69.  
  70. if lang eq ru
  71.         TILT_help mstr \
  72.         '« èª  (§¥«¥­ë© ª¢ ¤à â) «¥¦¨â ­  ¤®áª¥, ª®â®àãî',\
  73.         '¬®¦­® ­ ª«®­ïâì ¯® £®à¨§®­â «¨ ¨ ¢¥à⨪ «¨',\
  74.         ' ®á«¥ ­ ª«®­  ¯« èª  ᪮«ì§¨â, ¯®ª  ­¥ ­ âª­¥âáï',\
  75.         '­  á⥭ªã. ¥«ì§ï ®áâ ­®¢¨âì ¯« èªã ¢® á¥à¥¤¨­¥',\
  76.         '¯ãâ¨.',\
  77.         ' ‚ è  § ¤ ç  - § áâ ¢¨âì ¯« èªã ¯®á¥â¨âì ª«¥âª¨',\
  78.         'á ªà á­ë¬¨ ª¢ ¤à â ¬¨.','',\
  79.         'http://www.clickmazes.com'
  80. else
  81.         TILT_help mstr \
  82.   'You are to imagine that a marble (shown here as a',\
  83.   'green square) is on a board that you can tilt',\
  84.   'only to the north, south, east, or west. (You',\
  85.   "can't do anything tricky like tilt it southeast.)",\
  86.   '  Once you tilt the board, the marble will roll',\
  87.   '(horizontally or vertically) until it hits a',\
  88.   "barrier. There's no way you can stop the marble",\
  89.   'in the middle of its roll.',\
  90.   '  The object is to roll the marble onto or over',\
  91.   'every red square in the maze.','',\
  92.         'http://www.clickmazes.com'
  93. end if
  94.