exe cmd
This commit is contained in:
parent
0336cfaeb3
commit
8bbf0b584f
|
@ -35,18 +35,23 @@ program main
|
||||||
!
|
!
|
||||||
! do login stuff here
|
! do login stuff here
|
||||||
!
|
!
|
||||||
|
!call execute_command_line('mkfifo /tmp/fortran-mmo-in.pipe && mkfifo /tmp/fortran-mmo-out.pipe')
|
||||||
|
|
||||||
!Main game loop
|
!Main game loop
|
||||||
do while (.not. window_should_close()) ! Detect window close button or ESC key
|
do while (.not. window_should_close()) ! Detect window close button or ESC key
|
||||||
|
|
||||||
if (is_key_down(KEY_RIGHT)) then
|
if (is_key_down(KEY_RIGHT)) then
|
||||||
player_position%x = player_position%x + 0.2_c_float
|
player_position%x = player_position%x + 0.2_c_float
|
||||||
|
player_updated = .true.
|
||||||
else if (is_key_down(KEY_LEFT)) then
|
else if (is_key_down(KEY_LEFT)) then
|
||||||
player_position%x = player_position%x - 0.2_c_float
|
player_position%x = player_position%x - 0.2_c_float
|
||||||
|
player_updated = .true.
|
||||||
else if (is_key_down(KEY_DOWN)) then
|
else if (is_key_down(KEY_DOWN)) then
|
||||||
player_position%z = player_position%z + 0.2_c_float
|
player_position%z = player_position%z + 0.2_c_float
|
||||||
|
player_updated = .true.
|
||||||
else if (is_key_down(KEY_UP)) then
|
else if (is_key_down(KEY_UP)) then
|
||||||
player_position%z = player_position%z - 0.2_c_float
|
player_position%z = player_position%z - 0.2_c_float
|
||||||
|
player_updated = .true.
|
||||||
end if
|
end if
|
||||||
|
|
||||||
camera%position%x = player_position%x
|
camera%position%x = player_position%x
|
||||||
|
@ -59,6 +64,7 @@ program main
|
||||||
|
|
||||||
! if player updated
|
! if player updated
|
||||||
! send new player postition to server
|
! send new player postition to server
|
||||||
|
! call execute_command_line('nc localhost 35565 < /tmp/fortran-mmo-in.pipe > /tmp/fortran-mmo-out.pipe')
|
||||||
! else
|
! else
|
||||||
! send ping to server
|
! send ping to server
|
||||||
! read response
|
! read response
|
||||||
|
@ -94,7 +100,6 @@ program main
|
||||||
!
|
!
|
||||||
|
|
||||||
call close_window() !Close window and OpenGL context
|
call close_window() !Close window and OpenGL context
|
||||||
|
call execute_command_line('rm /tmp/fortran-mmo.pipe')
|
||||||
|
|
||||||
contains
|
end program main
|
||||||
|
|
||||||
end program main
|
|
Loading…
Reference in New Issue