diff options
author | Dave Chapman <dave@dchapman.com> | 2006-02-23 21:16:51 +0000 |
---|---|---|
committer | Dave Chapman <dave@dchapman.com> | 2006-02-23 21:16:51 +0000 |
commit | a3cfe0a434fd1ef5e4a59e34499d10cd0211f76b (patch) | |
tree | ca8a479c1b6a73a75b829c8799813747e20408ac /apps/plugins/chessbox/gnuchess.c | |
parent | e37654521144e1d224f0044268643f20e3b8a363 (diff) | |
download | rockbox-a3cfe0a434fd1ef5e4a59e34499d10cd0211f76b.tar.gz rockbox-a3cfe0a434fd1ef5e4a59e34499d10cd0211f76b.zip |
Fixes to Chessclock from Miguel (to make it work again after we broke his patch), plus iPod button mapping changes from me
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8816 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/chessbox/gnuchess.c')
-rw-r--r-- | apps/plugins/chessbox/gnuchess.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/apps/plugins/chessbox/gnuchess.c b/apps/plugins/chessbox/gnuchess.c index ed4a7f2a0f..45ca66e778 100644 --- a/apps/plugins/chessbox/gnuchess.c +++ b/apps/plugins/chessbox/gnuchess.c | |||
@@ -66,7 +66,7 @@ | |||
66 | #define taxicab(a,b) (abs(column[a]-column[b]) + abs(row[a]-row[b])) | 66 | #define taxicab(a,b) (abs(column[a]-column[b]) + abs(row[a]-row[b])) |
67 | 67 | ||
68 | /* ---- RockBox datatypes and variables */ | 68 | /* ---- RockBox datatypes and variables */ |
69 | static struct plugin_api* rb; | 69 | struct plugin_api* rb; |
70 | 70 | ||
71 | /* ---- Chess datatypes and variables ---- */ | 71 | /* ---- Chess datatypes and variables ---- */ |
72 | struct leaf | 72 | struct leaf |
@@ -332,8 +332,7 @@ short pscore[3]; | |||
332 | xside = otherside[side]; | 332 | xside = otherside[side]; |
333 | pscore[white] = pscore[black] = 0; | 333 | pscore[white] = pscore[black] = 0; |
334 | 334 | ||
335 | /* ok, I will yield here although this function will be called much more | 335 | /* ok, I will yield here for lower levels */ |
336 | many times than needed I think */ | ||
337 | rb->yield(); | 336 | rb->yield(); |
338 | 337 | ||
339 | for (c1 = white; c1 <= black; c1++) | 338 | for (c1 = white; c1 <= black; c1++) |
@@ -1238,6 +1237,9 @@ short xside,pbst,d,e,cf,score,rcnt; | |||
1238 | unsigned short mv,nxtline[maxdepth]; | 1237 | unsigned short mv,nxtline[maxdepth]; |
1239 | struct leaf *node,tmp; | 1238 | struct leaf *node,tmp; |
1240 | 1239 | ||
1240 | /* ok, I will yield here for higher levels */ | ||
1241 | rb->yield(); | ||
1242 | |||
1241 | NodeCnt++; | 1243 | NodeCnt++; |
1242 | xside = otherside[side]; | 1244 | xside = otherside[side]; |
1243 | 1245 | ||
@@ -2353,7 +2355,7 @@ void GNUChess_Initialize ( void ) { | |||
2353 | /*ttable = (struct hashentry *)malloc(ttblsz * | 2355 | /*ttable = (struct hashentry *)malloc(ttblsz * |
2354 | (unsigned long)sizeof(struct hashentry));*/ | 2356 | (unsigned long)sizeof(struct hashentry));*/ |
2355 | buffer_size = ttblsz * sizeof(struct hashentry); | 2357 | buffer_size = ttblsz * sizeof(struct hashentry); |
2356 | ttable = rb->plugin_get_buffer( &buffer_size ); | 2358 | ttable = (struct hashentry *)rb->plugin_get_buffer( &buffer_size ); |
2357 | Level = 1; | 2359 | Level = 1; |
2358 | OperatorTime = 0; | 2360 | OperatorTime = 0; |
2359 | TCmoves = 60; | 2361 | TCmoves = 60; |