diff options
| author | Simon <simon@hardwired.org.uk> | 2011-03-24 19:41:45 (GMT) |
|---|---|---|
| committer | Simon <simon@hardwired.org.uk> | 2011-03-24 19:41:45 (GMT) |
| commit | 3ab47ae9d76e9e5e0416f81e43de15417354caf5 (patch) | |
| tree | d80fbec366baa970cd565ca5a17decb444036fad /src/powder.c | |
| parent | fe90c86fa1f1365d07dc6eee83b074d08efec05a (diff) | |
| download | powder-3ab47ae9d76e9e5e0416f81e43de15417354caf5.zip powder-3ab47ae9d76e9e5e0416f81e43de15417354caf5.tar.gz | |
Effects for PRTO and PRTI
Diffstat (limited to 'src/powder.c')
| -rw-r--r-- | src/powder.c | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/src/powder.c b/src/powder.c index 23de4ff..09a44a8 100644 --- a/src/powder.c +++ b/src/powder.c @@ -1370,7 +1370,7 @@ void update_particles_i(pixel *vid, int start, int inc) //printf("parts[%d].type: %d\n", i, parts[i].type); - if (parts[i].life && t!=PT_ACID && t!=PT_COAL && t!=PT_WOOD && t!=PT_STKM && t!=PT_STKM2 && t!=PT_FUSE && t!=PT_FSEP && t!=PT_BCOL && t!=PT_GOL && t!=PT_SPNG && t!=PT_DEUT) + if (parts[i].life && t!=PT_ACID && t!=PT_COAL && t!=PT_WOOD && t!=PT_STKM && t!=PT_STKM2 && t!=PT_FUSE && t!=PT_FSEP && t!=PT_BCOL && t!=PT_GOL && t!=PT_SPNG && t!=PT_DEUT && t!=PT_PRTO && t!=PT_PRTI) { if (!(parts[i].life==10&&(t==PT_SWCH||t==PT_LCRY||t==PT_PCLN||t==PT_HSWC||t==PT_PUMP))) parts[i].life--; @@ -3076,3 +3076,43 @@ void *transform_save(void *odata, int *size, matrix2d transform, vector2d transl return ndata; } +#if defined(WIN32) && !defined(__GNUC__) +_inline void orbitalparts_get(int block1, int block2, int resblock1[], int resblock2[]) +#else +inline void orbitalparts_get(int block1, int block2, int resblock1[], int resblock2[]) +#endif +{ + resblock1[0] = (block1&0x000000FF); + resblock1[1] = (block1&0x0000FF00)>>8; + resblock1[2] = (block1&0x00FF0000)>>16; + resblock1[3] = (block1&0xFF000000)>>24; + + resblock2[0] = (block2&0x000000FF); + resblock2[1] = (block2&0x0000FF00)>>8; + resblock2[2] = (block2&0x00FF0000)>>16; + resblock2[3] = (block2&0xFF000000)>>24; +} + +#if defined(WIN32) && !defined(__GNUC__) +_inline void orbitalparts_set(int *block1, int *block2, int resblock1[], int resblock2[]) +#else +inline void orbitalparts_set(int *block1, int *block2, int resblock1[], int resblock2[]) +#endif +{ + int block1tmp = 0; + int block2tmp = 0; + + block1tmp = (resblock1[0]&0xFF); + block1tmp |= (resblock1[1]&0xFF)<<8; + block1tmp |= (resblock1[2]&0xFF)<<16; + block1tmp |= (resblock1[3]&0xFF)<<24; + + block2tmp = (resblock2[0]&0xFF); + block2tmp |= (resblock2[1]&0xFF)<<8; + block2tmp |= (resblock2[2]&0xFF)<<16; + block2tmp |= (resblock2[3]&0xFF)<<24; + + *block1 = block1tmp; + *block2 = block2tmp; +} + |
