Files
nxnative-easy/dm/host/dm_world.h
T
seedds b68ac089a3 SM3DW magenta blocks fixed (same-pass feedback snapshot); English default language; English-only comments, bilingual README
- Magenta 16x16 blocks in Super Mario 3D World 1-1 (iPhone only): the composite shader 66a71a3081b91b9a
  renders into the RGB10A2 image while sampling it in the same pass. That is undefined in Metal: the
  M4 Pro reads the old content, the A20 Pro sometimes returns whole 16x16 blocks as (1,0,1). Found with
  the new device self-check DM_NVN_MAGSCAN (blocks first appear on that attachment, and still appear
  with the suspected particle dropped). fb_prepare ends the pass, copies the attachment level into a
  snapshot and binds the snapshot for that draw, only for shaders in the new profile key feedback_snap
  (doing it for every shader cost BotW 16.6 -> 36.6 ms). DM_NVN_FB_SNAP=0 / all / <keys> overrides.
- The game language now defaults to English (nn::oe::GetDesiredLanguage returns en-US; DM_LANG=zh-Hans
  in Documents/env.txt for Chinese).
- Code comments, docstrings and docs are English only; the zh-CN doc twins are removed. README.md has the
  English text followed by the same text in Chinese. Files the shader chain version hashes keep their
  bilingual comments (editing them changes every game's chain version).
2026-10-17 00:41:10 +08:00

12 lines
1.7 KiB
C

// Tapping a target in the game world = interacting with it (implementation and rationale in dm_world.c)
#pragma once
unsigned dm_world_tap(float nx, float ny); // any thread: queue one tap (coordinates normalized to the rendered picture, [0,1]); the main thread resolves the target and sends the command at the controller-poll point, and sends nothing when there is no target. Returns the sequence number
int dm_world_tap_result(unsigned seq); // -1 not executed yet; 0 no target; 1 item (pick up) 2 NPC (talk) 3 object (use) 4 exit 5 corpse (retrieve)
int dm_world_has_target(void); // any thread: whether a target that the primary button would interact with exists (the game's own controller-version selection)
void dm_world_pump(void); // called every frame where the controller is fetched (main thread)
void dm_world_watch(int type, uint32_t cls); // test probe: watch one kind of unit (type < 0 cancels); the main thread publishes the screen position of its body box center every frame
int dm_world_watch_pos(float *nx, float *ny); // any thread: returns 1 and gives normalized coordinates when the watched unit is in the picture
// Minimap quest goals (dm_world.c): published by the main thread every frame, fetched by the front end from any thread. x / y = world cell; art >= 64 = frame art-64 of the Tal Rasha symbols, otherwise = nameplate number (tools/gen_map_goal_art.py)
typedef struct { int n, px, py; float sx, sy; int x[12], y[12]; unsigned char art[12]; } dm_map_goal_view; // px / py player world cell; sx / sy position of the player's feet on screen (normalized)
int dm_map_goals(dm_map_goal_view *v); // returns the number of goals (map marking switch off, no goal in this level, scan not finished = 0)