Welcome, Guest. Please login or register.

Author Topic: Pascal Users  (Read 7570 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline aGGreSSor

  • Newbie
  • *
  • Join Date: Nov 2009
  • Posts: 34
    • Show all replies
Re: Pascal Users
« on: May 01, 2015, 09:32:10 PM »
Here's the my slow flame/plasma on HiSpeed Pascal

Code: [Select]
{ Flame.pas ; HiSpeedPascal Amiga/TP 7.0 compatibly (c) aGGreSSor, 30-Jun-00 }

program Flame;
  uses Crt,Graph;
   var GrDriver,GrMode,x,y,n,m,i,r: integer;
         A: real;
         CTab: array [0..10,0..50] of integer;
         
procedure Clear_Tab;
  begin
   FOR x:=0 TO 50 DO
    FOR y:=0 TO 10 DO
     CTab [x,y]:=0;
    end;
   
procedure RND_Tab;
  begin
   y:=10; Randomize;
    FOR n:=0 TO 50 DO
     begin
      r:=Random(5);
      CTab[n,y]:=r;
     end;
  end;
 
procedure Calc_Tab;
  begin
   FOR y:=1 TO 9 DO
    begin
     FOR x:=1 TO 49 DO
      begin
       A:=Int((CTab[x+1,y+1]+CTab[x-1,y+1])/2);
       CTab[x,y]:=Trunc(A);
     end;
    end;
  end;
 
procedure Print_Tab;
  begin
   FOR y:=1 TO 9 DO
    FOR x:=1 TO 49 DO
      putpixel (x+135,y+160,CTab[x,y]);
  end;
 
  { flame/plasma process.. }
  begin
   GrDriver:=CGA; GrMode:=CGAc0;    {CGA, 320x200, 4 colors}
   InitGraph (GrDriver,GrMode,' '); {0-black, 1-blue, 2-red, 3-magenta}
    Clear_Tab; m:=0;
   REPEAT
    RND_Tab;
    Calc_Tab;
    Print_Tab;
   UNTIL m=250;
m:=0;
   REPEAT
  FOR x:=0 TO 50 DO
   begin
    CTab[x,10]:=0;
   end;
  Calc_Tab;
  Print_Tab;
m:=m+1;
  UNTIL m=30;
 
{ delay (1000); }

  CloseGraph
    end.

Hehe
A1230@50MHz/32M/80G, Mediator PCI (S3 ViRGE/DX 4M, RTL8139), GBS-8200, AOS 3.9;
A2000@7.14MHz without all :laugh1: