Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2016
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.46 KB | None | 0 0
  1. #include "ASSETS/TMXLoader.h"
  2.  
  3. #include <Tmx/tmx.h>
  4. #include <SDL2_image/SDL_image.h>
  5.  
  6. void * LoadSDLImage(const char * location)
  7. {
  8.     return IMG_Load(location);
  9. }
  10.  
  11. bool TMXLoader::Initialize()
  12. {
  13.     tmx_img_load_func = (void* (*)(const char*)) LoadSDLImage;
  14.     tmx_img_free_func = (void(*)(void*))         SDL_DestroyTexture;
  15.  
  16.     return true;
  17. }
  18.  
  19. bool TMXLoader::LoadMap(std::string location)
  20. {
  21.     tmx_map *map = tmx_load(location.c_str());
  22.  
  23.     return true;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement