Esempio n. 1
0
 def drawRelative(self, player_xpos, player_ypos, lensWidth, lensHeight):
     if not self.hasBeenSeen:
         self.level.timeline.add(self, 0)
         self.hasBeenSeen = True
     unicurses.attron(unicurses.COLOR_PAIR(config.colorDict[self.displayColor]))
     unicurses.mvaddch(-self.ypos + player_ypos + lensHeight, self.xpos - player_xpos + lensWidth, self.display)
     unicurses.attroff(unicurses.COLOR_PAIR(config.colorDict[self.displayColor]))
Esempio n. 2
0
 def drawRelativeBold(self, player_xpos, player_ypos, lensWidth, lensHeight):
     unicurses.attron(unicurses.COLOR_PAIR(config.colorDict[self.displayColor]))
     unicurses.mvaddch(
         -self.ypos + player_ypos + lensHeight,
         self.xpos - player_xpos + lensWidth,
         ord(self.display),
         unicurses.A_REVERSE,
     )
     unicurses.attroff(unicurses.COLOR_PAIR(config.colorDict[self.displayColor]))
Esempio n. 3
0
 def drawHUDBoundaries(self):
     unicurses.attron(unicurses.COLOR_PAIR(config.colorDict["white"]))
     for ypos in range(0, self.lensHeight):
         unicurses.mvaddch(ypos, self.lensWidth-1, ord("|"))
         unicurses.mvaddch(ypos, 0, ord("|"))
     for xpos in range(0, self.lensWidth):
         unicurses.mvaddch(0, xpos, ord("-"))
         unicurses.mvaddch(self.lensHeight-1, xpos, ord("-"))
     for ypos in range(0, self.lensHeight):
         unicurses.mvaddch(ypos, self.lensWidth+self.hudWidth, ord("|"))
     for xpos in range(self.lensWidth, self.lensWidth+self.hudWidth+1):
         unicurses.mvaddch(0, xpos, ord("-"))
         unicurses.mvaddch(self.lensHeight-1, xpos, ord("-"))
     unicurses.attroff(unicurses.COLOR_PAIR(config.colorDict["white"]))
Esempio n. 4
0
 def drawArbitrary(self, xpos, ypos, display, displayColor):
     unicurses.attron(unicurses.COLOR_PAIR(config.colorDict[displayColor]))
     unicurses.mvaddch(-ypos+self.level.player.ypos +self.adjLensHeight, xpos-self.level.player.xpos+self.adjLensWidth, display)
     unicurses.attroff(unicurses.COLOR_PAIR(config.colorDict[displayColor]))
Esempio n. 5
0
 def drawRelativeFromMemory(self, player_xpos, player_ypos, lensWidth, lensHeight):
     unicurses.attron(unicurses.COLOR_PAIR(config.colorDict[self.memoryDisplayColor]))
     unicurses.mvaddch(-self.ypos + player_ypos + lensHeight, self.xpos - player_xpos + lensWidth, ord(self.display))
     unicurses.attroff(unicurses.COLOR_PAIR(config.colorDict[self.memoryDisplayColor]))