fixed frustum culling, static game class

This commit is contained in:
Sandro Sobczyński
2020-11-04 13:20:58 +01:00
parent 5399b1744f
commit 02560f2d6f
19 changed files with 73 additions and 70 deletions
+3 -2
View File
@@ -24,12 +24,12 @@ class Engine
{
public:
Engine(const ScreenSettings &screen);
Engine();
~Engine();
void init(Game *t_game, u32 t_gifPacketSize);
void setDefaultScreen();
void setScreen(ScreenSettings &t_settings);
Renderer *renderer;
Audio audio;
ScreenSettings screen;
@@ -37,9 +37,10 @@ public:
float fps;
private:
void firePS2();
u8 fpsDelayer;
Timer timer;
u8 isInitialized, isScreenInitialized;
u8 isInitialized;
void gameLoop();
Game *game;
s32 mainThreadId;
+1 -1
View File
@@ -35,7 +35,7 @@ public:
void makeZRotation(float t_radians);
void translate(float t_x, float t_y, float t_z);
void setPerspective(ScreenSettings &screen);
void print();
const void print() const;
};
#endif
+1 -1
View File
@@ -27,7 +27,7 @@ public:
void update(Vector3 &a, Vector3 &b, Vector3 &c);
inline float distanceTo(Vector3 &t_vec) { return this->distance + this->normal.innerProduct(t_vec); }
void print();
const void print() const;
};
#endif
+1 -1
View File
@@ -33,7 +33,7 @@ public:
void set(const float &t_x, const float &t_y);
void set(const Point &v);
void print();
const void print() const;
};
#endif
+1 -1
View File
@@ -54,7 +54,7 @@ public:
void set(const float &x, const float &y, const float &z);
void copy(Vector3 &v);
float distanceTo(Vector3 &v);
void print();
const void print() const;
};
#endif
@@ -21,7 +21,6 @@ struct ScreenSettings
float aspectRatio;
float nearPlaneDist;
float farPlaneDist;
/** change it to 4096.0F to check out frustum culling! 😎 */
float projectionScale;
};