[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-smalltalk] Using Smalltalk as a scripting language
From: |
Roland Plüss |
Subject: |
[Help-smalltalk] Using Smalltalk as a scripting language |
Date: |
Mon, 26 Oct 2009 20:10:27 +0100 |
User-agent: |
Thunderbird 2.0.0.23 (X11/20090926) |
( new to this list, so hello )
I would like to provide a Smalltalk scripting module for my game engine
just because I can ( and smalltalk is awesome :P ). Now I tried looking
at the docs to figure out how to get smalltalk into my app. So far what
I managed is the following:
gst_set_var( GST_VERBOSITY, 1 );
//gst_smalltalk_args (argc - 1, argv + 1); // we have none
//gst_set_executable_path( dataDir ); // undefined in gstpub.h ?!
if( gst_initialize( NULL, NULL, GST_NO_TTY ) != 0 ){
printf( "[ST] gst_initialize failed.\n" );
return false;
}
So far this seems to work. I get 0 as a result so I assume the VM is up
and running. Why the gst_set_executable_path does not exist in gstpub.h
I don't know. Now in the manual (
http://www.gnu.org/software/smalltalk/manual/html_node/Using-Smalltalk.html#Using-Smalltalk
) it is written to omit |gst_process_file. Now what I want is two fold.
First I want to expose engine classes ( c++ classes ) to smalltalk. As
far as I get from the docs this should be possible although I'm not
fully getting it yet. Second is that I want to load various script files
containing smalltalk code and classes into the VM. How am I supposed to
do this? ||gst_process_file seems to be a blocking call if afterwards in
the manual the exit code is called. In general my init looks like this (
pseudo-code ):
load engine scripts
load game scripts
call initGame and store return value as game object
from that time on I operate on the game object sending all kinds of
messages. What goes for calling the initGame method I think I figured
out from the docs how this is supposed to be done but what goes for
loading the script files and parsing them I'm still at a loss.
Side question: Is there somewhere an API documentation? I'm not so fond
of messing with function calls if I don't know what I can feed them as
input ( docs seem rather scarce to me ).
Thanks in advance.
|||--
Yours sincerely
Plüss Roland
Leader and Head Programmer
- Game: Epsylon ( http://epsylon.rptd.ch/ ,
http://www.moddb.com/games/4057/epsylon )
- Game Engine: Drag(en)gine ( http://dragengine.rptd.ch ,
http://www.moddb.com/engines/9/dragengine )
- Normal Map Generator: DENormGen ( http://epsylon.rptd.ch/denormgen.php )
signature.asc
Description: OpenPGP digital signature
- [Help-smalltalk] Using Smalltalk as a scripting language,
Roland Plüss <=
- Re: [Help-smalltalk] Using Smalltalk as a scripting language, Paolo Bonzini, 2009/10/26
- Re: [Help-smalltalk] Using Smalltalk as a scripting language, Roland Plüss, 2009/10/27
- Re: [Help-smalltalk] Using Smalltalk as a scripting language, Paolo Bonzini, 2009/10/27
- Re: [Help-smalltalk] Using Smalltalk as a scripting language, Roland Plüss, 2009/10/27
- Re: [Help-smalltalk] Using Smalltalk as a scripting language, Paolo Bonzini, 2009/10/27
- Message not available
- Re: [Help-smalltalk] Using Smalltalk as a scripting language, Paolo Bonzini, 2009/10/28
- Re: [Help-smalltalk] Using Smalltalk as a scripting language, Roland Plüss, 2009/10/28
- Re: [Help-smalltalk] Using Smalltalk as a scripting language, Paolo Bonzini, 2009/10/28
- Re: [Help-smalltalk] Using Smalltalk as a scripting language, Roland Plüss, 2009/10/28
- Re: [Help-smalltalk] Using Smalltalk as a scripting language, Paolo Bonzini, 2009/10/28