Carl Worth [Sat, 16 Dec 2006 23:52:37 +0000 (15:52 -0800)]
Abstract tile-specific code out of demo-item.c
We now accomplish painting by simply passing in a callback
function to do the painting. This will allow the single item
class to be shared for all canvas items.
Carl Worth [Tue, 5 Dec 2006 06:46:53 +0000 (22:46 -0800)]
Fix randomizing of letter positions to never end up on top of each other
We had some confusion over who was in charge of the letter position,
(whether the matrix as manipulated by the core animate code, or
whether private fields in our demo-item structure). We now do all
positioning based on the matrix. As a regression, animation is now
disabled.
Carl Worth [Thu, 21 Sep 2006 09:02:39 +0000 (02:02 -0700)]
Move private portions of dict from dict-impl.h back to dict.c
This is the punch line in the recent series of commits which removed
trie_t and string_t code from grid.c. We now finally have a nice,
clean dict_t interface for new programs to use.
Carl Worth [Thu, 21 Sep 2006 07:36:10 +0000 (00:36 -0700)]
Complete the dict layer by adding dict_cursor_t and dict_entry_t
Some might argue that this is a gratuitous layer and that it
hides the elegance of the trie implementation where pointers
to the entire structure and pointers to a single node are
equivalent.
But I think the elegance is still all there in the implementation,
and I think there's some real benefit in making separate notions
of the entire structure (dict_t) and a pointer to a single element
for navigating (dict_cursor_t) since the operations one might want
to perform on one or the other are entirely separate.
With this change, the only remaining dependence of grid.c on any
trie or TRIE symbols is a single flag definition (which I want to
put entirely in grid.c) and the print functionality.