Hm, I never used graphical RobotC, but the code looks right to me. I am not sure what the issue might be, but X Drive is supposed to use only two motors when you drive along it diagonal. It is going to be both slower and weaker when it is using only two motors:
Try to set theta2 = theta, ignoring Gyro output, and see if robot drives the same way it would drive without extra transformations.