first commit

This commit is contained in:
2021-01-29 21:14:20 -05:00
commit b2acceb4b9
78 changed files with 6774 additions and 0 deletions

View File

@ -0,0 +1,22 @@
/*
* TextureManager.cpp
*
* Created on: Feb 11, 2020
* Author: ayoungblood
*/
#include "TextureManager.h"
SDL_Texture* TextureManager::LoadTexture(const char* texture)
{
SDL_Surface* tempSurface = IMG_Load(texture);
SDL_Texture* tex = SDL_CreateTextureFromSurface(Game::renderer, tempSurface);
SDL_FreeSurface(tempSurface);
return tex;
}
void TextureManager::Draw(SDL_Texture* tex, SDL_Rect src, SDL_Rect dest, SDL_RendererFlip flip)
{
SDL_RenderCopyEx(Game::renderer, tex, &src, &dest, NULL, NULL, flip);
}