yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
screen_editor_internal.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_GRAPHICS_SCREEN_EDITOR_INTERNAL_H_
2#define YAZE_APP_EDITOR_GRAPHICS_SCREEN_EDITOR_INTERNAL_H_
3
5
6namespace yaze {
7namespace editor {
8namespace internal {
9
10// Make a composite-output bitmap safe to draw this frame.
11//
12// Composites (title-screen BG1+BG2 overlay, dungeon room renderer output,
13// etc.) are owned by the editor pipeline that produced them, not by Arena's
14// gfx_sheets array. The first time the editor reaches the canvas-draw call
15// the bitmap may have a surface but no SDL texture yet, in which case
16// canvas_rendering's `if (!texture()) return;` guard silently drops the
17// draw and the canvas renders blank for one frame. A4 (title screen) and
18// A3 (dungeon room) both surfaced this race during the audit.
19//
20// Behavior:
21// * surface == nullptr -> no-op (bitmap not initialized).
22// * !is_active -> mark active.
23// * texture == nullptr -> queue CREATE.
24// * texture != nullptr, modified -> queue UPDATE and clear modified.
25// * else -> no-op.
26//
27// Stamps `metadata().purpose = kCompositeOutput` so the canvas-render
28// diagnostic log (canvas_rendering.cc) and any future role-aware tooling
29// can identify the bitmap correctly.
30//
31// Safe to call every frame; the shared helper suppresses duplicate commands
32// for the same bitmap generation while an upload is still pending.
36
37} // namespace internal
38} // namespace editor
39} // namespace yaze
40
41#endif // YAZE_APP_EDITOR_GRAPHICS_SCREEN_EDITOR_INTERNAL_H_
Represents a bitmap image optimized for SNES ROM hacking.
Definition bitmap.h:69
void EnsureCompositeBitmapTextureQueued(gfx::Bitmap &composite)
void EnsureCompositeBitmapTextureQueued(Bitmap &composite)