morault/ProjectMorault/Morault_UDMF.h
2025-06-01 16:26:04 -04:00

51 lines
875 B
C++

#pragma once
#include <iostream>
#include <vector>
#include <raylib.h>
namespace Morault {
namespace UDMF { // DEPRECATED, DO NOT USE.
struct Linedef {
int v1, v2, sidefront = -1, sideback = -1;
bool blocking;
};
struct Sidedef {
int sector;
std::string texturetop = "";
std::string texturemiddle = "";
std::string texturebottom = "";
};
struct Vertex {
float x, y;
};
struct Sector {
std::string texturefloor;
std::string textureceiling;
int heightceiling = 128;
int heightfloor = 0;
};
class UDMFMap {
public:
std::string udmfNamespace;
std::vector<Linedef> linedefs;
std::vector<Sidedef> sidedefs;
std::vector<Vertex> vertexes;
std::vector<Sector> sectors;
void LoadMap(std::string textmap);
};
Model LoadModelUDMFWalls(UDMFMap map);
Model LoadModelUDMFFlats(UDMFMap map);
}
}