Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
#include "ObjectH.h"
void Object::setDest(int x, int y, int w, int h)
{
dest.x = x;
dest.y = y;
dest.w = w;
dest.h = h;
}
void Object::setSource(int x, int y, int w, int h)
{
src.x = x;
src.y = y;
src.w = w;
src.h = h;
}
void Object::setImage(const char* fileName, SDL_Renderer* ren)
{
//// Load the image as a surface ////
SDL_Surface* surf = IMG_Load(fileName);
//// Create a texture from the Surface ////
tex = SDL_CreateTextureFromSurface(ren, surf);
}