0x1F9F1 / Open1560

A mod for Midtown Madness 1, primarily focused on supporting modern computers and fixing bugs.
https://0x1F9F1.github.io/Open1560
GNU General Public License v3.0
113 stars 9 forks source link

Increase AgiLibMax Value #142

Open KcRobin9 opened 8 months ago

KcRobin9 commented 8 months ago

We are facing some issues with the AgiLibMax, as it limits adding new vehicle colors to the game, and it may limit the ability to use upscaled textures in the future.

constexpr i32 agiLibMax = 2048;

I recall (although I'm not 100% sure) that in older Open1560 versions I was able to increase AgiLibMax's value without running into check_size errors. However, in the current codebase many things seem to be related to this variable. In the structs I also see dd 2048 dup(?), so it's debatable if I was actually able to increase the variable's value previously.

There also seems to be a peculiar difference in when the game crashes depending on the gamemode and network status. With the same setup (i.e. new vehicle colors with the .ar !!!!!ColorTest0.1.ar), Blitz races and Cruise crash, while Circuit races do not.

After inspecting the code, I don't know how to tackle this issue or if it's even feasible.

I attached the logs and mod below.

https://www.mediafire.com/file/qsvuehunl7pzqk1/Logs_%2526_Mod.rar/file

KcRobin9 commented 8 months ago

I was able to temporarily avoid the crash by removing some DLP files, but this is a hacky solution (as e.g. one of the cars didn't have wheels anymore)