Spa grave ! P'tit coup de nostalgie ? Tiens, j'avais un souci avec la lib fmod, du coup j'ai modifié
Code : Tout sélectionner
;##########################################################################################
;# Yet another quick and crap cracktro remake by Padman. (c)06/2011 #
;# Libminifmod170 by rbz is used for music replay. #
;# Out of laziness I also used a slightly tweaked sine scroller routine by Shockwave, #
;# which can be found here: http://www.dbfinteractive.com/forum/index.php?topic=1436.0. #
;##########################################################################################
Global xres.w , yres.w , loop.w ,xp.w , yp.w , t.s , tptr.w , sco.b
xres = 640
yres = 480
sco = 0
tptr = 1
FPS = 60
TimerDuration = 1000 / FPS
IncludeFile "scroll.pbi"
;IncludeFile "libminifmod170.pbi"
InitSprite()
InitSound()
InitKeyboard()
Dim gfxfont(60)
window = OpenScreen( xres , yres , 16 , "Paradox Fucktro")
If window = 0
MessageRequester("Error", "This is fucked up, I can't open the window", 0)
End
EndIf
ClearScreen(0)
FlipBuffers()
font = CatchImage (#PB_Any, ?font)
StartDrawing (ScreenOutput())
DrawImage (ImageID(font),0,0)
StopDrawing()
xp = 0
yp = 0
For loop =1 To 60
gfxfont(loop) = GrabImage(font,#PB_Any,xp,yp,31,31)
xp = xp + 32
;
If xp > = 320
yp = yp + 32
xp = 0
EndIf
Next
CatchSprite(0,?one)
CatchSprite(1,?two)
CatchSprite(2,?three)
CatchSprite(3,?foot)
CatchSprite(4,?logo)
CatchMusic(0, ?mod,?endmod-?mod)
PlayMusic(0)
Repeat
timer = ElapsedMilliseconds()
ClearScreen($0)
ExamineKeyboard()
AnimDelay + 1
If AnimDelay = 7
AnimDelay = 0
AnimFrame + 1
EndIf
If AnimFrame = 3 : AnimFrame=0 : EndIf
StartDrawing (ScreenOutput())
cco = 0
For cc = 0 To 30
letter = (Asc(UCase(Mid(t.s, tptr+cc, 1)))-31)
DrawImage (ImageID(gfxfont(letter)), 310+300*-Sin((sco+cco)/180), 270+160*Cos((cco+sco)/180), 16+16*Cos((sco+cco)/90), 32)
cco = cco + 42
Next
sco = sco -2
If sco < -32
tptr = tptr + 1
sco=sco + 42
EndIf
If tptr > (Len(t.s)-30)
tptr = 1
EndIf
StopDrawing()
DisplayTransparentSprite(animframe,128,97)
DisplaySprite(3,(640-SpriteWidth(3))/2,386)
DisplayTransparentSprite(4,(640-SpriteWidth(4))/2,0)
TimeGap = TimerDuration - (ElapsedMilliseconds() - Timer)
If TimeGap > 16
Delay( TimeGap - 10 )
EndIf
FlipBuffers()
Until KeyboardPushed (#PB_Key_Escape)
StopMusic(0)
End
DataSection
one:
IncludeBinary "prd1.bmp"
two:
IncludeBinary "prd2.bmp"
three:
IncludeBinary "prd3.bmp"
foot:
IncludeBinary "foot.bmp"
font:
IncludeBinary "font.bmp"
logo:
IncludeBinary "logo.bmp"
mod:
IncludeBinary "angels.xm"
endmod:
EndDataSection