int main(void) { InitConsole(); Welcome(); while (1) { GameMainLoop(); ClearConsoleBuffer(); setConsoleColor(FRED); DrawString((WIDTH - strlen("You are dead")) / 2, HEIGHT / 2, "You are dead"); resetConsoleColor(); RedrawConsole(); while (!IsKeyPressed(VK_RETURN)); } return 0; }
TdError LinuxOSAL::setColor(TdColor textColor, bool textIntense, TdColor backgroundColor, bool backgroundIntense){ TdError rc; resetConsoleColor(); rc = setConsoleColor(textColor, eTD_COLOR_FOREGROUND, textIntense); if(rc){ return rc; } rc = setConsoleColor(backgroundColor, eTD_COLOR_BACKGROUND, backgroundIntense); if(rc){ return rc; } return rc; }