Ironically, if the compiler supported C99, it would be even easier for it to generate correct + efficient code - it's really hard to put const on structs in C89, because anything in a braced initializer must be a compile-time constant, and the first dotted assignment implicitedly initializes the other elements. I took a lot of care putting const where I could and using nested scopes though to help the compiler out as much as possible.
Once I finish sorting out the bugs with the rendering code, I'm definitely planning to factor my data structures out into a separate library which could be incorporated into your CE libraries project.
I've actually already switched everything to *either* int or float (depending on context), with the exception of my hashing routines, which need 32 bits, but aren't in use now anyway, so shouldn't be having an effect on the performance.
The other thing it could be besides overflow might be truncation from float to int where a fractional result is being discarded to 0, but I've gone over the code pretty carefully. I also should have seen that on the PC version, so I'm skeptical (and really, I don't know what could be overflowing - 24 bits should be more than enough for products of screen coordinates).
To really boost the performance, I'm definitely going to need to switch from float to some kind of 16.8 representation, but I'm not yet sure what that's going to look like, and I always prefer to optimize for correctness before speed
On _JError vs exit(int), I personally prefer to use informative error messages where possible, but it would be really nice for shells, especially those supporting C programs - but really we shouldn't treat assembly programs differently, to add a custom error handler to generate program status codes from OS errors.
Once I finish sorting out the bugs with the rendering code, I'm definitely planning to factor my data structures out into a separate library which could be incorporated into your CE libraries project.
I've actually already switched everything to *either* int or float (depending on context), with the exception of my hashing routines, which need 32 bits, but aren't in use now anyway, so shouldn't be having an effect on the performance.
The other thing it could be besides overflow might be truncation from float to int where a fractional result is being discarded to 0, but I've gone over the code pretty carefully. I also should have seen that on the PC version, so I'm skeptical (and really, I don't know what could be overflowing - 24 bits should be more than enough for products of screen coordinates).
To really boost the performance, I'm definitely going to need to switch from float to some kind of 16.8 representation, but I'm not yet sure what that's going to look like, and I always prefer to optimize for correctness before speed
On _JError vs exit(int), I personally prefer to use informative error messages where possible, but it would be really nice for shells, especially those supporting C programs - but really we shouldn't treat assembly programs differently, to add a custom error handler to generate program status codes from OS errors.