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.
_mental_
 
 
Posts: 3812
Joined: Sun Aug 07, 2011 4:32 am

Re: GDCC: An Alternative ACS Compiler

Post by _mental_ »

UsernameAK wrote:GZDoom crashes when i try to access exitedLevels from an ACS script (not C)
Please post a crash dump.
User avatar
DavidPH
Posts: 382
Joined: Fri Aug 28, 2009 1:46 pm

Re: GDCC: An Alternative ACS Compiler

Post by DavidPH »

How is it declared in ACS? I think this is on me, though. I wasn't thinking of arrays at all when I answered your previous question. For making an array-stored object that's accessible from ACS, it's a little extra legwork:

Code: Select all

[[__address(777)]] __addrdef __hub_arr hub_var;

[[__address(0)]] hub_var bool exitedLevels[MAX_LEVELS] = {false};
And then on the ACS side:

Code: Select all

world int 777:exitedLevels[MAX_LEVELS];
HOWEVER: ZDoom only has 256 hub arrays, so you have to use a lower number. (I want to add some kind of warning or something for this, but it's of course complicated by ACSVM/EE having a higher limit.)

As an explanation: The address space on the C side allocates what is considered an array on the ACS side. The difference being of course that you can declare multiple objects to be in that address space, rather than the one array object taking the entire space in ACS. But it's the address space, then, that has the number you use in ACS. The object you declare in that address space then needs to be allocated at the start of that array in order to match ACS's behavior. If it is the only object in that address space, then you should not need the address attribute on it, but it is good to add just to make it explicit. (One has to expect a little weirdness for inter-language ABI compatibility, though.)

In other news, finally got that mingw-w64-gcc update today, so new builds are finally available.
User avatar
DavidPH
Posts: 382
Joined: Fri Aug 28, 2009 1:46 pm

Re: GDCC: An Alternative ACS Compiler

Post by DavidPH »

Quick update to note that A, the libacs headers have been fixed so the new builds are now actually usable; and B, I now have a Discord server for GDCC and other projects of mine. Link is in the first post.
SuaveSteve
Posts: 76
Joined: Sat Jul 05, 2014 7:38 am

Re: GDCC: An Alternative ACS Compiler [0.15.0]

Post by SuaveSteve »

This project looks interesting and I see the Discord is active but the wiki is messed up.

So, how do you expect newcomers to use the features of your compiler, exactly?
Post Reply

Return to “Creation, Conversion, and Editing”