Files
Hat Kid 619f39d3b7 custom levels: enum lump support (#3305)
This adds support for using enums in lumps using the new lump types
`enum-int32` and `enum-uint32`. Also adds these other new lump types:

- `water-height` (takes 3 meter floats, an enum and another optional
meter float)
- `eco-info` (takes an enum and an int)
- `vector3m` (3 meter floats + `w` set to 1.0)
2024-01-15 12:46:42 +01:00

20 lines
825 B
C++

#pragma once
#include "common/goal_constants.h"
#include "common/goos/ParseHelpers.h"
#include "common/goos/Printer.h"
#include "common/util/Assert.h"
#include "decompiler/util/DecompilerTypeSystem.h"
#include "goalc/build_level/common/ResLump.h"
#include "goalc/data_compiler/DataObjectGenerator.h"
#include "third-party/json.hpp"
math::Vector4f vectorm3_from_json(const nlohmann::json& json);
math::Vector4f vectorm4_from_json(const nlohmann::json& json);
math::Vector4f vector_from_json(const nlohmann::json& json);
u64 get_enum_val(const std::string& val, decompiler::DecompilerTypeSystem& dts);
std::unique_ptr<Res> res_from_json_array(const std::string& name,
const nlohmann::json& json_array,
decompiler::DecompilerTypeSystem& dts);