Fix walls with water equalization.

Also annoying inlines for visual studio.
This commit is contained in:
cracker64 2011-09-21 22:05:19 -04:00
parent eb646ce1d6
commit 848fa77a82
2 changed files with 7 additions and 7 deletions

View File

@ -26,7 +26,7 @@ char *clipboard_text = NULL;
//Signum function //Signum function
#if defined(WIN32) && !defined(__GNUC__) #if defined(WIN32) && !defined(__GNUC__)
_inline int isign(float i) int isign(float i)
#else #else
inline int isign(float i) inline int isign(float i)
#endif #endif
@ -39,7 +39,7 @@ inline int isign(float i)
} }
#if defined(WIN32) && !defined(__GNUC__) #if defined(WIN32) && !defined(__GNUC__)
_inline unsigned clamp_flt(float f, float min, float max) unsigned clamp_flt(float f, float min, float max)
#else #else
inline unsigned clamp_flt(float f, float min, float max) inline unsigned clamp_flt(float f, float min, float max)
#endif #endif
@ -52,7 +52,7 @@ inline unsigned clamp_flt(float f, float min, float max)
} }
#if defined(WIN32) && !defined(__GNUC__) #if defined(WIN32) && !defined(__GNUC__)
_inline float restrict_flt(float f, float min, float max) float restrict_flt(float f, float min, float max)
#else #else
inline float restrict_flt(float f, float min, float max) inline float restrict_flt(float f, float min, float max)
#endif #endif

View File

@ -1217,7 +1217,7 @@ void set_emap(int x, int y)
} }
#if defined(WIN32) && !defined(__GNUC__) #if defined(WIN32) && !defined(__GNUC__)
_inline int parts_avg(int ci, int ni,int t)//t is the particle you are looking for, returns the particle between two particles int parts_avg(int ci, int ni,int t)//t is the particle you are looking for, returns the particle between two particles
#else #else
inline int parts_avg(int ci, int ni,int t) inline int parts_avg(int ci, int ni,int t)
#endif #endif
@ -2675,7 +2675,7 @@ int flood_water(int x, int y, int i, int originaly, int check)
{ {
parts[pmap[y][x]>>8].tmp2 = !check;//flag it as checked, maybe shouldn't use .tmp2 parts[pmap[y][x]>>8].tmp2 = !check;//flag it as checked, maybe shouldn't use .tmp2
//check above, maybe around other sides too? //check above, maybe around other sides too?
if ( ((y-1) > originaly) && !pmap[y-1][x]) if ( ((y-1) > originaly) && eval_move(parts[i].type, x, y-1, NULL))
{ {
int oldx = (int)(parts[i].x + 0.5f); int oldx = (int)(parts[i].x + 0.5f);
int oldy = (int)(parts[i].y + 0.5f); int oldy = (int)(parts[i].y + 0.5f);
@ -3080,7 +3080,7 @@ void *transform_save(void *odata, int *size, matrix2d transform, vector2d transl
} }
#if defined(WIN32) && !defined(__GNUC__) #if defined(WIN32) && !defined(__GNUC__)
_inline void orbitalparts_get(int block1, int block2, int resblock1[], int resblock2[]) void orbitalparts_get(int block1, int block2, int resblock1[], int resblock2[])
#else #else
inline void orbitalparts_get(int block1, int block2, int resblock1[], int resblock2[]) inline void orbitalparts_get(int block1, int block2, int resblock1[], int resblock2[])
#endif #endif
@ -3097,7 +3097,7 @@ inline void orbitalparts_get(int block1, int block2, int resblock1[], int resblo
} }
#if defined(WIN32) && !defined(__GNUC__) #if defined(WIN32) && !defined(__GNUC__)
_inline void orbitalparts_set(int *block1, int *block2, int resblock1[], int resblock2[]) void orbitalparts_set(int *block1, int *block2, int resblock1[], int resblock2[])
#else #else
inline void orbitalparts_set(int *block1, int *block2, int resblock1[], int resblock2[]) inline void orbitalparts_set(int *block1, int *block2, int resblock1[], int resblock2[])
#endif #endif