Post Reply 
HP Prime: Waterfall Animation
01-11-2014, 11:24 PM (This post was last modified: 01-12-2014 10:47 PM by Eddie W. Shore.)
Post: #1
HP Prime: Waterfall Animation
Background boxes with falling water. There is random mist coming from the water.
Colors:
Blue: #FFh, RGB(0,0,255)
White: #FFFFFFh, RGB(255,255,255)
Brown: #964B00h, RGB(150,75,0)
Green Grass: #DA00h, RGB(0,218,0)

Code:
EXPORT AMNI10()
BEGIN
// 2014-01-10 Waterfall EWS
LOCAL K,J,I,A:=0;
RECT();

WHILE GETKEY==-1 DO
A:=A+1;

// Static 
// Walls
RECT_P(0,5,30,210,#964B00h);
RECT_P(280,5,318,210,#964B00h);
// Water
RECT_P(30,10,280,210,#FFh);
// Grass
TRIANGLE_P(0,210,155,230,318,210,
RGB(0,218,0));

// Animated
// Mist
FOR I FROM 1 TO RANDINT(50,75) DO
TEXTOUT_P(".",RANDINT(30,270),
RANDINT(10,200),3,#FFFFh); END;
// Foam
FOR I FROM 1 TO RANDINT(100,125) DO
TEXTOUT_P("=",RANDINT(25,290),
RANDINT(200,210),3,#FFFFFFh); END;
// Fall
RECT_P(30,10+25*(A+1),280,10+25*A,
#FFFFFFh);
WAIT(0.1);
IF A==8 THEN
A:=0; END;

END;

END;
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
HP Prime: Waterfall Animation - Eddie W. Shore - 01-11-2014 11:24 PM



User(s) browsing this thread: 1 Guest(s)