Caseus Tower
 All Classes Namespaces Files Functions Variables
spriteHandler.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <SDL.h>
4 #include <vector>
5 #include <string>
6 #include "texture.h"
7 
13 {
14 private:
16  SDL_Renderer * renderer;
23  std::vector<Texture*> platformDanger;
24  std::vector<Texture*> playerSprite;
25  std::vector<Texture*> symbols;
26  std::vector<Texture*> pauseButton;
30  std::vector<Texture*> playButton;
31  std::vector<Texture*> creditsButton;
32  std::vector<Texture*> exitButton;
40  float scale;
41 public:
46  SpriteHandler(SDL_Renderer *);
47 
52 
57  void loadGameSprites();
58 
63  void loadMenuSprites();
64 
69  void loadCreditsSprites();
70 
75  void loadLoseSprites();
76 
81  void deleteGameSprites();
82 
87  void deleteMenuSprites();
88 
93  void deleteCreditsSprites();
94 
99  void deleteLoseSprites();
100 
105  void loadSymbols();
106 
117  void drawGameSprite(std::string, int, float, float, int, int);
118 
129  void drawMenuSprite(std::string, int, float, float, int, int);
130 
141  void drawCreditsSprite(std::string, int, float, float, int, int);
142 
153  void drawLoseSprite(std::string, int, float, float, int, int);
154 };
std::vector< Texture * > playButton
Definition: spriteHandler.h:30
std::vector< Texture * > creditsButton
Definition: spriteHandler.h:31
SDL_Renderer * renderer
Definition: spriteHandler.h:16
std::vector< Texture * > pauseButton
Definition: spriteHandler.h:26
void loadGameSprites()
void drawGameSprite(std::string, int, float, float, int, int)
void deleteGameSprites()
void deleteMenuSprites()
void drawMenuSprite(std::string, int, float, float, int, int)
void loadMenuSprites()
std::vector< Texture * > platformDanger
Definition: spriteHandler.h:23
void loadSymbols()
void loadLoseSprites()
Texture * credits
Definition: spriteHandler.h:36
Texture * backgroundImage
Definition: spriteHandler.h:18
void loadCreditsSprites()
Texture * platformSafe
Definition: spriteHandler.h:22
void drawLoseSprite(std::string, int, float, float, int, int)
void deleteLoseSprites()
Creates a Texture for use with a renderer Creates a Texture from an image file, this can then be used...
Definition: texture.h:12
Creates an SpriteHandler object Creates an SpriteHandler object to deal with all of the applications ...
Definition: spriteHandler.h:12
std::vector< Texture * > symbols
Definition: spriteHandler.h:25
void drawCreditsSprite(std::string, int, float, float, int, int)
std::vector< Texture * > exitButton
Definition: spriteHandler.h:32
std::vector< Texture * > playerSprite
Definition: spriteHandler.h:24
SpriteHandler(SDL_Renderer *)
void deleteCreditsSprites()