2023-11-22 14:30:15 -06:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								# pragma region License 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								/*
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								License  ( OLC - 3 )  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-01-02 00:46:32 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								Copyright  2024  Joshua  Sigona  < sigonasr2 @ gmail . com >  
						 
					
						
							
								
									
										
										
										
											2023-11-22 14:30:15 -06:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								Redistribution  and  use  in  source  and  binary  forms ,  with  or  without  modification ,  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								are  permitted  provided  that  the  following  conditions  are  met :  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								1.  Redistributions  or  derivations  of  source  code  must  retain  the  above  copyright  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								notice ,  this  list  of  conditions  and  the  following  disclaimer .  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								2.  Redistributions  or  derivative  works  in  binary  form  must  reproduce  the  above  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								copyright  notice .  This  list  of  conditions  and  the  following 	disclaimer  must  be  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								reproduced  in  the  documentation  and / or  other  materials  provided  with  the  distribution .  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								3.  Neither  the  name  of  the  copyright  holder  nor  the  names  of  its  contributors  may  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								be  used  to  endorse  or  promote  products  derived  from  this  software  without  specific  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								prior  written  permission .  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								THIS  SOFTWARE  IS  PROVIDED  BY  THE  COPYRIGHT  HOLDERS  AND  CONTRIBUTORS 	" AS IS "  AND  ANY  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								EXPRESS  OR  IMPLIED  WARRANTIES ,  INCLUDING ,  BUT  NOT  LIMITED  TO ,  THE  IMPLIED  WARRANTIES  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								OF  MERCHANTABILITY  AND  FITNESS  FOR  A  PARTICULAR  PURPOSE  ARE  DISCLAIMED .  IN  NO  EVENT  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								SHALL  THE  COPYRIGHT 	HOLDER  OR  CONTRIBUTORS  BE  LIABLE  FOR  ANY  DIRECT ,  INDIRECT ,  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								INCIDENTAL , 	SPECIAL ,  EXEMPLARY ,  OR  CONSEQUENTIAL  DAMAGES  ( INCLUDING ,  BUT  NOT  LIMITED  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								TO ,  PROCUREMENT  OF  SUBSTITUTE  GOODS  OR  SERVICES ;  LOSS  OF  USE ,  DATA ,  OR  PROFITS ;  OR  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								BUSINESS  INTERRUPTION )  HOWEVER  CAUSED  AND  ON  ANY  THEORY  OF  LIABILITY ,  WHETHER  IN  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								CONTRACT ,  STRICT  LIABILITY ,  OR  TORT 	( INCLUDING  NEGLIGENCE  OR  OTHERWISE )  ARISING  IN  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								ANY  WAY  OUT  OF  THE  USE  OF  THIS  SOFTWARE ,  EVEN  IF  ADVISED  OF  THE  POSSIBILITY  OF  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								SUCH  DAMAGE .  
						 
					
						
							
								
									
										
										
										
											2023-11-29 00:50:00 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-01-30 14:48:49 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								Portions  of  this  software  are  copyright  ©  2024  The  FreeType  
						 
					
						
							
								
									
										
										
										
											2023-11-29 00:50:00 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								Project  ( www . freetype . org ) .  Please  see  LICENSE_FT . txt  for  more  information .  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								All  rights  reserved .  
						 
					
						
							
								
									
										
										
										
											2023-11-22 14:30:15 -06:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								*/  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# pragma endregion 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# include  "ItemDrop.h" 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# include  "olcUTIL_Geometry2D.h" 
  
						 
					
						
							
								
									
										
										
										
											2024-01-04 05:21:56 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# include  "AdventuresInLestoria.h" 
  
						 
					
						
							
								
									
										
										
										
											2024-01-08 07:42:44 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# include  "SoundEffect.h" 
  
						 
					
						
							
								
									
										
										
										
											2023-11-22 14:30:15 -06:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								INCLUDE_game  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								INCLUDE_GFX  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								float  ItemDrop : : gravity ;  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								std : : vector < ItemDrop > ItemDrop : : drops ;  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								void  ItemDrop : : Initialize ( ) {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									gravity = " ItemDrop.Item Drop Gravity " _F ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-04-19 02:45:43 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								ItemDrop : : ItemDrop ( const  ItemInfo * item , vf2d  pos , bool  isUpper )  
						 
					
						
							
								
									
										
										
										
											2023-11-22 15:49:41 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								: item ( item ) , pos ( pos ) , upperLevel ( isUpper ) {  
						 
					
						
							
								
									
										
										
										
											2023-11-22 14:30:15 -06:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									speed . x = util : : random ( " ItemDrop.Item Drop Horizontal Speed " _f [ 1 ] - " ItemDrop.Item Drop Horizontal Speed " _f [ 0 ] ) + " ItemDrop.Item Drop Horizontal Speed " _f [ 0 ] ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									speed . y = util : : random ( " ItemDrop.Item Drop Vertical Speed " _f [ 1 ] - " ItemDrop.Item Drop Vertical Speed " _f [ 0 ] ) + " ItemDrop.Item Drop Vertical Speed " _f [ 0 ] ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									zSpeed = " ItemDrop.Item Drop Initial Rise Speed " _F ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-22 15:16:28 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									randomSpinOffset = util : : random ( PI / 2 ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-22 14:30:15 -06:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-02-27 03:16:35 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								vf2d  ItemDrop : : GetPos ( ) const {  
						 
					
						
							
								
									
										
										
										
											2023-11-22 14:30:15 -06:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									return  pos ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								bool  ItemDrop : : OnUpperLevel ( ) {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									return  upperLevel ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-02-27 03:16:35 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								void  ItemDrop : : Draw ( ) const {  
						 
					
						
							
								
									
										
										
										
											2023-11-22 14:30:15 -06:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									# pragma region Item Drop Shadow Rendering 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										if ( GetZ ( ) > 0 ) { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											vf2d  shadowScale = vf2d { 8 * " ItemDrop.Item Drop Scale " _F / 3.f , 1 } / std : : max ( 1.f , GetZ ( ) / 24 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											game - > view . DrawDecal ( GetPos ( ) - vf2d { 3 , 3 } * shadowScale / 2 + vf2d { 0 , 6 * " ItemDrop.Item Drop Scale " _F } , GFX [ " circle.png " ] . Decal ( ) , shadowScale , BLACK ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									# pragma endregion 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-11-22 15:16:28 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									float  yOffset = 0 ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									if ( GetZ ( ) = = 0 ) { 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-27 02:38:12 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
										yOffset = sin ( ( game - > levelTime + randomSpinOffset ) * 3 ) * 0.5f ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-22 15:16:28 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									game - > view . DrawRotatedDecal ( pos - vf2d { 0 , GetZ ( ) + yOffset } , GFX [ " skill_overlay_icon_overlay.png " ] . Decal ( ) , 0 , GFX [ " skill_overlay_icon_overlay.png " ] . Decal ( ) - > sprite - > Size ( ) / 2 , { " ItemDrop.Item Drop Scale " _F , " ItemDrop.Item Drop Scale " _F } , YELLOW ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-12-17 23:37:37 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									game - > view . DrawRotatedDecal ( pos - vf2d { 0 , GetZ ( ) + yOffset } , const_cast < Decal * > ( item - > Decal ( ) ) , 0 , item - > Decal ( ) - > sprite - > Size ( ) / 2 , { " ItemDrop.Item Drop Scale " _F , " ItemDrop.Item Drop Scale " _F } , { 255 , 255 , 255 , 128 } ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-22 14:30:15 -06:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									game - > SetDecalMode ( DecalMode : : ADDITIVE ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-12-17 23:37:37 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									game - > view . DrawRotatedDecal ( pos - vf2d { 0 , GetZ ( ) + yOffset } , const_cast < Decal * > ( item - > Decal ( ) ) , 0 , item - > Decal ( ) - > sprite - > Size ( ) / 2 , { " ItemDrop.Item Drop Scale " _F , " ItemDrop.Item Drop Scale " _F } , { uint8_t ( abs ( sin ( game - > levelTime * 1.5 ) * 255.f ) ) , uint8_t ( abs ( sin ( game - > levelTime * 1.5 ) * 255.f ) ) , uint8_t ( abs ( sin ( game - > levelTime * 1.5 ) * 255.f ) ) , 128 } ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-22 14:30:15 -06:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									game - > SetDecalMode ( DecalMode : : NORMAL ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								void  ItemDrop : : UpdateDrops ( float  fElapsedTime ) {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									for ( ItemDrop & drop : drops ) { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										# pragma region Handle Z Speed 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											drop . z + = drop . zSpeed * fElapsedTime ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-22 15:16:28 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											if ( drop . z < = 0 ) { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												drop . zSpeed = 0 ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												drop . z = 0 ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-22 14:30:15 -06:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
											else { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												drop . zSpeed + = gravity * fElapsedTime ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												drop . pos + = drop . speed * fElapsedTime ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										# pragma endregion 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										# pragma region Check for Suction  /  Player pull-in 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											if ( drop . zSpeed = = 0 & & drop . OnUpperLevel ( ) = = game - > GetPlayer ( ) - > OnUpperLevel ( ) ) { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												geom2d : : line < float > lineTo = geom2d : : line < float > ( drop . pos , game - > GetPlayer ( ) - > GetPos ( ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												float  dist = lineTo . length ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												if ( dist < = " ItemDrop.Item Drop Suction Range " _F ) { 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-22 15:16:28 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
													vf2d  pointVel = lineTo . vector ( ) . norm ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-26 15:51:13 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
													float  moveDistance = ( 1.f / std : : min ( 48.f , dist ) ) * " ItemDrop.Item Drop Suction Strength " _F * fElapsedTime ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													if ( moveDistance > dist ) { 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-22 15:16:28 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
														drop . pos = game - > GetPlayer ( ) - > GetPos ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-22 15:49:41 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
														drop . collected = true ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-22 15:16:28 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
													} else { 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-26 15:51:13 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
														drop . pos + = pointVel * moveDistance ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-22 15:16:28 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
													} 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-22 14:30:15 -06:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
												} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										# pragma endregion 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										# pragma region Handle Upper / Lower Level Zone Intersecting 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											if ( drop . speed . mag ( ) > 0 ) { 
							 
						 
					
						
							
								
									
										
										
										
											2024-02-25 17:28:07 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												const  std : : map < std : : string , std : : vector < ZoneData > > & zoneData = game - > GetZones ( game - > GetCurrentLevel ( ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												for ( const  ZoneData & upperLevelZone : zoneData . at ( " UpperZone " ) ) { 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-22 14:30:15 -06:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
													if ( geom2d : : overlaps ( upperLevelZone . zone , drop . pos ) ) { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														drop . upperLevel = true ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												} 
							 
						 
					
						
							
								
									
										
										
										
											2024-02-25 17:28:07 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
												for ( const  ZoneData & lowerLevelZone : zoneData . at ( " LowerZone " ) ) { 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-22 14:30:15 -06:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
													if ( geom2d : : overlaps ( lowerLevelZone . zone , drop . pos ) ) { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
														drop . upperLevel = false ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
													} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
												} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										# pragma endregion 
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-22 15:49:41 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									std : : erase_if ( drops , [ ] ( ItemDrop & drop ) { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										if ( drop . collected ) { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
											Inventory : : AddItem ( drop . GetItem ( ) - > Name ( ) , 1 , true ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-26 12:17:35 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											ItemOverlay : : AddToItemOverlay ( * drop . GetItem ( ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-01-09 05:44:37 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											SoundEffect : : PlaySFX ( " Collect Item " , SoundEffect : : CENTERED ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-22 15:49:41 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
											return  true ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										} 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
										return  false ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									} ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-26 12:17:35 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
									ItemOverlay : : Update ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-22 14:30:15 -06:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-02-27 03:16:35 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								float  ItemDrop : : GetZ ( ) const {  
						 
					
						
							
								
									
										
										
										
											2023-11-22 14:30:15 -06:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
									return  z ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-04-19 02:45:43 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								void  ItemDrop : : SpawnItem ( const  ItemInfo * item , vf2d  pos , bool  isUpper ) {  
						 
					
						
							
								
									
										
										
										
											2023-11-22 15:49:41 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									drops . push_back ( ItemDrop { item , pos , isUpper } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-04-19 02:45:43 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								const  ItemInfo * ItemDrop : : GetItem ( ) const {  
						 
					
						
							
								
									
										
										
										
											2023-11-22 15:49:41 -06:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
									return  item ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-22 14:30:15 -06:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								}