-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathengine.h
27 lines (27 loc) · 1.01 KB
/
engine.h
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
#include "mathlib.cpp"
#include "camera.h"
#include "mesh.h"
extern "C"{
#include "fxlib.h"
}
class Engine{
public:
int width, height;
int fps, fps_counter;
char temp[16];
Engine(int width = 128, int height = 64);
void clear();
void present();
void put_pixel(int x, int y, int color);
void draw_line(int x1, int y1, int x2, int y2, int color);
void draw_thick_line(int x0, int y0, int x1, int y1, int thickness, int color);
void draw_rect(int x, int y, int w, int h, int color);
void processScanLine(int y, Vector2 va, Vector2 vb, Vector2 vc, Vector2 vd, int color);
void fill_triangle(Vector2 v0, Vector2 v1, Vector2 v2, int color);
Vector2 project(Vector3 coord, Matrix4 transMat);
void draw_point(Vector2 point);
void render(Camera camera, Mesh* meshes[], int numMeshes = 1);
Mesh load_obj(const FONTCHARACTER *filename);
void updateFPS();
void printFPS();
};