0

I am trying to create a rougelike, and I am using windows for the different layers. The bottom most one is the map, and the one above that is the entity layer. I have the player character, and I want to move them around on the screen. I am printing a new @ (the way the player is represented) to where they move, and I am trying to put a blank space to where the character was, so that you can see the map layer where before you couldn't. I tried using NULL, but it outputs ^@. Any idea what I can use?

4

2 回答 2

0

使用空白字符 ,' '或者如果您更喜欢320x20

NULL 实际上定义为:

#define NULL 0

所以你正在用 ASCII 代码 0 编写字符,即 NUL 字符,有时表示为 Ctrl+@ 或 ^@。

于 2012-01-31T17:48:10.233 回答
0

在现代机器上,每次编辑后完全清除屏幕并重新绘制整个屏幕可能不会导致太多性能问题。我知道这不是最佳解决方案,但它永远摆脱了那种痕迹伪影。

于 2013-06-13T14:53:47.523 回答