HP Prime для всех

English  Русский 
Туннель games-app screenshot}}
Название Туннель
Описание This is the official release of my HP Prime port of my HP 39gII Tunnel clone written in BASIC, now adapted for the larger screen and color display. It was the first ever game ever made available for download for this calculator model, although the game has been updated since. It might require some optimizing because I'm still new to HP 39gII/Prime programming, but it still shows how fast the HP Prime on-calc language can be compared to their TI/Casio counterparts.
Автор DJ Omnimaga

Исходный код (скачать):

Исходный код отформатирован программными средствами сайта

EXPORT Tunnel() BEGIN DIMGROB(G1, 320, 240); BLIT_P(G1, 0, 0, 320, 240, G0); FOR Z FROM 2 TO 239 STEP 3 DO BLIT_P(G0, 0, 0, 320, 240, G1, 0, 0, 320, 240-Z); WAIT(0.01); END; 1▶C; 0▶P; 100▶Y; 20▶T; 128▶L; 0▶L1(512); FOR Z FROM 0 TO 16 DO RANDINT(100)▶L1(2*Z+1); 60-RANDINT(4)▶L1(2*Z+2); END; RECT_P(0, 0, 319, 219, RGB(30, 100, 255), RGB(30, 100, 255)); RECT_P(0, 35, 319, 219, RGB(0, 100, 0), RGB(0, 100, 0)); TEXTOUT_P("2013 DJ Omnimaga (www.omnimaga.org)", 122, 25, 1, RGB(255, 255, 255)); FOR Z FROM 0 TO 10 DO TEXTOUT_P("Score:", Z, 0, 7, RGB(25*Z, 255 - (25*Z), 0), 250); TEXTOUT_P("τ υ η η ε ι ρ ɾ ί м ɛ", 122+Z, 0, 7, RGB(0, 25*Z, 0), 250); END; FOR Z FROM 0 TO 4 DO LINE_P(0, Z+35, 319, Z+35, RGB(0, 20*Z, 0)); END; WHILE Y > 0 DO FOR Z FROM 0 TO 15 DO C+1▶C; IF C > 16 THEN 1▶C; END; L1(2*C+2)▶O; L1(2*C+1)▶Q; RECT_P(20*Z, 40, 20*Z+19, O, RGB(0, 50+Q, 0), RGB(0, 50+Q, 0)); RECT_P(20*Z, O, 20*Z+19, O+L, RGB(100+Q, 130, 50), RGB(100+Q, 130, 50)); RECT_P(20*Z, O+L, 20*Z+19, 246, RGB(0, 50+Q, 0), RGB(0, 50+Q, 0)); IF Z = 0 THEN RECT_P(0, Y, 8, Y+12, RGB(0, 0, 0), RGB(150, 150, 255)); RECT_P(2, Y+4, 14, Y+8, RGB(0, 0, 0), RGB(255, 0, 0)); IF Y < O OR Y+12 > O+L THEN 9▶Y; END; END; END; TEXTOUT_P(P, 70, 2, 6, RGB(0, 0, 0), 200, RGB(30, 100, 255)); TEXTOUT_P(P, 72, 2, 6, RGB(5, 255, 255)); P+1▶P; L1(2*C+2)▶S; RANDINT(100)▶U; S+RANDINT(30) - 15▶Ans; IF Ans < 45 THEN 45▶Ans; ELSE IF Ans > 213-L THEN 213-L▶Ans; END; END; C+1▶C; IF C > 16 THEN 1▶C; L-1▶L; END; Ans▶L1(2*C+2); U▶L1(2*C+1); Y - (5*ISKEYDOWN(2)) + (5*ISKEYDOWN(12))▶Y; WAIT(.01666); END; FOR Z FROM 0 TO 7 DO INVERT_P(); WAIT(0.05); END; DIMGROB_P(G1, 122, 30); BLIT_P(G1, 0, 0, 122, 30, G0, 0, 0, 122, 30); RECT_P(RGB(30, 100, 255)); REPEAT GETKEY▶Z; BLIT_P(G0, RANDINT(10), RANDINT(10), 320-RANDINT(10), 240-RANDINT(10), G1, 0, 0, 122, 30); WAIT(.02); UNTIL ISKEYDOWN(4) = 1 OR ISKEYDOWN(30) = 1; END;

Комментарии