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

GRAPHICS: Implement horizontal triangles #3178

Merged
merged 1 commit into from Jul 27, 2021

Conversation

@lephilousophe
Copy link
Member

@lephilousophe lephilousophe commented Jul 20, 2021

Everything is in the title.

Simplify drawTriangle in the same time and fix a bad copy paste when
drawing outline with w == h

@lephilousophe lephilousophe requested a review from sev- Jul 20, 2021
@lephilousophe
Copy link
Member Author

@lephilousophe lephilousophe commented Jul 20, 2021

Forgot to add that I copy pasted from vertical code and changed x by y and so on everywhere.
Some variable names seem bogus to me but they are in the vertical case too so I decided to keep the same logic.

@Thunderforge
Copy link
Contributor

@Thunderforge Thunderforge commented Jul 20, 2021

Is there some reason we need to draw triangles instead of just using ► or (unicode characters U+25BA and U+25B6 respectively)? They are supposed to be rendered as black triangles (GitHub seems to substitute the latter with an emoji).

@criezy
Copy link
Member

@criezy criezy commented Jul 20, 2021

Is there some reason we need to draw triangles instead of just using ► or (unicode characters U+25BA and U+25B6 respectively), which are supposed to be rendered as black triangles (GitHub seems to substitute them with emojis instead).

I can see a few possible reasons, but one of them is that ScummVM can be compiled without freetype support and use BDF fonts, which will not have these characters (and also would not scale well even if they had them).

@lephilousophe
Copy link
Member Author

@lephilousophe lephilousophe commented Jul 21, 2021

The drawTriangle primitive is more flexible than the Unicode glyphs, you can set the width and height independently. That may be used by some themes out there.

Simplify drawTriangle in the same time and fix a bad copy paste when
drawing outline with w == h
@lephilousophe lephilousophe force-pushed the lephilousophe:implement-horz-triangle branch from 48b1940 to f50eaea Jul 21, 2021
@lephilousophe
Copy link
Member Author

@lephilousophe lephilousophe commented Jul 21, 2021

Just fixed Codacy issue

av-dx added a commit to av-dx/scummvm that referenced this pull request Jul 21, 2021
This will be replaced with triangle drawing when scummvm#3178 is merged.
av-dx added a commit to av-dx/scummvm that referenced this pull request Jul 21, 2021
This will be replaced with triangle drawing when scummvm#3178 is merged.
@sev-
Copy link
Member

@sev- sev- commented Jul 27, 2021

Thank you!

@sev- sev- merged commit 585b112 into scummvm:master Jul 27, 2021
5 of 8 checks passed
5 of 8 checks passed
@github-actions
Windows (win32, x86-windows, x86, --enable-faad --enable-mpeg2 --enable-discord --disable-fribidi... Windows (win32, x86-windows, x86, --enable-faad --enable-mpeg2 --enable-discord --disable-fribidi...
Details
@github-actions
Windows (x64, x64, x64-windows, --enable-faad --enable-mpeg2 --enable-discord --disable-fribidi, ... Windows (x64, x64, x64-windows, --enable-faad --enable-mpeg2 --enable-discord --disable-fribidi, ...
Details
@github-actions
Windows (arm64, arm64, arm64-windows, --enable-faad --enable-mpeg2 --enable-discord --disable-fri... Windows (arm64, arm64, arm64-windows, --enable-faad --enable-mpeg2 --enable-discord --disable-fri...
Details
@github-actions
Xcode (macosx, -scheme ScummVM-macOS, --disable-nasm --enable-faad --enable-mpeg2, a52dec faad2 f...
Details
@github-actions
Xcode (ios7, -scheme ScummVM-iOS CODE_SIGN_IDENTITY="" CODE_SIGNING_ALLOWED=NO, --disable-nasm --...
Details
@github-actions
Ubuntu (ubuntu-latest, sdl2-config, --enable-c++11, libsdl2-dev libsdl2-net-dev liba52-dev libjpe...
Details
@github-actions
Ubuntu (ubuntu-18.04, sdl-config, --disable-c++11, libsdl1.2-dev libsdl-net1.2-dev liba52-dev lib...
Details
@codacy-production
Codacy Static Code Analysis Codacy Static Code Analysis
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants