puzzles: misc. changes and sync with upstream

This brings puzzles up-to-date with Simon's tree, along with the
rockbox-specific changes I made. Note that I also got rid of some
of the ugly floating-point code in rbwrappers.c and replaced it
with wrappers for our fixed-point library.

Change-Id: Ibfb79acb15517116a26de1c3ea89e025146b9e2e
This commit is contained in:
Franklin Wei 2017-08-23 14:20:07 -04:00
parent 4dd300d9f0
commit 3c514f8e20
20 changed files with 102 additions and 702 deletions

View file

@ -243,7 +243,7 @@ static char *encode_params(const game_params *params, int full)
if (full && params->barrier_probability)
{
len += sprintf(ret+len, "b");
len += ftoa(ret + len, 400, params->barrier_probability);
len += ftoa(ret + len, params->barrier_probability);
}
/* Shuffle limit is part of the limited parameters, because we have to
* provide the target move count. */
@ -281,7 +281,7 @@ static config_item *game_configure(const game_params *params)
ret[3].name = "Barrier probability";
ret[3].type = C_STRING;
ftoa(buf, 80, params->barrier_probability);
ftoa(buf, params->barrier_probability);
ret[3].sval = dupstr(buf);
ret[3].ival = 0;