pouët.net

Go to bottom

Random line of code thread

category: code [glöplog]
Virt[x+y*320]=d ^ x+y+t+((y-x-t2)|(64+x+t2)) | (t&x|y)+t2;
added on the 2008-06-09 12:47:28 by visy visy
#define WMEM(c) ((bool)((memory^0xFF)&c))
added on the 2008-06-09 12:50:05 by panic panic
visy: your 1k intro?

Code: error = WideCharToMultiByte(CP_ACP, 0, &*buf.begin(), (int)buf.size(), &*ret.begin(), (int)ret.size(), 0, 0);
added on the 2008-06-09 12:50:50 by Preacher Preacher
Elsewhere: yes, the first effect in original C-form :)
added on the 2008-06-09 12:55:17 by visy visy
(without postprocessing, of course)
added on the 2008-06-09 12:55:31 by visy visy
visy: interesting !
move.l d1, kikkelikakka
added on the 2008-06-09 18:36:02 by aegis aegis
for (n1=0;n1<ly;n1++)
{
for (n2=0;n2<lx;n2++)
{
top=n1-ss;
bottom=n1+ss;
left=n2-ss;
right=n2+ss;

s=((float) ((right-left)*(bottom-top))-ss*ss*2)/(ss*ss*2);
if (s>1) s=1;
if (s<0) s=0;
s=s*s;

r=(1-s/2);
g=(1-s/2);
b=(1-s/2);
}
}
philosophical.
why is ss*ss*2 not outside the loop?
added on the 2008-06-09 23:46:58 by Preacher Preacher
Code: LoadPDB[file_] := Map[ Function[ List[ ToExpression[StringTake[Slot[1], { 7, 11}]], StringReplace[StringTake[Slot[1], {13, 16}], " " -> ""], StringReplace[StringTake[Slot[1], {13, 14}], " " -> ""], ToExpression[ List[ StringReplace[StringTake[Slot[1], {31, 38}], "," -> "."], StringReplace[StringTake[Slot[1], {39, 46}], "," -> "."], StringReplace[StringTake[Slot[1], {47, 54}], "," -> "."] ] ] ] ], Select[ Select[ Import[file, "Lines"], Function[StringMatchQ[Slot[1], "ATOM*"]] ], Function[UnsameQ[StringTake[Slot[1], {14}], "C"]] ] ]


some old good and almost useless code...
added on the 2008-06-09 23:49:08 by rmeht rmeht
if((unsigned int)x < 319 && (unsigned int)y < 199) *(0xA000 + x + (y<<8) + (y<<5)) = c;
added on the 2008-06-09 23:59:29 by bdk bdk
hr = E_FAIL;
added on the 2008-06-13 08:04:32 by mueslee mueslee
elsewhere: because every modern compiler is able to optimize that case
added on the 2008-06-13 08:22:24 by waffle waffle
int getRandomInt(){ return 4;}
added on the 2008-06-27 00:28:26 by martin martin
Error 2342 in line 1. getRandomInt must return 7.
added on the 2008-06-27 02:02:32 by raer raer
return p * f3 + ((v1 - v2) - p) * f2 + (v3 - v1) * f + v2;
added on the 2008-06-27 02:08:36 by ferris ferris
Code: }*/
added on the 2008-06-27 02:31:11 by xernobyl xernobyl
gl_FragColor = (gl_LightSource[0].ambient + gl_LightSource[0].diffuse * dc) * texture2D(tex01,gl_TexCoord[0].st) + gl_LightSource[0].specular * sc;
added on the 2008-06-27 02:34:57 by ferris ferris
{
,{)}%A*
}fac:

5 fac~ P.
foxtrot uniform charlie kilo :)
added on the 2008-06-27 02:43:35 by ferris ferris
#define Code of the future

InitDemo(make_all); // Inits the demo and everything
Playsound(random_chiptune); // Plays some cool tune
ChooseColorScheme(Dutch); // Psychedelic colors

AddPart(); // Adds a new part

MakePlasmaOnTheTop(); // Plasma on top
MakeScrollerOnTheMiddle(some_text); // Scroller on middle
MakeWolfensteinOnTheBottom(); // wolfentein on bottom

AddPart(); // another part

greets = WriteGreetings(cool_dudes); // greets those doods
MakeRotozoomerOnTheLeftSide(); // rotozoomers are leet
MakeFeedbackEffectWithText(greets); // feedback blur

AddPart(); // last part

MakeFullscreenVoxelWorld(); // the killer effect

RunDemo(); // it runs
added on the 2008-07-21 15:13:11 by Optimus Optimus
..I forgot

#include <stdafx_demo.h>
#include <d3dx16.h>
#include <leet&easy.h>
added on the 2008-07-21 15:14:05 by Optimus Optimus
bclr #8,LEVBIT-$8000(a2)
added on the 2008-07-21 15:45:56 by StingRay StingRay

login

Go to top