texpaint.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. /*
  2. ===========================================================================
  3. Copyright (C) 1997-2006 Id Software, Inc.
  4. This file is part of Quake 2 Tools source code.
  5. Quake 2 Tools 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 2 Tools 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 Quake 2 Tools source code; if not, write to the Free Software
  15. Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  16. ===========================================================================
  17. */
  18. #include "cmdlib.h"
  19. #include "mathlib.h"
  20. #include "lbmlib.h"
  21. #include "trilib.h"
  22. #include "l3dslib.h"
  23. #include <windows.h>
  24. #include <GL/gl.h>
  25. #include <GL/glu.h>
  26. #include <GL/glaux.h>
  27. #include "resource.h"
  28. #include "afxres.h"
  29. extern HINSTANCE main_instance;
  30. extern HGLRC baseRC;
  31. extern HWND mainwindow;
  32. extern HWND camerawindow;
  33. extern HWND palettewindow;
  34. extern HWND skinwindow;
  35. extern int screen_width, screen_height;
  36. #define QE3_STYLE (WS_OVERLAPPED| WS_CAPTION | WS_THICKFRAME | \
  37. /* WS_MINIMIZEBOX | */ WS_MAXIMIZEBOX | WS_CLIPSIBLINGS | \
  38. WS_CLIPCHILDREN | WS_CHILD)
  39. extern byte pic[1024*512];
  40. extern unsigned rgb[1024*512];
  41. extern unsigned index_texture[1024*512];
  42. extern byte palette[768];
  43. extern triangle_t *faces;
  44. extern int numfaces;
  45. extern float tmcoords[10000][3][2];
  46. extern int skinwidth, skinheight;
  47. extern int picwidth, picheight;
  48. extern int width, height;
  49. extern int iwidth, iheight;
  50. extern int width2, height2; // padded to ^2
  51. extern char tri_filename[1024];
  52. extern char skin_filename[1024];
  53. extern int selected_index;
  54. extern unsigned selected_rgb;
  55. extern qboolean model_lines;
  56. extern qboolean skin_lines;
  57. extern qboolean modified;
  58. extern qboolean modified_past_autosave;
  59. #define TEXTURE_SKIN 1
  60. #define TEXTURE_INDEX 2
  61. #define MENU_VIEW 2
  62. #define MODEL_DISPLAYLIST 1
  63. typedef void (APIENTRY *BINDTEXFUNCPTR)(GLenum, GLuint);
  64. extern BINDTEXFUNCPTR BindTextureEXT;