Final Changes before submission

This commit is contained in:
IDunnoDev
2025-07-04 17:32:39 +01:00
committed by iDunnoDev
parent eeea920e45
commit ab6deb3cc2
7 changed files with 721 additions and 370 deletions

View File

@ -2,6 +2,7 @@
#include <vector>
#include <string>
#include <tchar.h>
#include <ctime>
#include "Framework.h"
#include "Vector3D.h"
#include "Vertex.h"
@ -25,7 +26,7 @@ public:
void Update(const Bitmap& bitmap);
void Render(const Bitmap& bitmap);
void ClearViewport(const Bitmap& bitmap);
void DrawString(HDC hDc, int x, int y, LPCTSTR text, COLORREF textColor = 0x00FFFFFF, COLORREF backgroundColor = 0x00000000);
void DrawString(HDC hDc, int x, int y, LPCTSTR text, int fontSize = 48, COLORREF textColor = 0x00FFFFFF, COLORREF backgroundColor = 0x00000000);
~Rasteriser();
@ -58,23 +59,40 @@ public:
void FillGouraudSideTriangle(HDC hDc, const Vertex& v1, const Vertex& v2, const Vertex& v3);
void FillPolygonTextured(HDC hDc, Model& model, vector<Vertex>& verticies);
void FillTexturedSideTriangle(HDC hDc, Model& model, const Vertex& v1, const Vertex& v2, const Vertex& v3, const UVCoord& uv1, const UVCoord& uv2, const UVCoord& uv3);
void FillTexturedSideTriangle(HDC hDc, Model& model, const Vertex& v1, const Vertex& v2, const Vertex& v3);
void FillPolygonTexturedA(HDC hDc, Model& model, vector<Vertex>& verticies);
void FillTexturedBottomFlatTriangle(HDC hDc, Model& model, const Vertex& v1, const Vertex& v2, const Vertex& v3);
void FillTexturedTopFlatTriangle(HDC hDc, Model& model, const Vertex& v1, const Vertex& v2, const Vertex& v3);
private:
// Vector arrays to hold the scene models, the lights and the cameras.
vector<Model> _sceneModels;
vector<Light*> _lights;
vector<Camera> _cameras;
// Index of the currently viewing camera.
int _currentCamera = 0;
// Matrices and Aspect ration for the viewing and perspective transformations.
Matrix _currentPerspectiveMatrix;
Matrix _currentViewMatrix;
float _currentAspectRatio = 0.0f;
int _rotation = 0;
int _currentDrawMode = 0;
// bool to check if the screen is minimized to stop processing
bool _screenMinimized = false;
string _modelDataLocation = ".//model_data/";
// timer variables to hold the start time of the showcase, and the current time for
// calculation of where in the showcase we are.
time_t _startTime;
time_t _currentTime;
// an int to store the current state of the showcase.
int _currentState;
int _maxStates;
// An array to store counters for use in.
int _counters[10];
};