Example #1
0
File: part4.c Project: plean/Info
void	part4(t_demo *prog, int time)
{
  if (time == 1800)
    prog->i = 0;
  scrolling(prog->pix, &prog->i);
  init_tek_text(prog);
  if (time > 2000)
    init_degr_prog(prog);
}
Example #2
0
//////////////////////////////////////////////////////////////////////////////////////////////////////
// Function: “AddScrolling”
//////////////////////////////////////////////////////////////////////////////////////////////////////
int CFont::AddScrolling( int nXScrolling, int nYScrolling )
{
	// Create and initialize the direction of a scrolling variable for a scrolling call
	CScrolling scrolling( nXScrolling, nYScrolling );
	m_vScrolling.push_back(scrolling);

	// Return the scrolling ID
	return (int)(m_vScrolling.size()-1);
}
Example #3
0
void
World::action(double frame_ratio)
{
  tux.action(frame_ratio);
  tux.check_bounds(level->back_scrolling, (bool)level->hor_autoscroll_speed);
  scrolling(frame_ratio);

  /* Handle bouncy distros: */
  for (unsigned int i = 0; i < bouncy_distros.size(); i++)
    bouncy_distros[i]->action(frame_ratio);

  /* Handle broken bricks: */
  for (unsigned int i = 0; i < broken_bricks.size(); i++)
    broken_bricks[i]->action(frame_ratio);

  // Handle all kinds of game objects
  for (unsigned int i = 0; i < bouncy_bricks.size(); i++)
    bouncy_bricks[i]->action(frame_ratio);
  
  for (unsigned int i = 0; i < floating_scores.size(); i++)
    floating_scores[i]->action(frame_ratio);

  for (unsigned int i = 0; i < bullets.size(); ++i)
    bullets[i].action(frame_ratio);
  
  for (unsigned int i = 0; i < upgrades.size(); i++)
    upgrades[i].action(frame_ratio);

  for (BadGuys::iterator i = bad_guys.begin(); i != bad_guys.end(); ++i)
    (*i)->action(frame_ratio);

  /* update particle systems */
  std::vector<ParticleSystem*>::iterator p;
  for(p = particle_systems.begin(); p != particle_systems.end(); ++p)
    {
      (*p)->simulate(frame_ratio);
    }

  /* Handle all possible collisions. */
  collision_handler();
  
  // Cleanup marked badguys
  for (BadGuys::iterator i = bad_guys.begin(); i != bad_guys.end();
      /* ++i handled at end of the loop */) {
    if ((*i)->is_removable()) {
      delete *i;
      i =  bad_guys.erase(i);
    } else {
      ++i;
    }
  }
}
Example #4
0
int
main (int argc, char *argv[])
{
  gtk_init (NULL, NULL);

  if (g_getenv ("RTL"))
    gtk_widget_set_default_direction (GTK_TEXT_DIR_RTL);

  simple_grid ();
  text_grid ();
  box_comparison ();
  empty_line ();
  scrolling ();
  insert ();
  empty_grid ();

  gtk_main ();

  return 0;
}
Example #5
0
ScrollLine::ScrollLine( QWidget *parent, bool autoScroll )
: QLineEdit( parent )
, mClicked( false )
, mDirection( 1 )
, mPosition( 0 )
, mpDragInfo( new DnDFileInfo( this ) )
{
   setReadOnly( true );
   setContextMenuPolicy( Qt::NoContextMenu );

   if( autoScroll )
   {
      if( !cpTimer )
      {
         cpTimer = new QTimer( qApp );
         cpTimer->setSingleShot( false );
         cpTimer->setInterval( 333 );
         cpTimer->start();
      }
      connect( cpTimer, SIGNAL(timeout()),
               this, SLOT(scrolling()) );
   }
}
Example #6
0
void LuaAVConsole :: setScrollButton(bool v) {
	mScrollButton->setDown(!v);
	scrolling(v);
}
Example #7
0
void LuaAVConsole :: setScrolling(bool v) {
	scrolling(!v);
}