r481: no message
authorKevin M. Rosenberg <kevin@rosenberg.net>
Fri, 2 Feb 2001 21:50:18 +0000 (21:50 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Fri, 2 Feb 2001 21:50:18 +0000 (21:50 +0000)
msvc/ctsim/ctsim.plg
src/ctsim.cpp
src/graph3dview.cpp

index f34e15aed6c21a8dfd849e57818b393030d7067f..2f87449ddbc54a2c97b91877de4f48a4749f7247 100644 (file)
@@ -6,13 +6,13 @@
 --------------------Configuration: ctsim - Win32 Debug--------------------
 </h3>
 <h3>Command Lines</h3>
-Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPAC.tmp" with contents
+Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPF.tmp" with contents
 [
-/nologo /G6 /MTd /W3 /Gm /Gi /GR /GX /Zi /Od /Gy /I "\wx2.2.5\include" /I "..\..\..\fftw-2.1.3\fftw" /I "\wx2.2.5\src\png" /I "\wx2.2.5\src\zlib" /I "..\..\include" /I "..\..\getopt" /I "..\..\..\fftw-2.1.3\rfftw" /D VERSION=\"3.0.0beta1\" /D "_DEBUG" /D "__WXMSW__" /D "HAVE_SGP" /D "HAVE_PNG" /D "HAVE_WXWINDOWS" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "HAVE_STRING_H" /D "HAVE_FFTW" /D "HAVE_RFFTW" /D "HAVE_GETOPT_H" /D "MSVC" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D CTSIMVERSION=\"3.0.0beta1\" /FR"Debug/" /Fp"Debug/ctsim.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c 
-"C:\ctsim\src\graph3dview.cpp"
+/nologo /G6 /MTd /W3 /Gm /Gi /GR /GX /Zi /Od /Gy /I "\wx2.2.5\include" /I "..\..\..\fftw-2.1.3\fftw" /I "\wx2.2.5\src\png" /I "\wx2.2.5\src\zlib" /I "..\..\include" /I "..\..\getopt" /I "..\..\..\fftw-2.1.3\rfftw" /D VERSION=\"3.0.0beta1\" /D "_DEBUG" /D "__WXMSW__" /D "HAVE_SGP" /D "HAVE_PNG" /D "HAVE_WXWINDOWS" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "HAVE_STRING_H" /D "HAVE_FFTW" /D "HAVE_RFFTW" /D "HAVE_GETOPT_H" /D "MSVC" /D "__WIN95__" /D "__WIN32__" /D WINVER=0x0400 /D "STRICT" /D CTSIMVERSION=\"3.0.0alpha5\" /FR"Debug/" /Fp"Debug/ctsim.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c 
+"C:\ctsim\src\ctsim.cpp"
 ]
-Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPAC.tmp" 
-Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPAD.tmp" with contents
+Creating command line "cl.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPF.tmp" 
+Creating temporary file "C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP10.tmp" with contents
 [
 comctl32.lib winmm.lib rpcrt4.lib ws2_32.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 ../libctsim/Debug/libctsim.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 libcmtd.lib ..\..\..\fftw-2.1.3\Win32\FFTW2st\Debug\FFTW2st.lib ..\..\..\fftw-2.1.3\Win32\RFFTW2st\Debug\RFFTW2st.lib wxd.lib xpmd.lib tiffd.lib zlibd.lib pngd.lib opengl32.lib glu32.lib /nologo /subsystem:windows /incremental:yes /pdb:"Debug/ctsim.pdb" /debug /machine:I386 /out:"Debug/ctsim.exe" /pdbtype:sept /libpath:"\wx2.2.5\lib" 
 .\Debug\ctsim.obj
@@ -33,28 +33,16 @@ comctl32.lib winmm.lib rpcrt4.lib ws2_32.lib kernel32.lib user32.lib gdi32.lib w
 \wx2.2.5\lib\zlibd.lib
 \wx2.2.5\lib\tiffd.lib
 ]
-Creating command line "link.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSPAD.tmp"
+Creating command line "link.exe @C:\DOCUME~1\kevin\LOCALS~1\Temp\RSP10.tmp"
 <h3>Output Window</h3>
 Compiling...
-graph3dview.cpp
-C:\ctsim\src\graph3dview.cpp(287) : warning C4101: 'n2' : unreferenced local variable
-C:\ctsim\src\graph3dview.cpp(287) : warning C4101: 'n3' : unreferenced local variable
-C:\ctsim\src\graph3dview.cpp(287) : warning C4101: 'n4' : unreferenced local variable
-C:\ctsim\src\graph3dview.cpp(424) : warning C4305: 'initializing' : truncation from 'const double' to 'float'
-C:\ctsim\src\graph3dview.cpp(424) : warning C4305: 'initializing' : truncation from 'const double' to 'float'
-C:\ctsim\src\graph3dview.cpp(424) : warning C4305: 'initializing' : truncation from 'const double' to 'float'
-C:\ctsim\src\graph3dview.cpp(431) : warning C4305: 'initializing' : truncation from 'const double' to 'float'
-C:\ctsim\src\graph3dview.cpp(431) : warning C4305: 'initializing' : truncation from 'const double' to 'float'
-C:\ctsim\src\graph3dview.cpp(431) : warning C4305: 'initializing' : truncation from 'const double' to 'float'
-C:\ctsim\src\graph3dview.cpp(432) : warning C4305: 'initializing' : truncation from 'const double' to 'float'
-C:\ctsim\src\graph3dview.cpp(432) : warning C4305: 'initializing' : truncation from 'const double' to 'float'
-C:\ctsim\src\graph3dview.cpp(432) : warning C4305: 'initializing' : truncation from 'const double' to 'float'
+ctsim.cpp
 Linking...
 
 
 
 <h3>Results</h3>
-ctsim.exe - 0 error(s), 12 warning(s)
+ctsim.exe - 0 error(s), 0 warning(s)
 </pre>
 </body>
 </html>
index 6a1e1117abff5458f4284552796b6ce0e3c86f68..d9e3171485af6d47eb45613db6c6cf5cdda06a29 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (C) 1983-2000 Kevin Rosenberg
 **
-**  $Id: ctsim.cpp,v 1.64 2001/01/31 01:01:22 kevin Exp $
+**  $Id: ctsim.cpp,v 1.65 2001/02/02 21:50:18 kevin Exp $
 **
 **  This program is free software; you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License (version 2) as
@@ -70,7 +70,7 @@
 #endif
 #endif
 
-static const char* rcsindent = "$Id: ctsim.cpp,v 1.64 2001/01/31 01:01:22 kevin Exp $";
+static const char* rcsindent = "$Id: ctsim.cpp,v 1.65 2001/02/02 21:50:18 kevin Exp $";
 
 struct option CTSimApp::ctsimOptions[] = 
 {
@@ -385,10 +385,21 @@ MainFrame::MainFrame(wxDocManager *manager, wxFrame *frame, wxWindowID id, const
 MainFrame::~MainFrame()
 {
   m_bShuttingDown = true; // Currently used so that Log Window will close
+
+  // delete all non-modified documents
+       wxList& rListDocs = theApp->getDocManager()->GetDocuments();
+       for (wxNode* pNode = rListDocs.GetFirst(); pNode != NULL; pNode = pNode->GetNext()) {
+               wxDocument* pDoc = static_cast<wxDocument*>(pNode->GetData());
+    if (! pDoc->IsModified()) {
+      GetDocumentManager()->RemoveDocument(pDoc);
+      delete pDoc;
+    }
+       }
+  ::wxYield();
        if (theApp->getConfig())
-               theApp->getDocManager()->FileHistorySave (*theApp->getConfig());
-       delete theApp->getDocManager();
-       
+               GetDocumentManager()->FileHistorySave (*theApp->getConfig());
+  ::wxYield();
+       delete theApp->getDocManager(); 
 }
 
 void
index c9b28f70e0bf6e4fd4ac571d682a94fce2c38f30..74f51dea6f81dfb3155c2efa038835685f8d4b4a 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (c) 1983-2001 Kevin Rosenberg
 **
-**  $Id: graph3dview.cpp,v 1.5 2001/02/02 00:46:38 kevin Exp $
+**  $Id: graph3dview.cpp,v 1.6 2001/02/02 21:50:18 kevin Exp $
 **
 **  This program is free software; you can redistribute it and/or modify
 **  it under the terms of the GNU General Public License (version 2) as
@@ -154,10 +154,10 @@ Graph3dFileView::Graph3dFileView ()
   m_bLighting = true;
   m_bSurface = true;
   m_bLighting = true;
-  m_bColor = true;
-  m_dXRotate = 0;
+  m_bColor = false;
+  m_dXRotate = -45;
   m_dYRotate = 0;
-  m_dZRotate = 0;
+  m_dZRotate = -45;
 }
 
 Graph3dFileView::~Graph3dFileView()
@@ -423,8 +423,10 @@ Graph3dFileView::InitMaterials()
 #if 1
   static float ambient[] = {0.1, 0.1, 0.1, 1.0};
   static float diffuse[] = {1.0, 1.0, 1.0, 1.0};
-  static float position0[] = {0, 0, -nx/4, 0, 0.0};
-  static float position1[] = {nx/2, ny/2, nx/4, 0.0};
+  static float position0[] = {0, 0, -nx/2, 0, 0.0};
+  static float position1[] = {0, 0, nx/2, 0.0};
+  static float ambient1[] = {0.5, 0.5, 0.5, 1.0};
+  static float diffuse1[] = {1.0, 1.0, 1.0, 1.0};
   //  static float position0[] = {0.0, 0.0, 20.0, 0.0};
   //  static float position1[] = {0.0, 0.0, -20.0, 0.0};
   static float front_mat_shininess[] = {5.0};
@@ -438,13 +440,17 @@ Graph3dFileView::InitMaterials()
   static float lmodel_ambient[] = {1.0, 1.0, 1.0, 1.0};
   static float lmodel_twoside[] = {GL_FALSE};
   
+  glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
+  glHint(GL_LINE_SMOOTH, GL_DONT_CARE);
+  glEnable(GL_NORMALIZE);
+  
   glLightfv (GL_LIGHT0, GL_AMBIENT, ambient);
   glLightfv (GL_LIGHT0, GL_DIFFUSE, diffuse);
   glLightfv (GL_LIGHT0, GL_POSITION, position0);
   glEnable (GL_LIGHT0);
   
-  glLightfv (GL_LIGHT1, GL_AMBIENT, ambient);
-  glLightfv (GL_LIGHT1, GL_DIFFUSE, diffuse);
+  glLightfv (GL_LIGHT1, GL_AMBIENT, ambient1);
+  glLightfv (GL_LIGHT1, GL_DIFFUSE, diffuse1);
   glLightfv (GL_LIGHT1, GL_POSITION, position1);
   glEnable (GL_LIGHT1);
   
@@ -596,6 +602,7 @@ Graph3dFileView::OnClose (bool deleteWindow)
   
   Activate (false);
   if (m_pCanvas) {
+//    m_pCanvas->Show(false);
     m_pCanvas->setView(NULL);
     m_pCanvas = NULL;
   }
@@ -606,10 +613,11 @@ Graph3dFileView::OnClose (bool deleteWindow)
   SetFrame(NULL);
   
   if (deleteWindow) {
-    m_pFrame->Destroy();
+//    m_pFrame->Show(false);
+    delete m_pFrame; //->Destroy();
     m_pFrame = NULL;
-    if (GetDocument() && GetDocument()->getBadFileOpen())
-      ::wxYield();  // wxWindows bug workaround
+//    if (GetDocument() && GetDocument()->getBadFileOpen())
+//      ::wxYield();  // wxWindows bug workaround
   }
   
   return true;