winter is coming

This commit is contained in:
tTh
2023-10-10 22:08:50 +02:00
parent 098b12cd61
commit 462d24b717
4 changed files with 87 additions and 39 deletions

View File

@@ -85,20 +85,23 @@ subroutine noise_range_rgb16_pic(prgb, rngs, nbre)
type(t_pixrgb), dimension(:,:), intent(inout) :: prgb
integer, intent(in) :: rngs(6)
integer, intent(in) :: nbre
integer :: quux, ix, iy, width, height
integer :: foo, ix, iy
print *, 'noise rgb16 range', nbre
print *, 'ranges:'
print *, rngs
! print *, 'noise rgb16 range', nbre
! print *, 'rngs', rngs
width = ubound(prgb, 1) ; height = ubound(prgb, 2)
do foo = 1, nbre
ix = 1 + mod ( irand(), ubound(prgb, 1) )
iy = 1 + mod ( irand(), ubound(prgb, 2) )
prgb(ix, iy)%r = rngs(1) + mod(irand(), rngs(2) - rngs(1))
do quux=1, nbre
ix = 1 + mod ( irand(), width )
iy = 1 + mod ( irand(), height )
prgb(ix, iy)%r = mod ( irand(), 65536 )
prgb(ix, iy)%g = mod ( irand(), 65536 )
prgb(ix, iy)%b = mod ( irand(), 65536 )
ix = 1 + mod ( irand(), ubound(prgb, 1) )
iy = 1 + mod ( irand(), ubound(prgb, 2) )
prgb(ix, iy)%g = rngs(3) + mod(irand(), rngs(4) - rngs(3))
ix = 1 + mod ( irand(), ubound(prgb, 1) )
iy = 1 + mod ( irand(), ubound(prgb, 2) )
prgb(ix, iy)%b = rngs(5) + mod(irand(), rngs(6) - rngs(5))
enddo
end subroutine