SurfacePlugin.cpp (2466B)
1 /* 2 =========================================================================== 3 Copyright (C) 1999-2005 Id Software, Inc. 4 5 This file is part of Quake III Arena source code. 6 7 Quake III Arena source code is free software; you can redistribute it 8 and/or modify it under the terms of the GNU General Public License as 9 published by the Free Software Foundation; either version 2 of the License, 10 or (at your option) any later version. 11 12 Quake III Arena source code is distributed in the hope that it will be 13 useful, but WITHOUT ANY WARRANTY; without even the implied warranty of 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 GNU General Public License for more details. 16 17 You should have received a copy of the GNU General Public License 18 along with Foobar; if not, write to the Free Software 19 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 20 =========================================================================== 21 */ 22 //----------------------------------------------------------------------------- 23 // 24 // $LogFile$ 25 // $Revision: 1.1.1.4 $ 26 // $Author: ttimo $ 27 // $Date: 2000/01/18 00:18:14 $ 28 // $Log: SurfacePlugin.cpp,v $ 29 // Revision 1.1.1.4 2000/01/18 00:18:14 ttimo 30 // merging in for RC 31 // 32 // Revision 1.3 2000/01/17 23:53:43 TBesset 33 // ready for merge in sourceforge (RC candidate) 34 // 35 // Revision 1.2 2000/01/07 16:40:12 TBesset 36 // merged from BSP frontend 37 // 38 // Revision 1.1.1.3 1999/12/29 18:31:46 TBesset 39 // Q3Radiant public version 40 // 41 // Revision 1.1.1.1.2.1 1999/12/29 21:39:42 TBesset 42 // updated to update3 from Robert 43 // 44 // Revision 1.1.1.3 1999/12/29 18:31:46 TBesset 45 // Q3Radiant public version 46 // Revision 1.1.1.3 1999/12/29 18:31:46 TBesset 47 // Q3Radiant public version 48 // 49 // Revision 1.1 1999/12/02 16:11:05 Timo & Christine 50 // commit before e-brain dump 51 // TexTool v1.1 support 52 // 53 // 54 // 55 // DESCRIPTION: 56 // implementation of isurfaceplugin-interface specifics 57 //++timo FIXME: all the patch related stuff needs moving to qerplugin.h 58 59 #include "stdafx.h" 60 61 void WINAPI QERApp_GetTwoSelectedPatch( patchMesh_t **p1, patchMesh_t **p2 ) 62 { 63 *p1 = NULL; *p2 = NULL; 64 for (brush_t *pb = selected_brushes.next ; pb != &selected_brushes ; pb = pb->next) 65 { 66 if (pb->patchBrush) 67 { 68 if (!(*p1)) 69 *p1 = pb->pPatch; 70 else if (!(*p2)) 71 { 72 *p2 = pb->pPatch; 73 return; 74 } 75 } 76 } 77 #ifdef _DEBUG 78 Sys_Printf("WARNING: QERApp_GetTwoSelectedPatch failed (did not find two patches)\n"); 79 #endif 80 return; 81 82 }