mirror of
https://github.com/KolibriOS/kolibrios.git
synced 2024-12-24 07:36:48 +03:00
95 lines
1.9 KiB
PHP
95 lines
1.9 KiB
PHP
|
SMZ_levelp:
|
|||
|
call get_xy_sf
|
|||
|
xor eax,eax
|
|||
|
mov [stepptr],esi
|
|||
|
lodsb
|
|||
|
mov [cur_step],esi
|
|||
|
add esi,eax
|
|||
|
mov [levptr],esi
|
|||
|
call unpack_level
|
|||
|
ret
|
|||
|
|
|||
|
SMZ_key:
|
|||
|
cmp eax,176
|
|||
|
jb .ex
|
|||
|
cmp eax,179
|
|||
|
ja .ex
|
|||
|
mov ecx,[cur_step]
|
|||
|
movzx ecx,byte[ecx]
|
|||
|
lea ebx,[eax-176]
|
|||
|
mov eax,[player]
|
|||
|
.lp:
|
|||
|
call check_move
|
|||
|
jc .exl
|
|||
|
add eax,[dirs+ebx*4]
|
|||
|
loop .lp
|
|||
|
.exl:
|
|||
|
test ecx,ecx
|
|||
|
jne .ex
|
|||
|
mov [player],eax
|
|||
|
cmp eax,[finish]
|
|||
|
jne .nowin
|
|||
|
mov [win_flag],1
|
|||
|
.nowin:
|
|||
|
mov esi,[stepptr]
|
|||
|
movzx eax,byte[esi]
|
|||
|
inc esi
|
|||
|
lea ebx,[esi+eax]
|
|||
|
inc [cur_step]
|
|||
|
cmp [cur_step],ebx
|
|||
|
jb .ex
|
|||
|
mov [cur_step],esi
|
|||
|
.ex:
|
|||
|
ret
|
|||
|
|
|||
|
SMZ_drawm:
|
|||
|
mov eax,[player]
|
|||
|
call get_xy
|
|||
|
mcall 13,[lx],[ly],0xff00
|
|||
|
mov eax,[finish]
|
|||
|
call get_xy
|
|||
|
mcall 13,[lx],[ly],0xff0000
|
|||
|
cmp [win_flag],1
|
|||
|
je .ex
|
|||
|
mov edi,[stepptr]
|
|||
|
movzx ecx,byte[edi]
|
|||
|
inc edi
|
|||
|
mov edx,(XFOFS+MSGXO) shl 16+42
|
|||
|
mov ebx,0x010000
|
|||
|
mov eax,47
|
|||
|
.lp:
|
|||
|
push ecx
|
|||
|
mov esi,0x10000000
|
|||
|
movzx ecx,byte[edi]
|
|||
|
cmp edi,[cur_step]
|
|||
|
jne .nocur
|
|||
|
mov esi,0x100000ff
|
|||
|
mcall
|
|||
|
add edx,1 shl 16
|
|||
|
.nocur:
|
|||
|
mcall
|
|||
|
pop ecx
|
|||
|
add edx,10 shl 16
|
|||
|
inc edi
|
|||
|
loop .lp
|
|||
|
.ex:
|
|||
|
ret
|
|||
|
|
|||
|
SMZ_level:
|
|||
|
file 'smz.bin'
|
|||
|
|
|||
|
if lang eq ru
|
|||
|
SMZ_help mstr \
|
|||
|
'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><E1ABA5><EFBFBD><EFBFBD>⥫쭮<E2A5AB><ECADAE><EFBFBD> 室<><E5AEA4>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',\
|
|||
|
'<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD>ᢥ祭<E1A2A5><E7A5AD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⢮ <20><><EFBFBD>⮪',\
|
|||
|
'<27><> <20><>אַ<EFBFBD>, <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD>⨣<EFBFBD><E2A8A3><EFBFBD><EFBFBD> <20><><EFBFBD>᭮<EFBFBD><E1ADAE> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.','',\
|
|||
|
'http://puzzleprograms.narod.ru'
|
|||
|
else
|
|||
|
SMZ_help mstr \
|
|||
|
'Repeat sequence shown above the field moving the',\
|
|||
|
'green square by highlighted count of spaces as',\
|
|||
|
'many times as you like, until you finish at the',\
|
|||
|
'red square.','',\
|
|||
|
'http://puzzleprograms.narod.ru'
|
|||
|
end if
|