Permalink
Cannot retrieve contributors at this time
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?
Cave-Crawler/ObjectH.h
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
29 lines (27 sloc)
697 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include "SDL.h" | |
#include "SDL_image.h" | |
#include <string> | |
#include <iostream> | |
class Object { | |
private: | |
//// destination , source //// | |
SDL_Rect dest; | |
SDL_Rect src; | |
//// texture //// | |
SDL_Texture* tex; | |
public: | |
Object() {} | |
//// get destination //// | |
SDL_Rect getDest() const { return dest; } | |
//// get source //// | |
SDL_Rect getSource() const { return src; } | |
//// set destination //// | |
void setDest(int x, int y, int w, int h); | |
//// set source //// | |
void setSource(int x, int y, int w, int h); | |
//// set image( image file , renderer) //// | |
void setImage(const char* fileName, SDL_Renderer* ren); | |
//// get texture //// | |
SDL_Texture* getTex() const { return tex; } | |
}; |