[ scummvm-Patches-1709219 ] DXA Player: double size scaling option

SourceForge.net noreply at sourceforge.net
Sat Apr 28 14:54:14 CEST 2007


Patches item #1709219, was opened at 2007-04-28 12:54
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418822&aid=1709219&group_id=37116

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Robin Watts (robinwatts)
Assigned to: Nobody/Anonymous (nobody)
Summary: DXA Player: double size scaling option

Initial Comment:
This patch allows the DXA movie player to double the size of movies on playback where possible. In particular this is intended to allow the Broken Sword movies (normally 640x400) to be reencoded at 320x200 (the size appropriate for most WinCE devices screens) and yet to playback fullscreen.

[Normally, a 320x200 movie will be played back at 160x100 due to the half-scaling of the screen - doubling to 640x400 and then halving back to 320x200 is inelegant, but works.]

The patch works by offering an alternative loadMovie entry point in the dxa player. Normally loadMovie is called just with a filename and returns success/failure. The new entry point takes both the filename, and the maximum width/height.

This calls the original method to open the file, and if it succeeds, checks to see if the file can safely be scaled up and yet fit within the bounds of the screen give to it. The scale is restricted to either 1 or 2 currently, but could be extended in future if required.

If a scale of 2 is possible, a new buffer, to hold the scaled screen is allocated. If this cannot be allocated, then we drop back to the no scaling case.

The getWidth and getHeight methods new return the width/height multipled by the scale factor, so to all intents and purposes, the scaling operation is invisible to callers of this class.

The only change required of callers therefore is to pass in the 'expected' size of the screen. For Broken Sword 1, this is simply 640x480 - this code has been tested and found to work.

For Broken Sword 2 the screen appears to be centred based on _vm->_screen->getScreen{Wide,Deep}, so I use that information instead; this is untested as yet - I will add a comment here as soon as I manage to test this.

Finally, this routine appears also to be called by the 'agos' engine. I do not have an agos game to test, so can't verify this fix here.

In the absence of anyone being able to test the BS2 or agos alterations, this patch could easily go in without them, but I thought it better to supply them here than to omit them.

Robin


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418822&aid=1709219&group_id=37116




More information about the Scummvm-tracker mailing list