如何在 Turbo C++ 中创建自定义角色
我已经到了 C++ 需要自定义字符的地步。我将尝试解释我的意思:你们已经知道文本模式中的字符是点的图案,就像“A”一样:
0000001000000
0000010100000
0000100010000
0001000001000
0001000001000
0001111111000
0001000001000
0001000001000
0001000001000
...其中 1 代表活动点,0 代表非活动点。我想知道如何自己塑造这样一个角色。有人告诉我有一种方法(无需经历巨大的混乱),但我还没有得到彻底的指导。我希望我能在这里得到帮助。谢谢。
I have come up to a point in C++ where I need a custom character. I'll try to explain what I mean to say: As you guys already know the characters in text mode are the patterns of dots, like the 'A' being as:
0000001000000
0000010100000
0000100010000
0001000001000
0001000001000
0001111111000
0001000001000
0001000001000
0001000001000
...where the 1's represent the active dot and 0's inactive. I want to know how do I create such a character by myself this way. I have been told that there is a way (without going through a huge mess), but I haven't been thoroughly guided. I hope I'll get help here. thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
假设您的目标是文本模式下的 DOS - 在中断 10h、AH 11h 上读取。它允许您将用户定义的字符加载到字符生成器内存中。请参阅此处:http://webpages.charter.net/danrollins/techhelp/0151.HTM< /a>
我认为 Turbo C 没有针对该特定调用的包装函数。要直接调用中断,请使用 int86() 函数。
Assuming you're targeting DOS in text mode - read up on interrupt 10h, AH 11h. It lets you load user-defined characters into the character generator memory. See here: http://webpages.charter.net/danrollins/techhelp/0151.HTM
I don't think Turbo C has a wrapper function for that particual call. For invoking interrupts directly, use the int86() function.
这是处理视频适配器文本模式内存、BIOS int 10h 调用等。所以 1990 年代...大多数现代操作系统不在文本模式下工作,并使用 TrueType 字体(即使是模拟文本模式的“控制台”应用程序) )。
This is dealing with the video adapter text mode memory, BIOS int 10h calls, etc. So 1990's... Most modern operating systems don't work in text mode, and use TrueType fonts (even for "console" applications that emulate text mode).
如果您想要一个占据整个块的双水平行字符,以便一行不间断地运行,伪图形字符 0xCD (═) 可能会有所帮助。
它取决于当前的代码页,但大多数国家代码页(包括西里尔文 866)都会保留伪字符完好无损。
直接输出一行0xCD,看看是什么样子的。
If you want a double horizontal line character that takes the whole block, so that a line runs uninterrupted, the pseudographic character 0xCD (═) might help.
It depends on the current codepage, but most national codepages (including the Cyrillic 866) leave the pseudographic characters intact.
Just output a row of 0xCDs, see how it looks.