mirror of
https://github.com/callapple/Twilight_II.git
synced 2024-12-28 18:29:53 +00:00
Add files via upload
This commit is contained in:
parent
8b98405cea
commit
12bfecb575
31
source/twilight/tiler/makefile
Normal file
31
source/twilight/tiler/makefile
Normal file
@ -0,0 +1,31 @@
|
||||
|
||||
# Twilight II Tiler UNIX MakeFile
|
||||
# by Jim Maricondo
|
||||
# v1.0 - 10/24/92 8:24pm
|
||||
# v1.1 - 12/13/92 4:40pm
|
||||
# v1.1.1 - 12/23/92 4:55pm
|
||||
# v1.1.2 - 12/29/92 9:41pm
|
||||
# v1.1.3 - 1/2/93 3:20pm
|
||||
# v1.1.4 - 1/9/93 1:19am
|
||||
|
||||
# First deal with all the dfork...
|
||||
|
||||
tiler.d.root: tiler.asm tiler.mac 22/t2common.equ 22/dsdb.equ 22/makepdp.asm
|
||||
compile +w tiler.asm keep=tiler.d
|
||||
|
||||
tiler.d: tiler.d.root 22/random3.a.root
|
||||
link +w tiler.d 22:random3.a keep=tiler.d
|
||||
|
||||
# Now work with the rfork...
|
||||
|
||||
tiler.r: tiler.rez 22/t2common.rez
|
||||
compile tiler.rez keep=tiler.r
|
||||
|
||||
# Now put it together.
|
||||
|
||||
tiler: tiler.r tiler.d
|
||||
duplicate -d tiler.d tiler
|
||||
duplicate -r tiler.r tiler
|
||||
setfile -at $4004 -t $bc tiler -m .
|
||||
cp tiler :jim1:system:cdevs:twilight:tiler
|
||||
22:beep
|
1718
source/twilight/tiler/tiler.asm
Normal file
1718
source/twilight/tiler/tiler.asm
Normal file
File diff suppressed because it is too large
Load Diff
396
source/twilight/tiler/tiler.mac
Normal file
396
source/twilight/tiler/tiler.mac
Normal file
@ -0,0 +1,396 @@
|
||||
MACRO
|
||||
&lab WordResult
|
||||
&lab phd
|
||||
MEND
|
||||
MACRO
|
||||
&lab LongResult
|
||||
&lab phd
|
||||
phd
|
||||
MEND
|
||||
MACRO
|
||||
&lab pullword &SYSOPR
|
||||
&lab ANOP
|
||||
pla
|
||||
AIF C:&SYSOPR=0,.end
|
||||
sta &SYSOPR
|
||||
.end
|
||||
MEND
|
||||
MACRO
|
||||
&lab pushlong &addr,&offset
|
||||
&lab ANOP
|
||||
LCLC &C
|
||||
LCLC &REST
|
||||
&C AMID &addr,1,1
|
||||
AIF "&C"="#",.immediate
|
||||
AIF "&C"="[",.zeropage
|
||||
AIF C:&offset=0,.nooffset
|
||||
AIF "&offset"="s",.stack
|
||||
pushword &addr+2,&offset
|
||||
pushword &addr,&offset
|
||||
MEXIT
|
||||
.nooffset
|
||||
pushword &addr+2
|
||||
pushword &addr
|
||||
MEXIT
|
||||
.immediate
|
||||
&REST AMID &addr,2,L:&addr-1
|
||||
dc I1'$F4',I2'(&REST)|-16'
|
||||
dc I1'$F4',I2'&REST'
|
||||
MEXIT
|
||||
.stack
|
||||
pushword &addr+2,s
|
||||
pushword &addr+2,s
|
||||
MEXIT
|
||||
.zeropage
|
||||
ldy #&offset+2
|
||||
pushword &addr,y
|
||||
ldy #&offset
|
||||
pushword &addr,y
|
||||
MEND
|
||||
MACRO
|
||||
&lab pushword &SYSOPR
|
||||
&lab ANOP
|
||||
AIF C:&SYSOPR=0,.b
|
||||
LCLC &C
|
||||
&C AMID "&SYSOPR",1,1
|
||||
AIF ("&C"="#").AND.(S:LONGA),.immediate
|
||||
lda &SYSOPR
|
||||
pha
|
||||
MEXIT
|
||||
.b
|
||||
pha
|
||||
MEXIT
|
||||
.immediate
|
||||
LCLC &REST
|
||||
LCLA &BL
|
||||
&BL ASEARCH "&SYSOPR"," ",1
|
||||
AIF &BL>0,.a
|
||||
&BL SETA L:&SYSOPR+1
|
||||
.a
|
||||
&REST AMID "&SYSOPR",2,&BL-2
|
||||
dc I1'$F4',I2'&REST'
|
||||
MEND
|
||||
MACRO
|
||||
&lab longmx
|
||||
&lab ANOP
|
||||
rep #%00110000
|
||||
longa on
|
||||
longi on
|
||||
MEND
|
||||
MACRO
|
||||
&lab killLdp
|
||||
&lab pld
|
||||
ply
|
||||
ply
|
||||
MEND
|
||||
MACRO
|
||||
&lab Debug &string
|
||||
aif t:debugSymbols="G",.begin
|
||||
mexit
|
||||
.begin
|
||||
dc i1'$82'
|
||||
dc i2'(L:&string)+3'
|
||||
dc i2'$7771'
|
||||
dc i1'L:&string',C'&string'
|
||||
MEND
|
||||
MACRO
|
||||
&LAB JNE &BP
|
||||
&LAB BEQ *+5
|
||||
BRL &BP
|
||||
MEND
|
||||
MACRO
|
||||
&lab _NewHandle
|
||||
&lab ldx #$0902
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _NewControl2
|
||||
&lab ldx #$3110
|
||||
jsl $E10000
|
||||
MEND
|
||||
macro
|
||||
&lab ~GetMasterSCB
|
||||
&lab WordResult
|
||||
Tool $1704
|
||||
mend
|
||||
macro
|
||||
&lab ~GetCurResourceFile
|
||||
&lab WordResult
|
||||
Tool $121E
|
||||
mend
|
||||
macro
|
||||
&lab ~GetCtlHandleFromID &ctlWindowPtr,&ctlID
|
||||
&lab LongResult
|
||||
ph4 &ctlWindowPtr
|
||||
ph4 &ctlID
|
||||
Tool $3010
|
||||
mend
|
||||
MACRO
|
||||
&lab _SetCurResourceFile
|
||||
&lab ldx #$111E
|
||||
jsl $E10000
|
||||
MEND
|
||||
macro
|
||||
&lab ~SetCurResourceFile &fileID
|
||||
&lab ph2 &fileID
|
||||
Tool $111E
|
||||
mend
|
||||
MACRO
|
||||
&lab str &string
|
||||
&lab dc i1'L:&string',C'&string'
|
||||
MEND
|
||||
MACRO
|
||||
&lab _AddResource
|
||||
&lab ldx #$0C1E
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _SetCtlValue
|
||||
&lab ldx #$1910
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _GetCtlValue
|
||||
&lab ldx #$1A10
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _ReleaseResource
|
||||
&lab ldx #$171E
|
||||
jsl $E10000
|
||||
MEND
|
||||
macro
|
||||
&lab ~UpdateResourceFile &fileID
|
||||
&lab ph2 &fileID
|
||||
Tool $0D1E
|
||||
mend
|
||||
macro
|
||||
&lab Tool &number
|
||||
&lab ldx #&number
|
||||
jsl $E10000
|
||||
mend
|
||||
macro
|
||||
&lab ph2 &addr,&offset
|
||||
&lab anop
|
||||
lclc &char
|
||||
&char amid "&addr",1,1
|
||||
aif "&char"="@",.accumulator
|
||||
aif "&char"="*",.smartmacros
|
||||
aif "&char"="#",.immediate
|
||||
aif "&char"="<",.directPage
|
||||
aif "&char"="[",.zeropage
|
||||
aif C:&offset=0,.nooffset
|
||||
aif "&offset"="s",.stack
|
||||
lda &addr,&offset
|
||||
pha
|
||||
mexit
|
||||
.nooffset
|
||||
lda &addr
|
||||
pha
|
||||
mexit
|
||||
.stack
|
||||
lda &addr,s
|
||||
pha
|
||||
mexit
|
||||
.smartmacros
|
||||
mexit
|
||||
.accumulator
|
||||
pha
|
||||
mexit
|
||||
.directPage
|
||||
&addr amid &addr,2,L:&addr-1
|
||||
pei &addr
|
||||
mexit
|
||||
.immediate
|
||||
&addr amid &addr,2,L:&addr-1
|
||||
pea &addr
|
||||
mexit
|
||||
.zeropage
|
||||
aif C:&offset<>0,.zeroPageOff
|
||||
lda &addr
|
||||
pha
|
||||
mexit
|
||||
.zeroPageOff
|
||||
aif "&offset"="X",.zeroPageReg
|
||||
aif "&offset"="Y",.ze
|
||||
oPageReg
|
||||
aif "&offset"="x",.zeroPageReg
|
||||
aif "&offset"="y",.zeroPageReg
|
||||
ldy #&offset
|
||||
lda &addr,y
|
||||
pha
|
||||
mexit
|
||||
.zeroPageReg
|
||||
lda &addr,&offset
|
||||
pha
|
||||
mend
|
||||
macro
|
||||
&lab ph4 &addr,&offset
|
||||
&lab anop
|
||||
lclc &char
|
||||
&char amid &addr,1,1
|
||||
aif "&char"="@",.registers
|
||||
aif "&char"="*",.smartmacros
|
||||
aif "&char"="#",.immediate
|
||||
aif "&char"="<",.directPage
|
||||
aif "&char"="[",.zeropage
|
||||
aif c:&offset=0,.nooffset
|
||||
aif "&offset"="s",.stack
|
||||
.yesoffset
|
||||
lda &addr+2,&offset
|
||||
pha
|
||||
lda &addr,&offset
|
||||
pha
|
||||
mexit
|
||||
.nooffset
|
||||
lda &addr+2
|
||||
pha
|
||||
lda &addr
|
||||
pha
|
||||
mexit
|
||||
.stack
|
||||
lda &addr+2,s
|
||||
pha
|
||||
lda &addr,s
|
||||
pha
|
||||
mexit
|
||||
.registers
|
||||
phy
|
||||
phx
|
||||
mexit
|
||||
.smartmacros
|
||||
mexit
|
||||
.immediate
|
||||
&addr amid &addr,2,L:&addr-1
|
||||
pea +(&addr)|-16
|
||||
pea &addr
|
||||
mexit
|
||||
.directPage
|
||||
&addr amid &addr,2,L:&addr-1
|
||||
pei &addr+2
|
||||
pei &addr
|
||||
mexit
|
||||
.zeroPage
|
||||
aif C:&offset<>0,.zeroPageOffset
|
||||
ldy #2
|
||||
lda &addr,y
|
||||
pha
|
||||
lda &addr
|
||||
pha
|
||||
mexit
|
||||
.zeroPageOffset
|
||||
aif "&offset"="X",.zeroPageRegX
|
||||
aif "&offset"="Y",.zeroPageRegY
|
||||
aif "&offset"="x",.zeroPageRegX
|
||||
aif "&offset"="y",.zeroPageRegY
|
||||
ldy #&offset+2
|
||||
lda &addr,y
|
||||
pha
|
||||
ldy #&offset
|
||||
lda &addr,y
|
||||
pha
|
||||
mexit
|
||||
.zeroPageRegX
|
||||
lda &addr,&offset
|
||||
tay
|
||||
inx
|
||||
inx
|
||||
lda &addr,&offset
|
||||
pha
|
||||
phy
|
||||
mexit
|
||||
.zeroPageRegY
|
||||
lda &addr,&offset
|
||||
tax
|
||||
iny
|
||||
iny
|
||||
lda &addr,&offset
|
||||
pha
|
||||
phx
|
||||
mend
|
||||
macro
|
||||
&lab ~RMLoadNamedResource &rType,&namePtr
|
||||
&lab LongResult
|
||||
PushWord &rType
|
||||
PushLong &namePtr
|
||||
Tool $2C1E
|
||||
mend
|
||||
macro
|
||||
&lab ~RMFindNamedResource &rType,&namePtr,&fileNumPtr
|
||||
&lab LongResult
|
||||
PushWord &rType
|
||||
PushLong &namePtr
|
||||
PushLong &fileNumPtr
|
||||
Tool $2A1E
|
||||
mend
|
||||
MACRO
|
||||
&lab shortmx
|
||||
&lab ANOP
|
||||
sep #%00110000
|
||||
longa off
|
||||
longi off
|
||||
MEND
|
||||
MACRO
|
||||
&lab _GetCtlHandleFromID
|
||||
&lab ldx #$3010
|
||||
jsl $E10000
|
||||
MEND
|
||||
macro
|
||||
&lab ~UniqueResourceID &IDRange,&resourceType
|
||||
&lab LongResult
|
||||
ph2 &IDRange
|
||||
ph2 &resourceType
|
||||
Tool $191E
|
||||
mend
|
||||
macro
|
||||
&lab ~SetBackPat &patternPtr
|
||||
&lab ph4 &patternPtr
|
||||
Tool $3404
|
||||
mend
|
||||
MACRO
|
||||
&lab _RMSetResourceName
|
||||
&lab ldx #$2D1E
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _ScrollRect
|
||||
&lab ldx #$7E04
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _MarkResourceChange
|
||||
&lab ldx #$101E
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _UpdateResourceFile
|
||||
&lab ldx #$0D1E
|
||||
jsl $E10000
|
||||
MEND
|
||||
macro
|
||||
&lab ~FindRadioButton &windPtr,&famNum
|
||||
&lab WordResult
|
||||
PushLong &windPtr
|
||||
PushWord &famNum
|
||||
Tool $3910
|
||||
mend
|
||||
macro
|
||||
&lab ~GetCurResourceApp
|
||||
&lab wordresult
|
||||
Tool $141E
|
||||
mend
|
||||
MACRO
|
||||
&lab _GetSCB
|
||||
&lab ldx #$1304
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _SetSCB
|
||||
&lab ldx #$1204
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&LAB JEQ &BP
|
||||
&LAB BNE *+5
|
||||
BRL &BP
|
||||
MEND
|
272
source/twilight/tiler/tiler.rez
Normal file
272
source/twilight/tiler/tiler.rez
Normal file
@ -0,0 +1,272 @@
|
||||
|
||||
#include "types.rez"
|
||||
#include "22:t2common.rez"
|
||||
|
||||
// --- type $8003 defines
|
||||
#define Tiler_CtlLst $101
|
||||
// --- type $8004 defines
|
||||
#define SoundFXCtl $101
|
||||
#define FastSpeedCtl $102
|
||||
#define SlowSpeedCtl $103
|
||||
#define SpeedStrCtl $104
|
||||
#define TilerOptionsStrCtl $105
|
||||
#define SmallSizeCtl $106
|
||||
#define LargeSizeCtl $107
|
||||
#define TileSizeStrCtl $108
|
||||
#define TilerIconCtl $109
|
||||
// --- type $8006 defines
|
||||
#define SoundFXStr $102
|
||||
#define FastStr $103
|
||||
#define SlowStr $104
|
||||
#define SmallStr $105
|
||||
#define LargeStr $106
|
||||
// --- type $800B defines
|
||||
#define TileSize_LText $101
|
||||
#define TilerOptions_LText $102
|
||||
#define Speed_LText $103
|
||||
|
||||
|
||||
resource rT2ModuleFlags (moduleFlags) {
|
||||
fMostCommonPalette+
|
||||
fSetup+
|
||||
fLoadSetupBoot+
|
||||
fLeavesUsableScreen+
|
||||
fReqUsableScreen, // module flags word
|
||||
$01, // enabled flag (unimplemented)
|
||||
$0110, // minimum T2 version required
|
||||
NIL, // reserved
|
||||
"Tiler" // module name
|
||||
};
|
||||
|
||||
// --- About text resource
|
||||
|
||||
resource rTextForLETextBox2 (moduleMessage) {
|
||||
TBLeftJust
|
||||
TBBackColor TBColorF
|
||||
TBForeColor TBColor4
|
||||
"Tiler"
|
||||
TBForeColor TBColor1
|
||||
" turns your screen into an automated version of the classic picture tile "
|
||||
"matrix puzzle game. Watch the computer solve - and unsolve - itself!"
|
||||
};
|
||||
|
||||
// --- Version resource
|
||||
|
||||
resource rVersion (moduleVersion) {
|
||||
{1,0,1,release,0}, // Version
|
||||
verUS, // US Version
|
||||
"T2 Tiler Module", // program's name
|
||||
"By J.Maricondo and Mensch.\n"
|
||||
"Copyright 1991-93, Jim Maricondo." // copyright notice
|
||||
};
|
||||
|
||||
// --- icon resource
|
||||
|
||||
resource rIcon (moduleIcon) {
|
||||
$8000, // kind
|
||||
$0014, // height
|
||||
$001C, // width
|
||||
|
||||
$"FFF0000000000000000000000FFF"
|
||||
$"FFF0FFFFFFFFFFFFFFFFFFFF0FFF"
|
||||
$"FFF0F000000000000000000F0FFF"
|
||||
$"FFF0F0FF00FF00FF00FF000F0FFF"
|
||||
$"FFF0F0FF00FF00FF00FF000F0FFF"
|
||||
$"FFF0F000FF00FF00FF00FF0F0FFF"
|
||||
$"FFF0F000FF00FF00FF00FF0F0FFF"
|
||||
$"FFF0F0FF00FF00FF00FF000F0FFF"
|
||||
$"FFF0F0FF00FF00FF00FF000F0FFF"
|
||||
$"FFF0F000FF00FF00FF00FF0F0FFF"
|
||||
$"FFF0F000FF00FF00FF00FF0F0FFF"
|
||||
$"FFF0F000000000000000000F0FFF"
|
||||
$"FFF0FFFFFFFFFFFFFFFFAFFF0FFF"
|
||||
$"FFF0000000000000000000000FFF"
|
||||
$"FFFF0FFFFFFFFFFFFFFFFFF0FFFF"
|
||||
$"FFFF0FFFFFFFFFFFFFFFFFF0FFFF"
|
||||
$"FFFF0FF4AFFFFFFFFFFFFFF0FFFF"
|
||||
$"FFFF0CCCCCCCCCCCCCCCCCC0FFFF"
|
||||
$"FFFF0FFFFFFFFFFFFFFFAFF0FFFF"
|
||||
$"FFFF00000000000000000000FFFF",
|
||||
|
||||
$"000FFFFFFFFFFFFFFFFFFFFFF000"
|
||||
$"000FFFFFFFFFFFFFFFFFFFFFF000"
|
||||
$"000FFFFFFFFFFFFFFFFFFFFFF000"
|
||||
$"000FFFFFFFFFFFFFFFFFFFFFF000"
|
||||
$"000FFFFFFFFFFFFFFFFFFFFFF000"
|
||||
$"000FFFFFFFFFFFFFFFFFFFFFF000"
|
||||
$"000FFFFFFFFFFFFFFFFFFFFFF000"
|
||||
$"000FFFFFFFFFFFFFFFFFFFFFF000"
|
||||
$"000FFFFFFFFFFFFFFFFFFFFFF000"
|
||||
$"000FFFFFFFFFFFFFFFFFFFFFF000"
|
||||
$"000FFFFFFFFFFFFFFFFFFFFFF000"
|
||||
$"000FFFFFFFFFFFFFFFFFFFFFF000"
|
||||
$"000FFFFFFFFFFFFFFFFFFFFFF000"
|
||||
$"000FFFFFFFFFFFFFFFFFFFFFF000"
|
||||
$"0000FFFFFFFFFFFFFFFFFFFF0000"
|
||||
$"0000FFFFFFFFFFFFFFFFFFFF0000"
|
||||
$"0000FFFFFFFFFFFFFFFFFFFF0000"
|
||||
$"0000FFFFFFFFFFFFFFFFFFFF0000"
|
||||
$"0000FFFFFFFFFFFFFFFFFFFF0000"
|
||||
$"0000FFFFFFFFFFFFFFFFFFFF0000";
|
||||
};
|
||||
|
||||
// --- Control List Definitions
|
||||
|
||||
resource rControlList (Tiler_CtlLst) {
|
||||
{
|
||||
LargeSizeCtl,
|
||||
SmallSizeCtl,
|
||||
SlowSpeedCtl,
|
||||
FastSpeedCtl,
|
||||
SoundFXCtl,
|
||||
TileSizeStrCtl,
|
||||
TilerOptionsStrCtl,
|
||||
SpeedStrCtl,
|
||||
TilerIconCtl,
|
||||
};
|
||||
};
|
||||
|
||||
// --- Control Templates
|
||||
|
||||
resource rControlTemplate (SoundFXCtl) {
|
||||
$00000001, // ID
|
||||
{111, 60,120,188}, // rect
|
||||
checkControl {{
|
||||
$0000, // flag
|
||||
$1002, // moreFlags
|
||||
$00000000, // refCon
|
||||
SoundFXStr, // titleRef
|
||||
$0000 // initialValue
|
||||
}};
|
||||
};
|
||||
|
||||
resource rControlTemplate (FastSpeedCtl) {
|
||||
$00000002, // ID
|
||||
{ 87,110, 96,168}, // rect
|
||||
radioControl {{
|
||||
$0001, // flag
|
||||
$1002, // moreFlags
|
||||
$00000000, // refCon
|
||||
FastStr, // titleRef
|
||||
$0000 // initialValue
|
||||
}};
|
||||
};
|
||||
|
||||
resource rControlTemplate (SlowSpeedCtl) {
|
||||
$00000003, // ID
|
||||
{ 98,110,107,172}, // rect
|
||||
radioControl {{
|
||||
$0001, // flag
|
||||
$1002, // moreFlags
|
||||
$00000000, // refCon
|
||||
SlowStr, // titleRef
|
||||
$0000 // initialValue
|
||||
}};
|
||||
};
|
||||
|
||||
resource rControlTemplate (SmallSizeCtl) {
|
||||
$00000004, // ID
|
||||
{ 74, 80, 84,266}, // rect
|
||||
radioControl {{
|
||||
$0000, // flag
|
||||
$1002, // moreFlags
|
||||
$00000000, // refCon
|
||||
SmallStr, // titleRef
|
||||
$0000 // initialValue
|
||||
}};
|
||||
};
|
||||
|
||||
resource rControlTemplate (LargeSizeCtl) {
|
||||
$00000005, // ID
|
||||
{ 63, 80, 72,254}, // rect
|
||||
radioControl {{
|
||||
$0000, // flag
|
||||
$1002, // moreFlags
|
||||
$00000000, // refCon
|
||||
LargeStr, // titleRef
|
||||
$0000 // initialValue
|
||||
}};
|
||||
};
|
||||
|
||||
resource rControlTemplate (TileSizeStrCtl) {
|
||||
$00000006, // ID
|
||||
{ 52, 56, 61,131}, // rect
|
||||
statTextControl {{
|
||||
$0000, // flag
|
||||
$1002, // moreFlags
|
||||
$00000000, // refCon
|
||||
TileSize_LText // textRef
|
||||
}};
|
||||
};
|
||||
|
||||
resource rControlTemplate (TilerIconCtl) {
|
||||
$00000007, // ID
|
||||
{ 26, 88, 47,132}, // rect
|
||||
iconButtonControl {{
|
||||
$000C, // flag
|
||||
$1020, // moreFlags
|
||||
$00000000, // refCon
|
||||
$0010DD01, // iconRef
|
||||
0, // titleRef
|
||||
0, // colorTableRef
|
||||
$0000 // displayMode
|
||||
}};
|
||||
};
|
||||
|
||||
resource rControlTemplate (SpeedStrCtl) {
|
||||
$00000008, // ID
|
||||
{ 87, 58, 96,109}, // rect
|
||||
statTextControl {{
|
||||
$0000, // flag
|
||||
$1002, // moreFlags
|
||||
$00000000, // refCon
|
||||
Speed_LText // textRef
|
||||
}};
|
||||
};
|
||||
|
||||
resource rControlTemplate (TilerOptionsStrCtl) {
|
||||
$00000009, // ID
|
||||
{ 32,142, 41,239}, // rect
|
||||
statTextControl {{
|
||||
$0000, // flag
|
||||
$1002, // moreFlags
|
||||
$00000000, // refCon
|
||||
TilerOptions_LText // textRef
|
||||
}};
|
||||
};
|
||||
|
||||
// --- rPString Templates
|
||||
|
||||
resource rPString (SoundFXStr) {
|
||||
"Sound Effects"
|
||||
};
|
||||
|
||||
resource rPString (FastStr) {
|
||||
"Fast"
|
||||
};
|
||||
|
||||
resource rPString (SlowStr) {
|
||||
"Slow"
|
||||
};
|
||||
|
||||
resource rPString (SmallStr) {
|
||||
"Small (10*10 matrix)"
|
||||
};
|
||||
|
||||
resource rPString (LargeStr) {
|
||||
"Large (5*5 matrix)"
|
||||
};
|
||||
|
||||
// --- rTextForLETextBox2 Templates
|
||||
|
||||
resource rTextForLETextBox2 (TileSize_LText) {
|
||||
"Tile Size:"
|
||||
};
|
||||
|
||||
resource rTextForLETextBox2 (TilerOptions_LText) {
|
||||
"Tiler Options"
|
||||
};
|
||||
|
||||
resource rTextForLETextBox2 (Speed_LText) {
|
||||
"Speed:"
|
||||
};
|
29
source/twilight/universe/makefile
Normal file
29
source/twilight/universe/makefile
Normal file
@ -0,0 +1,29 @@
|
||||
|
||||
# Twilight II Universe UNIX MakeFile
|
||||
# by Jim Maricondo
|
||||
# v1.0 - 10/24/92 8:38pm
|
||||
# v1.1 - 1/2/93 2:32pm 3:18pm
|
||||
# v1.1.1 - 1/9/93 1:19am
|
||||
# v1.1.2 - 2/16/93 8:55pm - t2common.rez. (HB!??!)
|
||||
|
||||
# First deal with all the dfork...
|
||||
|
||||
Universe.d.root: Universe.asm Universe.mac 22/t2common.equ 22/dsdb.equ 22/makepdp.asm
|
||||
compile +w Universe.asm keep=Universe.d
|
||||
|
||||
Universe.d: Universe.d.root 22/random3.a.root
|
||||
link +w Universe.d 22:random3.a keep=Universe.d
|
||||
|
||||
# Now work with the rfork...
|
||||
|
||||
Universe.r: Universe.rez 22/t2common.rez
|
||||
compile Universe.rez keep=Universe.r
|
||||
|
||||
# Now put it together.
|
||||
|
||||
Universe: Universe.r Universe.d
|
||||
duplicate -d Universe.d Universe
|
||||
duplicate -r Universe.r Universe
|
||||
setfile -at $4004 -t $bc universe -m .
|
||||
cp Universe :jim1:system:cdevs:twilight:Universe
|
||||
22:beep
|
1386
source/twilight/universe/universe.asm
Normal file
1386
source/twilight/universe/universe.asm
Normal file
File diff suppressed because it is too large
Load Diff
445
source/twilight/universe/universe.mac
Normal file
445
source/twilight/universe/universe.mac
Normal file
@ -0,0 +1,445 @@
|
||||
MACRO
|
||||
&lab pulllong &addr1,&addr2
|
||||
&lab ANOP
|
||||
AIF C:&addr1=0,.a
|
||||
AIF C:&addr2=0,.b
|
||||
LCLC &C
|
||||
&C AMID &addr1,1,1
|
||||
AIF "&C"="[",.zeropage
|
||||
pullword &addr1
|
||||
sta &addr2
|
||||
pullword &addr1+2
|
||||
sta &addr2+2
|
||||
MEXIT
|
||||
.a
|
||||
pullword
|
||||
pullword
|
||||
MEXIT
|
||||
.b
|
||||
pullword &addr1
|
||||
pullword &addr1+2
|
||||
MEXIT
|
||||
.zeropage
|
||||
ldy #&addr2
|
||||
pullword &addr1,y
|
||||
ldy #&addr2+2
|
||||
pullword &addr1,y
|
||||
MEND
|
||||
MACRO
|
||||
&lab pullword &SYSOPR
|
||||
&lab ANOP
|
||||
pla
|
||||
AIF C:&SYSOPR=0,.end
|
||||
sta &SYSOPR
|
||||
.end
|
||||
MEND
|
||||
MACRO
|
||||
&lab pushlong &addr,&offset
|
||||
&lab ANOP
|
||||
LCLC &C
|
||||
LCLC &REST
|
||||
&C AMID &addr,1,1
|
||||
AIF "&C"="#",.immediate
|
||||
AIF "&C"="[",.zeropage
|
||||
AIF C:&offset=0,.nooffset
|
||||
AIF "&offset"="s",.stack
|
||||
pushword &addr+2,&offset
|
||||
pushword &addr,&offset
|
||||
MEXIT
|
||||
.nooffset
|
||||
pushword &addr+2
|
||||
pushword &addr
|
||||
MEXIT
|
||||
.immediate
|
||||
&REST AMID &addr,2,L:&addr-1
|
||||
dc I1'$F4',I2'(&REST)|-16'
|
||||
dc I1'$F4',I2'&REST'
|
||||
MEXIT
|
||||
.stack
|
||||
pushword &addr+2,s
|
||||
pushword &addr+2,s
|
||||
MEXIT
|
||||
.zeropage
|
||||
ldy #&offset+2
|
||||
pushword &addr,y
|
||||
ldy #&offset
|
||||
pushword &addr,y
|
||||
MEND
|
||||
MACRO
|
||||
&lab pushword &SYSOPR
|
||||
&lab ANOP
|
||||
AIF C:&SYSOPR=0,.b
|
||||
LCLC &C
|
||||
&C AMID "&SYSOPR",1,1
|
||||
AIF ("&C"="#").AND.(S:LONGA),.immediate
|
||||
lda &SYSOPR
|
||||
pha
|
||||
MEXIT
|
||||
.b
|
||||
pha
|
||||
MEXIT
|
||||
.immediate
|
||||
LCLC &REST
|
||||
LCLA &BL
|
||||
&BL ASEARCH "&SYSOPR"," ",1
|
||||
AIF &BL>0,.a
|
||||
&BL SETA L:&SYSOPR+1
|
||||
.a
|
||||
&REST AMID "&SYSOPR",2,&BL-2
|
||||
dc I1'$F4',I2'&REST'
|
||||
MEND
|
||||
MACRO
|
||||
&lab longmx
|
||||
&lab ANOP
|
||||
rep #%00110000
|
||||
longa on
|
||||
longi on
|
||||
MEND
|
||||
MACRO
|
||||
&lab longm
|
||||
&lab ANOP
|
||||
rep #%00100000
|
||||
longa on
|
||||
MEND
|
||||
MACRO
|
||||
&lab shortm
|
||||
&lab ANOP
|
||||
sep #%00100000
|
||||
longa off
|
||||
MEND
|
||||
MACRO
|
||||
&lab killLdp
|
||||
&lab pld
|
||||
ply
|
||||
ply
|
||||
MEND
|
||||
MACRO
|
||||
&lab makeDP
|
||||
&lab phd
|
||||
tsc
|
||||
tcd
|
||||
MEND
|
||||
MACRO
|
||||
&lab Debug &string
|
||||
aif t:debugSymbols="G",.begin
|
||||
mexit
|
||||
.begin
|
||||
dc i1'$82'
|
||||
dc i2'(L:&string)+3'
|
||||
dc i2'$7771'
|
||||
dc i1'L:&string',C'&string'
|
||||
MEND
|
||||
MACRO
|
||||
&LAB JCS &BP
|
||||
&LAB BCC *+5
|
||||
BRL &BP
|
||||
MEND
|
||||
macro
|
||||
&lab WordResult &zero
|
||||
&lab anop
|
||||
aif c:&zeros=1,.zero
|
||||
phd
|
||||
mexit
|
||||
.zero
|
||||
&lab pea $0000
|
||||
mend
|
||||
macro
|
||||
&lab LongResult &zeros
|
||||
&lab anop
|
||||
aif c:&zeros=1,.zeros
|
||||
phd
|
||||
phd
|
||||
mexit
|
||||
.zeros
|
||||
pea $0000
|
||||
pea $0000
|
||||
mend
|
||||
MACRO
|
||||
&lab _NewHandle
|
||||
&lab ldx #$0902
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _NewControl2
|
||||
&lab ldx #$3110
|
||||
jsl $E10000
|
||||
MEND
|
||||
macro
|
||||
&lab ~GetCurResourceFile
|
||||
&lab WordResult
|
||||
Tool $121E
|
||||
mend
|
||||
macro
|
||||
&lab ~LoadResource &resourceType,&resourceID
|
||||
&lab LongResult
|
||||
ph2 &resourceType
|
||||
ph4 &resourceID
|
||||
Tool $0E1E
|
||||
mend
|
||||
macro
|
||||
&lab ~ReleaseResource &purgeLevel,&resourceType,&resourceID
|
||||
&lab ph2 &purgeLevel
|
||||
ph2 &resourceType
|
||||
ph4 &resourceID
|
||||
Tool $171E
|
||||
mend
|
||||
macro
|
||||
&lab ph2 &addr,&offset
|
||||
&lab anop
|
||||
lclc &char
|
||||
&char amid "&addr",1,1
|
||||
aif "&char"="@",.accumulator
|
||||
aif "&char"="*",.smartmacros
|
||||
aif "&char"="#",.immediate
|
||||
aif "&char"="<",.directPage
|
||||
aif "&char"="[",.zeropage
|
||||
aif C:&offset=0,.nooffset
|
||||
aif "&offset"="s",.stack
|
||||
lda &addr,&offset
|
||||
pha
|
||||
mexit
|
||||
.nooffset
|
||||
lda &addr
|
||||
pha
|
||||
mexit
|
||||
.stack
|
||||
lda &addr,s
|
||||
pha
|
||||
mexit
|
||||
.smartmacros
|
||||
mexit
|
||||
.accumulator
|
||||
pha
|
||||
mexit
|
||||
.directPage
|
||||
&addr amid &addr,2,L:&addr-1
|
||||
pei &addr
|
||||
mexit
|
||||
.immediate
|
||||
&addr amid &addr,2,L:&addr-1
|
||||
pea &addr
|
||||
mexit
|
||||
.zeropage
|
||||
aif C:&offset<>0,.zeroPageOff
|
||||
lda &addr
|
||||
pha
|
||||
mexit
|
||||
.zeroPageOff
|
||||
aif "&offset"="X",.zeroPageReg
|
||||
aif "&offset"="Y",.ze
|
||||
oPageReg
|
||||
aif "&offset"="x",.zeroPageReg
|
||||
aif "&offset"="y",.zeroPageReg
|
||||
ldy #&offset
|
||||
lda &addr,y
|
||||
pha
|
||||
mexit
|
||||
.zeroPageReg
|
||||
lda &addr,&offset
|
||||
pha
|
||||
mend
|
||||
macro
|
||||
&lab ph4 &addr,&offset
|
||||
&lab anop
|
||||
lclc &char
|
||||
&char amid &addr,1,1
|
||||
aif "&char"="@",.registers
|
||||
aif "&char"="*",.smartmacros
|
||||
aif "&char"="#",.immediate
|
||||
aif "&char"="<",.directPage
|
||||
aif "&char"="[",.zeropage
|
||||
aif c:&offset=0,.nooffset
|
||||
aif "&offset"="s",.stack
|
||||
.yesoffset
|
||||
lda &addr+2,&offset
|
||||
pha
|
||||
lda &addr,&offset
|
||||
pha
|
||||
mexit
|
||||
.nooffset
|
||||
lda &addr+2
|
||||
pha
|
||||
lda &addr
|
||||
pha
|
||||
mexit
|
||||
.stack
|
||||
lda &addr+2,s
|
||||
pha
|
||||
lda &addr,s
|
||||
pha
|
||||
mexit
|
||||
.registers
|
||||
phy
|
||||
phx
|
||||
mexit
|
||||
.smartmacros
|
||||
mexit
|
||||
.immediate
|
||||
&addr amid &addr,2,L:&addr-1
|
||||
pea +(&addr)|-16
|
||||
pea &addr
|
||||
mexit
|
||||
.directPage
|
||||
&addr amid &addr,2,L:&addr-1
|
||||
pei &addr+2
|
||||
pei &addr
|
||||
mexit
|
||||
.zeroPage
|
||||
aif C:&offset<>0,.zeroPageOffset
|
||||
ldy #2
|
||||
lda &addr,y
|
||||
pha
|
||||
lda &addr
|
||||
pha
|
||||
mexit
|
||||
.zeroPageOffset
|
||||
aif "&offset"="X",.zeroPageRegX
|
||||
aif "&offset"="Y",.zeroPageRegY
|
||||
aif "&offset"="x",.zeroPageRegX
|
||||
aif "&offset"="y",.zeroPageRegY
|
||||
ldy #&offset+2
|
||||
lda &addr,y
|
||||
pha
|
||||
ldy #&offset
|
||||
lda &addr,y
|
||||
pha
|
||||
mexit
|
||||
.zeroPageRegX
|
||||
lda &addr,&offset
|
||||
tay
|
||||
inx
|
||||
inx
|
||||
lda &addr,&offset
|
||||
pha
|
||||
phy
|
||||
mexit
|
||||
.zeroPageRegY
|
||||
lda &addr,&offset
|
||||
tax
|
||||
iny
|
||||
iny
|
||||
lda &addr,&offset
|
||||
pha
|
||||
phx
|
||||
mend
|
||||
macro
|
||||
&lab ~GetCtlHandleFromID &ctlWindowPtr,&ctlID
|
||||
&lab LongResult
|
||||
ph4 &ctlWindowPtr
|
||||
ph4 &ctlID
|
||||
Tool $3010
|
||||
mend
|
||||
MACRO
|
||||
&lab dbrk &num
|
||||
aif t:debugBreaks="G",.begin
|
||||
mexit
|
||||
.begin
|
||||
brk &num
|
||||
MEND
|
||||
macro
|
||||
&lab ~GetCurResourceApp
|
||||
&lab wordresult
|
||||
Tool $141E
|
||||
mend
|
||||
MACRO
|
||||
&LAB JGE &BP
|
||||
&LAB BLT *+5
|
||||
BRL &BP
|
||||
MEND
|
||||
MACRO
|
||||
&lab _SetCurResourceFile
|
||||
&lab ldx #$111E
|
||||
jsl $E10000
|
||||
MEND
|
||||
macro
|
||||
&lab ~SetCurResourceFile &fileID
|
||||
&lab ph2 &fileID
|
||||
Tool $111E
|
||||
mend
|
||||
MACRO
|
||||
&lab str &string
|
||||
&lab dc i1'L:&string',C'&string'
|
||||
MEND
|
||||
MACRO
|
||||
&lab _AddResource
|
||||
&lab ldx #$0C1E
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _ReleaseResource
|
||||
&lab ldx #$171E
|
||||
jsl $E10000
|
||||
MEND
|
||||
macro
|
||||
&lab ~UpdateResourceFile &fileID
|
||||
&lab ph2 &fileID
|
||||
Tool $0D1E
|
||||
mend
|
||||
macro
|
||||
&lab Tool &number
|
||||
&lab ldx #&number
|
||||
jsl $E10000
|
||||
mend
|
||||
MACRO
|
||||
&lab _UDivide
|
||||
&lab ldx #$0B0B
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _CallCtlDefProc
|
||||
&lab ldx #$2C10
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _MakeThisCtlTarget
|
||||
&lab ldx #$2810
|
||||
jsl $E10000
|
||||
MEND
|
||||
macro
|
||||
&lab ~GetAddress &tableID
|
||||
&lab LongResult
|
||||
ph2 &tableID
|
||||
Tool $0904
|
||||
mend
|
||||
macro
|
||||
&lab ~UniqueResourceID &IDRange,&resourceType
|
||||
&lab LongResult
|
||||
ph2 &IDRange
|
||||
ph2 &resourceType
|
||||
Tool $191E
|
||||
mend
|
||||
MACRO
|
||||
&lab _RMSetResourceName
|
||||
&lab ldx #$2D1E
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _GetWRefCon
|
||||
&lab ldx #$290E
|
||||
jsl $E10000
|
||||
MEND
|
||||
macro
|
||||
&lab ~RMLoadNamedResource &rType,&namePtr
|
||||
&lab LongResult
|
||||
PushWord &rType
|
||||
PushLong &namePtr
|
||||
Tool $2C1E
|
||||
mend
|
||||
macro
|
||||
&lab ~RMFindNamedResource &rType,&namePtr,&fileNumPtr
|
||||
&lab LongResult
|
||||
PushWord &rType
|
||||
PushLong &namePtr
|
||||
PushLong &fileNumPtr
|
||||
Tool $2A1E
|
||||
mend
|
||||
MACRO
|
||||
&lab _MarkResourceChange
|
||||
&lab ldx #$101E
|
||||
jsl $E10000
|
||||
MEND
|
||||
macro
|
||||
&lab ~MMStartUp
|
||||
&lab WordResult
|
||||
Tool $0202
|
||||
mend
|
476
source/twilight/universe/universe.rez
Normal file
476
source/twilight/universe/universe.rez
Normal file
@ -0,0 +1,476 @@
|
||||
|
||||
#include "types.rez"
|
||||
#include "22:t2common.rez"
|
||||
|
||||
// --- type $8003 defines
|
||||
#define univCtlLst 1
|
||||
// --- type $8004 defines
|
||||
#define CTLTMP_00006FF9 1
|
||||
#define VisionFieldStrCtl 2
|
||||
#define CTLTMP_00006FFB 3
|
||||
#define CTLTMP_00006FFC 4
|
||||
#define CTLTMP_00006FFD 5
|
||||
#define CTLTMP_00006FFE 6
|
||||
#define ViewingAngleStrCtl 7
|
||||
#define StarSpeedStrCtl 8
|
||||
#define UniverseOptionsStrCtl 9
|
||||
#define iconCtl 10
|
||||
// --- type $800B defines
|
||||
#define LETXTBOX_00000001 $000000c1
|
||||
#define LETXTBOX_00000002 $000000c2
|
||||
#define LETXTBOX_00000003 $000000c3
|
||||
#define LETXTBOX_00000004 $000000c4
|
||||
#define LETXTBOX_00000005 $000000c5
|
||||
// --- type rDataList ($1986) defines
|
||||
#define fieldOfVisionDataList 1
|
||||
#define MaxStarsDataList 2
|
||||
#define viewingAngleDataList 3
|
||||
#define StarSpeedDataList 4
|
||||
// --- type rTaggedStrings ($802E) defines
|
||||
#define fieldOfVisionStrings 1
|
||||
#define MaxStarsFieldStrings 2
|
||||
#define viewingAngleFieldStrings 3
|
||||
#define starSpeedFieldStrings 4
|
||||
|
||||
resource rT2ModuleFlags (moduleFlags) {
|
||||
fFadeOut+fFadeIn+fSetup+fGrafPort320, // module flags word
|
||||
$01, // enabled flag (unimplemented)
|
||||
$0110, // minimum T2 version required
|
||||
NIL, // reserved
|
||||
"Universe" // module name
|
||||
};
|
||||
|
||||
// --- About text resource
|
||||
|
||||
resource rTextForLETextBox2 (moduleMessage) {
|
||||
TBLeftJust
|
||||
TBBackColor TBColorF
|
||||
TBForeColor TBColor4
|
||||
"Universe"
|
||||
TBForeColor TBColor1
|
||||
" simulates an intergalactic trek through the cosmos.\n"
|
||||
"Relax and enjoy the ride!"
|
||||
};
|
||||
|
||||
// --- Version resource
|
||||
|
||||
resource rVersion (moduleVersion) {
|
||||
{1,0,1,release,0}, // Version
|
||||
verUS, // US Version
|
||||
"T2 Universe Module", // program's name
|
||||
"By J.Maricondo. Thanks S.Quick!\n"
|
||||
"Copyright 1990-93, Jim Maricondo." // copyright notice
|
||||
};
|
||||
|
||||
// --- About icon resource
|
||||
|
||||
resource rIcon (moduleIcon) {
|
||||
$8000, // kind
|
||||
$0014, // height
|
||||
$0016, // width
|
||||
|
||||
$"0000000000000000000000"
|
||||
$"0FFFFFFFFFFFFFFFFFFFF0"
|
||||
$"0F000000000000000000F0"
|
||||
$"0F00000000F000000F00F0"
|
||||
$"0F00F000000030F00000F0"
|
||||
$"0F000000C00C00000000F0"
|
||||
$"0F000300000000F00C00F0"
|
||||
$"0F00000F0030C000CF30F0"
|
||||
$"0F000C00000000000C00F0"
|
||||
$"0F00CF3030C003000000F0"
|
||||
$"0F000C00000F0000F000F0"
|
||||
$"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";
|
||||
};
|
||||
|
||||
// --- Control List Definitions
|
||||
|
||||
resource rControlList (1) {
|
||||
{
|
||||
2,
|
||||
3,
|
||||
7,
|
||||
8,
|
||||
9,
|
||||
10,
|
||||
};
|
||||
};
|
||||
|
||||
// --- Control Templates
|
||||
|
||||
// -- FIELD OF VISION DATAFIELD CONTROL TEMPLATE
|
||||
|
||||
resource rControlTemplate (1) {
|
||||
1, // ID
|
||||
{108,136,121,190}, // rect 246
|
||||
dataFieldControl {{
|
||||
ctlVisible, // flag
|
||||
fCtlCanBeTarget+RefIsResource, // moreFlags
|
||||
NIL, // refCon
|
||||
fieldOfVisionDataList, // dataListRef
|
||||
{0,0,0,0,0,0,0,0} // fieldValues
|
||||
}};
|
||||
};
|
||||
|
||||
// -- MAXIMUM STARS DATAFIELD CONTROL TEMPLATE
|
||||
|
||||
resource rControlTemplate (4) {
|
||||
2, // ID
|
||||
{ 94,136,107,190}, // rect
|
||||
dataFieldControl {{
|
||||
ctlVisible, // flag
|
||||
fCtlCanBeTarget+RefIsResource, // moreFlags
|
||||
NIL, // refCon
|
||||
MaxStarsDataList, // dataListRef
|
||||
{0,0,0,0,0,0,0,0} // fieldValues
|
||||
}};
|
||||
};
|
||||
|
||||
// -- VIEWING ANGLE DATAFIELD CONTROL TEMPLATE
|
||||
|
||||
resource rControlTemplate (5) {
|
||||
3, // ID
|
||||
{ 80,136, 93,210}, // rect 210,214
|
||||
dataFieldControl {{
|
||||
ctlVisible, // flag
|
||||
fCtlCanBeTarget+RefIsResource, // moreFlags
|
||||
NIL, // refCon
|
||||
viewingAngleDataList, // dataListRef
|
||||
{0,0,0,0,0,0,0,0} // fieldValues
|
||||
}};
|
||||
};
|
||||
|
||||
// -- STAR SPEED DATAFIELD CONTROL TEMPLATE
|
||||
|
||||
resource rControlTemplate (6) {
|
||||
4, // ID
|
||||
{ 66,136, 79,180}, // rect
|
||||
dataFieldControl {{
|
||||
ctlVisible, // flag
|
||||
fCtlCanBeTarget+RefIsResource, // moreFlags
|
||||
NIL, // refCon
|
||||
StarSpeedDataList, // dataListRef
|
||||
{0,0,0,0,0,0,0,0} // fieldValues
|
||||
}};
|
||||
};
|
||||
|
||||
resource rControlTemplate (2) {
|
||||
5, // ID
|
||||
{110, 20,119,133}, // rect
|
||||
statTextControl {{
|
||||
ctlVisible, // flag
|
||||
$1002, // moreFlags
|
||||
$00000000, // refCon
|
||||
LETXTBOX_00000005 // textRef
|
||||
}};
|
||||
};
|
||||
|
||||
resource rControlTemplate (3) {
|
||||
6, // ID
|
||||
{ 96, 20,106,125}, // rect
|
||||
statTextControl {{
|
||||
ctlVisible, // flag
|
||||
$1002, // moreFlags
|
||||
$00000000, // refCon
|
||||
LETXTBOX_00000004 // textRef
|
||||
}};
|
||||
};
|
||||
|
||||
resource rControlTemplate (7) {
|
||||
7, // ID
|
||||
{ 82, 20, 91,125}, // rect
|
||||
statTextControl {{
|
||||
$0000, // flag
|
||||
$1002, // moreFlags
|
||||
$00000000, // refCon
|
||||
LETXTBOX_00000003 // textRef
|
||||
}};
|
||||
};
|
||||
|
||||
resource rControlTemplate (8) {
|
||||
8, // ID
|
||||
{ 68, 20, 78,103}, // rect
|
||||
statTextControl {{
|
||||
$0000, // flag
|
||||
$1002, // moreFlags
|
||||
$00000000, // refCon
|
||||
LETXTBOX_00000002 // textRef
|
||||
}};
|
||||
};
|
||||
|
||||
resource rControlTemplate (9) {
|
||||
9, // ID
|
||||
{ 51,116, 60,239}, // rect
|
||||
statTextControl {{
|
||||
$0000, // flag
|
||||
$1002, // moreFlags
|
||||
$00000000, // refCon
|
||||
LETXTBOX_00000001 // textRef
|
||||
}};
|
||||
};
|
||||
|
||||
resource rControlTemplate (10) {
|
||||
10, // ID
|
||||
{ 24,148, 50,202}, // rect
|
||||
iconButtonControl {{
|
||||
$000C, //no border, don't track hits! flag
|
||||
$1020, // moreFlags
|
||||
$00000000, // refCon
|
||||
moduleIcon, // iconRef
|
||||
0, // titleRef
|
||||
0, // colorTableRef
|
||||
$0000 // displayMode
|
||||
}};
|
||||
};
|
||||
|
||||
// --- rTextForLETextBox2 Templates
|
||||
|
||||
resource rTextForLETextBox2 (LETXTBOX_00000001) {
|
||||
"Universe Options"
|
||||
};
|
||||
|
||||
resource rTextForLETextBox2 (LETXTBOX_00000002) {
|
||||
"Star Speed: "
|
||||
};
|
||||
|
||||
resource rTextForLETextBox2 (LETXTBOX_00000003) {
|
||||
"Visibility:"
|
||||
/* "Viewing Angle:"*/
|
||||
};
|
||||
|
||||
resource rTextForLETextBox2 (LETXTBOX_00000004) {
|
||||
"Maximum Stars:"
|
||||
};
|
||||
|
||||
resource rTextForLETextBox2 (LETXTBOX_00000005) {
|
||||
/* "Field of Vision:"*/
|
||||
"Star proximity:"
|
||||
};
|
||||
|
||||
/* This structure describes the relative locations and strings associated with
|
||||
each data field. Since there may be from 1 to 8 data fields in each control,
|
||||
these location/string reference pairs repeat for each field. */
|
||||
|
||||
resource rDataList (fieldOfVisionDataList, nospecialmemory,nocrossbank) {
|
||||
{
|
||||
{2,6}, // relative location of this field
|
||||
fieldOfVisionStrings // reference to this field's string list
|
||||
};
|
||||
};
|
||||
|
||||
resource rDataList (MaxStarsDataList, nospecialmemory,nocrossbank) {
|
||||
{
|
||||
{2,6}, // relative location of this field
|
||||
MaxStarsFieldStrings // reference to this field's string list
|
||||
};
|
||||
};
|
||||
|
||||
resource rDataList (viewingAngleDataList, nospecialmemory,nocrossbank) {
|
||||
{
|
||||
{2,6}, // relative location of this field
|
||||
viewingAnglefieldStrings // reference to this field's string list
|
||||
};
|
||||
};
|
||||
|
||||
resource rDataList (starSpeedDataList, nospecialmemory,nocrossbank) {
|
||||
{
|
||||
{2,6}, // relative location of this field
|
||||
starSpeedFieldStrings // reference to this field's string list
|
||||
};
|
||||
};
|
||||
|
||||
/* These are the tagged strings that are associated with each field in the
|
||||
control. The tag value that is specified is used to track the current value
|
||||
of each field. If you wish only to have a list of integers displayed, simply
|
||||
provide the tag values and null (empty) strings as in the second field. */
|
||||
|
||||
resource rTaggedStrings (fieldOfVisionStrings) {
|
||||
{
|
||||
5,"5",
|
||||
10,"10",
|
||||
15,"15",
|
||||
20,"20",
|
||||
25,"25",
|
||||
30,"30",
|
||||
35,"35",
|
||||
40,"40",
|
||||
45,"45",
|
||||
50,"50",
|
||||
55,"55",
|
||||
60,"60",
|
||||
65,"65",
|
||||
70,"70",
|
||||
75,"75",
|
||||
80,"80",
|
||||
85,"85",
|
||||
90,"90",
|
||||
95,"95",
|
||||
100,"100",
|
||||
105,"105",
|
||||
110,"110",
|
||||
115,"115",
|
||||
120,"120",
|
||||
125,"125",
|
||||
130,"130",
|
||||
135,"135",
|
||||
140,"140",
|
||||
145,"145",
|
||||
150,"150",
|
||||
155,"155",
|
||||
160,"160",
|
||||
165,"165",
|
||||
170,"170",
|
||||
175,"175",
|
||||
180,"180",
|
||||
185,"185",
|
||||
190,"190",
|
||||
195,"195",
|
||||
200,"200",
|
||||
205,"205",
|
||||
210,"210",
|
||||
215,"215",
|
||||
220,"220",
|
||||
225,"225",
|
||||
230,"230",
|
||||
235,"235",
|
||||
240,"240",
|
||||
245,"245",
|
||||
250,"250",
|
||||
255,"255"
|
||||
};
|
||||
};
|
||||
|
||||
resource rTaggedStrings (MaxStarsFieldStrings) {
|
||||
{
|
||||
15,"15",
|
||||
20,"20",
|
||||
25,"25",
|
||||
30,"30",
|
||||
35,"35",
|
||||
40,"40",
|
||||
45,"45",
|
||||
50,"50",
|
||||
55,"55",
|
||||
60,"60",
|
||||
65,"65",
|
||||
70,"70",
|
||||
75,"75",
|
||||
80,"80",
|
||||
85,"85",
|
||||
90,"90",
|
||||
95,"95",
|
||||
100,"100",
|
||||
105,"105",
|
||||
110,"110",
|
||||
115,"115",
|
||||
120,"120",
|
||||
125,"125",
|
||||
130,"130",
|
||||
135,"135",
|
||||
140,"140",
|
||||
145,"145",
|
||||
150,"150",
|
||||
155,"155",
|
||||
160,"160",
|
||||
165,"165",
|
||||
170,"170",
|
||||
175,"175",
|
||||
180,"180",
|
||||
185,"185",
|
||||
190,"190",
|
||||
195,"195",
|
||||
200,"200",
|
||||
205,"205",
|
||||
210,"210",
|
||||
215,"215",
|
||||
220,"220",
|
||||
225,"225",
|
||||
230,"230",
|
||||
235,"235",
|
||||
240,"240",
|
||||
245,"245",
|
||||
250,"250",
|
||||
255,"255",
|
||||
260,"260",
|
||||
265,"265",
|
||||
270,"270",
|
||||
275,"275",
|
||||
280,"280",
|
||||
285,"285",
|
||||
290,"290",
|
||||
295,"295",
|
||||
300,"300"
|
||||
};
|
||||
};
|
||||
|
||||
resource rTaggedStrings (viewingAngleFieldStrings) {
|
||||
{
|
||||
/* 2,"2",
|
||||
4,"4",
|
||||
8,"8",
|
||||
16,"16",
|
||||
32,"32",
|
||||
64,"64",
|
||||
128,"128", */
|
||||
256,"256",
|
||||
512,"512",
|
||||
1024,"1024",
|
||||
2048,"2048",
|
||||
4096,"4096",
|
||||
8192,"8192",
|
||||
16384,"16384",
|
||||
32768,"32768"/*,
|
||||
32769,"65536",
|
||||
32770,"131072",
|
||||
32771,"262144" // 2 ^ 18 */
|
||||
};
|
||||
};
|
||||
|
||||
resource rTaggedStrings (starSpeedFieldStrings) {
|
||||
{
|
||||
1,"1",
|
||||
2,"2",
|
||||
3,"3",
|
||||
4,"4",
|
||||
5,"5",
|
||||
6,"6",
|
||||
7,"7",
|
||||
8,"8",
|
||||
9,"9",
|
||||
10,"10",
|
||||
11,"11",
|
||||
12,"12",
|
||||
13,"13",
|
||||
14,"14",
|
||||
15,"15"
|
||||
};
|
||||
};
|
202
source/twilight/worms/Worms.Mac
Normal file
202
source/twilight/worms/Worms.Mac
Normal file
@ -0,0 +1,202 @@
|
||||
MACRO
|
||||
&lab _UDivide
|
||||
&lab ldx #$0B0B
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab pullword &SYSOPR
|
||||
&lab ANOP
|
||||
pla
|
||||
AIF C:&SYSOPR=0,.end
|
||||
sta &SYSOPR
|
||||
.end
|
||||
MEND
|
||||
MACRO
|
||||
&lab pushlong &addr,&offset
|
||||
&lab ANOP
|
||||
LCLC &C
|
||||
LCLC &REST
|
||||
&C AMID &addr,1,1
|
||||
AIF "&C"="#",.immediate
|
||||
AIF "&C"="[",.zeropage
|
||||
AIF C:&offset=0,.nooffset
|
||||
AIF "&offset"="s",.stack
|
||||
pushword &addr+2,&offset
|
||||
pushword &addr,&offset
|
||||
MEXIT
|
||||
.nooffset
|
||||
pushword &addr+2
|
||||
pushword &addr
|
||||
MEXIT
|
||||
.immediate
|
||||
&REST AMID &addr,2,L:&addr-1
|
||||
dc I1'$F4',I2'(&REST)|-16'
|
||||
dc I1'$F4',I2'&REST'
|
||||
MEXIT
|
||||
.stack
|
||||
pushword &addr+2,s
|
||||
pushword &addr+2,s
|
||||
MEXIT
|
||||
.zeropage
|
||||
ldy #&offset+2
|
||||
pushword &addr,y
|
||||
ldy #&offset
|
||||
pushword &addr,y
|
||||
MEND
|
||||
MACRO
|
||||
&lab pushword &SYSOPR
|
||||
&lab ANOP
|
||||
AIF C:&SYSOPR=0,.b
|
||||
LCLC &C
|
||||
&C AMID "&SYSOPR",1,1
|
||||
AIF ("&C"="#").AND.(S:LONGA),.immediate
|
||||
lda &SYSOPR
|
||||
pha
|
||||
MEXIT
|
||||
.b
|
||||
pha
|
||||
MEXIT
|
||||
.immediate
|
||||
LCLC &REST
|
||||
LCLA &BL
|
||||
&BL ASEARCH "&SYSOPR"," ",1
|
||||
AIF &BL>0,.a
|
||||
&BL SETA L:&SYSOPR+1
|
||||
.a
|
||||
&REST AMID "&SYSOPR",2,&BL-2
|
||||
dc I1'$F4',I2'&REST'
|
||||
MEND
|
||||
MACRO
|
||||
&lab WordResult
|
||||
&lab phd
|
||||
MEND
|
||||
MACRO
|
||||
&LAB JEQ &BP
|
||||
&LAB BNE *+5
|
||||
BRL &BP
|
||||
MEND
|
||||
MACRO
|
||||
&lab str &string
|
||||
&lab dc i1'L:&string',C'&string'
|
||||
MEND
|
||||
macro
|
||||
&lab QDRect
|
||||
&lab anop
|
||||
&lab._top ds 2
|
||||
&lab._left ds 2
|
||||
&lab._bottom ds 2
|
||||
&lab._right ds 2
|
||||
mend
|
||||
macro
|
||||
&lab ~PaintOval &rectPtr
|
||||
&lab ph4 &rectPtr
|
||||
Tool $5904
|
||||
mend
|
||||
MACRO
|
||||
&LAB JNE &BP
|
||||
&LAB BEQ *+5
|
||||
BRL &BP
|
||||
MEND
|
||||
macro
|
||||
&lab ~GetMasterSCB
|
||||
&lab WordResult
|
||||
Tool $1704
|
||||
mend
|
||||
macro
|
||||
&lab ~Set640Color &color
|
||||
&lab ph2 &color
|
||||
Tool $db04
|
||||
mend
|
||||
MACRO
|
||||
&LAB PH2 &N1
|
||||
LCLC &C
|
||||
&LAB ANOP
|
||||
&C AMID &N1,1,1
|
||||
AIF "&C"="#",.D
|
||||
AIF S:LONGA=1,.A
|
||||
REP #%00100000
|
||||
.A
|
||||
AIF "&C"<>"{",.B
|
||||
&C AMID &N1,L:&N1,1
|
||||
AIF "&C"<>"}",.G
|
||||
&N1 AMID &N1,2,L:&N1-2
|
||||
LDA (&N1)
|
||||
PHA
|
||||
AGO .E
|
||||
.B
|
||||
LDA &N1
|
||||
PHA
|
||||
AGO .E
|
||||
.D
|
||||
&N1 AMID &N1,2,L:&N1-1
|
||||
PEA &N1
|
||||
AGO .F
|
||||
.E
|
||||
AIF S:LONGA=1,.F
|
||||
SEP #%00100000
|
||||
.F
|
||||
MEXIT
|
||||
.G
|
||||
MNOTE "Missing closing '}'",16
|
||||
MEND
|
||||
MACRO
|
||||
&LAB PH4 &N1
|
||||
LCLC &C
|
||||
&LAB ANOP
|
||||
&C AMID &N1,1,1
|
||||
AIF "&C"="#",.D
|
||||
AIF S:LONGA=1,.A
|
||||
REP #%00100000
|
||||
.A
|
||||
AIF "&C"<>"{",.B
|
||||
&C AMID &N1,L:&N1,1
|
||||
AIF "&C"<>"}",.G
|
||||
&N1 AMID &N1,2,L:&N1-2
|
||||
LDY #2
|
||||
LDA (&N1),Y
|
||||
PHA
|
||||
LDA (&N1)
|
||||
PHA
|
||||
AGO .E
|
||||
.B
|
||||
AIF "&C"<>"[",.C
|
||||
LDY #2
|
||||
LDA &N1,Y
|
||||
PHA
|
||||
LDA &N1
|
||||
PHA
|
||||
AGO .E
|
||||
.C
|
||||
LDA &N1+2
|
||||
PHA
|
||||
LDA &N1
|
||||
PHA
|
||||
AGO .E
|
||||
.D
|
||||
&N1 AMID &N1,2,L:&N1-1
|
||||
PEA +(&N1)|-16
|
||||
PEA &N1
|
||||
AGO .F
|
||||
.E
|
||||
AIF S:LONGA=1,.F
|
||||
SEP #%00100000
|
||||
.F
|
||||
MEXIT
|
||||
.G
|
||||
MNOTE "Missing closing '}'",16
|
||||
MEND
|
||||
MACRO
|
||||
&lab _GetSCB
|
||||
&lab ldx #$1304
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _SetSCB
|
||||
&lab ldx #$1204
|
||||
jsl $E10000
|
||||
MEND
|
||||
macro
|
||||
&lab Tool &number
|
||||
&lab ldx #&number
|
||||
jsl $E10000
|
||||
mend
|
26
source/twilight/worms/makefile
Normal file
26
source/twilight/worms/makefile
Normal file
@ -0,0 +1,26 @@
|
||||
|
||||
# Twilight II Worms UNIX MakeFile
|
||||
# by Jim Maricondo
|
||||
# v1.0 - 1/2/93 4:43pm
|
||||
|
||||
# First deal with all the dfork...
|
||||
|
||||
worms.d.root: worms.asm worms.mac 22/t2common.equ 22/dsdb.equ
|
||||
compile +w worms.asm keep=worms.d
|
||||
|
||||
worms.d: worms.d.root 22/random3.a.root
|
||||
link +w worms.d 22:random3.a keep=worms.d
|
||||
|
||||
# Now work with the rfork...
|
||||
|
||||
worms.r: worms.rez 22/t2common.rez
|
||||
compile worms.rez keep=worms.r
|
||||
|
||||
# Now put it together.
|
||||
|
||||
worms: worms.r worms.d
|
||||
duplicate -d worms.d worms
|
||||
duplicate -r worms.r worms
|
||||
setfile -at $4004 -t $bc worms -m .
|
||||
cp worms :jim1:system:cdevs:twilight:worms
|
||||
22:beep
|
331
source/twilight/worms/worms.asm
Normal file
331
source/twilight/worms/worms.asm
Normal file
@ -0,0 +1,331 @@
|
||||
|
||||
*-----------------------------------------------------------------------------*
|
||||
! Twilight II Worms Module. !
|
||||
! !
|
||||
! By Jim Maricondo and Jonah Stich. !
|
||||
! !
|
||||
! Copyright (c) 1991-1993 Jim Maricondo. All rights reserved. !
|
||||
*-----------------------------------------------------------------------------*
|
||||
mcopy worms.mac
|
||||
copy 22:t2common.equ
|
||||
copy 22:dsdb.equ
|
||||
copy 13:ainclude:e16.quickdraw
|
||||
keep worms.d
|
||||
*-----------------------------------------------------------------------------*
|
||||
movePtr gequ <0
|
||||
*-----------------------------------------------------------------------------*
|
||||
Worms Start
|
||||
using WormsDATA
|
||||
kind $1000 ; no special memory
|
||||
|
||||
copy 22:dsdb.asm
|
||||
|
||||
phb
|
||||
phd
|
||||
phk
|
||||
plb
|
||||
|
||||
lda T2Message,s
|
||||
cmp #BlankT2 ;must be BlankT2
|
||||
jne skip
|
||||
|
||||
; ~InitColorTable #wormsPalette
|
||||
; ~SetColorTable #0,#wormsPalette
|
||||
|
||||
lda #0
|
||||
sta T2Result,s
|
||||
sta T2Result+2,s
|
||||
|
||||
PushLong #toT2String
|
||||
jsl init_random
|
||||
|
||||
lda T2data1,s
|
||||
sta movePtr
|
||||
lda T2data1+2,s
|
||||
sta movePtr+2
|
||||
|
||||
ldx #200-1
|
||||
forcePal0 phx
|
||||
phx
|
||||
phd
|
||||
phx
|
||||
_GetSCB
|
||||
pla
|
||||
and #$F0
|
||||
pha
|
||||
_SetSCB
|
||||
plx
|
||||
dex
|
||||
bpl forcePal0
|
||||
|
||||
~GetMasterSCB
|
||||
pla
|
||||
bit #mode640
|
||||
beq on320
|
||||
lda #310
|
||||
sta modeFill0+1
|
||||
lda #330
|
||||
sta modeFill1+1
|
||||
lda #640
|
||||
sta horizFill+1
|
||||
lda #6 ; was 6
|
||||
sta modew
|
||||
asl a
|
||||
sta modew2
|
||||
bra allFilled
|
||||
|
||||
on320 anop
|
||||
lda #155
|
||||
sta modeFill0+1
|
||||
lda #165
|
||||
sta modeFill1+1
|
||||
lda #320
|
||||
sta horizFill+1
|
||||
lda #3
|
||||
sta modew
|
||||
sta modew2
|
||||
|
||||
allFilled anop
|
||||
|
||||
lda #15
|
||||
sta initTop+1
|
||||
lda #25
|
||||
sta initTop2+1
|
||||
|
||||
ldx #0
|
||||
initTop lda #15
|
||||
sta CircRects,x ; top
|
||||
initTop2 lda #25
|
||||
sta CircRects+4,x ; bottom
|
||||
modeFill0 lda #155
|
||||
sta CircRects+2,x ; left
|
||||
modeFill1 lda #165
|
||||
sta CircRects+6,x ; right
|
||||
lda initTop+1
|
||||
clc
|
||||
adc #10
|
||||
sta initTop+1
|
||||
lda initTop2+1
|
||||
clc
|
||||
adc #10
|
||||
sta initTop2+1
|
||||
txa
|
||||
clc
|
||||
adc #8
|
||||
tax
|
||||
cmp #8*16
|
||||
blt initTop
|
||||
|
||||
again anop
|
||||
~Set640Color #0
|
||||
~PaintOval #CircRect1
|
||||
; ~Set640Color #0
|
||||
; ~FrameOval #CircRect1
|
||||
|
||||
~Set640Color #1
|
||||
~PaintOval #CircRect2
|
||||
; ~Set640Color #0
|
||||
; ~FrameOval #CircRect2
|
||||
|
||||
~Set640Color #2
|
||||
~PaintOval #CircRect3
|
||||
; ~Set640Color #0
|
||||
; ~FrameOval #CircRect3
|
||||
|
||||
~Set640Color #3
|
||||
~PaintOval #CircRect4
|
||||
; ~Set640Color #0
|
||||
; ~FrameOval #CircRect4
|
||||
|
||||
~Set640Color #4
|
||||
~PaintOval #CircRect5
|
||||
; ~Set640Color #0
|
||||
; ~FrameOval #CircRect5
|
||||
|
||||
~Set640Color #5
|
||||
~PaintOval #CircRect6
|
||||
; ~Set640Color #0
|
||||
; ~FrameOval #CircRect6
|
||||
|
||||
~Set640Color #6
|
||||
~PaintOval #CircRect7
|
||||
; ~Set640Color #0
|
||||
; ~FrameOval #CircRect7
|
||||
|
||||
~Set640Color #7
|
||||
~PaintOval #CircRect8
|
||||
; ~Set640Color #0
|
||||
; ~FrameOval #CircRect8
|
||||
|
||||
~Set640Color #8
|
||||
~PaintOval #CircRect9
|
||||
|
||||
~Set640Color #9
|
||||
~PaintOval #CircRect10
|
||||
|
||||
~Set640Color #10
|
||||
~PaintOval #CircRect11
|
||||
|
||||
~Set640Color #11
|
||||
~PaintOval #CircRect12
|
||||
|
||||
~Set640Color #12
|
||||
~PaintOval #CircRect13
|
||||
|
||||
~Set640Color #13
|
||||
~PaintOval #CircRect14
|
||||
|
||||
~Set640Color #14
|
||||
~PaintOval #CircRect15
|
||||
|
||||
~Set640Color #15
|
||||
~PaintOval #CircRect16
|
||||
|
||||
ldx #0
|
||||
bigLoop phx
|
||||
|
||||
WordResult
|
||||
WordResult
|
||||
jsl random
|
||||
pha
|
||||
PushWord #3
|
||||
_UDivide
|
||||
pla
|
||||
PullWord XInc
|
||||
|
||||
WordResult
|
||||
WordResult
|
||||
jsl random
|
||||
pha
|
||||
PushWord #3
|
||||
_UDivide
|
||||
pla
|
||||
PullWord YInc
|
||||
|
||||
plx
|
||||
|
||||
lda YInc
|
||||
; cmp #0
|
||||
bne tryDown
|
||||
lda CircRects,x
|
||||
sec
|
||||
sbc modew ;#3
|
||||
; bmi doHoriz
|
||||
bpl doUp ;neu
|
||||
cmp #-2 ;neu
|
||||
blt doHoriz ;neu
|
||||
doUp sta CircRects,x
|
||||
lda CircRects+4,x
|
||||
sec
|
||||
sbc modew
|
||||
sta CircRects+4,x
|
||||
bra doHoriz
|
||||
|
||||
tryDown cmp #1
|
||||
bne doHoriz
|
||||
lda CircRects,x
|
||||
clc
|
||||
adc modew
|
||||
cmp #200
|
||||
bge doHoriz
|
||||
sta CircRects,x
|
||||
lda CircRects+4,x
|
||||
clc
|
||||
adc modew
|
||||
sta CircRects+4,x
|
||||
|
||||
doHoriz lda XInc
|
||||
; cmp #0
|
||||
bne tryRight
|
||||
lda CircRects+2,x
|
||||
sec
|
||||
sbc modew2
|
||||
; bmi doneCirc
|
||||
bpl doLeft ; neu
|
||||
cmp #-2 ;neu
|
||||
blt doneCirc ;neu - should it be try Right?
|
||||
doLeft sta CircRects+2,x
|
||||
lda CircRects+6,x
|
||||
sec
|
||||
sbc modew2
|
||||
sta CircRects+6,x
|
||||
bra doneCirc
|
||||
|
||||
tryRight cmp #1
|
||||
bne doneCirc
|
||||
lda CircRects+2,x
|
||||
clc
|
||||
adc modew2
|
||||
horizFill cmp #320
|
||||
bge doneCirc
|
||||
sta CircRects+2,x
|
||||
lda CircRects+6,x
|
||||
clc
|
||||
adc modew2
|
||||
sta CircRects+6,x
|
||||
|
||||
doneCirc txa
|
||||
clc
|
||||
adc #8
|
||||
cmp #8*16
|
||||
bge doneLoop
|
||||
tax
|
||||
brl bigLoop
|
||||
|
||||
doneLoop lda [movePtr]
|
||||
jeq again
|
||||
|
||||
; brk
|
||||
|
||||
skip anop
|
||||
pld
|
||||
plb
|
||||
lda 2,s
|
||||
sta 2+10,s
|
||||
lda 1,s
|
||||
sta 1+10,s
|
||||
tsc Remove input paramaters
|
||||
clc
|
||||
adc #10
|
||||
tcs
|
||||
clc
|
||||
rtl
|
||||
|
||||
End
|
||||
*-----------------------------------------------------------------------------*
|
||||
WormsDATA Data
|
||||
; kind $1000 ; no special memory
|
||||
|
||||
CircRects anop
|
||||
CircRect1 QDRect
|
||||
CircRect2 QDRect
|
||||
CircRect3 QDRect
|
||||
CircRect4 QDRect
|
||||
CircRect5 QDRect
|
||||
CircRect6 QDRect
|
||||
CircRect7 QDRect
|
||||
CircRect8 QDRect
|
||||
CircRect9 QDRect
|
||||
CircRect10 QDRect
|
||||
CircRect11 QDRect
|
||||
CircRect12 QDRect
|
||||
CircRect13 QDRect
|
||||
CircRect14 QDRect
|
||||
CircRect15 QDRect
|
||||
CircRect16 QDRect
|
||||
|
||||
XInc ds 2
|
||||
YInc ds 2
|
||||
|
||||
;wormsPalette ds 32
|
||||
|
||||
;ColorTable dc i'$000,$777,$841,$72C,$00f,$080,$f70,$d00,$fa9,$ff0,$0e0'
|
||||
; dc i'$4df,$DAF,$78f,$CCC,$fff'
|
||||
|
||||
modew ds 2 ;3 for 320, 6 for 640
|
||||
modew2 ds 2 ;3 for 320, 12 for 640
|
||||
|
||||
toT2String str 'DYA~Twilight II~'
|
||||
|
||||
End
|
||||
*-----------------------------------------------------------------------------*
|
83
source/twilight/worms/worms.rez
Normal file
83
source/twilight/worms/worms.rez
Normal file
@ -0,0 +1,83 @@
|
||||
|
||||
#include "types.rez"
|
||||
#include "22:t2common.rez"
|
||||
|
||||
resource rT2ModuleFlags (moduleFlags) {
|
||||
fLeavesUsableScreen+fReqUsableScreen, // module flags word
|
||||
$01, // enabled flag (unimplemented)
|
||||
$0110, // minimum T2 version required
|
||||
NIL, // reserved
|
||||
"Worms" // module name
|
||||
};
|
||||
|
||||
// --- About text resource
|
||||
|
||||
resource rTextForLETextBox2 (moduleMessage) {
|
||||
TBLeftJust
|
||||
TBBackColor TBColorF
|
||||
TBForeColor TBColor4
|
||||
"Worms"
|
||||
TBForeColor TBColor1
|
||||
" draws multicolored, circular bodied worms across all parts of your "
|
||||
"screen, leaving their trails behind."
|
||||
};
|
||||
|
||||
// --- Version resource
|
||||
|
||||
resource rVersion (moduleVersion) {
|
||||
{1,0,0,release,0}, // Version
|
||||
verUS, // US Version
|
||||
"T2 Worms Module", // program's name
|
||||
"By J. Maricondo and Stich.\n"
|
||||
"Copyright 1991-93, Jim Maricondo." // copyright notice
|
||||
};
|
||||
|
||||
// --- About icon resource
|
||||
|
||||
resource rIcon (moduleIcon) {
|
||||
$8000, // kind
|
||||
$0014, // height
|
||||
$001C, // width
|
||||
|
||||
$"FFF0000000000000000000000FFF"
|
||||
$"FFF0FFFFFFFFFFFFFFFFFFFF0FFF"
|
||||
$"FFF0F000000000000000000F0FFF"
|
||||
$"FFF0F000800000800000800F0FFF"
|
||||
$"FFF0F008000008000008000F0FFF"
|
||||
$"FFF0F008002008002008000F0FFF"
|
||||
$"FFF0F000800800800800800F0FFF"
|
||||
$"FFF0F000800800800800800F0FFF"
|
||||
$"FFF0F002008002008002000F0FFF"
|
||||
$"FFF0F000008000008000000F0FFF"
|
||||
$"FFF0F000000800000800000F0FFF"
|
||||
$"FFF0F000000000000000000F0FFF"
|
||||
$"FFF0FFFFFFFFFFFFFFFFAFFF0FFF"
|
||||
$"FFF0000000000000000000000FFF"
|
||||
$"FFFF0FFFFFFFFFFFFFFFFFF0FFFF"
|
||||
$"FFFF0FFFFFFFFFFFFFFFFFF0FFFF"
|
||||
$"FFFF0FF4AFFFFFFFFFFFFFF0FFFF"
|
||||
$"FFFF0CCCCCCCCCCCCCCCCCC0FFFF"
|
||||
$"FFFF0FFFFFFFFFFFFFFFAFF0FFFF"
|
||||
$"FFFF00000000000000000000FFFF",
|
||||
|
||||
$"000FFFFFFFFFFFFFFFFFFFFFF000"
|
||||
$"000FFFFFFFFFFFFFFFFFFFFFF000"
|
||||
$"000FFFFFFFFFFFFFFFFFFFFFF000"
|
||||
$"000FFFFFFFFFFFFFFFFFFFFFF000"
|
||||
$"000FFFFFFFFFFFFFFFFFFFFFF000"
|
||||
$"000FFFFFFFFFFFFFFFFFFFFFF000"
|
||||
$"000FFFFFFFFFFFFFFFFFFFFFF000"
|
||||
$"000FFFFFFFFFFFFFFFFFFFFFF000"
|
||||
$"000FFFFFFFFFFFFFFFFFFFFFF000"
|
||||
$"000FFFFFFFFFFFFFFFFFFFFFF000"
|
||||
$"000FFFFFFFFFFFFFFFFFFFFFF000"
|
||||
$"000FFFFFFFFFFFFFFFFFFFFFF000"
|
||||
$"000FFFFFFFFFFFFFFFFFFFFFF000"
|
||||
$"0000FFFFFFFFFFFFFFFFFFFF0000"
|
||||
$"0000FFFFFFFFFFFFFFFFFFFF0000"
|
||||
$"0000FFFFFFFFFFFFFFFFFFFF0000"
|
||||
$"0000FFFFFFFFFFFFFFFFFFFF0000"
|
||||
$"0000FFFFFFFFFFFFFFFFFFFF0000"
|
||||
$"0000FFFFFFFFFFFFFFFFFFFF0000"
|
||||
$"0000FFFFFFFFFFFFFFFFFFFF0000";
|
||||
};
|
BIN
source/twilight/ydi/Blank.Atf
Normal file
BIN
source/twilight/ydi/Blank.Atf
Normal file
Binary file not shown.
BIN
source/twilight/ydi/Disk.EATF
Normal file
BIN
source/twilight/ydi/Disk.EATF
Normal file
Binary file not shown.
614
source/twilight/ydi/Ydi.Mac
Normal file
614
source/twilight/ydi/Ydi.Mac
Normal file
@ -0,0 +1,614 @@
|
||||
MACRO
|
||||
&lab _SetCurResourceFile
|
||||
&lab ldx #$111E
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab pulllong &addr1,&addr2
|
||||
&lab ANOP
|
||||
AIF C:&addr1=0,.a
|
||||
AIF C:&addr2=0,.b
|
||||
LCLC &C
|
||||
&C AMID &addr1,1,1
|
||||
AIF "&C"="[",.zeropage
|
||||
pullword &addr1
|
||||
sta &addr2
|
||||
pullword &addr1+2
|
||||
sta &addr2+2
|
||||
MEXIT
|
||||
.a
|
||||
pullword
|
||||
pullword
|
||||
MEXIT
|
||||
.b
|
||||
pullword &addr1
|
||||
pullword &addr1+2
|
||||
MEXIT
|
||||
.zeropage
|
||||
ldy #&addr2
|
||||
pullword &addr1,y
|
||||
ldy #&addr2+2
|
||||
pullword &addr1,y
|
||||
MEND
|
||||
MACRO
|
||||
&lab pullword &SYSOPR
|
||||
&lab ANOP
|
||||
pla
|
||||
AIF C:&SYSOPR=0,.end
|
||||
sta &SYSOPR
|
||||
.end
|
||||
MEND
|
||||
MACRO
|
||||
&lab pushlong &addr,&offset
|
||||
&lab ANOP
|
||||
LCLC &C
|
||||
LCLC &REST
|
||||
&C AMID &addr,1,1
|
||||
AIF "&C"="#",.immediate
|
||||
AIF "&C"="[",.zeropage
|
||||
AIF C:&offset=0,.nooffset
|
||||
AIF "&offset"="s",.stack
|
||||
pushword &addr+2,&offset
|
||||
pushword &addr,&offset
|
||||
MEXIT
|
||||
.nooffset
|
||||
pushword &addr+2
|
||||
pushword &addr
|
||||
MEXIT
|
||||
.immediate
|
||||
&REST AMID &addr,2,L:&addr-1
|
||||
dc I1'$F4',I2'(&REST)|-16'
|
||||
dc I1'$F4',I2'&REST'
|
||||
MEXIT
|
||||
.stack
|
||||
pushword &addr+2,s
|
||||
pushword &addr+2,s
|
||||
MEXIT
|
||||
.zeropage
|
||||
ldy #&offset+2
|
||||
pushword &addr,y
|
||||
ldy #&offset
|
||||
pushword &addr,y
|
||||
MEND
|
||||
MACRO
|
||||
&lab pushword &SYSOPR
|
||||
&lab ANOP
|
||||
AIF C:&SYSOPR=0,.b
|
||||
LCLC &C
|
||||
&C AMID "&SYSOPR",1,1
|
||||
AIF ("&C"="#").AND.(S:LONGA),.immediate
|
||||
lda &SYSOPR
|
||||
pha
|
||||
MEXIT
|
||||
.b
|
||||
pha
|
||||
MEXIT
|
||||
.immediate
|
||||
LCLC &REST
|
||||
LCLA &BL
|
||||
&BL ASEARCH "&SYSOPR"," ",1
|
||||
AIF &BL>0,.a
|
||||
&BL SETA L:&SYSOPR+1
|
||||
.a
|
||||
&REST AMID "&SYSOPR",2,&BL-2
|
||||
dc I1'$F4',I2'&REST'
|
||||
MEND
|
||||
MACRO
|
||||
&lab str &string
|
||||
&lab dc i1'L:&string',C'&string'
|
||||
MEND
|
||||
MACRO
|
||||
DefineStack
|
||||
GBLA &DummyPC
|
||||
&DummyPC SETA 1
|
||||
MEND
|
||||
MACRO
|
||||
&lab BYTE
|
||||
&lab equ &DummyPC
|
||||
&DummyPC SETA &DummyPC+1
|
||||
MEND
|
||||
MACRO
|
||||
&lab WORD
|
||||
&lab equ &DummyPC
|
||||
&DummyPC SETA &DummyPC+2
|
||||
MEXIT
|
||||
MEND
|
||||
MACRO
|
||||
&lab LONG
|
||||
&lab equ &DummyPC
|
||||
&DummyPC SETA &DummyPC+4
|
||||
MEND
|
||||
MACRO
|
||||
&lab BLOCK &Value
|
||||
AIF C:&lab=0,.skiplab
|
||||
&lab equ &DummyPC
|
||||
.skiplab
|
||||
&DummyPC SETA &DummyPC+&Value
|
||||
MEND
|
||||
MACRO
|
||||
&lab longresult
|
||||
&lab phd
|
||||
phd
|
||||
MEND
|
||||
MACRO
|
||||
&lab _SFShutDown
|
||||
&lab ldx #$0317
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab GSStr &GSstring
|
||||
&lab dc i2'L:&GSstring',C'&GSstring'
|
||||
MEND
|
||||
MACRO
|
||||
&lab _DisposeControl
|
||||
&lab ldx #$0A10
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _HideControl
|
||||
&lab ldx #$0E10
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _NewControl2
|
||||
&lab ldx #$3110
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _PtrToHand
|
||||
&lab ldx #$2802
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _SetHandleSize
|
||||
&lab ldx #$1902
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _SFGetFile2
|
||||
&lab ldx #$0E17
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _SFStartUp
|
||||
&lab ldx #$0217
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _CompileText
|
||||
&lab ldx #$600E
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _AddResource
|
||||
&lab ldx #$0C1E
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _DetachResource
|
||||
&lab ldx #$181E
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _RemoveResource
|
||||
&lab ldx #$0F1E
|
||||
jsl $E10000
|
||||
MEND
|
||||
macro
|
||||
&lab ~GetCtlHandleFromID &ctlWindowPtr,&ctlID
|
||||
&lab LongResult
|
||||
ph4 &ctlWindowPtr
|
||||
ph4 &ctlID
|
||||
Tool $3010
|
||||
mend
|
||||
macro
|
||||
&lab ~DisposeHandle &theHandle
|
||||
&lab ph4 &theHandle
|
||||
Tool $1002
|
||||
mend
|
||||
macro
|
||||
&lab ~GetHandleSize &theHandle
|
||||
&lab LongResult
|
||||
ph4 &theHandle
|
||||
Tool $1802
|
||||
mend
|
||||
macro
|
||||
&lab ~HLock &theHandle
|
||||
&lab ph4 &theHandle
|
||||
Tool $2002
|
||||
mend
|
||||
macro
|
||||
&lab ~NewHandle &blockSize,&userID,&attributes,&locationPtr
|
||||
&lab LongResult
|
||||
ph4 &blockSize
|
||||
ph2 &userID
|
||||
ph2 &attributes
|
||||
ph4 &locationPtr
|
||||
Tool $0902
|
||||
mend
|
||||
macro
|
||||
&lab ~GetCurResourceFile
|
||||
&lab WordResult
|
||||
Tool $121E
|
||||
mend
|
||||
macro
|
||||
&lab ~LoadResource &resourceType,&resourceID
|
||||
&lab LongResult
|
||||
ph2 &resourceType
|
||||
ph4 &resourceID
|
||||
Tool $0E1E
|
||||
mend
|
||||
macro
|
||||
&lab ~ReleaseResource &purgeLevel,&resourceType,&resourceID
|
||||
&lab ph2 &purgeLevel
|
||||
ph2 &resourceType
|
||||
ph4 &resourceID
|
||||
Tool $171E
|
||||
mend
|
||||
macro
|
||||
&lab ~SetCurResourceFile &fileID
|
||||
&lab ph2 &fileID
|
||||
Tool $111E
|
||||
mend
|
||||
macro
|
||||
&lab ~UniqueResourceID &IDRange,&resourceType
|
||||
&lab LongResult
|
||||
ph2 &IDRange
|
||||
ph2 &resourceType
|
||||
Tool $191E
|
||||
mend
|
||||
macro
|
||||
&lab ~UpdateResourceFile &fileID
|
||||
&lab ph2 &fileID
|
||||
Tool $0D1E
|
||||
mend
|
||||
macro
|
||||
&lab ~SFStatus
|
||||
&lab WordResult 0
|
||||
Tool $0617
|
||||
mend
|
||||
macro
|
||||
&lab ~LoadOneTool &toolNumber,&minVersion
|
||||
&lab ph2 &toolNumber
|
||||
ph2 &minVersion
|
||||
Tool $0F01
|
||||
mend
|
||||
macro
|
||||
&lab Tool &number
|
||||
&lab ldx #&number
|
||||
jsl $E10000
|
||||
mend
|
||||
macro
|
||||
&lab ph2 &addr,&offset
|
||||
&lab anop
|
||||
lclc &char
|
||||
&char amid "&addr",1,1
|
||||
aif "&char"="@",.accumulator
|
||||
aif "&char"="*",.smartmacros
|
||||
aif "&char"="#",.immediate
|
||||
aif "&char"="<",.directPage
|
||||
aif "&char"="[",.zeropage
|
||||
aif C:&offset=0,.nooffset
|
||||
aif "&offset"="s",.stack
|
||||
lda &addr,&offset
|
||||
pha
|
||||
mexit
|
||||
.nooffset
|
||||
lda &addr
|
||||
pha
|
||||
mexit
|
||||
.stack
|
||||
lda &addr,s
|
||||
pha
|
||||
mexit
|
||||
.smartmacros
|
||||
mexit
|
||||
.accumulator
|
||||
pha
|
||||
mexit
|
||||
.directPage
|
||||
&addr amid &addr,2,L:&addr-1
|
||||
pei &addr
|
||||
mexit
|
||||
.immediate
|
||||
&addr amid &addr,2,L:&addr-1
|
||||
pea &addr
|
||||
mexit
|
||||
.zeropage
|
||||
aif C:&offset<>0,.zeroPageOff
|
||||
lda &addr
|
||||
pha
|
||||
mexit
|
||||
.zeroPageOff
|
||||
aif "&offset"="X",.zeroPageReg
|
||||
aif "&offset"="Y",.zeroPageReg
|
||||
aif "&offset"="x",.zeroPageReg
|
||||
aif "&offset"="y",.zeroPageReg
|
||||
ldy #&offset
|
||||
lda &addr,y
|
||||
pha
|
||||
mexit
|
||||
.zeroPageReg
|
||||
lda &addr,&offset
|
||||
pha
|
||||
mend
|
||||
macro
|
||||
&lab ph4 &addr,&offset
|
||||
&lab anop
|
||||
lclc &char
|
||||
&char amid &addr,1,1
|
||||
aif "&char"="@",.registers
|
||||
aif "&char"="*",.smartmacros
|
||||
aif "&char"="#",.immediate
|
||||
aif "&char"="<",.directPage
|
||||
aif "&char"="[",.zeropage
|
||||
aif c:&offset=0,.nooffset
|
||||
aif "&offset"="s",.stack
|
||||
.yesoffset
|
||||
lda &addr+2,&offset
|
||||
pha
|
||||
lda &addr,&offset
|
||||
pha
|
||||
mexit
|
||||
.nooffset
|
||||
lda &addr+2
|
||||
pha
|
||||
lda &addr
|
||||
pha
|
||||
mexit
|
||||
.stack
|
||||
lda &addr+2,s
|
||||
pha
|
||||
lda &addr,s
|
||||
pha
|
||||
mexit
|
||||
.registers
|
||||
phy
|
||||
phx
|
||||
mexit
|
||||
.smartmacros
|
||||
mexit
|
||||
.immediate
|
||||
&addr amid &addr,2,L:&addr-1
|
||||
pea +(&addr)|-16
|
||||
pea &addr
|
||||
mexit
|
||||
.directPage
|
||||
&addr amid &addr,2,L:&addr-1
|
||||
pei &addr+2
|
||||
pei &addr
|
||||
mexit
|
||||
.zeroPage
|
||||
aif C:&offset<>0,.zeroPageOffset
|
||||
ldy #2
|
||||
lda &addr,y
|
||||
pha
|
||||
lda &addr
|
||||
pha
|
||||
mexit
|
||||
.zeroPageOffset
|
||||
aif "&offset"="X",.zeroPageRegX
|
||||
aif "&offset"="Y",.zeroPageRegY
|
||||
aif "&offset"="x",.zeroPageRegX
|
||||
aif "&offset"="y",.zeroPageRegY
|
||||
ldy #&offset+2
|
||||
lda &addr,y
|
||||
pha
|
||||
ldy #&offset
|
||||
lda &addr,y
|
||||
pha
|
||||
mexit
|
||||
.zeroPageRegX
|
||||
lda &addr,&offset
|
||||
tay
|
||||
inx
|
||||
inx
|
||||
lda &addr,&offset
|
||||
pha
|
||||
phy
|
||||
mexit
|
||||
.zeroPageRegY
|
||||
lda &addr,&offset
|
||||
tax
|
||||
iny
|
||||
iny
|
||||
lda &addr,&offset
|
||||
pha
|
||||
phx
|
||||
mend
|
||||
MACRO
|
||||
&lab killLdp
|
||||
&lab pld
|
||||
ply
|
||||
ply
|
||||
MEND
|
||||
MACRO
|
||||
&lab makeDP
|
||||
&lab phd
|
||||
tsc
|
||||
tcd
|
||||
MEND
|
||||
macro
|
||||
&lab WordResult &zero
|
||||
&lab anop
|
||||
aif c:&zeros=1,.zero
|
||||
phd
|
||||
mexit
|
||||
.zero
|
||||
&lab pea $0000
|
||||
mend
|
||||
MACRO
|
||||
&lab Debug &string
|
||||
aif t:debugSymbols="G",.begin
|
||||
mexit
|
||||
.begin
|
||||
dc i1'$82'
|
||||
dc i2'(L:&string)+3'
|
||||
dc i2'$7771'
|
||||
dc i1'L:&string',C'&string'
|
||||
MEND
|
||||
macro
|
||||
&lab ~RMLoadNamedResource &rType,&namePtr
|
||||
&lab LongResult
|
||||
PushWord &rType
|
||||
PushLong &namePtr
|
||||
Tool $2C1E
|
||||
mend
|
||||
macro
|
||||
&lab ~RMFindNamedResource &rType,&namePtr,&fileNumPtr
|
||||
&lab LongResult
|
||||
PushWord &rType
|
||||
PushLong &namePtr
|
||||
PushLong &fileNumPtr
|
||||
Tool $2A1E
|
||||
mend
|
||||
MACRO
|
||||
&lab _RMSetResourceName
|
||||
&lab ldx #$2D1E
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _CloseGS ¶ms
|
||||
&lab jsl $E100A8
|
||||
dc i2"$2014"
|
||||
dc i4"¶ms"
|
||||
MEND
|
||||
MACRO
|
||||
&lab _OpenGS ¶ms
|
||||
&lab jsl $E100A8
|
||||
dc i2"$2010"
|
||||
dc i4"¶ms"
|
||||
MEND
|
||||
MACRO
|
||||
&lab _ReadGS ¶ms
|
||||
&lab jsl $E100A8
|
||||
dc i2"$2012"
|
||||
dc i4"¶ms"
|
||||
MEND
|
||||
MACRO
|
||||
&lab _Multiply
|
||||
&lab ldx #$090B
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _NewHandle
|
||||
&lab ldx #$0902
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _UnPackBytes
|
||||
&lab ldx #$2703
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&LAB JEQ &BP
|
||||
&LAB BNE *+5
|
||||
BRL &BP
|
||||
MEND
|
||||
MACRO
|
||||
&LAB JNE &BP
|
||||
&LAB BEQ *+5
|
||||
BRL &BP
|
||||
MEND
|
||||
MACRO
|
||||
&lab longm
|
||||
&lab ANOP
|
||||
rep #%00100000
|
||||
longa on
|
||||
MEND
|
||||
MACRO
|
||||
&lab shortm
|
||||
&lab ANOP
|
||||
sep #%00100000
|
||||
longa off
|
||||
MEND
|
||||
macro
|
||||
&lab ~HUnlock &theHandle
|
||||
&lab ph4 &theHandle
|
||||
Tool $2202
|
||||
mend
|
||||
macro
|
||||
&lab ~GetAddress &tableID
|
||||
&lab LongResult
|
||||
ph2 &tableID
|
||||
Tool $0904
|
||||
mend
|
||||
macro
|
||||
&lab ~UnloadOneTool &toolNumber
|
||||
&lab ph2 &toolNumber
|
||||
Tool $1001
|
||||
mend
|
||||
macro
|
||||
&lab ~HexIt &intValue
|
||||
&lab LongResult
|
||||
ph2 &intValue
|
||||
Tool $2A0B
|
||||
mend
|
||||
MACRO
|
||||
&lab _SetHandleId
|
||||
&lab ldx #$3002
|
||||
jsl $E10000
|
||||
MEND
|
||||
macro
|
||||
&lab ~GetCurResourceApp
|
||||
&lab wordresult
|
||||
Tool $141E
|
||||
mend
|
||||
macro
|
||||
&lab handle
|
||||
&lab ds 4
|
||||
mend
|
||||
macro
|
||||
&lab ~AlertWindow &alertFlags,&subStrPtr,&alertStrRef
|
||||
&lab WordResult
|
||||
ph2 &alertFlags
|
||||
ph4 &subStrPtr
|
||||
ph4 &alertStrRef
|
||||
Tool $590E
|
||||
mend
|
||||
macro
|
||||
&lab ~InitCursor
|
||||
&lab Tool $CA04
|
||||
mend
|
||||
MACRO
|
||||
&lab _HexIt
|
||||
&lab ldx #$2A0B
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _GetPrefixGS ¶ms
|
||||
&lab jsl $E100A8
|
||||
dc i2"$200A"
|
||||
dc i4"¶ms"
|
||||
MEND
|
||||
MACRO
|
||||
&lab _SetPrefixGS ¶ms
|
||||
&lab jsl $E100A8
|
||||
dc i2"$2009"
|
||||
dc i4"¶ms"
|
||||
MEND
|
||||
macro
|
||||
&lab ~SetHandleSize &newSize,&theHandle
|
||||
&lab ph4 &newSize
|
||||
ph4 &theHandle
|
||||
Tool $1902
|
||||
mend
|
||||
macro
|
||||
&lab PrefixRecGS ¶meters
|
||||
lcla &pCount
|
||||
&pCount seta c:¶meters
|
||||
&lab anop
|
||||
&lab._pCount dc i2'&pCount'
|
||||
&lab._prefixNum dc i2'¶meters(1)'
|
||||
&lab._prefix dc i4'¶meters(2)'
|
||||
mend
|
||||
MACRO
|
||||
&lab _HLock
|
||||
&lab ldx #$2002
|
||||
jsl $E10000
|
||||
MEND
|
||||
macro
|
||||
&lab ~MMStartUp
|
||||
&lab WordResult
|
||||
Tool $0202
|
||||
mend
|
BIN
source/twilight/ydi/blank.eatf.c
Normal file
BIN
source/twilight/ydi/blank.eatf.c
Normal file
Binary file not shown.
118
source/twilight/ydi/fileicons.rez
Normal file
118
source/twilight/ydi/fileicons.rez
Normal file
@ -0,0 +1,118 @@
|
||||
|
||||
#include "types.rez"
|
||||
|
||||
resource rIcon (1) {
|
||||
$8000,
|
||||
$0008,
|
||||
$0008,
|
||||
$"FFFFC00F"
|
||||
$"FFFC051F"
|
||||
$"0000451F"
|
||||
$"08E6451F"
|
||||
$"08E6451F"
|
||||
$"0000451F"
|
||||
$"FFFC051F"
|
||||
$"FFFFC00F",
|
||||
|
||||
$"0000FFF0"
|
||||
$"000FFFF0"
|
||||
$"FFFFFFF0"
|
||||
$"FFFFFFF0"
|
||||
$"FFFFFFF0"
|
||||
$"FFFFFFF0"
|
||||
$"000FFFF0"
|
||||
$"0000FFF0";
|
||||
};
|
||||
|
||||
resource rIcon (2) {
|
||||
$0000,
|
||||
$0008,
|
||||
$0008,
|
||||
$"FFFFFFFF"
|
||||
$"F000FFFF"
|
||||
$"0EEE0000"
|
||||
$"0EEEEEE0"
|
||||
$"0EEEEEE0"
|
||||
$"0EEEEEE0"
|
||||
$"00000000"
|
||||
$"FFFFFFFF",
|
||||
$"00000000"
|
||||
$"0FFF0000"
|
||||
$"FFFFFFFF"
|
||||
$"FFFFFFFF"
|
||||
$"FFFFFFFF"
|
||||
$"FFFFFFFF"
|
||||
$"FFFFFFFF"
|
||||
$"00000000";
|
||||
};
|
||||
|
||||
resource rIcon (3) {
|
||||
$8000,
|
||||
$0008,
|
||||
$0008,
|
||||
$"0000000F"
|
||||
$"0F00F0F0"
|
||||
$"0F00F000"
|
||||
$"0F33FFF0"
|
||||
$"0F44FFF0"
|
||||
$"0FC44430"
|
||||
$"0FFFFFF0"
|
||||
$"00000000",
|
||||
$"FFFFFFF0"
|
||||
$"FFFFFFFF"
|
||||
$"FFFFFFFF"
|
||||
$"FFFFFFFF"
|
||||
$"FFFFFFFF"
|
||||
$"FFFFFFFF"
|
||||
$"FFFFFFFF"
|
||||
$"FFFFFFFF";
|
||||
};
|
||||
|
||||
resource rIcon (4) {
|
||||
$8000,
|
||||
$0008,
|
||||
$0008,
|
||||
$"0000000F"
|
||||
$"0FFFF0F0"
|
||||
$"0F1FF000"
|
||||
$"0FFFFFF0"
|
||||
$"0F1F1FF0"
|
||||
$"0F1F1FF0"
|
||||
$"0FFFFFF0"
|
||||
$"00000000",
|
||||
$"FFFFFFF0"
|
||||
$"FFFFFFFF"
|
||||
$"FFFFFFFF"
|
||||
$"FFFFFFFF"
|
||||
$"FFFFFFFF"
|
||||
$"FFFFFFFF"
|
||||
$"FFFFFFFF"
|
||||
$"FFFFFFFF";
|
||||
};
|
||||
|
||||
resource rIcon (5) {
|
||||
|
||||
$8000,
|
||||
$0009,
|
||||
$0008,
|
||||
|
||||
$"00000000"
|
||||
$"0FFFFFF0"
|
||||
$"0F1144F0"
|
||||
$"0F11EEF0"
|
||||
$"0FBBEEF0"
|
||||
$"0FFFFFF0"
|
||||
$"00000000"
|
||||
$"F0FFFF0F"
|
||||
$"F000000F",
|
||||
|
||||
$"FFFFFFFF"
|
||||
$"FFFFFFFF"
|
||||
$"FFFFFFFF"
|
||||
$"FFFFFFFF"
|
||||
$"FFFFFFFF"
|
||||
$"FFFFFFFF"
|
||||
$"FFFFFFFF"
|
||||
$"0FFFFFF0"
|
||||
$"0FFFFFF0";
|
||||
};
|
28
source/twilight/ydi/makefile
Normal file
28
source/twilight/ydi/makefile
Normal file
@ -0,0 +1,28 @@
|
||||
|
||||
# Twilight II YouDrawIt UNIX MakeFile
|
||||
# by Jim Maricondo
|
||||
# v1.0 - 11/28/92 9:47pm
|
||||
# v1.1 - 12/30/92 4:23pm
|
||||
# v1.2 - 1/1/93 3:09pm
|
||||
|
||||
# First deal with all the dfork...
|
||||
|
||||
ydi.d.root: ydi.asm ydi.equ 22/t2common.equ 22/dsdb.equ 22/makepdp.asm
|
||||
compile +w ydi.asm keep=ydi.d
|
||||
|
||||
ydi.d: ydi.d.root
|
||||
link +w ydi.d keep=ydi.d
|
||||
|
||||
# Now work with the rfork...
|
||||
|
||||
ydi.r: ydi.rez 22/t2common.rez
|
||||
compile ydi.rez keep=ydi.r
|
||||
|
||||
# Now put it together.
|
||||
|
||||
youdrawit: ydi.r ydi.d
|
||||
duplicate -d ydi.d youdrawit
|
||||
duplicate -r ydi.r youdrawit
|
||||
setfile -at $4004 -t $bc youdrawit -m .
|
||||
cp youdrawit :jim1:system:cdevs:twilight:youdrawit
|
||||
22:beep
|
49
source/twilight/ydi/makey
Normal file
49
source/twilight/ydi/makey
Normal file
@ -0,0 +1,49 @@
|
||||
|
||||
echo "### YouDrawIt! Make v1.0, 24 May 1992 Jim Maricondo."
|
||||
|
||||
if {#} == 0
|
||||
echo "### Ydi:Make - Error - Bad input parameters!"
|
||||
|
||||
else if {1} == d
|
||||
echo "### Ydi:Make - Compiling and linking YouDrawIt! Module."
|
||||
asml +w ydi.asm
|
||||
echo "### Ydi:Make - Module compiled and linked."
|
||||
|
||||
echo "### Ydi:Make - Building Module.."
|
||||
copy -f ydi.d ydi
|
||||
echo "### Ydi:Make - Setting filetype."
|
||||
filetype ydi $bc $4004
|
||||
echo "### Ydi:Make - Built. Now copying to Twilight folder..."
|
||||
copy -c ydi :jim1:system:cdevs:twilight:ydi
|
||||
|
||||
else if {1} == r
|
||||
echo "### Ydi:Make - Compiling ydi resources."
|
||||
compile ydi.rez keep=ydi.r
|
||||
echo "### Ydi:Make - Module resources built."
|
||||
|
||||
echo "### Ydi:Make - Building Module.."
|
||||
copy -r ydi.r ydi
|
||||
echo "### Ydi:Make - Setting filetype."
|
||||
filetype ydi $bc $4004
|
||||
echo "### Ydi:Make - Built. Now copying to Twilight folder..."
|
||||
copy -c ydi :jim1:system:cdevs:twilight:ydi
|
||||
|
||||
else if {1} == rd
|
||||
echo "### Ydi:Make - Compiling and linking YouDrawIt! module."
|
||||
asml +w ydi.asm
|
||||
echo "### Ydi:Make - Module compiled and linked."
|
||||
echo "### Ydi:Make - Compiling ydi resources."
|
||||
compile ydi.rez keep=ydi.r
|
||||
echo "### Ydi:Make - Module resources built."
|
||||
|
||||
echo "### Ydi:Make - Building Module.."
|
||||
copy -f ydi.d ydi
|
||||
copy -r ydi.r ydi
|
||||
echo "### Ydi:Make - Setting filetype."
|
||||
filetype ydi $bc $4004
|
||||
echo "### Ydi:Make - Built. Now copying to Twilight folder..."
|
||||
copy -c ydi :jim1:system:cdevs:twilight:ydi
|
||||
|
||||
else
|
||||
echo "### Ydi:Make - Invalid parameters/options specified."
|
||||
end
|
986
source/twilight/ydi/movie.asm
Normal file
986
source/twilight/ydi/movie.asm
Normal file
@ -0,0 +1,986 @@
|
||||
*------------------------------------------------*
|
||||
* *
|
||||
* Movie Theater *
|
||||
* *
|
||||
* A Twilight II Module *
|
||||
* *
|
||||
* By Derek Young *
|
||||
* *
|
||||
* V1.0 - DY with code from JRM.
|
||||
* V1.1 - 4 Jan 93 JRM
|
||||
*------------------------------------------------*
|
||||
* remember to turn debugging labels off!
|
||||
|
||||
lst off
|
||||
rel
|
||||
xc
|
||||
xc
|
||||
mx %00
|
||||
use Moviet.macs
|
||||
|
||||
TRUE = $FFFF
|
||||
rWString = $8022
|
||||
singleHandle = 1
|
||||
rTextForLETextBox2 = $800B
|
||||
rControlTemplate = $8004
|
||||
resourceToResource = 9
|
||||
refIsHandle = 1
|
||||
refIsPointer = 0
|
||||
|
||||
dum 0
|
||||
PicPtr adrl 0
|
||||
DataPtr adrl 0 ;space for the animation routine
|
||||
StartAddress adrl 0
|
||||
EndAddress adrl 0
|
||||
delay da 0
|
||||
|
||||
MovePtr adrl 0 ;indicates movement (time to unblank!)
|
||||
dend
|
||||
|
||||
dum 1
|
||||
Bank db 0 ;This is how the stack is set up
|
||||
rtlAddr adr 0 ;with DP at the top and Result
|
||||
T2data2 adrl 0 ;occupying the top four bytes
|
||||
T2data1 adrl 0
|
||||
T2Message da 0
|
||||
T2Result adrl 0
|
||||
T2StackSize adrl 0
|
||||
dend
|
||||
|
||||
Screen = $E12000
|
||||
SHADOW = $E0C035
|
||||
|
||||
*-------------------------------------------------
|
||||
* NewHandle attributes
|
||||
attrNoPurge equ $0000 ; Handle Attribute Bits - Not purgeable
|
||||
attrBank equ $0001 ; Handle Attribute Bits - fixed bank
|
||||
attrAddr equ $0002 ; Handle Attribute Bits - fixed address
|
||||
attrPage equ $0004 ; Handle Attribute Bits - page aligned
|
||||
attrNoSpec equ $0008 ; Handle Attribute Bits - may not use speci
|
||||
attrNoCross equ $0010 ; Handle Attribute Bits - may not cross ba
|
||||
attrFixed equ $4000 ; Handle Attribute Bits - not movable
|
||||
attrLocked equ $8000 ; Handle Attribute Bits - locked
|
||||
*-------------------------------------------------
|
||||
* start of the blanker...
|
||||
|
||||
MakeT2 = 0
|
||||
SaveT2 = 1
|
||||
BlankT2 = 2
|
||||
LoadSetUpT2 = 3
|
||||
UnloadSetUpT2 = 4
|
||||
KillT2 = 5
|
||||
HitT2 = 6
|
||||
|
||||
Start
|
||||
phb
|
||||
phk
|
||||
plb
|
||||
|
||||
lda T2Message,s
|
||||
cmp #BlankT2 ;must be BlankT2
|
||||
beq :Blank
|
||||
cmp #MakeT2
|
||||
beql doMake
|
||||
cmp #KillT2
|
||||
beql doKill
|
||||
cmp #HitT2
|
||||
beql doHit
|
||||
cmp #SaveT2
|
||||
beql doSave
|
||||
cmp #LoadSetUpT2
|
||||
beql doLoadSetup
|
||||
cmp #UnloadSetUpT2
|
||||
beql doUnloadSetup
|
||||
brl Bye
|
||||
|
||||
:Blank lda T2Data1,s
|
||||
sta MovePtr ;save this in our own DP
|
||||
lda T2Data1+2,s
|
||||
sta MovePtr+2
|
||||
|
||||
lda T2Data2,s
|
||||
sta RezFileID
|
||||
lda T2Data2+2,s ;our memory ID
|
||||
sta MyID
|
||||
clc
|
||||
adc #$100
|
||||
sta MemID ;need a memory ID
|
||||
|
||||
*-------------------------------------------------
|
||||
* The start of the program...
|
||||
|
||||
Blank
|
||||
lda #0
|
||||
sta T2Result,s
|
||||
sta T2Result+2,s ;the result (nil for no error)
|
||||
|
||||
lda AnimHandle
|
||||
ora AnimHandle+2
|
||||
beq Error ;error occurred while loading the file!
|
||||
|
||||
lda ErrorNum
|
||||
bne Error
|
||||
|
||||
* let moviet use shadowing if we've got it!
|
||||
|
||||
lda #$E1
|
||||
sta ScreenPtr+2
|
||||
|
||||
sep $30
|
||||
ldal SHADOW
|
||||
rep $30
|
||||
bit #$08
|
||||
bne noShadow
|
||||
lda #$01
|
||||
sta ScreenPtr+2
|
||||
|
||||
noShadow
|
||||
lda ScreenPtr+2
|
||||
sep $30
|
||||
sta screenFill+3
|
||||
rep $30
|
||||
|
||||
|
||||
PushLong AnimHandle
|
||||
jsr makePdp
|
||||
pld
|
||||
PullLong PicPtr
|
||||
jsr PlayAnimation
|
||||
|
||||
brl Bye
|
||||
|
||||
Error ;error while loading the file!
|
||||
~HexIt RealError
|
||||
pla
|
||||
sta err1num
|
||||
sta err2num
|
||||
sta err3num
|
||||
sta err4num
|
||||
pla
|
||||
sta err1num+2
|
||||
sta err2num+2
|
||||
sta err3num+2
|
||||
sta err4num+2
|
||||
|
||||
lda ErrorNum
|
||||
cmp #5 ;errors 1 through 4 are good
|
||||
bge :unknown
|
||||
|
||||
dec ;make that 0 through 3
|
||||
asl
|
||||
tax
|
||||
phx ;save this for a moment
|
||||
|
||||
pha
|
||||
pha ;result space
|
||||
pea 0
|
||||
lda Errorlengths,x ;size
|
||||
pha
|
||||
PushWord MemID ;memory ID
|
||||
PushWord #$8000 ;attributes
|
||||
PushLong #0 ;location
|
||||
_NewHandle
|
||||
PullLong ErrorHand
|
||||
|
||||
plx
|
||||
pea #^Errors
|
||||
lda Errors,x
|
||||
pha ;pointer
|
||||
PushLong ErrorHand ;handle
|
||||
pea 0
|
||||
lda Errorlengths,x
|
||||
pha ;size
|
||||
_PtrToHand ;copy the string into the handle
|
||||
|
||||
lda ErrorHand
|
||||
sta T2Result,s
|
||||
lda ErrorHand+2
|
||||
sta T2Result+2,s
|
||||
|
||||
:unknown
|
||||
|
||||
|
||||
Bye lda RTLaddr,s ;move up RTL address
|
||||
sta T2data1+3,s
|
||||
lda RTLaddr+1,s
|
||||
sta T2data1+3+1,s
|
||||
|
||||
plb ;restore the bank
|
||||
|
||||
tsc ;remove the input parameters.
|
||||
clc
|
||||
adc #10
|
||||
tcs
|
||||
|
||||
clc
|
||||
rtl
|
||||
|
||||
MyID da 0
|
||||
MemID da 0
|
||||
|
||||
ScreenPtr adrl $e12000
|
||||
|
||||
* errors that can be returned
|
||||
|
||||
ErrorHand adrl 0
|
||||
Errors da err1
|
||||
da err2
|
||||
da err3
|
||||
da err4
|
||||
|
||||
Errorlengths
|
||||
da err2-err1
|
||||
da err3-err2
|
||||
da err4-err3
|
||||
da endoferrors-err4
|
||||
|
||||
err1 asc 'Movie Theater: error $'
|
||||
err1num asc 'XXXX'0D'The animation pathname has not been set up!'00
|
||||
err2 asc 'Movie Theater: error $'
|
||||
err2num asc 'XXXX'0D'The animation file could not be found!'00
|
||||
err3 asc 'Movie Theater: error $'
|
||||
err3num asc 'XXXX'0D'There was an error loading the file!'00
|
||||
err4 asc 'Movie Theater: error $'
|
||||
err4num asc 'XXXX'0D'Not enough memory to load the animation file!'00
|
||||
endoferrors
|
||||
|
||||
*------------------------------------------------*
|
||||
* The format of a PaintWorks animation file ($C2)*
|
||||
* *
|
||||
* Byte Content *
|
||||
* 0000-7FFF Screen image of the first frame *
|
||||
* 8000-8003 Length of animation data block *
|
||||
* 8004-8007 Delay time (in ticks) *
|
||||
* 8008-EOF animation data block *
|
||||
*------------------------------------------------*
|
||||
|
||||
* Call PlayAnimation with a pointer to the animation file in PicPtr.
|
||||
|
||||
*-------------------------------------------------
|
||||
|
||||
PlayAnimation
|
||||
|
||||
~BlockMove PicPtr;ScreenPtr;#$8000 ;load in the first frame
|
||||
|
||||
lda PicPtr
|
||||
clc
|
||||
adc #$8008+4
|
||||
sta DataPtr ;setup the pointer to the data block
|
||||
sta StartAddress
|
||||
lda PicPtr+2
|
||||
adc #0
|
||||
sta DataPtr+2
|
||||
sta StartAddress+2
|
||||
|
||||
ldy #$8000+4
|
||||
lda [PicPtr],y
|
||||
sta delay ;find the delay between frames
|
||||
|
||||
ldy #$8000
|
||||
lda StartAddress
|
||||
clc
|
||||
adc [PicPtr],y
|
||||
sta EndAddress
|
||||
pha ;save for a sec...
|
||||
|
||||
ldy #$8000+2
|
||||
lda StartAddress+2
|
||||
adc [PicPtr],y
|
||||
sta EndAddress+2
|
||||
|
||||
pla ;...and restore
|
||||
sec
|
||||
sbc #4
|
||||
sta EndAddress
|
||||
lda EndAddress+2
|
||||
sbc #0 ;find the address of the end
|
||||
sta EndAddress+2
|
||||
|
||||
Loop lda [DataPtr] ;the offset into the screen
|
||||
bne :doanim
|
||||
|
||||
ldx delay
|
||||
]loop jsr WaitVBL
|
||||
dex
|
||||
bne ]loop ;wait that many "ticks"
|
||||
|
||||
lda DataPtr
|
||||
clc
|
||||
adc #4 ;next offset/word
|
||||
sta DataPtr
|
||||
bcc :1
|
||||
inc DataPtr+2
|
||||
:1
|
||||
|
||||
lda DataPtr
|
||||
cmp EndAddress
|
||||
lda DataPtr+2 ;4 byte compare
|
||||
sbc EndAddress+2
|
||||
blt check
|
||||
|
||||
lda StartAddress
|
||||
sta DataPtr ;go back to the beginning of the animation
|
||||
lda StartAddress+2
|
||||
sta DataPtr+2
|
||||
bra check
|
||||
|
||||
:doanim tax ;leave the offset in X
|
||||
|
||||
ldy #2
|
||||
lda [DataPtr],y
|
||||
screenFill stal Screen,x ;store the actual change
|
||||
|
||||
lda DataPtr
|
||||
clc
|
||||
adc #4
|
||||
sta DataPtr
|
||||
bcc :2
|
||||
inc DataPtr+2
|
||||
:2 bra Loop ;loop until offset is non zero
|
||||
|
||||
check
|
||||
lda [MovePtr] ;check for any movement
|
||||
beq Loop
|
||||
|
||||
rts ;that's it!
|
||||
|
||||
* Wait for a VBL to occur. The period between two VBLs is one tick.
|
||||
|
||||
WaitVBL
|
||||
sep $20
|
||||
]V ldal $C019 ;Wait until the VBL is done if it's active
|
||||
bmi ]V
|
||||
]V ldal $C019 ;Wait until it starts again
|
||||
bpl ]V
|
||||
rep $20
|
||||
rts
|
||||
|
||||
*-------------------------------------------------
|
||||
* Setup procedure for the blanker.
|
||||
* Only one button is checked for which allows the
|
||||
* user to select the animation pathname.
|
||||
|
||||
makeDP mac
|
||||
phd
|
||||
tsc
|
||||
tcd
|
||||
eom
|
||||
|
||||
debug? = 0
|
||||
|
||||
debug mac
|
||||
do debug?
|
||||
brl xx
|
||||
da $7771
|
||||
str ]1
|
||||
fin
|
||||
xx eom
|
||||
|
||||
|
||||
CtlList = 5
|
||||
AnimPath_LText = 2
|
||||
YDIAnimPathStrCtl = $7000
|
||||
|
||||
*-------------------------------------------------
|
||||
* Make
|
||||
*
|
||||
* Create all the buttons in the window
|
||||
|
||||
doMake
|
||||
lda T2data1+2,s
|
||||
sta WindPtr+2 ;our window pointer
|
||||
lda T2data1,s
|
||||
sta WindPtr
|
||||
lda T2data2,s ;our Resource ID
|
||||
sta RezFileID
|
||||
lda T2data2+2,s ;our memory ID
|
||||
sta MyID
|
||||
|
||||
~NewControl2 WindPtr;#resourceToResource;#CtlList
|
||||
plx
|
||||
plx
|
||||
|
||||
;Make sure we're dealing with the T2pref file.
|
||||
|
||||
~GetCurResourceFile
|
||||
|
||||
~SetCurResourceFile RezFileID
|
||||
|
||||
;Load the animation path resource.
|
||||
|
||||
~RMLoadNamedResource #rWString;#rAnimPathname
|
||||
bcc :pathThere
|
||||
plx
|
||||
plx ;setup not saved...
|
||||
stz PathHandle
|
||||
stz PathHandle+2
|
||||
|
||||
lda #UnknownStr
|
||||
sta PathPtr
|
||||
lda #^UnknownStr
|
||||
sta PathPtr+2
|
||||
bra :moveon
|
||||
|
||||
:pathThere
|
||||
|
||||
PushWord #rWString ;rtype for _DetachResource
|
||||
~RMFindNamedResource #rWString;#rAnimPathname;#temp ;rID
|
||||
_DetachResource
|
||||
|
||||
lda 1,s
|
||||
sta PathHandle
|
||||
lda 1+2,s
|
||||
sta PathHandle+2
|
||||
jsr makePdp
|
||||
|
||||
lda [3]
|
||||
xba
|
||||
sta [3]
|
||||
inc 3
|
||||
bne :1
|
||||
inc 3+2
|
||||
:1 pld ;ptr to source string
|
||||
|
||||
PullLong PathPtr
|
||||
|
||||
:moveon _SetCurResourceFile
|
||||
|
||||
jsr substitute
|
||||
|
||||
lda #4
|
||||
sta T2Result,s
|
||||
|
||||
return lda RTLaddr,s ;move up RTL address
|
||||
sta T2data1+3,s
|
||||
lda RTLaddr+1,s
|
||||
sta T2data1+3+1,s
|
||||
|
||||
plb ;restore the bank
|
||||
|
||||
tsc ;remove the input parameters.
|
||||
clc
|
||||
adc #10
|
||||
tcs
|
||||
|
||||
clc
|
||||
rtl
|
||||
|
||||
WindPtr adrl 0 ;pointer to window to draw controls in
|
||||
RezFileID da 0 ;resource file ID
|
||||
|
||||
PathHandle adrl 0 ;handle to pathname
|
||||
|
||||
temp adrl 0 ;temporary storage
|
||||
CompileHandle adrl 0 ;handle to compiled text
|
||||
ControlHandle adrl 0 ;handle of control
|
||||
LETextHandle adrl 0 ;handle to LEText box
|
||||
|
||||
SubArray ;substitution array
|
||||
PathPtr adrl 0 ;pointer to pathname
|
||||
|
||||
rAnimPathname str 'Movie Theater: Pathname'
|
||||
|
||||
db 00 ;this space is needed so we can xba the
|
||||
;string length of "UnknownStr"
|
||||
UnknownStr str '(Unknown.)'
|
||||
|
||||
*-------------------------------------------------
|
||||
* put the filename into *0
|
||||
|
||||
substitute
|
||||
debug 'substitute'
|
||||
|
||||
pha
|
||||
pha
|
||||
PushWord #1 ;pascal substitution strings
|
||||
PushLong #SubArray
|
||||
|
||||
~LoadResource #rTextForLETextBox2;#AnimPath_LText
|
||||
lda 1,s
|
||||
sta LETextHandle
|
||||
lda 1+2,s
|
||||
sta LETextHandle+2
|
||||
jsr makePdp
|
||||
pld
|
||||
|
||||
~GetHandleSize LETextHandle
|
||||
pla
|
||||
plx ;chuck hi word
|
||||
pha
|
||||
_CompileText
|
||||
PullLong CompileHandle
|
||||
|
||||
~ReleaseResource #3;#rTextForLETextBox2;#AnimPath_LText
|
||||
|
||||
PushLong PathPtr
|
||||
makeDP
|
||||
lda 3
|
||||
bne :1
|
||||
dec 3+2
|
||||
:1 dec 3
|
||||
lda [3]
|
||||
xba
|
||||
sta [3]
|
||||
pld
|
||||
ply
|
||||
ply
|
||||
|
||||
~LoadResource #rControlTemplate;#YDIAnimPathStrCtl
|
||||
lda 1,s
|
||||
sta ControlHandle
|
||||
lda 1+2,s
|
||||
sta ControlHandle+2
|
||||
jsr makePdp
|
||||
ldy #$1A ;textRef
|
||||
lda CompileHandle
|
||||
sta [3],y
|
||||
iny
|
||||
iny
|
||||
lda CompileHandle+2
|
||||
sta [3],y
|
||||
|
||||
ldy #$14 ;moreFlags
|
||||
lda [3],y
|
||||
and #$FFFC
|
||||
ora #refIsHandle
|
||||
sta [3],y
|
||||
pld
|
||||
ply
|
||||
ply
|
||||
|
||||
pha
|
||||
pha
|
||||
PushLong WindPtr
|
||||
PushWord #singleHandle
|
||||
PushLong ControlHandle
|
||||
_NewControl2
|
||||
plx
|
||||
plx
|
||||
rts
|
||||
|
||||
*-------------------------------------------------
|
||||
* Save
|
||||
*
|
||||
* Save the changes made during setup
|
||||
|
||||
doSave debug 'doSave'
|
||||
|
||||
lda PathHandle
|
||||
ora PathHandle+2
|
||||
bne :notNIL
|
||||
brl return
|
||||
|
||||
:notNIL
|
||||
|
||||
~GetCurResourceFile
|
||||
~SetCurResourceFile RezFileID
|
||||
|
||||
* get rid of the old pathname if there is one...
|
||||
|
||||
PushWord #rWString ;for RMSetResourceName
|
||||
~RMFindNamedResource #rWString;#rAnimPathname;#temp ;rID
|
||||
PushWord #rWString ;rType
|
||||
lda 5,s
|
||||
pha
|
||||
lda 5,s
|
||||
pha
|
||||
_RemoveResource
|
||||
PushLong #ZeroString ;no rezName
|
||||
_RMSetResourceName
|
||||
|
||||
* Set the ID of pathhandle to the control panel, so we don't confuse the
|
||||
* living hell out of the resource manager :-)
|
||||
|
||||
phd
|
||||
~GetCurResourceApp
|
||||
PushLong PathHandle
|
||||
_SetHandleID
|
||||
plx
|
||||
|
||||
* add a new resource
|
||||
|
||||
PushLong PathHandle ;handle
|
||||
PushWord #$18 ;attrNoSpec+attrNoCross
|
||||
PushWord #rWString ;rType
|
||||
~UniqueResourceID #$FFFF;#rWString ;rID
|
||||
lda 1,s
|
||||
sta tempHandle
|
||||
lda 1+2,s
|
||||
sta tempHandle+2
|
||||
_AddResource
|
||||
|
||||
|
||||
PushWord #rWString ;rType
|
||||
PushLong tempHandle ;rID
|
||||
PushLong #rAnimPathname ;ptr to name str
|
||||
_RMSetResourceName
|
||||
|
||||
;Update the file and restore original rezFile.
|
||||
|
||||
~UpdateResourceFile RezFileID
|
||||
|
||||
~RMLoadNamedResource #rWString;#rAnimPathname
|
||||
PullLong PathHandle
|
||||
|
||||
PushWord #rWString ;rtype
|
||||
~RMFindNamedResource #rWString;#rAnimPathname;#temp ;rID
|
||||
_DetachResource
|
||||
|
||||
skipSave
|
||||
|
||||
_SetCurResourceFile
|
||||
|
||||
brl return
|
||||
|
||||
tempHandle adrl 0
|
||||
ZeroString str ''
|
||||
|
||||
*-------------------------------------------------
|
||||
* Hit
|
||||
*
|
||||
* handle item hits
|
||||
|
||||
doHit debug 'doHit'
|
||||
|
||||
lda #0
|
||||
sta T2Result+2,s
|
||||
sta T2Result,s
|
||||
lda T2data2+2,s ; ctlID hi word must be zero
|
||||
bne :nothingHit
|
||||
lda T2data2,s
|
||||
cmp #1
|
||||
beq pathBtnHit
|
||||
:nothingHit brl return
|
||||
|
||||
pathBtnHit
|
||||
~LoadOneTool #$17;#$0303
|
||||
|
||||
~SFStatus
|
||||
pla
|
||||
sta SFStatus
|
||||
bne :active
|
||||
|
||||
~NewHandle #$100;MyID;#$C005;#0 ;attrLocked+attrFixed+attrPage+attrBank
|
||||
PullLong ToolDP
|
||||
|
||||
PushWord MyID
|
||||
PushLong ToolDP
|
||||
jsr makePdp
|
||||
pld
|
||||
pla
|
||||
plx
|
||||
pha ;DP pointer
|
||||
_SFStartUp
|
||||
|
||||
:active
|
||||
|
||||
PushWord #120 ;whereX 640
|
||||
PushWord #50 ;whereY 640
|
||||
PushWord #refIsPointer ;promptRefDesc
|
||||
PushLong #OpenString ;promptRef
|
||||
PushLong #0 ;filterProcPrt
|
||||
PushLong #TypeList ;typeListPtr
|
||||
PushLong #SFReply ;replyPtr
|
||||
_SFGetFile2
|
||||
|
||||
lda SFStatus
|
||||
bne :noShutIt
|
||||
_SFShutDown
|
||||
~UnloadOneTool #$17
|
||||
|
||||
~DisposeHandle ToolDP
|
||||
|
||||
:noShutIt
|
||||
lda SFReply ;See if user clicked cancel
|
||||
bne :noCancel
|
||||
brl return
|
||||
|
||||
:noCancel
|
||||
lda #TRUE
|
||||
sta T2Result,s
|
||||
|
||||
PushLong Path
|
||||
jsr makePdp
|
||||
lda 3
|
||||
clc
|
||||
adc #2 ;past buff size
|
||||
sta 3
|
||||
lda 3+2
|
||||
adc #0
|
||||
sta 3+2
|
||||
pld
|
||||
PushLong Path
|
||||
~GetHandleSize Path
|
||||
lda 1,s ;lo word
|
||||
sec
|
||||
sbc #2
|
||||
sta 1,s
|
||||
lda 3,s ;high word
|
||||
sbc #0
|
||||
sta 3,s
|
||||
_PtrToHand
|
||||
|
||||
~GetHandleSize Path
|
||||
lda 1,s ;lo word
|
||||
sec
|
||||
sbc #2
|
||||
sta 1,s
|
||||
lda 3,s ;hi word
|
||||
sbc #0
|
||||
sta 3,s
|
||||
PushLong Path
|
||||
_SetHandleSize
|
||||
|
||||
~HLock Path
|
||||
|
||||
lda Path
|
||||
sta PathHandle
|
||||
lda Path+2
|
||||
sta PathHandle+2
|
||||
|
||||
; ~DisposeHandle Path
|
||||
~DisposeHandle Nom
|
||||
|
||||
PushLong PathHandle
|
||||
jsr makePdp
|
||||
lda [3]
|
||||
xba
|
||||
sta [3]
|
||||
inc 3
|
||||
bne :1
|
||||
inc 3+2
|
||||
:1 pld ;ptr to source string
|
||||
PullLong PathPtr
|
||||
|
||||
pha ; for disposecontrol
|
||||
pha
|
||||
~GetCtlHandleFromID WindPtr;#2 ; animpathctl id
|
||||
lda 1,s
|
||||
sta 5,s
|
||||
lda 1+2,s
|
||||
sta 5+2,s
|
||||
_HideControl
|
||||
_DisposeControl
|
||||
|
||||
jsr substitute
|
||||
|
||||
brl return
|
||||
|
||||
SFStatus da 0
|
||||
|
||||
OpenString str 'Use which animation ($C2) file?'
|
||||
|
||||
TypeList
|
||||
da 5 number of types
|
||||
|
||||
da $0000 ;flags: normal.. :-)
|
||||
da $C2 ;fileType
|
||||
adrl $0000 ;auxType
|
||||
|
||||
da $2000 ;flags: dim all $c0 $02 (apf)
|
||||
da $C0 ;fileType
|
||||
adrl $0002 ;auxType
|
||||
|
||||
da $A000 ;flags: dim all $C1 file entries
|
||||
da $C1 ;fileType
|
||||
adrl 0 ;auxType
|
||||
|
||||
da $2000 ;flags: dim all $C0 $0000 pics
|
||||
da $C0 ;fileType
|
||||
adrl $0000 ;auxType
|
||||
|
||||
da $2000 ;flags: dim all $C0 $0001 pics
|
||||
da $C1 ;fileType
|
||||
adrl $0001 ;auxType
|
||||
|
||||
SFReply
|
||||
da 0
|
||||
fileType da 0
|
||||
auxType adrl 0
|
||||
da 3
|
||||
Nom adrl 0
|
||||
da 3
|
||||
Path adrl 0
|
||||
|
||||
ToolDP adrl 0
|
||||
|
||||
*-------------------------------------------------
|
||||
* Kill
|
||||
*
|
||||
* dispose of anything unneeded
|
||||
|
||||
doKill
|
||||
~DisposeHandle PathHandle
|
||||
brl return
|
||||
|
||||
*-------------------------------------------------
|
||||
* LoadSetup
|
||||
*
|
||||
* load in the file needed (name in resource fork)
|
||||
|
||||
* errors:
|
||||
* 0 - nothing
|
||||
* 1 - pathname not set up
|
||||
* 2 - file not found
|
||||
* 3 - error loading in file
|
||||
* 4 - out of memory error
|
||||
|
||||
ErrorNum da 0 ;our error number
|
||||
RealError da 0 ;real error number
|
||||
|
||||
doLoadSetup
|
||||
debug 'doLoadSetup'
|
||||
|
||||
stz ErrorNum
|
||||
stz RealError
|
||||
|
||||
~RMLoadNamedResource #rWString;#rAnimPathname
|
||||
bcc :PathOK
|
||||
plx
|
||||
plx
|
||||
stz AnimHandle
|
||||
stz AnimHandle+2
|
||||
sta RealError ;save the error number
|
||||
lda #1
|
||||
sta ErrorNum ;pathname not setup
|
||||
brl return
|
||||
|
||||
:PathOK
|
||||
jsr makePdp
|
||||
pld
|
||||
PullLong pathname
|
||||
|
||||
PushWord #rWString ;rtype
|
||||
~RMFindNamedResource #rWString;#rAnimPathname;#temp ;rID
|
||||
bcc :good
|
||||
plx
|
||||
plx
|
||||
:er stz AnimHandle
|
||||
stz AnimHandle+2
|
||||
sta RealError ;save the error number
|
||||
lda #1
|
||||
sta ErrorNum
|
||||
brl return
|
||||
:good _DetachResource
|
||||
bcs :er
|
||||
|
||||
* Load Picture
|
||||
|
||||
Open_GS openParams
|
||||
bcc :openOK
|
||||
stz AnimHandle
|
||||
stz AnimHandle+2
|
||||
sta RealError ;official error number
|
||||
cmp #$46
|
||||
beq :fnotf
|
||||
cmp #$44
|
||||
beq :fnotf
|
||||
lda #3 ;error while loading file
|
||||
sta ErrorNum
|
||||
|
||||
:fnotf lda #2 ;file not found
|
||||
sta ErrorNum
|
||||
brl return
|
||||
|
||||
:openOK lda OpenID
|
||||
sta ReadID
|
||||
sta CloseID
|
||||
|
||||
lda eof
|
||||
sta readLength
|
||||
lda eof+2
|
||||
sta readLength+2
|
||||
|
||||
pha
|
||||
pha
|
||||
PushLong eof
|
||||
lda T2Data2+2,s ;memory ID
|
||||
pha
|
||||
sta MyID
|
||||
PushWord #$C008 ;attrLocked+attrNoCross+attrNoSpec
|
||||
PushLong #0
|
||||
_NewHandle
|
||||
sta RealError
|
||||
plx
|
||||
stx AnimHandle
|
||||
plx
|
||||
stx AnimHandle+2
|
||||
bcc :MemoryOK
|
||||
Close_GS CloseParams close picture
|
||||
stz AnimHandle
|
||||
stz AnimHandle+2
|
||||
lda #4 ;out of memory
|
||||
sta ErrorNum
|
||||
brl return
|
||||
|
||||
:MemoryOK PushLong AnimHandle
|
||||
jsr makePdp
|
||||
pld
|
||||
PullLong PicDestIN
|
||||
|
||||
Read_GS ReadParams
|
||||
|
||||
php
|
||||
pha
|
||||
Close_GS CloseParams close picture
|
||||
pla
|
||||
plp
|
||||
bcc :readOK
|
||||
sta RealError
|
||||
~DisposeHandle AnimHandle
|
||||
stz AnimHandle
|
||||
stz AnimHandle+2
|
||||
lda #3 ;error while loading file
|
||||
sta ErrorNum
|
||||
brl return
|
||||
|
||||
:readOK ;file is all loaded in!
|
||||
;handle is in AnimHandle
|
||||
|
||||
brl return
|
||||
|
||||
openParams
|
||||
da 12 pcount
|
||||
openID da 0 ;reference number
|
||||
pathname adrl 0
|
||||
da 0 request_access
|
||||
da 0 resource_num
|
||||
da 0 ;access
|
||||
da 0 ;file_type
|
||||
adrl 0 ;aux_type
|
||||
da 0 ;storage_type
|
||||
ds 8 ;create_td
|
||||
ds 8 ;modify_td
|
||||
adrl 0 ;option_list
|
||||
eof adrl 0
|
||||
|
||||
readParams
|
||||
da 4
|
||||
readID da 0 ;reference number
|
||||
picDestIN adrl 0 ;pointer to DATA buffer
|
||||
readLength adrl 0 ;this many bytes
|
||||
adrl 0 ;how many xfered
|
||||
|
||||
closeParams
|
||||
da 1
|
||||
closeID da 0 ;reference number
|
||||
|
||||
AnimHandle adrl 0 ;for the file loader
|
||||
|
||||
*-------------------------------------------------
|
||||
* Unload
|
||||
*
|
||||
* Dispose of anything we loaded in
|
||||
|
||||
doUnloadSetup
|
||||
|
||||
debug 'doUnloadSetup'
|
||||
|
||||
~DisposeHandle AnimHandle ; no setup to unload!
|
||||
|
||||
brl return
|
||||
|
||||
* the makePdp routine is found in a different file
|
||||
put makepdp.asm
|
||||
|
||||
sav Moviet.l
|
17
source/twilight/ydi/read.me
Normal file
17
source/twilight/ydi/read.me
Normal file
@ -0,0 +1,17 @@
|
||||
Sorry it took so long to get this to you--I kinda forgot about it <blush>
|
||||
|
||||
This draw routine is not and end-all-be-all drawing routine. To be completely
|
||||
correct I should be checking the memberFlag and dimming the item if it is not
|
||||
selectable. But, since I know that my filter doesn't allow files to be dimmed,
|
||||
it only displays selectable files, I know that I could remove that code.
|
||||
|
||||
Let me know if you want code to draw filenames dimmed (it is in a technote
|
||||
somewhere--under fast list draws I think).
|
||||
|
||||
Also, to do this the best way, I'd probably also use GetSysIcon for things like
|
||||
the folder icon--but this app that I stole the code from also runs under 5.0.4
|
||||
so I couldn't use it.
|
||||
|
||||
In any case, let me know if you have any problems!
|
||||
|
||||
Bryan
|
455
source/twilight/ydi/sd/YDI.config.asm
Normal file
455
source/twilight/ydi/sd/YDI.config.asm
Normal file
@ -0,0 +1,455 @@
|
||||
|
||||
mcopy YDI.Config.Mac
|
||||
mcopy 7/m16.memory
|
||||
mcopy 7/m16.resources
|
||||
copy YDI.equ
|
||||
copy 7/e16.types
|
||||
copy 7/e16.window
|
||||
copy 7/e16.memory
|
||||
copy 7/e16.control
|
||||
*-----------------------------------------------------------------------------*
|
||||
FALSE gequ 0
|
||||
TRUE gequ 1
|
||||
|
||||
INCBUSYFLG gequ $E10064 increment busy flag
|
||||
DECBUSYFLG gequ $E10068 decrement busy flag
|
||||
|
||||
rC1InputString gequ $8005
|
||||
rWindParam1 gequ $800E
|
||||
|
||||
MyID gequ <0
|
||||
TempDP gequ MyID+2
|
||||
OldPort gequ TempDP+4
|
||||
OurWindow gequ OldPort+4
|
||||
OurPath gequ OurWindow+4
|
||||
C1Ptr gequ OurPath+4
|
||||
C1Handle gequ C1Ptr+4
|
||||
TextSize gequ C1Handle+4
|
||||
LETextHndl gequ TextSize+2
|
||||
ToolDP gequ LETextHndl+4
|
||||
*-----------------------------------------------------------------------------*
|
||||
DSConfig Start
|
||||
Using GlobalDATA
|
||||
|
||||
phb
|
||||
phk
|
||||
plb
|
||||
|
||||
DefineStack
|
||||
oldBank byte
|
||||
returnAddress block 3
|
||||
MasterID word
|
||||
ourPathname long
|
||||
|
||||
lda MasterID,s
|
||||
ora #$0A00
|
||||
sta MyID
|
||||
|
||||
lda ourPathname,s
|
||||
sta OurPath
|
||||
lda ourPathname+2,s
|
||||
sta OurPath+2
|
||||
|
||||
WordResult
|
||||
_GetCurResourceApp
|
||||
PullWord OldResourceApp
|
||||
|
||||
WordResult
|
||||
_GetCurResourceFile
|
||||
PullWord OldResourceFile
|
||||
|
||||
pei MyID
|
||||
_ResourceStartUp
|
||||
|
||||
WordResult
|
||||
PushWord #3 request read/write access
|
||||
PushLong #0 open a new file
|
||||
pei OurPath+2
|
||||
pei OurPath
|
||||
_OpenResourceFile
|
||||
plx
|
||||
stx RezFileID
|
||||
* jcs Error
|
||||
|
||||
LongResult
|
||||
_GetPort
|
||||
PullLong OldPort
|
||||
|
||||
LongResult
|
||||
PushLong #0 ; no replacment title
|
||||
PushLong #0 ; no replacement refCon
|
||||
PushLong #DrawContent ; ptr to replacment contentDraw routine
|
||||
PushLong #0 ; no replacement window definition proc
|
||||
PushWord #refIsResource
|
||||
PushLong #Configuration_Window
|
||||
PushWord #rWindParam1
|
||||
_NewWindow2
|
||||
lda 1,s
|
||||
sta OurWindow
|
||||
lda 1+2,s
|
||||
sta OurWindow+2
|
||||
_SetPort
|
||||
PushWord #$0004 ; use dithered color text in window...
|
||||
_SetFontFlags
|
||||
|
||||
|
||||
LongResult
|
||||
PushWord #rC1InputString
|
||||
PushLong #SavedPathC1IStr
|
||||
_LoadResource
|
||||
PullLong C1Handle
|
||||
ldy #2
|
||||
lda [C1Handle]
|
||||
sta C1Ptr
|
||||
lda [C1Handle],y
|
||||
sta C1Ptr+2
|
||||
|
||||
pei C1Ptr+2 ; PUSH POINTER TO TEXT
|
||||
lda C1Ptr
|
||||
inc a ; hop past length word
|
||||
inc a
|
||||
pha ; PUSH POINTER TO TEXT
|
||||
lda [C1Ptr] ; get length word
|
||||
pha ; PUSH LENGTH WORD
|
||||
LongResult ; for GetCtlTitle
|
||||
LongResult ; for GetCtlHandleFromID
|
||||
pei OurWindow+2
|
||||
pei OurWindow
|
||||
PushLong #PathLECtl
|
||||
_GetCtlHandleFromID
|
||||
_GetCtlTitle
|
||||
_LESetText
|
||||
|
||||
pei OurWindow+2
|
||||
pei OurWindow
|
||||
_DrawControls
|
||||
|
||||
wait entry
|
||||
WordResult ; then wait for the person to hit the
|
||||
PushWord #$FFFF ; OK button, filtering out all other
|
||||
PushLong #CfgTaskRec ; events
|
||||
_TaskMaster
|
||||
pla
|
||||
cmp #wInControl ; control selected?
|
||||
beq ControlHit ; if not, loop
|
||||
cmp #wInInfo
|
||||
beq beep
|
||||
cmp #wInMenuBar
|
||||
beq beep
|
||||
cmp #wInDesk
|
||||
beq beep
|
||||
cmp #wInContent
|
||||
beq check
|
||||
cmp #wInFrame
|
||||
beq Check
|
||||
cmp #wInDrag
|
||||
bne wait
|
||||
check lda cTData
|
||||
cmp OurWindow
|
||||
bne beep
|
||||
lda cTData+2
|
||||
cmp OurWindow+2
|
||||
bne beep
|
||||
bra wait
|
||||
beep _SysBeep
|
||||
bra wait
|
||||
|
||||
ControlHit anop
|
||||
lda cTaskData4 ; ID of pressed control
|
||||
cmp #CancelCtl ; cancel pressed?
|
||||
jeq cancelled
|
||||
cmp #SmartFindFileCtl
|
||||
jeq SFF
|
||||
cmp #OKCtl ; OK pressed?
|
||||
bne wait
|
||||
|
||||
Exit anop
|
||||
* brk $01
|
||||
|
||||
* Get a handle to the text in the LineEdit control.
|
||||
LongResult ; for LEGetTextHand
|
||||
LongResult ; for GetCtlTitle
|
||||
LongResult ; for GetCtlHandleFromID
|
||||
pei OurWindow+2
|
||||
pei OurWindow
|
||||
PushLong #PathLECtl
|
||||
_GetCtlHandleFromID
|
||||
_GetCtlTitle
|
||||
lda 1,s
|
||||
sta TempDP
|
||||
lda 3,s
|
||||
sta TempDP+2
|
||||
_LEGetTextHand
|
||||
PullLong LETextHndl
|
||||
|
||||
|
||||
* Set size of the resource's handle to the size of the length of the text
|
||||
* in the LineEdit control adding two for the length word of a C1InputString.
|
||||
PushWord #0 ; hi word of zero for new size of handle
|
||||
WordResult
|
||||
pei TempDP+2
|
||||
pei TempDP
|
||||
_LEGetTextLen ; get lo word for new size of handle
|
||||
lda 1,s ; add 2
|
||||
sta TextSize
|
||||
inc a
|
||||
inc a
|
||||
sta 1,s
|
||||
pei C1Handle+2 ; SET SIZE OF THE C1 RESOURCE TO THE
|
||||
pei C1Handle ; SIZE OF THE TEXT+2 FOR LENGTH WORD
|
||||
_SetHandleSize
|
||||
|
||||
* Copy the text out of the control and into the resource starting at offset
|
||||
* +02 into the resource to the end of the resource.
|
||||
pei LETextHndl+2 ;and copy the text into the resource's
|
||||
pei LETextHndl ;pointer (source)
|
||||
pei C1Ptr+2
|
||||
lda C1Ptr
|
||||
inc a
|
||||
inc a
|
||||
pha ; (dest)
|
||||
PushWord #0 ; hi word
|
||||
pei TextSize (size)
|
||||
_HandToPtr
|
||||
|
||||
* Get the length of the text and pop it into offset +00 of the C1InputString
|
||||
* resource.
|
||||
lda TextSize
|
||||
sta [C1Ptr]
|
||||
|
||||
PushLong LETextHndl ;release the handle returned by LE
|
||||
_DisposeHandle
|
||||
|
||||
PushWord #TRUE ;indicate that the resource has changed.
|
||||
PushWord #rC1InputString
|
||||
PushLong #SavedPathC1IStr
|
||||
_MarkResourceChange
|
||||
|
||||
cancelled anop
|
||||
pei OurWindow+2
|
||||
pei OurWindow
|
||||
_CloseWindow
|
||||
|
||||
pei OldPort+2
|
||||
pei OldPort
|
||||
_SetPort
|
||||
|
||||
PushWord RezFileID
|
||||
_CloseResourceFile
|
||||
|
||||
_ResourceShutDown
|
||||
|
||||
PushWord OldResourceFile
|
||||
_SetCurResourceFile
|
||||
|
||||
PushWord OldResourceApp
|
||||
_SetCurResourceApp
|
||||
|
||||
pei MyID
|
||||
_DisposeAll
|
||||
|
||||
plb
|
||||
lda 2,s
|
||||
sta 2+6,s
|
||||
lda 1,s
|
||||
sta 1+6,s
|
||||
tsc Remove input paramaters
|
||||
clc
|
||||
adc #6 (MasterID+ourPathname)
|
||||
tcs
|
||||
clc
|
||||
rtl
|
||||
|
||||
End
|
||||
*-----------------------------------------------------------------------------*
|
||||
GlobalDATA Data
|
||||
|
||||
RezFileID ds 2
|
||||
OldResourceApp ds 2
|
||||
OldResourceFile ds 2
|
||||
DelayTime ds 2
|
||||
Seconds ds 2
|
||||
TimeTxt ds 2 ; text string version of seconds
|
||||
|
||||
CfgTaskRec anop ; Configuration window's task record
|
||||
cWhat ds 2
|
||||
cMessage ds 4
|
||||
cWhen ds 4
|
||||
cWhere ds 4
|
||||
cModifiers ds 2
|
||||
cTData ds 4
|
||||
dc i4'$001B2004'
|
||||
cLastClickTick ds 4
|
||||
cClickCount ds 2
|
||||
cTaskData2 ds 4
|
||||
cTaskData3 ds 4
|
||||
cTaskData4 ds 4
|
||||
cLastClickPoint ds 4
|
||||
|
||||
SFStatus ds 2
|
||||
temp ds 4
|
||||
|
||||
OpenString str 'Use which animation file?'
|
||||
|
||||
TypeList anop
|
||||
dc i'4' number of types
|
||||
dc i'$0000' flags: normal.. :-)
|
||||
dc i'$C0' fileType
|
||||
dc i4'$0002' auxType
|
||||
dc i'$A000' flags: dim all $C1 file entries
|
||||
dc i'$C1' fileType
|
||||
dc i4'0' auxType
|
||||
dc i'$2000' flags: dim all $C0 $0000 pics
|
||||
dc i'$C0' fileType
|
||||
dc i4'$0000' auxType
|
||||
dc i'$2000' flags: dim all $C0 $0001 pics
|
||||
dc i'$C1' fileType
|
||||
dc i4'$0001' auxType
|
||||
|
||||
SFReply anop
|
||||
ds 2
|
||||
fileType ds 2
|
||||
auxType ds 4
|
||||
dc i'3'
|
||||
Nom ds 4
|
||||
dc i'3'
|
||||
Path ds 4
|
||||
|
||||
MyPortLoc anop
|
||||
SCB dc i'$0080' portSCB
|
||||
Pix dc i4'$E12000' ptrToPixImage
|
||||
dc i'$00A0' width in bytes of each line in image
|
||||
bounds dc i'0,0' boundary rectangle
|
||||
mode dc i'200,640'
|
||||
|
||||
MyPort ds $AA
|
||||
|
||||
orgPort ds 4
|
||||
|
||||
End
|
||||
*-----------------------------------------------------------------------------*
|
||||
DrawContent Start
|
||||
|
||||
phb
|
||||
phk
|
||||
plb
|
||||
LongResult
|
||||
_GetPort
|
||||
_DrawControls
|
||||
plb
|
||||
rtl
|
||||
|
||||
END
|
||||
*-----------------------------------------------------------------------------*
|
||||
SFF Start
|
||||
Using GlobalDATA
|
||||
|
||||
PushWord #$17 SF toolset
|
||||
PushWord #$0101 version
|
||||
_LoadOneTool
|
||||
|
||||
WordResult
|
||||
_SFStatus
|
||||
pla
|
||||
sta SFStatus
|
||||
bne Active
|
||||
|
||||
LongResult Get dp space for SF
|
||||
PushLong #$100
|
||||
pei MyID
|
||||
PushWord #attrLocked+attrFixed+attrPage+attrBank
|
||||
PushLong #$000000
|
||||
_NewHandle
|
||||
plx
|
||||
stx ToolDP
|
||||
plx
|
||||
stx ToolDP+2
|
||||
* jcs MemoryErr0 ;ExitWithBeep
|
||||
|
||||
pei MyID
|
||||
lda [ToolDP]
|
||||
pha
|
||||
_SFStartUp
|
||||
* jcs SFStartErr0 ;ExitWithBeep
|
||||
|
||||
active anop
|
||||
LongResult
|
||||
_GetPort
|
||||
PushLong #MyPort Open a new grafPort
|
||||
_OpenPort
|
||||
PushLong #MyPort
|
||||
_SetPort
|
||||
PushLong #MyPortLoc make it point to our memory
|
||||
_SetPortLoc
|
||||
PushLong #bounds
|
||||
_SetPortRect
|
||||
|
||||
jsl >INCBUSYFLG
|
||||
|
||||
PushWord #120 whereX 640
|
||||
PushWord #50 whereY 640
|
||||
PushWord #refIsPointer promptRefDesc
|
||||
PushLong #OpenString promptRef
|
||||
PushLong #0 filterProcPrt
|
||||
PushLong #TypeList typeListPtr
|
||||
PushLong #SFReply replyPtr
|
||||
_SFGetFile2
|
||||
|
||||
jsl >DECBUSYFLG
|
||||
|
||||
_SetPort
|
||||
|
||||
lda SFStatus
|
||||
bne noShutIt
|
||||
_SFShutDown
|
||||
|
||||
pei ToolDP+2
|
||||
pei ToolDP
|
||||
_DisposeHandle
|
||||
|
||||
noShutIt anop
|
||||
lda SFReply See if user clicked cancel
|
||||
jeq exit
|
||||
|
||||
lda Path Transfer the path to a dp location
|
||||
sta TempDP
|
||||
lda Path+2
|
||||
sta TempDP+2
|
||||
|
||||
ldy #2 Load the pointer to the name
|
||||
lda [TempDP]
|
||||
clc adding two to skip over the length
|
||||
adc #2 of buffer word
|
||||
tax
|
||||
lda [TempDP],y
|
||||
sta TempDP+2
|
||||
stx TempDP
|
||||
|
||||
pei TempDP+2 ; PUSH POINTER TO TEXT
|
||||
lda TempDP
|
||||
inc a ; hop past length word
|
||||
inc a
|
||||
pha ; PUSH POINTER TO TEXT
|
||||
lda [TempDP] ; get length word
|
||||
pha ; PUSH LENGTH WORD
|
||||
LongResult ; for GetCtlTitle
|
||||
LongResult ; for GetCtlHandleFromID
|
||||
PushLong OurWindow
|
||||
PushLong #PathLECtl
|
||||
_GetCtlHandleFromID
|
||||
_GetCtlTitle
|
||||
_LESetText
|
||||
|
||||
PushLong Path
|
||||
PushLong Nom
|
||||
_DisposeHandle
|
||||
_DisposeHandle
|
||||
|
||||
pei OurWindow+2
|
||||
pei OurWindow
|
||||
_DrawControls
|
||||
|
||||
exit brl Wait
|
||||
|
||||
END
|
||||
*-----------------------------------------------------------------------------*
|
1094
source/twilight/ydi/sd/YDI.old.Asm
Normal file
1094
source/twilight/ydi/sd/YDI.old.Asm
Normal file
File diff suppressed because it is too large
Load Diff
BIN
source/twilight/ydi/sd/Ydi.Config
Normal file
BIN
source/twilight/ydi/sd/Ydi.Config
Normal file
Binary file not shown.
316
source/twilight/ydi/sd/Ydi.Config.Mac
Normal file
316
source/twilight/ydi/sd/Ydi.Config.Mac
Normal file
@ -0,0 +1,316 @@
|
||||
MACRO
|
||||
&lab WordResult
|
||||
&lab phd
|
||||
MEND
|
||||
MACRO
|
||||
&lab LongResult
|
||||
&lab phd
|
||||
phd
|
||||
MEND
|
||||
MACRO
|
||||
&lab _DrawControls
|
||||
&lab ldx #$1010
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _GetCtlHandleFromID
|
||||
&lab ldx #$3010
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _GetCtlTitle
|
||||
&lab ldx #$0D10
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _LEGetTextHand
|
||||
&lab ldx #$2214
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _LEGetTextLen
|
||||
&lab ldx #$2314
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _LESetText
|
||||
&lab ldx #$0B14
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _LoadOneTool
|
||||
&lab ldx #$0F01
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _DisposeAll
|
||||
&lab ldx #$1102
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _DisposeHandle
|
||||
&lab ldx #$1002
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _HandToPtr
|
||||
&lab ldx #$2902
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _NewHandle
|
||||
&lab ldx #$0902
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _SetHandleSize
|
||||
&lab ldx #$1902
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _SysBeep
|
||||
&lab ldx #$2C03
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&LAB JEQ &BP
|
||||
&LAB BNE *+5
|
||||
BRL &BP
|
||||
MEND
|
||||
MACRO
|
||||
&lab _GetPort
|
||||
&lab ldx #$1C04
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _OpenPort
|
||||
&lab ldx #$1804
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _SetFontFlags
|
||||
&lab ldx #$9804
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _SetPort
|
||||
&lab ldx #$1B04
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _SetPortLoc
|
||||
&lab ldx #$1D04
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _SetPortRect
|
||||
&lab ldx #$1F04
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _SFGetFile2
|
||||
&lab ldx #$0E17
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _SFStartUp
|
||||
&lab ldx #$0217
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _SFStatus
|
||||
&lab ldx #$0617
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab pulllong &addr1,&addr2
|
||||
&lab ANOP
|
||||
AIF C:&addr1=0,.a
|
||||
AIF C:&addr2=0,.b
|
||||
LCLC &C
|
||||
&C AMID &addr1,1,1
|
||||
AIF "&C"="[",.zeropage
|
||||
pullword &addr1
|
||||
sta &addr2
|
||||
pullword &addr1+2
|
||||
sta &addr2+2
|
||||
MEXIT
|
||||
.a
|
||||
pullword
|
||||
pullword
|
||||
MEXIT
|
||||
.b
|
||||
pullword &addr1
|
||||
pullword &addr1+2
|
||||
MEXIT
|
||||
.zeropage
|
||||
ldy #&addr2
|
||||
pullword &addr1,y
|
||||
ldy #&addr2+2
|
||||
pullword &addr1,y
|
||||
MEND
|
||||
MACRO
|
||||
&lab pullword &SYSOPR
|
||||
&lab ANOP
|
||||
pla
|
||||
AIF C:&SYSOPR=0,.end
|
||||
sta &SYSOPR
|
||||
.end
|
||||
MEND
|
||||
MACRO
|
||||
&lab pushlong &addr,&offset
|
||||
&lab ANOP
|
||||
LCLC &C
|
||||
LCLC &REST
|
||||
&C AMID &addr,1,1
|
||||
AIF "&C"="#",.immediate
|
||||
AIF "&C"="[",.zeropage
|
||||
AIF C:&offset=0,.nooffset
|
||||
AIF "&offset"="s",.stack
|
||||
pushword &addr+2,&offset
|
||||
pushword &addr,&offset
|
||||
MEXIT
|
||||
.nooffset
|
||||
pushword &addr+2
|
||||
pushword &addr
|
||||
MEXIT
|
||||
.immediate
|
||||
&REST AMID &addr,2,L:&addr-1
|
||||
dc I1'$F4',I2'(&REST)|-16'
|
||||
dc I1'$F4',I2'&REST'
|
||||
MEXIT
|
||||
.stack
|
||||
pushword &addr+2,s
|
||||
pushword &addr+2,s
|
||||
MEXIT
|
||||
.zeropage
|
||||
ldy #&offset+2
|
||||
pushword &addr,y
|
||||
ldy #&offset
|
||||
pushword &addr,y
|
||||
MEND
|
||||
MACRO
|
||||
&lab pushword &SYSOPR
|
||||
&lab ANOP
|
||||
AIF C:&SYSOPR=0,.b
|
||||
LCLC &C
|
||||
&C AMID "&SYSOPR",1,1
|
||||
AIF ("&C"="#").AND.(S:LONGA),.immediate
|
||||
lda &SYSOPR
|
||||
pha
|
||||
MEXIT
|
||||
.b
|
||||
pha
|
||||
MEXIT
|
||||
.immediate
|
||||
LCLC &REST
|
||||
LCLA &BL
|
||||
&BL ASEARCH "&SYSOPR"," ",1
|
||||
AIF &BL>0,.a
|
||||
&BL SETA L:&SYSOPR+1
|
||||
.a
|
||||
&REST AMID "&SYSOPR",2,&BL-2
|
||||
dc I1'$F4',I2'&REST'
|
||||
MEND
|
||||
MACRO
|
||||
&lab str &string
|
||||
&lab dc i1'L:&string',C'&string'
|
||||
MEND
|
||||
MACRO
|
||||
DefineStack
|
||||
GBLA &DummyPC
|
||||
&DummyPC SETA 1
|
||||
MEND
|
||||
MACRO
|
||||
&lab BYTE
|
||||
&lab equ &DummyPC
|
||||
&DummyPC SETA &DummyPC+1
|
||||
MEND
|
||||
MACRO
|
||||
&lab WORD
|
||||
&lab equ &DummyPC
|
||||
&DummyPC SETA &DummyPC+2
|
||||
MEXIT
|
||||
MEND
|
||||
MACRO
|
||||
&lab BLOCK &Value
|
||||
AIF C:&lab=0,.skiplab
|
||||
&lab equ &DummyPC
|
||||
.skiplab
|
||||
&DummyPC SETA &DummyPC+&Value
|
||||
MEND
|
||||
MACRO
|
||||
&lab _CloseWindow
|
||||
&lab ldx #$0B0E
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _NewWindow2
|
||||
&lab ldx #$610E
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _TaskMaster
|
||||
&lab ldx #$1D0E
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _CloseResourceFile
|
||||
&lab ldx #$0B1E
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _GetCurResourceApp
|
||||
&lab ldx #$141E
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _GetCurResourceFile
|
||||
&lab ldx #$121E
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _LoadResource
|
||||
&lab ldx #$0E1E
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _MarkResourceChange
|
||||
&lab ldx #$101E
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _OpenResourceFile
|
||||
&lab ldx #$0A1E
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _ResourceShutDown
|
||||
&lab ldx #$031E
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _ResourceStartUp
|
||||
&lab ldx #$021E
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _SetCurResourceApp
|
||||
&lab ldx #$131E
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _SetCurResourceFile
|
||||
&lab ldx #$111E
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab LONG
|
||||
&lab equ &DummyPC
|
||||
&DummyPC SETA &DummyPC+4
|
||||
MEND
|
||||
MACRO
|
||||
&lab _SFShutDown
|
||||
&lab ldx #$0317
|
||||
jsl $E10000
|
||||
MEND
|
1314
source/twilight/ydi/sd/ydi.asm
Normal file
1314
source/twilight/ydi/sd/ydi.asm
Normal file
File diff suppressed because it is too large
Load Diff
1356
source/twilight/ydi/sd/ydi.asm.back
Normal file
1356
source/twilight/ydi/sd/ydi.asm.back
Normal file
File diff suppressed because it is too large
Load Diff
1514
source/twilight/ydi/sd/ydi.asm.c
Normal file
1514
source/twilight/ydi/sd/ydi.asm.c
Normal file
File diff suppressed because it is too large
Load Diff
10
source/twilight/ydi/sd/ydi.equ
Normal file
10
source/twilight/ydi/sd/ydi.equ
Normal file
@ -0,0 +1,10 @@
|
||||
|
||||
YDI_Icon gequ $10dd01
|
||||
YDI_CtlLst gequ $00000005
|
||||
YDISetAnimPathCtl gequ $00006FFF
|
||||
YDIAnimPathStrCtl gequ $00007000
|
||||
YDIStrCtl gequ $00007001
|
||||
YDIIconCtl gequ $00007002
|
||||
YDISetAnimPathStr gequ $00000011
|
||||
YDI_LText gequ $00000001
|
||||
AnimPath_LText gequ $00000002
|
274
source/twilight/ydi/sd/ydi.fix.rez
Normal file
274
source/twilight/ydi/sd/ydi.fix.rez
Normal file
@ -0,0 +1,274 @@
|
||||
// --------------------------------------------------------------------
|
||||
// Genesys created REZ data code
|
||||
// Simple Software Systems International, Inc.
|
||||
// APWREZ.SCG 1.2
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
#include "types.rez"
|
||||
|
||||
// --- Icon Definitions
|
||||
|
||||
resource rIcon (ICON_00000001, $0000) {
|
||||
$8000, // kind
|
||||
$0014, // height
|
||||
$0016, // width
|
||||
|
||||
$"0000000000000000000000"
|
||||
$"0FFFFFFFFFFFFFFFFFFFF0"
|
||||
$"0F000000000000000000F0"
|
||||
$"0F0F0FC0FFFFFFFFFFF0F0"
|
||||
$"0F0F0FC0FFFFFFFFFFF0F0"
|
||||
$"0F0F0003FFFFFFFFFFF0F0"
|
||||
$"0F0F0880FFFFFFFFFFF0F0"
|
||||
$"0F0F0AA0FFFF888F8FF0F0"
|
||||
$"0F0FC0103FFAAAFAFFF0F0"
|
||||
$"0F0FFF000F1111111FF0F0"
|
||||
$"0F0FFFFFFFFFFFFFFFF0F0"
|
||||
$"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";
|
||||
};
|
||||
|
||||
// --- Control List Definitions
|
||||
|
||||
resource rControlList (CTLLST_00000005, $0000) {
|
||||
{
|
||||
CTLTMP_00010012, // control 1
|
||||
CTLTMP_00007003, // control 2
|
||||
CTLTMP_00007002, // control 3
|
||||
CTLTMP_00007001, // control 4
|
||||
CTLTMP_00007000, // control 5
|
||||
CTLTMP_00006FFF, // control 6
|
||||
};
|
||||
};
|
||||
|
||||
// --- Control Templates
|
||||
|
||||
resource rControlTemplate (CTLTMP_00006FFF, $0000) {
|
||||
$00006FFF, // ID
|
||||
{ 73, 88, 86,246}, // rect
|
||||
simpleButtonControl {{
|
||||
$0000, // flag
|
||||
$3002, // moreFlags
|
||||
$00000000, // refCon
|
||||
PSTR_00000011, // titleRef
|
||||
0, // colorTableRef
|
||||
{"S","s",$0100,$0100} // key equivalents
|
||||
}};
|
||||
};
|
||||
|
||||
resource rControlTemplate (CTLTMP_00007000, $0000) {
|
||||
$00007000, // ID
|
||||
{ 97, 14,121,335}, // rect
|
||||
statTextControl {{
|
||||
$0000, // flag
|
||||
$1002, // moreFlags
|
||||
$00000000, // refCon
|
||||
LETXTBOX_00000002, // textRef
|
||||
LETXTBOX_00000002_CNT, // textSize
|
||||
$0000 // just
|
||||
}};
|
||||
};
|
||||
|
||||
resource rControlTemplate (CTLTMP_00007001, $0000) {
|
||||
$00007001, // ID
|
||||
{ 54,124, 62,243}, // rect
|
||||
statTextControl {{
|
||||
$0000, // flag
|
||||
$1002, // moreFlags
|
||||
$00000000, // refCon
|
||||
LETXTBOX_00000001, // textRef
|
||||
LETXTBOX_00000001_CNT, // textSize
|
||||
$0000 // just
|
||||
}};
|
||||
};
|
||||
|
||||
resource rControlTemplate (CTLTMP_00007002, $0000) {
|
||||
$00007002, // ID
|
||||
{ 27,138, 53,194}, // rect
|
||||
iconButtonControl {{
|
||||
$0004, // flag
|
||||
$1020, // moreFlags
|
||||
$00000000, // refCon
|
||||
ICON_00000001, // iconRef
|
||||
0, // titleRef
|
||||
0, // colorTableRef
|
||||
$0000, // displayMode
|
||||
}};
|
||||
};
|
||||
|
||||
resource rControlTemplate (CTLTMP_00007003, $0000) {
|
||||
$07FEFFFE, // ID
|
||||
{ 4,246, 16,336}, // rect
|
||||
simpleButtonControl {{
|
||||
$0000, // flag
|
||||
$3002, // moreFlags
|
||||
$00000000, // refCon
|
||||
PSTR_00000012, // titleRef
|
||||
0, // colorTableRef
|
||||
{"U","u",$0100,$0100} // key equivalents
|
||||
}};
|
||||
};
|
||||
|
||||
resource rControlTemplate (CTLTMP_00010012, $0000) {
|
||||
$07FEFFFF, // ID
|
||||
{ 20, 0, 21,350}, // rect
|
||||
{{
|
||||
$0002, // flag
|
||||
$1000, // moreFlags
|
||||
$00000000, // refCon
|
||||
// --- rPString Templates
|
||||
|
||||
resource rPString (PSTR_00000011, $0000) {
|
||||
"Set Animation Path"
|
||||
};
|
||||
|
||||
resource rPString (PSTR_00000012, $0000) {
|
||||
"Update"
|
||||
};
|
||||
|
||||
resource rPString (PSTR_000000FC, $0000) {
|
||||
" Setup "
|
||||
};
|
||||
|
||||
// --- rTextForLETextBox2 Templates
|
||||
|
||||
#define LETXTBOX_00000001_CNT 38 /* move this line to the top of this file */
|
||||
|
||||
resource rTextForLETextBox2 (LETXTBOX_00000001, $0000) {
|
||||
"\$01"
|
||||
"J"
|
||||
"\$00"
|
||||
"\$00"
|
||||
"\$01"
|
||||
"L"
|
||||
"\$00"
|
||||
"\$00"
|
||||
"\$01"
|
||||
"R"
|
||||
"\$04"
|
||||
"\$00"
|
||||
"\$01"
|
||||
"F"
|
||||
"\$FE"
|
||||
"\$FF"
|
||||
"\$00"
|
||||
"\$08"
|
||||
"\$01"
|
||||
"C"
|
||||
"\$00"
|
||||
"\$00"
|
||||
"\$01"
|
||||
"B"
|
||||
"\$FF"
|
||||
"\$FF"
|
||||
"You Draw It!"
|
||||
};
|
||||
|
||||
#define LETXTBOX_00000002_CNT 60 /* move this line to the top of this file */
|
||||
|
||||
resource rTextForLETextBox2 (LETXTBOX_00000002, $0000) {
|
||||
"\$01"
|
||||
"J"
|
||||
"\$00"
|
||||
"\$00"
|
||||
"\$01"
|
||||
"L"
|
||||
"\$00"
|
||||
"\$00"
|
||||
"\$01"
|
||||
"R"
|
||||
"\$04"
|
||||
"\$00"
|
||||
"\$01"
|
||||
"F"
|
||||
"\$FE"
|
||||
"\$FF"
|
||||
"\$00"
|
||||
"\$08"
|
||||
"\$01"
|
||||
"C"
|
||||
"\$00"
|
||||
"\$00"
|
||||
"\$01"
|
||||
"B"
|
||||
"\$FF"
|
||||
"\$FF"
|
||||
"Animation Path: "
|
||||
"\$D2"
|
||||
"*0"
|
||||
"\$D3"
|
||||
"\$01"
|
||||
"F"
|
||||
"\$FE"
|
||||
"\$FF"
|
||||
"\$00"
|
||||
"\$08"
|
||||
"\$01"
|
||||
"C"
|
||||
"\$00"
|
||||
"\$00"
|
||||
"\$01"
|
||||
"B"
|
||||
"\$FF"
|
||||
"\$FF"
|
||||
};
|
||||
|
||||
// --- Window Templates
|
||||
|
||||
resource rWindParam1 (WPARAM1_00000FFF, $0000) {
|
||||
$C0A8, // plFrame (frame bits)
|
||||
PSTR_000000FC, // plTitle (title ID)
|
||||
$00000000, // p1RefCon
|
||||
{ 0, 0, 0, 0}, // p1ZoomRect
|
||||
WCOLOR_00000001, // p1ColorTable
|
||||
{$0000, $0000}, // p1YOrigin, p1XOrigin
|
||||
{$0000, $0000}, // p1DataHeight, p1DataWidth
|
||||
{$0000, $0000}, // p1MaxHeight, p1MaxWidth
|
||||
{$0000, $0000}, // p1VerScroll, p1HorScroll
|
||||
{$0000, $0000}, // p1VerPage, p1HorPage
|
||||
$00000000, // p1InfoText (info RefCon)
|
||||
$0000, // p1InfoHeight
|
||||
{ 50,146,180,494}, // p1Position
|
||||
infront, // p1Plane
|
||||
CTLLST_00000005, // plControlList
|
||||
$0A09 // plInDesc
|
||||
};
|
||||
|
||||
// --- Window Color Templates
|
||||
|
||||
resource rWindColor (WCOLOR_00000001, $0000) {
|
||||
$0000, // frameColor
|
||||
$0F00, // titleColor
|
||||
$020F, // tBarColor
|
||||
$F0FF, // growColor
|
||||
$00F0 // infoColor
|
||||
};
|
||||
|
552
source/twilight/ydi/sd/ydi.mac
Normal file
552
source/twilight/ydi/sd/ydi.mac
Normal file
@ -0,0 +1,552 @@
|
||||
MACRO
|
||||
&lab pulllong &addr1,&addr2
|
||||
&lab ANOP
|
||||
AIF C:&addr1=0,.a
|
||||
AIF C:&addr2=0,.b
|
||||
LCLC &C
|
||||
&C AMID &addr1,1,1
|
||||
AIF "&C"="[",.zeropage
|
||||
pullword &addr1
|
||||
sta &addr2
|
||||
pullword &addr1+2
|
||||
sta &addr2+2
|
||||
MEXIT
|
||||
.a
|
||||
pullword
|
||||
pullword
|
||||
MEXIT
|
||||
.b
|
||||
pullword &addr1
|
||||
pullword &addr1+2
|
||||
MEXIT
|
||||
.zeropage
|
||||
ldy #&addr2
|
||||
pullword &addr1,y
|
||||
ldy #&addr2+2
|
||||
pullword &addr1,y
|
||||
MEND
|
||||
MACRO
|
||||
&lab pullword &SYSOPR
|
||||
&lab ANOP
|
||||
pla
|
||||
AIF C:&SYSOPR=0,.end
|
||||
sta &SYSOPR
|
||||
.end
|
||||
MEND
|
||||
MACRO
|
||||
&lab pushlong &addr,&offset
|
||||
&lab ANOP
|
||||
LCLC &C
|
||||
LCLC &REST
|
||||
&C AMID &addr,1,1
|
||||
AIF "&C"="#",.immediate
|
||||
AIF "&C"="[",.zeropage
|
||||
AIF C:&offset=0,.nooffset
|
||||
AIF "&offset"="s",.stack
|
||||
pushword &addr+2,&offset
|
||||
pushword &addr,&offset
|
||||
MEXIT
|
||||
.nooffset
|
||||
pushword &addr+2
|
||||
pushword &addr
|
||||
MEXIT
|
||||
.immediate
|
||||
&REST AMID &addr,2,L:&addr-1
|
||||
dc I1'$F4',I2'(&REST)|-16'
|
||||
dc I1'$F4',I2'&REST'
|
||||
MEXIT
|
||||
.stack
|
||||
pushword &addr+2,s
|
||||
pushword &addr+2,s
|
||||
MEXIT
|
||||
.zeropage
|
||||
ldy #&offset+2
|
||||
pushword &addr,y
|
||||
ldy #&offset
|
||||
pushword &addr,y
|
||||
MEND
|
||||
MACRO
|
||||
&lab pushword &SYSOPR
|
||||
&lab ANOP
|
||||
AIF C:&SYSOPR=0,.b
|
||||
LCLC &C
|
||||
&C AMID "&SYSOPR",1,1
|
||||
AIF ("&C"="#").AND.(S:LONGA),.immediate
|
||||
lda &SYSOPR
|
||||
pha
|
||||
MEXIT
|
||||
.b
|
||||
pha
|
||||
MEXIT
|
||||
.immediate
|
||||
LCLC &REST
|
||||
LCLA &BL
|
||||
&BL ASEARCH "&SYSOPR"," ",1
|
||||
AIF &BL>0,.a
|
||||
&BL SETA L:&SYSOPR+1
|
||||
.a
|
||||
&REST AMID "&SYSOPR",2,&BL-2
|
||||
dc I1'$F4',I2'&REST'
|
||||
MEND
|
||||
MACRO
|
||||
&lab longm
|
||||
&lab ANOP
|
||||
rep #%00100000
|
||||
longa on
|
||||
MEND
|
||||
MACRO
|
||||
&lab shortm
|
||||
&lab ANOP
|
||||
sep #%00100000
|
||||
longa off
|
||||
MEND
|
||||
MACRO
|
||||
&lab killLdp
|
||||
&lab pld
|
||||
ply
|
||||
ply
|
||||
MEND
|
||||
MACRO
|
||||
&lab makeDP
|
||||
&lab phd
|
||||
tsc
|
||||
tcd
|
||||
MEND
|
||||
MACRO
|
||||
&LAB JEQ &BP
|
||||
&LAB BNE *+5
|
||||
BRL &BP
|
||||
MEND
|
||||
MACRO
|
||||
&lab Debug &string
|
||||
aif t:debugSymbols="G",.begin
|
||||
mexit
|
||||
.begin
|
||||
dc i1'$82'
|
||||
dc i2'(L:&string)+3'
|
||||
dc i2'$7771'
|
||||
dc i1'L:&string',C'&string'
|
||||
MEND
|
||||
MACRO
|
||||
&LAB JNE &BP
|
||||
&LAB BEQ *+5
|
||||
BRL &BP
|
||||
MEND
|
||||
macro
|
||||
&lab WordResult &zero
|
||||
&lab anop
|
||||
aif c:&zeros=1,.zero
|
||||
phd
|
||||
mexit
|
||||
.zero
|
||||
&lab pea $0000
|
||||
mend
|
||||
macro
|
||||
&lab LongResult &zeros
|
||||
&lab anop
|
||||
aif c:&zeros=1,.zeros
|
||||
phd
|
||||
phd
|
||||
mexit
|
||||
.zeros
|
||||
pea $0000
|
||||
pea $0000
|
||||
mend
|
||||
MACRO
|
||||
&lab _NewHandle
|
||||
&lab ldx #$0902
|
||||
jsl $E10000
|
||||
MEND
|
||||
macro
|
||||
&lab ~DisposeHandle &theHandle
|
||||
&lab ph4 &theHandle
|
||||
Tool $1002
|
||||
mend
|
||||
macro
|
||||
&lab ~GetCurResourceFile
|
||||
&lab WordResult
|
||||
Tool $121E
|
||||
mend
|
||||
macro
|
||||
&lab ph4 &addr,&offset
|
||||
&lab anop
|
||||
lclc &char
|
||||
&char amid &addr,1,1
|
||||
aif "&char"="@",.registers
|
||||
aif "&char"="*",.smartmacros
|
||||
aif "&char"="#",.immediate
|
||||
aif "&char"="<",.directPage
|
||||
aif "&char"="[",.zeropage
|
||||
aif c:&offset=0,.nooffset
|
||||
aif "&offset"="s",.stack
|
||||
.yesoffset
|
||||
lda &addr+2,&offset
|
||||
pha
|
||||
lda &addr,&offset
|
||||
pha
|
||||
mexit
|
||||
.nooffset
|
||||
lda &addr+2
|
||||
pha
|
||||
lda &addr
|
||||
pha
|
||||
mexit
|
||||
.stack
|
||||
lda &addr+2,s
|
||||
pha
|
||||
lda &addr,s
|
||||
pha
|
||||
mexit
|
||||
.registers
|
||||
phy
|
||||
phx
|
||||
mexit
|
||||
.smartmacros
|
||||
mexit
|
||||
.immediate
|
||||
&addr amid &addr,2,L:&addr-1
|
||||
pea +(&addr)|-16
|
||||
pea &addr
|
||||
mexit
|
||||
.directPage
|
||||
&addr amid &addr,2,L:&addr-1
|
||||
pei &addr+2
|
||||
pei &addr
|
||||
mexit
|
||||
.zeroPage
|
||||
aif C:&offset<>0,.zeroPageOffset
|
||||
ldy #2
|
||||
lda &addr,y
|
||||
pha
|
||||
lda &addr
|
||||
pha
|
||||
mexit
|
||||
.zeroPageOffset
|
||||
aif "&offset"="X",.zeroPageRegX
|
||||
aif "&offset"="Y",.zeroPageRegY
|
||||
aif "&offset"="x",.zeroPageRegX
|
||||
aif "&offset"="y",.zeroPageRegY
|
||||
ldy #&offset+2
|
||||
lda &addr,y
|
||||
pha
|
||||
ldy #&offset
|
||||
lda &addr,y
|
||||
pha
|
||||
mexit
|
||||
.zeroPageRegX
|
||||
lda &addr,&offset
|
||||
tay
|
||||
inx
|
||||
inx
|
||||
lda &addr,&offset
|
||||
pha
|
||||
phy
|
||||
mexit
|
||||
.zeroPageRegY
|
||||
lda &addr,&offset
|
||||
tax
|
||||
iny
|
||||
iny
|
||||
lda &addr,&offset
|
||||
pha
|
||||
phx
|
||||
mend
|
||||
MACRO
|
||||
&lab _SetCurResourceFile
|
||||
&lab ldx #$111E
|
||||
jsl $E10000
|
||||
MEND
|
||||
macro
|
||||
&lab ~SetCurResourceFile &fileID
|
||||
&lab ph2 &fileID
|
||||
Tool $111E
|
||||
mend
|
||||
MACRO
|
||||
DefineStack
|
||||
GBLA &DummyPC
|
||||
&DummyPC SETA 1
|
||||
MEND
|
||||
MACRO
|
||||
&lab BYTE
|
||||
&lab equ &DummyPC
|
||||
&DummyPC SETA &DummyPC+1
|
||||
MEND
|
||||
MACRO
|
||||
&lab WORD
|
||||
&lab equ &DummyPC
|
||||
&DummyPC SETA &DummyPC+2
|
||||
MEXIT
|
||||
MEND
|
||||
MACRO
|
||||
&lab BLOCK &Value
|
||||
AIF C:&lab=0,.skiplab
|
||||
&lab equ &DummyPC
|
||||
.skiplab
|
||||
&DummyPC SETA &DummyPC+&Value
|
||||
MEND
|
||||
MACRO
|
||||
&lab LONG
|
||||
&lab equ &DummyPC
|
||||
&DummyPC SETA &DummyPC+4
|
||||
MEND
|
||||
macro
|
||||
&lab ~HUnlock &theHandle
|
||||
&lab ph4 &theHandle
|
||||
Tool $2202
|
||||
mend
|
||||
macro
|
||||
&lab Tool &number
|
||||
&lab ldx #&number
|
||||
jsl $E10000
|
||||
mend
|
||||
MACRO
|
||||
&lab _NewControl2
|
||||
&lab ldx #$3110
|
||||
jsl $E10000
|
||||
MEND
|
||||
macro
|
||||
&lab ~GetHandleSize &theHandle
|
||||
&lab LongResult
|
||||
ph4 &theHandle
|
||||
Tool $1802
|
||||
mend
|
||||
macro
|
||||
&lab ~LoadResource &resourceType,&resourceID
|
||||
&lab LongResult
|
||||
ph2 &resourceType
|
||||
ph4 &resourceID
|
||||
Tool $0E1E
|
||||
mend
|
||||
macro
|
||||
&lab ~ReleaseResource &purgeLevel,&resourceType,&resourceID
|
||||
&lab ph2 &purgeLevel
|
||||
ph2 &resourceType
|
||||
ph4 &resourceID
|
||||
Tool $171E
|
||||
mend
|
||||
macro
|
||||
&lab ~LoadOneTool &toolNumber,&minVersion
|
||||
&lab ph2 &toolNumber
|
||||
ph2 &minVersion
|
||||
Tool $0F01
|
||||
mend
|
||||
macro
|
||||
&lab ph2 &addr,&offset
|
||||
&lab anop
|
||||
lclc &char
|
||||
&char amid "&addr",1,1
|
||||
aif "&char"="@",.accumulator
|
||||
aif "&char"="*",.smartmacros
|
||||
aif "&char"="#",.immediate
|
||||
aif "&char"="<",.directPage
|
||||
aif "&char"="[",.zeropage
|
||||
aif C:&offset=0,.nooffset
|
||||
aif "&offset"="s",.stack
|
||||
lda &addr,&offset
|
||||
pha
|
||||
mexit
|
||||
.nooffset
|
||||
lda &addr
|
||||
pha
|
||||
mexit
|
||||
.stack
|
||||
lda &addr,s
|
||||
pha
|
||||
mexit
|
||||
.smartmacros
|
||||
mexit
|
||||
.accumulator
|
||||
pha
|
||||
mexit
|
||||
.directPage
|
||||
&addr amid &addr,2,L:&addr-1
|
||||
pei &addr
|
||||
mexit
|
||||
.immediate
|
||||
&addr amid &addr,2,L:&addr-1
|
||||
pea &addr
|
||||
mexit
|
||||
.zeropage
|
||||
aif C:&offset<>0,.zeroPageOff
|
||||
lda &addr
|
||||
pha
|
||||
mexit
|
||||
.zeroPageOff
|
||||
aif "&offset"="X",.zeroPageReg
|
||||
aif "&offset"="Y",.ze
|
||||
oPageReg
|
||||
aif "&offset"="x",.zeroPageReg
|
||||
aif "&offset"="y",.zeroPageReg
|
||||
ldy #&offset
|
||||
lda &addr,y
|
||||
pha
|
||||
mexit
|
||||
.zeroPageReg
|
||||
lda &addr,&offset
|
||||
pha
|
||||
mend
|
||||
macro
|
||||
&lab ~GetCtlHandleFromID &ctlWindowPtr,&ctlID
|
||||
&lab LongResult
|
||||
ph4 &ctlWindowPtr
|
||||
ph4 &ctlID
|
||||
Tool $3010
|
||||
mend
|
||||
macro
|
||||
&lab ~NewHandle &blockSize,&userID,&attributes,&locationPtr
|
||||
&lab LongResult
|
||||
ph4 &blockSize
|
||||
ph2 &userID
|
||||
ph2 &attributes
|
||||
ph4 &locationPtr
|
||||
Tool $0902
|
||||
mend
|
||||
MACRO
|
||||
&lab _Multiply
|
||||
&lab ldx #$090B
|
||||
jsl $E10000
|
||||
MEND
|
||||
macro
|
||||
&lab ~HLock &theHandle
|
||||
&lab ph4 &theHandle
|
||||
Tool $2002
|
||||
mend
|
||||
MACRO
|
||||
&lab str &string
|
||||
&lab dc i1'L:&string',C'&string'
|
||||
MEND
|
||||
macro
|
||||
&lab ~UpdateResourceFile &fileID
|
||||
&lab ph2 &fileID
|
||||
Tool $0D1E
|
||||
mend
|
||||
MACRO
|
||||
&lab _PtrToHand
|
||||
&lab ldx #$2802
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _CloseGS ¶ms
|
||||
&lab jsl $E100A8
|
||||
dc i2"$2014"
|
||||
dc i4"¶ms"
|
||||
MEND
|
||||
MACRO
|
||||
&lab _OpenGS ¶ms
|
||||
&lab jsl $E100A8
|
||||
dc i2"$2010"
|
||||
dc i4"¶ms"
|
||||
MEND
|
||||
MACRO
|
||||
&lab _AddResource
|
||||
&lab ldx #$0C1E
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _RemoveResource
|
||||
&lab ldx #$0F1E
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab GSStr &GSstring
|
||||
&lab dc i2'L:&GSstring',C'&GSstring'
|
||||
MEND
|
||||
MACRO
|
||||
&lab _SetHandleSize
|
||||
&lab ldx #$1902
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _ReadGS ¶ms
|
||||
&lab jsl $E100A8
|
||||
dc i2"$2012"
|
||||
dc i4"¶ms"
|
||||
MEND
|
||||
MACRO
|
||||
&lab _DetachResource
|
||||
&lab ldx #$181E
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _DisposeControl
|
||||
&lab ldx #$0A10
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _HideControl
|
||||
&lab ldx #$0E10
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _SFShutDown
|
||||
&lab ldx #$0317
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _SFGetFile2
|
||||
&lab ldx #$0E17
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _SFStartUp
|
||||
&lab ldx #$0217
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _CompileText
|
||||
&lab ldx #$600E
|
||||
jsl $E10000
|
||||
MEND
|
||||
macro
|
||||
&lab ~UniqueResourceID &IDRange,&resourceType
|
||||
&lab LongResult
|
||||
ph2 &IDRange
|
||||
ph2 &resourceType
|
||||
Tool $191E
|
||||
mend
|
||||
macro
|
||||
&lab ~SFStatus
|
||||
&lab WordResult 0
|
||||
Tool $0617
|
||||
mend
|
||||
macro
|
||||
&lab ~RMLoadNamedResource &rType,&namePtr
|
||||
&lab LongResult
|
||||
PushWord &rType
|
||||
PushLong &namePtr
|
||||
Tool $2C1E
|
||||
mend
|
||||
macro
|
||||
&lab ~RMFindNamedResource &rType,&namePtr,&fileNumPtr
|
||||
&lab LongResult
|
||||
PushWord &rType
|
||||
PushLong &namePtr
|
||||
PushLong &fileNumPtr
|
||||
Tool $2A1E
|
||||
mend
|
||||
MACRO
|
||||
&lab _RMSetResourceName
|
||||
&lab ldx #$2D1E
|
||||
jsl $E10000
|
||||
MEND
|
||||
MACRO
|
||||
&lab _UnPackBytes
|
||||
&lab ldx #$2703
|
||||
jsl $E10000
|
||||
MEND
|
||||
macro
|
||||
&lab ~GetAddress &tableID
|
||||
&lab LongResult
|
||||
ph2 &tableID
|
||||
Tool $0904
|
||||
mend
|
||||
macro
|
||||
&lab ~UnloadOneTool &toolNumber
|
||||
&lab ph2 &toolNumber
|
||||
Tool $1001
|
||||
mend
|
||||
MACRO
|
||||
&lab _InvalCtls
|
||||
&lab ldx #$3710
|
||||
jsl $E10000
|
||||
MEND
|
26
source/twilight/ydi/sd/ydi.old.equ
Normal file
26
source/twilight/ydi/sd/ydi.old.equ
Normal file
@ -0,0 +1,26 @@
|
||||
*****************************************************************
|
||||
* Genesys created ASM65816 resource equates
|
||||
* Simple Software Systems International, Inc.
|
||||
* ORCAM.SCG 1.2
|
||||
*
|
||||
|
||||
Control_List GEQU $1003
|
||||
|
||||
EnterPathStrCtl GEQU $1
|
||||
PathLECtl GEQU $2
|
||||
SmartFindFileCtl GEQU $3
|
||||
CancelCtl GEQU $4
|
||||
OKCtl GEQU $5
|
||||
|
||||
SavedPathC1IStr GEQU $1
|
||||
|
||||
DefaultLEPathStr GEQU $1
|
||||
SmartFindFileStr GEQU $2
|
||||
CancelStr GEQU $3
|
||||
OKStr GEQU $5
|
||||
|
||||
EnterPath_LText GEQU $1
|
||||
|
||||
Configuration_Window GEQU $FFA
|
||||
|
||||
Configuration_Code GEQU $1
|
239
source/twilight/ydi/sd/ydi.old.rez
Normal file
239
source/twilight/ydi/sd/ydi.old.rez
Normal file
@ -0,0 +1,239 @@
|
||||
|
||||
#include "types.rez"
|
||||
|
||||
#define EnterPath_LText_CNT 60
|
||||
|
||||
// --- type $8003 defines
|
||||
#define Control_List $00001003
|
||||
// --- type $8004 defines
|
||||
#define EnterPathStrCtl $00000001
|
||||
#define PathLECtl $00000002
|
||||
#define SmartFindFileCtl $00000003
|
||||
#define CancelCtl $00000004
|
||||
#define OKCtl $00000005
|
||||
// --- type $8005 defines
|
||||
#define SavedPathC1IStr $00000001
|
||||
// --- type $8006 defines
|
||||
#define ModuleNameStr $00000001
|
||||
#define SmartFindFileStr $00000002
|
||||
#define CancelStr $00000003
|
||||
#define DefaultLEPathStr $00000004
|
||||
#define OKStr $00000005
|
||||
// --- type $800B defines
|
||||
#define EnterPath_LText $00000001
|
||||
// --- type $800E defines
|
||||
#define Configuration_Window $00000FFA
|
||||
// --- type $8017 defines
|
||||
#define Configuration_Code $00000001
|
||||
|
||||
// --- Version resource
|
||||
|
||||
resource rVersion (0x1, $0000) {
|
||||
{ $2,$1,$0,development,$1 }, // Version 2.1.0d1
|
||||
verUS, // US Version
|
||||
"Twilight II YouDrawIt Module", // program's name
|
||||
"Copyright 1991 Jim Maricondo." // copyright notice
|
||||
};
|
||||
|
||||
// --- Control List Definitions
|
||||
|
||||
resource rControlList (Control_List, $0000) {
|
||||
{
|
||||
EnterPathStrCtl, // control 1
|
||||
PathLECtl, // control 2
|
||||
SmartFindFileCtl, // control 3
|
||||
CancelCtl, // control 4
|
||||
OKCtl, // control 5
|
||||
};
|
||||
};
|
||||
|
||||
// --- Control Templates
|
||||
|
||||
resource rControlTemplate (EnterPathStrCtl, $0000) {
|
||||
$00000001, // ID
|
||||
{ 2, 12, 12,263}, // rect
|
||||
statTextControl {{
|
||||
$0000, // flag
|
||||
$1002, // moreFlags
|
||||
$00000000, // refCon
|
||||
EnterPath_LText, // textRef
|
||||
EnterPath_LText_CNT, // textSize
|
||||
$0000 // just
|
||||
}};
|
||||
};
|
||||
|
||||
resource rControlTemplate (PathLECtl, $0000) {
|
||||
$00000002, // ID
|
||||
{ 12, 10, 25,422}, // rect
|
||||
editLineControl {{
|
||||
$0000, // flag
|
||||
$7002, // moreFlags
|
||||
$00000000, // refCon
|
||||
$0041, // maxSize
|
||||
DefaultLEPathStr // defaultRef
|
||||
}};
|
||||
};
|
||||
|
||||
resource rControlTemplate (SmartFindFileCtl, $0000) {
|
||||
$00000003, // ID
|
||||
{ 30,128, 43,296}, // rect
|
||||
simpleButtonControl {{
|
||||
$0000, // flag
|
||||
$1002, // moreFlags
|
||||
$00000000, // refCon
|
||||
SmartFindFileStr // titleRef
|
||||
}};
|
||||
};
|
||||
|
||||
resource rControlTemplate (CancelCtl, $0000) {
|
||||
$00000004, // ID
|
||||
{ 30, 10, 43,100}, // rect
|
||||
simpleButtonControl {{
|
||||
$0000, // flag
|
||||
$3002, // moreFlags
|
||||
$00000000, // refCon
|
||||
CancelStr, // titleRef
|
||||
0, // colorTableRef
|
||||
{"\$1B", "\$1B",$0000,$0000} // key equivalents
|
||||
}};
|
||||
};
|
||||
|
||||
resource rControlTemplate (OKCtl, $0000) {
|
||||
$00000005, // ID
|
||||
{ 30,326, 43,416}, // rect
|
||||
simpleButtonControl {{
|
||||
$0001, // flag
|
||||
$3002, // moreFlags
|
||||
$00000000, // refCon
|
||||
OKStr, // titleRef
|
||||
0, // colorTableRef
|
||||
{"\$0D", "\$0D",$0000,$0000} // key equivalents
|
||||
}};
|
||||
};
|
||||
|
||||
// --- rC1InputString Templates
|
||||
|
||||
resource rC1InputString (SavedPathC1IStr, $0000) {
|
||||
""
|
||||
};
|
||||
|
||||
// --- rPString Templates
|
||||
|
||||
resource rPString (ModuleNameStr, $0000) {
|
||||
"YouDrawIt 2.1"
|
||||
};
|
||||
|
||||
resource rPString (SmartFindFileStr, $0000) {
|
||||
"SmartFind File"
|
||||
};
|
||||
|
||||
resource rPString (CancelStr, $0000) {
|
||||
"Cancel"
|
||||
};
|
||||
|
||||
resource rPString (DefaultLEPathStr, $0000) {
|
||||
""
|
||||
};
|
||||
resource rPString (OKStr, $0000) {
|
||||
"OK"
|
||||
};
|
||||
|
||||
// --- rTextForLETextBox2 Templates
|
||||
|
||||
resource rTextForLETextBox2 (EnterPath_LText, $0000) {
|
||||
"\$01"
|
||||
"J"
|
||||
"\$00"
|
||||
"\$00"
|
||||
"\$01"
|
||||
"L"
|
||||
"\$00"
|
||||
"\$00"
|
||||
"\$01"
|
||||
"R"
|
||||
"\$04"
|
||||
"\$00"
|
||||
"\$01"
|
||||
"F"
|
||||
"\$FE"
|
||||
"\$FF"
|
||||
"\$00"
|
||||
"\$08"
|
||||
"\$01"
|
||||
"C"
|
||||
"\$00"
|
||||
"\$00"
|
||||
"\$01"
|
||||
"B"
|
||||
"\$FF"
|
||||
"\$FF"
|
||||
"Pathname of animation file to use:"
|
||||
};
|
||||
|
||||
// --- Window Templates
|
||||
|
||||
resource rWindParam1 (Configuration_Window, $0000) {
|
||||
$20A0, // plFrame (frame bits)
|
||||
NIL, // plTitle (no Title)
|
||||
$00000000, // plRefCon
|
||||
{ 0, 0, 0, 0}, // plZoomRect
|
||||
NIL, // plColorTable (standard colors)
|
||||
{$0000, $0000}, // plYOrigin, plXOrigin
|
||||
{$0000, $0000}, // plDataHeight, plDataWidth
|
||||
{$0000, $0000}, // plMaxHeight, plMaxWidth
|
||||
{$0000, $0000}, // plVerScroll, plHorScroll
|
||||
{$0000, $0000}, // plVerPage, plHorPage
|
||||
$00000000, // plInfoText (info RefCon)
|
||||
$0000, // plInfoHeight
|
||||
{ 52,104,101,534}, // plPosition
|
||||
infront, // plPlane
|
||||
Control_List, // plControlList
|
||||
$0009 // plInDesc
|
||||
};
|
||||
|
||||
// --- Code resources
|
||||
|
||||
read rCodeResource (0x1,locked,convert) "YDI.config"; /* the config part */
|
||||
|
||||
data 0x8014 (0x18003) {
|
||||
$"0100 0100 0000 0310 0000 0C43 6F6E 7472" /* ...........Contr */
|
||||
$"6F6C 204C 6973 74" /* ol List */
|
||||
};
|
||||
|
||||
data 0x8014 (0x18004) {
|
||||
$"0100 0500 0000 0400 0000 0943 616E 6365" /* ...........Cance */
|
||||
$"6C43 746C 0100 0000 0F45 6E74 6572 5061" /* lCtl.....EnterPa */
|
||||
$"7468 5374 7243 746C 0500 0000 054F 4B43" /* thStrCtl.....OKC */
|
||||
$"746C 0200 0000 0950 6174 684C 4543 746C" /* tl.....PathLECtl */
|
||||
$"0300 0000 1053 6D61 7274 4669 6E64 4669" /* .....SmartFindFi */
|
||||
$"6C65 4374 6C" /* leCtl */
|
||||
};
|
||||
|
||||
data 0x8014 (0x18005) {
|
||||
$"0100 0100 0000 0100 0000 0F53 6176 6564" /* ...........Saved */
|
||||
$"5061 7468 4331 4953 7472" /* PathC1IStr */
|
||||
};
|
||||
|
||||
data 0x8014 (0x18006) {
|
||||
$"0100 0400 0000 0300 0000 0943 616E 6365" /* ...........Cance */
|
||||
$"6C53 7472 0100 0000 1044 6566 6175 6C74" /* lStr.....Default */
|
||||
$"4C45 5061 7468 5374 7205 0000 0005 4F4B" /* LEPathStr.....OK */
|
||||
$"5374 7202 0000 0010 536D 6172 7446 696E" /* Str.....SmartFin */
|
||||
$"6446 696C 6553 7472" /* dFileStr */
|
||||
};
|
||||
|
||||
data 0x8014 (0x1800B) {
|
||||
$"0100 0100 0000 0100 0000 0F45 6E74 6572" /* ...........Enter */
|
||||
$"5061 7468 204C 5465 7874" /* Path LText */
|
||||
};
|
||||
|
||||
data 0x8014 (0x1800E) {
|
||||
$"0100 0100 0000 FA0F 0000 1443 6F6E 6669" /* ...........Confi */
|
||||
$"6775 7261 7469 6F6E 2057 696E 646F 77" /* guration Window */
|
||||
};
|
||||
|
||||
data 0x8014 (0x18017) {
|
||||
$"0100 0100 0000 0100 0000 1243 6F6E 6669" /* ...........Confi */
|
||||
$"6775 7261 7469 6F6E 2043 6F64 65" /* guration Code */
|
||||
};
|
||||
|
256
source/twilight/ydi/sd/ydi.rez
Normal file
256
source/twilight/ydi/sd/ydi.rez
Normal file
@ -0,0 +1,256 @@
|
||||
|
||||
#include "types.rez"
|
||||
#include "22:t2common.rez"
|
||||
|
||||
// --- type $8001 defines
|
||||
#define YDI_Icon $10dd01
|
||||
// --- type $8003 defines
|
||||
#define YDI_CtlLst $00000005
|
||||
// --- type $8004 defines
|
||||
#define YDISetAnimPathCtl $00006FFF
|
||||
#define YDIAnimPathStrCtl $00007000
|
||||
#define YDIStrCtl $00007001
|
||||
#define YDIIconCtl $00007002
|
||||
// --- type $8006 defines
|
||||
#define YDISetAnimPathStr $00000011
|
||||
// --- type $800B defines
|
||||
#define YDI_LText $00000001
|
||||
#define AnimPath_LText $00000002
|
||||
|
||||
|
||||
resource rT2ModuleFlags (0x1) {
|
||||
setupSupported
|
||||
};
|
||||
|
||||
|
||||
// --- Module name resource
|
||||
|
||||
resource rPString (1) {
|
||||
"You Draw It!"
|
||||
};
|
||||
|
||||
|
||||
// --- About text resource
|
||||
|
||||
resource rTextForLETextBox2 ($0010DD01) {
|
||||
"\$01"
|
||||
"J"
|
||||
"\$00"
|
||||
"\$00"
|
||||
"\$01"
|
||||
"L"
|
||||
"\$00"
|
||||
"\$00"
|
||||
"\$01"
|
||||
"C"
|
||||
"\$11"
|
||||
"\$11"
|
||||
"\$01"
|
||||
"B"
|
||||
"\$FF"
|
||||
"\$FF"
|
||||
"The YouDrawIt! module allows you to create your own animations to"
|
||||
" be displayed when it's time to blank!"
|
||||
};
|
||||
|
||||
// --- Version resource
|
||||
|
||||
resource rVersion (0x1, $0000) {
|
||||
{ $1,$0,$0,beta,$1 }, // Version 1.0b1
|
||||
verUS, // US Version
|
||||
"Twilight II YouDrawIt! Module", // program's name
|
||||
"By Jim Maricondo.\n"
|
||||
"Copyright 1991, 1992 Jim Maricondo." // copyright notice
|
||||
};
|
||||
|
||||
|
||||
|
||||
// --- Icon Definitions
|
||||
|
||||
resource rIcon (YDI_Icon) {
|
||||
$8000, // kind
|
||||
$0014, // height
|
||||
$0016, // width
|
||||
|
||||
$"0000000000000000000000"
|
||||
$"0FFFFFFFFFFFFFFFFFFFF0"
|
||||
$"0F000000000000000000F0"
|
||||
$"0F0F0FC0FFFFFFFFFFF0F0"
|
||||
$"0F0F0FC0FFFFFFFFFFF0F0"
|
||||
$"0F0F0003FFFFFFFFFFF0F0"
|
||||
$"0F0F0880FFFFFFFFFFF0F0"
|
||||
$"0F0F0AA0FFFF888F8FF0F0"
|
||||
$"0F0FC0103FFAAAFAFFF0F0"
|
||||
$"0F0FFF000F1111111FF0F0"
|
||||
$"0F0FFFFFFFFFFFFFFFF0F0"
|
||||
$"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";
|
||||
};
|
||||
|
||||
// --- Control List Definitions
|
||||
|
||||
resource rControlList (YDI_CtlLst, $0000) {
|
||||
{
|
||||
YDIIconCtl, // control 3
|
||||
YDIStrCtl, // control 4
|
||||
// YDIAnimPathStrCtl, // control 5
|
||||
YDISetAnimPathCtl, // control 6
|
||||
};
|
||||
};
|
||||
|
||||
// --- Control Templates
|
||||
|
||||
resource rControlTemplate (YDISetAnimPathCtl, $0000) {
|
||||
$00000001, // ID
|
||||
{ 72, 92, 85,250}, // rect
|
||||
simpleButtonControl {{
|
||||
$0000, // flag
|
||||
$3002, // moreFlags
|
||||
$00000000, // refCon
|
||||
YDISetAnimPathStr, // titleRef
|
||||
0, // colorTableRef
|
||||
{"S","s",$0100,$0100} // key equivalents
|
||||
}};
|
||||
};
|
||||
|
||||
resource rControlTemplate (YDIAnimPathStrCtl, $0000) {
|
||||
$00000002, // ID
|
||||
{ 93, 12,125,331}, // rect
|
||||
statTextControl {{
|
||||
$0000, // flag
|
||||
$1002, // moreFlags
|
||||
$00000000, // refCon
|
||||
AnimPath_LText, // textRef
|
||||
NIL, // textSize
|
||||
$0000 // just
|
||||
}};
|
||||
};
|
||||
|
||||
resource rControlTemplate (YDIStrCtl, $0000) {
|
||||
$00000003, // ID
|
||||
{ 56,128, 64,247}, // rect
|
||||
statTextControl {{
|
||||
$0000, // flag
|
||||
$1002, // moreFlags
|
||||
$00000000, // refCon
|
||||
YDI_LText, // textRef
|
||||
NIL, // textSize
|
||||
$0000 // just
|
||||
}};
|
||||
};
|
||||
|
||||
resource rControlTemplate (YDIIconCtl, $0000) {
|
||||
$00000004, // ID
|
||||
{ 33,146, 53,194}, // rect
|
||||
iconButtonControl {{
|
||||
$000C, // flag
|
||||
$1020, // moreFlags
|
||||
$00000000, // refCon
|
||||
YDI_Icon, // iconRef
|
||||
0, // titleRef
|
||||
0, // colorTableRef
|
||||
$0000 // displayMode
|
||||
}};
|
||||
};
|
||||
|
||||
// --- rPString Templates
|
||||
|
||||
resource rPString (YDISetAnimPathStr, $0000) {
|
||||
"Set Animation Path"
|
||||
};
|
||||
|
||||
// --- rTextForLETextBox2 Templates
|
||||
|
||||
resource rTextForLETextBox2 (YDI_LText, $0000) {
|
||||
"You Draw It!"
|
||||
};
|
||||
|
||||
resource rTextForLETextBox2 (AnimPath_LText, $0000) {
|
||||
"\$01"
|
||||
"J"
|
||||
"\$00"
|
||||
"\$00"
|
||||
"\$01"
|
||||
"L"
|
||||
"\$00"
|
||||
"\$00"
|
||||
"\$01"
|
||||
"R"
|
||||
"\$04"
|
||||
"\$00"
|
||||
"\$01"
|
||||
"F"
|
||||
"\$FE"
|
||||
"\$FF"
|
||||
"\$02"
|
||||
"\$08"
|
||||
"\$01"
|
||||
"C"
|
||||
"\$00"
|
||||
"\$00"
|
||||
"\$01"
|
||||
"B"
|
||||
"\$FF"
|
||||
"\$FF"
|
||||
"Animation Path:"
|
||||
"\$01"
|
||||
"F"
|
||||
"\$FE"
|
||||
"\$FF"
|
||||
"\$00"
|
||||
"\$08"
|
||||
"\$01"
|
||||
"C"
|
||||
"\$00"
|
||||
"\$00"
|
||||
"\$01"
|
||||
"B"
|
||||
"\$FF"
|
||||
"\$FF"
|
||||
" "
|
||||
"\$D2"
|
||||
"*0"
|
||||
"\$D3"
|
||||
"\$01"
|
||||
"F"
|
||||
"\$FE"
|
||||
"\$FF"
|
||||
"\$00"
|
||||
"\$08"
|
||||
"\$01"
|
||||
"C"
|
||||
"\$00"
|
||||
"\$00"
|
||||
"\$01"
|
||||
"B"
|
||||
"\$FF"
|
||||
"\$FF"
|
||||
};
|
245
source/twilight/ydi/sd/ydi.rez.b
Normal file
245
source/twilight/ydi/sd/ydi.rez.b
Normal file
@ -0,0 +1,245 @@
|
||||
|
||||
#include "types.rez"
|
||||
#include ":jim4:dya:twilight:t2common.rez"
|
||||
|
||||
// --- type $8001 defines
|
||||
#define YDI_Icon $10dd01
|
||||
// --- type $8003 defines
|
||||
#define YDI_CtlLst $00000005
|
||||
// --- type $8004 defines
|
||||
#define YDISetAnimPathCtl $00006FFF
|
||||
#define YDIAnimPathStrCtl $00007000
|
||||
#define YDIStrCtl $00007001
|
||||
#define YDIIconCtl $00007002
|
||||
// --- type $8006 defines
|
||||
#define YDISetAnimPathStr $00000011
|
||||
// --- type $800B defines
|
||||
#define YDI_LText $00000001
|
||||
#define AnimPath_LText $00000002
|
||||
|
||||
|
||||
resource rT2ModuleFlags (moduleFlags) {
|
||||
fSetupSupported+fWantFadeOut+fWantFadeIn+fForceLoadSetupAtBlank
|
||||
};
|
||||
|
||||
|
||||
// --- Module name resource
|
||||
|
||||
resource rPString (moduleName) {
|
||||
"YouDrawIt!"
|
||||
};
|
||||
|
||||
|
||||
// --- About text resource
|
||||
|
||||
resource rTextForLETextBox2 (moduleMessage) {
|
||||
TBLeftJust
|
||||
// TBLeftMargin
|
||||
// "\$00\$00"
|
||||
TBForeColor TBColor1
|
||||
TBBackColor TBColorF
|
||||
"The YouDrawIt! module allows you to create your own animations to"
|
||||
" be displayed when it's time to blank!"
|
||||
};
|
||||
|
||||
// --- Version resource
|
||||
|
||||
resource rVersion (moduleVersion) {
|
||||
{ $1,$0,$0,beta,$3 }, // Version 1.0b3
|
||||
verUS, // US Version
|
||||
"Twilight II YouDrawIt! Module", // program's name
|
||||
"By Jim Maricondo.\n"
|
||||
"Copyright 1991, 1992 Jim Maricondo." // copyright notice
|
||||
};
|
||||
|
||||
|
||||
|
||||
// --- Icon Definitions
|
||||
|
||||
resource rIcon (moduleIcon) {
|
||||
$8000, // kind
|
||||
$0014, // height
|
||||
$0016, // width
|
||||
|
||||
$"0000000000000000000000"
|
||||
$"0FFFFFFFFFFFFFFFFFFFF0"
|
||||
$"0F000000000000000000F0"
|
||||
$"0F0F0FC0FFFFFFFFFFF0F0"
|
||||
$"0F0F0FC0FFFFFFFFFFF0F0"
|
||||
$"0F0F0003FFFFFFFFFFF0F0"
|
||||
$"0F0F0880FFFFFFFFFFF0F0"
|
||||
$"0F0F0AA0FFFF888F8FF0F0"
|
||||
$"0F0FC0103FFAAAFAFFF0F0"
|
||||
$"0F0FFF000F1111111FF0F0"
|
||||
$"0F0FFFFFFFFFFFFFFFF0F0"
|
||||
$"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";
|
||||
};
|
||||
|
||||
// --- Control List Definitions
|
||||
|
||||
resource rControlList (YDI_CtlLst, $0000) {
|
||||
{
|
||||
YDIIconCtl, // control 3
|
||||
YDIStrCtl, // control 4
|
||||
// YDIAnimPathStrCtl, // control 5
|
||||
YDISetAnimPathCtl, // control 6
|
||||
};
|
||||
};
|
||||
|
||||
// --- Control Templates
|
||||
|
||||
resource rControlTemplate (YDISetAnimPathCtl, $0000) {
|
||||
$00000001, // ID
|
||||
{ 72, 92, 85,250}, // rect
|
||||
simpleButtonControl {{
|
||||
$0000, // flag
|
||||
$3002, // moreFlags
|
||||
$00000000, // refCon
|
||||
YDISetAnimPathStr, // titleRef
|
||||
0, // colorTableRef
|
||||
{"S","s",$0100,$0100} // key equivalents
|
||||
}};
|
||||
};
|
||||
|
||||
resource rControlTemplate (YDIAnimPathStrCtl, $0000) {
|
||||
$00000002, // ID
|
||||
{ 93, 12,125,331}, // rect
|
||||
statTextControl {{
|
||||
$0000, // flag
|
||||
$1002, // moreFlags
|
||||
$00000000, // refCon
|
||||
AnimPath_LText, // textRef
|
||||
NIL, // textSize
|
||||
$0000 // just
|
||||
}};
|
||||
};
|
||||
|
||||
resource rControlTemplate (YDIStrCtl, $0000) {
|
||||
$00000003, // ID
|
||||
{ 56,128, 64,247}, // rect
|
||||
statTextControl {{
|
||||
$0000, // flag
|
||||
$1002, // moreFlags
|
||||
$00000000, // refCon
|
||||
YDI_LText, // textRef
|
||||
NIL, // textSize
|
||||
$0000 // just
|
||||
}};
|
||||
};
|
||||
|
||||
resource rControlTemplate (YDIIconCtl, $0000) {
|
||||
$00000004, // ID
|
||||
{ 33,146, 53,194}, // rect
|
||||
iconButtonControl {{
|
||||
$000C, // flag
|
||||
$1020, // moreFlags
|
||||
$00000000, // refCon
|
||||
YDI_Icon, // iconRef
|
||||
0, // titleRef
|
||||
0, // colorTableRef
|
||||
$0000 // displayMode
|
||||
}};
|
||||
};
|
||||
|
||||
// --- rPString Templates
|
||||
|
||||
resource rPString (YDISetAnimPathStr, $0000) {
|
||||
"Set Animation Path"
|
||||
};
|
||||
|
||||
// --- rTextForLETextBox2 Templates
|
||||
|
||||
resource rTextForLETextBox2 (YDI_LText, $0000) {
|
||||
"You Draw It!"
|
||||
};
|
||||
|
||||
resource rTextForLETextBox2 (AnimPath_LText, $0000) {
|
||||
"\$01"
|
||||
"J"
|
||||
"\$00"
|
||||
"\$00"
|
||||
"\$01"
|
||||
"L"
|
||||
"\$00"
|
||||
"\$00"
|
||||
"\$01"
|
||||
"R"
|
||||
"\$04"
|
||||
"\$00"
|
||||
"\$01"
|
||||
"F"
|
||||
"\$FE"
|
||||
"\$FF"
|
||||
"\$02"
|
||||
"\$08"
|
||||
"\$01"
|
||||
"C"
|
||||
"\$00"
|
||||
"\$00"
|
||||
"\$01"
|
||||
"B"
|
||||
"\$FF"
|
||||
"\$FF"
|
||||
"Animation Path:"
|
||||
"\$01"
|
||||
"F"
|
||||
"\$FE"
|
||||
"\$FF"
|
||||
"\$00"
|
||||
"\$08"
|
||||
"\$01"
|
||||
"C"
|
||||
"\$00"
|
||||
"\$00"
|
||||
"\$01"
|
||||
"B"
|
||||
"\$FF"
|
||||
"\$FF"
|
||||
" "
|
||||
"\$D2"
|
||||
"*0"
|
||||
"\$D3"
|
||||
"\$01"
|
||||
"F"
|
||||
"\$FE"
|
||||
"\$FF"
|
||||
"\$00"
|
||||
"\$08"
|
||||
"\$01"
|
||||
"C"
|
||||
"\$00"
|
||||
"\$00"
|
||||
"\$01"
|
||||
"B"
|
||||
"\$FF"
|
||||
"\$FF"
|
||||
};
|
17
source/twilight/ydi/sfd/read.me
Normal file
17
source/twilight/ydi/sfd/read.me
Normal file
@ -0,0 +1,17 @@
|
||||
Sorry it took so long to get this to you--I kinda forgot about it <blush>
|
||||
|
||||
This draw routine is not and end-all-be-all drawing routine. To be completely
|
||||
correct I should be checking the memberFlag and dimming the item if it is not
|
||||
selectable. But, since I know that my filter doesn't allow files to be dimmed,
|
||||
it only displays selectable files, I know that I could remove that code.
|
||||
|
||||
Let me know if you want code to draw filenames dimmed (it is in a technote
|
||||
somewhere--under fast list draws I think).
|
||||
|
||||
Also, to do this the best way, I'd probably also use GetSysIcon for things like
|
||||
the folder icon--but this app that I stole the code from also runs under 5.0.4
|
||||
so I couldn't use it.
|
||||
|
||||
In any case, let me know if you have any problems!
|
||||
|
||||
Bryan
|
453
source/twilight/ydi/sfd/sfdraw
Normal file
453
source/twilight/ydi/sfd/sfdraw
Normal file
@ -0,0 +1,453 @@
|
||||
; ************************************ 6/23/92 5:01:08 PM ***
|
||||
; *
|
||||
; * Subroutine: DrawSFDialog
|
||||
; *
|
||||
; *************************************************************
|
||||
|
||||
DrawSFDialog start
|
||||
name DrawSFDialog
|
||||
using Globals
|
||||
|
||||
DefineStack long
|
||||
clipHndl long
|
||||
clipPtr long
|
||||
ctlPtr long
|
||||
atype long
|
||||
ftype word
|
||||
xx word
|
||||
yy word
|
||||
iconOffset word
|
||||
nameOffset word
|
||||
endlocals
|
||||
|
||||
FixStack
|
||||
|
||||
begparms
|
||||
itemDrawPtr long
|
||||
endparms
|
||||
|
||||
reserved block 24
|
||||
ctlHandle long
|
||||
memberPtr long
|
||||
theRect long
|
||||
|
||||
BeginStack
|
||||
|
||||
*--------------------------------------------------------------
|
||||
* fix offsets depending on graphics mode:
|
||||
*--------------------------------------------------------------
|
||||
ldx #6 ; offset for icon
|
||||
lda #22 ; offset for filename
|
||||
ldy grafmode ; are we 320 or 640 mode?
|
||||
bne setoffsets
|
||||
lsr a ; halve offsets since we are in
|
||||
ldx #3 ; 320 mode
|
||||
|
||||
setoffsets stx iconOffset
|
||||
sta nameOffset
|
||||
|
||||
*--------------------------------------------------------------
|
||||
* calculate where we need to be in order to draw:
|
||||
*--------------------------------------------------------------
|
||||
~GetClipHandle
|
||||
pll clipHndl
|
||||
|
||||
dref clipHndl,clipPtr
|
||||
|
||||
lda [theRect]
|
||||
dec a
|
||||
ldy #orgnBBox+obottom
|
||||
cmp [clipPtr],y
|
||||
blt skip2
|
||||
brl noDraw
|
||||
skip2 ldy #obottom
|
||||
lda [theRect],y
|
||||
inc a
|
||||
ldy #orgnBBox+otop
|
||||
cmp [clipPtr],y
|
||||
bltl noDraw
|
||||
|
||||
noTest ~EraseRect <theRect
|
||||
|
||||
ldy #oleft
|
||||
lda [theRect],y
|
||||
adc iconOffset
|
||||
sta <xx
|
||||
|
||||
ldy #obottom
|
||||
lda [theRect],y
|
||||
sec
|
||||
sbc #9
|
||||
sta <yy
|
||||
|
||||
lda [itemDrawPtr]
|
||||
and #$FF
|
||||
inc a
|
||||
tay
|
||||
|
||||
lda [itemDrawPtr],y ; get filetype
|
||||
cmp #$0F
|
||||
beq onFolder
|
||||
cmp #$06
|
||||
beq onBinary
|
||||
cmp #$C0
|
||||
beq onGraphic
|
||||
cmp #$C1
|
||||
bne onSound
|
||||
|
||||
onGraphic lxy #iconGraphic
|
||||
bra drawIcon
|
||||
|
||||
onBinary lxy #iconBinary
|
||||
bra drawIcon
|
||||
|
||||
onFolder lxy #iconFolder
|
||||
bra drawIcon
|
||||
|
||||
onSound lxy #iconSound
|
||||
|
||||
drawIcon ~DrawIcon @,#0,<xx,<yy
|
||||
|
||||
phl [memberPtr]
|
||||
|
||||
lda <xx
|
||||
adc nameOffset
|
||||
pha
|
||||
|
||||
lda <yy
|
||||
adc #7
|
||||
pha
|
||||
|
||||
sec
|
||||
ldy #oright
|
||||
lda [theRect],y
|
||||
sbc 3,s
|
||||
pha
|
||||
|
||||
jsl DrawStringAt2 ; DrawStringAt(theString,x,y)
|
||||
|
||||
noDraw EndStack
|
||||
rtl
|
||||
end
|
||||
|
||||
|
||||
*--------------------------------------------------------------
|
||||
* Here is the same routine listed so that you can see the
|
||||
* direct page offsets and what-not...
|
||||
*--------------------------------------------------------------
|
||||
|
||||
Pass 1: DrawSFDialog
|
||||
Pass 2: DrawSFDialog
|
||||
1552 0012 list on
|
||||
1553 0012 gen on
|
||||
1554 0012
|
||||
1555 0012 DefineStack long
|
||||
1556 0012 clipHndl long
|
||||
0012 +clipHndl equ 1
|
||||
1557 0012 clipPtr long
|
||||
0012 +clipPtr equ 5
|
||||
1558 0012 ctlPtr long
|
||||
0012 +ctlPtr equ 9
|
||||
1559 0012 atype long
|
||||
0012 +atype equ 13
|
||||
1560 0012 ftype word
|
||||
0012 +ftype equ 17
|
||||
1561 0012 xx word
|
||||
0012 +xx equ 19
|
||||
1562 0012 yy word
|
||||
0012 +yy equ 21
|
||||
1563 0012 iconOffset word
|
||||
0012 +iconOffset equ 23
|
||||
1564 0012 nameOffset word
|
||||
0012 +nameOffset equ 25
|
||||
1565 0012 endlocals
|
||||
0012 +sizeLocals equ 27-1
|
||||
1566 0012
|
||||
1567 0012 FixStack
|
||||
1568 0012
|
||||
1569 0012 begparms
|
||||
1570 0012 itemDrawPtr long
|
||||
0012 +itemDrawPtr equ 33
|
||||
1571 0012 endparms
|
||||
0012 +sizeParms equ 37-33
|
||||
1572 0012
|
||||
1573 0012 reserved block 24
|
||||
0012 +reserved equ 37
|
||||
1574 0012 ctlHandle long
|
||||
0012 +ctlHandle equ 61
|
||||
1575 0012 memberPtr long
|
||||
0012 +memberPtr equ 65
|
||||
1576 0012 theRect long
|
||||
0012 +theRect equ 69
|
||||
1577 0012
|
||||
1578 0012 BeginStack
|
||||
0012 + anop
|
||||
0012 0B + phd
|
||||
0013 8B + phb
|
||||
0014 4B + phk
|
||||
0015 AB + plb
|
||||
0016 3B + tsc
|
||||
0017 38 + sec
|
||||
0018 E9 1A 00 + sbc #sizeLocals
|
||||
001B 1B + tcs
|
||||
001C 5B + tcd
|
||||
1579 001D
|
||||
1580 001D *--------------------------------------------------------------
|
||||
1581 001D * fix offsets depending on graphics mode:
|
||||
1582 001D *--------------------------------------------------------------
|
||||
1583 001D A2 06 00 ldx #6
|
||||
1584 0020 A9 16 00 lda #22
|
||||
1585 0023 AC 00 80 ldy grafmode
|
||||
1586 0026 D0 04 bne setoffsets
|
||||
1587 0028 4A lsr a
|
||||
1588 0029 A2 03 00 ldx #3
|
||||
1589 002C
|
||||
1590 002C 86 17 setoffsets stx iconOffset
|
||||
1591 002E 85 19 sta nameOffset
|
||||
1592 0030
|
||||
1593 0030 *--------------------------------------------------------------
|
||||
1594 0030 * calculate where we need to be in order to draw:
|
||||
1595 0030 *--------------------------------------------------------------
|
||||
1596 0030 ~GetClipHandle
|
||||
0030 + longSpace
|
||||
0030 + anop
|
||||
0030 48 + pha
|
||||
0031 48 + pha
|
||||
0032 + Tool $C704
|
||||
0032 A2 04 C7 + ldx #$C704
|
||||
0035 22 00 00 E1 + jsl $E10000
|
||||
1597 0039 pll clipHndl
|
||||
0039 + anop
|
||||
0039 FA + plx
|
||||
003A 86 01 + stx clipHndl
|
||||
003C FA + plx
|
||||
003D 86 03 + stx clipHndl+2
|
||||
1598 003F
|
||||
1599 003F dref clipHndl,clipPtr
|
||||
003F A0 02 00 + ldy #2
|
||||
0042 A7 01 + lda [clipHndl]
|
||||
0044 AA + tax
|
||||
0045 B7 01 + lda [clipHndl],y
|
||||
0047 86 05 + stx clipPtr
|
||||
0049 85 07 + sta clipPtr+2
|
||||
1600 004B
|
||||
1601 004B A7 45 lda [theRect]
|
||||
1602 004D 3A dec a
|
||||
1603 004E A0 06 00 ldy #orgnBBox+obottom
|
||||
1604 0051 D7 05 cmp [clipPtr],y
|
||||
1605 0053 90 03 blt skip2
|
||||
1606 0055 82 9B 00 brl noDraw
|
||||
1607 0058 A0 04 00 skip2 ldy #obottom
|
||||
1608 005B B7 45 lda [theRect],y
|
||||
1609 005D 1A inc a
|
||||
1610 005E A0 02 00 ldy #orgnBBox+otop
|
||||
1611 0061 D7 05 cmp [clipPtr],y
|
||||
1612 0063 bltl noDraw
|
||||
0063 B0 03 + bge *+5
|
||||
0065 82 8B 00 + brl noDraw
|
||||
1613 0068
|
||||
1614 0068 noTest ~EraseRect <theRect
|
||||
0068 +noTest phl <theRect
|
||||
0068 +noTest anop
|
||||
0068 D4 47 + pei theRect+2
|
||||
006A D4 45 + pei theRect
|
||||
006C + Tool $5504
|
||||
006C A2 04 55 + ldx #$5504
|
||||
006F 22 00 00 E1 + jsl $E10000
|
||||
1615 0073
|
||||
1616 0073 A0 02 00 ldy #oleft
|
||||
1617 0076 B7 45 lda [theRect],y
|
||||
1618 0078 65 17 adc iconOffset
|
||||
1619 007A 85 13 sta <xx
|
||||
1620 007C
|
||||
1621 007C A0 04 00 ldy #obottom
|
||||
1622 007F B7 45 lda [theRect],y
|
||||
1623 0081 38 sec
|
||||
1624 0082 E9 09 00 sbc #9
|
||||
1625 0085 85 15 sta <yy
|
||||
1626 0087
|
||||
1627 0087 A7 21 lda [itemDrawPtr]
|
||||
1628 0089 29 FF 00 and #$FF
|
||||
1629 008C 1A inc a
|
||||
1630 008D A8 tay
|
||||
1631 008E
|
||||
1632 008E B7 21 lda [itemDrawPtr],y ; get filetype
|
||||
1633 0090 C9 0F 00 cmp #$0F
|
||||
1634 0093 F0 1F beq onFolder
|
||||
1635 0095 C9 06 00 cmp #$06
|
||||
1636 0098 F0 12 beq onBinary
|
||||
1637 009A C9 C0 00 cmp #$C0
|
||||
1638 009D F0 05 beq onGraphic
|
||||
1639 009F C9 C1 00 cmp #$C1
|
||||
1640 00A2 D0 18 bne onSound
|
||||
1641 00A4
|
||||
1642 00A4 onGraphic lxy #iconGraphic
|
||||
00A4 +onGraphic anop
|
||||
00A4 A2 00 80 + ldx #(iconGraphic)
|
||||
00A7 A0 00 00 + ldy #(iconGraphic)|-16
|
||||
1643 00AA 80 16 bra drawIcon
|
||||
1644 00AC
|
||||
1645 00AC onBinary lxy #iconBinary
|
||||
00AC +onBinary anop
|
||||
00AC A2 00 80 + ldx #(iconBinary)
|
||||
00AF A0 00 00 + ldy #(iconBinary)|-16
|
||||
1646 00B2 80 0E bra drawIcon
|
||||
1647 00B4
|
||||
1648 00B4 onFolder lxy #iconFolder
|
||||
00B4 +onFolder anop
|
||||
00B4 A2 00 80 + ldx #(iconFolder)
|
||||
00B7 A0 00 00 + ldy #(iconFolder)|-16
|
||||
1649 00BA 80 06 bra drawIcon
|
||||
1650 00BC
|
||||
1651 00BC onSound lxy #iconSound
|
||||
00BC +onSound anop
|
||||
00BC A2 00 80 + ldx #(iconSound)
|
||||
00BF A0 00 00 + ldy #(iconSound)|-16
|
||||
1652 00C2
|
||||
1653 00C2 drawIcon ~DrawIcon @,#0,<xx,<yy
|
||||
00C2 +drawIcon phl @
|
||||
00C2 +drawIcon anop
|
||||
00C2 5A + phy
|
||||
00C3 DA + phx
|
||||
00C4 + phw #0
|
||||
00C4 + anop
|
||||
00C4 F4 00 00 + pea 0
|
||||
00C7 + phw <xx
|
||||
00C7 + anop
|
||||
00C7 D4 13 + pei xx
|
||||
00C9 + phw <yy
|
||||
00C9 + anop
|
||||
00C9 D4 15 + pei yy
|
||||
00CB + Tool $0B12
|
||||
00CB A2 12 0B + ldx #$0B12
|
||||
00CE 22 00 00 E1 + jsl $E10000
|
||||
1654 00D2
|
||||
1655 00D2 phl [memberPtr]
|
||||
00D2 + anop
|
||||
00D2 A0 02 00 + ldy #2
|
||||
00D5 B7 41 + lda [memberPtr],y
|
||||
00D7 48 + pha
|
||||
00D8 A7 41 + lda [memberPtr]
|
||||
00DA 48 + pha
|
||||
1656 00DB
|
||||
1657 00DB A5 13 lda <xx
|
||||
1658 00DD 65 19 adc nameOffset
|
||||
1659 00DF 48 pha
|
||||
1660 00E0
|
||||
1661 00E0 A5 15 lda <yy
|
||||
1662 00E2 69 07 00 adc #7
|
||||
1663 00E5 48 pha
|
||||
1664 00E6
|
||||
1665 00E6 38 sec
|
||||
1666 00E7 A0 06 00 ldy #oright
|
||||
1667 00EA B7 45 lda [theRect],y
|
||||
1668 00EC E3 03 sbc 3,s
|
||||
1669 00EE 48 pha
|
||||
1670 00EF
|
||||
1671 00EF 22 00 80 00 jsl DrawStringAt2
|
||||
1672 00F3
|
||||
1673 00F3 noDraw EndStack
|
||||
00F3 +noDraw anop
|
||||
00F3 3B + tsc
|
||||
00F4 18 + clc
|
||||
00F5 69 1A 00 + adc #sizeLocals
|
||||
00F8 1B + tcs
|
||||
00F9 AB + plb
|
||||
00FA 2B + pld
|
||||
00FB A3 02 + lda 2,s
|
||||
00FD 83 06 + sta 2+sizeParms,s
|
||||
00FF A3 01 + lda 1,s
|
||||
0101 83 05 + sta 1+sizeParms,s
|
||||
0103 3B + tsc
|
||||
0104 69 04 00 + adc #sizeParms
|
||||
0107 1B + tcs
|
||||
1674 0108 6B rtl
|
||||
1675 0109 end
|
||||
|
||||
|
||||
*--------------------------------------------------------------
|
||||
* here are my icons...
|
||||
*--------------------------------------------------------------
|
||||
iconSound dc i'$8000'
|
||||
dc i'$0020'
|
||||
dc i'$0008'
|
||||
dc i'$0008'
|
||||
dc h'FFFFC00F'
|
||||
dc h'FFFC051F'
|
||||
dc h'0000451F'
|
||||
dc h'08E6451F'
|
||||
dc h'08E6451F'
|
||||
dc h'0000451F'
|
||||
dc h'FFFC051F'
|
||||
dc h'FFFFC00F'
|
||||
dc h'0000FFF0'
|
||||
dc h'000FFFF0'
|
||||
dc h'FFFFFFF0'
|
||||
dc h'FFFFFFF0'
|
||||
dc h'FFFFFFF0'
|
||||
dc h'FFFFFFF0'
|
||||
dc h'000FFFF0'
|
||||
dc h'0000FFF0'
|
||||
|
||||
iconFolder dc i'$0000'
|
||||
dc i'$0020'
|
||||
dc i'$0008'
|
||||
dc i'$0008'
|
||||
dc h'FFFFFFFF'
|
||||
dc h'F000FFFF'
|
||||
dc h'0EEE0000'
|
||||
dc h'0EEEEEE0'
|
||||
dc h'0EEEEEE0'
|
||||
dc h'0EEEEEE0'
|
||||
dc h'00000000'
|
||||
dc h'FFFFFFFF'
|
||||
dc h'00000000'
|
||||
dc h'0FFF0000'
|
||||
dc h'FFFFFFFF'
|
||||
dc h'FFFFFFFF'
|
||||
dc h'FFFFFFFF'
|
||||
dc h'FFFFFFFF'
|
||||
dc h'FFFFFFFF'
|
||||
dc h'00000000'
|
||||
|
||||
iconGraphic dc i'$8000'
|
||||
dc i'$0020'
|
||||
dc i'$0008'
|
||||
dc i'$0008'
|
||||
dc h'0000000F'
|
||||
dc h'0F00F0F0'
|
||||
dc h'0F00F000'
|
||||
dc h'0F33FFF0'
|
||||
dc h'0F44FFF0'
|
||||
dc h'0FC44430'
|
||||
dc h'0FFFFFF0'
|
||||
dc h'00000000'
|
||||
dc h'FFFFFFF0'
|
||||
dc h'FFFFFFFF'
|
||||
dc h'FFFFFFFF'
|
||||
dc h'FFFFFFFF'
|
||||
dc h'FFFFFFFF'
|
||||
dc h'FFFFFFFF'
|
||||
dc h'FFFFFFFF'
|
||||
dc h'FFFFFFFF'
|
||||
|
||||
iconBinary dc i'$8000'
|
||||
dc i'$0020'
|
||||
dc i'$0008'
|
||||
dc i'$0008'
|
||||
dc h'0000000F'
|
||||
dc h'0FFFF0F0'
|
||||
dc h'0F1FF000'
|
||||
dc h'0FFFFFF0'
|
||||
dc h'0F1F1FF0'
|
||||
dc h'0F1F1FF0'
|
||||
dc h'0FFFFFF0'
|
||||
dc h'00000000'
|
||||
dc h'FFFFFFF0'
|
||||
dc h'FFFFFFFF'
|
||||
dc h'FFFFFFFF'
|
||||
dc h'FFFFFFFF'
|
||||
dc h'FFFFFFFF'
|
||||
dc h'FFFFFFFF'
|
||||
dc h'FFFFFFFF'
|
||||
dc h'FFFFFFFF'
|
453
source/twilight/ydi/sfdraw
Normal file
453
source/twilight/ydi/sfdraw
Normal file
@ -0,0 +1,453 @@
|
||||
; ************************************ 6/23/92 5:01:08 PM ***
|
||||
; *
|
||||
; * Subroutine: DrawSFDialog
|
||||
; *
|
||||
; *************************************************************
|
||||
|
||||
DrawSFDialog start
|
||||
name DrawSFDialog
|
||||
using Globals
|
||||
|
||||
DefineStack long
|
||||
clipHndl long
|
||||
clipPtr long
|
||||
ctlPtr long
|
||||
atype long
|
||||
ftype word
|
||||
xx word
|
||||
yy word
|
||||
iconOffset word
|
||||
nameOffset word
|
||||
endlocals
|
||||
|
||||
FixStack
|
||||
|
||||
begparms
|
||||
itemDrawPtr long
|
||||
endparms
|
||||
|
||||
reserved block 24
|
||||
ctlHandle long
|
||||
memberPtr long
|
||||
theRect long
|
||||
|
||||
BeginStack
|
||||
|
||||
*--------------------------------------------------------------
|
||||
* fix offsets depending on graphics mode:
|
||||
*--------------------------------------------------------------
|
||||
ldx #6 ; offset for icon
|
||||
lda #22 ; offset for filename
|
||||
ldy grafmode ; are we 320 or 640 mode?
|
||||
bne setoffsets
|
||||
lsr a ; halve offsets since we are in
|
||||
ldx #3 ; 320 mode
|
||||
|
||||
setoffsets stx iconOffset
|
||||
sta nameOffset
|
||||
|
||||
*--------------------------------------------------------------
|
||||
* calculate where we need to be in order to draw:
|
||||
*--------------------------------------------------------------
|
||||
~GetClipHandle
|
||||
pll clipHndl
|
||||
|
||||
dref clipHndl,clipPtr
|
||||
|
||||
lda [theRect]
|
||||
dec a
|
||||
ldy #orgnBBox+obottom
|
||||
cmp [clipPtr],y
|
||||
blt skip2
|
||||
brl noDraw
|
||||
skip2 ldy #obottom
|
||||
lda [theRect],y
|
||||
inc a
|
||||
ldy #orgnBBox+otop
|
||||
cmp [clipPtr],y
|
||||
bltl noDraw
|
||||
|
||||
noTest ~EraseRect <theRect
|
||||
|
||||
ldy #oleft
|
||||
lda [theRect],y
|
||||
adc iconOffset
|
||||
sta <xx
|
||||
|
||||
ldy #obottom
|
||||
lda [theRect],y
|
||||
sec
|
||||
sbc #9
|
||||
sta <yy
|
||||
|
||||
lda [itemDrawPtr]
|
||||
and #$FF
|
||||
inc a
|
||||
tay
|
||||
|
||||
lda [itemDrawPtr],y ; get filetype
|
||||
cmp #$0F
|
||||
beq onFolder
|
||||
cmp #$06
|
||||
beq onBinary
|
||||
cmp #$C0
|
||||
beq onGraphic
|
||||
cmp #$C1
|
||||
bne onSound
|
||||
|
||||
onGraphic lxy #iconGraphic
|
||||
bra drawIcon
|
||||
|
||||
onBinary lxy #iconBinary
|
||||
bra drawIcon
|
||||
|
||||
onFolder lxy #iconFolder
|
||||
bra drawIcon
|
||||
|
||||
onSound lxy #iconSound
|
||||
|
||||
drawIcon ~DrawIcon @,#0,<xx,<yy
|
||||
|
||||
phl [memberPtr]
|
||||
|
||||
lda <xx
|
||||
adc nameOffset
|
||||
pha
|
||||
|
||||
lda <yy
|
||||
adc #7
|
||||
pha
|
||||
|
||||
sec
|
||||
ldy #oright
|
||||
lda [theRect],y
|
||||
sbc 3,s
|
||||
pha
|
||||
|
||||
jsl DrawStringAt2 ; DrawStringAt(theString,x,y)
|
||||
|
||||
noDraw EndStack
|
||||
rtl
|
||||
end
|
||||
|
||||
|
||||
*--------------------------------------------------------------
|
||||
* Here is the same routine listed so that you can see the
|
||||
* direct page offsets and what-not...
|
||||
*--------------------------------------------------------------
|
||||
|
||||
Pass 1: DrawSFDialog
|
||||
Pass 2: DrawSFDialog
|
||||
1552 0012 list on
|
||||
1553 0012 gen on
|
||||
1554 0012
|
||||
1555 0012 DefineStack long
|
||||
1556 0012 clipHndl long
|
||||
0012 +clipHndl equ 1
|
||||
1557 0012 clipPtr long
|
||||
0012 +clipPtr equ 5
|
||||
1558 0012 ctlPtr long
|
||||
0012 +ctlPtr equ 9
|
||||
1559 0012 atype long
|
||||
0012 +atype equ 13
|
||||
1560 0012 ftype word
|
||||
0012 +ftype equ 17
|
||||
1561 0012 xx word
|
||||
0012 +xx equ 19
|
||||
1562 0012 yy word
|
||||
0012 +yy equ 21
|
||||
1563 0012 iconOffset word
|
||||
0012 +iconOffset equ 23
|
||||
1564 0012 nameOffset word
|
||||
0012 +nameOffset equ 25
|
||||
1565 0012 endlocals
|
||||
0012 +sizeLocals equ 27-1
|
||||
1566 0012
|
||||
1567 0012 FixStack
|
||||
1568 0012
|
||||
1569 0012 begparms
|
||||
1570 0012 itemDrawPtr long
|
||||
0012 +itemDrawPtr equ 33
|
||||
1571 0012 endparms
|
||||
0012 +sizeParms equ 37-33
|
||||
1572 0012
|
||||
1573 0012 reserved block 24
|
||||
0012 +reserved equ 37
|
||||
1574 0012 ctlHandle long
|
||||
0012 +ctlHandle equ 61
|
||||
1575 0012 memberPtr long
|
||||
0012 +memberPtr equ 65
|
||||
1576 0012 theRect long
|
||||
0012 +theRect equ 69
|
||||
1577 0012
|
||||
1578 0012 BeginStack
|
||||
0012 + anop
|
||||
0012 0B + phd
|
||||
0013 8B + phb
|
||||
0014 4B + phk
|
||||
0015 AB + plb
|
||||
0016 3B + tsc
|
||||
0017 38 + sec
|
||||
0018 E9 1A 00 + sbc #sizeLocals
|
||||
001B 1B + tcs
|
||||
001C 5B + tcd
|
||||
1579 001D
|
||||
1580 001D *--------------------------------------------------------------
|
||||
1581 001D * fix offsets depending on graphics mode:
|
||||
1582 001D *--------------------------------------------------------------
|
||||
1583 001D A2 06 00 ldx #6
|
||||
1584 0020 A9 16 00 lda #22
|
||||
1585 0023 AC 00 80 ldy grafmode
|
||||
1586 0026 D0 04 bne setoffsets
|
||||
1587 0028 4A lsr a
|
||||
1588 0029 A2 03 00 ldx #3
|
||||
1589 002C
|
||||
1590 002C 86 17 setoffsets stx iconOffset
|
||||
1591 002E 85 19 sta nameOffset
|
||||
1592 0030
|
||||
1593 0030 *--------------------------------------------------------------
|
||||
1594 0030 * calculate where we need to be in order to draw:
|
||||
1595 0030 *--------------------------------------------------------------
|
||||
1596 0030 ~GetClipHandle
|
||||
0030 + longSpace
|
||||
0030 + anop
|
||||
0030 48 + pha
|
||||
0031 48 + pha
|
||||
0032 + Tool $C704
|
||||
0032 A2 04 C7 + ldx #$C704
|
||||
0035 22 00 00 E1 + jsl $E10000
|
||||
1597 0039 pll clipHndl
|
||||
0039 + anop
|
||||
0039 FA + plx
|
||||
003A 86 01 + stx clipHndl
|
||||
003C FA + plx
|
||||
003D 86 03 + stx clipHndl+2
|
||||
1598 003F
|
||||
1599 003F dref clipHndl,clipPtr
|
||||
003F A0 02 00 + ldy #2
|
||||
0042 A7 01 + lda [clipHndl]
|
||||
0044 AA + tax
|
||||
0045 B7 01 + lda [clipHndl],y
|
||||
0047 86 05 + stx clipPtr
|
||||
0049 85 07 + sta clipPtr+2
|
||||
1600 004B
|
||||
1601 004B A7 45 lda [theRect]
|
||||
1602 004D 3A dec a
|
||||
1603 004E A0 06 00 ldy #orgnBBox+obottom
|
||||
1604 0051 D7 05 cmp [clipPtr],y
|
||||
1605 0053 90 03 blt skip2
|
||||
1606 0055 82 9B 00 brl noDraw
|
||||
1607 0058 A0 04 00 skip2 ldy #obottom
|
||||
1608 005B B7 45 lda [theRect],y
|
||||
1609 005D 1A inc a
|
||||
1610 005E A0 02 00 ldy #orgnBBox+otop
|
||||
1611 0061 D7 05 cmp [clipPtr],y
|
||||
1612 0063 bltl noDraw
|
||||
0063 B0 03 + bge *+5
|
||||
0065 82 8B 00 + brl noDraw
|
||||
1613 0068
|
||||
1614 0068 noTest ~EraseRect <theRect
|
||||
0068 +noTest phl <theRect
|
||||
0068 +noTest anop
|
||||
0068 D4 47 + pei theRect+2
|
||||
006A D4 45 + pei theRect
|
||||
006C + Tool $5504
|
||||
006C A2 04 55 + ldx #$5504
|
||||
006F 22 00 00 E1 + jsl $E10000
|
||||
1615 0073
|
||||
1616 0073 A0 02 00 ldy #oleft
|
||||
1617 0076 B7 45 lda [theRect],y
|
||||
1618 0078 65 17 adc iconOffset
|
||||
1619 007A 85 13 sta <xx
|
||||
1620 007C
|
||||
1621 007C A0 04 00 ldy #obottom
|
||||
1622 007F B7 45 lda [theRect],y
|
||||
1623 0081 38 sec
|
||||
1624 0082 E9 09 00 sbc #9
|
||||
1625 0085 85 15 sta <yy
|
||||
1626 0087
|
||||
1627 0087 A7 21 lda [itemDrawPtr]
|
||||
1628 0089 29 FF 00 and #$FF
|
||||
1629 008C 1A inc a
|
||||
1630 008D A8 tay
|
||||
1631 008E
|
||||
1632 008E B7 21 lda [itemDrawPtr],y ; get filetype
|
||||
1633 0090 C9 0F 00 cmp #$0F
|
||||
1634 0093 F0 1F beq onFolder
|
||||
1635 0095 C9 06 00 cmp #$06
|
||||
1636 0098 F0 12 beq onBinary
|
||||
1637 009A C9 C0 00 cmp #$C0
|
||||
1638 009D F0 05 beq onGraphic
|
||||
1639 009F C9 C1 00 cmp #$C1
|
||||
1640 00A2 D0 18 bne onSound
|
||||
1641 00A4
|
||||
1642 00A4 onGraphic lxy #iconGraphic
|
||||
00A4 +onGraphic anop
|
||||
00A4 A2 00 80 + ldx #(iconGraphic)
|
||||
00A7 A0 00 00 + ldy #(iconGraphic)|-16
|
||||
1643 00AA 80 16 bra drawIcon
|
||||
1644 00AC
|
||||
1645 00AC onBinary lxy #iconBinary
|
||||
00AC +onBinary anop
|
||||
00AC A2 00 80 + ldx #(iconBinary)
|
||||
00AF A0 00 00 + ldy #(iconBinary)|-16
|
||||
1646 00B2 80 0E bra drawIcon
|
||||
1647 00B4
|
||||
1648 00B4 onFolder lxy #iconFolder
|
||||
00B4 +onFolder anop
|
||||
00B4 A2 00 80 + ldx #(iconFolder)
|
||||
00B7 A0 00 00 + ldy #(iconFolder)|-16
|
||||
1649 00BA 80 06 bra drawIcon
|
||||
1650 00BC
|
||||
1651 00BC onSound lxy #iconSound
|
||||
00BC +onSound anop
|
||||
00BC A2 00 80 + ldx #(iconSound)
|
||||
00BF A0 00 00 + ldy #(iconSound)|-16
|
||||
1652 00C2
|
||||
1653 00C2 drawIcon ~DrawIcon @,#0,<xx,<yy
|
||||
00C2 +drawIcon phl @
|
||||
00C2 +drawIcon anop
|
||||
00C2 5A + phy
|
||||
00C3 DA + phx
|
||||
00C4 + phw #0
|
||||
00C4 + anop
|
||||
00C4 F4 00 00 + pea 0
|
||||
00C7 + phw <xx
|
||||
00C7 + anop
|
||||
00C7 D4 13 + pei xx
|
||||
00C9 + phw <yy
|
||||
00C9 + anop
|
||||
00C9 D4 15 + pei yy
|
||||
00CB + Tool $0B12
|
||||
00CB A2 12 0B + ldx #$0B12
|
||||
00CE 22 00 00 E1 + jsl $E10000
|
||||
1654 00D2
|
||||
1655 00D2 phl [memberPtr]
|
||||
00D2 + anop
|
||||
00D2 A0 02 00 + ldy #2
|
||||
00D5 B7 41 + lda [memberPtr],y
|
||||
00D7 48 + pha
|
||||
00D8 A7 41 + lda [memberPtr]
|
||||
00DA 48 + pha
|
||||
1656 00DB
|
||||
1657 00DB A5 13 lda <xx
|
||||
1658 00DD 65 19 adc nameOffset
|
||||
1659 00DF 48 pha
|
||||
1660 00E0
|
||||
1661 00E0 A5 15 lda <yy
|
||||
1662 00E2 69 07 00 adc #7
|
||||
1663 00E5 48 pha
|
||||
1664 00E6
|
||||
1665 00E6 38 sec
|
||||
1666 00E7 A0 06 00 ldy #oright
|
||||
1667 00EA B7 45 lda [theRect],y
|
||||
1668 00EC E3 03 sbc 3,s
|
||||
1669 00EE 48 pha
|
||||
1670 00EF
|
||||
1671 00EF 22 00 80 00 jsl DrawStringAt2
|
||||
1672 00F3
|
||||
1673 00F3 noDraw EndStack
|
||||
00F3 +noDraw anop
|
||||
00F3 3B + tsc
|
||||
00F4 18 + clc
|
||||
00F5 69 1A 00 + adc #sizeLocals
|
||||
00F8 1B + tcs
|
||||
00F9 AB + plb
|
||||
00FA 2B + pld
|
||||
00FB A3 02 + lda 2,s
|
||||
00FD 83 06 + sta 2+sizeParms,s
|
||||
00FF A3 01 + lda 1,s
|
||||
0101 83 05 + sta 1+sizeParms,s
|
||||
0103 3B + tsc
|
||||
0104 69 04 00 + adc #sizeParms
|
||||
0107 1B + tcs
|
||||
1674 0108 6B rtl
|
||||
1675 0109 end
|
||||
|
||||
|
||||
*--------------------------------------------------------------
|
||||
* here are my icons...
|
||||
*--------------------------------------------------------------
|
||||
iconSound dc i'$8000'
|
||||
dc i'$0020'
|
||||
dc i'$0008'
|
||||
dc i'$0008'
|
||||
dc h'FFFFC00F'
|
||||
dc h'FFFC051F'
|
||||
dc h'0000451F'
|
||||
dc h'08E6451F'
|
||||
dc h'08E6451F'
|
||||
dc h'0000451F'
|
||||
dc h'FFFC051F'
|
||||
dc h'FFFFC00F'
|
||||
dc h'0000FFF0'
|
||||
dc h'000FFFF0'
|
||||
dc h'FFFFFFF0'
|
||||
dc h'FFFFFFF0'
|
||||
dc h'FFFFFFF0'
|
||||
dc h'FFFFFFF0'
|
||||
dc h'000FFFF0'
|
||||
dc h'0000FFF0'
|
||||
|
||||
iconFolder dc i'$0000'
|
||||
dc i'$0020'
|
||||
dc i'$0008'
|
||||
dc i'$0008'
|
||||
dc h'FFFFFFFF'
|
||||
dc h'F000FFFF'
|
||||
dc h'0EEE0000'
|
||||
dc h'0EEEEEE0'
|
||||
dc h'0EEEEEE0'
|
||||
dc h'0EEEEEE0'
|
||||
dc h'00000000'
|
||||
dc h'FFFFFFFF'
|
||||
dc h'00000000'
|
||||
dc h'0FFF0000'
|
||||
dc h'FFFFFFFF'
|
||||
dc h'FFFFFFFF'
|
||||
dc h'FFFFFFFF'
|
||||
dc h'FFFFFFFF'
|
||||
dc h'FFFFFFFF'
|
||||
dc h'00000000'
|
||||
|
||||
iconGraphic dc i'$8000'
|
||||
dc i'$0020'
|
||||
dc i'$0008'
|
||||
dc i'$0008'
|
||||
dc h'0000000F'
|
||||
dc h'0F00F0F0'
|
||||
dc h'0F00F000'
|
||||
dc h'0F33FFF0'
|
||||
dc h'0F44FFF0'
|
||||
dc h'0FC44430'
|
||||
dc h'0FFFFFF0'
|
||||
dc h'00000000'
|
||||
dc h'FFFFFFF0'
|
||||
dc h'FFFFFFFF'
|
||||
dc h'FFFFFFFF'
|
||||
dc h'FFFFFFFF'
|
||||
dc h'FFFFFFFF'
|
||||
dc h'FFFFFFFF'
|
||||
dc h'FFFFFFFF'
|
||||
dc h'FFFFFFFF'
|
||||
|
||||
iconBinary dc i'$8000'
|
||||
dc i'$0020'
|
||||
dc i'$0008'
|
||||
dc i'$0008'
|
||||
dc h'0000000F'
|
||||
dc h'0FFFF0F0'
|
||||
dc h'0F1FF000'
|
||||
dc h'0FFFFFF0'
|
||||
dc h'0F1F1FF0'
|
||||
dc h'0F1F1FF0'
|
||||
dc h'0FFFFFF0'
|
||||
dc h'00000000'
|
||||
dc h'FFFFFFF0'
|
||||
dc h'FFFFFFFF'
|
||||
dc h'FFFFFFFF'
|
||||
dc h'FFFFFFFF'
|
||||
dc h'FFFFFFFF'
|
||||
dc h'FFFFFFFF'
|
||||
dc h'FFFFFFFF'
|
||||
dc h'FFFFFFFF'
|
1672
source/twilight/ydi/ydi.asm
Normal file
1672
source/twilight/ydi/ydi.asm
Normal file
File diff suppressed because it is too large
Load Diff
1682
source/twilight/ydi/ydi.asm.y
Normal file
1682
source/twilight/ydi/ydi.asm.y
Normal file
File diff suppressed because it is too large
Load Diff
10
source/twilight/ydi/ydi.equ
Normal file
10
source/twilight/ydi/ydi.equ
Normal file
@ -0,0 +1,10 @@
|
||||
|
||||
YDI_Icon gequ $10dd01
|
||||
YDI_CtlLst gequ $00000005
|
||||
YDISetAnimPathCtl gequ $00006FFF
|
||||
YDIAnimPathStrCtl gequ $00007000
|
||||
YDIStrCtl gequ $00007001
|
||||
YDIIconCtl gequ $00007002
|
||||
YDISetAnimPathStr gequ $00000011
|
||||
YDI_LText gequ $00000001
|
||||
AnimPath_LText gequ $00000002
|
186
source/twilight/ydi/ydi.rez
Normal file
186
source/twilight/ydi/ydi.rez
Normal file
@ -0,0 +1,186 @@
|
||||
|
||||
#include "types.rez"
|
||||
#include "22:t2common.rez"
|
||||
|
||||
// --- type $8003 defines
|
||||
#define YDI_CtlLst $00000005
|
||||
// --- type $8004 defines
|
||||
#define YDISetAnimPathCtl $00006FFF
|
||||
#define YDIAnimPathStrCtl $00007000
|
||||
#define YDIStrCtl $00007001
|
||||
#define YDIIconCtl $00007002
|
||||
// --- type $8006 defines
|
||||
#define YDISetAnimPathStr $00000011
|
||||
// --- type $800B defines
|
||||
#define YDI_LText $00000001
|
||||
#define AnimPath_LText $00000002
|
||||
|
||||
|
||||
resource rT2ModuleFlags (moduleFlags) {
|
||||
fSetup+fFadeOut+fFadeIn+fLoadSetupBlank, // module flags word
|
||||
$01, // enabled flag (unimplemented)
|
||||
$0110, // minimum T2 version required
|
||||
NIL, // reserved
|
||||
"YouDrawIt!" // module name
|
||||
};
|
||||
|
||||
// --- About text resource
|
||||
|
||||
resource rTextForLETextBox2 (moduleMessage) {
|
||||
TBLeftJust
|
||||
// TBLeftMargin
|
||||
// "\$00\$00"
|
||||
TBBackColor TBColorF
|
||||
TBForeColor TBColor4
|
||||
"YouDrawIt!"
|
||||
TBForeColor TBColor1
|
||||
" allows you to create your own animations (aka ATF\$D5s), "
|
||||
"using any Apple IIgs paint program, to"
|
||||
" be put to life on the screen when it\$D5s time to blank!"
|
||||
};
|
||||
|
||||
// --- Version resource
|
||||
|
||||
resource rVersion (moduleVersion) {
|
||||
{1,0,1,release,5}, // Version 1.0.1f5
|
||||
verUS, // US Version
|
||||
"T2 YouDrawIt! Module", // program's name
|
||||
"By Jim Maricondo.\n"
|
||||
"Copyright 1991-93, Jim Maricondo." // copyright notice
|
||||
};
|
||||
|
||||
|
||||
|
||||
// --- Icon Definitions
|
||||
|
||||
resource rIcon (moduleIcon) {
|
||||
$8000, // kind
|
||||
$0014, // height
|
||||
$0016, // width
|
||||
|
||||
$"0000000000000000000000"
|
||||
$"0FFFFFFFFFFFFFFFFFFFF0"
|
||||
$"0F000000000000000000F0"
|
||||
$"0F0F0FC0FFFFFFFFFFF0F0"
|
||||
$"0F0F0FC0FFFFFFFFFFF0F0"
|
||||
$"0F0F0003FFFFFFFFFFF0F0"
|
||||
$"0F0F0880FFFFFFFFFFF0F0"
|
||||
$"0F0F0AA0FFFF888F8FF0F0"
|
||||
$"0F0FC0103FFAAAFAFFF0F0"
|
||||
$"0F0FFF000F1111111FF0F0"
|
||||
$"0F0FFFFFFFFFFFFFFFF0F0"
|
||||
$"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";
|
||||
};
|
||||
|
||||
// --- Control List Definitions
|
||||
|
||||
resource rControlList (YDI_CtlLst) {
|
||||
{
|
||||
YDIIconCtl, // control 3
|
||||
YDIStrCtl, // control 4
|
||||
// YDIAnimPathStrCtl, // control 5
|
||||
YDISetAnimPathCtl, // control 6
|
||||
};
|
||||
};
|
||||
|
||||
// --- Control Templates
|
||||
|
||||
resource rControlTemplate (YDISetAnimPathCtl) {
|
||||
$00000001, // ID
|
||||
{ 72, 92-3, 85,250+3}, // rect
|
||||
simpleButtonControl {{
|
||||
$0000, // flag
|
||||
$3002, // moreFlags
|
||||
NIL, // refCon
|
||||
YDISetAnimPathStr, // titleRef
|
||||
0, // colorTableRef
|
||||
{"A","a",$0100,$0100} // key equivalents
|
||||
}};
|
||||
};
|
||||
|
||||
resource rControlTemplate (YDIAnimPathStrCtl) {
|
||||
$00000002, // ID
|
||||
{ 93, 12,125,331}, // rect
|
||||
statTextControl {{
|
||||
$0000, // flag
|
||||
$1002, // moreFlags
|
||||
NIL, // refCon
|
||||
AnimPath_LText, // textRef
|
||||
NIL, // textSize
|
||||
$0000 // just
|
||||
}};
|
||||
};
|
||||
|
||||
resource rControlTemplate (YDIStrCtl) {
|
||||
$00000003, // ID
|
||||
{ 56,128, 64,247}, // rect
|
||||
statTextControl {{
|
||||
$0000, // flag
|
||||
$1002, // moreFlags
|
||||
NIL, // refCon
|
||||
YDI_LText, // textRef
|
||||
NIL, // textSize
|
||||
$0000 // just
|
||||
}};
|
||||
};
|
||||
|
||||
resource rControlTemplate (YDIIconCtl) {
|
||||
$00000004, // ID
|
||||
{ 33-2,146, 53,194}, // rect
|
||||
iconButtonControl {{
|
||||
$000C, // flag
|
||||
$1020, // moreFlags
|
||||
NIL, // refCon
|
||||
moduleIcon, // iconRef
|
||||
0, // titleRef
|
||||
0, // colorTableRef
|
||||
$0000 // displayMode
|
||||
}};
|
||||
};
|
||||
|
||||
// --- rPString Templates
|
||||
|
||||
resource rPString (YDISetAnimPathStr) {
|
||||
"Set Animation Path..."
|
||||
};
|
||||
|
||||
// --- rTextForLETextBox2 Templates
|
||||
|
||||
resource rTextForLETextBox2 (YDI_LText) {
|
||||
"YouDrawIt!"
|
||||
};
|
||||
|
||||
resource rTextForLETextBox2 (AnimPath_LText) {
|
||||
TBLeftJust
|
||||
TBLeftMargin "\$00\$00"
|
||||
"Animation\$CAPath:\$CA\$D2*0\$D3"
|
||||
};
|
BIN
source/twilight/ydi/youdrawit
Normal file
BIN
source/twilight/ydi/youdrawit
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user