From fa3d3ca843e4b0157c8f979de7ad169f3fb0ddda Mon Sep 17 00:00:00 2001 From: Barry Kane Date: Wed, 8 Mar 2023 23:41:42 +0000 Subject: [PATCH] Updated the number at the top of the file. --- .../Experiment-19/SDL2-Experiment-19-Client.c | 2 +- SDL2-Bits-And-Pieces/Experiment-19/SDL2-Experiment-19.c | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/SDL2-Bits-And-Pieces/Experiment-19/SDL2-Experiment-19-Client.c b/SDL2-Bits-And-Pieces/Experiment-19/SDL2-Experiment-19-Client.c index 9ab9876..3519349 100644 --- a/SDL2-Bits-And-Pieces/Experiment-19/SDL2-Experiment-19-Client.c +++ b/SDL2-Bits-And-Pieces/Experiment-19/SDL2-Experiment-19-Client.c @@ -1,4 +1,4 @@ -// SDL Experiment 18, Barra Ó Catháin. +// SDL Experiment 19, Barra Ó Catháin. // =================================== #include #include diff --git a/SDL2-Bits-And-Pieces/Experiment-19/SDL2-Experiment-19.c b/SDL2-Bits-And-Pieces/Experiment-19/SDL2-Experiment-19.c index 8098f78..664c908 100644 --- a/SDL2-Bits-And-Pieces/Experiment-19/SDL2-Experiment-19.c +++ b/SDL2-Bits-And-Pieces/Experiment-19/SDL2-Experiment-19.c @@ -1,4 +1,4 @@ -// SDL Experiment 18, Barra Ó Catháin. +// SDL Experiment 19, Barra Ó Catháin. // =================================== #include #include @@ -130,6 +130,12 @@ static inline void takeNetworkInput(playerController * controller, int descripto } +static inline void getPlayerInput(playerController * controller, int playerNumber) +{ + SDL_PumpEvents(); + int keyboardStateLength = 0; + uint8_t * keyboardState = SDL_GetKeyboardState(&keyboardStateLength); +} void doShipInput(playerController * controller, ship * ship, xyVector starPosition, double deltaTime) { if(controller->number == ship->number)