I've recently looked into why XXL crashes if you set it to have more than 255 shadows
and it was indeed a __int8 which was being used as a loop counter
and the other operand wasn't...
However that was not an issue to patch since it was just and and 0xFF
But there is now another problem, when rendering or registering new shadows (I think) the game traverses a linked list
and if you have it set to more than 255 shadows it will never reach the end and get stuck at some node
which is bad, the loop condition is if the pointer is NULL
I don't know why this happens yet, maybe with enough work I will get to the bottom of the issue
There is a limit you can set
and this limit has a limit of 255
Kind of silly tho that the developers decided to use 8 bit integers but store it as 32 bit in the level
You could argue it is because of memory alignment, but even then it doesn't make sense to use 8 bit integers for every task you want to do
I think the romaster fixed it by using a vector or something instead of an array with a fixed size
Normally it's set to 30 max on screen
you can set it to 255 and it works fine
but if you want to make the limit >255 then the game shits itself