![]() |
#31 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 142
Karma: 669192
Join Date: Nov 2013
Device: Kindle 4.1.1 no touch
|
You are right. pbres does not work
![]() Code:
root@5f2a011857ca:/project# make LC_ALL=C /pocketbook-sdk/SDK_481/bin/pbres -c ./icons/icons.c -4 icons/app_icons/icon_type_tap.bmp icons/app_icons/icon_home.bmp icons/app_icons/icon_menu_tap.bmp icons/app_icons/ic_star.bmp icons/app_icons/icon_settings.bmp icons/app_icons/icon_back_tap.bmp icons/app_icons/icon_redraw.bmp icons/app_icons/icon_game.bmp icons/app_icons/icon_type.bmp icons/app_icons/icon_menu.bmp icons/app_icons/icon_home_tap.bmp icons/app_icons/icon_back.bmp icons/app_icons/icon_redraw_tap.bmp icons/app_icons/icon_settings_tap.bmp icons/app_icons/icon_game_tap.bmp icons/game_icons/game_mathrax.bmp icons/game_icons/game_sokoban.bmp icons/game_icons/game_lightup.bmp icons/game_icons/game_clusters.bmp icons/game_icons/game_spokes.bmp icons/game_icons/game_group.bmp icons/game_icons/game_tents.bmp icons/game_icons/game_loopy.bmp icons/game_icons/game_galaxies.bmp icons/game_icons/game_cube.bmp icons/game_icons/game_netslide.bmp icons/game_icons/game_mines.bmp icons/game_icons/game_creek.bmp icons/game_icons/game_range.bmp icons/game_icons/game_rome.bmp icons/game_icons/game_samegame.bmp icons/game_icons/game_unruly.bmp icons/game_icons/game_magnets.bmp icons/game_icons/game_twiddle.bmp icons/game_icons/game_dominosa.bmp icons/game_icons/game_sticks.bmp icons/game_icons/game_inertia.bmp icons/game_icons/game_unequal.bmp icons/game_icons/game_filling.bmp icons/game_icons/game_map.bmp icons/game_icons/game_slant.bmp icons/game_icons/game_flood.bmp icons/game_icons/game_pearl.bmp icons/game_icons/game_pattern.bmp icons/game_icons/game_flip.bmp icons/game_icons/game_untangle.bmp icons/game_icons/game_mosaic.bmp icons/game_icons/game_guess.bmp icons/game_icons/game_slide.bmp icons/game_icons/game_singles.bmp icons/game_icons/game_ascent.bmp icons/game_icons/game_bridges.bmp icons/game_icons/game_keen.bmp icons/game_icons/game_undead.bmp icons/game_icons/game_sixteen.bmp icons/game_icons/game_pegs.bmp icons/game_icons/game_rect.bmp icons/game_icons/game_net.bmp icons/game_icons/game_walls.bmp icons/game_icons/game_signpost.bmp icons/game_icons/game_towers.bmp icons/game_icons/game_boats.bmp icons/game_icons/game_blackbox.bmp icons/game_icons/game_tracks.bmp icons/game_icons/game_solo.bmp icons/game_icons/game_abcd.bmp icons/game_icons/game_fifteen.bmp icons/game_icons/game_salad.bmp icons/game_icons/game_palisade.bmp icons/configuration/cfg_decr.bmp icons/configuration/cfg_difficulty.bmp icons/configuration/cfg_no.bmp icons/configuration/cfg_incr.bmp icons/configuration/cfg_decr_tap.bmp icons/configuration/cfg_on.bmp icons/configuration/cfg_yes.bmp icons/configuration/cfg_off.bmp icons/configuration/cfg_incr_tap.bmp icons/menu_icons/menu_exit.bmp icons/menu_icons/menu_help.bmp icons/menu_icons/menu_new.bmp icons/menu_icons/menu_solve.bmp icons/menu_icons/menu_star.bmp icons/menu_icons/menu_restart.bmp icons/menu_icons/menu_settings.bmp icons/menu_icons/menu_reset.bmp icons/controls/bt_net_shuffle.bmp icons/controls/bt_swap.bmp icons/controls/bt_salad_o.bmp icons/controls/bt_guess_i.bmp icons/controls/bt_remove.bmp icons/controls/bt_map_j.bmp icons/controls/bt_west.bmp icons/controls/bt_map_c.bmp icons/controls/bt_undo_d.bmp icons/controls/bt_south.bmp icons/controls/bt_page.bmp icons/controls/bt_bridges_g.bmp icons/controls/bt_undead_g.bmp icons/controls/bt_add.bmp icons/controls/bt_redo.bmp icons/controls/bt_redo_d.bmp icons/controls/bt_fill_map.bmp icons/controls/bt_fill_marks.bmp icons/controls/bt_undo.bmp icons/controls/bt_salad_x.bmp icons/controls/bt_fill_nums.bmp icons/controls/bt_undead_z.bmp icons/controls/bt_east.bmp icons/controls/bt_north.bmp icons/controls/bt_fill_rome.bmp icons/controls/bt_backspace.bmp icons/controls/bt_undead_v.bmp icons/controls/bt_page_select.bmp Error: canot stat icons/app_icons/icon_type_tap.bmp make: *** [Makefile:34: icons/icons.c] Error 1 Code:
root@5ddc376448f1:/project# ls -al icons/app_icons/icon_type_tap.bmp -rw-r--r-- 1 root root 10362 Oct 6 11:17 icons/app_icons/icon_type_tap.bmp Unfortunately an "empty" icons.c is created, when pbres was run. Code:
typedef struct ibitmap_s { short width; short height; short depth; short scanline; unsigned char data[]; } ibitmap; My Dockerfile can be found here: https://github.com/Skeeve/PocketPuzz...ure/Dockerfile The call I use, as long as I'm experimenting is: Code:
docker build -t pbdev . docker run --rm -it --mount type=bind,source="$(pwd)",target=/project pbdev |
![]() |
![]() |
![]() |
#32 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 142
Karma: 669192
Join Date: Nov 2013
Device: Kindle 4.1.1 no touch
|
FYI: I tried the 5.19 SDK and there pbres works. But I have to get the rest of it running.
|
![]() |
![]() |
Advert | |
|
![]() |
#33 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 142
Karma: 669192
Join Date: Nov 2013
Device: Kindle 4.1.1 no touch
|
SUCCESS!
I got it to compile with my latest update, using the 6.3 (5.19) SDK mentioned by @rkomar. It's "hacky" as I didn't bother to create a proper cmake file, thus using the cmake toolchain file provided by the SDK. I did just one small change to your makefile in order to include freetype2. Please see the adjusted README for details. |
![]() |
![]() |
![]() |
#34 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 142
Karma: 669192
Join Date: Nov 2013
Device: Kindle 4.1.1 no touch
|
I also now copied the compiled program to my HD3 and it worked.
|
![]() |
![]() |
![]() |
#35 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 50
Karma: 66200
Join Date: Oct 2020
Location: Germany, Rhein-Main
Device: PocketBook Touch HD 3
|
|
![]() |
![]() |
Advert | |
|
![]() |
#36 |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 50
Karma: 66200
Join Date: Oct 2020
Location: Germany, Rhein-Main
Device: PocketBook Touch HD 3
|
@Skeeve: How to implement automatic cell highlight switching
@Skeeve,
As mentioned in the main thread, here a sketch what needs to be done to implement your proposed improvement to the app. I assume you never contributed to the original SGT puzzle collection, so I need to explain some details how the API works. a) You need to add a new control code for the event "short/long swap key changed", in "puzzles.h" at the enum from line 29 on, either after CURSOR_SELECT2, or after UI_UPPER_BOUND. b) At line 564 in frontend/game.c you call "midend_process_key(me, 0, 0, UI_SWAPCHANGE, fe->swapped);" to pass the swap change event to the "midend" (which is the software layer between the frontend and the individual game, its purpose is to manage things like the undo/redo list and a lot of other service functions) c) The midend will call "interpret_move" in the game file with this control code; in Solo this is at line 4009. The interpret_move function will receive the raw input, either pixel coordinates when the game area was clicked, or control/button codes when a button was clicked. There you need to catch the swap change, and adjust the current highlight mode in the "game_ui *ui" struct. After adjusting the highlight mode, return from interpret_move with the return value UI_UPDATE. The function docs for interpret_move is found here: https://www.chiark.greenend.org.uk/~...interpret-move I would return with UI_UPDATE in your case, as the UI needs to be updated, but the switch between full / pencil mark highlight mode is not worth to be included in the undo/redo list. For further information, the original SGT project development documentation is here: https://www.chiark.greenend.org.uk/~...puzzles/devel/ Happy coding! |
![]() |
![]() |
![]() |
#37 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 142
Karma: 669192
Join Date: Nov 2013
Device: Kindle 4.1.1 no touch
|
|
![]() |
![]() |
![]() |
#38 | |
Connoisseur
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 50
Karma: 66200
Join Date: Oct 2020
Location: Germany, Rhein-Main
Device: PocketBook Touch HD 3
|
Quote:
![]() I think a pull request won't be necessary here. It would be more work for the official app release, anyway, as this change affects more puzzles, not only Solo. For the official release, I would integrate it in any game which uses this 'fully selected / pencil mark selected' mode of operation. This is something that I will do. |
|
![]() |
![]() |
![]() |
#39 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 142
Karma: 669192
Join Date: Nov 2013
Device: Kindle 4.1.1 no touch
|
Fair enough. Interested in the dockerfile? Or in the CMakeList stuff I'm working on?
|
![]() |
![]() |
![]() |
#40 |
Zealot
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 142
Karma: 669192
Join Date: Nov 2013
Device: Kindle 4.1.1 no touch
|
I change my proposal.
As you might have seen, I created a "universal" SDK Container. So no need to include a Dockerfile. I just opened a PR for adding a CMakeLists.txt to your repo, a small extension in .gitignore to ignore the "build" directory and a new paragraph in Readme to explain how to compile using docker. |
![]() |
![]() |
![]() |
Tags |
app, programming, puzzles, sgt puzzles |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Simon Tatham's portable puzzle collection? | Biep | Kobo Developer's Corner | 3 | 08-26-2024 04:22 AM |
Introducing Sgt. Steve | Sgt Steve | Introduce Yourself | 2 | 03-14-2013 05:32 PM |