-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allow negative numbers in #emit & changes to public variable behaviour #128
Conversation
1. 'stock' public (or public const) variables will be written to the file IF AND ONLY IF it has been used (read or write) 2. 'non-stock' public (or public const) variables will always be written to the file (whether or not it has been used) 3. public variables (or public const) NEVER ever trigger unused symbol warnings
stops unused warnings from being triggered for public variables
Yes, you are allow to use negative numbers in #emit, but this is only for integer numbers, not floating. |
I don't think someone will ever need to pass a rational value to an assembly instruction. I am not sure how the compiler stores floating point values but amx_ctof seems to do a simple direct cast...
so what you did there (OR operation) should be correct. |
I guess they would if they wanted to do: #emit PUSH.C 0.5
#emit PUSH.C 7.7
#emit PUSH.C 8
#emit SYSREQ.C floatmul But that seems more likely to cause confusion and mistakes since there is no tag checking so a stray |
@YashasSamaga Mind fixing Appveyor build and indentation? |
Abiding by the C89 declaration rules so that AppVeyor build can succeed.
|
Great, thanks. Yes, Visual Studio / MSVC doesn't support C99, and in fact the whole codebase is written in C89, so I try to stick to it too for consistency (I think it was originally done for maximum portability). |
allows negative numbers in #emit
fix for #125