Buchempfehlung
Windows System Programming
Windows System Programming
Das Kompendium liefert viele interessante Informationen zur Windows-Programmierung auf Englisch. [Mehr Infos...]
FreeBASIC-Chat
Es sind Benutzer im FreeBASIC-Chat online.
(Stand:  )
FreeBASIC bei Twitter
Twitter FreeBASIC-Nachrichten jetzt auch über Twitter erhalten. Follow us!

fb:porticula NoPaste

Info
Info / Hilfe
Liste
Übersicht / Liste
Neu
Datei hochladen
Suche
Quellcode suchen
Download
Dateidownload

rotation

Uploader:RedakteurJojo
Datum/Zeit:17.08.2007 14:31:56

DECLARE SUB ContinueWav ()
DECLARE SUB PlayWav (File$, LoopWav%)
DECLARE SUB DMAState (StopGo%)
DECLARE FUNCTION SpeakerStatus% ()
DECLARE FUNCTION DMADone% ()
DECLARE FUNCTION ResetDSP% ()
DECLARE SUB MasterVolume (Right%, Left%, Getvol%)
DECLARE SUB WriteDSP (byte%)
DECLARE FUNCTION ReadDSP% ()
DECLARE SUB SpeakerState (OnOff%)
DECLARE FUNCTION ReadDAC% ()
DECLARE SUB DMAPlay (Segment&, Offset&, Length&, Freq&)
DECLARE SUB GetBLASTER (DMA%, BasePort%, IRQ%)
DECLARE FUNCTION DSPVersion! ()
DECLARE SUB MakeNumber (Nr$, NX!, NY!, Col!)
DECLARE SUB MakePal (P%, R%, G%, B%)
DEFINT A-Z
COMMON SHARED BasePort%, LenPort%, Channel%, Playing%, FileNR%, Freq&, Looped%, PlayLen&
SCREEN 13
FOR P = 1 TO 63
  MakePal P, 0, P, 0
NEXT
MakePal 254, 63, 63, 63
MakePal 253, 63, 0, 0
Adder! = 6.28
Last=0
CrossX=0
CrossY=0
DO
  FOR Winkel! = 6.28 TO 0 STEP -.02
    IF TIMER <> Last& THEN
      Last& = TIMER
      LINE (0, 0)-(100, 3), 0, BF
      MakeNumber TIME$, 0, 0, 253
    END IF
    FOR Ab! = 0 TO 1 STEP .01
      D! = Winkel! - Ab!
      IF D! < 0 THEN D! = D! + 6.28
      RadCol = INT(Ab! * 63)
      IF Ab! = 0 THEN RadCol = 255
      x = SIN(D!) * 100
      Y = COS(D!) * 100
      LINE (160, 100)-STEP(x, Y), RadCol
      LINE (161, 101)-STEP(x + 1, Y + 1), RadCol
    NEXT
    'Adder! = Adder! - .001
    Adder! = 5 + (CrossX + CrossY) / 300
    CrossX = SIN(Winkel! + Adder!) * 100 + 160
    CrossY = COS(Winkel! + Adder!) * 100 + 100
    LINE (CrossX, CrossY)-(CrossX + 50, CrossY + 30), 253, B
    LINE (CrossX + 1, CrossY + 1)-(CrossX + 49, CrossY + 29), 253, B
    MakeNumber STR$(CrossX + CrossY + Adder!), CrossX + 3, CrossY + 3, 253
    IF CrossX MOD 5 = 0 THEN LINE (0, 190)-(100, 199), 0, BF
    IF CrossX MOD 5 = 0 THEN MakeNumber STR$(32767 * RND), 0, 190, 253
    WAIT &H3DA, 8
    MakeNumber STR$(CrossX + CrossY + Adder!), CrossX + 3, CrossY + 3, 0
    CrossX = SIN(Winkel! + Adder!) * 100 + 160
    CrossY = COS(Winkel! + Adder!) * 100 + 100
    LINE (CrossX, CrossY)-(CrossX + 50, CrossY + 30), 0, B
    LINE (CrossX + 1, CrossY + 1)-(CrossX + 49, CrossY + 29), 0, B
    IF LEN(INKEY$) THEN EXIT DO
  NEXT
LOOP
'MasterVolume Right%, Left%, 0
'DMAState 0
'SpeakerState 0
CLOSE

Num0:
DATA 1,1,1,1
DATA 1,0,1,1
DATA 1,1,0,1
DATA 1,1,1,1
Num1:
DATA 0,0,1,0
DATA 0,0,1,0
DATA 0,0,1,0
DATA 0,0,1,0
Num2:
DATA 1,1,1,0
DATA 0,0,1,0
DATA 0,1,0,0
DATA 1,1,1,0
Num3:
DATA 1,1,1,0
DATA 0,0,1,0
DATA 0,1,1,0
DATA 1,1,1,0
Num4:
DATA 1,0,0,0
DATA 1,0,1,0
DATA 1,1,1,0
DATA 0,0,1,0
Num5:
DATA 1,1,1,0
DATA 1,0,0,0
DATA 0,1,1,0
DATA 1,1,0,0
Num6:
DATA 1,0,0,0
DATA 1,1,1,0
DATA 1,0,1,0
DATA 1,1,1,0
Num7:
DATA 1,1,1,0
DATA 0,0,1,0
DATA 0,1,1,0
DATA 0,0,1,0
Num8:
DATA 1,1,1,1
DATA 1,0,0,1
DATA 1,1,1,1
DATA 1,1,1,1
Num9:
DATA 1,1,1,0
DATA 1,1,1,0
DATA 0,0,1,0
DATA 0,1,1,0
NumP:
DATA 0,0,0,0
DATA 0,0,0,0
DATA 0,1,0,0
DATA 0,1,0,0
NumD:
DATA 0,0,0,0
DATA 0,1,0,0
DATA 0,0,0,0
DATA 0,1,0,0

Defsng a-z
SUB MakeNumber (Nr$, NX, NY, Col)
Nr$ = LTRIM$(RTRIM$(Nr$))
  Fort=0
FOR NC = 1 TO LEN(Nr$)
  SELECT CASE MID$(Nr$, NC, 1)
  CASE "0": RESTORE Num0
  CASE "1": RESTORE Num1
  CASE "2": RESTORE Num2
  CASE "3": RESTORE Num3
  CASE "4": RESTORE Num4
  CASE "5": RESTORE Num5
  CASE "6": RESTORE Num6
  CASE "7": RESTORE Num7
  CASE "8": RESTORE Num8
  CASE "9": RESTORE Num9
  CASE ".": RESTORE NumP
  CASE ":": RESTORE NumD
  END SELECT
  IF MID$(Nr$, NC, 1) <> " " THEN
    FOR NYP = NY TO NY + 3
      FOR NXP = NX TO NX + 3
        READ NumC
        IF NumC THEN PSET (NXP + Fort, NYP), Col
      NEXT
    NEXT
  END IF
  Fort = Fort + 5
NEXT

END SUB

DEFINT A-Z
SUB MakePal (P, R, G, B)
  OUT &H3C8, P
  OUT &H3C9, R
  OUT &H3C9, G
  OUT &H3C9, B
END SUB