#if !defined( AFX_DPATCH_H__26C6B083_CE5B_420B_836B_1DDA733C04CE__INCLUDED_ )
#define AFX_DPATCH_H__26C6B083_CE5B_420B_836B_1DDA733C04CE__INCLUDED_
-#include "StdAfx.h" // Added by ClassView
-#if _MSC_VER > 1000
-#pragma once
-#endif // _MSC_VER > 1000
+#include <list>
+#include <stdlib.h>
typedef struct
{
int pos2;
} patch_merge_t;
+typedef struct {
+ float xyz[3];
+ float st[2];
+ float normal[3];
+ float lightmap[2];
+} drawVert_t;
+
+namespace scene
+{
+class Node;
+class Instance;
+}
+
+#define MAX_PATCH_WIDTH 32
+#define MAX_PATCH_HEIGHT 32
+#define MIN_PATCH_WIDTH 3
+#define MIN_PATCH_HEIGHT 3
+
class DPatch
{
public:
-list<DPatch> Split( bool rows, bool cols );
+std::list<DPatch> SplitRows();
+std::list<DPatch> SplitCols();
+std::list<DPatch> 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 );
-void RemoveFromRadiant( void );
-brush_t* QER_brush;
-void LoadFromBrush_t( brush_t* brush );
-patchMesh_t* QER_patch;
-void BuildInRadiant( void* entity = NULL );
+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;