It is currently 16 Apr 2024, 12:57
   
Text Size

[fixed] DrawSmallCardTitle vs full art frames

Moderators: BAgate, drool66, Aswan jaguar, gmzombie, stassy, CCGHQ Admins

[fixed] DrawSmallCardTitle vs full art frames

Postby Korath » 24 Jan 2022, 19:31

Describe the Bug:
When a card that normally has a classic frame, but whose art for a particular card_instance overrides it to either the FullArt or FullArtBar frames, has only its smallcard's title redrawn (with DrawSmallCardTitle()) instead of the whole card, it's placed where the classic frame expects it to be. Visually, it usually looks like a very badly misaligned text shadow. Easiest repro is to put permanents activateable at instant speed on the bf and advance to the next phase.
DrawSmallCardTitle.jpg
Here, the top Mana Crypt and Forest have FullArtBar frames, and the top Snow-Covered Mountain has a FullArt frame; classic-framed versions of each are below.

Which update are you using? (date, name)Which type? (duel, gauntlet, sealed deck)
dev 3202efdb6, from about a week ago.

What exactly should be the correct behavior/interaction?
The yellow this-card-is-activateable or orange this-card-has-a-pending-mandatory-trigger text should always be drawn in the same spot, whether just the title text or the whole card is being redrawn.

Are any other cards possibly affected by this bug?
Maybe with Planar Chaos planeshifted and very likely with Future Sight futureshifted frames. I didn't try to find cards with full art for either.

It doesn't happen with token copies of normally-nontoken cards, despite their title text also being placed differently. It sometimes does for tokens' effect cards (and maybe activation cards?), though not frequently enough that I've been able to pin down exactly what's happening.

Also - and this might be because I don't track card frame updates closely enough - the smallcard image for FullArtBar has a visibly too-tall aspect ratio; compare the fullcard for Mana Crypt. And the smallcard image for FullArt should probably show something around the middle of the image. Though I guess maybe not if there are any that aren't just lands.
Mana-Crypt-fullcard.jpg
Last edited by drool66 on 25 Jan 2022, 02:21, edited 1 time in total.
Reason: fixed
User avatar
Korath
DEVELOPER
 
Posts: 3707
Joined: 02 Jun 2013, 05:57
Has thanked: 496 times
Been thanked: 1106 times

Re: DrawSmallCardTitle vs full art frames

Postby drool66 » 25 Jan 2022, 02:21

Fixed the text issue in 6334364. I'd been trying to figure this out for over a year and just now found it after looking for like 5 minutes.

As for the art hmm... If if I remember correctly, and if you're saying what I think you're saying - the fullcard art is stretched from the top of the card, so minus the black border, but including and under the frame, whereas the smallcard art is stretched only from the top of the art frame. This is what is responsible for the offset between the top of the image in each case.

There are 83 old promos that use the FullArt frame - Bramblewood Paragon & Cryptic Command, for reference. If you look at say Island or Mountain (52), (53), or (90), I don't think you don't want to take from the middle of the image on those, though you do on all four basics at (89) and (100). idk if there's an elegant solution but I'm open to whatever you'd like to do.
User avatar
drool66
Programmer
 
Posts: 1163
Joined: 25 Nov 2010, 22:38
Has thanked: 186 times
Been thanked: 267 times

Re: [fixed] DrawSmallCardTitle vs full art frames

Postby Korath » 25 Jan 2022, 17:06

That doesn't fix it for me. I don't see how it could have.

I've found what the problem is in Shandalar, where I've fixed it in commit 430b712c9 - "normal" (non-effect, non-activation, non-trigger) cards don't ever get anything assigned to card_instance_t::display_pic_num, rather, the art number is computed every time in draw_smallcard_normal(). (It actually turns out to be impractical to do so; it needs to be updated whenever its controller or card index changes (which is rare, and easily tracked) and whenever its csvid does (which is not).)

This is easy to prove: put in a printf at the start of DrawSmallCardTitle() to look at what version is whenever card_title is some problematic card name like "Snow-Covered Forest", and another in DrawSmallCardEx() before the call to draw_smallcard_title_impl(). The former will almost always be 0, while the latter will be correct. Alternately, move a full-art jpg into the version 0 slot of an affected card; then it'll be the full-art version's title that displays correctly, while the normally-framed cards have displaced text.

In most cases, DrawSmallCardTitle() is called from the same function as DrawSmallCardEx(), so I can pass it the same value. The exception is wndproc_CardClass(msg=0x432), which needs extra logic to figure out whether to compute the version anew or to use whatever's in display_pic_num - the latter will be different, and correct, for activation and effect cards, which deliberately use the same value as their source card.

It's almost certainly the same problem in Manalink, but I haven't yet looked into how hard it is to fix there.
---
Wasn't hard. It didn't have the same problem as Shandalar in draw_smallcard_normal(), leaving only the title-only redraws in wndproc_CardClass(...0x432...). This was the last call of DrawSmallCardTitle to be moved out of Magic.exe; my suspicion that Manalink would be harder to fix was based on me misremembering that it still hadn't been. Fixed properly in bc9ad5002 20d8bfbd2.
Last edited by Korath on 27 Jan 2022, 14:50, edited 1 time in total.
User avatar
Korath
DEVELOPER
 
Posts: 3707
Joined: 02 Jun 2013, 05:57
Has thanked: 496 times
Been thanked: 1106 times

Re: [fixed] DrawSmallCardTitle vs full art frames

Postby Aswan jaguar » 27 Jan 2022, 13:27

Korath when I search for this commit bc9ad5002 git says not found.
---
Trying to squash some bugs and playtesting.
User avatar
Aswan jaguar
Super Tester Elite
 
Posts: 8078
Joined: 13 May 2010, 12:17
Has thanked: 730 times
Been thanked: 458 times


Return to Archived Reports

Who is online

Users browsing this forum: No registered users and 74 guests


Who is online

In total there are 74 users online :: 0 registered, 0 hidden and 74 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 74 guests

Login Form