feat: Add layer visibility controls and BG2 layer type selection in DungeonCanvasViewer
- Implemented controls for toggling visibility of background layers BG1 and BG2 in the DungeonCanvasViewer. - Added a dropdown for selecting the type of BG2 layer, allowing for different rendering effects (Normal, Translucent, Addition, Dark, Off). - Updated rendering logic to respect visibility settings and apply the selected alpha values for BG2 layer rendering. - Enhanced debug logging to provide detailed information about bitmap states and rendering processes for both background layers.
This commit is contained in:
@@ -56,6 +56,16 @@ class DungeonCanvasViewer {
|
||||
void SetObjectInteractionEnabled(bool enabled) { object_interaction_enabled_ = enabled; }
|
||||
bool IsObjectInteractionEnabled() const { return object_interaction_enabled_; }
|
||||
|
||||
// Layer visibility controls
|
||||
void SetBG1Visible(bool visible) { bg1_visible_ = visible; }
|
||||
void SetBG2Visible(bool visible) { bg2_visible_ = visible; }
|
||||
bool IsBG1Visible() const { return bg1_visible_; }
|
||||
bool IsBG2Visible() const { return bg2_visible_; }
|
||||
|
||||
// BG2 layer type controls
|
||||
void SetBG2LayerType(int type) { bg2_layer_type_ = type; }
|
||||
int GetBG2LayerType() const { return bg2_layer_type_; }
|
||||
|
||||
// Set the object to be placed
|
||||
void SetPreviewObject(const zelda3::RoomObject& object) {
|
||||
object_interaction_.SetPreviewObject(object, true);
|
||||
@@ -95,6 +105,11 @@ class DungeonCanvasViewer {
|
||||
// Object interaction state
|
||||
bool object_interaction_enabled_ = true;
|
||||
|
||||
// Layer visibility controls
|
||||
bool bg1_visible_ = true;
|
||||
bool bg2_visible_ = true;
|
||||
int bg2_layer_type_ = 0; // 0=Normal, 1=Translucent, 2=Addition, etc.
|
||||
|
||||
// Palette data
|
||||
uint64_t current_palette_group_id_ = 0;
|
||||
uint64_t current_palette_id_ = 0;
|
||||
|
||||
Reference in New Issue
Block a user