Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "ASSETS/TMXLoader.h"
- #include <Tmx/tmx.h>
- #include <SDL2_image/SDL_image.h>
- void * LoadSDLImage(const char * location)
- {
- return IMG_Load(location);
- }
- bool TMXLoader::Initialize()
- {
- tmx_img_load_func = (void* (*)(const char*)) LoadSDLImage;
- tmx_img_free_func = (void(*)(void*)) SDL_DestroyTexture;
- return true;
- }
- bool TMXLoader::LoadMap(std::string location)
- {
- tmx_map *map = tmx_load(location.c_str());
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement