fb:porticula NoPaste
tekkno synq!
Uploader: | Jojo |
Datum/Zeit: | 29.06.2007 20:19:28 |
'tekkno
'(c) 2007 by Saga-Games
declare sub initfmod()
declare sub endprog()
declare sub randomizeColor()
#include "fmod.bi"
const full = 0 'Vollbildschirm? (0|1)
const bitsperpixel = 32 '15, 16, 24 oder 32... 16 = beste performance, 32 = sieht am besten aus
const screenX = 800 '1024
const screenY = 600 '768
const speed = 4
screenres screenX,screenY,bitsperpixel,2,full
windowtitle "tekkno 1.0 -- Saga-Games"
setmouse ,,0
initFMOD
Dim Shared MusicHandle As long ptr
MusicHandle = FMUSIC_LoadSongEx("midnight.it",0,0,FSOUND_LOOP_NORMAL,0,0)
if Musichandle then
FMUSIC_PlaySong(MusicHandle)
FMUSIC_SetOrder (MusicHandle,3)
end if
dim ik as string
type hue
r as integer
g as integer
b as integer
end type
type pnt
x as integer
y as integer
end type
dim shared col as hue, points(1 to 4) as pnt
dim abnahme as integer
dim as integer row, oldrow
dim i as integer
randomizeColor
cls
do
'FMUSIC_GetOrder(MusicHandle)
row = FMUSIC_GetRow(MusicHandle)
if (row mod 4 = 0 or row = 30 or row = 62 or row >= 60 or row = 56 or row = 58) and oldrow <> row then
cls
randomizeColor
abnahme = 0
end if
col.r -= speed
col.g -= speed
col.b -= speed
if col.r < 0 then col.r = 0
if col.g < 0 then col.g = 0
if col.b < 0 then col.b = 0
screenlock
'line(0+abnahme,0+abnahme) - (screenX - 1 - abnahme, screenY - 1 - abnahme), rgb(col.r, col.g, col.b), bf
color rgb(col.r, col.g, col.b)
line(points(1).x + abnahme, points(1).y + abnahme) - (points(2).x - abnahme, points(2).y + abnahme)
line-(points(4).x - abnahme, points(4).y - abnahme)
line-(points(3).x + abnahme, points(3).y - abnahme)
line-(points(1).x + abnahme, points(1).y + abnahme)
paint(screenX \ 2, screenY \ 2)
screenunlock
'circle(screenX \ 2, screenY \ 2), screenY / 1.2 - abnahme, rgb(col.r, col.g, col.b),,,,f
abnahme += 4
sleep 20
ik = inkey
oldrow = row
loop until ik = chr(27) or ik = chr(255)+"k"
endprog
Sub InitFMOD()
Print Chr(26); " Starte FMOD sound system... ";
If FSOUND_GetVersion < FMOD_VERSION Then
Print "FMOD Version " + Str(FMOD_VERSION) + " oder höher wird ben”tigt - Sound wurde deaktiviert"
getkey
end
End If
If FSOUND_Init(44100, 64, 0) = 0 Then
Print "FMOD kann nicht gestartet werden - Sound wurde deaktiviert"
getkey
end
End If
Print "OK"
End Sub
Sub EndProg
FMUSIC_FreeSong(MusicHandle)
FSOUND_Close
End Sub
sub randomizeColor()
col.r = 50 + int(206 * rnd)
col.g = 50 + int(206 * rnd)
col.b = 50 + int(206 * rnd)
points(1).x = (100 * rnd - 50)
points(1).y = (100 * rnd - 50)
points(2).x = ScreenX - (100 * rnd - 50)
points(2).y = (100 * rnd - 50)
points(3).x = (100 * rnd - 50)
points(3).y = ScreenY - (100 * rnd - 50)
points(4).x = ScreenX - (100 * rnd - 50)
points(4).y = ScreenY - (100 * rnd - 50)
end sub