-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathViewport.cpp
More file actions
46 lines (36 loc) · 826 Bytes
/
Viewport.cpp
File metadata and controls
46 lines (36 loc) · 826 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#include "Viewport.h"
Viewport::Viewport(int XC, int YC){
X = XC;
Y = YC;
};
Viewport::~Viewport(){};
//***********************************************
// OTHER FUNCTIONS
//***********************************************
bool Viewport::translate(float x, float y){
//CONVERT COORDINATES
};
void Viewport::shake(int strength){
//SHAKE CAMERA
if (strength>2){ //SI ES MENOR NO PUEDE HACER EN RAND Y SE ROMPE TODO
//X += rand()%(strength/2);
//Y += rand()%(strength/2);
}
};
void Viewport::zoom(float factor){
//ZOOM
};
void Viewport::operator=(const Viewport& v2){
X = v2.X;
Y = v2.Y;
};
void Viewport::setTarget(float x, float y){
X = x;
Y = y;
};
float Viewport::getX() const{
return X;
};
float Viewport::getY() const{
return Y;
};