I need to run the window function [window()] and the console input/output subroutine [screen()] I currently have the boost development library installed
P.S. this is only one file out of my program that spans about 2000 lines
///////////////////////////////////
// Console application //
// for //
// Rouge! RPG //
// This program is under the//
//GPL Public License you may mod //
//it as you see fit. -Noah Klabo //
///////////////////////////////////
//standard librarys
#include <iostream>
#include <fstream>
#include <iomanip>
#include <string>
#include <cstdlib>
//program headers /*And so day two starts!*/
#include "map.h"
#include "navigation.h"
#include "render.h"
#include "save.h"
#include "DEFS.h"
#include "save.h"
#include "dialogue.h"
#include "convert.h"
#include "window.h"
usingnamespace std;
int command()
{
loadmap();//loads information from "map.h"
Convert();
do{
Convert();//loops to keep updated
screen();//FIXME //put navigate() inside the "screen" function needs
//window(); FIXME needs to run at the same time as "screen()" for input
if (input == "exit")
{
cout << "Quiting...NOW!\n";
return 0;
}
if (input == "save")
{
save();
cout << "Saving...Profile.SAV\n";
}
if (input == "quit")
{
cout << "Quiting...NOW!\n";
return 0;
}
if (input == "display")
{
window();//FIXME
}
//Direction commands
if (input == "north")
{
playerlocation = playerlocation - map_width; //would be only twenty units for this demo but adding this will give the engine more flexability
}
if (input == "east")
{
playerlocation = playerlocation + 1;
}
if (input == "south")
{
playerlocation = playerlocation + map_width; //would be twenty ten units for this demo but adding this will give the engine more flexability
}
if (input == "west")
{
playerlocation = playerlocation - 1;
}
if (input == "let")
{
cout << let[50];//floor is not changing to player!
}
if (input == "play")
{
system("./audio");
}
}while (input != "quit");
return 0; //program must always return a value DUH
}
int main()
{
//intro graphic and music
// Create the main rendering window
sf::RenderWindow screen(sf::VideoMode(800, 600, 32), "NOT FINISHED");
//1
sf::Image Image;
if (!Image.LoadFromFile("Logo.png"))
return 1;
sf::Sprite Sprite;
Sprite.SetImage(Image);
Sprite.SetPosition(0.0f, 0.0f);
Sprite.SetRotation(0.0f);
Sprite.SetScale(1.0f, 1.0f);
// Start game loop
while (screen.IsOpened())
{
// Process events
sf::Event Event;
while (screen.GetEvent(Event))
{
// Close window : exit
if (Event.Type == sf::Event::Closed)
screen.Close();
}
// Clear the screen (fill it with black color)
screen.Clear();
//draws sprite
//LINE1
screen.Draw(Sprite);
// Display window contents on screen
screen.Display();
}
command();
cout << "Welcome, User"; //could use "endl" but I prefer newline
cin.ignore();//ignore function!
cout << command();
return 0;
}
I can't tell what exactly you are asking, could you be a little more specific? If you just need to run a function and another function at the same time, there is an SFML Threading thing that will do that.