Path: news1.icaen!news.uiowa.edu!news.physics.uiowa.edu!math.ohio-state.edu!uwm.edu!spool.mu.edu!usenet.eel.ufl.edu!news.mathworks.com!uunet!in2.uu.net!dziuxsolim.rutgers.edu!pilot.njin.net!not-for-mail From: comp-sources-apple2@pilot.njin.net Newsgroups: comp.sources.apple2 Subject: v001SRC103: HappyFaces -- Twilight II Screen Saver Module Date: 15 Sep 1996 20:24:15 -0400 Organization: Rutgers University Lines: 879 Sender: jac@pilot.njin.net Approved: jac@pilot.njin.net Distribution: world Message-ID: <51i6nf$3mv@pilot.njin.net> NNTP-Posting-Host: pilot.njin.net Submitted-by: Kelvin W. Sherlock (ksherloc@zoo.uvm.edu) Posting-number: Volume 1, Source 103 Archive-name: util/gs/cdev/twilightii/happyfaces Architecture: 2gs Version-number: 1.00 HappyFaces is a screen saver module for the Twilight II CDeV ($BC, $4004). To protect the screen, HappyFaces draws semi-randomly placed HappyFaces, clears the screen, and repeats the process. To use HappyFaces, install it (see "Installation"), open the Twilight II CDeV, and select "HappyFaces" from the list of active modules. HappyFaces requires: + Apple //gs + Twilight II v 1.1 or higher. + Orca Pascal 2.2.0 or higher. As always, packed in AAF. Enjoy. ******************************************************************************** The full comp.sources.apple2 archives, including a tool to unpack the AAF archive format, are available at: http://www.openix.com/~jac You can also ftp them from: ftp://ftp.openix.com/ftp/jac/comp.sources.apple2/* ftp://ftp.sterling.com/usenet/comp.sources.apple2/* The web page will likely be the easiest way to download them. Questions or comments to: jac@openix.com (Preferred) jac@pilot.njin.net ******************************************************************************** =Manifest -Manifest -Read.Me -happyfaces.pas -happyfaces.rez -makeHappyFaces -t2.pas -t2common.rez =Read.Me - -HappyFaces - -HappyFaces is a screen saver module for the Twilight II CDeV ($BC, $4004). -To protect the screen, HappyFaces draws semi-randomly placed HappyFaces, -clears the screen, and repeats the process. - -To use HappyFaces, install it (see "Installation"), open the Twilight II -CDeV, and select "HappyFaces" from the list of active modules. - -HappyFaces requires: - + Apple //gs - + Twilight II v 1.1 or higher. - + Orca Pascal 2.2.0 or higher. - - -========= -Compiling -========= -Before compiling you must change the language stamps for the *.pas and -*.rez files, and for the script to build Happy Faces. This is because -the Orca shell handles multiple languages and needs to know what language -compiler to use on a particular file. Under Orca, type: - change =.pas pascal - change =.rez Rez - change MakeHappyFaces Exec - -Then use the "makeHappyFaces" script to compile HappyFaces. - -HappyFaces was originally compiled with Orca Pascal 2.2.0. Older -versions of Orca may or may not work. - -============ -Installation -============ - -Install HappyFaces in the folder: - */system/cdevs/twilight/ -This causes HappyFaces to be added to the list of available cdev modules. - -===== -Files -===== - -The following files are present in the HappyFaces package: - Read.Me This file - happyfaces.pas Pascal source to HappyFaces - happyfaces.rez Resource module for HappyFaces - makeHappyFaces Script to compile HappyFaces - t2.pas Source to Twilight II screen saver - module (See Notes Section) - t2common.rez Twilight II Resource module (See - Notes Section) - -===== -Notes -===== - -The t2.pas and t2common.rez files are from the Digisoft T2 Developer -kit. The t2.pas file was created using the t2.c source code. - -Twilight II is a commercial CDeV, retailing for $29.95. For more -information email: - digisoft@hypermall.com -or visit their web page at: - http://www.hypermall.com/digisoft/digisoft/ - -The T2 developer kit, including information on how you can write your -own Twilight II modules, is available at: - ftp://ground.isca.uiowa.edu/apple2/srcs/Twilightii/ - - -========= -Copyright -========= - -COPYRIGHT 1996 by Kelvin Sherlock -ALL RIGHTS RESERVED - -This package may be redistributed so long as no fee is charged, the -authors' names remain, and all modifications are clearly marked as -such and the unmodified source is included. - -The files t2.pas and t2common.rez are Copyright 1992-1993 by -Jim Maricondo and DigiSoft Innovations. Used with permission. - -====== -Author -====== - -Kelvin W. Sherlock -ksherloc@zoo.uvm.edu - -September 1996 -Version 1.00 - =happyfaces.pas -{$ keep 'HappyFaces'} -{$ cdev HappyFaces } -{$ optimize -1} - -program happyfaces; - -uses common, - memorymgr, - resourceMgr, - QuickDrawII, - T2; - -const - rIcon =$8001; - rHappyFace =$0001; - - -type -ip=^integer; -TwoWords=record - wait1,wait2:integer; - end; -TP=^TwoWords; - -var -movePtr:ip; -myid:integer; - -procedure systemerror(errnum:integer); -begin end; - -function LGetPathname2(userID,fileNum:integer):gsosInStringPtr; -tool ($11, $22); - - - -function BlankIt:longint; -var happymeal:IconRecPtr; - oldResfile,myresfile:integer; - wait,gate,xpos,ypos:integer; - Morris:TP;{pointer to tell how long to wait} -begin - OldResFile:=GetCurResourceFile; (* open our rfork! *) - MyResFile:=OpenResourceFile(1 (* read only *), - Nil, LGetPathname2(MyID,1)^); - - happymeal:=iconRecPtr(loadresource(rIcon,rHappyFace)^); - Morris:=TP(loadresource($B1A7,1)^); - CloseResourceFile(MyResFile); (* close our rfork *) - SetCurResourceFile(OldResFile); (* restore old resfile *) - - wait:=0; - gate:=0; - while (movePtr^=0) do begin - if wait Morris^.wait2 then begin (* clear the screen after 20 *) - clearscreen(0); (* faces *) - gate:=0; - end; - xpos:=abs(round(random*(320-happymeal^.iconwidth))); - ypos:=abs(round(random*(200-happymeal^.iconheight))); - drawicon(happymeal^,mode320,xpos,ypos); - end; - end; - BlankIt:=0; -end; - - -function HappyFaces(message:integer;data1,data2:longint):longint; -begin - HappyFaces:=1; - MyID:=MMStartUp; - case message of - BlankT2: begin - movePtr:=ip(data1); - HappyFaces:= BlankIt; - end; - otherwise; - end; -end; - -begin -end. =happyfaces.rez -#include "types.rez" -#include "T2Common.Rez" // Include Twilight II rez header file - - -data rIcon (0x1, nocrossbank) -// the happyface icon - { - $"FFFF D809 3C00 5400 FFFF FFFF FFFF FFFF" - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" - $"FFFF FFFF 3333 3FFF FFFF FFFF FFFF FFFF" - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" - $"FFFF FFFF FFFF FFFF FFFF FFFF FFF3 3333" - $"33FF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" - $"FFFF FFFF FFFF FF33 333C 333F FFFF FFFF" - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" - $"F333 33C3 3CC3 FFFF FFFF FFFF FFFF FFFF" - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" - $"FFFF FFFF FFFF FFFF FFFF F322 3C33 33CC" - $"3FFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" - $"FFFF FFFF 3223 C333 333C C3FF FFFF FFFF" - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" - $"FFFE EEEE EEEE EEEE EFFF FFFF FFF3 223C" - $"3333 3333 CC3F FFFF FFFF FFFF FFFF FFFF" - $"FFFF FFFF FFFF FFFF FFFE EEEE EEEE EEEE" - $"EEEE EEEE EFFF FFF3 33C3 3333 3333 3CC3" - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" - $"FFFF EEEE EEEE EEEE EEEE EEEE EEEE EEEE" - $"FF33 3C33 3333 3333 33C3 FFFF FFFF FFFF" - $"FFFF FFFF FFFF FFFF FFFF FFEE EEEE EEEE" - $"EEEE EEEE EEEE EEEE EEEE E333 C333 3333" - $"3333 3333 FFFF FFFF FFFF FFFF FFFF FFFF" - $"FFFF FFFF EEEE EEEE EEEE EEEE EEEE EEEE" - $"EEEE EEEE E33C 3333 3333 3333 333F FFFF" - $"FFFF FFFF FFFF FFFF FFFF FFFF FFEE EEEE" - $"EEEE EEEE EEEE EEEE EEEE EEEE EEE4 33C3" - $"3333 3333 3333 33FF FFFF FFFF FFFF FFFF" - $"FFFF FFFF FFFF FEEE EEEE EEEE EEEE EEEE" - $"EEEE EEEE EEEE EEE4 3C33 3333 3333 3333" - $"3FFF FFFF FFFF FFFF FFFF FFFF FFFF FFFE" - $"EEEE EEEE EEEE EEEE EEEE EEEE EEEE EEEE" - $"EE44 E333 3333 3333 3333 22FF FFFF FFFF" - $"FFFF FFFF FFFF FFFF FFEE EEEE EEEE EEEE" - $"EEEE EEEE EEEE EEEE EEEE EE44 4443 3333" - $"3333 3332 232F FFFF FFFF FFFF FFFF FFFF" - $"FFFF FEEE EEEE EEEE EEEE EEEE EEEE EEEE" - $"EEEE EEEE EEEE E44E 4333 3333 3322 2232" - $"FFFF FFFF FFFF FFFF FFFF FFFF EEEE EEEE" - $"EEEE EEEE EEEE EEEE EEEE EEEE EEEE EEEE" - $"EE44 44E3 3333 3F22 2223 2FFF FFFF FFFF" - $"FFFF FFFF FFFE EEEE EEEE EEEE 000E EEEE" - $"EEEE EEEE EEEE EEEE E000 EEE4 44E4 3333" - $"EFF2 2222 32FF FFFF FFFF FFFF FFFF FFFE" - $"EEEE EEEE EEE0 0000 EEEE EEEE EEEE EEEE" - $"EEEE 0000 0EEE 44E4 E33E EFFF 2222 232F" - $"FFFF FFFF FFFF FFFF FFEE EEEE EEEE EEE0" - $"0000 EEEE EEEE EEEE EEEE EEEE 0000 0EEE" - $"E4EE 43EE EEFF F222 2232 FFFF FFFF FFFF" - $"FFFF FEEE EEEE EEEE EE00 0000 0EEE EEEE" - $"EEEE EEEE EEE0 0000 00EE E44E 44EE EEEF" - $"FF22 2223 2FFF FFFF FFFF FFFF FEEE EEEE" /* .""#/........... */ - $"EEEE EE00 0000 0EEE EEEE EEEE EEEE EEE0" /* ................ */ - $"0000 00EE EE44 E44E EEEF FFF2 2222 32FF" /* .....D.N....""2. */ - $"FFFF FFFF FFFF EEEE EEEE EEEE E000 0000" /* ................ */ - $"00EE EEEE EEEE EEEE EE00 0000 000E EEE4" /* ................ */ - $"EE4E EEEE FFFF 2222 232F FFFF FFFF FFFF" /* .N....""#/...... */ - $"EEEE EEEE EEEE E000 0000 00EE EEEE EEEE" /* ................ */ - $"EEEE EE00 0000 000E EE4E 4E44 EEEE FFFF" /* .........NND.... */ - $"F222 2232 FFFF FFFF FFFE EEEE EEEE EEEE" /* .""2............ */ - $"E000 0000 00EE EEEE EEEE EEEE EE00 0000" /* ................ */ - $"000E EE4E 44E4 4EEE EFFF FF22 2223 2FFF" /* ...ND.N....""#/. */ - $"FFFF FFFE EEEE EEEE EEEE E000 0000 00EE" /* ................ */ - $"EEEE EEEE EEEE EE00 0000 000E EE4E E4EE" /* .............N.. */ - $"4EEE EFFF FFF2 2222 32FF FFFF FFFE EEEE" /* N.....""2....... */ - $"EEEE EEEE E000 0000 00EE EEEE EEEE EEEE" /* ................ */ - $"EE00 0000 000E EE4E E44E 44EE EFFF FFFF" /* .......N.ND..... */ - $"2222 232F FFFF FFEE EEEE EEEE EEEE E000" /* ""#/............ */ - $"0000 00EE EEEE EEEE EEEE EE00 0000 000E" /* ................ */ - $"EE4E EE4E EEEE EEFF FFFF F222 2232 FFFF" /* .N.N.......""2.. */ - $"FFEE EEEE EEEE EEEE E000 0000 00EE EEEE" /* ................ */ - $"EEEE EEEE EE00 0000 000E E44E EE4E EEEE" /* ...........N.N.. */ - $"EEFF FFFF FF22 2223 2FFF FFEE EEEE EEEE" /* .....""#/....... */ - $"EEEE E000 0000 00EE EEEE EEEE EEEE EE00" /* ................ */ - $"0000 000E 44EE EEEE EEEE EEFF FFFF FFF2" /* ....D........... */ - $"2222 32FF FFEE EEEE EEEE EEEE E000 0000" /* ""2............. */ - $"00EE EEEE EEEE EEEE EE00 0000 000E EEEE" /* ................ */ - $"EEEE EEEE EEFF FFFF FFFF 2222 22FF FFEE" /* .........."""... */ - $"EEEE EEEE EEEE E000 0000 00EE EEEE EEEE" /* ................ */ - $"EEEE EE00 0000 000E EEEE EEEE EEEE EEFF" /* ................ */ - $"FFFF FFFF F222 22FF FFEE EEEE EEEE EEEE" /* .....""......... */ - $"EE00 0000 0EEE EEEE EEEE EEEE EEE0 0000" /* ................ */ - $"00EE EEEE EEEE EEEE EEFF FFFF FFFF FF22" /* ..............." */ - $"2FFF FFEE EEEE EEEE EEEE EE00 0000 0EEE" /* /............... */ - $"EEEE EEEE EEEE EEE0 0000 00EE EEEE EEEE" /* ................ */ - $"EEEE EEFF FFFF FFFF FFFF FFFF FFEE EEEE" /* ................ */ - $"EEEE EEEE EEE0 0000 EEEE EEEE EEEE EEEE" /* ................ */ - $"EEEE 0000 0EEE EEEE EEEE EEEE EEFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFEE EEEE EEEE EEEE EEE0" /* ................ */ - $"0000 EEEE EEEE EEEE EEEE EEEE 0000 0EEE" /* ................ */ - $"EEEE EEEE EEEE EEFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFEE EEEE EEEE EEEE EEEE 000E EEEE EEEE" /* ................ */ - $"EEEE EEEE EEEE E000 EEEE EEEE EEEE EEEE" /* ................ */ - $"EEFF FFFF FFFF FFFF FFFF FFFE EEEE EEEE" /* ................ */ - $"EEEE EEEE EEEE EEEE EEEE EEEE EEEE EEEE" /* ................ */ - $"EEEE EEEE EEEE EEEE EEEE EFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFE EEEE EEEE EEEE EEEE EEEE" /* ................ */ - $"EEEE EEEE EEEE EEEE EEEE EEEE EEEE EEEE" /* ................ */ - $"EEEE EEEE EFFF FFFF FFFF FFFF FFFF FFFE" /* ................ */ - $"EEEE EEEE EEEE EEEE EEEE EEEE EEEE EEEE" /* ................ */ - $"EEEE EEEE EEEE EEEE EEEE EEEE EEEE EFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF EEEE EEEE EEEE" /* ................ */ - $"EEEE EEEE EEEE EEEE EEEE EEEE EEEE EEEE" /* ................ */ - $"EEEE EEEE EEEE EEEE FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF EEEE EEEE EEEE EEEE EEEE EEEE" /* ................ */ - $"EEEE EEEE EEEE EEEE EEEE EEEE EEEE EEEE" /* ................ */ - $"EEEE FFFF FFFF FFFF FFFF FFFF FFFF FEEE" /* ................ */ - $"EEEE EEEE EEEE EEEE EEEE EEEE EEEE EEEE" /* ................ */ - $"EEEE EEEE EEEE EEEE EEEE EEEF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FEEE EEEE E000 EEEE" /* ................ */ - $"EEEE EEEE EEEE EEEE EEEE EEEE EEEE EEEE" /* ................ */ - $"000E EEEE EEEF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFEE EEEE EE00 0EEE EEEE EEEE EEEE" /* ................ */ - $"EEEE EEEE EEEE EEEE EEE0 00EE EEEE EEFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFE EEEE" /* ................ */ - $"EEE0 000E EEEE EEEE EEEE EEEE EEEE EEEE" /* ................ */ - $"EEEE E000 0EEE EEEE EFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFE EEEE EEEE E000 0EEE" /* ................ */ - $"EEEE EEEE EEEE EEEE EEEE EEE0 000E EEEE" /* ................ */ - $"EEEE EFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF EEEE EEEE EEE0 0000 EEEE EEEE EEEE" /* ................ */ - $"EEEE EEEE 0000 0EEE EEEE EEEE FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FEEE EEEE" /* ................ */ - $"EEEE E000 0000 EEEE EEEE EEEE 0000 000E" /* ................ */ - $"EEEE EEEE EEEF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFEE EEEE EEEE EEEE 0000" /* ................ */ - $"0000 0000 0000 0000 EEEE EEEE EEEE EEFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFE EEEE EEEE EEEE EEEE 0000 0000 0000" /* ................ */ - $"EEEE EEEE EEEE EEEE EFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FEEE EEEE" /* ................ */ - $"EEEE EEEE EEEE EEEE EEEE EEEE EEEE EEEE" /* ................ */ - $"EEEF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFEE EEEE EEEE EEEE EEEE" /* ................ */ - $"EEEE EEEE EEEE EEEE EEEE EEFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF EEEE EEEE EEEE EEEE EEEE EEEE EEEE" /* ................ */ - $"EEEE EEEE FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFEE EEEE" /* ................ */ - $"EEEE EEEE EEEE EEEE EEEE EEEE EEFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF EEEE EEEE EEEE EEEE" /* ................ */ - $"EEEE EEEE EEEE FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFE EEEE EEEE EEEE EEEE EEEE EFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFE" /* ................ */ - $"EEEE EEEE EEEE EFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ - $"0000 0000 0000 0000 0000 0000 FFFF F000" /* ................ */ - $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ - $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ - $"0000 0000 000F FFFF FF00 0000 0000 0000" /* ................ */ - $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ - $"0000 0000 0000 0000 0000 0000 0000 00FF" /* ................ */ - $"FFFF FFF0 0000 0000 0000 0000 0000 0000" /* ................ */ - $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ - $"0000 0000 0000 0000 0FFF FFFF FFFF 0000" /* ................ */ - $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ - $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ - $"0000 0FFF FFFF FFFF F000 0000 0000 0000" /* ................ */ - $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ - $"0000 0000 0000 0000 0000 0000 FFFF FFFF" /* ................ */ - $"FFFF FF00 0000 0000 0000 0000 0000 0000" /* ................ */ - $"0000 0000 0000 0000 000F FFFF FFFF FFFF" /* ................ */ - $"F000 0000 000F FFFF FFFF FFFF FFF0 0000" /* ................ */ - $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ - $"000F FFFF FFFF FFFF FFFF FFFF F000 000F" /* ................ */ - $"FFFF FFFF FFFF FFFF 0000 0000 0000 0000" /* ................ */ - $"0000 0000 0000 0000 0000 FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF 00FF FFFF FFFF FFFF" /* ................ */ - $"FFFF 0000 0000 0000 0000 0000 0000 0000" /* ................ */ - $"0000 00FF FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF 0000 0000" /* ................ */ - $"0000 0000 0000 0000 0000 0000 FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFF0 0000 0000 0000 0000 0000" /* ................ */ - $"0000 0000 00FF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FF00" /* ................ */ - $"0000 0000 0000 0000 0000 0000 0000 0FFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF F000 0000 0000 0000" /* ................ */ - $"0000 0000 0000 000F FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FF00 0000 0000 0000 0000 0000 0000" /* ................ */ - $"00FF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFF0 0000" /* ................ */ - $"0000 0000 0000 0000 0000 0FFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF 0000 0000 0000 0000" /* ................ */ - $"0000 0000 FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF F0FF" /* ................ */ - $"FFFF F000 0000 0000 0000 0000 000F FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF F00F FFFF FF00 0000" /* ................ */ - $"0000 0000 0000 000F FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF F000 FFFF FFF0 0000 0000 0000 0000" /* ................ */ - $"00FF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FF00 0FFF" /* ................ */ - $"FFFF 0000 0000 0000 0000 0FFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFF0 00FF FFFF F000 0000" /* ................ */ - $"0000 0000 0FFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFF0 000F FFFF FF00 0000 0000 0000 FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF 0000 FFFF" /* ................ */ - $"FFF0 0000 0000 0000 FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF 0000 0FFF FFFF 0000 0000" /* ................ */ - $"000F FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"F000 00FF FFFF F000 0000 000F FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF F000 000F FFFF" /* ................ */ - $"FF00 0000 000F FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF F000 0000 FFFF FFF0 0000 00FF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FF00" /* ................ */ - $"0000 0FFF FFFF 0000 00FF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FF00 0000 00FF FFFF" /* ................ */ - $"F000 00FF FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FF00 0000 000F FFFF FF00 00FF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FF00 0000" /* ................ */ - $"0000 FFFF FF00 00FF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FF00 0000 0000 0FFF FF00" /* ................ */ - $"00FF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FF00 0000 0000 00FF F000 00FF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FF00 0000 0000" /* ................ */ - $"0000 0000 00FF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FF00 0000 0000 0000 0000 00FF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FF00" /* ................ */ - $"0000 0000 0000 0000 00FF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FF00 0000 0000 0000" /* ................ */ - $"0000 000F FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF F000 0000 0000 0000 0000 000F FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF F000 0000" /* ................ */ - $"0000 0000 0000 000F FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF F000 0000 0000 0000 0000" /* ................ */ - $"0000 FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"0000 0000 0000 0000 0000 0000 FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF 0000 0000 0000" /* ................ */ - $"0000 0000 0000 0FFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFF0 0000 0000 0000 0000 0000 0000" /* ................ */ - $"0FFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFF0 0000" /* ................ */ - $"0000 0000 0000 0000 0000 00FF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FF00 0000 0000 0000 0000" /* ................ */ - $"0000 0000 000F FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"F000 0000 0000 0000 0000 0000 0000 000F" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF F000 0000 0000" /* ................ */ - $"0000 0000 0000 0000 0000 FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF 0000 0000 0000 0000 0000 0000" /* ................ */ - $"0000 0000 0FFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFF0 0000" /* ................ */ - $"0000 0000 0000 0000 0000 0000 0000 00FF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FF00 0000 0000 0000 0000" /* ................ */ - $"0000 0000 0000 0000 000F FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"F000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ - $"0000 0000 0FFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFF0 0000 0000 0000" /* ................ */ - $"0000 0000 0000 0000 0000 0000 0000 00FF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FF00 0000 0000 0000 0000 0000 0000" /* ................ */ - $"0000 0000 0000 0000 0000 FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF 0000 0000" /* ................ */ - $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ - $"0000 0000 00FF FFFF FFFF FFFF FFFF FFFF" /* ................ */ - $"FFFF FFFF FF00 0000 0000 0000 0000 0000" /* ................ */ - $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ - $"FFFF FFFF FFFF FFFF FFFF FFFF FFFF 0000" /* ................ */ - $"0000 0000 0000 0000 0000 0000 0000 0000" /* ................ */ - $"0000 0000 0000 0000 0000 000F FFFF FFFF" /* ................ */ - $"FFFF FFFF FFFF F000 0000 0000 0000 0000" /* ................ */ - $"0000 0000 0000 0000 0000 0000 0000 0000" - $"0000 0000 0000 000F FFFF FFFF FFFF F000" - $"0000 0000 0000 0000 0000 0000 0000 0000" - $"0000 0000 0000 0000 0000 0000 0000 0000" - $"0000 0000 0000 0000 0000 0000 0000 0000" - $"0000 0000 0000 0000 0000 0000 0000 0000" - $"0000 0000 0000 0000 0000 0000 0000 0000" - $"0000 0000 0000 0000 0000 0000 0000 0000" - $"0000 0000 0000 0000" -}; - -resource rIcon (moduleIcon) { - $8000, // kind - $0014, // height - $0016, // width - - $"F00000000000000000000F" - $"0FFFFFFFFFFFFFFFFFFFF0" - $"0F000000000000000000F0" - $"0F000000EEEEEE000000F0" - $"0F00000EEEEEEEE00000F0" - $"0F0000EEE0EE0EEE0000F0" - $"0F0000EEE0EE0EEE0000F0" - $"0F0000EEEEEEEEEE0000F0" - $"0F0000EE0EEEE0EE0000F0" - $"0F00000EE0000EE00000F0" - $"0F000000EEEEEE000000F0" - $"0F000000000000000000F0" - $"0FFFFFFFFFFFFFFFFAFFF0" - $"0000000000000000000000" - $"F0FFFFFFFFFFFFFFFFFF0F" - $"F0FFFFFFFFFFFFFFFFFF0F" - $"F0FF4AFFFFFFFFFFFFFF0F" - $"F0CCCCCCCCCCCCCCCCCC0F" - $"F0FFFFFFFFFFFFFFFAFF0F" - $"F00000000000000000000F", - - $"0FFFFFFFFFFFFFFFFFFFF0" - $"FFFFFFFFFFFFFFFFFFFFFF" - $"FFFFFFFFFFFFFFFFFFFFFF" - $"FFFFFFFFFFFFFFFFFFFFFF" - $"FFFFFFFFFFFFFFFFFFFFFF" - $"FFFFFFFFFFFFFFFFFFFFFF" - $"FFFFFFFFFFFFFFFFFFFFFF" - $"FFFFFFFFFFFFFFFFFFFFFF" - $"FFFFFFFFFFFFFFFFFFFFFF" - $"FFFFFFFFFFFFFFFFFFFFFF" - $"FFFFFFFFFFFFFFFFFFFFFF" - $"FFFFFFFFFFFFFFFFFFFFFF" - $"FFFFFFFFFFFFFFFFFFFFFF" - $"FFFFFFFFFFFFFFFFFFFFFF" - $"0FFFFFFFFFFFFFFFFFFFF0" - $"0FFFFFFFFFFFFFFFFFFFF0" - $"0FFFFFFFFFFFFFFFFFFFF0" - $"0FFFFFFFFFFFFFFFFFFFF0" - $"0FFFFFFFFFFFFFFFFFFFF0" - $"0FFFFFFFFFFFFFFFFFFFF0"; -}; - - - -resource rTextForLETextBox2 (moduleMessage) { - TBCenterJust - "Have a nice day..." -}; - - - - -resource rT2ModuleFlags (moduleFlags) { - fFadeOut + // we want the screen to be faded out beforehand - fFadeIn + // fade back in - fLeavesUsableScreen + // we leave a "usable" screen (see G2MF) - fGrafPort320, // module flags - $01, // enabled flag (unimplemented right now) - $0110, // minimum T2 version required - v1.1 minimum - NIL, // reserved - "HappyFaces" // module name -}; - -resource rVersion (1, $0000) { - {$01, - $00, - $00, - release, - $00}, - $0000, - "HappyFaces", - "By Kelvin Sherlock\n" - "Copyright 1996" -}; - -#define rHappyFaceWaits $0000B1A7 -type rHappyFaceWaits { - unsigned word; //how long to wait between drawing faces - unsigned word; //how many faces to draw before clearing -}; -resource rHappyFaceWaits (1,0){ - 700, - 25 -}; =makeHappyFaces -compile t2.pas keep=t2 -compile happyfaces.pas keep=happyfaces -link happyfaces keep=happyfaces -compile happyfaces.rez keep=happyfaces -filetype happyfaces $bc $4004 -echo "Don't Worry, Be Happy" =t2.pas -{$keep 'T2'} -unit T2; -interface - -uses common; -const -(* target name for send request *) -toT2Str= 'DYA~Twilight II~'; - -(* T2 External IPC *) -t2TurnOn =$9000; -t2TurnOff =$9001; -t2BoxOverrideOff=$9002; -t2BoxOverrideOn =$9003; -t2GetInfo =$9004; -t2StartupTools =$9005; -t2ShutdownTools =$9006; -t2ShareMemory =$9007; -t2SetBlinkProc =$9008; -t2ForceBkgBlank =$9009; -t2BkgBlankNow =$900A; -t2GetBuffers =$900B; -t2Reserved1 =$900C; -t2CalcFreqOffset=$900D; - -(* bits of BlankT2's T2Result [blankMessageResult] *) -bmrNextModule =$01000000; (* goto next module *) -bmrFadeIn =$02000000; (* fade in after all *) -bmrLeavesUsableScreen =$04000000; (* leaves usable screen *) -bmrLeavesCycleScreen =$08000000; (* leaves cycle-able screen *) - -(* bits of LoadSetupT2's T2Result [loadMessageResult] *) -lmrReqUsableScreen =$0001; (* requires usable screen *) -lmrFadeOut =$0002; (* fade out after all *) -lmrMostCommonPalette =$0004; (* mcp after all *) -lmrPrematureExit =$0008; (* exits before movePtr=true *) - -(* Bits of flag word passed to modules at loadsetupT2 time in T2data2 (lo) *) -(* lmi = loadmessageinput *) -lmiOverrideSound =$0001; (* bit0- 1=override sound, 0=sound ok *) - -(* bits of flag word passed to mdoules at blankT2 time in T2Data2 (lo) *) -(* (bmi = blankMessageInput) *) -bmiBlankNow =$0001; (* bit0- 1=from blank now, 0= not *) -bmiCycleColors =$0002; (* prev mdl left cycle-able screen *) - - - -(* Action message codes sent to modules. *) -MakeT2 =0; -SaveT2 =1; -BlankT2 =2; -LoadSetupT2 =3; -UnloadSetupT2 =4; -KillT2 =5; -HitT2 =6; - -(* Resources types. *) -rT2ModuleFlags =$1000; -rT2ExtSetup1 =$1001; -rT2ModuleWord =$1002; - -(* DataField equates. *) -SetFieldValue =$8000; (* custom control messages that are *) -GetFieldValue =$8001; (* accepted by DataField *) - -(* t2StartupTools flag bits *) -startshut_sane =1; (* longints *) -startshut_sound =2; - - -Type - -word=integer; - -(* DataOut structure for t2StartupTools *) -StartupToolsOut=record - recvCount,errors:word; (* returned errors *) -end; - -(* DataOut structure for t2GetBuffers *) -getBuffersOut=record - recvCount:Word; - shr_main_bufferH:handle;(* handle to bank E1 buffer *) - shr_aux_bufferH:handle; (* handle to bank 01 buffer *) - palette_bufferH:handle; (* handle to palette buffer *) -end; - -(* this is wrigged to always return ALL info available *) -(* to make it easier for C *) - -getInfoOut=record - recvCount:word; - start_offset:word; (* -- $0 -- copy from this byte of the buffer *) - end_offset:word; (* -- $E -- to this byte of the buffer *) - state_word:word; (* state word *) - count_selected_modules:word; (* # selected modules *) - tii_version:word; (* version of T2 in Toolbox TN 100 format *) - noblank_cursor320P:ptr; (* pointers to noblank cursors *) - noblank_cursor640P:ptr; -end; - -(* -* t2GetInfo - -* dataIn: reserved (pass zero) -* dataOut: pointer to structure -* +00 - word output - count -* +02 - word input - start buffer offset (FROM this byte) -* +04 - word input - end buffer offset (TO this byte) -* (end buffer offset minus start buffer offset = SIZE) -* +06 - byte array output - returned information output buffer -* +06+SIZE - eos - end of structure -* -* Buffer information available (`-`=through) -* 00,01= state word -* 02,03= number of modules selected in random mode (1 if rm off) -* 04,05= version of Twilight II -* 06,07,08,09= pointer to 320 mode don't blank cursor -* 0a,0b,0c,0d= pointer to 640 mode don't blank cursor -*) - -implementation -end. =t2common.rez - -// ===================================================== -// T2 Common Module Resources. -// Copyright 1992-93 Jim Maricondo and DigiSoft Innovations. -// -// v1.0 - 05/24/92 - Initial Version. -// v1.1 - 05/29/92 - Cleaned up, revised module flags. - T2 v1.0d33 -// v1.2 - 06/11/92 - Added fOpenRForkWriteEnabled - T2 v1.0d34 -// v1.3 - 09/18/92 - v1.1 about string - T2 v1.0d37 -// v1.4 - 11/28/92 - DC -> DSI - T2 v1.0.1b1 -// v1.5 - 1/2/93 - Misc cleanup - T2 v1.0.1b3 (?) -// v1.5a - 1/9/93 - Changed comments - T2 v1.0.1b4 -// v1.6 - 1/28/93 - Revised for _NEW_ rT2ModuleFlags format. - T2 v1.0.1f1 -// v1.7 - 2/7/93 - "f" flag word names, $D001 - T2 v1.0.1f2 -// v1.7a - 2/16/93 - $1000 -> $D001 - T2 v1.0.1f2 -// v1.8 - 03/02/93 - new moduleflagword bits - T2 v1.1f3 -// v1.9 - 03/28/93 - mostcommonpalette - t2 v1.1f4 -// v2.0 - 06/19/93 - fixed up for release at KFest '93 -// ===================================================== - -// ===================================================== -// Module resource IDs. -// ===================================================== - -/***** Required *****/ -// #define moduleName $00000001 -#define moduleMessage $0010DD01 -#define moduleIcon $0010DD01 -#define moduleVersion $00000001 -#define moduleFlags $00000001 - -/***** Added for you... *****/ -#define moduleComment $00000001 -#define moduleInfo $00000002 - -// ===================================================== -// --- custom resource type defines -// ===================================================== -#define rT2ModuleFlags $D001 -#define rT2ExtSetup1 $1001 -#define rT2ModuleWord $1002 -#define rT2String $1010 // reserved for use by tii only! -#define rByteArray $1012 - - -// ===================================================== -// Defined bits of T2ModuleFlags module flag word. -// ===================================================== -#define fSetup $0001 -#define fFadeOut $0002 -#define fFadeIn $0004 -#define fGrafPort320 $0008 -#define fGrafPort640 $0010 -#define fLoadSetupBoot $0020 -#define fLoadSetupBlank $0040 -#define fOpenRForkWriteEnabled $0080 -#define fMostCommonPalette $0100 -#define fReqUsableScreen $0200 -#define fLeavesUsableScreen $0400 -#define fLeavesCycleScreen $0800 -#define fPrematureExit $1000 -#define fForeground $0000 -#define fBackground $4000 -#define fInternal $8000 - -// ===================================================== -// Custom resource type defines. -// ===================================================== -type rT2ModuleFlags { - byte = $01; /* module flags version - use 1 */ - hex unsigned word; /* module flags word */ - byte; /* enabled flag (unimplemented) - use 1 now */ - hex unsigned word; /* minimum T2 version required */ - hex unsigned word; /* reserved */ - pstring[25]; /* module name */ -}; - -type rT2ModuleWord { - unsigned word; -}; - -// ===================================================== -// Current common comments. -// ===================================================== - -resource rComment (moduleInfo) { - "This is a Twilight II\$AA screen saver module. " - "Place in the \$D2Twilight\$D3 module folder (located in the same directory " - "as the Twilight II control panel) and access via Twilight II!\n" - "For more information, refer to the Twilight II manual." -}; + END OF ARCHIVE