Post Pacific

Post Pacific (https://postpacific.loc-online.com/index.php)
-   Темы без сохранившегося раздела (https://postpacific.loc-online.com/forumdisplay.php?f=10001)
-   -   nasc -> ai (https://postpacific.loc-online.com/showthread.php?t=6454)

xFinzOr 19.12.2006 23:05

nasc -> ai
 
Hey, Just wondering...
Is there any c4 ai compiler out?:)

Anywayz..

Can some share a c1 nasc compiler? I know there was somthing better shared by somone then the original c1 nasc compiler.
Just can't find it anymore after my hdd blew up :x

I used search but nothing useful came up!

Greetz.

DeKoth 20.12.2006 03:32

code stack.

nish 20.12.2006 08:24

nasc
 
there is no c4 ai compiler....... but here is a old nasc


PS :) dekoth love your sig lol

Вложения из исходного сообщения (сами файлы в копии отсутствуют):
nasc.rar — 311384 байт

xFinzOr 20.12.2006 09:26

Thanks nish, hope i can make somthing useful with it.

;)

Greetz

DeKoth 20.12.2006 16:31

write it in old nasc than manually convert it for c4 that how i do it..

FidoW 20.12.2006 17:35

Quote:

Originally Posted by DeKoth (Post 74544)
write it in old nasc than manually convert it for c4 that how i do it..

Isnt so easy, thats help, is true, but maybe help you more looking at C4 AI looking for examples of use of the same funcionts, etc... and there are a lot of things differentes like the "fetch4" etc.

And old NASC doesnt work with new C4 funcions, so.. you have a big problem with that...

DeKoth 21.12.2006 06:05

hmm works for me..

LoVeRSaMa 21.12.2006 11:31

There is no C4 AI Compiler... yet ;)

but i understand 1 is in making to make my job a little easyer :)

RipperX 22.12.2006 23:19

someone have NASC C4 code ? I wanna see it and check if I can do a NASC AI C4 compiler.

humordwarf 22.12.2006 23:30

Quote:

Originally Posted by RipperX (Post 74739)
someone have NASC C4 code ? I wanna see it and check if I can do a NASC AI C4 compiler.

is ai.obj bad ? =)

all what u need is convert c-like syntax into ai.obj code

like
Code:

  if (i0==1)
  {
    i1 = (i2*2+i3/1000*i4*i5-i6+i7*i8) & 7;
  }
  else
  {
    i1=(i1+i2+i3+i4+i5+i6+i7+i8+i9)/10;
  }

will be like
Code:

        push_event
        push_const 260        // i0
        add
        fetch_i4
        push_const 1
        equal
        branch_false L0001
        push_event
        push_const 264        // i1
        add
        push_reg_sp
        fetch_i
        push_event
        push_const 268        // i2
        add
        fetch_i4
        push_const 2
        mul
        push_event
        push_const 272        // i3
        add
        fetch_i4
        push_const 1000
        div
        push_event
        push_const 276        // i4
        add
        fetch_i4
        mul
        push_event
        push_const 280        // i5
        add
        fetch_i4
        mul
        add
        push_event
        push_const 284        // i6
        add
        fetch_i4
        sub
        push_event
        push_const 288        // i7
        add
        fetch_i4
        push_event
        push_const 292        // i8
        add
        fetch_i4
        mul
        add
        push_const 7
        bit_and
        assign4
        shift_sp -1
        goto L0002
L0001
        push_event
        push_const 264        // i1
        add
        push_reg_sp
        fetch_i
        push_event
        push_const 264        // i1
        add
        fetch_i4
        push_event
        push_const 268        // i2
        add
        fetch_i4
        add
        push_event
        push_const 272        // i3
        add
        fetch_i4
        add
        push_event
        push_const 276        // i4
        add
        fetch_i4
        add
        push_event
        push_const 280        // i5
        add
        fetch_i4
        add
        push_event
        push_const 284        // i6
        add
        fetch_i4
        add
        push_event
        push_const 288        // i7
        add
        fetch_i4
        add
        push_event
        push_const 292        // i8
        add
        fetch_i4
        add
        push_event
        push_const 296        // i9
        add
        fetch_i4
        add
        push_const 10
        div
        assign4
        shift_sp -1
L0002


RipperX 22.12.2006 23:43

hd I mean decompiled code :P

humordwarf 23.12.2006 00:26

Quote:

Originally Posted by RipperX (Post 74743)
hd I mean decompiled code :P

i1=(i1+i2+i3+i4+i5+i6+i7+i8+i9)/10; == decompiled code

RipperX 23.12.2006 01:01

Quote:

Originally Posted by humordwarf (Post 74750)
i1=(i1+i2+i3+i4+i5+i6+i7+i8+i9)/10; == decompiled code

u don't lost your humor xD ahaha

dude, some new C4 code have objects.. and I want to see "new" code.

FidoW 23.12.2006 01:11

Quote:

Originally Posted by RipperX (Post 74751)
u don't lost your humor xD ahaha

dude, some new C4 code have objects.. and I want to see "new" code.

Get SauDecompiler and decompile existing AI... works good.

Or... for example.. you have an example here...

https://postpacific.loc-online.com/f...ght=Buffer+NPC

is my buffer npc coded in C4 AI... using the myself object for the functions, etc.

humordwarf 23.12.2006 02:24

yes.. objects... typed as CSharedCreature, CSharedPledge, CSharedParty, CSharedItem... gg object containing some general functions like "Rand"...
myself object with lot of functions like was in C1.. etc...

but main question is... COMPILER.... how to compile C-syntax to AI syntax...
object pointers and function calls - just little part of compiler


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