dernier commit avant le Gers

This commit is contained in:
tTh
2024-03-10 06:56:29 +01:00
parent caec2e08fe
commit 2c187e01bc
15 changed files with 145 additions and 81 deletions

View File

@@ -2,6 +2,11 @@
module centermag
implicit none
!-----------------------------------------------------------------------
!-
! By definition, the default centermax (0, 0, 1) give us a
! (-1,-1), (1, 1) box, who is mapped to the screen size.
!-
!-----------------------------------------------------------------------
! definition of structures
!-
type t_centermag
@@ -13,16 +18,30 @@ type t_centermag
end type
!-------------------------------------------------------------------
contains
!-------------------------------------------------------------------
subroutine init_centermag(cntmag, w, h, mag)
type(t_centermag),intent(out) :: cntmag
integer, intent(in) :: w, h ! screen size
real, intent(in) :: mag
write(0, *) ">>> init centermag:", w, h
cntmag%wscr = w ; cntmag%hscr = h
cntmag%mag = mag
end subroutine
!-------------------------------------------------------------------
subroutine print_centermag (cm)
type(t_centermag), intent(in) :: cm
print *, "Screen ", cm%wscr, cm%hscr
print *, "MagFactor ", cm%mag
print *, "Center ", cm%cx, cm%cy
! print *, "Center ", cm%cx, cm%cy
end subroutine
!-------------------------------------------------------------------
!-------------------------------------------------------------------
subroutine centermag_scr2real (sx, sy, rx, ry)
integer, intent(in) :: sx, sy
real, intent(out) :: rx, ry