diff options
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; |