home *** CD-ROM | disk | FTP | other *** search
/ Instant Doom Levels / Instant.Doom.Levels.-.Level.Master.II.iso / EDITORS / ZIPPED / WSCDEU52.ZIP / INCLUDE / OBJECTS.H < prev    next >
C/C++ Source or Header  |  1995-03-05  |  5KB  |  116 lines

  1. /*----------------------------------------------------------------------------*
  2.  | This file is part of WinDEU, the port of DEU to Windows.                   |
  3.  | WinDEU was created by the DEU team:                                        |
  4.  |  Renaud Paquay, Raphael Quinet, Brendon Wyber and others...                |
  5.  |                                                                            |
  6.  | DEU is an open project: if you think that you can contribute, please join  |
  7.  | the DEU team.  You will be credited for any code (or ideas) included in    |
  8.  | the next version of the program.                                           |
  9.  |                                                                            |
  10.  | If you want to make any modifications and re-distribute them on your own,  |
  11.  | you must follow the conditions of the WinDEU license. Read the file        |
  12.  | LICENSE or README.TXT in the top directory.  If do not  have a copy of     |
  13.  | these files, you can request them from any member of the DEU team, or by   |
  14.  | mail: Raphael Quinet, Rue des Martyrs 9, B-4550 Nandrin (Belgium).         |
  15.  |                                                                            |
  16.  | This program comes with absolutely no warranty.  Use it at your own risks! |
  17.  *----------------------------------------------------------------------------*
  18.  
  19.     Project WinDEU
  20.     DEU team
  21.     Jul-Dec 1994, Jan-Mar 1995
  22.  
  23.     FILE:         objects.h
  24. */
  25. #ifndef __objects_h
  26. #define __objects_h
  27.  
  28. #ifndef __common_h
  29.     #include "common.h"
  30. #endif
  31.  
  32. #ifndef __windeu_h
  33.     #include "windeu.h"
  34. #endif
  35.  
  36. #ifndef __levels_h
  37.     #include "levels.h"        // TextureInfo
  38. #endif
  39.  
  40. /* object types */
  41. #define OBJ_THINGS      1
  42. #define OBJ_LINEDEFS        2
  43. #define OBJ_SIDEDEFS        3
  44. #define OBJ_VERTEXES        4
  45. #define OBJ_SEGS        5
  46. #define OBJ_SSECTORS        6
  47. #define OBJ_NODES       7
  48. #define OBJ_SECTORS     8
  49. #define OBJ_REJECT      9
  50. #define OBJ_BLOCKMAP        10
  51.  
  52.  
  53. /*
  54.    the selection list is used when more than one object is selected
  55. */
  56.  
  57. typedef struct SelectionList *SelPtr;
  58. struct SelectionList
  59. {
  60.    SelPtr next;         /* next in list */
  61.    int objnum;          /* object number */
  62. };
  63.  
  64.  
  65. /* from objects.cpp */
  66. void HighlightSelection (TMapDC &dc, int objtype, SelPtr list);
  67. BOOL IsSelected (SelPtr list, SHORT objnum);
  68. void SelectObject (SelPtr *list, SHORT objnum);
  69. void UnSelectObject (SelPtr *list, SHORT objnum);
  70. void ForgetSelection (SelPtr *list);
  71. SHORT GetMaxObjectNum (int objtype);
  72. SHORT GetCurObject (int objtype, SHORT x0, SHORT y0, SHORT x1, SHORT y1);
  73. SelPtr SelectObjectsInBox (int objtype, SHORT x0, SHORT y0, SHORT x1, SHORT y1);
  74. void HighlightObject(TMapDC &dc, int objtype, SHORT objnum, int color);
  75. void DeleteObject (int objtype, SHORT objnum);
  76. void DeleteObjects (int objtype, SelPtr *list);
  77. void InsertObject (int objtype, SHORT copyfrom, SHORT xpos, SHORT ypos);
  78. BOOL IsLineDefInside (SHORT ldnum, SHORT x0, SHORT y0, SHORT x1, SHORT y1);
  79. SHORT GetOppositeSector (SHORT ld1, BOOL firstside);
  80. void CopyObjects (int objtype, SelPtr obj);
  81. BOOL MoveObjectsToCoords (int objtype, SelPtr obj, SHORT newx, SHORT newy, SHORT grid);
  82. void GetObjectCoords (int objtype, SHORT objnum, SHORT *xpos, SHORT *ypos);
  83. void RotateAndScaleObjects (int objtype, SelPtr obj, double angle, double scale);
  84. SHORT FindFreeTag();
  85. void FlipLineDefs (SelPtr obj, BOOL swapvertices);
  86. void DeleteVerticesJoinLineDefs (SelPtr obj);
  87. void MergeVertices (SelPtr *list);
  88. BOOL AutoMergeVertices (SelPtr *list);
  89. void SplitLineDefs (SelPtr obj);
  90. void SplitSector (SHORT vertex1, SHORT vertex2);
  91. void SplitLineDefsAndSector (SHORT linedef1, SHORT linedef2);
  92. void MergeSectors (SelPtr *slist);
  93. void DeleteLineDefsJoinSectors (SelPtr *ldlist);
  94. void MakeDoorFromSector (SHORT sector);
  95. void MakeLiftFromSector (SHORT sector);
  96. SHORT GetTextureRefHeight (SHORT sidedef);
  97. void AlignTexturesY (SelPtr *sdlist);
  98. void AlignTexturesX (SelPtr *sdlist, SHORT type_sd, SHORT type_tex, SHORT type_off);
  99. void DistributeSectorFloors (SelPtr obj);
  100. void DistributeSectorCeilings (SelPtr obj);
  101.  
  102. void GoToObject (int objtype, SHORT objnum);
  103.  
  104. // originaly form editobj.cpp
  105. void InsertRectangle (SHORT xpos, SHORT ypos, SHORT width, SHORT height);
  106. void InsertPolygon (SHORT xpos, SHORT ypos, SHORT nsides, SHORT radius);
  107. BOOL CheckFailed (BOOL fatal, char *format, ...);
  108. BOOL IsTextureNameInList (char *name, TextureInfo **list, SHORT numelems);
  109. void Statistics ();
  110. BOOL CheckSectors ();
  111. BOOL CheckCrossReferences ();
  112. BOOL CheckTextures ();
  113. BOOL CheckTextureNames ();
  114.  
  115.  
  116. #endif