Simple 2D RPG made in C++ and SFML
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
#ifndef CAMERA_H
|
|
|
|
#define CAMERA_H
|
|
|
|
|
|
|
|
#include <SFML/Graphics.hpp>
|
|
|
|
|
|
|
|
#include "map.h"
|
|
|
|
|
|
|
|
class Camera
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
Camera(sf::RenderWindow *window);
|
|
|
|
void MoveCamera(sf::RenderWindow *window, sf::Vector2f move);
|
|
|
|
void SetCenter(sf::RenderWindow *window, sf::Vector2f position);
|
|
|
|
void Update(sf::RenderWindow *window, Map *map, sf::Vector2f position);
|
|
|
|
bool IsOnScreen(sf::RenderWindow *window, Entity *entity);
|
|
|
|
~Camera();
|
|
|
|
|
|
|
|
private:
|
|
|
|
//sf::Vector2f position;
|
|
|
|
sf::View view;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CAMERA_H
|