| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
#include "globaldefs.h" |
| 26 |
|
| 27 |
|
| 28 |
#include <stdio.h> |
| 29 |
#include <stdlib.h> |
| 30 |
|
| 31 |
#if !GDEF_OS_WINDOWS |
| 32 |
|
| 33 |
#include "qertypes.h" |
| 34 |
|
| 35 |
typedef void* HMODULE; |
| 36 |
typedef void* LPVOID; |
| 37 |
typedef char* LPCSTR; |
| 38 |
|
| 39 |
#define MB_OK 0x00000000L |
| 40 |
#define MB_OKCANCEL 0x00000001L |
| 41 |
#define MB_ABORTRETRYIGNORE 0x00000002L |
| 42 |
#define MB_YESNOCANCEL 0x00000003L |
| 43 |
#define MB_YESNO 0x00000004L |
| 44 |
#define MB_RETRYCANCEL 0x00000005L |
| 45 |
|
| 46 |
|
| 47 |
#define MB_ICONHAND 0x00000010L |
| 48 |
#define MB_ICONQUESTION 0x00000020L |
| 49 |
#define MB_ICONEXCLAMATION 0x00000030L |
| 50 |
#define MB_ICONASTERISK 0x00000040L |
| 51 |
|
| 52 |
#define MB_USERICON 0x00000080L |
| 53 |
#define MB_ICONWARNING MB_ICONEXCLAMATION |
| 54 |
#define MB_ICONERROR MB_ICONHAND |
| 55 |
#define MB_ICONINFORMATION MB_ICONASTERISK |
| 56 |
#define MB_ICONSTOP MB_ICONHAND |
| 57 |
|
| 58 |
#define MB_TYPEMASK 0x0000000FL |
| 59 |
#define MB_ICONMASK 0x000000F0L |
| 60 |
#define MB_DEFMASK 0x00000F00L |
| 61 |
#define MB_MODEMASK 0x00003000L |
| 62 |
#define MB_MISCMASK 0x0000C000L |
| 63 |
|
| 64 |
#define IDOK 1 |
| 65 |
#define IDCANCEL 2 |
| 66 |
#define IDABORT 3 |
| 67 |
#define IDRETRY 4 |
| 68 |
#define IDIGNORE 5 |
| 69 |
#define IDYES 6 |
| 70 |
#define IDNO 7 |
| 71 |
|
| 72 |
typedef struct tagRECT |
| 73 |
{ |
| 74 |
long left; |
| 75 |
long top; |
| 76 |
long right; |
| 77 |
long bottom; |
| 78 |
} RECT, *PRECT, *LPRECT; |
| 79 |
#endif |
| 80 |
|
| 81 |
|
| 82 |
|
| 83 |
extern "C" void Sys_Printf( char *text, ... ); |
| 84 |
|
| 85 |
#include "synapse.h" |
| 86 |
#include "iplugin.h" |
| 87 |
#include "qerplugin.h" |
| 88 |
#include "mathlib.h" |
| 89 |
#include "igl.h" |
| 90 |
#include "iselectedface.h" |
| 91 |
#include "isurfaceplugin.h" |
| 92 |
#include "iui.h" |
| 93 |
|
| 94 |
|
| 95 |
|
| 96 |
|
| 97 |
|
| 98 |
class CWindowListener : public IWindowListener |
| 99 |
{ |
| 100 |
int refCount; |
| 101 |
public: |
| 102 |
|
| 103 |
void IncRef() { refCount++; } |
| 104 |
|
| 105 |
void DecRef() { |
| 106 |
if ( --refCount <= 0 ) { |
| 107 |
delete this; |
| 108 |
} |
| 109 |
} |
| 110 |
|
| 111 |
bool OnLButtonDown( guint32 nFlags, double x, double y ); |
| 112 |
bool OnMButtonDown( guint32 nFlags, double x, double y ) { return false; } |
| 113 |
bool OnRButtonDown( guint32 nFlags, double x, double y ); |
| 114 |
bool OnLButtonUp( guint32 nFlags, double x, double y ); |
| 115 |
bool OnMButtonUp( guint32 nFlags, double x, double y ) { return false; } |
| 116 |
bool OnRButtonUp( guint32 nFlags, double x, double y ); |
| 117 |
bool OnMouseMove( guint32 nFlags, double x, double y ); |
| 118 |
bool OnKeyPressed( char *s ); |
| 119 |
bool Paint(); |
| 120 |
void Close(); |
| 121 |
}; |
| 122 |
|
| 123 |
#include "2DView.h" |
| 124 |
typedef struct |
| 125 |
{ |
| 126 |
float data[MAX_POINTS_ON_WINDING][2]; |
| 127 |
} CtrlPts_t; |
| 128 |
#include "ControlPointsManager.h" |
| 129 |
|
| 130 |
extern OpenGLBinding g_QglTable; |
| 131 |
extern _QERFuncTable_1 g_FuncTable; |
| 132 |
|
| 133 |
|
| 134 |
extern bool g_bPrefsUpdateCameraView; |
| 135 |
extern _QERSelectedFaceTable g_SelectedFaceTable; |
| 136 |
extern _QERFaceData g_CancelFaceData; |
| 137 |
|
| 138 |
#define Sys_Printf g_FuncTable.m_pfnSysPrintf |
| 139 |
#define Sys_FPrintf g_FuncTable.m_pfnSysFPrintf |
| 140 |
|
| 141 |
|
| 142 |
extern void Textool_Validate(); |
| 143 |
extern void Textool_Cancel(); |
| 144 |
|
| 145 |
class CSynapseClientTexTool : public CSynapseClient |
| 146 |
{ |
| 147 |
public: |
| 148 |
|
| 149 |
bool RequestAPI( APIDescriptor_t *pAPI ); |
| 150 |
const char* GetInfo(); |
| 151 |
|
| 152 |
CSynapseClientTexTool() { } |
| 153 |
virtual ~CSynapseClientTexTool() { } |
| 154 |
}; |
| 155 |
|
| 156 |
extern IWindow *g_pToolWnd; |