| 1 | #pragma once |
| 2 | |
| 3 | #include "devenv/seadFontMgr.h" |
| 4 | |
| 5 | namespace sead |
| 6 | { |
| 7 | class DebugFontMgrJis1Nvn : public FontBase |
| 8 | { |
| 9 | SEAD_SINGLETON_DISPOSER(DebugFontMgrJis1Nvn) |
| 10 | public: |
| 11 | DebugFontMgrJis1Nvn(); |
| 12 | ~DebugFontMgrJis1Nvn() override; |
| 13 | |
| 14 | float getHeight() const override; |
| 15 | float getWidth() const override; |
| 16 | float getCharWidth(char16_t c) const override; |
| 17 | u32 getEncoding() const override; |
| 18 | u32 getMaxDrawNum() const override; |
| 19 | void begin(DrawContext* ctx) const override; |
| 20 | void end(DrawContext* ctx) const override; |
| 21 | void print(DrawContext* ctx, const Projection& proj, const Camera& cam, const Matrix34f& mtx, |
| 22 | const Color4f& color, const void* text, int len) const override; |
| 23 | |
| 24 | void initialize(Heap* heap, const char* shader_path, const char* font_path, |
| 25 | const char* table_path, u32 unk); |
| 26 | void initializeFromBinary(Heap* heap, void* shader_binary, u64 shader_size, void* font_binary, |
| 27 | u64 font_size, const void* table_binary, u32 unk3); |
| 28 | void swapUniformBlockBuffer(); |
| 29 | u32 searchCharIndexFormCharCode_(u32 code) const; |
| 30 | |
| 31 | private: |
| 32 | NVNprogram mNvnProgram; |
| 33 | NVNtexture mNvnTexture; |
| 34 | NVNtextureHandle mNvnTextureHandle; |
| 35 | NVNmemoryPool mPool1, mPool2, mPool3; |
| 36 | NVNbuffer mBuffer1; |
| 37 | u32 mBuffer1Size = 0; |
| 38 | const void* mFileData = nullptr; |
| 39 | NVNbuffer mBuffer2; |
| 40 | void* mBuffer2Map = nullptr; |
| 41 | UniformBlockBuffer mUniformBlockBuffer; |
| 42 | bool _530 = false; |
| 43 | }; |
| 44 | static_assert(sizeof(DebugFontMgrJis1Nvn) == 0x538); |
| 45 | |
| 46 | class DebugFontMgrNvn : public FontBase |
| 47 | { |
| 48 | SEAD_SINGLETON_DISPOSER(DebugFontMgrNvn) |
| 49 | public: |
| 50 | DebugFontMgrNvn(); |
| 51 | ~DebugFontMgrNvn() override; |
| 52 | |
| 53 | float getHeight() const override; |
| 54 | float getWidth() const override; |
| 55 | float getCharWidth(char16_t c) const override; |
| 56 | u32 getEncoding() const override; |
| 57 | u32 getMaxDrawNum() const override; |
| 58 | void begin(DrawContext* ctx) const override; |
| 59 | void end(DrawContext* ctx) const override; |
| 60 | void print(DrawContext* ctx, const Projection& proj, const Camera& cam, const Matrix34f& mtx, |
| 61 | const Color4f& color, const void* text, int len) const override; |
| 62 | |
| 63 | void initialize(Heap* heap, const char* shader_path, const char* font_path, u32 unk); |
| 64 | void initializeFromBinary(Heap* heap, void* shader_binary, u64 shader_size, void* font_binary, |
| 65 | u64 font_size, u32 unk3); |
| 66 | void swapUniformBlockBuffer(); |
| 67 | u32 searchCharIndexFormCharCode_(u32 code) const; |
| 68 | |
| 69 | private: |
| 70 | NVNprogram nvnProgram; |
| 71 | NVNtexture nvnTexture; |
| 72 | NVNtextureHandle nvnTextureHandle; |
| 73 | NVNmemoryPool pool1, pool2, pool3; |
| 74 | NVNbuffer buffer1; |
| 75 | u32 buffer1Size = 0; |
| 76 | u32 _4e4; |
| 77 | NVNbuffer buffer2; |
| 78 | void* buffer2Map = nullptr; |
| 79 | UniformBlockBuffer mUniformBlockBuffer; |
| 80 | bool _528 = 0; |
| 81 | }; |
| 82 | static_assert(sizeof(DebugFontMgrNvn) == 0x530); |
| 83 | } // namespace sead |
| 84 | |