-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsurface.h
50 lines (39 loc) · 1015 Bytes
/
surface.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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// -----------------------------------------------------------
// surface.h
// 2004 - Jacco Bikker - [email protected] - www.bik5.com - <><
// -----------------------------------------------------------
#ifndef I_SURFACE_H
#define I_SURFACE_H
#include "string.h"
#include "common.h"
namespace Raytracer {
class Surface
{
enum
{
OWNER = 1
};
public:
// constructor / destructors
Surface( int a_Width, int a_Height );
Surface( char* a_File );
~Surface();
// member data access
Pixel* GetBuffer() { return m_Buffer; }
int GetWidth() { return m_Width; }
int GetHeight() { return m_Height; }
// Special operations
void InitCharset();
void SetChar( int c, char* c1, char* c2, char* c3, char* c4, char* c5 );
void Print( char* a_String, int x1, int y1, Pixel color );
void Clear( Pixel a_Color );
private:
// Attributes
Pixel* m_Buffer;
int m_Width, m_Height;
// Static attributes for the buildin font
char s_Font[51][5][5];
int s_Transl[256];
};
}; // namespace Raytracer
#endif