72 lines
1.9 KiB
C++
72 lines
1.9 KiB
C++
#ifndef _CCAMERA_HPP_
|
|
#define _CCAMERA_HPP_
|
|
|
|
/*** SDL Header Files ***/
|
|
#include <SDL.h>
|
|
|
|
/*** DLL Header File ***/
|
|
#include "dllExport.h"
|
|
|
|
/*** Custom Header Files ***/
|
|
#include "../UtilityEngine/cString.hpp"
|
|
|
|
using UtilityEngine::cString;
|
|
|
|
namespace VideoEngine {
|
|
class EXPORT_FROM_MYDLL cCamera
|
|
{
|
|
public:
|
|
cCamera( const signed long int xPos = 0, const signed long int yPos = 0,
|
|
const unsigned long int reswidth = 640, const unsigned long int reshight = 480 );
|
|
/* Copy constructor */
|
|
cCamera( const cCamera& copy );
|
|
~cCamera();
|
|
|
|
/* Draws the camera on the video buffer */
|
|
void Draw();
|
|
|
|
/* Saves the Camera Image to a BMP file */
|
|
void SaveImage( const cString& fileName, const cString& dir = "" );
|
|
|
|
/// Sets
|
|
/* Sets the x and y position on the video buffer */
|
|
void setXPosandYPos( const signed long int xPos = 0, const signed long int yPos = 0 );
|
|
/* Sets the width and height the camera should be */
|
|
void setResWidthandResHeight( const unsigned long int reswidth = 640, const unsigned long int reshight = 480 );
|
|
/* Sets the Surface */
|
|
void setTexture( SDL_Texture* texture );
|
|
|
|
/// Gets
|
|
/* Gets the x position of the camera */
|
|
const unsigned long int getXPos() const;
|
|
/* Gets the y position of the camera */
|
|
const unsigned long int getYPos() const;
|
|
|
|
/* Gets the width of the camera */
|
|
const unsigned long int getWidthRes() const;
|
|
/* Gets the height of the camera */
|
|
const unsigned long int getHeightRes() const;
|
|
|
|
/* Gets the SDL_Renderer of the camera */
|
|
SDL_Texture* getCameraView() const;
|
|
|
|
/* Gets the Surface of the camera */
|
|
SDL_Texture* getTexture() const;
|
|
|
|
private:
|
|
/// Functions
|
|
void CreateCamera();
|
|
void DeleteCamera();
|
|
|
|
private:
|
|
/// Variables
|
|
SDL_Rect m_position;
|
|
|
|
SDL_Texture* mp_texture;/// = nullptr
|
|
|
|
//std::vector<cSprite*> m_sprites;
|
|
//LinkList::cLList m_sprites;
|
|
};/// END CLASS DEFINITION cCamera
|
|
}/// END NAMESPACE DEFINITION VideoEngine
|
|
#endif/// END IFNDEF _CCAMERA_HPP_
|