2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 05:07:43 +00:00

initial flamethrower weapon implementation

This commit is contained in:
shiiion
2020-06-25 22:37:45 -04:00
parent a2dfd58356
commit cf86338a84
8 changed files with 829 additions and 20 deletions

View File

@@ -49,8 +49,11 @@ void CUVEAnimTexture::GetValueUV(int frame, SUVElementSet& valOut) const {
int tile = int(cvf);
if (x24_loop) {
if (cvf >= float(x20_tiles)) {
tile = int(cvf) % x20_tiles;
// HACK
// Check bad values for cvf
tile = !(std::isnan(cvf) || std::isinf(cvf)) && int(cvf) >= 0 ? int(cvf) : 0;
if (tile >= x20_tiles) {
tile = tile % x20_tiles;
}
} else {
if (cvf >= float(x20_tiles)) {