KEMBAR78
DIRECTOR: Add support for "set picture of cast" and "get picture of cast" by somaen · Pull Request #4843 · scummvm/scummvm · GitHub
Skip to content

Conversation

@somaen
Copy link
Member

@somaen somaen commented Mar 25, 2023

This does a refactor of how BitmapCastMember deals with it's picture, so that we can get/set the picture. In particular we now pass around copies, so that we can ensure that if we set a global to the picture of some cast member, the picture survives the cast member from which it came.

@somaen somaen requested review from rvanlaar and sev- March 25, 2023 06:52
@somaen somaen force-pushed the director_picture branch 2 times, most recently from 2784e17 to aa55db0 Compare March 25, 2023 08:54
Copy link
Member

@sev- sev- left a comment

Choose a reason for hiding this comment

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

Nice. I put a couple of minor notes. Also, please add a test for comparison to tests/equality.lingo something like

set a to the picture of cast 1
scummvmAssert(a <> the picture of cast 1)   -- always false

somaen added 2 commits March 25, 2023 23:04
…oder

This is in preparation for allowing for Lingo to get/set the picture
of BitmapCastMember.

In particular, storing a Picture lets us easily replace the existing
image (instead of having to rely on ImageDecoder as source).

Also, having Picture instances that are easy to copy will make lifetime
management easier if pictures are copied into longer-living things such
as globals.
@somaen somaen force-pushed the director_picture branch from 6ecf6a9 to 97a1327 Compare March 25, 2023 22:27
@somaen somaen merged commit 12289a9 into scummvm:master Mar 26, 2023
@somaen somaen deleted the director_picture branch March 26, 2023 17:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants