Three small fixes: DXT capability check, corona decal clamp, Vanilla link break - #33
Open
18woldemar wants to merge 3 commits into
Open
Three small fixes: DXT capability check, corona decal clamp, Vanilla link break#3318woldemar wants to merge 3 commits into
18woldemar wants to merge 3 commits into
Conversation
CanVideoCardDoDXT is a TODO that answers "no" on OpenGL whatever the hardware supports, and answering no has a cost: CStreaming::Init then builds MODELS\TXD.IMG, repacking every texture dictionary out of its D3D8 container, and since TXD.DIR is scanned before GTA3.DIR that copy is what gets read from then on - the originals are shadowed. On retail PC data that is 1360 dictionaries, about 180 MB of duplicate on disk and a conversion pass on first run, for a card that could have read the originals directly. The textures really are DXT1 there (platform 8, compression 1, read out of the archive headers) and the rewrite is size-for-size, so nothing is lost to it - it is simply unnecessary work on any desktop GL driver. GetGPUcaps already asks librw the same question, so ask it here too. Desktop GL has S3TC; a GLES device without it still gets the conversion path it needs. Checked by hiding models/txd.img and txd.dir from a run: the game starts, plays and quits normally and does not rebuild them.
CShadows::StoreStaticShadow takes red, green and blue as uint8 and nothing bounds them on the way in, so a value past 255 wraps rather than clipping - the decal comes out dark instead of merely too bright. Retail data does not reach it: col.r and shadowIntensity are both uint8, and CTimeCycle::GetSpriteBrightness is timecyc.dat's sprBght column, which tops out at exactly 1.00 across all 168 rows, so the product lands on 255.0 and stops. It is reachable from data, though - the parser stores sprBght*10 in an int8, so anything above 1.0 puts a bright lamp over the edge. Guarded, with the original arithmetic kept in the other arm.
channel.cpp references gPlayerTalkDataSize unconditionally, while sampman_oal.cpp only
defines it behind FIX_BUGS - so any build with FIX_BUGS off, which is what the Vanilla
configuration is, fails at link:
error LNK2001: unresolved external symbol "unsigned int gPlayerTalkDataSize"
It shows up in this repository's own CI, where the Windows x86 workflow builds Vanilla.
Guarded on both sides; with the fix off the temp stereo buffer is sized from PED_BLOCKSIZE
alone, which is what the code did before the player-comment buffer existed.
18woldemar
added a commit
to 18woldemar/reVC
that referenced
this pull request
Aug 4, 2026
Everything from the CI day: the workflows unrotted and moved to release-only triggers, the tag-driven release rule with its draft and its attach step, the signing key as a secret, Jolt building on Windows and the Switch, and the two bugfixes that went upstream as PR mrxenginner#33. Four conflicts, all expected: - build.gradle and app/CMakeLists.txt take vercetti's version handling. That is the whole point of the change - the tag is the only place the version lives, and both files used to hold a copy of it. - Coronas.cpp and TexRead.cpp keep STARFISH's shape. Both fixes already live here in their own form, and Coronas' has the DYNAMIC_LIGHTS gate wrapped around the same block, which taking vercetti's version would have dropped - this branch has dynamic lights and that branch does not. Ragdoll suite green, graphics suite green - 44 of 44, including the pixel checks, which is what says the librw fork is the one that got built.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three unrelated one-file fixes; happy to split them into separate PRs if you would rather.
CanVideoCardDoDXTanswers "no" on OpenGL whatever the card can doIt is a
// TODOinTexRead.cpp, and the "no" is not free.CStreaming::Initthen buildsMODELS\TXD.IMG, repacking every texture dictionary out of its D3D8 container, and becauseTXD.DIRis scanned beforeGTA3.DIRthat copy is what gets read from then on — theoriginals are shadowed.
On retail PC data that is 1360 dictionaries, ~180 MB of duplicate on disk and a conversion
pass on first run, for a card that could have read the originals directly. The textures
there really are DXT1 (platform 8, compression 1, read out of the archive headers) and the
rewrite is size-for-size, so nothing is lost to it — it is simply unnecessary work on any
desktop GL driver.
GetGPUcapsalready asks librw the same question, so this asks it here too. Desktop GL hasS3TC; a GLES device without it still takes the conversion path.
Checked by hiding
models/txd.imgandtxd.dirfrom a run: the game starts, plays andquits normally and does not rebuild them.
Corona pool decal colour can wrap (behind
FIX_BUGS)CShadows::StoreStaticShadowtakes red/green/blue asuint8and nothing bounds them on theway in, so a value past 255 wraps rather than clipping and the decal comes out dark instead
of merely too bright.
Being straight about the scope: retail data does not reach it.
col.randshadowIntensityare bothuint8, andCTimeCycle::GetSpriteBrightnessis timecyc.dat'ssprBght, which tops out at exactly 1.00 across all 168 rows — so the product lands on255.0 and stops. It is reachable from data, though: the parser stores
sprBght*10in anint8, so anything above 1.0 puts a bright lamp over. Guarded, with the original arithmetickept in the
#else.The Vanilla configuration does not link
channel.cppreferencesgPlayerTalkDataSizeunconditionally whilesampman_oal.cpponlydefines it behind
FIX_BUGS, so a build with the fixes off fails:This is visible in this repository's own CI — the
premake x86workflow builds Vanilla andhas been red on it. Not caused by the two changes above; included here so the PR's own CI
can go green. Guarded on both sides.
Built on Linux (librw / GL3 / OpenAL) and on Windows through the repo's MSVC workflow.