kolibrios-fun/programs/games/megamaze/trunk/cstep.inc
Yogev Ezra 7a91a704c5 Added sources of the following games: mario2, megamaze, MSquare, pig, soko.
git-svn-id: svn://kolibrios.org@1806 a494cfbc-eb01-0410-851d-a64ba20cac60
2011-01-30 11:17:50 +00:00

67 lines
1.4 KiB
PHP

; level format
; [fx|fy][blue xy][red xy]..[maze walls]
; internal format
; [player]= blue
; [finish]= red
CSTEP_key:
cmp eax,176
jb .ex
cmp eax,179
ja .ex
mov esi,area
inc esi
lea ebx,[eax-176]
mov [jump],still
mov eax,[player]
call check_move
jc .ex
add eax,[dirs+ebx*4]
mov edx,eax
.nom1:
mov eax,[finish]
xor ebx,11b
call check_move
jc .ex
add eax,[dirs+ebx*4]
mov [finish],eax
mov [player],edx
mov [jump],drw
cmp eax,edx
jnz .ex
mov [win_flag],1
.ex:
ret
CSTEP_drawm:
mov eax,[player]
call get_xy
mcall 13,[lx],[ly],0xff0000
mov eax,[finish]
call get_xy
mcall 13,[lx],[ly],0xff
ret
CSTEP_level:
file 'cstep.bin'
if lang eq ru
CSTEP_help mstr \
'‘®¥¤¨­¨â¥ ªà á­ë© ¨ ᨭ¨© ¡«®ª¨ ¯ã⥬ ã¯à ¢«¥­¨ï',\
'®¤­¨¬ ªà á­ë¬ ¡«®ª®¬. ‘¨­¨© ¡«®ª á«¥¤ã¥â § ',\
'ªà á­ë¬, ­® ¤¢¨¦¥âáï ¢ ¯àאַ ¯à®â¨¢®¯®«®¦­®¬',\
'­ ¯à ¢«¥­¨¨. •®¤ à §à¥è¥­ ⮫쪮 ¢ á«ãç ¥',\
'®âáãâáâ¢¨ï ¯à¥¯ïâá⢨© ¤«ï ®¡®¨å ¡«®ª®¢.','',\
'http://www.clickmazes.com'
else
CSTEP_help mstr \
'Unite the red and blue dots by moving just the',\
'red dot. The blue dot follows the red dot, but',\
'moves in exactly in the opposite direction. A',\
'move is only permitted if the path is clear for',\
'both dots.','',\
'http://www.clickmazes.com'
end if