kengr: (Default)
[personal profile] kengr
(from a mailing list I'm on)

Date: Sat, 24 Dec 2005 00:30:39 -0800
From: Uilliam mac Ailéne mhic Seamuis <uilliam@shaw.ca>
To: steps@antir.sca.org
Subject: [STEPS] OOP OT Night Before Christmas in pseudo-code (was: Re: [STEPS] Navy version of "Twas the Night Before Christmas)

I figured I'd have a go at a Night Before Christmas parody. This is for the code-bashers in the crowd.

/* Night Before Christmas
*
* rev 0.1
* status: in development
*/

#include
[Error: Irreparable invalid markup ('<stdio.h>') in entry. Owner must fix manually. Raw contents below.]

(from a mailing list I'm on)

Date: Sat, 24 Dec 2005 00:30:39 -0800
From: Uilliam mac Ailéne mhic Seamuis <uilliam@shaw.ca>
To: steps@antir.sca.org
Subject: [STEPS] OOP OT Night Before Christmas in pseudo-code (was: Re: [STEPS] Navy version of "Twas the Night Before Christmas)

I figured I'd have a go at a Night Before Christmas parody. This is for the code-bashers in the crowd.

/* Night Before Christmas
*
* rev 0.1
* status: in development
*/

#include <stdio.h>
#include <xmassupport.h>

#define TRUE 1
#define FALSE 0

// globals

long int XmasEve = 1224.2215;
str Creaturelist = 'cat' 'dog' 'horse' 'yak' 'dodo' 'platypus' 'mouse';
str ChildLoc;
byte fHope;
byte fClatter = FALSE;
byte fMoonLight;
byte fStNickArrive;
byte fClothesFur;
byte fClothesSoot;
byte fClothesAshes;
byte fStockings = FALSE;

main
{
fHope = TRUE;

setClock(XmasEve);
checkStirring(*Creaturelist);
checkStockings('chimney','care');

while ChildLoc == 'bed'
{
setVision('sugarplums','dance','head');
}
while !fClatter
{
doNap('Mama','kerchief');
doNap('I','cap');
checkLawnNoise();
}

// clatter has happened; move actor to next location

doAct('spring','from bed');
doAct('fly','to window');
doAct('tear open','shutters');
doAct('throw up','sash');

// home exterior check

setMoonTarget('newfallen snow');
setLigtEffect('midday luster',*ObjList);
fMoonLight = TRUE;

// spawn Santa object

objAppear('sleigh');
objAppear('reindeer', 8)
objAppear('driver')
fStNickArrive = TRUE;

DeerSpeed = EagleSpeed + 1;

DeerList = 'Dasher' 'Dancer' 'Prancer' 'Vixen' 'Comet' 'Cupid';

DeerList += 'Donder' 'Blitzen';
DeerIndex = 1;
for (DeerIndex <=8; DeerIndex++)
{
SantaSummon(DeerList[DeerIndex]);
}

DeerLZ = 'housetop';
setLoc(DeerLZ);
setRoofNoise(Hooves);

StNickImport('chimney','bound');

// set S.Clause conditions

fClothesFur = TRUE;
fClothesSoot = TRUE;
fClothesAshes = TRUE;
strBagLoc = 'back';
strEyes = 'twinkling';
strDimples = 'merry';
strCheeks = 'roses';
strNose = 'cherry';
strMouth = 'bow';
strBeard = 'snow';
strPipeLoc = 'teeth';
strSmokeLoc = 'head';
strSmoke = 'wreath';
strFace = 'broad';
strBelly = 'round';

// show actor's reaction to S. Claus

doAct('laugh'); // in spite of self
ActorKnowledge = NoDread(Eye,'wink',Head,'twist');
while !fStockings
{
SantaMode(Silent);
StockingFill();
}

exitSetup = Finger(ProxNose);
exitExec = UpChimney('nod');
SantaLoc = enterSleigh('spring');
TeamAlert(Whistle);
DepartMode = Flightmode('thistledown');

write('exclaim','Happy Christmas to all,\nand to all a good-night.');
}

Bill
('cause Uilliam would have no idea about C code...)

--
"Take sides! Always take sides! You may sometimes be wrong - but the man
who refuses to take sides must *always* be wrong! Heaven save us from
poltroons who fear to make a choice!" R.A. Heinlein, "Double Star"
--
Main homepage: http://members.shaw.ca/fog.locker/
SCA homepage: http://members.shaw.ca/uilliam/
LiveJournal: http://www.livejournal.com/users/jackytar/

-------------------- << "steps@antir.sca.org" >> --------------------
The Cathedral Steps - Kingdom of An Tir email list
To unsubscribe, e-mail: steps-unsubscribe@antir.sca.org
For additional commands, e-mail: steps-help@antir.sca.org

January 2026

S M T W T F S
     123
45678910
11121314 151617
18192021222324
25262728293031

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jan. 28th, 2026 04:53 am
Powered by Dreamwidth Studios