Skip to content

Add oam_begin() and OamFrame ref struct to neslib#444

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/add-oam-begin-and-oamframe-ref-struct
Draft

Add oam_begin() and OamFrame ref struct to neslib#444
Copilot wants to merge 2 commits intomainfrom
copilot/add-oam-begin-and-oamframe-ref-struct

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 4, 2026

Phase 2 of using var pattern support (#427). Adds the neslib API surface for RAII-style OAM sprite drawing scopes.

  • OamFrame ref struct — ensures compiler emits direct call to Dispose() instead of callvirt through IDisposable (no boxing, no interface dispatch, simpler IL for transpiler)
  • oam_begin() — returns OamFrame; stub follows existing throw null! pattern
  • PublicAPI.Unshipped.txt updated with new surface
using var frame = oam_begin();
oam_meta_spr_pal(x, y, pal, sprite);
// Dispose() auto-calls oam_hide_rest(oam_off) at end of scope

Agent-Logs-Url: https://github.com/jonathanpeppers/dotnes/sessions/66e269a6-ef93-4f06-826a-9922555214a1

Co-authored-by: jonathanpeppers <840039+jonathanpeppers@users.noreply.github.com>
Copilot AI changed the title [WIP] Add oam_begin() and OamFrame ref struct to neslib Add oam_begin() and OamFrame ref struct to neslib Apr 4, 2026
Copilot AI requested a review from jonathanpeppers April 4, 2026 02:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add oam_begin() and OamFrame ref struct to neslib

2 participants