Files
RP412/assets/RP411/startrp-800x600.bat
T
CydandClaude Fable 5 d6745353b1 L4D3D: survive missing textures instead of crashing at mission load
d3d_OBJECT::LoadTexture never checked D3DXCreateTextureFromFileA, cached
the NULL texture, and unconditionally AddRef()ed it - an access violation
on any missing/unreadable texture, hit by every bare working copy because
the pod skins (VIDEO\player1-8) come from the presets/replacement-material
path, not the depot. Failures now log the filename+hr and the draw op
renders untextured, matching the existing no-texture-filename path. Also
guard the unchecked gReplacementData->find() in LoadObject (same latent
UB one branch earlier).

Verified in the sandbox working copy: the game now boots to a running
RPL4 window with -windowed -egg TEST.EGG (RIO served by vRIO), logging
the eight missing pod skins instead of dying in MakeEntityRenderables.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-12 12:41:29 -05:00

55 lines
3.2 KiB
Batchfile

@echo off
rem ============================================================================
rem Red Planet pod-cockpit launcher (wrapper around rpl4opt.exe)
rem ============================================================================
rem
rem Starts the game windowed with an 800x600 main view and rebuilds the full
rem 7-display pod cockpit on the desktop:
rem
rem [ 1: main 3D view ] [ 3: MFD W3.R ] [ 4: MFD W3.G ] [ 5: MFD W3.B ]
rem [ 6: MFD W4.R ] [ 2: map, 90CW ] [ 7: MFD W4.G ]
rem
rem The game itself only creates 4 windows. The five monochrome green MFDs are
rem packed into the color channels of game windows 3 and 4 (window 3 carries
rem three MFDs in R/G/B, window 4 two more in R/G). The wrapper hides those
rem source windows behind the main view and shows live green-screen mirrors of
rem each channel, plus the map display rotated 90 degrees clockwise (portrait,
rem as mounted in the pod). Mirror windows have title bars and can be dragged.
rem
rem All arguments are passed to startrp-800x600.ps1. Wrapper options:
rem
rem -Width N -Height N main view size (default 800x600)
rem -TileOnly no mirrors - just resize + tile the 4 real windows
rem -SaveLayout record the window arrangement on exit: launch with
rem this, drag windows where you want them, quit the
rem game -> positions saved to cockpit-layout.json and
rem restored automatically on every later launch
rem -ResetLayout delete the saved layout, return to the default grid
rem -TopMost keep the mirror displays above all other windows
rem
rem Anything else replaces the game's own arguments (default: -net 1501).
rem Useful game switches (see RedPlanet-CommandLine-and-Environment.md):
rem -net <port> connect to the pod network / Tesla console (TCP)
rem -egg <file> standalone: run a local mission, e.g. -egg TEST.EGG
rem -lc Live Cam spectator station -mr Mission Review
rem
rem Examples:
rem startrp-800x600.bat
rem normal pod: -net 1501, cockpit mirrors, saved layout if present
rem startrp-800x600.bat -egg TEST.EGG
rem offline test mission, no console needed
rem startrp-800x600.bat -SaveLayout -TopMost
rem arrange your cockpit, quit, and the layout sticks for future runs
rem startrp-800x600.bat -Width 1024 -Height 768 -net 1501
rem bigger main view on the pod network
rem
rem Lifecycle: PowerShell stays running hidden to drive the mirrors and exits
rem by itself when the game quits. Closing any mirror window shuts down all
rem mirrors and brings the real game windows back out. Note: the mirrors are
rem required because the game renders with D3D9 - the main window is always
rem created at full screen size by the exe (the -res switch only sets the
rem backbuffer), and windows parked off-screen stop rendering entirely, so
rem the sources are hidden behind the main view instead.
rem ============================================================================
start "" powershell -NoProfile -ExecutionPolicy Bypass -WindowStyle Hidden -File "%~dp0startrp-800x600.ps1" %*