#include <object_renderer.h>
Public Member Functions | |
DungeonObjectRenderer ()=default | |
void | LoadObject (uint32_t routine_ptr, std::array< uint8_t, 16 > &sheet_ids) |
void | ConfigureObject () |
void | RenderObject (uint32_t routine_ptr) |
void | UpdateObjectBitmap () |
gfx::Bitmap * | bitmap () |
auto | memory () |
auto | mutable_memory () |
Public Member Functions inherited from yaze::app::SharedRom | |
SharedRom ()=default | |
virtual | ~SharedRom ()=default |
std::shared_ptr< Rom > | shared_rom () |
auto | rom () |
Private Attributes | |
std::vector< uint8_t > | tilemap_ |
std::vector< uint8_t > | rom_data_ |
PseudoVram | vram_ |
emu::ClockImpl | clock_ |
emu::memory::MemoryImpl | memory_ |
emu::memory::CpuCallbacks | cpu_callbacks_ |
emu::video::Ppu | ppu {memory_, clock_} |
emu::Cpu | cpu {memory_, clock_, cpu_callbacks_} |
gfx::Bitmap | bitmap_ |
Additional Inherited Members | |
Static Public Attributes inherited from yaze::app::SharedRom | |
static std::shared_ptr< Rom > | shared_rom_ = nullptr |
Definition at line 26 of file object_renderer.h.
|
default |
void yaze::app::zelda3::dungeon::DungeonObjectRenderer::LoadObject | ( | uint32_t | routine_ptr, |
std::array< uint8_t, 16 > & | sheet_ids ) |
Definition at line 8 of file object_renderer.cc.
References ConfigureObject(), yaze::app::emu::memory::MemoryImpl::Initialize(), memory_, RenderObject(), yaze::app::SharedRom::rom(), rom_data_, yaze::app::zelda3::dungeon::PseudoVram::sheets, and vram_.
Referenced by yaze::app::editor::DungeonEditor::DrawObjectRenderer().
void yaze::app::zelda3::dungeon::DungeonObjectRenderer::ConfigureObject | ( | ) |
Definition at line 23 of file object_renderer.cc.
References yaze::app::emu::Cpu::A, cpu, yaze::app::emu::Cpu::DB, yaze::app::emu::Cpu::SetAccumulatorSize(), yaze::app::emu::Cpu::SetIndexSize(), yaze::app::emu::Cpu::WriteLong(), and yaze::app::emu::Cpu::X.
Referenced by LoadObject().
void yaze::app::zelda3::dungeon::DungeonObjectRenderer::RenderObject | ( | uint32_t | routine_ptr | ) |
Example: the STA $BF, $CD, $C2, $CE are the location of the object in the room $B2 is used for size loop so if object size is setted on 07 that draw code will be repeated 7 times and since Y is increasing by 4 it makes the object draw from left to right
RoomDraw_Rightwards2x2_1to15or32: #_018B89: JSR RoomDraw_GetSize_1to15or32 .next #_018B8C: JSR RoomDraw_Rightwards2x2 #_018B8F: DEC.b $B2 #_018B91: BNE .next #_018B93: RTS
RoomDraw_Rightwards2x2: #_019895: LDA.w RoomDrawObjectData+0,X #_019898: STA.b [$BF],Y #_01989A: LDA.w RoomDrawObjectData+2,X #_01989D: STA.b [$CB],Y #_01989F: LDA.w RoomDrawObjectData+4,X #_0198A2: STA.b [$C2],Y #_0198A4: LDA.w RoomDrawObjectData+6,X #_0198A7: STA.b [$CE],Y #_0198A9: INY #4 #_0198AD: RTS
Definition at line 63 of file object_renderer.cc.
References cpu, yaze::app::emu::Cpu::ExecuteInstruction(), yaze::app::emu::Cpu::PB, yaze::app::emu::Cpu::PC, yaze::app::emu::Cpu::PushLong(), yaze::app::emu::Cpu::ReadByte(), and UpdateObjectBitmap().
Referenced by LoadObject().
void yaze::app::zelda3::dungeon::DungeonObjectRenderer::UpdateObjectBitmap | ( | ) |
Definition at line 84 of file object_renderer.cc.
References bitmap_, yaze::app::gfx::Bitmap::Create(), memory_, yaze::app::emu::memory::MemoryImpl::ReadWord(), yaze::app::SharedRom::rom(), yaze::app::zelda3::dungeon::PseudoVram::sheets, tilemap_, and vram_.
Referenced by RenderObject().
|
inline |
Definition at line 35 of file object_renderer.h.
References bitmap_.
Referenced by yaze::app::editor::DungeonEditor::DrawObjectRenderer().
|
inline |
Definition at line 36 of file object_renderer.h.
References memory_.
|
inline |
Definition at line 37 of file object_renderer.h.
References memory_.
Referenced by yaze::app::editor::DungeonEditor::DrawObjectRenderer().
|
private |
Definition at line 40 of file object_renderer.h.
Referenced by UpdateObjectBitmap().
|
private |
Definition at line 41 of file object_renderer.h.
Referenced by LoadObject().
|
private |
Definition at line 43 of file object_renderer.h.
Referenced by LoadObject(), and UpdateObjectBitmap().
|
private |
Definition at line 45 of file object_renderer.h.
|
private |
Definition at line 46 of file object_renderer.h.
Referenced by LoadObject(), memory(), mutable_memory(), and UpdateObjectBitmap().
|
private |
Definition at line 47 of file object_renderer.h.
|
private |
Definition at line 48 of file object_renderer.h.
|
private |
Definition at line 49 of file object_renderer.h.
Referenced by ConfigureObject(), and RenderObject().
|
private |
Definition at line 51 of file object_renderer.h.
Referenced by bitmap(), and UpdateObjectBitmap().