Index: trunk/src/engine/particle_engine.cc
===================================================================
--- trunk/src/engine/particle_engine.cc	(revision 395)
+++ trunk/src/engine/particle_engine.cc	(revision 406)
@@ -194,5 +194,5 @@
 static bool nv_particle_affector_linear_force_init( lua::table_guard* table, particle_affector_data* data )
 {
-	nvpe_linear_force_data* datap = ((nvpe_linear_force_data*)data->paramters);
+	nvpe_linear_force_data* datap = reinterpret_cast<nvpe_linear_force_data*>( data->paramters );
 	datap->force_vector = table->get<vec3>("force_vector", vec3() );
 	datap->average      = table->get<bool>("average", false );
@@ -202,5 +202,5 @@
 static void nv_particle_affector_linear_force( const particle_affector_data* data, particle* p, float factor, uint32 count )
 {
-	nvpe_linear_force_data* datap = ((nvpe_linear_force_data*)data->paramters);
+	const nvpe_linear_force_data* datap = reinterpret_cast<const nvpe_linear_force_data*>( data->paramters );
 	if ( datap->average )
 	{
@@ -226,5 +226,5 @@
 static bool nv_particle_affector_deflector_plane_init( lua::table_guard* table, particle_affector_data* data )
 {
-	nvpe_deflector_plane_data* datap = ((nvpe_deflector_plane_data*)data->paramters);
+	nvpe_deflector_plane_data* datap = reinterpret_cast<nvpe_deflector_plane_data*>( data->paramters );
 	datap->plane_point  = table->get<vec3>("plane_point",  vec3() );
 	datap->plane_normal = table->get<vec3>("plane_normal", vec3(0.0f,1.0f,0.0f) );
@@ -237,5 +237,5 @@
 static void nv_particle_affector_deflector_plane( const particle_affector_data* data, particle* p, float factor, uint32 count )
 {
-	nvpe_deflector_plane_data* datap = ((nvpe_deflector_plane_data*)data->paramters);
+	const nvpe_deflector_plane_data* datap = reinterpret_cast<const nvpe_deflector_plane_data*>( data->paramters );
 	for ( uint32 i = 0; i < count; ++i )
 	{
@@ -262,5 +262,5 @@
 static bool nv_particle_affector_color_fader_init( lua::table_guard* table, particle_affector_data* data )
 {
-	nvpe_color_fader_data* datap = ((nvpe_color_fader_data*)data->paramters);
+	nvpe_color_fader_data* datap = reinterpret_cast<nvpe_color_fader_data*>( data->paramters );
 	datap->adjustment = table->get<vec4>("adjustment",  vec4() );
 	return true;
@@ -269,5 +269,5 @@
 static void nv_particle_affector_color_fader( const particle_affector_data* data, particle* p, float factor, uint32 count )
 {
-	nvpe_color_fader_data* datap = ((nvpe_color_fader_data*)data->paramters);
+	const nvpe_color_fader_data* datap = reinterpret_cast<const nvpe_color_fader_data*>( data->paramters );
 	vec4 adjustment = datap->adjustment * factor;
 	for ( uint32 i = 0; i < count; ++i )
@@ -284,5 +284,5 @@
 static bool nv_particle_affector_scaler_init( lua::table_guard* table, particle_affector_data* data )
 {
-	nvpe_scaler_data* datap = ((nvpe_scaler_data*)data->paramters);
+	nvpe_scaler_data* datap = reinterpret_cast<nvpe_scaler_data*>( data->paramters );
 	float rate        = table->get<float>("rate", 0.0f );
 	datap->adjustment = table->get<vec2>("adjustment",  vec2(rate,rate) );
@@ -292,5 +292,5 @@
 static void nv_particle_affector_scaler( const particle_affector_data* data, particle* p, float factor, uint32 count )
 {
-	nvpe_scaler_data* datap = ((nvpe_scaler_data*)data->paramters);
+	const nvpe_scaler_data* datap = reinterpret_cast<const nvpe_scaler_data*>( data->paramters );
 	vec2 adjustment = datap->adjustment * factor;
 	for ( uint32 i = 0; i < count; ++i )
@@ -496,6 +496,5 @@
 	info->particles = new particle[ data->quota ];
 	info->quads     = new particle_quad[ data->quota ];
-	info->vtx_array = m_context->create_vertex_array<particle_vtx>( 
-		(particle_vtx*)info->quads, data->quota*6, STREAM_DRAW );
+	info->vtx_array = m_context->create_vertex_array<particle_vtx>( info->quads[0].data, data->quota*6, STREAM_DRAW );
 	info->vtx_buffer = m_context->find_buffer( info->vtx_array, slot::POSITION );
 	info->last_update = m_last_update;
@@ -691,5 +690,5 @@
 {
 	if ( info->count > 0 )
-		for ( sint32 i = (sint32)info->count-1; i >= 0; --i )
+		for ( sint32 i = sint32( info->count ) - 1; i >= 0; --i )
 		{
 			particle& pinfo = info->particles[i];
