zlacker

[parent] [thread] 0 comments
1. ben_w+(OP)[view] [source] 2022-12-16 10:50:52
Artists are, necessarily, perfectionists about their work — it's the only way to get better than the crude line drawings and wildly wrong anatomy that most people can do.

Frustratingly, most people don't fully appreciate the art, and are quite happy for artists to put in only 20% of the effort. Heck, old enough to remember people who regarded Quake as "photorealistic", some in a negative way saying this made it a terrible threat to the minds of children who might see the violence it depicted, and others in a positive way saying it was so good that Riven should've used that engine instead of being pre-rendered.

Bugs like this are easy to fix: `x = x – 4;` which should be `x = x - 4;`

Bugs like this, much harder:

    #define TOBYTE(x) (x) & 255
    #define SWAP(x,y) do { x^=y; y^=x; x^=y; } while (0)

    static unsigned char A[256];
    static int i=0, j=0;

    void init(char \*passphrase) {
        int passlen = strlen(passphrase);
        for (i=0; i<256; i++)
            A[i] = i;
        for (i=0; i<256; i++) {
            j = TOBYTE(j + A[TOBYTE(i)] + passphrase[j % passlen]);
            SWAP(A[TOBYTE(i)], A[j]);
        }
        i = 0; j = 0;
    }

    unsigned char encrypt_one_byte(unsigned char c) {
        int k;
        i = TOBYTE(i+1);
        j = TOBYTE(j + A[i]);
        SWAP(A[i], A[j]);
        k = TOBYTE(A[i] + A[j]);
        return c ^ A[k];
    }
[go to top]