SurfacePlugin.cpp 2.4 KB

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