//===========================================================================//
// File:	dpl2d.hpp                                                          //
// Project: BattleTech port (WinTesla / btl4)                                //
//---------------------------------------------------------------------------//
// The legacy libDPL 2D vector display-list layer, re-hosted over Direct3D 9. //
//                                                                            //
// The original BattleTech build drew the out-the-window HUD vector overlay   //
// (targeting reticle, PIP blip markers, range arcs) through libDPL's         //
// dpl2d_* display-list API, executed on the Division IG board.  WinTesla's   //
// L4D3D renderer never reimplemented that layer, so it shipped as inert      //
// stubs (btstubs.cpp).  This module replaces those stubs with a real         //
// recorder + a Direct3D9 executor:                                           //
//                                                                            //
//   * The dpl2d_* recording calls (declared in btl4vid.hpp) build an         //
//     in-memory command list (color / circle outline / circle fill /         //
//     pen moves under a translation matrix stack).                           //
//   * dpl2d_ExecuteList() rasterises a compiled list as screen-space 2D      //
//     primitives (pre-transformed L4VERTEX_2D quads / fans / line strips)    //
//     on the supplied device -- the same vertex form L4D3D / L4VB16 use.     //
//                                                                            //
// Coordinates handed to the recorder are normalised view coordinates in      //
// [0,1] across the active D3D viewport (origin top-left); the executor maps  //
// them to pixels at draw time.  (Normalisation basis is best-effort -- see   //
// dpl2d.cpp -- and easy to retune once the reticle is verified on-screen.)   //
//===========================================================================//

#if !defined(DPL2D_HPP)
#	define DPL2D_HPP

struct IDirect3DDevice9;		// forward (full def via <d3d9.h> in dpl2d.cpp)
class dpl2d_DISPLAY;			// opaque list handle (DPLSTUB.h)

//
// Rasterise a compiled dpl2d display list onto `device`, using the device's
// current viewport for the normalised->pixel mapping.  Safe to call with a
// NULL list or device (no-op).  Saves and restores the render states it
// touches.  Intended to be called by the world-view renderer each frame after
// the 3D scene is drawn (e.g. BTReticleRenderable::Execute -> here), once the
// reticle display lists built in btl4vid.cpp are wired to an execution point.
//
void dpl2d_ExecuteList(dpl2d_DISPLAY *list, IDirect3DDevice9 *device);

#endif
