root/trunk/block.h

Revision 32, 1.0 KB (checked in by mike, 5 years ago)

Broke it

Line 
1/*
2 * Copyright (C) 2007 Michael Lewis
3 * Author: Mike Lewis <mikelikespie@gmail.com>
4 *
5 * This work is provide AS IS, and has no warranty.
6 * The author is NOT responsible for anything that happens
7 * due to use of this code, either using it or running it on
8 * your system
9 */
10#ifndef _BLOCK_H_INCLUDED
11#define _BLOCK_H_INCLUDED
12void cycle_block( llife_block block,
13                    llife_block tl, llife_block t, llife_block tr,
14                    llife_block l, llife_block r,
15                    llife_block bl, llife_block b, llife_block br );
16
17static inline llife_block get_life_block( llife_world world, int row, int column ) {
18    return world->blocks[ (row*world->width + column) ];
19}
20
21llife_world allocate_world( int height, int width );
22void free_world( llife_world world );
23
24void worldCycle( llife_world world );
25
26//returns NULL if fail;
27life_block *allocate_block();
28
29void free_block( life_block *block );
30
31void set_bit_in_world( llife_world world, int row, int column );
32#endif //_BLOCK_H_INCLUDED
Note: See TracBrowser for help on using the browser.