From ff0e3b46d28c1de47b931fd641277a438516456e Mon Sep 17 00:00:00 2001 From: ineslelin Date: Tue, 17 Dec 2024 22:05:39 +0000 Subject: [PATCH] deploy: 2b411c5f6e807334cc52d420ab4f24fb971255db --- AssetManager_8h_source.html | 39 ++++++++-------- CollisionHandler_8cpp__incl.svg | 2 +- CollisionHandler_8cpp__incl_org.svg | 2 +- CollisionHandler_8h__dep__incl.svg | 2 +- CollisionHandler_8h__dep__incl_org.svg | 2 +- CollisionHandler_8h__incl.svg | 2 +- CollisionHandler_8h__incl_org.svg | 2 +- TransformComponent_8cpp__incl.svg | 2 +- TransformComponent_8cpp__incl_org.svg | 2 +- annotated_dup.js | 2 +- classAssetManager-members.html | 4 +- classAssetManager.html | 45 ++++++++++++++++--- classAssetManager.js | 4 ++ classColliderComponent__coll__graph.svg | 2 +- classColliderComponent__coll__graph_org.svg | 2 +- classColliderComponent__inherit__graph.svg | 2 +- ...sColliderComponent__inherit__graph_org.svg | 2 +- classComponent__coll__graph.svg | 2 +- classComponent__coll__graph_org.svg | 2 +- classComponent__inherit__graph.svg | 2 +- classComponent__inherit__graph_org.svg | 2 +- classGameInternal__coll__graph.svg | 2 +- classGameInternal__coll__graph_org.svg | 2 +- classGame__coll__graph.svg | 2 +- classGame__coll__graph_org.svg | 2 +- classHealthComponent__coll__graph.svg | 2 +- classHealthComponent__coll__graph_org.svg | 2 +- classHealthComponent__inherit__graph.svg | 2 +- classHealthComponent__inherit__graph_org.svg | 2 +- classInputComponent__coll__graph.svg | 2 +- classInputComponent__coll__graph_org.svg | 2 +- classInputComponent__inherit__graph.svg | 2 +- classInputComponent__inherit__graph_org.svg | 2 +- classPlayerComponent__coll__graph.svg | 2 +- classPlayerComponent__coll__graph_org.svg | 2 +- classPlayerComponent__inherit__graph.svg | 2 +- classPlayerComponent__inherit__graph_org.svg | 2 +- classPowerupComponent__coll__graph.svg | 2 +- classPowerupComponent__coll__graph_org.svg | 2 +- classPowerupComponent__inherit__graph.svg | 2 +- classPowerupComponent__inherit__graph_org.svg | 2 +- classProjectileComponent__coll__graph.svg | 2 +- classProjectileComponent__coll__graph_org.svg | 2 +- classProjectileComponent__inherit__graph.svg | 2 +- ...rojectileComponent__inherit__graph_org.svg | 2 +- classRenderObject__coll__graph.svg | 2 +- classRenderObject__coll__graph_org.svg | 2 +- classRenderObject__inherit__graph.svg | 2 +- classRenderObject__inherit__graph_org.svg | 2 +- classSoundManager__coll__graph.svg | 2 +- classSoundManager__coll__graph_org.svg | 2 +- classSpriteComponent__coll__graph.svg | 2 +- classSpriteComponent__coll__graph_org.svg | 2 +- classSpriteComponent__inherit__graph.svg | 2 +- classSpriteComponent__inherit__graph_org.svg | 2 +- classStatEffectsComponent__coll__graph.svg | 2 +- ...sStatEffectsComponent__coll__graph_org.svg | 2 +- classStatEffectsComponent__inherit__graph.svg | 2 +- ...atEffectsComponent__inherit__graph_org.svg | 2 +- classTextureManager__coll__graph.svg | 2 +- classTextureManager__coll__graph_org.svg | 2 +- classTileComponent__coll__graph.svg | 2 +- classTileComponent__coll__graph_org.svg | 2 +- classTileComponent__inherit__graph.svg | 2 +- classTileComponent__inherit__graph_org.svg | 2 +- classTransformComponent__coll__graph.svg | 2 +- classTransformComponent__coll__graph_org.svg | 2 +- classTransformComponent__inherit__graph.svg | 2 +- ...TransformComponent__inherit__graph_org.svg | 2 +- dir_68267d1309a1af8e8297ef4c3efbcdba_dep.svg | 2 +- ...267d1309a1af8e8297ef4c3efbcdba_dep_org.svg | 2 +- doxygen_crawl.html | 3 ++ functions.html | 5 +++ functions_func.html | 5 +++ graph_legend.svg | 2 +- inherit_graph_0.svg | 2 +- inherit_graph_1.svg | 2 +- inherit_graph_10.svg | 2 +- inherit_graph_11.svg | 2 +- inherit_graph_12.svg | 2 +- inherit_graph_13.svg | 2 +- inherit_graph_14.svg | 2 +- inherit_graph_15.svg | 2 +- inherit_graph_2.svg | 2 +- inherit_graph_3.svg | 2 +- inherit_graph_4.svg | 2 +- inherit_graph_5.svg | 2 +- inherit_graph_6.svg | 2 +- inherit_graph_7.svg | 2 +- inherit_graph_8.svg | 2 +- inherit_graph_9.svg | 2 +- menudata.js | 2 + navtreeindex0.js | 1 + search/all_1.js | 13 +++--- search/functions_1.js | 3 +- search/functions_2.js | 3 +- search/functions_3.js | 2 +- search/functions_4.js | 7 +-- search/functions_5.js | 8 +++- search/functions_6.js | 3 +- search/functions_7.js | 5 +-- search/functions_8.js | 8 ++-- search/functions_9.js | 8 ++-- search/functions_a.js | 6 ++- search/functions_b.js | 3 +- search/functions_c.js | 4 ++ search/searchdata.js | 2 +- 107 files changed, 205 insertions(+), 146 deletions(-) create mode 100644 classAssetManager.js create mode 100644 search/functions_c.js diff --git a/AssetManager_8h_source.html b/AssetManager_8h_source.html index 54aaee5..6a96e60 100644 --- a/AssetManager_8h_source.html +++ b/AssetManager_8h_source.html @@ -152,30 +152,31 @@ $(function(){initNavTree('AssetManager_8h_source.html',''); initResizable(true);
27 void createProjectile(Vector2D pos, Vector2D velocity, int scale, int range, int speed, const char* texturePath, Entity* owner);
28 void createPowerup(Vector2D pos, std::function<void (Entity*)> pickupFunc, std::string texturePath);
29
-
30 Vector2D calculateSpawnPosition();
-
31 PowerupType calculateType();
-
32
-
33 //texture management
-
34 void addTexture(std::string id, const char* path);
-
35
-
36 // sound management
-
37 void addSoundEffect(std::string id, const char* path);
+
36 Vector2D calculateSpawnPosition(Vector2D size, Vector2D spawnArea);
+
37 template <typename T> [[deprecated]] T calculateRandomType(int amount);
38
-
39 void addMusic(std::string id, const char* path);
-
40
-
41 SDL_Texture* getTexture(std::string id);
-
42 Mix_Chunk* getSound(std::string id);
-
43 Mix_Music* getMusic(std::string id);
+
39 //texture management
+
40 void addTexture(std::string id, const char* path);
+
41
+
42 // sound management
+
43 void addSoundEffect(std::string id, const char* path);
44
-
45private:
+
45 void addMusic(std::string id, const char* path);
46
-
47 Manager* man;
-
48 std::map<std::string, SDL_Texture*> textures;
-
49 std::map<std::string, Mix_Chunk*> soundEffects;
-
50 std::map<std::string, Mix_Music*> music;
-
51};
+
47 SDL_Texture* getTexture(std::string id);
+
48 Mix_Chunk* getSound(std::string id);
+
49 Mix_Music* getMusic(std::string id);
+
50
+
51private:
+
52
+
53 Manager* man;
+
54 std::map<std::string, SDL_Texture*> textures;
+
55 std::map<std::string, Mix_Chunk*> soundEffects;
+
56 std::map<std::string, Mix_Music*> music;
+
57};
Definition AssetManager.h:21
+
Vector2D calculateSpawnPosition(Vector2D size, Vector2D spawnArea)
Calculates a random spawn position for an object within a given area.
Definition AssetManager.cpp:78
Main class for any object in game, stores associations, labeling and components.
Definition Entity.h:35
Is responsible for managing all entities.
Definition Manager.h:23
Definition Vector2D.h:7
diff --git a/CollisionHandler_8cpp__incl.svg b/CollisionHandler_8cpp__incl.svg index fa23d77..96f380d 100644 --- a/CollisionHandler_8cpp__incl.svg +++ b/CollisionHandler_8cpp__incl.svg @@ -1,7 +1,7 @@ - diff --git a/CollisionHandler_8cpp__incl_org.svg b/CollisionHandler_8cpp__incl_org.svg index 07dbd91..35794d5 100644 --- a/CollisionHandler_8cpp__incl_org.svg +++ b/CollisionHandler_8cpp__incl_org.svg @@ -1,7 +1,7 @@ - - - - diff --git a/CollisionHandler_8h__incl_org.svg b/CollisionHandler_8h__incl_org.svg index 4017fe6..7a59739 100644 --- a/CollisionHandler_8h__incl_org.svg +++ b/CollisionHandler_8h__incl_org.svg @@ -1,7 +1,7 @@ - - diff --git a/TransformComponent_8cpp__incl_org.svg b/TransformComponent_8cpp__incl_org.svg index 8fcc602..4176df0 100644 --- a/TransformComponent_8cpp__incl_org.svg +++ b/TransformComponent_8cpp__incl_org.svg @@ -1,7 +1,7 @@ - addSoundEffect(std::string id, const char *path) (defined in AssetManager)AssetManager addTexture(std::string id, const char *path) (defined in AssetManager)AssetManager AssetManager(Manager *manager) (defined in AssetManager)AssetManager - calculateSpawnPosition() (defined in AssetManager)AssetManager - calculateType() (defined in AssetManager)AssetManager + calculateRandomType(int amount) (defined in AssetManager)AssetManager + calculateSpawnPosition(Vector2D size, Vector2D spawnArea)AssetManager createPowerup(Vector2D pos, std::function< void(Entity *)> pickupFunc, std::string texturePath) (defined in AssetManager)AssetManager createProjectile(Vector2D pos, Vector2D velocity, int scale, int range, int speed, const char *texturePath, Entity *owner) (defined in AssetManager)AssetManager getMusic(std::string id) (defined in AssetManager)AssetManager diff --git a/classAssetManager.html b/classAssetManager.html index 01f6372..5fdf426 100644 --- a/classAssetManager.html +++ b/classAssetManager.html @@ -137,12 +137,13 @@ void createProjectile void createPowerup (Vector2D pos, std::function< void(Entity *)> pickupFunc, std::string texturePath)   - -Vector2D calculateSpawnPosition () -  - -PowerupType calculateType () -  +Vector2D calculateSpawnPosition (Vector2D size, Vector2D spawnArea) + Calculates a random spawn position for an object within a given area.
+  + +template<typename T > +T calculateRandomType (int amount) +  void addTexture (std::string id, const char *path)   @@ -162,6 +163,38 @@ Mix_Chunk * getSound ( Mix_Music * getMusic (std::string id)   +

Member Function Documentation

+ +

◆ calculateSpawnPosition()

+ +
+
+ + + + + + + + + + + +
Vector2D AssetManager::calculateSpawnPosition (Vector2D size,
Vector2D spawnArea )
+
+ +

Calculates a random spawn position for an object within a given area.

+
Parameters
+ + + +
sizeThe size (collision box) of the object
spawnAreaThe area within which a spawn position will be calculated
+
+
+
Returns
Spawn Coordinates for the object
+ +
+

The documentation for this class was generated from the following files: +

- c -

+ +

- d -

+

- c -

+ +

- d -