forked from mikri2017/SDL_2DPlatformer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCamera.h
More file actions
28 lines (25 loc) · 669 Bytes
/
Camera.h
File metadata and controls
28 lines (25 loc) · 669 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef CAMERA_H_INCLUDED
#define CAMERA_H_INCLUDED
#include <SDL2/SDL.h>
#include "GameObjectMgr.h"
class Camera
{
private:
SDL_Rect area;
SDL_Point g_obj_mgr_pos;
GameObjectMgr *g_obj_mgr;
bool watch_g_obj_mgr;
public:
Camera();
~Camera();
int getPositionBeginX();
int getPositionBeginY();
void setPosition(int x, int y);
void setWidthHeight(int w, int h);
void updatePosition();
void setGameObjectRelativePos(int x, int y);
void setGameObjectWatchingMode(bool watch);
void setGameObjectForWatch(GameObjectMgr *g_obj);
SDL_Rect getGameObjectAreaInCam(GameObjectMgr *g_obj);
};
#endif // CAMERA_H_INCLUDED