🎉 Celebrating 25 Years of GameDev.net! 🎉
Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!
Include files ?
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 ![](wink.gif)
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]
![](wink.gif)
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]
Yeah, I figured that much, it''s just that
a) I''m so lazy I hardly make the effort to breathe![](smile.gif)
b) I don''t have too much time lately![](sad.gif)
I''ll go for the preprocessor anyway,
''cause I want to get other metadata from my scriptfiles anyway.
(Author, ScriptName, Info)
Anyway, keep up the good work !
a) I''m so lazy I hardly make the effort to breathe
![](smile.gif)
b) I don''t have too much time lately
![](sad.gif)
I''ll go for the preprocessor anyway,
''cause I want to get other metadata from my scriptfiles anyway.
(Author, ScriptName, Info)
Anyway, keep up the good work !
![](smile.gif)
Yeah, I know how it is. Time is precious.
I would write the pre-processor myself, but I don''t have the time either.
__________________________________________________________
www.AngelCode.com - game development and more...
AngelScript - free scripting library - Tower - free puzzle game
I would write the pre-processor myself, but I don''t have the time either.
__________________________________________________________
www.AngelCode.com - game development and more...
AngelScript - free scripting library - Tower - free puzzle game
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement