summaryrefslogtreecommitdiff
path: root/apps/plugins/sdl/progs/duke3d/Game/src/audiolib/task_man.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/sdl/progs/duke3d/Game/src/audiolib/task_man.c')
-rw-r--r--apps/plugins/sdl/progs/duke3d/Game/src/audiolib/task_man.c118
1 files changed, 0 insertions, 118 deletions
diff --git a/apps/plugins/sdl/progs/duke3d/Game/src/audiolib/task_man.c b/apps/plugins/sdl/progs/duke3d/Game/src/audiolib/task_man.c
index c39135fedb..c6e2cd6e9e 100644
--- a/apps/plugins/sdl/progs/duke3d/Game/src/audiolib/task_man.c
+++ b/apps/plugins/sdl/progs/duke3d/Game/src/audiolib/task_man.c
@@ -856,121 +856,3 @@ int TS_LockMemory
856 } 856 }
857 857
858#endif 858#endif
859
860/*
861// Converts a hex byte to an integer
862
863static int btoi
864 (
865 unsigned char bcd
866 )
867
868 {
869 unsigned b;
870 unsigned c;
871 unsigned d;
872
873 b = bcd / 16;
874 c = bcd - b * 16;
875 d = b * 10 + c;
876 return( d );
877 }
878
879
880static void RestoreRealTimeClock
881 (
882 void
883 )
884
885 {
886 int read;
887 int i;
888 int hr;
889 int min;
890 int sec;
891 int cent;
892 int yr;
893 int mo;
894 int day;
895 int year;
896 union REGS inregs;
897
898 // Read Real Time Clock Time.
899 read = FALSE;
900 inregs.h.ah = 0x02;
901 for( i = 1; i <= 3; i++ )
902 {
903 int386( 0x1A, &inregs, &inregs );
904 if ( inregs.x.cflag == 0 )
905 {
906 read = TRUE;
907 }
908 }
909
910 if ( read )
911 {
912 //and convert BCD to integer format
913 hr = btoi( inregs.h.ch );
914 min = btoi( inregs.h.cl );
915 sec = btoi( inregs.h.dh );
916
917 // Read Real Time Clock Date.
918 inregs.h.ah = 0x04;
919 int386( 0x1A, &inregs, &inregs );
920 if ( inregs.x.cflag == 0 )
921 {
922 //and convert BCD to integer format
923 cent = btoi( inregs.h.ch );
924 yr = btoi( inregs.h.cl );
925 mo = btoi( inregs.h.dh );
926 day = btoi( inregs.h.dl );
927 year = cent * 100 + yr;
928
929 // Set System Time.
930 inregs.h.ch = hr;
931 inregs.h.cl = min;
932 inregs.h.dh = sec;
933 inregs.h.dl = 0;
934 inregs.h.ah = 0x2D;
935 int386( 0x21, &inregs, &inregs );
936
937 // Set System Date.
938 inregs.w.cx = year;
939 inregs.h.dh = mo;
940 inregs.h.dl = day;
941 inregs.h.ah = 0x2B;
942 int386( 0x21, &inregs, &inregs );
943 }
944 }
945 }
946*/
947/*
948 struct dostime_t time;
949 struct dosdate_t date;
950
951 outp(0x70,0);
952 time.second=inp(0x71);
953 outp(0x70,2);
954 time.minute=inp(0x71);
955 outp(0x70,4);
956 time.hour=inp(0x71);
957
958 outp(0x70,7);
959 date.day=inp(0x71);
960 outp(0x70,8);
961 date.month=inp(0x71);
962 outp(0x70,9);
963 date.year=inp(0x71);
964
965 time.second=(time.second&0x0f)+((time.second>>4)*10);
966 time.minute=(time.minute&0x0f)+((time.minute>>4)*10);
967 time.hour=(time.hour&0x0f)+((time.hour>>4)*10);
968
969 date.day=(date.day&0x0f)+((date.day>>4)*10);
970 date.month=(date.month&0x0f)+((date.month>>4)*10);
971 date.year=(date.year&0x0f)+((date.year>>4)*10);
972
973 _dos_settime(&time);
974 _dos_setdate(&date);
975
976*/