-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathscreen.h
More file actions
executable file
·67 lines (42 loc) · 2.37 KB
/
screen.h
File metadata and controls
executable file
·67 lines (42 loc) · 2.37 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#ifndef SCREEN_H
#define SCREEN_H
char* videoStart;
void printChar(char msg, short color);
void printCharAdr(char msg, short color, unsigned int curPos);
//prints a null terminated character array to screen
//returns number of spaces it printed out
int printCharArray(char* array, short color, unsigned int curPos);
//print a string to any manually inputted position instead of whatever the value at videoStart is
void printString(string text, short color, unsigned int curPos);
//print a string using the value in videoStart instead of a cursor position input parameter
void printString(string text, short color);
//prints an int to the screen
void printInt(unsigned int number, short color, bool hex = false);
void printFloat(float value, short color, bool hex = false);
void printTest();
//clears the screen to black
void clearScreen(int vgaMode);
//sets videoStart to the correct address for the inputted cursor position
void setCurPos(int posX, int posY);
void setVGAtextModeCursor(unsigned int posX, unsigned int posY, int vgaMode = 3);
void setVGAtextModeCursor(int vgaMode = 3);
//set pixel attribute byte from a given input position
void setTextModeAttribute(unsigned int posX, unsigned int posY, short atr, int vgaMode = 3);
//set pixel attribute byte based on whatever value is in the videoStart pointer
void setTextModeAttribute(short atr, int vgaMode = 3);
//inserts a character on the screen at the specified position, shifting everything forwards 1 position
void insertChar(char msg, short color, int posX, int posY);
//inserts a character on the screen at the specified position, shifting everything forwards 1 position. Derives position automatically from videoStart
void insertChar(char msg, short color);
//returns true if everything to the left of the given position up until position 80 is blank
bool restOfLineIsBlank(int posX, int posY);
//move the cursor to the leftmost position of whatever line is under the current one
void consoleNewLine(unsigned int videoMode = 3);
void print8BitHexInt(unsigned int hexNum);
void printFileList(rarray<fileInfo> *list, filesystemInfo *sys);
//prints a date and time struct to the textmode 3 console
void printDateTime(datetime *input);
//checks videoStart to see if a newline needs to be inserted and if so, inserts it. Try to avoid using for performance sensitive applications
void checkIfNewlineNeeded();
#include "screen.cpp"
#endif