Added help screen.

This commit is contained in:
Ryan "Lofenyy" Medeiros 2023-07-02 00:27:16 -06:00
parent 3311aa2873
commit 80cccafd48
2 changed files with 25 additions and 1 deletions

View File

@ -47,6 +47,28 @@ MEVENT event;
#include "engineMaps.h"
int help()
{
char buffer[1] = "";
clear();
mvprintw(0, 0,
"Tile types:\nb - Basic tile\ni - Information sign\no - Collectable Object\nd - "
"Door\np - Person\n\nKeyboard functions:\nF5 - Save\nF6 - Load\nF8 - Continuous "
"Painting\nBackspace - Erase\n\nSee documentation for details and extra "
"goodies!\nPress enter to escape this screen.");
getnstr(buffer, 1);
return 0;
}
int colorPick()
{
return 0;
}
int main()
{
// Start our game engine and start a blank map
@ -251,6 +273,8 @@ int main()
addDoor();
if (k == 'p')
addChar();
if (k == 'h')
help();
if (k == KEY_BACKSPACE)
delTile();
if ((k == KEY_PPAGE) && (aMap < (nMap - 1)))

View File

@ -348,7 +348,7 @@ int turnTip()
int newMap()
{
uint_fast8_t n = 255;
// Allocate the needed memory
map = malloc(n * sizeof(struct maps));