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
01-12-2014, 07:11 AM
Post: #2
RE: HP Prime: Waterfall Animation
I get syntax error when compiling your code. Could you post an .hpprgm version?

-Dream of Omnimaga
https://djomnimaga.music-2000.com
Visit this user's website Find all posts by this user
Quote this message in a reply
01-12-2014, 11:12 AM
Post: #3
RE: HP Prime: Waterfall Animation
(01-12-2014 07:11 AM)Kevin Ouellet Wrote:  I get syntax error when compiling your code. Could you post an .hpprgm version?

I think there is an END; statement missing at the end of the file

Cheers, Terje
Find all posts by this user
Quote this message in a reply
01-12-2014, 06:22 PM
Post: #4
RE: HP Prime: Waterfall Animation
Ah right, I got it working now.

For some reasons this reminds me some Atari 2600 stuff. Tongue

-Dream of Omnimaga
https://djomnimaga.music-2000.com
Visit this user's website Find all posts by this user
Quote this message in a reply
01-12-2014, 10:48 PM
Post: #5
RE: HP Prime: Waterfall Animation
(01-12-2014 06:22 PM)Kevin Ouellet Wrote:  Ah right, I got it working now.

For some reasons this reminds me some Atari 2600 stuff. Tongue

Smile Atari 2600 - I'll have to work on a more realistic waterfall.

I added the last END; command. It should work now.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 




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