Any possibility of getting include-files in AS,
or maybe just through a user(coder)-defined callback ?
My code could have a callback-function for encountered include-files,
performing the task of actually reading the file
(the way I like it, just from disk or even from a zip-file or whatever),
and passing back the text-buffer...
For BeatHarness it would be great, I/people could just make include-files with different graphic effects to be used in all the scripts !
Just rambling here though..
[edited by - LDenninger on May 12, 2004 7:13:38 PM]
Welcome to the forums Led. I've been wondering when you'd show up
Include files would be a task for a pre-processor, which would be a level above AngelScript. Thus I think the best solution is simply to scan the script files, line by line, for any #include directives. When they are encountered the first two characters could be exchanged for '//' making the line a comment. The included files could just be read and added as another script section because order isn't important for AngelScript.
I think this should be a matter of minutes to implement for someone with your skill. Perhaps you would be interesting in making it into a tutorial. That is if you liked the solution.
__________________________________________________________ www.AngelCode.com - game development and more... AngelScript - free scripting library - Tower - free puzzle game
[edited by - WitchLord on May 12, 2004 10:11:53 PM]