2020-01-01 21:29:24 +01:00
|
|
|
#ifndef ENT_H
|
|
|
|
#define ENT_H
|
|
|
|
|
2020-04-03 21:43:06 +02:00
|
|
|
#define rn( rx, ry) ((rx) + ((ry) * 100))
|
|
|
|
|
2020-01-01 21:29:24 +01:00
|
|
|
class entclass
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
entclass();
|
|
|
|
|
|
|
|
bool outside();
|
|
|
|
|
2020-04-03 21:29:57 +02:00
|
|
|
void setenemy(int t);
|
|
|
|
|
2020-04-03 21:43:06 +02:00
|
|
|
void setenemyroom(int rx, int ry);
|
|
|
|
|
2020-04-03 21:47:38 +02:00
|
|
|
void settreadmillcolour(int rx, int ry);
|
|
|
|
|
2020-01-01 21:29:24 +01:00
|
|
|
public:
|
|
|
|
//Fundamentals
|
2020-04-03 22:50:16 +02:00
|
|
|
bool invis;
|
2020-01-01 21:29:24 +01:00
|
|
|
int type, size, tile, rule;
|
|
|
|
int state, statedelay;
|
|
|
|
int behave, animate;
|
|
|
|
float para;
|
|
|
|
int life, colour;
|
|
|
|
|
|
|
|
//Position and velocity
|
|
|
|
int oldxp, oldyp;
|
|
|
|
float ax, ay, vx, vy;
|
|
|
|
int cx, cy, w, h;
|
|
|
|
float newxp, newyp;
|
|
|
|
bool isplatform;
|
|
|
|
int x1,y1,x2,y2;
|
|
|
|
//Collision Rules
|
|
|
|
int onentity;
|
|
|
|
bool harmful;
|
|
|
|
int onwall, onxwall, onywall;
|
|
|
|
|
|
|
|
//Platforming specific
|
|
|
|
bool jumping;
|
|
|
|
bool gravity;
|
|
|
|
int onground, onroof;
|
|
|
|
int jumpframe;
|
|
|
|
//Animation
|
|
|
|
int framedelay, drawframe, walkingframe, dir, actionframe;
|
|
|
|
int yp;int xp;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* ENT_H */
|