Coverage report for gui


src/
File: src/render/sprites/Sprite.cpp
Date: 2024-06-25 10:57:02
Lines:
0/11
0.0%
Functions:
0/1
0.0%
Branches:
0/6
0.0%

Line Branch Exec Source
1 #include "Sprite.hpp"
2
3 int Sprite::update(float fElapsedTime) {
4 int ret = 0;
5 _time += fElapsedTime;
6 if (_time > _frameTime) {
7 _time = 0;
8 _frame++;
9 if (_frame >= _frameCount) {
10 if (_looping)
11 _frame = 0;
12 else {
13 ret = 1;
14 _frame = _frameCount - 1;
15 }
16 }
17 _sprite.setTextureRect(sf::IntRect(_frame * _frameSize.x, 0, _frameSize.x, _frameSize.y));
18 }
19 return ret;
20 }
21