-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathconsole.h
More file actions
executable file
·48 lines (37 loc) · 955 Bytes
/
Copy pathconsole.h
File metadata and controls
executable file
·48 lines (37 loc) · 955 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#ifndef __CONSOLE_H_
#define __CONSOLE_H_
#include "common.h"
#include "./libs/mem.h"
#include "./libs/math.h"
#include "raspberrylib.h"
#include "gpu2d.h"
#define MAX_CHAR_PER_LINE 120
#define MAX_LINE 45
class Console {
public:
// Fancy print methods.
template<class T>
void kprintf( char* string, T value );
template<class T>
void kprintf( const char* string, T value );
// Standard printf functions.
void kprint( char c );
void kprint( char* string );
void kprint( const char* string );
void kbase( long value, long base, long size );
void kbase( long value, long base );
// Really useless functions
void kout( const char* string );
// Clearscreen function.
void clear( void );
// Constructor.
Console( gpu2dCanvas* surface );
private:
uint32 charx;
uint32 chary;
uint32 padding;
gpu2dCanvas* canvas;
void printChar( char c, uint32 color );
void newLine( void );
};
#endif