plib-cvs Mailing List for PLIB (Page 17)
Brought to you by:
sjbaker
You can subscribe to this list here.
2002 |
Jan
(25) |
Feb
(10) |
Mar
(60) |
Apr
(49) |
May
(54) |
Jun
(94) |
Jul
(82) |
Aug
(251) |
Sep
(366) |
Oct
(17) |
Nov
(20) |
Dec
(14) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(12) |
Feb
(8) |
Mar
(2) |
Apr
(4) |
May
(5) |
Jun
(8) |
Jul
(23) |
Aug
(8) |
Sep
(7) |
Oct
(5) |
Nov
(20) |
Dec
(20) |
2004 |
Jan
(19) |
Feb
(70) |
Mar
(108) |
Apr
(24) |
May
(6) |
Jun
(5) |
Jul
|
Aug
(8) |
Sep
(18) |
Oct
(27) |
Nov
|
Dec
(13) |
2005 |
Jan
(19) |
Feb
(13) |
Mar
(1) |
Apr
|
May
(10) |
Jun
(1) |
Jul
(10) |
Aug
(5) |
Sep
(2) |
Oct
(2) |
Nov
(6) |
Dec
(4) |
2006 |
Jan
(9) |
Feb
|
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Wolfram K. <wol...@us...> - 2003-12-06 18:25:41
|
Update of /cvsroot/plib/plib/src/ssg In directory sc8-pr-cvs1:/tmp/cvs-serv20208 Modified Files: ssgLoadMDL.cxx Log Message: Fixed: A bug in 1.46 meant it only compiles when "DEBUG" is defined. Index: ssgLoadMDL.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssgLoadMDL.cxx,v retrieving revision 1.47 retrieving revision 1.48 diff -u -d -r1.47 -r1.48 --- ssgLoadMDL.cxx 6 Dec 2003 18:18:20 -0000 1.47 +++ ssgLoadMDL.cxx 6 Dec 2003 18:25:38 -0000 1.48 @@ -124,7 +124,12 @@ #define PRINT_STRUCTURE(a, b) fprintf(wkfp, a, b); #define PRINT_STRUCTURE1(a ) fprintf(wkfp, a); - + +#else + +#define PRINT_STRUCTURE(a, b) +#define PRINT_STRUCTURE1(a ) + #endif //=========================================================================== |
From: Wolfram K. <wol...@us...> - 2003-12-06 18:18:23
|
Update of /cvsroot/plib/plib/src/ssg In directory sc8-pr-cvs1:/tmp/cvs-serv19152 Modified Files: ssgLoadMDL.cxx Log Message: LoDs (Level of Details) implemented. Different LoDs are put into different hierarchy nodes and named according to their detail level Index: ssgLoadMDL.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssgLoadMDL.cxx,v retrieving revision 1.46 retrieving revision 1.47 diff -u -d -r1.46 -r1.47 --- ssgLoadMDL.cxx 5 Dec 2003 18:14:01 -0000 1.46 +++ ssgLoadMDL.cxx 6 Dec 2003 18:18:20 -0000 1.47 @@ -86,9 +86,12 @@ #endif // File Address Stack -static const int MAX_STACK_DEPTH = 64; // wk: 32 is too small -static long stack_ [MAX_STACK_DEPTH]; +static const int MAX_STACK_DEPTH = 128; // wk: 32 is too small +static long stack_ [MAX_STACK_DEPTH]; // adress part +static short lod_ [MAX_STACK_DEPTH]; // lod part of the stack static int stack_depth_; +static short noLoDs; +static short curr_lod; [...123 lines suppressed...] @@ -1339,7 +1360,10 @@ NULL, curr_index_); curr_part_->setState( createState(false) ); - + char sName[10]; + sprintf(sName, "lod %d", (int)curr_lod); + curr_part_->setName(sName); + //assert(curr_part_->getState()->getTexture() == NULL); unsigned short numverts = ulEndianReadLittle16(fp); @@ -1584,6 +1608,7 @@ delete curr_norm_; DEBUGPRINT("\n" << vertex_array_->getNum() << " vertices\n"); + printf("NoLoDs = %d\n", (int)noLoDs); return model_; } |
From: Wolfram K. <wol...@us...> - 2003-12-05 18:14:05
|
Update of /cvsroot/plib/plib/src/ssg In directory sc8-pr-cvs1:/tmp/cvs-serv30949 Modified Files: ssgLoadMDL.cxx Log Message: Started making it CFS2 compatible Index: ssgLoadMDL.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssgLoadMDL.cxx,v retrieving revision 1.45 retrieving revision 1.46 diff -u -d -r1.45 -r1.46 --- ssgLoadMDL.cxx 2 Jun 2003 21:03:50 -0000 1.45 +++ ssgLoadMDL.cxx 5 Dec 2003 18:14:01 -0000 1.46 @@ -116,6 +116,14 @@ #endif }*/ +#ifdef DEBUG +FILE *wkfp; + +#define PRINT_STRUCTURE(a, b) fprintf(wkfp, a, b); +#define PRINT_STRUCTURE1(a ) fprintf(wkfp, a); + +#endif + [...178 lines suppressed...] + case 0xB4: // TextureSize + ulEndianReadLittle32(fp); // float + break; + case 0xBD: // BGL_END / EndVersion + break; + default: // Unknown opcode { if (opcode < 256) @@ -1474,7 +1577,9 @@ } fclose(fp); - +#ifdef DEBUG + fclose(wkfp); +#endif delete curr_vtx_; delete curr_norm_; |
From: M?rten Str?m. <str...@us...> - 2003-11-30 21:23:53
|
Update of /cvsroot/plib/plib/src/sg In directory sc8-pr-cvs1:/tmp/cvs-serv2271 Modified Files: sg.h Log Message: proper const fix Index: sg.h =================================================================== RCS file: /cvsroot/plib/plib/src/sg/sg.h,v retrieving revision 1.54 retrieving revision 1.55 diff -u -d -r1.54 -r1.55 --- sg.h 30 Nov 2003 21:22:07 -0000 1.54 +++ sg.h 30 Nov 2003 21:23:48 -0000 1.55 @@ -2855,9 +2855,13 @@ sgZeroVec3 ( force ) ; } - SGfloat *getPos () const { return pos ; } - SGfloat *getVel () const { return vel ; } - SGfloat *getForce () const { return force ; } + SGfloat *getPos () { return pos ; } + SGfloat *getVel () { return vel ; } + SGfloat *getForce () { return force ; } + + const SGfloat *getPos () const { return pos ; } + const SGfloat *getVel () const { return vel ; } + const SGfloat *getForce () const { return force ; } float getOneOverMass () { return ooMass ; } float getMass () { return 1.0f / ooMass ; } |
From: M?rten Str?m. <str...@us...> - 2003-11-30 21:22:09
|
Update of /cvsroot/plib/plib/src/sg In directory sc8-pr-cvs1:/tmp/cvs-serv2087 Modified Files: sg.h Log Message: reverted const fix Index: sg.h =================================================================== RCS file: /cvsroot/plib/plib/src/sg/sg.h,v retrieving revision 1.53 retrieving revision 1.54 diff -u -d -r1.53 -r1.54 --- sg.h 13 Nov 2003 15:35:41 -0000 1.53 +++ sg.h 30 Nov 2003 21:22:07 -0000 1.54 @@ -2855,9 +2855,9 @@ sgZeroVec3 ( force ) ; } - const SGfloat *getPos () const { return pos ; } - const SGfloat *getVel () const { return vel ; } - const SGfloat *getForce () const { return force ; } + SGfloat *getPos () const { return pos ; } + SGfloat *getVel () const { return vel ; } + SGfloat *getForce () const { return force ; } float getOneOverMass () { return ooMass ; } float getMass () { return 1.0f / ooMass ; } |
From: M?rten Str?m. <str...@us...> - 2003-11-30 21:03:28
|
Update of /cvsroot/plib/plib/examples/src/ssg/shrubs/data In directory sc8-pr-cvs1:/tmp/cvs-serv31173/src/ssg/shrubs/data Added Files: Courier-Bold.txf deciduous-tree.rgb Log Message: shrubs example --- NEW FILE: Courier-Bold.txf --- (This appears to be a binary file; contents omitted.) --- NEW FILE: deciduous-tree.rgb --- (This appears to be a binary file; contents omitted.) |
From: M?rten Str?m. <str...@us...> - 2003-11-30 21:03:28
|
Update of /cvsroot/plib/plib/examples/src/ssg/shrubs In directory sc8-pr-cvs1:/tmp/cvs-serv31173/src/ssg/shrubs Added Files: Makefile.am shrubs.cxx Log Message: shrubs example --- NEW FILE: Makefile.am --- if BUILD_SSG noinst_PROGRAMS = shrubs shrubs_SOURCES = shrubs.cxx shrubs_LDADD = -lplibssgaux -lplibssg -lplibfnt -lplibpu -lplibsg -lplibul $(GLUT_LIBS) $(OGL_LIBS) endif EXTRA_DIST = --- NEW FILE: shrubs.cxx --- /* PLIB - A Suite of Portable Game Libraries Copyright (C) 1998,2002 Steve Baker This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA For further information visit http://plib.sourceforge.net [...679 lines suppressed...] //ssgModelPath("."); //ssgTexturePath("."); init_scene(); init_gui(); glutMainLoop(); return 0; } /* Local Variables: mode: C++ c-basic-offset: 4 c-file-offsets: ((substatement-open 0) (case-label 0)) End: */ |
From: M?rten Str?m. <str...@us...> - 2003-11-30 21:03:27
|
Update of /cvsroot/plib/plib/examples/src/ssg In directory sc8-pr-cvs1:/tmp/cvs-serv31173/src/ssg Modified Files: Makefile.am Log Message: shrubs example Index: Makefile.am =================================================================== RCS file: /cvsroot/plib/plib/examples/src/ssg/Makefile.am,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- Makefile.am 31 Jul 2003 12:02:37 -0000 1.7 +++ Makefile.am 30 Nov 2003 21:03:23 -0000 1.8 @@ -1,3 +1,3 @@ -SUBDIRS = tux majik load_save state_test viewer tween_test water sky dynamics +SUBDIRS = tux majik load_save state_test viewer tween_test water sky shrubs dynamics EXTRA_DIST = README |
From: M?rten Str?m. <str...@us...> - 2003-11-30 21:03:27
|
Update of /cvsroot/plib/plib/examples In directory sc8-pr-cvs1:/tmp/cvs-serv31173 Modified Files: Makefile.am configure.in Log Message: shrubs example Index: Makefile.am =================================================================== RCS file: /cvsroot/plib/plib/examples/Makefile.am,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- Makefile.am 31 Jul 2003 12:05:27 -0000 1.10 +++ Makefile.am 30 Nov 2003 21:03:23 -0000 1.11 @@ -8,6 +8,7 @@ src/ssg/water/data \ src/ssg/sky/data \ src/ssg/majik/data \ + src/ssg/shrubs/data \ src/psl/data \ src/fnt/data \ data \ Index: configure.in =================================================================== RCS file: /cvsroot/plib/plib/examples/configure.in,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- configure.in 31 Jul 2003 12:05:27 -0000 1.35 +++ configure.in 30 Nov 2003 21:03:23 -0000 1.36 @@ -266,6 +266,7 @@ src/ssg/water/Makefile \ src/ssg/sky/Makefile \ src/ssg/dynamics/Makefile \ + src/ssg/shrubs/Makefile \ src/fnt/Makefile \ src/net/Makefile \ src/net/client_server/Makefile \ |
From: M?rten Str?m. <str...@us...> - 2003-11-30 20:30:45
|
Update of /cvsroot/plib/plib/examples/src/ssg/shrubs/data In directory sc8-pr-cvs1:/tmp/cvs-serv26135/data Log Message: Directory /cvsroot/plib/plib/examples/src/ssg/shrubs/data added to the repository |
From: M?rten Str?m. <str...@us...> - 2003-11-30 20:30:15
|
Update of /cvsroot/plib/plib/examples/src/ssg/shrubs In directory sc8-pr-cvs1:/tmp/cvs-serv26031/shrubs Log Message: Directory /cvsroot/plib/plib/examples/src/ssg/shrubs added to the repository |
From: M?rten Str?m. <str...@us...> - 2003-11-30 20:29:08
|
Update of /cvsroot/plib/plib/src/ssgAux In directory sc8-pr-cvs1:/tmp/cvs-serv25800 Modified Files: Makefile.am Added Files: ssgaBillboards.cxx ssgaBillboards.h Log Message: ssgaBillboards initial checkin --- NEW FILE: ssgaBillboards.cxx --- /* PLIB - A Suite of Portable Game Libraries Copyright (C) 1998,2002 Steve Baker This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA For further information visit http://plib.sourceforge.net [...367 lines suppressed...] void ssgaBillboards::transform(const sgMat4 m) { float scale = sgLengthVec3(m[0]); for (int i = 0; i < getNum(); i++) sgXformPnt3(array.get(i), array.get(i), m); sgXformVec3(up, up, m); sgNormaliseVec3(up); width *= scale; height *= scale; } /* Local Variables: mode: C++ c-basic-offset: 4 c-file-offsets: ((substatement-open 0) (case-label 0)) End: */ --- NEW FILE: ssgaBillboards.h --- /* PLIB - A Suite of Portable Game Libraries Copyright (C) 1998,2002 Steve Baker This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA For further information visit http://plib.sourceforge.net [...190 lines suppressed...] assert( ss && ss->isAKindOf( ssgTypeSimpleState() )); ss->setTexture(tex); } inline ssgTexture *ssgaBillboards::getTexture() { ssgSimpleState *ss = (ssgSimpleState *) getState(); assert( ss && ss->isAKindOf( ssgTypeSimpleState() )); return ss->getTexture(); } /* Local Variables: mode: C++ c-basic-offset: 4 c-file-offsets: ((substatement-open 0) (case-label 0)) End: */ Index: Makefile.am =================================================================== RCS file: /cvsroot/plib/plib/src/ssgAux/Makefile.am,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- Makefile.am 4 Aug 2003 22:33:46 -0000 1.15 +++ Makefile.am 30 Nov 2003 20:29:05 -0000 1.16 @@ -10,7 +10,8 @@ ssgaScreenDump.h \ ssgaSky.h \ ssgaSphere.h \ - ssgaFire.h + ssgaFire.h \ + ssgaBillboards.h libplibssgaux_a_SOURCES = ssgAux.cxx \ ssgaShapes.cxx \ @@ -27,7 +28,8 @@ ssgaStars.cxx \ ssgaSkyDome.cxx \ ssgaSky.cxx \ - ssgaTeapot.cxx + ssgaTeapot.cxx \ + ssgaBillboards.cxx INCLUDES = -I$(top_srcdir)/src/sg -I$(top_srcdir)/src/ssg INCLUDES += -I$(top_srcdir)/src/util |
From: M?rten Str?m. <str...@us...> - 2003-11-20 14:01:49
|
Update of /cvsroot/plib/plib/src/ssg In directory sc8-pr-cvs1:/tmp/cvs-serv12859 Modified Files: ssgState.cxx Log Message: oops Index: ssgState.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssgState.cxx,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- ssgState.cxx 20 Nov 2003 13:58:35 -0000 1.11 +++ ssgState.cxx 20 Nov 2003 14:01:05 -0000 1.12 @@ -70,9 +70,9 @@ else setOpaque () ; - setCallback( SSG_CALLBACK_PREDRAW, src->getCallback( SSG_CALLBACK_PREDRAW ) ); - setCallback( SSG_CALLBACK_POSTDRAW, src->getCallback( SSG_CALLBACK_POSTDRAW ) ); - setCallback( SSG_CALLBACK_PREAPPLY, src->getCallback( SSG_CALLBACK_PREAPPLY ) ); + setStateCallback( SSG_CALLBACK_PREDRAW, src->getStateCallback( SSG_CALLBACK_PREDRAW ) ); + setStateCallback( SSG_CALLBACK_POSTDRAW, src->getStateCallback( SSG_CALLBACK_POSTDRAW ) ); + setStateCallback( SSG_CALLBACK_PREAPPLY, src->getStateCallback( SSG_CALLBACK_PREAPPLY ) ); } |
From: M?rten Str?m. <str...@us...> - 2003-11-20 13:59:15
|
Update of /cvsroot/plib/plib/src/ssg In directory sc8-pr-cvs1:/tmp/cvs-serv12304 Modified Files: ssgEntity.cxx ssgLeaf.cxx ssgState.cxx Log Message: Include callbacks in copy_from (for cloning). Index: ssgEntity.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssgEntity.cxx,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- ssgEntity.cxx 24 May 2003 17:08:09 -0000 1.25 +++ ssgEntity.cxx 20 Nov 2003 13:58:35 -0000 1.26 @@ -30,6 +30,9 @@ traversal_mask = src -> getTraversalMask () ; + setTravCallback( SSG_CALLBACK_PRETRAV, src->getTravCallback( SSG_CALLBACK_PRETRAV ) ); + setTravCallback( SSG_CALLBACK_POSTTRAV, src->getTravCallback( SSG_CALLBACK_POSTTRAV ) ); + dirtyBSphere () ; } Index: ssgLeaf.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssgLeaf.cxx,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- ssgLeaf.cxx 12 Nov 2003 17:32:50 -0000 1.23 +++ ssgLeaf.cxx 20 Nov 2003 13:58:35 -0000 1.24 @@ -55,6 +55,9 @@ //~~ T.G. increment ref counter if (state != NULL) state->ref(); + + setCallback( SSG_CALLBACK_PREDRAW, src->getCallback( SSG_CALLBACK_PREDRAW ) ); + setCallback( SSG_CALLBACK_POSTDRAW, src->getCallback( SSG_CALLBACK_POSTDRAW ) ); } Index: ssgState.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssgState.cxx,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- ssgState.cxx 2 Sep 2002 06:05:49 -0000 1.10 +++ ssgState.cxx 20 Nov 2003 13:58:35 -0000 1.11 @@ -69,6 +69,10 @@ setTranslucent () ; else setOpaque () ; + + setCallback( SSG_CALLBACK_PREDRAW, src->getCallback( SSG_CALLBACK_PREDRAW ) ); + setCallback( SSG_CALLBACK_POSTDRAW, src->getCallback( SSG_CALLBACK_POSTDRAW ) ); + setCallback( SSG_CALLBACK_PREAPPLY, src->getCallback( SSG_CALLBACK_PREAPPLY ) ); } |
From: M?rten Str?m. <str...@us...> - 2003-11-13 15:35:45
|
Update of /cvsroot/plib/plib/doc/sg In directory sc8-pr-cvs1:/tmp/cvs-serv7226/doc/sg Modified Files: index.html Log Message: sgSphere and sgBox have public members. Index: index.html =================================================================== RCS file: /cvsroot/plib/plib/doc/sg/index.html,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- index.html 24 Aug 2002 23:37:51 -0000 1.19 +++ index.html 13 Nov 2003 15:35:41 -0000 1.20 @@ -274,6 +274,10 @@ class sgSphere { +public: + sgVec3 center ; + SGfloat radius ; + SGfloat *getCenter (void) ; SGfloat getRadius (void) ; @@ -337,6 +341,9 @@ class sgBox { public: + sgVec3 min ; + sgVec3 max ; + SGfloat *getMin (void) ; SGfloat *getMax (void) ; |
From: M?rten Str?m. <str...@us...> - 2003-11-13 15:35:45
|
Update of /cvsroot/plib/plib/src/sg In directory sc8-pr-cvs1:/tmp/cvs-serv7226/src/sg Modified Files: sg.h Log Message: sgSphere and sgBox have public members. Index: sg.h =================================================================== RCS file: /cvsroot/plib/plib/src/sg/sg.h,v retrieving revision 1.52 retrieving revision 1.53 diff -u -d -r1.52 -r1.53 --- sg.h 12 Nov 2003 12:39:16 -0000 1.52 +++ sg.h 13 Nov 2003 15:35:41 -0000 1.53 @@ -915,10 +915,11 @@ class sgSphere { +public: sgVec3 center ; SGfloat radius ; -public: + sgSphere () { empty () ; } const SGfloat *getCenter (void) const { return center ; } @@ -966,10 +967,11 @@ class sgBox { +public: sgVec3 min ; sgVec3 max ; -public: + sgBox () { empty () ; } const SGfloat *getMin (void) const { return min ; } @@ -2248,10 +2250,10 @@ class sgdSphere { +public: sgdVec3 center ; SGDfloat radius ; -public: const SGDfloat *getCenter (void) const { return center ; } @@ -2298,10 +2300,10 @@ class sgdBox { +public: sgdVec3 min ; sgdVec3 max ; -public: const SGDfloat *getMin (void) const { return min ; } const SGDfloat *getMax (void) const { return max ; } |
From: James J. <pu...@us...> - 2003-11-12 19:02:07
|
Update of /cvsroot/plib/plib/src/pui In directory sc8-pr-cvs1:/tmp/cvs-serv11817 Modified Files: puInput.cxx puGroup.cxx Log Message: Patch from John Fay: * The patch to "puInput.cxx" takes care of a case in which the input is being passed an empty string. Without this patch, "new_len" gets decremented to -1 on line 48 and then on line 58 bad things could happen. * The patch to "puGroup.cxx" adds a new function to remove a group from the middle of the stack. Without it, when my application creates and destroys windows in random order bad things happen to the group stack. Index: puInput.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/pui/puInput.cxx,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- puInput.cxx 7 Feb 2003 16:04:24 -0000 1.32 +++ puInput.cxx 12 Nov 2003 19:02:02 -0000 1.33 @@ -34,24 +34,32 @@ int n = 0 ; int w ; - do + if ( new_len == 0 ) { - memcpy ( res, s + n, new_len + 1 ) ; - n++ ; - new_len -- ; - w = fnt.getStringWidth ( res ) + 2 * PUSTR_RGAP + PUSTR_LGAP ; - } while ( ( w >= width ) && ( n < cursor_position - 1 ) ) ; + *res = '\0' ; + if ( ncut != NULL ) *ncut = 0 ; + } + else + { + do + { + memcpy ( res, s + n, new_len + 1 ) ; + n++ ; + new_len -- ; + w = fnt.getStringWidth ( res ) + 2 * PUSTR_RGAP + PUSTR_LGAP ; + } while ( ( w >= width ) && ( n < cursor_position - 1 ) ) ; - if ( ncut != NULL ) *ncut = n - 1 ; + if ( ncut != NULL ) *ncut = n - 1 ; - n = 0 ; + n = 0 ; - while ( w >= width ) - { - res[new_len] = '\0' ; - n++ ; - new_len -- ; - w = fnt.getStringWidth ( res ) + 2 * PUSTR_RGAP + PUSTR_LGAP ; + while ( w >= width ) + { + res[new_len] = '\0' ; + n++ ; + new_len -- ; + w = fnt.getStringWidth ( res ) + 2 * PUSTR_RGAP + PUSTR_LGAP ; + } } return res ; Index: puGroup.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/pui/puGroup.cxx,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- puGroup.cxx 7 Feb 2003 17:01:03 -0000 1.25 +++ puGroup.cxx 12 Nov 2003 19:02:03 -0000 1.26 @@ -49,6 +49,28 @@ ulSetError ( UL_WARNING, "PUI: puGroup stack is empty!" ) ; } +void puRemoveGroup ( puGroup *gr ) +{ + int index = currGroup ; + while ( index >= 0 ) + { + if ( groupStack [ index ] == gr ) + { + int jndx ; + for ( jndx = index; jndx < currGroup - 1; jndx ++ ) + groupStack [ jndx ] = groupStack [ jndx + 1 ] ; + + currGroup -- ; + return ; + } + + index -- ; + } + + ulSetError ( UL_WARNING, "PUI: Trying to remove invalid puGroup from puGroup stack!" ) ; +} + + int puNoGroup ( void ) { return currGroup < 0 ; @@ -351,6 +373,8 @@ puGroup::~puGroup () { void puCleanUpJunk ( void ) ; + + puRemoveGroup ( this ) ; puObject *bo = getLastChild () ; |
From: M?rten Str?m. <str...@us...> - 2003-11-12 17:32:55
|
Update of /cvsroot/plib/plib/src/ssg In directory sc8-pr-cvs1:/tmp/cvs-serv22876 Modified Files: ssgLeaf.cxx Log Message: bugfix Index: ssgLeaf.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssgLeaf.cxx,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- ssgLeaf.cxx 4 Dec 2002 20:42:27 -0000 1.22 +++ ssgLeaf.cxx 12 Nov 2003 17:32:50 -0000 1.23 @@ -210,7 +210,7 @@ if ( ! _ssgLoadObject ( fd, (ssgBase **) &st, ssgTypeState () ) ) return FALSE ; - if ( st -> isAKindOf ( ssgTypeSimpleState () ) ) + if ( st != NULL && st -> isAKindOf ( ssgTypeSimpleState () ) ) { ssgSimpleState *ss = (ssgSimpleState *) st ; char *tfname = ss -> getTextureFilename () ; |
From: M?rten Str?m. <str...@us...> - 2003-11-12 12:39:40
|
Update of /cvsroot/plib/plib/src/sg In directory sc8-pr-cvs1:/tmp/cvs-serv28092 Modified Files: sg.cxx sg.h sgd.cxx Log Message: Patches by Brano Kemen + sgFrustum/sgBox intersection. Index: sg.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/sg/sg.cxx,v retrieving revision 1.39 retrieving revision 1.40 diff -u -d -r1.39 -r1.40 --- sg.cxx 7 Oct 2003 03:00:08 -0000 1.39 +++ sg.cxx 12 Nov 2003 12:39:16 -0000 1.40 @@ -667,32 +667,22 @@ * and (A,B,C,D) is the same plane expressed in eye coordinates. */ - sgVec4 pln[6] = { - { SG_ONE, SG_ZERO, SG_ZERO, SG_ONE }, // left - { -SG_ONE, SG_ZERO, SG_ZERO, SG_ONE }, // right - { SG_ZERO, SG_ONE, SG_ZERO, SG_ONE }, // bottom - { SG_ZERO, -SG_ONE, SG_ZERO, SG_ONE }, // top - { SG_ZERO, SG_ZERO, SG_ONE, SG_ONE }, // near - { SG_ZERO, SG_ZERO, -SG_ONE, SG_ONE }, // far - }; [...82 lines suppressed...] + { b->getMin()[0], b->getMin()[1], b->getMax()[2] }, + { b->getMax()[0], b->getMin()[1], b->getMax()[2] }, + { b->getMin()[0], b->getMax()[1], b->getMax()[2] }, + { b->getMax()[0], b->getMax()[1], b->getMax()[2] }, + } ; + + int all = -1 ; + int one = 0 ; + + for (int i = 0 ; i < 8 ; i++ ) + { + int tmp = ~ getOutcode ( p[i] ) ; + all &= tmp ; + one |= tmp ; + } + + return ( all ? SG_OUTSIDE : one ? SG_STRADDLE : SG_INSIDE ) ; } Index: sg.h =================================================================== RCS file: /cvsroot/plib/plib/src/sg/sg.h,v retrieving revision 1.51 retrieving revision 1.52 diff -u -d -r1.51 -r1.52 --- sg.h 7 Oct 2003 03:00:11 -0000 1.51 +++ sg.h 12 Nov 2003 12:39:16 -0000 1.52 @@ -917,6 +917,7 @@ { sgVec3 center ; SGfloat radius ; + public: sgSphere () { empty () ; } @@ -1026,12 +1027,13 @@ int intersects ( const sgVec4 plane ) const ; } ; [...326 lines suppressed...] +void sgdTriangleSolver_ASStoSAA ( SGDfloat angB, SGDfloat lenA, SGDfloat lenB, + int angA_is_obtuse, + SGDfloat *lenC, SGDfloat *angA, SGDfloat *angC ) ; /* SPRING-MASS-DAMPER (with simple Euler integrator) @@ -2736,9 +2853,10 @@ sgZeroVec3 ( force ) ; } - float *getPos () { return pos ; } - float *getVel () { return vel ; } - float *getForce () { return force ; } + const SGfloat *getPos () const { return pos ; } + const SGfloat *getVel () const { return vel ; } + const SGfloat *getForce () const { return force ; } + float getOneOverMass () { return ooMass ; } float getMass () { return 1.0f / ooMass ; } Index: sgd.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/sg/sgd.cxx,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- sgd.cxx 2 Sep 2002 06:05:46 -0000 1.11 +++ sgd.cxx 12 Nov 2003 12:39:16 -0000 1.12 @@ -24,6 +24,8 @@ #include "sg.h" +sgdVec3 _sgdGravity = { 0.0f, 0.0f, -9.8f } ; + void sgdVectorProductVec3 ( sgdVec3 dst, const sgdVec3 a, const sgdVec3 b ) { dst[0] = a[1] * b[2] - a[2] * b[1] ; @@ -83,6 +85,214 @@ } [...1213 lines suppressed...] + /* Use SAStoASA to get the last length */ + + sgdTriangleSolver_SAStoASA ( lenA, cc, lenB, NULL, lenC, NULL ) ; +} + + +void sgdTriangleSolver_SAAtoASS ( SGDfloat lenA, SGDfloat angB, SGDfloat angA, + SGDfloat *angC, SGDfloat *lenB, SGDfloat *lenC ) +{ + /* Find the missing angle */ + + SGDfloat cc = SGD_180 - (angB + angA) ; + + if ( angC ) *angC = cc ; + + sgdTriangleSolver_ASAtoSAS ( cc, lenA, angB, lenC, NULL, lenB ) ; +} + |
From: M?rten Str?m. <str...@us...> - 2003-11-11 22:54:52
|
Update of /cvsroot/plib/plib/src/net In directory sc8-pr-cvs1:/tmp/cvs-serv24486/src/net Modified Files: netMessage.h netSocket.cxx Log Message: BSD patches from Bert Driehuis Index: netMessage.h =================================================================== RCS file: /cvsroot/plib/plib/src/net/netMessage.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- netMessage.h 30 Nov 2002 00:41:49 -0000 1.9 +++ netMessage.h 11 Nov 2003 22:54:48 -0000 1.10 @@ -46,6 +46,10 @@ #include <netinet/in.h> // ntohs() etc prototypes #endif +#ifdef __FreeBSD__ +#include <arpa/inet.h> +#endif + class netGuid //Globally Unique IDentifier { Index: netSocket.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/net/netSocket.cxx,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- netSocket.cxx 30 Nov 2002 00:41:49 -0000 1.24 +++ netSocket.cxx 11 Nov 2003 22:54:48 -0000 1.25 @@ -31,6 +31,7 @@ #include <sys/types.h> #include <sys/socket.h> +#include <netinet/in.h> #include <arpa/inet.h> #include <time.h> #include <sys/time.h> /* Need both for Mandrake 8.0!! */ |
From: M?rten Str?m. <str...@us...> - 2003-11-11 22:54:52
|
Update of /cvsroot/plib/plib/src/js In directory sc8-pr-cvs1:/tmp/cvs-serv24486/src/js Modified Files: js.h jsBSD.cxx Log Message: BSD patches from Bert Driehuis Index: js.h =================================================================== RCS file: /cvsroot/plib/plib/src/js/js.h,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- js.h 4 Jan 2003 02:55:53 -0000 1.29 +++ js.h 11 Nov 2003 22:54:48 -0000 1.30 @@ -31,17 +31,12 @@ #include <string.h> // -dw- for memcpy #define _JS_MAX_AXES 16 +#define _JS_MAX_BUTTONS 32 #ifdef UL_MACINTOSH # include <InputSprocket.h> #endif -#ifdef UL_BSD -# include <machine/joystick.h> -# define JS_DATA_TYPE joystick -# define JS_RETURN (sizeof(struct JS_DATA_TYPE)) -#endif - #ifdef UL_MAC_OSX # include <mach/mach.h> # include <IOKit/IOkitLib.h> @@ -92,6 +87,8 @@ ISpElementReference isp_elem [ isp_num_needs ] ; ISpNeed isp_needs [ isp_num_needs ] ; +#elif defined(UL_BSD) + struct os_specific_s *os ; #elif defined(UL_MAC_OSX) IOHIDDeviceInterface ** hidDev; Index: jsBSD.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/js/jsBSD.cxx,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- jsBSD.cxx 29 Nov 2002 19:39:48 -0000 1.1 +++ jsBSD.cxx 11 Nov 2003 22:54:48 -0000 1.2 @@ -21,93 +21,395 @@ $Id$ */ +/* + * Inspired by the X-Mame USB HID joystick driver for NetBSD and + * FreeBSD by Krister Walfridsson <ca...@df...>. + * Incorporates the original analog joystick driver for BSD by + * Stephen Montgomery-Smith <st...@ma...>, with + * NetBSD mods courtesy of Rene Hexel. + * + * Bert Driehuis <dri...@pl...> [...497 lines suppressed...] + else + os->cache_buttons &= ~(1 << usage - 1) ; + } + } + } + } + if (len < 0 && errno != EAGAIN) + { + perror( os->fname ) ; + setError () ; + error = 1; } + if ( buttons != NULL ) *buttons = os->cache_buttons ; + if ( axes != NULL ) + memcpy ( axes, os->cache_axes, sizeof(float) * num_axes ) ; +#endif } #endif - |
From: M?rten Str?m. <str...@us...> - 2003-11-11 22:54:52
|
Update of /cvsroot/plib/plib In directory sc8-pr-cvs1:/tmp/cvs-serv24486 Added Files: README.JOYSTICKS.FREEBSD Log Message: BSD patches from Bert Driehuis --- NEW FILE: README.JOYSTICKS.FREEBSD --- FreeBSD joystick support ------------------------ FreeBSD supports two flavors of joysticks: analog and USB. By default, non-root users do not have access to these devices on FreeBSD, and the required devices may not even be created yet. Please browse the below notes before writing to the plib mailing list. Contents of this file: ----------- Analog joysticks USB joysticks Testing the joysticks Compiling and linking Analog joysticks ---------------- Plib uses the joy(4) interface to analog joysticks. You will need to make sure the device files exist: ls -l /dev/joy* If they do not yet exist, create them (logged in as root): cd /dev sh MAKEDEV joy By default, they will have permissions that do not allow unprivileged users access to them: crw-r----- 1 root operator 51, 0 Aug 30 16:59 joy0 crw-r----- 1 root operator 51, 1 Aug 30 16:59 joy1 You may wish to consider making the devices world read/writable: chmod a+rw /dev/joy* Users of xdm(1) or any of its more modern successors may wish to look into GiveConsole and TakeConsole or its equivalent. If you do not have a joystick driver compiled into you kernel, you can load one dynamically with the command kldload joy When in doubt, check the FreeBSD handbook about making sure this driver is loaded every time you reboot. USB joysticks ------------- Plib uses the usbhid(3) interface to USB joysticks. Joysticks will show up as generic USB Human Interface Devices (uhid). Because the USB design allows an almost unlimited number of USB buses and USB devices, you should make sure you have enough devices in /dev to deal with your devices. When in doubt, create a few extra to make sure. If you have insufficient USB or uhid devices, your joystick may not appear at all, or it may disappear if you connect your USB devices in a different order. Fortunately, device nodes are free. For example, you might see this: ls -al /dev/usb* /dev/uhid* crw-rw---- 1 root operator 108, 255 Apr 12 01:44 /dev/usb crw-rw---- 1 root operator 108, 0 Apr 12 01:44 /dev/usb0 crw-rw---- 1 root operator 122, 0 Apr 12 01:44 /dev/uhid0 This shows you have one usb interface (/dev/usb itself doesn't count), and one uhid device. Make a few extra with cd /dev sh MAKEDEV usb0 usb1 usb2 usb3 uhid0 uhid1 uhid2 uhid3 (you can leave out the devices that exist already). Next, you'll have to think about permissions. Both the /dev/usb0..3 (but not /dev/usb) have to be world readable, as well as the uhid devices. This command will take care of it: chmod a+r /dev/usb?* /dev/uhid* (yes, the "?*" after /dev/usb is intentional). Obviously, any permission change you make is at your own risk! XDM users may use the GiveConsole/TakeConsole mechanism as an alternative. Plib will complain if /dev/uhid* or /dev/usb* exist but are unreadable with your current privileges. Testing the joysticks --------------------- Users of FlightGear can quickly test their joysticks with the js_demo program. Compiling and linking --------------------- Compile plib on FreeBSD with the same compiler options as used for the other libraries you may use. In particular, if you use pthreads anywhere in your application, you should compile Plib with g++ -pthread Applications linking to recent Plib's -ljs should add -lusbhid to the link command line in the Makefile. |
From: M?rten Str?m. <str...@us...> - 2003-11-04 13:14:36
|
Update of /cvsroot/plib/plib/src/ssg In directory sc8-pr-cvs1:/tmp/cvs-serv27997 Modified Files: ssgLoadSGI.cxx Log Message: Bugfix by Olivier A. Index: ssgLoadSGI.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssgLoadSGI.cxx,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- ssgLoadSGI.cxx 2 Sep 2002 06:05:48 -0000 1.15 +++ ssgLoadSGI.cxx 4 Nov 2003 13:14:33 -0000 1.16 @@ -191,12 +191,13 @@ { unsigned char *tmpp = rle_temp ; unsigned char *bufp = buf ; + int length = leng [ z * ysize + y ]; - fread ( rle_temp, 1, leng [ z * ysize + y ], image_fd ) ; + fread ( rle_temp, 1, length, image_fd ) ; unsigned char pixel, count ; - while ( TRUE ) + while ( tmpp < rle_temp + length ) { pixel = *tmpp++ ; |
From: Wolfram K. <wol...@us...> - 2003-10-15 20:16:29
|
Update of /cvsroot/plib/plib/src/ssg In directory sc8-pr-cvs1:/tmp/cvs-serv2810 Modified Files: ssgOptimiser.cxx Log Message: Changed distance epsilon from a centimeter to a millimeter Index: ssgOptimiser.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssgOptimiser.cxx,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- ssgOptimiser.cxx 4 Dec 2002 20:42:28 -0000 1.31 +++ ssgOptimiser.cxx 15 Oct 2003 20:15:07 -0000 1.32 @@ -26,7 +26,7 @@ static float optimise_vtol [3] = { - 0.01f, /* DISTANCE_SLOP = One centimeter */ + 0.001f, /* DISTANCE_SLOP = One millimeter */ 0.04f, /* COLOUR_SLOP = Four percent */ 0.004f, /* TEXCOORD_SLOP = One texel on a 256 map */ } ; |
From: Steve B. <sj...@us...> - 2003-10-07 03:00:42
|
Update of /cvsroot/plib/plib/examples/src/fnt/data/old In directory sc8-pr-cvs1:/tmp/cvs-serv5321/plib/examples/src/fnt/data/old Modified Files: default.txf Added Files: ledfixed.txf Log Message: Angle calculation routines changed to return degree results. --- NEW FILE: ledfixed.txf --- (This appears to be a binary file; contents omitted.) Index: default.txf =================================================================== RCS file: /cvsroot/plib/plib/examples/src/fnt/data/old/default.txf,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 Binary files /tmp/cvszWYwg5 and /tmp/cvsOZGKi0 differ |