All pastes #428370 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-04-07 14:58 UTC
rendered paste body
for (h = -1 ; h <= 1 ; ++h) {
      for (v = -1 ; v <= 1 ; ++v) {
         glPushMatrix();
         glTranslatef(2.0f * X_UNITS * h, 2.0f * Y_UNITS * v, 0.0f);

         /* draw local shape */
         glPushMatrix();
         glTranslatef(eng->local_shape_pos.x, eng->local_shape_pos.y, 0.0f);
         glCallList(CIRCLE);
         glPopMatrix();

         /* draw peer shapes */
         for (id = 0 ; id < eng->nclients ; ++id) {
            if (id == client_get_id())
               continue;

            sp = stack_peek(eng->peer_shape_position_tbl[id]);
            if (sp == NULL)
               continue;

            glPushMatrix();
            glTranslatef(sp->x, sp->y, 0.0f);
            glCallList(CIRCLE);
            glPopMatrix();
         }

         glPopMatrix();
      }
   }