Subversion Repositories Kolibri OS

Rev

Rev 3013 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. IDA equ 1 ; We're running debugida.exe
  2.  
  3. STRIP  equ 40
  4. LEVNUM equ 500
  5.  XFOFS equ 10
  6.  YFOFS equ 55
  7.  MSGXO equ 32
  8. GAMES_ALL equ 12
  9. WNDCOLOR equ 0x13c0c0c0;0x13f6f6f6;
  10. MINCS equ 40
  11. MAXCS equ 80
  12. macro icall lbl
  13. {
  14.         call [lbl+ebp*4]
  15. }
  16.  
  17.   use32
  18.   org     0x0
  19.  
  20.   db     'MENUET01'              ; 8 byte id
  21.   dd     0x01                    ; header version
  22.   dd     run                     ; start of code
  23.   dd     I_END                   ; size of image
  24.   dd     end_mem                 ; memory for app
  25.   dd     stack_end                ; esp
  26.   dd     0x0 , 0x0               ; I_Param , I_Icon
  27. lang fix ru
  28. include "macros.inc"
  29. purge mov
  30. ;include "../../../debug.inc"
  31. COLOR_ORDER equ MENUETOS
  32.  
  33. include 'gif_lite.inc'
  34.  
  35. include 'tam.inc'
  36. include 'smz.inc'
  37. include 'tilt.inc'
  38. include 'tilt2.inc'
  39. include 'fhouse.inc'
  40. include 'loops.inc'
  41. include 'wriggle.inc'
  42. include 'blackbox.inc'
  43. include 'marble.inc'
  44. include 'cstep.inc'
  45. include 'orient.inc'
  46. include 'nolt.inc'
  47. include 'colzone.inc'
  48.  
  49. run:
  50.                 mov  [Ces],STRIP;20
  51.     mcall 3
  52.     mov  cl,16
  53.     ror  eax,cl
  54.     mov  [generator],eax    ; random generator from Tetris
  55.  
  56.                 and [mpress_flag],0
  57.                 and [gif_unp],0
  58.     xor  ebp,ebp ; game_t
  59. ;    mov  ebp,10
  60.     mcall 64,1,end_mem
  61.     mov  [pause_time],40
  62.     call resize
  63.   .game1:
  64.     mov  [levnum],LEVNUM
  65.   .game:
  66.     and  [win_flag],0
  67.     and  [drag_flag],0
  68.     mov  ecx,[levnum]
  69.     mov  esi,[levels+ebp*4]
  70.     jecxz .skip
  71.   .nxt:
  72.     movzx eax,byte[esi]
  73.     add  esi,eax
  74.     xor  eax,eax
  75.     cmp  al,byte[esi]
  76.     jne  .noz
  77.     mov  esi,LEVNUM;500
  78.     sub  esi,ecx
  79.     mov  [levcount],esi
  80.     and  [levnum],0
  81.     jmp  .game
  82.   .noz:
  83.     loop .nxt
  84.   .skip:
  85.                 mcall 40,111b
  86.           mov  [mouse_processed],1
  87.     xor  eax,eax
  88.     icall prepare_level
  89. wnd_size:
  90.         mov  eax,[Ces]
  91.           shr  eax,2
  92.           sub  eax,2
  93.     mov  [sq_size],eax
  94.   if ~ IDA eq 1
  95.     mov   edx,[fx]
  96.     imul  edx,[Ces]
  97.     add   edx,XFOFS*2+20
  98.     mov   esi,[fy]
  99.     imul  esi,[Ces]
  100.     add   esi,YFOFS+30
  101.     mov   ecx,-1
  102.     mcall 67,ecx
  103.   end if
  104. red:
  105.     call  draw_window
  106.  
  107. drw:
  108.                 call  drwfld
  109.  
  110. still:
  111.     mcall 2
  112.     test al,al
  113.     jz   still
  114.     mcall 10
  115.     cmp  eax,2
  116.     je   key
  117.     cmp  eax,1                  ; redraw request ?
  118.     je   red
  119.     cmp  eax,3                  ; button in buffer ?
  120.     je   button
  121.     cmp  eax,6                  ; mouse event ?
  122.     je   mouse
  123. key:
  124.     mcall 2
  125. ;    movzx ebx,ah
  126. ;    dpd  ebx
  127.                 cmp  ebp,10
  128.                 je   .noplus
  129.     mov  ebx,5
  130.     cmp  ah,184
  131.     jne  .nomin
  132.     cmp  [Ces],MINCS
  133.     je   still
  134.   .ces:
  135.     sub  [Ces],ebx
  136.     call resize
  137.     jmp  wnd_size
  138.   .nomin:
  139.     cmp  ah,183
  140.     jne  .noplus
  141.     cmp  [Ces],MAXCS
  142.     je   still
  143.     neg  ebx
  144.     jmp  .ces
  145.         .noplus:
  146.     cmp  ah,'h'
  147.     jne  .nohlp
  148. ;  if IDA eq 1
  149. ;    cmp  [child],0
  150. ;    jne  still
  151. ;  else
  152.     call kill_help
  153. ;  end if
  154.     mov  [pack],ebp
  155.     mcall 51,1,show_help,chs_end
  156. ;    dpd  eax
  157.     mov  [child],eax
  158.     jmp  still
  159.   .nohlp:
  160.     cmp  [win_flag],10
  161.     je   .levover
  162.     cmp  [win_flag],2
  163.     je   .no_win
  164.     cmp  [win_flag],1
  165.     jne  .now
  166.   .levover:
  167.     call lev_next
  168.   .no_win:
  169.     and  [win_flag],al
  170.     jmp  run.game
  171.   .now:
  172.     shr  eax,8
  173.     mov  [jump],drw;red
  174.     cmp  eax,13
  175.     je   run.game
  176.     icall key_handler
  177.     jmp  [jump]
  178.  
  179. button:
  180.     mcall 17
  181.     cmp  ah,1
  182.     je   close
  183.     cmp  ah,2
  184.     je   .game_type
  185.     cmp  ah,4
  186.     je   .inclev
  187.     cmp  ah,3
  188.     je   .declev
  189.     jmp  still
  190.   .declev:
  191.     dec  [levnum]
  192.     cmp  [levnum],0
  193.     jge  run.game
  194.     push [levcount]
  195.     pop  [levnum]
  196.     jmp  run.game
  197.   .inclev:
  198.     call lev_next
  199.     jmp  run.game
  200.   .game_type:
  201.     inc  ebp
  202.     cmp  ebp,GAMES_ALL
  203.     jbe  run.game1
  204.     xor  ebp,ebp
  205.     jmp  run.game1
  206.   close:
  207.   if ~ IDA eq 1
  208.     call kill_help
  209.   end if
  210.     mcall -1
  211.  
  212. ;if ~ IDA eq 1
  213.  
  214. kill_help:
  215.                 mcall 9,prc_info2,-1
  216.                 mov  edx,[child]
  217.                 mov  ecx,eax
  218.         .lp:
  219.                 mcall 9
  220.                 cmp  edx,[ebx+30]
  221.                 jne   .nochild
  222.                 mcall 18,2
  223.     and  [child],0
  224.                 ret
  225.         .nochild:
  226.                 loop .lp
  227.                 ret
  228.  
  229. ;end if
  230.  
  231. mouse:
  232.                 cmp  [mouse_processed],1
  233.                 jne  .ex
  234.                 mcall 37,1
  235.                 sub  eax,XFOFS shl 16+YFOFS
  236.                 xor  edx,edx
  237.                 mov  ebx,[Ces]
  238.                 mov  ecx,eax
  239.                 and  eax,0xffff
  240.                 div  ebx
  241.                 xor  edx,edx
  242.                 mov  [mouse_y],eax
  243.                 cmp  eax,[fy]
  244.                 jae  .ex
  245.                 mov  eax,ecx
  246.                 shr  eax,16
  247.                 div  ebx
  248.                 mov  [mouse_x],eax
  249.                 cmp  eax,[fx]
  250.                 jae  .ex
  251.                 mcall 37,2 ; get buttons
  252.                 cmp  [drag_flag],0
  253.                 je   .nodrag
  254.                 mov  ebx,eax
  255.                 cmp  eax,[mpress_flag]
  256.                 mov  eax,-1
  257.                 je   .nochg
  258.                 dec  eax
  259.         .nochg:
  260.                 mov  [mpress_flag],ebx
  261.                 jmp  .call_hnd
  262.         .nodrag:
  263.                 test eax,eax
  264.                 jz  .ex1
  265.                 cmp  eax,[mpress_flag]
  266.                 je   .ex
  267.                 mov  [mpress_flag],eax
  268.                 mov  eax,-1
  269.         .call_hnd:
  270.                 mov  [mouse_processed],0
  271.                 icall key_handler
  272.                 jmp  [jump]
  273.         .ex1:
  274.                 mov  [mpress_flag],0
  275.         .ex:
  276.                 jmp  still
  277.  
  278. lev_next:
  279.     push eax
  280.     inc  [levnum]
  281.     mov  eax,[levnum]
  282.     cmp  eax,[levcount]
  283.     jbe  .ex
  284.     and  [levnum],0
  285.   .ex:
  286.     pop  eax
  287.     ret
  288. ;---------------------------------------------------------------------
  289. ;   *********************************************
  290. ;   *******  WINDOW DEFINITIONS AND DRAW ********
  291. ;   *********************************************
  292. draw_window:
  293.     pusha
  294.     mcall 12,1
  295.     mov   ebx,[fx]
  296.     imul  ebx,[Ces]
  297.     push  ebx
  298.     add   ebx,50 shl 16+XFOFS*2+20
  299.     mov   ecx,[fy]
  300.     imul  ecx,[Ces]
  301.     add   ecx,10 shl 16+YFOFS+30
  302.         mov edx, WNDCOLOR
  303.         mov edi, header
  304.     mcall 0
  305.    
  306.         mov esi, edx
  307.         and     esi,0xffffff
  308.         mcall 9,prc_info,-1
  309.         pop     ebx
  310.    
  311.         mov     eax,[prc_info+70] ;status of window
  312.         test    eax,100b
  313.         jne     .end
  314.    
  315.     add   ebx,XFOFS shl 16
  316.  
  317.     mcall 8,,<25,12>,2
  318.  
  319.     mcall 8,<XFOFS,10>,<40,12>,3
  320.     add   ebx,13 shl 16
  321.     inc   edx
  322.     mcall
  323.  
  324.     mov   ecx,ebp
  325.     mov   edx,game_names+4
  326.     call  get_mstr
  327.     mcall 4,<XFOFS+2,28>,0x8000
  328.     imul  esi,6
  329.     add   esi,3
  330.     shl   esi,16
  331.     lea   edx,[ebx+esi]
  332.     mcall 47,0x020001,levnum,,0x8000
  333.  
  334.     mcall 4,<XFOFS+3,43>,0x108000,next_msg,3
  335. .end:
  336.     mcall 12,2
  337.     popa
  338.     ret
  339. ;---------------------------------------------------------------------
  340. unpack_level:
  341.     mov   ecx,[cell_count]
  342.     mov   edi,field
  343.   .lp:
  344.     movzx eax,byte[esi]
  345.     inc   esi
  346.     shl   ax,4
  347.     shr   al,4
  348.     stosw
  349.     loop  .lp
  350.     ret
  351. ;---------------------------------------------------------------------
  352. get_xy:
  353. ; eax-coord
  354. ; out: [lx]-[x+2][CS-4],[ly]-[y+2][CS-4]
  355.     pusha
  356.     xor   edx,edx
  357.     mov   esi,[sq_size]
  358.     lea   edi,[esi*2]
  359.     neg   edi
  360.     add   edi,[Ces]
  361.     mov   [lx],edi
  362.     mov   [ly],edi
  363.     mov   ebx,[fx]
  364.     div   bx
  365.     imul  eax,[Ces]
  366.     imul  edx,[Ces]
  367.     lea   edx,[edx+XFOFS+esi]
  368.     lea   eax,[eax+YFOFS+esi]
  369.     mov   word[ly+2],ax
  370.     mov   word[lx+2],dx
  371.     popa
  372.     ret
  373.  
  374. check_move:
  375. ; eax-coord, ebx-direction
  376. ; CF=0 if move is valid
  377.     bt   dword[field+eax],ebx
  378.     ret
  379.  
  380. delay:
  381.     pusha
  382.     mcall 5,[pause_time]
  383.     popa
  384.     ret
  385.  
  386. get_mstr:
  387. ; in:  edx,ecx
  388. ; out: edx,esi
  389.     mov   esi,[edx-4]
  390.     jecxz .ex
  391.     lea   edx,[edx+esi+4]
  392.     dec   ecx
  393.     jmp   get_mstr
  394.   .ex:
  395.     ret
  396.  
  397. maze_field:
  398.     mov   edi,field
  399.     mov   [ly],YFOFS shl 16+YFOFS
  400.     mov   eax,38
  401.     mov   ecx,[fy]
  402.   .lp1:
  403.     push  ecx
  404.     mov   [lx],XFOFS shl 16+XFOFS
  405.     mov   ecx,[fx]
  406.   .lp2:
  407.     push  ecx
  408.     xor   esi,esi
  409.   .lp3:
  410.     mov   edx,0xd0d0d0
  411.     bt    dword[edi],esi
  412.     jnc   .gray
  413.     mov   edx,0
  414.   .gray:
  415.     mov   ebx,[lx]
  416.     add   ebx,[dir_ofs+esi*4]
  417.     mov   ecx,[ly]
  418.     add   ecx,[dir_ofs+esi*4+8]
  419.     mcall
  420.     inc   esi
  421.     cmp   esi,4
  422.     jb    .lp3
  423.     inc   edi
  424.     mov   ecx,[Ces]
  425.     add   word[lx],cx
  426.     add   word[lx+2],cx
  427.     pop   ecx
  428.     loop  .lp2
  429.     mov   ecx,[Ces]
  430.     add   word[ly],cx
  431.     add   word[ly+2],cx
  432.     pop   ecx
  433.     loop  .lp1
  434.     ret
  435.  
  436. grid_field:
  437.     mov   edx,0xa0a0a0
  438.     mov   eax,38
  439.  
  440.     mov   ecx,[fy]
  441.     mov   ebx,[fx]
  442.     imul  ebx,[Ces]
  443.     add   ebx,XFOFS shl 16+XFOFS
  444.     mov   esi,YFOFS shl 16+YFOFS
  445.     inc   ecx
  446.   .lp1:
  447.     push  ecx
  448.     mov   ecx,esi
  449.     mcall
  450.     mov   ecx,[Ces]
  451.     add   esi,ecx
  452.     shl   ecx,16
  453.     add   esi,ecx
  454.     pop   ecx
  455.     loop  .lp1
  456.  
  457.     mov   ecx,[fx]
  458.     mov   esi,[fy]
  459.     imul  esi,[Ces]
  460.     add   esi,YFOFS shl 16+YFOFS
  461.     mov   ebx,XFOFS shl 16+XFOFS
  462.     inc   ecx
  463.   .lp2:
  464.     push  ecx
  465.     mov   ecx,esi
  466.     mcall
  467.     mov   ecx,[Ces]
  468.     add   ebx,ecx
  469.     shl   ecx,16
  470.     add   ebx,ecx
  471.     pop   ecx
  472.     loop  .lp2
  473.     ret
  474.  
  475. get_xy_sf:
  476.                 xor  eax,eax
  477.                 and  [player],eax
  478.     mov  [fx],eax
  479.     mov  [fy],eax
  480.     lodsb
  481.     lodsb
  482.     mov  ah,al
  483.     shr  ah,4
  484.     and  al,0xf
  485.     mov  byte[fx],ah
  486.     mov  byte[fy],al
  487.     lodsb
  488.     mov  byte[player],al
  489.     lodsb
  490.     mov  byte[finish],al
  491.   .count:
  492.     mov  eax,[fx]
  493.     mov  [dirs+4],eax
  494.     neg  eax
  495.     mov  [dirs+8],eax
  496.     mov  eax,[fx]
  497.     imul eax,[fy]
  498.     mov  [cell_count],eax
  499.  
  500.     ret
  501.  
  502. get_last_mclick:
  503. ; out - eax=0 no click or outside field
  504. ;                               eax>0 button pressed, ebx=[xy]
  505.                 mov  [mouse_processed],1
  506.                 mov  eax,[mpress_flag]
  507.                 mov  ebx,[mouse_y]
  508.                 imul ebx,[fx]
  509.                 add  ebx,[mouse_x]
  510.                 ret
  511.  
  512. erase_field:
  513.                 pusha
  514.                 mov  ecx,[cell_count]
  515.                 xor  eax,eax
  516.                 mov  edi,field
  517.                 rep  stosb
  518.                 popa
  519.                 ret
  520.  
  521. get_pxy:
  522. ; in: [pack] - cell#, out: word[pack] - packed  [xy]
  523.                 pusha
  524.                 mov  eax,[pack]
  525.                 cdq
  526.                 mov  ebx,[fx]
  527.                 div  ebx
  528.                 shl edx,8
  529.                 add  eax,edx
  530.                 mov  [pack],eax
  531.                 popa
  532.                 ret
  533.  
  534. check_bounds:
  535. ; in: eax - cell, ebx - dir
  536. ; out: ebx=-1 if bounds crossed
  537.                 push eax ecx
  538.                 mov  ecx,eax
  539.                 add  ecx,[dirs+ebx*4]
  540.                 mov  ebx,ecx
  541.                 call get_offset
  542.                 mov  ebx,eax
  543.                 pop  ecx eax
  544.     cmp  ebx,-1
  545.                 ret
  546.  
  547. get_offset:
  548. ; in: eax - start, ebx-end
  549. ; out: eax - dir or -1 if not straight
  550. ;      ebx - distance
  551.                 push ecx edx
  552.                 mov  ecx,-1
  553.                 mov  edx,[cell_count]
  554.                 cmp  eax,edx
  555.                 jae  .ex
  556.                 cmp  ebx,edx
  557.                 jae  .ex
  558.                 mov  [pack],eax
  559.                 call get_pxy
  560.                 mov  eax,[pack]
  561.                 mov  [pack],ebx
  562.                 call get_pxy
  563.                 mov  ebx,[pack]
  564.                 cmp  ah,bh ; compare X
  565.                 jne  .noX
  566.                 mov  ecx,1
  567.                 sub  bl,al
  568.                 ja   .ok
  569.                 inc  ecx
  570.         .ok2:
  571.                 neg  bl
  572.                 jmp  .ok
  573.         .noX:
  574.                 cmp  al,bl ; compare Y
  575.                 jne  .ex
  576.                 inc  ecx
  577.                 sub  bh,ah
  578.                 mov  bl,bh
  579.                 jb   .ok2
  580.                 add  ecx,3
  581.         .ok:
  582.                 movzx ebx,bl
  583.         .ex:
  584.                 mov  eax,ecx
  585.                 pop edx ecx
  586.                 ret
  587.  
  588. show_help:
  589.                 mov   ebp,[pack]
  590.         .red:
  591.     mcall 12,1
  592.     mov   ebx,[prc_info.x_start]
  593.     add   ebx,[prc_info.x_size]
  594.     shl   ebx,16
  595.     add   ebx,310
  596.     mov   ecx,[prc_info.y_start]
  597.     shl   ecx,16
  598.     add   ecx,220
  599.     mcall 0,,,0x03c0c0c0
  600.     mcall 4,<8,8>,0x00ffffff,help_hdr,help_hdr.size
  601.     mov   ecx,ebp
  602.     mov   edx,game_names+4
  603.     call  get_mstr
  604.     sub   esi,2
  605.     mcall 4,<6*help_hdr.size+15,8>,0x00ffffff
  606.  
  607.     mov   edx,[help_msg+ebp*4]
  608.     add   edx,4
  609.     xor   ecx,ecx
  610.     mov   ebx,10 shl 16+30
  611.   .nxt:
  612.     mov   esi,[edx-4]
  613.     jecxz .drw
  614.     dec   ecx
  615.     lea   edx,[edx+esi+4]
  616.     jmp   .nxt
  617.   .drw:
  618.     cmp   esi,-1
  619.     je    .edraw
  620.     mcall ,,0x000000ff
  621.     mov   ecx,1
  622.     add   ebx,12
  623.     jmp    .nxt
  624.   .edraw:
  625.     mcall 12,2
  626.         .still:
  627.     mcall 10
  628.     cmp  eax,2
  629.     jne  .nokey
  630.     mcall
  631.     jmp  .close
  632.   .nokey:
  633.     cmp  eax,1                  ; redraw request ?
  634.     je   .red
  635.     cmp  eax,3                  ; button in buffer ?
  636.     jne  .still
  637.     mcall 17
  638.     cmp  ah,1
  639.     jne  .still
  640.   .close:
  641.     and  [child],0
  642.     mcall -1
  643.  
  644. getline:
  645. ; in: esi,edi
  646.                 pusha
  647.     mov  eax,esi
  648.     call get_xy
  649.     mov  ebx,[lx]
  650.     mov  ecx,[ly]
  651.     mov  eax,edi
  652.     call get_xy
  653.     mov  bx,word[lx+2]
  654.     mov  cx,word[ly+2]
  655.     mov  eax,[Ces]
  656.     shr  eax,1
  657.     sub  eax,[sq_size]
  658.     add  ebx,eax
  659.     add  ecx,eax
  660.     shl  eax,16
  661.     add  ebx,eax
  662.     add  ecx,eax
  663.     mov  [lx],ebx
  664.     mov  [ly],ecx
  665.                 mcall 38
  666.                 popa
  667.                 ret
  668.  
  669. bold_line:
  670.   WGSPC equ 1
  671.     pusha
  672.                 mov  edi,WGSPC shl 16+WGSPC
  673.     add  [lx],edi
  674.     add  [ly],edi
  675.                 mcall 38,[lx],[ly]
  676.                 shl  edi,1
  677.     sub  ebx,edi
  678.     sub  ecx,edi
  679.                 mcall
  680.                 popa
  681.                 ret
  682.  
  683. get_rnd:
  684.                 mov  eax, [generator]
  685.     sub  eax,0x43ab45b5    ; next random number
  686.     ror  eax,1
  687.     xor  eax,0x32c4324f
  688.     ror  eax,1
  689.     mov  [generator],eax
  690.     ret
  691.  
  692. drwfld:
  693.                 pusha
  694.     mov   ebx,[fx]
  695.     imul  ebx,[Ces]
  696.     add   ebx,XFOFS shl 16
  697.     mov   ecx,[fy]
  698.     imul  ecx,[Ces]
  699.     add   ecx,YFOFS shl 16
  700.     mcall 13,,,WNDCOLOR
  701.     add   ebx,26 shl 16-26
  702.     sub   ecx,16 shl 16
  703.     mov   cx,16
  704.     mcall
  705.     icall draw_field
  706.     icall draw_more
  707.     cmp   [win_flag],0
  708.     jz    .edraw
  709.     movzx ecx,[win_flag]
  710.     mov   edx,msgs+4
  711.     call  get_mstr
  712.     mcall 4,<XFOFS+MSGXO,42>,0x100000ff
  713.   .edraw:
  714.     popa
  715.     ret
  716.  
  717. resize:
  718.     mov  eax,[Ces]
  719.     mov  edi,dir_ofs+4
  720.     stosd
  721.     stosd
  722.     stosw
  723.     stosw
  724.     mov  [edi+4],eax
  725.                 ret
  726.  
  727. need_image:
  728. ; in: eax - gif pointer
  729.                 cmp  [gif_unp],0
  730.                 jne  .skip
  731.                 push esi edi
  732.                 mov  esi,eax
  733.                 mov  eax,field
  734.                 mov  edi,raw_area
  735.                 call ReadGIF
  736.                 mov  [gif_unp],1
  737.                 pop  edi esi
  738.         .skip:
  739.                 ret
  740.  
  741. out_image:
  742. ; in: eax - coord, ebx - image #
  743.  
  744. STRIP2 = STRIP-2
  745.         pusha
  746.   call get_xy
  747.   mov  edx,[lx]
  748.   mov  dx,word[ly+2]
  749.   add  edx,1 shl 16+1
  750.   imul ebx,STRIP2*STRIP2*3
  751.         add  ebx,raw_area+12
  752.   mcall 7,,STRIP2 shl 16+STRIP2
  753.   popa
  754.         ret
  755.  
  756. OR_strip:
  757. file 'orientg2.gif'
  758.         rd 2
  759.         gif_unp dd 0
  760.  
  761. ; DATA AREA
  762. help_hdr db 'MegaMaze Help -'
  763.         .size=$-help_hdr
  764.  
  765. dirs dd -1,0,0,1
  766. dir_ofs dd 0, 1, 1, 1 shl 16+1, 0, 1
  767.  
  768. dir_rotate db 2,0,3,1,1,3,0,2
  769.  
  770. w_colors dd 0x0404CA,0xCC0404,0x00CC00
  771. f_colors dd 0x9494FC,0xFC9494,0x99FF99,0xFFFF00
  772.  
  773. levnum   dd LEVNUM
  774.  
  775. prepare_level dd TM_levelp,SMZ_levelp,TILT_levelp,TILT2_levelp,FH_levelp,\
  776.          LP_levelp,WG_levelp,BB_levelp,MAR_levelp,TM_levelp,OR_levelp,NLT_levelp,\
  777.          CZ_levelp
  778. key_handler   dd TM_key,SMZ_key,TILT_key,TILT2_key,FH_key,LP_key,WG_key,BB_key,\
  779.          MAR_key,CSTEP_key,OR_key,NLT_key,CZ_key
  780. draw_more     dd TM_drawm,SMZ_drawm,TILT_drawm,TILT2_drawm,FH_drawm,LP_drawm,\
  781.          WG_drawm,BB_drawm,MAR_drawm,CSTEP_drawm,OR_drawm,NLT_drawm,CZ_drawm
  782. draw_field    dd maze_field,maze_field,maze_field,maze_field,grid_field,\
  783.          grid_field,grid_field,grid_field,maze_field,maze_field,OR_drawf,maze_field,\
  784.          grid_field
  785. levels        dd TM_level,SMZ_level,TILT_level,TILT2_level,FH_level,LP_level,\
  786.          WG_level,BB_level,MAR_level,CSTEP_level,OR_level,NLT_level,CZ_level
  787. help_msg      dd TM_help,SMZ_help,TILT_help,TILT2_help,FH_help,LP_help,WG_help,\
  788.          BB_help,MAR_help,CSTEP_help,OR_help,NLT_help,CZ_help
  789.  
  790. header db 'Mega Maze', 0
  791.  
  792. next_msg db '< >'
  793.  
  794. game_names mstr \
  795.         'Teseus & Minotaur #',\
  796.         '1-2-3 Maze #',\
  797.         'Tilt Maze #',\
  798.         'Double Tilt #',\
  799.         'Full-house #',\
  800.         'Loops #',\
  801.         'Wriggle #',\
  802.         'BlackBox #',\
  803.         'Marble #',\
  804.         'Counter Step #',\
  805.         'Orientation #',\
  806.         'No left turn #',\
  807.         'Colour-zone #'
  808.  
  809. msgs mstr ' ','You win!!!','Game over.','Start cell?','Dead end!',\
  810.         "  atoms hidden.",'Ray emerged.','Ray absorbed.','Ray reflected.',\
  811.         'Mark exactly    guesses','Your score is','Guess mark toggled'
  812.  
  813. I_END:
  814. main_pid dd ?
  815. child_stack rb 256
  816.         chs_end:
  817. drag_flag db ?
  818. sq_size dd ?
  819. mouse_processed dd ?
  820. mpress_flag dd ?
  821. mouse_x dd ?
  822. mouse_y dd ?
  823.  
  824. Ces dd ?
  825. pack dd ?
  826. fy dd ?
  827. fx dd ?
  828. lx dd ?
  829. ly dd ?
  830. generator dd ?
  831. cell_count dd ?
  832. levptr   dd ?
  833. levcount dd ?
  834.  
  835. score    dd ?
  836. player:
  837. teseus   dd ?
  838. finish:
  839. minotaur dd ?
  840.  
  841. stepptr  dd ?
  842. cur_step dd ?
  843.  
  844. win_flag db ?
  845. jump     dd ?
  846. pause_time dd ?
  847. child    dd ?
  848. area rb 1024
  849. stak rb 1024
  850. stack_end:
  851. prc_info process_information
  852. prc_info2 process_information
  853. field:
  854.     rb 128*128
  855. raw_area:
  856.                 rb STRIP*STRIP*12*3+16
  857. end_mem:
  858.