Page MenuHomePhabricator (Chris)

Visibility.cpp
No OneTemporary

Authored By
Unknown
Size
612 B
Referenced Files
None
Subscribers
None

Visibility.cpp

//
// 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

Mime Type
text/x-c
Expires
Sun, Nov 15, 2:20 PM (14 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
140329
Default Alt Text
Visibility.cpp (612 B)

Event Timeline