Epic failures in the game development field.

This blog covers funny/weird issues and bugs from games that happened during development.

Send your own contributions to igetyourfail at repi.se (can be anonymous if specified)

Tuesday, April 30, 2013

Highly optimized and accurate vector subscript operator

class BWAVector3
                float x;
                float y;
                float z;
                float& operator[] (const int index);
float& BWAVector3::operator[] (const int index)
                if (index == 0)
                                return x;
                else if (index == 1)
                                return y;
                                return z;
(Thanks for the submission Graham Wihlidal)

Epic alignment fail...

extern "C" void* __wrap_memalign(size_t Alignment, size_t Size)
                extern void* __real_memalign(size_t,size_t);
                return __real_memalign(Size, Alignment);

(Thanks Graham Wihlidal)

Sunday, April 28, 2013