8 #ifndef IGRAPHICALLIB_HPP_
9 #define IGRAPHICALLIB_HPP_
16 #include "MySound.hpp"
17 #include "MyMusic.hpp"
18 #include "MyTexture.hpp"
19 #include "Keyboard.hpp"
20 #include "Position.hpp"
44 virtual auto initWindow(
const int screenWidth,
const int screenHeight, std::string title,
const int framerate) ->
void = 0;
85 virtual auto drawSprite(
MyTexture const &texture, std::array<float, 4>
const &rectSource, std::array<float, 4>
const &rectDest, std::pair<float, float>
const &origin,
float const &rotation,
float const &scale) ->
void = 0;
98 virtual auto checkMouseCollision(
Position const &position,
float const &x,
float const &y,
float const &height,
float const &width) ->
bool = 0;
129 virtual auto drawText(std::string
const &text,
Position const &pos, std::size_t
const &fontSize, std::array<float, 4>
const &color) ->
void = 0;
136 virtual auto createColor(std::array<float, 4>
const &array) -> Color = 0;
172 virtual auto getMusicVolume(
MyMusic &music) ->
float = 0;
173 virtual auto setMusicVolume(
MyMusic &music,
float volume) ->
void = 0;
3 dimension Position class (x, y, z)
Definition: Position.hpp:19
virtual auto playAMusic(MyMusic &music) -> void=0
Play a music.
virtual auto isBeingPressed(int key) -> bool=0
Check if a key is being pressed.
virtual auto closeAudio() -> void=0
Close the audio device.
virtual auto setExitKey(int key) -> void=0
Set the Exit Key object.
virtual auto endDrawingWindow() -> void=0
Stop drawing in the window.
virtual auto IsLeftMouseButtonPressed() -> bool=0
Check if the left mouse button is pressed.
virtual auto playASound(MySound &sound) -> void=0
Play a sound.
virtual ~IGraphicalLib()=default
Destroy the IGraphicalLib object.
virtual auto updateAMusic(MyMusic &music) -> void=0
Update the music.
virtual auto drawSprite(MyTexture const &texture, std::array< float, 4 > const &rectSource, std::array< float, 4 > const &rectDest, std::pair< float, float > const &origin, float const &rotation, float const &scale) -> void=0
Draw a sprite.
virtual auto checkMouseCollision(Position const &position, float const &x, float const &y, float const &height, float const &width) -> bool=0
Check the mouse collision.
virtual auto windowShouldClose() -> bool=0
Check if window should close.
virtual auto closeWindow() -> void=0
A method to close the window.
virtual auto drawText(std::string const &text, Position const &pos, std::size_t const &fontSize, std::array< float, 4 > const &color) -> void=0
Draw a text.
virtual auto getPressedKeycode() -> int=0
Get the Pressed Keycode object.
virtual auto getMousePosition() -> Position=0
Get the Mouse Position object.
virtual auto getPressedCharcode() -> int=0
Get the Pressed Charcode object.
virtual auto initWindow(const int screenWidth, const int screenHeight, std::string title, const int framerate) -> void=0
A method to initialize a window object.
virtual auto startDrawingWindow() -> void=0
Start drawing in the window.
MyTexture class.
Definition: MyTexture.hpp:19
virtual auto hasBeenPressed(int key) -> bool=0
Check if a key has been pressed.
virtual auto IsLeftMouseButtonReleased() -> bool=0
Check if the left mouse button is released.
virtual auto clearScreen() -> void=0
A method to clear the window.
virtual auto isNotBeingPressed(int key) -> bool=0
Check if a key is not being pressed.
virtual auto hasBeenReleased(int key) -> bool=0
Check if a key has been released.
Music class.
Definition: MyMusic.hpp:18
virtual auto initAudio() -> void=0
Init the audio device.
MySound class.
Definition: MySound.hpp:18
rtype namespace
Definition: GraphicalLib.hpp:22
virtual auto createColor(std::array< float, 4 > const &array) -> Color=0
Create a Color object.
IGraphicalLib class.
Definition: IGraphicalLib.hpp:29
virtual auto playASoundMulti(MySound &sound) -> void=0
Play a sound with a multichannel buffer pool.