Post Pacific

Post Pacific (https://postpacific.loc-online.com/index.php)
-   Темы без сохранившегося раздела (https://postpacific.loc-online.com/forumdisplay.php?f=10001)
-   -   [please, delete topic] Decompiler Sucks, sorry (https://postpacific.loc-online.com/showthread.php?t=4070)

humordwarf 17.04.2006 00:06

[please, delete topic] Decompiler Sucks, sorry
 
no suggestions

Eanae 17.04.2006 00:14

Why not decompile it into something people already know, like nasc? ;o

humordwarf 17.04.2006 00:19

Quote:

Originally Posted by Eanae
Why not decompile it into something people already know, like nasc? ;o

because it will be something, that more close to "english" =)

FidoW 17.04.2006 00:20

yes, i agree, that decompiled is easy to understand, but maybe is best NASC...

humordwarf 17.04.2006 00:26

Quote:

Originally Posted by FidoW
yes, i agree, that decompiled is easy to understand, but maybe is best NASC...

i know nothing about NASC :wink:

m4rk 17.04.2006 02:22

you could make depend the language it decompiles into on a .txt file so that if other people are willing they could do the NASC txt

humordwarf 17.04.2006 02:55

dunno.. dunno...
:?

HF 17.04.2006 10:36

Quote:

Originally Posted by humordwarf
dunno.. dunno...
...

i can take(occupy) first place in order(line) to your AI-decompiler release? :)

humordwarf 18.04.2006 02:44

never mind

Firedaemon 18.04.2006 06:22

Yeah your decompilation looks good and is pretty much NASC. There is one problem that I see though unless the "code" is playing tricks on my eyes.

In control structures, equal comparisons are done with "==" and not single "=". Single "=" are assignements.

A decompiler would be awesome as long as it bounced it down to NASC. It would allow us more serious developers to highly modify the existing classes without having to completley re-write them.

However, the best and most reliable way of compiling is NASC so I think your decompiler should decompile down to that. I have attached to this (just in case you dont have it) a sample NASC script as well as some included documentation.

I know NASC pretty well and decompiling into NASC would be the best for the community as a whole. If you need any insight on NASC knowledge, I could assist you.

The following code is just some examples of nasc. While incomplete, and class variables not shown are referenced, you will see the overall flow of how it is done.

Code:

  EventHandler MOVE_TO_WAY_POINT_FINISHED(way_point_index, next_way_point_index)
  {
      if (debug == 1) { Say("MOVE_TO_WAY_POINT_FINISHED Handler Fired");}
 
      myself.i_ai0 = next_way_point_index;

      AddTimerEx(100001, (GetWayPointDelay(WayPointDelays, way_point_index)*1000));
  }

  EventHandler TIMER_FIRED_EX(timer_id)
  {
      if (debug == 1) { Say("TIMER_FIRED_EX Handler Fired");}
 
      if (timer_id == 100001)
      {// waypoints
        if (myself.i_ai0 > 0)
        {
            AddMoveToWayPointDesire(WayPoints, WayPointDelays, myself.i_ai0, MoveToWayPoint_BoostValue);
        }
        else
        {
            AddMoveToWayPointDesire(WayPoints, WayPointDelays, 1, MoveToWayPoint_BoostValue);
        }
      }
  }

  EventHandler SEE_ITEM(item)
  {
      if (debug == 1) { Say("SEE_ITEM Handler Fired");}
     
      AddGetItemDesire(item, GetItem_BoostValue);
  }
 
  EventHandler GET_ITEM_FINISHED(item, i0)
  {
      if (debug == 1) { Say("GET_ITEM_FINISHED Handler Fired");}
     
      if ((OwnItemCount(myself, item) >= 1))
      {
              i0 = Rand(100);
             
              if (i0 <= 33)
              {
                Say(MakeFString(ItemPickupMsg1, "", "", "", "", ""));
              }
              else if ((i0 >= 34) && (i0 <= 66))
              {
                Say(MakeFString(ItemPickupMsg2, "", "", "", "", ""));
              }
              else
              {
                Say(MakeFString(ItemPickupMsg3, "", "", "", "", ""));
              }
      }
  }


humordwarf 18.04.2006 06:53

thanks, Firedaemon

Firedaemon 18.04.2006 07:11

In NASC, you simply write the following code to call_super

Code:

super;
For exit_handler it is simply

Code:

return;
You have several syntax errors in your decompiled code. I will go over those with you in MSN

Dmytro 18.04.2006 12:06

Amazing :?

Silentz0r 19.04.2006 22:43

very good humo, this going to be public?

Kenster 20.04.2006 01:55

I 100% prefer nasc.exe

humordwarf 20.04.2006 03:01

work frozen

dinesat4 27.05.2006 06:31

frozen? noooooooooooooooooooo :'(


All times are GMT. The time now is 15:16.