plib-cvs Mailing List for PLIB (Page 2)
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: Bram S. <br...@us...> - 2005-09-02 21:03:50
|
Update of /cvsroot/plib/plib/src/pw In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21618 Modified Files: pwWindows.cxx Log Message: Fixes window sizes on win32, by Jan Reucker Index: pwWindows.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/pw/pwWindows.cxx,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- pwWindows.cxx 1 Feb 2005 01:14:13 -0000 1.14 +++ pwWindows.cxx 2 Sep 2005 21:03:43 -0000 1.15 @@ -40,6 +40,7 @@ static int size [2] = { 640, 480 } ; static bool autoRepeat = false ; +static DWORD style = 0 ; static pwResizeCB *resizeCB = NULL ; static pwExitCB *exitCB = NULL ; @@ -69,6 +70,17 @@ if( ( GetKeyState ( VK_MENU ) & 0x8000 ) != 0 ) modifiers |= PW_ALT ; } [...62 lines suppressed...] "PlibAppClass", title, style, @@ -423,9 +433,9 @@ SetCursor( LoadCursor ( NULL, cursor ) ) ; } - void pwSetSize ( int w, int h ) { + clientSizeToWindowSize ( w, h, style ) ; SetWindowPos ( currWnd, HWND_TOP, 0, 0, w, h, SWP_NOMOVE ) ; } @@ -438,6 +448,7 @@ void pwSetSizeOrigin ( int x, int y, int w, int h ) { + clientSizeToWindowSize ( w, h, style ) ; SetWindowPos ( currWnd, HWND_TOP, x, y, w, h, 0 ) ; } |
From: Bram S. <br...@us...> - 2005-08-28 06:25:23
|
Update of /cvsroot/plib/plib/src/pui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14986 Modified Files: pu.h Log Message: Classes with virt funcs need virt destructor Index: pu.h =================================================================== RCS file: /cvsroot/plib/plib/src/pui/pu.h,v retrieving revision 1.150 retrieving revision 1.151 diff -u -d -r1.150 -r1.151 --- pu.h 6 May 2005 18:46:28 -0000 1.150 +++ pu.h 28 Aug 2005 06:25:15 -0000 1.151 @@ -1131,6 +1131,10 @@ puRange_init ( minval, maxval, step ) ; } + virtual ~puRange() + { + } + float getMaxValue ( void ) const { return maximum_value ; } virtual void setMaxValue ( float f ) { maximum_value = f ; } |
From: Bram S. <br...@us...> - 2005-08-27 21:07:19
|
Update of /cvsroot/plib/plib/examples/src/ssg/water In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20455 Modified Files: Makefile.am water.cxx water.dsp Log Message: improved water example, by Jan Reucker Index: Makefile.am =================================================================== RCS file: /cvsroot/plib/plib/examples/src/ssg/water/Makefile.am,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Makefile.am 1 Sep 2002 05:22:26 -0000 1.4 +++ Makefile.am 27 Aug 2005 21:07:11 -0000 1.5 @@ -4,7 +4,7 @@ water_SOURCES = water.cxx -water_LDADD = -lplibpu -lplibfnt -lplibssgaux -lplibssg -lplibsg -lplibul $(GLUT_LIBS) $(OGL_LIBS) +water_LDADD = -lplibpw -lplibpu -lplibfnt -lplibssgaux -lplibssg -lplibsg -lplibul $(OGL_LIBS) endif Index: water.cxx =================================================================== RCS file: /cvsroot/plib/plib/examples/src/ssg/water/water.cxx,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- water.cxx 29 Dec 2004 07:19:40 -0000 1.26 +++ water.cxx 27 Aug 2005 21:07:11 -0000 1.27 @@ -21,6 +21,11 @@ $Id$ */ +#define PU_USE_PW + +#ifndef GL_GLEXT_PROTOTYPES +#define GL_GLEXT_PROTOTYPES +#endif #include <stdio.h> #include <stdlib.h> [...250 lines suppressed...] trainDisableButton->setCallback ( trainDisableButton_cb ) ; @@ -986,7 +971,7 @@ timeText = new puText ( 500, VIEW_GUI_BASE+80 ) ; timeText->setColour( PUCOL_LABEL, FONT_COLOUR ) ; - + window_group->close () ; } @@ -999,7 +984,7 @@ init_graphics () ; load_database () ; init_gui () ; - glutMainLoop () ; + main_loop () ; return 0 ; } Index: water.dsp =================================================================== RCS file: /cvsroot/plib/plib/examples/src/ssg/water/water.dsp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- water.dsp 25 Mar 2004 18:26:07 -0000 1.4 +++ water.dsp 27 Aug 2005 21:07:11 -0000 1.5 @@ -23,6 +23,8 @@ # Begin Project # PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" CPP=cl.exe RSC=rc.exe @@ -48,7 +50,7 @@ # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib pui.lib fnt.lib ssgAux.lib ssg.lib sg.lib ul.lib winmm.lib opengl32.lib glu32.lib glut32.lib /nologo /subsystem:console /machine:I386 /out:"water.exe" /libpath:"..\..\..\..\..\plib" +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib pw.lib pui.lib fnt.lib ssgAux.lib ssg.lib sg.lib ul.lib winmm.lib opengl32.lib glu32.lib /nologo /subsystem:console /machine:I386 /out:"water.exe" /libpath:"..\..\..\..\..\plib" !ELSEIF "$(CFG)" == "water - Win32 Debug" @@ -72,7 +74,7 @@ # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib pui_d.lib fnt_d.lib ssgAux_d.lib ssg_d.lib sg_d.lib ul_d.lib winmm.lib opengl32.lib glu32.lib glut32.lib /nologo /subsystem:console /debug /machine:I386 /out:"water.exe" /pdbtype:sept /libpath:"..\..\..\..\..\plib" +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib pw_d.lib pui_d.lib fnt_d.lib ssgAux_d.lib ssg_d.lib sg_d.lib ul_d.lib winmm.lib opengl32.lib glu32.lib /nologo /subsystem:console /debug /machine:I386 /out:"water.exe" /pdbtype:sept /libpath:"..\..\..\..\..\plib" !ENDIF |
From: Bram S. <br...@us...> - 2005-08-22 15:39:07
|
Update of /cvsroot/plib/plib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9513 Modified Files: configure.in Log Message: Fixed socklen_t test for irix Index: configure.in =================================================================== RCS file: /cvsroot/plib/plib/configure.in,v retrieving revision 1.61 retrieving revision 1.62 diff -u -d -r1.61 -r1.62 --- configure.in 24 Jun 2004 16:30:52 -0000 1.61 +++ configure.in 22 Aug 2005 15:38:57 -0000 1.62 @@ -373,7 +373,7 @@ AC_TRY_COMPILE([ #include <sys/types.h> #include <sys/socket.h> -int accept (int, struct sockaddr *, socklen_t *); +socklen_t apa; ],[],[ AC_MSG_RESULT(yes)],[ AC_TRY_COMPILE([ |
From: Bram S. <br...@us...> - 2005-08-21 08:47:26
|
Update of /cvsroot/plib/plib/examples/src/ssg/viewer In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11850 Modified Files: Makefile.am Added Files: pview.cxx Log Message: added improved viewer example --- NEW FILE: pview.cxx --- /* PLIB - A Suite of Portable Game Libraries Copyright (C) 2001 Steve Baker This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program 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 General Public License for more details. You should have received a copy of the GNU General Public License along with this program; 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 [...146 lines suppressed...] context->makeCurrent(); sgVec3 off; sgZeroVec3(off); sgSubVec3(off, scene->getBSphere()->getCenter()); trf->setTransform(off); SGfloat radius = scene->getBSphere()->getRadius(); float d = 1.8*radius; if (d<0.5) d=0.5; // avoid placing near-plane beyond model sgMakeTransMat4(camtrf, 0, -d, 0); ssgLight *light=ssgGetLight(0); light->setColour(GL_AMBIENT,0,0,0); light->setPosition(0,0,radius); light->on(); glutMainLoop(); } Index: Makefile.am =================================================================== RCS file: /cvsroot/plib/plib/examples/src/ssg/viewer/Makefile.am,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- Makefile.am 1 Sep 2002 05:22:26 -0000 1.7 +++ Makefile.am 21 Aug 2005 08:47:14 -0000 1.8 @@ -1,12 +1,16 @@ if BUILD_SSG -noinst_PROGRAMS = viewer +noinst_PROGRAMS = viewer pview viewer_SOURCES = viewer.cxx +pview_SOURCES = pview.cxx + viewer_LDADD = -lplibssg -lplibpu -lplibfnt -lplibsg -lplibul $(GLUT_LIBS) \ $(OGL_LIBS) +pview_LDADD = -lplibssg -lplibpu -lplibfnt -lplibsg -lplibul $(GLUT_LIBS) $(OGL_LIBS) + endif EXTRA_DIST = viewer.dsp |
From: Bram S. <br...@us...> - 2005-08-21 08:04:15
|
Update of /cvsroot/plib/plib/examples/src/ssg/viewer In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4055 Modified Files: viewer.cxx Log Message: avoid placing nearplane beyond object Index: viewer.cxx =================================================================== RCS file: /cvsroot/plib/plib/examples/src/ssg/viewer/viewer.cxx,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- viewer.cxx 26 Feb 2005 15:22:33 -0000 1.26 +++ viewer.cxx 21 Aug 2005 08:04:06 -0000 1.27 @@ -145,7 +145,7 @@ static GLfloat Ez = 0.0f; #define FOVY 45.0f -#define NEAR 2.0f +#define NEAR 0.1f #define FAR 10000.0f static int getWindowHeight () { return glutGet ( (GLenum) GLUT_WINDOW_HEIGHT ) ; } @@ -672,6 +672,8 @@ SGfloat radius = scene->getBSphere()->getRadius(); EyeDist = float( radius * 1.5f / tan( float( FOVY/2 * SG_DEGREES_TO_RADIANS ) ) ); + if (EyeDist < NEAR*2) + EyeDist = NEAR*2; sgSphere sp = *( scene -> getBSphere() ) ; if ( sp.isEmpty() ) |
From: John F. F. <fa...@us...> - 2005-07-19 13:22:09
|
Update of /cvsroot/plib/plib/src/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3444 Modified Files: ul.h Log Message: Setting the initial \"delta\" in \"ulClock\" to a very small value. There should be no practical effect. Index: ul.h =================================================================== RCS file: /cvsroot/plib/plib/src/util/ul.h,v retrieving revision 1.70 retrieving revision 1.71 diff -u -d -r1.70 -r1.71 --- ul.h 14 Jul 2005 17:08:28 -0000 1.70 +++ ul.h 19 Jul 2005 13:21:58 -0000 1.71 @@ -226,7 +226,7 @@ start = getRawTime () ; now = 0.0 ; max_delta = 0.2 ; - delta = 1.0 / 30.0 ; /* Faked so stoopid programs won't div0 */ + delta = 0.0000001 ; /* Faked so stoopid programs won't div0 */ last_time = 0.0 ; } |
From: John F. F. <fa...@us...> - 2005-07-16 17:28:05
|
Update of /cvsroot/plib/plib/src/js In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv477 Modified Files: jsLinuxOld.cxx Log Message: Fixing a Linux joystick versioning bug that caused two files to be included if the version was greater than 0x010000 Index: jsLinuxOld.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/js/jsLinuxOld.cxx,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- jsLinuxOld.cxx 20 Oct 2004 23:49:33 -0000 1.4 +++ jsLinuxOld.cxx 16 Jul 2005 17:27:51 -0000 1.5 @@ -27,7 +27,7 @@ #include <linux/joystick.h> -#if !defined(JS_VERSION) || JS_VERSION >= 0x010000 +#if !defined(JS_VERSION) || JS_VERSION < 0x010000 #include <fcntl.h> #include <sys/ioctl.h> |
From: John F. F. <fa...@us...> - 2005-07-14 17:08:42
|
Update of /cvsroot/plib/plib/src/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21184 Modified Files: ul.h Log Message: Fixing clock bug in which \"delta\" was given the wrong value in the first update call Index: ul.h =================================================================== RCS file: /cvsroot/plib/plib/src/util/ul.h,v retrieving revision 1.69 retrieving revision 1.70 diff -u -d -r1.69 -r1.70 --- ul.h 24 Jun 2004 16:30:55 -0000 1.69 +++ ul.h 14 Jul 2005 17:08:28 -0000 1.70 @@ -224,10 +224,10 @@ initPerformanceTimer () ; #endif start = getRawTime () ; - now = start ; + now = 0.0 ; max_delta = 0.2 ; delta = 1.0 / 30.0 ; /* Faked so stoopid programs won't div0 */ - last_time = now - delta ; + last_time = 0.0 ; } void setMaxDelta ( double maxDelta ) { max_delta = maxDelta ; } |
From: John F. F. <fa...@us...> - 2005-07-14 16:43:06
|
Update of /cvsroot/plib/plib/src/pui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15188 Modified Files: puListBox.cxx Log Message: Making the color changeable by the application Index: puListBox.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/pui/puListBox.cxx,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- puListBox.cxx 6 May 2005 18:31:25 -0000 1.24 +++ puListBox.cxx 14 Jul 2005 16:42:57 -0000 1.25 @@ -114,9 +114,15 @@ for ( int i = top ; i < num && i < top + num_vis ; i++ ) { if ( i == selected ) - glColor4f ( 1.0f, 1.0f, 1.0f, 1.0f ) ; + glColor4f ( (colour [ PUCOL_BACKGROUND ][0] + colour [ PUCOL_LABEL ][0]) / 2.0f, + (colour [ PUCOL_BACKGROUND ][1] + colour [ PUCOL_LABEL ][1]) / 2.0f, + (colour [ PUCOL_BACKGROUND ][2] + colour [ PUCOL_LABEL ][2]) / 2.0f, + (colour [ PUCOL_BACKGROUND ][3] + colour [ PUCOL_LABEL ][3]) / 2.0f ); else - glColor4f ( 0.0f, 0.0f, 0.0f, 1.0f ) ; + glColor4f ( colour [ PUCOL_LABEL ][0], + colour [ PUCOL_LABEL ][1], + colour [ PUCOL_LABEL ][2], + colour [ PUCOL_LABEL ][3] ) ; int x = PUSTR_LGAP ; int y = yinc * ((i-top)+1) ; |
From: John F. F. <fa...@us...> - 2005-07-14 16:38:04
|
Update of /cvsroot/plib/plib/src/fnt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14159 Modified Files: fntBitmap.cxx Log Message: Increasing the width of the Helvetica 12-point \"j\" and \"f\" by one pixel Index: fntBitmap.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/fnt/fntBitmap.cxx,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- fntBitmap.cxx 5 Jul 2005 15:44:40 -0000 1.3 +++ fntBitmap.cxx 14 Jul 2005 16:37:55 -0000 1.4 @@ -545,11 +545,11 @@ static const GLubyte Helvetica12_Character_099[] = { 7, 0, 0, 0,112,136,128,128,128,136,112, 0, 0, 0, 0, 0}; /* "c" */ static const GLubyte Helvetica12_Character_100[] = { 7, 0, 0, 0,104,152,136,136,136,152,104, 8, 8, 0, 0, 0}; /* "d" */ static const GLubyte Helvetica12_Character_101[] = { 7, 0, 0, 0,112,136,128,248,136,136,112, 0, 0, 0, 0, 0}; /* "e" */ -static const GLubyte Helvetica12_Character_102[] = { 3, 0, 0, 0, 64, 64, 64, 64, 64, 64,224, 64, 48, 0, 0, 0}; /* "f" */ +static const GLubyte Helvetica12_Character_102[] = { 4, 0, 0, 0, 64, 64, 64, 64, 64, 64,224, 64, 48, 0, 0, 0}; /* "f" */ static const GLubyte Helvetica12_Character_103[] = { 7,112,136, 8,104,152,136,136,136,152,104, 0, 0, 0, 0, 0}; /* "g" */ static const GLubyte Helvetica12_Character_104[] = { 7, 0, 0, 0,136,136,136,136,136,200,176,128,128, 0, 0, 0}; /* "h" */ static const GLubyte Helvetica12_Character_105[] = { 3, 0, 0, 0,128,128,128,128,128,128,128, 0,128, 0, 0, 0}; /* "i" */ -static const GLubyte Helvetica12_Character_106[] = { 3,128, 64, 64, 64, 64, 64, 64, 64, 64, 64, 0, 64, 0, 0, 0}; /* "j" */ +static const GLubyte Helvetica12_Character_106[] = { 4,128, 64, 64, 64, 64, 64, 64, 64, 64, 64, 0, 64, 0, 0, 0}; /* "j" */ static const GLubyte Helvetica12_Character_107[] = { 6, 0, 0, 0,136,144,160,192,192,160,144,128,128, 0, 0, 0}; /* "k" */ static const GLubyte Helvetica12_Character_108[] = { 3, 0, 0, 0,128,128,128,128,128,128,128,128,128, 0, 0, 0}; /* "l" */ static const GLubyte Helvetica12_Character_109[] = { 9, 0, 0, 0, 0, 0, 0,146, 0,146, 0,146, 0,146, 0,146, 0,218, 0,164, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; /* "m" */ |
From: John F. F. <fa...@us...> - 2005-07-14 16:18:25
|
Update of /cvsroot/plib/plib/src/pui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8493 Modified Files: puLargeInput.cxx Log Message: Fixing a negative-array-index bug. This widget is deprecated in favor of the \"puAux\" equivalent, so I shouldn\'t be doing this, but I am a sucker. Index: puLargeInput.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/pui/puLargeInput.cxx,v retrieving revision 1.49 retrieving revision 1.50 diff -u -d -r1.49 -r1.50 --- puLargeInput.cxx 6 May 2005 18:31:12 -0000 1.49 +++ puLargeInput.cxx 14 Jul 2005 16:18:14 -0000 1.50 @@ -789,7 +789,7 @@ int length, prev_length = 0 ; while ( x <= (length = legendFont.getStringWidth ( start_of_line ) + abox.min[0] + beg_pos) && - i >= 0 ) + i > 0 ) { prev_length = length ; tmpval[--i] = '\0' ; |
From: John F. F. <fa...@us...> - 2005-07-14 16:12:24
|
Update of /cvsroot/plib/plib/src/puAux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6716 Modified Files: puAuxLargeInput.cxx Log Message: Fixing a negative-array-index bug Index: puAuxLargeInput.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/puAux/puAuxLargeInput.cxx,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- puAuxLargeInput.cxx 23 May 2005 16:43:11 -0000 1.6 +++ puAuxLargeInput.cxx 14 Jul 2005 16:12:05 -0000 1.7 @@ -793,7 +793,7 @@ int length, prev_length = 0 ; while ( x <= (length = legendFont.getStringWidth ( start_of_line ) + abox.min[0] + beg_pos) && - i >= 0 ) + i > 0 ) { prev_length = length ; tmpval[--i] = '\0' ; |
From: Bram S. <br...@us...> - 2005-07-05 15:44:53
|
Update of /cvsroot/plib/plib/src/fnt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21605 Modified Files: fntBitmap.cxx Log Message: Completed support for negative coords Index: fntBitmap.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/fnt/fntBitmap.cxx,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- fntBitmap.cxx 4 Jul 2005 14:58:54 -0000 1.2 +++ fntBitmap.cxx 5 Jul 2005 15:44:40 -0000 1.3 @@ -71,7 +71,8 @@ if (c == '\n') { curpos[1] -= height; } else { - glRasterPos3fv(curpos); + glRasterPos2i(0,0); // beware - coordinate may be negative + glBitmap(0, 0, 0, 0, curpos[0], curpos[1], NULL); int i = (GLubyte) c - first; if (i >= 0 && i < count) { glBitmap(data[i][0], height, xorig, yorig, (float) data[i][0], 0, data[i] + 1); @@ -90,7 +91,8 @@ if (s[i] == '\n') { curpos[0] = x0; curpos[1] -= height; - glRasterPos3fv(curpos); + glRasterPos2i(0,0); // beware - coordinate may be negative + glBitmap(0, 0, 0, 0, curpos[0], curpos[1], NULL); } else { int j = (GLubyte) s[i] - first; if (j >= 0 && j < count) { |
From: Bram S. <br...@us...> - 2005-07-05 15:43:33
|
Update of /cvsroot/plib/plib/examples/src/fnt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21001 Modified Files: fnt_test.cxx Log Message: Added tricky case to font test Index: fnt_test.cxx =================================================================== RCS file: /cvsroot/plib/plib/examples/src/fnt/fnt_test.cxx,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- fnt_test.cxx 7 Oct 2003 03:00:07 -0000 1.9 +++ fnt_test.cxx 5 Jul 2005 15:43:18 -0000 1.10 @@ -214,6 +214,13 @@ text -> puts ( "0123456789!@#$%^&*()+-={}[]:\"'<>?,./`~_" ) ; text -> end () ; + text -> setPointSize ( 9.0f ) ; + text -> begin () ; + glColor3f ( 0, 0, 0 ) ; + text -> start2f ( -50.0f, 265.0f ) ; + text -> puts ( "This is a very long line, in fact, this line is so long, that it starts left of viewport. We are curious to see wether this line is still visible in plib." ) ; + text -> end () ; + glDisable ( GL_TEXTURE_2D ) ; glBegin ( GL_LINE_LOOP ) ; glColor3f ( 1.0f, 0.0f, 1.0f ) ; |
From: Bram S. <br...@us...> - 2005-07-04 14:59:05
|
Update of /cvsroot/plib/plib/src/fnt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26046 Modified Files: fntBitmap.cxx Log Message: Fixed text with negative coordinates according to patch Franz Melchior. Index: fntBitmap.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/fnt/fntBitmap.cxx,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- fntBitmap.cxx 15 Feb 2004 19:51:23 -0000 1.1 +++ fntBitmap.cxx 4 Jul 2005 14:58:54 -0000 1.2 @@ -84,7 +84,8 @@ void fntBitmapFont::puts ( sgVec3 curpos, float pointsize, float italic, const char *s ) { float x0 = curpos[0]; - glRasterPos3fv(curpos); + glRasterPos2i(0,0); // beware - coordinate may be negative + glBitmap(0, 0, 0, 0, curpos[0], curpos[1], NULL); for (int i = 0; s[i] != '\0'; i++) { if (s[i] == '\n') { curpos[0] = x0; |
From: Neateye <nit...@ao...> - 2005-06-09 01:32:21
|
Call out Gouranga be happy!!! Gouranga Gouranga Gouranga .... That which brings the highest happiness!! |
From: John F. F. <fa...@us...> - 2005-05-23 21:24:38
|
Update of /cvsroot/plib/plib/src/pui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26389 Modified Files: pu.cxx Log Message: Deactivating the active widget before activating the next widget Index: pu.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/pui/pu.cxx,v retrieving revision 1.68 retrieving revision 1.69 diff -u -d -r1.68 -r1.69 --- pu.cxx 6 May 2005 18:46:28 -0000 1.68 +++ pu.cxx 23 May 2005 21:24:26 -0000 1.69 @@ -362,14 +362,10 @@ pu_mouse_x = x ; pu_mouse_y = h - y ; - int return_value = puGetBaseLiveInterface () -> checkHit ( button, - updown, pu_mouse_x, pu_mouse_y ) ; - - puCleanUpJunk () ; puObject *active = puActiveWidget () ; - if ( ( last_buttons == 0 ) && ( active != NULL ) ) + if ( ( last_buttons != 0 ) && ( active != NULL ) ) { int x_offset, y_offset ; active -> getAbsolutePosition ( &x_offset, &y_offset ) ; @@ -385,6 +381,11 @@ } } + int return_value = puGetBaseLiveInterface () -> checkHit ( button, + updown, pu_mouse_x, pu_mouse_y ) ; + + puCleanUpJunk () ; + return return_value ; } |
From: John F. F. <fa...@us...> - 2005-05-23 16:43:36
|
Update of /cvsroot/plib/plib/src/puAux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26836 Modified Files: puAuxLargeInput.cxx Log Message: Fixing a bug in which the selection start position could go off the end of the text string Index: puAuxLargeInput.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/puAux/puAuxLargeInput.cxx,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- puAuxLargeInput.cxx 6 May 2005 18:54:08 -0000 1.5 +++ puAuxLargeInput.cxx 23 May 2005 16:43:11 -0000 1.6 @@ -183,7 +183,8 @@ if ( select_start_position < 0 ) select_start_position = 0 ; - if ( *(temp_text + select_start_position + 1) != '\n' ) + if ( ( *(temp_text + select_start_position + 1) != '\n' ) && + ( *(temp_text + select_start_position) != '\0' ) ) select_start_position ++ ; while ( ( select_start_position > 0 ) && ( *(temp_text + select_start_position) != '\n' ) ) |
From: John F. F. <fa...@us...> - 2005-05-06 19:13:52
|
Update of /cvsroot/plib/plib/src/puAux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4315 Modified Files: puAux.dsp Log Message: Updating the MSVC project file to include the new \"puaList.cxx\" source code file Index: puAux.dsp =================================================================== RCS file: /cvsroot/plib/plib/src/puAux/puAux.dsp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- puAux.dsp 25 Mar 2004 18:27:12 -0000 1.4 +++ puAux.dsp 6 May 2005 19:13:14 -0000 1.5 @@ -23,6 +23,8 @@ # Begin Project # PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" CPP=cl.exe RSC=rc.exe @@ -52,7 +54,7 @@ # Begin Special Build Tool SOURCE="$(InputPath)" PostBuild_Desc=Copy Library to plib directory -PostBuild_Cmds=copy release\*.lib ..\..\*.* copy puAux.h ..\..\puAux.h +PostBuild_Cmds=copy release\*.lib ..\..\*.* copy puAux.h ..\..\puAux.h # End Special Build Tool !ELSEIF "$(CFG)" == "puAux - Win32 Debug" @@ -81,7 +83,7 @@ # Begin Special Build Tool SOURCE="$(InputPath)" PostBuild_Desc=Copy Library to plib directory -PostBuild_Cmds=copy debug\*.lib ..\..\*.* copy puAux.h ..\..\puAux.h +PostBuild_Cmds=copy debug\*.lib ..\..\*.* copy puAux.h ..\..\puAux.h # End Special Build Tool !ENDIF @@ -124,6 +126,10 @@ # End Source File # Begin Source File +SOURCE=.\puAuxList.cxx +# End Source File +# Begin Source File + SOURCE=.\puAuxLocal.h # End Source File # Begin Source File |
From: John F. F. <fa...@us...> - 2005-05-06 19:10:22
|
Update of /cvsroot/plib/plib/src/puAux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3684 Modified Files: puAuxBiSliderWithEnds.cxx Log Message: Adding two-pixel gaps between the slider and ends of the puaBiSliderWithEnds, the better to see the numbers Index: puAuxBiSliderWithEnds.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/puAux/puAuxBiSliderWithEnds.cxx,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- puAuxBiSliderWithEnds.cxx 21 Mar 2004 19:03:23 -0000 1.2 +++ puAuxBiSliderWithEnds.cxx 6 May 2005 19:10:13 -0000 1.3 @@ -31,7 +31,6 @@ puaBiSliderWithEnds *bisl = (puaBiSliderWithEnds *)obj->getUserData () ; bisl->__setMax ( ((puBiSlider *)obj)->getCurrentMax () ) ; bisl->__setMin ( ((puBiSlider *)obj)->getCurrentMin () ) ; - bisl->invokeCallback () ; } @@ -53,7 +52,7 @@ puGroup ( minx, miny ) { type |= PUCLASS_BISLIDERWITHENDS ; - slider = new puaBiSlider ( (maxx - minx)/2-10, 20, maxy-miny-40, TRUE ) ; + slider = new puaBiSlider ( (maxx - minx)/2-10, 22, maxy-miny-44, TRUE ) ; min_box = new puInput ( 0, 0, maxx-minx, 20 ) ; max_box = new puInput ( 0, maxy-miny-20, maxx-minx, maxy-miny ) ; min_box->setValue ( 0 ) ; @@ -70,8 +69,8 @@ void puaBiSliderWithEnds::setSize ( int w, int h ) { - slider->setSize ( 20, h-40 ) ; - slider->setPosition ( w/2-10, 20 ) ; + slider->setSize ( 20, h-44 ) ; + slider->setPosition ( w/2-10, 22 ) ; min_box->setSize ( w, 20 ) ; |
From: John F. F. <fa...@us...> - 2005-05-06 19:04:45
|
Update of /cvsroot/plib/plib/src/puAux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2489 Modified Files: puAux.h puAuxComboBox.cxx Log Message: Extensive changes to the \"puaComboBox\" widget to get it to work properly ... let me know if it doesn\'t do what you think it should. Index: puAux.h =================================================================== RCS file: /cvsroot/plib/plib/src/puAux/puAux.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- puAux.h 6 May 2005 19:00:35 -0000 1.6 +++ puAux.h 6 May 2005 19:04:32 -0000 1.7 @@ -140,20 +140,20 @@ UL_TYPE_DATA protected: - int num_lines ; // Number of lines of text in the box - int lines_in_window ; // Number of lines showing in the window - int top_line_in_window ; // Number of the first line in the window - float max_width ; // Width of longest line of text in box, in pixels + int num_lines ; // Number of lines of text in the box + int lines_in_window ; // Number of lines showing in the window + int top_line_in_window ; // Number of the first line in the window + float max_width ; // Width of longest line of text in box, in pixels [...78 lines suppressed...] + delete [] list ; + } } ; @@ -836,6 +861,7 @@ static void menuCleanup ( puObject * ) ; } ; + /** * A scrolling list for PUI. * @@ -866,6 +892,5 @@ virtual int getListIntegerValue(); }; - #endif Index: puAuxComboBox.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/puAux/puAuxComboBox.cxx,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- puAuxComboBox.cxx 22 Sep 2004 21:09:35 -0000 1.4 +++ puAuxComboBox.cxx 6 May 2005 19:04:32 -0000 1.5 @@ -27,10 +27,33 @@ UL_RTTI_DEF1(puaComboBox,puGroup) +void puaComboBox::input_cb ( puObject *inp ) +{ + puaComboBox *cbox = (puaComboBox *) inp -> getUserData () ; + + if ( strcmp ( inp->getStringValue (), cbox->getStringValue () ) ) + { + cbox->update_current_item () ; + cbox->setCallbackSource ( PUACOMBOBOX_CALLBACK_INPUT ) ; [...175 lines suppressed...] /* Share 'string' value with input box */ input -> getValue ( &stringval ) ; - setValuator ( stringval ) ; +// setValuator ( stringval ) ; arrow_btn = new puArrowButton ( maxx-minx - arrow_width, 0, maxx-minx, maxy-miny, @@ -266,7 +341,12 @@ close () ; + list = NULL ; + curr_item = 0 ; + num_items = 0 ; + callback_source = PUACOMBOBOX_CALLBACK_NONE ; newList ( entries ) ; + update_widgets () ; } void puaComboBox::setSize ( int w, int h ) |
From: John F. F. <fa...@us...> - 2005-05-06 19:00:43
|
Update of /cvsroot/plib/plib/src/puAux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1453 Modified Files: puAux.h Log Message: Adding a new list box widget to the puAux library Index: puAux.h =================================================================== RCS file: /cvsroot/plib/plib/src/puAux/puAux.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- puAux.h 6 May 2005 18:54:08 -0000 1.5 +++ puAux.h 6 May 2005 19:00:35 -0000 1.6 @@ -42,6 +42,7 @@ #define PUCLASS_SLIDERWITHINPUT 0x04000000 #define PUCLASS_COMPASS 0x08000000 #define PUCLASS_CHOOSER 0x10000000 +#define PUCLASS_LIST 0x20000000 // Widget Declarations @@ -58,6 +59,7 @@ class puaCompass ; class puaSliderWithInput ; class puaChooser ; +class puaList ; // A File selector widget @@ -834,6 +836,36 @@ static void menuCleanup ( puObject * ) ; } ; +/** + * A scrolling list for PUI. + * + * Believe it or not, PUI does not have one of these. + */ +class puaList : public puGroup +{ + UL_TYPE_DATA + + char ** _contents; + puFrame * _frame; + puListBox * _list_box; + puSlider * _slider; + puArrowButton * _up_arrow; + puArrowButton * _down_arrow; + +protected: + virtual void init (int w, int h); + +public: + puaList (int x, int y, int w, int h); + puaList (int x, int y, int w, int h, char ** contents); + virtual ~puaList (); + + virtual void newList (char ** contents); + // TODO: other string value funcs + virtual char * getListStringValue (); + virtual int getListIntegerValue(); +}; + #endif |
From: John F. F. <fa...@us...> - 2005-05-06 18:54:21
|
Update of /cvsroot/plib/plib/src/puAux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32321 Modified Files: puAux.h puAuxLargeInput.cxx Log Message: Removing deprecated subwidget from puaLargeInput; also adding a bug fix to selecting the entire line Index: puAux.h =================================================================== RCS file: /cvsroot/plib/plib/src/puAux/puAux.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- puAux.h 6 May 2005 18:39:17 -0000 1.4 +++ puAux.h 6 May 2005 18:54:08 -0000 1.5 @@ -147,7 +147,7 @@ puFrame *frame ; puSlider *bottom_slider ; // Horizontal slider at bottom of window - puScrollBar *right_slider ; // Vertical slider at right of window + puaScrollBar *right_slider ; // Vertical slider at right of window char *wrapped_text ; // Pointer to word-wrapped text in the box Index: puAuxLargeInput.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/puAux/puAuxLargeInput.cxx,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- puAuxLargeInput.cxx 6 May 2005 18:39:18 -0000 1.4 +++ puAuxLargeInput.cxx 6 May 2005 18:54:08 -0000 1.5 @@ -31,7 +31,7 @@ static void puaLargeInputHandleRightSlider ( puObject *slider ) { - float val = ((puScrollBar *)slider)->getMaxValue () - slider->getFloatValue () ; + float val = ((puaScrollBar *)slider)->getMaxValue () - slider->getFloatValue () ; puaLargeInput* text = (puaLargeInput*) slider->getUserData () ; //int lines_in_window = text->getLinesInWindow () ; @@ -97,8 +97,8 @@ // bottom_slider->setCBMode( PUSLIDER_DELTA ); } - right_slider = new puScrollBar ( w - slider_width, (bottom_slider?slider_width:0), - h - (bottom_slider?slider_width:0), arrows, TRUE, slider_width ) , + right_slider = new puaScrollBar ( w - slider_width, (bottom_slider?slider_width:0), + h - (bottom_slider?slider_width:0), arrows, TRUE, slider_width ) , right_slider->setValue ( 1.0f ) ; // All the way to the top // right_slider->setDelta(0.1f); right_slider->setSliderFraction (1.0f) ; @@ -183,6 +183,9 @@ if ( select_start_position < 0 ) select_start_position = 0 ; + if ( *(temp_text + select_start_position + 1) != '\n' ) + select_start_position ++ ; + while ( ( select_start_position > 0 ) && ( *(temp_text + select_start_position) != '\n' ) ) select_start_position -- ; |
From: John F. F. <fa...@us...> - 2005-05-06 18:47:27
|
Update of /cvsroot/plib/plib/src/pui In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30598 Modified Files: pu.cxx pu.h puObject.cxx Log Message: Adding code to allow the application to specify whether a widget gets deactivated when the user releases the mouse button or when the user activates the next widget. Index: pu.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/pui/pu.cxx,v retrieving revision 1.67 retrieving revision 1.68 diff -u -d -r1.67 -r1.68 --- pu.cxx 16 Feb 2004 22:09:34 -0000 1.67 +++ pu.cxx 6 May 2005 18:46:28 -0000 1.68 @@ -377,7 +377,8 @@ x_offset -= active -> getABox () -> min [0] ; y_offset -= active -> getABox () -> min [1] ; - if ( ! active -> isHit ( pu_mouse_x - x_offset, pu_mouse_y - y_offset ) ) + if ( ( ! active -> isHit ( pu_mouse_x - x_offset, pu_mouse_y - y_offset ) ) && + ( active -> getWhenToDeactivate () == PUDEACTIVATE_ON_MOUSE_CLICK ) ) { active -> invokeDownCallback () ; puDeactivateWidget () ; @@ -392,6 +393,7 @@ { puCursor ( x, y ) ; + // Pick buttons in order of descending priority: Left, Right, Middle int button = (last_buttons & (1<<PU_LEFT_BUTTON )) ? PU_LEFT_BUTTON : (last_buttons & (1<<PU_MIDDLE_BUTTON)) ? PU_MIDDLE_BUTTON : @@ -409,9 +411,11 @@ */ if ( puActiveWidget () ) { - puActiveWidget()->doHit(button, PU_DRAG, pu_mouse_x - pu_mouse_offset_x, - pu_mouse_y - pu_mouse_offset_y) ; - return TRUE ; + if ( puActiveWidget()->checkHit(button, PU_DRAG, pu_mouse_x - pu_mouse_offset_x, + pu_mouse_y - pu_mouse_offset_y) ) + return TRUE ; + else + return FALSE ; } int return_value = puGetBaseLiveInterface () -> checkHit ( button, Index: pu.h =================================================================== RCS file: /cvsroot/plib/plib/src/pui/pu.h,v retrieving revision 1.149 retrieving revision 1.150 diff -u -d -r1.149 -r1.150 --- pu.h 6 May 2005 18:31:08 -0000 1.149 +++ pu.h 6 May 2005 18:46:28 -0000 1.150 @@ -215,6 +215,10 @@ #define PU_RADIO_BUTTON_SIZE 16 +/* When to deactivate a widget and call its down callback */ +#define PUDEACTIVATE_ON_MOUSE_CLICK 0 +#define PUDEACTIVATE_ON_NEXT_WIDGET_ACTIVATION 1 + extern int puRefresh ; /* Should not be used directly by applications any longer. Instead, use puPostRefresh () and puNeedRefresh (). */ @@ -600,6 +604,8 @@ void *render_data ; int border_thickness ; + short when_to_deactivate ; /* On next mouseclick or on next widget activation */ + virtual void draw_legend ( int dx, int dy ) ; virtual void draw_label ( int dx, int dy ) ; @@ -722,6 +728,9 @@ void setActiveButton ( int b ) { active_mouse_button = b ; } int getActiveButton ( void ) const { return active_mouse_button ; } + void setWhenToDeactivate ( short d ) { when_to_deactivate = d ; } + short getWhenToDeactivate ( void ) const { return when_to_deactivate ; } + void setLegend ( const char *l ) { legend = l ; recalc_bbox() ; puPostRefresh () ; } const char *getLegend ( void ) const { return legend ; } Index: puObject.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/pui/puObject.cxx,v retrieving revision 1.51 retrieving revision 1.52 diff -u -d -r1.51 -r1.52 --- puObject.cxx 6 May 2005 18:31:25 -0000 1.51 +++ puObject.cxx 6 May 2005 18:46:34 -0000 1.52 @@ -171,6 +171,8 @@ legendFont = defaultLegendFont ; legendPlace = PUPLACE_LEGEND_DEFAULT ; + when_to_deactivate = PUDEACTIVATE_ON_MOUSE_CLICK ; + for ( int i = 0 ; i < PUCOL_MAX ; i++ ) puSetColour ( colour[i], _puDefaultColourTable[i] ) ; @@ -504,7 +506,8 @@ int puObject::checkHit ( int button, int updown, int x, int y ) { - if ( ( ( puGetPressedButton () || updown == PU_UP ) ) && isHit( x, y ) ) + if ( ( puGetPressedButton () || ( updown == PU_UP ) ) && isHit( x, y ) || + puGetPressedButton () && ( isHit( x, y ) || ( puActiveWidget () == this ) ) ) { doHit ( button, updown, x, y ) ; return TRUE ; |