Implement input.c
- Implement input handling in input.c - test successful - Add missing function showPauseScreen to menu.h/c
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
void processInputEvent();
|
||||
//wird von SDL aufgerufen, wenn Taste gedrückt wurde
|
||||
//bekommt Info darüber, welche Taste gedrückt wurde
|
||||
//ruft zugehörige Aktion über switch caseauf
|
||||
// z.B. bei Pfeiltaste -> rufe snakeSetDir auf
|
||||
// im Menü bei Settings -> rufe menuNavigate auf
|
||||
// checks for and processes queued SDL input events and passes them
|
||||
// to menu.c or controls snake depending on current game.gameState
|
||||
// => has to be run repeatedly from main()
|
||||
void processInputEvent();
|
||||
@@ -1,15 +1,19 @@
|
||||
#pragma once
|
||||
|
||||
#include "SDL.h"
|
||||
|
||||
void showStartScreen();
|
||||
//zum Starten Enter drücken
|
||||
//optional: "E" eingeben für Settings
|
||||
|
||||
void showPauseScreen();
|
||||
|
||||
void showLeaderboard();
|
||||
//zeigt die besten Spieldurchläufe inkl. Punktestand an
|
||||
|
||||
void showSettings(); //optional
|
||||
//startet Settungs-Menü
|
||||
|
||||
void menuHandleInput(int event); //als Übergabeparameter: int(?) event -> welcher Datentyp hängt von SDL ab
|
||||
void menuHandleInput(SDL_Event event); //als Übergabeparameter: int(?) event -> welcher Datentyp hängt von SDL ab
|
||||
//switch case für welcher Modus
|
||||
//switch case für welche Taste gedrückt wurde
|
||||
|
||||
Reference in New Issue
Block a user