Subversion Repositories Kolibri OS

Rev

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

  1. NLT_levelp:
  2.                 mov  eax,OR_strip
  3.                 call need_image
  4.                 xor  eax,eax
  5.                 lodsb
  6.                 lodsb
  7.                 mov  [fx],eax
  8.                 lodsb
  9.                 mov  [fy],eax
  10.                 lodsw
  11.                 mov  [player],eax
  12.                 mov  dword[area],5
  13.                 lodsw
  14.                 mov  [finish],eax
  15.     call get_xy_sf.count
  16.     mov  [levptr],esi
  17.     call unpack_level
  18.     ret
  19.  
  20. NLT_key:
  21.                 mov  [jump],still
  22.     cmp  eax,176
  23.     jb   .ex
  24.     cmp  eax,179
  25.     ja   .ex
  26.     lea  ebx,[eax-176]
  27.     mov  eax,[player]
  28.     call check_move
  29.     jc   .ex
  30.     mov  ecx,ebx
  31.     mov  edx,ebx
  32.                 movzx ecx,byte[dir_rotate+ecx]
  33.                 cmp  ecx,dword[area]
  34.                 je   .ex
  35.                 xor  edx,11b
  36.                 cmp  edx,dword[area]
  37.                 je   .ex
  38.     add  eax,[dirs+ebx*4]
  39.     mov  dword[area],ebx
  40.     mov  [player],eax
  41.     cmp  eax,[finish]
  42.     jne  .nowin
  43.     mov  [win_flag],1
  44.   .nowin:
  45.                 mov  [jump],drw
  46.   .ex:
  47.     ret
  48.  
  49. NLT_drawm:
  50.     push [sq_size]
  51.     mov  [sq_size],0
  52.     mov  eax,[finish]
  53.     mov  ebx,6
  54.     call out_image
  55. ;    mcall 13,[lx],[ly],0xff0000
  56.     mov  ebx,dword[area]
  57.     cmp  ebx,5
  58.     jne  .skip
  59.     mov  eax,[player]
  60.     mov  edi,eax
  61.     pop  [sq_size]
  62.     call get_xy
  63.     mcall 13,[lx],[ly],0x8000
  64.     jmp  .ex
  65.   .skip:
  66.     add  ebx,8
  67.     mov  eax,[player]
  68.     call out_image
  69.     pop  [sq_size]
  70.   .ex:
  71.     ret
  72.  
  73. NLT_level:
  74. file 'nolt.bin'
  75.  
  76. if lang eq ru
  77.         NLT_help mstr \
  78.         '‚ è  § ¤ ç  - ¯à®¢¥á⨠§¥«¥­ë© ª¢ ¤à â ª ªà á­®¬ã',\
  79.         '¡¥§ ¯®¢®à®â  ­ «¥¢® ¨ ¤¢¨¦¥­¨ï ­ § ¤. â® âà㤭¥¥',\
  80.         '祬 ª ¦¥âáï. ‚­¨¬ ­¨¥: ¥á«¨ ‚ë ¯à¨¬¥â¥ ¯«®å®¥',\
  81.         'à¥è¥­¨¥, ¬®¦¥â¥ ¯®¯ áâì ¢ â㯨ª ¨ ¡ã¤¥â¥',\
  82.         '¢ë­ã¦¤¥­ë ­ ç âì á­ ç « .','',\
  83.   'http://puzzleprograms.narod.ru'
  84. else
  85.         NLT_help mstr \
  86.   'Your challenge is to manouvre the green dot to',\
  87.   'the red square without ever turning left, or',\
  88.   'making a U-turn. Harder than it looks. Beware, if',\
  89.   'you make a bad decision in this maze you may get',\
  90.   'completely stuck and have to restart.','',\
  91.         'http://www.clickmazes.com'
  92. end if
  93.