- fix possible crash in conc (but it's still an ugly hack)
- fix noob usage of strcmp
- flag some memory leaks (it would be nice, if the author(s) would clean
   up the mess himself)
- fix crash in substr
- whitespace cleanup

there are plenty more memory leaks in command.cpp - for example, every
goto in cubescript does not clean up anything
This commit is contained in:
ac-stef
2014-05-14 22:54:37 +02:00
parent 5058172a06
commit eb60302e67
57 changed files with 246 additions and 254 deletions
+2 -2
View File
@@ -80,7 +80,7 @@ static inline float ca(float x, float y) { return x>y ? y/x : 2-x/y; }
static inline float ma(float x, float y) { return x==0 ? (y>0 ? 2 : -2) : y/x; }
#endif
int isoccluded(float vx, float vy, float cx, float cy, float csize) // v = viewer, c = cube to test
int isoccluded(float vx, float vy, float cx, float cy, float csize) // v = viewer, c = cube to test
{
// ABC
// D E
@@ -127,7 +127,7 @@ int isoccluded(float vx, float vy, float cx, float cy, float csize) // v = v
float dist = xdist+ydist-1; // 1 needed?
int si = int(h*(NUMRAYS/8))+NUMRAYS; // get indexes into occlusion map from angles
int ei = int(l*(NUMRAYS/8))+NUMRAYS+1;
int ei = int(l*(NUMRAYS/8))+NUMRAYS+1;
if(ei<=si) ei += NUMRAYS;
for(int i = si; i<=ei; i++)