Events and Puppets

Events and Puppets

hi there, another week working on ScummVM. I’ve finished final exam this wednesday. Thus, i’m managed to working on ScummVM for nearly a week.

A not that happy message is we’ve started summer term just from today, which may get me distracted. But i will still put my center of gravity on ScummVM. Because working here makes me comfortable and happy.

OK, time for a summary for past week. I’ve finished fixing user events, and almost done with puppets.

A very interesting thing is i’ve re-organize the logic of rendering mactext and macbutton. And that helps me eliminate a lot of magic offsets. The code for those part has become more clean and more readable now.

Also, i’ve just implement auto expanding for mactext. And while sev gives me D3 studio manual, i’ve surprisingly found the precise definition for highlight sprites (which have confused me a long time) and when should we use auto expand for mactext or fix the size. Those studio manual really helps a lot for finding the correct way of rendering director.

At the meanwhile, i’ve fixed some builtin function with the help of apartment. This demo movie which covered most of the situations helps us go to the right path for reappearance the director. I’ve changed some of the current components. Modifying their behaviour to suit for apartment. This approach also helps me fix text in warlock magically, which really surprised me a lot at that time. That’s what sev said ” the beauty of it”. Yes, i can feel it.

The most work i’ve worked on is rendering sprites. I’ve write a function to determine whether a widget should be keep or not. This would help us solve problems like keeping creating widgets.

Since i’ve modified saving sprites value instead saving pointer in channel. This helps us keep the original sprites safety, and also let us get rid of restore the sprite properities when we don’t use it.

I’ve also found an interesting thing, when we use dialog box in lingo, the events will not pass to wm correctly. (i think it was handled by dialog box) thus, i’ve come up with an temporary solution, i’ve pass a LBUTTONUP event to wm. And that will let wm release those events we have triggered before. e.g. holding a button. Thus we can handle events correctly while we are using b_alert. And as i mentioned above, that is a temporary solution, and we need to find a better approach to release macwidgets from those events.

I’ve fixed color setting in lingo, and enhance mactext for bringing partial color setting. check this 20210628222805

Yesterday, i’ve checked the matte with quick draw shape. But at last i noticed that QDshape doesn’t need matte. We just regard it as the normal type and use bounding box to check interestion and within, that’s fine. Also, while fixing that, i’ve a 1 pixel offset while we calculating the constrain box, and fixing that brings the maze working again. YAY

I think that should be all. And yesterday, sev have gave me the permission to commit directly to repo, which really surprised me a lot. With this responsibility, i should write more codes, more clean, effective and readable codes. I will put more efforts on it.

See you next week.

Leave a comment

Your email address will not be published. Required fields are marked *