ImageManager.h
1 
7 #pragma once
8 #include <wrl.h>
9 #include <wrl\client.h>
10 #include <d2d1effects_2.h>
11 #include <wincodec.h>
12 #include "resource.h"
13 #include "Graphics.h"
14 
15 using Microsoft::WRL::ComPtr;
16 
24 {
29 
30  ComPtr<ID2D1DeviceContext> m_d2dContext;
31 
35  ComPtr<ID2D1Effect> chromakeyEffect;
36 
40  ID2D1Bitmap* GameBmpAsset;
41 
45  int NPC_Width, NPC_Height;
46  int NPC_Accross;
47 
51  int ChomaKeyImg_Width, ChomaKeyImg_Height;
52 
53 public:
57  ImageManager(wchar_t* filename, Graphics* EngineGFX);
58 
62  ImageManager(wchar_t* filename, Graphics* EngineGFX, int NPC_Width, int NPC_Height);
63 
67  ImageManager(wchar_t * filename, Graphics * EngineGFX, int ChromaValue);
68 
72  ~ImageManager();
73 
77  void Draw(float x, float y);
78 
82  void DrawNPC(int index, float X_Position, float Y_Position);
83 
87  void DrawChromaKeyedImage(float X_Position, float Y_Position);
88 };
int NPC_Width
Variables for NPCs bitmap information
Definition: ImageManager.h:45
void DrawNPC(int index, float X_Position, float Y_Position)
Draws the NPCs bitmap
Definition: ImageManager.cpp:183
Class for Graphics This class manages the Graphics objects
Definition: Graphics.h:15
~ImageManager()
Destructor that destroys bitmap object when no longer needed
Definition: ImageManager.cpp:155
Class for ImageManager This class loads the image from file and converts it to a ID2D1Bitmap image It...
Definition: ImageManager.h:23
Graphics * EngineGFX
Setting up a graphic object
Definition: ImageManager.h:28
void Draw(float x, float y)
Draws the bitmap
Definition: ImageManager.cpp:166
ComPtr< ID2D1Effect > chromakeyEffect
This is a effect interface that should also be release at the end
Definition: ImageManager.h:35
ImageManager(wchar_t *filename, Graphics *EngineGFX)
Constructor that Gets the bitmap image from file
Definition: ImageManager.cpp:16
int ChomaKeyImg_Width
Variables for chroma-key bitmap information
Definition: ImageManager.h:51
ID2D1Bitmap * GameBmpAsset
Instantiating bitmap object
Definition: ImageManager.h:40
void DrawChromaKeyedImage(float X_Position, float Y_Position)
Draws the chroma-keyed bitmap
Definition: ImageManager.cpp:208