Mark some globals as const
This commit is contained in:
parent
2f80b044a5
commit
d0bf4e220a
3 changed files with 9 additions and 12 deletions
|
@ -46,19 +46,16 @@ namespace sky
|
|||
double min_v;
|
||||
double max_h;
|
||||
double max_v;
|
||||
//double dmin;
|
||||
//double dmax;
|
||||
//double raise[pipe_slices];
|
||||
uint32_t colors[pipe_slices];
|
||||
};
|
||||
struct pipe_cache pipecache[7];
|
||||
|
||||
unsigned top_palette[] = {61, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15};
|
||||
unsigned front_palette[] = {62, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30};
|
||||
unsigned right_palette[] = {63, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45};
|
||||
unsigned left_palette[] = {64, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60};
|
||||
double slopepoints[] = {-3.45, -2.45, -1.45, 0, 1.45, 2.45, 3.45};
|
||||
double angles[] = {1.35, 1.07, 0.88, 0.745};
|
||||
const unsigned top_palette[] = {61, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15};
|
||||
const unsigned front_palette[] = {62, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30};
|
||||
const unsigned right_palette[] = {63, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45};
|
||||
const unsigned left_palette[] = {64, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60};
|
||||
const double slopepoints[] = {-3.45, -2.45, -1.45, 0, 1.45, 2.45, 3.45};
|
||||
const double angles[] = {1.35, 1.07, 0.88, 0.745};
|
||||
|
||||
double calc_slope(double x)
|
||||
{
|
||||
|
|
|
@ -21,7 +21,7 @@ namespace sky
|
|||
const uint64_t past_end = 0xFFFFFFFFFFFFFFFFULL;
|
||||
|
||||
//These values are taken from libopusfile.
|
||||
downmix_pair downmix[] = {
|
||||
const downmix_pair downmix[] = {
|
||||
{16384,16384},
|
||||
{16384,0},{0,16384},
|
||||
{9598,0},{6786,6786},{0,9598},
|
||||
|
@ -32,7 +32,7 @@ namespace sky
|
|||
{6368,0},{4502,4502},{0,6368},{5515,3183},{3183,5515},{5515,3183},{3183,5515},{4502,4502}
|
||||
};
|
||||
|
||||
size_t downmix_idx[9] = {0, 0, 1, 3, 6, 10, 15, 21, 28};
|
||||
const size_t downmix_idx[9] = {0, 0, 1, 3, 6, 10, 15, 21, 28};
|
||||
|
||||
uint32_t pick_subsong(random& rng, const std::set<uint32_t>& candidates)
|
||||
{
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
namespace sky
|
||||
{
|
||||
uint16_t _floorheights[6] = {0, 12800, 15360, 17000, 20000, 25000 };
|
||||
const uint16_t _floorheights[6] = {0, 12800, 15360, 17000, 20000, 25000 };
|
||||
|
||||
const uint8_t _floor_height[256] = {
|
||||
0, 1, 1, 1, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4, 5
|
||||
|
|
Loading…
Add table
Reference in a new issue