how can I write an ANSI C console screen buffer?

前端 未结 4 1448
我在风中等你
我在风中等你 2021-01-18 09:35

I\'m working on making an ASCII based game, and everywhere I look people are saying to use Console.Write() from MSDN, which is dandy and all if you\'re using Windows, but I\

4条回答
  •  别那么骄傲
    2021-01-18 09:52

    There is an ANSI standard X3.64, also ISO/IEC 6429 which describes the DEC VT100 terminal. The standard describes certain escape sequences for color and cursor positioning that a compliant terminal-emulator will recognize, which will be basically all X terminals, but on Windows not necessarily (possibly you need the user to load ansi.sys). It is this last ugly inconsistency that illustrates why you should be using ncurses which abstracts away such detail.

提交回复
热议问题