yaze 0.2.0
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::app::zelda3::dungeon::DungeonObjectRenderer Class Reference

#include <object_renderer.h>

Inheritance diagram for yaze::app::zelda3::dungeon::DungeonObjectRenderer:
Collaboration diagram for yaze::app::zelda3::dungeon::DungeonObjectRenderer:

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::Bitmapbitmap ()
 
auto memory ()
 
auto mutable_memory ()
 
- Public Member Functions inherited from yaze::app::SharedRom
 SharedRom ()=default
 
virtual ~SharedRom ()=default
 
std::shared_ptr< Romshared_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< Romshared_rom_ = nullptr
 

Detailed Description

Definition at line 26 of file object_renderer.h.

Constructor & Destructor Documentation

◆ DungeonObjectRenderer()

yaze::app::zelda3::dungeon::DungeonObjectRenderer::DungeonObjectRenderer ( )
default

Member Function Documentation

◆ LoadObject()

void yaze::app::zelda3::dungeon::DungeonObjectRenderer::LoadObject ( uint32_t routine_ptr,
std::array< uint8_t, 16 > & sheet_ids )

◆ ConfigureObject()

void yaze::app::zelda3::dungeon::DungeonObjectRenderer::ConfigureObject ( )

◆ RenderObject()

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().

Here is the call graph for this function:

◆ UpdateObjectBitmap()

void yaze::app::zelda3::dungeon::DungeonObjectRenderer::UpdateObjectBitmap ( )

◆ bitmap()

gfx::Bitmap * yaze::app::zelda3::dungeon::DungeonObjectRenderer::bitmap ( )
inline

Definition at line 35 of file object_renderer.h.

References bitmap_.

Referenced by yaze::app::editor::DungeonEditor::DrawObjectRenderer().

◆ memory()

auto yaze::app::zelda3::dungeon::DungeonObjectRenderer::memory ( )
inline

Definition at line 36 of file object_renderer.h.

References memory_.

◆ mutable_memory()

auto yaze::app::zelda3::dungeon::DungeonObjectRenderer::mutable_memory ( )
inline

Definition at line 37 of file object_renderer.h.

References memory_.

Referenced by yaze::app::editor::DungeonEditor::DrawObjectRenderer().

Member Data Documentation

◆ tilemap_

std::vector<uint8_t> yaze::app::zelda3::dungeon::DungeonObjectRenderer::tilemap_
private

Definition at line 40 of file object_renderer.h.

Referenced by UpdateObjectBitmap().

◆ rom_data_

std::vector<uint8_t> yaze::app::zelda3::dungeon::DungeonObjectRenderer::rom_data_
private

Definition at line 41 of file object_renderer.h.

Referenced by LoadObject().

◆ vram_

PseudoVram yaze::app::zelda3::dungeon::DungeonObjectRenderer::vram_
private

Definition at line 43 of file object_renderer.h.

Referenced by LoadObject(), and UpdateObjectBitmap().

◆ clock_

emu::ClockImpl yaze::app::zelda3::dungeon::DungeonObjectRenderer::clock_
private

Definition at line 45 of file object_renderer.h.

◆ memory_

emu::memory::MemoryImpl yaze::app::zelda3::dungeon::DungeonObjectRenderer::memory_
private

Definition at line 46 of file object_renderer.h.

Referenced by LoadObject(), memory(), mutable_memory(), and UpdateObjectBitmap().

◆ cpu_callbacks_

emu::memory::CpuCallbacks yaze::app::zelda3::dungeon::DungeonObjectRenderer::cpu_callbacks_
private

Definition at line 47 of file object_renderer.h.

◆ ppu

emu::video::Ppu yaze::app::zelda3::dungeon::DungeonObjectRenderer::ppu {memory_, clock_}
private

Definition at line 48 of file object_renderer.h.

◆ cpu

emu::Cpu yaze::app::zelda3::dungeon::DungeonObjectRenderer::cpu {memory_, clock_, cpu_callbacks_}
private

Definition at line 49 of file object_renderer.h.

Referenced by ConfigureObject(), and RenderObject().

◆ bitmap_

gfx::Bitmap yaze::app::zelda3::dungeon::DungeonObjectRenderer::bitmap_
private

Definition at line 51 of file object_renderer.h.

Referenced by bitmap(), and UpdateObjectBitmap().


The documentation for this class was generated from the following files: