- void FileDialogs::OpenFileDialog()
- {
- wstring temp;
- levelmaker::OpenFileDialog(GAME_ENGINE->GetWindow(), _T("TXT(*.txt) "), temp, _T("txt"));
- int FileTempArr[1200];
- int FileInteger;
- int teller = 0;
- GridNode *GridNodesArr[MAX];
- ifstream inFile(temp.c_str());
- if(!inFile)
- {
- GAME_ENGINE->MessageBox(String("Cannot open file"));
- }
- while(inFile >> FileInteger)
- {
- FileTempArr[teller] = FileInteger;
- ++teller;
- }
- for(int i = 0; i<1200; i += 3)
- {
- GridNodesArr[i]->SetType(FileTempArr[i + 1]);
- if(FileTempArr[i + 2] == 1)
- {
- GridNodesArr[i]->SetWalkable(true);
- }
- else
- {
- GridNodesArr[i]->SetWalkable(false);
- }
- }
- }
array
By: array | Date: Feb 10 2010 22:47 | Format: None | Expires: never | Size: 685 B | Hits: 903
Latest pastes
1 hours ago
11 hours ago
1 days ago
2 days ago
2 days ago