summaryrefslogtreecommitdiff
path: root/apps/plugins/chessbox/chessbox.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/chessbox/chessbox.c')
-rw-r--r--apps/plugins/chessbox/chessbox.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/apps/plugins/chessbox/chessbox.c b/apps/plugins/chessbox/chessbox.c
index 6437c8d4fd..3bd9593e3a 100644
--- a/apps/plugins/chessbox/chessbox.c
+++ b/apps/plugins/chessbox/chessbox.c
@@ -94,7 +94,7 @@ const char *level_string[] = { "Level 1: 60 moves / 5 min" ,
94int wt_command = COMMAND_NOP; 94int wt_command = COMMAND_NOP;
95 95
96/* ---- Get the board column and row (e2 f.e.) for a physical x y ---- */ 96/* ---- Get the board column and row (e2 f.e.) for a physical x y ---- */
97void xy2cr ( short x, short y, short *c, short *r ) { 97static void xy2cr ( short x, short y, short *c, short *r ) {
98 if (computer == black ) { 98 if (computer == black ) {
99 *c = x ; 99 *c = x ;
100 *r = y ; 100 *r = y ;
@@ -105,7 +105,7 @@ void xy2cr ( short x, short y, short *c, short *r ) {
105} 105}
106 106
107/* ---- get physical x y for a board column and row (e2 f.e.) ---- */ 107/* ---- get physical x y for a board column and row (e2 f.e.) ---- */
108void cr2xy ( short c, short r, short *x, short *y ) { 108static void cr2xy ( short c, short r, short *x, short *y ) {
109 if ( computer == black ) { 109 if ( computer == black ) {
110 *x = c ; 110 *x = c ;
111 *y = r ; 111 *y = r ;
@@ -174,7 +174,7 @@ static void cb_drawboard (void) {
174} 174}
175 175
176/* ---- Switch mark on board ---- */ 176/* ---- Switch mark on board ---- */
177void cb_switch ( short x , short y ) { 177static void cb_switch ( short x , short y ) {
178 rb->lcd_set_drawmode ( DRMODE_COMPLEMENT ); 178 rb->lcd_set_drawmode ( DRMODE_COMPLEMENT );
179 rb->lcd_drawrect ( XOFS + x*TILE_WIDTH + 1 , 179 rb->lcd_drawrect ( XOFS + x*TILE_WIDTH + 1 ,
180 YOFS + ( 7 - y )*TILE_HEIGHT +1 , 180 YOFS + ( 7 - y )*TILE_HEIGHT +1 ,
@@ -184,7 +184,7 @@ void cb_switch ( short x , short y ) {
184} 184}
185 185
186/* ---- callback for capturing interaction while thinking ---- */ 186/* ---- callback for capturing interaction while thinking ---- */
187void cb_wt_callback ( void ) { 187static void cb_wt_callback ( void ) {
188 int button = BUTTON_NONE; 188 int button = BUTTON_NONE;
189 189
190 wt_command = COMMAND_NOP; 190 wt_command = COMMAND_NOP;
@@ -208,7 +208,7 @@ void cb_wt_callback ( void ) {
208} 208}
209 209
210/* ---- set playing parameters depending on level ---- */ 210/* ---- set playing parameters depending on level ---- */
211void cb_setlevel ( int lev ) { 211static void cb_setlevel ( int lev ) {
212 Level = (lev > 7) ? 7 : ( (lev < 1) ? 1 : lev ) ; 212 Level = (lev > 7) ? 7 : ( (lev < 1) ? 1 : lev ) ;
213 switch (Level) { 213 switch (Level) {
214 case 1 : 214 case 1 :
@@ -257,7 +257,7 @@ void cb_setlevel ( int lev ) {
257} 257}
258 258
259/* ---- increase playing level ---- */ 259/* ---- increase playing level ---- */
260void cb_levelup ( void ) { 260static void cb_levelup ( void ) {
261 if ( Level == 7 ) 261 if ( Level == 7 )
262 cb_setlevel ( 1 ); 262 cb_setlevel ( 1 );
263 else 263 else
@@ -266,7 +266,7 @@ void cb_levelup ( void ) {
266}; 266};
267 267
268/* ---- Save current position ---- */ 268/* ---- Save current position ---- */
269void cb_saveposition ( void ) { 269static void cb_saveposition ( void ) {
270 int fd; 270 int fd;
271 short sq,i,c; 271 short sq,i,c;
272 unsigned short temp; 272 unsigned short temp;
@@ -319,7 +319,7 @@ void cb_saveposition ( void ) {
319} 319}
320 320
321/* ---- Restore saved position ---- */ 321/* ---- Restore saved position ---- */
322void cb_restoreposition ( void ) { 322static void cb_restoreposition ( void ) {
323 int fd; 323 int fd;
324 short sq; 324 short sq;
325 unsigned short m; 325 unsigned short m;
@@ -419,7 +419,7 @@ static int cb_menu_viewer(void)
419} 419}
420 420
421/* ---- get a command in game mode ---- */ 421/* ---- get a command in game mode ---- */
422struct cb_command cb_get_viewer_command (void) { 422static struct cb_command cb_get_viewer_command (void) {
423 int button; 423 int button;
424 struct cb_command result = { 0, {0,0,0,0,0}, 0 }; 424 struct cb_command result = { 0, {0,0,0,0,0}, 0 };
425 425
@@ -447,7 +447,7 @@ struct cb_command cb_get_viewer_command (void) {
447} 447}
448 448
449/* ---- viewer main loop ---- */ 449/* ---- viewer main loop ---- */
450void cb_start_viewer(char* filename){ 450static void cb_start_viewer(char* filename){
451 struct pgn_game_node *first_game, *selected_game; 451 struct pgn_game_node *first_game, *selected_game;
452 struct pgn_ply_node *curr_ply; 452 struct pgn_ply_node *curr_ply;
453 bool exit_game = false; 453 bool exit_game = false;
@@ -638,7 +638,7 @@ static int cb_menu(void)
638} 638}
639 639
640/* ---- get a command in game mode ---- */ 640/* ---- get a command in game mode ---- */
641struct cb_command cb_getcommand (void) { 641static struct cb_command cb_getcommand (void) {
642 static short x = 4 , y = 3 ; 642 static short x = 4 , y = 3 ;
643 short c , r , l; 643 short c , r , l;
644 int button; 644 int button;
@@ -773,7 +773,7 @@ struct cb_command cb_getcommand (void) {
773} 773}
774 774
775/* ---- game main loop ---- */ 775/* ---- game main loop ---- */
776void cb_play_game(void) { 776static void cb_play_game(void) {
777 struct cb_command command; 777 struct cb_command command;
778 struct pgn_game_node *game; 778 struct pgn_game_node *game;
779 char move_buffer[20]; 779 char move_buffer[20];