Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tokens hard-coded?
#3
Yes, but this only applies to native functions (not expression tokens). The game that I tested the tool on has different values (non-default) for the expression tokens. In in the future it might be nice if you can provide a way to load a custom table.

I did a bit of digging and it does seem that this is hard coded.
Code:
if (nativeIndex >= 0x70)
{
    item = this.FindNT(nativeIndex);
}
else if (nativeIndex >= 0x60)
{
    byte num3 = this.uobjectStream_0.ReadByte();
    this.method_1(1);
    item = this.FindNT(((nativeIndex - 0x60) << 8) | num3);
}
else
{
    switch (nativeIndex)
    {
        case 0:
            item = new LocalVariableToken();
            goto Label_083A;

        case 1:
            item = new InstanceVariableToken();
            goto Label_083A;

        case 2:
            item = new DefaultVariableToken();
            goto Label_083A;

        case 4:
            item = new ReturnToken();
            goto Label_083A;

        case 5:
            item = new SwitchToken();
            goto Label_083A;

        case 6:
            item = new JumpToken();
            goto Label_083A;

        case 7:
            item = new JumpIfNotToken();
            goto Label_083A;

        case 8:
            item = new StopToken();
            goto Label_083A;

        case 9:
            item = new AssertToken();
            goto Label_083A;

        case 10:
            item = new CaseToken();
            goto Label_083A;

        case 11:
            item = new NothingToken();
            goto Label_083A;

        case 12:
            item = new LabelTableToken();
            goto Label_083A;

        case 13:
            item = new GoToLabelToken();
            goto Label_083A;

        case 14:
            item = new EatStringToken();
            goto Label_083A;

        case 15:
            item = new LetToken();
            goto Label_083A;

        case 0x10:
            item = new DynamicArrayElementToken();
            goto Label_083A;

        case 0x11:
            item = new NewToken();
            goto Label_083A;

        case 0x12:
            item = new ClassContextToken();
            goto Label_083A;

        case 0x13:
            item = new MetaCastToken();
            goto Label_083A;
....
Reply


Messages In This Thread
Tokens hard-coded? - by Alchemista - 04-26-2012, 06:51 AM
RE: Tokens hard-coded? - by eliot - 04-26-2012, 09:36 AM
RE: Tokens hard-coded? - by Alchemista - 04-26-2012, 12:21 PM
RE: Tokens hard-coded? - by eliot - 04-27-2012, 01:48 AM

Forum Jump:


Users browsing this thread: 5 Guest(s)