// Copyright (c) 2023 Alex Diener. All rights reserved. #ifndef __GameSession_H__ #define __GameSession_H__ typedef struct GameSession GameSession; #define GameSession_superclass StemObject #include "dynamictypes/DataValueSchema.h" #include "inputcontroller/GamepadMap.h" #include "inputcontroller/InputController.h" #include "inputcontroller/InputMap.h" #include "preferences/Preferences.h" #include "stemobject/StemObject.h" #include "utilities/EventDispatcher.h" #define GameSession_ivars \ StemObject_ivars \ \ EventDispatcher * eventDispatcher; \ Preferences * preferences; \ DataValueSchema * preferencesSchema; \ InputController * inputController; \ GamepadMap * gamepadMap; \ InputMap * inputMap; #define GameSession_vtable(self_type) \ StemObject_vtable(self_type) stemobject_declare(GameSession) GameSession * GameSession_create(void); bool GameSession_init(GameSession * self); void GameSession_dispose(GameSession * self); bool GameSession_saveControlBindings(GameSession * self); bool GameSession_savePreferences(GameSession * self); bool GameSession_getSoundEnabled(GameSession * self); void GameSession_setSoundEnabled(GameSession * self, bool value); bool GameSession_getMusicEnabled(GameSession * self); void GameSession_setMusicEnabled(GameSession * self, bool value); float GameSession_getSoundVolume(GameSession * self); void GameSession_setSoundVolume(GameSession * self, float value); float GameSession_getMusicVolume(GameSession * self); void GameSession_setMusicVolume(GameSession * self, float value); bool GameSession_getFullScreen(GameSession * self); void GameSession_setFullScreen(GameSession * self, bool value); unsigned int GameSession_getRepeatDelay(GameSession * self); void GameSession_setRepeatDelay(GameSession * self, unsigned int value); unsigned int GameSession_getRepeatInterval(GameSession * self); void GameSession_setRepeatInterval(GameSession * self, unsigned int value); #endif