CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

services.h

Go to the documentation of this file.
00001 /*
00002     Copyright (C) 2001 by Norman Krämer
00003 
00004     This library is free software; you can redistribute it and/or
00005     modify it under the terms of the GNU Library General Public
00006     License as published by the Free Software Foundation; either
00007     version 2 of the License, or (at your option) any later version.
00008 
00009     This library is distributed in the hope that it will be useful,
00010     but WITHOUT ANY WARRANTY; without even the implied warranty of
00011     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012     Library General Public License for more details.
00013 
00014     You should have received a copy of the GNU Library General Public
00015     License along with this library; if not, write to the Free
00016     Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00017 */
00018 
00019 #ifndef __CS_IMAP_SYNTAXSERVICE_H__
00020 #define __CS_IMAP_SYNTAXSERVICE_H__
00021 
00026 #include "csutil/scf.h"
00027 #include "csutil/ref.h"
00028 
00029 class csMatrix3;
00030 class csVector3;
00031 class csVector2;
00032 class csVector;
00033 class csColor;
00034 class csBox3;
00035 struct iPolygon3DStatic;
00036 struct iEngine;
00037 struct iSector;
00038 struct iMaterialWrapper;
00039 struct iThingFactoryState;
00040 struct iLoaderContext;
00041 struct iDocumentNode;
00042 
00045 
00046 #define CSTEX_UV 1  
00047 
00048 #define CSTEX_V1 2  
00049 
00050 #define CSTEX_V2 4  
00051 
00052 #define CSTEX_UV_SHIFT 8 
00053 
00055 SCF_VERSION (iSyntaxService, 1, 2, 0);
00056 
00061 struct iSyntaxService : public iBase
00062 {
00077   virtual bool ParseBool (iDocumentNode* node, bool& result,
00078         bool def_result) = 0;
00079   
00083   virtual bool ParseMatrix (iDocumentNode* node, csMatrix3 &m) = 0;
00084 
00088   virtual bool ParseVector (iDocumentNode* node, csVector3 &v) = 0;
00089 
00093   virtual bool ParseBox (iDocumentNode* node, csBox3 &v) = 0;
00094 
00098   virtual bool ParseColor (iDocumentNode* node, csColor &c) = 0;
00099 
00103   virtual bool ParseMixmode (iDocumentNode* node, uint &mixmode) = 0;
00104 
00126   virtual bool ParseTextureMapping (iDocumentNode* node,
00127                              const csVector3* vref, uint &texspec,
00128                              csVector3 &tx_orig, csVector3 &tx1,
00129                              csVector3 &tx2, csVector3 &len,
00130                              csMatrix3 &tx_m, csVector3 &tx_v,
00131                              csVector2 &uv_shift,
00132                              int &idx1, csVector2 &uv1,
00133                              int &idx2, csVector2 &uv2,
00134                              int &idx3, csVector2 &uv3,
00135                              const char *polyname) = 0;
00136 
00141   virtual  bool ParsePortal (iDocumentNode* node, iLoaderContext* ldr_context,
00142                            iPolygon3DStatic* poly3d,
00143                            csVector &flags, bool &mirror,
00144                            bool& warp, int& msv,
00145                            csMatrix3 &m, csVector3 &before,
00146                            csVector3 &after) = 0;
00147 
00148 
00152   virtual bool ParsePoly3d (iDocumentNode* node,
00153                             iLoaderContext* ldr_context,
00154                             iEngine* engine, iPolygon3DStatic* poly3d,
00155                             float default_texlen,
00156                             iThingFactoryState* thing_fact_state,
00157                             int vt_offset) = 0;
00158 
00162   virtual void ReportError (const char* msgid, iDocumentNode* errornode,
00163         const char* msg, ...) CS_GNUC_PRINTF(4,5) = 0;
00164 
00169   virtual void ReportBadToken (iDocumentNode* badtokennode) = 0;
00170 
00174   virtual void Report (const char* msgid, int severity, 
00175     iDocumentNode* errornode, const char* msg, ...) CS_GNUC_PRINTF(5,6) = 0;
00176 };
00177 
00180 #endif // __CS_IMAP_SYNTAXSERVICE_H__
00181 

Generated for Crystal Space by doxygen 1.2.14