XaserAcheron / argent

ARGENT: a Xaserious DOOM (4) to DooM (classic) weapon mod.
16 stars 2 forks source link

ZScript Branch? #55

Closed XaserAcheron closed 7 years ago

XaserAcheron commented 7 years ago

Oh boy.

It's probably a bit too early to think about doing this just yet, but ZScript is just about at the point where it's possible to start converting the DECORATE code over. It'll still be a few versions until I'll be able to de-anonymize those functions (the real treat, I think), but it may be worth switching stuff over beforehand to prepare a bit.

This is naturally a massive undertaking, so I'm not going to leap into it without getting things stable-ish (and working with Kate to make sure that we don't turn Orange into Lemon-Lime). Just a thought at least.

XaserAcheron commented 7 years ago

On second thought, maybe not so massive. It's basically just adding semicolons and wrapping some stuff in a "Defaults" block. Would still touch a lot of code and we'll need to coordinate, but it's like an afternoon's work.

For reference, the Arachnotron just looks like this:

class Arachnotron : Actor
{
    Default
    {
        Health 500;
        Radius 64;
        Height 64;
        Mass 600;
        Speed 12;
        PainChance 128;
        Monster;
        +FLOORCLIP
        +BOSSDEATH
        SeeSound "baby/sight";
        PainSound "baby/pain";
        DeathSound "baby/death";
        ActiveSound "baby/active";
        Obituary "$OB_BABY";
    }
    States
    {
    Spawn:
        BSPI AB 10 A_Look;
        Loop;
    See:
        BSPI A 20;
        BSPI A 3 A_BabyMetal;
        BSPI ABBCC 3 A_Chase;
        BSPI D 3 A_BabyMetal;
        BSPI DEEFF 3 A_Chase;
        Goto See+1;
    Missile:
        BSPI A 20 BRIGHT A_FaceTarget;
        BSPI G 4 BRIGHT A_BspiAttack;
        BSPI H 4 BRIGHT;
        BSPI H 1 BRIGHT A_SpidRefire;
        Goto Missile+1;
    Pain:
        BSPI I 3;
        BSPI I 3 A_Pain;
        Goto See+1;
    Death:
        BSPI J 20 A_Scream;
        BSPI K 7 A_NoBlocking;
        BSPI LMNO 7;
        BSPI P -1 A_BossDeath;
        Stop;
    Raise:
        BSPI P 5;
        BSPI ONMLKJ 5;
        Goto See+1;
    }
}

Near-identical. Though the real cool thing is the function definition at the bottom of arachnotron.txt... :D

[EDIT] I love how this is a built-in GitHub emoji: :godmode:

XaserAcheron commented 7 years ago

There's a zscript branch now. O:

There's also zscript-conversion, which is just the zscript stuff converted over 1:1 (or as close as possible) without any refactoring or further work. Figured this'd help with downstream merges.