1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-02-11 16:09:09 +00:00
oot/tools/ZAPD/ZAPD/ZRoom/ZRoom.h

50 lines
1.4 KiB
C
Raw Normal View History

#pragma once
#include <map>
#include <string>
#include <vector>
#include "ZResource.h"
#include "ZRoomCommand.h"
#include "tinyxml2.h"
class ZRoom : public ZResource
{
public:
std::vector<ZRoomCommand*> commands;
int32_t roomCount; // Only valid for scenes
std::string hackMode;
ZResourceType zroomType = ZResourceType::Error;
ZResourceType parentZroomType = ZResourceType::Error;
ZRoom(ZFile* nParent);
virtual ~ZRoom();
void ExtractWithXML(tinyxml2::XMLElement* reader, uint32_t nRawDataIndex) override;
void ExtractFromBinary(uint32_t nRawDataIndex, ZResourceType parentType);
void ParseXML(tinyxml2::XMLElement* reader) override;
void ParseRawData() override;
void DeclareReferences(const std::string& prefix) override;
void ParseRawDataLate() override;
void DeclareReferencesLate(const std::string& prefix) override;
Declaration* DeclareVar(const std::string& prefix, const std::string& body) override;
std::string GetBodySourceCode() const override;
void GetSourceOutputCode(const std::string& prefix) override;
std::string GetDefaultName(const std::string& prefix) const override;
size_t GetCommandSizeFromNeighbor(ZRoomCommand* cmd);
ZRoomCommand* FindCommandOfType(RoomCommand cmdType);
size_t GetRawDataSize() const override;
std::string GetSourceTypeName() const override;
ZResourceType GetResourceType() const override;
protected:
void SyotesRoomFix();
};