예제 #1
0
void 
draw(void)
{
  int t, f;

  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

  if (back_wall) {
    glMaterialfv(GL_FRONT, GL_DIFFUSE, wallcolor);
    DrawWall();
  }
  glPushMatrix();
  {
    glTranslatef(WIDTH / 2, HEIGHT / 2, 0);
    glRotatef(xlangle, 0, 1, 0);
    glRotatef(ylangle, 1, 0, 0);
    glTranslatef(-WIDTH / 2, -HEIGHT / 2, 0);
    glLightfv(GL_LIGHT0, GL_POSITION, lightZeroPosition);
  }
  glPopMatrix();

  glPushMatrix();
  {
    glTranslatef(WIDTH / 2, HEIGHT / 2, 0);
    glRotatef(xangle, 0, 1, 0);
    glRotatef(yangle, 1, 0, 0);
    glTranslatef(-WIDTH / 2, -HEIGHT / 2, 0);
    DrawPosts();
    DrawDooDads();
  }
  glPopMatrix();
  if (motion && moves.depth) {
    t = moves.head->t;
    f = moves.head->f;
    push(t, pop(f));
    mpop();
  }
  glutSwapBuffers();
}
예제 #2
0
void shl(){
  mpush( mpop()<<1 );
}
예제 #3
0
void zbra(){
  if( mpop() ) ip=ip+CELL;
  else bra();
}
예제 #4
0
void dup(){
  cell t=mpop();
  mpush(t);
  mpush(t);
}
예제 #5
0
void push(){
  rp=rp-CELL;
  mstore(mpop(),rp);
}
예제 #6
0
// Pops 2 cells off data stack
void m2pop(){
  t=mpop();
  n=mpop();
}
예제 #7
0
void com(){
  mpush( ~mpop() );
}

void plus(){
  m2pop();
  mpush( t + n );
}

void shl(){
  mpush( mpop()<<1 );
}

void shr(){
  mpush( mpop()>>1 );
}

void oneplus(){
  mpush( mpop()+1 );
}

void oneminus(){
  mpush( mpop()-1 );
}

void spat(){
  mpush(sp);
}

void spbang(){