Skip to content

map and ui: map spot callbacks, a bulk spot read, a few window additions and a minimap widget for scripts (linked PR # 3) - #676

Open
TheLostInPlace wants to merge 11 commits into
themrdemonized:all-in-one-vs2022-wpofrom
TheLostInPlace:wd-map-ui
Open

TheLostInPlace wants to merge 11 commits into
themrdemonized:all-in-one-vs2022-wpofrom
TheLostInPlace:wd-map-ui

Conversation

@TheLostInPlace

Copy link
Copy Markdown
Contributor

LINKED PR # 3

This PR was split into a 4 part PR due to the size and to aid in reviewing changes

Changes

The map and ui pieces a script needs to show the level map on a screen held in the hand.

  • two callbacks, on_map_location_added and on_map_location_removed, with the spot type and the
    object id (removals are collected on the map update thread and sent from the main thread), and a
    read of all spots with their current type in one call
  • the type of a game task, where a server object sits on the level map, the nearest object of a
    class, the size of a texture, and the minimap icon a spot type declares
  • a CUIStatic can be laid along the line between two points and tells where its heading pivot
    is, windows get a hide lock, mouse capture and clip rects
  • the world space ui pass draws headings and the minimap without the screen aspect squeezing them
  • CUIMiniMapWidget, a minimap window a script creates and puts inside any other window. It has
    its own spot pool, quest pointers are on only for the spot types the script asks for, the one
    followed target is the only spot searched from another level and that path is cached, and every
    texture and the spot shader can be replaced from script

The pda map and the hud minimap are untouched, apart from the cached path in
CMapLocation::UpdateSpot, which only saves a path search per frame. Every new export is listed in
lua_help_ex.script. Built DX11-AVX x64, tested in game Wearable Devices mod. On the MT branch UpdateSpot conflicts with a null check that lives there, the MT PR resolves it.

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.

1 participant