disassembling usecode...

NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Forum rules
NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Locked
TMNM Dragon

disassembling usecode...

Post by TMNM Dragon »

I've disassembled the usecode using ucxt.
The output I have looks like assembler.
Is there anyway to output it in the script form that i've seen in the samples (eg from source /exult/content/bg/patch.uc)?
TMNM Dragon

Re: disassembling usecode...

Post by TMNM Dragon »

Ok, I figured out that there are some switches
-fa - output using "assembler" format (default)
-fs - output using "exult script" format
-fz - output using "exult script" format
Anyone know the difference is between -fs and -fz?
SB-X
Posts: 980
Joined: Thu May 14, 2020 1:34 pm

Re: disassembling usecode...

Post by SB-X »

UCXT wasn't finished. I don't think the output is compatible with UCC, but it might make it easier to read. One of those options is the old version, and the other one is meant to replace it. (but I don't remember which)
TMNM Dragon

Re: disassembling usecode...

Post by TMNM Dragon »

That's ok, I just want to read it to get a better understanding of how it works.
TMNM Dragon

Re: disassembling usecode...

Post by TMNM Dragon »

Is there a program that can disassemble the usecode in a format that is compatible with UCC?

While reading the output from UCXT has given me a better understanding of usecode, it has also served to confuse me in terms of the terminology.

Is UI_add_cont_items(var0,var1,var2,var3,var4,var5); valid?
I get: 'UI_add_cont_items' not declared
It is in the intrinsics.cc source, so I thought that should work.

Also exit2(); and abrt(); are used a lot, but don't seem to be valid in UCC.
Is the equivalent break;?
Locked