[ANSI] MPL code guidance
From
calcmandan@21:1/172 to
All on Sat Jan 18 20:16:44 2025
I'm trying to create a dope ass door to launch IRC connections from my board. Utilizing animations inspired by the mpl demo in mystic, I have the following code.
It works as I imagined it, but there's is a flickering by virtue of the redrawing I did as a workaround to the animation rewriting the environment.
I'm asking for peer review. What I want: smooth animation with no flicker.
Thanks in advance,
USES CFG;
USES USER;
Procedure DrawLines;
Var
Row, Col: Byte;
Begin
For Row := 7 to 13 Do Begin
For Col := 1 to 79 Do Begin
GotoXY(Col, Row);
Write('_');
End;
End;
BufFlush;
End;
Procedure DrawIRC(X: Byte);
Begin
GotoXY(X - 1, 8);
Write('/\/\/\/\__/\/\/\/\/\______/\/\/\/\');
GotoXY(X - 1, 9);
Write('__/\/\____/\/\____/\/\__/\/\______');
GotoXY(X - 1, 10);
Write('__/\/\____/\/\/\/\/\____/\/\______');
GotoXY(X - 1, 11);
Write('__/\/\____/\/\__/\/\____/\/\______');
GotoXY(X - 1, 12);
Write('/\/\/\/\__/\/\____/\/\____/\/\/\/\');
BufFlush;
End;
Procedure Draw_Animated_Intro;
Var
Count: Byte;
Begin
For Count := 2 to 25 Do Begin
DrawLines;
DrawIRC(Count);
Delay(15);
End;
End;
Begin
ClrScr;
Draw_Animated_Intro;
GotoXY(32, 24);
BufFlush;
Pause;
End.
... Hard work never killed anyone but why take a risk?
--- Mystic BBS v1.12 A49 2023/04/30 (Linux/64)
* Origin: The Bottomless Abyss BBS * bbs.bottomlessabyss.net (21:1/172)