-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathScreen.h
More file actions
34 lines (30 loc) · 826 Bytes
/
Screen.h
File metadata and controls
34 lines (30 loc) · 826 Bytes
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
28
29
30
31
32
33
34
#pragma once
#include "MathHelper.h"
#include "Utility.h"
class Screen
{
public:
Screen();
Screen(UINT width, UINT height);
~Screen();
unsigned char* GetBuffer();
float* GetZBuffer();
float GetZ(int x, int y);
float GetZ(int i);
UINT GetScreenWidth() { return mScreenWidth; }
UINT GetScreenHeight() { return mScreenHeight; }
void SetPixel(int x, int y, Color color);
void SetPixel(int x, int y, unsigned char grayScaleColor);
void SetSquare(int x, int y, Color color, UINT size);
void SetDim(UINT width, UINT height);
void SetZ(int x, int y, float z);
void SetPixelZ(int x, int y, float z, Color color);
void SetPixelZ(int i, float z, Color color);
void Cls();
void ClsColor(Color color);
private:
UINT mScreenWidth;
UINT mScreenHeight;
unsigned char* mBuffer = nullptr;
float* mZBuffer = nullptr;
};