Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела
FAQ Community Calendar Today's Posts Search

Notices

 
 
Thread Tools Search this Thread Display Modes
Old 17.04.2006, 00:06   #1
humordwarf
Архивный участник
 
Join Date: Feb 2006
Posts: 453
Default [please, delete topic] Decompiler Sucks, sorry

no suggestions
humordwarf is offline  
Old 17.04.2006, 00:14   #2
Eanae
Архивный участник
 
Join Date: Jun 2005
Posts: 262
Default

Why not decompile it into something people already know, like nasc? ;o
Eanae is offline  
Old 17.04.2006, 00:19   #3
humordwarf
Архивный участник
 
Join Date: Feb 2006
Posts: 453
Default

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" =)
humordwarf is offline  
Old 17.04.2006, 00:20   #4
FidoW
Архивный участник
 
Join Date: Sep 2005
Posts: 1,014
Default

yes, i agree, that decompiled is easy to understand, but maybe is best NASC...
FidoW is offline  
Old 17.04.2006, 00:26   #5
humordwarf
Архивный участник
 
Join Date: Feb 2006
Posts: 453
Default

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:
humordwarf is offline  
Old 17.04.2006, 02:22   #6
m4rk
Архивный участник
 
Join Date: Jan 2006
Posts: 607
Default

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
m4rk is offline  
Old 17.04.2006, 02:55   #7
humordwarf
Архивный участник
 
Join Date: Feb 2006
Posts: 453
Default

dunno.. dunno...
:?
humordwarf is offline  
Old 17.04.2006, 10:36   #8
HF
Архивный участник
 
Join Date: Aug 2005
Posts: 1,531
Default

Quote:
Originally Posted by humordwarf
dunno.. dunno...
...
i can take(occupy) first place in order(line) to your AI-decompiler release?
HF is offline  
Old 18.04.2006, 02:44   #9
humordwarf
Архивный участник
 
Join Date: Feb 2006
Posts: 453
Default

never mind
humordwarf is offline  
Old 18.04.2006, 06:22   #10
Firedaemon
Архивный участник
 
Join Date: Oct 2005
Posts: 267
Default

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, "", "", "", "", ""));
	      }
      }
   }
Firedaemon is offline  
Old 18.04.2006, 06:53   #11
humordwarf
Архивный участник
 
Join Date: Feb 2006
Posts: 453
Default

thanks, Firedaemon
humordwarf is offline  
Old 18.04.2006, 07:11   #12
Firedaemon
Архивный участник
 
Join Date: Oct 2005
Posts: 267
Default

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
Firedaemon is offline  
Old 18.04.2006, 12:06   #13
Dmytro
Архивный участник
 
Join Date: Nov 2005
Posts: 215
Default

Amazing :?
Dmytro is offline  
Old 19.04.2006, 22:43   #14
Silentz0r
Архивный участник
 
Join Date: Apr 2005
Posts: 122
Default

very good humo, this going to be public?
Silentz0r is offline  
Old 20.04.2006, 01:55   #15
Kenster
Архивный участник
 
Join Date: Sep 2005
Posts: 455
Default

I 100% prefer nasc.exe
Kenster is offline  
Old 20.04.2006, 03:01   #16
humordwarf
Архивный участник
 
Join Date: Feb 2006
Posts: 453
Default

work frozen
humordwarf is offline  
Old 27.05.2006, 06:31   #17
dinesat4
Архивный участник
 
Join Date: Jul 2005
Posts: 123
Default

frozen? noooooooooooooooooooo :'(
dinesat4 is offline  
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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