2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-05-13 23:11:20 +00:00
metaforce/Runtime/CIOWin.hpp
Lioncash 6dce70895c CIOWin: Make Draw() non-const
Allows removing several const_cast usages within the codebase.
2020-03-29 21:56:49 -04:00

32 lines
819 B
C++

#pragma once
#include <functional>
#include <memory>
#include <string>
#include "Runtime/RetroTypes.hpp"
namespace urde {
class CArchitectureMessage;
class CArchitectureQueue;
class CIOWin {
std::string x4_name;
size_t m_nameHash;
public:
enum class EMessageReturn { Normal = 0, Exit = 1, RemoveIOWinAndExit = 2, RemoveIOWin = 3 };
explicit CIOWin(std::string_view name) : x4_name(name) { m_nameHash = std::hash<std::string_view>()(name); }
virtual ~CIOWin() = default;
virtual EMessageReturn OnMessage(const CArchitectureMessage&, CArchitectureQueue&) = 0;
virtual bool GetIsContinueDraw() const { return true; }
virtual void Draw() {}
virtual void PreDraw() {}
std::string_view GetName() const { return x4_name; }
size_t GetNameHash() const { return m_nameHash; }
};
} // namespace urde