Code Search for Developers
 
 
  

ksaveddatamanager.cpp from Spatial Knowledge Experiments at Krugle


Show ksaveddatamanager.cpp syntax highlighted

/*
    Copyright (C) 2003, 2004, 2005 by Luca Cappa
    Written by Luca Cappa groton@users.sourceforge.net
  
    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., 675 Mass Ave, Cambridge, MA 02139, USA.
*/

#include "cssysdef.h"
#include "csutil/sysfunc.h"
#include "cstool/csview.h"
#include "cstool/initapp.h"

#include "csutil/cmdhelp.h"
#include "csutil/scfstr.h"

#include "ivideo/graph3d.h"
#include "ivideo/graph2d.h"
#include "ivideo/natwin.h"
#include "ivideo/txtmgr.h"
#include "ivideo/fontserv.h"
#include "ivaria/conout.h"
#include "imesh/sprite2d.h"

#include "imesh/ball.h"
#include "imesh/object.h"

#include "imap/loader.h"
#include "iengine/mesh.h"
#include "iengine/engine.h"
#include "iengine/sector.h"
#include "iengine/camera.h"
#include "iengine/movable.h"
#include "iengine/material.h"
#include "iengine/mesh.h"

#include "imesh/thing.h"

#include "ivaria/reporter.h"

#include "igraphic/imageio.h"
#include "iutil/comp.h"
#include "iutil/eventh.h"
#include "iutil/eventq.h"
#include "iutil/event.h"
#include "iutil/objreg.h"
#include "iutil/csinput.h"
#include "iutil/virtclk.h"
#include "iutil/vfs.h"
#include "iutil/databuff.h"

#include "csutil/cscolor.h"
#include "csutil/cmdhelp.h"
#include "csutil/cspmeter.h"
#include "csutil/csstring.h"
#include "csutil/stringarray.h"
#include "csutil/scfstr.h"
#include "csutil/xmltiny.h"

#include "cstool/csview.h"
#include "cstool/initapp.h"
#include "cstool/collider.h"

#include "iutil/vfs.h"
#include "iutil/eventq.h"
#include "iutil/event.h"
#include "iutil/objreg.h"
#include "iutil/csinput.h"
#include "iutil/virtclk.h"
#include "iutil/plugin.h"
#include "iutil/string.h"


#include "iengine/sector.h"
#include "iengine/engine.h"
#include "iengine/camera.h"
#include "iengine/light.h"
#include "iengine/texture.h"
#include "iengine/mesh.h"
#include "iengine/movable.h"
#include "iengine/material.h"

#include "imesh/thing.h"
#include "imesh/object.h"
#include "imesh/sprite3d.h"


#include "ivideo/graph3d.h"
#include "ivideo/graph2d.h"
#include "ivideo/natwin.h"
#include "ivideo/txtmgr.h"
#include "ivideo/texture.h"
#include "ivideo/material.h"
#include "ivideo/fontserv.h"

#include "igraphic/imageio.h"

#include "imap/loader.h"

#include "ivaria/reporter.h"
#include "ivaria/stdrep.h"
#include "ivaria/conout.h"
#include "ivaria/reporter.h"
#include "ivaria/stdrep.h"
#include "ivaria/collider.h"

#include "csgeom/quaterni.h"
#include "csgeom/transfrm.h"
#include "csgeom/math3d_d.h"
#include "csgeom/math3d.h"

#include "igeom/polymesh.h"

#include "imap/loader.h"


#include "iaws/aws.h"
#include "iaws/awscnvs.h"



//My own includes
#include "ske.h"
#include "kxmlhelper.h"
//Includes for this file.
#include "ksaveddatamanager.h"



char* KSavedDataManager::s_fileLevels = "/SKE/level.xml";
char* KSavedDataManager::s_filePaths = "/SKE/path.xml";
char* KSavedDataManager::s_fileInitPoss = "/SKE/initpos.xml";
char* KSavedDataManager::s_fileLandmarks = "/SKE/landmarkslist.xml";




SCF_IMPLEMENT_IBASE (KSavedDataManager)
  SCF_IMPLEMENTS_INTERFACE (iBase)
SCF_IMPLEMENT_IBASE_END


KSavedDataManager::KSavedDataManager ()
{
  SCF_CONSTRUCT_IBASE (0);

  m_vfs = CS_QUERY_REGISTRY (g_objReg, iVFS);
  m_docSys = CS_QUERY_REGISTRY (g_objReg, iDocumentSystem);
  if (!m_docSys) 
    m_docSys.AttachNew (new csTinyDocumentSystem ());
}

void KSavedDataManager::CreateErrorMessage (iString* p_error,
  const char* p_format, ...) const
{
  if (p_error == 0)
    return;
  
  //
  //@@@ I assume that a string with a length double in respect to the
  //p_format one is always enough!
  char* l_bigString = new char [strlen (p_format) * 2];
  
  va_list l_arg;
  va_start (l_arg, p_format);
  vsprintf (l_bigString, p_format, l_arg);
  va_end (l_arg);

  p_error->Clear ();
  p_error->Append (l_bigString);

  delete[] l_bigString;
}

csPtr<iDocument> KSavedDataManager::ParseFile (const char* p_fileName,
  iString* p_error, bool p_backup) const
{
  csRef<iDataBuffer> l_buffer = m_vfs->ReadFile (p_fileName);
  
  if (p_backup)
  {
    csString l_s;
    l_s.Append (p_fileName);
    l_s.Append (".bak");
    
    m_vfs->WriteFile (l_s.GetData (), (const char*)l_buffer->GetData (),
      l_buffer->GetSize ());
  }//if

  csRef<iDocument> l_doc = m_docSys->CreateDocument ();
  const char* l_error = l_doc->Parse (l_buffer);
  if (l_error != 0)
  {
    CreateErrorMessage (p_error,  "error parsing %s (%s) !", p_fileName, 
      l_error);
    return 0;
  }//if
  return csPtr<iDocument> (l_doc);
}








/*----------------------------------------

   A D D

  ----------------------------------------*/


bool KSavedDataManager::AddInitPos  (const char* p_name,
  iKXMLWriter* p_writer, iString* p_error)
{
  if (p_writer == NULL)
  {
    CreateErrorMessage (p_error, "not valid writer");
    return false;
  }//if

  //
  //Parse the xml file containing all the initPos.
  csRef<iDocument> l_doc = ParseFile (s_fileInitPoss, p_error);
  if(l_doc == NULL)
    return false;
  
  //
  //
  csRef<iDocumentNode> l_initPossNode = l_doc->GetRoot ()->GetNode ("init_positions");
  csRef<iDocumentNode> l_node = KXMLHelper::FindNode (l_initPossNode,
    "init_position", p_name);
  if (l_node != NULL)
  {
    CreateErrorMessage (p_error, "'%s' already exists", p_name);
    return false;
  }//if

  p_writer->Write (l_initPossNode);

  //Re-save the file.
  l_doc->Write (m_vfs, s_fileInitPoss);
  
  return true;
}

bool KSavedDataManager::AddLevel (const char* p_name,
  iKXMLWriter* p_writer, iString* p_error)
{
  if (p_writer == NULL)
  {
    CreateErrorMessage (p_error, "not valid writer");
    return false;
  }//if

  //
  //Parse the xml file containing all the levels.
  csRef<iDocument> l_doc = ParseFile (s_fileLevels, p_error);
  if(l_doc == NULL)
    return false;

  //
  //
  csRef<iDocumentNode> l_levelsNode = l_doc->GetRoot ()->GetNode ("levels");
  csRef<iDocumentNode> l_node = KXMLHelper::FindNode (l_levelsNode,
    "level", p_name);
  if (l_node != NULL)
  {
    CreateErrorMessage (p_error, "'%s' already exists", p_name);
    return false;
  }//if

  p_writer->Write (l_levelsNode);
  
  //Re-save the file.
  l_doc->Write (m_vfs, s_fileLevels);
  
  return true;
}

bool KSavedDataManager::AddLandmarksList (const char* p_name,
  iKXMLWriter* p_writer, iString* p_error)
{
  if (p_writer == NULL)
  {
    CreateErrorMessage (p_error, "not valid writer");
    return false;
  }//if

  //
  //Parse the xml file containing all the landmarks.
  csRef<iDocument> l_doc = ParseFile (s_fileLandmarks, p_error);
  if(l_doc == NULL)
    return false;
  
  //
  //
  csRef<iDocumentNode> l_lmsListNode = l_doc->GetRoot ()->GetNode 
    ("landmarks");
  csRef<iDocumentNode> l_node = KXMLHelper::FindNode (l_lmsListNode,
    "landmarks_list", p_name);
  if (l_node != NULL)
  {
    CreateErrorMessage (p_error, "'%s' already exists", p_name);
    return false;
  }//if

  p_writer->Write (l_lmsListNode);

  //Re-save the file.
  l_doc->Write (m_vfs, s_fileLandmarks);
  
  return true;
}

bool KSavedDataManager::AddPath  (const char* p_name,
  iKXMLWriter* p_writer, iString* p_error)
{
  if (p_writer == NULL)
  {
    CreateErrorMessage (p_error, "not valid writer");
    return false;
  }//if

  //
  //Parse the xml file containing all the paths.
  csRef<iDocument> l_doc = ParseFile (s_filePaths, p_error);
  if(l_doc == NULL)
    return false;

  //
  //
  csRef<iDocumentNode> l_pathsNode = l_doc->GetRoot ()->GetNode 
    ("paths");
  csRef<iDocumentNode> l_node = KXMLHelper::FindNode (l_pathsNode,
    "path", p_name);
  if (l_node != NULL)
  {
    CreateErrorMessage (p_error, "'%s' already exists", p_name);
    return false;
  }//if

  p_writer->Write (l_pathsNode);

  //Re-save the file.
  l_doc->Write (m_vfs, s_filePaths);
  
  return true;
}















/*----------------------------------------

   R E M O V E

  ----------------------------------------*/


bool KSavedDataManager::RemoveInitPos (const char* p_name, iString* p_error)
{
  if (p_name == NULL)
  {
    CreateErrorMessage (p_error, "name not valid removing a initial position");
    return false;
  }//if

  //
  //Parse the xml file containing all the init pos.
  csRef<iDocument> l_doc = ParseFile (s_fileInitPoss, p_error, true);
  if(l_doc == NULL)
    return false;

  //
  //
  csRef<iDocumentNode> l_iPNode = l_doc->GetRoot ()->GetNode ("init_positions");
  csRef<iDocumentNode> l_node = KXMLHelper::FindNode (l_iPNode,
    "init_position", p_name);
  if (l_node != NULL)
  {
    l_node->GetParent ()->RemoveNode (l_node);
    //Re-save the file.
    l_doc->Write (m_vfs, s_fileInitPoss);
    return true;
  }//if
  else
    CreateErrorMessage (p_error,  "initial position called %s not found", p_name);

  return false;
}


bool KSavedDataManager::RemoveLevel (const char* p_name, iString* p_error)
{
  if (p_name == NULL)
  {
    CreateErrorMessage (p_error, "name not valid removing a level");
    return false;
  }//if

  //
  //Parse the xml file containing all the <level>.
  csRef<iDocument> l_doc = ParseFile (s_fileLevels, p_error, true);
  if(l_doc == NULL)
    return false;

  //
  //
  csRef<iDocumentNode> l_levelsNode = l_doc->GetRoot ()->GetNode ("levels");
  csRef<iDocumentNode> l_node = KXMLHelper::FindNode (l_levelsNode,
    "level", p_name);
  if (l_node != NULL)
  {
    l_node->GetParent ()->RemoveNode (l_node);
    //Re-save the file.
    l_doc->Write (m_vfs, s_fileLevels);
    return true;
  }//if
  else
    CreateErrorMessage (p_error,  "level called %s not found", p_name);

  return false;
}

bool KSavedDataManager::RemoveLandmarksList (const char* p_name, 
  iString* p_error)
{
  if (p_name == NULL)
  {
    CreateErrorMessage (p_error, "name not valid removing a landmarks list");
    return false;
  }//if

  //
  //Parse the xml file containing all the <landmarks_list>.
  csRef<iDocument> l_doc = ParseFile (s_fileLandmarks, p_error, true);
  if(l_doc == NULL)
    return false;

  //
  //
  csRef<iDocumentNode> l_lmListNode = l_doc->GetRoot ()->GetNode ("landmarks");
  csRef<iDocumentNode> l_node = KXMLHelper::FindNode (l_lmListNode,
    "landmarks_list", p_name);
  if (l_node != NULL)
  {
    l_node->GetParent ()->RemoveNode (l_node);
    //Re-save the file.
    l_doc->Write (m_vfs, s_fileLandmarks);
    return true;
  }//if
  else
    CreateErrorMessage (p_error,  "landmarks list called %s not found", p_name);

  return false;
}

bool KSavedDataManager::RemovePath (const char* p_name, iString* p_error)
{
  if (p_name == NULL)
  {
    CreateErrorMessage (p_error, "name not valid removing a path");
    return false;
  }//if

  //
  //Parse the xml file containing all the paths.
  csRef<iDocument> l_doc = ParseFile (s_filePaths, p_error, true);
  if(l_doc == NULL)
    return false;


  //
  //
  csRef<iDocumentNode> l_lmListNode = l_doc->GetRoot ()->GetNode ("paths");
  csRef<iDocumentNode> l_node = KXMLHelper::FindNode (l_lmListNode,
    "path", p_name);
  if (l_node != NULL)
  {
    l_node->GetParent ()->RemoveNode (l_node);
    //Re-save the file.
    l_doc->Write (m_vfs, s_filePaths);
    return true;
  }//if
  else
    CreateErrorMessage (p_error,  "path called %s not found", p_name);

  return false;
}





/*----------------------------------------

   R E T R I E V E

  ----------------------------------------*/


bool KSavedDataManager::RetrieveInitPos (const char* p_name, 
  iKXMLReader* p_reader, iString* p_error) const
{
  if (p_reader == NULL)
  {
    CreateErrorMessage (p_error, "not valid reader");
    return false;
  }//if

  //
  //Parse the xml file containing all the init pos.
  csRef<iDocument> l_doc = ParseFile (s_fileInitPoss, p_error);
  if(l_doc == NULL)
    return false;

  //
  //
  csRef<iDocumentNode> l_initPosNode = l_doc->GetRoot ()->GetNode ("init_positions");
  csRef<iDocumentNode> l_node = KXMLHelper::FindNode (l_initPosNode,
    "init_position", p_name);
  if (l_node != NULL)
  {
    return p_reader->Read (l_node);
  }//if
  else
    CreateErrorMessage (p_error,  "init position called %s not found", p_name);

  return false;
}

bool KSavedDataManager::RetrieveLevel (const char* p_name, 
  iKXMLReader* p_reader, iString* p_error) const
{
  if (p_reader == 0)
  {
    CreateErrorMessage (p_error, "not valid reader");
    return false;
  }//if

  //
  //Parse the xml file containing all the landmarks.
  csRef<iDocument> l_doc = ParseFile (s_fileLevels, p_error);
  if(l_doc == NULL)
    return false;

  //
  //
  csRef<iDocumentNode> l_levelsNode = l_doc->GetRoot ()->GetNode ("levels");
  csRef<iDocumentNode> l_node = KXMLHelper::FindNode (l_levelsNode,
    "level", p_name);
  if (l_node != 0)
  {
    return p_reader->Read (l_node);
  }//if
  else
    CreateErrorMessage (p_error,  "level called %s not found", p_name);

  return false;
}

bool KSavedDataManager::RetrieveLandmarksList (const char* p_name, 
  iKXMLReader* p_reader, iString* p_error) const
{
  if (p_reader == NULL)
  {
    CreateErrorMessage (p_error, "not valid reader");
    return false;
  }//if

  //
  //Parse the xml file containing all the landmarks.
  csRef<iDocument> l_doc = ParseFile (s_fileLandmarks, p_error);
  if(l_doc == NULL)
    return false;

  //
  //
  csRef<iDocumentNode> l_lmsNode = l_doc->GetRoot ()->GetNode ("landmarks");
  csRef<iDocumentNode> l_node = KXMLHelper::FindNode (l_lmsNode,
    "landmarks_list", p_name);
  if (l_node != 0)
  {
    return p_reader->Read (l_node);
  }//if
  else
    CreateErrorMessage (p_error,  "landmarks list called %s not found", p_name);

  return false;
}

bool KSavedDataManager::RetrieveLandmark (const char* p_name, 
  iKXMLReader* p_reader, iString* p_error) const
{
  if (p_reader == 0)
  {
    CreateErrorMessage (p_error, "not valid reader");
    return false;
  }//if

  //
  //Parse the xml file containing all the landmarks.
  csRef<iDocument> l_doc = ParseFile (s_fileLandmarks, p_error);
  if(l_doc == 0)
  {
    CreateErrorMessage (p_error, "ParseFile (\"%s\") failed", s_fileLandmarks);
    return false;
  }//if

  //
  //
  csRef<iDocumentNode> l_rootNode = l_doc->GetRoot ();
  csRef<iDocumentNode> l_nodeDefault = KXMLHelper::FindNode (l_rootNode, 
    "default");
  if (l_nodeDefault == 0)
  {
    CreateErrorMessage (p_error, "<default> node not found");
    return false;
  }//if
  csRef<iDocumentNode> l_lmNode = KXMLHelper::FindNode (l_nodeDefault,
    "landmark", p_name);
  if (l_lmNode != 0)
  {
    return p_reader->Read (l_lmNode);
  }//if
  else
  {
    CreateErrorMessage (p_error,  "landmark called %s not found", p_name);
    return false;
  }
}

bool KSavedDataManager::RetrievePath (const char* p_name, 
  iKXMLReader* p_reader, iString* p_error) const
{
  if (p_reader == NULL)
  {
    CreateErrorMessage (p_error, "not valid reader");
    return false;
  }//if

  //
  //Parse the xml file containing all the paths.
  csRef<iDocument> l_doc = ParseFile (s_filePaths, p_error);
  if(l_doc == NULL)
    return false;

  //
  //
  csRef<iDocumentNode> l_pathsNode = l_doc->GetRoot ()->GetNode ("paths");
  csRef<iDocumentNode> l_node = KXMLHelper::FindNode (l_pathsNode,
    "path", p_name);
  if (l_node != NULL)
  {
    return p_reader->Read (l_node);
  }//if
  else
    CreateErrorMessage (p_error,  "path called %s not found", p_name);

  return false;
}

/*----------------------------------------

   R E T R I E V E     L I S T

  ----------------------------------------*/

bool KSavedDataManager::RetrieveInitPossList (csStringArray& l_p,
  iString* p_error) const
{
  //Parse the xml file containing all the landmarks.
  csRef<iDocument> l_doc = ParseFile (s_fileInitPoss, p_error);
  if(l_doc == NULL)
    return false;

  //
  //
  csRef<iDocumentNode> l_iPNode = l_doc->GetRoot ()->GetNode ("init_positions");
  csRef<iDocumentNodeIterator> l_nodeIt = l_iPNode->GetNodes ("init_position");
  while (l_nodeIt->HasNext ())
  {
    csRef<iDocumentNode> l_node = l_nodeIt->Next ();
    l_p.Push (l_node->GetAttributeValue ("name"));
  }//while
  
  return true;
}

bool KSavedDataManager::RetrieveLevelsList (csStringArray& l_p,
  iString* p_error) const
{
  //Parse the xml file containing all the levels.
  csRef<iDocument> l_doc = ParseFile (s_fileLevels, p_error);
  if(l_doc == NULL)
    return false;

  //
  //
  csRef<iDocumentNode> l_levelsNode = l_doc->GetRoot ()->GetNode ("levels");
  csRef<iDocumentNodeIterator> l_nodeIt = l_levelsNode->GetNodes ("level");
  while (l_nodeIt->HasNext ())
  {
    csRef<iDocumentNode> l_node = l_nodeIt->Next ();
    l_p.Push (l_node->GetAttributeValue ("name"));
  }//while
  
  return true;
}

bool KSavedDataManager::RetrieveLandmarksListList (csStringArray& l_p,
  iString* p_error) const
{
  //Parse the xml file containing all the levels.
  csRef<iDocument> l_doc = ParseFile (s_fileLandmarks, p_error);
  if(l_doc == NULL)
    return false;

  //
  //
  csRef<iDocumentNode> l_levelsNode = l_doc->GetRoot ()->GetNode 
    ("landmarks");
  csRef<iDocumentNodeIterator> l_nodeIt = l_levelsNode->GetNodes 
    ("landmarks_list");
  while (l_nodeIt->HasNext ())
  {
    csRef<iDocumentNode> l_node = l_nodeIt->Next ();
    l_p.Push (l_node->GetAttributeValue ("name"));
  }//while
  
  return true;
}

bool KSavedDataManager::RetrievePathsList (csStringArray& l_p,
  iString* p_error) const
{
  //Parse the xml file containing all the levels.
  csRef<iDocument> l_doc = ParseFile (s_filePaths, p_error);
  if(l_doc == NULL)
    return false;

  //
  //
  csRef<iDocumentNode> l_levelsNode = l_doc->GetRoot ()->GetNode ("paths");
  csRef<iDocumentNodeIterator> l_nodeIt = l_levelsNode->GetNodes ("path");
  while (l_nodeIt->HasNext ())
  {
    csRef<iDocumentNode> l_node = l_nodeIt->Next ();
    l_p.Push (l_node->GetAttributeValue ("name"));
  }//while
  
  return true;
}


bool KSavedDataManager::RetrieveDefaultLandmarksList (csStringArray& l_p,
  iString* p_error) const
{
  //Parse the xml file containing all the levels.
  csRef<iDocument> l_doc = ParseFile (s_fileLandmarks, p_error);
  if (l_doc == 0)
    return false;

  //
  //
  csRef<iDocumentNode> l_lmsNode = l_doc->GetRoot ();
  csRef<iDocumentNode> l_ldefLm = KXMLHelper::FindNode (l_lmsNode, "default");
  
  csRef<iDocumentNodeIterator> l_nodeIt = l_ldefLm->GetNodes ("landmark");
  while (l_nodeIt->HasNext ())
  {
    csRef<iDocumentNode> l_node = l_nodeIt->Next ();
    l_p.Push (l_node->GetAttributeValue ("name"));
  }//while
  
  return true;
}




See more files for this project here

Spatial Knowledge Experiments

A simulation of 3D virtual worlds for psychological experiments

Project homepage: http://sourceforge.net/projects/ske
Programming language(s): C,C++,Perl
License: other

  isense/
  joystick/
  Jamfile
  KImageCardinalDirection.h
  SKE.cpp
  SKE.h
  eulerangles.c
  eulerangles.h
  ikdraggable.cpp
  ikdraggable.h
  ikdraghandler.h
  ikmission.h
  ikxmlreader.h
  ikxmlwriter.h
  kappstate.cpp
  kappstate.h
  kbasedraggable.cpp
  kbasedraggable.h
  kbasedraghandler.cpp
  kbasedraghandler.h
  kblock.cpp
  kblock.h
  kblockId.h
  kblockid.cpp
  kcamera.cpp
  kcamera.h
  kcollision.cpp
  kcommandprocessor.cpp
  kcommandprocessor.h
  kconstant.cpp
  kconstant.h
  kcursor3d.cpp
  kcursor3d.h
  kdata.cpp
  kdata.h
  kdatalist.cpp
  kdatalist.h
  kdragmanager.cpp
  kdragmanager.h
  keventhandlermanager.cpp
  keventhandlermanager.h
  kflags.cpp
  kflags.h
  kimagecardinaldirection.cpp
  kkeys.cpp
  kkeys.h
  kkeystate.cpp
  kkeystate.h
  klandmark.cpp
  klandmark.h
  klandmarklist.cpp
  klandmarklist.h
  klight.cpp
  klight.h
  klightlist.cpp
  klightlist.h
  kmap.cpp
  kmap.h
  kmission.cpp
  kmission.h
  kmissiontype.cpp
  kmissiontype.h
  kmode.cpp
  kmode.h
  kmousemanager.cpp
  kmousemanager.h
  kobject3d.cpp
  kobject3d.h
  korientation.cpp
  korientation.h
  kpath.cpp
  kpath.h
  kpathfollower.cpp
  kpathfollower.h
  kplayer.cpp
  kplayer.h
  kposition.cpp
  kposition.h
  kquaternion.cpp
  kquaternion.h
  ksaveddatamanager.cpp
  ksaveddatamanager.h
  ksegment3.h
  ksign.cpp
  ksign.h
  ksprite3d.cpp
  ksprite3d.h
  ksprite3dlist.cpp
  ksprite3dlist.h
  kterrain.cpp
  kterrain.h
  kthing.cpp
  kthing.h
  kutil.cpp
  kutil.h
  kwireframe.cpp
  kwireframe.h
  kxmlhelper.h
  movement1d.h
  movement3d.h
  quattypes.h