Skip to content

Instantly share code, notes, and snippets.

@savolla
Created October 1, 2018 12:42
Show Gist options
  • Save savolla/5bbb1197debb63405a81587cb87a41c5 to your computer and use it in GitHub Desktop.
Save savolla/5bbb1197debb63405a81587cb87a41c5 to your computer and use it in GitHub Desktop.
#include <ncurses.h>
#include <stdlib.h>
// function declerations
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
int screenSetup();
int mapSetup();
// MAIN function
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
int main(void)
{
screenSetup();
mapSetup();
return 0;
}
// function definitions
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// SCREEN INIT FUNC
int screenSetup()
{
// VARIABLES
int quit = 'q';
// RUNTIME
initscr(); // initializes the screen
while (getchar() != quit) {} // while q is not pressed, display the window
endwin(); // kill window
return 0;
}
// MAP SETUP FUNC
int mapSetup()
{
mvprintw(3, 3, "-------");
mvprintw(3, 6, "-------");
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment