/* * Copyright (C) 2007 Michael Lewis * Author: Mike Lewis * * This work is provide AS IS, and has no warranty. * The author is NOT responsible for anything that happens * due to use of this code, either using it or running it on * your system */ #ifndef _TYPES_H_INCLUDED #define _TYPES_H_INCLUDED #include "fakesse.h" #define BLOCK_HEIGHT 128 typedef __m128i data_block[ BLOCK_HEIGHT ]; typedef struct life_block { data_block *allocated; //this is where we free it data_block *current; data_block *working; //' struct life_block *n, *ne, *e, *se, *s, *sw, *w, *nw; } life_block, *llife_block; typedef struct life_world { //Not all blocks are allocated, make sure you check llife_block *blocks; int width; int height; int origin_x; int origin_y; } life_world, *llife_world; #define NEEDS_TOP 0x01 #define NEEDS_TOP_RIGHT 0x02 #define NEEDS_TOP_LEFT 0x04 #define NEEDS_LEFT 0x08 #define NEEDS_RIGHT 0x10 #define NEEDS_BOTTOM 0x20 #define NEEDS_BOTTOM_LEFT 0x40 #define NEEDS_BOTTOM_RIGHT 0x80 #endif //_TYPES_H_INCLUDED