X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=contrib%2Fbobtoolz%2FDPatch.h;h=dea1b5768c33c1a42f7e848143e1e0c3588f4c76;hb=318eb70605627162c9aefbaf240697e800e08bd6;hp=63e15eea1a8c89d1a321f1dc8630308e1427756b;hpb=e8f94f12dd4cd3eb53b57ecd619db9b3fbe692ff;p=xonotic%2Fnetradiant.git diff --git a/contrib/bobtoolz/DPatch.h b/contrib/bobtoolz/DPatch.h index 63e15eea..dea1b576 100644 --- a/contrib/bobtoolz/DPatch.h +++ b/contrib/bobtoolz/DPatch.h @@ -1,34 +1,34 @@ /* -BobToolz plugin for GtkRadiant -Copyright (C) 2001 Gordon Biggans + BobToolz plugin for GtkRadiant + Copyright (C) 2001 Gordon Biggans -This library is free software; you can redistribute it and/or -modify it under the terms of the GNU Lesser General Public -License as published by the Free Software Foundation; either -version 2.1 of the License, or (at your option) any later version. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 -Lesser General Public License for more details. + 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 + Lesser General Public License for more details. -You should have received a copy of the GNU Lesser 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 -*/ + You should have received a copy of the GNU Lesser 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 + */ // DPatch.h: interface for the DPatch class. // ////////////////////////////////////////////////////////////////////// -#if !defined(AFX_DPATCH_H__26C6B083_CE5B_420B_836B_1DDA733C04CE__INCLUDED_) +#if !defined( AFX_DPATCH_H__26C6B083_CE5B_420B_836B_1DDA733C04CE__INCLUDED_ ) #define AFX_DPATCH_H__26C6B083_CE5B_420B_836B_1DDA733C04CE__INCLUDED_ #include -#include +#include typedef struct -{ +{ bool mergable; int pos1; int pos2; @@ -38,13 +38,13 @@ typedef struct { float xyz[3]; float st[2]; float normal[3]; - float lightmap[2]; + float lightmap[2]; } drawVert_t; namespace scene { - class Node; - class Instance; +class Node; +class Instance; } #define MAX_PATCH_WIDTH 32 @@ -52,29 +52,29 @@ namespace scene #define MIN_PATCH_WIDTH 3 #define MIN_PATCH_HEIGHT 3 -class DPatch +class DPatch { public: - std::list SplitRows(); - std::list SplitCols(); - std::list Split(); - void Transpose(); - //DPatch* TransposePatch(DPatch* p1); - //void DebugPrint(); - void Invert(); - DPatch* MergePatches(patch_merge_t merge_info, DPatch* p1, DPatch* p2); - patch_merge_t IsMergable(DPatch* other); - bool ResetTextures(const char *oldTextureName, const char *newTextureName); - scene::Node* QER_entity; - scene::Node* QER_brush; - void LoadFromPatch(scene::Instance& patch); - void BuildInRadiant(scene::Node* entity = NULL); - void SetTexture(const char* textureName); - char texture[256]; - int width, height; - drawVert_t points[MAX_PATCH_WIDTH][MAX_PATCH_HEIGHT]; - DPatch(); - virtual ~DPatch(); +std::list SplitRows(); +std::list SplitCols(); +std::list Split(); +void Transpose(); +//DPatch* TransposePatch(DPatch* p1); +//void DebugPrint(); +void Invert(); +DPatch* MergePatches( patch_merge_t merge_info, DPatch* p1, DPatch* p2 ); +patch_merge_t IsMergable( DPatch* other ); +bool ResetTextures( const char *oldTextureName, const char *newTextureName ); +scene::Node* QER_entity; +scene::Node* QER_brush; +void LoadFromPatch( scene::Instance& patch ); +void BuildInRadiant( scene::Node* entity = NULL ); +void SetTexture( const char* textureName ); +char texture[256]; +int width, height; +drawVert_t points[MAX_PATCH_WIDTH][MAX_PATCH_HEIGHT]; +DPatch(); +virtual ~DPatch(); };