Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <util/buffer.h>
#include "textures.h"
#include "debugging/debugging.h"
-byte g_gammatable[256];
+u::BufferVal<256> g_gammatable;
void ResampleGamma( float fGamma ){
int i,inf;
- if ( fGamma == 1.0 ) {
+ auto buf = g_gammatable.mut();
+ if (fGamma == 1.0 ) {
for ( i = 0; i < 256; i++ )
- g_gammatable[i] = i;
+ buf[i] = i;
}
else
{
if ( inf > 255 ) {
inf = 255;
}
- g_gammatable[i] = inf;
+ buf[i] = inf;
}
}
}
int r,g,b;
int i;
int inf;
- byte gammatable[256];
+ auto gammatable = u::buffer<256>();
float gamma;
gamma = g_texture_globals.fGamma;