Advertisement
Guest User

Untitled

a guest
Mar 17th, 2020
556
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;
  2. ; - Mario Atari 7800 pseudo clone
  3. ;             GRom
  4. ;
  5.  
  6. #I_HAVE_THE_WAVE_FILE = 1 ; undef this if you dont have sound media
  7.  
  8.  CompilerIf Defined(I_HAVE_THE_WAVE_FILE,#PB_Constant)
  9.    Macro PlaySoundEX(id,flag) : PlaySound(id,flag) : EndMacro  
  10.  CompilerElse
  11.    Macro PlaySoundEX(id,flag) : EndMacro
  12.  CompilerEndIf
  13.  
  14.  RandomSeed( Random($FFFFFF) )
  15.  
  16. Structure Entity
  17.   spriteid.l
  18.   x.d
  19.   y.d
  20.   vx.d
  21.   vy.d
  22.   animtime.l
  23.   animspeed.l
  24.   flipme.b
  25.   anim_left_min.l
  26.   anim_left_max.l
  27.   anim_right_min.l
  28.   anim_right_max.l
  29.   jumping.b
  30.   jump_height.d
  31.   onground.b
  32.   max_velx.d
  33.   max_vely.d
  34.   gravity.f
  35.   use_physic.b
  36.   is_ghost.b
  37.   blink.l
  38.   wrap.b
  39.   deleteme.b
  40. EndStructure
  41.  
  42.  
  43. Structure Pnj Extends Entity
  44.   jumper.b
  45.   jump_time.l  
  46.   jump_delay.l
  47.   direction.l ; 1 right , 0 left
  48.   entry_mode.l; 1 out ; 0 in
  49.   collide_time.l ; prevent infinite collision
  50.   is_cool.b
  51. EndStructure
  52.  
  53. Structure Coin Extends Entity
  54.   direction.l ; 1 right , 0 left
  55.   uncollect_time.l ; prevent collect at spawn
  56. EndStructure
  57.  
  58.  
  59. Structure Player Extends Entity
  60.   is_die.b  
  61.   freeze_time.l
  62.   invincible.b
  63.   invincible_time.l
  64.   life.l
  65.   next_life.l
  66.   score.l
  67. EndStructure
  68.  
  69. Structure Missile Extends Entity
  70.   direction.l
  71. EndStructure
  72.  
  73. Global max_mob = 1
  74. Global mob_spawn_delay
  75. Global speed_factor.f = 1
  76. Global Mario.Player
  77. Global NewList Mob.Pnj()
  78. Global NewList Bonus.Coin()
  79. Global NewList Missile.Missile()
  80.  
  81. Mario\x = 8 * 8
  82. Mario\y = (10 * 8)
  83. Mario\spriteid = 12
  84. Mario\jump_height = 3.8
  85. Mario\animspeed = 50
  86. Mario\anim_right_min = 12
  87. Mario\anim_right_max = 14
  88. Mario\anim_left_min = 18
  89. Mario\anim_left_max = 20
  90. Mario\gravity = 0.2
  91. Mario\use_physic = #True
  92. Mario\is_die = #False
  93. Mario\is_ghost = #False
  94. Mario\invincible = #False
  95. Mario\life = 3
  96. Mario\wrap = #True
  97. Mario\next_life = 3000
  98.  
  99. Declare.l getcolor(rgb)
  100. Declare draw_value(value.l,x,y)
  101. Declare check_solid(x.d,y.d)
  102. Declare is_solid(tilex,tiley)
  103. Declare spawn_mob()
  104. Declare draw_entity(*e.entity)
  105. Declare update_physic(*e.Entity)
  106. Declare entity_collide(*a.Entity, *b.Entity)
  107. Declare entity_collide_point(*e.entity,x.f,y.f, velocity.b = #False)
  108. Declare spawn_coin(x,y,d)
  109. Declare spawn_missile(y)
  110. Declare draw_missile(*m.Missile)
  111. Declare update_missile(*m.missile)
  112.  
  113.  
  114.  
  115.  
  116. InitSprite() : InitKeyboard() : InitMouse() : InitSound() : joypad = InitJoystick()
  117. ExamineDesktops()
  118. Global dw = DesktopWidth(0)
  119. Global dh = DesktopHeight(0)
  120. Global deltatime.d = 0
  121.  
  122. OpenScreen(dw,dh,32,"",#PB_Screen_NoSynchronization)
  123. Global gpu_texture = CreateSprite(#PB_Any,48,48,#PB_Sprite_AlphaBlending)
  124.  
  125. Global Dim Color.l(16)
  126. CopyMemory(?palette, @Color(), ?end_palette - ?palette)
  127.  
  128. Global Dim Texture.b(48*48)
  129. CopyMemory(?texture, @Texture(), ?end_texture - ?texture)
  130.  
  131. Global Dim Tilemap.b(19*16)
  132. CopyMemory(?tilemap, @Tilemap(), ?end_tilemap - ?tilemap)
  133.  
  134. Global Dim SolidTile.b(?end_solid_tile - ?solid_tile)
  135. CopyMemory(?solid_tile, @SolidTile(), ?end_solid_tile - ?solid_tile)
  136.  
  137. Global Dim SubSprite.l(36)
  138.  
  139. StartDrawing(SpriteOutput(gpu_texture))
  140. For y = 0 To 47
  141.   For x = 0 To 47
  142.     index = x + 48 * y
  143.     Plot(x,y, Color( Texture(index) ) )
  144.   Next
  145. Next
  146. StopDrawing()
  147.  
  148.  
  149. DisplaySprite(gpu_texture,0,0)
  150. For clip = 0 To 35
  151.   x = clip % 6
  152.   y = clip / 6
  153.   SubSprite(clip) = GrabSprite(#PB_Any,x*8,y*8,8,8)
  154.   TransparentSpriteColor(SubSprite(clip), RGB(255,0,255))
  155. Next
  156.  
  157.  
  158. CompilerIf Defined(I_HAVE_THE_WAVE_FILE, #PB_Constant)
  159. ;   sound_jump    = LoadSound(#PB_Any,"jump.wav")
  160. ;   sound_hurt    = LoadSound(#PB_Any,"hurt.wav")
  161. ;   sound_kill    = LoadSound(#PB_Any,"kill.wav")
  162. ;   sound_coin    = LoadSound(#PB_Any,"coin.wav")
  163. ;   sound_fall    = LoadSound(#PB_Any,"falling.wav")
  164. ;   sound_respawn = LoadSound(#PB_Any,"respawn.wav")
  165. ;   sound_rejump  = LoadSound(#PB_Any,"rejump.wav")
  166. ;   sound_missile  = LoadSound(#PB_Any,"missile.wav")
  167. ;   sound_extralife  = LoadSound(#PB_Any,"extralife.wav")
  168.  
  169.  
  170.    sound_jump    = CatchSound(#PB_Any,?bin_sound_jump, ?bin_sound_jump_e - ?bin_sound_jump)
  171.    sound_hurt    = CatchSound(#PB_Any,?bin_sound_hurt, ?bin_sound_hurt_e - ?bin_sound_hurt)
  172.    sound_kill    = CatchSound(#PB_Any,?bin_sound_kill, ?bin_sound_kill_e - ?bin_sound_kill)
  173.    sound_coin    = CatchSound(#PB_Any,?bin_sound_coin, ?bin_sound_coin_e - ?bin_sound_coin)
  174.    sound_fall    = CatchSound(#PB_Any,?bin_sound_falling, ?bin_sound_falling_e - ?bin_sound_falling)
  175.    sound_respawn = CatchSound(#PB_Any,?bin_sound_respawn, ?bin_sound_respawn_e - ?bin_sound_respawn)
  176.    sound_rejump  = CatchSound(#PB_Any,?bin_sound_rejump, ?bin_sound_rejump_e - ?bin_sound_rejump)
  177.    sound_missile  = CatchSound(#PB_Any,?bin_sound_missile, ?bin_sound_missile_e - ?bin_sound_missile)
  178.    sound_extralife = CatchSound(#PB_Any,?bin_sound_extralife, ?bin_sound_extralife_e - ?bin_sound_extralife)
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187. CompilerEndIf
  188.  
  189.  
  190. ; spawn_missile(14)
  191. missile_timer = ElapsedMilliseconds() + 4000
  192. missile_middle_timer = ElapsedMilliseconds() + 10000
  193.  
  194. ; boucle principale
  195. ;
  196. accumulator.d = 0
  197. While #True
  198.   ExamineKeyboard()
  199.  
  200.   deltatime = (ElapsedMilliseconds() - lasttime.d) / 1000
  201.   lasttime = ElapsedMilliseconds()
  202.   accumulator + deltatime
  203.  
  204.   If mob_spawn_delay < ElapsedMilliseconds() And ListSize(Mob()) < max_mob
  205.     mob_spawn_delay = ElapsedMilliseconds() + Random(3000,750)
  206.     spawn_mob()
  207.   EndIf
  208.    
  209.  
  210.   ;
  211.   ;-INPUT
  212.   ;
  213.   If KeyboardPushed(#PB_Key_Escape)
  214.     Break
  215.   EndIf
  216.  
  217.      
  218.   If Mario\is_die = #False
  219.    
  220.     If joypad
  221.       If ExamineJoystick(0)
  222.         joy_axisx = JoystickAxisX(0)
  223.         joy_button = JoystickButton(0,3)
  224.       EndIf
  225.     EndIf
  226.    
  227.     If KeyboardPushed(#PB_Key_Right) Or joy_axisx = 1
  228.       Mario\vx = 1
  229.       Mario\flipme = #False
  230.     EndIf
  231.    
  232.     If KeyboardPushed(#PB_Key_Left) Or joy_axisx = -1
  233.       Mario\vx = -1
  234.       Mario\flipme = #True
  235.     EndIf
  236.    
  237.     If KeyboardPushed(#PB_Key_Space) Or joy_button = 1
  238.       Mario\jumping = #True
  239.      
  240.       If sound_jump_flag = 0
  241.         sound_jump_flag = 1
  242.         PlaySoundEX(sound_jump,#PB_Sound_MultiChannel)
  243.       EndIf
  244.      
  245.     Else
  246.       sound_jump_flag = 0
  247.       Mario\jumping = #False      
  248.     EndIf
  249.    
  250.     If Not (KeyboardPushed(#PB_Key_Right) Or joy_axisx = 1) And Not (KeyboardPushed(#PB_Key_Left)  Or joy_axisx = -1 )
  251.       Mario\vx = 0    
  252.     EndIf
  253.  
  254.   EndIf
  255.  
  256.  
  257.   ;-GAME LOGIC
  258.  
  259.   ; Spawn missile
  260.  
  261.   If Mario\y < 32 And missile_timer < ElapsedMilliseconds()
  262.     missile_timer = ElapsedMilliseconds() + 5000
  263.     spawn_missile(Random(2))
  264.     PlaySoundEX(sound_missile,#PB_Sound_MultiChannel)
  265.   ElseIf Mario\y > 32
  266.     missile_timer = ElapsedMilliseconds() + 5000
  267.   EndIf  
  268.  
  269.   If Mario\y > 32 And Mario\y< 96 And missile_middle_timer < ElapsedMilliseconds()
  270.     missile_middle_timer = ElapsedMilliseconds() + 10000
  271.     spawn_missile(Random(10,4))
  272.     PlaySoundEX(sound_missile,#PB_Sound_MultiChannel)
  273.   ElseIf (Mario\y < 32 Or Mario\y > 96)
  274.     missile_middle_timer = ElapsedMilliseconds() + 10000
  275.   EndIf  
  276.  
  277.  
  278.      
  279.     If Mario\score => Mario\next_life
  280.       Mario\next_life + 3000
  281.       Mario\life + 1
  282.       PlaySoundEX(sound_extralife,#PB_Sound_MultiChannel)
  283.     EndIf
  284.  
  285.   ; Mario die ( jumping )
  286.   If Mario\is_die And Mario\freeze_time < ElapsedMilliseconds() And Mario\use_physic = #False
  287.     Mario\use_physic = #True  
  288.     Mario\vy = -Mario\jump_height
  289.     PlaySoundEX(sound_fall,#PB_Sound_MultiChannel)
  290.   EndIf
  291.  
  292.   If Mario\is_die And Mario\y > 2048
  293.     Mario\invincible = #True
  294.     Mario\invincible_time = ElapsedMilliseconds() + 2000
  295.     Mario\x = 8 * 8
  296.     Mario\y = (10 * 8)
  297.     Mario\vy = 0
  298.     Mario\vx = 0
  299.     Mario\is_ghost = #False
  300.     Mario\is_die = #False
  301.     PlaySoundEX(sound_respawn,#PB_Sound_MultiChannel)
  302.   EndIf
  303.  
  304.  
  305.   If Mario\invincible And Mario\invincible_time > ElapsedMilliseconds()
  306.     Mario\blink+1 : Mario\blink%4
  307.   ElseIf Mario\invincible And Mario\invincible_time < ElapsedMilliseconds()
  308.     Mario\invincible = #False
  309.     Mario\blink = 0
  310.   EndIf
  311.  
  312.   ForEach(Bonus())
  313.        
  314.     If( entity_collide_point(@Mario,Bonus()\x + 4 , Bonus()\y + 4) ) And Bonus()\uncollect_time < ElapsedMilliseconds()
  315.       Mario\score + 1000
  316.      
  317.       PlaySoundEX(sound_coin,#PB_Sound_MultiChannel)
  318.      
  319.       If DeleteElement(Bonus(),1)=0
  320.         Break
  321.       EndIf
  322.      
  323.     EndIf
  324.    
  325.     If Bonus()\direction = 1
  326.       Bonus()\vx = 0.5
  327.     Else
  328.       Bonus()\vx = -0.5
  329.     EndIf
  330.    
  331.     If Bonus()\deleteme
  332.       DeleteElement(Bonus())
  333.     EndIf    
  334.   Next
  335.  
  336.  
  337.   ForEach(@Mob())
  338.    
  339.     Mob()\vx = 0.2
  340.    
  341.     If Mob()\jumper = #True
  342.       If Mob()\jump_time < ElapsedMilliseconds()
  343.         Mob()\jump_time = ElapsedMilliseconds() + Mob()\jump_delay
  344.         Mob()\jumping = #True
  345.       Else
  346.         Mob()\jumping = #False
  347.       EndIf
  348.     EndIf
  349.    
  350.     If Mob()\direction = 1
  351.       Mob()\vx = 0.25
  352.     Else
  353.       Mob()\vx = -0.25
  354.     EndIf
  355.    
  356.    
  357.     ; down pipe enter
  358.     ;
  359.     If Round(Mob()\x/8,#PB_Round_Down) = 2 And Round(Mob()\y/8,#PB_Round_Down) = 14 And Mob()\vx < 0
  360.       Mob()\use_physic = #False
  361.       Mob()\entry_mode = 0
  362.       Mob()\is_cool = #True
  363.     EndIf
  364.    
  365.     If Round(Mob()\x/8,#PB_Round_Down) = 14 And Round(Mob()\y/8,#PB_Round_Down) = 14 And Mob()\vx > 0
  366.       Mob()\use_physic = #False
  367.       Mob()\entry_mode = 0
  368.       Mob()\is_cool = #True
  369.     EndIf
  370.    
  371.    
  372.     If Mob()\use_physic = #False
  373.      
  374.       ; down pipe enter move
  375.       If Mob()\entry_mode = 0
  376.         If Round(Mob()\y/8,#PB_Round_Down) > 12
  377.           Mob()\y - 0.25
  378.         EndIf
  379.        
  380.         ; left pipe
  381.         If Mob()\vx < 0 And Round(Mob()\y/8,#PB_Round_Down) = 12
  382.           Mob()\x - 0.25
  383.           If Round(Mob()\x/8,#PB_Round_Down) = 0
  384.             Mob()\x  = 1*8
  385.             Mob()\y  = 1*8
  386.             Mob()\entry_mode = 1
  387.             Mob()\direction = 1
  388.             Mob()\jump_time = ElapsedMilliseconds() + Mob()\jump_delay
  389.           EndIf            
  390.         EndIf
  391.        
  392.         ; right pipe
  393.         If Mob()\vx > 0 And Round(Mob()\y/8,#PB_Round_Down) = 12
  394.           Mob()\x + 0.25
  395.           If Round(Mob()\x/8,#PB_Round_Down) = 16
  396.             Mob()\x  = 16*8
  397.             Mob()\y  = 1*8
  398.             Mob()\entry_mode = 1
  399.             Mob()\direction = 0
  400.             Mob()\jump_time = ElapsedMilliseconds() + Mob()\jump_delay
  401.           EndIf
  402.         EndIf
  403.       EndIf
  404.      
  405.       ; up pipe exit
  406.       If Mob()\entry_mode = 1
  407.         If Mob()\vx > 0
  408.           Mob()\x + 0.25  
  409.           If Round(Mob()\x/8,#PB_Round_Down) = 2 : Mob()\use_physic = #True : Mob()\is_cool = #False : EndIf
  410.         EndIf
  411.        
  412.         If Mob()\vx < 0
  413.           Mob()\x - 0.25
  414.           If Round(Mob()\x/8,#PB_Round_Down) = 14 : Mob()\use_physic = #True : Mob()\is_cool = #False : EndIf
  415.         EndIf
  416.        
  417.       EndIf
  418.     EndIf
  419.    
  420.   Next
  421.  
  422.  
  423.  
  424.   While ( accumulator > 1.0/60.0 )
  425.     ;-PHYSIC
  426.     ;
  427.    
  428.     update_physic(@Mario)
  429.    
  430.     ForEach (Bonus())
  431.       update_physic(@Bonus())  
  432.     Next
  433.    
  434.     ; collide Mob/Mob , Mob/Mario
  435.     ForEach(Mob())
  436.      
  437.       ; mob / mob
  438.       *c.Pnj = @Mob()
  439.       PushListPosition(Mob())
  440.       ForEach Mob()
  441.        
  442.         If @Mob() <> *c And Mob()\collide_time < ElapsedMilliseconds()
  443.           If entity_collide(*c,@Mob())
  444.             *c\direction + 1 : *c\direction%2
  445.             Mob()\direction + 1 : Mob()\direction%2
  446.             Mob()\collide_time = ElapsedMilliseconds() + 250            
  447.           EndIf
  448.         EndIf
  449.        
  450.       Next
  451.       PopListPosition(Mob())
  452.      
  453.       If Mob()\is_cool = #False
  454.         ; mob / mario      
  455.         If entity_collide(@Mario,@Mob()) And Mario\is_die = #False
  456.          
  457.          
  458.           If Mario\y < Mob()\y
  459.            
  460.             Mario\vy = -(Mario\jump_height/1.1)
  461.            
  462.             If Random(10) = 0
  463.               spawn_coin(Mob()\x,Mob()\y,(Mob()\direction+1)%2 )
  464.             EndIf
  465.            
  466.             Mario\score + 50
  467.            
  468.             max_mob + 1
  469.             If max_mob > 8
  470.               max_mob = 8
  471.             EndIf
  472.            
  473.             PlaySoundEX(sound_kill,#PB_Sound_MultiChannel)
  474.             PlaySoundEX(sound_rejump,#PB_Sound_MultiChannel)
  475.            
  476.             If DeleteElement(Mob(),1) = 0
  477.               Break  
  478.             EndIf
  479.  
  480.           ElseIf Mario\y  >= Mob()\y And Mario\invincible = #False
  481.             Mario\vx = 0
  482.             Mario\vy = 0
  483.             Mario\is_die = #True
  484.             Mario\is_ghost = #True
  485.             Mario\freeze_time = ElapsedMilliseconds() + 500
  486.             Mario\use_physic = #False
  487.             Mario\spriteid = 34
  488.             Mario\life - 1
  489.            
  490.             PlaySoundEX(sound_hurt,#PB_Sound_MultiChannel)
  491.            
  492.             If Mario\life = 0
  493.              
  494.               spr = GrabSprite(#PB_Any,0,0,dw,dh)
  495.               UsePNGImageEncoder()
  496.               SaveSprite(spr,"MyScore.png",#PB_ImagePlugin_PNG)
  497.              
  498.               End
  499.             EndIf
  500.  
  501.           EndIf
  502.         EndIf
  503.       EndIf
  504.       update_physic(@Mob())
  505.     Next
  506.    
  507.    
  508.     ; missile "physic..."
  509.     ;
  510.     ForEach Missile()
  511.       update_missile(@Missile())
  512.      
  513.       Define A,B,C,D
  514.      
  515.      
  516.       A = SpriteCollision(SubSprite(Mario\spriteid),Mario\x,Mario\y ,SubSprite(9), Missile()\x, Missile()\y)
  517.       B = SpriteCollision(SubSprite(Mario\spriteid),Mario\x,Mario\y ,SubSprite(4), Missile()\x+8, Missile()\y)
  518.       C = SpriteCollision(SubSprite(Mario\spriteid),Mario\x,Mario\y ,SubSprite(10), Missile()\x, Missile()\y)
  519.       D = SpriteCollision(SubSprite(Mario\spriteid),Mario\x,Mario\y ,SubSprite(11), Missile()\x+8, Missile()\y)
  520.      
  521.       If (A Or B Or C Or D) And Mario\is_die = #False
  522.         Mario\vx = 0
  523.         Mario\vy = 0
  524.         Mario\is_die = #True
  525.         Mario\is_ghost = #True
  526.         Mario\freeze_time = ElapsedMilliseconds() + 500
  527.         Mario\use_physic = #False
  528.         Mario\spriteid = 34
  529.         Mario\life - 1
  530.        
  531.         PlaySoundEX(sound_hurt,#PB_Sound_MultiChannel)
  532.        
  533.         If Mario\life = 0
  534.          
  535.           spr = GrabSprite(#PB_Any,0,0,dw,dh)
  536.           UsePNGImageEncoder()
  537.           SaveSprite(spr,"MyScore.png",#PB_ImagePlugin_PNG)
  538.          
  539.           End
  540.         EndIf
  541.       EndIf
  542.      
  543.      
  544.       If(Missile()\x < -200 Or Missile()\x > 328)
  545.         DeleteElement(Missile())
  546.       EndIf
  547.      
  548.      
  549.      
  550.      
  551.     Next
  552.  
  553.     accumulator - (1.0/60.0)
  554.   Wend
  555.  
  556.  
  557.   ;
  558.   ;-DRAWING
  559.   ;
  560.  
  561.   ClearScreen(RGB(26,28,44))
  562.  
  563.   ; draw mob
  564.   ForEach(Mob())
  565.     draw_entity(@Mob())  
  566.   Next
  567.  
  568.   ForEach (Bonus())
  569.     draw_entity(@Bonus())  
  570.   Next
  571.  
  572.  
  573.   ForEach Missile()
  574.       draw_missile(@Missile())
  575.   Next
  576.  
  577.   ; draw tilemap
  578.   For y = 0 To 15
  579.     For x = 0 To 17
  580.       index = x + 19 * y
  581.       DisplayTransparentSprite( SubSprite(Tilemap( index )) ,x*8,y*8)
  582.      
  583. ;      
  584.     Next
  585.   Next
  586.  
  587.   ; draw mario
  588.   draw_entity(@Mario)
  589.  
  590.   ; draw score  
  591.   draw_value( Mario\score, (64 - (((Len(Str(Mario\score))-1)*8)/2))+8 ,4)
  592.  
  593.   ; draw life
  594.   For i = 0 To Mario\life-1
  595.     DisplayTransparentSprite(SubSprite(35),8+(i*8),0)
  596.   Next
  597.  
  598.   DisplayTransparentSprite(SubSprite(coin_id),(8+128)-8*4,0)
  599.   offscreen = GrabSprite(#PB_Any,8,0,128,128)
  600.   ClearScreen(0)
  601.   factor.d = 128 / dh
  602.   size.l = 128/factor
  603.   ZoomSprite(offscreen,size,size)
  604.   DisplayTransparentSprite(offscreen,(dw/2) - (size/2),(dh/2) - (size/2))
  605.   ZoomSprite(offscreen,#PB_Default,#PB_Default)
  606.   FlipBuffers()
  607. Wend
  608.  
  609. CloseScreen()
  610. End
  611.  
  612.  
  613.  
  614. Procedure.l getcolor(rgb)
  615.   For i = 0 To 15
  616.     If Color(i) = rgb
  617.       ProcedureReturn i
  618.     EndIf
  619.   Next
  620. EndProcedure
  621.  
  622.  
  623.  
  624. Procedure draw_value(value.l,x,y)
  625.   str$ = Str(value)  
  626.   For i = 0 To Len(str$)-1
  627.     n.l = Val(Mid(str$,i+1,1))
  628.     DisplayTransparentSprite( SubSprite( 24 + n ) , x + (i * 6),y)
  629.   Next
  630. EndProcedure
  631.  
  632.  
  633. Procedure check_solid(x.d, y.d)
  634.   ProcedureReturn is_solid(Round(x/8,#PB_Round_Down),Round(y/8,#PB_Round_Down))
  635. EndProcedure
  636.  
  637.  
  638. Procedure is_solid(tilex,tiley)
  639.   index = tilex + 19 * tiley
  640.   If index >= 0 And index < (19*16)
  641.     tile_id = Tilemap(index)
  642.     For i = 0 To (?end_solid_tile - ?solid_tile) - 1
  643.       If tile_id = SolidTile(i)
  644.         ProcedureReturn #True
  645.       EndIf
  646.     Next
  647.   EndIf
  648.   ProcedureReturn #False
  649. EndProcedure
  650.  
  651.  
  652. Procedure spawn_mob()
  653.   AddElement(Mob())
  654.  
  655.  
  656.   Mob()\jump_height    = 1.0
  657.  
  658.   If Random(9) > 2
  659.     Mob()\anim_left_min  = 21
  660.     Mob()\anim_left_max  = 22
  661.     Mob()\anim_right_min = 21
  662.     Mob()\anim_right_max = 22
  663.     Mob()\animspeed      = 25
  664.     Mob()\jumper         = #True
  665.     Mob()\jump_delay     = 250
  666.   Else
  667.     Mob()\anim_left_min  = 6
  668.     Mob()\anim_left_max  = 8
  669.     Mob()\anim_right_min = 6
  670.     Mob()\anim_right_max = 8
  671.     Mob()\animspeed      = 100
  672.     Mob()\jumper         = #False
  673.   EndIf
  674.  
  675.  
  676.   Mob()\gravity        = 0.1  
  677.   Mob()\direction = Random(1)
  678.   Mob()\use_physic = #False
  679.   Mob()\entry_mode = 1
  680.   Mob()\is_ghost = #False
  681.   Mob()\is_cool = #False
  682.   Mob()\wrap = #True
  683.  
  684.   If Mob()\direction = 1
  685.     Mob()\x  = 1*8
  686.     Mob()\y  = 1*8
  687.   Else
  688.     Mob()\x  = 16*8
  689.     Mob()\y  = 1*8
  690.   EndIf
  691.  
  692.  
  693. EndProcedure
  694.  
  695.  
  696. Procedure spawn_coin(x,y,direction)
  697.   AddElement(Bonus())
  698.  
  699.   Bonus()\jumping = #True
  700.   Bonus()\jump_height    = 0.5
  701.  
  702.   Bonus()\anim_left_min  = 15
  703.   Bonus()\anim_left_max  = 17
  704.   Bonus()\anim_right_min = 15
  705.   Bonus()\anim_right_max = 17
  706.   Bonus()\animspeed      = 25
  707.  
  708.   Bonus()\gravity        = 0.05
  709.   Bonus()\use_physic = #True
  710.   Bonus()\is_ghost = #False
  711.   Bonus()\wrap = #False
  712.   Bonus()\x  = x
  713.   Bonus()\y  = y
  714.   Bonus()\direction = direction
  715.   Bonus()\uncollect_time = ElapsedMilliseconds() + 100
  716.   If Bonus()\direction = 1
  717.     Bonus()\vx = 0.5
  718.     Bonus()\vy = -1.0
  719.   Else
  720.     Bonus()\vx = -0.5
  721.     Bonus()\vy = -1.0
  722.   EndIf
  723.  
  724. EndProcedure
  725.  
  726.  
  727. Procedure spawn_missile(y)
  728.   AddElement(Missile())
  729.  
  730.   Missile()\use_physic = #False
  731.   Missile()\direction = Random(1)
  732.  
  733.   If  Missile()\direction
  734.     Missile()\x = - 16
  735.     Missile()\y = y * 8
  736.     Missile()\vx = 1
  737.   Else
  738.     Missile()\x = 128
  739.     Missile()\y = y * 8
  740.     Missile()\vx = -1
  741.   EndIf
  742.  
  743.  
  744.    
  745.  
  746. EndProcedure
  747.  
  748. Procedure draw_missile(*m.Missile)
  749.  
  750.   If  Missile()\direction
  751.     DisplayTransparentSprite( SubSprite(9) , *m\x, *m\y) ; tail
  752.     DisplayTransparentSprite( SubSprite(4) , *m\x + 8, *m\y) ; head
  753.   Else
  754.     DisplayTransparentSprite( SubSprite(10) , *m\x+8, *m\y) ; tail
  755.     DisplayTransparentSprite( SubSprite(11) , *m\x, *m\y) ; head    
  756.   EndIf
  757.  
  758.  
  759.  
  760.  
  761. EndProcedure
  762.  
  763. Procedure update_missile(*m.missile)
  764.   *m\x + *m\vx  
  765.   *m\y + *m\vy
  766. EndProcedure
  767.  
  768. Procedure draw_entity(*e.entity)
  769.  
  770.   If *e\vx <> 0 And *e\is_ghost = #False
  771.    
  772.     If ( *e\animtime < ElapsedMilliseconds() )
  773.       *e\animtime = ElapsedMilliseconds() + *e\animspeed
  774.       *e\spriteid+1
  775.      
  776.       If *e\flipme = #False  
  777.         If *e\spriteid < *e\anim_right_min : *e\spriteid = *e\anim_right_min : EndIf
  778.         If *e\spriteid > *e\anim_right_max
  779.           *e\spriteid = *e\anim_right_min
  780.         EndIf      
  781.       Else
  782.         If *e\spriteid < *e\anim_left_max : *e\spriteid = *e\anim_left_max : EndIf
  783.         If *e\spriteid > *e\anim_left_max
  784.           *e\spriteid = *e\anim_left_min
  785.         EndIf
  786.       EndIf
  787.      
  788.     EndIf
  789.    
  790.   ElseIf *e\vx = 0 And *e\is_ghost = #False
  791.     If *e\flipme = #False
  792.       *e\spriteid = *e\anim_right_min
  793.     Else
  794.       *e\spriteid = *e\anim_left_min
  795.     EndIf
  796.   EndIf
  797.  
  798.   If *e\blink = 1
  799.     DisplayTransparentSprite( SubSprite(0) , *e\x, *e\y)
  800.   Else
  801.     DisplayTransparentSprite( SubSprite(*e\spriteid) , *e\x, *e\y)
  802.   EndIf
  803.  
  804. EndProcedure
  805.  
  806.  
  807.  
  808. Procedure update_physic(*e.Entity)
  809.  
  810.   If *e\use_physic
  811.    
  812.    
  813.     ; side collision
  814.     If check_solid( *e\x + *e\vx, *e\y + *e\vy) Or check_solid( *e\x + 7 + *e\vx, *e\y + *e\vy) Or check_solid( *e\x + 7 + *e\vx, *e\y + 7 + *e\vy) Or check_solid( *e\x + *e\vx, *e\y + 7 + *e\vy)
  815.       *e\vx = 0
  816.     EndIf
  817.    
  818.     ; collision down
  819.     If (check_solid( *e\x , *e\y + 8 + *e\vy) Or check_solid( *e\x + 7 , *e\y + 8 + *e\vy)) And *e\is_ghost = #False
  820.       *e\vy = 0
  821.       *e\onground = #True
  822.     Else
  823.       *e\vy = *e\vy + *e\gravity ; falling
  824.     EndIf
  825.    
  826.     ; jumping
  827.     If *e\jumping = #True And *e\onground = #True
  828.       *e\vy = -*e\jump_height
  829.       *e\onground = #False
  830.     EndIf
  831.    
  832.     ; collision top
  833.     If ((check_solid( *e\x + *e\vx, *e\y + *e\vy) Or check_solid( *e\x + 7 + *e\vx, *e\y + *e\vy)) And *e\vy < 0) And *e\is_ghost = #False
  834.       *e\vy = 0  
  835.     EndIf
  836.    
  837.    
  838.     ; warping  
  839.     If *e\wrap = #True
  840.       If *e\x < -1   : *e\x = 144 - 8 : EndIf
  841.       If *e\x > 17*8  : *e\x = 1      : EndIf
  842.     Else
  843.       If *e\x < -1    : *e\deleteme = #True  : EndIf
  844.       If *e\x > 17*8  : *e\deleteme = #True  : EndIf
  845.     EndIf
  846.    
  847.     ; lock velocity
  848.     If *e\vx > 1.0 : *e\vx = 1.0: EndIf
  849.     If *e\vx <-1.0 : *e\vx = -1.0 : EndIf
  850.    
  851.     ; update position
  852.     *e\x = *e\x + *e\vx
  853.     *e\y = *e\y + *e\vy
  854.   EndIf
  855.  
  856. EndProcedure
  857.  
  858. Procedure entity_collide(*a.Entity, *b.Entity)
  859.   If (*b\x > = *a\x + 8) Or (*b\x + 8 <= *a\x) Or (*b\y > = *a\y + 8) Or  (*b\y + 8 <= *a\y)
  860.     ProcedureReturn #False
  861.   Else
  862.     ProcedureReturn #True
  863.   EndIf
  864. EndProcedure
  865.  
  866. Procedure entity_collide_point(*e.Entity, x.f, y.f, velocity.b = #False)
  867.  
  868.   If velocity = #False
  869.     If x >= *e\x  And x < *e\x + 7 And y >= *e\y  And y < *e\y + 7
  870.       ProcedureReturn #True
  871.     Else
  872.       ProcedureReturn #False  
  873.     EndIf  
  874.   Else
  875.     If x >= *e\x + *e\vx  And x < *e\x + 7 + *e\vx And y >= *e\y + *e\vy  And y < *e\y + 7 + *e\vy
  876.       ProcedureReturn #True
  877.     Else
  878.       ProcedureReturn #False  
  879.     EndIf
  880.   EndIf
  881. EndProcedure
  882.  
  883.  
  884. ;-Datasection
  885. DataSection
  886.   palette:
  887.   Data.l 16711935,2890778,6104925,5455537,5733871,7720447,7401639,6600504,7958821,7288361,13196603,16164417,16248691,16053492,12759188,8809558,5717043
  888.   end_palette:
  889.  
  890.  
  891.  
  892.   tilemap:  
  893.   Data.b  0, 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0
  894.   Data.b  0, 3,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  5,  0,  0
  895.   Data.b  0, 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0
  896.   Data.b  2, 2,  2,  2,  2,  2,  2,  2,  0,  0,  2,  2,  2,  2,  2,  2,  2,  2,  2
  897.   Data.b  0, 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0
  898.   Data.b  0, 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0
  899.   Data.b  0, 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0
  900.   Data.b  2, 2,  2,  0,  0,  0,  2,  2,  2,  2,  2,  2,  0,  0,  0,  2,  2,  2,  2
  901.   Data.b  0, 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0
  902.   Data.b  0, 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0
  903.   Data.b  0, 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0
  904.   Data.b  2, 2,  2,  2,  2,  2,  2,  0,  0,  0,  0,  2,  2,  2,  2,  2,  2,  2,  2
  905.   Data.b  0, 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0
  906.   Data.b  0, 3,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  5,  0,  0
  907.   Data.b  0, 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0
  908.   Data.b  1, 1,  1,  1,  1,  1,  1,  1,  1,  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 ,5  ,3  ,0  ,0  ,1  ,4  ,4  ,4  ,4  ,1  ,0 
  961.   Data.b    0   ,1  ,13 ,13 ,13 ,1  ,1  ,0  ,0  ,0  ,13 ,1  ,1  ,0  ,0  ,0  ,0  ,1  ,13 ,13 ,13 ,1  ,1  ,0  ,0  ,1  ,13 ,13 ,13 ,1  ,1  ,0  ,0  ,0  ,10 ,10 ,10 ,10 ,0  ,0  ,0  ,0  ,1  ,1  ,1  ,1  ,0  ,0 
  962.   Data.b    0   ,0  ,1  ,1  ,1  ,1  ,0  ,0  ,0  ,0  ,1  ,1  ,0  ,0  ,0  ,0  ,0  ,0  ,1  ,1  ,1  ,1  ,0  ,0  ,0  ,0  ,1  ,1  ,1  ,1  ,0  ,0  ,0  ,2  ,0  ,0  ,0  ,0  ,2  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0  ,0 
  963.   end_texture:
  964.  
  965.   solid_tile:
  966.   Data.b 1,2
  967.   end_solid_tile:
  968.  
  969.  
  970.   bin_sound_jump:
  971.   IncludeBinary "jump.wav"
  972.   bin_sound_jump_e:
  973.  
  974.   bin_sound_hurt:
  975.   IncludeBinary "hurt.wav"
  976.   bin_sound_hurt_e:
  977.  
  978.   bin_sound_kill:
  979.   IncludeBinary "kill.wav"
  980.   bin_sound_kill_e:
  981.  
  982.   bin_sound_coin:
  983.   IncludeBinary "coin.wav"
  984.   bin_sound_coin_e:
  985.  
  986.   bin_sound_falling:
  987.   IncludeBinary "falling.wav"
  988.   bin_sound_falling_e:
  989.  
  990.   bin_sound_respawn:
  991.   IncludeBinary "respawn.wav"
  992.   bin_sound_respawn_e:
  993.  
  994.   bin_sound_rejump:
  995.   IncludeBinary "rejump.wav"
  996.   bin_sound_rejump_e:
  997.  
  998.   bin_sound_missile:
  999.   IncludeBinary "missile.wav"
  1000.   bin_sound_missile_e:
  1001.  
  1002.   bin_sound_extralife:
  1003.   IncludeBinary "extralife.wav"
  1004.   bin_sound_extralife_e:
  1005.  
  1006.  
  1007.  
  1008. EndDataSection
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement