Hi,
On Tue, 7 Dec 1999, Lars Skovlund wrote:
[Animate() bug]
> Also, although I can choose a card back - the selection rectangle does
> move - I can't choose a game. It seems that, for some unknown reason,
> the game needs the SelectMenu() function to continue.
Hmm, I suspect that this is the same reason for which <TAB> doesn't work
in the other games (and C-s, C-t etc. in QG1).
Apparently, SelectMenu() doesn't just handle menu selection, it also
provides a way to bind key shortcuts to commands. When AddMenu() is
called, the interpreter is provided with sufficient information to map key
commands to Menu events, or the other way around.
However, there don't appear to be any menu events, so we have to assume
that we should be mapping to key events, and that those key events aren't
being interpreted correctly yet.
But this isn't the only thing we don't know about the menu system yet:
Let's have a look at what we know about SetMenu:
SetMenu(pos, foo, bar)
pos := ((menu + 1) << 8) | (item + 1)
where menu is less than the number to AddMenu() calls up that point.
This function associates the tuple (menu, item) with the tuple (foo, bar),
where 'foo' is a number and 'bar' is a heap pointer.
Let's have a look at what QfG does.
Setting menu 0201: foo=006d, bar=942e ("Save: F5")
Setting menu 0202: foo=006d, bar=9436 ("Restore: F7")
Setting menu 0204: foo=006d, bar=943e ("Restart: F9")
Setting menu 0405: foo=006d, bar=9446 ("Repeat: F3")
Setting menu 0302: foo=006d, bar=944e ("Normal animation: =")
Setting menu 0501: foo=006d, bar=9456 ("Inventory: C-i")
Setting menu 0504: foo=006d, bar=945a ("Time/Day: C-t")
Note that the space pointed to by "bar" appears to take no more than 8
bytes. In the 0201 case, it's
04 34 f5 f2 08 25 f6 ff
Which could very well be a Said() block, if I'm not mistaken. So this part
of the menu system might be covered now- except for "foo".
> BTW, this game would be brilliant for testing our menu API's... for each
> card game, a game-specific menu is added to the menu bar.
So they remove the menus, too?
> PS: Cristoph - There are also a few Animate() problems in the PQ2 intro.
> If you want, I can send you a screen shot.
I assume that this related to the problems I'm encountering in the KQ4
intro. I'll have a look at it.
> PPS: Hoyle's makes FreeSCI segfault on exit because of a bug in
> vocab_debug.c. I can't figure out what the bug is, but it is related to
> how we handle games that lack a kernel name table.
I think I fixed it; in that case, the list wasn't NULL terminated.
llap,
Christoph