messages.cpp 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. #include "messages.h"
  2. // AJM: because these are repeated, they use up redundant memory.
  3. // consequently ive made them into const strings which each occurance can point to.
  4. // Common descriptions
  5. const char* const internallimit = "The compiler tool hit an internal limit.";
  6. const char* const internalerror = "The compiler tool had an internal error.";
  7. const char* const maperror = "The map has a problem which must be fixed.";
  8. // Common explanations
  9. #define contact contactmerl //"contact [email protected] immidiately"
  10. const char* const selfexplanitory = "self explanitory";
  11. const char* const reference = "Check the files http://www.zhlt.info/common-mapping-problems.html\n and http://www.slackiller.com/tommy14/errors.htm for a detailed\n explanation of this problem.";
  12. const char* const simplify = "The map is too complex for the game engine/compile tools to handle. Simplify";
  13. const char* const contactmerl = "contact [email protected] concerning this issue.";
  14. static const MessageTable_t assumes[assume_last] = {
  15. {"invalid assume message", "This message should never be printed.", contact},
  16. // generic
  17. {"Memory allocation failure", "The program failed to allocate a block of memory.",
  18. "Likely causes are (in order of likeliness) : the partition holding the swapfile is full; swapfile size is smaller than required; memory fragmentation; heap corruption"},
  19. {"NULL Pointer", internalerror, contact},
  20. {"Bad Thread Workcount", internalerror, contact},
  21. // qcsg
  22. {"Missing '[' in texturedef (U)", maperror, reference},
  23. {"plane with no normal", maperror, reference},
  24. {"brush with coplanar faces", maperror, reference},
  25. {"brush outside world", maperror, reference},
  26. {"mixed face contents", maperror, reference},
  27. {"Brush type not allowed in world", maperror, reference},
  28. {"Brush type not allowed in entity", maperror, reference},
  29. {"No visible brushes", "All brushes are CLIP or ORIGIN (at least one must be normal/visible)", selfexplanitory},
  30. {"Entity with ONLY an ORIGIN brush", "All entities need at least one visible brush to function properly. CLIP, HINT, ORIGIN, do not count as visible brushes.", selfexplanitory},
  31. {"Could not find WAD file", "The compile tools could not locate a wad file that the map was referencing.", "Make sure the wads listed in the level editor actually all exist."},
  32. {"Exceeded MAX_TRIANGLES", internallimit, contact},
  33. {"Exceeded MAX_SWITCHED_LIGHTS", "The maximum number of switchable light entities has been reached", selfexplanitory},
  34. {"Exceeded MAX_TEXFILES", internallimit, contact},
  35. // qbsp
  36. {"LEAK in the map", maperror, reference},
  37. {"Exceeded MAX_LEAF_FACES", "This error is almost always caused by an invalid brush, by having huge rooms, or scaling a texture down to extremely small values (between -1 and 1)",
  38. "Find the invalid brush. Any imported prefabs, carved brushes, or vertex manipulated brushes should be suspect"},
  39. {"Exceeded MAX_WEDGES", internallimit, contact},
  40. {"Exceeded MAX_WVERTS", internallimit, contact},
  41. {"Exceeded MAX_SUPERFACEEDGES", internallimit, contact},
  42. {"Empty Solid Entity", "A solid entity in the map (func_wall for example) has no brushes.", "If using Worldcraft, do a check for problems and fix any occurences of 'Empty solid'"},
  43. // vis
  44. {"Leaf portal saw into leaf", maperror, reference},
  45. {"Exceeded MAX_PORTALS_ON_LEAF", maperror, reference},
  46. {"Invalid client/server state", internalerror, contact},
  47. // qrad
  48. {"Exceeded MAX_TEXLIGHTS", "The maximum number of texture lights in use by a single map has been reached",
  49. "Use fewer texture lights."},
  50. {"Exceeded MAX_PATCHES", maperror, reference},
  51. {"Transfer < 0", internalerror, contact},
  52. {"Bad Surface Extents", maperror, reference},
  53. {"Malformed face normal", "The texture alignment of a visible face is unusable", "If using Worldcraft, do a check for problems and fix any occurences of 'Texture axis perpindicular to face'"},
  54. {"No Lights!", "lighting of map halted (I assume you do not want a pitch black map!)", "Put some lights in the map."},
  55. {"Bad Light Type", internalerror, contact},
  56. {"Exceeded MAX_SINGLEMAP", internallimit, contact},
  57. // common
  58. {"Unable to create thread", internalerror, contact},
  59. {"Exceeded MAX_MAP_PLANES", "The maximum number of plane definitions has been reached",
  60. "The map has grown too complex"},
  61. {"Exceeded MAX_MAP_TEXTURES", "The maximum number of textures for a map has been reached", selfexplanitory},
  62. {"Exceeded MAX_MAP_MIPTEX", "Texture memory usage on the map has exceeded the limit",
  63. "Merge similar textures, remove unused textures from the map"},
  64. {"Exceeded MAX_MAP_TEXINFO", internallimit, contact},
  65. {"Exceeded MAX_MAP_SIDES", internallimit, contact},
  66. {"Exceeded MAX_MAP_BRUSHES", "The maximum number of brushes for a map has been reached", selfexplanitory},
  67. {"Exceeded MAX_MAP_ENTITIES", "The maximum number of entities for the compile tools has been reached", selfexplanitory},
  68. {"Exceeded MAX_ENGINE_ENTITIES", "The maximum number of entities for the half-life engine has been reached", selfexplanitory},
  69. {"Exceeded MAX_MAP_MODELS", "The maximum number of brush based entities has been reached",
  70. "Remove unnecessary brush entities, consolidate similar entities into a single entity"},
  71. {"Exceeded MAX_MAP_VERTS", internallimit, contact},
  72. {"Exceeded MAX_MAP_EDGES", internallimit, contact},
  73. {"Exceeded MAX_MAP_CLIPNODES", maperror, reference},
  74. {"Exceeded MAX_MAP_MARKSURFACES", internallimit, contact},
  75. {"Exceeded MAX_MAP_FACES", "The maximum number of faces for a map has been reached", "This error is typically caused by having a large face with a small texture scale on it, or overly complex maps."},
  76. {"Exceeded MAX_MAP_SURFEDGES", internallimit, contact},
  77. {"Exceeded MAX_MAP_NODES", "The maximum number of nodes for a map has been reached", simplify},
  78. {"CompressVis Overflow", internalerror, contact},
  79. {"DecompressVis Overflow", internalerror, contact},
  80. {"Execution Cancelled", "Tool execution was cancelled either by the user or due to a fatal compile setting", selfexplanitory},
  81. {"Internal Error", internalerror, contact},
  82. //KGP added
  83. {"Exceeded MAX_MAP_LIGHTING","You have run out of light data memory" ,"Use the -lightdata <#> command line option to increase your maximum light memory. The default is 16384 (KB)."},
  84. {"Exceeded MAX_INTERNAL_MAP_PLANES", "The maximum number of plane definitions has been reached", "The map has grown too complex"}
  85. };
  86. const MessageTable_t* GetAssume(assume_msgs id)
  87. {
  88. if (!(id > assume_first) && (id < assume_last))
  89. {
  90. id = assume_first;
  91. }
  92. return &assumes[id];
  93. }