AU7574998A - Multimedia interface with user interaction tracking - Google Patents

Multimedia interface with user interaction tracking Download PDF

Info

Publication number
AU7574998A
AU7574998A AU75749/98A AU7574998A AU7574998A AU 7574998 A AU7574998 A AU 7574998A AU 75749/98 A AU75749/98 A AU 75749/98A AU 7574998 A AU7574998 A AU 7574998A AU 7574998 A AU7574998 A AU 7574998A
Authority
AU
Australia
Prior art keywords
begin
user
procedure
browser
longint
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Abandoned
Application number
AU75749/98A
Inventor
Steven Bliss
J. Gary Snyder
David W. Steele
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Palantir Software Inc
Original Assignee
Palantir Software Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Palantir Software Inc filed Critical Palantir Software Inc
Publication of AU7574998A publication Critical patent/AU7574998A/en
Abandoned legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B27/00Editing; Indexing; Addressing; Timing or synchronising; Monitoring; Measuring tape travel
    • G11B27/10Indexing; Addressing; Timing or synchronising; Measuring tape travel
    • G11B27/34Indicating arrangements 
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/40Information retrieval; Database structures therefor; File system structures therefor of multimedia data, e.g. slideshows comprising image and additional audio data
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B27/00Editing; Indexing; Addressing; Timing or synchronising; Monitoring; Measuring tape travel
    • G11B27/02Editing, e.g. varying the order of information signals recorded on, or reproduced from, record carriers
    • G11B27/031Electronic editing of digitised analogue information signals, e.g. audio or video signals
    • G11B27/034Electronic editing of digitised analogue information signals, e.g. audio or video signals on discs
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B27/00Editing; Indexing; Addressing; Timing or synchronising; Monitoring; Measuring tape travel
    • G11B27/10Indexing; Addressing; Timing or synchronising; Measuring tape travel
    • G11B27/102Programmed access in sequence to addressed parts of tracks of operating record carriers
    • G11B27/105Programmed access in sequence to addressed parts of tracks of operating record carriers of operating discs
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B27/00Editing; Indexing; Addressing; Timing or synchronising; Monitoring; Measuring tape travel
    • G11B27/10Indexing; Addressing; Timing or synchronising; Measuring tape travel
    • G11B27/11Indexing; Addressing; Timing or synchronising; Measuring tape travel by using information not detectable on the record carrier
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B2220/00Record carriers by type
    • G11B2220/20Disc-shaped record carriers
    • G11B2220/21Disc-shaped record carriers characterised in that the disc is of read-only, rewritable, or recordable type
    • G11B2220/213Read-only discs
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B2220/00Record carriers by type
    • G11B2220/20Disc-shaped record carriers
    • G11B2220/25Disc-shaped record carriers characterised in that the disc is based on a specific recording technology
    • G11B2220/2537Optical discs
    • G11B2220/2545CDs
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B2220/00Record carriers by type
    • G11B2220/20Disc-shaped record carriers
    • G11B2220/25Disc-shaped record carriers characterised in that the disc is based on a specific recording technology
    • G11B2220/2537Optical discs
    • G11B2220/2562DVDs [digital versatile discs]; Digital video discs; MMCDs; HDCDs
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B2220/00Record carriers by type
    • G11B2220/60Solid state media
    • G11B2220/61Solid state media wherein solid state memory is used for storing A/V content

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Indexing, Searching, Synchronizing, And The Amount Of Synchronization Travel Of Record Carriers (AREA)

Description

WO 98/52189 PCTIUS98/10035 MULTIMEDIA INTERFACE WITH USER INTERACTION TRACKING The present invention relates to bringing intelligence to CD audio recording as well as digital videos that are going to be used on CD's. The invention provides an intelligent interface that will be added to a CD. The CD is re-mastered with this interface which adds intelligence to the CD. In accordance with an aspect of the present invention, there is provided a multimedia supplement for computer accessible artist-recorded media comprising: program means added to recorded media and accessible by a computer (a) for viewing an introduction video recorded by the artist; (b)for installing a special link to the artist's web site, and an icon that quickly launches to the artist web site including; (i) tracking the user's browsing of the Web site. (c) for playing the artist(s) recorded rendition, including: (i) displaying the title of each recorded event (e.g. song titles, acts and scenes of a play, musical, dance, etc), (ii) a viewer optionally and selectively viewing and/or listening to any one or all of the recorded renditions, and (iii) displaying words spoken or sung in sync with the performance; (iv) a viewer optionally playing a video of the rendition song if one is provided, (v) a viewer optionally playing an audio commentary of the rendition, and (vi) a viewer optionally displaying information about the rendition. The present invention provides an intelligent multimedia add on for CD's or any other prerecorded media. The consumer can access this addition program material via their PC of other computer. The system and process is designed to be very consumer friendly so anyone can access the additional content of the recording. This additional content may typically be comprised of an introductory video, recorded by the artist. This video welcomes the listener and tells the listener what is included on the system. It may inform the user of the installation available of a special link to the artist Web site and the desk top top icon that quickly launches the artist Web site. Next the use is presented with the Album cover or a list of track titles available for playing. The listener has the option of playing only what song they would like to hear and when they play the song the words to that song are displayed on their computer screen as they are sung. There are four other options that the listener can pick in selection two, one; play a video related to the song if one is provided, two; play an audio commentary of the song by the artist, three; display information about the song and four; print the words to the selected song. Additional functions are available throught a menu which displays whenever the lQcd symbol is clicked. Added functions include the installation of Wallpaper graphics and a Screen Saver of the artist on their computer. SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCTIUS98/10035 2 Other selections on the menu list information about the album as well as copyright information on the program. 1. When a user (at times called target herein) inserts the CD (e.g. a normal audio-music CD) into the user's computer, the user will be greeted with a cover shot showing the CD album cover on the personal computer. 2. Immediately following the album cover will be an introduction video, which will have been recorded by the recording artist to whatever the artist deems appropriate, but typically the recording artist will (a) give an introduction (b) thanking the individual for buying the artist's CD's, (c) telling something about the CD, (d) mentioning that if the user wants to know the CD give a behind the scenes tour of the different songs on the CD, (e) can go to web site by installing and subsequently using the artist's unique Web viewer. The artist may also say that there is some very interesting things to be seen on the artist's web site that no one else has seen or can see. It will be a tour to see some secret background of things the artist did while making the recording. By installing the artist's Web link the user may be asked to optionally answer a few questions, particularly age, zip code, and whatever questions artist may want to ask. The icon for the artist will appear on the computer screen. Thus it is a brief video talking about an introduction to get a personalized contact with the user (warm & cozy feeling). A one-on-one experience. Another unique feature of this system is that if the individual has already bought another CD of the artist that has been enhanced in accordance with the instant system technology, this next CD when place in the PC will recognize the prior purchase and the system can jump to a second introduction screen and not to the main introduction screen. The recording artist may come on screen noting this second, third, etc purchase, and thanking the user target for the 2nd CD purchase, hoping that the user enjoyed specified recordings on the prior purchase(s), and hoping that the user enjoyed this recording because the artist has some more exciting songs to sing. The artist may also note that the user has visited the artist's web site as well and have some more unique insights if the user will again visit the artist's web site. If fact the user would be surprised because the artist has mad some other changes that pertain to this recording. Also, user may be told that if they want to hear the music, just click on the music button. Once this process is complete, the users will each have an option of playing all of them or "play", "pause", "volume control" and "random play". When the user clicks on "play" or a "particular song", the words to the song being sung also appear on the screen. As the song is being sung, the words are highlighted in synchronization with the words being sung. When the user wants to stop or pause, they hit the "pause" button. When the user wants to move to a particular spot in the song, they can move to the scroll bar and scroll to a desired place in the song. Movement of the scroll bar will highlight the words to the music. SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 3 Another way of moving to a particular place in a song is to click on a word in the song, and it begins to play on that move. Once the user is finished playing, they merely close down the cd player as they would normally. For the recording artist, there is a hidden benefit. Any time the individual goes on line to visit the recording artist site, aspects of the present invention receives information of what songs the individual played for a particular CD. The system does not poll the playing of other CD's played, but only the songs that are played with the present system thereon because the intelligence is synchronized to a particular CD going to a specific web site to tally the totals for the particular artist so that the artist has a ten song CD and individuals tend to play 5 of the songs on a regular basis, the system can report to the artist the relative frequency of playing each song, and thereby give an idea of the more popular songs. Also the artist is given an indication of how many individuals are plugged into this technology, because the system will be getting feedback from anyone who goes on line, to identify the individuals who watch the CD's and is indeed playing the artist's songs. The interface aspect of the present invention is described below under the heading WEB SITE ACCESS CONTROL AND TRACKING which permits the users or individuals to use hot buttons which relate to the album and whatever else the artist wants done. For example, users might want to be directly linked to a home page that relates to the album, but there also can be hot keys that show other things such as concert tours, souvenirs, to chat with the artist, or to go to the artist's home page. When a user hits the "Link to the web" button they are linked the web site access control to a specific web site where: 1. The user may be asked zip code, gender, and any other questions the artist/customer wants. 2. During "Install" the artist may prompt, ask questions, e.g. age, tell us about yourself, would you like to install the software at this time? Thank you for installing. It is now completed. At this time on the user's PC will appear an icon for that artist. The icon is clicked on to launch its driver and thereafter to be connected to the artist's web site. In this case, and at the users instructions, the user will enter a new home page of the artist for this CD album and will see an album holder page, and be given a welcome greeting by the artist. They will see hot buttons which will link them to sites that will pertain to the interests of the user. This may be a recording, where the tour currently is, where the artist is appearing, background, hints of future information, the site of production of the CD, who is responsible for it, what other artists participated, and some other background. Some links may have controlled access in accordance with aspects of the present invention. Some of the pages can be encrypted as described hereinbelow and require use of encryption from the instant system to see the sites so a casual viewer (one who does not enter the site through the instant system) would not be able to see this proprietary information. SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 4 At the same time the user is playing the music, the user may be communicating with the web site and exchanging information about why they are visiting on the web site, what intrigues them about the site, and thus provide a profile of the individuals as they visit the site. Another area of the profile may be what music has this viewer listened to, poll the data to determine what songs were played on the CD. This data may become a vital link to some awards by determining how often songs are played. Also it can help identify what songs are liked or are popular. It can also verify whether song was played in its entirety, or only for 10 seconds, 15 seconds, etc. This music tally data is strong enough that it may be used as a basis for award presentation(s). This would avoid the possibility of a seeded song where it is in a loop being played over and over again, e.g. if it is being played at 3 AM it may be assumed that it is in a continuous loop, and can be identified as a single play if the customer (record producer or recording artist) wishes. The system can tell how many times the songs are played, are they played in entirety, and are they played in sequential order. Of course the system can capture other data of where, what and how long the user visited on the web site. The interface takes users to the site which in turn allows link to more than one web site so that if the artist was working on a charity and using a web site, or working with another artist who has a site, the user can click on a moving marquee in the upper left hand comer of the screen to be taken directly to these sites, and get information on the charity or other artist. Following are some applications for the instant system: (1) Retailers are beginning to sell on a seasonal basis, a music CD with selected tracks having certain songs they believe are appropriate for a clientele. By using the invention, the user can view these CD's by song, view the words, and be linked to the retailer's web site. For example, a retailer uses a CD to have a user linked to the retailer's web site, and there do catalog shopping or keep abreast of the latest technology. What is important for the retailer is that now on the user's desk top is the icon for that particular store, and the user can be instantly launched to that site.The retailer may use other aspects of the invention to link to some other things they want, e.g. to some recording artist's sites where there may be cross promotions. (2) Public service where a portion of the recording goes to a charity. For example, when an artist is giving a portion of the proceeds to a particular charity, e.g. MS, a user buying such a CD can insert it in a PC and have an introduction video by the charity thanking the user for the contribution through the purchase, and thanking the recording artist, identifying how much of the purchase money is going to the charity, provide a description of the charity's work, and can include a link to the charity's own site. (3) Promotional CD's are sent to radio stations throughout the country with multiple artists. By using the present system, the CD can give a brief introduction of each artist, and/or have artist make its own introduction, and if the user wants to know more, click on the appropriate buttons that are provided. This gives the radio stations more human interest information on the artists, by seeing them in action and listening to them speak. Also they can determine where the artist is while on tour or if in town. Fig. 1 shows a block diagram of a specific embodiment of the present invention. SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCTIUS98/10035 5 Figs. 2 to 4 show typical screen views. Fig. 5 shows thevarious graphical elements used to render figs 2 to 4. Fig. 6 shows a typical initialization file used to initially configure the invention. Fig. 7a is a CD PROFILE DATA FILE "PROFILE.TXT" wherein a site page sends this data via the internet to a server for collating and processing. The server uses this information for various purposes, one of which is to produce a report of the types of CDs out there (i.e. original vs. copy). By comparing the track (and other) profile information collected, with a profile of a known original CD, the server can make an assumption as to whether the CD is a copy or not. For example, if the track layout is even slightly different than that of a known original, then it is probably a copy. Fig. 7b is a TRACK PLAYING TIMES DATA FILE "STATS.TXT" wherein the site page sends this data via the internet to a server for collating and processing. The server uses this information to produce a report of which CD tracks are played more than others, and whether the "WORDS DISPLAY" feature was used. Figs. 8 to 18(a & b) are flow diagrams of the major parts of the programs Fig. 19 is a schematic representation of the system of the present invention in a network such as the World Wide Web. The following pages 24 to 214 are code listing for an embodiment of the present invention. The blocks in the flow diagrams refer to the programs by line numbers for performance of the recited functions, and also to the applicable Figure where appropriate. The following pages 215 to 276 are code listing for an interface embodiment of the present invention for web site access control and tracking. WEB SITE ACCESS CONTROL AND TRACKING The present invention relates to directing selected users to World Wide Web (WWW) sites. More particularly, the present invention relates to directing the selected users to WWW sites by Hypertext Markup Language (HTML) coding and Web browser control. The worldwide network of computers commonly known as the Internet has seen explosive growth in the last several years. This growth has been fueled by the introduction and widespread use of web browsers which provide graphical user interface (GUI) based access to network servers. The network servers support documents formatted as so-called web pages. The World Wide Web (WWW) is that collection of servers on the Internet that use Hypertext Transfer Protocol (HTTP). HTTP is a known application protocol that provides users access to files. The files can be in different formats such as text, graphics, images, sound, video, etc., which use a standard page description language known as Hypertext Markup Language (HTML). HTML provides basic document formatting and provides the programmer with a means to specify links to other servers and files. Use of an HTML-compiiant user browser involves specification of a link via a Uniform Resource Locator or URL. Upon such specification, the user makes a Transmission Control Protocol/Intemet Protocol (TCP/IP) request to the server identified in the link and receives a web page (i.e., a document formatted according to HTML) in return. SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCTIUS98/10035 6 The current techniques for limiting access to Web pages are (a) programming the Web server to honor requests from a limited range of IP addresses or domain names; and (b) explicitly assigning passwords to individuals or groups, which they need to submit when attempting a retrieval. The current techniques for tracking the browsing behavior of a user are: "cookies" sent by a Web server to the user's browser and resubmitted by that Web browser during the next access to the same site; and a "shadow" or proxy Web server that watches all Web site accesses to a site, passes along retrieval requests and gathers and stores browsing behavior information. However, these techniques do not allow, for instance, a Chicago manufacturer to "invite" only Chicago residents to view his Web pages, except through a process tedious to the user, for example by asking each retriever whether he lives in Chicago. Nor do simple techniques currently exist to track the behavior of people actually viewing a manufacturer's Web pages to determine, for instance, (i) how long in time the user views a particular page, (ii) what sequence of pages was viewed, and (iii) whether pages not belonging to the manufacturer were also viewed. Current techniques for gathering such information require reprogramming the Web servers which send the manufacturer's Web pages to the user. With reference to Figs. 17 to 19, the flow diagrams are of a computer program embodiment of the present invention which the typical user of the invention will receive in distributable form on a computer-readable medium with the program encoded thereon, such as on floppy disk or CDROM. This program, called the Browser Controller (BC), is distributed only to those people "invited" to view a particular Web site such as by purchasing a music CD as described hereinabove. The BC controls the user's own already existent World Wide Web browser software and instructs it to retrieve particular Web pages (the "invitation" to browse). This targeted site address is distributed with the BC (floppy disk or CDROM). The BC, before retrieving the targeted Web page(s), may check with a known site on the Intemet or a local network to validate itself as being a legitimate or authorized copy of the BC. This validation method may stem from the use of a unique "Serial Number" encoded on the diskette (or CDROM) containing the BC. Alternatively, other copy-protection schemes may be used. For example, usage-limiting techniques are currently being used to limit the number of simultaneous users of commercial software on local-area-networks (LANs). Typically, an organization will purchase the license to run a limited number of copies of a software product. The master copy of the software is placed on the LAN file server. Whenever a user on the LAN executes the software, another copy-restriction program is run which checks how many current users of that software there are, and either allows or rejects the particular user's request to run the software. This technique cannot limit the uses of the software by people not connected to the LAN, such as employees of the organization who wish to use the software at home. Publishers can also place the software onto a medium that is difficult or expensive to copy, such as CDROM until writable CDROM drives become inexpensive. Or, they may make it difficult to copy the documentation/manual for the software, for instance, by choosing perfect-binding for their manuals. However, these methods primarily discourage, rather than prevent, copying. or copy protection may be bypassed altogether. SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 7 If a Serial Number is used, part of that number can be used to identify the subgroup of users receiving the software. This information will be referred to as the "Batch Code" below. For instance, a "1" as the first digit of the Serial Number may mean that this disk was distributed at a particular trade show, whereas a "2" might indicate that the disk was given to all employees of a particular corporation. This information can be used demographically along with the browsing records detailed below. While the BC is in control of the user's Web browser, the address (URL) of the initial Web page is not explicitly shown to the user, and those features of the user's browser that normally allow the display of the target Web page address are disabled. This leaves the user in ignorance of where the Web site is, that he is currently looking at. This means that it is difficult to send someone else, who is not "invited", the URL of the Web page, because that URL is unknown to the user. Further restrictions can be placed on who can see the Web page by encrypting the Web page itself in a special way (part of this invention) so that only those "invited" will see the restricted information, while those not "invited" will see other, unrestricted, information, even though the URL of both views of the Web page is identical. The BC will decrypt the retrieved Web page prior to showing it to the user. Those without the BC will see the unencrypted Web page, which may still be intelligible but will show not show any unrestricted information. This Web page encryption, invisible to retrievers of the Web page without BC, can be used by BC to deliver auxiliary information to the BC user, such as "hot-buttons" to be displayed on the browser window to take the user to other Web sites. Other uses of the encrypted Web page information include: using the Serial Number (Batch Code) to decide what Web Page information to show any particular user; to provide last-minute instructions to the BC to control Web page access. In fact, a program can be encrypted on the Web Page to be executed by the BC. Once the user is browsing on the "invited" Web site and those Web pages that the "invited" page links to, the BC monitors the movements of the user, and can report such details of the user's browsing behavior as: length of time viewing any page; sequence of pages viewed; time of day for any action such as start of the browsing session, etc. These records may be stored by the BC on the user's hard drive for later statistical analysis. In addition to browsing behavior, the BC may explicitly ask the user for personal or demographic information, such as gender, age, locality, etc. and also store this information. At the same time as the user is viewing the "invited" pages, the BC can upload the browsing behavior reports from previous browsing sessions as well as the demographics information. Software Components of the System Browser Controller (BC): The browser controller is a program distributed to the user in the form of computer readable code on floppy disk, CDROM or other distributable medium (including electronic transfer). The primary purpose of the BC in accordance with the present invention is to control the user's own World Wide Web browser software that is installed on the user's computer. Once installed on the users computer, the BC will access the particular sites that It was designed to retrieve, and perform a number of other browsing and access control functions including: (a) Optionally detecting unauthorized copies of itself, and preventing any further execution if detected. SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCTIUS98/10035 8 (b) Retrieving "invited" Web Pages from the Internet or intranet. (c) Decrypting any specially encrypted Web pages, and following the contained display or execution instructions that were planted on the Web pages. (d) Controlling the user's Web browser to retrieve and display selected Web pages. (e) Gathering statistics on the user's Web browsing movements and sending that information to a central computer for statistical data gathering. The BC includes Browser.pas, Main.pas and HTTP.pas program modules. Browser.pas. See Code Listings in the following Appendix I The Browser.pas module contains functions to find and capture a browser. The Code Listings in the following Appendix I currently support Netscape Navigator and Internet Explorer. Main.pas. See Code Listings in the following Appendix 11 The Main.pas module contains the main BC window. The form handles all the toolbar functionality and tracks the movements of the user to be reported to the server. HTTP.pas. See Code Listings in the following Appendix III The HTTP.pas module contains functions to talk to the HTTP server where the CGI scripts that record feedback reside. Feedback can be added to the object and will be cached until it is sent off to the server. Installation Information: Installation Information is computer-readable encoded data on the same distribution medium as the BC and will be used by the BC. It contains at least the following types of information: (a) Optionally, a Serial Number or Batch Code identifying the distribution medium copy as an "authorized" copy. This information can be used to prevent unauthorized copying of the program, by making unauthorized copies unusable. This information can also be used to further identify the user of the software (Batch Code indicating what group of people was targeted for the distribution of the disks that the user received). (b) The Web Page address (URL) that the BC should show the user. (c) The Intemet address of the copy-protection host computer that controls access to the BC, if such a copy-protection scheme is used. Other information may be included here if a different access control scheme is used. (d) The Internet address of the user-browsing-information storing computer. (e) Displayed "hot buttons" that when pressed will take the user to particular Web pages. Browsing Information Store (BIS). The BIS is software running on a computer which is accessible via the Internet to which the BC uploads browsing information for storage into a database. Encryption. Encryption programs are used to encrypt Web pages and othr information such as authorization codes so that they can only be meaningful to the BC which must decrypt the first. Typical Usage The following steps illustrate how the parts of the invention are used, and the functions of each part: The user receives a floppy disk or a music CD as discussed hereinabove containing the Browser Controller (BC) and the Installation Information (II), and uses a standard or customized program to install the software on his computer. SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 9 During installation on the user's computer, demographic information is assembled by asking the user personal and/or business questions (such as gender, age, location, business field, manufacturing, service, sales, marketing number of employees), and the answers are stored in the user's computer for later transmittal to the Browsing Information Store (BIS). Also during installation, the user's computer system is searched to locate a WWW browser that the BC is capable of controlling. The BC is designed to control most popular WWW browsers. If no such browser is found, and the installation package does not contain one for the user, then the installation process terminates, indicating to the user that the BC will not run for lack of necessary programs. Fig. 17 shows a flow diagram of a program for the installation of the Browser Controller program. Installation of the BC occurs as needed through out the program. For example, see Main.pas in Appendix 1, lines 178; 269-271; 276-356; 413-471; 515-523; and 592-601. With reference to Fig. 17, a search of the hard drive of the user's computer is made for a suitable controllable browser 10. If a suitable browser is not found on the hard drive, and if the distributed medium is provided with a browser, the browser program from the distributed medium is installed on the user's hard drive 10. Atematively the BC could incorporate all the functionality of a browser by combining it with commercially available software building blocks. Also a browser such as Netscape Navagator can be included on the distributed disk. If a browser is not available, the installation program is exited and the user is advised by a message on the user's computer that "Suitable WWW browser is not available. Installation failed." Then the program asks the user for user's target drive, and the BC files and Installation Information are decompressed and unpacked 11 from the installation disk and placed onto the target drive 13,14. The user is asked demographic questions 15, and the answers are stored in a Demographic file on the target drive. The installation program is ended and the Browser Controller program on the target drive (typically the C-drive) is executed. Figs. 18a and 18b provide flow diagrams of the Browser Controller (BC) program. The code listings for the Browser Controller program are in the following Appendixes 1, 11 and Ill. These code listings are for Windows application which is typically driven by external events such as actuation of buttons. With reference to Figs. 18a and 18b, Installation Information 32,33 for the Browser Controller, including demographics, copy-protection information, and primary web page and browser to use are read and deciphered. The program then determines whether a suitable WWW browser program is available 31. Availability of a suitable browser is implemented by Brower.pas in Appendix II. If a browser program is not available on the target drive, the program is ended. Then, if the Primary Web page is encrypted 40, decrypt and decipher instructions are obtained 41. Also, instructions are followed 42 to obtain the decrypted Primary Web page 36. If the Primary Web page is not encrypted, the Primary Web page is directly retrieved 36 . Also, displayable HTML is then deposited Into the Primary Web Page Display. If there are no BC Instructions, the raw HTML are copied, with possible BASE HREF addition, into the Primary Web Page Display. Control is released to the browser to display the Primary Web Page 43. SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 10 The visit to Primary Web Page is reported 49; and as the user clicks on WWW hypertext links 44, an infinite loops watch the browser respond to user's clicks 45, 46 and also watching the clock 47. Specifically, if the browser check is showing a different page, the Current URL and time of retrieval are stored 46. The control of the Browser used for the retrieving and displaying WWW page is implemented by Browser.pas of Appendix II. Main.pas initiates Browser at least inpart at lines 853-882 and line 1021. This procedure and Browser.pas force the user's browser to request the specified URL. Demographic information from the user may direct the BC to command the Browser to retrieve altemate web pages and/or show different "hot buttons", or alter the user interface in other ways. This "hot button" information can also be included on the disk in the I area. After all of this is done, a Web page is displayed to the user. The user, after viewing the primary (first) Web page, can in the usual fashion, click on the hypertext links in the page to retrieve other pages. While the user is viewing these Web pages, the BC is watching the user's behavior and taking note of which Web page is being displayed and for how long, and the sequence of Web pages that the user chooses to look at. Periodically, the BC will report the user's browsing records electronically to a central computer (BIS). Browsing reports and user demographics are sent to the central computer 49 when a predetermined amount of time has passed or a predetermined number of places have been visited 24, or when the Browser is shut down 48. The above described embodiment directs the user to a single Web site. In another embodiment of the present invention, the user is directed to a selection of a plurality of sites. In this embodiment, the BC takes the user to a screen with a plurality of buttons, each button representing a different on of the Web sites. Alternatively, the buttons may be on a drop down menu or a scrolling marquee. With reference to Fig. 19, there is shown an embodiment of the system of the present invention for bringing selected WWW users to view particular Web pages, showing these Web pages only to selected users, and tracking and reporting voluntarily provided demographic information and the users' browsing behavior amongst the chosen Web pages. As described above, the system comprises a Browser-Controller program encoded on computer readable media 80 that is distributed to the selected users. As shown in Fig. 19, typical forms of the media are floppy disks, CDROMs, CD Audio, DVD and Solid-state media (e.g., Smart Cards). Each one of the users installs a respective one of the computer readable media 80 on a user computer 82. The user computer 82 executes the Browser-Controller program to control the user's own already existent World Wide Web browser software 84 and instructs it to retrieve particular Web pages. If there is no existing browser software, a suitable browser program optionally can be distributed to the user along with the Browser-Controller and the Tracker Client programs on one of the media 80. A central computer 88 Is located In the network and optionally has Installed thereon a Tracker Server program 91 including a database for storing Current Tokens received from the Browser Controller programs. Each Browser-Controller program is validated by the Tracker Server program 91 on the central computer 88 before being permitted to retrieve the targeted Web page(s) on a Primary SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 11 Web site 90. The retrieved Web pages or files optionally will need to be decrypted either by the Tracker Server program or the Browser-Controller program before the user can display the retrieved Web pages. Browsing information from the user's browser, such as which pages are being retrieved and when, as well as the browsing behavior records are sent to a Statistical Data Collecting Program 92 on the central computer 88 for statistical analysis, then forwarded to a Statistical Data database 93 for retrieval on behalf of the Primary Web site owner. The Statistical Database 93 may alternatively be on a separate web site that is accessible by the owner of the Primary Web site 90. The data collection program 92 with the statistical database 93 collectively are the BIS. As noted above the code listings for the Browser Controller programs are in the following Appendixes 1, 11 and IllI and are browser.pas, main.pas and HTTP.pas, respectively. In an embodiment of the invention, a browser on a user's computer is used to direct the user to a web site by the following steps. In accordance with an aspect of the present invention, a first function is that a registry is searched to determine whether a browser is on the user's computer system, and to identify the browser. The registry is a database maintained by the system for tracking various information including file extensions and the applications the file extensions are associated with. This function searches the registry to find the executable file associated with the .htm extension. This executable is assumed to be a browser which can be controlled by the Browser Controller (BC) program. Thus, the registry is used to find the browser which the user considers to be the default browser. (See browser.pas: lines 246-295). The browser executable is retrieved from the registry and executed. (See browser.pas: lines 612-641) Each browser typically has the name of the browser in its title bar, e.g. Netscape normally says "Netscape -" and then the URL that you are currently addressing. Internet Explorer also usually operates the same way so that these programs can be searched for and located. However, if a window of either browser is not located within a reasonable period of time (e.g., 30 seconds), then the search is terminated and the user is given an error message. (See browser.pas, lines 646-663 and lines 124-163). If the browser window is found, the system handle for that window is used to make the window a child of one of the windows contained in the BC application. A "handle" is a unique 16-bit numeric identifier. Each window that is currently opened in the system has a unique handle. Thereafter, the browser window will only be visible inside the BC application. (See browser.pas: line 674). A search through the browser is made to determine which child window inside the browser is the largest. The largest child window should be the browser output window. (See browser.pas: lines 610-737). The position of the largest window and are used to determine what the extra space on all sides of the browser window should be. On the top there will be the menus and the tool bars; on the bottom there will be a status bar; and to the left and to the right will be the actual edges of the window. The menus, the tool bars and the status bar are pushed outwardly so that they are not displayed. Once the browser interior window is obtained, the space thereabout is calculated, and the entire BC application is resized so that only the browser window is displayed within the BC window. This resizing is SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCTIUS98/10035 12 achievable because the top and left coordinates of a window can be set to negative coordinates and thereby move the peripheral portions off the screen, or in this case the peripheral portions will go out of the window that is set as the window's parent. (See main.pas, lines 1035-1109). At this point, the browser is captured, its handle is known, and the browser is contained within the BC window. The actual window which contains the browser is not yet visible. The BC program itself is visible, so the output window is blank. If you are already connected to the Internet then the browser will begin to operate. If you are not connected to the Internet and are in Windows 95, then the dialer will come up and ask if the user wants to connect or not. (See main.pas: lines 1167-1204) If the user responds "yes", then the browser program is connected to the Internet. If say no or cancel, an error message is given, e.g., "sorry cannot retrieve or contact" whatever host the browser was to contact and the user is done. At this point the user can connect to the Internet again and press one of the buttons on the browser, e.g., the home button to take the user to the home page, to again begin the program. In any case, if there is a connection, there also a box on which contains the current URL. Now under Netscape, this box is filled as soon as the program is run. Under Internet Explorer, the box is not filled until Explorer has actually made contact with the host. Since the contents of this box are very important to BC in accordance with the present invention, the handle to this text box must be identified. These text controls also have handles because they are actually windows. A timer is activated which goes on periodically to look into all the child windows to determine if the URL that was initially passed to Netscape or Explorer has appeared within that box. The target box is identified by the fact that the URL that was specified on the command line when the program was run now appears in that target box. At some point this will happen. However, in the case of Internet Explorer, if it fails to find the host or if it is a bad host or if the server is down, Internet Explorer will put in BLANK.HTM which is stored on the hard drive. Once the URL field has been found, the browser is made visible within the BC application. (See main.pas: lines 1152-1164) Whenever the user follows a link to a different page, the BC program will know it because BC checks that box every 1/4 of a second to see if it is changed. If that box does change, then BC sends information to the server concerning that change. (See main.pas: lines 1209-1295) The next step in controlling Netscape is that BC has an algorithm which will walk through all the menus, and can thereby determine each item menu caption (the title of each menu item). (See main.pas: lines 1146-1147) From each caption it can be determined whether it is an menu item that we want to control. For example, "EXIT" is an item caption that we want to control. "Find", "stop", "back", "forward", "print" and "reload" (which are normally on the tool bar itself) are Items normally sought. Back & forward are critical operations. Reload is needed. SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 13 "Stop" and "find" are not sought in the following code listings. However, "stop" and "find" can be in a manner similar to the manner "find", "stop", "back", "forward", "print" and "reload" are made available by the following code listings. With Internet Explorer, the BC does not search the menu as soon as Internet Explorer is found because Internet Explorer does not build its menus until one is connected to a web page - i.e. must be connected to an Internet host before it builds its menus - and thus permit a walk through and read. Once the menus have been walked, these values are stored in an array in the BC program for later use. Thereafter, the browser is controlled from the array through the operating system. Therefore, (1) the BC program can control the captured browser through the browser's, (2) the BC program can determine what the user is doing through the edit box, (3) and the browser window is always dynamically resized to fit inside the BC application. Once the browser is captured, the BC tool bar is effectively substituted for that of the browser. Since none of the browser's buttons are visible, direct control of the browser is not possible. Thus, at this point, the BC program controls all functionality. The only thing that can be done within the browser window is that the hypertext links are clicked upon to take the user to various places. The attached appendix pages APP1 to APP131 are incorporated herein and form part of this application. While the invention has been described in conjunction with specific embodiments thereof, it is evident that many alternatives, modifications, and variations will be apparent to those skilled in the art in light of the foregoing description. Accordingly, it is intended to embrace all such alternatives, modification, and variations as fall within the spirit and broad scope of the appended claims. SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 14 0001 unit BitBars; 0002 0003 interface 0004 0005 {$IFDEF WINDOWS) 0006 uses 0007 SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, 0008 Forms, Dialogs, ExtCtris, 0009 Run, Main, Bitmaps; 0010 {$ELSE} 0011 uses 0012 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, 0013 ExtCtrls, StdCtrls, 0014 Run, Main, Bitmaps; 0015 {$ENDIF} 0016 {------------------------ 0017 type 0018 TBar = record 0019 bVertical: boolean; 0020 bEnabled: boolean; 0021 bForceDraw: boolean; 0022 iSlideRange, iSlidePosition: longint; 0023 iSweepWidth, iSweepHeight: longint; 0024 iSweepStart, iSweepTravel: longint; 0025 iSweepMoveStartPosition, iSweepPosition: longint; 0026 bmpBuffer: TBitmap; 0027 spriteBack, spriteRod, spriteButton, spriteEnd1, spriteEnd2: TSprite 0028 end; 0029 {----------------------- 0030 procedure Barinitialize(var Bar: Tbar; imgBarBack, imgBarRod, imgBarButton, 0031 imgBarEndl, imgBarEnd2: Timage); 0032 procedure BarExit(var Bar: TBar); 0033 procedure BarEnable(var Bar: TBar); 0034 procedure BarDissable(var Bar: TBar); 0035 procedure BarSetRange(var Bar: TBar; range: longint); 0036 procedure BarSetPosition(var Bar: TBar; Position: longint); 0037 function BarGetPosition(var Bar: TBar): longint; SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 15 0038 procedure BarMouseMoveStart(var Bar: Tbar); 0039 procedure BarMouseMoveDraw(var Bar: TBar; x,y: longint); 0040 function BarButtonHit(var Bar: TBar): boolean; 0041 0042 implementation 0043 {=========================================================================} 0044 function ConvertSweepToSlide(var Bar: TBar; SweepPosition: longint): longint; forward; 0045 function ConvertSlideToSweep(var Bar: TBar; SlidePosition: longint): longint; forward; 0046 procedure DrawAndUpdate(var Bar: TBar; NewSweepPosition: longint); forward; 0047 0048 { Local Routines } 0049 0050 function ConvertSweepToSlide(var Bar: TBar; SweepPosition: longint): longint; 0051 begin 0052 result := ((Bar.iSlideRange - (Bar.iSlideRange div Bar.iSweepTravel)) * 0053 SweepPosition) div (Bar.iSweepTravel-1) 0054 end; 0055 { ------------------------------------------ 0056 function ConvertSlideToSweep(var Bar: TBar; SlidePosition: longint): longint; 0057 begin 0058 result := ((Bar.iSweepTravel-1) * SlidePosition) div 0059 (Bar.iSlideRange - (Bar.iSlideRange div Bar.iSweepTravel)) 0060 end; 0061 { ------------------------------------------ } 0062 procedure DrawAndUpdate(var Bar: TBar; NewSweepPosition: longint); 0063 var 0064 iRodLeft, iRodTop: longint; 0065 iOffset: longint; 0066 BarRect: TRect; 0067 begin 0068 if NewSweepPosition<0 then 0069 NewSweepPosition := 0; 0070 if NewSweepPosition>Bar.iSweepTravel-1 then 0071 NewSweepPosition := Bar.lSweepTravel-1; 0072 if (not Bar.bForceDraw) and (NewSweepPosition=Bar.iSweepPosition) then 0073 exit; 0074 Bar.iSweepPosition := NewSweepPosition; SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 16 0075 if not Bar.bEnabled then 0076 exit; 0077 Bar.bForceDraw := false; 0078 iOffset := Bar.iSweepStart-NewSweepPosition; 0079 if Bar.bVertical then begin 0080 iRodLeft:= 0; 0081 iRodTop := iOffset; 0082 Bar.spriteButton.Top := Bar.spriteRod.Top+NewSweepPosition 0083 end 0084 else begin 0085 iRodLeft:= iOffset; 0086 iRodTop := 0; 0087 Bar.spriteButton.Left := Bar.spriteRod. Left+NewSweepPosition 0088 end; 0089 BitmapOverlay(Bar.bmpBuffer, Bar.spriteBack, Bar.spriteBack); 0090 BitBlt(Bar.bmpBuffer.Canvas. Handle, 0091 Bar.spriteRod.Left-Bar.spriteBack.Left, 0092 Bar.spriteRod.Top-Bar.spriteBack.Top, 0093 Bar.iSweepWidth, Bar.iSweepHeight, 0094 Bar.spriteRod.Image.Canvas.Handle, iRodLeft, iRodTop, srcCOPY); 0095 BitmapOverlay(Bar.bmpBuffer, Bar.spriteButton, Bar.spriteBack); 0096 BitmapOverlay(Bar.bmpBuffer, Bar.spriteEnd1, Bar.spriteBack); 0097 BitmapOverlay(Bar.bmpBuffer, Bar.spriteEnd2, Bar.spriteBack); 0098 BitBt(bmpPlayer.Canvas.Handle, 0099 Bar.spriteBack.Left, Bar.spriteBack.Top, 0100 Bar.spriteBack.Width-1, Bar.spriteBack. Height, 0101 Bar.bmpBuffer.Canvas.Handle, 1, 0, srcCOPY); 0102 BarRect := Bounds(Bar.spriteBack. Left+ 1, Bar.spriteBack.Top, 0103 Bar.spriteBack.Width-1, Bar.spriteBack. Height); 0104 BitmapUpdateScreen(BarRect) 0105 end; 0106 0107 { Main code } 0108 0109 procedure BarEnable(var Bar: TBar); 0110 begin 0111 if Bar.iSlideRange=0 then begin 0112 BarDissable(Bar); 0113 exit SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCTIUS98/10035 17 0114 end; 0115 if not Bar.bEnabled then begin 0116 Bar.bEnabled := true; 0117 Bar.bForceDraw := true; 0118 DrawAndUpdate(Bar, ConvertSlideToSweep(Bar, Bar.iSlidePosition)); 0119 end 0120 end; 0121 { -------------------------------- } 0122 procedure BarDissable(var Bar: Tbar); 0123 begin 0124 if Bar.bEnabled then begin 0125 Bar.bEnabled := false; 0126 Bar.bForceDraw := false; 0127 BitmapDraw(Bar.spriteBack) 0128 end 0129 end; 0130 {------------------------.-} 0131 procedure BarSetRange(var Bar: TBar; Range: longint); 0132 begin 0133 Bar.iSlideRange := Range; 0134 if Range>0 then 0135 Bar.iSlidePosition := ConvertSweepToSlide(Bar, Bar.iSweepPosition) 0136 else 0137 BarDissable(Bar) 0138 end; 0139 {----------------------------} 0140 procedure BarSetPosition(var Bar: TBar; Position: longint); 0141 begin 0142 Bar.iSlidePosition := Position; 0143 if Bar.bEnabled then 0144 DrawAndUpdate(Bar, ConvertSlideToSweep(Bar,Position)) 0145 end; 0146 {-----------------------------} 0147 function BarGetPosition(var Bar: TBar): longint; 0148 begin 0149 result := Bar.iSlidePosition; 0150 end; 0151 0152 { Mouse Handling 0153 {======= ==================================== ======== ============== WO 98/52189 PCT/US98/10035 18 0154 function BarButtonHit(var Bar: TBar): boolean; 0155 begin 0156 result := Bar.bEnabled and BitmapHit(Bar.spriteButton) and 0157 not (BitmapHit(Bar.spriteEndl) or BitmapHit(Bar.spriteEnd2)) 0158 end; 0159 { ------- } 0160 procedure BarMouseMoveStart(var Bar: TBar); 0161 begin 0162 Bar.iSweepMoveStartPosition := Bar.iSweepPosition 0163 end; 0164 { ---------------------------------- 0165 procedure BarMouseMoveDraw(var Bar: TBar; x,y: longint); 0166 var 0167 iMove: longint; 0168 begin 0169 if Bar.bVertical then 0170 iMove := y-iMouseDownY 0171 else 0172 iMove := x-iMouseDownX; 0173 DrawAndUpdate(Bar, Bar.iSweepMoveStartPosition+iMove); 0174 Bar.iSlidePosition := ConvertSweepToSlide(Bar,Bar.iSweepPosition) 0175 end; 0176 0177 { Initalize / Exit } 0178 0179 procedure Barinitialize(var Bar: Tbar; imgBarBack, imgBarRod, imgBarButton, 0180 imgBarEndl, imgBarEnd2: Timage); 0181 var 0182 1: string[50]; 0183 p: integer; 0184 iSlideButtonSize: longint; 0185 begin 0186 BitmapCreate(Bar.spriteBack, imgBarBack, false); 0187 BitmapCreate(Bar.spriteRod, imgBarRod, true); 0188 BitmapCreate(Bar.spriteButton, imgBarButton, true); 0189 BitmapCreate(Bar.spriteEndl, imgBarEndl, true); 0190 BitmapCreate(Bar.spriteEnd2, imgBarEnd2, true); 0191 Bar.bmpBuffer := TBitmap.Create; 0192 Bar.bmpBuffer.Assign(imgBarBack.Picture.Bitmap); SUBSTiTUTE SH EET (RULE 26) WO 98/52189 PCT/US98/10035 19 0193 1 := imgBarRod.Hint; 0194 p:= Pos(',',1); 0195 Bar.iSweepWidth := StrToint(Copy(1,1,p-1)); 0196 1 := Copy(l,p+1,99); 0197 p:= Pos(',',); 0198 Bar.iSweepHeight := StrTolnt(Copy(1,1,p-1)); 0199 if Copy(l,p+1,1)='V then 0200 Bar.bVertical : true 0201 else 0202 Bar.bVertical := false; 0203 Bar.iSweepStart StrToint(Copy(1,p+2,99)); 0204 if Bar.bVertical then begin 0205 iSlideButtonSize := Bar.spriteButton. Height; 0206 Bar.iSweepTravel := Bar. iSweepHeight-iSlideButtonSize; 0207 Bar.spriteButton. Left := Bar.spriteBack.Left 0208 end 0209 else begin 0210 iSlideButtonSize := Bar.spriteButton.Width; 0211 Bar.iSweepTravel := Bar.iSweepWidth-iSlideButtonSize; 0212 Bar.spriteButton.Top := Bar.spriteBack.Top 0213 end; 0214 Bar.iSweepPosition := -1; 0215 Bar.bEnabled := false; 0216 Bar.bForceDraw:= false 0217 end; 0218 {----------------------------} 0219 procedure BarExit(var Bar: TBar); 0220 begin 0221 Bar.bmpBuffer.Free; 0222 BitmapDestroy(Bar.spriteEnd2); 0223 BitmapDestroy(Bar.spriteEndl); 0224 BitmapDestroy(Bar.spriteButton); 0225 BitmapDestroy(Bar.spriteRod); 0226 BitmapDestroy(Bar.spriteBack) 0227 end; 0228 end. SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 20 0001 unit BitBtns; 0002 0003 interface 0004 0005 {$IFDEF WINDOWS} 0006 uses 0007 SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, 0008 Forms, Dialogs, 0009 Run, Main, Bitmaps; 0010 {$ELSE} 0011 uses 0012 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, 0013 ExtCtrIs, StdCtris, 0014 Run, Main, Bitmaps; 0015 {$ENDIF} 0016 {-------------------------} 0017 procedure Buttonsinitialize; 0018 procedure ButtonsExit; 0019 procedure ButtonsMouseDownExitCheck; 0020 procedure ButtonsMouseDown; 0021 procedure ButtonsMouseUp; 0022 procedure ButtonsForceNone; 0023 procedure ButtonsForcePlay; 0024 procedure ButtonsForcePause; 0025 procedure ButtonsForceStop; 0026 0027 implementation 0028 0029 var 0030 spritePlayUp, 0031 spritePlayDown, 0032 spritePauseUp, 0033 spritePauseDown, 0034 spriteResumeUp, 0035 spriteResumeDown, 0036 spriteStopUp, SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 21 0037 spriteStopDown, 0038 spriteEjectUp, 0039 spriteEjectDown, 0040 spriteRandomUpOn, 0041 spriteRandom_DownOn, 0042 spriteRandomUpOff, 0043 spriteRandom_DownOff, 0044 spriteExitUp, 0045 spriteExitDown, 0046 spritelnfoUp, 0047 spriteInfoDown, 0048 spriteWords_Up, 0049 spriteWordsDown, 0050 spriteTracks_Up, 0051 spriteTracksDown, 0052 spritePrintUp, 0053 spritePrintDown, 0054 spriteVideoUp, 0055 spriteVideoDown, 0056 spriteCommentaryUp, 0057 spriteCommentaryDown: TSprite; 0058 bButtonsMouseDown: boolean; 0059 0060 { Main code } 0061 0062 procedure ButtonsMouseDownExitCheck; 0063 begin 0064 if BitmapHit(spriteExitUp) then begin 0065 bButtonsMouseDown := true; 0066 BitmapDraw(spriteExitDown); 0067 frmRun.ExitPressed 0068 end 0069 end; 0070 {-----------------------------} 0071 procedure ButtonsMouseDown; 0072 begin 0073 case ePlayButtonState of 0074 bsPLAY: If BitmapHit(spritePlayUp) then begin 0075 bButtonsMouseDown := true; SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 22 0076 BitmapDraw(spritePlayDown); 0077 BitmapDraw(spriteSTOPUp); 0078 eStopButtonState := bsSTOP; 0079 frmRun.PlayPressed; 0080 exit 0081 end; 0082 bsPAUSE: if BitmapHit(spritePauseUp) then begin 0083 bButtonsMouseDown := true; 0084 BitmapDraw(spritePauseDown); 0085 frmRun.PausePressed; 0086 exit 0087 end; 0088 bsRESUME: if BitmapHit(spriteResumeUp) then begin 0089 bButtonsMouseDown := true; 0090 BitmapDraw(spriteResumeDown); 0091 frmRun.ResumePressed; 0092 exit 0093 end 0094 end; 0095 case eStopButtonState of 0096 bsEJECT: if BitmapHit(spriteEject Up) then begin 0097 bButtonsMouseDown := true; 0098 BitmapDraw(spriteEjectDown); 0099 frmRun.EjectPressed; 0100 exit 0101 end; 0102 bsSTOP: if BitmapHit(spriteStopUp) then begin 0103 bButtonsMouseDown := true; 0104 BitmapDraw(spriteStopDown); 0105 BitmapDraw(spritePlayUp); 0106 ePlayButtonState := bsPLAY; 0107 frmRun.StopPressed; 0108 exit 0109 end; 0110 end; 0111 case eRandomButtonState of 0112 bsRANDOMON: if BitmapHit(spriteRandomUpOn) then begin 0113 bButtonsMouseDown := true; 0114 BitmapDraw(spriteRandomDownOff); 0115 eRandomButtonState := bsRANDOMOFF; 0116 exit SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCTIUS98/10035 23 0117 end; 0118 bsRANDOMOFF: if BitmapHit(spriteRandomUpOn) then begin 0119 bButtonsMouseDown := true; 0120 BitmapDraw(spriteRandom_DownOn); 0121 eRandomButtonState:= bsRANDOMON; 0122 exit 0123 end 0124 end; 0125 if BitmapHit(spritelnfoUp) then 0126 if eTubeModeState<>tm INFO then begin 0127 bButtonsMouseDown := true; 0128 BitmapDraw(spriteinfoDown); 0129 BitmapDraw(spriteWords Up); 0130 BitmapDraw(spriteTracksUp); 0131 eTubeModeState := tmINFO; 0132 frmRun.ModeSetlnfo; 0133 exit 0134 end; 0135 if BitmapHit(spriteWordsUp) then 0136 if eTubeModeState<>tmWORDS then begin 0137 bButtonsMouseDown := true; 0138 BitmapDraw(spritelnfoUp); 0139 BitmapDraw(spriteWordsDown); 0140 BitmapDraw(spriteTracksUp); 0141 eTubeModeState:= tmWORDS; 0142 frmRun.ModeSetWords; 0143 exit 0144 end; 0145 if BitmapHit(spriteTracksUp) then 0146 if eTubeModeState<>tmTRACKS then begin 0147 bButtonsMouseDown := true; 0148 BitmapDraw(spriteinfoUp); 0149 BitmapDraw(spriteWords Up); 0150 BitmapDraw(spriteTracks_Down); 0151 eTubeModeState := tmTRACKS; 0152 frmRun.ModeSetTracks; 0153 exit 0154 end; 0155 if BitmapHit(spritePrint Up) then begin 0156 bButtonsMouseDown := true; 0157 BitmapDraw(spritePrintDown); SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 24 0158 exit 0159 end; 0160 if BitmapHit(spriteVideoUp) then begin 0161 bButtonsMouseDown := true; 0162 BitmapDraw(spriteVideoDown); 0163 exit 0164 end; 0165 if BitmapHit(spriteCommentaryUp) then begin 0166 bButtonsMouseDown := true; 0167 BitmapDraw(spriteCommentaryDown); 0168 exit 0169 end; 0170 end; 0171 {--------------------------------------) 0172 procedure ButtonsMouseUp; 0173 begin 0174 if not bButtonsMouseDown then 0175 exit; 0176 bButtonsMouseDown := false; 0177 case ePlayButtonState of 0178 bsPLAY: if BitmapHit(spritePlayUp) then begin 0179 BitmapDraw(spritePauseUp); 0180 ePlayButtonState := bsPAUSE; 0181 exit 0182 end; 0183 bsPAUSE: if BitmapHit(spritePauseUp) then begin 0184 BitmapDraw(spriteResumeUp); 0185 ePlayButtonState:= bsRESUME; 0186 exit 0187 end; 0188 bsRESUME: if BitmapHit(spriteResumeUp) then begin 0189 BitmapDraw(spritePauseUp); 0190 ePlayButtonState:= bsPAUSE; 0191 exit 0192 end; 0193 end; 0194 case eStopButtonState of 0195 bsEJECT: if BitmapHit(spriteEjectUp) then begin 0196 BitmapDraw(spriteEjectUp); 0197 exit 0198 end; SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 25 0199 bsSTOP: if BitmapHit(spriteStopUp) then begin 0200 BitmapDraw(spriteEject Up); 0201 eStopButtonState := bsEJECT; 0202 exit 0203 end; 0204 end; 0205 case eRandomButtonState of 0206 bsRANDOM ON: if BitmapHit(spriteRandomUpOn) then begin 0207 BitmapDraw(spriteRandomUpOn); 0208 exit 0209 end; 0210 bsRANDOMOFF: if BitmapHit(spriteRandomUpOn) then begin 0211 BitmapDraw(spriteRandomUpOff); 0212 exit 0213 end; 0214 end; 0215 if BitmapHit(spritePrintUp) then begin 0216 BitmapDraw(spritePrintUp); 0217 frmRun.PrintPressed; 0218 exit 0219 end; 0220 if BitmapHit(spriteVideoUp) then begin 0221 BitmapDraw(spriteVideo Up); 0222 frmRun.VideoPressed; 0223 exit 0224 end; 0225 if BitmapHit(spriteCommentaryUp) then begin 0226 BitmapDraw(spriteCommentaryUp); 0227 frmRun.CommentaryPressed; 0228 exit 0229 end 0230 end; 0231 0232 { Change button state } 0233 0234 procedure ButtonsForceNone; 0235 begin 0236 if bButtonsMouseDown then 0237 exit; SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 26 0238 BitmapDraw(spriteTracks Up); 0239 BitmapDraw(spriteWords Up); 0240 BitmapDraw(spritelnfoUp) 0241 end; 0242 { -------------------------- } 0243 procedure ButtonsForcePlay; 0244 begin 0245 if bButtonsMouseDown then 0246 exit; 0247 BitmapDraw(spritePauseUp); 0248 ePlayButtonState := bsPAUSE; 0249 BitmapDraw(spriteStopUp); 0250 eStopButtonState := bsSTOP; 0251 end; 0252 {-----------------------} 0253 procedure ButtonsForcePause; 0254 begin 0255 if bButtonsMouseDown then 0256 exit; 0257 BitmapDraw(spriteResumeUp); 0258 ePlayButtonState := bsRESUME; 0259 BitmapDraw(spriteStopUp); 0260 eStopButtonState := bsSTOP; 0261 end; 0262 {------ --------------------------------- } 0263 procedure ButtonsForceStop; 0264 begin 0265 if bButtonsMouseDown then 0266 exit; 0267 BitmapDraw(spritePlayUp); 0268 ePlayButtonState := bsPLAY; 0269 BitmapDraw(spriteEjectUp); 0270 eStopButtonState := bsEJECT; 0271 end; 0272 0273 { Initalize / Exit } 0274 0275 procedure Buttonsinitialize; 0276 begin SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 27 0277 BitmapCreate(spritePlayUp, frmMain.imgPlayUp, true); 0278 BitmapCreate(spritePlayDown, frmMain.imgPiayDown, true); 0279 BitmapCreate(spritePauseUp, frmMain.imgPauseUp, true); 0280 BitmapCreate(spritePauseDown, frmMain.imgPauseDown, true); 0281 BitmapCreate(spriteResumeUp, frmMain.imgResumeUp, true); 0282 BitmapCreate(spriteResumeDown, frmMain.imgResumeDown, true); 0283 BitmapCreate(spriteStopUp, frmMain.imgStopUp, true); 0284 BitmapCreate(spriteStopDown, frmMain.imgStopDown, true); 0285 BitmapCreate(spriteEjectUp, frmMain.imgEjectUp, true); 0286 BitmapCreate(spriteEjectDown, frmMain.imgEjectDown, true); 0287 BitmapCreate(spriteRandomUpOn, frmMain.imgRandomUpOn, true); 0288 BitmapCreate(spriteRandomDownOn, frmMain.imgRandom_DownOn, true); 0289 BitmapCreate(spriteRandomUpOff, frmMain.imgRandomUpOff, true); 0290 BitmapCreate(spriteRandomDownOff, frmMain.imgRandomDownOff, true); 0291 BitmapCreate(spriteExitUp, frmMain.imgExitUp, true); 0292 BitmapCreate(spriteExitDown, frmMain. imgExitDown, true); 0293 BitmapCreate(spritelnfo Up, frmMain.imglnfo_- Up, true); 0294 BitmapCreate(spritelnfoDown, frmMain.imgInfoDown, true); 0295 BitmapCreate(spriteWords Up, frmMain.imgWords_Up, true); 0296 BitmapCreate(spriteWords_Down, frmMain.imgWordsDown, true); 0297 BitmapCreate(spriteTracksUp, frmMain.imgTracksUp, true); 0298 BitmapCreate(spriteTracksDown, frmMain. imgTracksDown, true); 0299 BitmapCreate(spritePrintUp, frmMain.imgPrintUp, true); 0300 BitmapCreate(spritePrintDown, frmMain.imgPrintDown, true); 0301 BitmapCreate(spriteVideoUp, frmMain.imgVideoUp, true); 0302 BitmapCreate(sprteVideo_Down, frmMain.imgVideoDown, true); 0303 BitmapCreate(spriteCommentaryUp, frmMain.imgCommentaryUp, true); 0304 BitmapCreate(spriteCommentaryDown, frmMain.imgCommentary_Down, true); 0305 BitmapDraw(spritePlayUp); 0306 BitmapDraw(spriteEjectUp); 0307 BitmapDraw(spriteRandomUpOff); 0308 BitmapDraw(spriteExitUp); 0309 BitmapDraw(spritelnfoUp); 0310 BitmapDraw(spriteWordsUp); 0311 BitmapDraw(spriteTracksUp); 0312 BitmapDraw(spritePrint Up); 0313 BitmapDraw(spriteVideoUp); 0314 BitmapDraw(spriteCommentaryUp); 0315 ePlayButtonState bsPLAY; 0316 eStopButtonState bsEJECT; 0317 eRandomButtonState:= bsRANDOMOFF; SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 28 0318 eTubeModeState:= tmINTRO; 0319 bButtonsMouseDown := false 0320 end; 0321 {--------------------------} 0322 procedure ButtonsExit; 0323 begin 0324 BitmapDestroy(spritePlayUp); 0325 BitmapDestroy(spritePlayDown); 0326 BitmapDestroy(spritePause Up); 0327 BitmapDestroy(spritePauseDown); 0328 BitmapDestroy(spriteResume Up); 0329 BitmapDestroy(spriteResumeDown); 0330 BitmapDestroy(spriteStopUp); 0331 BitmapDestroy(spriteStopDown); 0332 BitmapDestroy(spriteEject Up); 0333 BitmapDestroy(spriteEjectDown); 0334 BitmapDestroy(spriteRandomUpOn); 0335 BitmapDestroy(spriteRandomDownan); 0336 BitmapDestroy(spriteRandomUpOff); 0337 BitmapDestroy(spriteRandomDownOff); 0338 BitmapDestroy(spriteExitUp); 0339 BitmapDestroy(spriteExitDown); 0340 BitmapDestroy(spritelnfoUp); 0341 BitmapDestroy(spritelnfo Down); 0342 BitmapDestroy(spriteWordsUp); 0343 BitmapDestroy(spriteWordsDown); 0344 BitmapDestroy(spriteTracks Up); 0345 BitmapDestroy(spriteTracks_Down); 0346 BitmapDestroy(spritePrintUp); 0347 BitmapDestroy(spritePrintDown); 0348 BitmapDestroy(spriteVideoUp); 0349 BitmapDestroy(spriteVideoDown); 0350 BitmapDestroy(spriteCommentaryUp); 0351 BitmapDestroy(spriteCommentaryDown) 0352 end; 0353 end. SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 29 0001 unit Bitmaps; 0002 0003 interface 0004 0005 {$IFDEF WINDOWS} 0006 uses 0007 SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, 0008 Forms, Dialogs, ExtCtris, 0009 Run, Main, SysFig; 0010 {$ELSE} 0011 uses 0012 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, 0013 ExtCtris, StdCtrIs, 0014 Run, Main, SysFig; 0015 {$ENDIF} 0016 {-----------------------------} 0017 type 0018 TSprite = record 0019 Left, Top: longint; 0020 Width, Height: longint; 0021 bUseMask: boolean; 0022 Image: TBitmap; 0023 Mask: TBitmap 0024 end; 0025 pTSprite = TSprite; 0026 {-----------------------} 0027 procedure BitmapCreate(var Sprite: TSprite; imglmage: Timage; UseMask: boolean); 0028 procedure BitmapDestroy(var Sprite: TSprite); 0029 procedure BitmapOverlay(Bitmap: TBitmap; var Sprite, SpriteOffset: TSprite); 0030 procedure BitmapDraw(var Sprite: TSprite); 0031 procedure BitmapUpdateScreen(Rect: TRect); 0032 function BitmapHit(var Sprite: TSprite): boolean; 0033 0034 implementation 0035 0036 SUBSTITUTE SH EET (RULE 26) WO 98/52189 PCT/US98/10035 30 0037 { Code } 0038 0039 procedure BitmapCreate(var Sprite: TSprite; imglmage: Timage; UseMask: boolean); 0040 var 0041 1: string[50]; 0042 p: integer; 0043 begin 0044 := imglmage.Hint; 0045 p:= Pos(',',1); 0046 Sprite.Left := StrTolnt(Copy(I,1,p-1)); 0047 1 := Copy(I,p+1,99); 0048 p:= Pos(,',1); 0049 if p=0 then begin 0050 Sprite.Top := StrToint(); 0051 imglmage.Hint := "; 0052 end 0053 else begin 0054 Sprite.Top := StrToint(Copy(,1,p-1)); 0055 imglmage.Hint := Copy(1,p+1,99) 0056 end; 0057 with Sprite do begin 0058 Width := imglmage.Width; 0059 Height := imgImage.Height; 0060 Image := TBitmap.Create; 0061 Image.Assign(imglmage.Picture.Bitmap); 0062 bUseMask := UseMask 0063 end; 0064 if UseMask then begin 0065 with Sprite do begin 0066 Mask := TBitmap.Create; 0067 Mask.Width := Width+1; 0068 Mask.Height := Height 0069 end; 0070 with Sprite.Mask.Canvas do begin 0071 Brush.Color := clBlack; 0072 Brush.Style := bsSolid; 0073 BrushCopy(ClipRect, imgImage.Picture.Bitmap, ClipRect, TRANSPARENT-COLOR) 0074 end; 0075 with Sprite.Image.Canvas do begin 0076 Brush.Color := clWhite; SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 31 0077 Brush.Style := bsSolid; 0078 BrushCopy(ClipRect, imgImage.Picture.Bitmap, ClipRect, TRANSPARENTCOLOR); 0079 end; 0080 with Sprite do 0081 BitBIt(Mask.Canvas.Handle, 0, 0, Width, Height, 0082 Image.Canvas.Handle, 0, 0, MERGEPAINT) 0083 end 0084 end; 0085 {---------------------} 0086 procedure BitmapDestroy(var Sprite: TSprite); 0087 begin 0088 with Sprite do begin 0089 Image.Free; 0090 if bUseMask then 0091 Mask.Free; 0092 end 0093 end; 0094 {---------------------------} 0095 procedure BitmapOverlay(Bitmap: TBitmap; var Sprite, SpriteOffset: TSprite); 0096 var 0097 iLeft, iTop: longint; 0098 begin 0099 with Sprite do begin 0100 if @SpriteOffset=nil then begin 0101 iLeft := Left; 0102 iTop:= Top 0103 end 0104 else begin 0105 iLeft := Left-SpriteOffset.Left; 0106 iTop := Top-SpriteOffset.Top 0107 end; 0108 if bUseMask then begin 0109 BitBt(Bitmap.Canvas.Handle, iLeft+1, iTop, Width-1, Height, 0110 Mask.Canvas.Handle, 1, 0, srcPAINT); 0111 BitBit(Bitmap.Canvas.Handle, iLeft+1, iTop, Width-1, Height, 0112 Image.Canvas.Handle, 1, 0, srcAND) 0113 end 0114 else begin 0115 BitBit(Bitmap.Canvas.Handle, iLeft+1, iTop, Width-1, Height, 0116 Image.Canvas.Handle, 1, 0, srcCOPY) 0117 end SUBSTITUTE SH EET (RULE 26) WO 98/52189 PCTIUS98/10035 32 0118 end; 0119 end; 0120 {------------------------------ 0121 procedure BitmapDraw(var Sprite: TSprite); 0122 var 0123 SpriteRect: TRect; 0124 begin 0125 with Sprite do begin 0126 BitmapOverlay(bmpPlayer, Sprite, TSprite(nilA)); 0127 SpriteRect := Bounds(Left, Top, Width, Height); 0128 BitmapUpdateScreen(SpriteRect) 0129 end 0130 end; 0131 { ------------------------------ } 0132 procedure BitmapUpdateScreen(Rect: TRect); 0133 begin 0134 with frmRun.Canvas do begin 0135 if bVideo256 then begin 0136 SelectPalette(Handle, bmpPalette.Palette, false); 0137 RealizePalette(Handle) 0138 end; 0139 BitBlt(frmRun.Canvas.Handle, Rect.Left, Rect.Top, 0140 Rect.Right-Rect.Left+ 1, Rect.Bottom-Rect.Top+1, 0141 bmpPlayer.Canvas.Handle, Rect.Left, Rect.Top, srcCOPY); 0142 end; 0143 end; 0144 {----------------------------} 0145 function BitmapHit(var Sprite: TSprite): boolean; 0146 var 0147 x, y: longint; 0148 begin 0149 result := false; 0150 with Sprite do begin 0151 x := iMouseDownX-Left; 0152 y := iMouseDownY-Top; 0153 if (x<0) or (x-Width-1 >0) then 0154 exit; 0155 if (y<O) or (y-Height-1>0) then 0156 exit; 0157 if bUseMask then 0158 result := (Mask.Canvas.Pixels[x,y]=clWhite) SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 33 0159 else 0160 result true 0161 end; 0162 end; 0163 end. SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 34 0001 unit CDPlayer; 0002 0003 interface 0004 0005 {$lFDEF WINDOWS} 0006 uses 0007 SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, 0008 Forms, Dialogs, ExtCtrils, MPlayer, 0009 Run, Main, Logging; 0010 {$ELSE} 0011 uses 0012 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, 0013 ExtCtrls, StdCtrls, MPlayer, 0014 Run, Main, Logging; 0015 ($ENDIF} 0016 {---------------------} 0017 var 0018 iAudioTracks: longint; 0019 iAudioTrackStart, iAudioTrackLength: array [1..MAXTRACKS] of longint; 0020 iStatsCDStart, iStatsCDLength: longint; 0021 iStatsTrackStart, iStatsTrackLength: array [1..MAXTRACKS] of longint; 0022 iStatsPlayed: array [1..MAXTRACKS] of longint; 0023 bTrackEnabled: array [1..MAXTRACKS] of boolean; 0024 eCDPlayerState: (psERROR, psNOCD, psPLAYING, psSTOPPED, psPAUSED, psOPEN); 0025 iPausedTime: longint; 0026 iHoldOffUpdate: longint; 0027 iPlayTimeout: longint; 0028 {----- ------------------ } 0029 procedure Playerinitialize; 0030 procedure PlayerTimerTick; 0031 procedure PlayerEject; 0032 procedure PlayerStop; 0033 procedure PlayerPlay(start: TLogStart; TrackTime: longint); 0034 procedure PlayerPause; 0035 procedure PlayerResume; 0036 procedure PlayerGetTrackAndTime( var TrackNo, TrackTime: longint); 0037 0038 implementation SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 35 0039 0040 procedure PlayerEject; 0041 begin 0042 frmRun.MouseDissable; 0043 eCDPlayerState := psNOCD; 0044 with frmRun.mmCDPlayer do begin 0045 TimeFormat:= tfMilliseconds; 0046 LoggingLoglt(lePLAY, (Position div 100) - iAudioTrackStart[iLastTrackNo]); 0047 try 0048 Wait:= true; 0049 Notify := false; 0050 Stop 0051 except 0052 end; 0053 try 0054 Wait:= true; 0055 Notify := false; 0056 Close 0057 except 0058 end; 0059 try 0060 Wait := false; 0061 Notify := false; 0062 Eject 0063 except 0064 end 0065 end; 0066 frmRun.MouseEnable 0067 end; 0068 {----------------xxx-----------------------------} 0069 procedure PlayerStop; 0070 begin 0071 frmRun.MouseDissable; 0072 eCDPlayerState:= psSTOPPED; 0073 with frmRun.mmCDPlayer do begin 0074 TimeFormat:= tfMilliseconds; 0075 LoggingLogit(lePLAY, (Position div 100) - iAudioTrackStart[iLastTrackNo]); 0076 try 0077 Wait := true; 0078 Notify := false; SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCTIUS98/10035 36 0079 Stop 0080 except 0081 end 0082 end; 0083 frmRun.MouseEnable 0084 end; 0085 {-------------------} 0086 procedure PlayerPlay(start: TLogStart; TrackTime: longint); 0087 begin 0088 frmRun.MouseDissable; 0089 eCDPlayerState := psSTOPPED; 0090 with frmRun.mmCDPlayer do begin 0091 TimeFormat:= tfMilliseconds; 0092 LoggingLogit(lePLAY, (Position div 100) - iAudioTrackStart[iLastTrackNo]); 0093 if Mode=mpOpen then begin 0094 frmRun.ErrorMessage('There is no CD in the drive to play!'); 0095 eCDPlayerState := psOPEN; 0096 frmRun.MouseEnable; 0097 exit 0098 end; 0099 try 0100 Wait := true; 0101 Notify := false; 0102 Stop 0103 except 0104 end; 0105 try 0106 TimeFormat:= tfMilliseconds; 0107 Position := 100*(iAudioTrackStart[iLastTrackNo] + TrackTime); 0108 Wait := false; 0109 Notify := false; 0110 Play; 0111 except 0112 frmRun.ErrorMessage('There is a problem trying to play the CD!'); 0113 frmRun.MouseEnable; 0114 exit 0115 end; 0116 iPlayTimeout := 20; 0117 while (Mode<>mpPLAYlNG) do 0118 if (iPlayTimeout=0) then begin 0119 frmRun.ErrorMessage('There is a problem tryIng to play the CD!); SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 37 0120 try 0121 Wait := false; 0122 Notify := false; 0123 Open 0124 except 0125 end; 0126 frmRun.MouseEnable; 0127 exit 0128 end 0129 end; 0130 LoggingEvent(lePLAY, start, iLastTrackNo, TrackTime); 0131 iHoldOffUpdate:= MCITODISPLAYHOLDOFF; 0132 eCDPlayerState:= psPLAYING; 0133 frmRun.MouseEnable 0134 end; 0135 (------------------------} 0136 procedure PlayerPause; 0137 begin 0138 frmRun.MouseDissable; 0139 eCDPlayerState:= psPAUSED; 0140 with frmRun.mmCDPlayer do begin 0141 TimeFormat := tfMilliseconds; 0142 LoggingLoglt(leVIDEO, (Position div 100) - iAudioTrackStart[iLastTrackNo]); 0143 try 0144 TimeFormat := tfMilliseconds; 0145 iPausedTime := (Position div 100) - iAudioTrackStart[iLastTrackNo]; 0146 Wait := true; 0147 Notify := false; 0148 Stop 0149 except 0150 end 0151 end; 0152 frmRun.MouseEnable 0153 end; 0154 {-------------------------} 0155 procedure PlayerResume; 0156 begin 0157 with frmRun.mmCDPlayer do begin 0158 TimeFormat := tfMilliseconds; 0159 LoggingLoglt(lePLAY, (Position div 100) - iAudioTrackStart[iLastTrackNo]) 0160 end; SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 38 0161 PlayerPlay(IsRESUME, iPausedTime) 0162 end; 0163 {------- ---- -------------- } 0164 procedure PlayerGetTrackAndTime( var TrackNo, TrackTime: longint); 0165 var 0166 iTrack: longint; 0167 begin 0168 with frmRun.mmCDPlayer do begin 0169 TimeFormat := tfMilliseconds; 0170 TrackNo := iAudioTracks; 0171 TrackTime := Position div 100; 0172 for iTrack:= 2 to iAudioTracks do 0173 if iAudioTrackStart[iTrack]>TrackTime then begin 0174 TrackNo := iTrack-1; 0175 break 0176 end; 0177 TrackTime := TrackTime-iAudioTrackStart[TrackNo] 0178 end 0179 end; 0180 0181 { Initalize / Exit } 0182 0183 procedure PlayerTimerTick; 0184 begin 0185 if iHoldOffUpdate>0 then 0186 Dec(iHoldOffUpdate); 0187 if iPlayTimeout>0 then 0188 Dec(iPlayTimeout) 0189 end; 0190 0191 { Initalize /Exit } 0192 0193 procedure Playerinitialize; 0194 var 0195 iTrack: longint; 0196 begin 0197 frmRun.MouseDissable; SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 39 0198 eCDPlayerState:= psNOCD; 0199 with frmRun.mmCDPlayer do begin 0200 if Mode=mpPlaying then 0201 try 0202 Wait:= true; 0203 Notify := false; 0204 Stop 0205 except 0206 end; 0207 try 0208 DeviceType := dtCDAudio; 0209 Wait := true; 0210 Notify := false; 0211 Open; 0212 except 0213 frmRun.SevereError('The CD drive is already in use or not working!'); 0214 exit 0215 end; 0216 if Mode=mpPlaying then 0217 try 0218 Wait := true; 0219 Notify := false; 0220 Stop 0221 except 0222 end; 0223 if Mode<>mpSTOPPED then begin 0224 frmRun.SevereError('There is no CD in the drive to play!'); 0225 exit 0226 end; 0227 TimeFormat := tfMilliseconds; 0228 iStatsCDStart := Start; 0229 iStatsCDLength := Length; 0230 for iTrack := 1 to iAudioTracks do begin 0231 iStatsTrackStart[iTrack] := TrackPosition[iTrack]; 0232 iStatsTrackLength[iTrack] := TrackLength[iTrack]; 0233 iAudioTrackStart[iTrack] := TrackPosition[iTrack] div 100 0234 end 0235 end; 0236 eCDPlayerState:= psSTOPPED; 0237 iHoldOffUpdate := 0; 0238 iPlayTimeout:= 0; SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCTIUS98/10035 40 0239 frmRun.MouseEnable 0240 end; 0241 end. SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 41 0001 unit Comment; 0002 0003 interface 0004 0005 {$IFDEF WINDOWS) 0006 uses 0007 SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, 0008 Forms, Dialogs, ExtCtrs, MPlayer, 0009 Run, Main, CDPlayer, SysFig, Logging; 0010 {$ELSE} 0011 uses 0012 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, 0013 ExtCtrs, StdCtrds, MPlayer, 0014 Run, Main, CDPlayer, SysFig, Logging; 0015 {$ENDIF} 0016 {-------------------} 0017 var 0018 bCommentaryAvailable: array [1..MAXTRACKS] of boolean; 0019 {----------------------- 0020 procedure Commentarylnitialize; 0021 procedure CommentaryStop; 0022 procedure CommentaryPlay(TrackNo: longint); 0023 procedure CommentaryNotify; 0024 0025 implementation 0026 0027 0028 { Main Code } 0029 0030 procedure CommentaryStop; 0031 begin 0032 with frmRun.mmCommentary do begin 0033 TimeFormat := tfMilliseconds; 0034 LoggingLoglt(leCOMMENT, Position div 100); 0035 try SUBSTITUTE SH EET (RULE 26) WO 98/52189 PCT/US98/10035 42 0036 Wait := true; 0037 Notify := false; 0038 Stop 0039 except 0040 end 0041 end 0042 end; 0043 {----------------------} 0044 procedure CommentaryPlay(TrackNo: longint); 0045 begin 0046 with frmRun.mmCommentary do begin 0047 TimeFormat:= tfMilliseconds; 0048 LoggingLogit(leCOMMENT, Position div 100); 0049 try 0050 FileName :=sRunDirectory+'Stuff\Coment'+IntToStr(TrackNo)+'.wav'; 0051 Wait:= true; 0052 Notify := false; 0053 Open; 0054 Wait:= false; 0055 Notify := true; 0056 Play 0057 except 0058 frmRun.ErrorMessage('There is a problem with Commentary playback!'); 0059 exit 0060 end; 0061 LoggingEvent(leCOMMENT, IsOTHER, TrackNo, 0) 0062 end; 0063 end; 0064 {-----------------------------} 0065 procedure CommentaryNotify; 0066 begin 0067 with frmRun.mmCommentary do begin 0068 TimeFormat:= tfMilliseconds; 0069 LoggingLoglt(leCOMMENT, Position div 100) 0070 end 0071 end; 0072 0073 { Initalize / Exit } 0074 SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCTfUS98/10035 43 0075 procedure CommentaryInitialize; 0076 var 0077 fCommentary: TextFile; 0078 iTrack: Integer; 0079 begin 0080 for iTrack := 1 to iAudioTracks do begin 0081 bCommentaryAvailable[iTrack] := true; 0082 try 0083 AssignFile(fCommentary, sRunDirectory+'Stuff\Coment'+IntroStr(iTrack)+'.wav'); 0084 Reset(fCommentary); 0085 CloseFile(fCommentary) 0086 except 0087 bCommentaryAvailable[iTrack] := false 0088 end 0089 end 0090 end; 0091 end. SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 44 0001 unit Counter; 0002 0003 interface 0004 0005 {$IFDEF WINDOWS} 0006 uses 0007 SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, 0008 Forms, Dialogs, 0009 Run, Main, Bitmaps, Tube; 0010 ($ELSE} 0011 uses 0012 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, 0013 ExtCtrls, StdCtrls, 0014 Run, Main, Bitmaps, Tube; 0015 {$ENDIF} 0016 { ---------------------- } 0017 procedure Counterinitialize; 0018 procedure CounterExit; 0019 procedure CounterNewTrack; 0020 procedure CounterSetTime(TrackTime: longint); 0021 { --------------------- } 0022 type 0023 TTrackMS = record 0024 Minutes: longint; 0025 Seconds: longint 0026 end; 0027 ( --- ----------------- } 0028 var 0029 OIdTrackMS: TTrackMS; 0030 spriteCounter: TSprite; 0031 0032 implementation 0033 SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 45 0034 const 0035 COUNTERCOLOR = $OOAOOOOO; 0036 0037 0038 { Code } 0039 0040 procedure CounterNewTrack; 0041 begin 0042 OldTrackMS.Minutes:= -1 0043 end; 0044 {------------------------------------------} 0045 procedure CounterSetTime(TrackTime: longint); 0046 var 0047 TrackMS: TTrackMS; 0048 sTime: string[6]; 0049 CounterRect: TRect; 0050 begin 0051 TrackMS.Minutes := TrackTime div 600; 0052 TrackMS.Seconds := (TrackTime - 600*TrackMS.Minutes) div 10; 0053 if (TrackMS.Minutes=OldTrackMS.Minutes) and 0054 (TrackMS.Seconds=OldTrackMS.Seconds) then 0055 exit; 0056 with bmpPlayer.Canvas do begin 0057 BitmapOverlay(bmpPlayer, spriteCounter, TSprite(niA)); 0058 sTime := IntToStr(TrackMS. Minutes); 0059 if TrackMS.Minutes<10 then 0060 sTime := '0'+sTime; 0061 sTime := sTime+':'; 0062 if TrackMS.Seconds<10 then 0063 sTime := sTime+'0'+IntToStr(TrackMS.Seconds) 0064 else 0065 sTime := sTime+lntToStr(TrackMS.Seconds); 0066 Brush.Style := bsClear; 0067 Font.Size:= lTextFontSize-2; 0068 Font.Color:= COUNTERCOLOR; 0069 Font.Style := 0; 0070 CounterRect := Bounds(spriteCounter. Left, spriteCounter.Top, SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 46 0071 spriteCounter.Width, spriteCounter. Height); 0072 ExtTextOut(Handle, 0073 spriteCounter.Left+2, spriteCounter.Top+4, 0074 0, @CounterRect, Pointer(@sTime[1]), 5, nil); 0075 BitmapUpdateScreen(CounterRect) 0076 end 0077 end; 0078 0079 { Initalize/ Exit } 0080 =} 0081 procedure CounterInitialize; 0082 begin 0083 BitmapCreate(spriteCounter, frmMain.imgCounter, false); 0084 OldTrackMS.Minutes:= -1 0085 end; 0086 {-------------------------} 0087 procedure CounterExit; 0088 begin 0089 BitmapDestroy(spriteCounter) 0090 end; 0091 end. SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 47 0001 unit Info; 0002 0003 interface 0004 0005 {$IFDEF WINDOWS) 0006 uses 0007 SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, 0008 Forms, Dialogs, 0009 Run, Main, CDPlayer, BitBtns, BitBars, Tube, SysFig; 0010 {$ELSE) 0011 uses 0012 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, 0013 ExtCtrls, StdCtrls, 0014 Run, Main, CDPlayer, BitBtns, BitBars, Tube, SysFig; 0015 {$ENDIF) 0016 {--------------------------} 0017 procedure Infolnitialize; 0018 procedure InfoExit; 0019 procedure lnfoNewTrack(TrackNo: longint); 0020 {-------------------------} 0021 var 0022 Thelnfo: array [1..MAXTRACKS] of TTubeList; 0023 0024 implementation 0025 0026 0027 { Code } 0028 0029 procedure InfoNewTrack(TrackNo: longint); 0030 begin 0031 if eTubeModeState=tmINFO then 0032 TubeDisplay(Theinfo[TrackNo]); 0033 TubeSetTopLine(Theinfo[TrackNo], 1) 0034 end; 0035 {==================== ========= ====================================== WO 98/52189 PCTIUS98/10035 48 0036 { Initalize / Exit } 0037 0038 procedure Infolnitialize; 0039 var 0040 fInfo: TextFile; 0041 iTrack: Integer; 0042 I: String[250]; 0043 begin 0044 for iTrack := 1 to iAudioTracks do begin 0045 AssignFile(finfo, sRunDirectory+'Stuff\lnfo'+IntToStr(iTrack)+'.txt'); 0046 Reset(flnfo); 0047 TheInfo[iTrack].TextList := TStringList.Create; 0048 while not Eof(finfo) do begin 0049 ReadLn(flnfo, 1); 0050 TheInfo[iTrack].TextList.AddObject(, nil) 0051 end; 0052 CloseFile(finfo); 0053 TubelnitList(spriteTubeText, Thelnfo[iTrack], -3, 0); 0054 end 0055 end; 0056 {------------------------} 0057 procedure InfoExit; 0058 var 0059 iTrack: Integer; 0060 begin 0061 for iTrack := 1 to iAudioTracks do 0062 if Thelnfo[iTrack].TextList<>nil then 0063 TubeExitList(Theinfo[iTrack]) 0064 end; 0065 end. SUBSTITUTE SH EET (RULE 26) WO 98/52189 PCTIUS98/10035 49 0001 unit IniFig; 0002 0003 interface 0004 0005 {$IFDEF WINDOWS} 0006 uses 0007 WinTypes, WinProcs, SysUtils, Messages, Classes, Controls, Inifiles, Registry, 0008 Run, SysFig; 0009 {$ELSE} 0010 uses 0011 Windows, SysUtils, Messages, Classes, Controls, IniFiles, Registry, 0012 Run, SysFig; 0013 {$ENDIF} 0014 {-------------------------------------------} 0015 function InifigLoad: boolean; 0016 {---------------------} 0017 var 0018 iniCryptPublic: Integer; 0019 iniCryptPrime: Extended; 0020 iniinfoURL, 0021 iniVoteURL: string[200]; 0022 inilnfoFile, 0023 iniVoteFile: string[50]; 0024 iniAppName, 0025 iniAppTitle: string(100]; 0026 iniAlbumHandle, 0027 iniAlbumLabel, 0028 iniAlbumArtist, 0029 iniAlbumName: string[100]; 0030 iniApplicationName, 0031 iniApplicationTitle: string[100]; 0032 iniWallpaper, 0033 iniScreenSaver: string[50]; 0034 iniPlaylntro, 0035 iniAskVote, 0036 iniAskVideo, 0037 iniSendVote, 0038 iniSendinfo: (qfONCE, qfALWAYS, qfNEVER, qfASK); 0039 iniPlayByeBye: boolean; SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCTIUS98/10035 50 0040 iniVoteLimit: integer; 0041 0042 implementation 0043 0044 function InifigLoad: boolean; 0045 var 0046 finiFile: TextFile; 0047 Ini: TiniFile; 0048 Reg: TRegistry; 0049 sKey: string[200]; 0050 sPlayintro, 0051 sAskVote, 0052 sAskVideo, 0053 sSendVote, 0054 sSendinfo: string[20]; 0055 begin 0056 result := false; 0057 try 0058 AssignFile( finiFile, sRunDirectory+'lQPlayer.ini'); 0059 Reset( finiFile); 0060 CloseFile( flniFile); 0061 except 0062 exit 0063 end; 0064 try 0065 Ini := TiniFile.Create( sRunDirectory+'lQPlayer.ini'); 0066 except 0067 exit 0068 end; 0069 try 0070 iniCryptPublic := Ini.ReadInteger('lntemet', 'CryptPublic', -1); 0071 iniCryptPrime := Ini.ReadInteger('lntemet', 'CryptPrime', -1); 0072 inilnfoFile : ni.ReadString('Intemet', 'FileInfo', "); 0073 inilnfoURL := Ini.ReadString('Internet', 'URLInfo', "); 0074 iniVoteFile := Ini.ReadString('Internet', 'FileVote', "); 0075 iniVoteURL := lni.ReadString('Intemet', 'URLVote', "); 0076 iniAlbumHandle := Ini.ReadString('Album', 'Handle', "); 0077 iniAlbumLabel := lni.ReadString('Album', 'Label', "); 0078 iniAlbumArtist : lni.ReadString('Album', 'Artist', "); SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 51 0079 iniAlbumName:= Ini.ReadString('Album', 'Name', "); 0080 iniAppName:= Ini.ReadString('Application', 'Name', "); 0081 iniAppTitle := Ini.ReadString('Application', 'Title', "); 0082 iniWallpaper:= lni.ReadString('Application', 'Wallpaper, "); 0083 iniScreenSaver:= iniWallpaper; 0084 sPlaylntro UpperCase(Ini.ReadString('Application', 'Playintro', ")); 0085 sAskVote UpperCase(lni.ReadString('Application', 'AskVote', ")); 0086 sAskVideo:= UpperCase(Ini.ReadString('Application', 'AskVideo', ")); 0087 sSendVote := UpperCase(Ini.ReadString('Application', 'SendVote', ")); 0088 sSendinfo:= UpperCase(Ini.ReadString('Application', 'Sendinfo', ")); 0089 iniPlayByeBye:= lni.ReadBool('Application', 'PlayBye', false); 0090 iniVoteLimit := Ini.ReadInteger('Application', 'VoteLimit', -1); 0091 except 0092 end; 0093 lni.Free; 0094 if iniCryptPublic=-1 then exit; 0095 if iniCryptPrime=-1 then exit; 0096 if iniCryptPublic=-1 then exit; 0097 if iniinfoFile=" then exit; 0098 if iniinfoURL=" then exit; 0099 if iniVoteURL=" then exit; 0100 if iniVoteFile=" then exit; 0101 if iniAlbumHandle=" then exit; 0102 if iniAlbumLabel=" then exit; 0103 if iniAlbumArtist=" then exit; 0104 if iniAlbumName=" then exit; 0105 if iniAppName=" then exit; 0106 if iniAppTitle=" then exit; 0107 if iniWallpaper=" then exit; 0108 if iniScreenSaver=" then exit; 0109 if sPlaylntro='ONCE' then iniPlaylntro qfONCE 0110 else if sPlaylntro='ALWAYS' then iniPlayintro:= qfALWAYS 0111 else if sPlaylntro='NEVER' then iniPlayintro := qfNEVER 0112 else 0113 exit; 0114 if sAskVote='ONCE' then iniAskVote := qfONCE 0115 else if sAskVote='ALWAYS' then iniAskVote:= qfALWAYS 0116 else if sAskVote='NEVER' then iniAskVote := qfNEVER 0117 else 0118 exit; 0119 if sAskVideo='ONCE' then iniAskVideo:= qfONCE SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 52 0120 else if sAskVideo='ALWAYS' then iniAskVideo:= qfALWAYS 0121 else if sAskVideo='NEVER' then iniAskVideo qfNEVER 0122 else 0123 exit; 0124 if sSendVote='ALWAYS' then iniSendVote:= qfALWAYS 0125 else if sSendVote='NEVER' then iniSendVote:= qfNEVER 0126 else if sSendVote='ASK' then iniSendVote :=qfASK 0127 else 0128 exit; 0129 if sSendInfo='ONCE' then iniSendinfo:= qfONCE 0130 else if sSendInfo='ALWAYS' then iniSendinfo:= qfALWAYS 0131 else if sSendInfo='NEVER' then iniSendinfo :=qfNEVER 0132 else 0133 exit; 0134 if iniVoteLimit=-1 then 0135 exit; 0136 try 0137 Reg := TRegistry.Create 0138 except 0139 exit 0140 end; 0141 Reg.RootKey:= HKEYLOCALMACHINE; 0142 sKey :=\SOFTWARE\Palantir\lQcd\'+iniAlbumHandle+'\Info'; 0143 try 0144 if Reg.OpenKey(sKey,true) then 0145 Reg.WriteString('URL',iniinfoURL+'/append.cgi?file='+inilnfoFile+'&data=') 0146 except 0147 exit 0148 end; 0149 Reg.RootKey:= HKEYLOCALMACHINE; 0150 sKey :='\SOFTWARE\Palantir\lQcd\'+iniAlbumHandle+'\Vote'; 0151 try 0152 if Reg.OpenKey(sKey,true) then 0153 Reg.WriteString('URL',iniVoteURL+'/append.cgi?file='+iniVoteFile+'&data=') 0154 except 0155 exit 0156 end; 0157 result := true 0158 end; 0159 end. SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 53 0001 unit IQAbout; 0002 0003 interface 0004 0005 {$1FDEF WINDOWS} 0006 uses 0007 SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, 0008 Forms, Dialogs, 0009 Run, Main, Tube, Bitmaps, SysFig; 0010 {$ELSE} 0011 uses 0012 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, 0013 ExtCtrls, StdCtrls, 0014 Run, Main, Tube, Bitmaps, SysFig; 0015 {$ENDIF} 0016 {--------------------------------} 0017 procedure Aboutinitialize; 0018 procedure AboutExit; 0019 {----------------------------} 0020 var 0021 spriteTubeCDABout, 0022 spriteTubelQAbout: TSprite; 0023 TheCDAbout: TTubeList; 0024 ThelQAbout: TTubeList; 0025 0026 implementation 0027 0028 0029 { Code 0030 0031 procedure Aboutinitialize; 0032 var 0033 fAbout: TextFile; 0034 1: string[100]; 0035 begin; SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 54 0036 BitmapCreate(spriteTubeCDAbout, frmMain.imgTubeCDAbout, true); 0037 BitmapCreate(spriteTubelQAbout, frmMain.imgTube_IQAbout, true); 0038 TheCDAbout.TextList := TStringList.Create; . 0039 AssignFile(fAbout, sRunDirectory+'Stuff\CDlnfo.txt'); 0040 Reset(fAbout); 0041 while not Eof(fAbout) do begin 0042 ReadLn(fAbout, 1); 0043 TheCDAbout.TextList.AddObject(l, nil) 0044 end; 0045 CloseFile(fAbout); 0046 TubelnitList(spriteTubeCDAbout, TheCDAbout, -3, 0); 0047 ThelQAbout.TextList := TStringList.Create; 0048 AssignFile(fAbout, sRunDirectory+'Stuff\lQlnfo.txt'); 0049 Reset(fAbout); 0050 while not Eof(fAbout) do begin 0051 ReadLn(fAbout, 1); 0052 ThelQAbout.TextList.AddObject(l, nil) 0053 end; 0054 CloseFile(fAbout); 0055 Tubel nitList(spriteTubelQAbout, ThelQAbout, -3, 0) 0056 end; 0057 { ----------------------------------- } 0058 procedure AboutExit; 0059 begin 0060 TubeExitList(ThelQAbout); 0061 TubeExitList(TheCDAbout); 0062 BitmapDestroy(spriteTubeCDAbout); 0063 BitmapDestroy(spriteTubelQAbout) 0064 end; 0065 end. SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 55 0001 unit IQMenu; 0002 0003 interface 0004 0005 {$IFDEF WINDOWS} 0006 uses 0007 SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, 0008 Forms, Dialogs, LMDnonvS, IniFiles, Registry, 0009 Run, Main, Tube, Bitmaps, Wall, Saver, SysFig; 0010 {$ELSE} 0011 uses 0012 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, 0013 ExtCtrls, StdCtrs, LMDnonvS, IniFiles, Registry, 0014 Run, Main, Tube, Bitmaps, Wall, Saver, SysFig; 0015 {$ENDIF} 0016 {----------------------------------------------} 0017 var 0018 TheMenu: TTubeList; 0019 {--------------------------------------------- } 0020 procedure Menunitialize; 0021 procedure MenuExit; 0022 function MenuGetLine(Menultem: longint): longint; 0023 procedure MenuEnableItem(Menultem: longint); 0024 procedure MenuDissableItem(Menultem: longint); 0025 procedure MenuUpdate; 0026 procedure MenuHighlightitem(Menultem: longint); 0027 procedure MenuMouseDown; 0028 procedure MenuMouseMove(X,Y: longint); 0029 procedure MenuTimerTick; 0030 0031 implementation 0032 0033 var 0034 iHintltem: longint; 0035 iHintX, iHintY: longint; 0036 iHintDelayTimer: longint; 0037 sHintMsg: string[250]; SUBSTITUTE SH EET (RULE 26) WO 98/52189 PCTIUS98/10035 56 0038 bHintVisible: boolean; 0039 bInHintArea: boolean; 0040 {=================================------------ ========} 0041 { Main Code } 0042 0043 function MenuGetLine(MenuItem: longint): longint; 0044 var 0045 iLine: longint; 0046 iLastLine: longint; 0047 {pTubeLine: pTTubeLine;} 0048 begin 0049 iLastLine := TheMenu.TextList.Count-1; 0050 {for iLine := 0 to iLastLine do 0051 pTubeLine := pTTubeLine(TheMenu.TextList.Objects[iLine]); 0052 if pTubeLineA.iTimeStamp=Menultem then begin} 0053 for iLine := 0 to iLastLine do 0054 with pTTubeLine(TheMenu.TextList.Objects[iLine])A do 0055 if iTimeStamp=Menultem then begin 0056 result := iLine+1; 0057 exit 0058 end; 0059 frmRun.SevereError('MenuGetLine - line not found!'); 0060 result := 1 0061 end; 0062 { -------------------------- } 0063 procedure MenuEnableltem(Menultem: longint); 0064 begin 0065 TubeSetEnable(TheMenu, MenuGetLine(Menu Item)) 0066 end; 0067 {------------------------- 0068 procedure MenuDissableItem(Menultem: longint); 0069 begin 0070 TubeSetDissable(TheMenu, MenuGetLine(Menultem)) 0071 end; 0072 {----------------------} 0073 procedure MenuHighlightitem(Menultem: longint); 0074 begin 0075 TubeSetAllNormal(TheMenu); 0076 TubeSetHighlight(TheMenu, MenuGetLine(Menu Item)) SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCTIUS98/10035 57 0077 end; 0078 {----------------------------------------------------} 0079 procedure MenuUpdate; 0080 var 0081 menu: TStringList; 0082 iLine, iLastLine: integer; 0083 begin 0084 menu := TheMenu.TextList; 0085 iLastLine := menu.Count-1; 0086 for iLine := 0 to iLastLine do 0087 case pTTubeLine(menu.Objects[iLine]).iTimeStamp of 0088 4: if UsingOurWallpaper and not UsingThisWallpaper(startWallpaperName) then 0089 menu.Strings[iLine] := '{!s12 h15 c020}Previous Wallpaper' 0090 else 0091 menu.Strings[iLinej := '{!s12 h15 c020)lnstall Wallpaper'; 0092 5: if UsingOurSaver and not UsingThisSaver(startScreenSaver) then 0093 menu.Strings[iLine] := '{!s12 h15 c020}Previous Screen Saver' 0094 else 0095 menu.Strings[iLine] := '{!s12 hI5 c020}tnstall Screen Saver'; 0096 7: if UsingWallpaper then 0097 menu.Strings[iLine] := '{!s12 h20 c020}Tum Wallpaper Off' 0098 else 0099 menu.Strings[iLine] := '{!s12 h20 c020}Turn Wallpaper On'; 0100 9: if bHintsEnabled then 0101 menu.Strings[iLine] := '{!s12 h20 c020}Turn Hints Off' 0102 else 0103 menu.Strings[iLine] : '{!s12 h20 c020}Turn Hints On' 0104 end; 0105 TubeRefresh(TheMenu) 0106 end; 0107 0108 { Mouse Handling } 0109 0110 procedure MenuMouseDown; 0111 var 0112 iMenultem: longint; 0113 begin 0114 if eTubeModeState<>tmMENU then 0115 exit; SUBSTITUTE SH EET (RULE 26) WO 98/52189 PCTIUS98/10035 58 0116 iMenultem:= TubeltemHit(iMOuseDownX,iMOuseDownY); 0117 if iMenultem>0 then begin 0118 iHintDelayTimer:= 0; 0119 if bHintVisible then begin 0120 frmRun.blobHint.HideMessage; 0121 bHintVisible := false 0122 end; 0123 frmRun.MenuClicked(iMenultem) 0124 end 0125 end; 0126 {-------------------------------------------------} 0127 procedure MenuMouseMove(X,Y: longint); 0128 var 0129 iltem: longint; 0130 label 0131 exit; 0132 begin 0133 if eTubeModeState<>tmMENU then 0134 goto exit; 0135 iHintX := frmRun.Left+X+5; 0136 iHintY := frmRun.Top+Y-0; 0137 iltem := TubeltemHit(X,Y); 0138 if iltem>0 then begin 0139 if iltem<>iHintitem then begin 0140 if bHintVisible then begin 0141 frmRun.blobHint.HideMessage; 0142 bHintVisible := false 0143 end; 0144 iHintDelayTimer := HINTDELAY; 0145 iHintltem := iltem 0146 end; 0147 exit 0148 end; 0149 exitl: 0150 iHintDelayTimer := 0; 0151 iHintitem := 0; 0152 binHintArea := false; 0153 if bHintVisible then begin 0154 frmRun.blobHint.HideMessage; 0155 bHintVisible := false 0156 end SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 59 0157 end; 0158 {----------------- ------------------- } 0159 procedure MenuTimerTick; 0160 begin 0161 if iHintDelayTimer=0 then 0162 exit; 0163 Dec(iHintDelayTimer); 0164 if iHintDelayTimer=0 then begin 0165 if bHintVisible then 0166 frmRun.blobHint.HideMessage; 0167 iHintLastX:= iHintX; 0168 iHintLastY:= iHintY; 0169 sHintLastMsg := sHintMsg; 0170 frmRun.blobHint.Position := hpAboveRight; 0171 frmRun.blobHint.ShowMessage(sHintMsg, iHintX, iHintY); 0172 bHintVisible := true 0173 end 0174 end; 0175 0176 { Initalize / Exit } 0177 0178 procedure Menuinitialize; 0179 begin; 0180 TheMenu.TextList := TStringList.Create; 0181 TheMenu.TextList.AddObject('{h20}', Pointer(0)); 0182 TheMenu.TextList.AddObject('{!s12 h15 c020}Show CD Infomation', Pointer(1)); 0183 TheMenu.TextList.AddObject('{!sl2 h20 c020)Show IQcd information , Pointer(2)); 0184 TheMenu.TextList.AddObject('{!s12 h20 c020}Play Intro Video', Pointer(3)); 0185 TheMenu.TextList.AddObject('{!s12 h20 c020}Install Wallpaper', Pointer(4)); 0186 if not UsingOurSaver then 0187 TheMenu.TextList.AddObject('{!s12 h15 c020}Install Screen saver', Pointer(5)); 0188 if UsingWallpaper then 0189 TheMenu.TextList.AddObject( '{!sl 2 h20 c020}Turn Wallpaper On', Pointer(7)) 0190 else 0191 TheMenu.TextList.AddObject('{sl2 h20 c020}Turn Wallpaper Off', Pointer(7)); 0192 if not bVideoEnable then begin 0193 TheMenu.TextList.AddObject('{!s12 h15 c020}lnstall Web Link', Pointer(6)); 0194 TheMenu.TextList.AddObject('{!s1 2 hi5 c020}lnstall Active Movie', Pointer(8)) 0195 end SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 60 0196 else 0197 TheMenu.TextList.AddObject('{!s12 h15 c020)lnstall Web Link', Pointer(6)); 0198 TheMenu.TextList.AddObject('{!sl2 h20 c020}Turn Hints Off', Pointer(9)); 0199 TubelnitList(spriteTubeMenu, TheMenu, -3, 8); 0200 sHintMsg 'Click selection to do it.'; 0201 iHintltem 0; 0202 iHintDelayTimer:= 0; 0203 bHintVisible false; 0204 blnHintArea false; 0205 sCurrentWall 0206 sCurrentTile :='0'; 0207 sCurrentSaver :=" 0208 end; 0209 { ----------------------------------------- 0210 procedure MenuExit; 0211 begin 0212 TubeExitList(TheMenu) 0213 end; 0214 end. SUBSTITUTE SH EET (RULE 26) WO 98/52189 PCT/US98/10035 61 program IQPlayer; uses Forms, Run in 'RUN.PAS' {frmRun}, Main in 'MAIN.PAS' {frmMain}, Video in 'VIDEO.PAS' {frmVideo}, Regions in 'REGIONS.PAS', Bitmaps in 'BITMAPS.PAS', BitBars in 'BITBARS.PAS', BitBtns in 'BITBTNS.PAS', ScrolBar in 'SCROLBAR.PAS', TimeBar in 'TIMEBAR.PAS', VolumBar in 'VOLUMBAR.PAS', PlayList in 'PLAYLIST.PAS', Logo in 'LOGO.PAS', Tube in 'TUBE.PAS', Words in 'WORDS.PAS', Tracks in 'TRACKS.PAS', Info in 'INFO.PAS', Counter in 'COUNTER.PAS', Comment in 'COMMENT.PAS', CDPIayer in 'CDPLAYER.PAS', IQMenu in 'IQMenu.pas', IQAbout in 'IQAbout.pas', TrkMedia in 'TrkMedia.pas', QYesNo in 'QYesNo.pas', Wall in 'Wall.pas', Logging in 'Logging.pas', Inifig in 'IniFig.pas', SysFig in 'SysFig.pas', RegFig in 'RegFig.pas', Saver in 'Saver.pas'; {$R *.RES} begin Application.Initialize; Application.CreateForm(TfrmRun, frmRun); Application.Run; end. SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 62 0001 unit Logging; 0002 0003 interface 0004 0005 {$IFDEF WINDOWS} 0006 uses 0007 SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, 0008 Forms, Dialogs, Inifiles, 0009 Run, IniFig, RegFig, SysFig, Wall, Saver; 0010 {$ELSE} 0011 uses 0012 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, 0013 ExtCtrls, StdCtrls, Registry, 0014 Run, IniFig, RegFig, SysFig, Wall, Saver; 0015 {$ENDIF} 0016 {---------------------------------------------------} 0017 type 0018 TLogEvent = (IePLAY, IeVIDEO, leCOMMENT, IeWALL, IeLINK, leSAVER, 0019 IeNONE); 0020 TLogStart = (IsPLAY, IsRESUME, IsTIMEBAR, IsWORDS, IsTRACK, IsNEXT, IsOTHER); 0021 {------------------------------------------------ 0022 procedure Logginginitialize; 0023 procedure LoggingEvent(event: TLogEvent; start: TLogStart; track, timeO: integer); 0024 procedure LoggingLoglt(event: TLogEvent; time: integer); 0025 0026 implementation 0027 0028 uses 0029 CDPlayer; 0030 {-----------------------} 0031 const 0032 sEvents: array [IePLAY..IeNONE] of string = 0033 ('PLAY', 'VIDEO', 'COMMENT', 'iWALL', 'iLINK', 'iSAVER', '?'); 0034 sE2vents: array [IePLAY..IeNONE] of string = 0035 ('Pc', 'Pv', 'Pm', '1w', '1l', 'Is', '?'); 0036 sStarts: array [IsPLAY..IsOTHER] of string = 0037 ('play', 'resume', 'timebar', 'words', 'track', 'next', 'other); SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 63 0038 {------------------ } 0039 var 0040 regFirstRun: string[30]; 0041 Login, LogOut, LogSeq: integer; 0042 logXevent: TLogEvent; 0043 logXstart: TLogStart; 0044 logXtrack: integer; 0045 logXtimeO: integer; 0046 0047 { Code } 0048 0049 procedure LoggingEvent(event: TLogEvent; start: TLogStart; track, timeO: integer); 0050 begin 0051 logXevent:= event; 0052 logXstart start; 0053 logXtrack := track; 0054 logXtimeO:= timeO; 0055 end; 0056 { ------------------------------------------ } 0057 procedure LoggingLogit(event: TLogEvent; time: integer); 0058 var 0059 Reg: TRegistry; 0060 sKey: string[200]; 0061 iTrack: integer; 0062 log: string[250]; 0063 s: string[30]; 0064 begin 0065 if not regVoteEnabled then 0066 exit; 0067 if (Log In-LogOut)>iniVoteLimit then 0068 exit; 0069 if (logXevent=IeNONE) or (logXevent<>event) then 0070 exit; 0071 if logXtimeO<0 then 0072 logXtimeO := 0; 0073 if timel<logXtimeO then 0074 time := logXtimeO; 0075 if timel=logXtimeO then 0076 exit; SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 64 0077 Log := 'v1.00,'+iniAlbumHandle+','+regHandle+ 0078 ','+regFirstRun+','+SysPad(LogSeq,6)+ 0079 ','+regZip+','+regAge+','+regSex+','; 0080 case eTubeModeState of 0081 tmTRACKS: s:= 't'; 0082 tmWORDS: s :='Tw'; 0083 tmlNFO: s:= Ti'; 0084 else 0085 s 'To' 0086 end; 0087 Log Log+s+','; 0088 For iTrack := 1 to iAudioTracks do 0089 if bTrackEnabled[iTrack] then 0090 Log := Log+'E' 0091 else 0092 Log:= Log+'d'; 0093 if WallpaperOursinstalled then 0094 Log Log+',Y' 0095 else 0096 Log Log+',n'; 0097 if UsingWallpaper then 0098 Log:= Log+'Y 0099 else 0100 Log := Log+'n'; 0101 if UsingOurWallpaper then 0102 Log:= Log+'Y' 0103 else 0104 Log := Log+'n'; 0105 if SaverOursinstalled then 0106 Log:= Log+',Y' 0107 else 0108 Log:= Log+',n'; 0109 if UsingSaver then 0110 Log Log+'Y' 0111 else 0112 Log Log+'n'; 0113 if UsingOurSaver then 0114 Log :=Log+'Y' 0115 else 0116 Log Log+'n'; 0117 if regHasTargetPage then SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCTIUS98/10035 65 0118 Log:= Log+',Y,' 0119 else 0120 Log:= Log+',n,'; 0121 Log := Log+sE2vents[logXevent]+SysPad(logXtrack,2)+ 0122 ','+FormatDateTime('yyyy/mm/dd-hh:nn:ss', Now)+ 0123 ','+sEvents[iogXevent]+','+sStarts[logXstart]+','+SysPad(logXtrack,2)+ 0124 ','+IntToStr(logXtime)+','+lntToStr(timel)+','+IntToStr(timel-logXtimeO); 0125 logXevent:= leNONE; 0126 try 0127 Reg := TRegistry.Create 0128 except 0129 exit 0130 end; 0131 Reg.RootKey:= HKEYLOCALMACHINE; 0132 sKey := '\SOFTWARE\Palantir\lQcdV+iniAlbumHandle+'\Vote'; 0133 try 0134 if Reg.OpenKey(sKey,true) then 0135 Reg.WriteString('x'+SysPad(login,9), log); 0136 lnc(login) 0137 except 0138 end; 0139 try 0140 Reg.Writeinteger('In', Login) 0141 {Reg.WriteInteger('Out', LogOut)} 0142 except 0143 end; 0144 Reg.CloseKey; 0145 Reg.Free; 0146 end; 0147 0148 { Initalize / Exit } 0149 0150 procedure LoggingInitialize; 0151 var 0152 Reg: TRegistry; 0153 sKey, sValue: string[200]; 0154 iTrack: integer; 0155 st: string[3]; 0156 begin SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 66 0157 try 0158 Reg := TRegistry.Create 0159 except 0160 exit 0161 end; 0162 Reg.RootKey:= HKEYLOCALMACHINE; 0163 sKey :='\SOFTWARE\Palantir\lQcd\'+iniAlbumHandle; 0164 try 0165 if Reg.OpenKey(sKey,true) then begin 0166 sValue :='FirstRun'; 0167 if not Reg.ValueExists(sValue) then begin 0168 regFirstRun :=FormatDateTime('yyyy/mm/dd-hh:nn:ss', Now); 0169 Reg.WriteString(sValue, regFirstRun) 0170 end 0171 else 0172 regFirstRun :=Reg.ReadString(sValue); 0173 Reg.WriteString('Label',iniAlbumLabel); 0174 Reg.WriteString('Artist',iniAlbumArtist); 0175 Reg.WriteString('Name',iniAlbumName); 0176 Reg.WriteString('Wallpaper',iniWallpaper) 0177 end 0178 except 0179 end; 0180 Reg.RootKey:= HKEYLOCALMACHINE; 0181 sKey :='\SOFTWARE\Palantir\lQcd\'+iniAlbumHandle+'\nfo'; 0182 try 0183 if Reg.OpenKey(sKey,true) then begin 0184 for iTrack := 1 to iAudioTracks do begin 0185 if iTrack<10 then st := '0'+IntToStr(iTrack) 0186 else st := IntToStr(iTrack); 0187 Reg.Writelnteger(st+'-Begin', iStatsTrackStart[iTrack]); 0188 Reg.Writelnteger(st+'-Length', iStatsTrackLength[iTrack]) 0189 end; 0190 Reg.Writelnteger('TotalBegin', iStatsCDStart); 0191 Reg.WriteInteger('TotalLength', iStatsCDLength) 0192 end 0193 except 0194 end; 0195 Reg.RootKey:= HKEYLOCALMACHINE; 0196 sKey '\SOFTWARE\Palantir\lQcd\'+iniAlbumHandle+'\Vote'; 0197 Login 1; SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCTIUS98/10035 67 0198 LogOut:= 1; 0199 try 0200 if Reg.OpenKey(sKey,true) then begin 0201 if Reg.ValueExists('In') then 0202 Login := Reg.Readinteger('In'); 0203 if Reg.ValueExists('Out') then 0204 LogOut:= Reg.Readlnteger('Out'); 0205 Reg.Writeinteger('In', login); 0206 Reg.Writelnteger('Out', logOut); 0207 if Reg.ValueExists('Sequence') then 0208 LogSeq Reg.ReadInteger('Sequence') 0209 else 0210 Logseq 0; 0211 Inc(LogSeq); 0212 Reg.Writelnteger('Sequence', logSeq) 0213 end 0214 except 0215 Login := 1; 0216 LogOut:= 1; 0217 LogSeq := 1 0218 end; 0219 Reg.CloseKey; 0220 Reg.Free; 0221 logXevent:= leNONE 0222 end; 0223 end. SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 68 0001 unit Logo; 0002 0003 interface 0004 0005 {$IFDEF WINDOWS) 0006 uses 0007 SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, 0008 Forms, Dialogs, 0009 Run, Main, Tube, Bitmaps, BitBtns; 0010 {$ELSE) 0011 uses 0012 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, 0013 ExtCtrls, StdCtrls, 0014 Run, Main, Tube, Bitmaps, BitBtns; 0015 {$ENDIF} 0016 {------------------------} 0017 procedure Logolnitialize; 0018 procedure LogoExit; 0019 procedure LogoMouseMove(X,Y: longint); 0020 procedure LogoMouseDown; 0021 (-------------------- 0022 var 0023 bLogoDown: boolean; 0024 spriteLogoUp, spriteLogoDown: TSprite; 0025 0026 implementation 0027 0028 0029 { Local Routines 0030 0031 function LogoHit(X,Y: longint): boolean; 0032 begin 0033 with spriteLogoUp do 0034 Result := ((X>=Left) and (X<=Left+Width-1) and (Y>=Top) and (Y<=Top+Height-1)) 0035 end; SUBSTITUTE SH EET (RULE 26) WO 98/52189 PCT/US98/10035 69 0036 0037 { Main Code } 0038 0039 procedure LogoMouseMove(X,Y: longint); 0040 var 0041 LogoRect: Trect; 0042 begin 0043 with spriteLogoUp do 0044 LogoRect:= Bounds(Left,Top,Width,Height); 0045 if LogoHit(X,Y) then begin 0046 if not bLogoDown then 0047 BitmapOverlay(bmpPlayer, spriteLogoDown, TSprite(niA)); 0048 BitmapUpdateScreen(LogoRect); 0049 bLogoDown := true 0050 end 0051 else begin 0052 if bLogoDown then 0053 BitmapOverlay(bmpPlayer, spriteLogoUp, TSprite(niA)); 0054 BitmapUpdateScreen(LogoRect); 0055 bLogoDown := false 0056 end 0057 end; 0058 {------------------------ 0059 procedure LogoMouseDown; 0060 begin 0061 if LogoHit(iMouseDownX,iMouseDownY) then 0062 frmRun.LogoClicked 0063 end; 0064 0065 { Initalize / Exit } 0066 0067 procedure Logoinitialize; 0068 begin 0069 BitmapCreate(spriteLogoUp, frmMain.imgLogoUp, true); 0070 BitmapCreate(spriteLogo_Down, frmMain. imgLogoDown, true); 0071 bLogoDown := false 0072 end; SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 70 0073 {---------------------------------------} 0074 procedure LogoExit; 0075 begin 0076 BitmapDestroy(spriteLogDown); 0077 BitmapDestroy(spriteLogoUp) 0078 end; 0079 end. SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 71 0001 unit Main; 0002 0003 interface 0004 0005 {$IFDEF WINDOWS} 0006 uses 0007 SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, 0008 Forms, Dialogs, ExtCtrls; 0009 {$ELSE} 0010 uses 0011 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, 0012 ExtCtrIs, StdCtrIs; 0013 {$ENDIF} 0014 {-----------------------} 0015 type 0016 TfrmMain = class(TForm) 0017 imgExitUp: Timage; 0018 imgExitDown: TImage; 0019 imglnfoUp: TImage; 0020 imglnfoDown: Tlmage; 0021 imgWords Up: Tlmage; 0022 imgWordsDown: Timage; 0023 imgTracksUp: Timage; 0024 imgTracks Down: Timage; 0025 imgPrintUp: Timage; 0026 imgPrintDown: Timage; 0027 imgVideoUp: Timage; 0028 imgVideo Down: Timage; 0029 imgCommentaryUp: Tlmage; 0030 imgCommentaryDown: TImage; 0031 imgPlayUp: Timage; 0032 imgPlayDown: Timage; 0033 imgStopUp: Timage; 0034 imgEjectDown: TImage; 0035 imgStopDown: Timage; 0036 imgEjectUp: Timage; 0037 imgRandomUpOff: TImage; 0038 imgRandomUpOn: TImage; 0039 imgRandomDownOn: TImage; SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 72 0040 imgRandomDownOff: Timage; 0041 imgTimeEndl: Timage; 0042 imgVolumeEnd1: Tlmage; 0043 imgScroll_Rod: Timage; 0044 imgVolumeRod: Timage; 0045 imgTimeRod: Timage; 0046 imgCounter: Timage; 0047 imgPauseUp: Timage; 0048 imgResumeUp: Timage; 0049 imgPauseDown: Timage; 0050 imgResumeDown: Timage; 0051 imgTracksBack: Tlmage; 0052 imgVolumeBack: Timage; 0053 imgScrollBack: Timage; 0054 imgTimeBack: Timage; 0055 imgScrollEndl: Timage; 0056 imgScroll_End2: Timage; 0057 imgScrollButton: Timage; 0058 imgTimeEnd2: Timage; 0059 imgTimeButton: Timage; 0060 imgVolumeEnd2: Timage; 0061 imgVolumeButton: Timage; 0062 imgTracksLedOn: Timage; 0063 imgTracksLedOff: Timage; 0064 imgPlayer: Tlmage; 0065 imgLogoUp: Timage; 0066 imgLogoDown: Timage; 0067 imgTubejIntro: Timage; 0068 imgTubeText: Timage; 0069 imgTubeCDAbout: Timage; 0070 imgTubejlQAbout: Timage; 0071 imgMenuBullet: Timage; 0072 imgPalette: Timage; 0073 imgTracksVideo: Timage; 0074 imgTracksComment: Timage; 0075 imgTracksCyes: Timage; 0076 imgTracksCno: Timage; 0077 imgTracks_Vyes: Timage; 0078 imgTracksVno: Timage; 0079 imgTracksBlock: Timage; 0080 imgTubeMenu: Timage; SUBSTITUTE SH EET (RULE 26) WO 98/52189 PCT/US98/10035 73 0081 imgTbQyesUp: Timage; 0082 imgTbQyesDown: Timage; 0083 imgTbQno_- Up: Timage; 0084 imgTbQnoDown: Timage; 0085 end; 0086 {----------------------------} 0087 var 0088 frmMain: TfrmMain; 0089 0090 implementation 0091 {$R *.DFM} 0092 0093 0094 end. SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCTIUS98/10035 74 0001 unit PlayList; 0002 0003 interface 0004 0005 {$IFDEF WINDOWS} 0006 uses 0007 SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, 0008 Forms, Dialogs, LMDnonvS, 0009 Run, Main, CDPlayer, Tube, BitBtns, SysFig; 0010 {$ELSE} 0011 uses 0012 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, 0013 ExtCtrs, StdCtrs, LMDnonvS, 0014 Run, Main, CDPlayer, Tube, BitBtns, SysFig; 0015 {$ENDIF} 0016 {-----------------------} 0017 procedure PlayListinitialize; 0018 procedure PlayListExit; 0019 procedure PlayListNewTrack(TrackNo: longint); 0020 procedure PlayListTrackEnable(TrackNo: longint); 0021 procedure PlayListTrackDissable(TrackNo: longint); 0022 procedure PlayListMouseDown; 0023 procedure PlayListMouseMove(X,Y: longint); 0024 procedure PlayListTimerTick; 0025 {-----------------------} 0026 var 0027 ThePlayList: TTubeList; 0028 0029 implementation 0030 0031 var 0032 iHintltem: longint; 0033 iHintX, iHintY: longint; 0034 iHintDelayTimer: longint; 0035 sHintMsg: string[250]; 0036 bHintVisible: boolean; 0037 bInHintArea: boolean; SUBSTITUTE SH EET (RULE 26) WO 98/52189 PCT/US98/10035 75 0038 0039 { Main Code . } 0040 0041 procedure PlayListNewTrack(TrackNo: longint); 0042 begin 0043 TubeSetAllNormal(ThePlayList); 0044 TubeSetHighlight(ThePlayList, TrackNo); 0045 if eTubeModeState=tmTRACKS then 0046 TubeDisplay(ThePlayList) 0047 end; 0048 { --------------------------------- } 0049 procedure PlayListTrackEnable(TrackNo: longint); 0050 begin 0051 TubeSetEnable(ThePlayList, TrackNo); 0052 end; 0053 {------------------------------} 0054 procedure PlayListTrackDissable(TrackNo: longint); 0055 begin 0056 TubeSetDissable(ThePlayList, TrackNo); 0057 frmRun.TrackDissable(TrackNo) 0058 end; 0059 0060 { Mouse Handling } 0061 0062 procedure PlayListMouseDown; 0063 var 0064 iTrack: longint; 0065 begin 0066 if eTubeModeState<>tmTRACKS then 0067 exit; 0068 iTrack:= TubeltemHit(iMOuseDownX,iMOuseDownY); 0069 if iTrack>0 then begin 0070 iHintDelayTimer := 0; 0071 if bHintVisible then begin 0072 frmRun.blobHint.HideMessage; 0073 bHintVisible := false 0074 end; SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCTIUS98/10035 76 0075 if bTrackEnabled[iTrack] then 0076 frmRun.TrackClicked(iTrack) 0077 end 0078 end; 0079 { -------------------------------- } 0080 procedure PlayListMouseMove(X,Y: longint); 0081 var 0082 iltem: longint; 0083 label 0084 exit; 0085 begin 0086 if eTubeModeState<>tmTRACKS then 0087 goto exit; 0088 iHintX := frmRun.Left+X+5; 0089 iHintY:= frmRun.Top+Y-0; 0090 iltem:= TubeltemHit(X,Y); 0091 if iltem>0 then begin 0092 if iltem<>iHintitem then begin 0093 if bHintVisible then begin 0094 frmRun.blobHint.HideMessage; 0095 bHintVisible := false 0096 end; 0097 iHintDelayTimer:= HINTDELAY; 0098 iHintitem := iltem 0099 end; 0100 exit 0101 end; 0102 exitl: 0103 iHintDelayTimer:= 0; 0104 iHinttem := 0; 0105 if bHintVisible then begin 0106 frmRun.blobHint.HideMessage; 0107 bHintVisible := false 0108 end 0109 end; 0110 { ----------------------------- 0111 procedure PlayListTimerTick; 0112 begin 0113 if iHintDelayTimer=0 then 0114 exit; 0115 Dec(iHintDelayTimer); SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 77 0116 if iHintDelayTimer=0 then begin 0117 if bHintVisible then 0118 frmRun.blobHint.HideMessage; 0119 iHintLastX:= iHintX; 0120 iHintLastY:= iHintY; 0121 sHintLastMsg := sHintMsg; 0122 frmRun.blobHint.Position := hpAboveRight; 0123 frmRun.blobHint.ShowMessage(sHintMsg, iHintX, iHintY); 0124 bHintVisible := true 0125 end 0126 end; 0127 0128 { Initalize / Exit } 0129 0130 procedure PlayListlnitialize; 0131 var 0132 fTracks: TextFile; 0133 1: string[250]; 0134 begin; 0135 ThePlayList.TextList := TStringList.Create; 0136 AssignFile(fTracks, sRunDirectory+'Stuff\Tracks.txt'); 0137 Reset(fTracks); 0138 iAudioTracks:= 0; 0139 while not Eof(fTracks) and (iAudioTracks<MAXTRACKS) do begin 0140 Inc(iAudioTracks); 0141 ReadLn(fTracks, 1); 0142 ThePlayList.TextList.AddObject(I, Pointer(iAudioTracks)); 0143 end; 0144 CloseFile(fTracks); 0145 Tubel nitList(spriteTubeText, ThePlayList, 0146 iTextBlockHeight div iAudioTracks, 0); 0147 sHintMsg 'Click title to select track.'; 0148 iHintitem 0; 0149 iHintDelayTimer:= 0; 0150 bHintVisible false; 0151 binHintArea false 0152 end; 0153 {--------------------------} 0154 procedure PlayListExit; SUBSTITUTE SH EET (RULE 26) WO 98/52189 PCTIUS98/10035 78 0155 begin 0156 TubeExitList(ThePlayList) 0157 end; 0158 end. SUBSTITUTE SH EET (RULE 26) WO 98/52189 PCT/US98/10035 79 0001 unit QYesNo; 0002 0003 interface 0004 0005 {$IFDEF WINDOWS) 0006 uses 0007 SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, 0008 Forms, Dialogs, 0009 Run, Main, Bitmaps, Tube, SysFig; 0010 ($ELSE} 0011 uses 0012 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, 0013 ExtCtrls, StdCtrls, 0014 Run, Main, Bitmaps, Tube, SysFig; 0015 {$ENDIF} 0016 {--------------------------------} 0017 type 0018 TProc = Procedure; 0019 {--------------------} 0020 var 0021 TheQvideo: TTubeList; 0022 TheQvote: TTubelist; 0023 { ---------------------------- 0024 procedure Qynlnitialize; 0025 procedure QynExit; 0026 procedure QynAsk(var TubeQ: TTubeList; xYes, xNo: TProc); 0027 procedure QynMouseMove(X,Y: longint); 0028 procedure QynMouseDown; 0029 0030 implementation 0031 0032 var 0033 bYesDown, 0034 bNoDown: boolean; 0035 spriteQyes Up, 0036 spriteQyes Down, 0037 spriteQnoUp, SUBSTITUTE SH EET (RULE 26) WO 98/52189 PCT/US98/10035 80 0038 sprteQnoDown: TSprite; 0039 qaYes, qaNO: TProc; 0040 0041 { Local Routines } 0042 0043 function QHit(var Sprite: TSprite; x,y: longint): boolean; 0044 begin 0045 with Sprite do 0046 Result := ((x>=Left) and (x<=Left+Width-1) and (y>=Top) and (y<=Top+Height-1)) 0047 end; 0048 0049 { Main code } 0050 0051 procedure QynAsk(var TubeQ: TTubeList; xYes, xNo: TProc); 0052 begin 0053 TubeDisplay(TubeQ); 0054 eTubeModeState := tmQYN; 0055 BitmapDraw(spriteQyesUp); 0056 BitmapDraw(spriteQnoUp); 0057 qaYes := xYes; 0058 qaNo := xNo; 0059 bYesDown := false; 0060 bNoDown := false 0061 end; 0062 0063 { Mouse support } 0064 0065 procedure QynMouseMove(X,Y: longint); 0066 begin 0067 if eTubeModeState<>tmQYN then 0068 exit; 0069 if QHit(spriteQyesUp, x, y) then begin 0070 if not bYesDown then begin 0071 BitmapDraw(spriteQyesDown); 0072 bYesDown := true SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 81 0073 end 0074 end 0075 else begin 0076 if bYesDown then begin 0077 BitmapDraw(spriteQyesUp); 0078 bYesDown := false 0079 end 0080 end; 0081 if QHit(spriteQnoUp, x, y) then begin 0082 if not bNoDown then begin 0083 BitmapDraw(spriteQnoDown); 0084 bNoDown := true 0085 end 0086 end 0087 else begin 0088 if bNoDown then begin 0089 BitmapDraw(spriteQnoUp); 0090 bNoDown := false 0091 end 0092 end 0093 end; 0094 {------------------------} 0095 procedure QynMouseDown; 0096 begin 0097 if eTubeModeState<>tmQYN then 0098 exit; 0099 if BitmapHit(spriteQyesUp) then 0100 qaYes; 0101 if BitmapHit(spriteQnoUp) then 0102 qaNo; 0103 end; 0104 0105 { Initalize / Exit 0106 0107 procedure Qynlnitialize; 0108 var 0109 fQ: TextFile; 0110 1: string[250]; 0111 begin SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 82 0112 BitmapCreate(spriteQyesUp, frmMain.imgTbQyes Up, false); 0113 BitmapCreate(spriteQyesDown, frmMain.imgTbQyesDown, false); 0114 BitmapCreate(spriteQno Up, frmMain.imgTbQnoUp, false); 0115 BitmapCreate(spriteQnoDown, frmMain.imgTbQnoDown, false); 0116 TheQvideo.TextList := TStringList.Create; 0117 AssignFile(fQ, sRunDirectory+'Stuff\Qmovie.txt'); 0118 Reset(fQ); 0119 while not Eof(fQ) do begin 0120 ReadLn(fQ, I); 0121 TheQvideo.TextList.AddObject(l, Pointer(0)); 0122 end; 0123 CloseFile(fQ); 0124 TubelnitList(spriteTubeText, TheQvideo, -3, 0); 0125 TheQvote.TextList := TStringList.Create; 0126 AssignFile(fQ, sRunDirectory+'Stuff\Qvote.txt'); 0127 Reset(fQ); 0128 while not Eof(fQ) do begin 0129 ReadLn(fQ, I); 0130 TheQvote.TextList.AddObject(l, Pointer(0)); 0131 end; 0132 CloseFile(fQ); 0133 TubelnitList(spriteTubeText, TheQvote, -3, 0); 0134 bYesDown := false; 0135 bNoDown := false 0136 end; 0137 {----------------------------} 0138 procedure QynExit; 0139 begin 0140 BitmapDestroy(spriteQyes Up); 0141 BitmapDestroy(spriteQyesDown); 0142 BitmapDestroy(spriteQno Up); 0143 BitmapDestroy(spriteQno Down); 0144 TubeExitList(TheQvote); 0145 TubeExitList(TheQvideo) 0146 end; 0147 end. SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 83 0001 unit RegFig; 0002 0003 interface 0004 0005 {$IFDEF WINDOWS) 0006 uses 0007 Forms, WinTypes, WinProcs, SysUtils, Messages, Classes, Controls, Inifiles, 0008 Run, IniFig; 0009 {$ELSE) 0010 uses 0011 Forms, Windows, SysUtils, Messages, Classes, Controls, IniFiles, Registry, 0012 Run, IniFig; 0013 {$ENDIF} 0014 {-----------------------------------} 0015 function RegFigLoad: boolean; 0016 procedure RegFigUpdate; 0017 {------------------------------------} 0018 var 0019 regHasTargetPage, 0020 regVoteEnabled, 0021 reginfoEnabled, 0022 regVideoAsked, 0023 regVoteAsked, 0024 regintroPlayed, 0025 reginfoSent: boolean; 0026 regHandle: string[20]; 0027 regZip, 0028 regAge, 0029 regSex: string[20]; 0030 0031 implementation 0032 0033 function RegFigLoad: boolean; 0034 var 0035 Reg: TRegistry; 0036 sKey, sValue: string[200]; 0037 n: integer; SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 84 0038 begin 0039 result := false; 0040 try 0041 Reg := TRegistry.Create 0042 except 0043 exit 0044 end; 0045 regHandle := 0046 Reg.RootKey:= HKEYLOCALMACHINE; 0047 sKey :='\SOFTWARE\Palantir'; 0048 try 0049 if Reg.OpenKey(sKey,true) then begin 0050 sValue :='Handle'; 0051 if Reg.ValueExists(sValue) then 0052 regHandle := Reg.ReadString(sValue) 0053 else begin 0054 for n := 1 to 10 do 0055 regHandle:= regHandle + Chr(Random(26)+Ord('A')); 0056 Reg.WriteString(sValue, regHandle) 0057 end 0058 end 0059 except 0060 end; 0061 regZip :='00000'; 0062 regAge := '00'; 0063 regSex:= '?'; 0064 Reg.RootKey:= HKEYLOCALMACHINE; 0065 sKey := '\SOFTWARE\Palantir\User'; 0066 try 0067 if Reg.OpenKey(sKey,true) then begin 0068 sValue :='Zip'; 0069 if Reg.ValueExists(sValue) then 0070 regZip:= Reg.ReadString(sValue); 0071 sValue := 'Age'; 0072 if Reg.ValueExists(sValue) then 0073 regAge := Reg.ReadString(sValue); 0074 sValue :='Sex'; 0075 if Reg.ValueExists(sValue) then 0076 regSex:= Reg.ReadString(sValue) 0077 end 0078 except SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 85 0079 end; 0080 0081 Reg.RootKey:= HKEYLOCALMACHINE; 0082 sKey := '\SOFTWARE\Palantir\lQcdV+iniAlbumHandle+'\Flags'; 0083 try 0084 if Reg.OpenKey(sKey,true) then begin 0085 sValue :='IntroPlayed'; 0086 if Reg.ValueExists(sValue) then 0087 regintroPlayed Reg.ReadBool(sValue) 0088 else 0089 regintroPlayed false; 0090 sValue := 'VideoAsked'; 0091 if Reg.ValueExists(sValue) then 0092 regVideoAsked Reg.ReadBool(sValue) 0093 else 0094 regVideoAsked false; 0095 sValue :='VoteAsked'; 0096 if Reg.ValueExists(sValue) then 0097 regVoteAsked Reg.ReadBool(sValue) 0098 else 0099 regVoteAsked false; 0100 sValue := 'InfoSent'; 0101 if Reg.ValueExists(sValue) then 0102 reginfoSent Reg.ReadBool(sValue) 0103 else 0104 regInfoSent false; 0105 sValue := 'VoteEnabled'; 0106 if Reg.ValueExists(sValue) then 0107 regVoteEnabled Reg.ReadBool(sValue) 0108 else 0109 regVoteEnabled false; 0110 sValue := 'InfoEnabled'; 0111 if Reg.ValueExists(sValue) then 0112 reginfoEnabled Reg.ReadBool(sValue) 0113 else 0114 reginfoEnabled false; 0115 sValue := 'TargetPage'; 0116 if Reg.ValueExists(sValue) then 0117 regHasTargetPage Reg.ReadBool(sValue) 0118 else 0119 regHasTargetPage false; SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 86 0120 end 0121 except 0122 end; 0123 Reg.Free; 0124 result := true 0125 end; 0126 {--------- ----------------------- } 0127 procedure RegFigUpdate; 0128 var 0129 Reg: TRegistry; 0130 sKey: string[200]; 0131 begin 0132 try 0133 Reg := TRegistry.Create 0134 except 0135 exit 0136 end; 0137 Reg.RootKey:= HKEYLOCALMACHINE; 0138 sKey '\SOFTWARE\Palantir\IQcd\'+iniAlbumHandle+'\Flags; 0139 try 0140 if Reg.OpenKey(sKey,true) then begin 0141 Reg.WriteBool('VoteEnabled', regVoteEnabled); 0142 Reg.WriteBool('InfoEnabled', reginfoEnabled); 0143 Reg.WriteBool('IntroPlayed', regintroPlayed); 0144 Reg.WriteBool('VideoAsked', regVideoAsked); 0145 Reg.WriteBool('VoteAsked', regVoteAsked); 0146 if iniSendinfo=qfALWAYS then 0147 Reg.WriteBool('InfoSent', reginfoSent) 0148 end 0149 except 0150 end; 0151 Reg.Free 0152 end; 0153 end. SUBSTITUTE SH EET (RULE 26) WO 98/52189 PCT/US98/10035 87 0001 unit Regions; 0002 0003 interface 0004 0005 {$IFDEF WINDOWS) 0006 uses 0007 SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, 0008 Forms, Dialogs, 0009 Run, Main; 0010 {$ELSE} 0011 uses 0012 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, 0013 ExtCtris, StdCtrls, 0014 Run, Main; 0015 {$ENDIF) 0016 {-----------------------------------} 0017 procedure Outlinelmage(ImageCanvas: TCanvas; 0018 iCanvasHeight, iCanvasWidth: longint; 0019 var PolygonRegion: hRGN); 0020 0021 implementation 0022 0023 type 0024 POINT = record 0025 x: longint; 0026 y: longint; 0027 end; 0028 { --------------------------- } 0029 const 0030 iScanX: array [0..9] of longint = (-1, -1, 0, +1, +1, +1, 0, -1, -1, -1); 0031 iScanY: array [0..9] of longint = ( 0, -1, -1, -1, 0, +1, +1, +1, 0, -1); 0032 {------------------------} 0033 var 0034 tOutline: array [0.. 1000] of POINT; 0035 WorkingCanvas: TCanvas; 0036 iCanvasMaxX, iCanvasMaxY: longint; 0037 iFirstPixelX, iFirstPixelY: longint; SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT[US98/10035 88 0038 iLastPixelX, iLastPixelY: longint; 0039 iLastDirection: longint; 0040 iPixeIX, iPixelY: longint; 0041 iDirection: longint; 0042 { ----------------------------- } 0043 procedure FindFirstPixel; forward; 0044 procedure FindNextPixel; forward; 0045 procedure FindPixel(iAtX, iAtY: longint); forward; 0046 0047 { Code } 0048 0049 procedure Outlinelmage(ImageCanvas: TCanvas; 0050 iCanvasHeight, iCanvasWidth: longint; 0051 var PolygonRegion: hRGN); 0052 var 0053 iPoints: longint; 0054 begin 0055 WorkingCanvas := ImageCanvas; 0056 iCanvasMaxX := iCanvasWidth-1; 0057 iCanvasMaxY:= iCanvasHeight-1; 0058 FindFirstPixel; 0059 tOutline[0].X:= iFirstPixelX; 0060 tOutline[I.Y:= iFirstPixelY; 0061 iPoints:= 1; 0062 FindPixel( iFirstPixelX, iFirstPixelY); 0063 repeat 0064 FindNextPixel; 0065 if iDirection<>iLastDirection then begin 0066 tOutline[iPoints].X := iLastPixelX; 0067 tOutline[iPoints].Y:= iLastPixelY; 0068 iPoints := iPoints+1; 0069 end 0070 until (iPixelX=iFirstPixeX) and (iPixelY=iFirstPixeY); 0071 PolygonRegion := CreatePolygonRgn( tOutline, iPoints, WINDING); 0072 end; 0073 { ---------------------------- } 0074 procedure FindFirstPixel; 0075 var 0076 x: longint; SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 89 0077 CanvasDC: HDC; 0078 begin 0079 CanvasDC := WorkingCanvas.Handle; 0080 For x := 1 to iCanvasMaxX do 0081 if GetPixel(CanvasDC,x,x)<>TRANSPARENTCOLOR then break; 0082 if x>=iCanvasMaxX then 0083 frmRun.SevereError('FindFirstPixel - Image not found!'); 0084 FindPixel( x, x); 0085 iFirstPixelX:= iPixelX; 0086 iFirstPixelY := iPixelY; 0087 end; 0088 {-----------------------) 0089 procedure FindNextPixel; 0090 begin 0091 FindPixel( iPixelX, iPixelY) 0092 (var 0093 x1, x, yl, y: longint; 0094 label 0095 FindPixel, 0096 Got_Pixel; 0097 begin 0098 CanvasDC := WorkingCanvas.handle; 0099 x1 := iPixelX+iScanX[iDirection]; 0100 y1 := iPixelY+iScanY[iDirection]; 0101 if (xl<0) or (xl>iCanvasMaxX) or (yl<0) or (yl>iCanvasMaxY) then goto FindPixel; 0102 if GetPixel(CanvasDC,xl,y)=TRANSPARENTCOLOR then goto FindPixel; 0103 x:= iPixelX+iScanX[iDirection-1]; 0104 y := iPixelY+iScanY[iDirection-1]; 0105 if (x<0) or (x>iCanvasMaxX) or (y<0) or (y>iCanvasMaxY) then goto GotPixel; 0106 if GetPixel(CanvasDC,x,y)=TRANSPARENTCOLOR then goto GotPixel; 0107 FindPixel: 0108 FindPixel( iPixelX, iPixelY); 0109 exit; 0110 Got Pixel: 0111 iPixelX:= x1; 0112 iPixelY := y1;} 0113 end; 0114 ( --------------------------- } 0115 procedure FindPixel(iAtX, iAtY: longint); 0116 var 0117 d: Integer; SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 90 0118 bPixell, bPixel2: boolean; 0119 CanvasDC: HDC; 0120 begin 0121 iLastPixelX := iPixelX; 0122 iLastPixelY:= iPixelY; 0123 iLastDirection := iDirection; 0124 bPixell := false; (kill compiler warming} 0125 CanvasDC:= WorkingCanvas.handle; 0126 for d := 1 to 9 do begin 0127 iPixelX := iAtX+iScanX[d]; 0128 iPixelY := iAtY+iScanY[d]; 0129 if (iPixelX>=0) and (iPixelX<=iCanvasMaxX) and 0130 (iPixelY>=0) and (iPixelY<=iCanvasMaxY) then 0131 bPixel2 := (GetPixel(CanvasDC,iPixelX,iPixelY)<>TRANSPARENTCOLOR) 0132 else 0133 bPixel2 := False; 0134 if d>1 then 0135 if bPixel2 and (Not bPixell) then 0136 break; 0137 bPixell bPixel2 0138 end; 0139 iDirection d; 0140 if iDirection>9 then 0141 frmRun.SevereError('FindPixel - not found!') 0142 end; 0143 end. SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 91 0001 unit Run; 0002 ($DEFINE KILLERASE) 0003 {---------------------------------------------} 0004 interface 0005 0006 {$IFDEF WINDOWS) 0007 uses 0008 SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, 0009 Forms, Dialogs, StdCtrIs, ExtCtrls, MPlayer, ComCtrIs, SheIIAPI, 0010 xPrgExec, xFCopy, LMDnonvS, LMDclass, LMDctrI, LMDmmS, LMDwave; 0011 {$ELSE} 0012 uses 0013 SysUtils, Windows, Messages, Classes, Graphics, Controls, 0014 Forms, Dialogs, StdCtrls, ExtCtris, MPlayer, ComCtrIs, SheIIAPI, 0015 xPrgExec, xFCopy, LMDnonvS, LMDclass, LMDctrI, LMDmmS, LMDwave; 0016 {$ENDIF) 0017 { ------------------------- } 0018 const 0019 UMREALSTART = WMUSER+1; 0020 TEXTNORMAL = clBlack; 0021 TEXTHIGHLIGHT = clWhite; 0022 TEXTDISSABLED = $006F6470; 0023 {---- --------------------- } 0024 type 0025 TfrmRun = class(TForm) 0026 tmTimer: TTimer; 0027 mmCDPlayer: TMediaPlayer; 0028 PrintDialog: TPrintDialog; 0029 mmCommentary: TMediaPlayer; 0030 Run: TxProgExec; 0031 FileCopier: TxFileCopy; 0032 ProgressBar: TProgressBar; 0033 blobMessage: TLMDMessageHint; 0034 waveSorry: TLMDWaveComp; 0035 Onelnstance: TLMDOnelnstance; 0036 blobHint: TLMDMessageHint; 0037 waveByeBye: TLMDWaveComp; 0038 wavelnstallingWallpaper: TLMDWaveComp; 0039 wavelnstallingSaver: TLMDWaveComp; SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 92 0040 { -------- ------------------------ --- ) 0041 procedure FormCreate(Sender: TObject); 0042 procedure FormClose(Sender: TObject; var Action: TCloseAction); 0043 procedure FormPaint(Sender: TObject); 0044 procedure RunMouseDown(Sender: TObject; Button: TMouseButton; 0045 Shift: TShiftState; X, Y: Integer); 0046 procedure RunMouseUp(Sender: TObject; Button: TMouseButton; 0047 Shift: TShiftState; X, Y: Integer); 0048 procedure RunMouseMove(Sender: TObject; 0049 Shift: TShiftState; X, Y: Integer); 0050 procedure tmTimerTick(Sender: TObject); 0051 procedure RunAfterExec(Sender: TObject); 0052 procedure FileCopierNotify(Sender: TObject); 0053 procedure mmCommentaryNotify(Sender: TObject); 0054 {-----------------------} 0055 function NextTrack(TrackFrom: Integer): longint; 0056 procedure PlayNextTrack(TrackFrom: Integer); 0057 procedure GoCopyFile(FileFrom, FileTo: string); 0058 {-----------------------} 0059 procedure PlayPressed; 0060 procedure PausePressed; 0061 procedure ResumePressed; 0062 procedure StopPressed; 0063 procedure EjectPressed; 0064 procedure VideoPressed; 0065 procedure CommentaryPressed; 0066 procedure PrintPressed; 0067 procedure ExitPressed; 0068 procedure ModeSetinfo; 0069 procedure ModeSetWords; 0070 procedure ModeSetTracks; 0071 procedure LogoClicked; 0072 procedure MenuClicked(Menu Item: longint); 0073 procedure TrackClicked(Track: longint); 0074 procedure WordsClicked(WordTime: longint); 0075 procedure SetTrack(TrackNo: longint); 0076 procedure TrackDissable(TrackNo: longint); 0077 procedure TimeMoveStart; 0078 procedure TimeMoveEnd; 0079 procedure MouseEnable; 0080 procedure MouseDissable; SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 93 0081 function NoVideo: boolean; 0082 procedure ErrorMessage(const msg: string); 0083 procedure SevereError(const msg: string); 0084 private 0085 procedure IdleProcess(Sender: TObject; var Done: Boolean); 0086 procedure DefaultException(Sender: TObject; E: Exception); 0087 procedure RealStart(var Msg: TMessage); 0088 message UMREALSTART; 0089 {$IFDEF KILLERASE) 0090 procedure FormErase(var Msg: TWMEraseBkgnd); 0091 message WM_EraseBkgnd; 0092 {$ENDIF) 0093 end; 0094 { ---------------------------- } 0095 const 0096 MAXTRACKS = 20; 0097 UNKNOWN = 0; 0098 FORCEFIRST = 9999; 0099 MENUNORMALIZETIME = 5; 0100 DELAYINTROVIDEO = 5; 0101 SCROLLDELAY = 40; 0102 HINTDELAY = 15; 0103 MCITODISPLAYHOLDOFF = 3; 0104 TRANSPARENTCOLOR = clRed; 0105 WINDOWCOLOR_16BIT = clBackground; 0106 {----------------------------} 0107 var 0108 frmRun: TfrmRun; 0109 bmpPlayer: TBitmap; 0110 bmpPalette: TBitmap; 0111 bMouseEnabled: boolean; 0112 iMouseDownX, iMouseDownY: longint; 0113 bqAskVideo, 0114 bqAskVote: boolean; 0115 bqPlaylntro: boolean; 0116 iDelaylntroVideo: longint; 0117 iMenuNormalizeTimer, 0118 iErrorMessageTimer: longint; 0119 iLastTrackNo: longint; 0120 ePlayButtonState: (bsPLAY, bsPAUSE, bsRESUME); 0121 eStopButtonState: (bsEJECT, bsSTOP); SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCTIUS98/10035 94 0122 eRandomButtonState: (bsRANDOMON, bsRANDOMOFF); 0123 eTubeModeState: (tmINTRO, tmMENU, tmABOUT, tmlQABOUT, tmTRACKS, tmWORDS, tmINFO, tmQYN); 0124 bStopPaint: boolean; 0125 iHintLastX, iHintLastY: longint; 0126 sHintLastMsg: string[250]; 0127 bHintsEnabled: boolean; 0128 sCurrentWall: string[100]; 0129 sCurrentTile: string[100]; 0130 sCurrentSaver: string[100]; 0131 { ----------------- } 0132 procedure qaVideoYes; forward; 0133 procedure qaVideoNo; forward; 0134 procedure qaVoteYes; forward; 0135 procedure qaVoteNo; forward; 0136 procedure qaNext1; forward; 0137 procedure qaNext2; forward; 0138 procedure qaNext3; forward; 0139 0140 implementation 0141 {$R *.DFM) 0142 0143 uses 0144 Main, PlayList, Tracks, Words, Info, 0145 QYesNo, TrkMedia, ScrolBar, TimeBar, VolumBar, 0146 Regions, Bitmaps, BitBtns, BitBars, Sysfig, 0147 Tube, Video, Comment, Counter, Logo, Inifig, 0148 IQMenu, IQAbout, CDPlayer, Wall, Saver, 0149 RegFig, Logging; 0150 {--------------------------------------} 0151 var 0152 bMouseDown: boolean; 0153 iLastMouseX: longint = -1; 0154 iLastMouseY: longint = -1; 0155 TheIntro: TTubeList; 0156 bQvideo, bQvote: boolean; 0157 0158 { Utility Routines SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 95 0159 {=======--===========--- - -- =============------------------ = 0160({-----------------------} 0161 function TfrmRun.NextTrack(TrackFrom: longint): longint; 0162 var 0163 iTrack, iTracksEnabled: longint; 0164 iTrack1, iTrack2: longint; 0165 begin 0166 iTracksEnabled := 0; 0167 for iTrack := 1 to iAudioTracks do 0168 if bTrackEnabled[iTrack] then 0169 Inc(iTracksEnabled); 0170 iTrack2 := 0; 0171 for iTrack1 := TrackFrom to iAudioTracks do 0172 if bTrackEnabled[iTrackl] then begin 0173 iTrack2 := iTrack1; 0174 break 0175 end; 0176 if iTrack2=0 then 0177 for iTrack1 := 1 to TrackFrom-1 do 0178 if bTrackEnabled[iTrackl] then begin 0179 iTrack2 := iTrack1; 0180 break 0181 end; 0182 if iTrack2=0 then begin 0183 SevereError('PlayNextTrack: all tracks dissabled!'); 0184 Result := 1; 0185 exit 0186 end; 0187 if (eRandomButtonState=bsRANDOMON) and (iTracksEnabled>1) then 0188 repeat 0189 iTrack2 := Random(iAudioTracks)+1 0190 until bTrackEnabled[iTrack2] and (iTrack2<>TrackFrom); 0191 Result := iTrack2; 0192 end; 0193 {-----------------------------} 0194 procedure TfrmRun.PlayNextTrack(TrackFrom: Integer); 0195 begin 0196 SetTrack(NextTrack(TrackFrom)); 0197 PlayerPlay(IsNEXT, iLastTrackNo) 0198 end; SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 96 0199 {--------------- ---------- } 0200 procedure TfrmRun.GoCopyFile(FileFrom, FileTo: string); 0201 begin 0202 MouseDissable; 0203 with FileCopier do begin 0204 ProgressBar.Show; 0205 SourceFile := FileFrom; 0206 TargetFile := FileTo; 0207 Execute 0208 end; 0209 MouseEnable; 0210 end; 0211 {------------------------} 0212 procedure TfrmRun.FileCopierNotify(Sender: TObject); 0213 begin 0214 if FileCopier.Percent>=100 then 0215 ProgressBar.Hide 0216 else 0217 ProgressBar.Position := FileCopier. Percent 0218 end; 0219 {----------------------------} 0220 procedure TfrmRun.mmCommentaryNotify(Sender: TObject); 0221 begin 0222 CommentaryNotify; 0223 end; 0224 0225 { Process button press } 0226 0227 procedure TfrmRun.PlayPressed; 0228 begin 0229 VideoStop; 0230 CommentaryStop; 0231 PlayerPlay(IsPLAY, TimeBarGetPosition) 0232 end; 0233 {----------------------------} 0234 procedure TfrmRun.PausePressed; 0235 begin 0236 VideoStop; 0237 CommentaryStop; SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 97 0238 TimeBarPosition(iPausedTime); 0239 PlayerPause 0240 end; 0241 {---------------------} 0242 procedure TfrmRun.ResumePressed; 0243 begin 0244 VideoStop; 0245 CommentaryStop; 0246 TimeBarPosition(iPausedTime); 0247 PlayerResume 0248 end; 0249 { ----------------------- 0250 procedure TfrmRun.StopPressed; 0251 begin 0252 VideoStop; 0253 CommentaryStop; 0254 PlayerStop 0255 end; 0256 { ---------------------- } 0257 procedure TfrmRun.EjectPressed; 0258 begin 0259 PlayerStop; 0260 VideoStop; 0261 CommentaryStop; 0262 PlayerEject; 0263 ExitPressed 0264 end; 0265 { --------- - - ---------- } 0266 procedure TfrmRun.PrintPressed; 0267 begin 0268 TubePrint 0269 end; 0270 {---------------------} 0271 procedure TfrmRun.VideoPressed; 0272 begin 0273 if NoVideo then 0274 exit; 0275 if not bVideoAvailable[iLastTrackNo] then begin 0276 ErrorMessage('This track does not have a video clip, sorry.'); 0277 exit 0278 end; SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 98 0279 if eCDPlayerState=psPLAYING then begin 0280 ButtonsForcePause; 0281 PlayerPause 0282 end; 0283 VideoStop; 0284 CommentaryStop; 0285 VideoPlay(iLastTrackNo, nil) 0286 end; 0287 {-----------------------} 0288 procedure TfrmRun.CommentaryPressed; 0289 begin 0290 if not bCommentaryAvailable[iLastTrackNo] then begin 0291 ErrorMessage('This track does not have a commentary, sorry.'); 0292 exit 0293 end; 0294 if eCDPlayerState=psPLAYING then begin 0295 ButtonsForcePause; 0296 PlayerPause 0297 end; 0298 VideoStop; 0299 CommentaryStop; 0300 CommentaryPlay(iLastTrackNo) 0301 end; 0302 {------------------------} 0303 procedure TfrmRun.ExitPressed; 0304 begin 0305 VideoStop; 0306 CommentaryStop; 0307 TubeDisplay(Theintro); 0308 eTubeModeState := tmlntro; 0309 PlayerStop; 0310 if iniPlayByeBye then 0311 frmRun.waveByeBye.PlaySound(sdSync); 0312 Close 0313 end; 0314 0315 { Process mode changes } 0316 0317 procedure TfrmRun.ModeSetinfo; SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 99 0318 begin 0319 VideoStop; 0320 CommentaryStop; 0321 TubeSetTopLine(Thelnfo[iLastTrackNo], 1); 0322 TubeDisplay(Theinfo[iLastTrackNo]); 0323 MediaDraw(iLastTrackNo) 0324 end; 0325 (------------------------------------} 0326 procedure TfrmRun.ModeSetWords; 0327 begin 0328 VideoStop; 0329 CommentaryStop; 0330 TubeDisplay(TheWords[iLastTrackNo]); 0331 MediaDraw(iLastTrackNo) 0332 end; 0333 {--------------------------------------} 0334 procedure TfrmRun. ModeSetTracks; 0335 begin 0336 VideoStop; 0337 CommentaryStop; 0338 TubeDisplay(ThePlayList); 0339 MediaDraw(iLastTrackNo) 0340 end; 0341 0342 { Process Logo / Menu mouse click 0343 0344 procedure TfrmRun.LogoClicked; 0345 begin 0346 VideoStop; 0347 CommentaryStop; 0348 ButtonsForceNone; 0349 if eTubeModeState=tmMenu then begin 0350 TubeDisplay(Theintro); 0351 eTubeModeState := tmlntro 0352 end 0353 else begin 0354 iMenuNormalizeTimer:= 0; 0355 TubeSetAllNormal(TheMenu); 0356 TubeDisplay(TheMenu); SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 100 0357 eTubeModeState := tmMenu 0358 end 0359 end; 0360 { ------------------------------- } 0361 procedure TfrmRun.MenuClicked(Menultem: longint); 0362 begin 0363 MenuHighlightitem(Menultem); 0364 iMenuNormalizeTimer := MENUNORMALIZETIME; 0365 case Menultem of 0366 1: begin 0367 ButtonsForceNone; 0368 eTubeModeState := tmABOUT; 0369 TubeDisplay(TheCDAbout) 0370 end; 0371 2: begin 0372 ButtonsForceNone; 0373 eTubeModeState := tmlQABOUT; 0374 TubeDisplay(ThelQAbout) 0375 end; 0376 3: begin 0377 if eCDPlayerState=psPLAYING then begin 0378 PlayerPause; 0379 ButtonsForcePause 0380 end; 0381 VideoStop; 0382 CommentaryStop; 0383 VideoPlay(INTROVIDEO, nil); 0384 regintroPlayed := true 0385 end; 0386 4: begin 0387 if UsingOurWallpaper and 0388 not UsingThisWallpaper(startWallpaperName) then begin 0389 sCurrentWall := startWallpaperName; 0390 sCurrentTile := startWallpaperTile 0391 end 0392 else begin 0393 wavelnstallingWallpaper.Play; 0394 GoCopyFile(sRunDirectory+'Stuff\Wall.bmp', 0395 sWindowsDirectory+iniWallpaper+'.bmp'); 0396 sCurrentWall := sWindowsDirectory+iniWallpaper+'.bmp'; 0397 sCurrentTile :='0' SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCTIUS98/10035 101 0398 end; 0399 SetWallpaper(sCurrentWall, sCurrentTile); 0400 MenuUpdate 0401 end; 0402 5: begin 0403 if UsingOurSaver and not UsingThisSaver(startScreenSaver) then 0404 sCurrentSaver := startScreenSaver 0405 else begin 0406 wavelnstallingSaver.Play; 0407 GoCopyFile(sRunDirectory+'Stuff\Saver.exe', 0408 sSystemDirectory+iniScreenSaver+'.scr'); 0409 sCurrentSaver := sSystemDirectory+iniScreenSaver+'.scr' 0410 end; 0411 SetSaver(sCurrentSaver); 0412 MenuUpdate 0413 end; 0414 6: begin 0415 VideoStop; 0416 CommentaryStop; 0417 ButtonsForceStop; 0418 StopPressed; 0419 Run.CmdLine := sRunDirectory+'Stuff\WebLink.exe'; 0420 if Run.Execute then 0421 {$IFDEF WINDOWS} 0422 WindowState := TWindowState(wsMinimized) 0423 {$ELSE} 0424 Application.Minimize 0425 {$ENDIF} 0426 else 0427 ErrorMessage('Unable to run Web Link installer!') 0428 end; 0429 7: begin 0430 if UsingWallpaper then begin 0431 GetWallpaper(sCurrentWall, sCurrentTile); 0432 SetWallpaper(", '0') 0433 end 0434 else 0435 SetWallpaper(sCurrentWall, sCurrentTile); 0436 MenuUpdate 0437 end; 0438 8: begin SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCTIUS98/10035 102 0439 VideoStop; 0440 CommentaryStop; 0441 ButtonsForceStop; 0442 StopPressed; 0443 Run.CmdLine := sRunDirectory+'Stuff\ActMovie.exe'; 0444 if Run.Execute then 0445 {$IFDEF WINDOWS) 0446 WindowState := TWindowState(wsMinimized) 0447 {$ELSE} 0448 Application.Minimize 0449 {$ENDIF} 0450 else 0451 ErrorMessage('Unable to Install Active Movie!') 0452 end; 0453 9: begin 0454 bHintsEnabled := not bHintsEnabled; 0455 MenuUpdate 0456 end; 0457 10: ShellExecute(frmRun.Handle, 0458 'Open', 'http://www.baconbros.com/', 0459 nil, nil, SWSHOWNORMAL) 0460 else 0461 SevereError('MenuClicked - invalid item!') 0462 end 0463 end; 0464 0465 { Process Tracks/Words mouse click } 0466 0467 procedure TfrmRun.TrackClicked(Track: longint); 0468 begin 0469 if eCDPlayerState=psPAUSED then begin 0470 ButtonsForceStop; 0471 StopPressed 0472 end; 0473 {if eCDPlayerState=psPLAYING then) 0474 SetTrack(Track); 0475 if eCDPlayerState=psPLAYING then begin 0476 ButtonsForcePlay; 0477 PlayerPlay(IsTRACK, 0) SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCTIUS98/10035 103 0478 end 0479 end; 0480 {------------ ------------------- } 0481 procedure TfrmRun.WordsClicked(WordTime: longint); 0482 begin 0483 if eCDPlayerState=psPLAYNG then 0484 ScrollBarStartDelay; 0485 TimeBarPosition(WordTime); 0486 if eCDPlayerState=psPLAYING then begin 0487 ButtonsForcePlay; 0488 PlayerPlay(IsWORDS, WordTime) 0489 end 0490 end; 0491 {------------------------} 0492 procedure TfrmRun.SetTrack(TrackNo: longint); 0493 begin 0494 if TrackNo<>iLastTrackNo then begin 0495 TimeBarNewTrack(TrackNo); 0496 PlayListNewTrack(TrackNo); 0497 TracksNewTrack(TrackNo); 0498 WordsNewTrack(TrackNo); 0499 InfoNewTrack(TrackNo); 0500 MediaNewTrack(TrackNo); 0501 iLastTrackNo := TrackNo 0502 end 0503 end; 0504 {------------------------} 0505 procedure TfrmRun.TrackDissable(TrackNo: longint); 0506 begin 0507 if iLastTrackNo=TrackNo then 0508 if eCDPlayerState=psPLAYNG then 0509 PlayNextTrack(TrackNo+ 1) 0510 else 0511 SetTrack(NextTrack(TrackNo+1)) 0512 end; 0513 0514 { Process mouse moved bars 0515 0516 procedure TfrmRun.TimeMoveStart; SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCTIUS98/10035 104 0517 begin 0518 if eCDPlayerState=psPLAYNG then begin 0519 ButtonsForcePause; 0520 PlayerPause 0521 end 0522 else if eCDPlayerState=psPAUSED then begin 0523 ButtonsForceStop; 0524 PlayerStop 0525 end 0526 end; 0527 {---------------------} 0528 procedure TfrmRun.TimeMoveEnd; 0529 begin 0530 if eCDPlayerState=psPAUSED then begin 0531 ButtonsForcePlay; 0532 PlayerPlay(IsTIMEBAR, TimeBarGetPosition) 0533 end 0534 end; 0535 0536 { Backround processing } 0537 0538 procedure TfrmRun.ldleProcess(Sender: TObject; var Done: Boolean); 0539 var 0540 iTrack, iTime: longint; 0541 label 0542 exit; 0543 begin 0544 VolumeBackgroundProcess; 0545 if (eCDPlayerState=psPLAYING) and (mmCDPlayer.Mode=mpOPEN) then begin 0546 PlayerStop; 0547 ButtonsForceStop; 0548 eCDPlayerState := psNOCD; 0549 Close; 0550 goto exit 0551 end; 0552 if eCDPlayerState=psPLAYING then begin 0553 PlayerGetTrackAndTime(iTrack,iTime); 0554 if (mmCDPlayer.Mode=mpStopped) and (iTrack=iAudioTracks) then begin 0555 PlayNextTrack(1); SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 105 0556 goto exit 0557 end; 0558 if (iTrack<>iLastTrackNo) and (iHoldOffUpdate=0) then 0559 if (iTrack>=1) and (iTrack<=iAudioTracks) then begin 0560 if bTrackEnabled[iTrack] then 0561 if (eRandomButtonState=bsRANDOMOFF) then 0562 SetTrack(iTrack) 0563 else begin 0564 PlayNextTrack(iTrack); 0565 iTrack:= 0 0566 end 0567 else begin 0568 PlayNextTrack(iTrack+1); 0569 iTrack:= 0 0570 end 0571 end; 0572 If iTrack=iLastTrackNo then 0573 TimeBarPosition(iTime) 0574 end; 0575 exitl: 0576 Done := true 0577 end; 0578 { -------------------------------------- } 0579 procedure IntroDone; 0580 begin 0581 regintroPlayed := true; 0582 qaNext2 0583 end; 0584 {----------------------- 0585 procedure TfrmRun.tmTimerTick(Sender: TObject); 0586 begin 0587 if iErrorMessageTimer>0 then begin 0588 Dec(iErrorMessageTimer); 0589 if iErrorMessageTimer=0 then 0590 frmRun.blobMessage.HideMessage 0591 end; 0592 PlayerTimerTick; 0593 MenuTimerTick; 0594 TracksTimerTick; 0595 PlayListTimerTick; 0596 WordsTimerTick; SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 106 0597 ScrollBarTimerTick; 0598 TimeBarTimerTick; 0599 VolumeBarTimerTick; 0600 if not bStopPaint then begin 0601 ScrollBarTimerTick; 0602 if iMenuNormalizeTimer>0 then begin 0603 Dec(iMenuNormalizeTimer); 0604 if iMenuNormalizeTimer=0 then 0605 TubeSetAllNormal(TheMenu) 0606 end 0607 end; 0608 if iDelaylntroVideo>0 then begin 0609 Dec(iDelaylntroVideo); 0610 if iDelaylntroVideo=0 then 0611 VideoPlay(INTROVIDEO, IntroDone) 0612 end; 0613 end; 0614 0615 { Process mouse click/move } 0616 0617 procedure TfrmRun.MouseEnable; 0618 begin 0619 Cursor := crArrow; 0620 bMouseEnabled := true; 0621 end; 0622 { --------------------------- } 0623 procedure TfrmRun.MouseDissable; 0624 begin 0625 bMouseEnabled := false; 0626 Cursor := crHourGlass; 0627 end; 0628 { ------------------------- } 0629 procedure TfrmRun.RunMouseDown(Sender: TObject; 0630 Button: TMouseButton; Shift: TShiftState; 0631 X, Y: Integer); 0632 begin 0633 if iErrorMessageTimer<>0 then 0634 frmRun.blobMessage.HideMessage; 0635 if not bMouseEnabled then SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCTIUS98/10035 107 0636 exit; 0637 if Button=mbLeft then begin 0638 iMouseDownX:= X; 0639 iMouseDownY:= Y; 0640 bMouseDown := true; 0641 ButtonsMouseDownExitCheck; 0642 QynMouseDown; 0643 if eTubeModeState<>tmQYN then begin 0644 ButtonsMouseDown; 0645 ScrollBarMouseDown; 0646 TimeBarMouseDown; 0647 VolumeBarMouseDown; 0648 MenuMouseDown; 0649 PlayListMouseDown; 0650 WordsMouseDown; 0651 TracksMouseDown; 0652 LogoMouseDown 0653 end 0654 end 0655 end; 0656 {--------------------------} 0657 procedure TfrmRun.RunMouseUp(Sender: TObject; 0658 Button: TMouseButton; Shift: TShiftState; X, Y: Integer); 0659 begin 0660 if not bMouseEnabled then 0661 exit; 0662 ButtonsMouseUp; 0663 ScrollBarMouseUp; 0664 TimeBarMouseUp; 0665 VolumeBarMouseUp; 0666 bMouseDown := false 0667 end; 0668 {----------------------} 0669 procedure TfrmRun.RunMouseMove(Sender: TObject; 0670 Shift: TShiftState; X, Y: Integer); 0671 begin 0672 if not bMouseEnabled then 0673 exit; 0674 if (X<0) or (X>Width-1) or (Y<0) or (Y>Height-1) then begin 0675 X:= -1; 0676 Y:= -1 SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCTIUS98/10035 108 0677 end; 0678 if (X=iLastMouseX) and (Y=iLastMouseY) then 0679 exit; 0680 iLastMouseX:= X; 0681 iLastMouseY:= Y; 0682 if bHintsEnabled and not bMouseDown then begin 0683 ScrollBarMouseMove(X,Y); 0684 TimeBarMouseMove(X,Y); 0685 VolumeBarMouseMove(X,Y); 0686 TracksMouseMove(X,Y); 0687 PlaylistMouseMove(X,Y); 0688 WordsMouseMove(X,Y); 0689 MenuMouseMove(X,Y) 0690 end; 0691 LogoMouseMove(X,Y); 0692 QynMouseMove(X,Y); 0693 if bMouseDown then begin 0694 ScrollBarMouseDrag(X,Y); 0695 TimeBarMouseDrag(X,Y); 0696 VolumeBarMouseDrag(X,Y) 0697 end; 0698 end; 0699 0700 { Initalize / Exit } 0701 0702 procedure TfrmRun.FormCreate(Sender: TObject); 0703 var 0704 WindowRegion: hRGN; 0705 biniOk: boolean; 0706 begin 0707 MouseDissable; 0708 bStopPaint := true; 0709 iMenuNormalizeTimer:= 0; 0710 iErrorMessageTimer := 0; 0711 Randomize; 0712 SysFigLoad; 0713 biniOk := IniFigLoad; 0714 if biniOk then begin 0715 Application. Icon. LoadFromFile(sRunDirectory+'Stuff\lcon. ico'); SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 109 0716 Application.Title:= iniAppName; 0717 frmRun.Caption := iniAppTitle 0718 end; 0719 SysFigCheckVideo; 0720 VideoInitializeO; 0721 frmMain:= TfrmMain.Create(nil); 0722 bmpPalette := TBitmap.Create; 0723 bmpPalette.Assign(frmMain.imgPalette.Picture.Bitmap); 0724 bmpPlayer:= TBitmap.Create; 0725 bmpPlayer.Assign(frmMain.imgPlayer.Picture.Bitmap); 0726 frmRun.ClientWidth frmMain.imgPlayer.Width; 0727 frmRun.ClientHeight frmMain.imgPlayer.Height; 0728 with bmpPlayer.Canvas do begin 0729 Brush.Color:= WINDOWCOLOR_16BIT; 0730 Brush.Style:= bsSOLID; 0731 BrushCopy(ClipRect, frmMain.imgPlayer.Picture.Bitmap, 0732 ClipRect, TRANSPARENTCOLOR) 0733 end; 0734 ($IFNDEF WINDOWS) 0735 with frmMain.imgPlayer do 0736 Outlinelmage( Canvas, Height, Width, WindowRegion); 0737 SetWindowRgn( Handle, WindowRegion, false); 0738 {$ENDIF} 0739 ButtonsInitialize; 0740 ScrollBarnitialize; 0741 TimeBarinitialize; 0742 Tubelnitialize; 0743 PlayListnitialize; 0744 Tracksinitialize; 0745 WordsInitialize; 0746 Menulnitialize; 0747 Aboutinitialize; 0748 Infolnitialize; 0749 CounterInitialize; 0750 Logolnitialize; 0751 Commentaryinitialize; 0752 Videolnitialize; 0753 Medialnitialize; 0754 Qyninitialize; 0755 VolumeBarInitialize; 0756 frmMain.Free; SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCTIUS98/10035 110 0757 Thelntro.TextList := TStringList.Create; 0758 Tubel nitList(spriteTubelntro, Theintro, 0, 0); 0759 iLastTrackNo := 0; 0760 SetTrack(1); 0761 ModeSetTracks; 0762 TubeDisplay(Theintro); 0763 eTubeModeState:= tmINTRO; 0764 ProgressBar.Hide; 0765 ProgressBar.Position := 0; 0766 ProgressBar.Top:= iTextBlockTop+iTextBlockHeight+2; 0767 ProgressBar.Left:= iTextBlockLeft+((iTextBlockWidth-ProgressBar.Width) div 2); 0768 bStopPaint := false; 0769 Playerinitialize; 0770 if biniOK then 0771 biniOk:= RegFigLoad; 0772 if bIniOk then begin 0773 LoggingInitialize; 0774 if iniPlaylntro=qfONCE then 0775 bqPlaylntro := not reglntroPlayed 0776 else 0777 bqPlaylntro:= (iniPlaylntro=qfALWAYS); 0778 if iniAskVideo=qfONCE then 0779 bqAskVideo:= not regVideoAsked 0780 else 0781 bqAskVideo:= (iniAskVideo=qfALWAYS); 0782 case iniSendVote of 0783 qfALWAYS: begin regVoteEnabled := true; 0784 bqAskVote := false end; 0785 qfNEVER: begin regVoteEnabled := false; 0786 bqAskVote := false end 0787 else 0788 if iniAskVote=qfONCE then 0789 bqAskVote := not regVoteAsked 0790 else 0791 bqAskVote:= (iniAskVote=qfALWAYS) 0792 end; 0793 case iniSendInfo of 0794 qfALWAYS: reginfoEnabled := true; 0795 qfNEVER: reginfoEnabled := false 0796 end 0797 end; SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 111 0798 if bStopPaint then 0799 exit; 0800 iHintLastX := 100; 0801 iHintLastY:= 100; 0802 sHintLastMsg := 'No Hint!'; 0803 bHintsEnabled := true; 0804 bQvideo := false; 0805 bQvote := false; 0806 tmTimer.Enabled := true; 0807 Application.OnException := DefaultException; 0808 Application.OnldIe := IdleProcess; 0809 if not biniOk then 0810 SevereError('Unable to Start!'); 0811 PostMessage(Handle, UMREALSTART, 0, 0) 0812 end; 0813 {--------------------------------} 0814 procedure TfrmRun.FormClose(Sender: TObject; var Action: TCloseAction); 0815 begin 0816 tmTimer.Enabled := false; 0817 bStopPaint := true; 0818 RegFigUpdate; 0819 TubeExitList(Theintro); 0820 VolumeBarExit; 0821 QynExit; 0822 MediaExit; 0823 VideoExit; 0824 LogoExit; 0825 CounterExit; 0826 InfoExit; 0827 AboutExit; 0828 MenuExit; 0829 WordsExit; 0830 TracksExit; 0831 PlayListExit; 0832 TubeExit; 0833 TimeBarExit; 0834 ScrollBarExit; 0835 ButtonsExit; 0836 bmpPlayer.Free 0837 end; 0838 {-----------------------------} SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 112 0839 procedure TfrmRun.RealStart(var Msg: TMessage); 0840 begin 0841 if bqAskVideo and (not bVideoEnable) then 0842 QynAsk(TheQvideo, qaVideoYes, qaVideoNO) 0843 else 0844 qaNext1; 0845 end; 0846 {-------------------------------------------------} 0847 procedure TfrmRun.RunAfterExec(Sender: TObject); 0848 begin 0849 ($IFDEF WINDOWS) 0850 WindowState := TWindowState(wsNormal); 0851 {$ELSE) 0852 Application.Restore; 0853 {$ENDIF} 0854 if bQvideo then begin 0855 SysFigCheckVideo; 0856 bQvideo := false; 0857 qaNext1 0858 end 0859 end; 0860 {-------- -------------------------------- 0861 procedure qaVideoNO; 0862 begin 0863 regVideoAsked := true; 0864 qaNext1 0865 end; 0866 {------------------------------------------------- 0867 procedure qaVideoYes; 0868 begin 0869 regVideoAsked := true; 0870 bQvideo := true; 0871 frmRun.Run.CmdLine := sRunDirectory+'Stuff\ActMovie.exe'; 0872 if frmRun.Run.Execute then 0873 {$IFDEF WINDOWS) 0874 WindowState:= TWindowState(wsMinimized) 0875 {$ELSE} 0876 Application.Minimize 0877 {$ENDIF} 0878 else begin 0879 frmRun.ErrorMessage('Unable to Install Active Movie!'); SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 113 0880 bQvideo := false; 0881 qaNext1 0882 end 0883 end; 0884 {---------------------------------} 0885 procedure qaNext1; 0886 begin 0887 TubeDisplay(Theintro); 0888 eTubeModeState := tmINTRO; 0889 if bVideoEnable and bqPlaylntro then begin 0890 bqPlaylntro := false; 0891 if bqAskVote then 0892 eTubeModeState:= tmQYN; 0893 iDelaylntroVideo:= DELAYINTROVIDEO 0894 end 0895 else 0896 qaNext2 0897 end; 0898 {---------------------------} 0899 procedure qaNext2; 0900 begin 0901 if bqAskVote then 0902 QynAsk(TheQvote, qaVoteYes, qaVoteNo) 0903 else 0904 qaNext3 0905 end; 0906 { ------------------------------------- } 0907 procedure qaVoteNO; 0908 begin 0909 regVoteAsked := true; 0910 regVoteEnabled := false; 0911 qaNext3 0912 end; 0913 {------------------------} 0914 procedure qaVoteYes; 0915 begin 0916 regVoteAsked := true; 0917 regVoteEnabled := true; 0918 qaNext3 0919 end; 0920 {----------------------------} SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 114 0921 procedure qaNext3; 0922 begin 0923 TubeDisplay(Thelntro); 0924 eTubeModeState:= tmINTRO 0925 end; 0926 0927 { Errors } 0928 0929 function TfrmRun.NoVideo: boolean; 0930 begin 0931 if bVideoEnable then begin 0932 Result:= false; 0933 exit 0934 end; 0935 waveSorry.Play; 0936 with frmRun.blobMessage do begin 0937 MaxWidth:= 152; 0938 ShowMessage(Your system is not configured to play MPEG video. '+ 0939 'Click the IQ symbol at the bottom left, and select '+ 0940 'Install Active Movie".'+char(1 0)+char(1 0)+char(1 3)+ 0941 'You do not need to perform this install if '+ 0942 'you will not be playing videos, the CD audio '+ 0943 'will still work.', 0944 frmRun.Left+310, frmRun.Top+64) 0945 end; 0946 iErrorMessageTimer:= 200; 0947 Result := true 0948 end; 0949 {------------------------ 0950 procedure TfrmRun.ErrorMessage(const msg: string); 0951 begin 0952 waveSorry.Play; 0953 with frmRun.blobMessage do begin 0954 MaxWidth:= 152; 0955 ShowMessage(Msg, frmRun.Left+310, frmRun.Top+64) 0956 end; 0957 iErrorMessageTimer:= 50 0958 end; 0959 { ---------------------------- } SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 115 0960 procedure TfrmRun.SevereError(const msg: string); 0961 begin 0962 tmTimer.Enabled := false; 0963 bStopPaint := true; 0964 MessageDlg('('+msg+')'+char(10)+char(10)+char(13)+ 0965 'An unexpected problem occured, and lQcd must exit now:'+ 0966 char(10)+char(13)+ 0967 'All will be fine, but you should reboot your computer.', 0968 mtError, [, 0); 0969 Close; 0970 Application.Terminate 0971 end; 0972 {-----------------------------------------------------} 0973 procedure TfrmRun.DefaultException(Sender: TObject; E: Exception); 0974 begin 0975 if true {Application.Terminated} then begin 0976 MessageDIg(E. Message, mtError, [mbOK], 0); 0977 exit 0978 end; 0979 waveSorry.Play; 0980 with frmRun.blobMessage do begin 0981 MaxWidth := 230; 0982 ShowMessage(E.Message+char(10)+char(10)+char(13)+ 0983 'An unexpected problem occured, but it should be '+ 0984 'o.k. to keep going. If things do not work right '+ 0985 'then exit IQcd or reboot your system.', 0986 frmRun.Left+310, frmRun.Top+64) 0987 end; 0988 iErrorMessageTimer:= -1 0989 end; 0990 0991 { form repaint } 0992 0993 {$IFDEF KILLERASE} 0994 procedure TfrmRun.FormErase(var Msg: TWMEraseBkgnd); 0995 begin 0996 {if bVideo256 then begin 0997 SelectPalette(Handle, imgPalette.Picture.Bitmap.Palette, false); 0998 RealizePalette(Handle) SUBSTITUTE SH EET (RULE 26) WO 98/52189 PCTIUS98/10035 116 0999 end;} 1000 Msg.Result:= LRESULT(False) 1001 end; 1002 {$ENDIF} 1003 {---------------------------} 1004 procedure TfrmRun. FormPaint(Sender: TObject); 1005 var 1006 FullRect: TRect; 1007 begin 1008 if bStopPaint then 1009 exit; 1010 if bVideo256 then begin 1011 FullRect := Bounds(0, 0, ClientWidth, ClientHeight); 1012 BitmapUpdateScreen(FullRect) 1013 end 1014 else 1015 BitmapUpdateScreen(Canvas.ClipRect) 1016 end; 1017 end. SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 117 0001 unit Saver; 0002 0003 interface 0004 0005 {$IFDEF WINDOWS} 0006 uses 0007 WinTypes, WinProcs, SysUtils, Messages, Classes, Controls, Inifiles, 0008 Run, IniFig; 0009 {$ELSE} 0010 uses 0011 Windows, SysUtils, Messages, Classes, Controls, Inifiles, 0012 Run, IniFig; 0013 {$ENDIF} 0014 {--------------------------------} 0015 function SaverOursnstalled: boolean; 0016 function UsingThisSaver(const ThisSaver: string): boolean; 0017 function UsingSaver: boolean; 0018 function UsingOurSaver: boolean; 0019 function SetSaver(const SaverName: string): boolean; 0020 procedure GetSaver( var SaverName: string); 0021 0022 implementation 0023 0024 uses 0025 Sysfig; 0026 0027 { Code } 0028 0029 function SaverOursInstalled: boolean; 0030 var 0031 fSaver: TextFile; 0032 begin 0033 try 0034 AssignFile(fSaver, sSystemDirectory+iniScreenSaver+'.scr); 0035 Reset(fSaver); SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 118 0036 CloseFile(fSaver); 0037 result true 0038 except 0039 result false 0040 end 0041 end; 0042 {------------------------------} 0043 function UsingThisSaver(const ThisSaver: string): boolean; 0044 var 0045 Ini: TiniFile; 0046 begin 0047 result false; 0048 try 0049 Ini := TlniFile.Create(sWindowsDirectory+'System.ini') 0050 except 0051 exit 0052 end; 0053 try 0054 result := (Ini.ReadString('boot', 'SCRNSAVE.EXE', ")=ThisSaver) 0055 except 0056 end; 0057 Ini.Free; 0058 end; 0059 {-------------------------------} 0060 function UsingSaver: boolean; 0061 begin 0062 result := not UsingThisSaver("); 0063 end; 0064 {-----------------------------} 0065 function UsingOurSaver: boolean; 0066 begin 0067 result := UsingThisSaver(sSystemDirectory+iniScreenSaver+'.scr'); 0068 end; 0069 {----------------------------} 0070 function SetSaver( const SaverName: string): boolean; 0071 var 0072 Ini: TiniFile; 0073 begin 0074 result := true; 0075 try 0076 Ini := TlniFile.Create(sWindowsDirectory+'System.ini') SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 119 0077 except 0078 exit 0079 end; 0080 try 0081 Ini.WriteString('boot', 'SCRNSAVE.EXE', SaverName) 0082 except 0083 end; 0084 Ini.Free; 0085 result := false 0086 end; 0087 {----------------------------------------------- 0088 procedure GetSaver( var SaverName: string); 0089 var 0090 Ini: TiniFile; 0091 begin 0092 SaverName:= 0093 try 0094 Ini := TIniFile.Create(sWindowsDirectory+'System.ini') 0095 except 0096 exit 0097 end; 0098 try 0099 SaverName := Ini.ReadString('boot', 'SCRNSAVE.EXE',") 0100 except 0101 end; 0102 Ini.Free 0103 end; 0104 end. SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 120 0001 unit ScrolBar; 0002
{=========================================================================}
0003 interface 0004 0005 {$IFDEF WINDOWS} 0006 uses 0007 Systils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, 0008 Forms, Dialogs, LMDnonvS, 0009 Run, Main, CDPlayer, BitBtns, BitBars; 0010 {$ELSE} 0011 uses 0012 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, 0013 ExtCtrls, StdCtris, LMDnonvS, 0014 Run, Main, CDPlayer, BitBtns, BitBars; 0015 {$ENDIF} 0016 {------ ---------------------------------- } 0017 procedure ScrollBarlnitialize; 0018 procedure ScrollBarExit; 0019 procedure ScrollBarStartDelay; 0020 procedure ScrollBarMouseDown; 0021 procedure ScrollBarMouseUp; 0022 procedure ScrollBarMouseDrag( x, y: longint); 0023 procedure ScrollBarMouseMove(X,Y: longint); 0024 procedure ScrollBarTimerTick; 0025 procedure ScrollBarAbort; 0026 procedure ScrollBarPosition(Position: longint); 0027 {-----------------------------------------------} 0028 var 0029 Scroll: TBar; 0030 0031 implementation 0032 0033 uses 0034 Tube, Words; 0035 {------------------------------------------------} 0036 var 0037 bScrollBarMouseDown: boolean; SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 121 0038 iTimerPosition: longint; 0039 iTimerDelay: longint; 0040 iHintitem: longint; 0041 iHintX, iHintY: longint; 0042 iHintDelayTimer: longint; 0043 sHintMsg: string[250]; 0044 bHintVisible: boolean; 0045 blnHintArea: boolean; 0046 0047 { Main Code } 0048 0049 procedure ScrollBarPosition(Position: longint); 0050 begin 0051 if bScrollBarMouseDown or (iTimerDelay>=0) then 0052 iTimerPosition := Position 0053 else 0054 BarSetPosition(Scroll, Position); 0055 TubeScroll(Scroll.iSlidePosition) 0056 end; 0057 {----------------------} 0058 procedure ScrollBarStartDelay; 0059 begin 0060 iTimerDelay := SCROLLDELAY 0061 end; 0062 0063 { Mouse Handling } 0064 0065 procedure ScrollBarMouseDown; 0066 begin 0067 if Scroll.bEnabled and BarButtonHit(Scroll) then begin 0068 iHintltem := 0; 0069 iHintDelayTimer:= 0; 0070 if bHintVisible then begin 0071 frmRun.blobHint.HideMessage; 0072 bHintVisible := false 0073 end; 0074 BarMouseMoveStart(Scroll); SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 122 0075 bScrollBarMouseDown := true; 0076 if (eTubeModeState=tmWORDS) and (eCDPlayerState=psPLAYNG) then begin 0077 iTimerPosition := Scroll.iSlidePosition; 0078 iTimerDelay:= SCROLLDELAY 0079 end 0080 end 0081 end; 0082 {-------------------} 0083 procedure ScroliBarMouseUp; 0084 begin 0085 bScrollBarMouseDown := false; 0086 end; 0087 {------- ---------------- } 0088 procedure ScrollBarMouseDrag( x, y: longint); 0089 begin 0090 if bScrollBarMouseDown then begin 0091 BarMouseMoveDraw(Scroli,x,y); 0092 TubeScroll(Scroll.iSlidePosition) 0093 end 0094 end; 0095 {---------------------} 0096 procedure ScrollBarMouseMove(X,Y: longint); 0097 var 0098 iltem: longint; 0099 xl,y1: longint; 0100 label 0101 exitl; 0102 begin 0103 if not Scroll.bEnabled then 0104 goto exit; 0105 if bScrollBarMouseDown then 0106 goto exit; 0107 iHintX:= frmRun.Left+X-5; 0108 iHintY := frmRun.Top+Y-0; 0109 iltem := 0; 0110 with Scroll.spriteBack do begin 0111 x1 :X-Left; 0112 y1 :Y-Top; 0113 if (xl>=0) and (xl-Width-1<=0) and (yl>=O) and (yl-Height-1<=0) then 0114 iltem := 1 0115 end; SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCTIUS98/10035 123 0116 if iltem>0 then begin 0117 if iltem<>iHintltem then begin 0118 iHintDelayTimer:= HINTDELAY; 0119 iHintitem:= iltem 0120 end; 0121 exit 0122 end; 0123 exit: 0124 iHintDelayTimer:= 0; 0125 iHintitem := 0; 0126 0127 if bHintVisible then begin 0128 frmRun.blobHint.HideMessage; 0129 bHintVisible := false 0130 end 0131 end; 0132 {------------------------------------------------} 0133 procedure ScroliBarTimerTick; 0134 begin 0135 if iHintDelayTimer>0 then begin 0136 Dec(iHintDelayTimer); 0137 if iHintDelayTimer=0 then begin 0138 if bHintVisible then 0139 frmRun.blobHint.HideMessage; 0140 iHintLastX:= iHintX; 0141 iHintLastY:= iHintY; 0142 sHintLastMsg := sHintMsg; 0143 frmRun.blobHint.Position := hpAboveLeft; 0144 frmRun.blobHint.ShowMessage(sHintMsg, iHintX, iHintY); 0145 bHintVisible := true 0146 end 0147 end; 0148 if bScrollBarMouseDown or (iTimerDelay<0) then 0149 exit; 0150 Dec(iTimerDelay); 0151 if iTimerDelay<0 then begin 0152 BarSetPosition(Scroll, iTimerPosition); 0153 TubeScroll(iTimerPosition) 0154 end 0155 end; 0156 SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 124 0157 { Mouse Handling } 0158 0159 procedure ScrollBarAbort; 0160 begin 0161 bScrollBarMouseDown := false; 0162 if iTimerDelay>-1 then begin 0163 iTimerDelay:= -1; 0164 TubeScroll(iTimerPosition) 0165 end 0166 end; 0167 0168 { Initalize / Exit } 0169 0170 procedure ScrollBarinitialize; 0171 begin 0172 Barinitialize(Scroll, frmMain.imgScroll_Back, 0173 frmMain.imgScrollRod, frmMain.imgScroll_Button, 0174 frmMain.imgScrollEnd1, frmMain.imgScroll_End2); 0175 iTimerDelay:= -1; 0176 sHintMsg 'Drag button to scroll display.'; 0177 iHintitem 0; 0178 iHintDelayTimer:= 0; 0179 bHintVisible false; 0180 bInHintArea false; 0181 bScrollBarMouseDown := false 0182 end; 0183 { ------------------------------ } 0184 procedure ScrollBarExit; 0185 begin 0186 BarExit(Scroll) 0187 end; 0188 end. SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 125 0001 unit SysFig; 0002 0003 interface 0004 0005 {$IFDEF WINDOWS) 0006 uses 0007 Forms, WinTypes, WinProcs, SysUtils, Messages, Classes, Controls, Inifiles, 0008 Run; 0009 {$ELSE) 0010 uses 0011 Forms, Windows, SysUtils, Messages, Classes, Controls, IniFiles, 0012 Run; 0013 {$ENDIF} 0014 {-----------------------} 0015 function SysPad( N, span: integer): string; 0016 procedure SysFigCheckVideo; 0017 procedure SysFigLoad; 0018 {------ ------------------- } 0019 var 0020 bVideo256: boolean; 0021 bVideoEnable: boolean; 0022 sRunDirectory: string[200]; 0023 sWindowsDirectory: string[200]; 0024 sSystemDirectory: string[200]; 0025 startWallpaperName, 0026 startWallpaperTile: string[200]; 0027 startScreenSaver: string[100]; 0028 0029 implementation 0030 0031 uses 0032 Wall, Saver; 0033 0034 { Code } 0035 SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 126 0036 procedure SysFigCheckVideo; 0037 var 0038 Ini: TiniFile; 0039 s: string[100]; 0040 begin 0041 bVideoEnable := false; 0042 Ini := TIniFile.Create(sWindowsDirectory+'System.ini'); 0043 try 0044 s := lni.ReadString('MCI', 'MPEGVIDEO', "); 0045 except 0046 end; 0047 if s<>" then 0048 bVideoEnable := true; 0049 Ini.Free 0050 end; 0051 { -------------------------------------- } 0052 function SysPad( N, span: integer): string; 0053 var 0054 st: string[12]; 0055 begin 0056 st := lntToStr(N); 0057 if Length(st)<span then 0058 result := Copy('000000000', 1, span-Length(st)) + st 0059 else 0060 result : st 0061 end; 0062 {------ ------------------ } 0063 procedure SysFigLoad; 0064 var 0065 n: word; 0066 DC: HDC; 0067 begin 0068 DC := frmRun.Canvas.Handle; 0069 if (GetDeviceCaps(DC, RASTERCAPS) and RC_PALETTE)<>0 then 0070 bVideo256 := true 0071 else 0072 bVideo256 := false; 0073 sRunDirectory := ExtractFilePath(Application.ExeName); 0074 n := GetWindowsDirectory(Pointer(@sWindowsDirectory[l1]), 200-1); 0075 if sWindowsDirectory[n]<>'V then begin 0076 sWindowsDirectory[n+1] := '; SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 127 0077 Inc(n) 0078 end; 0079 sWindowsDirectory[0] := Char(n); 0080 n := GetSystemDirectory(Pointer(@sSystemDirectory[1]), 200-1); 0081 if sSystemDirectory[n]<>'\' then begin 0082 sSystemDirectory[n+1] := '; 0083 Inc(n) 0084 end; 0085 sSystemDirectory[0] := Char(n); 0086 GetWallpaper(startWallpaperName, startWallpaperTile); 0087 GetSaver(startScreenSaver) 0088 end; 0089 end. SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 128 0001 unit TimeBar; 0002 0003 interface 0004 0005 {$IFDEF WINDOWS} 0006 uses 0007 SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, 0008 Forms, Dialogs, LMDnonvS, 0009 Run, Main, BitBars, Tube, Words, ScrolBar, Counter; 0010 {$ELSE} 0011 uses 0012 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, 0013 ExtCtrls, StdCtrIs, LMDnonvS, 0014 Run, Main, BitBars, Tube, Words, ScrolBar, Counter; 0015 {$ENDIF} 0016 {-----------------------} 0017 procedure TimeBarinitialize; 0018 procedure TimeBarExit; 0019 procedure TimeBarNewTrack(TrackNo: longint); 0020 procedure TimeBarPosition(TrackTime: longint); 0021 function TimeBarGetPosition: longint; 0022 procedure TimeBarMouseDown; 0023 procedure TimeBarMouseUp; 0024 procedure TimeBarMouseDrag( x, y: longint); 0025 procedure TimeBarMouseMove(X,Y: longint); 0026 procedure TimeBarTimerTick; 0027 {-----------------------} 0028 var 0029 Time: TBar; 0030 0031 implementation 0032 0033 uses 0034 CDPlayer; 0035{------------------------} 0036 var 0037 bTimeBarMouseDown: boolean; SUBSTITUTE SH EET (RULE 26) WO 98/52189 PCT/US98/10035 129 0038 iHintitem: longint; 0039 iHintX, iHintY: longint; 0040 iHintDelayTimer: longint; 0041 sHintMsg: string[250]; 0042 bHintVisible: boolean; 0043 binHintArea: boolean; 0044 0045 { Main Code 0046 0047 procedure TimeBarNewTrack(TrackNo: longint); 0048 begin 0049 BarSetRange(Time, iAudioTrackLength[TrackNo]); 0050 BarSetPosition(Time, 0); 0051 BarEnable(Time); 0052 CounterNewTrack; 0053 CounterSetTime(0); 0054 TubeSetTime(TheWords[TrackNo], 0) 0055 end; 0056 {---------------------------- 0057 procedure TimeBarPosition(TrackTime: longint); 0058 begin 0059 if not bTimeBarMouseDown then begin 0060 BarSetPosition(Time, TrackTime); 0061 CounterSetTime(TrackTime); 0062 TubeSetTime(TheWords[iLastTrackNo], TrackTime) 0063 end 0064 end; 0065 {---------------------------} 0066 function TimeBarGetPosition: longint; 0067 begin 0068 result:= BarGetPosition(Time) 0069 end; 0070 0071 { Mouse Handling 0072 0073 procedure TimeBarMouseDown; 0074 begin SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 130 0075 if BarButtonHit(Time) then begin 0076 iHintitem := 0; 0077 iHintDelayTimer:= 0; 0078 if bHintVisible then begin 0079 frmRun.blobHint.HideMessage; 0080 bHintVisible := false 0081 end; 0082 BarMouseMoveStart(Time); 0083 bTimeBarMouseDown := true; 0084 frmRun.TimeMoveStart; 0085 end 0086 end; 0087 {-----------------------------} 0088 procedure TimeBarMouseUp; 0089 begin 0090 if not bTimeBarMouseDown then 0091 exit; 0092 bTimeBarMouseDown := false; 0093 frmRun.TimeMoveEnd; 0094 end; 0095 {-----------------------} 0096 procedure TimeBarMouseDrag( x, y: longint); 0097 begin 0098 if bTimeBarMouseDown then begin 0099 ScrollBarAbort; 0100 BarMouseMoveDraw(Time,x,y); 0101 CounterSetTime(BarGetposition(Time)); 0102 TubeSetTime(TheWords[iLastTrackNo], BarGetPosition(Time)) 0103 end 0104 end; 0105 {-------------------------} 0106 procedure TimeBarMouseMove(X,Y: longint); 0107 var 0108 item: longint; 0109 x1l,yl: longint; 0110 label 0111 exit; 0112 begin 0113 if bTimeBarMouseDown then 0114 goto exit; 0115 iHintX := frmRun.Left+X+5; SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 131 0116 if Y>=Time.spriteBack.Top then 0117 iHintY:= frmRun.Top+Time.spriteBack.Top 0118 else 0119 iHintY:= frmRun.Top+Y-0; 0120 iltem := 0; 0121 with Time.spriteBack do begin 0122 x1 :=X-Left; 0123 yl Y-Top; 0124 if (xl>=0) and (xl-Width-1<=0) and (yl>=O) and (yl-Height-1<=0) then 0125 iltem:= 1 0126 end; 0127 if iltem>0 then begin 0128 if iltem<>iHintitem then begin 0129 iHintDelayTimer:= HINTDELAY; 0130 iHintitem:= iltem 0131 end; 0132 exit 0133 end; 0134 exit: 0135 iHintDelayTimer := 0; 0136 iHintitem := 0; 0137 if bHintVisible then begin 0138 frmRun.blobHint.HideMessage; 0139 bHintVisible := false 0140 end 0141 end; 0142 {----- ---------------------------------- 0143 procedure TimeBarTimerTick; 0144 begin 0145 if iHintDelayTimer=0 then 0146 exit; 0147 Dec(iHintDelayTimer); 0148 if iHintDelayTimer=0 then begin 0149 if bHintVisible then 0150 frmRun.blobHint.HideMessage; 0151 iHintLastX := iHintX; 0152 iHintLastY := iHintY; 0153 sHintLastMsg := sHintMsg; 0154 frmRun.blobHint.Position := hpAboveRight; 0155 frmRun.blobHint.ShowMessage(sHintMsg, iHintX, iHintY); 0156 bHintVisible := true SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCTIUS98/10035 132 0157 end 0158 end; 0159 0160 { Initalize /Exit } 0161 0162 procedure TimeBarinitialize; 0163 begin 0164 Barinitialize(Time, frmMain.imgTimeBack, 0165 frmMain.imgTimeRod, frmMain.imgTimeButton, 0166 frmMain.imgTimeEndl, frmMain.imgTimeEnd2); 0167 sHintMsg :='Drag button to move track time.'; 0168 iHintitem := 0; 0169 iHintDelayTimer:= 0; 0170 bHintVisible false; 0171 binHintArea false; 0172 bTimeBarMouseDown := false 0173 end; 0174 {--------------------------------------} 0175 procedure TimeBarExit; 0176 begin 0177 BarExit(Time) 0178 end; 0179 end. SUBSTITUTE SH EET (RULE 26) WO 98/52189 PCT/US98/10035 133 0001 unit Tracks; 0002 0003 interface 0004 0005 {$IFDEF WINDOWS} 0006 uses 0007 SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, 0008 Forms, Dialogs, LMDnonvS, 0009 Run, Main, CDPlayer, Bitmaps, Tube; 0010 {$ELSE} 0011 uses 0012 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, 0013 ExtCtrIs, StdCtrls, LMDnonvS, 0014 Run, Main, CDPlayer, Bitmaps, Tube; 0015 {$ENDIF} 0016 {-----------------------} 0017 procedure Tracksinitialize; 0018 procedure TracksExit; 0019 procedure TracksNewTrack(TrackNo: longint); 0020 procedure TracksMouseDown; 0021 procedure TracksMouseMove(X,Y: longint); 0022 procedure TracksTimerTick; 0023 0024 implementation 0025 0026 uses 0027 PlayList; 0028 {-----------------------} 0029 const 0030 LEDTEXTADJUST = 3; 0031 TRACKCLICKADJUST = 1; 0032 {-----------------------) 0033 var 0034 spriteTracksBack, 0035 spriteTracksLedOn, 0036 spriteTracksLedOff: TSprite; 0037 bTracksMouseDown: boolean; SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 134 0038 iTracksTop, iTracksSpacing: longint; 0039 iTracksTextLeft, iTracksTextWidth: longint; 0040 iTracksLEDLeft, iTracksLEDWidth: longint; 0041 iHintitem: longint; 0042 iHintX, iHintY: longint; 0043 iHintDelayTimer: longint; 0044 sHintMsg: string[250]; 0045 bHintVisible: boolean; 0046 binHintArea: boolean; 0047 {------------------------} 0048 procedure DrawTrack(TrackNo: longint; SelectedState: boolean); forward; 0049 procedure DrawLED(TrackNo: longint; EnabledState: boolean); forward; 0050 function TrackMouseHit(X,Y: longint): longint; forward; 0051 function LedMouseHit(X,Y: longint): longint; forward; 0052 0053 { Local Routines } 0054 0055 procedure DrawTrack(TrackNo: longint; SelectedState: boolean); 0056 var 0057 TextAlignFlags: word; 0058 iBitmapLine: longint; 0059 TrackRect: TRect; 0060 sTrack: string[4]; 0061 begin 0062 with bmpPlayer.Canvas do begin 0063 TextAlignFiags:= SetTextAlign(Handle, TARIGHT+TATOP+TANOUPDATECP); 0064 Brush.Style := bsClear; 0065 Font.Size : iTextFontSize; 0066 Font.Style [fsBold]; 0067 if bTrackEnabled[TrackNo] then 0068 if SelectedState then 0069 Font.Color:= TEXTHIGHLIGHT 0070 else 0071 Font.Color:= TEXTNORMAL 0072 else 0073 Font.Color:= TEXTDISSABLED; 0074 sTrack:= IntToStr(TrackNo); 0075 iBitmapLine := iTracksTop + (TrackNo-1)*iTracksSpacing - LEDTEXTADJUST; 0076 TrackRect := bounds(iTracksTextLeft, iBitmapLine, SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 135 0077 iTracksTextWidth, iTracksSpacing); 0078 ExtTextOut(Handle, 0079 iTracksTextLeft+iTracksTextWidth-1, iBitmapLine, 0080 ETOCLIPPED, @TrackRect, Pointer(@sTrack[l]), Length(sTrack), nil); 0081 SetTextAlign(Handle, TextAlignFlags); 0082 BitmapUpdateScreen(Trackrect) 0083 end; 0084 end; 0085 {-----------------------} 0086 procedure DrawLED(TrackNo: longint; EnabledState: boolean); 0087 var 0088 iBitmapLine: longint; 0089 begin 0090 iBitmapLine := iTracksTop + (TrackNo-1)*iTracksSpacing; 0091 if EnabledState then begin 0092 spriteTracksLedOn.Top:= iBitmapLine; 0093 BitmapDraw(spriteTracksLedOn) 0094 end 0095 else begin 0096 spriteTracksLedOff.Top:= iBitmapLine; 0097 BitmapDraw(spriteTracksLedOff) 0098 end 0099 end; 0100 {-------------------------} 0101 function TrackMouseHit(X,Y: longint): longint; 0102 var 0103 iTrack: longint; 0104 iTrackLine: longint; 0105 begin 0106 result := 0; 0107 if (X<iTracksTextLeft) or 0108 (X>iTracksTextLeft+iTracksTextWidth-1-TRACKCLICKADJUST) then 0109 exit; 0110 for iTrack := 1 to iAudioTracks do begin 0111 iTrackLine := iTracksTop + (iTrack-1)*iTracksSpacing; 0112 if (Y>=iTrackLine) and (Y<=iTrackLine+iTracksSpacing-1) then begin 0113 result := iTrack; 0114 exit 0115 end 0116 end 0117 end; SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 136 0118 {-----------------------------------------------} 0119 function LedMouseHit(X,Y: longint): longint; 0120 var 0121 iTrack: longint; 0122 iTrackLine: longint; 0123 begin 0124 result := 0; 0125 if (X<iTracksLEDLeft) or (X>iTracksLEDLeft+iTracksLEDWidth-1) then 0126 exit; 0127 for iTrack := 1 to iAudioTracks do begin 0128 iTrackLine := iTracksTop + (iTrack-1)*iTracksSpacing; 0129 if (Y>=iTrackLine) and (Y<=iTrackLine+iTracksSpacing-1) then begin 0130 result := iTrack; 0131 exit 0132 end 0133 end 0134 end; 0135 0136 { Main code } 0137 0138 procedure TracksNewTrack(TrackNo: longint); 0139 begin 0140 if TrackNo<>iLastTrackNo then begin 0141 if iLastTrackNo>0 then 0142 DrawTrack(iLastTrackNo, false); 0143 DrawTrack(TrackNo, true) 0144 end 0145 end; 0146 0147 { Mouse Handling } 0148 0149 procedure TracksMouseDown; 0150 var 0151 iTrack, iTrackE: longint; 0152 iTracksEnabled: longint; 0153 begin 0154 iTrack:= TrackMouseHit(iMouseDownX, iMouseDownY); SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCTIUS98/10035 137 0155 if iTrack>0 then begin 0156 iHintDelayTimer:= 0; 0157 0158 if bHintVisible then begin 0159 frmRun.blobHint.HideMessage; 0160 bHintVisible := false 0161 end; 0162 if bTrackEnabled[itrack] then 0163 frmRun.TrackClicked(iTrack); 0164 exit 0165 end; 0166 iTrack:= LedMouseHit(iMouseDownX, iMouseDownY); 0167 if iTrack>0 then begin 0168 iTracksEnabled := 0; 0169 for iTrackE := 1 to iAudioTracks do 0170 if bTrackEnabled[iTrackE] then 0171 1nc(iTracksEnabled); 0172 if (iTracksEnabled=1) and bTrackEnabled[iTrack] then begin 0173 frmRun.ErrorMessage( 0174 'How can I play anything if you dissable all the tracks!'); 0175 exit 0176 end; 0177 iHintDelayTimer:= 0; 0178 if bHintVisible then begin 0179 frmRun.blobHint.HideMessage; 0180 bHintVisible := false 0181 end; 0182 bTrackEnabled[iTrack] := not bTrackEnabled[iTrack]; 0183 DrawTrack(iTrack, (iLastTrackNO=iTrack)); 0184 DrawLED(iTrack, bTrackEnabled[iTrack]); 0185 if bTrackEnabled[iTrack] then 0186 PlayListTrackEnable(iTrack) 0187 else 0188 PlayListTrackDissable(iTrack); 0189 exit 0190 end 0191 end; 0192 (------------------------} 0193 procedure TracksMouseMove(X,Y: longint); 0194 var 0195 iltem: longint; SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCTIUS98/10035 138 0196 begin 0197 iHintX:= frmRun.Left+X-5; 0198 iHintY:= frmRun.Top+Y-0; 0199 iltem := -TrackMouseHit(X,Y); 0200 if iltem<0 then begin 0201 if iltem<>iHintitem then begin 0202 if bHintVisible then begin 0203 frmRun.blobHint.HideMessage; 0204 bHintVisible := false 0205 end; 0206 iHintDelayTimer:= HINTDELAY; 0207 iHintitem := item 0208 end; 0209 exit 0210 end; 0211 iltem:= LedMouseHit(X,Y); 0212 if iltem>0 then begin 0213 if iltem<>iHintltem then begin 0214 if bHintVisible then begin 0215 frmRun.blobHint.HideMessage; 0216 bHintVisible := false 0217 end; 0218 iHintDelayTimer:= HINTDELAY; 0219 iHintitem := iltem 0220 end; 0221 exit 0222 end; 0223 iHintDelayTimer:= 0; 0224 iHintitem := 0; 0225 if bHintVisible then begin 0226 frmRun.blobHint.HideMessage; 0227 bHintVisible := false 0228 end 0229 end; 0230 { ------------------------------- } 0231 procedure TracksTimerTick; 0232 begin 0233 if iHintDelayTimer=0 then 0234 exit; 0235 Dec(iHintDelayTimer); 0236 if iHintDelayTimer=0 then begin SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCTIUS98/10035 139 0237 if bHintVisible then 0238 frmRun.blobHint.HideMessage; 0239 sHintMsg :='No hint, sorry.'; 0240 if iHintltem>0 then 0241 if bTrackEnabled[iHintitem] then 0242 sHintMsg 'Click indicator to disable the track' 0243 else 0244 sHintMsg 'Click indicator to enable the track.'; 0245 if iHintitem<0 then 0246 sHintMsg := 'Click number to select the track.'; 0247 iHintLastX:= iHintX; 0248 iHintLastY:= iHintY; 0249 sHintLastMsg := sHintMsg; 0250 frmRun.blobHint.Position := hpAboveLeft; 0251 frmRun.blobHint.ShowMessage(sHintMsg, iHintX, iHintY); 0252 bHintVisible := true 0253 end 0254 end; 0255 0256 { Initalize / Exit } 0257 0258 procedure Tracksinitialize; 0259 var 0260 TrackNo: longint; 0261 sTrack: string[4]; 0262 begin 0263 BitmapCreate(spriteTracksBack, frmMain.imgTracksBack, false); 0264 BitmapCreate(spriteTracksLedOn, frmMain.imgTracksLedOn, true); 0265 BitmapCreate(spriteTracksLedOff, frmMain.imgTracksLedOff, true); 0266 iTracksTop:= iTextBlockTop; 0267 iTracksSpacing := iTextBlockHeight div iAudioTracks; 0268 iTracksLEDLeft:= spriteTracksLedOn.Left; 0269 iTracksLEDWidth := spriteTracksLedOn.Width; 0270 iTracksTextLeft:= spriteTracksBack.Left + 0271 ((spriteTracksBack.Left+spriteTracksBack.Width-1) 0272 (ITracksLEDLeft+lTracksLEDWidth-1)); 0273 with frmRun.Canvas do begin 0274 Font.Size iTextFontSize; 0275 Font.Style [fsBold]; SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCTIUS98/10035 140 0276 sTrack := '10'; 0277 iTracksTextWidth := TextWidth(sTrack) 0278 end; 0279 for TrackNo := 1 to iAudioTracks do begin 0280 bTrackEnabled[TrackNo] := true; 0281 DrawTrack( TrackNo, false); 0282 DrawLED( TrackNo, true) 0283 end; 0284 iHintitem := 0; 0285 iHintDelayTimer:= 0; 0286 bHintVisible:= false; 0287 bInHintArea := false; 0288 bTracksMouseDown := false 0289 end; 0290 {---------------------------------} 0291 procedure TracksExit; 0292 begin 0293 BitmapDestroy(spriteTracksLedOff); 0294 BitmapDestroy(spriteTracksLedOn); 0295 BitmapDestroy(spriteTracksBack) 0296 end; 0297 end. SUBSTITUTE S H EET (RULE 26) WO 98/52189 PCT/US98/10035 141 0001 unit TrkMedia; 0002 0003 interface 0004 0005 ($IFDEF WINDOWS) 0006 uses 0007 SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, 0008 Forms, Dialogs, 0009 Run, Main, Bitmaps, Tube, Video, Comment; 0010 {$ELSE} 0011 uses 0012 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, 0013 ExtCtris, StdCtris, 0014 Run, Main, Bitmaps, Tube, Video, Comment; 0015 {$ENDIF) 0016 {-------------------------------------------} 0017 procedure Medialnitialize; 0018 procedure MediaExit; 0019 procedure MediaDraw(TrackNo: longint); 0020 procedure MediaNewTrack(TrackNo: longint); 0021 0022 implementation 0023 0024 var 0025 spriteMediaVideo, 0026 spriteMedia_Comment, 0027 spriteMedia_Vyes, 0028 spriteMediaVno, 0029 spriteMediaCyes, 0030 spriteMediacno, 0031 spriteMedia_Block: TSprite; 0032 bmpBlockO: TBitmap; 0033 0034 { Main code } 0035 SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 142 0036 procedure MediaDraw(TrackNo: longint); 0037 begin 0038 with spriteMediaBlock.Image do . 0039 BitBlt(Canvas.Handle, 0, 0, Width, Height, 0040 bmpBlock0.Canvas.Handle, 0, 0, srcCopy); 0041 with spriteMediaBlock do begin 0042 BitmapOverlay(Image, spriteMediaVideo, TSprite(niA)); 0043 BitmapOverlay(Image, spriteMedia_Comment, TSprite(niIA)); 0044 if not bVideoAvailable[TrackNo] then 0045 BitmapOverlay(Image, spriteMediaVno, TSprite(niIA)); 0046 if not bCommentaryAvailable[TrackNo] then 0047 BitmapOverlay(Image, spriteMedia_Cno, TSprite(niIA)) 0048 end; 0049 BitmapDraw(spriteMediaBlock) 0050 end; 0051 { ------------------------------- } 0052 procedure MediaNewTrack(TrackNo: longint); 0053 begin 0054 if ((eTubeModeState=tmTRACKS) or 0055 (eTubeModeState=tmWORDS) or 0056 (eTubeModeState=tmlNFO)) then 0057 if TrackNo<>iLastTrackNo then 0058 MediaDraw(TrackNo) 0059 end; 0060 0061 { Initalize / Exit } 0062 0063 procedure Medialnitialize; 0064 var 0065 I: string[50]; 0066 p: integer; 0067 x,y: longint; 0068 Rect1, Rect2: Trect; 0069 begin 0070 BitmapCreate(spriteMediaVideo, frmMain.imgTracksVideo, true); 0071 BitmapCreate(spriteMediaComment, frmMain.imgTracksComment, true); 0072 BitmapCreate(spriteMediaVyes, frmMain.imgTracksVyes, true); 0073 BitmapCreate(spriteMedia_Vno, frmMain.imgTracksVno, true); 0074 BitmapCreate(spriteMediaCyes, frmMain.imgTracksCyes, true); SUBSTITUTE SH EET (RULE 26) WO 98/52189 PCT/US98/10035 143 0075 BitmapCreate(spriteMediaCno, frmMain.imgTracksCno, true); 0076 with frmMain.imgTracksBlock do begin 0077 I:= Hint; 0078 p:= Pos',',1); 0079 x:= StrTolnt(Copy(I,1,p-1)); 0080 y:= StrToint(Copy(I,p+1,99)); 0081 Rect1 Bounds(0, 0, Width, Height); 0082 Rect2 Bounds(x-spriteTubeText.Left, y-spriteTubeText.Top, Width, Height); 0083 Canvas.CopyRect(Rectl, frmMain.imgTubeText.Canvas, Rect2) 0084 end; 0085 BitmapCreate(spriteMediaBlock, frmMain.imgTracksBlock, true); 0086 bmpBlockO := TBitmap.Create; 0087 bmpBlockO.Assign(spriteMediaBlock. Image) 0088 end; 0089 {-------------------------------} 0090 procedure MediaExit; 0091 begin 0092 BitmapDestroy(spriteMediaVideo); 0093 BitmapDestroy(spriteMediaComment); 0094 BitmapDestroy(sprteMediaVyes); 0095 BitmapDestroy(spriteMediaVno); 0096 BitmapDestroy(spriteMediaCyes); 0097 BitmapDestroy(spriteMediaCno); 0098 BitmapDestroy(spriteMediaBlock); 0099 bmpBlockO.Free 0100 end; 0101 end. SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 144 0001 unit Tube; 0002 {$DEFINE NOSCROLLLEADER} 0003 {$DEFINE NOSCROLLTRAILER) 0004 0005 interface 0006 0007 {$IFDEF WINDOWS) 0008 uses 0009 SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, 0010 Forms, Dialogs, Printers, 0011 Run, Main, CDPlayer, Bitmaps, ScrolBar, BitBars; 0012 {$ELSE} 0013 uses 0014 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, 0015 ExtCtrls, StdCtrls, Printers, 0016 Run, Main, CDPlayer, Bitmaps, ScrolBar, BitBars; 0017 {$ENDIF} 0018 {---------------------} 0019 type 0020 TTubeList = record 0021 iCurrentBitmapTop: longint; 0022 iCurrentSteppedTop: longint; 0023 iBottomBitmapLine: longint; 0024 iBitmapMaxTop: longint; 0025 pTube: pTSprite; 0026 TextList: TStringList 0027 end; 0028 TTubeLine = record 0029 bEnabled: boolean; 0030 bHighlight: boolean; 0031 iMaxFontSize: longint; 0032 iBitmapHeight: longint; 0033 iBitmapLeft, iBitmapTop: longint; 0034 iTimeStamp: longint 0035 end; 0036 pTTubeLine = ^TTubeLine; 0037 {-----------------------} 0038 var 0039 iTextFontSize: longint; SUBSTITUTE SH EET (RULE 26) WO 98/52189 PCTIUS98/10035 145 0040 iTextBlockLeft, iTextBlockTop, 0041 iTextBlockWidth, iTextBlockHeight: longint; 0042 spriteTubelntro, 0043 spriteTubeText, 0044 spriteTubeMenu: TSprite; 0045 spriteMenuBullet: TSprite; 0046 pCurrentTubeList: ATTubeList; 0047 pCurrentTube: pTSprte; 0048 iLastTubeScroll: longint; 0049 {------------- ---------- } 0050 procedure Tubelnitialize; 0051 procedure TubeExit; 0052 procedure TubelnitList(var spriteTube; var TubeList: TTubeList; 0053 LineSpacing, LeftOffset: longint); 0054 procedure TubeExitList(var TubeList: TTubeList); 0055 procedure TubeRefresh(var TubeList: TTubeList); 0056 procedure TubeDisplay(var TubeList: TTubeList); 0057 procedure TubeSetTopLine(var TubeList: TTubeList; TopTextLine: longint); 0058 procedure TubeSetAllNormal(var TubeList: TTubeList); 0059 procedure TubeSetHighlight(var TubeList: TTubeList; TextLine: longint); 0060 procedure TubeSetNormal(var TubeList: TTubeList; TextLine: longint); 0061 procedure TubeSetEnable(var TubeList: TTubeList; TextLine: longint); 0062 procedure TubeSetDissable(var TubeList: TTubeList; TextLine: longint); 0063 procedure TubeSetTime(var TubeList: TTubeList; LineTime: longint); 0064 procedure TubePrint; 0065 function TubeHit(X,Y: longint): longint; 0066 function TubeltemHit(X,Y: longint): longint; 0067 procedure TubeScroll(TopBitmapLine: longint); 0068 0069 implementation 0070 0071 uses 0072 Words; 0073 {-------------------} 0074 const 0075 FORCEDRAW = -9999; 0076 {----------------------) 0077 function SteppedBitmapLine(var TubeList: TTUbeList; BitmapLine: longint): 0078 longint; forward; SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCTIUS98/10035 146 0079 procedure GetVisibleLinesRange(var iStartLine, iLastLine: longint); forward; 0080 procedure GetLineSizes(const sText: string; var iSpace: longint; var iSize: longint); 0081 forward; 0082 procedure FormatIt(const sText: string; iStart, iEnd: longint); forward; 0083 function Drawlt(pTubeLine: pTTUbeLine; 0084 const sText: string; iStart, iEnd: longint; 0085 iBitmapLine, iLeftOffset: longint; 0086 ScreenUpdate: boolean): longint; forward; 0087 procedure DrawLine(TextLine: longint; ScreenUpdate: boolean); forward; 0088 procedure DrawList(var TubeList: TTubeList); forward; 0089 procedure SetTopLine(var TubeList: TTubeList; TopBitmapLine: longint); forward; 0090 procedure UpdateScrollBar(var TubeList: TTubeList; BitmapLine: longint); forward; 0091 0092 { Local Routines } 0093 0094 function SteppedBitmapLine(var TubeList: TTUbeList; BitmapLine: longint): longint; 0095 {$IFDEF WINDOWS) 0096 var 0097 iStartLine, iLastLine, iLine: longint; 0098 pTubeLine: pTTubeLine; 0099 begin 0100 iLastLine := TubeList.TextList.Count-1; 0101 iStartLine := iLastLine+1; 0102 for iLine := 0 to iLastLine do begin 0103 pTubeLine := pTTubeLine(TubeList.TextList.Objects[iLine]); 0104 if pTubeLineA.iBitmapTop = BitmapLine then begin 0105 iStartLine := iLine; 0106 break 0107 end; 0108 if pTubeLine^.iBitmapTop > BitmapLine then begin 0109 iStartLine := iLine-1; 0110 break 0111 end 0112 end; 0113 result :=pTTubeLine(TubeList.TextList.Objects[iStartLine])A.iBitmapTop 0114 {$ELSE) 0115 begin 0116 result BitmapLine 0117 {$ENDIF} SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 147 0118 end; 0119 {-----------------------} 0120 procedure GetVisibleLinesRange(var iStartLine: longint; var iLastLine: longint); 0121 var 0122 iBitmapTop, iBitmapBottom: longint; 0123 iMaxLine, iLine: longint; 0124 pTubeLine: pTTubeLine; 0125 begin 0126 iBitmapTop:= pCurrentTubeListA.iCurrentSteppedTop; 0127 iBitmapBottom:= iBitmapTop + (iTextBlockHeight-1); 0128 iMaxLine := pCurrentTubeListA.TextList.Count-1; 0129 iStartLine := iLastLine+1; 0130 for iLine := 0 to iMaxLine do begin 0131 pTubeLine := pTTubeLine(pCurrentTubeListA.TextList.Objects[iLine]); 0132 if pTubeLineA.iBitmapTop = iBitmapTop then begin 0133 iStartLine := iLine; 0134 break 0135 end; 0136 if pTubeLineA.iBitmapTop > iBitmapTop then begin 0137 iStartLine := iLine-1; 0138 break 0139 end 0140 end; 0141 if iStartLine<0 then 0142 iStartLine := 0; 0143 iLastLine := iMaxLine; 0144 for iLine := iStartLine+1 to iMaxLine do begin 0145 pTubeLine := pTTubeLine(pCurrentTubeListA.TextList.Objects[iLine]); 0146 if pTubeLineA.iBitmapTop > iBitmapBottom then begin 0147 iLastLine := iLine-1; 0148 break 0149 end 0150 end 0151 end; 0152 {-------------------------} 0153 procedure GetLineSizes(const sText: string; var iSpace: longint; var iSize: longint); 0154 var 0155 p0, p1, p2, p9: longint; 0156 cO, c9, n: longint; 0157 s: string[250]; 0158 begin SUBSTITUTE SH EET (RULE 26) WO 98/52189 PCT/US98/10035 148 0159 p0:= 1; 0160 p9 := Length(sText); 0161 while pO<=p9 do begin 0162 p1 := (po-1)+Pos('(',Copy(sText,pO,249)); 0163 if pl=(pO-1) then 0164 break; 0165 p2:= ((p1+1)-1)+Pos('}',Copy(sText,pl+1,249)); 0166 if p2=((pl+1)-1) then 0167 break; 0168 s := Copy(sText,p1+1,(p2-p1+1)-2); 0169 pO: p2+1; 0170 cO: 1; 0171 c9 Length(s); 0172 while cO<=c9 do begin 0173 case s[c0] of 0174 's': begin 0175 if [s[cO+1]] <= ['0'..'9'] then begin 0176 n := StrToint(Copy(s,cO+1,2)); 0177 lnc(cO,3) 0178 end 0179 else begin 0180 n := iTextFontSize; 0181 lnc(cO,1) 0182 end; 0183 if n>iSize then 0184 iSize n 0185 end; 0186 'h': begin 0187 iSpace := StrTolnt(Copy(s,cO+1,2)); 0188 lnc(cO,3) 0189 end 0190 else 0191 Inc(cO) 0192 end 0193 end 0194 end 0195 end; 0196 { ------------------------------ } 0197 procedure Formatit(const sText: string; iStart, iEnd: longint); 0198 var 0199 p0: longint; SUBSTITUTE SH EET (RULE 26) WO 98/52189 PCT/US98/10035 149 0200 red, green, blue: byte; 0201 Stylel: TFontStyles; 0202 begin 0203 with bmpPlayer.Canvas do begin 0204 p0 := iStart; 0205 while p0<=iEnd do begin 0206 Stylel := []; 0207 case sText[po] of 0208 T: begin 0209 Stylel := [fsBold]; 0210 Inc(pO) 0211 end; 0212 'i': begin 0213 Stylel := [fsltalic]; 0214 Inc(pO) 0215 end; 0216 '_': begin 0217 Stylel := [fsUnderline]; 0218 Inc(pO) 0219 end; 0220 'c': begin 0221 red := byte(sText[pO+1])-byte('0'); 0222 green := byte(sText[pO+2])-byte('0'); 0223 blue := byte(sText[pO+3])-byte('0'); 0224 Font.Color := RGB(28*red, 28*green, 28*blue); 0225 Inc(pO,4) 0226 end; 0227 's': begin 0228 if [sText[pO+1]] <= ['0'..'9'] then begin 0229 Font.Size : StrTolnt(Copy(sText,p0+1,2)); 0230 Inc(pO,3) 0231 end 0232 else begin 0233 Font.Size := iTextFontSize; 0234 lnc(pO,1) 0235 end 0236 end; 0237 'q': begin 0238 if [sText[pO+ 1] <= ['0'..'9'] then begin 0239 red := byte(sText[pO+1])-byte('0'); 0240 green := byte(sText[pO+2])-byte('0'); SUBSTITUTE SH EET (RULE 26) WO 98/52189 PCTIUS98/10035 150 0241 blue := byte(sText[pO+3])-byte('0'); 0242 Brush.Color:= RGB(28*red, 28*green, 28*blue); 0243 Brush.Style bsSolid; 0244 lnc(pO,4) 0245 end 0246 else begin 0247 Brush.Style bsClear; 0248 lnc(pO) 0249 end 0250 end 0251 else 0252 Inc(pO) 0253 end; 0254 if Stylel <= Font.Style then 0255 Font.Style Font.Style-Style1 0256 else 0257 Font.Style Font.Style+Style1 0258 end 0259 end 0260 end; 0261 { -------------------------------- } 0262 function Drawit(pTubeLine: pTTUbeLine; 0263 const sText: string; iStart, iEnd: longint; 0264 iBitmapLine, iLeftOffset: longint; 0265 ScreenUpdate: boolean): longint; 0266 var 0267 iTextLeft, iTextTop, 0268 iTextWidth, iTextHeight: longint; 0269 iLength: longint; 0270 TextEx: TSize; 0271 TextLineRect: TRect; 0272 TextAlignFlags: word; 0273 TextBlockRect: TRect; 0274 label 0275 ExitText; 0276 begin 0277 with bmpPlayer.Canvas do begin 0278 TextAlignFlags:= SetTextAlign(Handle, TALEFT+TABASELINE+TANOUPDATECP); 0279 SetTextJustification(Handle, 0, 0); 0280 result := iLeftOffset; 0281 if pTubeLine^.bHighlight then SUBSTITUTE SH EET (RULE 26) WO 98/52189 PCT/US98/10035 151 0282 Font.Color:= TEXTHIGHLIGHT; 0283 if not pTubeLine^.bEnabled then 0284 Font.Color:= TEXTDISSABLED; 0285 iTextLeft:= pTubeLineA. iBitmapLeft+iLeftOffset; 0286 iTextTop:= iBitmapLine; 0287 if iEnd>Length(sText) then 0288 iEnd Length(sText); 0289 iLength iEnd-iStart+l; 0290 {$IFDEF WINDOWS} 0291 GetTextExtentPoint(Handle, @sText[iStart], iLength, TextEx); 0292 {$ELSE} 0293 GetTextExtentPoint32(Handle, @sText[iStart], iLength, TextEx); 0294 {$ENDIF) 0295 iTextWidth := TextEx.cx; 0296 iTextHeight:= pTubeLineA.iBitmapHeight; 0297 if (iTextLeft+iTextWidth)>(iTextBlockWidth-1) then begin 0298 iTextWidth := (iTextBlockWidth-1)-iTextLeft; 0299 font.Color:= clFuchsia 0300 end; 0301 if iTextWidth<=0 then 0302 goto ExitText; 0303 if (iTextTop+iTextHeight-1)>(iTextBlockHeight-1) then 0304 iTextHeight := iTextBlockHeight-iTextTop; 0305 if iTextHeight<=0 then 0306 goto ExitText; 0307 TextLineRect := Bounds(iTextBlockLeft+iTextLeft, 0308 iTextBlockTop+iTextTop, 0309 iTextWidth, iTextHeight); 0310 if ScreenUpdate then 0311 BitBt(bmpPlayer.Canvas.Handle, 0312 TextLineRect.Left, TextLineRect.Top, 0313 iTextWidth, iTextHeight, 0314 pCurrentTubeA.Image.Canvas.Handle, 0315 (iTextBlockLeft-pCurrentTube^.Left)+iTextLeft, 0316 (iTextBIockTop-pCurrentTube^.Top)+iTextTop, 0317 srcCOPY); 0318 ExtTextOut(Handle, 0319 iTextBlockLeft+iTextLeft, 0320 iTextBlockTop+iTextTop+pTubeLineA.iMaxFontSize, 0321 ETOCLIPPED, @TextLineRect, @sText[iStart], iLength, nil); 0322 result := iLeftOffset+iTextWidth; SUBSTITUTE SH EET (RULE 26) WO 98/52189 PCT/US98/10035 152 0323 TextBlockRect := Bounds(iTextBlockLeft, iTextBlockTop, 0324 iTextBlockWidth, iTextBlockHeight); 0325 if ScreenUpdate then 0326 BitmapUpdateScreen(TextLineRect); 0327 ExitText: 0328 SetTextAlign(Handle, TextAlignFlags) 0329 end 0330 end; 0331 { ------------------------------------------- } 0332 procedure DrawLine(TextLine: longint; ScreenUpdate: boolean); 0333 var 0334 pTubeLine: pTTubeLine; 0335 iBitmapLine: longint; 0336 iBitmapHeight: longint; 0337 pO,pl,p2,o: longint; 0338 sText: string[255]; 0339 iltem: longint; 0340 begin 0341 pTubeLine := pTTubeLine(pCurrentTubeListA.TextList.Objects[TextLine-1 ]); 0342 iBitmapLine := pTubeLineA. iBitmapTop-pCurrentTubeListA.iCurrentSteppedTop; 0343 iBitmapHeight := pTubeLine^.iBitmapHeight; 0344 if (iBitmapLine+iBitmapHeight<0) or (iBitmapLine>iTextBlockHeight-1) then 0345 exit; 0346 {$1FDEF NOSCROLLLEADER) 0347 if iBitmapLine<0 then 0348 exit; 0349 {$ENDIF} 0350 {$lFDEF NOSCROLLTRAILER) 0351 if iBitmapLine+iBitmapHeight>(iTextBlockHeight-1) then 0352 exit; 0353 {$ENDIF) 0354 sText := pCurrentTubeListA.TextList.Strings[TextLine-1]; 0355 iltem := pTubeLine^.iTimeStamp; 0356 with bmpPlayer.Canvas do begin 0357 Brush.Style := bsClear; 0358 Font.Size := iTextFontSize; 0359 Font.Color := TEXTNORMAL; 0360 Font.Style := []; 0361 pO:= 1; 0362 o:= pTubeLineA.iBitmapLeft; 0363 if (o>0) and (iltem>0) then begin SUBSTITUTE SH EET (RULE 26) WO 98/52189 PCTIUS98/10035 153 0364 with spriteMenuBullet do begin 0365 Left:= iTextBlockLeft+2*o; 0366 Top:= iTextBlockTop+iBitmapLine+2; 0367 o:= o+Width+7 0368 end; 0369 BitmapDraw(spriteMenuBullet) 0370 end; 0371 while pO<=Length(sText) do begin 0372 p1 := (p0-1) + Pos({', Copy(sText,pO,249)); 0373 p2:= ((p1+1)-1) + Pos('}',Copy(sText,p1+1,249)); 0374 if p2>p1 then begin 0375 o := Drawlt(pTubeLine,sText,p0,p1 -1,iBitmapLine,o,ScreenUpdate); 0376 Formatit(sText,pl+1 ,p2-1); 0377 p0 := p2+1 0378 end 0379 else begin 0380 o := Drawit(pTubeLine,sText,pO,249,iBitmapLine,o,ScreenUpdate); 0381 p0:= 249 0382 end 0383 end 0384 end 0385 end; 0386 {--------------------------------------------- 0387 procedure DrawList(var TubeList: TTubeList); 0388 var 0389 iStartLine, iLastLine, iLine: longint; 0390 TextBlockRect: TRect; 0391 begin 0392 if @TubeList<>pCurrentTubeList then 0393 exit; 0394 with pCurrentTubeA do begin 0395 BitBt(bmpPlayer.Canvas.Handle, 0396 iTextBlockLeft, iTextBlockTop, iTextBlockWidth, iTextBlockHeight, 0397 I mage.Canvas. Handle, (iTextBlockLeft-Left)+0, (iTextBlockTop-Top)+0, 0398 srcCOPY); 0399 GetVisibleLinesRange(iStartLine, iLastLine); 0400 for iLine := iStartLine to iLastLine do 0401 DrawLine(iLine+1, false); 0402 TextBlockRect := Bounds(iTextBlockLeft, iTextBlockTop, 0403 iTextBlockWidth, iTextBlockHeight); 0404 BitmapUpdateScreen(TextBlockRect) SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 154 0405 end 0406 end; 0407 {---------------------} 0408 procedure SetTopLine(var TubeList: TTubeList; TopBitmapLine: longint); 0409 begin 0410 TubeList.iCurrentBitmapTop:= TopBitmapLine; 0411 TopBitmapLine := SteppedBitmapLine(TubeList, TopBitmapLine); 0412 if TopBitmapLine = TubeList.iCurrentSteppedTop then 0413 exit; 0414 TubeList.iCurrentSteppedTop:= TopBitmapLine 0415 end; 0416 {---------------------} 0417 procedure UpdateScrollBar(var TubeList: TTubeList; BitmapLine: longint); 0418 begin 0419 if @TubeList=pCurrentTubeList then 0420 ScrollBarPosition(BitmapLine) 0421 end; 0422 0423 { Main code } 0424 0425 procedure TubelnitList(var spriteTube; var TubeList: TTubeList; 0426 LineSpacing, LeftOffset: longint); 0427 var 0428 iLastLine, iLine: longint; 0429 iTime: longint; 0430 iTop: longint; 0431 pTubeLine: pTTubeLine; 0432 iSpace, iSize: longint; 0433 begin 0434 TubeList.pTube := @spriteTube; 0435 iTop:= 0; 0436 iLastLine := TubeList.TextList.Count-1; 0437 for iLine := 0 to iLastLine do begin 0438 pTubeLine := new(pTTubeLine); 0439 iTime := longint(TubeList.TextList.Objects[iLine]); 0440 TubeList.TextList.Objects[ILine] := TObject(pTubeLine); 0441 pTubeLine^.iTimeStamp := iTime; 0442 iSpace := -1; 0443 iSize := iTextFontSize; SUBSTITUTE SH EET (RULE 26) WO 98/52189 PCTIUS98/10035 155 0444 GetLineSizes(TubeList.TextList.Strings[iLine], iSpace, iSize); 0445 if iSpace=-1 then 0446 if LineSpacing<0 then 0447 iSpace (iSize - LineSpacing) 0448 else 0449 iSpace LineSpacing; 0450 pTubeLine^.bEnabled true; 0451 pTubeLine^.bHighlight false; 0452 pTubeLineA.iMaxFontSize := iSize; 0453 pTubeLineA.iBitmapLeft := LeftOffset; 0454 pTubeLineA.iBitmapTop:= iTop; 0455 pTubeLineA.iBitmapHeight:= iSpace; 0456 Inc(iTop,iSpace) 0457 end; 0458 TubeList.iCurrentBitmapTop := 0; 0459 TubeList.iCurrentSteppedTop := 0; 0460 TubeList.iBitmapMaxTop:= (iTop-1)-iTextBlockHeight; 0461 if TubeList.iBitmapMaxTop<0 then 0462 TubeList.iBitmapMaxTop:= 0; 0463 TubeList.iBottomBitmapLine := iTop-1 0464 end; 0465 {---------------------------} 0466 procedure TubeExitList(var TubeList: TTubeList); 0467 var 0468 iLastLine, iLine: longint; 0469 pTubeLine: pTTubeLine; 0470 begin 0471 iLastLine TubeList.TextList.Count-1; 0472 for iLine 0 to iLastLine do begin 0473 pTubeLine := pTTubeLine(TubeList.TextList.Objects[iLine]); 0474 Dispose(pTubeLine); 0475 TubeList.TextList.Objects[iLine] := nil; 0476 end; 0477 TubeList.TextList.Free; 0478 TubeList.TextList := nil 0479 end; 0480 {-----------------------} 0481 procedure TubeRefresh(var TubeList: TTubeList); 0482 begin 0483 ScrollBarAbort; 0484 iLastTubeScroll := -1; SUBSTITUTE SH EET (RULE 26) WO 98/52189 PCTIUS98/10035 156 0485 BitmapDraw(pCurrentTubeA); 0486 TubeList.iCurrentSteppedTop:= FORCEDRAW; 0487 BarSetRange(Scroll, TubeList.iBitmapMaxTop); 0488 UpdateScrollBar(TubeList, TubeList.iCurrentBitmapTop); 0489 BarEnable(Scroll) 0490 end; 0491 { --------------------------- } 0492 procedure TubeDisplay(var TubeList: TTubeList); 0493 begin 0494 if @TubeList<>pCurrentTubeList then begin 0495 ScrollBarAbort; 0496 pCurrentTubeList := @TubeList; 0497 iLastTubeScroll := -1; 0498 if pCurrentTube<>TubeList.pTube then begin 0499 pCurrentTube := TubeList.pTube; 0500 BitmapDraw(pCurrentTubeA) 0501 end; 0502 TubeList.iCurrentSteppedTop:= FORCEDRAW; 0503 BarSetRange(Scroll, TubeList.iBitmapMaxTop); 0504 UpdateScrollBar(TubeList, TubeList.iCurrentBitmapTop); 0505 BarEnable(Scroll) 0506 end 0507 end; 0508 {-------------------------} 0509 procedure TubeSetTopLine(var TubeList: TTubeList; TopTextLine: longint); 0510 begin 0511 UpdateScrollBar(TubeList, 0512 pTTubeLine(TubeList.TextList.Objects[TopTextLine-1 ])^. iBitmapTop) 0513 end; 0514 {-----------------------} 0515 procedure TubeSetAllNormal(var TubeList: TTubeList); 0516 var 0517 iLastLine, iLine: longint; 0518 begin 0519 iLastLine TubeList.TextList.Count-1; 0520 for iLine 0 to iLastLine do 0521 if pTTubeLine(TubeList.TextList.Objects[iLine])A. bHighlight then 0522 TubeSetNormal(TubeList,iLine+1) 0523 end; 0524 {-----------------------} 0525 procedure TubeSetHighlight(var TubeList: TTubeList; TextLine: longint); SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 157 0526 begin 0527 with pTTubeLine(TubeList.TextList.Objects[TextLine-1 ])A do 0528 if not bHighlight then begin 0529 bHighlight := true; 0530 if @TubeList=pCurrentTubeList then 0531 DrawLine(TextLine,true) 0532 end 0533 end; 0534 (-----------------------------} 0535 procedure TubeSetNormal(var TubeList: TTubeList; TextLine: longint); 0536 begin 0537 with pTTubeLine(TubeList.TextList.Objects[TextLine-1 ])A do 0538 if bHighlight then begin 0539 bHighlight := false; 0540 if @TubeList=pCurrentTubeList then 0541 DrawLine(TextLine,true) 0542 end 0543 end; 0544 (--------------------------------} 0545 procedure TubeSetEnable(var TubeList: TTubeList; TextLine: longint); 0546 begin 0547 with pTTubeLine(TubeList.TextList.Objects[TextLine-1 ])A do 0548 if not bEnabled then begin 0549 bEnabled := true; 0550 if @TubeList=pCurrentTubeList then 0551 DrawLine(TextLine,true) 0552 end 0553 end; 0554 { ------------------------ } 0555 procedure TubeSetDissable(var TubeList: TTubeList; TextLine: longint); 0556 begin 0557 with pTTubeLine(TubeList.TextList.Objects[TextLine-1 ])A do 0558 if bEnabled then begin 0559 bEnabled := false; 0560 if @TubeList=pCurrentTubeList then 0561 DrawLine(TextLine,true) 0562 end 0563 end; 0564 {----------------------} 0565 procedure TubeSetTime(var TubeList: TTubeList; LineTime: longint); 0566 var SUBSTITUTE SH EET (RULE 26) WO 98/52189 PCT/US98/10035 158 0567 iLastLine, iLine: longint; 0568 pTubeLine: pTTubeLine; 0569 iTimePrev: longint; 0570 iTimel, iTime2, iTime3: longint; 0571 iLinel, iLine2: longint; 0572 iTimeSpan, iLineSpan: longint; 0573 iTextLine: longint; 0574 iScroll: longint; 0575 begin 0576 iLastLine TubeList.TextList.Count-1; 0577 iTextLine := -1; 0578 iLine2 := -1; 0579 iTime3 := 0; {kill compiler warming} 0580 iTimePrev := 0; (kill compiler warning} 0581 for iLine := 0 to iLastLine do begin 0582 pTubeLine := pTTubeLine(TubeList.TextList.Objects[iLine]); 0583 if (iLine>0) and (iLine<iLastLine) and 0584 (TubeList.TextList.Strings[iLine]=") then begin 0585 iTime2 := pTTubeLine(TubeList.TextList.Objects[iLine+1]).iTimeStamp; 0586 iTime3 := (iTimePrev+iTime2) div 2 0587 end 0588 else begin 0589 iTime2 := pTubeLine^.iTimeStamp; 0590 iTime3 := iTime2 0591 end; 0592 iTimePrev:= pTubeLineA.iTimeStamp; 0593 if iTime2>LineTime then begin 0594 iLine2 := pTubeLineA.iBitmapTop; 0595 iTextLine := iLine-1; 0596 break 0597 end 0598 end; 0599 if iLine2=-1 then begin 0600 iScroll := TubeList.iBottomBitmapLine+1 0601 end 0602 else begin 0603 if iTextLine>=0 then begin 0604 pTubeLine := pTTubeLine(TubeList.TextList.Objects[iTextLine]); 0605 iTimel := pTubeLineA.iTimeStamp; 0606 iLinel pTubeLineA.iBitmapTop 0607 end SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 159 0608 else begin 0609 iTimel := 0; 0610 iLinel := 0 0611 end; 0612 iTimeSpan := iTime3-iTimel; 0613 iLineSpan := iLine2-iLinel; 0614 if iTimeSpan=0 then 0615 iScroll := iLine2 0616 else 0617 iScroll:= iLinel + (iLineSpan*(LineTime-iTime1)) div iTimeSpan 0618 end; 0619 iScroll := iScroll - ((iTextBlockHeight-iTextFontSize) div 2); 0620 if iScroll<O then 0621 iScroll := 0; 0622 if iScroll>TubeList.iBitmapMaxTop then 0623 iScroll := TubeList.iBitmapMaxTop; 0624 if @TubeList=pCurrentTubeList then 0625 UpdateScrollBar(TubeList, iScroll) 0626 else 0627 SetTopLine(TubeList, iScroll); 0628 for iLine := 0 to iLastLine do 0629 if iLine<>iTextLine then 0630 TubeSetNormal(TubeList, iLine+1); 0631 if iTextLine>=0 then 0632 TubeSetHighlight(TubeList, iTextLine+1) 0633 end; 0634 0635 { Printer support } 0636 0637 procedure TubePrint; 0638 var 0639 Printer: TextFile; 0640 iLine, iLastLine: longint; 0641 p0, p1, p2, p9: longint; 0642 sText, sPrint: string[250]; 0643 begin 0644 frmRun. PrintDialog.Options:= [poWaming]; 0645 if frmRun.PrintDialog.Execute=False then 0646 exit; SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCTIUS98/10035 160 0647 try 0648 AssignPm(Printer) 0649 except 0650 frmRun.ErrorMessage('There is a problem with the printer!'); 0651 exit 0652 end; 0653 iLastLine := pCurrentTubeListA.TextList.Count-1; 0654 try 0655 Rewrite(printer) 0656 except 0657 frmRun.ErrorMessage('There is a problem with the printer!'); 0658 try 0659 CloseFile(Printer); 0660 except 0661 end; 0662 exit 0663 end; 0664 for iLine 0 to iLastLine do begin 0665 sText pCurrentTubeListA.TextList.Strings[iLine]; 0666 sPrint:= 0667 po:= 1; 0668 p9 := Length(sText); 0669 while pO<=p9 do begin 0670 p1 := (p0-i)+Pos({',Copy(sText,pO,249)); 0671 if pl=(pO-1) then begin 0672 sPrint := sPrint + Copy(sText,pO,249); 0673 break 0674 end; 0675 sPrint:= sPrint + Copy(sText,pO,(pl-pO)); 0676 p2 := ((p1+1)-1)+Pos('}',Copy(sText,pl+1,249)); 0677 if p2=((p1+1)-1) then 0678 break; 0679 pO:= p2+1; 0680 end; 0681 try 0682 WriteLn(Printer, sPrint) 0683 except 0684 frmRun.ErrorMessage('There is a problem printing to the printerl'; 0685 try 0686 CloseFile(Printer); 0687 except SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCTIUS98/10035 161 0688 end; 0689 exit 0690 end 0691 end; 0692 try 0693 CloseFile(Printer); 0694 except 0695 end 0696 end; 0697 0698 { Mouse support } 0699 0700 function TubeHit(X,Y: longint): longint; 0701 var 0702 iMouseX, iMouseY: longint; 0703 iBitmapLine: longint; 0704 begin 0705 result := 0; 0706 iMouseX := X-iTextBlockLeft; 0707 iMouseY := Y-iTextBlockTop; 0708 if (iMouseX<0) or (iMouseX>iTextBlockWidth-1) then 0709 exit; 0710 if (iMouseY<0) or (iMouseY>iTextBlockHeight-1) then 0711 exit; 0712 iBitmapLine := iMouseY + pCurrentTubeListA.iCurrentSteppedTop; 0713 if (iBitmapLine<0) or (iBitmapLine>pCurrentTubeListA.iBottomBitmapLine) then 0714 exit; 0715 result := 1 0716 end; 0717 { ---------------------------------- } 0718 function TubeltemHit(X,Y: longint): longint; 0719 var 0720 iMouseX, iMouseY: longint; 0721 iBitmapLine: longint; 0722 iLastLine, iLine: longint; 0723 iFoundLine: longint; 0724 pTubeLine: pTTubeLine; 0725 begin 0726 result := 0; SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 162 0727 iMouseX:= X-iTextBlockLeft; 0728 iMouseY:= Y-iTextBlockTop; 0729 if (iMouseX<0) or (iMouseX>iTextBlockWidth-1) then 0730 exit; 0731 if (iMouseY<0) or (iMouseY>iTextBlockHeight-1) then 0732 exit; 0733 iBitmapLine := iMouseY + pCurrentTubeListA.iCurrentSteppedTop; 0734 if (iBitmapLine<0) or (iBitmapLine>pCurrentTubeListA.iBottomBitmapLifne) then 0735 exit; 0736 iLastLine := pCurrentTubeListA.TextList.Count-1; 0737 iFoundLine:= -2; 0738 for iLine := 0 to iLastLine do begin 0739 pTubeLine := pTTubeLine(pCurrentTubeList.TextList.Objects[iLine]); 0740 if pTubeLineA.iBitmapTop = iBitmapLine then begin 0741 iFoundLine := iLine; 0742 break 0743 end; 0744 if pTubeLineA.iBitmapTop > iBitmapLine then begin 0745 iFoundLine := iLine-1; 0746 break 0747 end 0748 end; 0749 if iFoundLine=-2 then 0750 iFoundLine := iLastLine; 0751 if iFoundLine<0 then begin 0752 frmRun.SevereError('TubeltemHit - Mouse hit line -ve found!'); 0753 exit 0754 end; 0755 with pTTubeLine(pCurrentTubeList.TextList.Objects[iFoundLine])A do 0756 if bEnabled then 0757 result := iTimeStamp 0758 end; 0759 0760 { ScrollBar support ) 0761 0762 procedure TubeScroll(TopBltmapLine: longint); 0763 begin 0764 SetTopLine(pCurrentTubeListA, TopBitmapLine); 0765 DrawList(pCurrentTubeListA); SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCTIUS98/10035 163 0766 if eCDPlayerState<>psPLAYlNG then 0767 with frmRun.blobHint do 0768 if TopBitmapLine<>iLastTubeScroll then begin 0769 if IsDisplaying then 0770 ShowMessage(sHintLastMsg, iHintLastX, iHintLastY); 0771 iLastTubeScroll := ToplitmapLine 0772 end 0773 end; 0774 0775 { Initalize / Exit } 0776 0777 procedure Tubelnitialize; 0778 var 0779 1: string[50]; 0780 p: integer; 0781 begin 0782 BitmapCreate(spriteTubelntro, frmMain.imgTubeIntro, true); 0783 BitmapCreate(spriteTubeText, frmMain.imgTubeText, true); 0784 BitmapCreate(spriteTubeMenu, frmMain.imgTube_Menu, true); 0785 BitmapCreate(spriteMenuBullet, frmMain.imgMenuBullet, true); 0786 with bmpPlayer.Canvas do begin 0787 Font.Assign(frmRun.Font); 0788 iTextFontSize := Font.Size 0789 end; 0790 1 := frmMain.imgPlayer.Hint; 0791 p:= Pos(,',); 0792 iTextBlockLeft := StrTolnt(Copy(,1,p-1)); 0793 1 := Copy(l,p+1,99); 0794 p:= Pos(',',1); 0795 iTextBlockTop:= StrTolnt(Copy(l,1,p-1)); 0796 1 := Copy(l,p+1,99); 0797 p:= PosC,',1); 0798 iTextBlockWidth StrTolnt(Copy(1,1,p-1)); 0799 iTextBlockHeight StrTolnt(Copy(1,p+1,99)); 0800 pCurrentTube := nil; 0801 pCurrentTubeList := nil; 0802 iLastTubeScroll := -1; 0803 end; 0804 {--------------------------- SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 164 0805 procedure TubeExit; 0806 begin 0807 BitmapDestroy(spriteMenuBullet); 0808 BitmapDestroy(spriteTubeText); 0809 BitmapDestroy(spriteTubeintro) 0810 end; 0811 end. SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 165 0001 unit Video; 0002 {-$DEFINE KILLERASE} 0003 { ========} 0004 interface 0005 0006 {$IFDEF WINDOWS} 0007 uses 0008 SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, 0009 Forms, Dialogs, ExtCtrls, Registry, MPlayer, 0010 Run, Main, CDPlayer, Tube, Regions, Bitmaps, SysFig, Logging; 0011 {$ELSE) 0012 uses 0013 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, 0014 ExtCtrls, StdCtris, Registry, MPlayer, 0015 Run, Main, CDPlayer, Tube, Regions, Bitmaps, SysFig, Logging; 0016 ($ENDIF) 0017 {---------------------} 0018 type 0019 TfrmVideo = class(TForm) 0020 pnVideo: TPanel; 0021 mmVideo: TMediaPlayer; 0022 imgVideo: Timage; 0023 {---------------------} 0024 procedure FormCreate(Sender: TObject); 0025 procedure mmVideoNotify(Sender: TObject); 0026 {------------------ } 0027 protected 0028 {$IFDEF KILLERASE} 0029 procedure FormErase(var Msg: TWMEraseBkgnd); 0030 message WMEraseBkgnd; 0031 {$ENDIF) 0032 end; 0033 type 0034 {------------------} 0035 TProc = Procedure; 0036 { ---------------------- } 0037 const 0038 INTROVIDEO = 90; 0039 {--------------} SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCTIUS98/10035 166 0040 var 0041 bVideoAvailable: array [1..MAXTRACKS] of boolean; 0042 {------- ------------------ } 0043 procedure VideoStop; 0044 procedure VideoPlay(TrackNo: longint; xFinished: Tproc); 0045 procedure Video[nitializeO; 0046 procedure Videolnitialize; 0047 procedure VideoExit; 0048 {---------------------} 0049 var 0050 frmVideo: TfrmVideo; 0051 0052 implementation 0053 {$R *.DFM} 0054 0055 var 0056 VideoRegion: hRGN; 0057 endVideo: TProc; 0058 iVideoOffsetLeft, iVideoOffsetTop: longint; 0059 iVideoWidth, iVideoHeight: longint; 0060 0061 { Main Code } 0062 0063 procedure VideoStop; 0064 var 0065 TubeRect: TRect; 0066 begin 0067 with frmVideo.mmVideo do begin 0068 TimeFormat := tfMilliseconds; 0069 LoggingLogit(leVIDEO, Position div 100); 0070 try 0071 Wait:= true; 0072 Notify := false; 0073 Stop; 0074 except 0075 end 0076 end; SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 167 0077 frmVideo.Hide; 0078 with spriteTubeText do begin 0079 TubeRect:= Bounds(Left, Top, Width, Height); 0080 BitmapUpdateScreen(TubeRect) 0081 end 0082 end; 0083 {------------------ } 0084 procedure VideoPlay(TrackNo: longint; xFinished: Tproc); 0085 begin 0086 with frmVideo.mmVideo do begin 0087 TimeFormat := fMilliseconds; 0088 LoggingLogit(leVIDEO, Position div 100); 0089 try 0090 Wait:= true; 0091 Notify := false; 0092 Stop 0093 except 0094 end 0095 end; 0096 {$IFDEF WINDOWS) 0097 with frmVideo do begin 0098 Left:= frmRun.Left + spriteText.Left; 0099 Top:= frmRun.Top + spriteText.Top; 0100 Width spriteText.Width; 0101 Height spriteText.Height 0102 end; 0103 with frmVideo.pnVideo do begin 0104 Left:= -((iVideoWidth-spriteText.Width) div 2); 0105 Top:= -((iVideoHeight-spriteText.Height) div 2) 0106 end; 0107 {$ELSE) 0108 with frmVideo do begin 0109 Left:= frmRun.Left + iVideoOffsetLeft; 0110 Top:= frmRun.Top + iVideoOffsetTop 0111 end; 0112 {$ENDIF} 0113 with frmVideo.mmVideo do begin 0114 try 0115 if TrackNo=INTROVIDEO then 0116 FileName := sRunDirectory+'Stuff\lntro.mpg' 0117 else SUBSTITUTE SH EET (RULE 26) WO 98/52189 PCT/US98/10035 168 0118 FileName := sRunDirectory+'Stuff\Video'+ IntToStr(TrackNo)+'.mpg'; 0119 Wait:= true; 0120 Notify := false; 0121 Open 0122 except 0123 if TrackNo<>INTROVIDEO then 0124 frmRun.ErrorMessage('There is a problem with video playback!'); 0125 xFinished; 0126 exit 0127 end; 0128 frmVideo.Show; 0129 try 0130 Wait:= false; 0131 Notify := true; 0132 Play; 0133 endVideo := xFinished; 0134 except 0135 frmVideo.Hide; 0136 frmRun.ErrorMessageCThere is a problem with video playbackl'; 0137 xFinished 0138 end; 0139 LoggingEvent(leVIDEO, IsOTHER, TrackNo, 0) 0140 end 0141 end; 0142 0143 { Video Play end processing } 0144 0145 procedure TFrmVideo.mmVideoNotify(Sender: TObject); 0146 var 0147 ev: TProc; 0148 begin 0149 frmVideo.Hide; 0150 with frmVideo.mmVideo do begin 0151 TimeFormat:= fMilliseconds; 0152 LoggingLogit(leVIDEO, Position div 100) 0153 end; 0154 ev:= endVideo; 0155 endVideo := nil; 0156 if Assigned(ev) then SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 169 0157 ev 0158 end; 0159 {------------------------------------------------} 0160 {$IFDEF KILLERASE) 0161 procedure TfrmVideo.FormErase(var Msg: TWMEraseBkgnd); 0162 begin 0163 Msg.Result:= LRESULT(False) 0164 end; 0165 {$ENDIF) 0166 0167 { Initialize and exit 0168 0169 procedure TfrmVideo.FormCreate(Sender: TObject); 0170 var 0171 p: longint; 0172 I: string[50]; 0173 begin 0174 1:= imgVideo.Hint; 0175 p:= Pos(,',1); 0176 iVideoOffsetLeft StrToint(Copy(,1,p-1)); 0177 iVideoOffsetTop StrTolnt(Copy(1,p+1,99)); 0178 iVideoWidth := imgVideo.Width; 0179 iVideoHeight:= imgVideo. Height; 0180 {$IFNDEF WINDOWS) 0181 Outlinelmage( imgVideo.Canvas, 0182 imgVideo.Height, imgVideo.Width, 0183 VideoRegion); 0184 SetWindowRgn( Handle, VideoRegion, False); 0185 {$ENDIF) 0186 end; 0187 {------------------------------------------------} 0188 procedure Videonitialize0; 0189 var 0190 Reg: TRegistry; 0191 sKey, sValue: string; 0192 begin 0193 Reg := TRegistry.Create; 0194 Reg.RootKey := HKEYCURRENTUSER; 0195 sKey :='\Software\Microsoft\Multimedia\ActiveMovie Filters\MPEG Decoder'; SUBSTITUTE SH EET (RULE 26) WO 98/52189 PCT/US98/10035 170 0196 sValue := 'AudioChannels'; 0197 try 0198 if Reg.OpenKey(sKey,false) then 0199 if Reg.ValueExists(sValue) then begin 0200 Reg.ReadInteger(sValue); 0201 Reg.Writeinteger(sValue,2) 0202 end 0203 except 0204 end; 0205 sValue := 'AudioFreqDivider'; 0206 try 0207 if Reg.OpenKey(sKey,false) then 0208 if Reg.ValueExists(sValue) then begin 0209 Reg.ReadInteger(sValue); 0210 Reg.Writeinteger(sValue,1) 0211 end 0212 except 0213 end; 0214 Reg.Free; 0215 frmVideo := TfrmVideo.Create(nil); 0216 with frmVideo.mmVideo do 0217 try 0218 FileName := sRunDirectory+'Stuff\lntro.mpg'; 0219 Wait:= true; 0220 Notify := false; 0221 Open 0222 except 0223 end 0224 end; 0225 {------------------------------- } 0226 procedure Videolnitialize; 0227 var 0228 fVideo: TextFile; 0229 iTrack: Integer; 0230 begin 0231 for iTrack := 1 to iAudioTracks do begin 0232 bVideoAvailable[iTrack] := true; 0233 try 0234 AssignFile(fVideo, sRunDirectory+'Stuff\Video'+IntToStr(iTrack)+'.mpg'); 0235 Reset(fVideo); 0236 CloseFile(fVideo) SUBSTITUTE SH EET (RULE 26) WO 98/52189 PCT/US98/10035 171 0237 except 0238 bVideoAvailable[iTrack] := false 0239 end 0240 end; 0241 endVideo := nil; 0242 end; 0243 { ----- ------------------------- } 0244 procedure VideoExit; 0245 begin 0246 frmVideo.Free 0247 end; 0248 end. SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 172 0001 unit Volumbar; 0002 0003 interface 0004 0005 {$IFDEF WINDOWS} 0006 uses 0007 SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls, 0008 Forms, Dialogs, MMSystem, MPlayer, LMDnonvS, 0009 Run, Main, BitBars, Video; 0010 {$ELSE} 0011 uses 0012 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, 0013 ExtCtrs, StdCtrls, MMSystem, MPlayer, LMDnonvS, 0014 Run, Main, BitBars, Video; 0015 {$ENDIF} 0016 {-----------------------} 0017 procedure VolumeBarinitialize; 0018 procedure VolumeBarExit; 0019 procedure VolumeBackgroundProcess; 0020 procedure VolumeBarMouseDown; 0021 procedure VolumeBarMouseUp; 0022 procedure VolumeBarMouseDrag( x, y: longint); 0023 procedure VolumeBarMouseMove(X,Y: longint); 0024 procedure VolumeBarTimerTick; 0025 (------------------------} 0026 var 0027 Volume: TBar; 0028 0029 implementation 0030 0031 const 0032 NOVOLUME = $FFFF; 0033 {-----------------------} 0034 var 0035 wCDVolumeld: word; 0036 bVolumeBarMouseDown: boolean; 0037 iHintltem: longint; SUBSTITUTE SHEET (RULE 26)

Claims (19)

1. A prerecorded distributed media comprising an interface for monitoring and/or controlling a users interaction with operation of a program, and means for controlling presentation of medium content to the user in response to said interaction.
2. The media of claim 1 wherein said interface includes means for at least one of (i) interaction with the program, (ii) updating activity, (iii) listening habits of user and (iv) send data to host computer, wherein user is unaware of said interface and said interface activity is seamless to user.
3. The media of claim 1 wherein means are provided for optionally modifying said interaction while monitoring said interaction with the user, and for optionally modifying said interaction in response to said monitored interaction.
4. The media of claim 3 wherein means are provided for using the feedback of monitored interaction with the user directly within the program internally, and/or indirectly by passing the monitored data to another program which then returns data based on this and/or any previously sent data.
5. The media of claim 3 wherein means are provided for transmitting the monitored interactions with the user to a data base on a host computer or server.
6. The media of claim 3 wherein means are provided for profiling a recording on media to determine authenticity, said profiling including information about the placement of recorded data physically on the media.
7. The media of claim 3 wherein means are provided for translating factual data associated with media content into position location within that content.
8. The media of claim 3 wherein means are provided for sending information over the intemet to a host computer without requiring the user to be on-line.
9. The media of claim 1 wherein said prerecorded media is one or more of disks, CD-ROM, CD-AUDIO, DVD, Solid State Media or an electronic form of media.
10. A multimedia supplement for computer accessible artist-recorded media comprising: SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCTIUS98/10035 274 program means added to recorded media and accessible by a computer (a) for viewing an introduction video recorded by the artist; (b) for installing a special link to the artist's web site, and an icon that quickly launches to the artist web site including; (i) tracking the user's browsing of the Web site. (c) for playing the artist(s) recorded rendition, including: (i)displaying the title of each recorded event (e.g. song titles, acts and scenes of a play, musical, dance, etc), (ii) a viewer optionally and selectively viewing and/or listening to any one or all of the recorded renditions, and (iii) displaying words spoken or sung in sync with the performance; (iv) a viewer optionally playing a video of the rendition song if one is provided, (v) a viewer optionally playing an audio commentary of the rendition, and (vi) a viewer optionally displaying information about the rendition.
11. The multimedia supplement of claim 10 wherein the recorded media is a CD. SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 275
12. A method of directing a selected group of users to visit by installing a special link to the artist's web site, and an icon that quickly launches to the artist web site a web site comprising the steps of: (A) encoding a plurality of a computer-readable media with at least: (1) a browser controller program for (a) controlling the World Wide Web browser to access specified web page(s), (b) controlling the World Wide Web browser to retrieve the specified web page(s) from the Intemet or intranet and to display the retrieved web page(s), (c) following any display or execution instructions that are on the web pages, (f) collecting information on web browsing movements of the user, and (g) sending the collected information to a central computer having a database for storing user-browsing-information; and (2) installation information for use by the browser controller program including computer-readable data identifying (a) a Web Page address (URL) for the specified web page(s), (b) an Internet address of the computer having the database for storing user-browsing-information, and (c) a plurality of hot buttons that when pressed will take the user to specific web pages; (B) distributing copies of the encoded computer-readable media to a targeted group of users; (C) each user utilizing the copy of the encoded computer readable media to install the browser controller program on a computer having a World Wide Web browser program installed hereon; (D) the browser controller program controlling the browser program to retrieve the specified web page(s); and (E) the browser controller program monitoring movements of the user, and reporting details of browsing behavior of the user to the computer having the database for storing user-browsing information.
13. The method of claim 12 wherein the browser controller program detects unauthorized copies of the respective medium, and optionally prevents any further execution of detected unauthorized copies.
14. The method of claim 12 wherein the browser controller program decrypts any encrypted retrieved web pages. SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 276
15. The method of claim 12 wherein the installation information for use by the browser controller program includes computer-readable data identifying a serial number or Batch Code identifying the distribution medium copy as an authorized copy, the information optionally being used to prevent unauthorized copying of the program, the information being used to identify the user of the software by Batch Code indicating the group of individuals targeted for the media distribution, and an Internet address for a copy-protection host computer programmed to control access to the browser controller program.
16. A method of directing a selected group of users to visit a web site comprising the steps of: (A) encoding a plurality of a computer-readable media with at least: (1) a browser controller program for (a) controlling the World Wide Web browser to access specified web page(s), (b) detecting unauthorized copies of the respective medium, and optionally preventing any further execution of detected unauthorized copies, (c) controlling the World Wide Web browser to retrieve the specified web page(s) from the Internet or intranet and to display the retrieved web page(s), (d) decrypting any encrypted retrieved web pages, (e) following any display or execution instructions that are on the web pages, (f) collecting information on web browsing movements of the user, and (g) sending the collected information to a central computer having a database for storing user-browsing-information; and (2) installation information for use by the browser controller program including computer-readable data identifying (a) a serial number or Batch Code identifying the distribution medium copy as an authorized copy, the information optionally being used to prevent unauthorized copying of the program, the information being used to identify the user of the software by Batch Code indicating the group of individuals targeted for the media distribution, (b) a Web Page address (URL) for the specified web page(s), (c) an Internet address for a copy-protection host computer programmed to control access to the browser controller program, (d) an Internet address of the computer having the database for storing user-browsing information, and (e) a plurality of hot buttons that when pressed will take the user to specific web pages; (B) distributing copies of the encoded computer-readable media to a targeted group of users; (C) each user utilizing the copy of the encoded computer-readable media to install the browser controller program on a computer having a World Wide Web browser program installed thereon; (D) the browser controller program controlling the browser program to retrieve the specified web page(s); and (E) the browser controller program monitoring movements of the user, and reporting details of browsing behavior of the user to the computer having the database for storing user-browsing-information.
17. A system for directing a selected group of users to visit a web site comprising: SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCT/US98/10035 277 (A) a plurality of a computer-readable media encoded with at least: (1) a browser controller program for (a) controlling the World Wide Web browser to access specified web page(s), (b) controlling the World Wide Web browser to retrieve the specified web page(s) from the Internet or intranet and to display the retrieved web page(s), (c) following any display or execution instructions that are on the web pages, (f) collecting information on web browsing movements of the user, and (g) sending the collected information to a central computer having a database for storing user-browsing-information; and (2) installation information for use by the browser controller program including computer-readable data identifying (a) a Web Page address (URL) for the specified web page(s), (b) an Internet address of the computer having the database for storing user-browsing-information, and (c) a plurality of hot buttons that when pressed will take the user to specific web pages.
18. A computer-readable medium for use in a system for directing a selected group of users to visit at least one specified web site over a computer network after a plurality of the mediums programs are distributed to the selected group of users comprising: (1) a browser controller program for (a) controlling the World Wide Web browser to access specified web page(s), (b) controlling the World Wide Web browser to retrieve the specified web page(s) from the Internet or intranet and to display the retrieved web page(s), (c) following any display or execution instructions that are on the web pages, (f) collecting information on web browsing movements of the user, and (g) sending the collected information to a central computer having a database for storing user-browsing-information; and (2) installation information for use by the browser controller program including computer-readable data identifying (a) a Web Page address (URL) for the specified web page(s), (b) an Internet address of the computer having the database for storing user-browsing-information, and (c) a plurality of hot buttons that when pressed will take the user to specific web pages. SUBSTITUTE SHEET (RULE 26) WO 98/52189 PCTIUS98/10035 278
19. A method of directing a selected group of users to visit a Web site comprising the steps of: (A) encoding a plurality of a computer-readable media with at least: (1) a browser controller program for (a) controlling the World Wide Web browser to access and retrieve specified Web page(s) from the Internet or intranet and to display the retrieved Web page(s), (c) following any display or execution instructions that are on the Web pages, (f) collecting information on Web browsing movements of the user, and (g) sending the collected information to a central computer having a database for storing user-browsing-information; (D) the browser controller program controlling the browser program to retrieve the specified Web page(s); and (E) the browser controller program monitoring movements of the user, and reporting details of browsing behavior of the user to the computer having the database for storing user-browsing information. (F) Using information asked from the user, the BC will command the Browser to retrieve alternative web pages. (G) Using information asked from the user, the BC will show different "hot buttons" or otherwise configure the user interface. SUBSTITUTE SHEET (RULE 26)
AU75749/98A 1997-05-15 1998-05-15 Multimedia interface with user interaction tracking Abandoned AU7574998A (en)

Applications Claiming Priority (7)

Application Number Priority Date Filing Date Title
US4651197P 1997-05-15 1997-05-15
US60046511 1997-05-15
US5180597P 1997-07-07 1997-07-07
US60051805 1997-07-07
US6931897P 1997-12-06 1997-12-06
US60069318 1997-12-06
PCT/US1998/010035 WO1998052189A2 (en) 1997-05-15 1998-05-15 Multimedia interface with user interaction tracking

Publications (1)

Publication Number Publication Date
AU7574998A true AU7574998A (en) 1998-12-08

Family

ID=27366918

Family Applications (1)

Application Number Title Priority Date Filing Date
AU75749/98A Abandoned AU7574998A (en) 1997-05-15 1998-05-15 Multimedia interface with user interaction tracking

Country Status (4)

Country Link
EP (1) EP1032934A2 (en)
AU (1) AU7574998A (en)
CA (1) CA2289533A1 (en)
WO (1) WO1998052189A2 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8326037B1 (en) 2005-11-23 2012-12-04 Matrox Electronic Systems, Ltd. Methods and apparatus for locating an object in an image
WO2013086137A1 (en) 2011-12-06 2013-06-13 1-800 Contacts, Inc. Systems and methods for obtaining a pupillary distance measurement using a mobile computing device
US9286715B2 (en) 2012-05-23 2016-03-15 Glasses.Com Inc. Systems and methods for adjusting a virtual try-on
US20130314401A1 (en) 2012-05-23 2013-11-28 1-800 Contacts, Inc. Systems and methods for generating a 3-d model of a user for a virtual try-on product
US9483853B2 (en) 2012-05-23 2016-11-01 Glasses.Com Inc. Systems and methods to display rendered images
CN114020187B (en) * 2021-10-26 2024-02-23 济南浪潮数据技术有限公司 Font icon display method and device and electronic equipment

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5737395A (en) * 1991-10-28 1998-04-07 Centigram Communications Corporation System and method for integrating voice, facsimile and electronic mail data through a personal computer
US5406557A (en) * 1993-02-01 1995-04-11 National Semiconductor Corporation Interenterprise electronic mail hub
US5721908A (en) * 1995-06-07 1998-02-24 International Business Machines Corporation Computer network for WWW server data access over internet
US5572643A (en) * 1995-10-19 1996-11-05 Judson; David H. Web browser with dynamic display of information objects during linking

Also Published As

Publication number Publication date
CA2289533A1 (en) 1998-11-19
EP1032934A2 (en) 2000-09-06
WO1998052189A2 (en) 1998-11-19
WO1998052189A3 (en) 1999-04-15

Similar Documents

Publication Publication Date Title
US11048724B2 (en) Method and system for exploring similarities
JP3194083B2 (en) Recording device creation device that records songs in music CDs by communication
EP0875846B1 (en) Multimedia information transfer via a wide area network
JP4331770B2 (en) Interactive entertainment network delivery supplementing audio recordings
US6248946B1 (en) Multimedia content delivery system and method
US20020194260A1 (en) Method and apparatus for creating multimedia playlists for audio-visual systems
US5963916A (en) Network apparatus and method for preview of music products and compilation of market data
KR100707326B1 (en) Information processing system, information processing apparatus, and information processing method
US20020078037A1 (en) Information processing apparatus and method, and program storing medium
US20020107802A1 (en) Secure file downloading
US20010030660A1 (en) Interactive graphical user interface and method for previewing media products
US20020069418A1 (en) Network-enabled audio/video player
US20030145338A1 (en) System and process for incorporating, retrieving and displaying an enhanced flash movie
US20020069412A1 (en) Three-panel display for selecting files
US20020129693A1 (en) Interactive audio distribution system
US20030212613A1 (en) System and method for providing access to digital goods over communications networks
AU7574998A (en) Multimedia interface with user interaction tracking
JP2004511838A (en) Method and system for finding matches in a database for waveforms
JP2005115832A (en) Providing system and copying apparatus for digital contents
WO2002033579A1 (en) System and method for facilitating access by one remote user of another user&#34;s files
JP2004023696A (en) Method and electronic equipment for controlling reproduction of video and audio files stored in cd
JP2002123268A (en) Information processor, method and program storing medium
WO2002005155A2 (en) System and method for connecting a media purchaser to a manufacturer site to obtain media related information

Legal Events

Date Code Title Description
MK5 Application lapsed section 142(2)(e) - patent request and compl. specification not accepted