TempleOSCDV4.12.ISO
This commit is contained in:
1 parent
93ca216483
commit
b84bbff6db
381 files changed
+18356
-18798
No files matched your search
+24
-24
@@ -18,20 +18,20 @@ CTask *SingleSong(U8 *msg,U8 *name)
|
||||
Bool JBPutKey(CDoc *doc,U8 *,I64 ch,I64 sc)
|
||||
{//ch=ASCII; sc=scan_code
|
||||
CDocEntry *doc_ce=doc->cur_entry,*doc_e;
|
||||
CDirEntry *tempde;
|
||||
CDirEntry *tmpde;
|
||||
CDoc *s;
|
||||
if (!(sc&(SCF_ALT|SCF_CTRL|SCF_SHIFT))
|
||||
&& doc_ce->type_u8==DOCT_MENU_VAL && doc_ce->left_exp>=0) {
|
||||
tempde=doc_ce->left_exp;
|
||||
tmpde=doc_ce->left_exp;
|
||||
if (sc.u8[0]==SC_DELETE ) {
|
||||
Beep;
|
||||
Silent;
|
||||
Del(tempde->full_name);
|
||||
Del(tmpde->full_name);
|
||||
Silent(OFF);
|
||||
} else if ('0'<=ch<='9') {
|
||||
if (StrLen(doc_ce->tag)>1)
|
||||
doc_ce->tag[0]=ch;
|
||||
s=DocRead(tempde->full_name);
|
||||
s=DocRead(tmpde->full_name);
|
||||
doc_e=s->head.next;
|
||||
while (doc_e!=s && doc_e->type_u8!=DOCT_TEXT)
|
||||
doc_e=doc_e->next;
|
||||
@@ -42,7 +42,7 @@ Bool JBPutKey(CDoc *doc,U8 *,I64 ch,I64 sc)
|
||||
DocDel(s);
|
||||
return TRUE;
|
||||
} else if (ch==CH_SPACE||ch==CH_ESC)
|
||||
tempde->user_data++; //JB_RUN_LEVEL++
|
||||
tmpde->user_data++; //JB_RUN_LEVEL++
|
||||
//<SPACE> is followed by <ESC> --> JB_RUN_LEVEL_TWO
|
||||
//Actual <ESC> just exits --> JB_RUN_LEVEL_ONE
|
||||
}
|
||||
@@ -53,7 +53,7 @@ public U0 JukeBox(U8 *dirname="~/Psalmody",U8 **_filename=NULL)
|
||||
{//_filename is for using this as a song-chooser program.
|
||||
I64 i=0,rating;
|
||||
U8 *st,*st2;
|
||||
CDirEntry *tempde,*tempde1;
|
||||
CDirEntry *tmpde,*tmpde1;
|
||||
CDoc *doc=DocNew,*s;
|
||||
CDocEntry *doc_e;
|
||||
CTask *task=NULL;
|
||||
@@ -61,7 +61,7 @@ public U0 JukeBox(U8 *dirname="~/Psalmody",U8 **_filename=NULL)
|
||||
*_filename=NULL;
|
||||
dirname=StrNew(dirname);
|
||||
st=MStrPrint("%s/*.HC.Z",dirname);
|
||||
tempde=tempde1=FilesFind(st);
|
||||
tmpde=tmpde1=FilesFind(st);
|
||||
Free(st);
|
||||
Free(dirname);
|
||||
doc->user_put_key=&JBPutKey;
|
||||
@@ -70,13 +70,13 @@ public U0 JukeBox(U8 *dirname="~/Psalmody",U8 **_filename=NULL)
|
||||
"$$BLACK$$Incomplete $$CYAN$$Special$$FG$$\n\n"
|
||||
"$$GREEN$$<DELETE>$$FG$$ to delete a song.\n"
|
||||
"Press a number to rate a song.\n");
|
||||
while (tempde) {
|
||||
while (tmpde) {
|
||||
if (!(i++%5))
|
||||
DocPrint(doc,"\n");
|
||||
if (FileOcc("Play(",tempde->full_name,"")) {
|
||||
st=StrNew(tempde->name);
|
||||
if (FileOcc("Play(",tmpde->full_name,"")) {
|
||||
st=StrNew(tmpde->name);
|
||||
FileExtRem(st);
|
||||
s=DocRead(tempde->full_name);
|
||||
s=DocRead(tmpde->full_name);
|
||||
doc_e=s->head.next;
|
||||
while (doc_e!=s && doc_e->type_u8!=DOCT_TEXT)
|
||||
doc_e=doc_e->next;
|
||||
@@ -94,7 +94,7 @@ public U0 JukeBox(U8 *dirname="~/Psalmody",U8 **_filename=NULL)
|
||||
DocPrint(doc,"$$CYAN$$");
|
||||
else if (StrMatch("no nothing",doc_e->tag)) {
|
||||
DocPrint(doc,"$$RED$$");
|
||||
if (FileOcc("\\0",tempde->full_name,"")) {
|
||||
if (FileOcc("\\0",tmpde->full_name,"")) {
|
||||
s->cur_entry=doc_e->next;
|
||||
s->cur_col=0;
|
||||
DocEntryDel(s,doc_e);
|
||||
@@ -102,37 +102,37 @@ public U0 JukeBox(U8 *dirname="~/Psalmody",U8 **_filename=NULL)
|
||||
DocWrite(s);
|
||||
}
|
||||
}
|
||||
DocPrint(doc,"$$MU-UL,\"%c%-8ts\",LE=%d$$ ",rating,st,tempde);
|
||||
tempde->user_data=JB_RUN_LEVEL_NULL;
|
||||
DocPrint(doc,"$$MU-UL,\"%c%-8ts\",LE=%d$$ ",rating,st,tmpde);
|
||||
tmpde->user_data=JB_RUN_LEVEL_NULL;
|
||||
}
|
||||
DocDel(s);
|
||||
Free(st);
|
||||
}
|
||||
tempde=tempde->next;
|
||||
tmpde=tmpde->next;
|
||||
}
|
||||
DocPrint(doc,"\n$$CYAN$$$$MU-UL,\"DONE\",LE=%d$$\n",DOCM_CANCEL);
|
||||
while (TRUE) {
|
||||
if (_filename)
|
||||
tempde=PopUpMenu(doc,DOF_INTERCEPT_TASK_END);
|
||||
tmpde=PopUpMenu(doc,DOF_INTERCEPT_TASK_END);
|
||||
else
|
||||
tempde=PopUpMenu(doc);
|
||||
tmpde=PopUpMenu(doc);
|
||||
if (task)
|
||||
Kill(task);
|
||||
if (tempde<=0) break;
|
||||
st2=StrNew(tempde->name);
|
||||
if (tmpde<=0) break;
|
||||
st2=StrNew(tmpde->name);
|
||||
if (_filename) {
|
||||
Free(*_filename);
|
||||
*_filename=StrNew(tempde->full_name);
|
||||
*_filename=StrNew(tmpde->full_name);
|
||||
}
|
||||
if (tempde->user_data==JB_RUN_LEVEL_ONE) break; //<ESC>
|
||||
tempde->user_data=JB_RUN_LEVEL_NULL; //Rst from <SPACE>
|
||||
if (tmpde->user_data==JB_RUN_LEVEL_ONE) break; //<ESC>
|
||||
tmpde->user_data=JB_RUN_LEVEL_NULL; //Rst from <SPACE>
|
||||
FileExtRem(st2);
|
||||
st=MStrPrint("ExeFile(\"%s\");",tempde->full_name);
|
||||
st=MStrPrint("ExeFile(\"%s\");",tmpde->full_name);
|
||||
MusicSettingsRst;
|
||||
task=SingleSong(st,st2);
|
||||
Free(st2);
|
||||
Free(st);
|
||||
}
|
||||
DocDel(doc);
|
||||
DirTreeDel(tempde1);
|
||||
DirTreeDel(tmpde1);
|
||||
}
|
||||
+11
-11
@@ -2,13 +2,13 @@ U0 SongPuppet(CTask *task,I64 passes)
|
||||
{
|
||||
CDbgInfo *dbg_info;
|
||||
I64 i,start,end,rip,last_rip;
|
||||
CHashFun *tempf=NULL;
|
||||
CHashFun *tmpf=NULL;
|
||||
for (i=0;i<250 && TaskValidate(task);i++) {
|
||||
if (tempf=HashFind("Song",task->hash_table,HTT_FUN))
|
||||
if (tmpf=HashFind("Song",task->hash_table,HTT_FUN))
|
||||
break;
|
||||
Sleep(1);
|
||||
}
|
||||
if (tempf && (dbg_info=tempf->dbg_info)) {
|
||||
if (tmpf && (dbg_info=tmpf->dbg_info)) {
|
||||
start=dbg_info->body[0];
|
||||
end =dbg_info->body[dbg_info->max_line+1-dbg_info->min_line];
|
||||
last_rip=0;
|
||||
@@ -74,16 +74,16 @@ public U0 JukeSongsPuppet(U8 *dirname="~/Psalmody",I64 passes=2,
|
||||
I64 start_song=0,I64 end_song=MAX_I64)
|
||||
{//Help make music video by puppeting JukeBox task.
|
||||
I64 i;
|
||||
CDirEntry *tempde,*tempde1;
|
||||
CDirEntry *tmpde,*tmpde1;
|
||||
CTask *juke_task=User("JukeBox(0x%X);\n",dirname);
|
||||
Cd(dirname);
|
||||
tempde1=FilesFind("*",FUF_RECURSE|FUF_JUST_TXT|FUF_JUST_FILES);
|
||||
for (tempde=tempde1,i=0;tempde && i<start_song;i++)
|
||||
tempde=tempde->next;
|
||||
for (i=start_song;tempde && i<end_song;i++) {
|
||||
JukeSongPuppet(juke_task,passes,i,tempde->name);
|
||||
tempde=tempde->next;
|
||||
tmpde1=FilesFind("*",FUF_RECURSE|FUF_JUST_TXT|FUF_JUST_FILES);
|
||||
for (tmpde=tmpde1,i=0;tmpde && i<start_song;i++)
|
||||
tmpde=tmpde->next;
|
||||
for (i=start_song;tmpde && i<end_song;i++) {
|
||||
JukeSongPuppet(juke_task,passes,i,tmpde->name);
|
||||
tmpde=tmpde->next;
|
||||
}
|
||||
DirTreeDel(tempde1);
|
||||
DirTreeDel(tmpde1);
|
||||
Kill(juke_task);
|
||||
}
|
||||
@@ -19,7 +19,7 @@ This uses four types of output
|
||||
|
||||
4) The Fs->next_ctrl for the tempo/stacatto sliders.
|
||||
|
||||
See $LK,"GrUpdateTaskWin",A="MN:GrUpdateTaskWin"$(), $LK,"GrUpdateTasks",A="MN:GrUpdateTasks"$() and $LK,"GrUpdateScreen",A="MN:GrUpdateScreen"$().
|
||||
See $LK,"GrUpdateTaskWin",A="MN:GrUpdateTaskWin"$(), $LK,"GrUpdateTasks",A="MN:GrUpdateTasks"$() and $LK,"GrUpdateScrn",A="MN:GrUpdateScrn"$().
|
||||
$WW,1$$WW,0$*/
|
||||
|
||||
#define NOTE_REST MIN_I64
|
||||
@@ -62,20 +62,13 @@ class PsmCtrl
|
||||
PsmNote head;
|
||||
PsmNote clipboard;
|
||||
CMenuEntry *incomplete_entry,*record_entry;
|
||||
I64 screen_x,
|
||||
I64 scrn_x,
|
||||
tool;
|
||||
PsmNote *cur_note;
|
||||
CDC *dc2;
|
||||
Bool playing;
|
||||
} oc;
|
||||
} psm;
|
||||
|
||||
U8 *psm_note_lst="A\0A#\0B\0C\0C#\0D\0D#\0E\0F\0F#\0G\0G#\0";
|
||||
U8 psm_note_map[12]={6,6,5,4,4,3,3,2,1,1,0,0};
|
||||
U8 psm_note_inverse_map[7]={10,8,7,5,3,2,0};
|
||||
|
||||
#define PSMPM_NORMAL 0
|
||||
#define PSMPM_REVERB1 1
|
||||
#define PSMPM_NUM_PLAY_MODES 2
|
||||
I64 psm_play_mode=0;
|
||||
F64 psm_play_f=0;
|
||||
|
||||
@@ -63,7 +63,7 @@ Bool psm_triplet_durations[PSM_NUM_DURATIONS]={TRUE,FALSE,TRUE,
|
||||
|
||||
Bool PsmBlink()
|
||||
{
|
||||
if (Blink || oc.playing)
|
||||
if (Blink || psm.playing)
|
||||
return TRUE;
|
||||
else
|
||||
return FALSE;
|
||||
@@ -88,27 +88,27 @@ Bool PsmIsDotted(I64 duration)
|
||||
|
||||
U0 PsmMarkSel(I64 x1,I64 x2,Bool sel)
|
||||
{
|
||||
PsmNote *tempo=oc.head.next;
|
||||
while (tempo!=&oc.head) {
|
||||
PsmNote *tmpn=psm.head.next;
|
||||
while (tmpn!=&psm.head) {
|
||||
if (sel) {
|
||||
if (x1<=tempo->x<=x2)
|
||||
tempo->flags|=PSMF_SEL;
|
||||
if (x1<=tmpn->x<=x2)
|
||||
tmpn->flags|=PSMF_SEL;
|
||||
} else
|
||||
tempo->flags&=~PSMF_SEL;
|
||||
tempo=tempo->next;
|
||||
tmpn->flags&=~PSMF_SEL;
|
||||
tmpn=tmpn->next;
|
||||
}
|
||||
}
|
||||
|
||||
U0 PsmSetWidth(PsmNote *tempo)
|
||||
U0 PsmSetWidth(PsmNote *tmpn)
|
||||
{
|
||||
if (tempo->type==PSMT_METER)
|
||||
tempo->width=12;
|
||||
if (tmpn->type==PSMT_METER)
|
||||
tmpn->width=12;
|
||||
else {
|
||||
tempo->width=PSM_NOTE_SPACING;
|
||||
if (PsmIsDotted(tempo->duration))
|
||||
tempo->width+=PSM_NOTE_SPACING/2;
|
||||
if (Bt(&tempo->flags,PSMf_SHARP) || Bt(&tempo->flags,PSMf_FLAT))
|
||||
tempo->width+=PSM_NOTE_SPACING;
|
||||
tmpn->width=PSM_NOTE_SPACING;
|
||||
if (PsmIsDotted(tmpn->duration))
|
||||
tmpn->width+=PSM_NOTE_SPACING/2;
|
||||
if (Bt(&tmpn->flags,PSMf_SHARP) || Bt(&tmpn->flags,PSMf_FLAT))
|
||||
tmpn->width+=PSM_NOTE_SPACING;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,18 +116,16 @@ U0 PsmSetOctave(I64 octave)
|
||||
{
|
||||
I64 i;
|
||||
U8 buf[STR_LEN];
|
||||
CMenuEntry *tempse;
|
||||
CMenuEntry *tmpse;
|
||||
for (i=0;i<=6;i++) {
|
||||
StrPrint(buf,"Snd/Octave%d",i);
|
||||
if (tempse=MenuEntryFind(Fs->cur_menu,buf)) {
|
||||
if (tmpse=MenuEntryFind(Fs->cur_menu,buf)) {
|
||||
if (i==octave)
|
||||
tempse->checked=TRUE;
|
||||
tmpse->checked=TRUE;
|
||||
else
|
||||
tempse->checked=FALSE;
|
||||
tmpse->checked=FALSE;
|
||||
}
|
||||
}
|
||||
if (tempse=MenuEntryFind(Fs->cur_menu,"Snd/Reverb"))
|
||||
tempse->checked=psm_play_mode==1;
|
||||
}
|
||||
|
||||
U0 DrawNote(CDC *dc,I64 x,I64 y,I64 duration)
|
||||
@@ -150,21 +148,21 @@ U0 DrawTimeSignature(CDC *dc,I64 x,I64 y,I64 top,I64 bottom)
|
||||
U0 PsmRecalcNoteXY()
|
||||
{
|
||||
F64 measure_len=4,measure_left=measure_len;
|
||||
PsmNote *tempo=oc.head.next;
|
||||
I64 x=8-oc.screen_x,note,octave;
|
||||
PsmNote *tmpn=psm.head.next;
|
||||
I64 x=8-psm.scrn_x,note,octave;
|
||||
while (TRUE) {
|
||||
tempo->x=x;
|
||||
tempo->y=50;
|
||||
if (tempo==&oc.head)
|
||||
tmpn->x=x;
|
||||
tmpn->y=50;
|
||||
if (tmpn==&psm.head)
|
||||
break;
|
||||
else {
|
||||
if (tempo->type!=PSMT_METER) {
|
||||
octave=tempo->octave;
|
||||
if (tmpn->type!=PSMT_METER) {
|
||||
octave=tmpn->octave;
|
||||
if (octave!=OCTAVE_REST) {
|
||||
note=tempo->note;
|
||||
if (Bt(&tempo->flags,PSMf_SHARP))
|
||||
note=tmpn->note;
|
||||
if (Bt(&tmpn->flags,PSMf_SHARP))
|
||||
note--;
|
||||
if (Bt(&tempo->flags,PSMf_FLAT))
|
||||
if (Bt(&tmpn->flags,PSMf_FLAT))
|
||||
note++;
|
||||
if (note<0) {
|
||||
note=11;
|
||||
@@ -174,27 +172,27 @@ U0 PsmRecalcNoteXY()
|
||||
octave++;
|
||||
}
|
||||
note=music.note_map[*LstSub(note,psm_note_lst)-'A'];
|
||||
tempo->y=(15+(psm_note_map[note]-7*(octave-2)))*4;
|
||||
tmpn->y=(15+(psm_note_map[note]-7*(octave-2)))*4;
|
||||
}
|
||||
}
|
||||
x+=tempo->width;
|
||||
if (tempo->type==PSMT_METER) {
|
||||
measure_len=tempo->meter_top*4.0/tempo->meter_bottom;
|
||||
x+=tmpn->width;
|
||||
if (tmpn->type==PSMT_METER) {
|
||||
measure_len=tmpn->meter_top*4.0/tmpn->meter_bottom;
|
||||
measure_left=0;
|
||||
} else
|
||||
measure_left-=psm_durations[tempo->duration];
|
||||
measure_left-=psm_durations[tmpn->duration];
|
||||
if (measure_left<0.001) {
|
||||
x+=PSM_NOTE_SPACING;
|
||||
measure_left=measure_len;
|
||||
}
|
||||
}
|
||||
tempo=tempo->next;
|
||||
tmpn=tmpn->next;
|
||||
}
|
||||
}
|
||||
|
||||
U0 DrawIt(CTask *task,CDC *dc)
|
||||
{
|
||||
PsmNote *tempo;
|
||||
PsmNote *tmpn;
|
||||
I64 i,x,y,
|
||||
w=task->pix_width;
|
||||
F64 measure_len=4,measure_left=measure_len;
|
||||
@@ -206,63 +204,63 @@ U0 DrawIt(CTask *task,CDC *dc)
|
||||
GrLine(dc,0,i*8,w,i*8);
|
||||
|
||||
PsmRecalcNoteXY;
|
||||
if (oc.cur_note->x<64) {
|
||||
oc.screen_x-=128;
|
||||
if (psm.cur_note->x<64) {
|
||||
psm.scrn_x-=128;
|
||||
PsmRecalcNoteXY;
|
||||
}
|
||||
if (oc.cur_note->x>=GR_WIDTH-64) {
|
||||
oc.screen_x+=128;
|
||||
if (psm.cur_note->x>=GR_WIDTH-64) {
|
||||
psm.scrn_x+=128;
|
||||
PsmRecalcNoteXY;
|
||||
}
|
||||
|
||||
tempo=oc.head.next;
|
||||
while (tempo!=&oc.head) {
|
||||
x=tempo->x;
|
||||
y=tempo->y;
|
||||
tmpn=psm.head.next;
|
||||
while (tmpn!=&psm.head) {
|
||||
x=tmpn->x;
|
||||
y=tmpn->y;
|
||||
if (measure_left<0.001) {
|
||||
dc->color=BLACK;
|
||||
GrLine(dc,x-PSM_NOTE_SPACING,8,x-PSM_NOTE_SPACING,11*8);
|
||||
measure_left=measure_len;
|
||||
}
|
||||
if (tempo->type==PSMT_METER) {
|
||||
if (tempo==oc.cur_note && PsmBlink)
|
||||
if (tmpn->type==PSMT_METER) {
|
||||
if (tmpn==psm.cur_note && PsmBlink)
|
||||
dc->color=BROWN;
|
||||
else
|
||||
dc->color=BLACK;
|
||||
DrawTimeSignature(dc,x,5*8,tempo->meter_top,tempo->meter_bottom);
|
||||
measure_len=tempo->meter_top*4.0/tempo->meter_bottom;
|
||||
DrawTimeSignature(dc,x,5*8,tmpn->meter_top,tmpn->meter_bottom);
|
||||
measure_len=tmpn->meter_top*4.0/tmpn->meter_bottom;
|
||||
measure_left=0;
|
||||
} else {
|
||||
if (tempo==oc.cur_note && PsmBlink) {
|
||||
if (tmpn==psm.cur_note && PsmBlink) {
|
||||
dc->color=BROWN;
|
||||
GrPrint(dc,x+8,y,"%s",tempo->word);
|
||||
} else if (tempo->flags&PSMF_SEL)
|
||||
GrPrint(dc,x+8,y,"%s",tmpn->word);
|
||||
} else if (tmpn->flags&PSMF_SEL)
|
||||
dc->color=RED;
|
||||
else {
|
||||
if (tempo->note!=NOTE_REST)
|
||||
if (tmpn->note!=NOTE_REST)
|
||||
dc->color=BLACK;
|
||||
else
|
||||
dc->color=LTGRAY;
|
||||
if (PsmHasWords(tempo->word))
|
||||
if (PsmHasWords(tmpn->word))
|
||||
dc->color=GREEN;
|
||||
}
|
||||
DrawNote(dc,x,y,tempo->duration);
|
||||
if (PsmIsDotted(tempo->duration))
|
||||
DrawNote(dc,x,y,tmpn->duration);
|
||||
if (PsmIsDotted(tmpn->duration))
|
||||
x+=PSM_NOTE_SPACING/2;
|
||||
if (Bt(&tempo->flags,PSMf_SHARP))
|
||||
if (Bt(&tmpn->flags,PSMf_SHARP))
|
||||
Sprite3(dc,x,y,0,$IB,"<13>",BI=13$);
|
||||
else if (Bt(&tempo->flags,PSMf_FLAT))
|
||||
else if (Bt(&tmpn->flags,PSMf_FLAT))
|
||||
Sprite3(dc,x,y,0,$IB,"<14>",BI=14$);
|
||||
measure_left-=psm_durations[tempo->duration];
|
||||
measure_left-=psm_durations[tmpn->duration];
|
||||
}
|
||||
tempo=tempo->next;
|
||||
tmpn=tmpn->next;
|
||||
}
|
||||
|
||||
if (oc.cur_note==&oc.head && PsmBlink)
|
||||
if (psm.cur_note==&psm.head && PsmBlink)
|
||||
dc->color=BROWN;
|
||||
else
|
||||
dc->color=BLACK;
|
||||
Sprite3(dc,oc.head.x,50,0,$IB,"<12>",BI=12$);
|
||||
Sprite3(dc,psm.head.x,50,0,$IB,"<12>",BI=12$);
|
||||
}
|
||||
|
||||
#define PSM_NOTE_BOX_X 220
|
||||
@@ -298,12 +296,12 @@ U0 DrawPickNoteBox()
|
||||
for (i=0;i<PSM_NUM_DURATIONS;i++) {
|
||||
PsmSetPickNoteBoxX(i,&x);
|
||||
if (PsmIsDotted(i))
|
||||
oc.dc2->color=RED;
|
||||
psm.dc2->color=RED;
|
||||
else if (psm_triplet_durations[i])
|
||||
oc.dc2->color=LTRED;
|
||||
psm.dc2->color=LTRED;
|
||||
else
|
||||
oc.dc2->color=BLACK;
|
||||
DrawNote(oc.dc2,x,PSM_NOTE_BOX_Y,i);
|
||||
psm.dc2->color=BLACK;
|
||||
DrawNote(psm.dc2,x,PSM_NOTE_BOX_Y,i);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -312,19 +310,19 @@ U0 DrawPickNoteBox()
|
||||
|
||||
U0 DrawPickTools()
|
||||
{
|
||||
if (oc.tool==PSMTT_BOX_TOOL)
|
||||
oc.dc2->color=ROPF_DITHER+WHITE<<16+RED;
|
||||
if (psm.tool==PSMTT_BOX_TOOL)
|
||||
psm.dc2->color=ROPF_DITHER+WHITE<<16+RED;
|
||||
else
|
||||
oc.dc2->color=ROPF_DITHER+WHITE<<16+BLACK;
|
||||
GrBorder(oc.dc2,PSM_TOOLS_X,PSM_TOOLS_Y,
|
||||
psm.dc2->color=ROPF_DITHER+WHITE<<16+BLACK;
|
||||
GrBorder(psm.dc2,PSM_TOOLS_X,PSM_TOOLS_Y,
|
||||
PSM_TOOLS_X+10,PSM_TOOLS_Y+10);
|
||||
|
||||
if (oc.tool==PSMTT_PTR_TOOL)
|
||||
oc.dc2->color=RED;
|
||||
if (psm.tool==PSMTT_PTR_TOOL)
|
||||
psm.dc2->color=RED;
|
||||
else
|
||||
oc.dc2->color=BLACK;
|
||||
(*gr.fp_draw_input_ptr)(oc.dc2,PSM_TOOLS_X+15,PSM_TOOLS_Y);
|
||||
oc.dc2->color=BLACK;
|
||||
psm.dc2->color=BLACK;
|
||||
(*gr.fp_draw_input_ptr)(psm.dc2,PSM_TOOLS_X+15,PSM_TOOLS_Y);
|
||||
psm.dc2->color=BLACK;
|
||||
}
|
||||
|
||||
Bool PsmGetPickToolBox(I64 xx,I64 yy)
|
||||
@@ -333,9 +331,9 @@ Bool PsmGetPickToolBox(I64 xx,I64 yy)
|
||||
PSM_TOOLS_Y<=yy<PSM_TOOLS_Y+15) {
|
||||
PsmMarkSel(0,0,FALSE);
|
||||
if (xx<PSM_TOOLS_X+13)
|
||||
oc.tool=PSMTT_BOX_TOOL;
|
||||
psm.tool=PSMTT_BOX_TOOL;
|
||||
else
|
||||
oc.tool=PSMTT_PTR_TOOL;
|
||||
psm.tool=PSMTT_PTR_TOOL;
|
||||
return TRUE;
|
||||
} else
|
||||
return FALSE;
|
||||
@@ -364,9 +362,9 @@ Bool PsmGetPickMeterBox(I64 xx,I64 yy,I64 *top,I64 *bottom)
|
||||
U0 DrawPickMeterBox()
|
||||
{
|
||||
I64 i;
|
||||
oc.dc2->color=BLACK;
|
||||
psm.dc2->color=BLACK;
|
||||
for (i=0;i<PSM_NUM_METERS;i++)
|
||||
DrawTimeSignature(oc.dc2,PSM_METER_X+i*PSM_METER_W,PSM_METER_Y,
|
||||
DrawTimeSignature(psm.dc2,PSM_METER_X+i*PSM_METER_W,PSM_METER_Y,
|
||||
meter_tops[i],meter_bottoms[i]);
|
||||
}
|
||||
|
||||
@@ -398,25 +396,25 @@ U0 PsmMenu(I64 psm_octave)
|
||||
"$$LTGREEN$$<BACKSPACE>$$FG$$\tDeletes Last Note\n"
|
||||
"$$LTGREEN$$Left Mouse$$FG$$\tDrag note or shift word\n"
|
||||
"$$LTGREEN$$Right Mouse$$FG$$\tChange duration or set word\n";
|
||||
Sprite($IB,"<6>",BI=6$,"$$SP+LA,\"\","
|
||||
Sprite($IB,"<6>",BI=6$,"$$SP+LIS,\"\","
|
||||
"LM=\"Msg(MSG_KEY_DOWN,0,SCF_CTRL|SC_CURSOR_LEFT);\",BI=%d$$");
|
||||
" ";
|
||||
if (oc.playing)
|
||||
if (psm.playing)
|
||||
Sprite($IB,"<9>",BI=9$,"$$SP,\"\",LM=\"x\",BI=%d$$");
|
||||
else
|
||||
Sprite($IB,"<8>",BI=8$,"$$SP,\"\",LM=\"x\",BI=%d$$");
|
||||
" ";
|
||||
if (oc.record_entry->checked) {
|
||||
oc.record_entry->checked=TRUE;
|
||||
if (psm.record_entry->checked) {
|
||||
psm.record_entry->checked=TRUE;
|
||||
Sprite($IB,"<10>",BI=10$,"$$SP,\"\",LM=\"z\",BI=%d$$");
|
||||
} else
|
||||
Sprite($IB,"<11>",BI=11$,"$$SP,\"\",LM=\"z\",BI=%d$$");
|
||||
" ";
|
||||
Sprite($IB,"<7>",BI=7$,"$$SP+LA,\"\","
|
||||
Sprite($IB,"<7>",BI=7$,"$$SP+LIS,\"\","
|
||||
"LM=\"Msg(MSG_KEY_DOWN,0,SCF_CTRL|SC_CURSOR_RIGHT);\",BI=%d$$");
|
||||
"$$CM+LX,0,6$$";
|
||||
PsmSetOctave(psm_octave);
|
||||
WinMgrSync(2);
|
||||
Refresh(2);
|
||||
}
|
||||
| ||||