1

cga cleanup

This commit is contained in:
2022-07-24 00:12:59 +02:00
parent 186dc8779b
commit 1f62ba8635
2 changed files with 10 additions and 5 deletions

View File

@ -19,7 +19,7 @@
*---------------------------------------------------------------------------*
* Beschreibung: Setzen des Cursors in Spalte x und Zeile y. *
*****************************************************************************/
void CGA::setpos(unsigned int x, unsigned int y) {
void CGA::setpos(const unsigned int x, const unsigned int y) {
/* Hier muess Code eingefuegt werden */
@ -70,7 +70,7 @@ void CGA::getpos(unsigned int& x, unsigned int& y) const {
* character Das auszugebende Zeichen *
* attrib Attributbyte fuer das Zeichen *
*****************************************************************************/
void CGA::show(unsigned int x, unsigned int y, char character, unsigned char attrib) {
void CGA::show(const unsigned int x, const unsigned int y, const char character, const unsigned char attrib) {
/* Hier muess Code eingefuegt werden */
@ -95,7 +95,7 @@ void CGA::show(unsigned int x, unsigned int y, char character, unsigned char att
* n Laenger der Zeichenkette *
* attrib Attributbyte fuer alle Zeichen der Zeichenkette *
*****************************************************************************/
void CGA::print(const char* string, unsigned int n, unsigned char attrib) {
void CGA::print(const char* string, const unsigned int n, const unsigned char attrib) {
/* Hier muess Code eingefuegt werden */
@ -142,10 +142,14 @@ void CGA::print(const char* string, unsigned int n, unsigned char attrib) {
setpos(cursor_x, cursor_y);
}
void CGA::print(const bse::string& string, unsigned int n, unsigned char attrib) {
void CGA::print(const bse::string& string, const unsigned int n, const unsigned char attrib) {
print((const char*)string, n, attrib);
}
void CGA::print(const bse::string& string, const unsigned char attrib) {
print((const char*)string, string.size(), attrib);
}
/*****************************************************************************
* Methode: CGA::scrollup *
*---------------------------------------------------------------------------*
@ -191,7 +195,7 @@ void CGA::clear() {
* fg Foreground color *
* blink ywa/no *
*****************************************************************************/
unsigned char CGA::attribute(CGA::color bg, CGA::color fg, bool blink) {
unsigned char CGA::attribute(const CGA::color bg, const CGA::color fg, const bool blink) {
/* Hier muess Code eingefuegt werden */

View File

@ -88,6 +88,7 @@ public:
// Anzeige mehrerer Zeichen ab der aktuellen Cursorposition
void print(const char* string, unsigned int n, unsigned char attrib = STD_ATTR);
void print(const bse::string& string, unsigned int n, unsigned char attrib = STD_ATTR);
void print(const bse::string& string, unsigned char attrib = STD_ATTR);
// Verschiebt den Bildschirminhalt um eine Zeile nach oben.
// Neue Zeile am unteren Bildrand mit Leerzeichen fuellen