Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <map>
- #include <tuple>
- #include <string>
- #include <vector>
- #include "objects.h"
- using namespace std;
- // This block holds reused sections of the VMF structure.
- // They will be part of what's below this block.
- struct Editor
- {
- Vector color;
- int visgroupid;
- int group;
- bool visgroupshown;
- bool visgroupautoshown;
- string comments;
- };
- struct Solid
- {
- struct Side
- {
- Vector plane[3];
- string material;
- Vector uaxis[2];
- Vector vaxis[2];
- float rotation;
- int lightmapscale;
- int smoothing_groups;
- struct Dispinfo
- {
- int power;
- Vector startposition;
- float elevation;
- bool subdiv;
- vector<vector<Vector>> normals;
- vector<vector<float>> distances;
- vector<vector<Vector>> offsets;
- vector<vector<Vector>> offset_normals;
- vector<vector<float>> alphas;
- vector<vector<int>> triangle_tags;
- vector<vector<int>> allowed_verts;
- }
- dispinfo;
- };
- map<int, Side> side;
- Editor editor;
- };
- struct Hidden
- {
- map<int, Solid> solid;
- };
- // A struct that holds the VMF file.
- // https://developer.valvesoftware.com/wiki/VMF_documentation
- struct Data
- {
- struct Versioninfo
- {
- int editorversion;
- int editorbuild;
- int mapversion;
- int formatversion;
- bool prefab;
- }
- versioninfo;
- struct Visgroups
- {
- int visgroupid;
- Vector rgb;
- map<string, Visgroups> branch;
- };
- map<string, Visgroups> visgroups;
- struct Viewsettings
- {
- bool bSnapToGrid;
- bool bShowGrid;
- bool bShowLogicalGrid;
- int nGridSpacing;
- bool bShow3DGrid;
- }
- viewsettings;
- struct World
- {
- string mapversion;
- string classname;
- string skyname;
- Hidden hidden;
- map<int, Solid> solid;
- struct Group
- {
- Editor editor;
- };
- map<int, Group> group;
- };
- map<int, World> world;
- struct Entity
- {
- string classname;
- int spawnflags;
- Vector origin;
- Solid solid;
- Editor editor;
- Hidden hidden;
- map<string, string> properties;
- struct Connections
- {
- map<string, tuple<string, string, string, float, bool>> output;
- }
- connections;
- };
- map<int, Entity> entity;
- struct Cameras
- {
- int activecamera;
- struct Camera
- {
- Vector position;
- Vector look;
- };
- vector<Camera> camera;
- }
- cameras;
- struct Cordon
- {
- Vector mins;
- Vector maxs;
- bool active;
- }
- cordon;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement