rem Happy New Year - Code by Kulle 12/2002
hide mouse : sync on : sync rate 0
autocam off : set global collision off : randomize timer()
dim fire(5)
loadsnd(1)
firetex(1)
fireobj(1)
skybox(1)
set text font "times new roman" : set text size 64
backdrop off : draw to front : ink rgb(255,0,0),0 : cls
repeat
for n=1 to 5
if fire(n)>0
scale object n,fire(n),fire(n),fire(n)
fire(n)=fire(n)+1
if fire(n)>100+rnd(100) then fire(n)=0
else
fire(n)=1
scale object n,0,0,0
position object n,rnd(800)-400,rnd(800)-400,rnd(800)-400
texture object n,rnd(255)+1
if sound playing(n)=0
set sound speed n,5000+rnd(15000)
play sound n
endif
endif
next n
set camera to follow 0,0,0,a,600,sin(a)*600,1,0
point camera 0,0,0
a=wrapvalue(a+1)
center text screen width()/2,0,"Happy New Year"
center text screen width()/2,screen height()-64,"Code by Kulle 12/2002"
sync
until mouseclick()
loadsnd(0)
firetex(0)
fireobj(0)
skybox(0)
undim fire(10)
end
function loadsnd(f)
if f
if file exist("bumm.mp3")=0
open to write 1,"bumm.mp3"
do
read d$
if d$="" then exit
for i=1 to len(d$) step 2
d=dezi(d$,i)*16+dezi(d$,i+1)
write byte 1,d
next i
loop
close file 1
endif
for s=1 to 5
load sound "bumm.mp3",s
next s
else
for s=1 to 5
delete sound s
next s
endif
endfunction
function firetex(f)
if f
create bitmap 1,256,256
for i=1 to 256
ink rgb(rnd(255),rnd(255),rnd(255)),0
for r=128 to 1 step -1
for a=0 to 350 step 10
x=sin(a)*r
y=cos(a)*r
dot x+128,y+128
next a
next r
get image i,0,0,256,256
next i
delete bitmap 1
else
for i=1 to 256
delete image i
next i
endif
endfunction
function fireobj(f)
if f
for n=1 to 5
make object plain n,256,256
make mesh from object 1,n
for l=1 to 34 step 2
add limb n,l,1
rotate limb n,l,l*10,0,0
add limb n,l+1,1
rotate limb n,l+1,0,l*10,0
next l
delete mesh 1
set object n,1,1,0,1,0,0,0
ghost object on n
next n
else
for n=1 to 5
delete object n
next n
endif
endfunction
function dezi(d$,i)
d=asc(mid$(d$,i))
d=d-48
if d>9 then d=d-7
endfunction d
function skybox(f)
if f
create bitmap 1,256,256
for i=1 to 100
c=rnd(255)
ink rgb(c,c,c),0
dot rnd(255),rnd(255)
next i
get image 257,0,0,256,256
delete bitmap 1
make object cube 6,2000
texture object 6,257
set object 6,1,1,0,1,0,0,0
else
delete image 257
delete object 6
endif
endfunction
data "52494646CC0F000057415645666D74201E00000055000100401F0000D0070000010000000C000100"
data "020000009000010071056661637404000000862D000064617461300F0000FFE328C4001C82A1A1B9"
data "4C18000020A49BF00F39B335F87079A60E36667F87048120478C7004044644303EADB7FE9D37BAF5"
data "9CDAF7ECC2C89639B7BCD292109C0DE0000142CF88882CC20008A0606C062C20008A06066EFA16EF"
data "1CE226EF1CD001287033734427030374DDDCE1542703781041226EFFE85BB9FB801070316D18D358"
data "0700079B1322771699030C48239FFFE328C41122C1F2D44D9068220B87100C1BC031A1B710206638"
data "7C52E5B20078660B8609FE320B868665F71E2522E9A9B125FE13B19860105A6390E970D0EA0B4167"
data "7FF3E683BC799A181704BC27E32E9A1D33C81CFFF2F97CDD41802140C18021060491FD60473B07DF"
data "ACFB03FFF2F947060BE070F902460BBC982050E03E5D9F8E0C794369AF90266156D722C00020FFE3"
data "28C4092241AAE5B58C4800816201093FC0140D5AF068168668971C88E2C2058722B9C924B30CB944"
data "4A316A3AAF2557446C091F39E5A4D3292CFA9128AC9D6F16CDA4DA8411CD407C5296E21756DCA663"
data "CE08D4D95CEE686A5DE9C755758191871A2B05DA4F24E0D1607B1F1C4523AC7B2CF4D91013158BC2"
data "A343B6B79979ED66197607B5ED52EF56FEFD5F06BFACFFE328C4031D808ED855CF000103FAE2EACD"
data "3321CB91ECF95EA28A792795EE505F2F633656356F34CFBC3B653E198C4ADFF100977BEDDAEBEBE7"
data "33E17C03890DE2094DD40DADA4FEA27E9751B78FD493BFBEE9F459954B7FAD8F6FC75FBA569CCFFF"
data "DFDBF2FEB3DFE31B3DBBF76F2E7EBE84FD918751F1F1F62DB5056FABFE978014E4964B401FF93275"
data "191682274958FFE328C4101E018AE51E48468D7B41952C8C4532693318D633B98C8E6F93BC8F39F5"
data "2E73B66B5677DD69CBC77D3637521E35CE616D4BDEB10BE3FEF855116AD74D227A031155418503B9"
data "39864694B35EECA18DDBA69E3FEF4713CACFE5D36414DA93FBFAEAFC873775170B89A23773BBCE59"
data "AC6FDF80009BB64B2800695018344CA97108A3121F465536CAA973A4AEC6FFE328C41B1DE9BEE5BE"
data "124609CBE28A523FD0E1A3F99763CFF55A9C7F533E9659A083333229DD0B62AE46D488E5128F01B4"
data "E1B6624FDFF5474DE9824FDB5E3A30CC525989D6716E8655DD31629CF197DEB7F4E356FAEFF626B7"
data "A9099E3EE2A96FD9DB853ADC7BFCEFD08075D4000CAC08063AA94EB490552DA36C3750320107001C"
data "0A0C888521B83D0C84DA0C3E0B99FFE328C4261E788ED0D613CC05ED5015DB722AEAE31884A38CD7"
data "29B9BDDE0C8BDEDB3E1860AFE0BAACFC96C33B13A3B60774D8FFA5F0F1E46435D02B6BC06494F972"
data "4729234C11CF3AAE4D95DDEDFF2B7BFE6A1DACECBB4D96E20B7F76EF7FDB5E80005C92DB77007E8A"
data "0E9A2AEA3C4570E59C920572EC5CC2E29D902485350010A6655EC91B2BAC4439E60304484504FFE3"
data "28C42F1E3AAAE5BE40469D4688064E6366DC6E49BC6D07B0B65CCCC80742ECE74E4810D0B23BCDAB"
data "B7AA271E8864783879F84DFAB780FF23595C3D26EBC14FF53041B66BD68B4E768461334F31F6FFFB"
data "7F6FAB7D3E805F724B4003F652D02CC5226CC100B019216288C1ED475229BBB6BF94B676A3757B41"
data "B1D39C5D66A7EC75738B169C8C6D0EE4CD1D8E2A97DEFFE328C4391E022ADCFE3046C5AFDE36717A"
data "516947EEAB108E02D71001055A54D5AF1CFF1B75BCFFDE5E281D5F3569ABF3BCF3A4E9A2451AF3A4"
data "84FC75FD0953EFF7C5ACAF33193EFFFFFFFC800013925B70007FAB21254D1118549273242E849017"
data "19699E3894131EE8DC443AF7B6D22A4799785EF7E376E6674B9E5B9D7CAC684FE63A04A6F1DA646D"
data "3893BDF8F88AFFE328C4441E4182D9BE498641030F7C6E2EBBC8CB5EEEF29B1C9C1AF101EAAFAAA1"
data "C5574135029F7AF7EEB7A58777C5177FDFFF8AD7637A75FBA7EA67DB7FA7AFFD80025CB2EDB8007F"
data "15A2B1C34541181438225227520C879C4511AEBA92E7A9931757E497F685EED5AF5B32DF2CCF8836"
data "8F7B34355B9F4EDA929F6C23BF0A2BA9FB199F58A2C3B48A3D26DA1DB179FFE328C44E1E02FEDDBE"
data "4986249BAB329A550B96C5AAF2C22CEEA589A99958F044ABE1048B1851B40B5FA91605EF7ACC8D4B"
data "D52C71BDAB8006AAAA99DF59AC0508E989134134E49B1A8C53CECCECBEAA1762539C228B0E1D24DA"
data "3647E3CA67995FFFFA497F63D0FD18C68F83CF15C4B4E1FDCF9F5F5B0C8B253F2DA54A695E49F722"
data "E6998851F3F5A5F9DBAEA4117B5BFFE328C4591E6A9EE3F83046835395F5D95D09C0497DF66A2AD4"
data "8C89A69B8D3165BB57C474CEAA8D7FD9FFF047F83A69CA0015C33345C0AA0747A2B3EA1831405475"
data "D0F520697631A79D32CF18CAD7F532D3D0E6991824F85FBFD336FDFA6495890AE5F093B211AF0B85"
data "E6E716C51CC07B5F270E9E90CC03997AFFFF736DA7AF89846625B72FFDE5BC83DFAF9CCC0D6BFFE3"
data "28C4621DB9F2CC3E13060DBD6F7E3CDD73492761480197EFF804D5FFFBAE6F345D7F0003FCD2AC69"
data "A3A4B727E53490D3FDCEC385B88440835932490EAE6D7026BA333B9C42663D98938DFCFD9A4396DA"
data "57ACC1A7ED9FCDB28CB5A0669DBC1AD106A9CF8710B31FEFBEE5BF22F4D477D5136DE36D96D1CE8A"
data "2C58CD1C76F17640A6EDA5D7BE36FAF9D77BFFFF4CFEFFE328C46E1DF99AC0367A4645855796FCA9"
data "B19FD0553600126AAEB9BF886284208A5D64707E94CC45C908F6AFFF09A5EFF3EEE8463A626CFF65"
data "C805627B231CE648D7EA63CCA7FA338BCE7DCAABA09CB624AC8CFE47A34534DA264595BF5CFEC4A9"
data "4C44EBB9BC22634D46678A32BA4C442F32063DB9A3E1B969E3370C5356FA1A57B643038FF975D76E"
data "EEFDFB863412FFE328C4791DFAEEDBF84046EBDF807F8B4CF574EC7E17E4B97A3F48052C5A789A3B"
data "9510951A9695E23B9D4956A62A5221BEF1D3EF516755CBEBACFF426A57F36677BB023478744B8246"
data "A9FFCFFDFBF1214CD9049BD3A6BDB6A30BC4F9772AF4FE60B9AF3F29DFF9A844C8F3E0362AC88620"
data "B3D477DE5FE57F977F54D7FFB7FF5002FFA97D71FFA63C02D372D00099BEFFE328C4841F3136B034"
data "7B063531CBC49AD919C18AF191807F62CA73A808DF68BD939944B13BF0CF634BF7AF217416F9B013"
data "D352AD215293FDCE416C696EC6952ADC8BF5F9CF52B977EA94E7EAF269B964D0BB49518CFCA66E59"
data "D8BC43F9A1ECB732B63E86B61996649BB573E9E670A9E5FD69ABFE521FBE339E1662525592E8B2EA"
data "FF801649C940026597564655C2D8FFE328C48A1F43C2B85E6046C40F361ECDC407CE0160C908AC61"
data "A1C2D294655FB190B3A8B131A6D194F67945AF73B95311330BE568B0BFCFB835C34C269D104B619C"
data "B65F73C76BB4D1F7A20A154613B1446725524E339C843BEF22A73B7FEB2EA2DEBFE3AF71D6E71736"
data "D23BA9BBFCA3FD714EDFB5CFD5BDE9B5FF8EFC069B92E000EE50C6C8640F1B1C58956604A6D8FFE3"
data "28C4901F30EAACFE6184855915296F953B67541F6EED62A0A082D1CD6FB31DCCEC595636CB557679"
data "B53DE93A29D32EEE87C334D6FC372E59BFB6C4765A54AA670CE4CC9F8E0874533ADF61632CB3BB36"
data "5D1BB26CDF7E555FBF73A9AACFFF7BE6AA43A9F73CAFF3C93B9B124F1D644BB2E20A524C001FD48E"
data "90A0019A80C03E3A04B6A08D50684C19056488402223FFE328C4961E3A4EB05E1246115075006C3C"
data "2424F485C92AD2FCCB40C39ADE8D0D19B43287D222DF623EC6F8BED78F974F94BDA1343CC1DBB455"
data "BC7DD8DFF9E7A6AE37CD155D82DAFE4262B143729F6A30F4E3D6FD7D5BFFF2436B767F4B15851DF0"
data "BF00AD705E307FA89F3B4FFB7FFFFF7C17E000661E160AE168862360B8E80F1D904B04D4918FE20A"
data "F33661292019FFE328C4A02071CA9C3E4986851CD6EB4B06527D082D448EC40D412698CD39E6A8ED"
data "8F58EDF11CCEC9F37015DBA87D32C53772C2C3F86FECA0DF88FEBA1358E536C6645456E52B8F0EE4"
data "58BAB4ABCB186FE2A1E8B44D0F790AA2B2FA9FFFFFFA78AFD77535687ED973BFFFFEA7EE6F8026AD"
data "000D78348D76C473826809E10262284C84BC02FCC0A2573E7256C090C8D3FFE328C4A12001168816"
data "2B0C11CB38324C480A997EAA40A9B352874AB2926C14744AE160689ACED60D07675718F5444253BE"
data "B24223CAB8B1E1A78159E6C54E87445529A603A25C1A253B3C2592F869E25167D8B056A358967473"
data "C24F64E968D4F952C0606AE4FF85194AA44192D1BC4C47B1404BC7485F0D318810606C87D12022CB"
data "09FCBEC826215322443248260AA0FFE328C4A41EC0F66CBE7990642659B6653C92A9304C5549C26C"
data "91302A19406958CA72B7224F25ACAAA3E35B1AB50FEC30B4486074892090780A2AEFFAF8B0148849"
data "E2A662C5896B2212AB81596BED7FFE968CC0447FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
data "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE3"
data "28C4AC1C81760C007A4674FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
data "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
data "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF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FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
data "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
data "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF4C49"
data "535456000000494E464F4953465435000000436F6F6C204564697420762E312E3532206279205379"
data "6E7472696C6C69756D20536F66747761726520436F72706F726174696F6E0000494352440B000000"
data "313939362D30352D31300001"