Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 4 additions & 13 deletions include/GraphicalAPI/arcade/IAudioModule.hpp
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
/*
** EPITECH PROJECT, 2020
** DynamicLoader.hpp
** File description:
** header for DynamicLoader.c
*/

#pragma once

#include <iostream>
#include <string>

namespace arcade
{
Expand All @@ -17,7 +8,7 @@ namespace arcade

virtual ~IAudioModule() = default;
// ALL FILE TYPES MUST BE AT THE PATH SPECIFIED
// MUST: loads and set an audio file
// MUST: loads and set an audio file
//ex SFML:
// assetPath = ./Assets/Pacman/enemy/sound
// real path = ./Assets/Pacman/enmey/font.ttf
Expand All @@ -34,7 +25,7 @@ namespace arcade
virtual void stop() = 0;

// Must set the volume
virtual void setVolume() = 0;
virtual void setVolume(float volume) = 0;

};
}
12 changes: 2 additions & 10 deletions include/GraphicalAPI/arcade/IDisplayModule.hpp
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
/*
** EPITECH PROJECT, 2020
** DynamicLoader.hpp
** File description:
** header for DynamicLoader.c
*/

#pragma once

#include <iostream>
#include <string>

namespace arcade
{
Expand Down Expand Up @@ -192,7 +185,7 @@ namespace arcade


public:
// DRAW LOGIC:
// DRAW LOGIC:

// MUST : draw a sprite module
virtual void draw(ISpriteModule *sprite) = 0;
Expand All @@ -203,4 +196,3 @@ namespace arcade
/////////////////////////////////////////////////////////
};
}

16 changes: 4 additions & 12 deletions include/GraphicalAPI/arcade/ISpriteModule.hpp
Original file line number Diff line number Diff line change
@@ -1,24 +1,16 @@
/*
** EPITECH PROJECT, 2020
** DynamicLoader.hpp
** File description:
** header for DynamicLoader.c
*/

#pragma once

#include <iostream>

#include <string>
namespace arcade
{
class ISpriteModule
{
public:
virtual ~ISpriteModule() = default;

// USED ONLY IN WRAPPER
//MUST : return the object sprite or texture to draw
virtual void *getSprite() = 0;


// ALL FILE TYPES MUST BE AT THE PATH SPECIFIED
// MUST: set a sprite (ex: creates a texture then a sprite from it in SFML)
Expand All @@ -27,7 +19,6 @@ namespace arcade
// real path (inside sfml implementation) =./Assets/Pacman/enmey/goblin/enemy.png or .jpeg
virtual void setSprite(std::string filePath) = 0;


// MUST: set position of the sprite
virtual void setPosition(float x, float y) = 0;

Expand All @@ -38,6 +29,7 @@ namespace arcade
virtual void setCrop(int x, int y, int width, int height) = 0;

// MUST: set the sprite color
virtual void setColor(unsigned char r, unsigned char g, unsigned char b) = 0;
virtual void
setColor(unsigned char r, unsigned char g, unsigned char b) = 0;
};
}
25 changes: 8 additions & 17 deletions include/GraphicalAPI/arcade/ITextModule.hpp
Original file line number Diff line number Diff line change
@@ -1,44 +1,35 @@
/*
** EPITECH PROJECT, 2020
** DynamicLoader.hpp
** File description:
** header for DynamicLoader.c
*/

#pragma once

#include <iostream>
#include <string>

namespace arcade
{
class ITextModule
{
public:
virtual ~ITextModule() = default;

// USED ONLY IN WRAPPER
// MUST : return the text object to draw
virtual void *getText() = 0;


// MUST: set the text value
virtual void setText(std::string text) = 0;

// MUST: Set the text position;
virtual void setPosition(int x, int y) = 0;
virtual void setPosition(float x, float y) = 0;

// MUST: move the text
virtual void move(int x, int y) = 0;

virtual void move(float x, float y) = 0;

// ALL FILE TYPES MUST BE AT THE PATH SPECIFIED
// MUST: loads and set a text font
//ex SFML:
// MUST: loads and set a text font
//ex SFML:
// assetPath = ./Assets/Pacman/enemy/font
// real path = ./Assets/Pacman/enmey/font.ttf
virtual void setFont(std::string font) = 0;

// MUST: Set the text color
virtual void setColor(unsigned char r, unsigned char g, unsigned char b) = 0;
virtual void
setColor(unsigned char r, unsigned char g, unsigned char b) = 0;

// MUST: Set the text size
virtual void setSize(int size) = 0;
Expand Down