From: Jos v.d.V. <jo...@us...> - 2005-11-16 19:47:30
|
Update of /cvsroot/win32forth/win32forth/apps/Player4 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4160/apps/Player4 Modified Files: Catalog.f Mediatree.f Pl_MciWindow.f Log Message: Jos: Removed a few bugs. Index: Pl_MciWindow.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Player4/Pl_MciWindow.f,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Pl_MciWindow.f 16 Oct 2005 10:24:39 -0000 1.11 --- Pl_MciWindow.f 16 Nov 2005 19:47:22 -0000 1.12 *************** *** 221,239 **** database-mhndl #records-in-database vadr-config #free-list @ - 0> if AbortPlaying: self false to catalog-aborted? ! begin PLAYER catalog-aborted? if exitm then Playing?: Self not if next-not-played dup -1 = if cr cr ." All done. Reset randomlevel and shuffle..." ! set-all-not-played random-shuffle else cr 2 spaces dup . 2 spaces n>record dup>r RecordDef File_name r@ Cnt_File_name c@ 2dup type-space r@ incr-#played r> mark-played ! PlayFile: Self 2drop then then again then ! ;M : add-to-catalog ( -- ) \ Delete the *.dat files to start a new catalog --- 221,239 ---- database-mhndl #records-in-database vadr-config #free-list @ - 0> if AbortPlaying: self false to catalog-aborted? ! begin PLAYER catalog-aborted? #InCollection 0= or if exitm then Playing?: Self not if next-not-played dup -1 = if cr cr ." All done. Reset randomlevel and shuffle..." ! set-all-not-played random-shuffle else cr 2 spaces dup . 2 spaces n>record dup>r RecordDef File_name r@ Cnt_File_name c@ 2dup type-space r@ incr-#played r> mark-played ! PlayFile: Self then then again then ! ;M : add-to-catalog ( -- ) \ Delete the *.dat files to start a new catalog *************** *** 254,260 **** GetHandle: self Start: GetFilesDialog count nip 0> if 0 GetFile: GetFilesDialog GetLabel ! #SelectedFiles: GetFilesDialog 0 do dup i GetFile: GetFilesDialog AddFile loop then CloseReMap --- 254,261 ---- GetHandle: self Start: GetFilesDialog count nip 0> if 0 GetFile: GetFilesDialog GetLabel ! #SelectedFiles: GetFilesDialog wait-cursor 0 do dup i GetFile: GetFilesDialog AddFile loop + arrow-cursor then CloseReMap Index: Mediatree.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Player4/Mediatree.f,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** Mediatree.f 30 Oct 2005 18:58:14 -0000 1.21 --- Mediatree.f 16 Nov 2005 19:47:22 -0000 1.22 *************** *** 27,31 **** swap RecordDef Excluded- c@ or if drop ! else vadr-config over to lParam 0 InlineRecord ! dup l_Index- c@ if over +(l.int) --- 27,31 ---- swap RecordDef Excluded- c@ or if drop ! else 1 +to #InCollection vadr-config over to lParam 0 InlineRecord ! dup l_Index- c@ if over +(l.int) *************** *** 62,65 **** --- 62,66 ---- :M FillTreeView: ( -- ) + 0 to #InCollection 0 to last-selected-rec tvins /tvins erase Index: Catalog.f =================================================================== RCS file: /cvsroot/win32forth/win32forth/apps/Player4/Catalog.f,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** Catalog.f 31 Oct 2005 18:05:17 -0000 1.18 --- Catalog.f 16 Nov 2005 19:47:22 -0000 1.19 *************** *** 1,3 **** - \ Error: GetxxxxFileName failed RC=0x3003 anew catalog.f \ 15-10-2005 --- 1,2 ---- *************** *** 232,235 **** --- 231,239 ---- ; + : build-free-list ( - ) + 0 vadr-config #free-list ! + for-all-records free-list-check + ; + : get-a-record-from-the-free-list ( - adr ) vadr-config dup>r first-free-record @ *************** *** 241,245 **** : write-record ( wHndl - ) \ Recycle deleted records first. InlineRecord [ sizeof RecordDef ] literal ! vadr-config #free-list @ if get-a-record-from-the-free-list swap cmove drop else rot write-file abort" Can't save record" --- 245,249 ---- : write-record ( wHndl - ) \ Recycle deleted records first. InlineRecord [ sizeof RecordDef ] literal ! vadr-config #free-list @ 0> if get-a-record-from-the-free-list swap cmove drop else rot write-file abort" Can't save record" *************** *** 247,254 **** ; - : build-free-list ( - ) - 0 vadr-config #free-list ! - for-all-records free-list-check - ; : delete-record ( n - ) --- 251,254 ---- *************** *** 405,409 **** : random-shuffle ( - ) vadr-config MaximumRandomLevel @ for-all-records change-randomlevel drop ! sort_by_RandomLevel ; --- 405,409 ---- : random-shuffle ( - ) vadr-config MaximumRandomLevel @ for-all-records change-randomlevel drop ! sort_by_RandomLevel RefreshCatalog ; *************** *** 470,476 **** 0 value played_from_catalog 0 value last-selected-rec : next-not-played ( - n ) \ -1 means done. ! -1 #records last-selected-rec \ Starting from the last-selected record do i n>record dup>r RecordDef Excluded- c@ not r@ RecordDef Played- c@ 0= and r> RecordDef Deleted- c@ 0= and --- 470,477 ---- 0 value played_from_catalog 0 value last-selected-rec + 0 value #InCollection : next-not-played ( - n ) \ -1 means done. ! -1 database-mhndl #records-in-database last-selected-rec 0 max \ Starting from the last-selected record do i n>record dup>r RecordDef Excluded- c@ not r@ RecordDef Played- c@ 0= and r> RecordDef Deleted- c@ 0= and *************** *** 522,529 **** : add_dir_tree ( -- ) \ add a directory tree to the catalog ! ['] proc_fileinfo_sdir is process-1file OpenAppendDatabase select_tree sdir CloseReMap ; --- 523,531 ---- : add_dir_tree ( -- ) \ add a directory tree to the catalog ! wait-cursor ['] proc_fileinfo_sdir is process-1file OpenAppendDatabase select_tree sdir CloseReMap + arrow-cursor ; |