Sexbot Source Snippet

This is a discussion / support forum for the Hugo programming language by Kent Tessman. Hugo is a powerful programming language for making text games / interactive fiction with multimedia support.

Hugo download links: https://www.generalcoffee.com/hugo
Roody Yogurt's Hugo Blog: https://notdeadhugo.blogspot.com
The Hugor interpreter by RealNC: http://ifwiki.org/index.php/Hugor

Moderators: Ice Cream Jonsey, joltcountry

Hugella
Posts: 73
Joined: Mon Jun 28, 2004 4:45 pm
Location: Minneapolis, Minnesota

Sexbot Source Snippet

Post by Hugella »

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 &#40;100&#41;
	clignote &#40; "&#40; INCOMING TRANSMISSION &#41;", &#40;&#40;l-25&#41;/2&#41;, &#40;h/3&#41; &#41;
	clignote &#40; "&#40; INCOMING TRANSMISSION &#41;", &#40;&#40;l-25&#41;/2&#41;, &#40;h/3&#41; &#41;
	clignote &#40; "&#40; INCOMING TRANSMISSION &#41;", &#40;&#40;l-25&#41;/2&#41;, &#40;h/3&#41; &#41;
	clignote &#40; "&#40; INCOMING TRANSMISSION &#41;", &#40;&#40;l-25&#41;/2&#41;, &#40;h/3&#41; &#41;
	locate &#40;&#40;l-52&#41;/2&#41;, &#40;h/3+2&#41; &#58; print ">>> Call from &#58; Mrs Lotta C. Juggs"
	clignote &#40; "&#40; INCOMING TRANSMISSION &#41;", &#40;&#40;l-25&#41;/2&#41;, &#40;h/3&#41; &#41;
	clignote &#40; "&#40; INCOMING TRANSMISSION &#41;", &#40;&#40;l-25&#41;/2&#41;, &#40;h/3&#41; &#41;
	locate &#40;&#40;l-52&#41;/2&#41;, &#40;h/3+3&#41; &#58; print ">>> Identification &#58; OK"
	clignote &#40; "&#40; INCOMING TRANSMISSION &#41;", &#40;&#40;l-25&#41;/2&#41;, &#40;h/3&#41; &#41;
	descend_fenetre &#40; &#40;&#40;l-52&#41;/2&#41;, &#40;h/3+7&#41;, &#40;&#40;l-52&#41;/2+52&#41;, &#40;h/3+20&#41;, DARK_GRAY &#41;
	window &#40;&#40;l-52&#41;/2&#41;, &#40;h/3+7&#41;, &#40;&#40;l-52&#41;/2+52&#41;, &#40;h/3+20&#41;
	&#123;
		color TEXTCOLOR, DARK_GRAY
		cls
		locate 2,1 &#58; print "Dzzzzzzzzzzzt..."
		font &#40;ITALIC_ON&#41;
		attendre &#40;50&#41;
		locate 2,3 &#58; lettres &#40; "> Alphie?....  " &#41;
		attendre &#40;30&#41;
		locate 2,4 &#58; lettres &#40; "> Alphie sweetheart?  " &#41;
		attendre &#40;30&#41;
		locate 2,5 &#58; lettres &#40; "> I feel lonely this evening, I want you to come" &#41;
		locate 2,6 &#58; lettres &#40; "> and give me your incomparable company, dear..." &#41;
		locate 2,7 &#58; lettres &#40; "> and bring your biiig tools, we'll need them!  " &#41;
		attendre &#40;30&#41;
		locate 2,8 &#58; lettres &#40; ">  " &#41;
		attendre &#40;30&#41;
		locate 2,9 &#58; lettres &#40; "> Oh, I've nearly forgotten, the password to my " &#41;
		locate 2,10&#58; lettres &#40; "> room has changed. Ask the girls, they know it." &#41;
		locate 2,11&#58; lettres &#40; "> Come quick, sweetie, I need you... wetly!  " &#41;
		attendre &#40;30&#41;
		font &#40;ITALIC_OFF&#41;
		locate 2,13&#58; print "Click!"
		attendre &#40;50&#41;
	&#125;
	window 0
	while k = 0
	&#123;
		clignote &#40; "PRESS A KEY TO GO OUT SLEEP MODE" , &#40;&#40;l-32&#41;/2&#41;, &#40;h/3&#41; &#41;
		k = system&#40;11&#41;
	&#125;
	cls
	font &#40;BOLD_OFF&#41;
	
	hauteur = display.screenheight / 5 
	if hauteur <7
		hauteur = 7
	descend_fenetre &#40;2, 1, &#40;l*2/3&#41;, hauteur, dark_gray &#41;
	locate 5,15&#58; print "Operating System OK\n"
	descend_fenetre &#40;&#40;l*2/3+2&#41;, 1, l-1, hauteur, dark_gray &#41;
	locate 5,16&#58; print "Localisation OK\n"
	attendre &#40;50&#41;
	locate 5,17&#58; print "Libido circuit OK\n"
	attendre &#40;50&#41;
	locate 5,18&#58; print "Kamasutrax loaded\n"
	attendre &#40;50&#41;
	for &#40;k=0; k<=85; k++&#41;
	&#123;
		locate 5,19&#58; print "Robotic Law number ";number k; " activated"
		attendre &#40;2&#41;
	&#125;
	attendre &#40;50&#41;
	locate 5,20&#58; print "Energy &#58; Maximum\n"
	attendre &#40;50&#41;
	locate 5,21&#58; print "All systems ready."
	locate 5,22&#58; print "Awaiting instructions."
	
	PrintStatusline
	attendre &#40;50&#41;
	print "\n\n"
&#125;



!---------------------------------------------------
! fait clignoter le texte transmis
! l et h sont la position en x et y
routine clignote &#40;t, l, h&#41;
&#123;
	
	color textcolor, bgcolor
	locate l,h&#58; print t
	attendre &#40;50&#41;
	
	color bgcolor, bgcolor
	locate l,h&#58; print t
	color textcolor, bgcolor
	attendre &#40;50&#41;
&#125;

!----------------------------------------------------
! fait descendre progressivement une fenêtre
routine descend_fenetre &#40;gauche, haut, droite, bas, couleur&#41;
&#123;
	local i
	color textcolor, couleur
	for &#40;i=haut; i<= bas; i++&#41;
	&#123;
		window gauche, haut, droite, i
		&#123;
			cls
			attendre &#40;20&#41;
		&#125;
		window 0		
	&#125;
	color textcolor, bgcolor
&#125;



! ------------------------------------------------
! attendre x centièmes de seconde
routine attendre&#40;x&#41;
&#123;
	local i
	for &#40;i=0; i<=x; i++&#41;
		system &#40;32&#41;
&#125;

! ------------------------------------------------
! affiche le texte en paramètre 2 lettres à la fois
routine lettres&#40;t&#41;
&#123;
	local i, len
	len = string &#40;texte, t, 255&#41;
	for &#40;i=0; i< len ; i+=2&#41;
	&#123;
		stringprint &#40;texte, i, i+2&#41;
		attendre &#40;10&#41;
	&#125;
&#125;

Cryptonomic
Posts: 55
Joined: Wed May 05, 2004 4:35 am
Location: Chicago, IL
Contact:

Post by Cryptonomic »

This is perfect. Thank you very much for checking into this.

Post Reply