Changeset 33

Show
Ignore:
Timestamp:
08/09/07 23:56:10 (5 years ago)
Author:
mike
Message:

Fixed brokeness. Now the world is dynamically sized

Location:
trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/block.c

    r32 r33  
    183183    //Allocate both of the buffers in 1 chunk.  It will make life easier 
    184184     
    185     lb->allocated = (data_block*)calloc( 1, sizeof( life_block ) * 2 + 0x7F );// calloc( 2, sizeof( __m128i ) * 128 ); 
     185    lb->allocated = (data_block*)calloc( 1, sizeof( data_block ) * 2 + 0x7F );// calloc( 2, sizeof( __m128i ) * 128 ); 
    186186    if( !lb->allocated ) { 
    187187        free( lb ); 
  • trunk/fakesse.h

    r27 r33  
    1717#include <inttypes.h> 
    1818#endif 
    19  
     19/* 
    2020typedef struct { 
    2121    union { 
     
    2424    } u; 
    2525} __m128i; 
    26  
     26*/ 
    2727//Shifts this to the left all the way 
    2828static inline __m128i _mm_srli_epi32( __m128i A, int count ) { 
  • trunk/glutmain.c

    r32 r33  
    9494    for( i = 0; i < my_world->width; i++ ) { 
    9595        for( j = 0; j < my_world->height; j++ ) { 
    96     printf( "%x\n", *my_world->blocks ); 
     96    //printf( "%x\n", *my_world->blocks ); 
    9797            renderBlock( get_life_block( my_world, j, i ) , i*128, j*BLOCK_HEIGHT ); 
    9898        } 
     
    115115 
    116116 
    117     my_world = allocate_world( 1, 1 ); 
     117    my_world = allocate_world( 10, 10 ); 
    118118    *(my_world->blocks) = allocate_block(); 
    119119    printf( "%x\n", *my_world->blocks ); 
    120120 
    121 //  set_bit_in_world( my_world, 50, 50 ); 
    122 //  set_bit_in_world( my_world, 51, 50 ); 
    123 //  set_bit_in_world( my_world, 52, 50 ); 
    124 //  set_bit_in_world( my_world, 54, 50 ); 
    125 // 
    126 //  set_bit_in_world( my_world, 50, 51 ); 
    127 // 
    128 //  set_bit_in_world( my_world, 53, 52 ); 
    129 //  set_bit_in_world( my_world, 54, 52 ); 
    130 // 
    131 //  set_bit_in_world( my_world, 51, 53 ); 
    132 //  set_bit_in_world( my_world, 52, 53 ); 
    133 //  set_bit_in_world( my_world, 54, 53 ); 
    134 // 
    135 //  set_bit_in_world( my_world, 50, 54 ); 
    136 //  set_bit_in_world( my_world, 52, 54 ); 
    137 //  set_bit_in_world( my_world, 54, 54 ); 
     121    set_bit_in_world( my_world, 50, 50 ); 
     122    set_bit_in_world( my_world, 51, 50 ); 
     123    set_bit_in_world( my_world, 52, 50 ); 
     124    set_bit_in_world( my_world, 54, 50 ); 
     125 
     126    set_bit_in_world( my_world, 50, 51 ); 
     127 
     128    set_bit_in_world( my_world, 53, 52 ); 
     129    set_bit_in_world( my_world, 54, 52 ); 
     130 
     131    set_bit_in_world( my_world, 51, 53 ); 
     132    set_bit_in_world( my_world, 52, 53 ); 
     133    set_bit_in_world( my_world, 54, 53 ); 
     134 
     135    set_bit_in_world( my_world, 50, 54 ); 
     136    set_bit_in_world( my_world, 52, 54 ); 
     137    set_bit_in_world( my_world, 54, 54 ); 
    138138 
    139139    glutInit( &argc, argv );