From ac22b06f372335ff47d1875b580dabcfd3bd9148 Mon Sep 17 00:00:00 2001 From: Brandon Low Date: Thu, 19 Jan 2006 07:42:57 +0000 Subject: Use symbolic name better and don't appear to crash on the You WIN screen git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8381 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/sokoban.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'apps/plugins') diff --git a/apps/plugins/sokoban.c b/apps/plugins/sokoban.c index 32c16c58cd..31b74ec2a2 100644 --- a/apps/plugins/sokoban.c +++ b/apps/plugins/sokoban.c @@ -32,7 +32,8 @@ PLUGIN_HEADER #define ROWS 16 #define COLS 20 /* Use all but 8k of the plugin buffer for board data */ -#define MAX_BUFFERED_BOARDS (PLUGIN_BUFFER_SIZE - 0x2000)/(16*20) +#define SOKOBAN_LEVEL_SIZE (ROWS*COLS) +#define MAX_BUFFERED_BOARDS (PLUGIN_BUFFER_SIZE - 0x2000)/SOKOBAN_LEVEL_SIZE #define MAX_UNDOS 5 /* variable button definitions */ @@ -895,6 +896,7 @@ static bool sokoban_loop(void) for (i = 0; i < 30000 ; i++) { rb->lcd_fillrect(0, 0, LCD_WIDTH, LCD_HEIGHT); rb->lcd_update(); + rb->sleep(HZ/20); button = rb->button_get(false); if (button && ((button & BUTTON_REL) != BUTTON_REL)) -- cgit v1.2.3