jarkkom / dxdll

DXDLL graphics mod for Operation Flashpoint 1985
Other
2 stars 0 forks source link

CRC32 calculation #1

Open ghost opened 2 years ago

ghost commented 2 years ago

@jarkkom, could you elaborate in detail on how CRC32 was calculated for textures in DXDLL? The information included in the main page (Reflections) as well as comments in the code are not sufficiently explanatory to me. I would like to be able to calculate it the way you've done it for DXDLL.

jarkkom commented 2 years ago

It’s been a while, but I’m fairly sure it was just trial-and-error method. Something along lines logging crc32 checksum for every texture that game loaded and trying to turn match checksums with correct textures.

There was also tooling to read texture files, it might’ve been used to extract raw texture data and then calculate their checksums.

ghost commented 2 years ago

@jarkkom, I've been able to get access to the DXDLL debug output. I've noticed it logs each texture which gets through the memory. Some of them are commented as "found" so it probably means they're the ones that were coded into the DLL file to be looked for. Why did you decide on such an uncommon approach for finding the textures which DXDLL uses for rendering? Why didn't you just use a regular path to a texture in a config file which accompanies DXDLL? This way it would be simple and flexible. In the current state it is not possible to adjust DXDLL to modified textures it bases its effects on.