A modern Music Player Daemon based on Rockbox open source high quality audio player
libadwaita audio rust zig deno mpris rockbox mpd

Sliding_puzzle: rearrange the default bitmap definitions and add two more sizes of the bitmap (fixes issues on Nano and small H10). The 'Moves' box is still not fully visible on the latter, I plan to work on it but thought the fix was worth an own commit already. Also let the plugin retrieve the image width and height from the bitmap.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16188 a1c6a512-1295-4272-9138-f99709370657

+32 -23
+21 -10
apps/plugins/bitmaps/native/SOURCES
··· 526 526 #endif 527 527 #endif 528 528 529 + /* Matrix */ 529 530 #if LCD_DEPTH > 1 530 - /* matrix */ 531 531 matrix_bold.bmp 532 532 matrix_normal.bmp 533 533 #endif ··· 546 546 #endif 547 547 #endif 548 548 549 - #if defined(HAVE_LCD_COLOR) 550 - #if (LCD_WIDTH==132 && LCD_HEIGHT==80) 549 + /* Sliding puzzle */ 550 + #if (LCD_WIDTH != LCD_HEIGHT) 551 + #define SMALLER_DIMENSION ((LCD_WIDTH < LCD_HEIGHT) ? LCD_WIDTH : LCD_HEIGHT) 552 + #else /* 5/6GB H10 with square display */ 553 + #define SMALLER_DIMENSION (LCD_HEIGHT - 18) 554 + #endif 555 + 556 + #if defined HAVE_LCD_COLOR 557 + #if SMALLER_DIMENSION <= 80 551 558 sliding_puzzle.80x80x16.bmp 552 - #elif (LCD_WIDTH==128 || LCD_HEIGHT==128) 559 + #elif SMALLER_DIMENSION <= 112 560 + sliding_puzzle.110x110x16.bmp 561 + #elif SMALLER_DIMENSION <= 128 553 562 sliding_puzzle.128x128x16.bmp 554 - #elif (LCD_WIDTH==176 || LCD_HEIGHT==176) 563 + #elif SMALLER_DIMENSION <= 132 564 + sliding_puzzle.132x132x16.bmp 565 + #elif SMALLER_DIMENSION <= 176 555 566 sliding_puzzle.176x176x16.bmp 556 - #elif (LCD_WIDTH==240 || LCD_HEIGHT==240) 567 + #elif SMALLER_DIMENSION <= 240 557 568 sliding_puzzle.240x240x16.bmp 558 569 #endif 559 - #elif (LCD_DEPTH>1) 560 - #if (LCD_WIDTH==110 || LCD_HEIGHT==110) 570 + #elif (LCD_DEPTH > 1) 571 + #if SMALLER_DIMENSION <= 110 561 572 sliding_puzzle.110x110x2.bmp 562 - #elif (LCD_WIDTH==128 || LCD_HEIGHT==128) 573 + #elif SMALLER_DIMENSION <= 128 563 574 sliding_puzzle.128x128x2.bmp 564 575 #endif 565 - #elif (LCD_WIDTH>=80 && LCD_HEIGHT==64) 576 + #else /* mono targets, one size currently */ 566 577 sliding_puzzle.80x64x1.bmp 567 578 #endif 568 579
apps/plugins/bitmaps/native/sliding_puzzle.110x110x16.bmp

This is a binary file and will not be displayed.

apps/plugins/bitmaps/native/sliding_puzzle.132x132x16.bmp

This is a binary file and will not be displayed.

+11 -13
apps/plugins/sliding_puzzle.c
··· 95 95 96 96 #endif 97 97 98 + 99 + #include "sliding_puzzle.h" 100 + #define IMAGE_WIDTH BMPWIDTH_sliding_puzzle 101 + #define IMAGE_HEIGHT BMPHEIGHT_sliding_puzzle 102 + #define IMAGE_SIZE IMAGE_WIDTH 103 + 98 104 static struct plugin_api* rb; 99 105 #if LCD_DEPTH==1 100 - /* for recorder, use rectangular image, 5x4 puzzle */ 106 + /* for Archos, use rectangular image, 5x4 puzzle */ 101 107 #define SPOTS_X 5 102 108 #define SPOTS_Y 4 103 - #define SPOTS_WIDTH 16 104 - #define SPOTS_HEIGHT 16 105 - #define IMAGE_WIDTH 80 106 - #define IMAGE_HEIGHT 64 107 - #define IMAGE_SIZE 80 108 109 #else 109 110 /* for other targets, use a square image, 4x4 puzzle 110 111 Puzzle image dimension is min(lcd_height,lcd_width) ··· 113 114 and SPOTS_Y, otherwise lcd_bitmap_part stride won't be correct */ 114 115 #define SPOTS_X 4 115 116 #define SPOTS_Y 4 116 - #define IMAGE_SIZE ( (LCD_WIDTH<LCD_HEIGHT)?LCD_WIDTH:LCD_HEIGHT ) 117 - #define IMAGE_WIDTH IMAGE_SIZE 118 - #define IMAGE_HEIGHT IMAGE_SIZE 119 - #define SPOTS_WIDTH (IMAGE_WIDTH/SPOTS_X) 120 - #define SPOTS_HEIGHT (IMAGE_HEIGHT/SPOTS_Y) 121 117 #endif 122 118 123 - #define NUM_SPOTS (SPOTS_X*SPOTS_Y) 124 - #define HOLE_ID (NUM_SPOTS) 119 + #define SPOTS_WIDTH (IMAGE_WIDTH / SPOTS_X) 120 + #define SPOTS_HEIGHT (IMAGE_HEIGHT / SPOTS_Y) 121 + #define NUM_SPOTS (SPOTS_X*SPOTS_Y) 122 + #define HOLE_ID (NUM_SPOTS) 125 123 #define INITIAL_HOLE (HOLE_ID-1) 126 124 127 125 enum picmodes