Sexbot Source Snippet
Posted: Thu Dec 16, 2004 6:02 am
The author of 'Night of the Sexbot' sent me the source for the windowing effects at the beginning of the game. Anybody know French? Enjoy.
Code: Select all
routine sequence_debut
{
local l, h
l = display.screenwidth
h = display.screenheight
local k = 0
local hauteur
cls
locate (l/3), (h/4-4): print "ALPHA-M SYSTEM"
locate (l/3), (h/4-3): print "\ILinuXXX 6.14b\i"
font (BOLD_ON)
locate ((l-18)/2), (h/4)
print "<< SLEEP MODE >>"
attendre (100)
clignote ( "( INCOMING TRANSMISSION )", ((l-25)/2), (h/3) )
clignote ( "( INCOMING TRANSMISSION )", ((l-25)/2), (h/3) )
clignote ( "( INCOMING TRANSMISSION )", ((l-25)/2), (h/3) )
clignote ( "( INCOMING TRANSMISSION )", ((l-25)/2), (h/3) )
locate ((l-52)/2), (h/3+2) : print ">>> Call from : Mrs Lotta C. Juggs"
clignote ( "( INCOMING TRANSMISSION )", ((l-25)/2), (h/3) )
clignote ( "( INCOMING TRANSMISSION )", ((l-25)/2), (h/3) )
locate ((l-52)/2), (h/3+3) : print ">>> Identification : OK"
clignote ( "( INCOMING TRANSMISSION )", ((l-25)/2), (h/3) )
descend_fenetre ( ((l-52)/2), (h/3+7), ((l-52)/2+52), (h/3+20), DARK_GRAY )
window ((l-52)/2), (h/3+7), ((l-52)/2+52), (h/3+20)
{
color TEXTCOLOR, DARK_GRAY
cls
locate 2,1 : print "Dzzzzzzzzzzzt..."
font (ITALIC_ON)
attendre (50)
locate 2,3 : lettres ( "> Alphie?.... " )
attendre (30)
locate 2,4 : lettres ( "> Alphie sweetheart? " )
attendre (30)
locate 2,5 : lettres ( "> I feel lonely this evening, I want you to come" )
locate 2,6 : lettres ( "> and give me your incomparable company, dear..." )
locate 2,7 : lettres ( "> and bring your biiig tools, we'll need them! " )
attendre (30)
locate 2,8 : lettres ( "> " )
attendre (30)
locate 2,9 : lettres ( "> Oh, I've nearly forgotten, the password to my " )
locate 2,10: lettres ( "> room has changed. Ask the girls, they know it." )
locate 2,11: lettres ( "> Come quick, sweetie, I need you... wetly! " )
attendre (30)
font (ITALIC_OFF)
locate 2,13: print "Click!"
attendre (50)
}
window 0
while k = 0
{
clignote ( "PRESS A KEY TO GO OUT SLEEP MODE" , ((l-32)/2), (h/3) )
k = system(11)
}
cls
font (BOLD_OFF)
hauteur = display.screenheight / 5
if hauteur <7
hauteur = 7
descend_fenetre (2, 1, (l*2/3), hauteur, dark_gray )
locate 5,15: print "Operating System OK\n"
descend_fenetre ((l*2/3+2), 1, l-1, hauteur, dark_gray )
locate 5,16: print "Localisation OK\n"
attendre (50)
locate 5,17: print "Libido circuit OK\n"
attendre (50)
locate 5,18: print "Kamasutrax loaded\n"
attendre (50)
for (k=0; k<=85; k++)
{
locate 5,19: print "Robotic Law number ";number k; " activated"
attendre (2)
}
attendre (50)
locate 5,20: print "Energy : Maximum\n"
attendre (50)
locate 5,21: print "All systems ready."
locate 5,22: print "Awaiting instructions."
PrintStatusline
attendre (50)
print "\n\n"
}
!---------------------------------------------------
! fait clignoter le texte transmis
! l et h sont la position en x et y
routine clignote (t, l, h)
{
color textcolor, bgcolor
locate l,h: print t
attendre (50)
color bgcolor, bgcolor
locate l,h: print t
color textcolor, bgcolor
attendre (50)
}
!----------------------------------------------------
! fait descendre progressivement une fenêtre
routine descend_fenetre (gauche, haut, droite, bas, couleur)
{
local i
color textcolor, couleur
for (i=haut; i<= bas; i++)
{
window gauche, haut, droite, i
{
cls
attendre (20)
}
window 0
}
color textcolor, bgcolor
}
! ------------------------------------------------
! attendre x centièmes de seconde
routine attendre(x)
{
local i
for (i=0; i<=x; i++)
system (32)
}
! ------------------------------------------------
! affiche le texte en paramètre 2 lettres à la fois
routine lettres(t)
{
local i, len
len = string (texte, t, 255)
for (i=0; i< len ; i+=2)
{
stringprint (texte, i, i+2)
attendre (10)
}
}