Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!decwrl!decvax!mcnc!gatech!bloom-beacon!husc6!m2c!ulowell!apollo!nazgul From: nazgul@apollo.uucp (Kee Hinckley) Newsgroups: comp.sys.apollo Subject: Re: WANTED: Apollo melting screen program Message-ID: <3a8cdbfc.b0a1@apollo.uucp> Date: 28 Feb 88 09:38:00 GMT References: <8802082359.AA09363@ELI.CS.YALE.EDU> <9589@shemp.CS.UCLA.EDU> <1695@ssc-vax.UUCP> Reply-To: nazgul@morgul.UUCP (Kee Hinckley) Organization: Apollo Computer, Chelmsford, MA Lines: 76 Keywords: lsd, peyote, novelty items, et cetera In article <1695@ssc-vax.UUCP> coy@ssc-vax.UUCP (Stephen B Coy) writes: Here's the original (well, almost, I changed it to do a triangle down instead of a line). It was written by John Francis at Apollo after I suggested it as a hack that I figured he couldn't ignore. You'll need to add a random() routine for it, the original was in assembler, and it should also check the screen size - it was written before that routine was available. Program Melter; %Nolist; %Include '/sys/ins/base.ins.pas'; %Include '/sys/ins/gpr.ins.pas'; %List; PROCEDURE RanSet;EXTERN; FUNCTION Random (IN scale : integer) : integer;VAL_PARAM;EXTERN; VAR Status : Status_$t; Bitmap : gpr_$bitmap_desc_t; Window : gpr_$window_t := [[0,0],[1024,1024]]; Origin : gpr_$position_t; Cycle : Integer; Count : Integer; N_Rows : Integer; N_Cols : Integer; M_Col : Integer; Tri : gpr_$triangle_t; BEGIN Ranset; gpr_$init(gpr_$borrow_nc,1,Window.Window_Size,7,Bitmap,Status); gpr_$inq_bitmap_dimensions(Bitmap,Window.Window_Size,Count,Status); N_Rows := Window.Window_Size.Y_Size; N_Cols := Window.Window_Size.X_Size; gpr_$set_draw_value(0, Status); gpr_$set_fill_value(0, Status); M_Col := N_Cols DIV 2; Tri.P1.X_Coord := 0; Tri.P1.Y_Coord := 0; Tri.P2.X_Coord := M_Col; Tri.P3.X_Coord := N_Cols-1; Tri.P3.Y_Coord := 0; FOR Cycle := 0 TO N_Rows-1 DO BEGIN Tri.P2.Y_Coord := Cycle; gpr_$triangle(Tri.P1, Tri.P2, Tri.P3, Status); FOR Count := 1 TO 20 DO BEGIN Origin.X_Coord := Random(5) - 2; Origin.Y_Coord := Random(4) + 1; Window.Window_Base.X_Coord := Random(N_Cols); Window.Window_Base.Y_Coord := N_Rows - Cycle - Origin.Y_Coord; IF Window.Window_Base.Y_Coord <= 0 THEN NEXT; Window.Window_Base.Y_Coord := Cycle + Random(Random(Random(Window.Window_Base.Y_Coord)+1)+1); Origin.X_Coord := Origin.X_Coord + Window.Window_Base.X_Coord; Origin.Y_Coord := Origin.Y_Coord + Window.Window_Base.Y_Coord; IF (Origin.X_Coord < 0) THEN Origin.X_Coord := 0 ELSE IF (Origin.X_Coord >= N_Cols) THEN Origin.X_Coord := N_Cols - Random(5) - 1; Window.Window_Size.X_Size := Random(N_Cols - Origin.X_Coord)-1; Window.Window_Size.Y_Size := Random(N_Rows - Origin.Y_Coord)-1; gpr_$pixel_blt(Bitmap,Window,Origin,Status); END; END; END. -- ### {mit-erl,yale,uw-beaver}!apollo!nazgul ### (Apple ][e ProLine BBS) ### ### apollo!nazgul@eddie.mit.edu ### nazgul@pro-angmar.uucp ### ### nazgul@apollo.uucp ### (617) 641-3722 300/1200/2400 ### I'm not sure which upsets me more; that people are so unwilling to accept responsibility for their own actions, or that they are so eager to regulate everyone else's.