View Full Version : 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.
there is no c4 ai compiler....... but here is a old nasc
PS :) dekoth love your sig lol
Вложения из исходного сообщения (сами файлы в копии отсутствуют):
nasc.rar — 311384 байт
Thanks nish, hope i can make somthing useful with it.
;)
Greetz
write it in old nasc than manually convert it for c4 that how i do it..
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...
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 :)
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
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
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
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
hd I mean decompiled code :P
humordwarf
23.12.2006, 00:26
hd I mean decompiled code :P
i1=(i1+i2+i3+i4+i5+i6+i7+i8+i9)/10; == decompiled code
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.
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/forums/showthread.php?t=6407&highlight=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