Page Menu
Home
Phabricator (Chris)
Search
Configure Global Search
Log In
Files
F624302
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
612 B
Referenced Files
None
Subscribers
None
Visibility.cpp
View Options
//
// Created by Ido Mozes on 23/06/2019.
//
#include
"Visibility.h"
void
Visibility::reloadTexture
(
SDL_Texture
*
newTexture
,
SDL_Surface
*
newSurface
)
{
if
(
newTexture
)
{
texture
=
newTexture
;
surface
=
newSurface
;
}
if
(
dstRect
)
{
if
(
dstRect
->
w
==
0
)
dstRect
->
w
=
int
((
float
(
surface
->
w
)
/
surface
->
h
)
*
dstRect
->
h
);
else
if
(
dstRect
->
h
==
0
)
dstRect
->
h
=
int
((
float
(
surface
->
h
)
/
surface
->
w
)
*
dstRect
->
w
);
}
}
void
Visibility::setPosition
(
int
x
,
int
y
)
{
if
(
dstRect
)
{
dstRect
->
x
=
x
;
dstRect
->
y
=
y
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-c
Expires
Sat, Nov 14, 10:12 PM (4 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
140329
Default Alt Text
Visibility.cpp (612 B)
Attached To
Mode
R74 BloonsTD
Attached
Detach File
Event Timeline