Index

Package: Game_Control

Description

package Game_Control is
To do : programmable behaviour

Types

Command

type Command is (
                    go_forward,
                    go_backwards,
                    go_graduated,
                    slide_left,
                    slide_right,
                    slide_lateral_graduated,
                    turn_left,
                    turn_right,
                    turn_lateral_graduated,
                    slide_up,
                    slide_down,
                    slide_vertical_graduated,
                    turn_up,
                    turn_down,
                    turn_vertical_graduated,
                    run_mode,
                    ctrl_mode, -- "shoot", but useless with GLUT
                    slide_mode,
                    swing_plus,
                    swing_minus,
                    jump,
                    special_plus,
                    special_minus,
                    photo, video,
                    toggle_10,
                    interrupt_game,
                    n0, n1, n2, n3, n4, n5, n6, n7, n8, n9, -- numeric keys
                    bogus_command  -- a control can be directed on this
                   );

References:

game_control.ads:14:9 (declaration)
game_control.adb:51:47 (reference)
game_control.adb:51:65 (reference)
game_control.ads:44:20 (reference)
game_control.ads:46:30 (reference)
glut-windows.adb:360:39 (reference)
glut-windows.adb:360:57 (reference)

Command_set

type Command_set is array (Command) of Boolean;

References:

game_control.ads:46:8 (declaration)
actors.adb:9:72 (reference)
actors.adb:60:64 (reference)
actors.adb:67:61 (reference)
actors.adb:97:70 (reference)
actors.adb:145:70 (reference)
actors.ads:18:64 (reference)
actors.ads:28:72 (reference)
actors.ads:39:61 (reference)
actors.ads:46:70 (reference)
actors.ads:55:70 (reference)
game_control.adb:15:51 (reference)
game_control.ads:49:25 (reference)
game_control.ads:64:64 (reference)
glut-windows.ads:111:39 (reference)

Constants & Global variables

no_command (Command_set)

no_command : constant Command_set := (others => False);

References:

game_control.ads:49:3 (declaration)
glut-windows.adb:398:32 (reference)
glut-windows.ads:111:67 (reference)
The empty command set:

Subprograms & Entries

Append_Commands

procedure Append_Commands 
(size_x, size_y: Integer;
-- screen dimensions for mouse warp_mouse: Boolean;
-- recenter mouse cursor c: in out Game_Control.Command_set;
-- commands are added to c gx, gy: out GL.Double;
-- mouse movement since last call Keyboard: access GLUT.Devices.Keyboard := GLUT.Devices.default_Keyboard'Access;
Mouse: access GLUT.Devices.Mouse := GLUT.Devices.default_Mouse'Access);