GDCC: An Alternative ACS Compiler [0.15.0]

Any utility that assists in the creation of mods, assets, etc, go here. For example: Ultimate Doom Builder, Slade, WadSmoosh, Oblige, etc.
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.
User avatar
Marrub
 
 
Posts: 1193
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
Contact:

Re: GDCC: An Alternative ACS Compiler

Post by Marrub »

C++ is not really based on C at all, and thus has a lot of features that are different, like operator=.
User avatar
DavidPH
Posts: 382
Joined: Fri Aug 28, 2009 1:46 pm

Re: GDCC: An Alternative ACS Compiler

Post by DavidPH »

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.
User avatar
Sarah
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.
Contact:

Re: GDCC: An Alternative ACS Compiler

Post by Sarah »

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.
User avatar
Sarah
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.
Contact:

Re: GDCC: An Alternative ACS Compiler

Post by Sarah »

Hey, odd error, just added ctype to my header list, and I get this when compiling:

Code: Select all

ERROR: (no file): expected primary-expression got ' '
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.
User avatar
DavidPH
Posts: 382
Joined: Fri Aug 28, 2009 1:46 pm

Re: GDCC: An Alternative ACS Compiler

Post by DavidPH »

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.
User avatar
Sarah
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.
Contact:

Re: GDCC: An Alternative ACS Compiler

Post by Sarah »

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.
User avatar
Player701
 
 
Posts: 1640
Joined: Wed May 13, 2009 3:15 am
Graphics Processor: nVidia with Vulkan support
Contact:

Re: GDCC: An Alternative ACS Compiler

Post by Player701 »

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.
ZzZombo
Posts: 315
Joined: Mon Jul 16, 2012 2:02 am

Re: GDCC: An Alternative ACS Compiler

Post by ZzZombo »

Delay() is invalid inside functions, DON'T DO THAT! As well as other functions from the same category.
User avatar
arookas
Posts: 265
Joined: Mon Jan 24, 2011 6:04 pm
Contact:

Re: GDCC: An Alternative ACS Compiler

Post by arookas »

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.
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.
User avatar
Player701
 
 
Posts: 1640
Joined: Wed May 13, 2009 3:15 am
Graphics Processor: nVidia with Vulkan support
Contact:

Re: GDCC: An Alternative ACS Compiler

Post by Player701 »

ZzZombo wrote:Delay() is invalid inside functions, DON'T DO THAT! As well as other functions from the same category.
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.
User avatar
The Zombie Killer
Posts: 1528
Joined: Thu Jul 14, 2011 12:06 am
Location: Gold Coast, Queensland, Australia

Re: GDCC: An Alternative ACS Compiler

Post by The Zombie Killer »

Delay() is only invalid in a function in ZDoom, it works fine in Eternity
User avatar
DavidPH
Posts: 382
Joined: Fri Aug 28, 2009 1:46 pm

Re: GDCC: An Alternative ACS Compiler

Post by DavidPH »

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.
User avatar
Player701
 
 
Posts: 1640
Joined: Wed May 13, 2009 3:15 am
Graphics Processor: nVidia with Vulkan support
Contact:

Re: GDCC: An Alternative ACS Compiler

Post by Player701 »

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.
User avatar
DavidPH
Posts: 382
Joined: Fri Aug 28, 2009 1:46 pm

Re: GDCC: An Alternative ACS Compiler

Post by DavidPH »

I rewrote its interpreter years ago. Internally, it has a lot of capabilities that ZDoom's interpreter does not.
User avatar
Nash
 
 
Posts: 17439
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: GDCC: An Alternative ACS Compiler

Post by Nash »

Kindly requesting update to the new parameter introduced to PlaySound... as well as all other latest ACC additons. Thanks :D
Post Reply

Return to “Creation, Conversion, and Editing”