Ejemplo n.º 1
0
def platform():
  '''
  The platform in the rear with a treasure chest and torches
  '''
  glPushMatrix()

  #The ground
  glPushMatrix()
  glRotatef(90, 1, 0, 0)
  gluDisk(gluNewQuadric(), 0, 3, 20, 10)
  gluCylinder(gluNewQuadric(), 3, 3, 1, 20, 10)
  glPopMatrix()
  
  mdobbsItems.chest(4, [0.54, 0.28, 0.15])  
  
  #the torch
  glPushMatrix()
  glTranslatef(-.7, 0, 0)
  glRotatef(45, 0, 1,0)
  mdobbsItems.niceTorch()
  glPopMatrix()
  
  glPopMatrix()
 
  #more ground
  glPushMatrix()
  glColor3fv(terrainColor)
  glTranslatef(8, 0, 0)
  glScalef(10, 1, 6)
  glutSolidCube(1)
  glPopMatrix()

  #the turret
  glPushMatrix()
  glTranslatef(11, 0, 0)
  glRotatef(90, 0, 1, 0)
  glScalef(1.3, 1.3, 1.3)
  mdobbsItems.turret(3)
  glPopMatrix()
Ejemplo n.º 2
0
def groundLevel():
  '''
  The lower level of the dungeon, including stairs.
  '''
  glPushMatrix()
  glTranslatef(-w/4, .5, (zcenter/2))
 
  glPushMatrix()
  glScalef(20, 1, -zcenter)
  glColor3fv(terrainColor)
  glutSolidCube(1)
  glPopMatrix()
 
  glTranslatef(w/2.0, 0, 0)
  glScalef(20, 1, -zcenter)
  glutSolidCube(1)
  glPopMatrix()

  glPushMatrix()
  glTranslatef(-w*.5+2, 0, 0)

  glPushMatrix()
  glScalef(4, 1, 1)
  mdobbsItems.staircase(l-5)
  glPopMatrix()
 
  glTranslatef(w-5, 0, 0)
  
  glPushMatrix()
  glTranslatef(-5, 0, -3)
  glScalef(1.5, 1.5, 1.5)
  mdobbsItems.turret(3)
  glPopMatrix()

  glColor3fv(terrainColor)
  glScalef(6, 1, 1)
  mdobbsItems.staircase(l-5)
  glPopMatrix()