diff options
| author | bd <bdunahu@operationnull.com> | 2025-04-26 03:39:28 -0400 | 
|---|---|---|
| committer | bd <bdunahu@operationnull.com> | 2025-04-26 03:39:28 -0400 | 
| commit | a78163745b43a0c420ae4ea5792def30a94420eb (patch) | |
| tree | 9cc23cfec1a7e524822d604e95e237034b31a95e /gui/util.cc | |
| parent | c98a0c26c4ccb5c4ae0e9f5810be910a7b299037 (diff) | |
Partial cache size generation, full cache display
Diffstat (limited to 'gui/util.cc')
| -rw-r--r-- | gui/util.cc | 16 | 
1 files changed, 16 insertions, 0 deletions
diff --git a/gui/util.cc b/gui/util.cc new file mode 100644 index 0000000..ee75e56 --- /dev/null +++ b/gui/util.cc @@ -0,0 +1,16 @@ +#include "util.h" + +int cache_size_mapper(int total_levels, int level) +{ +	const int y_min = 4; +	const int y_max = 12; +	double f, r; + +	if (total_levels <= 1) +		return 8; + +	f = level / total_levels; +	r = y_min + f * (y_max - y_min); + +	return r; +}  | 
