however the resulting code produces glitches around (e.g. invisible cars in Mario Kart and broken menus in many games)
also I have noticed two things in the Mask/MaskCoupled routines: you define them for "INT32 num" but Cycle() pass them a "UINT32 tilenum" and I would expect in fact such a tilenum to be in the 0-7 range, given that the n64_rdp class has
Code
N64Tile m_tiles[8];
is there any missing mask?
I hope this report might help you to find the proper solution to have both the crash fixed and the cars visible