Guest User

Untitled

a guest
Jun 24th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.87 KB | None | 0 0
  1.     class load_manager
  2.     {
  3.         private:
  4.         vector<SDL_Surface*> loaded_images;
  5.         vector<GLuint> loaded_textures;
  6.         string log[];
  7.         public:
  8.         load_manager();
  9.         ~load_manager();
  10.  
  11.         void load_files(string file_buffer);
  12.         string get_log();
  13.         SDL_Surface* get_image(unsigned int index);
  14.     };
  15.  
  16.     load_manager::~load_manager()
  17.     {
  18.         loaded_images.empty();
  19.     }
  20.  
  21.     void load_manager::load_files(string file_buffer)
  22.     {
  23.         int log_count;
  24.         ifstream in(file_buffer.c_str());
  25.  
  26.         while(!in.eof())
  27.         {
  28.             in >> log[log_count];
  29.  
  30.             log_count++;
  31.         }
  32.         for(int i=0; i < log_count; i++)
  33.         {
  34.             loaded_images[i] = T_Base::load_image(log[i]);
  35.             loaded_textures[i] = T_Base::LoadGLTextures(loaded_images[i]);
  36.         }
  37.     }
Add Comment
Please, Sign In to add comment