Subversion Repositories Kolibri OS

Rev

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

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