[OLPC-Games] Kuku: Don't reload images
Christopher Schmidt
crschmidt at metacarta.com
Mon Aug 20 12:00:14 EDT 2007
On Mon, Aug 20, 2007 at 10:23:29AM -0400, Julius B. Lucks wrote:
> Hey Chris,
>
> There is something wrong with this patch. When I apply it, the game
> does not recognize the correct answer anymore (i.e. pecking the
> watermelon when the question is '1' registers the wrong answer). You
> can see the code I am viewing by doing the following in git
>
> git checkout master #make sure you are in the master branch
> git pull # make sure you have up to date code
> git checkout -b kuku_patch
> git apply 0001-change-set_answer-to-only-load-images-if-they-aren-t.txt
>
> Then execute the game. The second patch you sent works fine, but
> when I apply both, I am not able to move on to the math questions -
> it poses a math question in the upper left hand screen, but I still
> see the fruit.
Yep, found both bugs.
1. before set_answer was setting the 'answer' to the image file. I've
instead moved this logic into get_answer, since it seems like the
right place to me.
2. If set_answer passed in a null image_name, it wasn't resetting
that at all, do to the logic movement. So I changed that.
I can now successfully play through the images level, and when I get to
the equations level, the images stop showing up.
Attached patch includes my fixes -- but this is just a quick hack and
may need more testing. At least it works now though, unlike my last set
of patches :)
Regards,
--
Christopher Schmidt
MetaCarta
-------------- next part --------------
More information about the Games
mailing list