Subversion Repositories Kolibri OS

Rev

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

  1. ; level format
  2. ; [fx|fy][blue xy][red xy]..[maze walls]
  3.  
  4. ; internal format
  5. ; [player]= blue
  6. ; [finish]= red
  7.  
  8.  
  9. CSTEP_key:
  10.     cmp  eax,176
  11.     jb   .ex
  12.     cmp  eax,179
  13.     ja   .ex
  14.     mov  esi,area
  15.     inc  esi
  16.     lea  ebx,[eax-176]
  17.     mov  [jump],still
  18.     mov  eax,[player]
  19.     call check_move
  20.     jc   .ex
  21.     add  eax,[dirs+ebx*4]
  22.     mov  edx,eax
  23.   .nom1:
  24.     mov  eax,[finish]
  25.     xor  ebx,11b
  26.     call check_move
  27.     jc   .ex
  28.     add  eax,[dirs+ebx*4]
  29.     mov  [finish],eax
  30.     mov  [player],edx
  31.     mov  [jump],drw
  32.     cmp  eax,edx
  33.     jnz  .ex
  34.     mov  [win_flag],1
  35.   .ex:
  36.     ret
  37.  
  38. CSTEP_drawm:
  39.     mov  eax,[player]
  40.     call get_xy
  41.     mcall 13,[lx],[ly],0xff0000
  42.     mov  eax,[finish]
  43.     call get_xy
  44.     mcall 13,[lx],[ly],0xff
  45.     ret
  46.  
  47. CSTEP_level:
  48. file 'cstep.bin'
  49.  
  50. if lang eq ru
  51.         CSTEP_help mstr \
  52.         '‘®¥¤¨­¨â¥ ªà á­ë© ¨ ᨭ¨© ¡«®ª¨ ¯ã⥬ ã¯à ¢«¥­¨ï',\
  53.         '®¤­¨¬ ªà á­ë¬ ¡«®ª®¬. ‘¨­¨© ¡«®ª á«¥¤ã¥â § ',\
  54.         'ªà á­ë¬, ­® ¤¢¨¦¥âáï ¢ ¯àאַ ¯à®â¨¢®¯®«®¦­®¬',\
  55.         '­ ¯à ¢«¥­¨¨. •®¤ à §à¥è¥­ ⮫쪮 ¢ á«ãç ¥',\
  56.         '®âáãâáâ¢¨ï ¯à¥¯ïâá⢨© ¤«ï ®¡®¨å ¡«®ª®¢.','',\
  57.         'http://www.clickmazes.com'
  58. else
  59.         CSTEP_help mstr \
  60.   'Unite the red and blue dots by moving just the',\
  61.   'red dot. The blue dot follows the red dot, but',\
  62.   'moves in exactly in the opposite direction. A',\
  63.   'move is only permitted if the path is clear for',\
  64.   'both dots.','',\
  65.         'http://www.clickmazes.com'
  66. end if
  67.