diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-23 21:54:28 +0200 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-23 21:54:28 +0200 |
commit | 9b7be419c9dcc6ebd1e504713c7b2676ca3d2fdf (patch) | |
tree | 97a2fc5ce1ec1345bd6f44889682ea9a2ffafd76 /mwe/resource-manager/main.cpp | |
parent | 080ad535e6fc6666b919b1a21b6986aaf9b678eb (diff) |
`clang-format`
Diffstat (limited to 'mwe/resource-manager/main.cpp')
-rw-r--r-- | mwe/resource-manager/main.cpp | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/mwe/resource-manager/main.cpp b/mwe/resource-manager/main.cpp index 0148555..b6416f6 100644 --- a/mwe/resource-manager/main.cpp +++ b/mwe/resource-manager/main.cpp @@ -27,27 +27,23 @@ int main() { = SDL_CreateWindow("Tessting resources", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 640, 480, 0); - - SDL_Renderer * renderer = SDL_CreateRenderer(window, -1, 0); - - ResourceManager* rm = ResourceManager::get_instance(); + + ResourceManager * rm = ResourceManager::get_instance(); ResourceConverter resource_converter; - Texture* img = rm->Load<Texture>("../img.png"); + Texture * img = rm->Load<Texture>("../img.png"); - SpriteSheet* SS = rm->Load<SpriteSheet>("../spritesheet_test.png"); - Map* map = rm->Load<Map>("../../asset/tiled/demo.tmx"); + SpriteSheet * SS = rm->Load<SpriteSheet>("../spritesheet_test.png"); + Map * map = rm->Load<Map>("../../asset/tiled/demo.tmx"); - SDL_Surface* surface = resource_converter.FromStringToImage(*img); - SDL_Texture* m_texture = SDL_CreateTextureFromSurface(renderer, surface); + SDL_Surface * surface = resource_converter.FromStringToImage(*img); + SDL_Texture * m_texture = SDL_CreateTextureFromSurface(renderer, surface); SDL_FreeSurface(surface); - TiledMap testingTiledMap = resource_converter.FromStringToMap(*map); testingTiledMap.SetRenderer(*renderer); - SDL_SetRenderDrawColor(renderer, 168, 230, 255, 255); SDL_RenderClear(renderer); @@ -61,7 +57,6 @@ int main() { quit = true; break; } - } SDL_RenderClear(renderer); @@ -73,7 +68,6 @@ int main() { } delete rm; - SDL_DestroyTexture(m_texture); SDL_DestroyRenderer(renderer); SDL_DestroyWindow(window); |