Files
arcattackandClaude Opus 4.8 7b7d465e5e Initial commit: bt411 -- standalone Windows BattleTech (Tesla 4.10 port)
Clean, self-contained extraction of the BattleTech-specific work from the
reverse-engineering workspace -- engine + game + content + build, with nothing
from Red Planet or the raw archive dumps. Builds green (Win32) and runs the
single-player drive->animate->target->fire->damage->destroy loop out of the box.

Layout:
  engine/   MUNGA + MUNGA_L4 shared 2007 engine, carrying our BT render/loader
            work (bgfload/L4D3D/L4VIDEO: BSL bit-slice decode, LOD/ground/shadow
            models) + image codec; the minimal rp/ headers the audio HAL needs
  game/     reconstructed BT logic + surviving-original BT source + fwd shims
            + WinMain launcher
  content/  full runtime tree (BTL4.RES, VIDEO/, GAUGE/, AUDIO/, eggs, BTDPL.INI)
  docs/     format specs + reconstruction ledgers
  reference/ raw Ghidra pseudocode (recon source-of-truth) + decomp exporter
  tools/    MP console emulator + map/resource scanners

One top-level CMake builds munga_engine lib + bt410_l4 game lib + btl4.exe.
All paths relativized (186 fwd shims + ~437 CMake abs paths -> repo-relative);
DXSDK is the one external, overridable via -DDXSDK. Verified: builds to a
byte-identical 2.27MB exe and runs combat (TARGET DESTROYED, 0 crashes) against
the bundled content.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-05 21:03:40 -05:00

221 lines
5.9 KiB
C++

#ifndef dpl_vpx_h
#define dpl_vpx_h
#ifdef __cplusplus
extern "C" {
#endif
#define VPX 1
#include <dpl/vpx/dpl_priv.h>
extern void
dpl_SetDeferredDeletes ( int32 d );
extern void
dpl_SetTextureScroll ( dpl_TEXTURE *t, float u, float v, float du, float dv );
extern void
dpl_SetGeomScaleFactor ( float32 geomscale );
extern void
dpl_SetDCSTraversal ( dpl_DCS *d, int32 trav );
extern void dpl_SetDCSXAxis ( dpl_DCS *d, float32 sin, float32 cos );
extern void dpl_SetDCSYAxis ( dpl_DCS *d, float32 sin, float32 cos );
extern void dpl_SetDCSZAxis ( dpl_DCS *d, float32 sin, float32 cos );
extern void
dpl_SetDCSQuaternion ( dpl_DCS *d, float32 *quaternion_stuff, float32 *xlate );
extern void
dpl_FlushDCSArticulations ( dpl_DCS **d );
extern void
dpl_SetObjectAdditiveLODs ( dpl_OBJECT *o );
extern void
dpl_SetMaterialDitherZ ( dpl_MATERIAL *m, float32 dither );
extern void
dpl_install_sfx ( int32 sfx_code,
dpl_TEXTURE *t,
int32 bang_type,
float frag_size,
float frag_velocity,
float vertical_bias,
float switch_off,
float cook_r,
float cook_g,
float cook_b,
float variance,
float gravity,
float cool,
float opacity_cool,
int32 fragments,
int32 iterations,
int32 immunity );
extern void
dpl_SetMaterialFogImmunity ( dpl_MATERIAL *m, int32 immunity );
extern void dpl_SetDCSExplodeGeo ( dpl_DCS *d, int32 on );
extern void dpl_SetDCSIgnoreGeo ( dpl_DCS *d, int32 on );
extern void dpl_SetDCSInheritLmodel ( dpl_DCS *d, int32 on );
extern void dpl_SetDCSForceEvalLmodel ( dpl_DCS *d, int32 on );
extern void dpl_Damagize ( dpl_GEOGROUP *, dpl_MATERIAL *);
extern void dpl_UnDamagize ( dpl_GEOGROUP * );
extern void dpl_Punchize ( dpl_GEOGROUP * );
extern void dpl_Geometrize ( dpl_GEOMETRY *, int32 triangle_code );
extern dpl_INSTANCE *
dpl_RapidSectPixel ( float32 xp, float32 yp,
float32 radius,
uint32 mask,
float32 *xi, float32 *yi, float32 *zi,
dpl_DCS **d, dpl_GEOGROUP **gg, dpl_GEOMETRY ** g);
extern void
dpl_RandomTable ( char *table );
extern int32 *
dpl_TouchNode ( int32 *list, void *n );
extern int32
dpl_FlushNodes ( int32 *list );
extern void
dpl_SetMinRetraces ( int32 retraces );
extern void
dpl_KillEffectAtDCS ( dpl_DCS *dcs );
void
dpl_KillParticlefxRange ( int32 min, int32 max );
extern void
dpl_RedrawScene ( void );
extern void
dpl_PutAppSpecific ( void *node, void *app_specific );
extern void*
dpl_GetAppSpecific ( void *node );
extern void
dpl_MorphObject ( dpl_OBJECT *dest,
dpl_OBJECT *start,
dpl_OBJECT *end,
float32 alpha,
int32 morph_mode );
extern void
dpl_MorphGeometry ( dpl_GEOMETRY *dest,
dpl_GEOMETRY *start,
dpl_GEOMETRY *end,
float32 alpha,
int32 morph_mode );
extern void
dpl_MorphMaterial ( dpl_MATERIAL *dest,
dpl_MATERIAL *start,
dpl_MATERIAL *end,
float32 alpha,
int32 morph_mode );
extern void
dpl_TimedMorphObject ( dpl_OBJECT *dest,
dpl_OBJECT *start,
dpl_OBJECT *end,
float32 time,
int32 morph_mode,
float32 a,
float32 b,
float32 c,
float32 d );
extern void
dpl_TimedMorphMaterial ( dpl_MATERIAL *dest,
dpl_MATERIAL *start,
dpl_MATERIAL *end,
float32 time,
int32 morph_mode,
float32 a,
float32 b,
float32 c,
float32 d );
extern void dpl_SFXTexels2D ( dpl_TEXMAP *tm,
uint32 *texels );
extern void dpl_FakeTextureSize ( dpl_TEXTURE *t, int32 delta_size, int32 delta_offs );
extern void dpl_SetDCSLightingMask ( dpl_DCS *d, int32 mask );
extern int32 dpl_GetDCSLightingMask ( dpl_DCS *d );
extern void dpl_SetLightLightingMask ( dpl_LIGHT *d, int32 mask );
extern int32 dpl_GetLightLightingMask ( dpl_LIGHT *d );
extern void dpl_SetDCSNearField ( dpl_DCS *d, int32 on );
extern int32
dpl_FreeMemory ( void );
extern int
dpl_bslReplace ( char8 *name, dpl_TEXTURE *tex );
extern void
dpl_tgaReplace(char8 *file, dpl_TEXTURE *tex );
extern void
dpl_DisableSyncOnCreate ( void );
extern void
dpl_EnableSyncOnCreate ( void );
extern void
dpl_SetDCSBound(dpl_DCS *d, float *minimax );
extern float32
dpl_GetDCSBound(dpl_DCS *d );
extern void
dpl_PerfStats ( void );
extern void
dpl_SetLodStress ( float32 s );
extern
void dpl_SetGeogroupDrawLast(dpl_GEOGROUP *gg, int32 last_on);
extern
int32 dpl_GetGeogroupDrawLast(dpl_GEOGROUP * gg);
extern
void dpl_GetObjectBounds( dpl_OBJECT *o, float32 *b );
int32
dpl_GetGeometryNumConnections(dpl_GEOMETRY *g );
void
dpl_GetGeometryConnections ( dpl_GEOMETRY *g,
int32 *v,
int32 offset,
int32 n );
extern void
dpl_SetGeometryShadowVolume ( dpl_GEOMETRY *g );
extern void
dpl_SetGeometryLightVolume ( dpl_GEOMETRY *g, int imm );
extern void
dpl_CleanupGeogroup ( dpl_GEOGROUP *gg, int renorm_facets );
extern void
dpl_ReInit(void);
#ifdef __cplusplus
}
#endif
#endif