This repository was archived by the owner on Apr 14, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
feat: new entity rendering system #3
Merged
Merged
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| /* | ||
| ** EPITECH PROJECT, 2025 | ||
| ** anal | ||
| ** File description: | ||
| ** IArcade.hpp | ||
| */ | ||
|
|
||
| #ifndef IARCADE_HPP | ||
| #define IARCADE_HPP | ||
| #include <memory> | ||
|
|
||
| #include "IAsset.hpp" | ||
| #include "IEntity.hpp" | ||
|
|
||
| namespace ANAL | ||
| { | ||
| class IArcade | ||
| { | ||
| public: | ||
| IArcade() = default; | ||
| virtual ~IArcade() = default; | ||
|
|
||
| [[nodiscard]] virtual std::unique_ptr<IAsset> newAsset() const = 0; | ||
| [[nodiscard]] virtual std::unique_ptr<IEntity> newEntity() const = 0; | ||
| }; | ||
| } | ||
| #endif //IARCADE_HPP | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| /* | ||
| ** EPITECH PROJECT, 2025 | ||
| ** anal | ||
| ** File description: | ||
| ** IEntity.hpp | ||
| */ | ||
|
|
||
| // ReSharper disable CppClassCanBeFinal | ||
| #ifndef IENTITY_HPP | ||
| #define IENTITY_HPP | ||
|
|
||
| #include "IAsset.hpp" | ||
| #include "Vector2.hpp" | ||
|
|
||
| /** | ||
| * @brief Arcade Native Agnostic Layer | ||
| * @details Namespace containing all the standardized interfaces for the Arcade project | ||
| */ | ||
| namespace ANAL | ||
| { | ||
| /** | ||
| * @interface IEntity | ||
| * @brief Interface for entities | ||
| */ | ||
| class IEntity | ||
| { | ||
| public: | ||
| IEntity() = default; | ||
| virtual ~IEntity() = default; | ||
|
|
||
| /** | ||
| * @brief Set the entity position | ||
| * @note The rendering is a grid of 10x10, thus the value of any position shouldn't exceed 9 or the entity would be rendered offscreen! | ||
| */ | ||
| virtual void setPos(Vector2<int>) = 0; | ||
|
|
||
| /** | ||
| * @brief Get the current entity position | ||
| * @return The position vector | ||
| */ | ||
| [[nodiscard]] virtual Vector2<int>& getPos() const = 0; | ||
|
|
||
| /** | ||
| * @brief Set the entity asset used when rendering | ||
| */ | ||
| virtual void setAsset() = 0; | ||
|
|
||
| /** | ||
| * @brief Get the current entity asset | ||
| * @return The entity asset | ||
| */ | ||
| [[nodiscard]] virtual const IAsset& getAsset() const = 0; | ||
| }; | ||
| } | ||
| #endif //IENTITY_HPP |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -37,6 +37,7 @@ namespace ANAL | |
| UNKNOWN, | ||
| V1_0_0, | ||
| V1_1_0, | ||
| V1_2_0, | ||
| NOT_SUPPORTED, | ||
| }; | ||
| } | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,65 +0,0 @@ | ||
| /* | ||
| ** EPITECH PROJECT, 2025 | ||
| ** anal | ||
| ** File description: | ||
| ** ISprite.hpp | ||
| */ | ||
|
|
||
| // ReSharper disable CppClassCanBeFinal | ||
| #ifndef ISPRITE_HPP | ||
| #define ISPRITE_HPP | ||
|
|
||
| #include <utility> | ||
|
|
||
| #include "IAsset.hpp" | ||
| #include "Vector2.hpp" | ||
|
|
||
| /** | ||
| * @brief Arcade Native Agnostic Layer | ||
| * @details Namespace containing all the standardized interfaces for the Arcade project | ||
| */ | ||
| namespace ANAL | ||
| { | ||
| /** | ||
| * @interface ISprite | ||
| * @brief Interface for all game sprites, meaning a current objet with a texture and a position | ||
| * @exception ISprite::Exception | ||
| */ | ||
| class ISprite | ||
| { | ||
| public: | ||
| ISprite() = default; | ||
| virtual ~ISprite() = default; | ||
|
|
||
| /** | ||
| * @exception Exception | ||
| * @brief Sprite exception | ||
| */ | ||
| class Exception : public std::exception {}; | ||
|
|
||
| /** | ||
| * @brief Sprite position getter | ||
| * @return the current sprite position | ||
| */ | ||
| virtual const Vector2<int>& getPos() const = 0; | ||
|
|
||
| /** | ||
| * @brief Sprite position setter | ||
| * @param vecPos the new sprite position | ||
| */ | ||
| virtual void setPos(Vector2<int> vecPos) = 0; | ||
|
|
||
| /** | ||
| * @brief Sprite asset getter | ||
| * @return the current sprite asset | ||
| */ | ||
| virtual const IAsset& getAsset() const = 0; | ||
|
|
||
| /** | ||
| * @brief Sprite asset setter | ||
| * @param asset the new sprite asset | ||
| */ | ||
| virtual void setAsset(IAsset& asset) = 0; | ||
| }; | ||
| } | ||
| #endif //ISPRITE_HPP | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.