Go to the source code of this file.
◆ fixspace_dbg()
Definition at line 821 of file fixspace.cpp.
824 const bool show_map_detail =
false;
829 tprintf(
"Blob count: %d (word); %d/%d (rebuild word)\n",
835 if (show_map_detail) {
844 tprintf(
"Done flag: %s\n\n", word->
done ?
"TRUE" :
"FALSE");
◆ initialise_search()
void initialise_search |
( |
WERD_RES_LIST & |
src_list, |
|
|
WERD_RES_LIST & |
new_list |
|
) |
| |
Definition at line 203 of file fixspace.cpp.
205 WERD_RES_IT src_it(&src_list);
206 WERD_RES_IT new_it(&new_list);
210 for (src_it.mark_cycle_pt(); !src_it.cycled_list(); src_it.forward()) {
211 src_wd = src_it.data();
216 new_it.add_after_then_move(new_wd);
◆ transform_to_next_perm()
void transform_to_next_perm |
( |
WERD_RES_LIST & |
words | ) |
|
Definition at line 398 of file fixspace.cpp.
400 WERD_RES_IT word_it(&words);
401 WERD_RES_IT prev_word_it(&words);
406 int16_t prev_right = -INT16_MAX;
409 int16_t min_gap = INT16_MAX;
411 for (word_it.mark_cycle_pt(); !word_it.cycled_list(); word_it.forward()) {
412 word = word_it.data();
415 if (prev_right > -INT16_MAX) {
416 gap = box.
left() - prev_right;
420 prev_right = box.
right();
423 if (min_gap < INT16_MAX) {
424 prev_right = -INT16_MAX;
425 word_it.set_to_list(&words);
427 for (; (prev_right == -INT16_MAX) || !word_it.at_first();
429 word = word_it.data();
432 if (prev_right > -INT16_MAX) {
433 gap = box.
left() - prev_right;
434 if (gap <= min_gap) {
435 prev_word = prev_word_it.data();
441 copy_word =
new WERD;
442 *copy_word = *(prev_word->
word);
448 prev_word_it.add_before_then_move(combo);
455 delete word_it.extract();
464 prev_word_it = word_it;
467 prev_right = box.
right();