mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2026-09-09 15:37:05 +00:00
chore: align iw3,iw4,iw5 menu code (#987)
* chore: small adjustments to iw3 menu dumper * chore: align iw4 menu loader closer to iw3 * chore: align iw4 menu dumper closer to iw3 * chore: adjust iw4 menu expression dumping * chore: adjust iw4 menu expression converting * chore: align iw5 menu loader closer to iw3 * chore: align iw4 menu dumper closer to iw3 * chore: adjust iw5 menu expression dumping * chore: adjust iw5 menu expression converting * fix: not respecting reference menus when inlining menu list menus * fix: compilation on linux
This commit is contained in:
@@ -3,26 +3,15 @@
|
||||
#include "Asset/IZoneAssetCreationState.h"
|
||||
#include "Game/IW5/IW5.h"
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
namespace IW5
|
||||
{
|
||||
class MenuConversionZoneState final : public IZoneAssetCreationState
|
||||
{
|
||||
Zone* m_zone;
|
||||
std::vector<Statement_s*> m_functions;
|
||||
std::map<std::string, Statement_s*> m_function_by_name;
|
||||
|
||||
std::vector<StaticDvar*> m_static_dvars;
|
||||
std::map<std::string, size_t> m_dvars_by_name;
|
||||
|
||||
std::vector<const char*> m_strings;
|
||||
std::map<std::string, const char*> m_strings_by_value;
|
||||
|
||||
public:
|
||||
std::map<std::string, std::vector<XAssetInfo<menuDef_t>*>> m_menus_by_filename;
|
||||
ExpressionSupportingData* m_supporting_data;
|
||||
|
||||
MenuConversionZoneState();
|
||||
void Inject(ZoneAssetCreationInjection& inject) override;
|
||||
|
||||
@@ -35,5 +24,19 @@ namespace IW5
|
||||
void AddLoadedFile(std::string loadedFileName, std::vector<XAssetInfo<menuDef_t>*> menusOfFile);
|
||||
|
||||
void FinalizeSupportingData() const;
|
||||
|
||||
std::unordered_map<std::string, std::vector<XAssetInfo<menuDef_t>*>> m_menus_by_filename;
|
||||
ExpressionSupportingData* m_supporting_data;
|
||||
|
||||
private:
|
||||
Zone* m_zone;
|
||||
std::vector<Statement_s*> m_functions;
|
||||
std::unordered_map<std::string, Statement_s*> m_function_by_name;
|
||||
|
||||
std::vector<StaticDvar*> m_static_dvars;
|
||||
std::unordered_map<std::string, size_t> m_dvars_by_name;
|
||||
|
||||
std::vector<const char*> m_strings;
|
||||
std::unordered_map<std::string, const char*> m_strings_by_value;
|
||||
};
|
||||
} // namespace IW5
|
||||
|
||||
Reference in New Issue
Block a user