render parity unit I: 40250 PythonGraphic SetGamma, cooldown fan, up/down buttons

SetGamma, RenderCoolTimeBox, RenderUp/DownButton and GetAvailableMemory are
transliterated from 40250 in place of stubs. The cooldown fan is emitted as
untextured polygon UI commands (native_render + python_ui_surface.gd draw
Bar+quad as a polygon); D3D8 shim gains SetGammaRamp/D3DGAMMARAMP.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shenlei
2026-09-28 14:17:27 +09:00
co-authored by Claude Opus 5.5
parent d3fd5f8613
commit 0e8a1574cb
8 changed files with 298 additions and 21 deletions
+11
View File
@@ -374,6 +374,17 @@ func _draw() -> void:
RenderingServer.canvas_item_add_polygon(target_segments[seg_idx], poly_pts,
_get_color_array(argb), poly_uv, tex_rid)
elif kind == &"bar" and command.has(&"quad"):
# An untextured polygon piece (CPythonGraphic::RenderCoolTimeBox's fan triangles).
if x2 > cx1 and x1 < cx2 and y2 > cy1 and y1 < cy2:
if not fg_plain:
fg_used = _segment(fg_used, RID())
fg_plain = true
var seg_idx := fg_used - 1
var quad: PackedVector2Array = command[&"quad"]
RenderingServer.canvas_item_add_polygon(target_segments[seg_idx],
PackedVector2Array([quad[0], quad[1], quad[2]]), _get_color_array(argb))
elif kind == &"bar":
var bx1 := maxf(x1, cx1)
var by1 := maxf(y1, cy1)