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 2, Slade, WadSmoosh, 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.

Re: GDCC: An Alternative ACS Compiler

Postby _mental_ » Mon Sep 11, 2017 7:58 am

UsernameAK wrote:GZDoom crashes when i try to access exitedLevels from an ACS script (not C)

Please post a crash dump.
Joined: 07 Aug 2011

Re: GDCC: An Alternative ACS Compiler

Postby DavidPH » Mon Sep 11, 2017 4:00 pm

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 allExpand view
[[__address(777)]] __addrdef __hub_arr hub_var;

[[__address(0)]] hub_var bool exitedLevels[MAX_LEVELS] = {false};

And then on the ACS side:
Code: Select allExpand view
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
Crazy Compiler Man
Joined: 28 Aug 2009

Re: GDCC: An Alternative ACS Compiler

Postby DavidPH » Fri Sep 15, 2017 7:21 am

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

Re: GDCC: An Alternative ACS Compiler [0.15.0]

Postby SuaveSteve » Wed Dec 23, 2020 12:30 pm

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?
Joined: 05 Jul 2014


Return to Creation, Conversion, and Editing

Who is online

Users browsing this forum: No registered users and 1 guest