- //---------------------------
- // Includes
- //---------------------------
- #include "Serializer.h"
- //---------------------------
- // Defines
- //---------------------------
- #define GAME_ENGINE (GameEngine::GetSingleton())
- //---------------------------
- // Constructor & Destructor
- //---------------------------
- Serializer::Serializer()
- {
- m_myfile.open("textfiles\Save.txt", ios::out | ios::trunc);
- // nothing to create
- }
- Serializer::~Serializer()
- {
- m_myfile.close();
- // nothing to destroy
- }
- void Serializer::writelinetofile(int place, int type)
- {
- if(m_myfile.is_open() )
- {
- m_myfile << place;
- m_myfile << " ";
- m_myfile << type;
- m_myfile << "n";
- }
- else
- {
- GAME_ENGINE->MessageBox(String("Can't write to file!"));
- }
- }
- //---------------------------
- // Eigen methoden
- //---------------------------
- // vul aan met je eigen methoden.
save to txt file
By: serializer | Date: Feb 5 2010 16:06 | Format: None | Expires: never | Size: 887 B | Hits: 928
Latest pastes
1 days ago
2 days ago
5 days ago
6 days ago
6 days ago