@@headers.h 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925
  1. /******************************************************************************/
  2. #pragma once
  3. #define bool Bool // boolean value (8-bit)
  4. #define char8 Char8 // 8-bit character
  5. #define char Char // 16-bit character
  6. #define sbyte I8 // 8-bit signed integer
  7. #define byte U8 // 8-bit unsigned integer
  8. #define short I16 // 16-bit signed integer
  9. #define ushort U16 // 16-bit unsigned integer
  10. #define int I32 // 32-bit signed integer
  11. #define uint U32 // 32-bit unsigned integer
  12. #define long I64 // 64-bit signed integer
  13. #define ulong U64 // 64-bit unsigned integer
  14. #define flt Flt // 32-bit floating point
  15. #define dbl Dbl // 64-bit floating point
  16. #define ptr Ptr // universal pointer
  17. #define cptr CPtr // universal pointer to const data
  18. #define cchar8 CChar8 // const Char8
  19. #define cchar CChar // const Char16
  20. #define intptr IntPtr // signed integer capable of storing full memory address
  21. #define uintptr UIntPtr // unsigned integer capable of storing full memory address
  22. #define class struct // Esenthel Script "class" is a C++ "struct"
  23. /******************************************************************************/
  24. // DEFINES
  25. #define STEAM 0
  26. #define OPEN_VR 0
  27. /******************************************************************************/
  28. /******************************************************************************/
  29. // CLASSES
  30. /******************************************************************************/
  31. class AdjustBoneOrns;
  32. class AnimEditor;
  33. class AppPropsEditor;
  34. class Area;
  35. class AreaBuild;
  36. class AreaSync;
  37. class AreaVer;
  38. class BitRateQuality;
  39. class BrushClass;
  40. class BuilderClass;
  41. class CalculatorClass;
  42. class ChangePassWin;
  43. class Chunk;
  44. class Chunks;
  45. class ClassNameDesc;
  46. class Code;
  47. class CodeView;
  48. class ColorBrushClass;
  49. class CompareProjects;
  50. class ConvertToAtlasClass;
  51. class ConvertToDeAtlasClass;
  52. class CopyElements;
  53. class CreateMaterials;
  54. class Cursor;
  55. class DetectSimilarTextures;
  56. class EE1EditLake;
  57. class EE1EditRiver;
  58. class EE1EditWaypoint;
  59. class EE1ObjGlobal;
  60. class EE1WorldSettings;
  61. class EEItem;
  62. class EditEnum;
  63. class EditEnums;
  64. class EditEnv;
  65. class EditFont;
  66. class EditGuiSkin;
  67. class EditMaterial;
  68. class EditObjTypeClass;
  69. class EditObject;
  70. class EditPanel;
  71. class EditPanelImage;
  72. class EditParam;
  73. class EditParams;
  74. class EditPhysMtrl;
  75. class EditSkeleton;
  76. class EditTextStyle;
  77. class EditWaterMtrl;
  78. class EditWaypoint;
  79. class EditWaypointPoint;
  80. class EditorServer;
  81. class Elm;
  82. class ElmAnim;
  83. class ElmApp;
  84. class ElmCode;
  85. class ElmCodeBase;
  86. class ElmCodeData;
  87. class ElmData;
  88. class ElmEnum;
  89. class ElmEnv;
  90. class ElmFile;
  91. class ElmFont;
  92. class ElmGui;
  93. class ElmGuiSkin;
  94. class ElmIcon;
  95. class ElmIconSetts;
  96. class ElmImage;
  97. class ElmImageAtlas;
  98. class ElmMaterial;
  99. class ElmMesh;
  100. class ElmMiniMap;
  101. class ElmName;
  102. class ElmNode;
  103. class ElmObj;
  104. class ElmObjClass;
  105. class ElmPanel;
  106. class ElmPanelImage;
  107. class ElmPhys;
  108. class ElmPhysMtrl;
  109. class ElmProperties;
  110. class ElmSkel;
  111. class ElmSound;
  112. class ElmTextStyle;
  113. class ElmTypeNameNoSpace;
  114. class ElmTypeVer;
  115. class ElmVideo;
  116. class ElmWaterMtrl;
  117. class ElmWorld;
  118. class EmbedObj;
  119. class EmbedObjBase;
  120. class EnumEditor;
  121. class EnvEditor;
  122. class EraseRemovedElms;
  123. class ExportWindow;
  124. class FileSizeGetter;
  125. class FontEditor;
  126. class GoToArea;
  127. class GridPlaneLevel;
  128. class GroupRegion;
  129. class GuiEditParam;
  130. class GuiSkinEditor;
  131. class GuiView;
  132. class HeightBrushClass;
  133. class Heightmap2;
  134. class IDReplace;
  135. class IconEditor;
  136. class IconSettings;
  137. class IconSettsEditor;
  138. class ImageAtlasEditor;
  139. class ImageConvert;
  140. class ImageEditor;
  141. class ImageGenerate;
  142. class ImageSkin;
  143. class ImportCodeClass;
  144. class ImportTerrainClass;
  145. class ImportTerrainTask;
  146. class ImporterClass;
  147. class Lake;
  148. class LakeBase;
  149. class LeafRegion;
  150. class ListElm;
  151. class LodRegion;
  152. class LodView;
  153. class MaterialRegion;
  154. class MaterialTech;
  155. class MergeSimilarMaterials;
  156. class MeshAOClass;
  157. class MeshParts;
  158. class MeshVariations;
  159. class MiniMapEditor;
  160. class MiniMapVer;
  161. class MiscRegion;
  162. class ModeTabs;
  163. class MtrlBrushClass;
  164. class MtrlImages;
  165. class MulSoundVolumeClass;
  166. class NameDesc;
  167. class NewLodClass;
  168. class NewProjWin;
  169. class NewWorldClass;
  170. class Obj;
  171. class ObjClassEditor;
  172. class ObjData;
  173. class ObjGrid;
  174. class ObjListClass;
  175. class ObjPaintClass;
  176. class ObjPos;
  177. template<typename TYPE> class ObjPtrs;
  178. class ObjRot;
  179. class ObjScale;
  180. class ObjVer;
  181. class ObjView;
  182. class PanelEditor;
  183. class PanelImageEditor;
  184. class ParamEditor;
  185. class PathProps;
  186. class PhysMtrlEditor;
  187. class PhysPath;
  188. class Player;
  189. class Pose;
  190. class PreviewClass;
  191. class Project;
  192. class ProjectCipher;
  193. class ProjectEx;
  194. class ProjectHierarchy;
  195. class ProjectLocked;
  196. class ProjectSettings;
  197. class ProjectUpdate;
  198. class Projects;
  199. class PropEx;
  200. class PropWin;
  201. class PublishClass;
  202. class PublishPVRTC;
  203. class PublishResult;
  204. class RayTest;
  205. class RegisterWin;
  206. class ReloadElmClass;
  207. class RemoveProjWin;
  208. class Rename;
  209. class RenameBoneClass;
  210. class RenameElmClass;
  211. class RenameEventClass;
  212. class RenameProjWin;
  213. class RenameSlotClass;
  214. class ReplaceNameClass;
  215. class River;
  216. class RiverBase;
  217. class Rotator;
  218. class SelectionClass;
  219. class ServerClass;
  220. class SetMtrlColorClass;
  221. class SizeStatistics;
  222. class SmallMatrix;
  223. class SmallMatrix3;
  224. class SoundEditor;
  225. class SplitAnimation;
  226. class StoreClass;
  227. class StoreFiles;
  228. class SynchronizerClass;
  229. class TerrainObj;
  230. class TerrainObj2;
  231. class TexInfoGetter;
  232. class TextBlack;
  233. class TextNoTest;
  234. class TextStyleEditor;
  235. class TextWhite;
  236. class Texture;
  237. class TextureDownsize;
  238. class TextureInfo;
  239. class TheaterClass;
  240. class TimeStamp;
  241. class TransformRegion;
  242. class UpdateWindowClass;
  243. class UpdaterClass;
  244. class Version;
  245. class VideoEditor;
  246. class VideoOptions;
  247. class Viewport4Region;
  248. class ViewportSkin;
  249. class WaterMtrlRegion;
  250. class WaterVer;
  251. class WaypointListClass;
  252. class WaypointPos;
  253. class WorldBrushClass;
  254. class WorldChange;
  255. class WorldData;
  256. class WorldUndo;
  257. class WorldVer;
  258. class WorldView;
  259. /******************************************************************************/
  260. // CACHES
  261. /******************************************************************************/
  262. extern Cache<EditObject> EditObjects;
  263. /******************************************************************************/
  264. // ENUMS
  265. /******************************************************************************/
  266. enum AREA_LOAD_FLAG
  267. {
  268. AREA_LOAD_HEIGHTMAP =1<<0,
  269. AREA_LOAD_HM_MESH =1<<1,
  270. AREA_LOAD_HM_PHYS =1<<2,
  271. AREA_LOAD_LOCAL_OBJ_PHYS=1<<3, // if load physical bodies of area objects (that are not embedded)
  272. AREA_LOAD_LOCAL_WATER =1<<4, // if load water meshes of an area
  273. AREA_MAKE_PATH_SRC =1<<5, // if create 'path_src' member which is used for PathMesh generation in later step (don't put this into 'build' because it should not be stored in save, it's only a temporary helper value)
  274. };
  275. /******************************************************************************/
  276. enum AREA_REBUILD_FLAG // !! these enums are saved !!
  277. {
  278. AREA_REBUILD_HM_MESH =1<<0,
  279. AREA_REBUILD_HM_MESH_SIMPLIFY=1<<1,
  280. AREA_REBUILD_HM_PHYS =1<<2,
  281. AREA_REBUILD_EMBED_OBJ =1<<3,
  282. AREA_REBUILD_GAME_AREA_OBJS =1<<4, // if list of game area objects needs to be rebuilt
  283. AREA_REBUILD_WATER =1<<5,
  284. AREA_REBUILD_PATH =1<<6,
  285. AREA_REBUILD_HM =1<<7, // heightmap lookup images (height, mtrl_map)
  286. // newer flags require changing from byte to U16 (watch out for save/load)
  287. };
  288. /******************************************************************************/
  289. enum AREA_SYNC_FLAG // these enums are not saved
  290. {
  291. AREA_SYNC_HEIGHT =1<<0,
  292. AREA_SYNC_MTRL =1<<1,
  293. AREA_SYNC_COLOR =1<<2,
  294. AREA_SYNC_REMOVED=1<<3,
  295. AREA_SYNC_OBJ =1<<4,
  296. AREA_SYNC_HM =(AREA_SYNC_HEIGHT|AREA_SYNC_MTRL|AREA_SYNC_COLOR|AREA_SYNC_REMOVED),
  297. };
  298. /******************************************************************************/
  299. enum BRUSH_SHAPE
  300. {
  301. BS_CIRCLE,
  302. BS_SQUARE,
  303. };
  304. /******************************************************************************/
  305. enum CHANGE_PASS_RESULT
  306. {
  307. CHANGE_PASS_EMAIL_NOT_FOUND,
  308. CHANGE_PASS_INVALID_KEY,
  309. CHANGE_PASS_INVALID_PASS,
  310. CHANGE_PASS_SUCCESS,
  311. };
  312. /******************************************************************************/
  313. enum CIPHER_TYPE : byte
  314. {
  315. CIPHER_NONE,
  316. CIPHER_1,
  317. CIPHER_2,
  318. CIPHER_3,
  319. CIPHER_NUM,
  320. };
  321. /******************************************************************************/
  322. enum CLIENT_SERVER_COMMANDS
  323. {
  324. CS_VERSION_CHECK,
  325. CS_LOGIN ,
  326. CS_REGISTER ,
  327. CS_FORGOT_PASS,
  328. CS_CHANGE_PASS,
  329. CS_LICENSE_KEY,
  330. CS_PROJECTS_LIST ,
  331. CS_PROJECT_OPEN ,
  332. CS_PROJECT_DATA ,
  333. CS_PROJECT_SETTINGS,
  334. CS_NEW_ELM,
  335. CS_RENAME_ELM,
  336. CS_SET_ELM_PARENT,
  337. CS_REMOVE_ELMS,
  338. CS_NO_PUBLISH_ELMS,
  339. CS_GET_ELM_NAMES,
  340. CS_GET_TEXTURES,
  341. CS_SET_TEXTURE,
  342. CS_GET_ELM_SHORT, // ElmData + optional(ElmFile) if ElmFileInShort
  343. CS_SET_ELM_SHORT, // ElmData + optional(ElmFile) if ElmFileInShort
  344. CS_GET_ELM_LONG , // ElmData + ElmFile
  345. CS_SET_ELM_LONG , // ElmData + ElmFile
  346. CS_SET_ELM_FULL , // Elm + ElmData + ElmFile
  347. CS_GET_WORLD_VER,
  348. CS_GET_WORLD_AREAS,
  349. CS_SET_WORLD_AREA,
  350. CS_SET_WORLD_OBJS,
  351. CS_GET_WORLD_WAYPOINTS,
  352. CS_SET_WORLD_WAYPOINT,
  353. CS_GET_WORLD_LAKES,
  354. CS_SET_WORLD_LAKE,
  355. CS_GET_WORLD_RIVERS,
  356. CS_SET_WORLD_RIVER,
  357. CS_GET_MINI_MAP_VER,
  358. CS_GET_MINI_MAP_IMAGES,
  359. CS_SET_MINI_MAP_SETTINGS,
  360. CS_SET_MINI_MAP_IMAGE,
  361. CS_GET_CODE_VER ,
  362. CS_SET_CODE_DATA,
  363. CS_CODE_SYNC_STATUS,
  364. CS_NUM,
  365. };
  366. /******************************************************************************/
  367. enum EDIT_OBJ_TYPE : byte
  368. {
  369. EDIT_OBJ_MESH ,
  370. EDIT_OBJ_LIGHT_POINT,
  371. EDIT_OBJ_LIGHT_CONE ,
  372. EDIT_OBJ_PARTICLES ,
  373. EDIT_OBJ_NUM ,
  374. };
  375. /******************************************************************************/
  376. enum ELM_FLAG
  377. {
  378. ELM_CONTAINS_NAME =1<<0,
  379. ELM_CONTAINS_NAME_CHILD=1<<1,
  380. ELM_EDITED =1<<2,
  381. ELM_EDITED_CHILD =1<<3,
  382. };
  383. /******************************************************************************/
  384. enum ELM_OFFSET // offset applied for element ID when creating sub-elements for ELM_OBJ (so that when creating new children on different computers, their ID will be the same, obj_elm.id+ELM_OFFSET_*)
  385. {
  386. ELM_OFFSET_MESH=1, // mesh first so following can be children of mesh
  387. ELM_OFFSET_SKEL ,
  388. ELM_OFFSET_PHYS ,
  389. ELM_OFFSET_NUM ,
  390. };
  391. /******************************************************************************/
  392. enum ELM_TYPE : byte // !! these enums are saved, also this must be in sync with the Edit.ELM_TYPE !!
  393. {
  394. ELM_NONE ,
  395. ELM_FOLDER ,
  396. ELM_ENUM ,
  397. ELM_IMAGE ,
  398. ELM_IMAGE_ATLAS,
  399. ELM_FONT ,
  400. ELM_TEXT_STYLE ,
  401. ELM_PANEL ,
  402. ELM_GUI ,
  403. ELM_SHADER ,
  404. ELM_MTRL ,
  405. ELM_WATER_MTRL ,
  406. ELM_PHYS_MTRL ,
  407. ELM_OBJ_CLASS , // this is 'Object' ( params) with 'Object.type' set to elm.id and 'Object.access' set to OBJ_ACCESS_CUSTOM
  408. ELM_OBJ , // this is 'Object' (main+params)
  409. ELM_MESH ,
  410. ELM_SKEL ,
  411. ELM_PHYS ,
  412. ELM_ANIM ,
  413. ELM_PANEL_IMAGE,
  414. ELM_ICON , // this is 2D image created from 3D object
  415. ELM_ENV ,
  416. ELM_WORLD ,
  417. ELM_SOUND ,
  418. ELM_VIDEO ,
  419. ELM_FILE ,
  420. ELM_CODE , // Code
  421. ELM_LIB , // Code Library
  422. ELM_APP , // Code Application
  423. ELM_ICON_SETTS , // Icon Settings
  424. ELM_MINI_MAP , // World Mini Map
  425. ELM_GUI_SKIN ,
  426. ELM_NUM , // number of element types
  427. ELM_ANY =ELM_NUM,
  428. ELM_NUM_ANY , // number of element types (including ELM_ANY)
  429. };
  430. /******************************************************************************/
  431. enum FORGOT_PASS_RESULT
  432. {
  433. FORGOT_PASS_EMAIL_NOT_FOUND,
  434. FORGOT_PASS_KEY_SENT,
  435. FORGOT_PASS_NO_SEND_MAIL,
  436. };
  437. /******************************************************************************/
  438. enum HB_MODE // Height Brush Mode
  439. {
  440. #if MOBILE
  441. HB_ADD ,
  442. HB_SUB ,
  443. #else
  444. HB_ADD_SUB,
  445. #endif
  446. HB_LEVEL ,
  447. HB_FLAT ,
  448. HB_AVG ,
  449. HB_SOFT ,
  450. HB_NOISE ,
  451. HB_NUM ,
  452. };
  453. /******************************************************************************/
  454. enum IMPORT_PHASE
  455. {
  456. IMPORT_GET_FILES,
  457. IMPORT_IMPORT ,
  458. IMPORT_IMPORT1 ,
  459. IMPORT_IMPORT2 ,
  460. IMPORT_IMPORT3 ,
  461. IMPORT_FINISHED ,
  462. };
  463. /******************************************************************************/
  464. enum LOAD_RESULT
  465. {
  466. LOAD_OK , // success
  467. LOAD_EMPTY , // ok , but project is empty
  468. LOAD_NEWER , // failed, project requires newer engine version
  469. LOAD_LOCKED, // failed, project is currently opened in another instance (or that instance closed without unlocking)
  470. LOAD_ERROR , // failed, error occured while reading the file
  471. };
  472. /******************************************************************************/
  473. enum LOGIN_RESULT
  474. {
  475. LOGIN_EMAIL_NOT_FOUND_REGISTRATION_UNAVAILABLE,
  476. LOGIN_EMAIL_NOT_FOUND_REGISTRATION_AVAILABLE,
  477. LOGIN_EMAIL_FOUND_INVALID_PASS,
  478. LOGIN_LICENSE_USED,
  479. LOGIN_DEMO_USER_NOT_ALLOWED,
  480. LOGIN_SUCCESS,
  481. };
  482. /******************************************************************************/
  483. enum MATERIAL_SIMPLIFY : byte // !! this enum is saved !!
  484. {
  485. MS_NEVER , // don't simplify materials
  486. MS_MOBILE, // simplify only for mobile platforms
  487. MS_ALWAYS, // always simplify
  488. MS_NUM ,
  489. };
  490. /******************************************************************************/
  491. enum MODE
  492. {
  493. MODE_OBJ ,
  494. MODE_ANIM ,
  495. MODE_WORLD ,
  496. MODE_GUI_SKIN,
  497. MODE_GUI ,
  498. MODE_CODE ,
  499. MODE_TEX_DOWN,
  500. MODE_NUM ,
  501. };
  502. /******************************************************************************/
  503. enum
  504. {
  505. FORCE_HQ =1<<0, // high quality
  506. IGNORE_ALPHA=1<<1,
  507. };
  508. /******************************************************************************/
  509. enum
  510. {
  511. CHANGE_NORMAL =1<<0, // set this first so that it will be equivalent to 'bool', because below some codes use "uint changed|=Sync(..)"
  512. CHANGE_AFFECT_FILE=1<<1, // this change affects the file
  513. };
  514. /******************************************************************************/
  515. enum OBJ_TYPE // Object Class Types
  516. {
  517. };
  518. /******************************************************************************/
  519. enum OP_HM_MODE
  520. {
  521. OP_HM_NONE,
  522. OP_HM_ADD_REM,
  523. OP_HM_HEIGHT,
  524. OP_HM_COLOR,
  525. OP_HM_MTRL,
  526. OP_HM_MTRL_SCALE,
  527. OP_HM_MTRL_HOLE,
  528. OP_HM_MTRL_MAX_1,
  529. OP_HM_MTRL_MAX_2,
  530. };
  531. /******************************************************************************/
  532. enum OP_OBJ_MODE
  533. {
  534. OP_OBJ_NONE ,
  535. OP_OBJ_SET_MTRL ,
  536. OP_OBJ_SET_GROUP,
  537. };
  538. /******************************************************************************/
  539. enum PUBLISH_STAGE
  540. {
  541. PUBLISH_MTRL_SIMPLIFY,
  542. PUBLISH_TEX_OPTIMIZE ,
  543. PUBLISH_PUBLISH ,
  544. };
  545. /******************************************************************************/
  546. enum REGISTER_RESULT
  547. {
  548. REGISTER_REGISTRATION_UNAVAILABLE,
  549. REGISTER_INVALID_EMAIL,
  550. REGISTER_EMAIL_USED,
  551. REGISTER_SUCCESS,
  552. };
  553. /******************************************************************************/
  554. enum SAVE_MODE
  555. {
  556. SAVE_DEFAULT, // default save
  557. SAVE_AUTO , // auto-save
  558. };
  559. /******************************************************************************/
  560. enum UNIT_TYPE
  561. {
  562. UNIT_DEFAULT,
  563. UNIT_PIXEL ,
  564. UNIT_PERCENT, // 1/100
  565. UNIT_PERMIL , // 1/1000
  566. };
  567. /******************************************************************************/
  568. enum USER_ACCESS : byte
  569. {
  570. UA_NO_ACCESS,
  571. UA_READ_ONLY,
  572. UA_ARTIST ,
  573. UA_NORMAL ,
  574. UA_ADMIN ,
  575. UA_NUM ,
  576. };
  577. /******************************************************************************/
  578. enum VIEW_MODE
  579. {
  580. VIEW_FPP,
  581. VIEW_TPP,
  582. VIEW_ISO,
  583. VIEW_NUM,
  584. };
  585. /******************************************************************************/
  586. // CONSTANTS
  587. /******************************************************************************/
  588. const int EE_APP_BUILD =59;
  589. const uint EditMeshFlagAnd=~(VTX_DUP|EDGE_ALL|FACE_NRM|ADJ_ALL|VTX_TAN_BIN), // TanBin are not needed in Edit because they're always re-created if needed
  590. GameMeshFlagAnd=~(VTX_DUP|EDGE_ALL|FACE_NRM|ADJ_ALL);
  591. const int ForceInstaller=-2, // -2=disable and don't update, -1=disable, 0=auto, 1=enable (this is used only in Debug)
  592. HeightBrushNoiseRes=256,
  593. MtrlBrushSlots=14,
  594. MaxDemoProjElms=64,
  595. MaxVisibleRadius=(X64 ? 20 : 15),
  596. MaxMaterialDownsize=3, // 0=full, 1=half, 2=quarter
  597. ClientSendBufSize=3*1024*1024, // 3 MB
  598. ServerSendBufSize=2*1024*1024, // 2 MB
  599. InvalidCoordinate=SIGN_BIT,
  600. RebuildBlockSize=6,
  601. LinearAnimFpsLimit=12, // min number of FPS for an animation to be set as linear
  602. EsenthelStoreMaxFileNum =16, // max num of files for item
  603. EsenthelStoreMaxFileSize =255*1024*1024, // 255 MB max file size
  604. EsenthelStoreFileChunked =100*1024*1024, // 100 MB
  605. EsenthelStoreFileChunkSize= 24*1024*1024, // 24 MB
  606. EsenthelStoreMaxIconSize =128*1024, // 128 KB
  607. EsenthelStoreMaxImageSize =256*1024, // 256 KB
  608. EsenthelStoreEngineLicense[]={1, 4, 5}, // Binary Monthly, Binary Yearly, Source Yearly
  609. DefaultVorbisBitRate= 96*1000,
  610. DefaultOpusBitRate = 96*1000,
  611. DefaultHQBitRate =128*1000,
  612. MeshSplitMaxSteps=3, // max steps of splitting a mesh
  613. MeshSplitMinVtxs=12000, // min number of vertexes in a mesh to split it
  614. MeshSplitMinSize=4;
  615. const uint MeshJoinAllTestVtxFlag=VTX_HLP|VTX_SIZE;
  616. const uint NewElmTime=1;
  617. const uint ProjectVersion =64, // !! increase this by one if any of engine/editor asset formats have changed !!
  618. ClientServerVersion=59;
  619. const int ServerNetworkCompressionLevel=9 , ClientNetworkCompressionLevel=5 , EsenthelProjectCompressionLevel=5;
  620. /******************************************************************************/
  621. // TYPEDEFS
  622. /******************************************************************************/
  623. typedef CacheElmPtr<EditObject, EditObjects> EditObjectPtr;
  624. ASSERT(MTECH_DEFAULT==0 && MTECH_ALPHA_TEST==1 && MTECH_FUR==2 && MTECH_GRASS==3 && MTECH_LEAF==4 && MTECH_BLEND==5 && MTECH_BLEND_LIGHT==6 && MTECH_BLEND_LIGHT_GRASS==7 && MTECH_BLEND_LIGHT_LEAF==8 && MTECH_TEST_BLEND_LIGHT==9 && MTECH_TEST_BLEND_LIGHT_GRASS==10 && MTECH_TEST_BLEND_LIGHT_LEAF==11);
  625. ASSERT(CIPHER_NONE==0 && CIPHER_1==1 && CIPHER_2==2 && CIPHER_3==3 && CIPHER_NUM==4);
  626. ASSERT(OBJ_ACCESS_CUSTOM==0 && OBJ_ACCESS_TERRAIN==1 && OBJ_ACCESS_GRASS==2 && OBJ_ACCESS_OVERLAY==3);
  627. /******************************************************************************/
  628. /******************************************************************************/
  629. // CLASSES
  630. /******************************************************************************/
  631. #include "@WorldVer.h"
  632. #include "@WorldUndo.h"
  633. #include "@WorldData.h"
  634. #include "@WaypointListClass.h"
  635. #include "@Viewport4Region.h"
  636. #include "@Version.h"
  637. #include "@UpdateWindowClass.h"
  638. #include "@UpdaterClass.h"
  639. #include "@TimeStamp.h"
  640. #include "@TextureInfo.h"
  641. #include "@Texture.h"
  642. #include "@TextNoTest.h"
  643. #include "@TexInfoGetter.h"
  644. #include "@TerrainObj2.h"
  645. #include "@TerrainObj.h"
  646. #include "@SynchronizerClass.h"
  647. #include "@StoreFiles.h"
  648. #include "@SplitAnimation.h"
  649. #include "@SmallMatrix3.h"
  650. #include "@SmallMatrix.h"
  651. #include "@ServerClass.h"
  652. #include "@SelectionClass.h"
  653. #include "@Rotator.h"
  654. #include "@RiverBase.h"
  655. #include "@River.h"
  656. #include "@ReplaceNameClass.h"
  657. #include "@RenameSlotClass.h"
  658. #include "@RenameEventClass.h"
  659. #include "@RenameElmClass.h"
  660. #include "@RenameBoneClass.h"
  661. #include "@Rename.h"
  662. #include "@ReloadElmClass.h"
  663. #include "@RegisterWin.h"
  664. #include "@RayTest.h"
  665. #include "@PublishResult.h"
  666. #include "@PublishPVRTC.h"
  667. #include "@ProjectUpdate.h"
  668. #include "@ProjectLocked.h"
  669. #include "@ProjectCipher.h"
  670. #include "@PreviewClass.h"
  671. #include "@Pose.h"
  672. #include "@Player.h"
  673. #include "@PhysPath.h"
  674. #include "@ObjVer.h"
  675. #include "@ObjPtrs.h"
  676. #include "@ObjGrid.h"
  677. #include "@NewProjWin.h"
  678. #include "@NameDesc.h"
  679. #include "@MtrlImages.h"
  680. #include "@MtrlBrushClass.h"
  681. #include "@ModeTabs.h"
  682. #include "@MiniMapVer.h"
  683. #include "@MeshVariations.h"
  684. #include "@MeshParts.h"
  685. #include "@MaterialTech.h"
  686. #include "@LodView.h"
  687. #include "@ListElm.h"
  688. #include "@LakeBase.h"
  689. #include "@Lake.h"
  690. #include "@ImportTerrainTask.h"
  691. #include "@ImportCodeClass.h"
  692. #include "@ImageSkin.h"
  693. #include "@ImageGenerate.h"
  694. #include "@ImageConvert.h"
  695. #include "@IDReplace.h"
  696. #include "@Heightmap2.h"
  697. #include "@HeightBrushClass.h"
  698. #include "@GoToArea.h"
  699. #include "@FileSizeGetter.h"
  700. #include "@ExportWindow.h"
  701. #include "@EraseRemovedElms.h"
  702. #include "@EmbedObjBase.h"
  703. #include "@EmbedObj.h"
  704. #include "@ElmTypeVer.h"
  705. #include "@ElmTypeNameNoSpace.h"
  706. #include "@ElmNode.h"
  707. #include "@ElmName.h"
  708. #include "@ElmData.h"
  709. #include "@ElmCodeBase.h"
  710. #include "@ElmCode.h"
  711. #include "@ElmApp.h"
  712. #include "@ElmAnim.h"
  713. #include "@Elm.h"
  714. #include "@EEItem.h"
  715. #include "@EE1WorldSettings.h"
  716. #include "@EE1ObjGlobal.h"
  717. #include "@EE1EditWaypoint.h"
  718. #include "@EE1EditRiver.h"
  719. #include "@EE1EditLake.h"
  720. #include "@EditWaypointPoint.h"
  721. #include "@EditWaypoint.h"
  722. #include "@EditTextStyle.h"
  723. #include "@EditSkeleton.h"
  724. #include "@EditPhysMtrl.h"
  725. #include "@EditParams.h"
  726. #include "@EditParam.h"
  727. #include "@EditPanelImage.h"
  728. #include "@EditPanel.h"
  729. #include "@EditorServer.h"
  730. #include "@EditObjTypeClass.h"
  731. #include "@EditObject.h"
  732. #include "@EditMaterial.h"
  733. #include "@EditGuiSkin.h"
  734. #include "@EditFont.h"
  735. #include "@EditEnv.h"
  736. #include "@EditEnums.h"
  737. #include "@EditEnum.h"
  738. #include "@Cursor.h"
  739. #include "@ColorBrushClass.h"
  740. #include "@CodeView.h"
  741. #include "@Code.h"
  742. #include "@ClassNameDesc.h"
  743. #include "@Chunks.h"
  744. #include "@Chunk.h"
  745. #include "@ChangePassWin.h"
  746. #include "@CalculatorClass.h"
  747. #include "@BuilderClass.h"
  748. #include "@BitRateQuality.h"
  749. #include "@AreaVer.h"
  750. #include "@AreaSync.h"
  751. #include "@AreaBuild.h"
  752. #include "@GuiEditParam.h"
  753. #include "@Project.h"
  754. #include "@TextWhite.h"
  755. #include "@ViewportSkin.h"
  756. #include "@ElmWorld.h"
  757. #include "@ElmWaterMtrl.h"
  758. #include "@ElmVideo.h"
  759. #include "@PathProps.h"
  760. #include "@ElmTextStyle.h"
  761. #include "@ElmSound.h"
  762. #include "@ElmSkel.h"
  763. #include "@ElmPhysMtrl.h"
  764. #include "@ElmPhys.h"
  765. #include "@ElmPanelImage.h"
  766. #include "@ElmPanel.h"
  767. #include "@ElmObjClass.h"
  768. #include "@ElmObj.h"
  769. #include "@ElmMiniMap.h"
  770. #include "@ElmMesh.h"
  771. #include "@ElmMaterial.h"
  772. #include "@ElmImageAtlas.h"
  773. #include "@ElmImage.h"
  774. #include "@ElmIconSetts.h"
  775. #include "@ElmIcon.h"
  776. #include "@ElmGuiSkin.h"
  777. #include "@ElmGui.h"
  778. #include "@ElmFont.h"
  779. #include "@ElmFile.h"
  780. #include "@ElmEnv.h"
  781. #include "@ElmEnum.h"
  782. #include "@ElmCodeData.h"
  783. #include "@WorldChange.h"
  784. #include "@TextBlack.h"
  785. #include "@ObjData.h"
  786. #include "@Obj.h"
  787. #include "@NewWorldClass.h"
  788. #include "@EditWaterMtrl.h"
  789. #include "@NewLodClass.h"
  790. #include "@WaypointPos.h"
  791. #include "@MiscRegion.h"
  792. #include "@StoreClass.h"
  793. #include "@MeshAOClass.h"
  794. #include "@TransformRegion.h"
  795. #include "@MaterialRegion.h"
  796. #include "@LodRegion.h"
  797. #include "@WaterVer.h"
  798. #include "@LeafRegion.h"
  799. #include "@PublishClass.h"
  800. #include "@PropWin.h"
  801. #include "@PropEx.h"
  802. #include "@ImportTerrainClass.h"
  803. #include "@ImporterClass.h"
  804. #include "@TheaterClass.h"
  805. #include "@ProjectSettings.h"
  806. #include "@BrushClass.h"
  807. #include "@Projects.h"
  808. #include "@ImageEditor.h"
  809. #include "@SizeStatistics.h"
  810. #include "@ImageAtlasEditor.h"
  811. #include "@Area.h"
  812. #include "@AppPropsEditor.h"
  813. #include "@AnimEditor.h"
  814. #include "@AdjustBoneOrns.h"
  815. #include "@PanelImageEditor.h"
  816. #include "@RenameProjWin.h"
  817. #include "@PanelEditor.h"
  818. #include "@EnumEditor.h"
  819. #include "@VideoOptions.h"
  820. #include "@MulSoundVolumeClass.h"
  821. #include "@VideoEditor.h"
  822. #include "@PhysMtrlEditor.h"
  823. #include "@RemoveProjWin.h"
  824. #include "@MiniMapEditor.h"
  825. #include "@SetMtrlColorClass.h"
  826. #include "@MergeSimilarMaterials.h"
  827. #include "@GuiView.h"
  828. #include "@GuiSkinEditor.h"
  829. #include "@SoundEditor.h"
  830. #include "@DetectSimilarTextures.h"
  831. #include "@ParamEditor.h"
  832. #include "@CreateMaterials.h"
  833. #include "@ConvertToDeAtlasClass.h"
  834. #include "@ConvertToAtlasClass.h"
  835. #include "@CompareProjects.h"
  836. #include "@ProjectHierarchy.h"
  837. #include "@GroupRegion.h"
  838. #include "@GridPlaneLevel.h"
  839. #include "@ElmProperties.h"
  840. #include "@ObjView.h"
  841. #include "@FontEditor.h"
  842. #include "@TextStyleEditor.h"
  843. #include "@ObjScale.h"
  844. #include "@ObjRot.h"
  845. #include "@IconSettings.h"
  846. #include "@ObjPos.h"
  847. #include "@ObjPaintClass.h"
  848. #include "@ObjListClass.h"
  849. #include "@WaterMtrlRegion.h"
  850. #include "@TextureDownsize.h"
  851. #include "@ObjClassEditor.h"
  852. #include "@EnvEditor.h"
  853. #include "@ProjectEx.h"
  854. #include "@CopyElements.h"
  855. #include "@IconEditor.h"
  856. #include "@IconSettsEditor.h"
  857. #include "@WorldView.h"
  858. #include "@WorldBrushClass.h"
  859. /******************************************************************************/
  860. // CPP
  861. /******************************************************************************/
  862. #include "Auto.h"
  863. #include "Editor Update.h"
  864. #include "Editors/Mini Map.h"
  865. #include "Editors/Object/Mesh.h"
  866. #include "Editors/World/[email protected]"
  867. #include "Editors/World/Builder.h"
  868. #include "Editors/World/Cursor.h"
  869. #include "Editors/World/Import Terrain.h"
  870. #include "Editors/World/[email protected]"
  871. #include "Editors/World/Selection.h"
  872. #include "Editors/World/[email protected]"
  873. #include "Editors/World/[email protected]"
  874. #include "[email protected]"
  875. #include "Game/Controls.h"
  876. #include "Game/Game.h"
  877. #include "Gui/Copy Elements.h"
  878. #include "Gui/Create Materials.h"
  879. #include "Gui/Gui.h"
  880. #include "Gui/Import 1.h"
  881. #include "Gui/Merge Similar Materials.h"
  882. #include "Gui/Project [email protected]"
  883. #include "Main.h"
  884. #include "Preview.h"
  885. #include "[email protected]"
  886. #include "Project List.h"
  887. #include "Publish.h"
  888. #include "Settings.h"
  889. #include "Shared/Area.h"
  890. #include "Shared/Commands.h"
  891. #include "Shared/Constants.h"
  892. #include "Shared/Elements/Object.h"
  893. #include "Shared/Elm.h"
  894. #include "Shared/Functions.h"
  895. #include "Shared/Project.h"
  896. #include "Store/License Test.h"
  897. /******************************************************************************/
  898. // INLINE, TEMPLATES
  899. /******************************************************************************/
  900. #include "Editors/[email protected]"
  901. #include "Editors/[email protected]"
  902. #include "Editors/Panel [email protected]"
  903. #include "Editors/Param.inline.h"
  904. #include "Game/Game.inline.h"
  905. #include "Gui/Gui.inline.h"
  906. #include "[email protected]"
  907. #include "Shared/Functions.inline.h"
  908. /******************************************************************************/