Removed unused (or replaceable in case of clamp) functions from helpers.
This commit is contained in:
parent
7e6761e968
commit
55e98e041c
@ -31,7 +31,7 @@
|
||||
#include "race/race_manager.hpp"
|
||||
#include "scriptengine/script_engine.hpp"
|
||||
#include "tracks/model_definition_loader.hpp"
|
||||
#include "utils/helpers.hpp"
|
||||
|
||||
#include <ISceneManager.h>
|
||||
|
||||
/** A track object: any additional object on the track. This object implements
|
||||
@ -332,8 +332,7 @@ void TrackObject::init(const XMLNode &xml_node, scene::ISceneNode* parent,
|
||||
{
|
||||
float power = 1;
|
||||
xml_node.get("bloompower", &power);
|
||||
power = clampf(power, 0.5f, 10);
|
||||
|
||||
btClamp(power, 0.5f, 10.0f);
|
||||
irr_driver->addForcedBloomNode(glownode, power);
|
||||
}
|
||||
}
|
||||
|
@ -22,33 +22,6 @@
|
||||
#include <math.h>
|
||||
#include <algorithm>
|
||||
|
||||
float clampf(float in, float low, float high) {
|
||||
return in > high ? high : in < low ? low : in;
|
||||
}
|
||||
|
||||
unsigned ispow(const unsigned in) {
|
||||
|
||||
if (in < 2) return 0;
|
||||
|
||||
return !(in & (in - 1));
|
||||
}
|
||||
|
||||
// Simple 8-bit hash
|
||||
u8 shash8(const u8 * const data, const u16 size) {
|
||||
|
||||
u32 out = data[0], i;
|
||||
|
||||
for (i = 1; i < size; i++) {
|
||||
out += data[i] * ((i + 1) ^ data[i - 1]);
|
||||
}
|
||||
|
||||
out %= 307; // prime
|
||||
out %= 256; // eight bits
|
||||
|
||||
return out;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
|
||||
Copyright (C) 2011 by-2015 Ashima Arts (Simplex noise)
|
||||
|
@ -23,12 +23,6 @@
|
||||
|
||||
using irr::video::ITexture;
|
||||
|
||||
float clampf(float, float, float);
|
||||
|
||||
unsigned ispow(const unsigned in);
|
||||
|
||||
float noise2d(float v1, float v2 = 0);
|
||||
|
||||
u8 shash8(const u8 * const data, const u16 size);
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user