plib-cvs Mailing List for PLIB (Page 19)
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-07-26 09:49:54
|
Update of /cvsroot/plib/plib/src/ssg In directory sc8-pr-cvs1:/tmp/cvs-serv30418/ssg Modified Files: ssgLoadX.cxx Log Message: setting the values of the state after creating it (I am not 100% sure this is necessary) Index: ssgLoadX.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssgLoadX.cxx,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- ssgLoadX.cxx 2 Sep 2002 06:05:48 -0000 1.20 +++ ssgLoadX.cxx 26 Jul 2003 09:33:18 -0000 1.21 @@ -574,7 +574,38 @@ // if ( currentState == NULL ) - currentState = new ssgSimpleState(); + { currentState = new ssgSimpleState(); + currentState->setOpaque(); + currentState->disable(GL_BLEND); + currentState->disable(GL_ALPHA_TEST); + currentState->disable(GL_TEXTURE_2D); + currentState->enable(GL_COLOR_MATERIAL); + currentState->enable(GL_LIGHTING); + currentState->setShadeModel(GL_SMOOTH); + currentState->setMaterial(GL_AMBIENT , 0.7f, 0.7f, 0.7f, 1.0f); + currentState->setMaterial(GL_DIFFUSE , 0.7f, 0.7f, 0.7f, 1.0f); + currentState->setMaterial(GL_SPECULAR, 1.0f, 1.0f, 1.0f, 1.0f); + currentState->setMaterial(GL_EMISSION, 0.0f, 0.0f, 0.0f, 1.0f); + currentState->setShininess(50); +/* + currentState -> setMaterial ( GL_AMBIENT, 0.5, 0.5, 0.5); + currentState -> setMaterial ( GL_DIFFUSE, 0.7, 0.7, 0.7); // light grey + currentState -> setMaterial ( GL_SPECULAR, 1.0, 1.0, 1.0); + currentState -> setMaterial ( GL_EMISSION, 0.0, 0.0, 0.0); + + currentState -> setShininess ( 3 ) ; + + //currentState -> enable ( GL_COLOR_MATERIAL ) ; + //currentState -> setColourMaterial ( GL_AMBIENT_AND_DIFFUSE ) ; + + currentState -> enable ( GL_LIGHTING ) ; + currentState -> setShadeModel ( GL_SMOOTH ) ; + + currentState -> disable ( GL_BLEND ) ; + currentState -> setOpaque () ; + currentState -> disable( GL_TEXTURE_2D ); + */ + } currentMesh.addToSSG( currentState // Pfusch, kludge. NIV135 @@ -636,7 +667,8 @@ //int startLevel = parser.level; token = parser.getNextToken(0); while (! parser.eof ) - { if (firsttime) + { + if (firsttime) { if(!HeaderIsValid(token)) return FALSE; @@ -657,6 +689,7 @@ ssgSetCurrentOptions ( (ssgLoaderOptions*)options ) ; current_options = ssgGetCurrentOptions () ; + currentState = NULL; top_branch = new ssgBranch ; curr_branch_ = top_branch; if ( !parser.openFile( fname, &parser_spec )) |
From: Wolfram K. <wol...@us...> - 2003-07-26 09:49:43
|
Update of /cvsroot/plib/plib/src/ssg In directory sc8-pr-cvs1:/tmp/cvs-serv32483/ssg Added Files: ssgSaveASC.cxx Log Message: Saving *.asc (3D Studio ascii files as used by 3DSR4) --- NEW FILE: ssgSaveASC.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 [...138 lines suppressed...] return TRUE ; } int ssgSaveASC ( const char *filename, ssgEntity *ent ) { save_fd = fopen ( filename, "wa" ) ; if ( save_fd == NULL ) { ulSetError ( UL_WARNING, "ssgSaveASC: Failed to open '%s' for writing", filename ) ; return FALSE ; } int result = ssgSaveASC ( save_fd, ent ) ; fclose ( save_fd ) ; return result ; } |
From: Nick M. <nm...@us...> - 2003-07-26 07:24:45
|
Update of /cvsroot/plib/plib/examples/src/ssg/sky/data In directory sc8-pr-cvs1:/tmp/cvs-serv1657/data Log Message: Directory /cvsroot/plib/plib/examples/src/ssg/sky/data added to the repository |
From: Nick M. <nm...@us...> - 2003-07-26 07:17:14
|
Update of /cvsroot/plib/plib/src/ssgAux In directory sc8-pr-cvs1:/tmp/cvs-serv3016 Modified Files: ssgAux.dsp Log Message: Added ssgaSky Index: ssgAux.dsp =================================================================== RCS file: /cvsroot/plib/plib/src/ssgAux/ssgAux.dsp,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- ssgAux.dsp 31 Aug 2002 20:54:42 -0000 1.17 +++ ssgAux.dsp 26 Jul 2003 06:28:43 -0000 1.18 @@ -54,7 +54,7 @@ # Begin Special Build Tool SOURCE="$(InputPath)" PostBuild_Desc=Copy Library to plib directory -PostBuild_Cmds=copy release\*.lib ..\..\*.* copy ssgAux.h ..\..\ssgAux.h copy ssgaFire.h ..\..\ssgaFire.h copy ssgaLensFlare.h ..\..\ssgaLensFlare.h copy ssgaParticleSystem.h ..\..\ssgaParticleSystem.h copy ssgaShapes.h ..\..\ssgaShapes.h copy ssgaWaveSystem.h ..\..\ssgaWaveSystem.h +PostBuild_Cmds=copy release\*.lib ..\..\*.* copy ssgAux.h ..\..\ssgAux.h copy ssgaFire.h ..\..\ssgaFire.h copy ssgaLensFlare.h ..\..\ssgaLensFlare.h copy ssgaParticleSystem.h ..\..\ssgaParticleSystem.h copy ssgaShapes.h ..\..\ssgaShapes.h copy ssgaWaveSystem.h ..\..\ssgaWaveSystem.h copy ssgaSky.h ..\..\ssgaSky.h # End Special Build Tool !ELSEIF "$(CFG)" == "ssgAux - Win32 Debug" @@ -83,7 +83,7 @@ # Begin Special Build Tool SOURCE="$(InputPath)" PostBuild_Desc=Copy Library to plib directory -PostBuild_Cmds=copy debug\*.lib ..\..\*.* copy ssgAux.h ..\..\ssgAux.h copy ssgaFire.h ..\..\ssgaFire.h copy ssgaLensFlare.h ..\..\ssgaLensFlare.h copy ssgaParticleSystem.h ..\..\ssgaParticleSystem.h copy ssgaShapes.h ..\..\ssgaShapes.h copy ssgaWaveSystem.h ..\..\ssgaWaveSystem.h +PostBuild_Cmds=copy debug\*.lib ..\..\*.* copy ssgAux.h ..\..\ssgAux.h copy ssgaFire.h ..\..\ssgaFire.h copy ssgaLensFlare.h ..\..\ssgaLensFlare.h copy ssgaParticleSystem.h ..\..\ssgaParticleSystem.h copy ssgaShapes.h ..\..\ssgaShapes.h copy ssgaWaveSystem.h ..\..\ssgaWaveSystem.h copy ssgaSky.h ..\..\ssgaSky.h # End Special Build Tool !ENDIF @@ -97,6 +97,14 @@ # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # Begin Source File +SOURCE=.\ssgaCelestialBody.cxx +# End Source File +# Begin Source File + +SOURCE=.\ssgaCloudLayer.cxx +# End Source File +# Begin Source File + SOURCE=.\ssgaFire.cxx # End Source File # Begin Source File @@ -121,16 +129,32 @@ # End Source File # Begin Source File -SOURCE=.\ssgaTeapot.cxx +SOURCE=.\ssgaSky.cxx # End Source File # Begin Source File -SOURCE=.\ssgaWaveSystem.cxx +SOURCE=.\ssgaSkyDome.cxx +# End Source File +# Begin Source File + +SOURCE=.\ssgaSphere.cxx +# End Source File +# Begin Source File + +SOURCE=.\ssgaStars.cxx +# End Source File +# Begin Source File + +SOURCE=.\ssgaTeapot.cxx # End Source File # Begin Source File SOURCE=.\ssgAux.cxx # End Source File +# Begin Source File + +SOURCE=.\ssgaWaveSystem.cxx +# End Source File # End Group # Begin Group "Header Files" @@ -153,11 +177,19 @@ # End Source File # Begin Source File -SOURCE=.\ssgaWaveSystem.h +SOURCE=.\ssgaSky.h +# End Source File +# Begin Source File + +SOURCE=.\ssgaSphere.h # End Source File # Begin Source File SOURCE=.\ssgAux.h +# End Source File +# Begin Source File + +SOURCE=.\ssgaWaveSystem.h # End Source File # End Group # End Target |
From: Nick M. <nm...@us...> - 2003-07-26 07:01:01
|
Update of /cvsroot/plib/plib/examples/src/ssg/sky In directory sc8-pr-cvs1:/tmp/cvs-serv1723/sky Added Files: sky.cxx sky.dsp sky.dsw sky.ncb sky.opt sky.plg Log Message: Added ssgaSky --- NEW FILE: sky.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 [...642 lines suppressed...] /* Set everything up on the first time around */ cloudSelectBox_cb ( cloudSelectBox ) ; window_group->close () ; } /* The works. */ int main ( int, char ** ) { init_graphics () ; load_database () ; init_gui () ; glutMainLoop () ; return 0 ; } --- NEW FILE: sky.dsp --- # Microsoft Developer Studio Project File - Name="sky" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Console Application" 0x0103 CFG=sky - Win32 Debug !MESSAGE This is not a valid makefile. To build this project using NMAKE, !MESSAGE use the Export Makefile command and run !MESSAGE !MESSAGE NMAKE /f "sky.mak". !MESSAGE !MESSAGE You can specify a configuration when running NMAKE !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE !MESSAGE NMAKE /f "sky.mak" CFG="sky - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE [...62 lines suppressed...] # Name "sky - Win32 Release" # Name "sky - Win32 Debug" # Begin Group "Source Files" # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" # Begin Source File SOURCE=.\sky.cxx # End Source File # End Group # Begin Group "Header Files" # PROP Default_Filter "h;hpp;hxx;hm;inl" # End Group # Begin Group "Resource Files" # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" # End Group # End Target # End Project --- NEW FILE: sky.dsw --- Microsoft Developer Studio Workspace File, Format Version 6.00 # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! ############################################################################### Project: "sky"=".\sky.dsp" - Package Owner=<4> Package=<5> {{{ }}} Package=<4> {{{ }}} ############################################################################### Global: Package=<5> {{{ }}} Package=<3> {{{ }}} ############################################################################### --- NEW FILE: sky.ncb --- (This appears to be a binary file; contents omitted.) --- NEW FILE: sky.opt --- (This appears to be a binary file; contents omitted.) --- NEW FILE: sky.plg --- <html> <body> <pre> <h1>Build Log</h1> <h3> --------------------Configuration: sky - Win32 Release-------------------- </h3> <h3>Command Lines</h3> Creating temporary file "C:\DOCUME~1\Family\LOCALS~1\Temp\RSPBB.tmp" with contents [ /nologo /MT /W3 /GX /O2 /I "..\..\..\..\..\\" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"Release/sky.pch" /YX /Fo"Release/" /Fd"Release/" /FD /c "C:\Documents and Settings\Nick\My Documents\Programming\plib-cvs\plib\examples\src\ssg\sky\sky.cxx" ] Creating command line "cl.exe @C:\DOCUME~1\Family\LOCALS~1\Temp\RSPBB.tmp" Creating temporary file "C:\DOCUME~1\Family\LOCALS~1\Temp\RSPBC.tmp" with contents [ kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib sg.lib ssg.lib pui.lib fnt.lib ul.lib ssgAux.lib opengl32.lib glu32.lib glut32.lib /nologo /subsystem:console /incremental:no /pdb:"Release/sky.pdb" /machine:I386 /out:"Release/sky.exe" /libpath:"..\..\..\..\..\plib" ".\Release\sky.obj" ] Creating command line "link.exe @C:\DOCUME~1\Family\LOCALS~1\Temp\RSPBC.tmp" <h3>Output Window</h3> Compiling... sky.cxx Linking... <h3>Results</h3> sky.exe - 0 error(s), 0 warning(s) <h3> --------------------Configuration: sky - Win32 Debug-------------------- </h3> <h3>Command Lines</h3> Creating temporary file "C:\DOCUME~1\Family\LOCALS~1\Temp\RSPBE.tmp" with contents [ /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\..\..\..\\" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"Debug/sky.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c "C:\Documents and Settings\Nick\My Documents\Programming\plib-cvs\plib\examples\src\ssg\sky\sky.cxx" ] Creating command line "cl.exe @C:\DOCUME~1\Family\LOCALS~1\Temp\RSPBE.tmp" Creating temporary file "C:\DOCUME~1\Family\LOCALS~1\Temp\RSPBF.tmp" with contents [ kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib sg_d.lib ssg_d.lib pui_d.lib fnt_d.lib ul_d.lib ssgAux_d.lib opengl32.lib glu32.lib glut32.lib /nologo /subsystem:console /incremental:yes /pdb:"Debug/sky.pdb" /debug /machine:I386 /out:"Debug/sky.exe" /pdbtype:sept /libpath:"..\..\..\..\..\plib" ".\Debug\sky.obj" ] Creating command line "link.exe @C:\DOCUME~1\Family\LOCALS~1\Temp\RSPBF.tmp" <h3>Output Window</h3> Compiling... sky.cxx Linking... <h3>Results</h3> sky.exe - 0 error(s), 0 warning(s) </pre> </body> </html> |
From: Nick M. <nm...@us...> - 2003-07-26 06:58:17
|
Update of /cvsroot/plib/plib/examples/src/ssg/sky/data In directory sc8-pr-cvs1:/tmp/cvs-serv2421/sky/data Added Files: candy.rgb halo.rgba moon.rgba ocean.rgb scattered.rgba sorority.txf Log Message: Added ssgaSky --- NEW FILE: candy.rgb --- (This appears to be a binary file; contents omitted.) --- NEW FILE: halo.rgba --- (This appears to be a binary file; contents omitted.) --- NEW FILE: moon.rgba --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ocean.rgb --- (This appears to be a binary file; contents omitted.) --- NEW FILE: scattered.rgba --- (This appears to be a binary file; contents omitted.) --- NEW FILE: sorority.txf --- (This appears to be a binary file; contents omitted.) |
From: Nick M. <nm...@us...> - 2003-07-26 06:58:14
|
Update of /cvsroot/plib/plib/examples/src/ssg/sky/Release In directory sc8-pr-cvs1:/tmp/cvs-serv1657/Release Log Message: Directory /cvsroot/plib/plib/examples/src/ssg/sky/Release added to the repository |
From: Nick M. <nm...@us...> - 2003-07-26 06:58:13
|
Update of /cvsroot/plib/plib/examples/src/ssg/sky/Debug In directory sc8-pr-cvs1:/tmp/cvs-serv1657/Debug Log Message: Directory /cvsroot/plib/plib/examples/src/ssg/sky/Debug added to the repository |
From: Nick M. <nm...@us...> - 2003-07-26 06:58:13
|
Update of /cvsroot/plib/plib/examples/src/ssg/sky In directory sc8-pr-cvs1:/tmp/cvs-serv1559/sky Log Message: Directory /cvsroot/plib/plib/examples/src/ssg/sky added to the repository |
Update of /cvsroot/plib/plib/src/ssgAux In directory sc8-pr-cvs1:/tmp/cvs-serv1335 Added Files: ssgaCelestialBody.cxx ssgaCloudLayer.cxx ssgaSky.cxx ssgaSky.h ssgaSkyDome.cxx ssgaSphere.cxx ssgaSphere.h ssgaStars.cxx Log Message: Added ssgaSky --- NEW FILE: ssgaCelestialBody.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...] q = 0; for (i = 0; i < win_height; i++) { for (j = 0; j < win_width; j++) { for (k = 0; k < RGB; k++) { ibuffer[q++] = (unsigned char) *(buffer + (pixelSize*((win_height-1-i)*win_width+j)+k)); } } } // *(buffer + (pixelSize*((win_height-1-i)*win_width+j)+k)); fwrite(ibuffer, sizeof(unsigned char), RGB*win_width*win_height, fp); fclose(fp); free(ibuffer); printf("wrote file (%d x %d pixels, %d bytes)\n", win_width, win_height, RGB*win_width*win_height); } #endif --- NEW FILE: ssgaCloudLayer.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 [...452 lines suppressed...] // double tmp3 = sin(d)*cos_start_y); // double tmp4 = sin(dest[SG_Y])-sin(start[SG_Y])*cos(d); // double tmp5 = acos(tmp4/tmp3); // Doing this way gaurentees that the temps are // not stored into memory double tmp5 = acos( (sin(dest[SG_Y]) - sin_start_y * cos(d)) / (sin(d) * cos_start_y) ); // if ( sin( dest[SG_X] - start[SG_X] ) < 0 ) { // the sin of the negative angle is just the opposite sign // of the sin of the angle so tmp2 will have the opposite // sign of sin( dest[SG_X] - start[SG_X] ) if ( tmp2 >= 0 ) { *course = tmp5; } else { *course = 2 * SGD_PI - tmp5; } } } --- NEW FILE: ssgaSky.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 [...353 lines suppressed...] else { effvis = 0.0; } puff_progression += time_factor; if ( puff_progression > puff_length + ramp_up + ramp_down) { in_puff = false; } } // never let visibility drop below 25 meters if ( effvis <= 25.0 ) { effvis = 25.0; } } } // for effective_visibility = effvis; } --- NEW FILE: ssgaSky.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 [...349 lines suppressed...] }; inline void ssgaGammaCorrectC(float *color, float reff = 2.5, float system = system_gamma) { *color = (float)pow(*color, reff/system); }; inline void ssgaGammaRestoreRGB(float *color, float reff = 2.5, float system = system_gamma) { color[0] = (float)pow(color[0], system/reff); color[1] = (float)pow(color[1], system/reff); color[2] = (float)pow(color[2], system/reff); }; inline void ssgaGammaRestoreC(float *color, float reff = 2.5, float system = system_gamma) { *color = (float)pow(*color, system/reff); }; #endif --- NEW FILE: ssgaSkyDome.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 [...465 lines suppressed...] slot = middle_ring_cl->get( counter++ ); sgCopyVec4( slot, middle_color[0] ); // generate lower ring counter = 0; for ( i = 0; i < 12; i++ ) { slot = lower_ring_cl->get( counter++ ); sgCopyVec4( slot, bottom_color[i] ); slot = lower_ring_cl->get( counter++ ); sgCopyVec4( slot, lower_color[i] ); } slot = lower_ring_cl->get( counter++ ); sgCopyVec4( slot, bottom_color[0] ); slot = lower_ring_cl->get( counter++ ); sgCopyVec4( slot, lower_color[0] ); return true; } --- NEW FILE: ssgaSphere.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 [...85 lines suppressed...] if ( vl->getNum() != nl->getNum() ) { ulSetError(UL_FATAL, "bad sphere1\n"); exit(-1); } if ( vl->getNum() != tl->getNum() ) { ulSetError(UL_FATAL, "bad sphere2\n"); exit(-1); } slice->setState( state ); slice->setCallback( SSG_CALLBACK_PREDRAW, predraw ); slice->setCallback( SSG_CALLBACK_POSTDRAW, postdraw ); sphere->addKid( slice ); t -= dt; } return sphere; } --- NEW FILE: ssgaSphere.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 $Id: ssgaSphere.h,v 1.1 2003/07/26 06:16:19 nmcevoy Exp $ */ #include "ssg.h" // return a sphere object as an ssgBranch (connected to the specified ssgSimpleState) ssgBranch *ssgaMakeSphere( ssgSimpleState *state, ssgColourArray *cl, float radius, int slices, int stacks, ssgCallback predraw, ssgCallback postdraw ); --- NEW FILE: ssgaStars.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 [...203 lines suppressed...] if ( mag < cutoff ) { nmag = ( 4.5 - mag ) / 5.5; // translate to 0 ... 1.0 scale // alpha = nmag * 0.7 + 0.3; // translate to a 0.3 ... 1.0 scale alpha = nmag * 0.85 + 0.15; // translate to a 0.15 ... 1.0 scale alpha *= factor; // dim when the sun is brighter } else { alpha = 0.0; } if (alpha > 1.0) { alpha = 1.0; } if (alpha < 0.0) { alpha = 0.0; } color = cl->get( i ); sgSetVec4( color, 1.0, 1.0, 1.0, (float)alpha ); } } return true; } |
From: James J. <pu...@us...> - 2003-07-12 00:46:01
|
Update of /cvsroot/plib/plib/src/pui In directory sc8-pr-cvs1:/tmp/cvs-serv16355 Modified Files: pu.h puValue.cxx Log Message: John Fay's addition of a boolean puValue Index: pu.h =================================================================== RCS file: /cvsroot/plib/plib/src/pui/pu.h,v retrieving revision 1.140 retrieving revision 1.141 diff -u -d -r1.140 -r1.141 --- pu.h 26 Jun 2003 11:31:07 -0000 1.140 +++ pu.h 12 Jul 2003 00:45:58 -0000 1.141 @@ -380,10 +380,12 @@ int integer ; float floater ; char *string ; + bool boolean ; int *res_integer ; float *res_floater ; char *res_string ; + bool *res_bool ; int string_size ; [...96 lines suppressed...] + void getValue ( int *i ) { re_eval () ; *i = *getIntegerp () ; } void getValue ( float *f ) { re_eval () ; *f = *getFloaterp () ; } void getValue ( char **s ) { re_eval () ; *s = getStringp () ; } @@ -509,6 +537,7 @@ } void getValue ( char *s ) { getValue ( s, PUSTRING_MAX ) ; } /* Obsolete ! */ + void getValue ( bool *b ) { re_eval () ; *b = *getBooleanp () ; } int getValue ( void ) { return getIntegerValue () ; } /* Obsolete ! */ @@ -516,6 +545,7 @@ float getFloatValue ( void ) { re_eval () ; return *getFloaterp () ; } char getCharValue ( void ) { re_eval () ; return getStringp ()[0]; } char *getStringValue ( void ) { re_eval () ; return getStringp () ; } + bool getBooleanValue ( void ) { re_eval () ; return *getBooleanp () ; } /* RTTI */ ulRTTItypeid getTypeInfo ( void ) const { return RTTI_vinfo () ; } Index: puValue.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/pui/puValue.cxx,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- puValue.cxx 7 Feb 2003 17:01:04 -0000 1.24 +++ puValue.cxx 12 Jul 2003 00:45:58 -0000 1.25 @@ -84,6 +84,8 @@ if ( *res_integer != strtoint ( string ) ) sprintf ( string, "%d", *res_integer ) ; + boolean = ( *res_integer != 0 ) ; + puPostRefresh () ; } else if ( res_floater != NULL ) @@ -97,12 +99,29 @@ if ( *res_floater != strtod ( string, NULL ) ) sprintf ( string, "%g", *res_floater ) ; + boolean = ( *res_floater != 0.0f ) ; + puPostRefresh () ; } else if ( res_string != NULL ) { integer = strtoint ( res_string ) ; floater = (float) strtod ( res_string, NULL ) ; + boolean = ( strcmp ( res_string, "0" ) != 0 ) ; + puPostRefresh () ; + } + else if ( res_bool != NULL ) + { + integer = *res_bool ? 1 : 0 ; + floater = *res_bool ? 1.0f : 0.0f ; + + /* + Needed for puInput / puLargeInput: + Do not modify the string value unless necessary + */ + if ( *res_bool != ( strcmp ( string, "0" ) != 0 ) ) + sprintf ( string, "%d", *res_bool ? "1" : "0" ) ; + puPostRefresh () ; } } @@ -152,6 +171,7 @@ { *getIntegerp () = strtoint ( s ) ; *getFloaterp () = (float) strtod ( s, NULL ) ; + *getBooleanp () = ( strcmp ( s, "0" ) != 0 ) ; } puPostRefresh () ; |
From: James J. <pu...@us...> - 2003-07-11 11:16:46
|
Update of /cvsroot/plib/plib/src/ssg In directory sc8-pr-cvs1:/tmp/cvs-serv29124 Modified Files: ssgLoadAC.cxx Log Message: From Melchior Franz: unfortunately, the last patch fixed plib's unwillingness to accept ACs with DOS endings. But now it doesn't accept data fields containing \n... This fixes the above. Index: ssgLoadAC.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssgLoadAC.cxx,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- ssgLoadAC.cxx 4 Jul 2003 13:51:58 -0000 1.31 +++ ssgLoadAC.cxx 11 Jul 2003 11:16:43 -0000 1.32 @@ -349,13 +349,20 @@ static int do_data ( char *s ) { int len = strtol ( s, NULL, 0 ) ; - char buffer [ len + 3 ] ; /* data + \r + \n + \0 */ - fgets ( buffer, len + 3, loader_fd ) ; current_data = new char [ len + 1 ] ; - strncpy ( current_data, buffer, len ) ; + for ( int i = 0 ; i < len ; i++ ) + current_data [ i ] = getc ( loader_fd ) ; + current_data [ len ] = '\0' ; + + int c; + while ( ( c = getc( loader_fd ) ) != EOF ) /* Final RETURN */ + if ( c != '\r' && c != '\n' ) { + ungetc ( c, loader_fd ) ; + break ; + } ssgBranch *br = current_options -> createBranch ( current_data ) ; |
From: James J. <pu...@us...> - 2003-07-04 14:33:06
|
Update of /cvsroot/plib/plib/src/sl In directory sc8-pr-cvs1:/tmp/cvs-serv992 Modified Files: slDSP.cxx Log Message: Melchior Franz's critical repairs to the sound system: sound did not work on Mac, BSD, or Win32. Index: slDSP.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/sl/slDSP.cxx,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- slDSP.cxx 18 May 2003 13:45:04 -0000 1.21 +++ slDSP.cxx 4 Jul 2003 14:33:03 -0000 1.22 @@ -357,7 +357,7 @@ if ( error ) return 0.0f ; - return 0.0f ; + return 10.0f ; } @@ -557,7 +557,7 @@ float slDSP::secondsRemaining () { - return 0.0f ; + return 10.0f ; } @@ -721,7 +721,7 @@ if ( error ) return 0.0f ; - samples_remain = ALgetfillable(port) / 2 ; + samples_remain = ALgetfillable(port) ; return (float) samples_remain / (float) rate ; } @@ -1052,7 +1052,7 @@ return 0.0f; // sl doesn't use this, so I didn't write it! - return secLeft; + return 10.0f; } float slDSP::secondsUsed () |
From: James J. <pu...@us...> - 2003-07-04 13:52:02
|
Update of /cvsroot/plib/plib/src/ssg In directory sc8-pr-cvs1:/tmp/cvs-serv26595/ssg Modified Files: ssgLoadAC.cxx Log Message: Melchior Franz's patch to make the AC loader tolerant of DOS-style line endings. Index: ssgLoadAC.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssgLoadAC.cxx,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- ssgLoadAC.cxx 15 Sep 2002 01:29:11 -0000 1.30 +++ ssgLoadAC.cxx 4 Jul 2003 13:51:58 -0000 1.31 @@ -138,6 +138,7 @@ { { "MATERIAL", do_material }, { "OBJECT" , do_object }, + { NULL, NULL } } ; @@ -345,18 +346,16 @@ } -static int do_data ( char *s ) +static int do_data ( char *s ) { int len = strtol ( s, NULL, 0 ) ; + char buffer [ len + 3 ] ; /* data + \r + \n + \0 */ + fgets ( buffer, len + 3, loader_fd ) ; current_data = new char [ len + 1 ] ; - for ( int i = 0 ; i < len ; i++ ) - current_data [ i ] = getc ( loader_fd ) ; - + strncpy ( current_data, buffer, len ) ; current_data [ len ] = '\0' ; - - getc ( loader_fd ) ; /* Final RETURN */ ssgBranch *br = current_options -> createBranch ( current_data ) ; |
From: James J. <pu...@us...> - 2003-07-04 13:51:01
|
Update of /cvsroot/plib/plib/src/util In directory sc8-pr-cvs1:/tmp/cvs-serv26460/util Modified Files: ul.h Log Message: Patches by Martin Spott <Mar...@un...> to fix compilation on Solaris systems. Index: ul.h =================================================================== RCS file: /cvsroot/plib/plib/src/util/ul.h,v retrieving revision 1.60 retrieving revision 1.61 diff -u -d -r1.60 -r1.61 --- ul.h 4 Jan 2003 02:55:56 -0000 1.60 +++ ul.h 4 Jul 2003 13:50:56 -0000 1.61 @@ -80,7 +80,7 @@ #define UL_IRIX 1 -#elif defined(SOLARIS) +#elif defined(SOLARIS) || defined(sun) #define UL_SOLARIS 1 @@ -121,7 +121,7 @@ #include <unistd.h> #endif -#if defined(UL_LINUX) || defined(UL_BSD) || defined(UL_IRIX) +#if defined(UL_LINUX) || defined(UL_BSD) || defined(UL_IRIX) || defined(UL_SOLARIS) #include <unistd.h> #include <dlfcn.h> #include <fcntl.h> |
From: James J. <pu...@us...> - 2003-07-04 13:51:01
|
Update of /cvsroot/plib/plib/src/ssgAux In directory sc8-pr-cvs1:/tmp/cvs-serv26460/ssgAux Modified Files: ssgaScreenDump.cxx Log Message: Patches by Martin Spott <Mar...@un...> to fix compilation on Solaris systems. Index: ssgaScreenDump.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssgAux/ssgaScreenDump.cxx,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ssgaScreenDump.cxx 27 Jun 2003 08:15:15 -0000 1.1 +++ ssgaScreenDump.cxx 4 Jul 2003 13:50:56 -0000 1.2 @@ -26,7 +26,7 @@ #include <string.h> -#include <plib/ul.h> +#include "ul.h" static void writeByte ( FILE *fd, unsigned char x ) { |
From: Steve B. <sj...@us...> - 2003-06-27 08:15:19
|
Update of /cvsroot/plib/plib/src/ssgAux In directory sc8-pr-cvs1:/tmp/cvs-serv5328/plib/src/ssgAux Modified Files: Makefile.am ssgAux.h ssgaWaveSystem.cxx ssgaWaveSystem.h Added Files: ssgaScreenDump.cxx ssgaScreenDump.h Log Message: Fixed minor bugs all over, added Screen Dump command to ssgAux. --- NEW FILE: ssgaScreenDump.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 [...76 lines suppressed...] for ( i = 0 ; i < 404 ; i++ ) writeByte ( fd, 0 ) ; /* Dummy field */ for ( int z = 0 ; z < 3 ; z++ ) for ( int y = 0 ; y < ysize ; y++ ) { for ( i = 0 ; i < xsize ; i++ ) row [ i ] = buffer [ ( y * xsize + i ) * 3 + z ] ; fseek ( fd, ( z * ysize + y ) * xsize + 512, SEEK_SET ) ; fwrite ( row, 1, xsize, fd ) ; } fclose ( fd ) ; delete row ; delete buffer ; } --- NEW FILE: ssgaScreenDump.h --- void ssgaScreenDump ( char *filename, int width, int height ) ; Index: Makefile.am =================================================================== RCS file: /cvsroot/plib/plib/src/ssgAux/Makefile.am,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- Makefile.am 31 Aug 2002 22:21:21 -0000 1.13 +++ Makefile.am 27 Jun 2003 08:15:15 -0000 1.14 @@ -7,6 +7,7 @@ ssgaLensFlare.h \ ssgaParticleSystem.h \ ssgaWaveSystem.h \ + ssgaScreenDump.h \ ssgaFire.h libplibssgaux_a_SOURCES = ssgAux.cxx \ @@ -17,6 +18,7 @@ ssgaLensFlare.cxx \ ssgaLensFlareTexture.cxx \ ssgaFire.cxx \ + ssgaScreenDump.cxx \ ssgaTeapot.cxx INCLUDES = -I$(top_srcdir)/src/sg -I$(top_srcdir)/src/ssg Index: ssgAux.h =================================================================== RCS file: /cvsroot/plib/plib/src/ssgAux/ssgAux.h,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- ssgAux.h 2 Sep 2002 06:05:49 -0000 1.17 +++ ssgAux.h 27 Jun 2003 08:15:15 -0000 1.18 @@ -31,6 +31,7 @@ #include "ssgaFire.h" #include "ssgaWaveSystem.h" #include "ssgaLensFlare.h" +#include "ssgaScreenDump.h" #define _SSGA_TYPE_SHAPE 0x00008000 Index: ssgaWaveSystem.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssgAux/ssgaWaveSystem.cxx,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- ssgaWaveSystem.cxx 2 Sep 2002 06:05:49 -0000 1.10 +++ ssgaWaveSystem.cxx 27 Jun 2003 08:15:15 -0000 1.11 @@ -80,16 +80,16 @@ int idx = i * (nstrips+1) + j ; - float x0 = orig_vertices [idx][0] + center[0] ; - float y0 = orig_vertices [idx][1] + center[1] ; - float z0 = vertices [idx][2] ; + float xx = orig_vertices [idx][0] + center[0] ; + float yy = orig_vertices [idx][1] + center[1] ; + float zz = center[2] ; + float x0 = xx + offset[0] ; + float y0 = yy + offset[1] ; + float z0 = vertices [idx][2] ; + float depth = (gridGetter==NULL) ? 1000000.0f : gridGetter ( x0, y0 ) ; - float xx = x0 ; - float yy = y0 ; - float zz = center[2] ; - for ( int t = 0 ; t < num_trains ; t++ ) { float adjHeight = height [ t ] * edge_fade ; @@ -190,6 +190,8 @@ nstrips = nstacks = 0 ; + offset [ 0 ] = offset [ 1 ] = 0.0f ; + normals = NULL ; colours = NULL ; texcoords = NULL ; @@ -256,10 +258,10 @@ float x = (float) j / (float) nstacks ; float y = (float) i / (float) nstrips ; - if ( j == 0 ) x = -500.0f ; - if ( j == nstacks ) x = 500.0f ; - if ( i == 0 ) y = -500.0f ; - if ( i == nstacks ) y = 500.0f ; + // if ( j == 0 ) x = -500.0f ; + // if ( j == nstacks ) x = 500.0f ; + // if ( i == 0 ) y = -500.0f ; + // if ( i == nstacks ) y = 500.0f ; sgSetVec3 ( vertices [idx], (x-0.5f) * size[0], (y-0.5f) * size[1], 0.0f ) ; Index: ssgaWaveSystem.h =================================================================== RCS file: /cvsroot/plib/plib/src/ssgAux/ssgaWaveSystem.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- ssgaWaveSystem.h 2 Sep 2002 06:05:49 -0000 1.5 +++ ssgaWaveSystem.h 27 Jun 2003 08:15:15 -0000 1.6 @@ -65,6 +65,7 @@ { ssgaWSDepthCallback gridGetter ; + sgVec2 offset ; sgVec3 *normals ; sgVec4 *colours ; sgVec2 *texcoords ; @@ -121,6 +122,8 @@ void setWindDirn ( float dirn ) { windHeading = dirn ; } void setEdgeFlatten ( float dist ) { edgeFlatten = dist ; } void setTexScale ( float u, float v ) { tu = u ; tv = v ; } + + void setOffset ( sgVec2 _offset ) { sgCopyVec2 ( offset, _offset ) ; } void updateAnimation ( float t ) ; } ; |
From: Steve B. <sj...@us...> - 2003-06-27 08:15:19
|
Update of /cvsroot/plib/plib/doc/psl In directory sc8-pr-cvs1:/tmp/cvs-serv5328/plib/doc/psl Modified Files: index.html Log Message: Fixed minor bugs all over, added Screen Dump command to ssgAux. Index: index.html =================================================================== RCS file: /cvsroot/plib/plib/doc/psl/index.html,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- index.html 13 Sep 2002 22:45:07 -0000 1.4 +++ index.html 27 Jun 2003 08:15:15 -0000 1.5 @@ -38,6 +38,9 @@ <li><a href="prog_guide.html">The PSL Programmers Guide.</a> -- If you are writing scripts for a PSL-enabled application, then you'll only need to read the Programmer's Guide. +<li><a href="impl_guide.html">The PSL Implementation Guide.</a> +-- Explains some of PSL's internals, especially, the byte-code +virtual machine. </ul> <p> Each application can extend PSL by providing additional built-in |
From: Steve B. <sj...@us...> - 2003-06-27 08:15:19
|
Update of /cvsroot/plib/plib/src/ssg In directory sc8-pr-cvs1:/tmp/cvs-serv5328/plib/src/ssg Modified Files: ssgLoadTexture.cxx Log Message: Fixed minor bugs all over, added Screen Dump command to ssgAux. Index: ssgLoadTexture.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssgLoadTexture.cxx,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- ssgLoadTexture.cxx 30 Nov 2002 00:41:50 -0000 1.17 +++ ssgLoadTexture.cxx 27 Jun 2003 08:15:15 -0000 1.18 @@ -97,6 +97,15 @@ int t3 = texels [ l1 ] [ (y1 * w1 + x1_1) * zsize + c ] ; int t4 = texels [ l1 ] [ (y1_1 * w1 + x1_1) * zsize + c ] ; +if ( c == 3 ) /* Alpha */ +{ + int a = t1 ; + if ( t2 > a ) a = t2 ; + if ( t3 > a ) a = t3 ; + if ( t4 > a ) a = t4 ; + texels [ l2 ] [ (y2 * w2 + x2) * zsize + c ] = a ; +} +else texels [ l2 ] [ (y2 * w2 + x2) * zsize + c ] = ( t1 + t2 + t3 + t4 ) / 4 ; } |
From: Steve B. <sj...@us...> - 2003-06-27 08:15:19
|
Update of /cvsroot/plib/plib/demos/simon/src In directory sc8-pr-cvs1:/tmp/cvs-serv5328/plib/demos/simon/src Modified Files: Makefile Log Message: Fixed minor bugs all over, added Screen Dump command to ssgAux. Index: Makefile =================================================================== RCS file: /cvsroot/plib/plib/demos/simon/src/Makefile,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- Makefile 15 Sep 2002 04:34:39 -0000 1.5 +++ Makefile 27 Jun 2003 08:15:15 -0000 1.6 @@ -1,6 +1,6 @@ SIMON = libsimon.a simon -LIBS = -lplibpsl -lplibssg -lplibsg -lplibul -lglut -lGLU -lGL -lpthread -L/usr/X11/lib -lX11 -lm +LIBS = -lplibpsl -lplibssg -lplibsg -lplibjs -lplibul -lglut -lGLU -lGL -lpthread -L/usr/X11/lib -lX11 -lm all: ${SIMON} |
From: Steve B. <sj...@us...> - 2003-06-27 08:15:18
|
Update of /cvsroot/plib/plib/demos/exposer/src In directory sc8-pr-cvs1:/tmp/cvs-serv5328/plib/demos/exposer/src Modified Files: exposer.cxx Log Message: Fixed minor bugs all over, added Screen Dump command to ssgAux. Index: exposer.cxx =================================================================== RCS file: /cvsroot/plib/plib/demos/exposer/src/exposer.cxx,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- exposer.cxx 30 Aug 2002 18:36:08 -0000 1.22 +++ exposer.cxx 27 Jun 2003 08:15:14 -0000 1.23 @@ -68,7 +68,7 @@ static void update_eye_motion () { - float r ; rangeSlider -> getValue ( & r ) ; r *= 30.0f ; r += 2.0f ; + float r ; rangeSlider -> getValue ( & r ) ; r *= 100.0f ; r += 2.0f ; float h ; panSlider -> getValue ( & h ) ; h *= 360.0f ; h += 180.0f ; float p ; tiltSlider -> getValue ( & p ) ; p *= 360.0f ; p += 180.0f ; |
From: James J. <pu...@us...> - 2003-06-26 11:31:10
|
Update of /cvsroot/plib/plib/src/pui In directory sc8-pr-cvs1:/tmp/cvs-serv26636 Modified Files: pu.h puPopupMenu.cxx Log Message: Fix from Erik Hofman for the event where two menu items can be highlighted at the same time, resulting in a program lock-up if the user clicks - JCJ ---------------------------------------------------------------------- Index: pu.h =================================================================== RCS file: /cvsroot/plib/plib/src/pui/pu.h,v retrieving revision 1.139 retrieving revision 1.140 diff -u -d -r1.139 -r1.140 --- pu.h 7 Feb 2003 17:01:02 -0000 1.139 +++ pu.h 26 Jun 2003 11:31:07 -0000 1.140 @@ -582,11 +582,11 @@ virtual void draw_label ( int dx, int dy ) ; public: - virtual int isHit ( int x, int y ) const { return isVisible() && isActive() && - x >= abox.min[0] && - x <= abox.max[0] && - y >= abox.min[1] && - y <= abox.max[1] && + virtual int isHit ( int x, int y ) const { return isVisible() && isActive() && + x > abox.min[0] && + x < abox.max[0] && + y > abox.min[1] && + y < abox.max[1] && window == puGetWindow () ; } virtual void doHit ( int button, int updown, int x, int y ) ; Index: puPopupMenu.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/pui/puPopupMenu.cxx,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- puPopupMenu.cxx 2 Sep 2002 06:05:46 -0000 1.17 +++ puPopupMenu.cxx 26 Jun 2003 11:31:07 -0000 1.18 @@ -222,8 +222,8 @@ for ( ; bo != NULL ; bo = bo -> getPrevObject() ) { puBox *box = bo->getABox () ; - if ( ( x >= box->min[0] ) && ( x <= box->max[0] ) && - ( y >= box->min[1] ) && ( y <= box->max[1] ) ) + if ( ( x > box->min[0] ) && ( x < box->max[0] ) && + ( y > box->min[1] ) && ( y < box->max[1] ) ) bo->highlight () ; else bo->lowlight () ; |
From: James J. <pu...@us...> - 2003-06-02 23:49:48
|
Update of /cvsroot/plib/plib/src/sl In directory sc8-pr-cvs1:/tmp/cvs-serv22954 Modified Files: slMODfile.cxx Log Message: Paul Mackerras' fix for PowerPC sound. PowerPC doesn't default chars to being signed. Index: slMODfile.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/sl/slMODfile.cxx,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- slMODfile.cxx 2 Sep 2002 06:05:47 -0000 1.8 +++ slMODfile.cxx 2 Jun 2003 23:49:44 -0000 1.9 @@ -134,7 +134,7 @@ if (sis.loopBeg) sp = sis.loopBeg; else break; } - sum += *hp * (char)(*sp ^ sis.x_or); + sum += *hp * (signed char)(*sp ^ sis.x_or); } sum /= 256; if (sum > 127) sum = 127; |
From: Wolfram K. <wol...@us...> - 2003-06-02 21:03:54
|
Update of /cvsroot/plib/plib/src/ssg In directory sc8-pr-cvs1:/tmp/cvs-serv21861 Modified Files: ssgLoadMDL.cxx Log Message: Fix by Melchior FRANZ: A pointer to a automatic variable was stored and used later on. Index: ssgLoadMDL.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssgLoadMDL.cxx,v retrieving revision 1.44 retrieving revision 1.45 diff -u -d -r1.44 -r1.45 --- ssgLoadMDL.cxx 4 Jan 2003 02:55:55 -0000 1.44 +++ ssgLoadMDL.cxx 2 Jun 2003 21:03:50 -0000 1.45 @@ -1355,7 +1355,7 @@ dy = ulEndianReadLittle16(fp); char tex_name[14]; fread(tex_name, 1, 14, fp); - char tex_filename[14]; + static char tex_filename[14]; int j = 0; for(int i = 0; i < 14; i++) { @@ -1375,7 +1375,7 @@ unsigned short length, idx; unsigned char flags, chksum; unsigned int color; - char tex_filename[128]; + static char tex_filename[128]; length = ulEndianReadLittle16(fp); idx = ulEndianReadLittle16(fp); fread(&flags, 1, 1, fp); |
From: James J. <pu...@us...> - 2003-05-24 17:13:09
|
Update of /cvsroot/plib/plib/src/ssg In directory sc8-pr-cvs1:/tmp/cvs-serv28801 Modified Files: ssgEntity.cxx Log Message: More LOS fixes - John Fay ---------------------------------------------------------------------- Index: ssgEntity.cxx =================================================================== RCS file: /cvsroot/plib/plib/src/ssg/ssgEntity.cxx,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- ssgEntity.cxx 21 May 2003 23:41:59 -0000 1.24 +++ ssgEntity.cxx 24 May 2003 17:08:09 -0000 1.25 @@ -380,19 +380,40 @@ sgSetVec3 ( p1, 0.0, 0.0, 0.0 ) ; /* Eye point always at origin */ - /* Get the center of the sphere */ - sgFloat const *center = tmp.getCenter () ; + /* Get the center and square the radius of the sphere */ + sgFloat const *center = tmp.getCenter () ; + sgFloat radius2 = sgSquare ( tmp.getRadius () ) ; /* Calculate the distance from the line to the center of the sphere */ sgVec3 oc ; sgSubVec3 ( oc, p1, center ) ; - float dmin2 = sgSquare ( oc[0] ) + sgSquare ( oc[1] ) + sgSquare ( oc[2] ) - - sgSquare ( oc[0] * s[0] + oc[1] * s[1] + oc[2] * s[2] ) / - ( sgSquare ( s[0] ) + sgSquare ( s[1] ) + sgSquare ( s[2] ) ) ; + /* Check whether the eyepoint is within the sphere */ + sgFloat eye_to_center_squared = sgSquare ( oc[0] ) + sgSquare ( oc[1] ) + sgSquare ( oc[2] ) ; + if ( eye_to_center_squared < radius2 ) + { + stats_los_straddle++ ; + return SSG_STRADDLE ; + } + + /* Calculate the dot product of the vector from the center to the eyepoint and the + * line of sight vector. If this dot product is positive or zero, then the point of + * closest approach to the sphere is behind the eyepoint or at the eyepoint. Since the + * eyepoint is outside the sphere, this means that the line of sight forward from the + * eyepoint will not intersect the sphere. + */ + sgFloat oc_dot_s = oc[0] * s[0] + oc[1] * s[1] + oc[2] * s[2] ; + if ( oc_dot_s >= 0.0 ) + { + stats_los_radius_reject++ ; + return SSG_OUTSIDE ; + } + + float dmin2 = eye_to_center_squared - sgSquare ( oc_dot_s ) / + ( sgSquare ( s[0] ) + sgSquare ( s[1] ) + sgSquare ( s[2] ) ) ; /* Compare minimum distance squared with sphere radius squared */ - if ( dmin2 > sgSquare ( tmp.getRadius () ) ) + if ( dmin2 > radius2 ) { stats_los_radius_reject++; return SSG_OUTSIDE; |