For the actual feature - thanks!

Thanks again so much! ACS.NET has been ULTRA useful in a lot of the stuff I'm making!
Well I think you should release ACS.NET's source with your project. Because either way, you have to include it's license somewhere (even if you only release the compiled library). Just because your project is released under GPL doesn't mean that you cannot include ACS.NET in it. As long as ACS.NET's license is put where users can easily find it (such as in a lump below the actual library) you can do whatever you want with it as long as you follow the license terms. And it doesn't say anywhere in the terms that you cannot include it in a project where the project has another license. Because however you distribute it, the license for my library will always apply.Nash wrote: For my first question, I am making a custom inventory toolkit to be released under GPLv2 and I was wondering if I could distribute ACS.NET along with my sources... do you think it would be a better idea instead to not distribute ACS.NET and instead tell users to download it separately? I thought it would be convenient to distribute it because it would make recompiling easy for users.
After reading through your post it sounds like GDCC-ACC is (I don't mean to be rude to the creator, but...) a pain in the ass compiler.Nash wrote: 1) I suggest you rearrange the functions in a way such that no function will ever call an undeclared function. I am using an alternative compiler (gdcc-acc) and it throws a fit if it finds a call to a function that is actually defined AFTER the call. I could solve it with forward declarations placed on top of the ACSNET source file but it would be great if you addressed the problem so that I can work with a pristine copy of the file with no local changes. :D
Is it? Whoops. *Looks*Nash wrote: 2) StringFind() - the last argument is the wrong type (should be int); acc doesn't complain but gdcc-acc is a little more strict...
Argh, an even worse thing with the compiler. The original ZDoom syntax IS: "Int, Str, Return, Function, #Define, ..."Nash wrote: 3) gdcc-acc is case-sensitive, I suggest you follow C semantics/standards for the reserved keywords like int, str, return, function, #define, if, etc etc etc... instead of #Define Str If etc
To clarify, you cannot call a function before it is declared. acc gets around this by implicitly declaring the function when used as having all int parameters. Doing something similar in GDCC is planned, but not necessarily in the immediate future, and would be accompanied by a warning due to the dangers of implicit function declarations.Vincent(PDP) wrote:After reading through your post it sounds like GDCC-ACC is (I don't mean to be rude to the creator, but...) a pain in the ass compiler.Nash wrote: 1) I suggest you rearrange the functions in a way such that no function will ever call an undeclared function. I am using an alternative compiler (gdcc-acc) and it throws a fit if it finds a call to a function that is actually defined AFTER the call. I could solve it with forward declarations placed on top of the ACSNET source file but it would be great if you addressed the problem so that I can work with a pristine copy of the file with no local changes. :D
There's no logic in not being able to compile functions which are declared after a call. Most (if not all) programming languages manage this anyway since the function/method actually IS defined.
I particularly don't like reordering code after it's written since I know where to find it.
gdcc-acc is case insensitive, as that is a property of the ACS language as defined by acc and one of the primary goals of gdcc-acc is compatibility with acc. Even for some of the more "esoteric" corners of the language, to the greatest extent possible without making GDCC itself into a spaghetti dinner and without compromising my ability to add extensions to ACS.Vincent(PDP) wrote:Argh, an even worse thing with the compiler. The original ZDoom syntax IS: "Int, Str, Return, Function, #Define, ..."Nash wrote: 3) gdcc-acc is case-sensitive, I suggest you follow C semantics/standards for the reserved keywords like int, str, return, function, #define, if, etc etc etc... instead of #Define Str If etc
And also ACS is supposed to be case-insensitive!
Right now GDCC-ACC makes no sense to me at all. :/
Of course. I appreciate feature suggestions. :)kodi wrote: If I may be so bold as to suggest something for future versions, I would really enjoy
I will add this in the next version, but I saw you got it at the ZDoom Forum. (:kodi wrote: A) a function that separates a string into lines with \n sequences at the last available space that would make the line longer than (argument) characters while also taking any \n seqences already in the string into account
I'm not exactly sure what you want to achieve... Overall something like this is a hard task to perform. I will try, but it will probably not make it to the next version.kodi wrote: B) a function that returns or logs the X and Y pixel coordinates of an actor(TID) on the players screen accurately regardless of angle/pitch/roll.
Great! I have another then: Functions that returns the *real* current vertical and horizontal FOV. Like Quake, the FOV cvar in zdoom related engines is the horizontal fov of the 4:3 area of the screen only, so in 16:9 the actual horizontal fov is something like 106.xyz degrees rather than 90° if memory serves me right. Vertical fov is always 60° I believe, but I'm not sure. Then there's the force aspect ratio cvar to account for, as well as the FOV CVAR being set to anything other than the standard 90.Vincent(PDP) wrote: Of course. I appreciate feature suggestions. :)
Code: Select all
function recalc() {
var desiredfov = deg2rad(document.getElementById("setfov").value);
var ratioDividend = document.getElementById("ratioDividend").value;
var ratioDivisor = document.getElementById("ratioDivisor").value;
var aspectRatio = ratioDividend/ratioDivisor;
var ratioRatio = aspectRatio/(4/3);
document.getElementById("result").value = 2*rad2deg(Math.atan(Math.tan (desiredfov/2)*ratioRatio));
}
Yeah, I was going to edit this post and link you to it but you found it yourselfI will add this in the next version, but I saw you got it at the ZDoom Forum. (:
The purpose would be the ability to accurately print hudmessages on top of monsters for things like health bars or other info hovering above them, or in the case of my project comparing the coordinates to an ACS mouse cursor so actors can be interacted with by clicking on them. I have such a system in place, but I'm terrible at math so the projection is hard coded for 1920*1080 and isn't even quite right at that.I'm not exactly sure what you want to achieve... Overall something like this is a hard task to perform. I will try, but it will probably not make it to the next version.