Random line of code thread
category: code [glöplog]
Code:
if ( f < 0 ) {
MercuryMessageBox( "JUNGE, DU HAST EIN KOMMA BEIM SHADERSTRINGARRAY VERGESSEN, glsl.cpp oben (aka: shader nich gefunden)" );
FATAL();
}
Code:
// Setting VISIBLE to false didn't do what I expected
// Therefore I fixed it the HARD CORE way. <3
// Parameters::visible = false;
// ENJOY:
sendKeyDBG(VK_TAB, false);
Code:
// wtf, mehr als 16 texturgroessen?!
// cleanup and retry
clean_font2image_cache();
Code:
// SORRY NOW UGLY HACKS
Code:
//depth = false; // THIS FIXES EVERYTHIG?
Code:
m_timeColorValue = 0.0f; // this changes some fucking HSV color stuff
Code:
while(i > 0.) {
o -= (i * e - f1(p + e * n * i * s)) / exp2(i);
i -= 1.;
}
Code:
float beam = (-rad + length(foo.xy)+0.05*pn(foo.zzz*1.5+t*10.0))+ max(foo.z-2.0,0.0) + 0.5*min(max(-foo.z + 3.0 -len,0.0),0.8); //der letzte faktor macht artefakte glaube ich
Code:
if (time > 73524.f/1000.f) {
// MAGIC FIX - THIS CHECKS FOR THE KEYFRAME
// BEFORE THE LAST KEYFRAME
lightPosition = vec3(0., 15., 10.) + 10. * vec3(cos(-time), 0., sin(-time));
}
Code:
float it; // like it's hot!
Code:
#if defined( MERCURY_MULTILOADERBARS )
static bool WE_HATE_YOUR_GPU = true; // the ATI flag
#else
#define WE_HATE_YOUR_GPU true
#endif
Code:
if ( WE_HATE_YOUR_GPU ) {
// heap fragmenting version
[...]
}
Code:
var %txt $hget(demo, part002_text)
var %xmain $hget(demo, part002_xpos)
var %cnt $hget(demo, part002_cpos)
var %tot $len(%txt)
while (%cnt <= %tot) {
var %xpos $calc(%xmain + (%cnt * 24))
if (%xpos < 320) {
if (%xpos > -25) {
var %y $calc(($cos($calc(%c + (%cnt * 16))).deg * 64) + (%dm.center_y - 16))
drawtext -nr @demo 0 fixedsys 32 %xpos $calc(%y + 1) $right($left(%txt, %cnt), 1)
drawtext -nr @demo 16777215 fixedsys 32 %xpos %y $right($left(%txt, %cnt), 1)
}
else {
hinc demo part002_cpos
}
}
else {
break
}
inc %cnt
}
hdec demo part002_xpos 6
Code:
vec4 colorcorrect(vec4 input_col) {
// Slope/Offset/Power-Variante - Die, die psykon mir schickte, aber vermutlich
// nicht will
//vec4 sop_out = pow(in * slope + offset, power);
// Lift/Gamma/Gain-Variante - Die, die psykon vermutlich will. :)
// (unwissentlich. Aber muss er ja nicht erfahren)
vec4 lift = 2.*(shadows - .5);
vec4 gain = 2.*hilights;
[...]
return retval;
}
#include "thePreprocessor.h"
Code:
void subdivideStep(std::vector<BauhausRectangle*>& rectangles);
Code:
hmake %table $ini(%ini, %section, 0)
Code:
pixel(buffer, x, y) = ((Uint8)(256/sqrt(cx*cx+cy*cy) + t)^(Uint8)((atan2(cx,cy)/M_PI)*512+t)) * 0x01010101;
Code:
public static bool shit; //just try to imagine it!
Code:
static int rand = 0; //Not thread safe. Threads? Pah!
inc byte[cs:103]
Code:
For i = 0 To totalplots
while(true) printf("PENIS\n");
Code:
Idiot's version (i.e. asm created by a C compiler) of:ld e,l
ld d,h
ld a,(de)
ld b,a
inc de
ld a,(de)
ld c,a
ld e,b
ld d,c
ld a,(de)
Code:
ldi a,(hl)
ld h,(hl)
ld l,a
ld a,(hl)
Code:
float speed()
{
return sqrt(pow(fabs(xpos)-400,2)+pow(fabs(ypos)-300,2))/100*v;
}