yaze 0.2.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
object_renderer.h
Go to the documentation of this file.
1#include <cstdint>
2#include <vector>
3
4#include "app/emu/snes.h"
5#include "app/gfx/bitmap.h"
7#include "app/rom.h"
8
9namespace yaze {
10namespace zelda3 {
11
19struct PseudoVram {
20 std::array<uint8_t, 16> sheets = {0};
21 std::vector<gfx::SnesPalette> palettes;
22};
23
33 public:
35
42 void LoadObject(uint32_t routine_ptr, std::array<uint8_t, 16>& sheet_ids);
43
47 void ConfigureObject();
48
54 void RenderObject(uint32_t routine_ptr);
55
59 void UpdateObjectBitmap();
60
61 auto mutable_memory() { return &tilemap_; }
62 auto rom() { return rom_; }
63 auto mutable_rom() { return &rom_; }
64
65 private:
66 std::vector<uint8_t> tilemap_;
67 std::vector<uint8_t> rom_data_;
68
70
74};
75
76} // namespace zelda3
77} // namespace yaze
The Rom class is used to load, save, and modify Rom data.
Definition rom.h:58
Represents a bitmap image.
Definition bitmap.h:59
void UpdateObjectBitmap()
Updates the bitmap with the rendered object.
void RenderObject(uint32_t routine_ptr)
Executes the object drawing routine.
void LoadObject(uint32_t routine_ptr, std::array< uint8_t, 16 > &sheet_ids)
Loads and renders a dungeon object.
void ConfigureObject()
Configures the CPU state for object rendering.
Zelda 3 specific classes and functions.
Main namespace for the application.
Definition controller.cc:18
Simulates the SNES VRAM for object rendering.
std::vector< gfx::SnesPalette > palettes
std::array< uint8_t, 16 > sheets