static game #1

This commit is contained in:
Sandro Sobczyński
2020-11-03 21:49:16 +01:00
parent 9e3ed74b45
commit 5399b1744f
18 changed files with 180 additions and 194 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ public:
~GifSender();
void initPacket(u8 context);
void addObject(RenderData *t_renderData, Mesh *t_objects3D, u32 vertexCount, VECTOR *vertices, VECTOR *normals, VECTOR *coordinates, LightBulb *t_bulbs, u16 t_bulbsCount, texbuffer_t *textureBuffer);
void addObject(RenderData *t_renderData, Mesh &t_mesh, u32 vertexCount, VECTOR *vertices, VECTOR *normals, VECTOR *coordinates, LightBulb *t_bulbs, u16 t_bulbsCount, texbuffer_t *textureBuffer);
void addClear(zbuffer_t *t_zBuffer);
void sendPacket();
void sendClear(zbuffer_t *t_zBuffer);
+9 -9
View File
@@ -35,22 +35,22 @@ public:
prim_t prim;
/** PATH3 Many + lighting */
void drawByPath3(Mesh **t_meshes, u16 t_amount, LightBulb *t_bulbs, u16 t_bulbsCount);
void drawByPath3(Mesh *t_meshes, u16 t_amount, LightBulb *t_bulbs, u16 t_bulbsCount);
/** PATH3 Single + lighting */
void drawByPath3(Mesh *t_mesh, LightBulb *t_bulbs, u16 t_bulbsCount);
void drawByPath3(Mesh &t_mesh, LightBulb *t_bulbs, u16 t_bulbsCount);
/** PATH3 Many */
void drawByPath3(Mesh **t_meshes, u16 t_amount);
void drawByPath3(Mesh *t_meshes, u16 t_amount);
/** PATH3 Single */
void drawByPath3(Mesh *t_mesh);
void drawByPath3(Mesh &t_mesh);
/** PATH1 Many + lighting */
void draw(Mesh **t_meshes, u16 t_amount, LightBulb *t_bulbs, u16 t_bulbsCount);
void draw(Mesh *t_meshes, u16 t_amount, LightBulb *t_bulbs, u16 t_bulbsCount);
/** PATH1 Single + lighting */
void draw(Mesh *t_mesh, LightBulb *t_bulbs, u16 t_bulbsCount);
void draw(Mesh &t_mesh, LightBulb *t_bulbs, u16 t_bulbsCount);
/** PATH1 Many */
void draw(Mesh **t_meshes, u16 t_amount);
void draw(Mesh *t_meshes, u16 t_amount);
/** PATH1 Single */
void draw(Mesh *t_mesh);
void draw(Mesh &t_mesh);
void setCameraDefinitions(Matrix *t_worldView, Vector3 *t_cameraPos, Plane *t_planes);
@@ -59,7 +59,7 @@ public:
TextureRepository *getTextureRepository() { return &textureRepo; };
private:
void changeTexture(Mesh *t_mesh, u32 t_materialId);
void changeTexture(const Mesh &t_mesh, u32 t_materialId);
u32 lastTextureId;
texbuffer_t textureBuffer;
u8 isTextureVRAMAllocated;
+2 -2
View File
@@ -28,11 +28,11 @@ public:
~VifSender();
// TODO refactor
void drawMesh(RenderData *t_renderData, Matrix t_perspective, u32 vertCount2, VECTOR *vertices, VECTOR *normals, VECTOR *coordinates, Mesh *t_mesh, LightBulb *t_bulbs, u16 t_bulbsCount, texbuffer_t *textureBuffer);
void drawMesh(RenderData *t_renderData, Matrix t_perspective, u32 vertCount2, VECTOR *vertices, VECTOR *normals, VECTOR *coordinates, const Mesh &t_mesh, LightBulb *t_bulbs, u16 t_bulbsCount, texbuffer_t *textureBuffer);
void sendMatrices(const RenderData &t_renderData, const Vector3 &t_position, const Vector3 &t_rotation);
private:
void drawVertices(Mesh *t_mesh, u32 t_start, u32 t_end, VECTOR *t_vertices, VECTOR *t_coordinates, prim_t *t_prim, texbuffer_t *textureBuffer);
void drawVertices(const Mesh &t_mesh, u32 t_start, u32 t_end, VECTOR *t_vertices, VECTOR *t_coordinates, prim_t *t_prim, texbuffer_t *textureBuffer);
VU1 vu1; // TODO
MATRIX localWorld, localScreen;
VECTOR position, rotation;