Subversion Repositories Kolibri OS

Rev

Rev 5312 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
5312 Anton_K 1
 
2
3
 
4
5
 
6
.Height = 25
7
8
 
9
w equ level1.OtherWall
10
_ equ level1.PassableArea
11
. equ level1.OtherPassableArea
5330 Anton_K 12
0 equ level1.NotPassableArea
5312 Anton_K 13
 
14
I equ level1.IronDoor
15
L equ level1.WallWithLever1
16
q equ level1.WallWithLever2
17
v equ level1.WallWithLever3
18
e equ level1.WallWithLever4
19
c equ level1.ColumnArea
20
o equ level1.OgreArea
21
P equ level1.PortalArea
22
23
 
24
dd W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W
25
dd W,_,_,W,W,_,_,W,_,W,_,W,_,_,_,_,W,W,W,W,W,W,W,W
26
dd W,_,_,W,W,_,_,W,_,W,_,W,_,_,_,_,_,_,_,_,_,_,_,W
27
dd W,_,_,_,_,_,_,W,_,W,_,W,_,_,_,_,_,_,_,_,_,_,_,W
28
dd W,W,W,_,_,W,W,W,_,W,L,W,_,_,_,W,W,W,_,_,_,W,W,W
29
dd W,_,_,_,_,_,_,W,_,_,_,W,_,_,_,W,0,W,_,_,_,W,0,W
30
dd W,_,W,_,W,_,_,W,_,W,W,W,W,W,_,W,c,_,_,_,_,_,c,W
31
dd W,_,W,_,W,_,_,W,_,W,W,W,W,W,_,W,_,_,_,c,_,_,_,W
32
dd W,W,W,_,W,W,W,W,%,W,W,W,W,W,_,W,_,_,W,0,W,_,_,W
33
dd W,_,W,_,W,_,_,_,_,_,_,_,W,W,_,W,_,_,W,W,W,_,_,W
34
dd W,_,W,W,W,_,_,_,_,_,_,_,I,_,_,W,_,_,_,_,_,_,_,W
35
dd W,_,_,_,W,_,_,_,_,_,_,_,W,W,W,W,W,W,W,W,W,%,W,W
36
dd W,_,_,_,W,W,W,W,q,v,e,W,W,_,_,_,_,_,_,_,_,_,_,W
37
dd W,_,_,_,_,_,_,_,_,_,_,_,W,_,W,W,W,W,W,W,W,W,W,W
38
dd W,_,_,_,W,_,_,_,_,_,_,_,W,o,W,_,_,_,_,_,_,_,_,W
39
dd W,_,_,_,W,W,W,W,W,W,W,W,W,0,W,w,w,w,_,_,_,_,_,W
5330 Anton_K 40
dd W,_,_,_,W,_,_,_,_,_,_,w,_,_,w,w,w,w,w,w,w,w,w,w
41
dd W,_,_,_,_,_,_,_,_,_,_,w,_,_,w,.,.,.,.,.,.,.,.,w
42
dd W,_,_,_,_,_,_,_,_,_,_,w,_,_,w,.,.,w,w,.,w,w,.,w
43
dd W,_,_,_,_,_,_,_,_,_,_,w,_,_,_,.,.,w,.,.,.,w,.,w
44
dd W,_,_,_,_,_,_,_,_,_,_,w,_,_,_,.,.,.,.,P,.,.,.,w
45
dd W,_,_,_,_,_,_,_,_,_,_,w,_,_,_,.,.,w,.,.,.,w,.,w
46
dd W,_,_,_,_,_,_,_,_,_,_,w,_,_,w,.,.,w,w,.,w,w,.,w
47
dd W,_,_,_,_,_,_,_,_,_,_,w,_,_,w,.,.,.,.,.,.,.,.,w
48
dd W,W,W,W,W,W,W,W,W,W,W,w,w,w,w,w,w,w,w,w,w,w,w,w
49
5312 Anton_K 50
 
5330 Anton_K 51
5312 Anton_K 52
 
53
.Column1                akode.Object            textures.Column1, <16, 5>, 1, 0
54
.Column2                akode.Object            textures.Column2, <19, 8>, 1, 0
55
.Column3                akode.Object            textures.Column3, <22, 5>, 1, 0
56
.Ogre                   akode.Object            textures.Ogre, <13, 15>, 1, 0
57
.Portal                 akode.Object            textures.Portal, <19, 20>, 1, 1
58
59
 
60
61
 
62
                                                , \
63
                                                , \
64
                                                , \
65
                                                <0, 0>,                    \
66
                                                <0, 0>,                    \
67
                                                0, 0
68
69
 
70
                                                , \
71
                                                , \
72
                                                , \
73
                                                <0, 0>,                    \
74
                                                <0, 0>,                    \
75
                                                0, 0
76
77
 
78
                                                , \
79
                                                , \
80
                                                , \
81
                                                <0, 0>,                                         \
82
                                                <0, 0>,                                         \
83
                                                0, 0
84
85
 
86
                                                , \
87
                                                , \
88
                                                , \
89
                                                <0, 0>,                 \
90
                                                <0, 0>,                 \
91
                                                0, 0
92
93
 
94
                                                ,  \
95
                                                ,                      \
96
                                                ,    \
97
                                                <0, 0>,                                         \
98
                                                <0, 0>,                                         \
99
                                                0, 0
100
101
 
102
                                                ,    \
103
                                                ,                      \
104
                                                ,  \
105
                                                <0, 0>,                                         \
106
                                                <0, 0>,                                         \
107
                                                0, 0
108
109
 
110
                                                ,    \
111
                                                ,                      \
112
                                                ,  \
113
                                                <0, 0>,                                         \
114
                                                <0, 0>,                                         \
115
                                                0, 0
116
117
 
118
                                                ,    \
119
                                                ,                      \
120
                                                ,  \
121
                                                <0, 0>,                                         \
122
                                                <0, 0>,                                         \
123
                                                0, 0
124
125
 
126
                                                <0, 0>,                     \
127
                                                <0, 0>,                     \
128
                                                <0, 0>,                     \
129
                                                , \
130
                                                , \
131
                                                1, 0
132
133
 
5330 Anton_K 134
                                                <0, 0>,                  \
135
                                                <0, 0>,                  \
136
                                                <0, 0>,                  \
137
                                                , \
138
                                                , \
139
                                                1, 0
140
141
 
5312 Anton_K 142
                                                <0, 0>,                     \
143
                                                <0, 0>,                     \
144
                                                <0, 0>,                     \
145
                                                , \
146
                                                , \
147
                                                0, 0
148
149
 
150
                                                <0, 0>,                     \
151
                                                <0, 0>,                     \
152
                                                <0, 0>,                     \
153
                                                , \
154
                                                , \
155
                                                1, level1.columns
156
157
 
158
                                                <0, 0>,                     \
159
                                                <0, 0>,                     \
160
                                                <0, 0>,                     \
161
                                                , \
162
                                                , \
163
                                                1, level1.ogre
164
165
 
5330 Anton_K 166
                                                <0, 0>,                    \
167
                                                <0, 0>,                    \
168
                                                <0, 0>,                    \
169
                                                , \
170
                                                ,   \
171
                                                1, level1.portal
5312 Anton_K 172
173
 
174
.Sun1ImagePtr           dd 0
175
.Sun2ImagePtr           dd 0
176
.Sun3ImagePtr           dd 0
177
178
 
179
        stdcall load_object_image, .coin_file_path
180
        mov     [level1.CoinImagePtr], eax
181
        stdcall load_object_image, .sun1_file_path
182
        mov     [level1.Sun1ImagePtr], eax
183
        stdcall load_object_image, .sun2_file_path
184
        mov     [level1.Sun2ImagePtr], eax
185
        stdcall load_object_image, .sun3_file_path
186
        mov     [level1.Sun3ImagePtr], eax
187
188
 
189
        ret
190
191
 
192
.sun1_file_path db 'Resources/Textures/Objects/Sun1.png', 0
193
.sun2_file_path db 'Resources/Textures/Objects/Sun2.png', 0
194
.sun3_file_path db 'Resources/Textures/Objects/Sun3.png', 0
195
196
 
197
'Вы - искатель сокровищ. Тяга к наживе привела вас в    ', 10, \
198
'лесную пещеру, где, по рассказам селян, пару столетий  ', 10, \
199
'назад, один правитель, спрятал свою казну. В пещере вы ', 10, \
200
'нашли... дверь. Усилие - дверь открыта! Вы вошли внутрь', 10, \
201
'и дверь с грохотом захлопнулась. Возможно, это ваш шанс', 10, \
202
'найти несметные богатства или погибнуть...             '      >
203
204
 
205
206
 
207
        mov     eax, [action]
208
        mov     ebx, [cell_x]
209
        mov     ecx, [cell_y]
210
211
 
212
        imul    edx, level1.Width
213
        add     edx, ebx
214
        lea     edx, [level1.Grid + edx * 4]
215
216
 
217
        jne     .check_next_action
218
219
 
220
        jne     @f
221
        cmp     dword [level1.Grid + (8 * level1.Width + 8) * 4], level1.WallWithCrazyWoodDoor
222
        jne     .exit_no_message
223
224
 
225
        jmp     .exit
226
.message_door1_closed                           langstr0 ru, < \
227
'Заперто. У двери нет ни ручки, ни замочной скважины.   ', 10, \
228
'Вероятно, где-то должен быть скрытый механизм...       '      >
229
230
 
231
        jne     @f
232
        cmp     dword [level1.Grid + (11 * level1.Width + 21) * 4], level1.WallWithCrazyWoodDoor
233
        jne     .exit_no_message
234
235
 
236
        jmp     .exit
237
.message_door3_closed                           langstr0 ru, < \
238
'Такую дверь вы уже видели, и в прошлый раз она так     ', 10, \
239
'просто не открылась.                                   '      >
240
241
 
242
        jne     @f
243
        cmp     dword [level1.Grid + (8 * level1.Width + 8) * 4], level1.WallWithCrazyWoodDoor
244
        jne     .exit_no_message
245
246
 
247
        mov     dword [level1.Grid + (8 * level1.Width + 8) * 4], level1.PassableArea
248
249
 
250
        jmp     .exit
251
.message_door1_opens                            langstr0 ru, < \
252
'Вы слышите звук лебёдки и скрежет шестерёнок.          '      >
253
254
 
255
        jne     @f
256
        mov     eax, [level1.WallWithLever2.WallTexture2.DescPtr2]
257
        mov     ebx, [level1.WallWithLever2.WallTexture4.DescPtr2]
258
        mov     [level1.WallWithLever2.WallTexture2.DescPtr2], ebx
259
        mov     [level1.WallWithLever2.WallTexture4.DescPtr2], eax
260
        jmp     .3levers
261
262
 
263
        jne     @f
264
        mov     eax, [level1.WallWithLever3.WallTexture2.DescPtr2]
265
        mov     ebx, [level1.WallWithLever3.WallTexture4.DescPtr2]
266
        mov     [level1.WallWithLever3.WallTexture2.DescPtr2], ebx
267
        mov     [level1.WallWithLever3.WallTexture4.DescPtr2], eax
268
        jmp     .3levers
269
270
 
271
        jne     @f
272
        mov     eax, [level1.WallWithLever4.WallTexture2.DescPtr2]
273
        mov     ebx, [level1.WallWithLever4.WallTexture4.DescPtr2]
274
        mov     [level1.WallWithLever4.WallTexture2.DescPtr2], ebx
275
        mov     [level1.WallWithLever4.WallTexture4.DescPtr2], eax
276
        jmp     .3levers
277
278
 
279
        jne     @f
280
        cmp     dword [level1.Grid + (10 * level1.Width + 12) * 4], level1.IronDoor
281
        jne     .exit_no_message
282
        mov     eax, .message_door2_closed
283
        jmp     .exit
284
285
 
286
287
 
288
        cmp     ax, AKODE_ACTION.CELL_ENTER
289
        jne     .exit_no_message
290
291
 
292
        jne     @f
293
        cmp     [level1.Chest.Visible], 1
294
        jne     .exit_no_message
295
296
 
297
        stdcall add_object_to_inventory, 1, [level1.Sun1ImagePtr]
298
        stdcall add_object_to_inventory, 2, [level1.Sun2ImagePtr]
299
        stdcall add_object_to_inventory, 3, [level1.Sun3ImagePtr]
300
301
 
302
        mov     eax, .message_chest
303
        jmp     .exit
304
.message_chest                                  langstr0 ru, < \
305
'Вы нашли сундук с барахлом: 1 золотой монеткой и       ', 10, \
306
'3-мя монетами с изображением солнца в разных фазах.    '      >
307
308
 
309
        jne     @f
310
        cmp     [level1.Ogre.Visible], 1
311
        jne     .exit_no_message
312
        mov     eax, .message_ogre
313
        jmp     .exit
314
315
 
316
'- Стой! Куда это ты? Дальше хода нет.                  '      >
317
318
 
319
320
 
321
        xor     eax, eax
322
323
 
324
        ret
325
326
 
327
        mov     eax, [level1.WallWithLever2.WallTexture2.DescPtr2]
328
        mov     ebx, [level1.WallWithLever3.WallTexture2.DescPtr2]
329
        mov     ecx, [level1.WallWithLever4.WallTexture2.DescPtr2]
330
331
 
332
        jne     @f
333
        cmp     ebx, textures.RedLeverUp
334
        jne     @f
335
        cmp     ecx, textures.RedLeverDown
336
        jne     @f
337
        mov     dword [level1.Grid + (10 * level1.Width + 12) * 4], level1.PassableArea
338
        mov     eax, .message_door2_opens
339
        jmp     .exit
340
341
 
342
        mov     eax, .message_3levers
343
        jmp     .exit
344
345
 
346
'Вы переставили этот рычаг в другое положение.          '      >
347
.message_door2_closed                           langstr0 ru, < \
348
'Хоть вы и полны сил, но сдвинуть эту дверь хоть на     ', 10, \
349
'миллиметр у вас не получилось.                         '      >
350
.message_door2_opens                            langstr0 ru, < \
351
'До вас донёсся металлический скрежет.                  '      >
352
endp
353
354
 
355
        mov     eax, [action]
356
5330 Anton_K 357
 
358
        jne     @f
359
        mov     eax, .message_description
360
        jmp     .exit
361
.message_description                            langstr0 ru, < \
362
'Перед вами стоит невысокая колонна с хорошо заметной   ', 10, \
363
'надписью. Колонна стоит здесь явно не для поддержки    ', 10, \
364
'потолка...                                             '      >
365
366
 
367
        jne     .exit_no_message
5312 Anton_K 368
369
 
370
        mov     ebx, eax
371
372
 
373
374
 
375
        jne     @f
376
        cmp     ebx, 1
377
        jne     .exit_no_message
378
        stdcall remove_object_from_inventory, 1
379
        mov     eax, [level1.Column4TextureDescPtr]
380
        mov     [level1.Column1.TextureDescPtr], eax
381
        mov     [level1.Column1.DisableShading], 1
382
        mov     eax, .message_activated
383
        jmp     .exit
384
385
 
386
        jne     @f
387
        cmp     ebx, 2
388
        jne     .exit_no_message
389
        stdcall remove_object_from_inventory, 2
390
        mov     eax, [level1.Column4TextureDescPtr]
391
        mov     [level1.Column2.TextureDescPtr], eax
392
        mov     [level1.Column2.DisableShading], 1
393
        mov     eax, .message_activated
394
        jmp     .exit
395
396
 
397
        jne     @f
398
        cmp     ebx, 3
399
        jne     .exit_no_message
400
        stdcall remove_object_from_inventory, 3
401
        mov     eax, [level1.Column4TextureDescPtr]
402
        mov     [level1.Column3.TextureDescPtr], eax
403
        mov     [level1.Column3.DisableShading], 1
404
        mov     eax, .message_activated
405
        jmp     .exit
406
407
 
408
.exit_no_message:
409
        xor     eax, eax
410
        ret
411
412
 
413
        mov     ecx, [level1.Column1.DisableShading]
414
        and     ecx, [level1.Column2.DisableShading]
415
        and     ecx, [level1.Column3.DisableShading]
416
        jecxz   @f
417
        mov     dword [level1.Grid + (11 * level1.Width + 21) * 4], level1.PassableArea
418
@@:
419
        ret
420
421
 
422
'Вы положили монету на колонну и она начала светиться   ', 10, \
5330 Anton_K 423
'странным светом.                                       '      >
424
endp
5312 Anton_K 425
426
 
427
        mov     eax, [action]
428
429
 
430
        jne     @f
431
        stdcall player_death
432
        xor     eax, eax
433
        jmp     .exit
434
435
 
436
        jne     .exit_default
437
        shr     eax, 16
438
        cmp     eax, 4
439
        jne     .exit_default
440
441
 
442
        mov     [level1.Ogre.Visible], 0
443
        stdcall remove_object_from_inventory, 4
444
        mov     eax, .message_ogre
445
        jmp     .exit
446
447
 
448
        xor     eax, eax
449
        dec     eax
450
.exit:
451
        ret
452
453
 
454
'- Ой! Монетка! А ну вернись!!!                         '      >
455
endp
456
457
 
458
        mov     eax, [action]
459
        cmp     ax, AKODE_ACTION.CELL_ENTER
460
        jne     @f
461
        stdcall game_over
462
@@:
463
        xor     eax, eax
464
        ret
465
endp
466