Jump to content

Recommended Posts

Posted

Nice! I haven't checked out those, but I remember messing around with BUILD.EMC using Minniatian's decompiler. Can you tell what UNIT.EMC does except drawing different unit animations (I guess, based on what BUILD.EMC does)?

Posted

in unit.emc, each unit has a main script

[bullet]

PushWord 6000

Execute Delay

AddSP 1

Execute Die

Pop (Return)

[sonicBlast]

PushWord 1800

Execute Delay

AddSP 1

Execute Die

Pop (Return)

That code just delays script execution for the specified amount (6000 and 1800), then the unit dies

MCV has this piece of code, which i assume var 0 is the "action" button that was pushed, and 12 is ACTION_DEPLOY

l2257:

PushVar 0

PushByte 12

Evaluate Equal

IfNotGoto l2266

Execute MCVDeploy

  • Upvote 1
Posted

i can verify that actually, from OpenDune

void Unit_SetAction(Unit *u, ActionType action)

<snip>

u->o.script.variables[0] = action;

(setaction is called from a number of places, one of them is the GUI)

Posted

its possible the original scripts looked like more

Units {

Bullet {

Delay(6000);

Die();

Return;

}

}

it would just require more work on the decompiler and the compiler to get it to that state

Posted

That pseudo-asm they used in those scripts is pretty odd choice, imo. I wonder why they chose to do something like that.

In what way is it an odd choice?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.