no message

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@508 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lee Salzman
2006-11-06 20:13:56 +00:00
parent f26e54566d
commit f495f8e833
4 changed files with 8 additions and 19 deletions
+3 -6
View File
@@ -100,12 +100,8 @@ void makesel()
VAR(flrceil,0,0,2);
float sheight(sqr *s, sqr *t, float z) // finds out z height when cursor points at wall
{
return !flrceil //z-s->floor<s->ceil-z
? (s->type==FHF ? s->floor-t->vdelta/4.0f : (float)s->floor)
: (s->type==CHF ? s->ceil+t->vdelta/4.0f : (float)s->ceil);
};
// VC8 optimizer screws up rendering somehow if this is an actual function
#define sheight(s,t,z) (!flrceil ? (s->type==FHF ? s->floor-t->vdelta/4.0f : (float)s->floor) : (s->type==CHF ? s->ceil+t->vdelta/4.0f : (float)s->ceil))
void cursorupdate() // called every frame from hud
{
@@ -144,6 +140,7 @@ void cursorupdate() // called every frame fr
for(int ix = cx-GRIDSIZE; ix<=cx+GRIDSIZE; ix++) for(int iy = cy-GRIDSIZE; iy<=cy+GRIDSIZE; iy++)
{
if(OUTBORD(ix, iy)) continue;
sqr *s = S(ix,iy);
if(SOLID(s)) continue;
+5 -2
View File
@@ -15,10 +15,13 @@ void setarraypointers()
// leaves of all these functions, and are part of the cpu bottleneck on really slow
// machines, hence the macros.
#define vertf(v1, v2, v3, ls, t1, t2) { vertex &v = verts.add(); \
#define vertf(v1, v2, v3, ls, t1, t2) { \
vertex *buf = verts.getbuf(), &v = verts.add(); \
if(buf!=verts.getbuf()) setarraypointers(); \
v.u = t1; v.v = t2; \
v.x = v1; v.y = v2; v.z = v3; \
v.r = ls->r; v.g = ls->g; v.b = ls->b; v.a = 255; };
v.r = ls->r; v.g = ls->g; v.b = ls->b; v.a = 255; \
};
#define vert(v1, v2, v3, ls, t1, t2) { vertf((float)(v1), (float)(v2), (float)(v3), ls, t1, t2); }
-11
View File
@@ -424,16 +424,5 @@ struct databuf
typedef databuf<char> charbuf;
typedef databuf<uchar> ucharbuf;
#ifndef __GNUC__
#ifdef _DEBUG
//#define _CRTDBG_MAP_ALLOC
#include <crtdbg.h>
inline void *__cdecl operator new(size_t n, const char *fn, int l) { return ::operator new(n, 1, fn, l); };
inline void __cdecl operator delete(void *p, const char *fn, int l) { ::operator delete(p, 1, fn, l); };
#define new new(__FILE__,__LINE__)
#endif
#endif
#endif
Binary file not shown.