Page 16 of 16

Re: GDCC: An Alternative ACS Compiler

Posted: Mon Sep 11, 2017 7:58 am
by _mental_
UsernameAK wrote:GZDoom crashes when i try to access exitedLevels from an ACS script (not C)
Please post a crash dump.

Re: GDCC: An Alternative ACS Compiler

Posted: Mon Sep 11, 2017 4:00 pm
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.

Re: GDCC: An Alternative ACS Compiler

Posted: Fri Sep 15, 2017 7:21 am
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.

Re: GDCC: An Alternative ACS Compiler [0.15.0]

Posted: Wed Dec 23, 2020 12:30 pm
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?