Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- std::wifstream informationFile;
- informationFile.open("./Resources/GameInit.txt");
- std::wstring extractedLine;
- std::wstringstream objectInformation;
- if (informationFile.fail() == true)
- {
- GAME_ENGINE->MessageBox(String("Failed to open GameInit.txt"));
- GAME_ENGINE->QuitGame();
- }
- while (informationFile.eof() == false)
- {
- std::getline(informationFile, extractedLine);
- if (extractedLine.find(L"Pickup") != std::wstring::npos && extractedLine.find(L"//") == std::wstring::npos)
- {
- while (extractedLine.find(L"/>") == std::wstring::npos)
- {
- objectInformation << extractedLine;
- std::getline(informationFile, extractedLine);
- }
- OutputDebugString(String(objectInformation.str().c_str()) + String("\n"));
- CreateObject(objectInformation);
- objectInformation.str(L"");
- }
- }
- informationFile.close();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement