GDCC: An Alternative ACS Compiler [0.15.0]
Forum rules
The Projects forums are ONLY for YOUR PROJECTS! If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.
Got a cool project idea but nothing else? Put it in the project ideas thread instead!
Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.
Please read the full rules for more details.
The Projects forums are ONLY for YOUR PROJECTS! If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.
Got a cool project idea but nothing else? Put it in the project ideas thread instead!
Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.
Please read the full rules for more details.
-
-
- Posts: 1202
- Joined: Tue Feb 26, 2013 2:48 pm
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Arch Linux
- Graphics Processor: ATI/AMD with Vulkan/Metal Support
Re: GDCC: An Alternative ACS Compiler
C++ is not really based on C at all, and thus has a lot of features that are different, like operator=.
-
- Posts: 382
- Joined: Fri Aug 28, 2009 1:46 pm
Re: GDCC: An Alternative ACS Compiler
Even in C++ a class like that would have a default assignment operator that does a simple copy, so I do not know what VS would be complaining about.
-
- Posts: 551
- Joined: Wed Sep 06, 2006 12:36 pm
- Preferred Pronouns: She/Her
- Operating System Version (Optional): Debian 11 (bullseye), Windows 10
- Location: Middle of Nowheresville Il.
Re: GDCC: An Alternative ACS Compiler
I dug through my C++ manual and I think I found my confusion: you can't compare objects, i.e. if(obj1 == obj2), but you can compare member, i.e. if (obj1.val == obj2.val).
I'll have to dig out my lab work on overloading but I think it was a lesson in setting copying across generally incompatible object types, i.e. struct obj1 = struct obj2, which just made it worse.
I'll have to dig out my lab work on overloading but I think it was a lesson in setting copying across generally incompatible object types, i.e. struct obj1 = struct obj2, which just made it worse.
-
- Posts: 551
- Joined: Wed Sep 06, 2006 12:36 pm
- Preferred Pronouns: She/Her
- Operating System Version (Optional): Debian 11 (bullseye), Windows 10
- Location: Middle of Nowheresville Il.
Re: GDCC: An Alternative ACS Compiler
Hey, odd error, just added ctype to my header list, and I get this when compiling:
My syntax looks like this, which looks right to me
#include <ctype.h>
Something I'm doing wrong? Updated to 11.0-16 and same problem.
Code: Select all
ERROR: (no file): expected primary-expression got ' '

#include <ctype.h>
Something I'm doing wrong? Updated to 11.0-16 and same problem.
-
- Posts: 382
- Joined: Fri Aug 28, 2009 1:46 pm
Re: GDCC: An Alternative ACS Compiler
And it compiled fine before adding the include directive? I am not even sure right now how you can get that error without an origin, so I might need a copy of the code to figure out what happened.
-
- Posts: 551
- Joined: Wed Sep 06, 2006 12:36 pm
- Preferred Pronouns: She/Her
- Operating System Version (Optional): Debian 11 (bullseye), Windows 10
- Location: Middle of Nowheresville Il.
Re: GDCC: An Alternative ACS Compiler
Yeah ok, I will send the source by PM; I'm not seeing a problem so more eyes are needed. And yeah, things are good if I don't include ctype. I'm only using it for one call to isalnum, in one file, so a workaround could be acceptable.
-
-
- Posts: 1706
- Joined: Wed May 13, 2009 3:15 am
- Graphics Processor: nVidia with Vulkan support
Re: GDCC: An Alternative ACS Compiler
This toolset is awesome (despite lacking the proper documentation - or is it just hard to find?) but it really, really needs a GZDoom Builder configuration so that scripts can be compiled from its built-in script editor rather than from the command line. I thought I could write a library in GDCC ACS and #import it in the script editor, but I forgot that #import accesses the source file, and acc.exe cannot process the said file for obvious reasons. This means I have to compile both the library and the map script with gdcc-acc.exe and then embed the resulting lumps in the WAD file. Oh my, developing ZDoom maps was never that hard...
Also, it seems that gdcc-acc.exe allows functions such as Delay() to be used inside function definitions. This compiles and links, but when a script with a call to such a function is executed in GZDoom, it crashes with a "GZDoom has stopped working" message - no crash report generated. Sorry, I have no idea if this has been brought up before or not.
Also, it seems that gdcc-acc.exe allows functions such as Delay() to be used inside function definitions. This compiles and links, but when a script with a call to such a function is executed in GZDoom, it crashes with a "GZDoom has stopped working" message - no crash report generated. Sorry, I have no idea if this has been brought up before or not.
-
- Posts: 317
- Joined: Mon Jul 16, 2012 2:02 am
Re: GDCC: An Alternative ACS Compiler
Delay() is invalid inside functions, DON'T DO THAT! As well as other functions from the same category.
-
- Posts: 265
- Joined: Mon Jan 24, 2011 6:04 pm
Re: GDCC: An Alternative ACS Compiler
As awesome as that would be, it would definitely need to be done internally on GZDB's side. The main obstacle is the AcsParserSE class which preprocesses ACS files, used by AccCompiler to get script names and look through #includes. Even if you make a wrapper program for gdcc-cc or gdcc-acc, the wrapper program can't even run because the builtin parser chokes on any new syntax.Player701 wrote:it really, really needs a GZDoom Builder configuration so that scripts can be compiled from its built-in script editor rather than from the command line.
-
-
- Posts: 1706
- Joined: Wed May 13, 2009 3:15 am
- Graphics Processor: nVidia with Vulkan support
Re: GDCC: An Alternative ACS Compiler
Of course it's a "don't do that" case but acc.exe prevents users from shooting themselves in the foot, while gdcc-acc.exe (and gdcc-cc.exe as well, BTW) does not. It could issue a warning at least.ZzZombo wrote:Delay() is invalid inside functions, DON'T DO THAT! As well as other functions from the same category.
-
- Posts: 1528
- Joined: Thu Jul 14, 2011 12:06 am
- Location: Gold Coast, Queensland, Australia
Re: GDCC: An Alternative ACS Compiler
Delay() is only invalid in a function in ZDoom, it works fine in Eternity
-
- Posts: 382
- Joined: Fri Aug 28, 2009 1:46 pm
Re: GDCC: An Alternative ACS Compiler
A warning for use of functions which delay (or potentially delay, as in a call to a sync script) from StdCall/StkCall functions when targeting ZDoom or Zandronum would be good, though. I will try to get to that after I merge in the BC_DGE branch. However, I consider it a low priority since I think it is well known that ZDoom's interpreter does not allow delays while there are call frames or other data on the stack.
-
-
- Posts: 1706
- Joined: Wed May 13, 2009 3:15 am
- Graphics Processor: nVidia with Vulkan support
Re: GDCC: An Alternative ACS Compiler
I'm quite surprised that Eternity does allow this (have never used it myself), since I thought ZDoom was the most advanced port in terms of scripting.
-
- Posts: 382
- Joined: Fri Aug 28, 2009 1:46 pm
Re: GDCC: An Alternative ACS Compiler
I rewrote its interpreter years ago. Internally, it has a lot of capabilities that ZDoom's interpreter does not.
-
-
- Posts: 17481
- Joined: Mon Oct 27, 2003 12:07 am
- Location: Kuala Lumpur, Malaysia
Re: GDCC: An Alternative ACS Compiler
Kindly requesting update to the new parameter introduced to PlaySound... as well as all other latest ACC additons. Thanks :D