Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add proper icons for screen scrolling speed #6957

Draft
wants to merge 14 commits into
base: master
Choose a base branch
from
Draft

Conversation

ihhub
Copy link
Owner

@ihhub ihhub commented Apr 7, 2023

close #6552

all credits go to @golden-lining

image

Also fixed missing palette loading in h2dmgr tool.

@ihhub ihhub added improvement New feature, request or improvement ui UI/GUI related stuff labels Apr 7, 2023
@ihhub ihhub added this to the 1.0.3 milestone Apr 7, 2023
@ihhub ihhub self-assigned this Apr 7, 2023
Copy link
Collaborator

@Districh-ru Districh-ru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work, @golden-lining!

The only suggestion (maybe for the next PR) is to add the Evil Interface icons. As when we change the interface type to Evil the "Interface" icon (the center one) changes to the Evil style and the Scroll icon starts to get out of the style of the settings window.
изображение

Something like this:
изображение

@oleg-derevenetz
Copy link
Collaborator

oleg-derevenetz commented Apr 7, 2023

Hi @ihhub in fact, we don't need a palette for the extract command because it extracts all files from H2D bundle as-is, no conversion to BMP or PNG is performed as of now. We only need it for the combine command, because it offers a special handling for input images. Also I moved the palette_file.pal argument after the target_file.h2d to match other image processing tools in this regard (icn2img and til2img). Please take a look.

@oleg-derevenetz
Copy link
Collaborator

oleg-derevenetz commented Apr 7, 2023

Hi @ihhub I'm trying to implement image conversion on extraction for the h2dmgr tool and faced the following interesting issue. I'm extracting resurrection.h2d like this:

> h2dmgr.exe extract H2D kb.pal resurrection.h2d
Processing resurrection.h2d...
Total extracted items: 11

H2D/resurrection/scroll_icon_0.png looks like this:

scroll_icon_0

So far so good. Now let's try to do the following:

> h2dmgr.exe combine test.h2d kb.pal H2D\resurrection\*
Processing H2D\resurrection\barbarian_castle_captain_quarter_left_side.png...
Processing H2D\resurrection\graphics_icon.png...
Processing H2D\resurrection\hotkeys_icon.png...
Processing H2D\resurrection\knight_castle_left_farm.png...
Processing H2D\resurrection\petrification_spell_icon.png...
Processing H2D\resurrection\petrification_spell_icon_mini.png...
Processing H2D\resurrection\scroll_icon_0.png...
Processing H2D\resurrection\scroll_icon_1.png...
Processing H2D\resurrection\scroll_icon_2.png...
Processing H2D\resurrection\scroll_icon_3.png...
Processing H2D\resurrection\sorceress_castle_captain_quarter_left_side.png...
Total added items: 11

> h2dmgr.exe extract H2D kb.pal test.h2d
Processing test.h2d...
Total extracted items: 11

And after that H2D/test/scroll_icon_0.png looks like this:

scroll_icon_0

It looks like red and blue colors have swapped places at some point, but I'm not quite understand when exactly. It is unlikely that this happens during extraction because it does not happen when extracting images from resurrection.h2d, so it looks like it happens during packing of images to test.h2d, but you somehow successfully packed the original file to the resurrection.h2d! Any thoughts?

P.S. It looks like this issue is observed only when PNG support is enabled (using SDL_image). This issue is not observed on builds without WITH_IMAGE. Looks like some SDL_image-specific issue which is not directly related to this PR.

P.P.S. After some thought I think that there may be an issue in fheroes2::Load(). We should check not just the SDL_PixelFormat::BytesPerPixel, but also SDL_PixelFormat::format, because there may be different formats with different order of colors and IMG_Load() is free to produce the surface in any of these formats. But this is not directly related to the current PR anyway.

@ihhub ihhub modified the milestones: 1.0.3, 1.0.4 Apr 9, 2023
@ihhub ihhub marked this pull request as draft April 9, 2023 08:18
@oleg-derevenetz
Copy link
Collaborator

oleg-derevenetz commented Apr 18, 2023

Hi @ihhub could you please take a look on my latest changes when you have time? They should resolve the issue with SDL_Surface color formats (they are reliably resolved only with SDL2, but tools are not used with SDL1 anyway).

@ihhub ihhub added this to the 1.0.5 milestone May 13, 2023
@ihhub ihhub modified the milestones: 1.0.5, 1.0.6 Jun 14, 2023
@ihhub
Copy link
Owner Author

ihhub commented Jun 17, 2023

Hi @oleg-derevenetz , is it possible for you if it's not difficult and not time consuming extract your changes from this pull request and create a new one since this PR is stalled due to required changes from an artist?

@oleg-derevenetz
Copy link
Collaborator

Hi @ihhub

is it possible for you if it's not difficult and not time consuming extract your changes from this pull request and create a new one since this PR is stalled due to required changes from an artist?

Yes, of course, extracted relevant changes to #7331.

@ihhub ihhub modified the milestones: 1.0.6, 1.0.7 Jul 15, 2023
@ihhub ihhub modified the milestones: 1.0.7, 1.0.8 Aug 14, 2023
@ihhub ihhub modified the milestones: 1.0.8, 1.0.9 Sep 11, 2023
@ihhub ihhub modified the milestones: 1.0.9, 1.1.0 Oct 11, 2023
@ihhub ihhub modified the milestones: 1.1.0, 1.1.1 May 22, 2024
@ihhub ihhub modified the milestones: 1.1.1, 1.1.2 Jul 13, 2024
@ihhub ihhub modified the milestones: 1.1.2, 1.1.3 Sep 15, 2024
@ihhub ihhub modified the milestones: 1.1.3, 1.1.4 Oct 23, 2024
@ihhub ihhub modified the milestones: 1.1.4, 1.1.5 Nov 27, 2024
@ihhub ihhub modified the milestones: 1.1.5, 1.1.6 Dec 30, 2024
@ihhub ihhub modified the milestones: 1.1.6, 1.1.7 Feb 16, 2025
@ihhub ihhub modified the milestones: 1.1.7, 1.1.8 Mar 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement New feature, request or improvement ui UI/GUI related stuff
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a new icon for Scroll speed setting
4 participants