OK boomer

This commit is contained in:
tTh
2022-11-22 08:58:56 +01:00
parent ecfcef2303
commit 8535ba09d9
5 changed files with 53 additions and 15 deletions

View File

@@ -4,7 +4,7 @@ program essai
integer :: foo, bar
integer :: nbarg
integer :: numframe = 1
integer :: numframe = 0
character(len=32) :: arg
! write(0, *) "------------ essai graf anim ---------------"
@@ -12,30 +12,35 @@ program essai
nbarg = IARGC()
if (nbarg .GT. 0) then
call GETARG(1, arg)
write (0, '(A40, A5)') "argument = ", arg
! write (0, '(A40, A5)') "argument = ", arg
read (arg, *) numframe
endif
write(0, '(A40, I5)') "frame number =", numframe
! write(0, '(A20, I5)') "frame number =", numframe
call init_genplot("essai.genplot")
! call do_frame(7)
call do_frame(7)
bar = (numframe * 20) - 160
do foo=20, 620, 40
call gplt_setcol(2)
bar = (numframe * 20) - 120
do foo=20, 620, 50
call gplt_line(foo, 20, bar, 460)
call gplt_line(bar, 20, foo, 460)
enddo
call end_genplot("done for today")
contains !------------------------------------------
subroutine do_frame(color)
integer, intent(in) :: color
integer :: savecol
call gplt_line( 0, 0, 640, 0)
call gplt_line( 0, 480, 640, 480)
call gplt_line( 0, 0, 0, 480)
call gplt_line(640, 0, 640, 480)
savecol = gplt_getcol()
call gplt_setcol(color)
call gplt_rect(0, 0, 640, 480)
call gplt_setcol(savecol)
end subroutine