home *** CD-ROM | disk | FTP | other *** search
/ Quark 3 / Quark3.iso / KATALOG / ARCHIV / TOOL / T001.ZIP / SOURCE.ZIP / Script.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-05-22  |  2.8 KB  |  97 lines

  1. /*
  2. Copyright (C) Matthew 'pagan' Baranowski & Sander 'FireStorm' van Rossen
  3.  
  4. This program is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU General Public License
  6. as published by the Free Software Foundation; either version 2
  7. of the License, or (at your option) any later version.
  8.  
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12. GNU General Public License for more details.
  13.  
  14. You should have received a copy of the GNU General Public License
  15. along with this program; if not, write to the Free Software
  16. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  17. */
  18.  
  19. #ifndef _RENDERPASS_H_
  20. #define _RENDERPASS_H_
  21.  
  22. enum typeTextureEnum
  23. {
  24.     texture_normal, texture_alpha, texture_anim
  25. };
  26.  
  27. class RenderPass
  28. {
  29. public:
  30.     //tcMod - texcoords
  31.     float            rp_rotate,rp_scalex,rp_scaley,rp_scrollx,rp_scrolly,
  32.                     //i don't know what the values a-d are for.
  33.                     rp_turba,rp_turbb,rp_turbc,rp_turbd,
  34.                     //i don't know what the values a-d are for.
  35.                     rp_stretchsina,rp_stretchsinb,rp_stretchsinc,rp_stretchsind;
  36.     //various gl functions
  37.     GLenum            blend_sfactor,blend_dfactor,alpha_func,depth_func;
  38.     GLclampf        alpha_ref;
  39.  
  40.     //misc commands
  41.     bool            rp_detail,rp_depthwrite,rp_clamptexcoords;
  42.  
  43.     NodeDictionary    AnimationFramesNames;
  44.     NodeDictionary    AnimationFramesBuffers;
  45.     int                AnimationFramesNum;
  46.     char*            AlphaName;
  47.     GLuint            AlphaBuffer;
  48.     char*            TextureName;
  49.     GLuint            TextureBuffer;
  50.  
  51.     typeTextureEnum    typeTexture;
  52.  
  53.     RenderPass();
  54.     void            AddParam( char* Type, char* Var );
  55. };
  56.  
  57. typedef RenderPass*    RenderPassPtr;
  58.  
  59. enum culltype {cull_normal,cull_none, cull_disable, cull_twosided, cull_backsided, cull_back};
  60.  
  61. class Surface
  62. {
  63. public:
  64.     //surfaceparam
  65.     bool            sp_trans      ,sp_metalsteps,sp_nolightmap,sp_nodraw    ,sp_noimpact,
  66.                     sp_nonsolid   ,sp_nomarks   ,sp_nodrop    ,sp_nodamage  ,sp_playerclip,
  67.                     sp_structural ,sp_slick     ,sp_origin    ,sp_areaportal,sp_fog,
  68.                     sp_lightfilter,sp_water     ,sp_slime     ,sp_sky       ,sp_lava,
  69.                     sf_light1;
  70.     //cull
  71.     culltype        cull;
  72.  
  73.     //misc commands
  74.     bool            sf_portal,sf_fogonly,sf_nomipmaps,sf_polygonOffset,
  75.                     sf_lightning,sf_backsided,sf_qer_nocarve;
  76.     float            sf_light,sf_tesssize,sf_sort,sf_qer_trans,sf_q3map_backsplash,
  77.                     sf_q3map_surfacelight;
  78.     char            *sf_sky,*sf_q3map_lightimage,*sf_qer_editorimage,
  79.                     *sf_qer_lightimage;
  80.  
  81.     NodeDictionary    RenderPasses;
  82.     UINT32            pass_num;
  83.  
  84.     Surface();
  85.     ~Surface();
  86.     void            AddParam( char* Type, char* Var );
  87.     void            AddPass    ( RenderPass* Pass );
  88.     void            LoadTextures();
  89.     void            DestroyTextures();
  90. };
  91.  
  92. typedef Surface*    SurfacePtr;
  93.  
  94. Surface*    LoadSurface( char* filename );
  95. void        freeSurface( Surface* );
  96.  
  97. #endif //_RENDERPASS_H_