mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-18 07:25:16 -05:00
5dda5762ba
subrepo: subdir: "ZAPDTR" merged: "a53a53ea4" upstream: origin: "https://github.com/HarbourMasters/ZAPDTR.git" branch: "master" commit: "a53a53ea4" git-subrepo: version: "0.4.1" origin: "???" commit: "???"
54 lines
1.2 KiB
C++
54 lines
1.2 KiB
C++
#pragma once
|
|
|
|
#include "ZRoom/ZRoomCommand.h"
|
|
|
|
class RoomEntry
|
|
{
|
|
public:
|
|
int32_t virtualAddressStart;
|
|
int32_t virtualAddressEnd;
|
|
|
|
RoomEntry(uint32_t nVAS, uint32_t nVAE);
|
|
RoomEntry(const std::vector<uint8_t>& rawData, uint32_t rawDataIndex);
|
|
|
|
size_t GetRawDataSize() const;
|
|
};
|
|
|
|
class RomFile : public ZResource
|
|
{
|
|
public:
|
|
RomFile(ZFile* nParent);
|
|
|
|
void ParseXML(tinyxml2::XMLElement* reader) override;
|
|
void ParseRawData() 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 GetSourceTypeName() const override;
|
|
virtual ZResourceType GetResourceType() const override;
|
|
|
|
virtual size_t GetRawDataSize() const override;
|
|
|
|
uint8_t numRooms = 0;
|
|
std::vector<RoomEntry> rooms;
|
|
};
|
|
|
|
class SetRoomList : public ZRoomCommand
|
|
{
|
|
public:
|
|
// Borrowed reference. Don't delete.
|
|
RomFile* romfile = nullptr;
|
|
|
|
SetRoomList(ZFile* nParent);
|
|
|
|
void ParseRawData() override;
|
|
void DeclareReferences(const std::string& prefix) override;
|
|
|
|
std::string GetBodySourceCode() const override;
|
|
|
|
RoomCommand GetRoomCommand() const override;
|
|
std::string GetCommandCName() const override;
|
|
};
|