quest-ed-checkins Mailing List for Quest
Brought to you by:
alexm
You can subscribe to this list here.
| 2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(88) |
Nov
(56) |
Dec
(8) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2001 |
Jan
(4) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(76) |
Sep
(6) |
Oct
|
Nov
|
Dec
|
| 2002 |
Jan
|
Feb
(8) |
Mar
|
Apr
|
May
(37) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2003 |
Jan
|
Feb
|
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Alexander M. <al...@us...> - 2003-03-18 17:50:38
|
Update of /cvsroot/quest-ed/quest-3b/src/fe/gl
In directory sc8-pr-cvs1:/tmp/cvs-serv26533
Modified Files:
render.c
Log Message:
Draw labelled axes for 2d-windows. Patch from Bill Currie.
Index: render.c
===================================================================
RCS file: /cvsroot/quest-ed/quest-3b/src/fe/gl/render.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** render.c 21 May 2002 19:03:16 -0000 1.7
--- render.c 18 Mar 2003 17:50:30 -0000 1.8
***************
*** 1228,1232 ****
! static unsigned char grid_numbers[11][8][4]={
#define _ 0x00
#define M 0xff
--- 1228,1232 ----
! static unsigned char grid_numbers[14][8][4]={
#define _ 0x00
#define M 0xff
***************
*** 1341,1344 ****
--- 1341,1374 ----
{_,_,_,_},
},
+ {
+ {M,_,_,M},
+ {M,_,_,M},
+ {M,_,_,M},
+ {_,M,M,_},
+ {_,M,M,_},
+ {M,_,_,M},
+ {M,_,_,M},
+ {M,_,_,M},
+ },
+ {
+ {_,M,M,_},
+ {_,M,M,_},
+ {_,M,M,_},
+ {_,M,M,_},
+ {_,M,M,_},
+ {M,_,_,M},
+ {M,_,_,M},
+ {M,_,_,M},
+ },
+ {
+ {M,M,M,M},
+ {M,_,_,_},
+ {_,M,_,_},
+ {_,M,_,_},
+ {_,_,M,_},
+ {_,_,M,_},
+ {_,_,_,M},
+ {M,M,M,M},
+ },
};
#undef M
***************
*** 1457,1460 ****
--- 1487,1537 ----
rx+=12/zoom;
}
+ }
+
+ {
+ int i;
+ int right, up;
+ float cx, cy, ex, ey;
+ int X, Y;
+
+ i = (((int)v->vp.rot.x / 90) << 2) | ((int)v->vp.rot.z / 90);
+ right = odx > 0;
+ up = ody > 0;
+ if (i & 0x4)
+ {
+ Y = 13;
+ X = (i & 0x1) ? 12 : 11;
+ up = !(i & 0x8);
+ }
+ else
+ {
+ if (i & 0x1)
+ {
+ Y = 11;
+ X = 12;
+ }
+ else
+ {
+ Y = 12;
+ X = 11;
+ }
+ }
+ cx = (v->sx - 40) / zoom;
+ cy = (v->sy - 40) / zoom;
+ ex = (v->sx - 60 + 40 * right) / zoom;
+ ey = (v->sy - 60 + 40 * up) / zoom;
+
+ glColor3f(1,1,1);
+ glBegin(GL_LINES);
+ glVertex2f(cx,cy);
+ glVertex2f(cx,ey);
+ glVertex2f(cx,cy);
+ glVertex2f(ex,cy);
+ glEnd();
+ glColor4fv(C_GRID_LARGE);
+ glRasterPos2d(ex - 2 / zoom, cy - 4 / zoom);
+ glDrawPixels(4,8,GL_LUMINANCE,GL_UNSIGNED_BYTE,&grid_numbers[X]);
+ glRasterPos2d(cx - 2 / zoom, ey - 4 / zoom);
+ glDrawPixels(4,8,GL_LUMINANCE,GL_UNSIGNED_BYTE,&grid_numbers[Y]);
}
}
|
|
From: Alexander M. <al...@us...> - 2003-03-18 17:48:43
|
Update of /cvsroot/quest-ed/quest-3b/src In directory sc8-pr-cvs1:/tmp/cvs-serv25799 Modified Files: Config.mk Log Message: Remove hardcoded path to my home directory (from Bill Currie). Index: Config.mk =================================================================== RCS file: /cvsroot/quest-ed/quest-3b/src/Config.mk,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** Config.mk 11 Aug 2001 16:07:41 -0000 1.1.1.1 --- Config.mk 18 Mar 2003 17:48:39 -0000 1.2 *************** *** 24,28 **** # To build shared libraries Q_LIB_SUFFIX = .so ! Q_MAKELIB = gcc -g -shared -Wl,-soname -Wl,/home/alex/quest/quest-3/src/$@ -o $@ $^ Q_CFLAGS = -fPIC -DPIC --- 24,28 ---- # To build shared libraries Q_LIB_SUFFIX = .so ! Q_MAKELIB = gcc -g -shared -Wl,-soname -Wl,$@ -o $@ $^ Q_CFLAGS = -fPIC -DPIC |
|
From: Alexander M. <al...@us...> - 2003-03-18 17:47:33
|
Update of /cvsroot/quest-ed/quest-3b In directory sc8-pr-cvs1:/tmp/cvs-serv25244 Added Files: quest Log Message: Add a simple script that starts quest-gtk (from Bill Currie). --- NEW FILE --- #! /bin/sh export LD_LIBRARY_PATH=src export LIBGL_ALWAYS_INDIRECT=1 ./src/quest-gtk |
|
From: Alexander M. <al...@us...> - 2002-05-21 19:38:06
|
Update of /cvsroot/quest-ed/quest-3b/src/quest
In directory usw-pr-cvs1:/tmp/cvs-serv6996/src/quest
Modified Files:
trace.c
Log Message:
Trace() was ignoring the TRACE_ENTITY flag and only checking entities if TRACE_FLAG was on. Fixed.
Index: trace.c
===================================================================
RCS file: /cvsroot/quest-ed/quest-3b/src/quest/trace.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** trace.c 4 Feb 2002 20:43:58 -0000 1.2
--- trace.c 21 May 2002 19:03:32 -0000 1.3
***************
*** 18,86 ****
void Trace(vec3_t org,vec3_t dir,scalar_t len,int flags,
! void (*func)(scalar_t dist,int type,void *v,int face))
{
! vec3_t s,e;
! vec3_t d;
! vec3_t a;
! brush_t *b;
! int i,j;
entity_t *ent;
! scalar_t f,g,h;
! s=org;
! d=dir;
! e.x=s.x+d.x*len;
! e.y=s.y+d.y*len;
! e.z=s.z+d.z*len;
/* We trace from s to e, direction is d */
! if (flags&TRACE_FACE)
! {
! for (b=M.VBrushHead;b;b=b->VNext)
! {
/* TODO: handle curves */
! if (b->bt->type==BRUSH_NORMAL)
! {
! for (i=0;i<b->num_faces;i++)
! {
! f=DotProd(s,b->faces[i]->normal)-b->faces[i]->dist;
! g=DotProd(e,b->faces[i]->normal)-b->faces[i]->dist;
!
! if ((f<0 && g<0) || (f>0 && g>0))
! continue;
!
! g=DotProd(d,b->faces[i]->normal);
! if (fabs(g)<0.0001)
! continue;
!
! h=-f/g;
!
! a.x=s.x+d.x*h;
! a.y=s.y+d.y*h;
! a.z=s.z+d.z*h;
!
! /* now make sure a is actually in the face by checking it
! against the planes of the other faces in the brush */
! for (j=0;j<b->num_faces;j++)
! {
! if (i==j)
! continue;
!
! f=DotProd(a,b->faces[j]->normal)-b->faces[j]->dist;
! if (f>0) break;
! }
!
! if (j!=b->num_faces)
! continue;
!
! func(h,TRACE_FACE,b,i);
! }
! }
! }
for (ent=M.VEntityHead;ent;ent=ent->VNext)
{
--- 18,89 ----
void Trace(vec3_t org,vec3_t dir,scalar_t len,int flags,
! void (*func)(scalar_t dist,int type,void *v,int face))
{
! vec3_t s,e;
! vec3_t d;
! vec3_t a;
! brush_t *b;
! int i,j;
entity_t *ent;
! scalar_t f,g,h;
! s=org;
! d=dir;
! e.x=s.x+d.x*len;
! e.y=s.y+d.y*len;
! e.z=s.z+d.z*len;
/* We trace from s to e, direction is d */
! if (flags&TRACE_FACE)
! {
! for (b=M.VBrushHead;b;b=b->VNext)
! {
/* TODO: handle curves */
! if (b->bt->type==BRUSH_NORMAL)
! {
! for (i=0;i<b->num_faces;i++)
! {
! f=DotProd(s,b->faces[i]->normal)-b->faces[i]->dist;
! g=DotProd(e,b->faces[i]->normal)-b->faces[i]->dist;
!
! if ((f<0 && g<0) || (f>0 && g>0))
! continue;
!
! g=DotProd(d,b->faces[i]->normal);
! if (fabs(g)<0.0001)
! continue;
!
! h=-f/g;
!
! a.x=s.x+d.x*h;
! a.y=s.y+d.y*h;
! a.z=s.z+d.z*h;
!
! /* now make sure a is actually in the face by checking it
! against the planes of the other faces in the brush */
! for (j=0;j<b->num_faces;j++)
! {
! if (i==j)
! continue;
!
! f=DotProd(a,b->faces[j]->normal)-b->faces[j]->dist;
! if (f>0) break;
! }
!
! if (j!=b->num_faces)
! continue;
!
! func(h,TRACE_FACE,b,i);
! }
! }
! }
! }
! if (flags&TRACE_ENTITY)
! {
for (ent=M.VEntityHead;ent;ent=ent->VNext)
{
***************
*** 119,123 ****
func(h,TRACE_ENTITY,ent,-1);
}
! }
}
--- 122,126 ----
func(h,TRACE_ENTITY,ent,-1);
}
! }
}
|
|
From: Alexander M. <al...@us...> - 2002-05-21 19:38:06
|
Update of /cvsroot/quest-ed/quest-3b/src/fe/gl
In directory usw-pr-cvs1:/tmp/cvs-serv6897/src/fe/gl
Modified Files:
render.c
Log Message:
Draw angle indicators for entities in wireframe mode.
Index: render.c
===================================================================
RCS file: /cvsroot/quest-ed/quest-3b/src/fe/gl/render.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** render.c 20 May 2002 01:01:30 -0000 1.6
--- render.c 21 May 2002 19:03:16 -0000 1.7
***************
*** 159,220 ****
! static void DrawLink(entity_t *e,const char *key,const char *dst_name)
{
! entity_t *e2;
! vec3_t delta,vr,vu,t,t2;
! const char *d;
! for (e2=M.VEntityHead;e2;e2=e2->VNext)
! {
! d=GetKeyValue(e2,dst_name);
! if (!d) continue;
! if (strcmp(d,key)) continue;
! glBegin(GL_LINES);
! glVertex3fv((float *)&e->center);
! glVertex3fv((float *)&e2->center);
! glEnd();
! VEC_Sub(delta,e2->center,e->center);
! Normalize(&delta);
! vr.x=vr.y=vr.z=0;
! if (fabs(delta.x)>fabs(delta.y))
! vr.y=1;
! else
! vr.x=1;
! CrossProd(vr,delta,&vu);
! Normalize(&vu);
! CrossProd(vu,delta,&vr);
! vr.x*=8; vr.y*=8; vr.z*=8;
! vu.x*=8; vu.y*=8; vu.z*=8;
! delta.x*=32; delta.y*=32; delta.z*=32;
!
! glBegin(GL_TRIANGLE_FAN);
! glVertex3fv((float *)&e2->center);
!
! VEC_Sub(t2,e2->center,delta);
! VEC_Sub(t2,t2,vr);
! VEC_Sub(t2,t2,vu);
! glVertex3fv((float *)&t2);
!
! VEC_Sub(t,e2->center,delta);
! VEC_Sub(t,t,vr);
! VEC_Add(t,t,vu);
! glVertex3fv((float *)&t);
!
! VEC_Sub(t,e2->center,delta);
! VEC_Add(t,t,vr);
! VEC_Add(t,t,vu);
! glVertex3fv((float *)&t);
!
! VEC_Sub(t,e2->center,delta);
! VEC_Add(t,t,vr);
! VEC_Sub(t,t,vu);
! glVertex3fv((float *)&t);
!
! glVertex3fv((float *)&t2);
!
! glEnd();
! }
}
--- 159,228 ----
! static void DrawArrow(vec3_t from,vec3_t to,float size)
{
! vec3_t delta,vr,vu,t,t2;
! glBegin(GL_LINES);
! glVertex3fv((float *)&from);
! glVertex3fv((float *)&to);
! glEnd();
!
! VEC_Sub(delta,to,from);
! Normalize(&delta);
!
! vr.x=vr.y=vr.z=0;
! if (fabs(delta.x)>fabs(delta.y))
! vr.y=1;
! else
! vr.x=1;
! CrossProd(vr,delta,&vu);
! Normalize(&vu);
! CrossProd(vu,delta,&vr);
! vr.x*=size; vr.y*=size; vr.z*=size;
! vu.x*=size; vu.y*=size; vu.z*=size;
! delta.x*=size*4; delta.y*=size*4; delta.z*=size*4;
!
! glBegin(GL_TRIANGLE_FAN);
! glVertex3fv((float *)&to);
!
! VEC_Sub(t2,to,delta);
! VEC_Sub(t2,t2,vr);
! VEC_Sub(t2,t2,vu);
! glVertex3fv((float *)&t2);
!
! VEC_Sub(t,to,delta);
! VEC_Sub(t,t,vr);
! VEC_Add(t,t,vu);
! glVertex3fv((float *)&t);
!
! VEC_Sub(t,to,delta);
! VEC_Add(t,t,vr);
! VEC_Add(t,t,vu);
! glVertex3fv((float *)&t);
!
! VEC_Sub(t,to,delta);
! VEC_Add(t,t,vr);
! VEC_Sub(t,t,vu);
! glVertex3fv((float *)&t);
! glVertex3fv((float *)&t2);
! glEnd();
! }
!
!
! static void DrawLink(entity_t *e,const char *key,const char *dst_name)
! {
! entity_t *e2;
! const char *d;
!
! for (e2=M.VEntityHead;e2;e2=e2->VNext)
! {
! d=GetKeyValue(e2,dst_name);
! if (!d) continue;
! if (strcmp(d,key)) continue;
!
! DrawArrow(e->center,e2->center,8);
! }
}
***************
*** 277,302 ****
static void Wire_Ent(entity_t *e)
{
! glBegin(GL_LINE_LOOP);
! glVertex3f(e->min.x,e->min.y,e->min.z);
! glVertex3f(e->min.x,e->max.y,e->min.z);
! glVertex3f(e->max.x,e->max.y,e->min.z);
! glVertex3f(e->max.x,e->min.y,e->min.z);
! glEnd();
! glBegin(GL_LINE_LOOP);
! glVertex3f(e->min.x,e->min.y,e->max.z);
! glVertex3f(e->min.x,e->max.y,e->max.z);
! glVertex3f(e->max.x,e->max.y,e->max.z);
! glVertex3f(e->max.x,e->min.y,e->max.z);
! glEnd();
! glBegin(GL_LINES);
! glVertex3f(e->min.x,e->min.y,e->min.z);
! glVertex3f(e->min.x,e->min.y,e->max.z);
! glVertex3f(e->max.x,e->min.y,e->min.z);
! glVertex3f(e->max.x,e->min.y,e->max.z);
! glVertex3f(e->min.x,e->max.y,e->min.z);
! glVertex3f(e->min.x,e->max.y,e->max.z);
! glVertex3f(e->max.x,e->max.y,e->min.z);
! glVertex3f(e->max.x,e->max.y,e->max.z);
! glEnd();
}
--- 285,332 ----
static void Wire_Ent(entity_t *e)
{
! glBegin(GL_LINE_LOOP);
! glVertex3f(e->min.x,e->min.y,e->min.z);
! glVertex3f(e->min.x,e->max.y,e->min.z);
! glVertex3f(e->max.x,e->max.y,e->min.z);
! glVertex3f(e->max.x,e->min.y,e->min.z);
! glEnd();
! glBegin(GL_LINE_LOOP);
! glVertex3f(e->min.x,e->min.y,e->max.z);
! glVertex3f(e->min.x,e->max.y,e->max.z);
! glVertex3f(e->max.x,e->max.y,e->max.z);
! glVertex3f(e->max.x,e->min.y,e->max.z);
! glEnd();
! glBegin(GL_LINES);
! glVertex3f(e->min.x,e->min.y,e->min.z);
! glVertex3f(e->min.x,e->min.y,e->max.z);
! glVertex3f(e->max.x,e->min.y,e->min.z);
! glVertex3f(e->max.x,e->min.y,e->max.z);
! glVertex3f(e->min.x,e->max.y,e->min.z);
! glVertex3f(e->min.x,e->max.y,e->max.z);
! glVertex3f(e->max.x,e->max.y,e->min.z);
! glVertex3f(e->max.x,e->max.y,e->max.z);
! glEnd();
!
! if (!e->num_brushes)
! {
! float angle;
! vec3_t c;
! angle=0;
! if (GetKeyValue(e,"angle"))
! sscanf(GetKeyValue(e,"angle"),"%f",&angle);
! c=e->center;
! if (angle==-1)
! c.z+=20;
! else if (angle==-2)
! c.z-=20;
! else
! {
! c.x+=cos(angle*PI/180.0)*20;
! c.y+=sin(angle*PI/180.0)*20;
! }
! glPolygonMode(GL_FRONT_AND_BACK,GL_LINE);
! DrawArrow(e->center,c,2);
! glPolygonMode(GL_FRONT_AND_BACK,GL_FILL);
! }
}
|
|
From: Alexander M. <al...@us...> - 2002-05-20 19:17:52
|
Update of /cvsroot/quest-ed/quest-3b In directory usw-pr-cvs1:/tmp/cvs-serv28264 Modified Files: cfgsave.ql Log Message: Misc. cleanups. Index: cfgsave.ql =================================================================== RCS file: /cvsroot/quest-ed/quest-3b/cfgsave.ql,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** cfgsave.ql 27 Aug 2001 21:23:29 -0000 1.2 --- cfgsave.ql 20 May 2002 19:17:45 -0000 1.3 *************** *** 4,9 **** (config_saved game.quake (game.sys.quake1.default_wad "/mnt/msdos_d/quake/id1/tex.wad") ! (texture.current "wood1_5") ! (edit.snap_size 16) ) --- 4,9 ---- (config_saved game.quake (game.sys.quake1.default_wad "/mnt/msdos_d/quake/id1/tex.wad") ! (texture.current "wmet4_4") ! (edit.snap_size 8) ) *************** *** 17,31 **** (config_saved Quest (configurations (ui.quest-classic game.quake)) - (render.flags 1854) ) (config_saved gtk_gl.settings ! (gtk_gl.win.viewports " (451 472 320 240) (447 201 320 240) (773 204 304 521)") (gtk_gl.texpick.layout 1) ! (gtk.win.menu "459 143 520 25") ! (gtk.win.messages "460 779 400 70") ! (gtk.win.toolbar "882 775 140 50") ! (gtk.win.texpick "22 342 430 418") ! (gtk.win.texpick_groups "298 72 133 239") ) --- 17,30 ---- (config_saved Quest (configurations (ui.quest-classic game.quake)) ) (config_saved gtk_gl.settings ! (gtk_gl.win.viewports " (303 442 388 274) (303 85 389 326) (694 82 403 635)") (gtk_gl.texpick.layout 1) ! (gtk.win.menu "304 14 800 25") ! (gtk.win.messages "380 780 559 70") ! (gtk.win.toolbar "964 774 140 50") ! (gtk.win.texpick "80 281 496 546") ! (gtk.win.texpick_groups "321 90 133 239") ) |
|
From: Alexander M. <al...@us...> - 2002-05-20 19:17:52
|
Update of /cvsroot/quest-ed/quest-3b/src In directory usw-pr-cvs1:/tmp/cvs-serv28264/src Added Files: .cvsignore Removed Files: quest.gdt quest.gpr Log Message: Misc. cleanups. --- NEW FILE --- quest.gdt quest.gpr --- quest.gdt DELETED --- --- quest.gpr DELETED --- |
|
From: Alexander M. <al...@us...> - 2002-05-20 19:17:52
|
Update of /cvsroot/quest-ed/quest-3b/src/fe/gl
In directory usw-pr-cvs1:/tmp/cvs-serv28264/src/fe/gl
Modified Files:
texture.c
Log Message:
Misc. cleanups.
Index: texture.c
===================================================================
RCS file: /cvsroot/quest-ed/quest-3b/src/fe/gl/texture.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** texture.c 11 Aug 2001 16:08:22 -0000 1.1.1.1
--- texture.c 20 May 2002 19:17:45 -0000 1.2
***************
*** 368,372 ****
glBindTexture(GL_TEXTURE_2D,t->num);
gluBuild2DMipmaps(GL_TEXTURE_2D,3,data_x,data_y,GL_RGB,GL_UNSIGNED_BYTE,data);
! // glTexImage2D(GL_TEXTURE_2D,0,3,width,height,0,GL_RGB,GL_UNSIGNED_BYTE,data);
/* glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_NEAREST);
--- 368,372 ----
glBindTexture(GL_TEXTURE_2D,t->num);
gluBuild2DMipmaps(GL_TEXTURE_2D,3,data_x,data_y,GL_RGB,GL_UNSIGNED_BYTE,data);
! // glTexImage2D(GL_TEXTURE_2D,0,3,data_x,data_y,0,GL_RGB,GL_UNSIGNED_BYTE,data);
/* glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_NEAREST);
|
|
From: Alexander M. <al...@us...> - 2002-05-20 19:17:52
|
Update of /cvsroot/quest-ed/quest-3b/src/quest
In directory usw-pr-cvs1:/tmp/cvs-serv28264/src/quest
Modified Files:
memory.c quest.c
Log Message:
Misc. cleanups.
Index: memory.c
===================================================================
RCS file: /cvsroot/quest-ed/quest-3b/src/quest/memory.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** memory.c 11 Aug 2001 16:09:09 -0000 1.1.1.1
--- memory.c 20 May 2002 19:17:45 -0000 1.2
***************
*** 99,103 ****
void *Q_realloc(void *temp, int size)
! {
#ifdef TRACK_MEM_USED
int oldsize=0;
--- 99,103 ----
void *Q_realloc(void *temp, int size)
! { /* TODO: check for NULL and free returning NULL to catch errors */
#ifdef TRACK_MEM_USED
int oldsize=0;
***************
*** 125,129 ****
#endif
! temp = (void *)realloc(temp,size);
#endif
--- 125,129 ----
#endif
! temp = (void *)realloc(temp,size);
#endif
Index: quest.c
===================================================================
RCS file: /cvsroot/quest-ed/quest-3b/src/quest/quest.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** quest.c 27 Aug 2001 21:23:20 -0000 1.5
--- quest.c 20 May 2002 19:17:45 -0000 1.6
***************
*** 140,144 ****
{"help" ,"h" ,"Get help on arguments" ,P_0 ,ACT_CALL ,{f:ARG_Help}},
! {0 , 0, 0, 0, 0,{0}}
};
#define NUM_ARGS ((int)(sizeof(args)/sizeof(args[0])-1))
--- 140,144 ----
{"help" ,"h" ,"Get help on arguments" ,P_0 ,ACT_CALL ,{f:ARG_Help}},
! {0}
};
#define NUM_ARGS ((int)(sizeof(args)/sizeof(args[0])-1))
|
|
From: Alexander M. <al...@us...> - 2002-05-20 19:17:52
|
Update of /cvsroot/quest-ed/quest-3b/src/fe/gtk In directory usw-pr-cvs1:/tmp/cvs-serv28264/src/fe/gtk Modified Files: cm.c Log Message: Misc. cleanups. Index: cm.c =================================================================== RCS file: /cvsroot/quest-ed/quest-3b/src/fe/gtk/cm.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** cm.c 28 Sep 2001 10:01:38 -0000 1.1 --- cm.c 20 May 2002 19:17:45 -0000 1.2 *************** *** 120,124 **** gtk_clist_append(cm_list,strs), c); ! } gtk_clist_sort(cm_list); gtk_clist_select_row(cm_list,0,0); --- 120,124 ---- gtk_clist_append(cm_list,strs), c); ! } /* TODO */ gtk_clist_sort(cm_list); gtk_clist_select_row(cm_list,0,0); |
|
From: Alexander M. <al...@us...> - 2002-05-20 01:01:34
|
Update of /cvsroot/quest-ed/quest-3b/src/fe/gl
In directory usw-pr-cvs1:/tmp/cvs-serv16692/src/fe/gl
Modified Files:
render.c
Log Message:
Display coordinates for the grid.
Index: render.c
===================================================================
RCS file: /cvsroot/quest-ed/quest-3b/src/fe/gl/render.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** render.c 26 Aug 2001 19:48:20 -0000 1.5
--- render.c 20 May 2002 01:01:30 -0000 1.6
***************
*** 1198,1250 ****
! static void DrawGrid(gl_viewport_t *v,double d)
{
! double y,y1,y2;
! double x,x1,x2;
!
! matrix_t m;
! if (d/2.0*v->vp.zoom_amt<10)
! return;
! glGetFloatv(GL_MODELVIEW_MATRIX,(float *)m);
! glPushMatrix();
! glLoadIdentity();
! y1=-v->sy/v->vp.zoom_amt;
! y1=floor((y1-d)/d)*d;
! y2=v->sy/v->vp.zoom_amt;
! y2=ceil((y2+d)/d)*d;
! x1=-v->sx/v->vp.zoom_amt;
! x1=floor((x1-d)/d)*d;
! x2=v->sx/v->vp.zoom_amt;
! x2=ceil((x2+d)/d)*d;
!
! m[3][0]-=floor(m[3][0]/d)*d;
! m[3][1]-=floor(m[3][1]/d)*d;
! x1+=m[3][0];
! x2+=m[3][0];
! y1+=m[3][1];
! y2+=m[3][1];
! glBegin(GL_LINES);
! for (y=y1;y<y2;y+=d)
! {
! glVertex2f(x1,y);
! glVertex2f(x2,y);
! }
! for (x=x1;x<x2;x+=d)
! {
! glVertex2f(x,y1);
! glVertex2f(x,y2);
! }
! glEnd();
! glPopMatrix();
}
--- 1198,1451 ----
! static unsigned char grid_numbers[11][8][4]={
! #define _ 0x00
! #define M 0xff
{
! {_,M,M,_},
! {M,_,_,M},
! {M,_,_,M},
! {M,_,_,M},
! {M,_,_,M},
! {M,_,_,M},
! {M,_,_,M},
! {_,M,M,_},
! },
! {
! {_,_,M,_},
! {_,_,M,_},
! {_,_,M,_},
! {_,_,M,_},
! {_,_,M,_},
! {_,_,M,_},
! {_,M,M,_},
! {_,_,M,_},
! },
! {
! {M,M,M,M},
! {M,_,_,_},
! {_,M,_,_},
! {_,M,_,_},
! {_,_,M,_},
! {_,_,_,M},
! {M,_,_,M},
! {_,M,M,_},
! },
! {
! {_,M,M,_},
! {M,_,_,M},
! {_,_,_,M},
! {_,_,_,M},
! {_,_,M,_},
! {_,_,_,M},
! {M,_,_,M},
! {_,M,M,_},
! },
! {
! {_,_,_,M},
! {_,_,_,M},
! {_,_,_,M},
! {_,_,_,M},
! {M,M,M,M},
! {M,_,_,M},
! {M,_,_,M},
! {M,_,_,M},
! },
! {
! {_,M,M,_},
! {M,_,_,M},
! {_,_,_,M},
! {_,_,_,M},
! {M,M,M,M},
! {M,_,_,_},
! {M,_,_,_},
! {M,M,M,M},
! },
! {
! {_,M,M,_},
! {M,_,_,M},
! {M,_,_,M},
! {M,_,_,M},
! {M,M,M,_},
! {M,_,_,_},
! {M,_,_,_},
! {_,M,M,M},
! },
! {
! {M,_,_,_},
! {M,_,_,_},
! {_,M,_,_},
! {_,M,_,_},
! {_,_,M,_},
! {_,_,_,M},
! {_,_,_,M},
! {M,M,M,M},
! },
! {
! {_,M,M,_},
! {M,_,_,M},
! {M,_,_,M},
! {M,_,_,M},
! {_,M,M,_},
! {M,_,_,M},
! {M,_,_,M},
! {_,M,M,_},
! },
! {
! {M,M,M,_},
! {_,_,_,M},
! {_,_,_,M},
! {_,M,M,M},
! {M,_,_,M},
! {M,_,_,M},
! {M,_,_,M},
! {_,M,M,_},
! },
! {
! {_,_,_,_},
! {_,_,_,_},
! {_,_,_,_},
! {M,M,M,M},
! {M,M,M,M},
! {_,_,_,_},
! {_,_,_,_},
! {_,_,_,_},
! },
! };
! #undef M
! #undef _
! static double DrawGrid(gl_viewport_t *v,double d,int do_text)
! {
! double y,y1,y2;
! double x,x1,x2;
! double zoom=v->vp.zoom_amt;
! double ofsx,ofsy;
! double odx,ody;
!
! matrix_t m;
!
! if (do_text)
! {
! while (d/2.0*zoom<28)
! d*=2;
! }
! else
! {
! if (d/2.0*zoom<10)
! return 0;
! }
! glGetFloatv(GL_MODELVIEW_MATRIX,(float *)m);
! glPushMatrix();
! glLoadIdentity();
! y1=-v->sy/zoom;
! y1=floor((y1-d)/d)*d;
! y2=v->sy/zoom;
! y2=ceil((y2+d)/d)*d;
! x1=-v->sx/zoom;
! x1=floor((x1-d)/d)*d;
! x2=v->sx/zoom;
! x2=ceil((x2+d)/d)*d;
! ofsx=floor(m[3][0]/d)*d;
! ofsy=floor(m[3][1]/d)*d;
! m[3][0]-=ofsx;
! m[3][1]-=ofsy;
!
! odx=ody=d;
! if (m[0][0]+m[1][0]+m[2][0]>0)
! {
! ofsx=x1-ofsx;
! }
! else
! {
! ofsx-=x1;
! odx=-odx;
! }
! if (m[0][1]+m[1][1]+m[2][1]>0)
! {
! ofsy=y1-ofsy;
! }
! else
! {
! ofsy+=y2;
! ody=-ody;
! }
!
! x1+=m[3][0];
! x2+=m[3][0];
! y1+=m[3][1];
! y2+=m[3][1];
!
! if (do_text)
! {
! char buf[8];
! char *c;
! int g;
! double rx;
!
! for (y=y1;y<y2;y+=d,ofsy+=ody)
! {
! snprintf(buf,sizeof(buf),"%i",(int)ofsy);
! x=(-v->sx+4)/zoom;
! for (c=buf;*c;c++)
! {
! if (*c>='0' && *c<='9')
! g=*c-'0';
! else if (*c=='-')
! g=10;
! else
! continue;
!
! glRasterPos2d(x,y+2/zoom);
! glDrawPixels(4,8,GL_LUMINANCE,GL_UNSIGNED_BYTE,&grid_numbers[g]);
! x+=12/zoom;
! }
! }
!
! for (x=x1;x<x2;x+=d,ofsx+=odx)
! {
! snprintf(buf,sizeof(buf),"%i",(int)ofsx);
! y=(-v->sy+4)/zoom;
! rx=x;
! for (c=buf;*c;c++)
! {
! if (*c>='0' && *c<='9')
! g=*c-'0';
! else if (*c=='-')
! g=10;
! else
! continue;
!
! glRasterPos2d(rx,y);
! glDrawPixels(4,8,GL_LUMINANCE,GL_UNSIGNED_BYTE,&grid_numbers[g]);
! rx+=12/zoom;
! }
! }
! }
! else
! {
! glBegin(GL_LINES);
! for (y=y1;y<y2;y+=d)
! {
! glVertex2f(x1,y);
! glVertex2f(x2,y);
! }
! for (x=x1;x<x2;x+=d)
! {
! glVertex2f(x,y1);
! glVertex2f(x,y2);
! }
! glEnd();
! }
! glPopMatrix();
! return d;
}
***************
*** 1289,1299 ****
{
! if (v->mode&M_2D && v->vp.axis_aligned && v->grid_type==GRID_NORMAL)
! {
! glColor4fv(C_GRID_SMALL);
! DrawGrid(v,cv_edit_snap_size->f);
! glColor4fv(C_GRID_LARGE);
! DrawGrid(v,cv_edit_snap_size->f*4);
! }
if (cv_render_flags->i&RENDER_BRUSH)
--- 1490,1505 ----
{
! if (v->mode&M_2D && v->vp.axis_aligned && v->grid_type==GRID_NORMAL)
! {
! double d;
! glColor4fv(C_GRID_SMALL);
! DrawGrid(v,cv_edit_snap_size->f,0);
! glColor4fv(C_GRID_LARGE);
! DrawGrid(v,cv_edit_snap_size->f*4,0);
!
! d=DrawGrid(v,cv_edit_snap_size->f,1);
! if (d>cv_edit_snap_size->f*4)
! DrawGrid(v,d,0); /* TODO: really do this? different color? */
! }
if (cv_render_flags->i&RENDER_BRUSH)
|
|
From: Alexander M. <al...@us...> - 2002-05-19 20:43:02
|
Update of /cvsroot/quest-ed/quest-3b/src/cmd
In directory usw-pr-cvs1:/tmp/cvs-serv17576/src/cmd
Modified Files:
cam.c
Log Message:
Add cvar:s for inverting mouse movement in camera.move_drag.
Index: cam.c
===================================================================
RCS file: /cvsroot/quest-ed/quest-3b/src/cmd/cam.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** cam.c 18 May 2002 18:38:09 -0000 1.3
--- cam.c 19 May 2002 20:42:57 -0000 1.4
***************
*** 22,25 ****
--- 22,30 ----
+ static config_var_t
+ *cv_camera_move_drag_invert_x,
+ *cv_camera_move_drag_invert_y;
+
+
/* Camera commands */
***************
*** 169,172 ****
--- 174,181 ----
int tx,ty;
int sx,sy,ox,oy;
+ int inv_x,inv_y;
+
+ inv_x=cv_camera_move_drag_invert_x->i?1:-1;
+ inv_y=cv_camera_move_drag_invert_y->i?1:-1;
S_I_Setup(&e,S_I_MOTION|S_I_RELEASE,NULL);
***************
*** 188,191 ****
--- 197,203 ----
oy+=sy;
+ sx*=inv_x;
+ sy*=inv_y;
+
while (sx>0) Camera_Move(S_cur_vport,MOVE_LEFT),sx--;
while (sx<0) Camera_Move(S_cur_vport,MOVE_RIGHT),sx++;
***************
*** 237,240 ****
{{Init},{"camera","Fundamental camera commands (moving around, rotating, zooming)."}};
! PLUGIN_FOOT_FUNCS
--- 249,268 ----
{{Init},{"camera","Fundamental camera commands (moving around, rotating, zooming)."}};
! static int Init(void)
! {
! cv_camera_move_drag_invert_x=Cfg_DefVar(plugin.cfg,
! "camera.move_drag.invert_x",
! "0",
! "Invert x movement when dragging camera (camera.move_drag).");
! cv_camera_move_drag_invert_y=Cfg_DefVar(plugin.cfg,
! "camera.move_drag.invert_y",
! "0",
! "Invert y movement when dragging camera (camera.move_drag).");
!
! Func_Register(&plugin,funcs,sizeof(funcs));
!
! return 1;
! }
!
! PLUGIN_FOOT
|
|
From: Alexander M. <al...@us...> - 2002-05-18 18:38:19
|
Update of /cvsroot/quest-ed/quest-3b/src/fe/gtk/gl
In directory usw-pr-cvs1:/tmp/cvs-serv31207/src/fe/gtk/gl
Modified Files:
g_int.c
Log Message:
Only print the message if it's not NULL.
Index: g_int.c
===================================================================
RCS file: /cvsroot/quest-ed/quest-3b/src/fe/gtk/gl/g_int.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** g_int.c 18 May 2002 18:12:12 -0000 1.3
--- g_int.c 18 May 2002 18:38:14 -0000 1.4
***************
*** 208,212 ****
flags=pflags;
! S_NewMessage("%s",msg);
S_process_key=S_process_mouse=0;
--- 208,213 ----
flags=pflags;
! if (msg)
! S_NewMessage("%s",msg);
S_process_key=S_process_mouse=0;
|
|
From: Alexander M. <al...@us...> - 2002-05-18 18:38:11
|
Update of /cvsroot/quest-ed/quest-3b/src/cmd
In directory usw-pr-cvs1:/tmp/cvs-serv31107/src/cmd
Modified Files:
cam.c
Log Message:
Add back ability to move around in a viewport by right-clicking and dragging.
Index: cam.c
===================================================================
RCS file: /cvsroot/quest-ed/quest-3b/src/cmd/cam.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** cam.c 23 Aug 2001 20:54:54 -0000 1.2
--- cam.c 18 May 2002 18:38:09 -0000 1.3
***************
*** 17,20 ****
--- 17,21 ----
#include "status.h"
#include "fe/3d.h"
+ #include "fe/int.h"
#include "fe/message.h"
#include "fe/render.h"
***************
*** 163,166 ****
--- 164,206 ----
+ static void C_camera_move_drag(void)
+ {
+ s_event_t e;
+ int tx,ty;
+ int sx,sy,ox,oy;
+
+ S_I_Setup(&e,S_I_MOTION|S_I_RELEASE,NULL);
+ tx=ty=0;
+ ox=oy=0;
+ while (1)
+ {
+ S_I_Wait(&e);
+ if (e.type==S_I_CLICK || e.type==S_I_RELEASE)
+ break;
+ if (e.type==S_I_MOTION)
+ {
+ tx+=e.dx;
+ ty+=e.dy;
+
+ sx=-tx/4-ox;
+ sy=-ty/4-oy;
+ ox+=sx;
+ oy+=sy;
+
+ while (sx>0) Camera_Move(S_cur_vport,MOVE_LEFT),sx--;
+ while (sx<0) Camera_Move(S_cur_vport,MOVE_RIGHT),sx++;
+ while (sy>0) Camera_Move(S_cur_vport,MOVE_UP),sy--;
+ while (sy<0) Camera_Move(S_cur_vport,MOVE_DOWN),sy++;
+
+ S_UpdateAllViewports();
+ }
+ }
+ S_I_Done();
+ }
+ static func_t F_camera_move_drag=
+ {"camera.move_drag",FUNC_VOID,{fv:C_camera_move_drag},NULL,NULL,0,
+ };
+
+
static void C_camera_rotate(qatom_t l)
{
***************
*** 185,189 ****
! static func_t *funcs[]={&F_camera_move,&F_camera_rotate,
&F_camera_zoom_in,&F_camera_zoom_out,
&F_camera_zoom_to,&F_camera_reset};
--- 225,230 ----
! static func_t *funcs[]={&F_camera_move,&F_camera_move_drag,
! &F_camera_rotate,
&F_camera_zoom_in,&F_camera_zoom_out,
&F_camera_zoom_to,&F_camera_reset};
|
|
From: Alexander M. <al...@us...> - 2002-05-18 18:38:11
|
Update of /cvsroot/quest-ed/quest-3b In directory usw-pr-cvs1:/tmp/cvs-serv31107 Modified Files: conf.ql Log Message: Add back ability to move around in a viewport by right-clicking and dragging. Index: conf.ql =================================================================== RCS file: /cvsroot/quest-ed/quest-3b/conf.ql,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -r1.18 -r1.19 *** conf.ql 18 May 2002 18:12:11 -0000 1.18 --- conf.ql 18 May 2002 18:38:08 -0000 1.19 *************** *** 240,244 **** (bind (lambda () (camera.rotate DIR_BACKWARD)) "d") */ ! (bind edit.move_drag "mouse-left") (menu.set menu_camera) --- 240,244 ---- (bind (lambda () (camera.rotate DIR_BACKWARD)) "d") */ ! (bind camera.move_drag "mouse-right") (menu.set menu_camera) *************** *** 275,278 **** --- 275,280 ---- (bind (lambda () (edit.move DIR_FORWARD)) "shift+page-up") (bind (lambda () (edit.move DIR_BACKWARD)) "shift+page-down") + + (bind edit.move_drag "mouse-left") (bind (lambda () (texture.move DIR_LEFT)) "control+left") |
|
From: Alexander M. <al...@us...> - 2002-05-18 18:12:16
|
Update of /cvsroot/quest-ed/quest-3b In directory usw-pr-cvs1:/tmp/cvs-serv14111 Modified Files: conf.ql Log Message: Add command that lets you move selected things by dragging them. Index: conf.ql =================================================================== RCS file: /cvsroot/quest-ed/quest-3b/conf.ql,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -r1.17 -r1.18 *** conf.ql 18 May 2002 01:34:48 -0000 1.17 --- conf.ql 18 May 2002 18:12:11 -0000 1.18 *************** *** 240,243 **** --- 240,244 ---- (bind (lambda () (camera.rotate DIR_BACKWARD)) "d") */ + (bind edit.move_drag "mouse-left") (menu.set menu_camera) *************** *** 255,259 **** (bind edit.select.face_next "control+plus") (bind edit.select.face_prev "control+minus") ! (bind undo "control+z" (menu "_Undo")) (menu nil) --- 256,260 ---- (bind edit.select.face_next "control+plus") (bind edit.select.face_prev "control+minus") ! (bind undo "control+z" (menu "_Undo")) (menu nil) |
|
From: Alexander M. <al...@us...> - 2002-05-18 18:12:16
|
Update of /cvsroot/quest-ed/quest-3b/src/fe/gtk/gl
In directory usw-pr-cvs1:/tmp/cvs-serv14111/src/fe/gtk/gl
Modified Files:
g_int.c
Log Message:
Add command that lets you move selected things by dragging them.
Index: g_int.c
===================================================================
RCS file: /cvsroot/quest-ed/quest-3b/src/fe/gtk/gl/g_int.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** g_int.c 26 Aug 2001 19:48:40 -0000 1.2
--- g_int.c 18 May 2002 18:12:12 -0000 1.3
***************
*** 175,178 ****
--- 175,200 ----
break;
+ case GDK_BUTTON_RELEASE:
+ {
+ GdkEventButton *e=(GdkEventButton *)event;
+
+ gdk_window_get_pointer(e->window,&x,&y,&s);
+ se->mp.x= x/(double)S_GL_vport->sx*2-1;
+ se->mp.y=-(y/(double)S_GL_vport->sy*2-1);
+
+ se->dx=se->dy=0;
+ se->key=S_Input_ConvState(e->state);
+ switch (e->button)
+ {
+ case 1: se->key|=KEY_BUTTON1; break;
+ case 3: se->key|=KEY_BUTTON2; break;
+ case 2: se->key|=KEY_BUTTON3; break;
+ default: break;
+ }
+ se->type=S_I_RELEASE;
+ gtk_main_quit();
+ }
+ break;
+
default:
break;
***************
*** 190,194 ****
S_process_key=S_process_mouse=0;
! if (flags&S_I_CLICK)
{
gtk_signal_connect(GTK_OBJECT(S_cur_gvport->win),"button_press_event",GTK_SIGNAL_FUNC(si_event),NULL);
--- 212,216 ----
S_process_key=S_process_mouse=0;
! if (flags&(S_I_CLICK|S_I_RELEASE))
{
gtk_signal_connect(GTK_OBJECT(S_cur_gvport->win),"button_press_event",GTK_SIGNAL_FUNC(si_event),NULL);
|
|
From: Alexander M. <al...@us...> - 2002-05-18 18:12:16
|
Update of /cvsroot/quest-ed/quest-3b/src/quest/fe In directory usw-pr-cvs1:/tmp/cvs-serv14111/src/quest/fe Modified Files: int.h Log Message: Add command that lets you move selected things by dragging them. Index: int.h =================================================================== RCS file: /cvsroot/quest-ed/quest-3b/src/quest/fe/int.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -r1.1.1.1 -r1.2 *** int.h 11 Aug 2001 16:09:26 -0000 1.1.1.1 --- int.h 18 May 2002 18:12:12 -0000 1.2 *************** *** 11,17 **** } s_event_t; ! #define S_I_CLICK 1 ! #define S_I_KEY 2 ! #define S_I_MOTION 4 void S_I_Setup(s_event_t *e,int flags,const char *msg); void S_I_Wait(s_event_t *e); --- 11,18 ---- } s_event_t; ! #define S_I_CLICK 1 ! #define S_I_KEY 2 ! #define S_I_MOTION 4 ! #define S_I_RELEASE 8 void S_I_Setup(s_event_t *e,int flags,const char *msg); void S_I_Wait(s_event_t *e); |
|
From: Alexander M. <al...@us...> - 2002-05-18 18:12:16
|
Update of /cvsroot/quest-ed/quest-3b/src/cmd/edit
In directory usw-pr-cvs1:/tmp/cvs-serv14111/src/cmd/edit
Modified Files:
move.c
Log Message:
Add command that lets you move selected things by dragging them.
Index: move.c
===================================================================
RCS file: /cvsroot/quest-ed/quest-3b/src/cmd/edit/move.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** move.c 24 Aug 2001 16:14:22 -0000 1.2
--- move.c 18 May 2002 18:12:12 -0000 1.3
***************
*** 15,19 ****
--- 15,21 ----
#include "status.h"
#include "transform.h"
+ #include "undo.h"
#include "fe/3d.h"
+ #include "fe/int.h"
#include "fe/message.h"
***************
*** 49,53 ****
};
! static func_t *funcs[]={&F_edit_move};
#include "plugin.h"
--- 51,108 ----
};
!
! /*
! TODO:
! how much should we move? should diffent grid sizes require different amounts
! of mouse movement to move one grid-multiple. zooming? 3d? configurable?
! */
! static void C_edit_move_drag(void)
! {
! s_event_t e;
! int tx,ty;
! int sx,sy,ox,oy;
! vec3_t left,up,delta;
!
! if (!M.sel.vsel && !M.sel.esel && !M.sel.bsel && !M.sel.fsel)
! return;
!
! Move90(S_cur_vport,MOVE_LEFT,&left,cv_edit_snap_size->i);
! Move90(S_cur_vport,MOVE_UP,&up,cv_edit_snap_size->i);
!
! S_I_Setup(&e,S_I_MOTION|S_I_RELEASE,NULL);
! tx=ty=0;
! ox=oy=0;
! while (1)
! {
! S_I_Wait(&e);
! if (e.type==S_I_CLICK || e.type==S_I_RELEASE)
! break;
! if (e.type==S_I_MOTION)
! {
! tx+=e.dx;
! ty+=e.dy;
!
! sx=-tx/4-ox;
! sy=-ty/4-oy;
! delta.x=sx*left.x+sy*up.x;
! delta.y=sx*left.y+sy*up.y;
! delta.z=sx*left.z+sy*up.z;
! ox+=sx;
! oy+=sy;
! TransformMove(delta,&M.sel);
!
! Undo_Update();
! S_UpdateAllViewports();
! }
! }
! S_I_Done();
! }
! static func_t F_edit_move_drag=
! {"edit.move_drag",FUNC_VOID,{fv:C_edit_move_drag},NULL,NULL,0,
! {"Moves the current selection by tracking the mouse."} /* TODO */
! };
!
!
! static func_t *funcs[]={&F_edit_move,&F_edit_move_drag};
#include "plugin.h"
|
|
From: Alexander M. <al...@us...> - 2002-05-18 01:34:53
|
Update of /cvsroot/quest-ed/quest-3b/src/cmd
In directory usw-pr-cvs1:/tmp/cvs-serv11954/src/cmd
Modified Files:
snap.c
Log Message:
Add edit.snap back in again.
Index: snap.c
===================================================================
RCS file: /cvsroot/quest-ed/quest-3b/src/cmd/snap.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** snap.c 11 Aug 2001 16:08:30 -0000 1.1.1.1
--- snap.c 18 May 2002 01:34:48 -0000 1.2
***************
*** 7,11 ****
#include "types.h"
! #include "cmds.h"
#include "brush.h"
--- 7,11 ----
#include "types.h"
! #include "qfunc.h"
#include "brush.h"
***************
*** 14,19 ****
#include "map.h"
#include "quest.h"
- #include "s_message.h"
#include "undo.h"
--- 14,19 ----
#include "map.h"
#include "quest.h"
#include "undo.h"
+ #include "fe/message.h"
***************
*** 24,99 ****
static void C_snap(void)
{
! if (!M.sel.bsel && !M.sel.esel)
! {
! S_NewMessage("edit.snap: Nothing selected!");
! return;
! }
!
! if (M.sel.vsel)
! {
! vsel_t *vs;
!
! for (vs=M.sel.vsel;vs;vs=vs->Next)
! {
! U_BrushModify(vs->Brush);
! SnapVecToGrid(&vs->Brush->verts[vs->num]);
! }
! }
! else
! {
! vec3_t old,delta;
! bsel_t *bs;
! brush_t *b;
! int i;
!
! for (bs=M.sel.bsel;bs;bs=bs->Next)
! {
! b=bs->Brush;
! if (!b->num_verts) continue;
! U_BrushModify(b);
!
! old=b->verts[0];
! SnapVecToGrid(&b->verts[0]);
! VEC_Sub(delta,b->verts[0],old);
! for (i=1;i<b->num_verts;i++)
! {
! VEC_Add(b->verts[i],b->verts[i],delta);
! SnapVecToGrid(&b->verts[i]);
! }
! }
! }
!
! {
! esel_t *es;
! vec3_t origin;
! const char *c;
! char buf[128];
!
! for (es=M.sel.esel;es;es=es->Next)
! {
! if (!(c=GetKeyValue(es->Entity,"origin"))) continue;
! origin.x=origin.y=origin.z=0;
! sscanf(c,"%f %f %f",&origin.x,&origin.y,&origin.z);
! SnapVecToGrid(&origin);
! sprintf(buf,"%i %i %i",(int)origin.x,(int)origin.y,(int)origin.z);
! U_EntityModify(es->Entity);
! SetKeyValue(es->Entity,"origin",buf);
! }
! }
!
! Cmd_SetRedraw(2);
}
! static cmd_reg_t cmds[]={
! {"edit.snap",C_snap,{"Edit/Snap to grid","control+n"},{},"Snap the selected brushes and entities to the grid."}
};
#include "plugin.h"
PLUGIN_HEAD
static plugin_t plugin=
! {{Init},{"basic/edit/snap","Commands to snap objects to the grid."}};
! PLUGIN_FOOT_CMDS
--- 24,100 ----
static void C_snap(void)
{
! if (!M.sel.bsel && !M.sel.esel)
! {
! S_NewMessage("edit.snap: Nothing selected!");
! return;
! }
!
! if (M.sel.vsel)
! {
! vsel_t *vs;
!
! for (vs=M.sel.vsel;vs;vs=vs->Next)
! {
! U_BrushModify(vs->Brush);
! SnapVecToGrid(&vs->Brush->verts[vs->num]);
! }
! }
! else
! {
! vec3_t old,delta;
! bsel_t *bs;
! brush_t *b;
! int i;
!
! for (bs=M.sel.bsel;bs;bs=bs->Next)
! {
! b=bs->Brush;
! if (!b->num_verts) continue;
! U_BrushModify(b);
!
! old=b->verts[0];
! SnapVecToGrid(&b->verts[0]);
! VEC_Sub(delta,b->verts[0],old);
! for (i=1;i<b->num_verts;i++)
! {
! VEC_Add(b->verts[i],b->verts[i],delta);
! SnapVecToGrid(&b->verts[i]);
! }
! }
! }
!
! {
! esel_t *es;
! vec3_t origin;
! const char *c;
! char buf[128];
!
! for (es=M.sel.esel;es;es=es->Next)
! {
! if (!(c=GetKeyValue(es->Entity,"origin"))) continue;
! origin.x=origin.y=origin.z=0;
! sscanf(c,"%f %f %f",&origin.x,&origin.y,&origin.z);
! SnapVecToGrid(&origin);
! sprintf(buf,"%i %i %i",(int)origin.x,(int)origin.y,(int)origin.z);
! U_EntityModify(es->Entity);
! SetKeyValue(es->Entity,"origin",buf);
! }
! }
}
! static func_t F_edit_snap=
! {"edit.snap",FUNC_VOID,{fv:C_snap},NULL,NULL,0,
! {"Snap the selected brushes and entities to the grid."}
};
+ static func_t *funcs[]={&F_edit_snap};
+
#include "plugin.h"
PLUGIN_HEAD
static plugin_t plugin=
! {{Init},{"edit.snap","Commands to snap objects to the grid."}};
! PLUGIN_FOOT_FUNCS
|
|
From: Alexander M. <al...@us...> - 2002-05-18 01:34:53
|
Update of /cvsroot/quest-ed/quest-3b/src In directory usw-pr-cvs1:/tmp/cvs-serv11954/src Modified Files: Makefile Log Message: Add edit.snap back in again. Index: Makefile =================================================================== RCS file: /cvsroot/quest-ed/quest-3b/src/Makefile,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -r1.9 -r1.10 *** Makefile 16 May 2002 20:12:22 -0000 1.9 --- Makefile 18 May 2002 01:34:48 -0000 1.10 *************** *** 20,23 **** --- 20,24 ---- basic.c cam.c cbrush.c edit/misc.c edit/select.c edit/move.c \ edit/clipboard.c rflags.c trans.c texset.c entity.c texmove.c \ + snap.c \ \ csg/intersect.c csg/join.c csg/rmhl.c csg/sub.c csg/weld.c \ |
|
From: Alexander M. <al...@us...> - 2002-05-18 01:34:53
|
Update of /cvsroot/quest-ed/quest-3b In directory usw-pr-cvs1:/tmp/cvs-serv11954 Modified Files: conf.ql Log Message: Add edit.snap back in again. Index: conf.ql =================================================================== RCS file: /cvsroot/quest-ed/quest-3b/conf.ql,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -r1.16 -r1.17 *** conf.ql 16 May 2002 20:12:22 -0000 1.16 --- conf.ql 18 May 2002 01:34:48 -0000 1.17 *************** *** 119,123 **** edit.clipboard render.flags.cmds edit.trans edit.texture.set entity.basic csg.intersect csg.join csg.rmhl csg.subtract ! csg.weld texture.move) (set menu_file (menu.add nil "_File")) --- 119,123 ---- edit.clipboard render.flags.cmds edit.trans edit.texture.set entity.basic csg.intersect csg.join csg.rmhl csg.subtract ! csg.weld texture.move edit.snap) (set menu_file (menu.add nil "_File")) *************** *** 283,286 **** --- 283,288 ---- (bind (lambda () (texture.scale DIR_UP)) "control+shift+up") (bind (lambda () (texture.scale DIR_DOWN)) "control+shift+down") + + (bind edit.snap "control+n" (menu "_Snap to grid")) (menu nil) |
|
From: Alexander M. <al...@us...> - 2002-05-17 12:42:26
|
Update of /cvsroot/quest-ed/quest-3b In directory usw-pr-cvs1:/tmp/cvs-serv27703 Modified Files: .cvsignore Log Message: Remove cfgsave.ql from .cvsignore for now, although it probably shouldn't be in the repository. Index: .cvsignore =================================================================== RCS file: /cvsroot/quest-ed/quest-3b/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** .cvsignore 17 May 2002 12:40:22 -0000 1.1 --- .cvsignore 17 May 2002 12:42:23 -0000 1.2 *************** *** 1,3 **** - cfgsave.ql ChangeLog q_backup.map --- 1,2 ---- |
|
From: Alexander M. <al...@us...> - 2002-05-17 12:40:25
|
Update of /cvsroot/quest-ed/quest-3b In directory usw-pr-cvs1:/tmp/cvs-serv27288 Added Files: .cvsignore Log Message: Add .cvsignore. --- NEW FILE --- cfgsave.ql ChangeLog q_backup.map |
|
From: Alexander M. <al...@us...> - 2002-05-17 12:39:08
|
Update of /cvsroot/quest-ed/quest-3b/src/fe/gtk
In directory usw-pr-cvs1:/tmp/cvs-serv26902/src/fe/gtk
Modified Files:
input.c
Log Message:
Map normal (ie. not keypad) '+' and '-' correctly.
Index: input.c
===================================================================
RCS file: /cvsroot/quest-ed/quest-3b/src/fe/gtk/input.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** input.c 16 May 2002 19:07:32 -0000 1.6
--- input.c 17 May 2002 12:39:06 -0000 1.7
***************
*** 68,71 ****
--- 68,73 ----
{GDK_KP_Subtract ,KEY_MINUS ,1},
{GDK_KP_Add ,KEY_PLUS ,1},
+ {GDK_plus ,KEY_PLUS ,0},
+ {GDK_minus ,KEY_MINUS ,0},
{GDK_A,KEY_A,1},{GDK_a,KEY_A,1},
|