You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-35
Original file line number
Diff line number
Diff line change
@@ -79,34 +79,6 @@ SDL_RenderPresent(renderer);
79
79
80
80
81
81
82
-
## Character Sprite Sheet
83
-
84
-
If you're doing a lot of rendering of text, or have a custom color palette, `DOS_Text` might provide better performance. Creating a `DOS_Text` generates a sprite sheet of CP437 characters.
85
-
86
-
```c
87
-
#include <textmode.h>
88
-
...
89
-
SDL_Color my_palette[3] = {
90
-
{ 255, 0, 0, 255 },
91
-
{ 0, 255, 0, 255 },
92
-
{ 0, 0, 255, 255 }
93
-
};
94
-
SDL_Renderer * renderer;
95
-
...
96
-
DOS_Text * text = DOS_CreateText(renderer, DOS_MODE40, my_palette, 3);
97
-
DOS_CharInfo attr = DOS_DefaultAttributes(); // white text on black background
DOS_ClearConsole(console); // clear to default attributes, cursor at 0, 0
124
-
DOS_CGotoXY(console, 2, 2);
125
-
DOS_CSetForeground(DOS_CYAN);
126
-
DOS_CPrintString(console, "console size: %d x %d", COLS, ROWS);
95
+
DOS_ClearScreen(); // clear to default attributes, cursor at 0, 0
96
+
DOS_GotoXY(2, 2);
97
+
DOS_SetForeground(DOS_CYAN);
98
+
DOS_PrintString("console size: %d x %d", COLS, ROWS);
127
99
...
128
100
DOS_RenderConsole(console, 0, 0);
129
101
SDL_RenderPresent(renderer);
@@ -135,7 +107,7 @@ DOS_DestroyConsole(console);
135
107
136
108
## Screen
137
109
138
-
Finally, if you need a full MS-DOS-like text mode program with a multiple page console and colored border, use a `DOS_Screen`. This use case is the least flexible, but provides the simplest interface for writing a text mode program.
110
+
If you need a full MS-DOS-like text mode program with a multiple page console and colored border, use a `DOS_InitScreen()`.
0 commit comments