Fix text#350
Conversation
* Fix world hud strings * Fix `rf::gr::text_2d_mode` * Move --------- Co-authored-by: Chris Parsons <gooberCP@gmail.com>
|
|
||
| enum TextureSource | ||
| { | ||
| enum TextureSource : uint8_t { |
There was a problem hiding this comment.
I think those enum changes are wrong. In assembly it's clearly visible that GrMode::__ct uses 32 bits for reading those enums from the stack (e.g. in 00411E2A or in 00559E15), so changing underlying type to 8 bit feels like introduction of UB. Why not keep it as is?
I see now that you made the change to make it easier to push the constant, but I assume in this case simple cast would be more correct
There was a problem hiding this comment.
Hm. I read C ABI promotes integers to 32-bits including char and enums.
There was a problem hiding this comment.
When pushing yes, but when returning no. Every function in RF that returns bool only sets al. Functions returnings GrMode components set eax meaning those values should be 32-bit. I guess it doesn't break anything unless we hook function returning those enums, assuming they are not used in any struct (I don't think they are), but still IMO it's better to keep RF structs ABI compatible with RF, even if another layout would work, because debugging such things is a nightmare.
There was a problem hiding this comment.
I guess so. Updated.
rf::gr::text_2d_modeshould ignore fog. RF does not have issues because it just happens to userf::gr::text_2d_modeafter fog has been disabled.