예제 #1
0
void BlockInit(Block *block, const float x, const float y, const float w)
{
	block->Body = MakeBody(x, y, w);
	block->W = w;
	block->H = GAP_HEIGHT;
	block->Surface = RandomSurface();
}
예제 #2
0
void StatsPoster::OnPostRequest(const GameStats& stats) {
    // Delete old ones, keep new ones if we have too many uncompleted
    HttpPost *post = new HttpPost(addr_, path_, MakeBody(stats));
    waiting_.push_back(post);
    if (waiting_.size() > kcPostsWaitingMax) {
        delete waiting_[0];
        waiting_.pop_front();
    }
    SchedulePosts();
}
예제 #3
0
    CQTOpenGLTile::CQTOpenGLTile() :
       m_unVertices(20){

       /* Reserve the needed display lists */
       m_unBaseList = glGenLists(1);
       m_unBodyList = m_unBaseList;

       /* Make body list */
       glNewList(m_unBodyList, GL_COMPILE);
       MakeBody();
       glEndList();

    }
예제 #4
0
   CQTOpenGLCylinder::CQTOpenGLCylinder() :
      m_unVertices(20) {

      /* Reserve the needed display lists */
      m_unBaseList = glGenLists(1);
      m_unBodyList = m_unBaseList;
      m_unLEDList = m_unBaseList + 1;

      /* Make body list */
      glNewList(m_unBodyList, GL_COMPILE);
      MakeBody();
      glEndList();

      /* Make LED list */
      glNewList(m_unLEDList, GL_COMPILE);
      MakeLED();
      glEndList();
   }