bcc-slade: BCC but for SLADE (04/09/21, more stable version)

Maps, modifications, add-ons, projects, and other releases for Zandronum. Also includes announcers.
Post Reply
User avatar
TDRR
Forum Regular
Posts: 183
Joined: Thu Jun 28, 2018 9:13 pm
Location: Venezuela

bcc-slade: BCC but for SLADE (04/09/21, more stable version)

#1

Post by TDRR » Sat Aug 07, 2021 7:12 pm

bcc-slade is a modification (more like a hack) of Positron's BCC version 0.8.0 (source repo here) to work better with SLADE, so it doesn't need the config file hack, making it easier and faster to switch between the original acc and bcc.

Download here!

To install it:
Just go into SLADE's Edit > Preferences. From there, on the bar to the left expand "Scripting" and click "ACS". Set the "location of the acc executable" to wherever you unzipped your bcc-slade.exe and the rest of the files.
Add the "lib" folder from there in the include paths, too. Save and reopen your currently open pk3/wads, and that's it!


It still has a couple limitations this way, though. It only compiles libraries as BCS, so the incompatibilities mentioned here come into play. That also happened with the config file hack, and not requiring that still makes it easier to switch to the original acc whenever needed by just switching the .exe in SLADE's options, so hopefully it's still useful for those that are looking to use BCS with SLADE (yeah, all 3 of us).

Another issue is that you can't include files with the .bcs extension if they're in the pk3.
Spoiler: example of the issue (Open)
Imagine you have a scripts folder like this:

Code: Select all

-hud_crap.bcs
-my_lib.bcs
And my_lib.bcs, being the file to be compiled, has this in it:

Code: Select all

#library "MY_LIB"
#import "zcommon.bcs" //this one doesn't matter because it's outside of the pk3, in the bcc_dir/lib/ folder
#include "hud_crap.bcs"
hud_crap.bcs will give you an error, even though the #include uses the correct name.

Having this instead:

Code: Select all

-hud_crap.acs
-my_lib.bcs
And this in my_lib.bcs:

Code: Select all

#library "MY_LIB"
#import "zcommon.bcs"
#include "hud_crap.acs"
Will compile just fine. So TL;DR the file to be compiled can have the .bcs extension, but the files it includes need to have .acs instead if they're on the .pk3.
Source code:
Even though no one asked for it at all and the license of the original compiler doesn't require it, I've decided to release the source code to this.
Be ready to look at the whopping 6, yes, you heard me, SIX lines worth of changes! Amazing, I know /s
Well, there's more changes, but they're all just #include path changes I made so it'd compile with CodeBlocks + gcc, nothing actually affecting how the program works.
The changes are so few that you can indeed just drop in main.c and common.c from the original 0.8.0 source, and they'll all be reverted, except the #include path changes, of course. I doubt many people will find this useful but here it is just in case.
https://www.mediafire.com/file/txk1ps2w ... c.zip/file
Spoiler: Other version(s) (Open)
commit d58b44d (latest, as of writing)
https://www.mediafire.com/file/2eriqnnm ... e.zip/file
This version is newer than 0.8.0, however it's rather unstable, and none of the changes have been documented on the wiki. There's also some deprecation errors for certain things (most notably, array.length() now is lengthof(array) ).

With none of the changes being documented, the deprecation errors oftentimes being a bit misleading (as the version that's used most often is 0.8.0), and the stability problems present in this version, it's much easier and less problematic to just use the last stable version, 0.8.0. This build is only left here in case anyone finds it useful.

There's also another bug exclusive to this version: Functions taking array references error if they're unused
Last edited by TDRR on Sat Sep 04, 2021 5:05 am, edited 1 time in total.

User avatar
TDRR
Forum Regular
Posts: 183
Joined: Thu Jun 28, 2018 9:13 pm
Location: Venezuela

Re: bcc-slade: BCC but for SLADE (04/09/21, more stable version)

#2

Post by TDRR » Sat Sep 04, 2021 4:38 am

Updated. Now the version used as a base is 0.8.0 instead of commit d58b44d, which was unstable, had no documented changes on the wiki, and as a result of that some things that were fine in 0.8.0 would result in deprecation warnings. Hopefully this change will provide more ease of use and stability.

Post Reply