[Scummvm-git-logs] scummvm master -> f40c43548f3a6f992831f13a7fb8050251082b30
sev-
noreply at scummvm.org
Mon Mar 21 10:47:40 UTC 2022
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
f40c43548f DIRECTOR: LINGO: Copied RearWindow XObj documentation
Commit: f40c43548f3a6f992831f13a7fb8050251082b30
https://github.com/scummvm/scummvm/commit/f40c43548f3a6f992831f13a7fb8050251082b30
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2022-03-21T11:46:54+01:00
Commit Message:
DIRECTOR: LINGO: Copied RearWindow XObj documentation
Changed paths:
engines/director/lingo/xlibs/winxobj.cpp
diff --git a/engines/director/lingo/xlibs/winxobj.cpp b/engines/director/lingo/xlibs/winxobj.cpp
index 71bf2166ee3..1f09582edb2 100644
--- a/engines/director/lingo/xlibs/winxobj.cpp
+++ b/engines/director/lingo/xlibs/winxobj.cpp
@@ -45,6 +45,184 @@ const char *RearWindowXObj::fileNames[] = {
nullptr
};
+/*
+-- RearWindow.XObj by David Jackson-Shields
+-- vers. 1.0.2 (10/11/93)
+-- © 1992-93 by David Jackson-Shields
+-- All Rights Reserved.
+--
+-- Includes code from the XObject Developers Kit
+-- © 1989-93 by Macromedia Inc.
+--
+-- Purpose of the XObject:
+-- Covers the the Finder desktop (behind the Director Stage) with a window
+-- containing either a 1-bit pattern, indexed color, direct (RGB) color,
+-- bitmapped castMember, or PICT file picture.
+--
+-- This XObject is for when the Stage size is be smaller than the monitor screen,
+-- for covering the Finder Desktop behind the Stage. It requires system 6.0.5
+-- or later with Director 3.0 or later. It also provides utility methods for
+-- getting the monitor screen size (top, left, bottom, right). In cases where
+-- there are multiple monitors, these utility methods return a Rect which contains
+-- the minimum bounding rect which contains all monitors. Another utility method
+-- returns the name of the current application. Subsequent methods create the Rear
+-- Window and fill it with the appropriate color, 1-bit pattern, or image.
+--
+-- NOTE: When using ResEdit to install this XObject in the resource fork of
+-- the movie or projector, be sure to copy the RearWindow WDEF resource as well.
+-- This custom Window Definition Procedure prevents accidental clicks on the
+-- the RearWindow from bringing it forward, obscuring the Director Stage.
+--
+IS mNew -- creates the object in RAM. It only takes one argument.
+-- (1) The argument specifies multiple or single screen devices to be covered.
+-- Use either "M" for multiple, or "S" for single monitor coverage.
+-- If you only have only one monitor, you can still use an "M" argument. In fact,
+-- the only time a Single-Monitor would be specified would be if you expect a
+-- low-memory situation, where the RearWindow plus the size of cast or PICT
+-- image would take up more than the largest available freeBlock of memory.
+--
+-- The mNew method returns system error codes (if any)..otherwise it returns
+-- the object handle (a memory address)...like all other XObjects.
+-- Example of Lingo syntax:
+-- global myObj
+-- if objectP( myObj ) then myObj( mDispose )
+-- -- [ "M" indicates multiple monitors.]
+-- set myObj= RearWindow( mNew, "M" )
+-- set resultCode = value( myObj )
+-- if resultCode < 0 then
+-- alert "System Error trying to create the RearWindow" && string( resultCode )
+-- end if
+--
+S mGetAppName -- returns name of current application, so you can test for either
+-- "Macromedia Director 3.x", "MacroMind Player 3.x", or the name of your projector.
+-- Example of Lingo syntax:
+-- global myObj
+-- if objectP( myObj ) then
+-- put myObj( mGetAppName ) into returnStr
+-- end if
+--
+I mGetMemoryNeeded -- Returns number of Bytes needed to create a RearWindow
+-- for all screen devices. Compare this with the Lingo function 'the freeBlock'.
+-- If the the mNew method specified "Single" monitor configuration, then
+-- this refers to the number of Bytes for only one monitor. See the
+-- RearWindow Example Movie for how to use this with Lingo
+--
+-- Example of Lingo syntax:
+-- global myObj
+-- set memNeeded = myObj( mGetMemoryNeeded )
+--
+I mGetScreenTop -- Returns "top" pixel coordinate for all screens
+-- (refers to minimum rect surrounding multiple monitors)
+--
+-- Example of Lingo syntax:
+-- global myObj
+-- set theScreenTop = myObj( mGetScreenTop )
+--
+I mGetScreenLeft -- Returns "left" pixel coordinate of all screen areas
+-- (refers to minimum rect surrounding multiple monitors)
+--
+-- Example of Lingo syntax:
+-- global myObj
+-- set theScreenLeft = myObj( mGetScreenLeft )
+--
+I mGetScreenBottom -- Returns "bottom" pixel coordinate of all screen areas
+-- (refers to minimum rect surrounding multiple monitors)
+--
+-- Example of Lingo syntax:
+-- global myObj
+-- set theScreenBottom = myObj( mGetScreenBottom )
+--
+I mGetScreenRight -- Returns "right" pixel coordinate of all screen areas
+-- (refers to minimum rect surrounding multiple monitors)
+--
+-- Example of Lingo syntax:
+-- global myObj
+-- set theScreenRight = myObj( mGetScreenRight )
+--
+II mPatToWindow -- Fills the window behind the Director stage with a particular
+-- one-bit QuickDraw pattern, or the Finder desktop pattern. Returns a resultCode
+--
+-- Example of Lingo syntax:
+-- global myObj
+-- set resultCode = myObj( mPatToWindow, -1 ) -- fills with a white pattern
+-- set resultCode = myObj( mPatToWindow, -2 ) -- fills with a light gray pattern
+-- set resultCode = myObj( mPatToWindow, -3 ) -- fills with a middle gray pattern
+-- set resultCode = myObj( mPatToWindow, -4 ) -- fills with a dark gray pattern
+-- set resultCode = myObj( mPatToWindow, -5 ) -- fills with a black pattern
+-- set resultCode = myObj( mPatToWindow, -99 ) -- any other negative number fills with
+-- --the Finder desktop pattern (whether color or black & white)
+--
+II mIndexColorToWindow -- In 256-color Monitor mode or less, fills the RearWindow
+-- with a specified index color from the current palette. Returns resultCode
+--
+-- Example of Lingo syntax:
+-- global myObj
+-- --(int is an integer from 0 to 255:)
+-- set resultCode = myObj( mIndexColorToWindow, int ) -- fills with an index color
+--
+-- NOTE: In direct-color display modes such as âthousandsâ or âmillionsâ, using the
+-- mIndexColorToWindow method will work, but produce unpredictable colors. In modes
+-- lower than 256-colors, integers higher than the highest palette index will yield black.
+--
+IIII mRGBColorToWindow -- Fills the window behind the Director stage with a specified
+-- RGB color. In 256-color Monitor mode or less, it produces the closest color in the
+-- current indexed palette. Returns a resultCode
+--
+-- Example of Lingo syntax:
+-- global myObj
+-- --(red, green and blue are integers from 0 to 65535:)
+-- set resultCode = myObj( mRGBColorToWindow, red, green, blue ) -- fills with an
+-- --RGB color or its closest equivalent in indexed palette modes
+--
+ISII mPICTToWindow -- Displays a PICT file in the window behind the Director stage
+-- There are 3 arguments:
+-- (1) the pathName and fileName -- a string
+-- (2) the image placement code -- an integer:
+-- Ã = stretched across each monitor screen
+-- -1 = positioned in the upper-left of each monitor screen (no stretch)
+-- 1 = centered within each monitor screen (no stretch)
+-- (3) the background pattern (if any) -- an integer, same as mIndexToWindow
+-- Returns a resultCode
+--
+-- Example of Lingo syntax:
+-- global myObj
+-- -- to find a file in the same folder as the movie, specify the pathName & «fileName»
+-- -- otherwise, specify the full pathName beginning with the volume
+-- set fileName = the pathName & "bkPictFile"
+-- set resultCode = myObj( mPICTToWindow, fileName, -1, 112 )
+--
+IPII mCastToWindow -- Displays a movie castMember in the window behind the Stage
+-- There are 3 arguments:
+-- (1) the picture of a castMember
+-- (2) the image placement code -- an integer:
+-- Ã = stretched across each monitor screen
+-- -1 = positioned in the upper-left of each monitor screen (no stretch)
+-- 1 = centered within each monitor screen (no stretch)
+-- (3) the background pattern (if any) -- an integer, same as mIndexToWindow
+-- Returns resultCode
+--
+-- Example of Lingo syntax:
+-- global myObj
+-- set myPic = the picture of cast "bkPict"
+-- set resultCode = myObj( mCastToWindow, myPic, 0, 0 )
+--
+X mDispose -- closes the RearWindow, releases its data, and the XObject itself from RAM
+--
+-- Example of Lingo syntax:
+-- global myObj
+-- if objectP( myObj ) then myObj( mDispose )
+--
+/X mIdle
+/XI mActivate, flag
+/X mUpdate
+/XII mMouseUp, eventRecPtr, mdcode
+/XII mMouseDown, eventRecPtr, mdcode
+/XI mKeyDown, theChar
+/I mMakeWindow
+/I mInitDeviceArray
+/I mDevPixMapToWindow
+*/
+
static MethodProto xlibMethods[] = {
{ "new", RearWindowXObj::m_new, 1, 1, 400 }, // D4
{ "GetMemoryNeeded", RearWindowXObj::m_getMemoryNeeded, 0, 0, 400 }, // D4
More information about the Scummvm-git-logs
mailing list