Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class load_manager
- {
- private:
- vector<SDL_Surface*> loaded_images;
- vector<GLuint> loaded_textures;
- string log[];
- public:
- load_manager();
- ~load_manager();
- void load_files(string file_buffer);
- string get_log();
- SDL_Surface* get_image(unsigned int index);
- };
- load_manager::~load_manager()
- {
- loaded_images.empty();
- }
- void load_manager::load_files(string file_buffer)
- {
- int log_count;
- ifstream in(file_buffer.c_str());
- while(!in.eof())
- {
- in >> log[log_count];
- log_count++;
- }
- for(int i=0; i < log_count; i++)
- {
- loaded_images[i] = T_Base::load_image(log[i]);
- loaded_textures[i] = T_Base::LoadGLTextures(loaded_images[i]);
- }
- }
Add Comment
Please, Sign In to add comment