Subversion Repositories Kolibri OS

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1806 yogev_ezra 1
; level format
2
; [fx|fy][blue xy][red xy][blue point xy][red point xy]..[maze walls]
3
 
4
; internal format
5
; points db=[stepptr]
6
; [player]= blue
7
; [finish]= red
8
; area: ..[1-red,0-black xy].. ( -1 if empty)
9
 
10
TILT2_levelp:
11
    call get_xy_sf
12
    mov  [stepptr],esi
13
    add  esi,2
14
    call unpack_level
15
    mov  [pause_time],10
16
    ret
17
 
18
TILT2_key:
19
    cmp  eax,176
20
    jb   .ex
21
    cmp  eax,179
22
    ja   .ex
23
    mov  esi,area
24
    inc  esi
25
    lea  ebx,[eax-176]
26
  .lp:
27
    xor  edx,edx
28
    mov  eax,[player]
29
    call check_move
30
    jc   .nom1
31
    inc  edx
32
    add  eax,[dirs+ebx*4]
33
    mov  [player],eax
34
  .nom1:
35
    mov  eax,[finish]
36
    call check_move
37
    jc   .nom2
38
    inc  edx
39
    add  eax,[dirs+ebx*4]
40
    mov  [finish],eax
41
  .nom2:
42
  	test edx,edx
43
  	jz   .ex1
44
    call delay
45
    call drwfld
46
    jmp  .lp
47
  .ex1:
48
    mov  eax,[finish]
49
    cmp  eax,[player]
50
    jnz  .ex2
51
    mov  [win_flag],2
52
    jmp  TILT2_drawm.skip
53
  .ex2:
54
  	mov  esi,[stepptr]
55
  	cmp  al,[esi+1]
56
  	jne  .ex
57
  	mov  eax,[player]
58
  	cmp  al,[esi]
59
  	jne  .ex
60
    mov  [win_flag],1
61
  .ex:
62
    ret
63
 
64
TILT2_drawm:
65
		cmp  [win_flag],2
66
		je   .skip
67
;		mov  [sq_size],3
68
    mov  eax,[player]
69
    call get_xy
70
    mcall 13,[lx],[ly],0xff
71
    mov  eax,[finish]
72
    call get_xy
73
    mcall 13,[lx],[ly],0xff0000
74
  .skip:
75
		shl  [sq_size],1
76
    mov  esi,[stepptr]
77
    lodsb
78
    call get_xy
79
    mcall 13,[lx],[ly],0xff
80
    lodsb
81
    call get_xy
82
		shr  [sq_size],1
83
    mcall 13,[lx],[ly],0xff0000
84
    ret
85
 
86
TILT2_level:
87
file 'tilt2.bin'
88
 
89
if lang eq ru
90
	TILT2_help mstr \
91
	'Красный и синий блоки должны достичь клеток',\
92
	'соответствующего цвета. Внимание! Блоки сделаны',\
93
	'из агрессивного материала, и при столкновении',\
94
	'мгновенно испаряются. В этом случае Вам придется',\
95
	'начать уровень сначала.','',\
96
	'http://www.clickmazes.com'
97
else
98
	TILT2_help mstr \
99
  'The red block must reach the red target and the',\
100
  'blue block the blue target. Beware! The two',\
101
  'blocks are made of highly reactive material and,',\
102
  'if they collide, will instantly evaporate. At',\
103
  'this point you must start all over again.','',\
104
	'http://www.clickmazes.com'
105
end if