void WorldEditor::render( int skip ) { viewportScreen.Render( camView.Object() , TRUE , TRUE ); float fps = updateFPS(); TMessageShow msgShow( m_world ); msgShow.start(); msgShow.push( "Fps: %6.2f", fps ); { Vec3D pos = camControl.getPosition(); Vec3D dir = camControl.getViewDir(); msgShow.push( "Cam pos = ( %.1f %.1f %.1f ) viewDir = ( %.2f %.2f %.2f )" , pos.x() , pos.y() , pos.z() , dir.x() , dir.y() , dir.z() ); } g_devLog.show( msgShow ); //if ( EditData* data = m_objEdit.getSelectEditData()) //{ // if ( TActor* actor = TActor::upCast( data->entity ) ) // { // Vec3D pos = actor->getPosition(); // msgShow.push( "Hit pos = ( %.1f %.1f %.1f ) " , // pos.x() , pos.y() ,pos.z() ); // actor->getFlyActor().GetWorldPosition( pos ); // msgShow.push( "Hit pos = ( %.1f %.1f %.1f ) " , // pos.x() , pos.y() ,pos.z() ); // } //} if ( m_player ) { Vec3D dir = m_player->getFaceDir(); msgShow.push( "viewDir = ( %.2f %.2f %.2f )" , dir.x() , dir.y() , dir.z() ); m_player->getFlyActor().GetDirection( dir , NULL ); msgShow.push( "viewDir = ( %.2f %.2f %.2f )" , dir.x() , dir.y() , dir.z() ); FnObject obj; obj.Object( m_player->getFlyActor().GetBaseObject() ); msgShow.push( "viewDir = ( %.2f %.2f %.2f )" , dir.x() , dir.y() , dir.z() ); } if ( m_Mode == MODE_RUN ) { TProfileIterator* profIter = TProfileManager::createIterator(); profIter->getCurNode()->showAllChild( true ); showProfileInfo( profIter , msgShow , NULL ); TProfileManager::releaseIterator( profIter ); } msgShow.finish(); m_world.SwapBuffers(); }
void TConsoleStage::reader() { TGameStage::reader(); TMessageShow msgShow( g_Game->getWorld() ); msgShow.setPos( 20 , 700 ); msgShow.setOffsetY(-18); msgShow.start(); msgShow.push( "Console : %s" , g_console.getInputStr().c_str() ); g_log.show(msgShow); msgShow.finish(); }
static void refundAction() { int c50, c10, c5, c1, m; if(money == 0) return; DCM_High(dcmfd); m = money; c50 = money/50; if(c50 > 0){ coinRefund(&coin50, c50); enableWindow(btn_coin50); } money %= 50; c10 = money/10; if(c10 > 0){ coinRefund(&coin10, c10); enableWindow(btn_coin10); } money %= 10; c5 = money/5; if(c5 > 0){ coinRefund(&coin5, c5); enableWindow(btn_coin5); } money %= 5; c1 = money; if(c1 > 0){ coinRefund(&coin1, c1); enableWindow(btn_coin1); } money = 0; sprintf(buf, "(Refund) $50:%d $10:%d $5:%d $1:%d Total:$%d", c50, c10, c5, c1, m); msgShow(buf); disableWindow(btn_refund); DCM_Off(dcmfd); }