mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-01 00:45:26 +02:00
* some functions have been written
* added CConsoleHandler to interact with user (it should be testing - only, the real console should be as in h3) pathfinder MAY work now, but it isn't tested
This commit is contained in:
21
CConsoleHandler.cpp
Normal file
21
CConsoleHandler.cpp
Normal file
@ -0,0 +1,21 @@
|
||||
#include "CConsoleHandler.h"
|
||||
#include "stdafx.h"
|
||||
#include "SDL.h"
|
||||
#include "SDL_thread.h"
|
||||
|
||||
int internalFunc(void * nothingUsed)
|
||||
{
|
||||
char * usersMessage = new char[500];
|
||||
std::string readed;
|
||||
while(true)
|
||||
{
|
||||
std::cin.getline(usersMessage, 500);
|
||||
readed = std::string(usersMessage);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
void CConsoleHandler::runConsole()
|
||||
{
|
||||
SDL_Thread * myth = SDL_CreateThread(&internalFunc, NULL);
|
||||
}
|
Reference in New Issue
Block a user