@@ -116,22 +116,22 @@ int main(void)
116116 float sw = (float )GetScreenWidth ();
117117 SetShaderValue (shdrSpot , wLoc , & sw , SHADER_UNIFORM_FLOAT );
118118
119- // Randomise the locations and velocities of the spotlights
120- // and initialise the shader locations
119+ // Randomize the locations and velocities of the spotlights
120+ // and initialize the shader locations
121121 for (int i = 0 ; i < MAX_SPOTS ; i ++ )
122122 {
123- spots [i ].pos .x = GetRandomValue (64 , screenWidth - 64 );
124- spots [i ].pos .y = GetRandomValue (64 , screenHeight - 64 );
123+ spots [i ].pos .x = GetRandomValue (64.0f , screenWidth - 64.0f );
124+ spots [i ].pos .y = GetRandomValue (64.0f , screenHeight - 64.0f );
125125 spots [i ].vel = (Vector2 ){ 0 , 0 };
126126
127127 while ((fabs (spots [i ].vel .x ) + fabs (spots [i ].vel .y )) < 2 )
128128 {
129- spots [i ].vel .x = GetRandomValue (-40 , 40 )/ 10.0 ;
130- spots [i ].vel .y = GetRandomValue (-40 , 40 )/ 10.0 ;
129+ spots [i ].vel .x = GetRandomValue (-400.f , 40.0f ) / 10.0f ;
130+ spots [i ].vel .y = GetRandomValue (-400.f , 40.0f ) / 10.0f ;
131131 }
132132
133- spots [i ].inner = 28 * (i + 1 );
134- spots [i ].radius = 48 * (i + 1 );
133+ spots [i ].inner = 28.0f * (i + 1 );
134+ spots [i ].radius = 48.0f * (i + 1 );
135135
136136 SetShaderValue (shdrSpot , spots [i ].posLoc , & spots [i ].pos .x , SHADER_UNIFORM_VEC2 );
137137 SetShaderValue (shdrSpot , spots [i ].innerLoc , & spots [i ].inner , SHADER_UNIFORM_FLOAT );
@@ -184,14 +184,14 @@ int main(void)
184184 for (int n = 0 ; n < MAX_STARS ; n ++ )
185185 {
186186 // Single pixel is just too small these days!
187- DrawRectangle (stars [n ].pos .x , stars [n ].pos .y , 2 , 2 , WHITE );
187+ DrawRectangle (( int ) stars [n ].pos .x , ( int ) stars [n ].pos .y , 2 , 2 , WHITE );
188188 }
189189
190190 for (int i = 0 ; i < 16 ; i ++ )
191191 {
192192 DrawTexture (texRay ,
193- (screenWidth /2.0 ) + cos ((frameCounter + i * 8 )/51.45f )* (screenWidth /2.2 ) - 32 ,
194- (screenHeight /2.0 ) + sin ((frameCounter + i * 8 )/17.87f )* (screenHeight /4.2 ), WHITE );
193+ (screenWidth /2.0f ) + cos ((frameCounter + i * 8 )/51.45f )* (screenWidth /2.2f ) - 32 ,
194+ (screenHeight /2.0f ) + sin ((frameCounter + i * 8 )/17.87f )* (screenHeight /4.2f ), WHITE );
195195 }
196196
197197 // Draw spot lights
0 commit comments