Added ANSI parsers and rendering ANSI frames
This commit is contained in:
@@ -48,6 +48,22 @@ class Videotex extends AbstractServer {
|
||||
parent::__construct($o);
|
||||
}
|
||||
|
||||
public function outputPosition($x,$y) {
|
||||
// Take the shortest path.
|
||||
if ($y < 12) {
|
||||
return HOME.
|
||||
(($x < 21)
|
||||
? str_repeat(DOWN,$y).str_repeat(RIGHT,$x)
|
||||
: str_repeat(DOWN,$y+1).str_repeat(LEFT,40-$x));
|
||||
|
||||
} else {
|
||||
return HOME.str_repeat(UP,24-$y).
|
||||
(($x < 21)
|
||||
? str_repeat(RIGHT,$x)
|
||||
: str_repeat(LEFT,40-$x));
|
||||
}
|
||||
}
|
||||
|
||||
public function sendBaseline($client,$text,$reposition=FALSE) {
|
||||
$client->send(HOME.UP.$text.
|
||||
($this->blp > $this->strlenv($text)
|
||||
|
Reference in New Issue
Block a user