1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-07 10:52:23 +00:00

binary_tiling_width parameter

This commit is contained in:
Zeno Rogue
2018-08-14 10:18:18 +02:00
parent c54d01b50c
commit eb57d160d0
5 changed files with 16 additions and 6 deletions

View File

@@ -323,7 +323,7 @@ int goldbergcode(cell *c, const patterns::patterninfo& si) {
void mapTexture(cell *c, textureinfo& mi, patterns::patterninfo &si, const transmatrix& T, int shift = 0) {
mi.c = c;
mi.symmetries = si.symmetries;
mi.current_type = c->type;
mi.current_type = celltriangles(c);
if(gp::on) {
mi.M = T;
@@ -882,6 +882,7 @@ void init_textureconfig() {
addsaver(vid.alpha, "projection", 1);
addsaver(vid.scale, "scale", 1);
addsaver(vid.stretch, "stretch", 1);
addsaver(vid.binary_width, "binary-tiling-width", 1);
addsaver(config.texturename, "texture filename", "");
addsaver(config.texture_tuner, "texture tuning", "");
@@ -1504,7 +1505,7 @@ void texture_config::remap(eTextureState old_tstate, eTextureState old_tstate_ma
auto& mi = texture_map_orig.at(oldid);
int ncurr = isize(mi.tvertices);
int ntarget = ncurr * c->type / mi.current_type;
int ntarget = ncurr * celltriangles(c) / mi.current_type;
vector<glvertex> new_tvertices = mi.tvertices;
new_tvertices.resize(ntarget);
for(int i=ncurr; i<ntarget; i++) {