View Full Version : [please, delete topic] Decompiler Sucks, sorry
humordwarf
17.04.2006, 00:06
no suggestions
Why not decompile it into something people already know, like nasc? ;o
humordwarf
17.04.2006, 00:19
Why not decompile it into something people already know, like nasc? ;o
because it will be something, that more close to "english" =)
yes, i agree, that decompiled is easy to understand, but maybe is best NASC...
humordwarf
17.04.2006, 00:26
yes, i agree, that decompiled is easy to understand, but maybe is best NASC...
i know nothing about NASC :wink:
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...
:?
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.
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
super;
For exit_handler it is simply
return;
You have several syntax errors in your decompiled code. I will go over those with you in MSN
Silentz0r
19.04.2006, 22:43
very good humo, this going to be public?
humordwarf
20.04.2006, 03:01
work frozen
dinesat4
27.05.2006, 06:31
frozen? noooooooooooooooooooo :'(