• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

PredatorCZ / RevilLib / 175

19 Nov 2025 10:16PM UTC coverage: 10.614% (-0.5%) from 11.16%
175

push

github

PredatorCZ
add more mtf texture support

0 of 139 new or added lines in 2 files covered. (0.0%)

639 existing lines in 6 files now uncovered.

757 of 7132 relevant lines covered (10.61%)

6360.16 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

3.23
/src/mtf_lmt/lmt.cpp
1
/*  Revil Format Library
2
    Copyright(C) 2017-2023 Lukas Cone
3

4
    This program is free software : you can redistribute it and / or modify
5
    it under the terms of the GNU General Public License as published by
6
    the Free Software Foundation, either version 3 of the License, or
7
    (at your option) any later version.
8

9
    This program is distributed in the hope that it will be useful,
10
    but WITHOUT ANY WARRANTY; without even the implied warranty of
11
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the
12
    GNU General Public License for more details.
13

14
    You should have received a copy of the GNU General Public License
15
    along with this program.If not, see <https://www.gnu.org/licenses/>.
16
*/
17

18
#include "internal.hpp"
19
#include "spike/except.hpp"
20
#include "spike/reflect/reflector.hpp"
21

22
REFLECT(CLASS(TrackMinMax), MEMBER(min), MEMBER(max));
2✔
23

24
LMT::LMT() : pi(std::make_unique<LMTImpl>()) {}
×
25
LMT::LMT(LMT &&) = default;
×
UNCOV
26
LMT::~LMT() = default;
×
27

28
LMTVersion LMT::Version() const { return pi->props.version; }
×
29
LMTArchType LMT::Architecture() const { return pi->props.arch; }
×
30
auto LMT::CreateAnimation() const {
×
UNCOV
31
  std::vector<void *> ptrStore;
×
32
  LMTConstructorProperties cProps(pi->props, ptrStore);
UNCOV
33
  return LMTAnimation::Create(cProps);
×
34
}
35

36
LMT::operator uni::MotionsConst() const {
×
UNCOV
37
  return uni::MotionsConst{pi.get(), false};
×
38
}
39

40
void LMT::Version(LMTVersion _version, LMTArchType _arch) {
×
41
  if (!pi->masterBuffer.empty()) {
×
UNCOV
42
    throw es::RuntimeError("Cannot set version for read only class!");
×
43
  }
44

45
  if (!pi->storage.empty()) {
×
UNCOV
46
    throw es::RuntimeError("Cannot set version for already used class.");
×
47
  }
48

49
  pi->props.version = _version;
×
UNCOV
50
  pi->props.arch = _arch;
×
51
}
52

53
void LMT::AppendAnimation(LMTAnimation *ani) {
×
54
  if (ani && *ani != pi->props) {
×
UNCOV
55
    throw es::RuntimeError("Cannot append animation. Properties mismatch.");
×
56
  }
57

UNCOV
58
  pi->storage.emplace_back(ani, false);
×
59
}
60

61
LMTAnimation *LMT::AppendAnimation() {
×
62
  pi->storage.emplace_back(uni::ToElement(CreateAnimation()));
×
UNCOV
63
  return pi->storage.back().get();
×
64
}
65

66
void LMT::InsertAnimation(LMTAnimation *ani, size_t at, bool replace) {
×
67
  if (*ani != pi->props) {
×
UNCOV
68
    throw es::RuntimeError("Cannot append animation. Properties mismatch.");
×
69
  }
70

71
  if (at >= pi->storage.size()) {
×
72
    pi->storage.resize(at);
×
UNCOV
73
    pi->storage.emplace_back(ani);
×
74
  } else {
75
    pi->storage[at] = LMTImpl::class_type(ani, false);
76
  }
77
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc