Home Page · Up 1 Level · Site Map · Send Us Mail · ICDIA Main



Supplement for: Course Map

Overview:

Course Map provides a method to track sections of a title that a user has been in. It does this by keeping track of which hotspots have been clicked on (actually keeps track of the "branch to" elements of the hotspots clicked). Optionally, when the menu is presented, the plugin can blitt a small picture into the Foreground picture at the hotspot(s) location, indicating that the section has already been played.

Blitting is where a small picture (called a partial) is superimposed INTO another picture, somewhat like pasting a picture of someones face over the face of another in a group picture.


Plug-ins required for operation:

cdi_sv - creates string variables that can be used in MediaMogul applications.
cdi_stri - records a name into a string variable.
cdi_cmap - compares "branch to" info for hotspots on the screen, the contents of the stored variable, then extracts partial pictures a "mapped" picture and blitts them onto the foreground picture in the appropriate hotspot areas.
MediaMogul utilities required to prepare assets:

NONE

Assets to create before using plug-in:






Note: because partial pictures are extracted and placed on the Foreground picture, the Map Picture and the Foreground Picture MUST have an identical CLUT table -- same colors and ordering.


Special preparations:

No additional preparation required.

How plug-in works:

· You must start up the string variable plugin, cdi_sv, and reserve sufficient string space to store the appended length of all hotspot "branch to" filenames you intend to track. In our example, I would have to reserve at LEAST 32 characters. That is, 7 characters for the name itself (like chap1.s) and one character for the colon separating the name. There are four names, so 4 x 8 = 32 characters. I would suggest rounding up to the nearest multiple of 25 (in this case, 50 characters).

· At the front of each script you wish to track, place a Call to cdi_stri, and include the name of the script itself (like chap1.s) and the string variable you chose earlier (like S0). cdi_stri stores that name in the variable. several variables can be used to store selection information for different sections of a title. Later in the title the stored name(s) can be compared to the hotspot names currently on the screen, and then be used to blitt partial pictures to the screen. An example of how the string is stored:

· When the menu is to be presented, showing the user which sections have already been played, the following items need to be scripted:

- Call cdi_cmap; you provide the variable to compare with (like S0) and the separator character used (:).


· cdi_cmap then compares the "branch to" names of the hotspots currently on the screen, with the names stored in the variable. When it finds a hotspot name and matching variable stored name, it notes the hotspot size and location. It then goes to the Map Picture, extracts pixels from that area, and blitts them onto the Foreground picture, at the same coordinates.


Example:

In the following example, only chap1.s is stored in the variable S0 by cdi_stri. When cdi_cmap compared the menu and the variable, it found a match for the hotspot having the "branch to" of chap1.s. It extracted a partial from the map picture, at the same coordinates of the hotspot, and blitted the partial into the Foreground picture. The foreground picture is now changed.

init.s
00:00 Call_bg /h0/SUBROUT/cdi_sv 1 50
(variable is created)
00:00 Br_always_nr /h0/SCRIPTS/chap1.s

chap1.s:
00:00 Call /h0/SUBROUT/cdi_stri S0 chap1.s
(the string "chap1.s" is placed in S0)
00:00 Cut /h0/VIDEO/bigpicture1.d
04:00 Cut /h0/VIDEO/bigpicture2.d
08:00 Br_alwys_nr /h0/SCRIPTS/mainmenu.s

mainmenu.s:
00:00 Call_bg /h0/SUBROUT/cdi_map S0 : (
contents of S0 chosen for compare)
00:00 Cut /h0/VIDEO/menufore.cl7
00:17 Background /h0/VIDEO/menumap.cl7
01:04 Background /h0/VIDEO/menuback.cl7
01:04 Wait /h0/MENUS/mainmenu.m (
hotspot names compared to S0--blitts on matches)

Note: the foreground picture changes are temporary -- only altered in the video plane. The CD/Hard drive copy remains unchanged.


Home Page · Up 1 Level · Site Map · Send Us Mail · ICDIA Main