Revision: 6619 http://playerstage.svn.sourceforge.net/playerstage/?rev=6619&view=rev Author: jeremy_asher Date: 2008-06-17 11:19:50 -0700 (Tue, 17 Jun 2008)
Log Message: ----------- fixed some warnings Modified Paths: -------------- code/stage/trunk/libstage/model.cc code/stage/trunk/libstage/stage.hh code/stage/trunk/libstage/world.cc code/stage/trunk/libstage/worldgui.cc Modified: code/stage/trunk/libstage/model.cc =================================================================== --- code/stage/trunk/libstage/model.cc 2008-06-17 17:45:11 UTC (rev 6618) +++ code/stage/trunk/libstage/model.cc 2008-06-17 18:19:50 UTC (rev 6619) @@ -225,15 +225,10 @@ this->on_velocity_list = false; this->last_update = 0; - this->interval = 1e4; // 10msec + this->interval = (stg_usec_t)1e4; // 10msec this->initfunc = NULL; - this->startup_hook = NULL; - this->shutdown_hook = NULL; - this->load_hook = NULL; - this->save_hook = NULL; - this->wf = NULL; this->wf_entity = 0; @@ -722,18 +717,18 @@ void StgModel::UpdateIfDue( void ) { - if( world->sim_time >= - (last_update + interval) ) - this->Update(); + if( world->sim_time >= + (last_update + interval) ) + this->Update(); } void StgModel::Update( void ) { - //printf( "[%lu] %s update (%d subs)\n", - // this->world->sim_time_ms, this->token, this->subs ); - - CallCallbacks( &update_hook ); - last_update = world->sim_time; + //printf( "[%llu] %s update (%d subs)\n", + // this->world->sim_time, this->token, this->subs ); + + CallCallbacks( &update_hook ); + last_update = world->sim_time; } void StgModel::DrawSelected() Modified: code/stage/trunk/libstage/stage.hh =================================================================== --- code/stage/trunk/libstage/stage.hh 2008-06-17 17:45:11 UTC (rev 6618) +++ code/stage/trunk/libstage/stage.hh 2008-06-17 18:19:50 UTC (rev 6619) @@ -88,6 +88,7 @@ class StgCanvas; class Worldfile; class StgWorld; + class StgWorldGui; class StgModel; /** Initialize the Stage library */ Modified: code/stage/trunk/libstage/world.cc =================================================================== --- code/stage/trunk/libstage/world.cc 2008-06-17 17:45:11 UTC (rev 6618) +++ code/stage/trunk/libstage/world.cc 2008-06-17 18:19:50 UTC (rev 6619) @@ -215,7 +215,8 @@ wf->ReadString( entity, "name", token ); this->interval_sim = (stg_usec_t)thousand * - wf->ReadInt( entity, "interval_sim", this->interval_sim/thousand ); + wf->ReadInt( entity, "interval_sim", + (int)(this->interval_sim/thousand) ); if( wf->PropertyExists( entity, "quit_time" ) ) this->quit_time = (stg_usec_t)million * Modified: code/stage/trunk/libstage/worldgui.cc =================================================================== --- code/stage/trunk/libstage/worldgui.cc 2008-06-17 17:45:11 UTC (rev 6618) +++ code/stage/trunk/libstage/worldgui.cc 2008-06-17 18:19:50 UTC (rev 6619) @@ -264,7 +264,7 @@ wf->ReadInt( wf_section, "paused", this->paused ); this->interval_real = (stg_usec_t)thousand * - wf->ReadInt( wf_section, "interval_real", this->interval_real/thousand ); + wf->ReadInt( wf_section, "interval_real", (int)(this->interval_real/thousand) ); int width = (int)wf->ReadTupleFloat(wf_section, "size", 0, w() ); int height = (int)wf->ReadTupleFloat(wf_section, "size", 1, h() ); @@ -585,6 +585,7 @@ bool val = paused ? true : StgWorld::Update(); + stg_usec_t interval; stg_usec_t timenow; @@ -598,19 +599,16 @@ double sleeptime = (double)interval_real - (double)interval; if( sleeptime > 0 ) - usleep( MIN(sleeptime,100000) ); // check the GUI at 10Hz min + usleep( (stg_usec_t)MIN(sleeptime,100000) ); // check the GUI at 10Hz min } while( interval < interval_real ); real_time_of_last_update = timenow; - //stg_usec_t timenow = RealTimeSinceStart(); interval_log[updates%INTERVAL_LOG_LEN] = interval_real;//timenow - real_time_now; - // real_time_now = timenow; - return val; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Playerstage-commit mailing list Playerstage-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/playerstage-commit