Page Menu
Home
Phabricator (Chris)
Search
Configure Global Search
Log In
Files
F630092
Visibility.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
648 B
Referenced Files
None
Subscribers
None
Visibility.cpp
View Options
//
// Created by Ido Mozes on 23/06/2019.
//
#include
"Visibility.h"
SDL_Texture
*
loadTexture
(
SDL_Renderer
*
renderer
,
const
char
*
path
)
{
SDL_Surface
*
tmpSurface
=
IMG_Load
(
path
);
SDL_Texture
*
tex
=
SDL_CreateTextureFromSurface
(
renderer
,
tmpSurface
);
SDL_FreeSurface
(
tmpSurface
);
return
tex
;
}
Visibility
::
Visibility
(
Entity
*
entity
,
SDL_Renderer
*
renderer
,
const
char
*
path
,
SDL_Rect
*
dstR
,
SDL_Rect
*
srcR
)
:
Component
(
entity
)
{
texture
=
loadTexture
(
renderer
,
path
);
setDstRect
(
dstR
);
setSrcRect
(
srcR
);
}
Visibility
::~
Visibility
()
{
delete
dstRect
;
delete
srcRect
;
SDL_DestroyTexture
(
texture
);
}
File Metadata
Details
Attached
Mime Type
text/x-c
Expires
Sun, Nov 15, 8:37 AM (1 d, 21 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
142177
Default Alt Text
Visibility.cpp (648 B)
Attached To
Mode
R74 BloonsTD
Attached
Detach File
Event Timeline