Skip to content

Commit 6cb9136

Browse files
Merge pull request #18 from PolymorphEngine/feature/updateModule
[merge] feature/updateModule to dev
2 parents e86f98b + f7fcf3e commit 6cb9136

File tree

4 files changed

+18
-52
lines changed

4 files changed

+18
-52
lines changed
Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,4 @@
1-
/*
2-
** EPITECH PROJECT, 2020
3-
** DynamicLoader.hpp
4-
** File description:
5-
** header for DynamicLoader.c
6-
*/
7-
8-
#pragma once
9-
10-
#include <iostream>
1+
#include <string>
112

123
namespace arcade
134
{
@@ -17,7 +8,7 @@ namespace arcade
178

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

3627
// Must set the volume
37-
virtual void setVolume() = 0;
38-
28+
virtual void setVolume(float volume) = 0;
29+
3930
};
4031
}

include/GraphicalAPI/arcade/IDisplayModule.hpp

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
1-
/*
2-
** EPITECH PROJECT, 2020
3-
** DynamicLoader.hpp
4-
** File description:
5-
** header for DynamicLoader.c
6-
*/
7-
81
#pragma once
92

10-
#include <iostream>
3+
#include <string>
114

125
namespace arcade
136
{
@@ -192,7 +185,7 @@ namespace arcade
192185

193186

194187
public:
195-
// DRAW LOGIC:
188+
// DRAW LOGIC:
196189

197190
// MUST : draw a sprite module
198191
virtual void draw(ISpriteModule *sprite) = 0;
@@ -203,4 +196,3 @@ namespace arcade
203196
/////////////////////////////////////////////////////////
204197
};
205198
}
206-
Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,16 @@
1-
/*
2-
** EPITECH PROJECT, 2020
3-
** DynamicLoader.hpp
4-
** File description:
5-
** header for DynamicLoader.c
6-
*/
7-
81
#pragma once
92

10-
#include <iostream>
11-
3+
#include <string>
124
namespace arcade
135
{
146
class ISpriteModule
157
{
168
public:
179
virtual ~ISpriteModule() = default;
10+
1811
// USED ONLY IN WRAPPER
1912
//MUST : return the object sprite or texture to draw
2013
virtual void *getSprite() = 0;
21-
2214

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

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

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

4031
// MUST: set the sprite color
41-
virtual void setColor(unsigned char r, unsigned char g, unsigned char b) = 0;
32+
virtual void
33+
setColor(unsigned char r, unsigned char g, unsigned char b) = 0;
4234
};
4335
}

include/GraphicalAPI/arcade/ITextModule.hpp

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,35 @@
1-
/*
2-
** EPITECH PROJECT, 2020
3-
** DynamicLoader.hpp
4-
** File description:
5-
** header for DynamicLoader.c
6-
*/
7-
8-
#pragma once
9-
10-
#include <iostream>
1+
#include <string>
112

123
namespace arcade
134
{
145
class ITextModule
156
{
167
public:
178
virtual ~ITextModule() = default;
9+
1810
// USED ONLY IN WRAPPER
1911
// MUST : return the text object to draw
2012
virtual void *getText() = 0;
21-
2213

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

2617
// MUST: Set the text position;
27-
virtual void setPosition(int x, int y) = 0;
18+
virtual void setPosition(float x, float y) = 0;
2819

2920
// MUST: move the text
30-
virtual void move(int x, int y) = 0;
31-
21+
virtual void move(float x, float y) = 0;
3222

3323
// ALL FILE TYPES MUST BE AT THE PATH SPECIFIED
34-
// MUST: loads and set a text font
35-
//ex SFML:
24+
// MUST: loads and set a text font
25+
//ex SFML:
3626
// assetPath = ./Assets/Pacman/enemy/font
3727
// real path = ./Assets/Pacman/enmey/font.ttf
3828
virtual void setFont(std::string font) = 0;
3929

4030
// MUST: Set the text color
41-
virtual void setColor(unsigned char r, unsigned char g, unsigned char b) = 0;
31+
virtual void
32+
setColor(unsigned char r, unsigned char g, unsigned char b) = 0;
4233

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

0 commit comments

Comments
 (0)