GDCC: An Alternative ACS Compiler [0.15.0]

Any utility that assists in the creation of mods, assets, etc, go here.
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.

Re: GDCC: An Alternative ACS Compiler

Postby Marrub » Thu Oct 20, 2016 2:51 pm

C++ is not really based on C at all, and thus has a lot of features that are different, like operator=.
User avatar
Marrub
Xevv Va Rkvyr
 
 
 
Joined: 26 Feb 2013
Discord: Marrub#5455
Twitch ID: marrubdaskuleion
Github ID: marrub--
Operating System: Other Linux 64-bit
Graphics Processor: ATI/AMD with Vulkan Support

Re: GDCC: An Alternative ACS Compiler

Postby DavidPH » Thu Oct 20, 2016 3:37 pm

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
DavidPH
Crazy Compiler Man
 
Joined: 28 Aug 2009

Re: GDCC: An Alternative ACS Compiler

Postby Nero » Thu Oct 20, 2016 3:54 pm

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
Nero
Royal Boredom....Why can't I do this in Windows?
 
Joined: 06 Sep 2006
Location: Middle of Nowheresville Il.

Re: GDCC: An Alternative ACS Compiler

Postby Nero » Sun Oct 23, 2016 12:26 am

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

Code: Select allExpand view
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
Nero
Royal Boredom....Why can't I do this in Windows?
 
Joined: 06 Sep 2006
Location: Middle of Nowheresville Il.

Re: GDCC: An Alternative ACS Compiler

Postby DavidPH » Sun Oct 23, 2016 7:09 am

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
DavidPH
Crazy Compiler Man
 
Joined: 28 Aug 2009

Re: GDCC: An Alternative ACS Compiler

Postby Nero » Sun Oct 23, 2016 1:15 pm

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
Nero
Royal Boredom....Why can't I do this in Windows?
 
Joined: 06 Sep 2006
Location: Middle of Nowheresville Il.

Re: GDCC: An Alternative ACS Compiler

Postby Player701 » Mon Oct 24, 2016 6:38 am

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.
User avatar
Player701
 
 
 
Joined: 13 May 2009
Location: Russia
Discord: Player701#8214
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: GDCC: An Alternative ACS Compiler

Postby ZzZombo » Mon Oct 24, 2016 6:22 pm

Delay() is invalid inside functions, DON'T DO THAT! As well as other functions from the same category.
ZzZombo
 
Joined: 16 Jul 2012

Re: GDCC: An Alternative ACS Compiler

Postby arookas » Mon Oct 24, 2016 8:37 pm

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
arookas
...but only sometimes.
 
Joined: 24 Jan 2011

Re: GDCC: An Alternative ACS Compiler

Postby Player701 » Tue Oct 25, 2016 6:46 am

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
Player701
 
 
 
Joined: 13 May 2009
Location: Russia
Discord: Player701#8214
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: GDCC: An Alternative ACS Compiler

Postby The Zombie Killer » Tue Oct 25, 2016 8:44 am

Delay() is only invalid in a function in ZDoom, it works fine in Eternity
User avatar
The Zombie Killer
King of the Kangaroos
 
Joined: 14 Jul 2011
Location: Gold Coast, Queensland, Australia
Discord: Zombie#1795

Re: GDCC: An Alternative ACS Compiler

Postby DavidPH » Tue Oct 25, 2016 9:18 am

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
DavidPH
Crazy Compiler Man
 
Joined: 28 Aug 2009

Re: GDCC: An Alternative ACS Compiler

Postby Player701 » Tue Oct 25, 2016 9:24 am

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
Player701
 
 
 
Joined: 13 May 2009
Location: Russia
Discord: Player701#8214
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: GDCC: An Alternative ACS Compiler

Postby DavidPH » Tue Oct 25, 2016 9:27 am

I rewrote its interpreter years ago. Internally, it has a lot of capabilities that ZDoom's interpreter does not.
User avatar
DavidPH
Crazy Compiler Man
 
Joined: 28 Aug 2009

Re: GDCC: An Alternative ACS Compiler

Postby Nash » Wed Nov 02, 2016 2:10 am

Kindly requesting update to the new parameter introduced to PlaySound... as well as all other latest ACC additons. Thanks :D
User avatar
Nash
Twitter/Facebook/Youtube: nashmuhandes
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Twitch ID: nashmuhandes
Github ID: nashmuhandes

PreviousNext

Return to Editors / Asset Manipulation

Who is online

Users browsing this forum: No registered users and 0 guests